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

Legacy1dDialog has all buttons

parent 86bead00
No related branches found
No related tags found
1 merge request!1649Generic legacy 1D tables can again be read, now using new modal format dialog (#601)
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
// ************************************************************************************************ // ************************************************************************************************
#include "GUI/View/Import/Legacy1dDialog.h" #include "GUI/View/Import/Legacy1dDialog.h"
#include "Device/IO/ImportSettings.h"
#include <QCheckBox> #include <QCheckBox>
#include <QComboBox> #include <QComboBox>
#include <QFormLayout> #include <QFormLayout>
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include <QPushButton>
#include <QSpinBox> #include <QSpinBox>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QtGui> #include <QtGui>
...@@ -27,8 +29,8 @@ ...@@ -27,8 +29,8 @@
Legacy1dDialog::Legacy1dDialog() Legacy1dDialog::Legacy1dDialog()
: m_allowFactors(false) : m_allowFactors(false)
{ {
setGeometry(0, 0, 486, 241); setWindowTitle("Define legacy input format");
setWindowTitle("Form"); setWindowFlags(Qt::Dialog);
auto vbox = new QVBoxLayout; auto vbox = new QVBoxLayout;
setLayout(vbox); setLayout(vbox);
...@@ -75,6 +77,18 @@ Legacy1dDialog::Legacy1dDialog() ...@@ -75,6 +77,18 @@ Legacy1dDialog::Legacy1dDialog()
m_qUnitCombo->addItem("1/nm"); m_qUnitCombo->addItem("1/nm");
m_qUnitCombo->addItem("1/Å"); m_qUnitCombo->addItem("1/Å");
auto buttonline = new QHBoxLayout;
vbox->addLayout(buttonline);
auto cancelButton = new QPushButton("Cancel");
buttonline->addWidget(cancelButton);
connect(cancelButton, &QPushButton::clicked, this, &Legacy1dDialog::reject);
auto okButton = new QPushButton("Save");
buttonline->addWidget(okButton);
okButton->setDefault(true);
connect(okButton, &QPushButton::clicked, this, &Legacy1dDialog::accept);
allowFactors(false); allowFactors(false);
connect(m_headerPrefixEdit, &QLineEdit::textChanged, [this]() { emit propertiesChanged(); }); connect(m_headerPrefixEdit, &QLineEdit::textChanged, [this]() { emit propertiesChanged(); });
......
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