All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions
Qtilities::CoreGui::Interfaces::IConfigPage Class Reference

An interface through which widgets can be added to the ConfigurationWidget class. More...

#include <IConfigPage.h>

Inheritance diagram for Qtilities::CoreGui::Interfaces::IConfigPage:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void configPageApply ()=0
 Indicates that the current state of the config page must be saved (applied).
virtual QtilitiesCategory configPageCategory () const
 Gets the category of the config page.
virtual QString configPageHelpID () const
 Gets the help ID of the config page.
virtual QIcon configPageIcon () const =0
 Gets the icon used for the page in the configuration widget.
virtual void configPageInitialize ()
 Initialization function where you can do any initialization required by your page.
virtual void configPageRestoreDefaults ()
 Indicates that the defaults of the page must be restored.
virtual QString configPageTitle () const =0
 Gets the title of the config page.
virtual QWidget * configPageWidget ()=0
 Gets widget used in the configuration page area.
virtual void setConfigPageCategory (const QtilitiesCategory &category)
 Sets the category of the config page.
virtual void setConfigPageHelpID (const QString &config_help_id)
 Sets the help ID of the config page.
virtual void setConfigPageIcon (const QIcon &icon)
 Sets the icon used for the page in the configuration widget.
virtual bool supportsApply () const =0
 Indicates if the page supports apply operations. When a page only displays information, ExtensionSystemConfig, we don't want the apply button to be active. This function thus controls the activity of the apply button.
virtual bool supportsRestoreDefaults () const
 Indicates if the page supports restoration of default settings.
- Public Member Functions inherited from Qtilities::Core::Interfaces::IObjectBase
virtual QObject * objectBase ()=0
 Returns the QObject* base of the interface.
virtual const QObject * objectBase () const =0
 Returns a const QObject* base of the interface.
QString objectOriginID () const
 Allows interfaces to provide some sort of source identification.
void setObjectOriginID (const QString &object_origin_id)
 Allows setting of the object source ID of this interface implementation.

Detailed Description

An interface through which widgets can be added to the ConfigurationWidget class.

The IConfigPage interface allows objects to expose configuration (settings) pages to the ConfigurationWidget. For more information see the ConfigurationWidget documentation.


Member Function Documentation

virtual QtilitiesCategory Qtilities::CoreGui::Interfaces::IConfigPage::configPageCategory ( ) const
inlinevirtual

Gets the category of the config page.

If you want other parts of your code to be able to modify the category of your page, implement configPageCategory() like this:

return QtilitiesCategory("Your Category");
else

If not, just return your caregory.

See also:
setConfigPageCategory()

Reimplemented in Qtilities::Examples::Clipboard::ObserverWidgetConfig, Qtilities::CoreGui::CommandEditor, Qtilities::CoreGui::LoggerConfigWidget, Qtilities::ExtensionSystem::ExtensionSystemConfig, Qtilities::ProjectManagement::ProjectManagementConfig, Qtilities::CoreGui::GroupedConfigPage, Qtilities::Plugins::Help::HelpPluginConfig, and Qtilities::CoreGui::CodeEditorWidgetConfig.

virtual QString Qtilities::CoreGui::Interfaces::IConfigPage::configPageHelpID ( ) const
inlinevirtual

Gets the help ID of the config page.

Note:
The default implementation returns an empty, invalid help ID.
See also:
setConfigPageHelpID()

This function was added in Qtilities v1.1.

virtual QIcon Qtilities::CoreGui::Interfaces::IConfigPage::configPageIcon ( ) const
pure virtual
virtual void Qtilities::CoreGui::Interfaces::IConfigPage::configPageInitialize ( )
inlinevirtual

Initialization function where you can do any initialization required by your page.

This function will be called when the configuration widget searches the object pool for config pages. The function will be called on all found pages before adding them to the configuration widget.

In big applications where many configuration pages exists, it makes sense to make use of this function in order to speed up the launch time of your application. Without this function, you will typically initialize your config pages in their constructors. Thus, all the pages will be set up during application launch even if the user never goes to the configuration page. This function provides a solution to that problem where pages will only be initialized when the configuration widget is actually used.

Note:
The default implementation does nothing.

This function was added in Qtilities v1.2.

Reimplemented in Qtilities::CoreGui::CommandEditor, Qtilities::CoreGui::LoggerConfigWidget, Qtilities::ExtensionSystem::ExtensionSystemConfig, Qtilities::ProjectManagement::ProjectManagementConfig, Qtilities::CoreGui::CodeEditorWidgetConfig, and Qtilities::Plugins::Help::HelpPluginConfig.

virtual void Qtilities::CoreGui::Interfaces::IConfigPage::configPageRestoreDefaults ( )
inlinevirtual

Indicates that the defaults of the page must be restored.

Note:
The default implementation does nothing.
See also:
supportsRestoreDefaults()

This function was added in Qtilities v1.1.

virtual void Qtilities::CoreGui::Interfaces::IConfigPage::setConfigPageCategory ( const QtilitiesCategory category)
inlinevirtual

Sets the category of the config page.

This allows you to use config pages from other libraries, such as Qtilities and group them under your own custom categories.

See also:
configPageCategory()

This function was added in Qtilities v1.1.

virtual void Qtilities::CoreGui::Interfaces::IConfigPage::setConfigPageHelpID ( const QString &  config_help_id)
inlinevirtual

Sets the help ID of the config page.

This allows you to use config pages from other libraries, such as Qtilities and specify help IDs for them which matches your application's help structure.

See also:
configPageHelpID()

This function was added in Qtilities v1.1.

virtual void Qtilities::CoreGui::Interfaces::IConfigPage::setConfigPageIcon ( const QIcon &  icon)
inlinevirtual

Sets the icon used for the page in the configuration widget.

Note:
The default implementation does nothing.
See also:
configPageIcon()

This function was added in Qtilities v1.1.

Reimplemented in Qtilities::CoreGui::GroupedConfigPage.

virtual bool Qtilities::CoreGui::Interfaces::IConfigPage::supportsRestoreDefaults ( ) const
inlinevirtual

Indicates if the page supports restoration of default settings.

Note:
The default implementation does nothing.
See also:
configPageRestoreDefaults()

This function was added in Qtilities v1.1.



Qtilities : Reference Documentation Back to top Copyright © 2009-2013, Jaco Naudé