47 if ( qobject_cast<QgsDoubleSpinBox *>( sipCpp ) )
48 sipType = sipType_QgsDoubleSpinBox;
55 Q_PROPERTY(
bool showClearButton READ showClearButton WRITE setShowClearButton )
56 Q_PROPERTY(
bool clearValue READ clearValue WRITE setClearValue )
57 Q_PROPERTY(
bool expressionsEnabled READ expressionsEnabled WRITE setExpressionsEnabled )
81 void setShowClearButton(
bool showClearButton );
94 void setExpressionsEnabled(
bool enabled );
104 void clear()
override;
112 void setClearValue(
double customValue,
const QString &clearValueText = QString() );
119 void setClearValueMode( ClearValueMode mode,
const QString &clearValueText = QString() );
125 double clearValue()
const;
133 bool isCleared()
const;
139 void setLineEditAlignment( Qt::Alignment alignment );
146 void setSpecialValueText(
const QString &txt );
148 double valueFromText(
const QString &text )
const override;
149 QValidator::State validate( QString &input,
int &pos )
const override;
150 void paintEvent( QPaintEvent *e )
override;
151 void stepBy(
int steps )
override;
168 void changeEvent( QEvent *event )
override;
169 void wheelEvent( QWheelEvent *event )
override;
173 void timerEvent( QTimerEvent *event )
override;
176 void changed(
double value );
179 int frameWidth()
const;
180 bool shouldShowClearForValue(
double value )
const;
182 QgsSpinBoxLineEdit *mLineEdit =
nullptr;
184 bool mShowClearButton =
true;
186 double mCustomClearValue = 0.0;
188 bool mExpressionsEnabled =
true;
190 QString stripped(
const QString &originalText )
const;
192 friend class TestQgsRangeWidgetWrapper;