Skip to content

Commit

Permalink
emit keyPressed,keyReleased
Browse files Browse the repository at this point in the history
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 a90bed3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

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

emit keyReleased(e);

} //keyReleaseEvent()


Expand Down
6 changes: 6 additions & 0 deletions src/gui/qgsmapcanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a90bed3

Please sign in to comment.