BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The SimulationDataSelectorWidget class represents widget to select instrument, sample and real data. More...
Public Member Functions | |
SimulationDataSelectorWidget (QWidget *parent=0) | |
const InstrumentItem * | selectedInstrumentItem () const |
Returns selected InstrumentItem taking into account that there might be several instruments with same name. More... | |
const MultiLayerItem * | selectedMultiLayerItem () const |
Returns selected MultiLayerItem taking into account that there might be several multilayers with same name. More... | |
const RealDataItem * | selectedRealDataItem () const |
Returns selected real data item taking into account that there might be several items with same name. More... | |
void | setApplicationModels (ApplicationModels *applicationModels) |
void | updateViewElements () |
Private Member Functions | |
int | selectedInstrumentIndex () const |
int | selectedRealDataIndex () const |
int | selectedSampleIndex () const |
void | updateSelection (QComboBox *comboBox, QStringList itemList, bool allow_none=false) |
Updates selection combo with string list while preserving previous selection. More... | |
Private Attributes | |
ApplicationModels * | m_applicationModels |
QComboBox * | m_instrumentCombo |
QComboBox * | m_realDataCombo |
QComboBox * | m_sampleCombo |
The SimulationDataSelectorWidget class represents widget to select instrument, sample and real data.
Located at the top of SimulationView.
Definition at line 29 of file SimulationDataSelectorWidget.h.
SimulationDataSelectorWidget::SimulationDataSelectorWidget | ( | QWidget * | parent = 0 | ) |
Definition at line 38 of file SimulationDataSelectorWidget.cpp.
References m_instrumentCombo, m_realDataCombo, and m_sampleCombo.
|
private |
Definition at line 133 of file SimulationDataSelectorWidget.cpp.
References m_instrumentCombo.
Referenced by selectedInstrumentItem().
const InstrumentItem * SimulationDataSelectorWidget::selectedInstrumentItem | ( | ) | const |
Returns selected InstrumentItem taking into account that there might be several instruments with same name.
Definition at line 102 of file SimulationDataSelectorWidget.cpp.
References ApplicationModels::instrumentModel(), m_applicationModels, selectedInstrumentIndex(), and SessionModel::topItems().
Referenced by SimulationSetupWidget::onExportToPythonScript(), and SimulationSetupWidget::onRunSimulation().
const MultiLayerItem * SimulationDataSelectorWidget::selectedMultiLayerItem | ( | ) | const |
Returns selected MultiLayerItem taking into account that there might be several multilayers with same name.
Definition at line 91 of file SimulationDataSelectorWidget.cpp.
References m_applicationModels, ApplicationModels::sampleModel(), selectedSampleIndex(), and SessionModel::topItems().
Referenced by SimulationSetupWidget::onExportToPythonScript(), and SimulationSetupWidget::onRunSimulation().
|
private |
Definition at line 143 of file SimulationDataSelectorWidget.cpp.
References m_realDataCombo.
Referenced by selectedRealDataItem().
const RealDataItem * SimulationDataSelectorWidget::selectedRealDataItem | ( | ) | const |
Returns selected real data item taking into account that there might be several items with same name.
Definition at line 111 of file SimulationDataSelectorWidget.cpp.
References m_applicationModels, RealDataModel::realDataItems(), ApplicationModels::realDataModel(), and selectedRealDataIndex().
Referenced by SimulationSetupWidget::onRunSimulation().
|
private |
Definition at line 138 of file SimulationDataSelectorWidget.cpp.
References m_sampleCombo.
Referenced by selectedMultiLayerItem().
void SimulationDataSelectorWidget::setApplicationModels | ( | ApplicationModels * | applicationModels | ) |
Definition at line 82 of file SimulationDataSelectorWidget.cpp.
References m_applicationModels, and updateViewElements().
Referenced by SimulationSetupWidget::setApplicationModels().
|
private |
Updates selection combo with string list while preserving previous selection.
If allow_none == true, additional "None" item will be added to the combo.
Definition at line 152 of file SimulationDataSelectorWidget.cpp.
Referenced by updateViewElements().
void SimulationDataSelectorWidget::updateViewElements | ( | ) |
Definition at line 122 of file SimulationDataSelectorWidget.cpp.
References ASSERT, ApplicationModels::instrumentModel(), m_applicationModels, m_instrumentCombo, m_realDataCombo, m_sampleCombo, ApplicationModels::realDataModel(), ApplicationModels::sampleModel(), ModelUtils::topItemNames(), and updateSelection().
Referenced by setApplicationModels(), and SimulationSetupWidget::updateViewElements().
|
private |
Definition at line 52 of file SimulationDataSelectorWidget.h.
Referenced by selectedInstrumentItem(), selectedMultiLayerItem(), selectedRealDataItem(), setApplicationModels(), and updateViewElements().
|
private |
Definition at line 49 of file SimulationDataSelectorWidget.h.
Referenced by SimulationDataSelectorWidget(), selectedInstrumentIndex(), and updateViewElements().
|
private |
Definition at line 51 of file SimulationDataSelectorWidget.h.
Referenced by SimulationDataSelectorWidget(), selectedRealDataIndex(), and updateViewElements().
|
private |
Definition at line 50 of file SimulationDataSelectorWidget.h.
Referenced by SimulationDataSelectorWidget(), selectedSampleIndex(), and updateViewElements().