-
Notifications
You must be signed in to change notification settings - Fork 0
/
glwidget.h
105 lines (85 loc) · 2.54 KB
/
glwidget.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* © Copyright 2013 Peter J Mack
* This file is part of qSwirlyDraw.
* qSwirlyDraw is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* qSwirlyDraw is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with qSwirlyDraw. If not, see <https://www.gnu.org/licenses/>. */
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <QGLWidget>
class GLWidget : public QGLWidget
{
Q_OBJECT
public:
explicit GLWidget(QWidget *parent = 0);
~GLWidget();
QSize minimumSizeHint() const;
///QSize sizeHint() const;
int heightForWidth(int w) const;
void setColour(int r, int g, int b);
signals:
void changedRed(int r);
void changedGreen(int g);
void changedBlue(int b);
void changedRainbowMode(int n);
void changedThird(int n);
void changedOffset(int n);
void changedOuter(int n);
void changedInner(int n);
void changedScale(int n);
void changedRotation(int r);
void changedThirdGearType(int n);
void changedInnerGearType(int n);
void changedOuterGearType(int n);
void changedSlowDraw(bool t);
void changedScreansaver(bool t);
void changedGearSelectEnabled(bool t);
void changedDrawingEnabled(bool t);
void changedProgress(int p);
void changedProgressFormat(QString format);
public slots:
void setRed(int r);
void setGreen(int g);
void setBlue(int b);
void setRainbowMode(int n);
void setThird(int n);
void setOffset(int n);
void setOuter(int n);
void setInner(int n);
void setScale(int n);
void setRotation(int r);
void drawGraph();
void clearGraph();
void slowDraw(bool t);
void setThirdGearType(int n);
void setInnerGearType(int n);
void setOuterGearType(int n);
void colourize(void);
void help(void);
void randomColour(void);
void randomGearing(void);
void RESET(void);
void screansaver(bool t);
void saveFile(void);
void exportFile(void);
void loadFile(void);
void stamp(void);
void beat();
protected:
void initializeGL();
void paintGL();
void resizeGL(int width, int height);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
private:
int ticks;
bool slowDrawOn;
bool demoOn;
};
#endif // GLWIDGET_H