47 if ( qobject_cast<QgsSpinBox *>( sipCpp ) )
48 sipType = sipType_QgsSpinBox;
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(
int customValue,
const QString &clearValueText = QString() );
119 void setClearValueMode( ClearValueMode mode,
const QString &clearValueText = QString() );
125 int clearValue()
const;
131 void setLineEditAlignment( Qt::Alignment alignment );
138 void setSpecialValueText(
const QString &txt );
140 int valueFromText(
const QString &text )
const override;
141 QValidator::State validate( QString &input,
int &pos )
const override;
142 void stepBy(
int steps )
override;
160 void changeEvent( QEvent *event )
override;
161 void paintEvent( QPaintEvent *event )
override;
162 void wheelEvent( QWheelEvent *event )
override;
166 void timerEvent( QTimerEvent *event )
override;
169 void changed(
int value );
172 int frameWidth()
const;
173 bool shouldShowClearForValue(
int value )
const;
175 QgsSpinBoxLineEdit *mLineEdit =
nullptr;
177 bool mShowClearButton =
true;
179 int mCustomClearValue = 0;
181 bool mExpressionsEnabled =
true;
183 QString stripped(
const QString &originalText )
const;
185 friend class TestQgsRangeWidgetWrapper;