BornAgain  1.19.79
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/View/Job/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_VIEW_JOB_JOBRESULTSPRESENTER_H
16 #define BORNAGAIN_GUI_VIEW_JOB_JOBRESULTSPRESENTER_H
17 
19 
20 class InstrumentItem;
21 class JobItem;
22 enum class JobViewActivity;
23 
24 //! Presents results of job (JobItem) using stack of different widgets and combo box in the
25 //! right top corner of JobView, to switch between widgets.
26 
28  Q_OBJECT
29 
30 public:
31  explicit JobResultsPresenter(QWidget* parent = nullptr);
32 
33  void setItem(SessionItem* item) override;
34  void setPresentation(const QString& presentationType) override;
35 
36 public slots:
37  void setPresentation(JobViewActivity activity);
38 
39 protected:
40  QString itemPresentation() const override;
41  QStringList activePresentationList(SessionItem* item) override;
42  QStringList presentationList(SessionItem* item) override;
43 
44 private:
45  QString defaultPresentationOfInstrument(InstrumentItem* instrumentItem);
46  QStringList defaultActivePresentationsOfInstrument(InstrumentItem* instrumentItem);
47  QString fitPresentationOfInstrument(InstrumentItem* instrumentItem);
48 };
49 
50 #endif // BORNAGAIN_GUI_VIEW_JOB_JOBRESULTSPRESENTER_H
Defines class ItemComboWidget.
JobViewActivity
Abstract base class for instrument-specific item classes.
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. JobItem with fitting abilities is valid...
void setItem(SessionItem *item) override
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)
Base class for a GUI data item.
Definition: SessionItem.h:204