summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.cpp
Unidiff
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() {
276 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 276 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
277 m_disp->setMinimumSize(QApplication::desktop()->size()/2); 277 m_disp->setMinimumSize(QApplication::desktop()->size()/2);
278 } 278 }
279 m_disp->setAutoScale(autoScale); 279 m_disp->setAutoScale(autoScale);
280 m_disp->setAutoRotate(autoRotate); 280 m_disp->setAutoRotate(autoRotate);
281 m_disp->setShowZoomer(zoomerOn); 281 m_disp->setShowZoomer(zoomerOn);
282 m_disp->setBackgroundColor(white);
282 connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); 283 connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&)));
283 connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext())); 284 connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext()));
284 connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev())); 285 connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev()));
286 connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen()));
287 }
288}
289
290void PMainWindow::slotToggleFullScreen()
291{
292 odebug << "Toggle full " << oendl;
293 if (!m_disp) return;
294 bool current = !m_disp->fullScreen();
295 m_disp->setFullScreen(current);
296 odebug << "Current = " << current << oendl;
297 if (current) {
298 odebug << "full" << oendl;
299 m_disp->setBackgroundColor(black);
300 m_disp->reparent(0,QPoint(0,0));
301 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height());
302 m_disp->showFullScreen();
303 } else {
304 odebug << "window" << oendl;
305 m_disp->setBackgroundColor(white);
306 m_stack->addWidget(m_disp,ImageDisplay);
307 m_stack->raiseWidget(m_disp);
308 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
309 m_disp->resize(m_disp->minimumSize());
310 }
285 } 311 }
286} 312}
287 313
288/** 314/**
289 * With big Screen the plan could be to 'detach' the image 315 * With big Screen the plan could be to 'detach' the image
290 * window if visible and to create a ne wone 316 * window if visible and to create a ne wone