18#include "moc_qgslabelsettingswidgetbase.cpp"
50 return *lExpressionContext;
55 expContext << symbolScope;
72void QgsLabelSettingsWidgetBase::createAuxiliaryField()
93 if ( dlg.exec() == QDialog::Accepted )
94 def = dlg.propertyDefinition();
104 property.setActive(
true );
115void QgsLabelSettingsWidgetBase::updateDataDefinedProperty()
132 const auto overrideButtons = findChildren<QgsPropertyOverrideButton *>();
161 setWindowTitle( widget->windowTitle() );
162 QVBoxLayout *vLayout =
new QVBoxLayout();
163 vLayout->addWidget( widget );
164 mButtonBox =
new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
165 connect( mButtonBox, &QDialogButtonBox::accepted,
this, &QDialog::accept );
166 connect( mButtonBox, &QDialogButtonBox::rejected,
this, &QDialog::reject );
167 vLayout->addWidget( mButtonBox );
168 setLayout( vLayout );
170 setObjectName( QStringLiteral(
"QgsLabelSettingsWidgetDialog" ) );
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
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.
void setProperty(int key, const QgsProperty &property)
Adds a property to the collection and takes ownership of it.
QgsProperty property(int key) const final
Returns a matching property from the collection, if one exists.
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.
Single variable definition for use within a QgsExpressionContextScope.