KTextEditor
#include <containerinterface.h>
Public Member Functions | |
MdiContainer () | |
virtual | ~MdiContainer () |
virtual View * | activeView ()=0 |
virtual bool | closeDocument (Document *doc)=0 |
virtual bool | closeView (View *view)=0 |
virtual Document * | createDocument ()=0 |
virtual View * | createView (Document *doc)=0 |
virtual void | setActiveView (View *view)=0 |
Detailed Description
A container for MDI-capable kpart hosts.
The kpart container for the KTextEditor interface may have different capabilities. For example, inside KDevelop or Kate, the container can manage multiple views and multiple documents. However, if the kpart text is used inside konqueror as a replacement of the text entry in html forms, the container will only support one view with one document.
This class allows the kpart component to create and delete views, create and delete documents, fetch and set the current view. Note that the ktexteditor framework already supports multiple document and views and that the kpart host can create them and delete them as it wishes. What this class provides is the ability for the kpart component being hosted to do the same.
An instance of this extension should be set with ContainerInterface::setContainerExtension().Check ContainerInterface() to see how to obtain an instance of ContainerInterface. The instance should inherit QObject, inherit MdiContainer, declare the Q_OBJECT macro and declare a Q_INTERFACES(KTextEditor::MdiContainer) .
Code example to support MdiContainer (in the kpart host):
To check if the kpart hosts supports the MDI container:
Definition at line 166 of file containerinterface.h.
Constructor & Destructor Documentation
MdiContainer::MdiContainer | ( | ) |
Constructor.
Definition at line 234 of file ktexteditor.cpp.
|
virtual |
Virtual destructor.
Definition at line 237 of file ktexteditor.cpp.
Member Function Documentation
|
pure virtual |
|
pure virtual |
Closes of document doc
.
The document is about to be closed but is still valid when this call is made. The Document does not contain any view when this call is made (closeView() has been called on all the views of the document previously).
The signal aboutToClose() is emitted before this method is called.
- Returns
- true if the removal is authorized and acted, or false if removing documents by the kpart is not supported by the container.
|
pure virtual |
Closes the View view
.
The view is still valid when this call is made but will be deleted shortly after.
- Returns
- true if the removal is authorized and acted, or false if the container does not support view removing from the kpart, or
|
pure virtual |
Create a new Document and return it to the kpart.
Canonical implementation is:
The signal documentCreated() will be emitted during the creation.
- Returns
- a pointer to the new Document object.
Creates a new View and return it to the kpart.
Canonical implementation is:
The signal viewCreated() will be emitted during the createView() call.
- Returns
- a pointer to the new View created.
|
pure virtual |
Set the view
requested by the part as the active view.
- See also
- activeView
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.