summaryrefslogtreecommitdiff
path: root/platform/qt/app/mapwindow.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/qt/app/mapwindow.hpp')
-rw-r--r--platform/qt/app/mapwindow.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/platform/qt/app/mapwindow.hpp b/platform/qt/app/mapwindow.hpp
new file mode 100644
index 0000000000..4bbeac5303
--- /dev/null
+++ b/platform/qt/app/mapwindow.hpp
@@ -0,0 +1,32 @@
+#ifndef MAPWINDOW_H
+#define MAPWINDOW_H
+
+#include <QGLWidget>
+#include <QMapboxGL>
+
+class QKeyEvent;
+class QMouseEvent;
+class QWheelEvent;
+
+class MapWindow : public QGLWidget
+{
+public:
+ MapWindow(const QMapboxGLSettings &);
+
+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 resizeGL(int w, int h) final;
+ void paintGL() final;
+
+ QPointF m_lastPos;
+
+ QMapboxGL m_map;
+};
+
+#endif