summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp34
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.h8
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp18
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h3
4 files changed, 38 insertions, 25 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index ee4b0a1..88a8bc6 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -46,5 +46,3 @@ void ImageView::initKeys()
lst.append( Opie::Core::OKeyPair::rightArrowKey() );
- lst.append( Opie::Core::OKeyPair(Qt::Key_N,0));
- lst.append( Opie::Core::OKeyPair(Qt::Key_P,0));
- lst.append( Opie::Core::OKeyPair(Qt::Key_F,0));
+ lst.append( Opie::Core::OKeyPair(Qt::Key_Escape,0));
@@ -56,2 +54,19 @@ void ImageView::initKeys()
this, SLOT(slotShowImageInfo())));
+
+ m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to next image"), "imageshownext",
+ Resource::loadPixmap("forward"), ShowNext,
+ Opie::Core::OKeyPair(Qt::Key_N,0),
+ this, SIGNAL(dispNext())));
+ m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to previous image"), "imageshowprev",
+ Resource::loadPixmap("back"), ShowPrevious,
+ Opie::Core::OKeyPair(Qt::Key_P,0),
+ this, SIGNAL(dispPrev())));
+ m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle fullscreen"), "imagefullscreen",
+ Resource::loadPixmap("fullscreen"), FullScreen,
+ Opie::Core::OKeyPair(Qt::Key_F,0),
+ this, SIGNAL(toggleFullScreen())));
+ m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle thumbnail"), "imagezoomer",
+ Resource::loadPixmap("mag"), Zoomer,
+ Opie::Core::OKeyPair(Qt::Key_T,0),
+ this, SIGNAL(toggleZoomer())));
m_viewManager->handleWidget( this );
@@ -65,5 +80,2 @@ void ImageView::keyReleaseEvent(QKeyEvent * e)
}
- if (e->key()==Qt::Key_N) slotDispNext();
- if (e->key()==Qt::Key_P) slotDispPrev();
- if (e->key()==Qt::Key_F) emit toggleFullScreen();
if (e->key()==Qt::Key_Escape && fullScreen()) emit hideMe();
@@ -71,12 +83,2 @@ void ImageView::keyReleaseEvent(QKeyEvent * e)
-void ImageView::slotDispNext()
-{
- emit dispNext();
-}
-
-void ImageView::slotDispPrev()
-{
- emit dispPrev();
-}
-
void ImageView::slotShowImageInfo()
diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h
index 75f798c..6bf930f 100644
--- a/noncore/graphics/opie-eye/gui/imageview.h
+++ b/noncore/graphics/opie-eye/gui/imageview.h
@@ -18,3 +18,6 @@ class ImageView:public Opie::MM::OImageScrollView
ViewInfo,
- FullScreen
+ FullScreen,
+ ShowNext,
+ ShowPrevious,
+ Zoomer,
};
@@ -34,2 +37,3 @@ signals:
void hideMe();
+ void toggleZoomer();
@@ -43,4 +47,2 @@ protected slots:
virtual void slotShowImageInfo();
- virtual void slotDispNext();
- virtual void slotDispPrev();
virtual void keyReleaseEvent(QKeyEvent * e);
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index a90231b..0484f73 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -137,7 +137,7 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
- btn = new QToolButton(bar);
- btn->setIconSet( Resource::loadIconSet( "mag" ) );
- btn->setToggleButton(true);
- btn->setOn(true);
- connect(btn,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool)));
+ zoomButton = new QToolButton(bar);
+ zoomButton->setIconSet( Resource::loadIconSet( "mag" ) );
+ zoomButton->setToggleButton(true);
+ zoomButton->setOn(true);
+ connect(zoomButton,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool)));
zoomerOn = true;
@@ -149,2 +149,9 @@ PMainWindow::~PMainWindow() {
+void PMainWindow::slotToggleZoomer()
+{
+ if (!m_disp) return;
+ bool cur = zoomButton->isOn();
+ zoomButton->setOn(!cur);
+}
+
void PMainWindow::slotZoomerToggled(bool how)
@@ -289,2 +296,3 @@ void PMainWindow::initDisp() {
connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView()));
+ connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer()));
}
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h
index d238763..e51a3ff 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.h
+++ b/noncore/graphics/opie-eye/gui/mainwindow.h
@@ -45,2 +45,3 @@ public slots:
void slotZoomerToggled(bool);
+ void slotToggleZoomer();
void setDocument( const QString& );
@@ -67,3 +68,3 @@ private:
QToolButton*rotateButton,*upButton,*fsButton,*viewModeButton;
- QToolButton*nextButton,*prevButton;
+ QToolButton*nextButton,*prevButton,*zoomButton;