BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
InstrumentView.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Instrument/InstrumentView.h
6 //! @brief Defines class InstrumentView
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_INSTRUMENTVIEW_H
16 #define BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTVIEW_H
17 
18 #include <QWidget>
19 
20 class InstrumentItem;
21 class InstrumentListView;
22 class ProjectDocument;
23 class QScrollArea;
24 class QLabel;
25 class QLineEdit;
26 
27 class InstrumentView : public QWidget {
28  Q_OBJECT
29 
30 public:
31  InstrumentView(QWidget* parent, ProjectDocument* document);
32 
33 protected:
34  void showEvent(QShowEvent*) override;
35  void hideEvent(QHideEvent*) override;
36 
37 private:
39  void onInstrumentNameEdited(const QString& newName);
40  void onInstrumentdescriptionEdited(const QString& t);
42  void onInstrumentChangedFromExternal(const InstrumentItem* instrument);
44 
45 private:
48  QScrollArea* m_scrollArea;
49 };
50 
51 #endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTVIEW_H
Abstract base class for instrument-specific item classes.
Instrument selector on the left side of InstrumentView.
void onInstrumentdescriptionEdited(const QString &t)
void onInstrumentNameEdited(const QString &newName)
void hideEvent(QHideEvent *) override
void createWidgetsForCurrentInstrument()
QScrollArea * m_scrollArea
void onInstrumentChangedByEditor()
InstrumentListView * m_instrumentListView
InstrumentView(QWidget *parent, ProjectDocument *document)
ProjectDocument * m_document
void onInstrumentChangedFromExternal(const InstrumentItem *instrument)
void updateSingleInstrumentMode()
void showEvent(QShowEvent *) override
Project document class handles all data related to the opened project (sample, job,...