File tree 2 files changed +29
-8
lines changed
2 files changed +29
-8
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,35 @@ class QgsFilterLineEdit : QLineEdit
9
9
public:
10
10
QgsFilterLineEdit( QWidget* parent = 0 );
11
11
12
- void setNullValue( QString nullValue );
13
-
14
- QString nullValue() const;
12
+ /**
13
+ * Sets the current text with NULL support
14
+ *
15
+ * @param value The text to set. If a Null string is provided, the text will match the nullValue.
16
+ */
17
+ void setValue( QString value );
18
+
19
+ /**
20
+ * Returns the text of this edit with NULL support
21
+ *
22
+ * @return Current text (Null string if it matches the nullValue property )
23
+ */
24
+ QString value() const;
25
+
26
+ /**
27
+ * Determine if the current text represents Null.
28
+ *
29
+ * @return True if the value is Null.
30
+ */
31
+ bool isNull() const;
15
32
16
33
signals:
17
34
void cleared();
18
35
19
- protected:
20
- void resizeEvent( QResizeEvent * );
21
- void changeEvent( QEvent * );
36
+ /**
37
+ * Same as textChanged(const QString& ) but with support for Null values.
38
+ *
39
+ * @param value The current text or Null string if it matches the nullValue property.
40
+ */
41
+ void valueChanged( const QString& value );
42
+
22
43
};
Original file line number Diff line number Diff line change @@ -49,14 +49,14 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit
49
49
*
50
50
* @return Current text (Null string if it matches the nullValue property )
51
51
*/
52
- QString value () { return isNull () ? QString::null : text (); }
52
+ QString value () const { return isNull () ? QString::null : text (); }
53
53
54
54
/* *
55
55
* Determine if the current text represents Null.
56
56
*
57
57
* @return True if the value is Null.
58
58
*/
59
- inline bool isNull () { return text () == mNullValue ; }
59
+ inline bool isNull () const { return text () == mNullValue ; }
60
60
61
61
signals:
62
62
void cleared ();
You can’t perform that action at this time.
0 commit comments