author | alwin <alwin> | 2004-04-16 13:31:38 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-16 13:31:38 (UTC) |
commit | b3e021e78a34be7abc4002a6b913dce9fcc28cd8 (patch) (side-by-side diff) | |
tree | 414c86d75dd7caa56f67761bbe3147fb8f102a58 /noncore/graphics/opie-eye/gui/mainwindow.cpp | |
parent | b6b2536be83b8793b96b0cbed62b1d9d5479efdf (diff) | |
download | opie-b3e021e78a34be7abc4002a6b913dce9fcc28cd8.zip opie-b3e021e78a34be7abc4002a6b913dce9fcc28cd8.tar.gz opie-b3e021e78a34be7abc4002a6b913dce9fcc28cd8.tar.bz2 |
layout of iconview can switched
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.cpp | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 5ba4c8e..4852bf6 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -102,27 +102,26 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) 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) { rotateButton->setOn(true); autoRotate = true; + prevButton->hide(); + nextButton->hide(); } else { rotateButton->setOn(false); autoRotate = false; } connect(rotateButton,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool))); @@ -296,30 +295,34 @@ 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(); + if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { + 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(); + if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { + prevButton->show(); + nextButton->show(); + upButton->hide(); + fsButton->hide(); + viewModeButton->hide(); + } m_stack->raiseWidget( ImageDisplay ); } void PMainWindow::slotReturn() { raiseIconView(); } @@ -338,17 +341,19 @@ 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(); + if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { + 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); |