summaryrefslogtreecommitdiff
path: root/noncore/graphics
authoralwin <alwin>2004-11-02 00:30:38 (UTC)
committer alwin <alwin>2004-11-02 00:30:38 (UTC)
commit51b7bdf260bc2b5b066c6594a6d0c507add682fd (patch) (unidiff)
tree991e7658e5abc440343e03b83eb4f867ae6adbaf /noncore/graphics
parent2dc92f4bfe9e81edc2b0b24ecacf3bc44b344984 (diff)
downloadopie-51b7bdf260bc2b5b066c6594a6d0c507add682fd.zip
opie-51b7bdf260bc2b5b066c6594a6d0c507add682fd.tar.gz
opie-51b7bdf260bc2b5b066c6594a6d0c507add682fd.tar.bz2
ok. now we have real working, simple solution how to act with switching fullscreen
when imagewindow is hidden. It is realy impressive what a brain can generate brainf* ideas finding such a solution - I should stop programming on holidays.
Diffstat (limited to 'noncore/graphics') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp3
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp24
2 files changed, 12 insertions, 15 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index be58c72..ebdfc60 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -35,12 +35,13 @@ void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, Q
35 m_gPrevNext = nextprevGroup; 35 m_gPrevNext = nextprevGroup;
36 m_hGroup = hGroup; 36 m_hGroup = hGroup;
37} 37}
38 38
39ImageView::~ImageView() 39ImageView::~ImageView()
40{ 40{
41 odebug << "Destructor imageview" << oendl;
41 delete m_viewManager; 42 delete m_viewManager;
42} 43}
43 44
44Opie::Core::OKeyConfigManager* ImageView::manager() 45Opie::Core::OKeyConfigManager* ImageView::manager()
45{ 46{
46 if (!m_viewManager) { 47 if (!m_viewManager) {
@@ -74,17 +75,19 @@ void ImageView::stopSlide()
74 75
75void ImageView::nextSlide() 76void ImageView::nextSlide()
76{ 77{
77 if (!m_slideTimer) { 78 if (!m_slideTimer) {
78 return; 79 return;
79 } 80 }
81#if 0
80 if (isHidden()) { 82 if (isHidden()) {
81 delete m_slideTimer; 83 delete m_slideTimer;
82 m_slideTimer = 0; 84 m_slideTimer = 0;
83 return; 85 return;
84 } 86 }
87#endif
85 emit dispNext(); 88 emit dispNext();
86 m_slideTimer->start(m_slideValue*1000,true); 89 m_slideTimer->start(m_slideValue*1000,true);
87} 90}
88void ImageView::initKeys() 91void ImageView::initKeys()
89{ 92{
90 odebug << "init imageview keys" << oendl; 93 odebug << "init imageview keys" << oendl;
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 5eb065f..6660eb2 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -211,22 +211,16 @@ void PMainWindow::slotConfig() {
211 readConfig(); 211 readConfig();
212 } 212 }
213 delete keyWid; 213 delete keyWid;
214 214
215 m_stack->raiseWidget(w); 215 m_stack->raiseWidget(w);
216 if (remdisp) { 216 if (remdisp) {
217 m_disp->disconnect(this, SLOT(slotReturn())); 217 m_disp->hide();
218 m_disp->setDestructiveClose();
219 m_stack->removeWidget(m_disp);
220 m_disp = 0;
221 } 218 }
222 if (reminfo) { 219 if (reminfo) {
223 m_info->disconnect(this, SLOT(slotReturn())); 220 m_info->hide();
224 m_info->setDestructiveClose();
225 m_stack->removeWidget(m_info);
226 m_info = 0;
227 } 221 }
228} 222}
229 223
230/* 224/*
231 * create a new image info component 225 * create a new image info component
232 * and detach the current one 226 * and detach the current one
@@ -285,20 +279,15 @@ void PMainWindow::slotToggleFullScreen()
285void PMainWindow::slotFullScreenButton(bool current) 279void PMainWindow::slotFullScreenButton(bool current)
286{ 280{
287 if (autoSave) { 281 if (autoSave) {
288 m_cfg->writeEntry("fullscreen",current); 282 m_cfg->writeEntry("fullscreen",current);
289 } 283 }
290 if (!m_disp) return; 284 if (!m_disp) return;
291 285 if (m_disp->isVisible()) {
292 if (m_disp->isHidden()) { 286 setupViewWindow(current, true);
293 /* it must get some setups for switch we can just do if the window is visible.
294 so we must delete the imageview window and re-create it when displaying new
295 image */
296 return;
297 } 287 }
298 setupViewWindow(current, true);
299} 288}
300 289
301void PMainWindow::setupViewWindow(bool current, bool forceDisplay) 290void PMainWindow::setupViewWindow(bool current, bool forceDisplay)
302{ 291{
303 if (!m_disp) return; 292 if (!m_disp) return;
304 if (current) { 293 if (current) {
@@ -366,13 +355,15 @@ void PMainWindow::slotShowInfo( const QString& inf ) {
366 fsButton->hide(); 355 fsButton->hide();
367 } 356 }
368 m_stack->raiseWidget( ImageInfo ); 357 m_stack->raiseWidget( ImageInfo );
369} 358}
370 359
371void PMainWindow::slotDisplay( const QString& inf ) { 360void PMainWindow::slotDisplay( const QString& inf ) {
361 bool nwindow = false;
372 if ( !m_disp ) { 362 if ( !m_disp ) {
363 nwindow = true;
373 initDisp(); 364 initDisp();
374 } 365 }
375 m_disp->setImage( inf ); 366 m_disp->setImage( inf );
376 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { 367 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
377 if (m_gPrevNext->isEnabled()==false) { 368 if (m_gPrevNext->isEnabled()==false) {
378 m_gPrevNext->addTo(toolBar); 369 m_gPrevNext->addTo(toolBar);
@@ -382,12 +373,15 @@ void PMainWindow::slotDisplay( const QString& inf ) {
382 m_aShowInfo->setEnabled(true); 373 m_aShowInfo->setEnabled(true);
383 m_aViewfile->setEnabled(false); 374 m_aViewfile->setEnabled(false);
384 m_aStartSlide->setEnabled(false); 375 m_aStartSlide->setEnabled(false);
385 fsButton->hide(); 376 fsButton->hide();
386 } 377 }
387 } 378 }
379 if (!nwindow && m_disp->fullScreen()!=m_aFullScreen->isOn()) {
380 slotFullScreenToggled(m_aFullScreen->isOn());
381 }
388 if (m_disp->fullScreen()) { 382 if (m_disp->fullScreen()) {
389 qwsDisplay()->requestFocus( m_disp->winId(), TRUE); 383 qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
390 } else { 384 } else {
391 m_stack->raiseWidget( ImageDisplay ); 385 m_stack->raiseWidget( ImageDisplay );
392 } 386 }
393} 387}