32 #include "../../exception/exceptionnotpossible.h"
34 #include <QHBoxLayout>
45 setLayout(
new QHBoxLayout(
this));
47 this->layout()->setMargin(0);
48 this->layout()->setContentsMargins(0, 0, 0, 0);
51 mp_daltonValueSpinBox =
new QDoubleSpinBox();
52 this->layout()->addWidget(mp_daltonValueSpinBox);
54 mp_ppmValueSpinBox =
new QDoubleSpinBox();
55 this->layout()->addWidget(mp_ppmValueSpinBox);
57 mp_resValueSpinBox =
new QDoubleSpinBox();
58 this->layout()->addWidget(mp_resValueSpinBox);
60 mp_unitComboBox =
new QComboBox();
61 this->layout()->addWidget(mp_unitComboBox);
63 mp_unitComboBox->addItem(
"dalton", QString(
"dalton"));
64 mp_unitComboBox->addItem(
"ppm", QString(
"ppm"));
65 mp_unitComboBox->addItem(
"res", QString(
"res"));
71 mp_daltonValueSpinBox->setDecimals(3);
72 mp_daltonValueSpinBox->setSingleStep(0.01);
73 mp_daltonValueSpinBox->setRange(0, 30);
75 mp_ppmValueSpinBox->setDecimals(4);
76 mp_ppmValueSpinBox->setSingleStep(10);
77 mp_ppmValueSpinBox->setRange(0.0001, 300);
79 mp_resValueSpinBox->setDecimals(0);
80 mp_resValueSpinBox->setSingleStep(1000);
81 mp_resValueSpinBox->setRange(1, 2000000);
84 setPrecision(mp_precisionDalton);
86 connect(mp_unitComboBox,
87 SIGNAL(currentIndexChanged(
int)),
89 SLOT(setCurrentIndex(
int)));
91 connect(mp_daltonValueSpinBox,
92 SIGNAL(valueChanged(
double)),
94 SLOT(setDaltonValueChanged(
double)));
96 connect(mp_ppmValueSpinBox,
97 SIGNAL(valueChanged(
double)),
99 SLOT(setPpmValueChanged(
double)));
101 connect(mp_resValueSpinBox,
102 SIGNAL(valueChanged(
double)),
104 SLOT(setResValueChanged(
double)));
155 throw ExceptionNotPossible(
156 "precisionwidget.cpp @ setCurrentIndex(int index) -- ERROR "
157 "programming error.");
222 throw ExceptionNotPossible(
223 "precisionwidget.cpp @ getPrecision()-- ERROR programming error.");
270 throw ExceptionNotPossible(
271 "precisionwidget.cpp @ setPrecision(PrecisionPtr precision)-- ERROR "
272 "programming error.");