implementation of accelerating/tracking postponed

This commit is contained in:
Uwe Rathmann 2023-03-01 17:46:48 +01:00
parent 99079a666e
commit f3b516c81d
2 changed files with 7 additions and 47 deletions

View File

@ -54,9 +54,7 @@ class QskSpinBox::PrivateData
{
public:
PrivateData()
: tracking( true )
, wrapping( false )
, accelerating( false )
: wrapping( false )
{
}
@ -128,9 +126,13 @@ class QskSpinBox::PrivateData
int key = Qt::Key_unknown;
bool tracking : 1;
bool wrapping : 1;
bool accelerating : 1; // not yet implemented: TODO ...
#if 0
// not yet implemented: TODO ...
bool tracking : 1;
bool accelerating : 1;
#endif
};
QskSpinBox::QskSpinBox( qreal min, qreal max, qreal stepSize, QQuickItem* parent )
@ -194,20 +196,6 @@ Qt::Alignment QskSpinBox::textAlignment() const
aspectTextAlignment(), Qt::AlignLeft ) & Qt::AlignHorizontal_Mask;
}
void QskSpinBox::setTracking( bool on )
{
if ( on != m_data->tracking )
{
m_data->tracking = on;
Q_EMIT trackingChanged( on );
}
}
bool QskSpinBox::isTracking() const
{
return m_data->tracking;
}
void QskSpinBox::setWrapping( bool on )
{
if ( on != m_data->wrapping )
@ -222,20 +210,6 @@ bool QskSpinBox::isWrapping() const
return m_data->wrapping;
}
void QskSpinBox::setAccelerating( bool on )
{
if ( on != m_data->accelerating )
{
m_data->accelerating = on;
Q_EMIT acceleratingChanged( on );
}
}
bool QskSpinBox::isAccelerating() const
{
return m_data->accelerating;
}
void QskSpinBox::setDecimals( int decimals )
{
decimals = qBound( 0, decimals, DBL_MAX_10_EXP + DBL_DIG );

View File

@ -16,12 +16,6 @@ class QSK_EXPORT QskSpinBox : public QskBoundedValueInput
Q_PROPERTY( bool wrapping READ isWrapping
WRITE setWrapping NOTIFY wrappingChanged )
Q_PROPERTY( bool tracking READ isTracking
WRITE setTracking NOTIFY trackingChanged )
Q_PROPERTY( bool accelerating READ isAccelerating
WRITE setAccelerating NOTIFY acceleratingChanged )
Q_PROPERTY( Decoration decoration READ decoration
WRITE setDecoration RESET resetDecoration NOTIFY decorationChanged )
@ -66,12 +60,6 @@ class QSK_EXPORT QskSpinBox : public QskBoundedValueInput
void setWrapping( bool );
bool isWrapping() const;
void setTracking( bool );
bool isTracking() const;
void setAccelerating( bool );
bool isAccelerating() const;
void setDecimals( int );
int decimals() const;
@ -84,9 +72,7 @@ class QSK_EXPORT QskSpinBox : public QskBoundedValueInput
void decorationChanged( Decoration );
void textAlignmentChanged( Qt::Alignment );
void trackingChanged( bool );
void wrappingChanged( bool );
void acceleratingChanged( bool );
void decimalsChanged( int );
void textChanged();