A tree based widget for editing expression context scope variables.
More...
#include <qgsvariableeditorwidget.h>
A tree based widget for editing expression context scope variables.
The widget allows editing variables from a QgsExpressionContextScope, and can optionally also show inherited variables from a QgsExpressionContext.
- Since
- QGIS 2.12
Definition at line 42 of file qgsvariableeditorwidget.h.
◆ QgsVariableEditorWidget()
QgsVariableEditorWidget::QgsVariableEditorWidget |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~QgsVariableEditorWidget()
QgsVariableEditorWidget::~QgsVariableEditorWidget |
( |
| ) |
|
|
override |
◆ context()
◆ editableScope()
◆ reloadContext
void QgsVariableEditorWidget::reloadContext |
( |
| ) |
|
|
slot |
Reloads all scopes from the editor's current context.
This method should be called after adding or removing scopes from the attached context.
- See also
- context()
Definition at line 109 of file qgsvariableeditorwidget.cpp.
◆ scopeChanged
void QgsVariableEditorWidget::scopeChanged |
( |
| ) |
|
|
signal |
Emitted when the user has modified a scope using the widget.
◆ setContext()
Overwrites the QgsExpressionContext for the widget.
Setting a context allows the widget to show all inherited variables for the context, and highlight any overridden variables within scopes.
- Parameters
-
context | expression context |
- See also
- context()
Definition at line 103 of file qgsvariableeditorwidget.cpp.
◆ setEditableScopeIndex()
void QgsVariableEditorWidget::setEditableScopeIndex |
( |
int |
scopeIndex | ) |
|
Sets the editable scope for the widget.
Only variables from the editable scope can be modified by users.
- Parameters
-
scopeIndex | index of current editable scope. Set to -1 to disable editing and make the widget read-only. |
- See also
- editableScope()
Definition at line 116 of file qgsvariableeditorwidget.cpp.
◆ setSettingGroup()
void QgsVariableEditorWidget::setSettingGroup |
( |
const QString & |
group | ) |
|
|
inline |
◆ settingGroup()
QString QgsVariableEditorWidget::settingGroup |
( |
| ) |
const |
|
inline |
◆ showEvent()
void QgsVariableEditorWidget::showEvent |
( |
QShowEvent * |
event | ) |
|
|
overrideprotected |
◆ variablesInActiveScope()
QVariantMap QgsVariableEditorWidget::variablesInActiveScope |
( |
| ) |
const |
Returns a map variables set within the editable scope.
Read only variables are not returned. This method can be used to retrieve the variables edited an added by users via the widget.
Definition at line 136 of file qgsvariableeditorwidget.cpp.
◆ settingGroup
QString QgsVariableEditorWidget::settingGroup |
|
readwrite |
The documentation for this class was generated from the following files: