//
#include "QDS_SpinBoxDbl.h"
-#include <QtxDblSpinBox.h>
+#include <QtxDoubleSpinBox.h>
/*
\class QDS_SpinBoxDbl
QString QDS_SpinBoxDbl::getString() const
{
QString res;
- QtxDblSpinBox* sb = spinBox();
+ QtxDoubleSpinBox* sb = spinBox();
if ( sb && !sb->isCleared() )
{
bool hasFocus = sb->hasFocus();
\brief Get spin box widget.
\return internal spin box widget.
*/
-QtxDblSpinBox* QDS_SpinBoxDbl::spinBox() const
+QtxDoubleSpinBox* QDS_SpinBoxDbl::spinBox() const
{
- return ::qobject_cast<QtxDblSpinBox*>( controlWidget() );
+ return ::qobject_cast<QtxDoubleSpinBox*>( controlWidget() );
}
/*!
*/
QWidget* QDS_SpinBoxDbl::createControl( QWidget* parent )
{
- QtxDblSpinBox* aSpinBox = new QtxDblSpinBox( parent );
+ QtxDoubleSpinBox* aSpinBox = new QtxDoubleSpinBox( parent );
aSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( aSpinBox, SIGNAL( valueChanged( double ) ), this, SLOT( onValueChanged( double ) ) );
return aSpinBox;
{
double s = 0;
if ( spinBox() )
- s = spinBox()->lineStep();
+ s = spinBox()->singleStep();
return s;
}
void QDS_SpinBoxDbl::setStep( const double step )
{
if ( spinBox() )
- spinBox()->setLineStep( step );
+ spinBox()->setSingleStep( step );
}
/*!
{
QDS_Datum::unitSystemChanged( system );
- QtxDblSpinBox* sb = spinBox();
+ QtxDoubleSpinBox* sb = spinBox();
if ( !sb )
return;
if ( !aDicItem.IsNull() )
aPreci = aDicItem->GetPrecision();
- sb->setPrecision( aPreci );
+ sb->setDecimals( aPreci );
- sb->setLineStep( .1 );
- sb->setMinValue( minValue().isEmpty() ? -DBL_MAX : minValue().toDouble() );
- sb->setMaxValue( maxValue().isEmpty() ? DBL_MAX : maxValue().toDouble() );
+ sb->setSingleStep( .1 );
+ sb->setMinimum( minValue().isEmpty() ? -DBL_MAX : minValue().toDouble() );
+ sb->setMaximum( maxValue().isEmpty() ? DBL_MAX : maxValue().toDouble() );
}
#include "QDS_Datum.h"
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
class QDS_EXPORT QDS_SpinBoxDbl : public QDS_Datum
{
QDS_SpinBoxDbl( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
virtual ~QDS_SpinBoxDbl();
- double step() const;
- void setStep( const double );
+ double step() const;
+ void setStep( const double );
private slots:
- void onValueChanged( double );
+ void onValueChanged( double );
protected:
- QtxDblSpinBox* spinBox() const;
- virtual QWidget* createControl( QWidget* );
+ QtxDoubleSpinBox* spinBox() const;
+ virtual QWidget* createControl( QWidget* );
- virtual QString getString() const;
- virtual void setString( const QString& );
+ virtual QString getString() const;
+ virtual void setString( const QString& );
- virtual void unitSystemChanged( const QString& );
+ virtual void unitSystemChanged( const QString& );
};
#endif