classPiiConfigurable
#include <PiiConfigurable.h>
This is an interface class, which can be used for setting and getting the configuration values for the class inherited from this interface.
Inherited by PiiDefaultConfigurable
Description
The configuration value can be either enumerated or
non-enumerated. That can be checked by the function
PiiMetaConfigurationValue::isEnumerated(). The
PiiMetaConfigurationValue
associated for the configuration value can be retrieved by the
function metaInformation(). The type being
enumerated means that the value must be included in
the set returned by the function PiiMetaConfigurationValue::possibleValues(). The type
of the enumerated value can be any type supported by the class
QVariant.
For example if there were configuration value for item "frameSize",
and the possible values for the frame size where QSize(200, 320),
QSize(400, 640) and QSize(760, 840), the function PiiMetaConfigurationValue::possibleValues() should
return those sizes, and the value given by the function setConfigurationValue() must be one of those
predefined sizes.
If the configuration value is non-enumerated. Its value can be enything between the minimum and maximum values determined by the functions PiiMetaConfigurationValue::minValue() and PiiMetaConfigurationValue::maxValue().
Constructors and destructor
|
virtual
|
( )
|
Public member functions
|
virtual QVariant
|
(
Returns the configuration value for the given configuration item. |
|
virtual int
|
( )
= 0
Returns the number of configuration values. |
|
(
|
|
|
QVariantMap
|
(
Returns all configuration values as a map. |
|
virtual PiiMetaConfigurationValue
|
(
Returns the PiiMetaConfigurationValue object for the configuration value having the index given as a parameter. |
|
( )
Returns meta informations for all configuration values as a list. |
|
|
virtual bool
|
Sets the configuration value for the given configuration item. |
|
void
|
(
|
|
void
|
|
Function details
-
virtual ~PiiConfigurable
()[virtual] -
Returns the configuration value for the given configuration item.
This is an abstract function, which must be implemented in the derived class.
-
virtual int configurationValueCount
()[pure virtual]Returns the number of configuration values.
-
QList< QPair< QString, QVariant > > configurationValueList
(- PiiMetaConfigurationValue::TypeFlags flags = PiiMetaConfigurationValue::None
-
QVariantMap configurationValues
(- PiiMetaConfigurationValue::TypeFlags flags = PiiMetaConfigurationValue::None
Returns all configuration values as a map.
The name of a configuration value works as the key.
-
Returns the PiiMetaConfigurationValue object for the configuration value having the index given as a parameter.
The parameter
valueIndexmust be within 0 andconfigurationValueCount()-1. -
QList< PiiMetaConfigurationValue > metaInformations
()Returns meta informations for all configuration values as a list.
-
Sets the configuration value for the given configuration item.
Returns
trueif the configuration value has been succesfully set. Elsefalseis returned. This is an abstract function, which must be implemented in the derived class. -
void setConfigurationValues
(- const QVariantMap & values
-
Add a note
Not a single note added yet. Be the first, add yours.