kate/interfaces/kate
Kate::PluginConfigPageInterface Class Reference
Plugin config page extension interface. More...
#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:
class MyPlugin : public Kate::Plugin, public Kate::PluginConfigPageInterface { Q_OBJECT Q_INTERFACES(Kate::PluginConfigPageInterface) public: // other methods etc... };
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.
| Kate::PluginConfigPageInterface::~PluginConfigPageInterface | ( | ) | [virtual] |
Virtual destructor.
Definition at line 54 of file pluginconfigpageinterface.cpp.
Member Function Documentation
| virtual PluginConfigPage* Kate::PluginConfigPageInterface::configPage | ( | uint | number = 0, |
|
| QWidget * | parent = 0, |
|||
| const char * | name = 0 | |||
| ) | [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 numberparent use this widget as parent widget for the config page name config page identifier
- Returns:
- a config page
- See also:
- configPages()
| virtual QString Kate::PluginConfigPageInterface::configPageFullName | ( | uint | number = 0 |
) | const [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
| virtual KIcon Kate::PluginConfigPageInterface::configPageIcon | ( | uint | number = 0 |
) | const [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
| virtual QString Kate::PluginConfigPageInterface::configPageName | ( | uint | number = 0 |
) | const [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
| virtual uint Kate::PluginConfigPageInterface::configPages | ( | ) | const [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:
KDE 4.4 API Reference