#include #include #include #pragma execution_character_set("utf-8") namespace LAMPMainWidget { QString MapToolZoomOut::id() { return QString{"zoomout_tool"}; } void MapToolZoomOut::setup() { /// do nothing } void MapToolZoomOut::execute(QMouseEvent *event) { if(!(event->button() & Qt::LeftButton) || event->type() != QEvent::MouseButtonPress){ return; } int zoom = mMapCanvas->zoomValue(); --zoom; mMapCanvas->setZoomValue(zoom); } void MapToolZoomOut::deSetup() { /// do nothing } }