classPiiMetaConfigurationValue
#include <PiiMetaConfigurationValue.h>
This class provides meta information about a configuration value in the class derived from the interface class PiiConfigurable.
Description
Public types
|
enum
|
{ None = 0, Writable = 1, Readable = 2, Stored = 4, Default = -1 }
|
Constructors and destructor
|
Default constructor. |
|
|
(
Constructor for enumerated type. |
|
|
|
|
|
Constructor for non-enumerated type. |
|
Public member functions
|
const char *
|
( )
Returns the description associated with the configuration value. |
|
( )
Returns a list of human-representable names for enumerated values. |
|
|
bool
|
( )
Returns |
|
bool
|
( )
Returns |
|
bool
|
( )
Returns |
|
bool
|
( )
Returns |
|
bool
|
( )
Returns |
|
( )
Returns the maximum value of the configuration value. |
|
|
( )
Returns the minimum value of the configuration value. |
|
|
const char *
|
( )
Returns the name associated with the configuration value. |
|
|
|
|
QVariantList
|
( )
If the value type is enumerated, returns the list of all possible values. |
|
(
|
|
|
QVariant::Type
|
( )
Returns the type of this configuration value. |
Enumeration details
-
enum TypeFlag
Function details
-
PiiMetaConfigurationValue
()Default constructor.
-
PiiMetaConfigurationValue
(- const char * name
- const char * description
- QVariant::Type type
- const QVariantList & possibleValues
- const QStringList & descriptions
- TypeFlags flags = Default
Constructor for enumerated type.
Parameters
- name
-
the name of the configuration value
- description
-
the description of the configuration value
- type
-
the type of the configuration value.
- possibleValues
-
the list of possible values, which the configuration value can hold.
- descriptions
-
the user readable, and translatable, descriptions of each possible value.
- flags
-
a logical OR composition of type flags.
-
PiiMetaConfigurationValue
-
PiiMetaConfigurationValue
Constructor for non-enumerated type.
Parameters
- name
-
the name of the configuration value
- description
-
the description of the configuration value
- type
-
the type of the configuration value.
- minValue
-
the maximum value, which the configuration value can have. The type is assumed be same than the paramater defines. The null value (QVariant()) means that no minimum value exists.
- maxValue
-
the minimum value, which the configuration value can have. The type is assumed be same than the paramater defines. The null value (QVariant()) means, that no maximum value exists.
- flags
-
~PiiMetaConfigurationValue
() -
const char * description
()Returns the description associated with the configuration value.
-
QStringList descriptions
()Returns a list of human-representable names for enumerated values.
-
bool isEnumerated
()Returns
trueif the type of the configuration value is enumerated.Otherwise returns
false. If the value is enumerated, all possible values can be retrieved with the function possibleValues(), and the function minValue() and maxValue() has no meaning. If the value is not enumerated, the valid configuration values are between minValue() and maxValue(), and the functionpossibleValues()has no meaning. -
bool isReadable
()Returns
trueif this configuration value is readable,falseotherwise. -
bool isStored
()Returns
trueif this configuration value needs to be stored,falseotherwise. -
bool isValid
()Returns
trueif this PiiMetaConfigurationValue represents a valid configuration value, andfalseotherwise. -
bool isWritable
()Returns
trueif this configuration value is writable,falseotherwise. -
QVariant maxValue
()Returns the maximum value of the configuration value.
The value is returned as the same type, which is returned by the function type().
-
QVariant minValue
()Returns the minimum value of the configuration value.
If the configuration value is enumerated, this function has undefined meaning. The value is returned as the same type, which is returned by the function type().
-
const char * name
()Returns the name associated with the configuration value.
-
PiiMetaConfigurationValue & operator=
-
QVariantList possibleValues
()If the value type is enumerated, returns the list of all possible values.
If the type is non-enumerated, returns an empty list.
-
Q_DECLARE_FLAGS
(- TypeFlags
- TypeFlag
-
QVariant::Type type
()Returns the type of this configuration value.
The return value is one of the values of the QVariant::Type enumeration.
Add a note
Not a single note added yet. Be the first, add yours.