BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
JobResultsPresenter.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/JobWidgets/JobResultsPresenter.h
6 //! @brief Defines class JobResultsPresenter
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_JOBWIDGETS_JOBRESULTSPRESENTER_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_JOBWIDGETS_JOBRESULTSPRESENTER_H
17 
20 
21 class InstrumentItem;
22 
23 //! Presents results of job (JobItem) using stack of different widgets and combo box in the
24 //! right top corner of JobView, to switch between widgets.
25 
27  Q_OBJECT
28 
29 public:
30  explicit JobResultsPresenter(QWidget* parent = nullptr);
31 
32  void setPresentation(const QString& presentationType) override;
34 
35 protected:
36  QString itemPresentation() const override;
37  QStringList activePresentationList(SessionItem* item) override;
38  QStringList presentationList(SessionItem* item) override;
39 
40 private:
41  QString defaultPresentationOfInstrument(InstrumentItem* instrumentItem);
42  QStringList defaultActivePresentationsOfInstrument(InstrumentItem* instrumentItem);
43  QString fitPresentationOfInstrument(InstrumentItem* instrumentItem);
44 };
45 
46 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_JOBWIDGETS_JOBRESULTSPRESENTER_H
Defines class ItemComboWidget.
Defines class JobViewFlags.
The ItemComboWidget class combines stack of widgets with QComboBox controller to switch between widge...
Presents results of job (JobItem) using stack of different widgets and combo box in the right top cor...
QStringList activePresentationList(SessionItem *item) override
Returns list of presentation types, available for given item.
void setPresentation(const QString &presentationType) override
Sets stack to show widget corresponding to given presentation.
QStringList presentationList(SessionItem *item) override
Returns full list of presentations available for given item.
QString defaultPresentationOfInstrument(InstrumentItem *instrumentItem)
QString itemPresentation() const override
Presentation which should be shown for current item.
QStringList defaultActivePresentationsOfInstrument(InstrumentItem *instrumentItem)
QString fitPresentationOfInstrument(InstrumentItem *instrumentItem)
JobResultsPresenter(QWidget *parent=nullptr)