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;
131 void setLineEditAlignment( Qt::Alignment alignment );
138 void setSpecialValueText(
const QString &txt );
140 double valueFromText(
const QString &text )
const override;
141 QValidator::State validate( QString &input,
int &pos )
const override;
142 void paintEvent( QPaintEvent *e )
override;
143 void stepBy(
int steps )
override;
160 void changeEvent( QEvent *event )
override;
161 void wheelEvent( QWheelEvent *event )
override;
165 void timerEvent( QTimerEvent *event )
override;
168 void changed(
double value );
171 int frameWidth()
const;
172 bool shouldShowClearForValue(
double value )
const;
174 QgsSpinBoxLineEdit *mLineEdit =
nullptr;
176 bool mShowClearButton =
true;
178 double mCustomClearValue = 0.0;
180 bool mExpressionsEnabled =
true;
182 QString stripped(
const QString &originalText )
const;
184 friend class TestQgsRangeWidgetWrapper;