• ParamType
  • ParamType Class

    Describes a certain ParamType. More...

    Header: #include <ParamType>

    Public Functions

    ParamType()
    ParamType(const ParamTypeId & id, const QString & name, const QVariant::Type type, const QVariant & defaultValue = QVariant())
    QList<QVariant> allowedValues() const
    QVariant defaultValue() const
    QString displayName() const
    ParamTypeId id() const
    int index() const
    Types::InputType inputType() const
    bool isValid() const
    QPair<QVariant, QVariant> limits() const
    QVariant maxValue() const
    QVariant minValue() const
    QString name() const
    bool readOnly() const
    void setAllowedValues(const QList<QVariant> & allowedValues)
    void setDefaultValue(const QVariant & defaultValue)
    void setDisplayName(const QString & displayName)
    void setIndex(const int & index)
    void setInputType(const Types::InputType & inputType)
    void setLimits(const QVariant & min, const QVariant & max)
    void setMaxValue(const QVariant & maxValue)
    void setMinValue(const QVariant & minValue)
    void setName(const QString & name)
    void setReadOnly(const bool & readOnly)
    void setType(QVariant::Type type)
    void setUnit(const Types::Unit & unit)
    QVariant::Type type() const
    Types::Unit unit() const

    Static Public Members

    QStringList mandatoryTypeProperties()
    QStringList typeProperties()

    Detailed Description

    Describes a certain ParamType.

    See also Device, Param, and ParamDescriptor.

    Member Function Documentation

    ParamType::ParamType()

    Constructs a new ParamType which is initially not valid.

    See also isValid().

    ParamType::ParamType(const ParamTypeId & id, const QString & name, const QVariant::Type type, const QVariant & defaultValue = QVariant())

    Constructs a ParamType object with the given id, name, type and defaultValue.

    QList<QVariant> ParamType::allowedValues() const

    Returns the list of the allowed values of this ParamType.

    See also setAllowedValues().

    QVariant ParamType::defaultValue() const

    Returns the default value of this ParamType.

    See also setDefaultValue().

    QString ParamType::displayName() const

    Returns the displayName of this ParamType, to be shown to the user, translated.

    See also setDisplayName().

    ParamTypeId ParamType::id() const

    Returns the ParamTypeId of this ParamType.

    int ParamType::index() const

    Returns the index of this ParamType. The index of an ParamType indicates the order in the corresponding Type.

    See also setIndex().

    Types::InputType ParamType::inputType() const

    Returns the input type of this ParamType.

    See also setInputType().

    bool ParamType::isValid() const

    Returns true if this ParamType is valid. A ParamType is valid, if the id, the name and the data type is set.

    QPair<QVariant, QVariant> ParamType::limits() const

    Returns the limits of this ParamType. limits(minValue, maxValue).

    See also setLimits().

    [static] QStringList ParamType::mandatoryTypeProperties()

    Returns a list of mandatory JSON properties a ParamType JSON definition must have.

    QVariant ParamType::maxValue() const

    Returns the maximum value of this ParamType.

    See also setMaxValue().

    QVariant ParamType::minValue() const

    Returns the minimum value of this ParamType.

    See also setMinValue().

    QString ParamType::name() const

    Returns the name of this ParamType.

    See also setName().

    bool ParamType::readOnly() const

    Returns false if this ParamType is writable by the user. By default a ParamType is always writable.

    See also setReadOnly().

    void ParamType::setAllowedValues(const QList<QVariant> & allowedValues)

    Sets the list of the allowed values of this ParamType to the given List of allowedValues.

    See also allowedValues().

    void ParamType::setDefaultValue(const QVariant & defaultValue)

    Sets the default value of this ParamType to the given defaultValue.

    See also defaultValue().

    void ParamType::setDisplayName(const QString & displayName)

    Sets the displayName of this ParamType, to be shown to the user, translated.

    See also displayName().

    void ParamType::setIndex(const int & index)

    Set the index of this ParamType.

    See also index().

    void ParamType::setInputType(const Types::InputType & inputType)

    Sets the input value of this ParamType to the given inputType.

    See also inputType().

    void ParamType::setLimits(const QVariant & min, const QVariant & max)

    Sets the limits of this ParamType. limits(min, max).

    See also limits().

    void ParamType::setMaxValue(const QVariant & maxValue)

    Sets the maximum value of this ParamType to the given maxValue.

    See also maxValue().

    void ParamType::setMinValue(const QVariant & minValue)

    Sets the minimum value of this ParamType to the given minValue.

    See also minValue().

    void ParamType::setName(const QString & name)

    Sets the name of this ParamType to the given name.

    See also name().

    void ParamType::setReadOnly(const bool & readOnly)

    Sets this ParamType readOnly. By default a ParamType is always writable.

    See also readOnly().

    void ParamType::setType(QVariant::Type type)

    Sets the type of this ParamType to the given type.

    See also type().

    void ParamType::setUnit(const Types::Unit & unit)

    Sets the unit of this ParamType to the given unit.

    See also unit().

    QVariant::Type ParamType::type() const

    Returns the type of this ParamType.

    See also setType().

    [static] QStringList ParamType::typeProperties()

    Returns a list of all valid JSON properties a ParamType JSON definition can have.

    Types::Unit ParamType::unit() const

    Returns the unit of this ParamType.

    See also setUnit().