-
Notifications
You must be signed in to change notification settings - Fork 2
/
view.hpp
45 lines (36 loc) · 842 Bytes
/
view.hpp
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
45
#ifndef VIEW_HPP
#define VIEW_HPP
#include <QGraphicsView>
#include <QFrame>
#include "zoomgraphicsview.hpp"
QT_FORWARD_DECLARE_CLASS(QLabel)
QT_FORWARD_DECLARE_CLASS(QSlider)
QT_FORWARD_DECLARE_CLASS(QToolButton)
class View : public QFrame {
Q_OBJECT
public:
View(const QString &name, QWidget *parent = 0);
ZoomGraphicsView *view() const;
QSlider *zoomSlider;
QSlider *rotateSlider;
private slots:
void resetView();
void setResetButtonEnabled();
void setupMatrix();
void toggleOpenGL();
void toggleAntialiasing();
void print();
void zoomIn();
void zoomOut();
void rotateLeft();
void rotateRight();
void zoomChanged(qreal);
private:
ZoomGraphicsView *graphicsView;
QLabel *label;
QToolButton *openGlButton;
QToolButton *antialiasButton;
QToolButton *printButton;
QToolButton *resetButton;
};
#endif // VIEW_HPP