GraphicsView.h
669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef GRAPHICSVIEW_H
#define GRAPHICSVIEW_H
#include "stdafx.h"
//pre-declare
class View;
class GraphicsView
: public QGraphicsView
{
Q_OBJECT
private:
View* view;
protected:
#ifndef QT_NO_WHEELEVENT
void wheelEvent(QWheelEvent *event) override;
#endif
void scaleView(qreal scaleFactor);
public:
GraphicsView(View *v): QGraphicsView(), view(v) {};
};
class View
: public QFrame
{
Q_OBJECT
private:
GraphicsView *graphicsView;
public:
explicit View(const QString& name, QWidget *parent = 0);
QGraphicsView *view() const;
public slots:
/*void zoomIn(int level = 1);
void zoomOut(int level = 1);*/
void setupMatrix();
};
#endif // GRAPHICSVIEW_H