55 expContext << symbolScope;
65 expContext.setOriginalValueVariable( QVariant() );
72 void QgsLabelSettingsWidgetBase::createAuxiliaryField()
93 if ( dlg.exec() == QDialog::Accepted )
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 QDialogButtonBox *bbox =
new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
166 connect( bbox, &QDialogButtonBox::accepted,
this, &QDialog::accept );
167 connect( bbox, &QDialogButtonBox::rejected,
this, &QDialog::reject );
168 vLayout->addWidget( bbox );
169 setLayout( vLayout );
171 setObjectName( QStringLiteral(
"QgsLabelSettingsWidgetDialog" ) );
void setProperty(int key, const QgsProperty &property)
Adds a property to the collection and takes ownership of it.
static const QString EXPR_ORIGINAL_VALUE
Inbuilt variable name for value original value variable.
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the labeling property definitions.
static QgsExpressionContextScope * updateSymbolScope(const QgsSymbol *symbol, QgsExpressionContextScope *symbolScope=nullptr)
Updates a symbol scope related to a QgsSymbol to an expression context.
Single variable definition for use within a QgsExpressionContextScope.
QList< QgsExpressionContextScope * > globalProjectAtlasMapLayerScopes(const QgsMapLayer *layer) const
Returns list of scopes: global, project, atlas, map, layer.
bool exists(const QgsPropertyDefinition &definition) const
Returns true if the property is stored in the layer already, false otherwise.
static QgsGui * instance()
Returns a pointer to the singleton instance.
A dialog to create a new auxiliary layer.
void setField(const QString &field)
Sets the field name the property references.
Property
Data definable properties.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
static const QString EXPR_SYMBOL_COLOR
Inbuilt variable name for symbol color variable.
Single scope for storing variables and functions for use within a QgsExpressionContext.
A store for object properties.
QgsAuxiliaryLayer * auxiliaryLayer()
Returns the current auxiliary layer.
Definition for a property.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
QgsExpressionContext * expressionContext() const
Returns the expression context used for the widget, if set.
static QString nameFromProperty(const QgsPropertyDefinition &def, bool joined=false)
Returns the name of the auxiliary field for a property definition.
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 grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Represents a vector layer which manages a vector based data sets.
QgsPropertyDefinition propertyDefinition() const
Returns the underlying property definition.
QgsProperty property(int key) const override
Returns a matching property from the collection, if one exists.
A dialog to create a new auxiliary field.
QList< QgsExpressionContextScope > additionalExpressionContextScopes() const
Returns the list of additional expression context scopes to show as available within the layer...