summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp43
1 files changed, 35 insertions, 8 deletions
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
@@ -61,22 +61,22 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
this, SLOT(slotDisplay(const QString&)));
connect(m_view, SIGNAL(sig_showInfo(const QString&)),
this, SLOT(slotShowInfo(const QString&)) );
m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce);
- QToolButton *btn = new QToolButton( bar );
- btn->setIconSet( Resource::loadIconSet( "up" ) );
- connect( btn, SIGNAL(clicked()),
+ upButton = new QToolButton( bar );
+ upButton->setIconSet( Resource::loadIconSet( "up" ) );
+ connect( upButton, SIGNAL(clicked()),
m_view, SLOT(slotDirUp()) );
- btn = new PFileSystem( bar );
- connect( btn, SIGNAL( changeDir( const QString& ) ),
+ fsButton = new PFileSystem( bar );
+ connect( fsButton, SIGNAL( changeDir( const QString& ) ),
m_view, SLOT(slotChangeDir( const QString& ) ) );
- btn = new QToolButton( bar );
+ QToolButton*btn = new QToolButton( bar );
btn->setIconSet( Resource::loadIconSet( "edit" ) );
connect( btn, SIGNAL(clicked()),
m_view, SLOT(slotRename()) );
if ( Ir::supported() ) {
btn = new QToolButton( bar );
@@ -88,21 +88,33 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
btn = new QToolButton( bar );
btn->setIconSet( Resource::loadIconSet( "trash" ) );
connect( btn, SIGNAL(clicked() ),
m_view, SLOT(slotTrash() ) );
- btn = new ViewModeButton( bar );
- connect( btn, SIGNAL(changeMode(int)),
+ viewModeButton = new ViewModeButton( bar );
+ connect( viewModeButton, SIGNAL(changeMode(int)),
m_view, SLOT(slotChangeMode(int)));
btn = new QToolButton( bar );
btn->setIconSet( Resource::loadIconSet( "SettingsIcon" ) );
connect( btn, SIGNAL(clicked() ),
this, SLOT(slotConfig() ) );
+
+
+ prevButton = new QToolButton(bar);
+ prevButton->setIconSet( Resource::loadIconSet( "back" ) );
+ connect(prevButton,SIGNAL(clicked()),m_view,SLOT(slotShowPrev()));
+ prevButton->hide();
+
+ nextButton = new QToolButton(bar);
+ nextButton->setIconSet( Resource::loadIconSet( "forward" ) );
+ connect(nextButton,SIGNAL(clicked()),m_view,SLOT(slotShowNext()));
+ nextButton->hide();
+
rotateButton = new QToolButton(bar);
rotateButton->setIconSet( Resource::loadIconSet( "rotate" ) );
rotateButton->setToggleButton(true);
odebug << "Mode = " << m_stack->mode() << oendl;
if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
@@ -281,20 +293,30 @@ void PMainWindow::initDisp() {
*/
void PMainWindow::slotShowInfo( const QString& inf ) {
if ( !m_info ) {
initInfo();
}
m_info->setPath( inf );
+ prevButton->hide();
+ nextButton->hide();
+ upButton->hide();
+ fsButton->hide();
+ viewModeButton->hide();
m_stack->raiseWidget( ImageInfo );
}
void PMainWindow::slotDisplay( const QString& inf ) {
if ( !m_disp ) {
initDisp();
}
m_disp->setImage( inf );
+ prevButton->show();
+ nextButton->show();
+ upButton->hide();
+ fsButton->hide();
+ viewModeButton->hide();
m_stack->raiseWidget( ImageDisplay );
}
void PMainWindow::slotReturn() {
raiseIconView();
}
@@ -313,12 +335,17 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) {
}
ev->accept();
QTimer::singleShot(0, qApp, SLOT(closeAllWindows()));
}
void PMainWindow::raiseIconView() {
+ prevButton->hide();
+ nextButton->hide();
+ upButton->show();
+ fsButton->show();
+ viewModeButton->show();
m_stack->raiseWidget( IconView );
}
void PMainWindow::setDocument( const QString& showImg ) {
QString file = showImg;
DocLnk lnk(showImg);