@@ -28,6 +28,7 @@ class QgsMapLayer;
2828class QgsVectorLayer ;
2929class QgsFieldModel ;
3030
31+
3132/* *
3233 * @brief The QgsFieldExpressionWidget class reates a widget to choose fields and edit expressions
3334 * It contains a combo boxto display the fields and expression and a button to open the expression dialog.
@@ -39,6 +40,8 @@ class QgsFieldModel;
3940class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
4041{
4142 Q_OBJECT
43+ Q_PROPERTY ( QString expressionDialogTitle READ expressionDialogTitle WRITE setExpressionDialogTitle )
44+
4245 public:
4346 /* *
4447 * @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
4851 // ! define the title used in the expression dialog
4952 void setExpressionDialogTitle ( QString title );
5053
54+ // ! return the title used for the expression dialog
55+ const QString expressionDialogTitle () { return mExpressionDialogTitle ; }
56+
5157 // ! set the geometry calculator used in the expression dialog
5258 void setGeomCalculator ( const QgsDistanceArea &da );
5359
@@ -61,9 +67,6 @@ class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
6167 // ! Returns the currently used layer
6268 QgsVectorLayer* layer ();
6369
64- protected:
65- void changeEvent ( QEvent* event );
66-
6770 signals:
6871 // ! the signal is emitted when the currently selected field changes
6972 void fieldChanged ( QString fieldName );
@@ -102,6 +105,9 @@ class GUI_EXPORT QgsFieldExpressionWidget : public QWidget
102105
103106 bool isExpressionValid ( const QString expressionStr );
104107
108+ protected:
109+ void changeEvent ( QEvent* event );
110+
105111 private:
106112 QComboBox* mCombo ;
107113 QToolButton* mButton ;
0 commit comments