QIviPropertyAttribute Class

The QIviPropertyAttribute encapsulates the attributes of a property More...

Header: #include <QIviPropertyAttribute>
qmake: QT += ivicore
Inherits: QIviPropertyAttributeBase

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

Public Functions

QIviPropertyAttribute()
QIviPropertyAttribute(bool available)
QIviPropertyAttribute(const T &minValue, const T &maxValue)
QIviPropertyAttribute(const QVector<T> &avValues)
QVector<T> availableValues() const
bool isAvailable() const
T maximumValue() const
T minimumValue() const
QString toString() const
QIviPropertyAttributeBase::AttributeType type() const
bool operator!=(const QIviPropertyAttribute &other) const
bool operator==(const QIviPropertyAttribute &other) const

Detailed Description

The QIviPropertyAttribute encapsulates the attributes of a property

QIviPropertyAttribute sets the boundaries for a property in Qt IVI. In a Qt IVI backend interface, the QIviPropertyAttributes are used to control which properties are implemented by a backend and to set the boundaries like the minimum or the maximum value of a property.

By default a QIviPropertyAttribute is initialized with the "Invalid" type, which indicates that this property is not available. This could be the case when the backend doesn't support this property or the property is not available because the current backend configuration does not support it. For example, a property can be supported by a specific car configuration, but is not part of another.

Member Function Documentation

QIviPropertyAttribute::QIviPropertyAttribute()

Constructs an invalid QIviPropertyAttribute.

This constructor can be used to indicate that the property is not available. For example, because the backend doesn't support this property.

QIviPropertyAttribute::QIviPropertyAttribute(bool available)

Constructs an QIviPropertyAttribute of type NoAttributes.

The argument available defines whether the property is supported by the backend.

QIviPropertyAttribute::QIviPropertyAttribute(const T &minValue, const T &maxValue)

Constructs an QIviPropertyAttribute of type MinimumMaximum.

The arguments minValue and maxValue define the boundaries the value of the property.

QIviPropertyAttribute::QIviPropertyAttribute(const QVector<T> &avValues)

Constructs an QIviPropertyAttribute of type AvailableValues.

The argument avValues defines the valid values for the property.

QVector<T> QIviPropertyAttribute::availableValues() const

Returns a list of valid values for this property. If the attributeType is not AvailableValues an empty list is returned.

bool QIviPropertyAttribute::isAvailable() const

Returns true if the property is available for this backend.

T QIviPropertyAttribute::maximumValue() const

Returns the maximum value of the property. If the attributeType is not MinimumMaximum, a default constructed value is returned.

T QIviPropertyAttribute::minimumValue() const

Returns the minimum value of the property. If the attributeType is not MinimumMaximum, a default constructed value is returned.

QString QIviPropertyAttribute::toString() const

Returns a QString with a string representation of the attribute.

QIviPropertyAttributeBase::AttributeType QIviPropertyAttribute::type() const

Returns the type of the attribute.

bool QIviPropertyAttribute::operator!=(const QIviPropertyAttribute &other) const

Returns true if this QIviPropertyAttribute is NOT equal to the other QIviPropertyAttribute; otherwise returns false.

All elements of QIviPropertyAttribute are used for the comparison.

bool QIviPropertyAttribute::operator==(const QIviPropertyAttribute &other) const

Returns true if this QIviPropertyAttribute is equal to the other QIviPropertyAttribute; otherwise returns false.

All elements of QIviPropertyAttribute are used for the comparison.

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