summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp30
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.h16
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp24
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h1
4 files changed, 27 insertions, 44 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index 03f3c1c..b4f3110 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -112,3 +112,2 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e)
112 if (!m) return; 112 if (!m) return;
113 bool old = fullScreen();
114 m->insertItem(tr("Toggle fullscreen"),this, SIGNAL(toggleFullScreen())); 113 m->insertItem(tr("Toggle fullscreen"),this, SIGNAL(toggleFullScreen()));
@@ -131,2 +130,9 @@ void ImageView::setFullScreen(bool how)
131 m_isFullScreen = how; 130 m_isFullScreen = how;
131 if (how) {
132 m_ignore_next_in = true;
133 setFixedSize(qApp->desktop()->size());
134 showFullScreen();
135 } else {
136 setMinimumSize(10,10);
137 }
132} 138}
@@ -142,6 +148,12 @@ void ImageView::focusInEvent(QFocusEvent *)
142 148
149void ImageView::hide()
150{
151 if (fullScreen()) {
152 m_ignore_next_in = true;
153 showNormal();
154 }
155 QWidget::hide();
156}
143void ImageView::enableFullscreen() 157void ImageView::enableFullscreen()
144{ 158{
145 // This call is needed because showFullScreen won't work
146 // correctly if the widget already considers itself to be fullscreen.
147 if (!fullScreen()) return; 159 if (!fullScreen()) return;
@@ -150,6 +162,5 @@ void ImageView::enableFullscreen()
150 setUpdatesEnabled(false); 162 setUpdatesEnabled(false);
151 parentWidget()->showNormal();
152 // This is needed because showNormal() forcefully changes the window 163 // This is needed because showNormal() forcefully changes the window
153 // style to WSTyle_TopLevel. 164 // style to WSTyle_TopLevel.
154 parentWidget()->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); 165 reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0));
155 // Enable fullscreen. 166 // Enable fullscreen.
@@ -158,11 +169,6 @@ void ImageView::enableFullscreen()
158 m_ignore_next_in = true; 169 m_ignore_next_in = true;
159 parentWidget()->showFullScreen(); 170 showFullScreen();
160 setUpdatesEnabled(true); 171 setUpdatesEnabled(true);
161}
162 172
163ImageWidget::ImageWidget(QWidget * parent, const char * name, WFlags f)
164 : QWidget(parent,name,f)
165{
166 // Make sure size is correct
167 setFixedSize(qApp->desktop()->size());
168} 173}
174
diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h
index f3c37b5..18697e0 100644
--- a/noncore/graphics/opie-eye/gui/imageview.h
+++ b/noncore/graphics/opie-eye/gui/imageview.h
@@ -55,2 +55,4 @@ protected:
55 55
56public slots:
57 virtual void hide();
56 58
@@ -62,16 +64,2 @@ protected slots:
62 64
63class ImageWidget:public QWidget
64{
65 Q_OBJECT
66public:
67 ImageWidget(QWidget * parent=0, const char * name=0, WFlags f = WStyle_Customize | WStyle_NoBorder);
68 virtual ~ImageWidget(){};
69
70protected:
71
72public slots:
73
74protected slots:
75};
76
77#endif 65#endif
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index cdaf34c..274a22a 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -35,3 +35,2 @@
35 35
36
37//OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" ) 36//OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" )
@@ -45,3 +44,2 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
45 m_cfg->setGroup("Zecke_view" ); 44 m_cfg->setGroup("Zecke_view" );
46 tFrame = 0;
47// qDebug( "Process-wide OApplication object @ %0x", oApp ); 45// qDebug( "Process-wide OApplication object @ %0x", oApp );
@@ -148,5 +146,2 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
148PMainWindow::~PMainWindow() { 146PMainWindow::~PMainWindow() {
149 odebug << "Shutting down" << oendl;
150 if (tFrame) delete tFrame;
151 odebug << "Shutting down done" << oendl;
152} 147}
@@ -327,3 +322,2 @@ void PMainWindow::slotToggleFullScreen()
327 bool current = !m_disp->fullScreen(); 322 bool current = !m_disp->fullScreen();
328 m_disp->setFullScreen(current);
329 odebug << "Current = " << current << oendl; 323 odebug << "Current = " << current << oendl;
@@ -332,8 +326,3 @@ void PMainWindow::slotToggleFullScreen()
332 m_disp->setBackgroundColor(black); 326 m_disp->setBackgroundColor(black);
333 if (!tFrame) { 327 m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0));
334 tFrame = new ImageWidget(0,0,WStyle_Customize|WStyle_NoBorder);
335 tFrame->resize(qApp->desktop()->width(), qApp->desktop()->height());
336 tFrame->setMinimumSize(qApp->desktop()->width(), qApp->desktop()->height());
337 }
338 m_disp->reparent(tFrame,QPoint(0,0));
339 m_disp->setVScrollBarMode(QScrollView::AlwaysOff); 328 m_disp->setVScrollBarMode(QScrollView::AlwaysOff);
@@ -341,3 +330,4 @@ void PMainWindow::slotToggleFullScreen()
341 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); 330 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height());
342 tFrame->showFullScreen(); 331 //m_disp->showFullScreen();
332 //qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
343 } else { 333 } else {
@@ -347,4 +337,2 @@ void PMainWindow::slotToggleFullScreen()
347 m_disp->showNormal(); 337 m_disp->showNormal();
348 /* don't forget it! */
349 tFrame->hide();
350 m_disp->setBackgroundColor(white); 338 m_disp->setBackgroundColor(white);
@@ -359,2 +347,3 @@ void PMainWindow::slotToggleFullScreen()
359 } 347 }
348 m_disp->setFullScreen(current);
360} 349}
@@ -400,3 +389,4 @@ void PMainWindow::slotDisplay( const QString& inf ) {
400 if (m_disp->fullScreen()) { 389 if (m_disp->fullScreen()) {
401 tFrame->show();//FullScreen(); 390 //m_disp->showFullScreen();
391 qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
402 } else { 392 } else {
@@ -441,3 +431,3 @@ void PMainWindow::raiseIconView() {
441 if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) { 431 if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) {
442 tFrame->hide(); 432 m_disp->hide();
443 } 433 }
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h
index 9e94c60..6fa1ab6 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.h
+++ b/noncore/graphics/opie-eye/gui/mainwindow.h
@@ -70,3 +70,2 @@ private:
70 bool zoomerOn; 70 bool zoomerOn;
71 ImageWidget*tFrame;
72 QToolButton*rotateButton,*upButton,*fsButton,*viewModeButton; 71 QToolButton*rotateButton,*upButton,*fsButton,*viewModeButton;