changed 3D rendering

added pan/zoom gesture
This commit is contained in:
2018-02-04 17:02:14 +01:00
parent 3b62f23c0e
commit 076c0e9157
32 changed files with 446 additions and 484 deletions

View File

@@ -4,6 +4,8 @@
#include "Tool.h"
#include "../MapView2D.h"
#include <QPanGesture>
/**
* this tool allows moving the 2D map
* using the mouse
@@ -48,6 +50,11 @@ public:
return false;
}
virtual bool panTriggered(MapView2D *m, QPanGesture *g) override {
m->getScaler().addOffset(g->delta().x(), g->delta().y());
return true;
}
// virtual void keyPressEvent(MapView2D* m, QKeyEvent* e) override {
// (void) m;
// (void) e;