#include <metainfo.h>
Classes | |
class | MetaInfoPrivate |
Public Member Functions | |
MetaInfo (GluonObject *parent) | |
MetaInfo (const MetaInfo &other) | |
~MetaInfo () | |
Q_INVOKABLE void | setPropertyRange (const QString &property, qreal min, qreal max) |
Q_INVOKABLE bool | hasPropertyRange (const QString &property) const |
Q_INVOKABLE qreal | propertyRangeMin (const QString &property) const |
Q_INVOKABLE qreal | propertyRangeMax (const QString &property) const |
Q_INVOKABLE void | removePropertyRange (const QString &property) |
Q_INVOKABLE qreal | applyRange (const QString &property, qreal newValue) const |
Q_INVOKABLE void | setPropertySteps (const QString &property, quint32 steps) |
Q_INVOKABLE bool | hasPropertySteps (const QString &property) const |
Q_INVOKABLE quint32 | propertySteps (const QString &property) const |
Q_INVOKABLE void | removePropertySteps (const QString &property) |
Q_INVOKABLE qreal | applySteps (const QString &property, qreal newValue) const |
Q_INVOKABLE qreal | applyRangeAndStep (const QString &property, qreal newValue) const |
Definition at line 28 of file metainfo.h.
MetaInfo::MetaInfo | ( | GluonObject * | parent | ) |
Definition at line 36 of file metainfo.cpp.
MetaInfo::MetaInfo | ( | const MetaInfo & | other | ) |
Definition at line 42 of file metainfo.cpp.
MetaInfo::~MetaInfo | ( | ) |
Definition at line 47 of file metainfo.cpp.
qreal MetaInfo::applyRange | ( | const QString & | property, | |
qreal | newValue | |||
) | const |
Cap the passed value to the range for the given property, if it is set. If no range exists, the value is returned without change.
property | The property to apply the range for
|
Definition at line 88 of file metainfo.cpp.
qreal MetaInfo::applyRangeAndStep | ( | const QString & | property, | |
qreal | newValue | |||
) | const |
Cap the new value to the range for the given property, and round it off to the nearest step. The rules for applying both are as given in the functions for applying range and step separately
property | The property to apply range and step for
|
Definition at line 134 of file metainfo.cpp.
qreal MetaInfo::applySteps | ( | const QString & | property, | |
qreal | newValue | |||
) | const |
Round off the given value to the nearest step for the named property If no value has been set, the value will be returned with no change
property | The property to apply steps for
|
Definition at line 123 of file metainfo.cpp.
bool MetaInfo::hasPropertyRange | ( | const QString & | property | ) | const |
Whether a range has been set for the named property
property | The name of the property to check
|
Definition at line 59 of file metainfo.cpp.
bool MetaInfo::hasPropertySteps | ( | const QString & | property | ) | const |
Whether a step has been set for the named property
property | The name of the property to check
|
Definition at line 103 of file metainfo.cpp.
qreal MetaInfo::propertyRangeMax | ( | const QString & | property | ) | const |
The maximum value allowed for the property. Note: If the property does not have a range set, this will return 0
property | The name of the property to fetch the maximum value for
|
Definition at line 73 of file metainfo.cpp.
qreal MetaInfo::propertyRangeMin | ( | const QString & | property | ) | const |
The minimum value allowed for the property. Note: If the property does not have a range set, this will return 0
property | The name of the property to fetch the minimum value for
|
Definition at line 65 of file metainfo.cpp.
quint32 MetaInfo::propertySteps | ( | const QString & | property | ) | const |
The number of steps the property is separated into If no value is set, this function will return 0
property | The property in question
|
Definition at line 109 of file metainfo.cpp.
void MetaInfo::removePropertyRange | ( | const QString & | property | ) |
Remove the range for the property
property | The property to remove the range values for |
Definition at line 81 of file metainfo.cpp.
void MetaInfo::removePropertySteps | ( | const QString & | property | ) |
Remove the step value set for the named property
property | The property to remove the steps for |
Definition at line 117 of file metainfo.cpp.
void MetaInfo::setPropertyRange | ( | const QString & | property, | |
qreal | min, | |||
qreal | max | |||
) |
Set a range for the named property, from a minimum and maximum range, both inclusive
property | The name of the property to set a range for
|
Definition at line 52 of file metainfo.cpp.
void MetaInfo::setPropertySteps | ( | const QString & | property, | |
quint32 | steps | |||
) |
Set the number of steps the property's range should be separated into.
property | The property to set steps for
|
Definition at line 97 of file metainfo.cpp.