mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-31 00:03:42 -04:00
Because 3D coordinates should be the default. References https://github.com/qgis/qgis3.0_api/issues/36
42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
/***************************************************************************
|
|
qgsmaptoolemitpoint.cpp - map tool that emits a signal on click
|
|
---------------------
|
|
begin : June 2007
|
|
copyright : (C) 2007 by Martin Dobias
|
|
email : wonder.sk at gmail dot com
|
|
***************************************************************************
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
|
|
#include "qgsmaptoolemitpoint.h"
|
|
#include "qgsmapcanvas.h"
|
|
#include <QMouseEvent>
|
|
|
|
|
|
QgsMapToolEmitPoint::QgsMapToolEmitPoint( QgsMapCanvas *canvas )
|
|
: QgsMapTool( canvas )
|
|
{
|
|
}
|
|
|
|
void QgsMapToolEmitPoint::canvasMoveEvent( QgsMapMouseEvent *e )
|
|
{
|
|
Q_UNUSED( e );
|
|
}
|
|
|
|
void QgsMapToolEmitPoint::canvasPressEvent( QgsMapMouseEvent *e )
|
|
{
|
|
QgsPointXY pnt = toMapCoordinates( e->pos() );
|
|
emit canvasClicked( pnt, e->button() );
|
|
}
|
|
|
|
void QgsMapToolEmitPoint::canvasReleaseEvent( QgsMapMouseEvent *e )
|
|
{
|
|
Q_UNUSED( e );
|
|
}
|