18 #ifndef QGSFILTERLINEEDIT_H 19 #define QGSFILTERLINEEDIT_H 38 Q_PROPERTY(
ClearMode clearMode READ clearMode WRITE setClearMode )
39 Q_PROPERTY(
QString nullValue READ nullValue WRITE setNullValue )
40 Q_PROPERTY(
QString defaultValue READ defaultValue WRITE setDefaultValue )
41 Q_PROPERTY(
QString value READ value WRITE setValue NOTIFY valueChanged )
42 Q_PROPERTY(
bool showClearButton READ showClearButton WRITE setShowClearButton )
70 void setShowClearButton(
bool visible );
152 virtual void clearValue();
166 void valueChanged(
const QString& value );
176 void onTextChanged(
const QString &text );
180 bool mClearButtonVisible;
190 QSize mClearIconSize;
195 bool shouldShowClear()
const;
197 QRect clearRect()
const;
213 QgsSpinBoxLineEdit(
QWidget* parent =
nullptr )
219 virtual void clearValue()
override 222 setCursor( Qt::IBeamCursor );
229 #endif // QGSFILTERLINEEDIT_H ClearMode clearMode() const
Returns the clear mode for the widget.
bool showClearButton() const
Returns true if the widget's clear button is visible.
void setDefaultValue(const QString &defaultValue)
Sets the default value for the widget.
void setText(const QString &)
QString defaultValue() const
Returns the default value for the widget.
void setClearMode(ClearMode mode)
Sets the clear mode for the widget.
Reset value to default value (see defaultValue() )
QString nullValue() const
Returns the string used for representating null values in the widget.
ClearMode
Behaviour when clearing value of widget.
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
virtual void paintEvent(QPaintEvent *)
virtual void mouseMoveEvent(QMouseEvent *e)
virtual void focusInEvent(QFocusEvent *e)
bool isNull() const
Determine if the current text represents null.
void setNullValue(const QString &nullValue)
Sets the string representation for null values in the widget.
bool isNull(const QVariant &v)
virtual void mousePressEvent(QMouseEvent *e)
void setValue(const QString &value)
Sets the current text for the widget with support for handling null values.
QString value() const
Returns the text of this edit with support for handling null values.