kate/kate/interfaces/kate
#include <plugin.h>
Public Member Functions | |
PluginView (MainWindow *mainWindow) | |
virtual | ~PluginView () |
MainWindow * | mainWindow () const |
virtual void | readSessionConfig (KConfigBase *config, const QString &groupPrefix) |
virtual void | writeSessionConfig (KConfigBase *config, const QString &groupPrefix) |
Detailed Description
PluginView interface.
Topics:
intro
The class PluginView is a interface for the view of a plugin.
Plugin Views
The Kate application supports multiple mainwindows (Window > New Window). For every Kate MainWindow Plugin::createView() is called, i.e. overwrite createView() in your Plugin derived class and hook your view into the given mainwindow's KXMLGUIFactory. That means you have to create an own KXMLGUIClient derived PluginView class and create an own instance for every mainwindow. One PluginView then is bound to this specific MainWindow.
As already mentioned in the Plugin class documentation, readSessionConfig() and writeSessionConfig() are called to load and save session related data.
example
A PluginView is bound to a single MainWindow. To add GUI elements KDE's GUI XML frameworks is used, i.e. the MainWindow provides a KXMLGUIFactory into which the KXMLGUIClient is to be hooked. So the plugin view must inherit from Kate::XMLGUIClient, the following example shows the basic skeleton of the PluginView.
To embedd a plugin view as a tool view you have to call MainWindow::createToolView() and hook your gui into the returned widget.
- See also
- Plugin, XMLGUIClient, KXMLGUIClient, MainWindow
Constructor & Destructor Documentation
Kate::PluginView::PluginView | ( | MainWindow * | mainWindow | ) |
Constructor.
Definition at line 97 of file plugin.cpp.
|
virtual |
Virtual destructor.
Definition at line 104 of file plugin.cpp.
Member Function Documentation
MainWindow * Kate::PluginView::mainWindow | ( | ) | const |
Accessor to the Kate mainwindow of this view.
- Returns
- the mainwindow object
Definition at line 109 of file plugin.cpp.
|
virtual |
Load session specific settings here.
This function is called whenever a Kate session is loaded. You should use the given config
and prefix groupPrefix
to store the data. The group prefix exist so that the group does not clash with other applications that use the same config file.
- Parameters
-
config the KConfig object which is to be used groupPrefix the group prefix which is to be used
- See also
- writeSessionConfig()
Definition at line 114 of file plugin.cpp.
|
virtual |
Store session specific settings here.
This function is called whenever a Kate session is saved. You should use the given config
and prefix groupPrefix
to store the data. The group prefix exists so that the group does not clash with other applications that use the same config file.
- Parameters
-
config the KConfig object which is to be used groupPrefix the group prefix which is to be used
- See also
- readSessionConfig()
Definition at line 117 of file plugin.cpp.
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:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.