|
| QgsProperty () |
| Constructor for a QgsProperty. More...
|
|
| QgsProperty (const QgsProperty &other) |
| Copy constructor. More...
|
|
| ~QgsProperty () |
|
QString | asExpression () const |
| Returns an expression string representing the state of the property, or an empty string if the property could not be converted to an expression. More...
|
|
bool | convertToTransformer () |
| Attempts to convert an existing expression based property to a base expression with corresponding transformer. More...
|
|
QString | expressionString () const |
| Returns the expression used for the property value. More...
|
|
QString | field () const |
| Returns the current field name the property references. More...
|
|
bool | isActive () const |
| Returns whether the property is currently active. More...
|
|
bool | isProjectColor () const |
| Returns true if the property is set to a linked project color. More...
|
|
bool | isStaticValueInContext (const QgsExpressionContext &context, QVariant &staticValue) const |
| Returns true if the property is effectively a static value in the specified context. More...
|
|
bool | loadVariant (const QVariant &property) |
| Loads this property from a QVariantMap, wrapped in a QVariant. More...
|
|
| operator bool () const |
| Returns true if the property is not an invalid type. More...
|
|
| operator QVariant () const |
| Allows direct construction of QVariants from properties. More...
|
|
bool | operator!= (const QgsProperty &other) const |
|
QgsProperty & | operator= (const QgsProperty &other) |
|
bool | operator== (const QgsProperty &other) const |
|
bool | prepare (const QgsExpressionContext &context=QgsExpressionContext()) const |
| Prepares the property against a specified expression context. More...
|
|
Type | propertyType () const |
| Returns the property type. More...
|
|
QSet< QString > | referencedFields (const QgsExpressionContext &context=QgsExpressionContext(), bool ignoreContext=false) const |
| Returns the set of any fields referenced by the property for a specified expression context. More...
|
|
void | setActive (bool active) |
| Sets whether the property is currently active. More...
|
|
void | setExpressionString (const QString &expression) |
| Sets the expression to use for the property value. More...
|
|
void | setField (const QString &field) |
| Sets the field name the property references. More...
|
|
void | setStaticValue (const QVariant &value) |
| Sets the static value for the property. More...
|
|
void | setTransformer (QgsPropertyTransformer *transformer) |
| Sets an optional transformer to use for manipulating the calculated values for the property. More...
|
|
QVariant | staticValue () const |
| Returns the current static value for the property. More...
|
|
QVariant | toVariant () const |
| Saves this property to a QVariantMap, wrapped in a QVariant. More...
|
|
const QgsPropertyTransformer * | transformer () const |
| Returns the existing transformer used for manipulating the calculated values for the property, if set. More...
|
|
QVariant | value (const QgsExpressionContext &context, const QVariant &defaultValue=QVariant(), bool *ok=nullptr) const |
| Calculates the current value of the property, including any transforms which are set for the property. More...
|
|
bool | valueAsBool (const QgsExpressionContext &context, bool defaultValue=false, bool *ok=nullptr) const |
| Calculates the current value of the property and interprets it as an boolean. More...
|
|
QColor | valueAsColor (const QgsExpressionContext &context, const QColor &defaultColor=QColor(), bool *ok=nullptr) const |
| Calculates the current value of the property and interprets it as a color. More...
|
|
QDateTime | valueAsDateTime (const QgsExpressionContext &context, const QDateTime &defaultDateTime=QDateTime(), bool *ok=nullptr) const |
| Calculates the current value of the property and interprets it as a datetime. More...
|
|
double | valueAsDouble (const QgsExpressionContext &context, double defaultValue=0.0, bool *ok=nullptr) const |
| Calculates the current value of the property and interprets it as a double. More...
|
|
int | valueAsInt (const QgsExpressionContext &context, int defaultValue=0, bool *ok=nullptr) const |
| Calculates the current value of the property and interprets it as an integer. More...
|
|
QString | valueAsString (const QgsExpressionContext &context, const QString &defaultString=QString(), bool *ok=nullptr) const |
| Calculates the current value of the property and interprets it as a string. More...
|
|