BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
sldviewwidget.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/sldeditor/sldviewwidget.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_SLDEDITOR_SLDVIEWWIDGET_H
16 #define BORNAGAIN_GUI2_SLDEDITOR_SLDVIEWWIDGET_H
17 
18 #include "darefl_export.h"
19 #include <QGraphicsView>
20 #include <memory>
21 
22 namespace gui2 {
23 
24 class ApplicationModels;
25 class SLDElementController;
26 
27 //! The segment QGraphicsViewItem on the Graphicsscene
28 class DAREFLCORE_EXPORT SLDViewWidget : public QGraphicsView {
29  Q_OBJECT
30 
31 public:
32  SLDViewWidget(QWidget* parent = nullptr);
34 
35  void setModels(ApplicationModels* models);
36 
37 protected:
38  void resizeEvent(QResizeEvent* event);
39 
40 private:
41  std::unique_ptr<SLDElementController> m_sld_controller;
42 };
43 
44 } // namespace gui2
45 
46 #endif // BORNAGAIN_GUI2_SLDEDITOR_SLDVIEWWIDGET_H
Main class to holds all models of GUI session.
The segment QGraphicsViewItem on the Graphicsscene.
Definition: sldviewwidget.h:28
std::unique_ptr< SLDElementController > m_sld_controller
Definition: sldviewwidget.h:41
~SLDViewWidget()
The destructor.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20