Skip to content
Permalink
Browse files
emit keyPressed,keyReleased
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5438 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed May 11, 2006
1 parent aa87d5c commit 53fd05850a73c6bac7a68dc9d1851585e78405cb
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 53fd058

Please sign in to comment.