QSettingsDialog
1.0.0
A Qt library to easily create a settings dialog for user configurable settings
|
The default engine implementation for the settings dialog. More...
#include <qsettingswidgetdialogengine.h>
Public Member Functions | |
QSettingsWidgetDialogEngine () | |
Creates a new dialog engine. | |
~QSettingsWidgetDialogEngine () | |
Destructor. | |
QSettingsDisplayInstance * | createInstance () override |
Creates a new display instance. | |
QString | searchStyleSheet () const |
[INTERNAL USE] Returns the stylesheet to be applied to labels that are a search match | |
void | addFactory (int displayId, QSettingsWidgetFactory *factory) |
Adds a new settings widget factory with the given id to the default registry. More... | |
template<typename TSettingsWidget > | |
void | addWidgetType (int displayId) |
Adds a new settings widget factory with the given id to the default registry. More... | |
void | addGroupFactory (int displayId, QSettingsGroupWidgetFactory *factory, const UiPropertyMap &properties=UiPropertyMap()) |
Adds a new group widget factory with the given id. More... | |
template<typename TSettingsGroupWidget > | |
void | addGroupWidgetType (int displayId, const UiPropertyMap &properties=UiPropertyMap()) |
Adds a new group widget factory with the given id. More... | |
void | cloneGroupFactoryWithProperties (int originalId, int cloneId, const UiPropertyMap &properties) |
Creates a clone of a group with a new id and different properties. More... | |
QSettingsWidgetBase * | createWidget (int displayId, const UiPropertyMap &properties, QWidget *parent) const |
[INTERNAL USE] Tries to create a new settings widget for the given id | |
QSettingsGroupWidgetBase * | createGroupWidget (int displayId, QWidget *parent) const |
[INTERNAL USE] Tries to create a new group widget for the given id | |
void | addRegistry (QSettingsWidgetFactoryRegistry *registry) |
Adds a new factory registry to this dialog. More... | |
Public Member Functions inherited from QSettingsDisplayEngine | |
virtual | ~QSettingsDisplayEngine () |
Virtual destructor. | |
Static Public Member Functions | |
static void | registerGlobalFactory (int displayId, QSettingsWidgetFactory *factory) |
Adds a new settings widget factory with the given id to the global default registry. More... | |
template<typename TSettingsWidget > | |
static void | registerGlobalWidgetType (int displayId) |
Adds a new settings widget factory with the given id to the global default registry. More... | |
static void | registerGlobalGroupFactory (int displayId, QSettingsGroupWidgetFactory *factory) |
Adds a new settings group factory with the given id to the global groups. More... | |
template<typename TSettingsGroupWidget > | |
static void | registerGlobalGroupWidgetType (int displayId) |
Adds a new settings group factory with the given id to the global groups. More... | |
static void | cloneGlobalGroupFactoryWithProperties (int originalId, int cloneId, const UiPropertyMap &properties) |
Creates a clone of a global group with a new id and different properties. More... | |
static void | registerGlobalRegistry (QSettingsWidgetFactoryRegistry *registry) |
Adds a new factory registry to the global registries. More... | |
The default engine implementation for the settings dialog.
As user of the settings dialog, this class is important as a manager of custom settings an group widgets. The different functions allow you to add those to single instances of the engine or as global base
QSettingsWidgetDialogEngine::addFactory | ( | int | displayId, |
QSettingsWidgetFactory * | factory | ||
) |
Adds a new settings widget factory with the given id to the default registry.
displayId | The id this factory will be used for |
factory | The factory to be added |
Adds the given factory to the default registry to be used for widget creation if a QSettingsEntry has the given id as display id.
QSettingsWidgetDialogEngine::addGroupFactory | ( | int | displayId, |
QSettingsGroupWidgetFactory * | factory, | ||
const UiPropertyMap & | properties = UiPropertyMap() |
||
) |
Adds a new group widget factory with the given id.
displayId | The id this factory will be used for |
factory | The factory to be added |
properties | The properties to be passed to group widgets created with this id |
Adds the given factory to be used for group widget creation if a group has the given id as display id. The properties will be used to initialize the group.
QSettingsWidgetDialogEngine::addGroupWidgetType | ( | int | displayId, |
const UiPropertyMap & | properties = UiPropertyMap() |
||
) |
Adds a new group widget factory with the given id.
TSettingsGroupWidget | The group widget class to be added |
displayId | The id this group widget will be used for |
properties | The properties to be passed to group widgets created with this id |
Adds the given QSettingsGroupWidget class to the engine to be used for group widget creation if a group has the given id as display id. The properties will be used to initialize the group. This function will simply create a GenericSettingsGroupWidgetFactory that will create new instances of the TSettingsGroupWidget class.
QSettingsWidgetDialogEngine::addRegistry | ( | QSettingsWidgetFactoryRegistry * | registry | ) |
Adds a new factory registry to this dialog.
registry | The registry to be added |
The registry will be inserted into the engines registry list, based on it's priority.
QSettingsWidgetDialogEngine::addWidgetType | ( | int | displayId | ) |
Adds a new settings widget factory with the given id to the default registry.
TSettingsWidget | The settings widget class to be added |
displayId | The id this widget will be used for |
Adds the given QSettingsWidget class to the default registry to be used for widget creation if a QSettingsEntry has the given id as display id. This function will simply create a GenericSettingsWidgetFactory that will create new instances of the TSettingsWidget class.
|
static |
Creates a clone of a global group with a new id and different properties.
originalId | The id of the factory to be cloned |
cloneId | The id of the newly created clone |
properties | The properties to be passed to group widgets created with the clone id |
Adds a new entry to the global groups, using whatever factory is registered with originalId. The new clone however will not use the originals properties, but the new ones. The global groups serve as a base collection for newly created engines. Adding a global factory will not add it to the already existing engines!
QSettingsWidgetDialogEngine::cloneGroupFactoryWithProperties | ( | int | originalId, |
int | cloneId, | ||
const UiPropertyMap & | properties | ||
) |
Creates a clone of a group with a new id and different properties.
originalId | The id of the factory to be cloned |
cloneId | The id of the newly created clone |
properties | The properties to be passed to group widgets created with the clone id |
Adds a new entry to the groups, using whatever factory is registered with originalId. The new clone however will not use the originals properties, but the new ones.
|
static |
Adds a new settings widget factory with the given id to the global default registry.
displayId | The id this factory will be used for |
factory | The factory to be added |
Adds the given factory to the global default registry to be used for widget creation if a QSettingsEntry has the given id as display id. The global registry serves as a base collection for newly created engines. Adding a global factory will not** add it to the already existing engines!
|
static |
Adds a new settings group factory with the given id to the global groups.
displayId | The id this factory will be used for |
factory | The factory to be added |
Adds the given factory to be used for group widget creation if a group has the given id as display id as global base. The properties will be used to initialize the group. The global groups serve as a base collection for newly created engines. Adding a global factory will not add it to the already existing engines!
|
static |
Adds a new settings group factory with the given id to the global groups.
TSettingsGroupWidget | The group widget class to be added |
displayId | The id this group widget will be used for |
Adds the given QSettingsGroupWidget class to be used for group widget creation if a group has the given id as display id as global base. The properties will be used to initialize the group. This function will simply create a GenericSettingsGroupWidgetFactory that will create new instances of the TSettingsGroupWidget class. The global groups serve as a base collection for newly created engines. Adding a global factory will not add it to the already existing engines!
|
static |
Adds a new factory registry to the global registries.
registry | The registry to be added |
The registry will be inserted into the global registry list, based on it's priority. The global registries serve as a base collection for newly created engines. Adding a global registry will not add it to the already existing engines!
|
static |
Adds a new settings widget factory with the given id to the global default registry.
TSettingsWidget | The settings widget class to be added |
displayId | The id this widget will be used for |
Adds the given QSettingsWidget class to the global default registry to be used for widget creation if a QSettingsEntry has the given id as display id. This function will simply create a GenericSettingsWidgetFactory that will create new instances of the TSettingsWidget class. The global registry serves as a base collection for newly created engines. Adding a global factory will not** add it to the already existing engines!