48 if ( qobject_cast<QgsDoubleSpinBox *>( sipCpp ) )
49 sipType = sipType_QgsDoubleSpinBox;
56 Q_PROPERTY(
bool showClearButton READ showClearButton WRITE setShowClearButton )
57 Q_PROPERTY(
bool clearValue READ clearValue WRITE setClearValue )
58 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;
134 bool isCleared()
const;
140 void setLineEditAlignment( Qt::Alignment alignment );
147 void setSpecialValueText(
const QString &txt );
149 double valueFromText(
const QString &text )
const override;
150 QValidator::State validate( QString &input,
int &pos )
const override;
151 void paintEvent( QPaintEvent *e )
override;
152 void stepBy(
int steps )
override;
162 int editingTimeoutInterval()
const;
175 void setEditingTimeoutInterval(
int timeout );
207 void changeEvent( QEvent *event )
override;
208 void wheelEvent( QWheelEvent *event )
override;
209 void focusOutEvent( QFocusEvent *event )
override;
213 void timerEvent( QTimerEvent *event )
override;
216 void changed(
double value );
217 void onLastEditTimeout();
220 int frameWidth()
const;
221 bool shouldShowClearForValue(
double value )
const;
223 QgsSpinBoxLineEdit *mLineEdit =
nullptr;
225 bool mShowClearButton =
true;
227 double mCustomClearValue = 0.0;
229 bool mExpressionsEnabled =
true;
231 QTimer *mLastEditTimer =
nullptr;
232 double mLastEditTimeoutValue = std::numeric_limits<double>::quiet_NaN();
234 QString stripped(
const QString &originalText )
const;
236 friend class TestQgsRangeWidgetWrapper;