BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SessionModelView.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/SessionModelView.h
6 //! @brief Defines class SessionModelView
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_SESSIONMODELVIEW_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_SESSIONMODELVIEW_H
17 
18 #include <QWidget>
19 
20 class MainWindow;
21 class QToolBar;
22 class QTabWidget;
23 class QToolButton;
24 class SessionModel;
25 class ModelTreeView;
27 
28 //! The SessionModelView is a technical view which shows the content all current application
29 //! models. It appears as an additional view in the main navigation bar on the left, right
30 //! after the jobView (if corresponding setting of MainWindow is On).
31 
32 class SessionModelView : public QWidget {
33  Q_OBJECT
34 
35 public:
36  SessionModelView(MainWindow* mainWindow = 0);
37 
38  void setViewActive(bool is_active);
39 
40 private slots:
41  void onExpandCollapseTree();
42 
43 private:
44  void init_tabs();
45  QList<SessionModel*> modelsForTabs();
46  void init_test_view();
47 
49  QToolBar* m_toolBar;
50  QTabWidget* m_tabs;
51  QToolButton* m_expandCollapseButton;
53  QVector<ModelTreeView*> m_content;
54 };
55 
56 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_SESSIONMODELVIEW_H
Equivalent of QTreeView for SessionModel allowing to add visual decorations to the tree.
Definition: ModelTreeView.h:28
The SessionModelDelegate class presents the content of SessionModel items in standard QTreeView.
The SessionModelView is a technical view which shows the content all current application models.
void setViewActive(bool is_active)
SessionModelDelegate * m_delegate
QToolButton * m_expandCollapseButton
QTabWidget * m_tabs
QToolBar * m_toolBar
QList< SessionModel * > modelsForTabs()
Returns list of models to show in tabs.
SessionModelView(MainWindow *mainWindow=0)
QVector< ModelTreeView * > m_content
void init_tabs()
Creates content for tab widget.
MainWindow * m_mainWindow