Showing with 11 additions and 0 deletions.
  1. +3 −0 python/gui/qgsmaptool.sip
  2. +5 −0 src/gui/qgsmaptool.cpp
  3. +3 −0 src/gui/qgsmaptool.h
3 changes: 3 additions & 0 deletions python/gui/qgsmaptool.sip
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ class QgsMapTool : QObject
/** Return associated button with map tool or NULL if no button is associated */
QAbstractButton* button();

/** Set a user defined cursor */
virtual void setCursor(QCursor cursor);

/** Check whether this MapTool performs a zoom or pan operation.
* If it does, we will be able to perform the zoom and then
* resume operations with the original / previously used tool.*/
Expand Down
5 changes: 5 additions & 0 deletions src/gui/qgsmaptool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ QAbstractButton* QgsMapTool::button()
return mButton;
}

void QgsMapTool::setCursor(QCursor cursor)
{
mCursor = cursor;
}


void QgsMapTool::canvasMoveEvent( QMouseEvent *e )
{
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsmaptool.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ class GUI_EXPORT QgsMapTool : public QObject
/** Return associated button with map tool or NULL if no button is associated */
QAbstractButton* button();

/** Set a user defined cursor */
virtual void setCursor(QCursor cursor);

/** Check whether this MapTool performs a zoom or pan operation.
* If it does, we will be able to perform the zoom and then
* resume operations with the original / previously used tool.*/
Expand Down