16 #ifndef QGSVARIABLEEDITORWIDGET_H 17 #define QGSVARIABLEEDITORWIDGET_H 21 #include <QTreeWidget> 22 #include <QItemDelegate> 28 class QgsVariableEditorTree;
29 class VariableEditorDelegate;
43 Q_PROPERTY(
QString settingGroup READ settingGroup WRITE setSettingGroup )
74 void setEditableScopeIndex(
int scopeIndex );
110 void reloadContext();
125 int mEditableScopeIndex;
126 QgsVariableEditorTree* mTreeWidget;
136 void on_mAddButton_clicked();
137 void on_mRemoveButton_clicked();
138 void selectionChanged();
157 ContextIndex = Qt::UserRole,
161 explicit QgsVariableEditorTree(
QWidget *parent =
nullptr );
166 QString variableNameFromIndex(
const QModelIndex& index )
const {
return variableNameFromItem( itemFromIndex( index ) ); }
169 void setEditableScopeIndex(
int scopeIndex ) { mEditableScopeIndex = scopeIndex; }
183 void keyPressEvent(
QKeyEvent *event )
override;
184 void mousePressEvent(
QMouseEvent *event )
override;
186 QColor rowColor(
int index )
const;
196 VariableEditorDelegate* mEditorDelegate;
197 int mEditableScopeIndex;
212 VariableEditorDelegate(
QObject *parent =
nullptr, QgsVariableEditorTree *tree =
nullptr )
214 , mParentTree( tree )
227 QgsVariableEditorTree *mParentTree;
232 #endif //QGSVARIABLEEDITORWIDGET_H
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Single scope for storing variables and functions for use within a QgsExpressionContext.
QString text(int column) const
typedef KeyboardModifiers