arenaview.h
Go to the documentation of this file.
1 #ifndef ARENAVIEW_H
2 #define ARENAVIEW_H
3 
4 #include <QGraphicsView>
5 #include <QDragEnterEvent>
6 #include <QDragMoveEvent>
7 #include <QDragLeaveEvent>
8 #include <QDropEvent>
9 
10 #include "arenacontroller.h"
11 
12 class Arena;
13 class ArenaScene;
14 class ArenaSceneElement;
15 
16 class ArenaView : public QGraphicsView
17 {
18  Q_OBJECT
19 public:
20  ArenaView(ArenaController *controller, QWidget *parent = 0);
21 
22  void drawForeground(QPainter *painter, const QRectF &rect);
23  void drawBackground(QPainter *painter, const QRectF &rect);
24  void mouseMoveEvent(QMouseEvent *event);
25  void mousePressEvent(QMouseEvent *event);
26  void mouseReleaseEvent(QMouseEvent *event);
27  void wheelEvent(QWheelEvent *event);
28 
29  void setArena(Arena *arena) { m_arena = arena; }
30 
31 public slots:
32  void slotZoomIn();
33  void slotZoomOut();
34 
35 private slots:
37 
38 private:
39  void dragEnterEvent(QDragEnterEvent *event);
40  void dragMoveEvent(QDragMoveEvent *event);
41  void dropEvent(QDropEvent *event);
42  void dragLeaveEvent(QDragLeaveEvent *event);
43 
44  void dragStarted();
45  void dragEnded();
46 
48 
50  // Remember if we're currently in rubber band selection mode
55 };
56 
57 #endif // ARENAVIEW_H
bool m_rubberBandActive
Definition: arenaview.h:51
void mouseReleaseEvent(QMouseEvent *event)
Definition: arenaview.cpp:185
void dragEnded()
Definition: arenaview.cpp:236
ArenaController * m_controller
Definition: arenaview.h:54
void dropEvent(QDropEvent *event)
Definition: arenaview.cpp:267
void mouseMoveEvent(QMouseEvent *event)
Definition: arenaview.cpp:134
void slotGridPaintingDisabled()
Definition: arenaview.cpp:31
void wheelEvent(QWheelEvent *event)
Definition: arenaview.cpp:204
Arena * m_arena
Definition: arenaview.h:49
Definition: arena.h:10
ArenaView(ArenaController *controller, QWidget *parent=0)
Definition: arenaview.cpp:15
void drawBackground(QPainter *painter, const QRectF &rect)
Definition: arenaview.cpp:37
void dragStarted()
Definition: arenaview.cpp:229
void slotZoomOut()
Definition: arenaview.cpp:222
QPointF m_lastMousePosScene
Definition: arenaview.h:53
void setArena(Arena *arena)
Definition: arenaview.h:29
void dragLeaveEvent(QDragLeaveEvent *event)
Definition: arenaview.cpp:253
void drawForeground(QPainter *painter, const QRectF &rect)
Definition: arenaview.cpp:97
ArenaScene * arenaScene()
Definition: arenaview.cpp:199
void mousePressEvent(QMouseEvent *event)
Definition: arenaview.cpp:102
void slotZoomIn()
Definition: arenaview.cpp:215
void dragMoveEvent(QDragMoveEvent *event)
Definition: arenaview.cpp:261
void dragEnterEvent(QDragEnterEvent *event)
Definition: arenaview.cpp:243
QPoint m_lastMousePos
Definition: arenaview.h:52


hector_nist_arena_designer
Author(s): Stefan Kohlbrecher , Johannes Simon
autogenerated on Fri Aug 21 2020 10:45:27