16 #include "ui_QREDataLoaderProperties.h"
21 : m_allowFactors(false)
23 m_ui =
new Ui::QREDataLoaderProperties;
28 connect(
m_ui->headerPrefixEdit, &QLineEdit::textChanged, [=]() { emit propertiesChanged(); });
29 connect(
m_ui->linesToSkipEdit, &QLineEdit::textChanged, [=]() { emit propertiesChanged(); });
30 connect(
m_ui->separatorCombo, &QComboBox::currentTextChanged,
31 [=]() { emit propertiesChanged(); });
33 connect(
m_ui->enableErrorCheckBox, &QCheckBox::stateChanged,
this,
36 connect(
m_ui->qUnitCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
37 [=]() { emit propertiesChanged(); });
39 for (
int dataType = 0; dataType < 3; dataType++) {
43 connect(
columnSpinBox(dataType), QOverload<int>::of(&QSpinBox::valueChanged), [=]() {
49 connect(
factorSpinBox(dataType), QOverload<double>::of(&QDoubleSpinBox::valueChanged),
61 for (
int dataType = 0; dataType < 3; dataType++) {
72 return spinBox->isVisible() ? spinBox->value() : 1.0;
77 const int lineInLayout = 2;
79 for (
int col = 2; col <
m_ui->gridLayout->columnCount(); col++) {
80 auto*
const layoutItem =
m_ui->gridLayout->itemAtPosition(lineInLayout, col);
82 QWidget* w = layoutItem->widget();
93 const bool isEnabled =
m_ui->enableErrorCheckBox->isChecked();
102 const int lineInLayout = dataType;
103 return dynamic_cast<QSpinBox*
>(
109 const int lineInLayout = dataType;
110 return dynamic_cast<QDoubleSpinBox*
>(
116 const int lineInLayout = dataType;
117 return dynamic_cast<QLabel*
>(
Defines class AutomaticMultiColumnDataLoader1DProperties.
QLabel * factorLabel(int dataType) const
QREDataLoaderProperties()
void onErrorEnablingChanged()
static const int factorColumn
void updateErrorEnabling(bool enabled) const
static const int columnColumn
double factor(int dataType) const
void allowFactors(bool b)
Factors shall not be supported. However, since the requirements have been there, they are only deacti...
QSpinBox * columnSpinBox(int dataType) const
QDoubleSpinBox * factorSpinBox(int dataType) const
Ui::QREDataLoaderProperties * m_ui
static const int factorLabelColumn