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 )
80 void setEditableScopeIndex(
int scopeIndex );
123 int mEditableScopeIndex;
124 QgsVariableEditorTree* mTreeWidget;
134 void on_mAddButton_clicked();
135 void on_mRemoveButton_clicked();
136 void selectionChanged();
155 ContextIndex = Qt::UserRole,
159 explicit QgsVariableEditorTree(
QWidget *parent =
nullptr );
164 QString variableNameFromIndex(
const QModelIndex& index )
const {
return variableNameFromItem( itemFromIndex( index ) ); }
167 void setEditableScopeIndex(
int scopeIndex ) { mEditableScopeIndex = scopeIndex; }
181 void keyPressEvent(
QKeyEvent *event )
override;
182 void mousePressEvent(
QMouseEvent *event )
override;
184 QColor rowColor(
int index )
const;
190 static QIcon mExpandIcon;
194 VariableEditorDelegate* mEditorDelegate;
195 int mEditableScopeIndex;
210 VariableEditorDelegate(
QObject *parent =
nullptr, QgsVariableEditorTree *tree =
nullptr )
212 , mParentTree( tree )
225 QgsVariableEditorTree *mParentTree;
230 #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