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;
145 void changeEvent( QEvent *event )
override;
146 void paintEvent( QPaintEvent *event )
override;
147 void wheelEvent( QWheelEvent *event )
override;
151 void timerEvent( QTimerEvent *event )
override;
154 void changed(
int value );
157 int frameWidth()
const;
158 bool shouldShowClearForValue(
int value )
const;
160 QgsSpinBoxLineEdit *mLineEdit =
nullptr;
162 bool mShowClearButton =
true;
163 ClearValueMode mClearValueMode = MinimumValue;
164 int mCustomClearValue = 0;
166 bool mExpressionsEnabled =
true;
168 QString stripped(
const QString &originalText )
const;
170 friend class TestQgsRangeWidgetWrapper;