BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
DesignerView.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/SampleDesigner/DesignerView.h
6 //! @brief Defines class DesignerView
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_SAMPLEDESIGNER_DESIGNERVIEW_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_SAMPLEDESIGNER_DESIGNERVIEW_H
17 
18 #include <QGraphicsView>
19 
20 class QGraphicsView;
21 class QGraphicsScene;
22 class QDragEnterEvent;
23 class QWheelEvent;
24 class QKeyEvent;
25 
26 //! The DesignerView class provides widget for displaying the contents of DesignerScene
27 //!
28 //! Belongs to SampleDesigner
29 //! Currently contains logic for zooming, deleting objects
30 class DesignerView : public QGraphicsView {
31  Q_OBJECT
32 
33 public:
34  explicit DesignerView(QGraphicsScene* scene, QWidget* parent = 0);
35  virtual ~DesignerView() {}
36 
38  int getSelectionMode() const;
39 
40 signals:
42 
43 public slots:
44  void onSelectionMode(int);
45  void onCenterView();
46  void onChangeScale(double);
47  void deleteSelectedItems();
48 
49 protected:
50  // void wheelEvent(QWheelEvent *event);
51  // void scaleView(qreal scaleFactor);
52  void keyPressEvent(QKeyEvent* event);
53  void keyReleaseEvent(QKeyEvent* event);
54 };
55 
56 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_SAMPLEDESIGNER_DESIGNERVIEW_H
The DesignerView class provides widget for displaying the contents of DesignerScene.
Definition: DesignerView.h:30
void deleteSelectedItems()
void onChangeScale(double)
void onSelectionMode(int)
void selectionModeChanged(int)
void onCenterView()
DesignerView(QGraphicsScene *scene, QWidget *parent=0)
void keyPressEvent(QKeyEvent *event)
void keyReleaseEvent(QKeyEvent *event)
int getSelectionMode() const
virtual ~DesignerView()
Definition: DesignerView.h:35