Skip to content

Commit 0d9683e

Browse files
committed
Sip update and const correctness
1 parent 443fa8c commit 0d9683e

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

python/gui/qgsfilterlineedit.sip

+27-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,35 @@ class QgsFilterLineEdit : QLineEdit
99
public:
1010
QgsFilterLineEdit( QWidget* parent = 0 );
1111

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;
1532

1633
signals:
1734
void cleared();
1835

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+
2243
};

src/gui/qgsfilterlineedit.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit
4949
*
5050
* @return Current text (Null string if it matches the nullValue property )
5151
*/
52-
QString value() { return isNull() ? QString::null : text(); }
52+
QString value() const { return isNull() ? QString::null : text(); }
5353

5454
/**
5555
* Determine if the current text represents Null.
5656
*
5757
* @return True if the value is Null.
5858
*/
59-
inline bool isNull() { return text() == mNullValue; }
59+
inline bool isNull() const { return text() == mNullValue; }
6060

6161
signals:
6262
void cleared();

0 commit comments

Comments
 (0)