Diffstat (limited to 'noncore/graphics/opie-eye/gui/imageview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index db3ae74..aa2b9bc 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp @@ -49,12 +49,37 @@ void ImageView::initKeys() m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", Resource::loadPixmap("1to1"), ViewInfo, Opie::Core::OKeyPair(Qt::Key_I,Qt::ShiftButton), this, SLOT(slotShowImageInfo()))); +#if 0 + m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Next image"), "nextimage", + Resource::loadPixmap("next"), ViewInfo, + Opie::Core::OKeyPair(Qt::Key_N,0), + this, SLOT(slotDispNext()))); +#endif m_viewManager->handleWidget( this ); m_viewManager->load(); } +void ImageView::keyReleaseEvent(QKeyEvent * e) +{ + if (!e || e->state()!=0) { + return; + } + if (e->key()==Qt::Key_N) slotDispNext(); + if (e->key()==Qt::Key_P) slotDispPrev(); +} + +void ImageView::slotDispNext() +{ + emit dispNext(); +} + +void ImageView::slotDispPrev() +{ + emit dispPrev(); +} + void ImageView::slotShowImageInfo() { emit dispImageInfo(m_lastName); } |