@@ -28,6 +28,7 @@ class QgsMapLayer;
28
28
class QgsVectorLayer ;
29
29
class QgsFieldModel ;
30
30
31
+
31
32
/* *
32
33
* @brief The QgsFieldExpressionWidget class reates a widget to choose fields and edit expressions
33
34
* It contains a combo boxto display the fields and expression and a button to open the expression dialog.
@@ -39,6 +40,8 @@ class QgsFieldModel;
39
40
class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
40
41
{
41
42
Q_OBJECT
43
+ Q_PROPERTY ( QString expressionDialogTitle READ expressionDialogTitle WRITE setExpressionDialogTitle )
44
+
42
45
public:
43
46
/* *
44
47
* @brief QgsFieldExpressionWidget creates a widget with a combo box to display the fields and expression and a button to open the expression dialog
@@ -48,6 +51,9 @@ class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
48
51
// ! define the title used in the expression dialog
49
52
void setExpressionDialogTitle ( QString title );
50
53
54
+ // ! return the title used for the expression dialog
55
+ const QString expressionDialogTitle () { return mExpressionDialogTitle ; }
56
+
51
57
// ! set the geometry calculator used in the expression dialog
52
58
void setGeomCalculator ( const QgsDistanceArea &da );
53
59
@@ -61,9 +67,6 @@ class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
61
67
// ! Returns the currently used layer
62
68
QgsVectorLayer* layer ();
63
69
64
- protected:
65
- void changeEvent ( QEvent* event );
66
-
67
70
signals:
68
71
// ! the signal is emitted when the currently selected field changes
69
72
void fieldChanged ( QString fieldName );
@@ -102,6 +105,9 @@ class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
102
105
103
106
bool isExpressionValid ( const QString expressionStr );
104
107
108
+ protected:
109
+ void changeEvent ( QEvent* event );
110
+
105
111
private:
106
112
QComboBox* mCombo ;
107
113
QToolButton* mButton ;
0 commit comments