25 #include <QFileDialog>
28 #include <QVBoxLayout>
31 const QString select_instrument_tooltip =
32 "Select Instrument to simulate from those defined in Instrument View";
33 const QString select_sample_tooltip =
"Select Sample to simulate from those defined in Sample View";
34 const QString select_realdata_tooltip =
"Select real data to use during the fitting. \n"
35 "If None is selected, the standard simulation will be run.";
40 , m_instrumentCombo(new QComboBox)
41 , m_sampleCombo(new QComboBox)
42 , m_realDataCombo(new QComboBox)
43 , m_applicationModels(0)
45 QVBoxLayout* mainLayout =
new QVBoxLayout;
46 mainLayout->setMargin(0);
47 mainLayout->setSpacing(0);
50 QGroupBox* groupBox =
new QGroupBox(
"Data selection");
52 QLabel* instrumentSelectionLabel =
new QLabel(
"Instrument:");
53 instrumentSelectionLabel->setToolTip(select_instrument_tooltip);
56 m_instrumentCombo->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
58 QLabel* sampleSelectionLabel =
new QLabel(
"Sample:");
59 sampleSelectionLabel->setToolTip(select_sample_tooltip);
62 QLabel* readDataSelectionLabel =
new QLabel(
"Real Data:");
63 readDataSelectionLabel->setToolTip(select_realdata_tooltip);
67 QGridLayout* dataSelectionLayout =
new QGridLayout;
68 dataSelectionLayout->setMargin(12);
70 dataSelectionLayout->addWidget(instrumentSelectionLabel, 0, 0);
72 dataSelectionLayout->addWidget(sampleSelectionLabel, 1, 0);
74 dataSelectionLayout->addWidget(readDataSelectionLabel, 2, 0);
76 groupBox->setLayout(dataSelectionLayout);
78 mainLayout->addWidget(groupBox);
79 setLayout(mainLayout);
155 QString previousItem = comboBox->currentText();
158 if (itemList.isEmpty()) {
159 comboBox->setEnabled(
false);
160 comboBox->addItem(
"Not yet defined");
162 comboBox->setEnabled(
true);
165 itemList.insert(-1,
"None");
166 comboBox->addItems(itemList);
167 if (itemList.contains(previousItem))
168 comboBox->setCurrentIndex(itemList.indexOf(previousItem));
Defines class holding all application models.
#define ASSERT(condition)
Defines InstrumentItems classes.
Defines class InstrumentModel.
Defines ModelUtils namespace.
Defines class MultiLayerItem.
Defines class RealDataItem.
Defines class RealDataModel.
Defines class SampleModel.
SampleModel * sampleModel()
RealDataModel * realDataModel()
InstrumentModel * instrumentModel()
The RealDataItem class represents intensity data imported from file and intended for fitting.
QVector< RealDataItem * > realDataItems() const
QVector< T * > topItems() const
QStringList topItemNames(SessionModel *model, const QString &modelType="")
Returns list of top iten manes.