BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
JobListWidget.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/JobListWidget.h
6 //! @brief Defines class JobListWidget
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_JOBLISTWIDGET_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_JOBWIDGETS_JOBLISTWIDGET_H
17 
18 #include <QModelIndexList>
19 #include <QWidget>
20 
21 class JobModel;
23 class QItemSelectionModel;
24 class ItemSelectorWidget;
25 class QModelIndex;
26 class JobItem;
27 class SessionItem;
28 
29 //! The JobListWidget class contains list view to select job items.
30 
31 class JobListWidget : public QWidget {
32  Q_OBJECT
33 public:
34  explicit JobListWidget(QWidget* parent = nullptr);
35 
36  void setModel(JobModel* model);
37 
38  QItemSelectionModel* selectionModel();
39 
40  const JobItem* currentJobItem() const;
41 
42  QSize sizeHint() const;
43  QSize minimumSizeHint() const;
44 
45 signals:
46  void contextMenuRequest(const QPoint& point, const QModelIndex& index);
48 
49 public slots:
50  void makeJobItemSelected(JobItem* jobItem);
51 
52 private slots:
54 
55 private:
59 };
60 
61 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_JOBWIDGETS_JOBLISTWIDGET_H
The ItemSelectorWidget class holds QListView to show top level items of SessionModel.
ViewDelegate to show progress bar JobQueuListView.
The JobListWidget class contains list view to select job items.
Definition: JobListWidget.h:31
JobListViewDelegate * m_listViewDelegate
Definition: JobListWidget.h:56
void setModel(JobModel *model)
ItemSelectorWidget * m_listView
Definition: JobListWidget.h:57
QItemSelectionModel * selectionModel()
void selectionChanged(JobItem *)
QSize minimumSizeHint() const
void makeJobItemSelected(JobItem *jobItem)
void contextMenuRequest(const QPoint &point, const QModelIndex &index)
void onItemSelectionChanged(SessionItem *item)
Recieves SeesionItem from ItemSelectorWidget and emits it further as JobItem.
JobListWidget(QWidget *parent=nullptr)
const JobItem * currentJobItem() const
Returns currently selected JobItem.
QSize sizeHint() const
JobModel * m_jobModel
Definition: JobListWidget.h:58