46 if ( qobject_cast<QgsDoubleSpinBox *>( sipCpp ) )
47 sipType = sipType_QgsDoubleSpinBox;
54 Q_PROPERTY(
bool showClearButton READ showClearButton WRITE setShowClearButton )
55 Q_PROPERTY(
bool clearValue READ clearValue WRITE setClearValue )
56 Q_PROPERTY(
bool expressionsEnabled READ expressionsEnabled WRITE setExpressionsEnabled )
79 void setShowClearButton(
bool showClearButton );
92 void setExpressionsEnabled(
bool enabled );
102 void clear()
override;
110 void setClearValue(
double customValue,
const QString &clearValueText = QString() );
117 void setClearValueMode( ClearValueMode mode,
const QString &clearValueText = QString() );
123 double clearValue()
const;
131 bool isCleared()
const;
137 void setLineEditAlignment( Qt::Alignment alignment );
144 void setSpecialValueText(
const QString &txt );
146 double valueFromText(
const QString &text )
const override;
147 QValidator::State validate( QString &input,
int &pos )
const override;
148 void paintEvent( QPaintEvent *e )
override;
149 void stepBy(
int steps )
override;
159 int editingTimeoutInterval()
const;
172 void setEditingTimeoutInterval(
int timeout );
204 void changeEvent( QEvent *event )
override;
205 void wheelEvent( QWheelEvent *event )
override;
206 void focusOutEvent( QFocusEvent *event )
override;
210 void timerEvent( QTimerEvent *event )
override;
213 void changed(
double value );
214 void onLastEditTimeout();
217 int frameWidth()
const;
218 bool shouldShowClearForValue(
double value )
const;
220 QgsSpinBoxLineEdit *mLineEdit =
nullptr;
222 bool mShowClearButton =
true;
224 double mCustomClearValue = 0.0;
226 bool mExpressionsEnabled =
true;
228 QTimer *mLastEditTimer =
nullptr;
229 double mLastEditTimeoutValue = std::numeric_limits<double>::quiet_NaN();
231 QString stripped(
const QString &originalText )
const;
233 friend class TestQgsRangeWidgetWrapper;