blob: 5e34b91320756d137d801da40f231f6acf94d2fb (
plain)
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
46
47
48
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef VIEW_H
#define VIEW_H
#include <QFrame>
QT_FORWARD_DECLARE_CLASS(QGraphicsView)
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 = nullptr);
QGraphicsView *view() const;
private slots:
void resetView();
void setResetButtonEnabled();
void setupMatrix();
void toggleOpenGL();
void toggleAntialiasing();
void print();
void zoomIn();
void zoomOut();
void rotateLeft();
void rotateRight();
void timerEvent(QTimerEvent *);
private:
QGraphicsView *graphicsView;
QLabel *label;
QToolButton *openGlButton;
QToolButton *antialiasButton;
QToolButton *printButton;
QToolButton *resetButton;
QSlider *zoomSlider;
QSlider *rotateSlider;
};
#endif
|