added support for meta-data editing improved element selection changed zooming fixed some issues with layer events fixed issue with 3D outline fixed loading issue for old maps some interface changes
38 lines
609 B
C++
38 lines
609 B
C++
#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.75);
|
|
} else {
|
|
s.setScale(s.getScale() / 0.75);
|
|
}
|
|
|
|
if (s.getScale() > 1000) {s.setScale(1000);}
|
|
if (s.getScale() < 5) {s.setScale(5);}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
#endif // TOOLMAPZOOM_H
|