Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #681 from 3nids/maptoolcursor
Browse files Browse the repository at this point in the history
set cursor for mapTools
  • Loading branch information
timlinux committed Jun 29, 2013
2 parents 8dc28f2 + f4a4009 commit 4374893
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/gui/qgsmaptool.sip
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
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
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

0 comments on commit 4374893

Please sign in to comment.