Skip to content
Permalink
Browse files
emit keyPressed,keyReleased
git-svn-id: http://svn.osgeo.org/qgis/trunk@5438 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed May 11, 2006
1 parent 65fc91a commit a90bed31bb28b2178672ecb6c473a5f42c21622f
Showing with 11 additions and 0 deletions.
  1. +5 −0 src/gui/qgsmapcanvas.cpp
  2. +6 −0 src/gui/qgsmapcanvas.h
@@ -530,6 +530,8 @@ void QgsMapCanvas::keyPressEvent(QKeyEvent * e)
qDebug("keyPress event at line %d in %s", __LINE__, __FILE__);
#endif

emit keyPressed(e);

if (mCanvasProperties->mouseButtonDown || mCanvasProperties->panSelectorDown)
return;

@@ -641,6 +643,9 @@ void QgsMapCanvas::keyReleaseEvent(QKeyEvent * e)
qDebug("Ignoring key release (%d)", e->key());
#endif
}

emit keyReleased(e);

} //keyReleaseEvent()


@@ -250,6 +250,12 @@ class QgsMapCanvas : public Q3CanvasView

//! Emitted when a new set of layers has been received
void layersChanged();

//! Emit key press event
void keyPressed(QKeyEvent * e);

//! Emit key release event
void keyReleased(QKeyEvent * e);

protected:
/// implementation struct

0 comments on commit a90bed3

Please sign in to comment.