Skip to content
Permalink
Browse files
Added QgsMapTool::keyReleaseEvent()
Added missing binding for QgsMapTool::keyPressEvent()
 ... will ever people add the bindings for newly added functions? :-/



git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10118 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Feb 6, 2009
1 parent de00895 commit 6feda5ff4a22a3000409a8a1920d6aa695f30cb9
Showing with 21 additions and 0 deletions.
  1. +8 −0 python/gui/qgsmaptool.sip
  2. +5 −0 src/gui/qgsmapcanvas.cpp
  3. +4 −0 src/gui/qgsmaptool.cpp
  4. +4 −0 src/gui/qgsmaptool.h
@@ -41,7 +41,15 @@ class QgsMapTool : QObject

//! Mouse release event for overriding
virtual void canvasReleaseEvent(QMouseEvent * e);

//! Key press for overriding
//! (binding) added in version 1.1
virtual void keyPressEvent(QKeyEvent * e);

//! Key press for overriding
//! Added in version 1.1
virtual void keyReleaseEvent(QKeyEvent * e);

//! Called when rendering has finished
virtual void renderComplete();

@@ -732,6 +732,11 @@ void QgsMapCanvas::keyReleaseEvent( QKeyEvent * e )

default:
// Pass it on
if ( mMapTool )
{
mMapTool->keyReleaseEvent( e );
}

e->ignore();

QgsDebugMsg( "Ignoring key release: " + QString::number( e->key() ) );
@@ -132,6 +132,10 @@ void QgsMapTool::keyPressEvent( QKeyEvent* e )
{
}

void QgsMapTool::keyReleaseEvent( QKeyEvent* e )
{
}

void QgsMapTool::renderComplete()
{
}
@@ -59,6 +59,10 @@ class GUI_EXPORT QgsMapTool : public QObject
//! Key event for overriding. Default implementation does nothing.
virtual void keyPressEvent( QKeyEvent* e );

//! Key event for overriding. Default implementation does nothing.
//! Added in version 1.1
virtual void keyReleaseEvent( QKeyEvent* e );

//! Called when rendering has finished. Default implementation does nothing.
virtual void renderComplete();

0 comments on commit 6feda5f

Please sign in to comment.