Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Added some files which should have been a part of previous commit (r7…
…133) git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@7134 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
wonder
committed
Aug 13, 2007
1 parent
5880887
commit 3498526
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <QObject> | ||
|
||
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 |
BIN
+1.77 KB
src/plugins/georeferencer/pencil.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.