KTextEditor
#include <containerinterface.h>
Public Member Functions | |
ContainerInterface () | |
virtual | ~ContainerInterface () |
virtual QObject * | container ()=0 |
virtual void | setContainer (QObject *container)=0 |
Detailed Description
Class that allows the kpart host to provide some extensions.
The KTextEditor framework allows the kpart host to provide additional services to the kpart. Those services are provided through the ContainerInterface class.
If the container supports those specific services, it should set an instance of the service class with ContainerInterface::setContainer(). That instance should inherit QObject, have the Q_OBJECT macro and declare a Q_INTERFACES(), in order for the qobject_cast mechanism to work.
To obtain a ContainerInterface, in order to set a specific container extension, the kpart host should do:
It is then up to the kpart to use it.
Definition at line 65 of file containerinterface.h.
Constructor & Destructor Documentation
ContainerInterface::ContainerInterface | ( | ) |
Constructor.
Definition at line 228 of file ktexteditor.cpp.
|
virtual |
Virtual Destructor.
Definition at line 231 of file ktexteditor.cpp.
Member Function Documentation
|
pure virtual |
Fetch the container extension.
This method is used by the KTextEditor component to know which extensions are supported by the KTextEditor host.
The kpart will cast the result with qobject_cast() to the right container extension to see if that particular extension is supported:
Example:
- See also
- setContainer
|
pure virtual |
Set the KTextEditor container.
This method is used by the KTextEditor host to set an instance of a class providing optional container extensions.
- See also
- container
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.