summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp11
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp2
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp43
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h4
4 files changed, 45 insertions, 15 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index f6e1816..7231bfb 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -279,7 +279,6 @@ QString PIconView::nextFileName(bool &isDir)const
279 return QString::null; 279 return QString::null;
280 IconViewItem* it = static_cast<IconViewItem*>( _it ); 280 IconViewItem* it = static_cast<IconViewItem*>( _it );
281 isDir = it->isDir(); 281 isDir = it->isDir();
282 m_view->setCurrentItem(_it);
283 return it->path(); 282 return it->path();
284} 283}
285 284
@@ -293,7 +292,6 @@ QString PIconView::prevFileName(bool &isDir)const{
293 return QString::null; 292 return QString::null;
294 IconViewItem* it = static_cast<IconViewItem*>( _it ); 293 IconViewItem* it = static_cast<IconViewItem*>( _it );
295 isDir = it->isDir(); 294 isDir = it->isDir();
296 m_view->setCurrentItem(_it);
297 return it->path(); 295 return it->path();
298} 296}
299 297
@@ -479,9 +477,10 @@ void PIconView::slotShowNext()
479{ 477{
480 bool isDir = false; 478 bool isDir = false;
481 QString name = nextFileName(isDir); 479 QString name = nextFileName(isDir);
482 if (isDir) return;
483 if (name.isEmpty()) return; 480 if (name.isEmpty()) return;
484 odebug << "Show next: " << name << oendl; 481 if (isDir) return;
482 /* if we got a name we have a next item */
483 m_view->setCurrentItem(m_view->currentItem()->nextItem());
485 slotShowImage(name); 484 slotShowImage(name);
486} 485}
487 486
@@ -489,8 +488,10 @@ void PIconView::slotShowPrev()
489{ 488{
490 bool isDir = false; 489 bool isDir = false;
491 QString name = prevFileName(isDir); 490 QString name = prevFileName(isDir);
492 if (isDir) return;
493 if (name.isEmpty()) return; 491 if (name.isEmpty()) return;
492 if (isDir) return;
493 /* if we got a name we have a prev item */
494 m_view->setCurrentItem(m_view->currentItem()->prevItem());
494 slotShowImage(name); 495 slotShowImage(name);
495} 496}
496 497
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index aa2b9bc..fbc4494 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -43,6 +43,8 @@ void ImageView::initKeys()
43 lst.append( Opie::Core::OKeyPair::downArrowKey() ); 43 lst.append( Opie::Core::OKeyPair::downArrowKey() );
44 lst.append( Opie::Core::OKeyPair::leftArrowKey() ); 44 lst.append( Opie::Core::OKeyPair::leftArrowKey() );
45 lst.append( Opie::Core::OKeyPair::rightArrowKey() ); 45 lst.append( Opie::Core::OKeyPair::rightArrowKey() );
46 lst.append( Opie::Core::OKeyPair(Qt::Key_N,0));
47 lst.append( Opie::Core::OKeyPair(Qt::Key_P,0));
46 48
47 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", 49 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys",
48 lst, false,this, "image_view_keys" ); 50 lst, false,this, "image_view_keys" );
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 57be247..6f3f255 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -64,16 +64,16 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
64 64
65 m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce); 65 m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce);
66 66
67 QToolButton *btn = new QToolButton( bar ); 67 upButton = new QToolButton( bar );
68 btn->setIconSet( Resource::loadIconSet( "up" ) ); 68 upButton->setIconSet( Resource::loadIconSet( "up" ) );
69 connect( btn, SIGNAL(clicked()), 69 connect( upButton, SIGNAL(clicked()),
70 m_view, SLOT(slotDirUp()) ); 70 m_view, SLOT(slotDirUp()) );
71 71
72 btn = new PFileSystem( bar ); 72 fsButton = new PFileSystem( bar );
73 connect( btn, SIGNAL( changeDir( const QString& ) ), 73 connect( fsButton, SIGNAL( changeDir( const QString& ) ),
74 m_view, SLOT(slotChangeDir( const QString& ) ) ); 74 m_view, SLOT(slotChangeDir( const QString& ) ) );
75 75
76 btn = new QToolButton( bar ); 76 QToolButton*btn = new QToolButton( bar );
77 btn->setIconSet( Resource::loadIconSet( "edit" ) ); 77 btn->setIconSet( Resource::loadIconSet( "edit" ) );
78 connect( btn, SIGNAL(clicked()), 78 connect( btn, SIGNAL(clicked()),
79 m_view, SLOT(slotRename()) ); 79 m_view, SLOT(slotRename()) );
@@ -91,8 +91,8 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
91 m_view, SLOT(slotTrash() ) ); 91 m_view, SLOT(slotTrash() ) );
92 92
93 93
94 btn = new ViewModeButton( bar ); 94 viewModeButton = new ViewModeButton( bar );
95 connect( btn, SIGNAL(changeMode(int)), 95 connect( viewModeButton, SIGNAL(changeMode(int)),
96 m_view, SLOT(slotChangeMode(int))); 96 m_view, SLOT(slotChangeMode(int)));
97 97
98 btn = new QToolButton( bar ); 98 btn = new QToolButton( bar );
@@ -100,6 +100,18 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
100 connect( btn, SIGNAL(clicked() ), 100 connect( btn, SIGNAL(clicked() ),
101 this, SLOT(slotConfig() ) ); 101 this, SLOT(slotConfig() ) );
102 102
103
104
105 prevButton = new QToolButton(bar);
106 prevButton->setIconSet( Resource::loadIconSet( "back" ) );
107 connect(prevButton,SIGNAL(clicked()),m_view,SLOT(slotShowPrev()));
108 prevButton->hide();
109
110 nextButton = new QToolButton(bar);
111 nextButton->setIconSet( Resource::loadIconSet( "forward" ) );
112 connect(nextButton,SIGNAL(clicked()),m_view,SLOT(slotShowNext()));
113 nextButton->hide();
114
103 rotateButton = new QToolButton(bar); 115 rotateButton = new QToolButton(bar);
104 rotateButton->setIconSet( Resource::loadIconSet( "rotate" ) ); 116 rotateButton->setIconSet( Resource::loadIconSet( "rotate" ) );
105 rotateButton->setToggleButton(true); 117 rotateButton->setToggleButton(true);
@@ -284,6 +296,11 @@ void PMainWindow::slotShowInfo( const QString& inf ) {
284 initInfo(); 296 initInfo();
285 } 297 }
286 m_info->setPath( inf ); 298 m_info->setPath( inf );
299 prevButton->hide();
300 nextButton->hide();
301 upButton->hide();
302 fsButton->hide();
303 viewModeButton->hide();
287 m_stack->raiseWidget( ImageInfo ); 304 m_stack->raiseWidget( ImageInfo );
288} 305}
289 306
@@ -292,6 +309,11 @@ void PMainWindow::slotDisplay( const QString& inf ) {
292 initDisp(); 309 initDisp();
293 } 310 }
294 m_disp->setImage( inf ); 311 m_disp->setImage( inf );
312 prevButton->show();
313 nextButton->show();
314 upButton->hide();
315 fsButton->hide();
316 viewModeButton->hide();
295 m_stack->raiseWidget( ImageDisplay ); 317 m_stack->raiseWidget( ImageDisplay );
296} 318}
297 319
@@ -316,6 +338,11 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) {
316} 338}
317 339
318void PMainWindow::raiseIconView() { 340void PMainWindow::raiseIconView() {
341 prevButton->hide();
342 nextButton->hide();
343 upButton->show();
344 fsButton->show();
345 viewModeButton->show();
319 m_stack->raiseWidget( IconView ); 346 m_stack->raiseWidget( IconView );
320} 347}
321 348
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h
index adb5dc2..1967ef7 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.h
+++ b/noncore/graphics/opie-eye/gui/mainwindow.h
@@ -63,8 +63,8 @@ private:
63 bool autoRotate; 63 bool autoRotate;
64 bool autoScale; 64 bool autoScale;
65 bool zoomerOn; 65 bool zoomerOn;
66 QToolButton*rotateButton; 66 QToolButton*rotateButton,*upButton,*fsButton,*viewModeButton;
67 67 QToolButton*nextButton,*prevButton;
68 68
69private slots: 69private slots:
70 void slotConfig(); 70 void slotConfig();