a whole lotta work!!

- refactoring
- completely changed the tooling (adding elements)
- better re-use for more stable editing
- new elements
- ui adjustments
- LINT for stair-editing
- many more changes
This commit is contained in:
2016-08-29 19:05:46 +02:00
parent 86c76b1284
commit fa06320219
51 changed files with 880 additions and 318 deletions

View File

@@ -0,0 +1,37 @@
#ifndef TOOLMAPZOOM_H
#define TOOLMAPZOOM_H
#include "Tool.h"
#include "../MapView2D.h"
/**
* this tool allows zooming in and out of the map
*/
class ToolMapZoom : public Tool {
public:
const std::string getName() const override {
return "MapZoom";
}
virtual bool wheelEvent(MapView2D* m, QWheelEvent* e) override {
Scaler& s = m->getScaler();
if (e->delta() < 0) {
s.setScale(s.getScale() * 0.5);
} else {
s.setScale(s.getScale() / 0.5);
}
if (s.getScale() > 1000) {s.setScale(1000);}
if (s.getScale() < 5) {s.setScale(5);}
return true;
}
};
#endif // TOOLMAPZOOM_H