From 3498526e4e41d087a951ab17548a5312f4b10681 Mon Sep 17 00:00:00 2001 From: wonder Date: Mon, 13 Aug 2007 08:41:35 +0000 Subject: [PATCH] Added some files which should have been a part of previous commit (r7133) git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@7134 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/gui/qgsmaptoolemitpoint.cpp | 39 +++++++++++++++++++++ src/gui/qgsmaptoolemitpoint.h | 49 +++++++++++++++++++++++++++ src/plugins/georeferencer/pencil.png | Bin 0 -> 1810 bytes 3 files changed, 88 insertions(+) create mode 100644 src/gui/qgsmaptoolemitpoint.cpp create mode 100644 src/gui/qgsmaptoolemitpoint.h create mode 100644 src/plugins/georeferencer/pencil.png 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 0000000000000000000000000000000000000000..9ce6a8553b31ad4f307564578e972e1923548cde GIT binary patch literal 1810 zcmV+t2krQYP)YERs1pLx!VC;@5~yOon4;LZ{w|UTe#6IV^G=b0`QKuO zKa92LS^)xxg<{LqfEG)MGBEu7hw#r&reZFk-#r2O4;Wr4Ffp8c$;9wO~1`!^h<^N!!Yz#jb7fNV;E)A`^%OEEA zgW=m(Rt9dSZw&S#TnyaIf(-21KN(mJJ}@)HJVPZP2J;OFfcJQG5r1s^yI&v3^JSs z4Avs443Zq$3_n@-G8p_|V7PS*m|)+%hUW%=03zN2LO{zc#ei8182o>srRRSJJ%+yw z>vX(cDm#a~0Y)#-^52XMfB*erP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