KTextEditor
Document Extension Interfaces
Collaboration diagram for Document Extension Interfaces:
Topics | |
MovingCursors and MovingRanges | |
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*
auto 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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:05:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:05:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.