diff --git a/src/gui/qgsmaptoolemitpoint.cpp b/src/gui/qgsmaptoolemitpoint.cpp new file mode 100644 index 000000000000..1a0d4ea74f80 --- /dev/null +++ b/src/gui/qgsmaptoolemitpoint.cpp @@ -0,0 +1,39 @@ +/*************************************************************************** + 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. * + * * + ***************************************************************************/ +/* $Id$ */ + + +#include "qgsmaptoolemitpoint.h" +#include "qgsmapcanvas.h" + + +QgsMapToolEmitPoint::QgsMapToolEmitPoint(QgsMapCanvas* canvas) + : QgsMapTool(canvas) +{ +} + +void QgsMapToolEmitPoint::canvasMoveEvent(QMouseEvent * e) +{ +} + +void QgsMapToolEmitPoint::canvasPressEvent(QMouseEvent * e) +{ + QgsPoint pnt = toMapCoords(e->pos()); + emit gotPoint(pnt, e->button()); +} + +void QgsMapToolEmitPoint::canvasReleaseEvent(QMouseEvent * e) +{ +} diff --git a/src/gui/qgsmaptoolemitpoint.h b/src/gui/qgsmaptoolemitpoint.h new file mode 100644 index 000000000000..87d9d8f7d084 --- /dev/null +++ b/src/gui/qgsmaptoolemitpoint.h @@ -0,0 +1,49 @@ +/*************************************************************************** + qgsmaptoolemitpoint.h - 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. * + * * + ***************************************************************************/ +/* $Id$ */ + +#ifndef QGSMAPTOOLEMITPOINT_H +#define QGSMAPTOOLEMITPOINT_H + +#include "qgspoint.h" +#include "qgsmaptool.h" +class QgsMapCanvas; + +#include + +class QgsMapToolEmitPoint : public QObject, public QgsMapTool +{ + Q_OBJECT + + public: + //! constructor + QgsMapToolEmitPoint(QgsMapCanvas* canvas); + + //! Overridden mouse move event + virtual void canvasMoveEvent(QMouseEvent * e); + + //! Overridden mouse press event - emits the signal + virtual void canvasPressEvent(QMouseEvent * e); + + //! Overridden mouse release event + virtual void canvasReleaseEvent(QMouseEvent * e); + + signals: + + //! signal emitted on canvas click + void gotPoint(QgsPoint& point, Qt::MouseButton button); +}; + +#endif diff --git a/src/plugins/georeferencer/pencil.png b/src/plugins/georeferencer/pencil.png new file mode 100644 index 000000000000..9ce6a8553b31 Binary files /dev/null and b/src/plugins/georeferencer/pencil.png differ