46 if ( qobject_cast<QgsSpinBox *>( sipCpp ) )
47 sipType = sipType_QgsSpinBox;
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(
int customValue,
const QString &clearValueText = QString() );
117 void setClearValueMode( ClearValueMode mode,
const QString &clearValueText = QString() );
123 int clearValue()
const;
129 void setLineEditAlignment( Qt::Alignment alignment );
136 void setSpecialValueText(
const QString &txt );
138 int valueFromText(
const QString &text )
const override;
139 QValidator::State validate( QString &input,
int &pos )
const override;
140 void stepBy(
int steps )
override;
150 int editingTimeoutInterval()
const;
163 void setEditingTimeoutInterval(
int timeout );
195 void changeEvent( QEvent *event )
override;
196 void paintEvent( QPaintEvent *event )
override;
197 void wheelEvent( QWheelEvent *event )
override;
201 void timerEvent( QTimerEvent *event )
override;
202 void focusOutEvent( QFocusEvent *event )
override;
205 void changed(
int value );
206 void onLastEditTimeout();
209 int frameWidth()
const;
210 bool shouldShowClearForValue(
int value )
const;
212 QgsSpinBoxLineEdit *mLineEdit =
nullptr;
214 bool mShowClearButton =
true;
216 int mCustomClearValue = 0;
218 bool mExpressionsEnabled =
true;
220 QTimer *mLastEditTimer =
nullptr;
221 bool mHasEmittedEditTimeout =
false;
222 int mLastEditTimeoutValue = 0;
224 QString stripped(
const QString &originalText )
const;
226 friend class TestQgsRangeWidgetWrapper;