38 lines
572 B
C++
38 lines
572 B
C++
|
#include <QtCore/QString>
|
|||
|
|
|||
|
#include <maptoolzoomout.h>
|
|||
|
#include <maptoolzoomout.h>
|
|||
|
#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
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|