BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
RealDataPropertiesWidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Import/RealDataPropertiesWidget.h
6 //! @brief Defines class RealDataPropertiesWidget
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_IMPORT_REALDATAPROPERTIESWIDGET_H
16 #define BORNAGAIN_GUI_VIEW_IMPORT_REALDATAPROPERTIESWIDGET_H
17 
18 #include <QWidget>
19 
20 class RealDataItem;
21 class QComboBox;
22 class ProjectDocument;
23 
24 //! The RealDataPropertiesWidget class holds instrument selector to link with RealDataItem.
25 //! Part of RealDataSelectorWidget, resides at lower left corner of ImportDataView.
26 
27 class RealDataPropertiesWidget : public QWidget {
28  Q_OBJECT
29 public:
30  RealDataPropertiesWidget(QWidget* parent, ProjectDocument* document);
31 
32  QSize sizeHint() const override { return QSize(64, 135); }
33  QSize minimumSizeHint() const override { return QSize(64, 128); }
34 
35  //! Set current RealDataItem to display in instrument selector.
36  void setItem(RealDataItem* item);
37 
38 private:
39  //! Processes user interaction with instrument selector combo. If there is realDataItem,
40  //! it will be linked with selected instrument.
41  void onInstrumentComboIndexChanged(int index);
42 
45 
46  QComboBox* m_instrumentCombo;
49 };
50 
51 #endif // BORNAGAIN_GUI_VIEW_IMPORT_REALDATAPROPERTIESWIDGET_H
Project document class handles all data related to the opened project (sample, job,...
Provides access to experimental data, for display and fitting. Owns an AbstractDataLoader.
Definition: RealDataItem.h:33
The RealDataPropertiesWidget class holds instrument selector to link with RealDataItem....
void updateInstrumentComboEntries()
Updates instrument selector for new instruments and their names. Current selection will be preserved.
QSize minimumSizeHint() const override
void updateInstrumentComboIndex()
Sets instrument combo selector to the state corresponding to given instrument identifier.
void setItem(RealDataItem *item)
Set current RealDataItem to display in instrument selector.
QSize sizeHint() const override
void onInstrumentComboIndexChanged(int index)
Processes user interaction with instrument selector combo. If there is realDataItem,...
RealDataPropertiesWidget(QWidget *parent, ProjectDocument *document)