|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The RealDataPropertiesWidget class holds instrument selector to link with RealDataItem. More...
Public Slots | |
| void | onInstrumentComboIndexChanged (int index) |
| Processes user interaction with instrument selector combo. More... | |
| void | onRealDataPropertyChanged () |
| Updates instrument combo if instrument link of current RealDataItem changed. More... | |
| void | updateInstrumentComboEntries () |
| Updates instrument selector for new instruments and their names. More... | |
Public Member Functions | |
| RealDataPropertiesWidget (QWidget *parent=0) | |
| QSize | minimumSizeHint () const |
| void | setItem (RealDataItem *item) |
| Set current RealDataItem to display in instrument selector. More... | |
| QSize | sizeHint () const |
Private Member Functions | |
| void | setComboToIdentifier (const QString &instrumentId) |
| Sets instrument combo selector to the state corresponding to given instrument identifier. More... | |
| void | setPropertiesEnabled (bool enabled) |
| Sets all widget's children enabled/disabled. More... | |
Private Attributes | |
| RealDataItem * | m_currentDataItem |
| QComboBox * | m_instrumentCombo |
The RealDataPropertiesWidget class holds instrument selector to link with RealDataItem.
Part of RealDataSelectorWidget, resides at lower left corner of ImportDataView.
Definition at line 27 of file RealDataPropertiesWidget.h.
|
explicit |
Definition at line 26 of file RealDataPropertiesWidget.cpp.
References MainWindow::instance(), InstrumentModel::instrumentAddedOrRemoved(), InstrumentModel::instrumentNameChanged(), m_instrumentCombo, onInstrumentComboIndexChanged(), setPropertiesEnabled(), and updateInstrumentComboEntries().
|
inline |
Definition at line 33 of file RealDataPropertiesWidget.h.
|
slot |
Processes user interaction with instrument selector combo.
If there is realDataItem, it will be linked with selected instrument.
Definition at line 88 of file RealDataPropertiesWidget.cpp.
References MainWindow::instance(), RealDataItem::instrumentId(), m_currentDataItem, m_instrumentCombo, setComboToIdentifier(), RealDataItem::setInstrumentId(), and RealDataItem::updateToInstrument().
Referenced by RealDataPropertiesWidget().
|
slot |
Updates instrument combo if instrument link of current RealDataItem changed.
Definition at line 133 of file RealDataPropertiesWidget.cpp.
References RealDataItem::instrumentId(), m_currentDataItem, m_instrumentCombo, and setComboToIdentifier().
Referenced by setItem().
|
private |
Sets instrument combo selector to the state corresponding to given instrument identifier.
Definition at line 151 of file RealDataPropertiesWidget.cpp.
References ASSERT, and m_instrumentCombo.
Referenced by onInstrumentComboIndexChanged(), onRealDataPropertyChanged(), and setItem().
| void RealDataPropertiesWidget::setItem | ( | RealDataItem * | item | ) |
Set current RealDataItem to display in instrument selector.
Definition at line 60 of file RealDataPropertiesWidget.cpp.
References RealDataItem::instrumentId(), m_currentDataItem, SessionItem::mapper(), onRealDataPropertyChanged(), setComboToIdentifier(), ModelMapper::setOnItemDestroy(), ModelMapper::setOnPropertyChange(), setPropertiesEnabled(), and ModelMapper::unsubscribe().
Referenced by RealDataSelectorWidget::onSelectionChanged().
|
private |
Sets all widget's children enabled/disabled.
Definition at line 162 of file RealDataPropertiesWidget.cpp.
References m_instrumentCombo.
Referenced by RealDataPropertiesWidget(), and setItem().
|
inline |
Definition at line 32 of file RealDataPropertiesWidget.h.
|
slot |
Updates instrument selector for new instruments and their names.
Current selection will be preserved.
Definition at line 110 of file RealDataPropertiesWidget.cpp.
References MainWindow::instance(), RealDataItem::instrumentId(), m_currentDataItem, and m_instrumentCombo.
Referenced by RealDataPropertiesWidget().
|
private |
Definition at line 47 of file RealDataPropertiesWidget.h.
Referenced by onInstrumentComboIndexChanged(), onRealDataPropertyChanged(), setItem(), and updateInstrumentComboEntries().
|
private |
Definition at line 46 of file RealDataPropertiesWidget.h.
Referenced by RealDataPropertiesWidget(), onInstrumentComboIndexChanged(), onRealDataPropertyChanged(), setComboToIdentifier(), setPropertiesEnabled(), and updateInstrumentComboEntries().