BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
InstrumentEditController.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Instrument/InstrumentEditController.h
6 //! @brief Defines class InstrumentEditController
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTEDITCONTROLLER_H
16 #define BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTEDITCONTROLLER_H
17 
18 #include <QObject>
19 
20 class InstrumentItem;
21 class RealDataItem;
23 class DoubleDescriptor;
24 
25 //! Single-instrument-adapter to InstrumentsEditorController
26 //!
27 //! InstrumentsEditorController is not instrument-wise, but handles all instruments. This is
28 //! sometimes unhandy, e.g. if the changed instrument has to be passed through many hierarchies to
29 //! only be able to notify correctly. Instantiate this class instead and pass it to editors.
30 //!
31 //! Calling notification methods or change methods also take care of dependent data, like in
32 //! notifyWavelengthDistributionChanged().
33 class InstrumentEditController : public QObject {
34  Q_OBJECT
35 
36 public:
38 
39  //! Set the instrument name and emit the respective signal.
40  //!
41  //! The signal is emitted by the parent InstrumentsEditController.
42  void setInstrumentName(const QString& name);
43 
44  //! Sets the double and emits InstrumentsEditController::instrumentChanged if the double changed
45  void setDouble(DoubleDescriptor& d, double newValue);
46 
47  //! Call this if any instrument value has been changed outside this controller.
48  //!
49  //! emits InstrumentsEditController::instrumentChanged
50  //! For example if a double has been changed, but setDouble() has not been called
52 
53  //! Update dependent data and emit a changed signal
55 
56  //! Update dependent data and emit a changed signal
58 
59 private:
62 };
63 
64 #endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTEDITCONTROLLER_H
Describes properties of a double value which are necessary to allow GUI representation,...
Single-instrument-adapter to InstrumentsEditorController.
void notifyWavelengthDistributionChanged()
Update dependent data and emit a changed signal.
InstrumentEditController(InstrumentsEditController *ec, InstrumentItem *instrument)
void setDouble(DoubleDescriptor &d, double newValue)
Sets the double and emits InstrumentsEditController::instrumentChanged if the double changed.
InstrumentsEditController * m_ec
void notifyInclinationAxisChanged()
Update dependent data and emit a changed signal.
void setInstrumentName(const QString &name)
Set the instrument name and emit the respective signal.
void notifyInstrumentChanged()
Call this if any instrument value has been changed outside this controller.
Abstract base class for instrument-specific item classes.
Class to modify the instruments list or a single instrument and provide the necessary signaling withi...
Provides access to experimental data, for display and fitting. Owns an AbstractDataLoader.
Definition: RealDataItem.h:33
QString const & name(EShape k)
Definition: particles.cpp:20