QIviProperty Class

The QIviProperty combines a normal property and a QIviPropertyAttribute More...

Header: #include <QIviProperty>
qmake: QT += ivicore
Inherits: QObject
Inherited By:

QIviPropertyFactory

This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Properties

  • 1 property inherited from QObject

Public Functions

~QIviProperty()
virtual QVariantList availableValues() const = 0
virtual bool isAvailable() const = 0
virtual QVariant maximumValue() const = 0
virtual QVariant minimumValue() const = 0
virtual QVariant value() const = 0
  • 32 public functions inherited from QObject

Public Slots

void setValue(const QVariant &value)
  • 1 public slot inherited from QObject

Signals

void availableChanged(bool available)
void availableValuesChanged(const QVariantList &availableValues)
void maximumValueChanged(const QVariant &maximumValue)
void minimumValueChanged(const QVariant &minimumValue)
void valueChanged(const QVariant &value)

Additional Inherited Members

  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QIviProperty combines a normal property and a QIviPropertyAttribute

The QIviProperty is used to retrieve the value of a property and its corresponding QIviPropertyAttribute in an easy way. It's designed for QML (but is not limited to) and acts as a Grouped Property.

Although the QIviProperty only contains QVariant properties, it still stores the real type of the value and checks that only values of the correct type can be stored in it. The QIviProperty doesn't store a copy of the values, instead it just acts as a forwarder which calls the respective getters and forwards the notification signals.

By default a QIviProperty is also able to write a value change back to its origin, but it also supports read-only properties which don't provide a setter for the value.

QIviProperty is an abstract class and can only be created by using the QIviPropertyFactory class.

Property Documentation

available : const bool

True if this property is available.

Access functions:

virtual bool isAvailable() const = 0

Notifier signal:

void availableChanged(bool available)

See also QIviPropertyAttribute::isAvailable().

availableValues : const QVariantList

All available Values for this property. This can be used when exposing for example an enum and the backend only supports some of the values.

Access functions:

virtual QVariantList availableValues() const = 0

Notifier signal:

void availableValuesChanged(const QVariantList &availableValues)

See also QIviPropertyAttribute::availableValues().

maximumValue : const QVariant

The maximum value of the property.

Access functions:

virtual QVariant maximumValue() const = 0

Notifier signal:

void maximumValueChanged(const QVariant &maximumValue)

See also QIviPropertyAttribute::maximumValue().

minimumValue : const QVariant

The minimum value of the property.

Access functions:

virtual QVariant minimumValue() const = 0

Notifier signal:

void minimumValueChanged(const QVariant &minimumValue)

See also QIviPropertyAttribute::minimumValue().

value : QVariant

Stores the value of the property as a QVariant

Access functions:

virtual QVariant value() const = 0
void setValue(const QVariant &value)

Notifier signal:

void valueChanged(const QVariant &value)

Member Function Documentation

QIviProperty::~QIviProperty()

Destructor.

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.