50 return *lExpressionContext;
55 expContext << symbolScope;
72 void QgsLabelSettingsWidgetBase::createAuxiliaryField()
93 if ( dlg.exec() == QDialog::Accepted )
94 def = dlg.propertyDefinition();
104 property.setActive(
true );
115 void QgsLabelSettingsWidgetBase::updateDataDefinedProperty()
132 const auto overrideButtons = findChildren<QgsPropertyOverrideButton *>();
162 setWindowTitle( widget->windowTitle() );
163 QVBoxLayout *vLayout =
new QVBoxLayout();
164 vLayout->addWidget( widget );
165 mButtonBox =
new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
166 connect( mButtonBox, &QDialogButtonBox::accepted,
this, &QDialog::accept );
167 connect( mButtonBox, &QDialogButtonBox::rejected,
this, &QDialog::reject );
168 vLayout->addWidget( mButtonBox );
169 setLayout( vLayout );
171 setObjectName( QStringLiteral(
"QgsLabelSettingsWidgetDialog" ) );
static QString nameFromProperty(const QgsPropertyDefinition &def, bool joined=false)
Returns the name of the auxiliary field for a property definition.
bool exists(const QgsPropertyDefinition &definition) const
Returns true if the property is stored in the layer already, false otherwise.
Single scope for storing variables and functions for use within a QgsExpressionContext.
void addVariable(const QgsExpressionContextScope::StaticVariable &variable)
Adds a variable into the context scope.
static QgsExpressionContextScope * updateSymbolScope(const QgsSymbol *symbol, QgsExpressionContextScope *symbolScope=nullptr)
Updates a symbol scope related to a QgsSymbol to an expression context.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
void setOriginalValueVariable(const QVariant &value)
Sets the original value variable value for the context.
static const QString EXPR_SYMBOL_COLOR
Inbuilt variable name for symbol color variable.
void appendScope(QgsExpressionContextScope *scope)
Appends a scope to the end of the context.
void setHighlightedVariables(const QStringList &variableNames)
Sets the list of variable names within the context intended to be highlighted to the user.
static const QString EXPR_ORIGINAL_VALUE
Inbuilt variable name for value original value variable.
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
A dialog to create a new auxiliary field.
A dialog to create a new auxiliary layer.
Property
Data definable properties.
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the labeling property definitions.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
QgsProperty property(int key) const override
Returns a matching property from the collection, if one exists.
void setProperty(int key, const QgsProperty &property)
Adds a property to the collection and takes ownership of it.
Definition for a property.
A store for object properties.
void setField(const QString &field)
Sets the field name the property references.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
QList< QgsExpressionContextScope > additionalExpressionContextScopes() const
Returns the list of additional expression context scopes to show as available within the layer.
QList< QgsExpressionContextScope * > globalProjectAtlasMapLayerScopes(const QgsMapLayer *layer) const
Returns list of scopes: global, project, atlas, map, layer.
QgsExpressionContext * expressionContext() const
Returns the expression context used for the widget, if set.
Represents a vector layer which manages a vector based data sets.
QgsAuxiliaryLayer * auxiliaryLayer()
Returns the current auxiliary layer.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Single variable definition for use within a QgsExpressionContextScope.