15 #ifndef BORNAGAIN_GUI_VIEW_COMMON_SCIENTIFICSPINBOX_H
16 #define BORNAGAIN_GUI_VIEW_COMMON_SCIENTIFICSPINBOX_H
18 #include <QDoubleSpinBox>
45 void stepBy(
int steps)
override;
46 QValidator::State
validate(QString&,
int&)
const override {
return QValidator::Acceptable; }
47 void fixup(QString&)
const override {}
49 static QString
toString(
double val,
int decimal_points);
50 static double toDouble(QString text,
const QDoubleValidator& validator,
double min,
double max,
51 double default_value);
58 QAbstractSpinBox::StepEnabled
stepEnabled()
const override;
ScientificSpinBox(QWidget *parent=nullptr)
void stepBy(int steps) override
static double toDouble(QString text, const QDoubleValidator &validator, double min, double max, double default_value)
void fixup(QString &) const override
void setMaximum(double max)
QSize sizeHint() const override
void setMinimum(double min)
~ScientificSpinBox() override
QValidator::State validate(QString &, int &) const override
void setValue(double val)
void setSingleStep(double step)
QDoubleValidator m_validator
static double round(double val, int decimals)
bool inRange(double val) const
QAbstractSpinBox::StepEnabled stepEnabled() const override
static QString toString(double val, int decimal_points)
void valueChanged(double value)
double singleStep() const