author | alwin <alwin> | 2004-04-16 20:35:35 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-16 20:35:35 (UTC) |
commit | 217d387def6d97f912352899fd83908b28d75dfc (patch) (side-by-side diff) | |
tree | 14135801a52bbbfca4395a4cbf4b7fdffdeb45ad /noncore/graphics/opie-eye/gui/mainwindow.cpp | |
parent | cc56768485c3785439883dd1c456493f7ece2d84 (diff) | |
download | opie-217d387def6d97f912352899fd83908b28d75dfc.zip opie-217d387def6d97f912352899fd83908b28d75dfc.tar.gz opie-217d387def6d97f912352899fd83908b28d75dfc.tar.bz2 |
Implemented fullscreen mode (f-key)
Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 4852bf6..9b929a1 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -276,15 +276,41 @@ void PMainWindow::initDisp() { if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { m_disp->setMinimumSize(QApplication::desktop()->size()/2); } m_disp->setAutoScale(autoScale); m_disp->setAutoRotate(autoRotate); m_disp->setShowZoomer(zoomerOn); + m_disp->setBackgroundColor(white); connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext())); connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev())); + connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen())); + } +} + +void PMainWindow::slotToggleFullScreen() +{ + odebug << "Toggle full " << oendl; + if (!m_disp) return; + bool current = !m_disp->fullScreen(); + m_disp->setFullScreen(current); + odebug << "Current = " << current << oendl; + if (current) { + odebug << "full" << oendl; + m_disp->setBackgroundColor(black); + m_disp->reparent(0,QPoint(0,0)); + m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); + m_disp->showFullScreen(); + } else { + odebug << "window" << oendl; + m_disp->setBackgroundColor(white); + m_stack->addWidget(m_disp,ImageDisplay); + m_stack->raiseWidget(m_disp); + if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { + m_disp->resize(m_disp->minimumSize()); + } } } /** * With big Screen the plan could be to 'detach' the image * window if visible and to create a ne wone |