Definition at line 20 of file ScientificSpinBox.h.
|
static double | round (double val, int decimals) |
|
static double | toDouble (QString text, const QDoubleValidator &validator, double min, double max, double default_value) |
|
static QString | toString (double val, int decimal_points) |
|
|
QAbstractSpinBox::StepEnabled | stepEnabled () const override |
|
◆ ScientificSpinBox()
ScientificSpinBox::ScientificSpinBox |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~ScientificSpinBox()
ScientificSpinBox::~ScientificSpinBox |
( |
| ) |
|
|
overridedefault |
◆ decimals()
int ScientificSpinBox::decimals |
( |
| ) |
const |
◆ fixup()
void ScientificSpinBox::fixup |
( |
QString & |
| ) |
const |
|
inlineoverride |
◆ inRange()
bool ScientificSpinBox::inRange |
( |
double |
val | ) |
const |
|
private |
◆ maximum()
double ScientificSpinBox::maximum |
( |
| ) |
const |
◆ minimum()
double ScientificSpinBox::minimum |
( |
| ) |
const |
◆ round()
double ScientificSpinBox::round |
( |
double |
val, |
|
|
int |
decimals |
|
) |
| |
|
static |
◆ setDecimals()
void ScientificSpinBox::setDecimals |
( |
int |
val | ) |
|
◆ setMaximum()
void ScientificSpinBox::setMaximum |
( |
double |
max | ) |
|
◆ setMinimum()
void ScientificSpinBox::setMinimum |
( |
double |
min | ) |
|
◆ setSingleStep()
void ScientificSpinBox::setSingleStep |
( |
double |
step | ) |
|
◆ setValue()
void ScientificSpinBox::setValue |
( |
double |
val | ) |
|
Definition at line 63 of file ScientificSpinBox.cpp.
68 if (std::abs(old_val -
m_value) > min_val)
static double round(double val, int decimals)
void valueChanged(double value)
References m_decimals, m_value, round(), updateText(), and valueChanged().
Referenced by ParameterTuningDelegate::createEditor(), ScientificSpinBoxEditor::initEditor(), setDecimals(), setMaximum(), setMinimum(), ParameterTuningDelegate::sliderValueChanged(), stepBy(), and updateValue().
◆ singleStep()
double ScientificSpinBox::singleStep |
( |
| ) |
const |
◆ sizeHint()
QSize ScientificSpinBox::sizeHint |
( |
| ) |
const |
|
override |
◆ stepBy()
void ScientificSpinBox::stepBy |
( |
int |
steps | ) |
|
|
override |
◆ stepEnabled()
QAbstractSpinBox::StepEnabled ScientificSpinBox::stepEnabled |
( |
| ) |
const |
|
overrideprotected |
Definition at line 158 of file ScientificSpinBox.cpp.
160 return isReadOnly() ? StepNone : StepUpEnabled | StepDownEnabled;
◆ toDouble()
double ScientificSpinBox::toDouble |
( |
QString |
text, |
|
|
const QDoubleValidator & |
validator, |
|
|
double |
min, |
|
|
double |
max, |
|
|
double |
default_value |
|
) |
| |
|
static |
Definition at line 140 of file ScientificSpinBox.cpp.
144 if (validator.validate(text, pos) == QValidator::Acceptable) {
145 double new_val = validator.locale().toDouble(text);
146 if (std::abs(new_val) < min_val)
148 return new_val >= min && new_val <= max ? new_val : default_value;
150 return default_value;
Referenced by updateValue().
◆ toString()
QString ScientificSpinBox::toString |
( |
double |
val, |
|
|
int |
decimal_points |
|
) |
| |
|
static |
◆ updateText()
void ScientificSpinBox::updateText |
( |
| ) |
|
|
private |
◆ updateValue()
void ScientificSpinBox::updateValue |
( |
| ) |
|
|
private |
◆ validate()
QValidator::State ScientificSpinBox::validate |
( |
QString & |
, |
|
|
int & |
|
|
) |
| const |
|
inlineoverride |
◆ value()
double ScientificSpinBox::value |
( |
| ) |
const |
◆ valueChanged
void ScientificSpinBox::valueChanged |
( |
double |
value | ) |
|
|
signal |
◆ m_decimals
int ScientificSpinBox::m_decimals |
|
private |
◆ m_max
double ScientificSpinBox::m_max |
|
private |
◆ m_min
double ScientificSpinBox::m_min |
|
private |
◆ m_step
double ScientificSpinBox::m_step |
|
private |
◆ m_validator
QDoubleValidator ScientificSpinBox::m_validator |
|
private |
◆ m_value
double ScientificSpinBox::m_value |
|
private |
◆ value
double ScientificSpinBox::value |
|
readwrite |
The documentation for this class was generated from the following files: