Skip to content
Snippets Groups Projects
Commit 9404ed82 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

fully reimplemented in simpler layout

parent 6ce3ed8d
No related branches found
No related tags found
1 merge request!1647simplify data import
......@@ -33,30 +33,24 @@ QREDataLoaderProperties::QREDataLoaderProperties()
auto vbox = new QVBoxLayout;
setLayout(vbox);
//... Group box: Ignore lines
auto box_ignore = new QGroupBox("Ignore lines");
vbox->addWidget(box_ignore);
auto form1 = new QFormLayout;
box_ignore->setLayout(form1);
m_headerPrefixEdit = new QLineEdit;
m_headerPrefixEdit->setPlaceholderText("#,//");
form1->addRow("Starting with:", m_headerPrefixEdit);
m_linesToSkipEdit = new QLineEdit;
m_linesToSkipEdit->setPlaceholderText("Example: 1-5, 12");
form1->addRow("Line numbers:", m_linesToSkipEdit);
m_gridLayout = new QGridLayout;
vbox->addLayout(m_gridLayout);
//... Group box: Select data columns
auto box_sel_cols = new QGroupBox("Data columns");
vbox->addWidget(box_sel_cols);
m_enableErrorCheckBox = new QCheckBox;
m_gridLayout->addWidget(m_enableErrorCheckBox, 2, 0);
m_gridLayout->addWidget(new QLabel("Read Q"), 0, 1);
m_gridLayout->addWidget(new QLabel("Read R"), 1, 1);
m_gridLayout->addWidget(new QLabel("Read σR"), 2, 1);
auto vbox2 = new QVBoxLayout;
box_sel_cols->setLayout(vbox2);
for (int i = 0; i < 3; ++i) {
m_gridLayout->addWidget(new QLabel("from column"), i, 2);
auto sb = new QSpinBox;
m_gridLayout->addWidget(sb, i, 3);
sb->setMinimum(1);
}
auto w21 = new QWidget;
vbox2->addWidget(w21);
vbox->addWidget(w21);
auto form211 = new QFormLayout;
w21->setLayout(form211);
......@@ -68,23 +62,16 @@ QREDataLoaderProperties::QREDataLoaderProperties()
m_separatorCombo->addItem(",");
m_separatorCombo->addItem(";");
m_gridLayout = new QGridLayout;
vbox2->addLayout(m_gridLayout);
m_enableErrorCheckBox = new QCheckBox;
m_gridLayout->addWidget(m_enableErrorCheckBox, 2, 0);
m_gridLayout->addWidget(new QLabel("Read Q"), 0, 1);
m_gridLayout->addWidget(new QLabel("Read R"), 1, 1);
m_gridLayout->addWidget(new QLabel("Read σR"), 2, 1);
m_linesToSkipEdit = new QLineEdit;
m_linesToSkipEdit->setPlaceholderText("Example: 1-5, 12");
form211->addRow("Ignore line numbers:", m_linesToSkipEdit);
for (int i = 0; i < 3; ++i) {
m_gridLayout->addWidget(new QLabel("from column"), i, 2);
auto sb = new QSpinBox;
m_gridLayout->addWidget(sb, i, 3);
sb->setMinimum(1);
}
m_headerPrefixEdit = new QLineEdit;
m_headerPrefixEdit->setPlaceholderText("#,//");
form211->addRow("Ignore lines starting with:", m_headerPrefixEdit);
m_qUnitCombo = new QComboBox;
form211->addRow("Q given in units of:", m_qUnitCombo);
m_qUnitCombo->addItem("1/nm");
m_qUnitCombo->addItem("1/Å");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment