RasterProcessTool/RasterMainWidgetGUI/RasterMainWidget/maptoolselect.cpp

38 lines
599 B
C++
Raw Permalink Normal View History

2025-02-07 09:16:22 +00:00
#include <QString>
#include <maptoolselect.h>
2025-02-07 09:16:22 +00:00
#pragma execution_character_set("utf-8")
namespace LAMPMainWidget
{
void
MapToolSelect::execute(QMouseEvent *event) {
if(!(event->button() & Qt::LeftButton)){
return;
}
if(event->type() == QEvent::MouseButtonPress){
auto pos = mMapCanvas->pixel2Lonlat(event->pos());
mMapCanvas->clicked(pos);
}
}
void
MapToolSelect::setup() {
mMapCanvas->setCursor(Qt::PointingHandCursor);
}
void
MapToolSelect::deSetup() {
mMapCanvas->setCursor(Qt::ArrowCursor);
}
QString
MapToolSelect::id() {
return QString{"select_tool"};
}
}