From: <ai...@us...> - 2009-05-06 15:43:58
|
Revision: 9933 http://plplot.svn.sourceforge.net/plplot/?rev=9933&view=rev Author: airwin Date: 2009-05-06 15:43:56 +0000 (Wed, 06 May 2009) Log Message: ----------- Add <return> to the existing right mouse click method of moving to the next page and eventually exiting. Modified Paths: -------------- trunk/drivers/qt.cpp trunk/drivers/qt.h Modified: trunk/drivers/qt.cpp =================================================================== --- trunk/drivers/qt.cpp 2009-05-06 11:18:25 UTC (rev 9932) +++ trunk/drivers/qt.cpp 2009-05-06 15:43:56 UTC (rev 9933) @@ -1335,6 +1335,14 @@ } } +void QtPLWidget::keyPressEvent(QKeyEvent* event) +{ + if(event->key()==Qt::Key_Enter || event->key()==Qt::Key_Return) + { + handler.DeviceChangedPage(this); + } +} + void QtPLWidget::closeEvent(QCloseEvent* event) { handler.DeviceClosed(this); Modified: trunk/drivers/qt.h =================================================================== --- trunk/drivers/qt.h 2009-05-06 11:18:25 UTC (rev 9932) +++ trunk/drivers/qt.h 2009-05-06 15:43:56 UTC (rev 9933) @@ -298,6 +298,7 @@ protected slots: void mouseReleaseEvent ( QMouseEvent * event ); + void keyPressEvent(QKeyEvent* event); void closeEvent(QCloseEvent* event); void nextPage(); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |