#include <configwidgetproxy.h>
Inherits TQObject.
Signals | |
void | insertConfigWidget (const KDialogBase *dlg, TQWidget *page, unsigned int pagenumber) |
Public Member Functions | |
ConfigWidgetProxy (KDevCore *core) | |
void | createGlobalConfigPage (TQString const &title, unsigned int pagenumber, TQString const &icon="tdevelop") |
void | createProjectConfigPage (TQString const &title, unsigned int pagenumber, TQString const &icon="tdevelop") |
void | removeConfigPage (int pagenumber) |
Detailed Description
This class can be used to implement demand-loading of config pages.
In order to avoid the potentially heavy and unneccessary creation of a config page that might not be needed, this class can be used to delay the config page creation until the user explicitly asks for it.
A typical case looks like this:
Note that this replaces the functionality of typical KDevCore::configWidget() and KDevCore::projectConfigWidget() slots.
Definition at line 71 of file configwidgetproxy.h.
Constructor & Destructor Documentation
◆ ConfigWidgetProxy()
ConfigWidgetProxy::ConfigWidgetProxy | ( | KDevCore * | core | ) |
Constructor.
- Parameters
-
core An instance of KDevelop Core.
Definition at line 35 of file configwidgetproxy.cpp.
Member Function Documentation
◆ createGlobalConfigPage()
void ConfigWidgetProxy::createGlobalConfigPage | ( | TQString const & | title, |
unsigned int | pagenumber, | ||
TQString const & | icon = "tdevelop" |
||
) |
Tells the proxy you want a page in the Global Settings.
- Parameters
-
title The title of the config page, shown in the settings dialog. pagenumber A per-proxy unique identifier, used when responding to insertConfigWidget() signal. icon The name of the icon to use.
Definition at line 44 of file configwidgetproxy.cpp.
◆ createProjectConfigPage()
void ConfigWidgetProxy::createProjectConfigPage | ( | TQString const & | title, |
unsigned int | pagenumber, | ||
TQString const & | icon = "tdevelop" |
||
) |
Tells the proxy you want a page in the Project Settings.
- Parameters
-
title The title of the config page, shown in the settings dialog. pagenumber A per-proxy unique identifier, used when responding to insertConfigWidget() signal. icon The name of the icon to use.
Definition at line 49 of file configwidgetproxy.cpp.
◆ insertConfigWidget
|
signal |
The proxy emits this signal to notify the client that a specific config page has been requested.
- Parameters
-
dlg The settings dialog. The client should connect to its okClicked() signal. page The setting page. The client should use this as parent to the config widget. pagenumber The identifier set in createGlobalConfigPage() or createProjectConfigPage(). Identifies the requested config page.
◆ removeConfigPage()
void ConfigWidgetProxy::removeConfigPage | ( | int | pagenumber | ) |
Removes a config page from the proxy.
Next time the settings dialog opens, this page will not be available.
- Parameters
-
pagenumber The identifier set in createGlobalConfigPage() or createProjectConfigPage().
Definition at line 54 of file configwidgetproxy.cpp.
The documentation for this class was generated from the following files: