KTextEditor
Editor Extension Interfaces
Detailed Description
A KTextEditor implementation may implement an Editor extension interface, but it does not need to.So as a KTextEditor user you have to cast the Editor to the desired interface and then check, whether the cast returns NULL or the valid interface.
Use qobject_cast to cast a Editor editor into the DesiredExtensionInterface, example:
// editor is of type KTextEditor::Editor* KTextEditor::DesiredExtensionInterface *iface = qobject_cast<KTextEditor::DesiredExtensionInterface*>( view ); if( iface ) { // the implementation supports the interface // do stuff } else { // the implementation does not support the interface }
- See also:
- KTextEditor::Editor
Classes | |
class | KTextEditor::CommandInterface |
Command extension interface for the Editor. More... | |
class | KTextEditor::ContainerInterface |
Class that allows the kpart host to provide some extensions. More... |