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 | 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 | |||
@@ -270,27 +270,53 @@ void PMainWindow::initInfo() { | |||
270 | initT<imageinfo>( "Image Info", &m_info, ImageInfo ); | 270 | initT<imageinfo>( "Image Info", &m_info, ImageInfo ); |
271 | connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&))); | 271 | connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&))); |
272 | } | 272 | } |
273 | void PMainWindow::initDisp() { | 273 | void PMainWindow::initDisp() { |
274 | initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); | 274 | initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); |
275 | if (m_disp) { | 275 | if (m_disp) { |
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 | |||
290 | void 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 |
291 | * init* already supports it but I make no use of it for | 317 | * init* already supports it but I make no use of it for |
292 | * now. We set filename and raise | 318 | * now. We set filename and raise |
293 | * | 319 | * |
294 | * ### FIXME and talk to alwin | 320 | * ### FIXME and talk to alwin |
295 | */ | 321 | */ |
296 | void PMainWindow::slotShowInfo( const QString& inf ) { | 322 | void PMainWindow::slotShowInfo( const QString& inf ) { |