QSettingsDialog  1.0.0
A Qt library to easily create a settings dialog for user configurable settings
Public Member Functions | Static Public Member Functions | List of all members
QSettingsWidgetDialogEngine Class Reference

The default engine implementation for the settings dialog. More...

#include <qsettingswidgetdialogengine.h>

+ Inheritance diagram for QSettingsWidgetDialogEngine:

Public Member Functions

 QSettingsWidgetDialogEngine ()
 Creates a new dialog engine.
 
 ~QSettingsWidgetDialogEngine ()
 Destructor.
 
QSettingsDisplayInstancecreateInstance () 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...
 
QSettingsWidgetBasecreateWidget (int displayId, const UiPropertyMap &properties, QWidget *parent) const
 [INTERNAL USE] Tries to create a new settings widget for the given id
 
QSettingsGroupWidgetBasecreateGroupWidget (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...
 

Detailed Description

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

Attention
Widgets/groups/... added globally will be used to initialize instances of the engine. In ohter words, adding globally will not influence already existing dialogs, only the ones that will be created after.

Member Function Documentation

QSettingsWidgetDialogEngine::addFactory ( int  displayId,
QSettingsWidgetFactory factory 
)

Adds a new settings widget factory with the given id to the default registry.

Note
The dialog will take ownership of the factory
Parameters
displayIdThe id this factory will be used for
factoryThe 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.

Note
If a factory is already registered with that displayId, it will be overwritten
QSettingsWidgetDialogEngine::addGroupFactory ( int  displayId,
QSettingsGroupWidgetFactory factory,
const UiPropertyMap properties = UiPropertyMap() 
)

Adds a new group widget factory with the given id.

Note
The dialog will take ownership of the factory
Parameters
displayIdThe id this factory will be used for
factoryThe factory to be added
propertiesThe 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.

Note
If a factory is already registered with that displayId, it will be overwritten
template<typename TSettingsGroupWidget >
QSettingsWidgetDialogEngine::addGroupWidgetType ( int  displayId,
const UiPropertyMap properties = UiPropertyMap() 
)

Adds a new group widget factory with the given id.

Template Parameters
TSettingsGroupWidgetThe group widget class to be added
Parameters
displayIdThe id this group widget will be used for
propertiesThe 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.

Note
If a factory is already registered with that displayId, it will be overwritten
QSettingsWidgetDialogEngine::addRegistry ( QSettingsWidgetFactoryRegistry registry)

Adds a new factory registry to this dialog.

Note
The dialog will take ownership of the registry
Parameters
registryThe registry to be added

The registry will be inserted into the engines registry list, based on it's priority.

template<typename TSettingsWidget >
QSettingsWidgetDialogEngine::addWidgetType ( int  displayId)

Adds a new settings widget factory with the given id to the default registry.

Template Parameters
TSettingsWidgetThe settings widget class to be added
Parameters
displayIdThe 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.

Note
If a factory is already registered with that displayId, it will be overwritten
QSettingsWidgetDialogEngine::cloneGlobalGroupFactoryWithProperties ( int  originalId,
int  cloneId,
const UiPropertyMap properties 
)
static

Creates a clone of a global group with a new id and different properties.

Parameters
originalIdThe id of the factory to be cloned
cloneIdThe id of the newly created clone
propertiesThe 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!

Note
If a factory is already registered with that cloneId, it will be overwritten. If cloneId and originalId are the same, the existing properties will be simply overwritten.
QSettingsWidgetDialogEngine::cloneGroupFactoryWithProperties ( int  originalId,
int  cloneId,
const UiPropertyMap properties 
)

Creates a clone of a group with a new id and different properties.

Parameters
originalIdThe id of the factory to be cloned
cloneIdThe id of the newly created clone
propertiesThe 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.

Note
If a factory is already registered with that cloneId, it will be overwritten. If cloneId and originalId are the same, the existing properties will be simply overwritten.
QSettingsWidgetDialogEngine::registerGlobalFactory ( int  displayId,
QSettingsWidgetFactory factory 
)
static

Adds a new settings widget factory with the given id to the global default registry.

Note
The dialog will take ownership of the factory
Parameters
displayIdThe id this factory will be used for
factoryThe 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!

Note
If a factory is already registered with that displayId, it will be overwritten
QSettingsWidgetDialogEngine::registerGlobalGroupFactory ( int  displayId,
QSettingsGroupWidgetFactory factory 
)
static

Adds a new settings group factory with the given id to the global groups.

Note
The dialog will take ownership of the factory
Parameters
displayIdThe id this factory will be used for
factoryThe 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!

Note
If a factory is already registered with that displayId, it will be overwritten
template<typename TSettingsGroupWidget >
QSettingsWidgetDialogEngine::registerGlobalGroupWidgetType ( int  displayId)
static

Adds a new settings group factory with the given id to the global groups.

Template Parameters
TSettingsGroupWidgetThe group widget class to be added
Parameters
displayIdThe 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!

Note
If a factory is already registered with that displayId, it will be overwritten
QSettingsWidgetDialogEngine::registerGlobalRegistry ( QSettingsWidgetFactoryRegistry registry)
static

Adds a new factory registry to the global registries.

Note
The dialog will take ownership of the registry
Parameters
registryThe 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!

template<typename TSettingsWidget >
QSettingsWidgetDialogEngine::registerGlobalWidgetType ( int  displayId)
static

Adds a new settings widget factory with the given id to the global default registry.

Template Parameters
TSettingsWidgetThe settings widget class to be added
Parameters
displayIdThe 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!

Note
If a factory is already registered with that displayId, it will be overwritten

The documentation for this class was generated from the following files: