kate/kate/interfaces/kate
#include <pluginconfigpageinterface.h>
Public Member Functions | |
PluginConfigPageInterface () | |
virtual | ~PluginConfigPageInterface () |
virtual PluginConfigPage * | configPage (uint number=0, QWidget *parent=0, const char *name=0)=0 |
virtual QString | configPageFullName (uint number=0) const =0 |
virtual KIcon | configPageIcon (uint number=0) const =0 |
virtual QString | configPageName (uint number=0) const =0 |
virtual uint | configPages () const =0 |
unsigned int | pluginConfigPageInterfaceNumber () const |
Detailed Description
Plugin config page extension interface.
The class PluginConfigPageInterface is an extension interface for plugins. If you want to add config pages to a plugin you have to make sure you
- derive your plugin from this interface (multiple inheritance) and overwrite the abstract methods
- return the number of config pages your plugin supports in configPages()
- return an instance the requested config pages in configPage()
Your plugin header then looks like this:
The line Q_INTERFACES
... is important, otherwise the qobject_cast from Plugin to PluginConfigPageInterface fails so that your config page interface will not be recognized.
- See also
- Plugin, PluginConfigPage
Definition at line 127 of file pluginconfigpageinterface.h.
Constructor & Destructor Documentation
Kate::PluginConfigPageInterface::PluginConfigPageInterface | ( | ) |
Constructor.
Definition at line 46 of file pluginconfigpageinterface.cpp.
|
virtual |
Virtual destructor.
Definition at line 54 of file pluginconfigpageinterface.cpp.
Member Function Documentation
|
pure virtual |
Return the config page with the given number
and parent
.
Assume you return N
in configPages(), then you have to return config pages for the numbers 0 to N-1
.
- Note
- This function will only be called if configPages() > 0.
- Parameters
-
number the config page for the given number
parent use this widget as parent widget for the config page name config page identifier
- Returns
- a config page
- See also
- configPages()
|
pure virtual |
Return the full name for the config page with the given number
, for example 'Configure Autobookmarker'.
- Parameters
-
number the config page for the given number
- Returns
- a more descriptive name
|
pure virtual |
Return an icon for for the config page with the given number
.
- Parameters
-
number the config page for the given number
- Returns
- the icon for the config page
|
pure virtual |
Return a short name for the config page with the given number
, for example 'Autobookmarker'.
- Parameters
-
number the config page for the given number
- Returns
- a short name
|
pure virtual |
Reimplement this function and return the number of config pages your plugin supports.
- Returns
- number of config pages
- See also
- configPage()
unsigned int Kate::PluginConfigPageInterface::pluginConfigPageInterfaceNumber | ( | ) | const |
For internal reason every config page interface has a unique global number.
- Returns
- unique identifier
Definition at line 59 of file pluginconfigpageinterface.cpp.
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:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.