27 #include <boost/property_tree/exceptions.hpp>
28 #include <boost/property_tree/xml_parser.hpp>
30 #include <QDoubleValidator>
31 #include <QFileDialog>
32 #include <QFormLayout>
36 #include <QListWidget>
37 #include <QMessageBox>
38 #include <QPushButton>
39 #include <QRadioButton>
41 #include <QRegExpValidator>
44 #include <QVBoxLayout>
60 StartPage::StartPage(std::shared_ptr<Exploration> &exploration,
const std::shared_ptr<const Exploration> &lastExploration)
61 : m_exploration(exploration), m_last_exploration(lastExploration)
63 setTitle(
"Select load");
64 setSubTitle(
"Please select the way to load an exploration.");
66 QVBoxLayout* layout =
new QVBoxLayout;
68 m_select_new_sweep =
new QRadioButton(
"New sweep based exploration");
69 m_select_new_file =
new QRadioButton(
"New file based exploration");
70 m_select_new_template =
new QRadioButton(
"New template based exploration");
71 m_select_edit =
new QRadioButton(
"Edit previous exploration");
72 m_select_send =
new QRadioButton(
"Re-send previous exploration");
74 layout->addWidget(m_select_new_sweep);
75 layout->addWidget(m_select_new_file);
76 layout->addWidget(m_select_new_template);
77 layout->addWidget(m_select_edit);
78 layout->addWidget(m_select_send);
80 m_select_new_sweep->setChecked(
true);
81 m_select_edit->setEnabled(m_last_exploration !=
nullptr && dynamic_cast<const ParameterExploration*>(m_last_exploration.get()));
82 m_select_send->setEnabled(m_last_exploration !=
nullptr);
89 bool StartPage::validatePage()
91 if (m_select_edit->isChecked() || m_select_send->isChecked()) {
92 assert(!m_select_edit->isChecked() ||
dynamic_cast<const ParameterExploration*
>(m_last_exploration.get()));
93 m_exploration = std::shared_ptr<Exploration>(m_last_exploration->Clone());
99 int StartPage::nextId()
const
101 if (m_select_new_sweep->isChecked())
103 else if (m_select_new_file->isChecked())
105 else if (m_select_new_template->isChecked())
106 return Page_Template_Path;
107 else if (m_select_edit->isChecked())
109 else if (m_select_send->isChecked())
Interface for RangeSweep.
virtual ~StartPage()
Destructor.
Namespace for SimPT parameter explorer package.
Class describing a parameter exploration and its simulation tasks.
Interface for ParameterExploration.
Interface for FileExploration.