A KTextEditor implementation may implement a Document extension interface, but it does not need to. More...
Collaboration diagram for Document Extension Interfaces:
|
Detailed Description
A KTextEditor implementation may implement a Document extension interface, but it does not need to.
So as a KTextEditor user you have to cast the Document to the desired interface and then check, whether the cast returns NULL or the valid interface.
Use qobject_cast to cast a Document doc into the DesiredExtensionInterface, example:
// doc is of type KTextEditor::Document* KTextEditor::DesiredExtensionInterface *iface = qobject_cast<KTextEditor::DesiredExtensionInterface*>( doc ); if( iface ) { // the implementation supports the interface // do stuff } else { // the implementation does not support the interface }
- See also:
- KTextEditor::Document
The following classes are a list of all available Document extension interfaces.
KDE 4.6 API Reference