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) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp26
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