QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
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" ) );
QList< QgsExpressionContextScope * > globalProjectAtlasMapLayerScopes(const QgsMapLayer *layer) const
Returns list of scopes: global, project, atlas, map, layer.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
A store for object properties.
static const QString EXPR_ORIGINAL_VALUE
Inbuilt variable name for value original value variable.
void addVariable(const QgsExpressionContextScope::StaticVariable &variable)
Adds a variable into the context scope.
bool exists(const QgsPropertyDefinition &definition) const
Returns true if the property is stored in the layer already, false otherwise.
void setOriginalValueVariable(const QVariant &value)
Sets the original value variable value for the context.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
QgsAuxiliaryLayer * auxiliaryLayer()
Returns the current auxiliary layer.
static const QString EXPR_SYMBOL_COLOR
Inbuilt variable name for symbol color variable.
QgsProperty property(int key) const override
Returns a matching property from the collection, if one exists.
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...
void setField(const QString &field)
Sets the field name the property references.
A dialog to create a new auxiliary field.
Definition for a property.
QgsExpressionContext * expressionContext() const
Returns the expression context used for the widget, if set.
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the labeling property definitions.
Single scope for storing variables and functions for use within a QgsExpressionContext.
void appendScope(QgsExpressionContextScope *scope)
Appends a scope to the end of the context.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
static QgsGui * instance()
Returns a pointer to the singleton instance.
static QgsExpressionContextScope * updateSymbolScope(const QgsSymbol *symbol, QgsExpressionContextScope *symbolScope=nullptr)
Updates a symbol scope related to a QgsSymbol to an expression context.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Represents a vector layer which manages a vector based data sets.
static QString nameFromProperty(const QgsPropertyDefinition &def, bool joined=false)
Returns the name of the auxiliary field for a property definition.
void setHighlightedVariables(const QStringList &variableNames)
Sets the list of variable names within the context intended to be highlighted to the user.
void setProperty(int key, const QgsProperty &property)
Adds a property to the collection and takes ownership of it.
Property
Data definable properties.
Single variable definition for use within a QgsExpressionContextScope.
A dialog to create a new auxiliary layer.
QList< QgsExpressionContextScope > additionalExpressionContextScopes() const
Returns the list of additional expression context scopes to show as available within the layer.