QskSlider using the decimals property for the value label
This commit is contained in:
parent
b53f60dd0e
commit
b19515c801
|
@ -9,8 +9,6 @@
|
||||||
#include "QskIntervalF.h"
|
#include "QskIntervalF.h"
|
||||||
#include "QskEvent.h"
|
#include "QskEvent.h"
|
||||||
|
|
||||||
#include <qlocale.h>
|
|
||||||
|
|
||||||
QSK_SUBCONTROL( QskSlider, Panel )
|
QSK_SUBCONTROL( QskSlider, Panel )
|
||||||
QSK_SUBCONTROL( QskSlider, Groove )
|
QSK_SUBCONTROL( QskSlider, Groove )
|
||||||
QSK_SUBCONTROL( QskSlider, Fill )
|
QSK_SUBCONTROL( QskSlider, Fill )
|
||||||
|
@ -263,12 +261,4 @@ void QskSlider::moveHandleTo( qreal value, const QskAnimationHint& hint )
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QskSlider::textFromValue( qreal value ) const
|
|
||||||
{
|
|
||||||
#if 1
|
|
||||||
// we could try to find the precision from the step size. TODO ...
|
|
||||||
return locale().toString( value, 'f', 1 );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_QskSlider.cpp"
|
#include "moc_QskSlider.cpp"
|
||||||
|
|
|
@ -45,7 +45,6 @@ class QSK_EXPORT QskSlider : public QskBoundedValueInput
|
||||||
qreal handlePosition() const; // [0,0, 1.0]
|
qreal handlePosition() const; // [0,0, 1.0]
|
||||||
|
|
||||||
QskAspect::Variation effectiveVariation() const override;
|
QskAspect::Variation effectiveVariation() const override;
|
||||||
QString textFromValue( qreal ) const override;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void pressedChanged( bool );
|
void pressedChanged( bool );
|
||||||
|
|
Loading…
Reference in New Issue