BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InstrumentEditorWidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/InstrumentWidgets/InstrumentEditorWidget.h
6 //! @brief Defines class InstrumentEditorWidget
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_COREGUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTEDITORWIDGET_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTEDITORWIDGET_H
17 
18 #include <QWidget>
19 
20 class SessionItem;
21 class DetectorItem;
22 class QLineEdit;
24 
25 //! Main widget of InstrumentView. Contains InstrumentPresenter
26 //! showing proper insturment editor for given instrument type.
27 
28 class InstrumentEditorWidget : public QWidget {
29  Q_OBJECT
30 
31 public:
32  InstrumentEditorWidget(QWidget* parent = nullptr);
33 
34  QSize sizeHint() const;
35 
36  void setItem(SessionItem* instrument);
37 
38 signals:
40 
41 public slots:
42  void onChangedEditor(const QString&);
43 
44 private:
45  QLayout* createTopLayout();
46  void updateWidgets();
47 
48  QLineEdit* m_nameLineEdit;
52 };
53 
54 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTEDITORWIDGET_H
Main widget of InstrumentView.
void onChangedEditor(const QString &)
void setItem(SessionItem *instrument)
InstrumentPresenter * m_instrumentPresenter
InstrumentEditorWidget(QWidget *parent=nullptr)
QLayout * createTopLayout()
top block with instrument name
void extendedDetectorEditorRequest(DetectorItem *)
Contains stack of instrument editors and the logic to show proper editor for certain type of instrume...