18 #ifndef QGSFILTERLINEEDIT_H 19 #define QGSFILTERLINEEDIT_H 31 Q_PROPERTY( QString nullValue READ nullValue WRITE setNullValue )
45 void setValue( QString value ) { setText( value.isNull() ? mNullValue : value ); }
52 QString
value()
const {
return isNull() ? QString::null : text(); }
59 inline bool isNull()
const {
return text() == mNullValue; }
69 void valueChanged(
const QString& value );
72 void mousePressEvent( QMouseEvent* e )
override;
73 void focusInEvent( QFocusEvent* e )
override;
74 void resizeEvent( QResizeEvent* e )
override;
75 void changeEvent( QEvent* e )
override;
76 void paintEvent( QPaintEvent* e )
override;
80 void onTextChanged(
const QString &text );
84 QToolButton *btnClear;
89 #endif // QGSFILTERLINEEDIT_H QString nullValue() const
QString value() const
Returns the text of this edit with NULL support.
Lineedit with builtin clear button.
void setNullValue(QString nullValue)
void setValue(QString value)
Sets the current text with NULL support.
bool isNull() const
Determine if the current text represents Null.
bool isNull(const QVariant &v)