blob: 452d302eb3c2e509041aa953fdebb66130e36147 (
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
49
|
#ifndef MAPWINDOW_H
#define MAPWINDOW_H
#include <QGLWidget>
#include <QMapboxGL>
#include <QPropertyAnimation>
class QKeyEvent;
class QMouseEvent;
class QWheelEvent;
class MapWindow : public QGLWidget
{
Q_OBJECT
public:
MapWindow(const QMapboxGLSettings &);
void selfTest();
protected slots:
void animationValueChanged();
void animationFinished();
private:
void changeStyle();
// QGLWidget implementation.
void keyPressEvent(QKeyEvent *ev) final;
void mousePressEvent(QMouseEvent *ev) final;
void mouseMoveEvent(QMouseEvent *ev) final;
void wheelEvent(QWheelEvent *ev) final;
void initializeGL() final;
void resizeGL(int w, int h) final;
void paintGL() final;
QPointF m_lastPos;
QMapboxGL m_map;
QPropertyAnimation m_bearingAnimation;
QPropertyAnimation m_zoomAnimation;
unsigned m_animationTicks = 0;
unsigned m_frameDraws = 0;
};
#endif
|