Skip to content

Commit c223b01

Browse files
author
wonder
committed
PyQGIS: missing QgsMapTool bindings
git-svn-id: http://svn.osgeo.org/qgis/trunk@9706 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4e35930 commit c223b01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/gui/qgsmaptool.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ class QgsMapTool : QObject
7070
//! called when map tool is being deactivated
7171
virtual void deactivate();
7272

73+
//! returns pointer to the tool's map canvas
74+
QgsMapCanvas* canvas();
75+
7376
protected:
7477

7578
//! constructor takes map canvas as a parameter
@@ -84,6 +87,9 @@ class QgsMapTool : QObject
8487
//! trnasformation from map coordinates to layer's coordinates
8588
QgsPoint toLayerCoordinates(QgsMapLayer* layer, const QgsPoint& point);
8689

90+
//!transformation from layer's coordinates to map coordinates (which is different in case reprojection is used)
91+
QgsPoint toMapCoordinates( QgsMapLayer* layer, const QgsPoint& point );
92+
8793
//! trnasformation of the rect from map coordinates to layer's coordinates
8894
QgsRectangle toLayerCoordinates(QgsMapLayer* layer, const QgsRectangle& rect);
8995

0 commit comments

Comments
 (0)