Into

Modules

Documentation

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
(
  • const char * name
)  = 0

Returns the configuration value for the given configuration item.

virtual int

Returns the number of configuration values.

(
  • PiiMetaConfigurationValue::TypeFlags flags = PiiMetaConfigurationValue::None
)
QVariantMap
(
  • PiiMetaConfigurationValue::TypeFlags flags = PiiMetaConfigurationValue::None
)

Returns all configuration values as a map.

(
  • int valueIndex
)  = 0

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
(
  • const char * name
  • const QVariant & value
)  = 0

Sets the configuration value for the given configuration item.

void
(
  • const QVariantMap & values
)
void

Function details

  • virtual ~PiiConfigurable

    ()
    [virtual]
  • virtual QVariant configurationValue

    (
    • const char * name
    )
    [pure 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.

  • virtual PiiMetaConfigurationValue metaInformation

    (
    • int valueIndex
    )
    [pure virtual]

    Returns the PiiMetaConfigurationValue object for the configuration value having the index given as a parameter.

    The parameter valueIndex must be within 0 and configurationValueCount()-1.

  • QList< PiiMetaConfigurationValue > metaInformations

    ()

    Returns meta informations for all configuration values as a list.

  • virtual bool setConfigurationValue

    (
    • const char * name
    • const QVariant & value
    )
    [pure virtual]

    Sets the configuration value for the given configuration item.

    Returns true if the configuration value has been succesfully set. Else false is returned. This is an abstract function, which must be implemented in the derived class.

  • void setConfigurationValues

    (
    • const QVariantMap & values
    )
  • void setConfigurationValues

    ( )
Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.