BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Single-instrument-adapter to InstrumentsEditorController.
InstrumentsEditorController is not instrument-wise, but handles all instruments. This is sometimes unhandy, e.g. if the changed instrument has to be passed through many hierarchies to only be able to notify correctly. Instantiate this class instead and pass it to editors.
Calling notification methods or change methods also take care of dependent data, like in notifyWavelengthDistributionChanged().
Definition at line 33 of file InstrumentEditController.h.
Public Member Functions | |
InstrumentEditController (InstrumentsEditController *ec, InstrumentItem *instrument) | |
void | notifyInclinationAxisChanged () |
Update dependent data and emit a changed signal. More... | |
void | notifyInstrumentChanged () |
Call this if any instrument value has been changed outside this controller. More... | |
void | notifyWavelengthDistributionChanged () |
Update dependent data and emit a changed signal. More... | |
void | setDouble (DoubleDescriptor &d, double newValue) |
Sets the double and emits InstrumentsEditController::instrumentChanged if the double changed. More... | |
void | setInstrumentName (const QString &name) |
Set the instrument name and emit the respective signal. More... | |
Private Attributes | |
InstrumentsEditController * | m_ec |
InstrumentItem * | m_instrumentItem |
InstrumentEditController::InstrumentEditController | ( | InstrumentsEditController * | ec, |
InstrumentItem * | instrument | ||
) |
Definition at line 21 of file InstrumentEditController.cpp.
void InstrumentEditController::notifyInclinationAxisChanged | ( | ) |
Update dependent data and emit a changed signal.
Definition at line 58 of file InstrumentEditController.cpp.
References InstrumentItem::beamItem(), InstrumentsEditController::instrumentChanged(), m_ec, and m_instrumentItem.
Referenced by SpecularBeamEditor::SpecularBeamEditor().
void InstrumentEditController::notifyInstrumentChanged | ( | ) |
Call this if any instrument value has been changed outside this controller.
emits InstrumentsEditController::instrumentChanged For example if a double has been changed, but setDouble() has not been called
Definition at line 41 of file InstrumentEditController.cpp.
References InstrumentsEditController::instrumentChanged(), m_ec, and m_instrumentItem.
void InstrumentEditController::notifyWavelengthDistributionChanged | ( | ) |
Update dependent data and emit a changed signal.
Definition at line 46 of file InstrumentEditController.cpp.
References InstrumentItem::beamItem(), InstrumentsEditController::instrumentChanged(), m_ec, and m_instrumentItem.
Referenced by SpecularBeamEditor::SpecularBeamEditor().
void InstrumentEditController::setDouble | ( | DoubleDescriptor & | d, |
double | newValue | ||
) |
Sets the double and emits InstrumentsEditController::instrumentChanged if the double changed.
Definition at line 33 of file InstrumentEditController.cpp.
References DoubleDescriptor::get, InstrumentsEditController::instrumentChanged(), m_ec, m_instrumentItem, and DoubleDescriptor::set.
void InstrumentEditController::setInstrumentName | ( | const QString & | name | ) |
Set the instrument name and emit the respective signal.
The signal is emitted by the parent InstrumentsEditController.
Definition at line 28 of file InstrumentEditController.cpp.
References m_ec, m_instrumentItem, GUI::RealSpace::Particles::name(), and InstrumentsEditController::setInstrumentName().
|
private |
Definition at line 61 of file InstrumentEditController.h.
Referenced by notifyInclinationAxisChanged(), notifyInstrumentChanged(), notifyWavelengthDistributionChanged(), setDouble(), and setInstrumentName().
|
private |
Definition at line 60 of file InstrumentEditController.h.
Referenced by notifyInclinationAxisChanged(), notifyInstrumentChanged(), notifyWavelengthDistributionChanged(), setDouble(), and setInstrumentName().