BornAgain  1.19.0
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/coregui/Views/ImportDataWidgets/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_COREGUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPROPERTIESWIDGET_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPROPERTIESWIDGET_H
17 
18 #include <QWidget>
19 
20 class RealDataItem;
21 class QComboBox;
22 class QLabel;
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  explicit RealDataPropertiesWidget(QWidget* parent = 0);
31 
32  QSize sizeHint() const { return QSize(64, 135); }
33  QSize minimumSizeHint() const { return QSize(64, 128); }
34 
35  void setItem(RealDataItem* item);
36 
37 public slots:
38  void onInstrumentComboIndexChanged(int index);
41 
42 private:
43  void setComboToIdentifier(const QString& instrumentId);
44  void setPropertiesEnabled(bool enabled);
45 
46  QComboBox* m_instrumentCombo;
48 };
49 
50 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPROPERTIESWIDGET_H
The RealDataItem class represents intensity data imported from file and intended for fitting.
Definition: RealDataItem.h:35
The RealDataPropertiesWidget class holds instrument selector to link with RealDataItem.
void updateInstrumentComboEntries()
Updates instrument selector for new instruments and their names.
void setComboToIdentifier(const QString &instrumentId)
Sets instrument combo selector to the state corresponding to given instrument identifier.
void onRealDataPropertyChanged()
Updates instrument combo if instrument link of current RealDataItem changed.
void setPropertiesEnabled(bool enabled)
Sets all widget's children enabled/disabled.
void setItem(RealDataItem *item)
Set current RealDataItem to display in instrument selector.
RealDataPropertiesWidget(QWidget *parent=0)
void onInstrumentComboIndexChanged(int index)
Processes user interaction with instrument selector combo.