Into

Modules

Documentation

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.

(
  • const char * name
  • const char * description
  • QVariant::Type type
  • const QVariantList & possibleValues
  • const QStringList & descriptions
  • TypeFlags flags = Default
)

Constructor for enumerated type.

(
  • const char * name
  • const char * description
  • QVariant::Type type
  • const QVariant & minValue
  • const QVariant & maxValue
  • TypeFlags flags = Default
)

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 true if the type of the configuration value is enumerated.

bool

Returns true if this configuration value is readable, false otherwise.

bool

Returns true if this configuration value needs to be stored, false otherwise.

bool

Returns true if this PiiMetaConfigurationValue represents a valid configuration value, and false otherwise.

bool

Returns true if this configuration value is writable, false otherwise.

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.

(
  • TypeFlags
  • TypeFlag
)
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

    (
    • const char * name
    • const char * description
    • QVariant::Type type
    • const QVariant & minValue
    • const QVariant & maxValue
    • TypeFlags flags = Default
    )

    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 true if 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 function possibleValues() has no meaning.

  • bool isReadable

    ()

    Returns true if this configuration value is readable, false otherwise.

  • bool isStored

    ()

    Returns true if this configuration value needs to be stored, false otherwise.

  • bool isValid

    ()

    Returns true if this PiiMetaConfigurationValue represents a valid configuration value, and false otherwise.

  • bool isWritable

    ()

    Returns true if this configuration value is writable, false otherwise.

  • 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.

  • 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.

Notes (0)

Add a note

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