summaryrefslogtreecommitdiff
authoralwin <alwin>2005-03-02 12:05:55 (UTC)
committer alwin <alwin>2005-03-02 12:05:55 (UTC)
commitb9d921e98946ee787ec995f44eb1b937d669b430 (patch) (unidiff)
tree7136aa32ca3d90c0b03ec21f855f32b7536eb339
parent374cb9f45664c307ab7d0ed88fea5e76631518d9 (diff)
downloadopie-b9d921e98946ee787ec995f44eb1b937d669b430.zip
opie-b9d921e98946ee787ec995f44eb1b937d669b430.tar.gz
opie-b9d921e98946ee787ec995f44eb1b937d669b430.tar.bz2
fixed some problems in bigscreen mode and when rotating
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp37
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.h7
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp22
3 files changed, 55 insertions, 11 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index ac6474c..03df321 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -1,54 +1,84 @@
1#include "imageview.h" 1#include "imageview.h"
2 2
3#include <opie2/odebug.h> 3#include <opie2/odebug.h>
4#include <opie2/oconfig.h> 4#include <opie2/oconfig.h>
5#include <opie2/okeyconfigwidget.h> 5#include <opie2/okeyconfigwidget.h>
6 6
7#include <qpe/resource.h> 7#include <qpe/resource.h>
8#include <qpe/qpeapplication.h> 8#include <qpe/qpeapplication.h>
9#include <qpe/qcopenvelope_qws.h>
10
9#include <qpopupmenu.h> 11#include <qpopupmenu.h>
10#include <qtimer.h> 12#include <qtimer.h>
11#include <qaction.h> 13#include <qaction.h>
12 14
13using namespace Opie::Core; 15using namespace Opie::Core;
14 16
15ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl ) 17ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl )
16 : Opie::MM::OImageScrollView(parent,name,fl) 18 : Opie::MM::OImageScrollView(parent,name,fl)
17{ 19{
18 m_viewManager = 0; 20 m_viewManager = 0;
19 focus_in_count = 0; 21 focus_in_count = 0;
20 m_cfg = cfg; 22 m_cfg = cfg;
21 m_isFullScreen = false; 23 m_isFullScreen = false;
22 m_ignore_next_in = false; 24 m_ignore_next_in = false;
23 m_slideTimer = 0; 25 m_slideTimer = 0;
24 QPEApplication::setStylusOperation(viewport(),QPEApplication::RightOnHold); 26 QPEApplication::setStylusOperation(viewport(),QPEApplication::RightOnHold);
25 initKeys(); 27 initKeys();
26 m_slideValue = 5; 28 m_slideValue = 5;
27 m_gDisplayType = 0; 29 m_gDisplayType = 0;
28 m_gPrevNext = 0; 30 m_gPrevNext = 0;
29 m_hGroup = 0; 31 m_hGroup = 0;
32 m_Rotated = false;
30 closeIfHide = false; 33 closeIfHide = false;
34 int min = QApplication::desktop()->size().width()>QApplication::desktop()->size().height()?
35 QApplication::desktop()->size().height():QApplication::desktop()->size().width();
36 if (min>320) {
37 // bigscreen
38 setMinimumSize(min/3,min/3);
39 } else {
40 setMinimumSize(10,10);
41 }
42 m_sysChannel = new QCopChannel( "QPE/System", this );
43 connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
44 this, SLOT( systemMessage(const QCString&,const QByteArray&) ) );
45}
46
47void ImageView::systemMessage( const QCString& msg, const QByteArray& data )
48{
49 int _newrotation;
50 QDataStream stream( data, IO_ReadOnly );
51 odebug << "received system message: " << msg << oendl;
52 if ( msg == "setCurrentRotation(int)" )
53 {
54 stream >> _newrotation;
55 odebug << "received setCurrentRotation(" << _newrotation << ")" << oendl;
56 if (!fullScreen()) {
57 m_rotation = _newrotation;
58 return;
59 }
60 }
31} 61}
32 62
33void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup) 63void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup)
34{ 64{
35 m_gDisplayType = disptypeGroup; 65 m_gDisplayType = disptypeGroup;
36 m_gPrevNext = nextprevGroup; 66 m_gPrevNext = nextprevGroup;
37 m_hGroup = hGroup; 67 m_hGroup = hGroup;
38} 68}
39 69
40ImageView::~ImageView() 70ImageView::~ImageView()
41{ 71{
42 odebug << "Destructor imageview" << oendl; 72 odebug << "Destructor imageview" << oendl;
43 delete m_viewManager; 73 delete m_viewManager;
44} 74}
45 75
46Opie::Core::OKeyConfigManager* ImageView::manager() 76Opie::Core::OKeyConfigManager* ImageView::manager()
47{ 77{
48 if (!m_viewManager) { 78 if (!m_viewManager) {
49 initKeys(); 79 initKeys();
50 } 80 }
51 return m_viewManager; 81 return m_viewManager;
52} 82}
53 83
54void ImageView::startSlide(int value) 84void ImageView::startSlide(int value)
@@ -158,86 +188,87 @@ void ImageView::keyReleaseEvent(QKeyEvent * e)
158 emit hideMe(); 188 emit hideMe();
159 } 189 }
160 if (closeIfHide) { 190 if (closeIfHide) {
161 QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); 191 QTimer::singleShot(0, qApp, SLOT(closeAllWindows()));
162 } 192 }
163 } 193 }
164} 194}
165 195
166void ImageView::setCloseIfHide(bool how) 196void ImageView::setCloseIfHide(bool how)
167{ 197{
168 closeIfHide = how; 198 closeIfHide = how;
169} 199}
170 200
171void ImageView::slotShowImageInfo() 201void ImageView::slotShowImageInfo()
172{ 202{
173 emit dispImageInfo(m_lastName); 203 emit dispImageInfo(m_lastName);
174} 204}
175 205
176void ImageView::contentsMousePressEvent ( QMouseEvent * e) 206void ImageView::contentsMousePressEvent ( QMouseEvent * e)
177{ 207{
178 if (e->button()==1) { 208 if (e->button()==1) {
179 return OImageScrollView::contentsMousePressEvent(e); 209 return OImageScrollView::contentsMousePressEvent(e);
180 } 210 }
181 odebug << "Popup " << oendl; 211 odebug << "Popup " << oendl;
182 QPopupMenu *m = new QPopupMenu(0); 212 QPopupMenu *m = new QPopupMenu(this);
183 if (!m) return; 213 if (!m) return;
184 if (m_hGroup) { 214 if (m_hGroup) {
185 m_hGroup->addTo(m); 215 m_hGroup->addTo(m);
186 } 216 }
187 if (fullScreen()) { 217 if (fullScreen()) {
188 if (m_gPrevNext) { 218 if (m_gPrevNext) {
189 m->insertSeparator(); 219 m->insertSeparator();
190 m_gPrevNext->addTo(m); 220 m_gPrevNext->addTo(m);
191 } 221 }
192 if (m_gDisplayType) { 222 if (m_gDisplayType) {
193 m->insertSeparator(); 223 m->insertSeparator();
194 m_gDisplayType->addTo(m); 224 m_gDisplayType->addTo(m);
195 } 225 }
196 } 226 }
197 m->setFocus(); 227 m->setFocus();
198 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 228 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
199 if (m_hGroup) { 229 if (m_hGroup) {
200 m_hGroup->removeFrom(m); 230 m_hGroup->removeFrom(m);
201 } 231 }
202 if (m_gPrevNext) { 232 if (m_gPrevNext) {
203 m_gPrevNext->removeFrom(m); 233 m_gPrevNext->removeFrom(m);
204 } 234 }
205 if (m_gDisplayType) { 235 if (m_gDisplayType) {
206 m_gDisplayType->removeFrom(m); 236 m_gDisplayType->removeFrom(m);
207 } 237 }
208 delete m; 238 delete m;
209} 239}
210 240
211void ImageView::setFullScreen(bool how,bool force) 241void ImageView::setFullScreen(bool how,bool force)
212{ 242{
213 m_isFullScreen = how; 243 m_isFullScreen = how;
214 if (how) { 244 if (how) {
215 m_ignore_next_in = true; 245 m_ignore_next_in = true;
216 setFixedSize(qApp->desktop()->size()); 246// setFixedSize(qApp->desktop()->size());
247 setGeometry(0,0,qApp->desktop()->size().width(),qApp->desktop()->size().height());
217 if (force) showFullScreen(); 248 if (force) showFullScreen();
218 } else { 249 } else {
219 setMinimumSize(10,10); 250// setMinimumSize(10,10);
220 } 251 }
221} 252}
222 253
223void ImageView::focusInEvent(QFocusEvent *) 254void ImageView::focusInEvent(QFocusEvent *)
224{ 255{
225 // Always do it here, no matter the size. 256 // Always do it here, no matter the size.
226 odebug << "Focus in (view)" << oendl; 257 odebug << "Focus in (view)" << oendl;
227 //if (fullScreen()) parentWidget()->showNormal(); 258 //if (fullScreen()) parentWidget()->showNormal();
228 if (m_ignore_next_in){m_ignore_next_in=false;return;} 259 if (m_ignore_next_in){m_ignore_next_in=false;return;}
229 if (fullScreen()) enableFullscreen(); 260 if (fullScreen()) enableFullscreen();
230} 261}
231 262
232void ImageView::hide() 263void ImageView::hide()
233{ 264{
234 if (fullScreen()) { 265 if (fullScreen()) {
235 m_ignore_next_in = true; 266 m_ignore_next_in = true;
236 showNormal(); 267 showNormal();
237 } 268 }
238 QWidget::hide(); 269 QWidget::hide();
239} 270}
240void ImageView::enableFullscreen() 271void ImageView::enableFullscreen()
241{ 272{
242 if (!fullScreen()) return; 273 if (!fullScreen()) return;
243 if (m_ignore_next_in) {m_ignore_next_in = false;return;} 274 if (m_ignore_next_in) {m_ignore_next_in = false;return;}
diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h
index f1067bb..e8c8df7 100644
--- a/noncore/graphics/opie-eye/gui/imageview.h
+++ b/noncore/graphics/opie-eye/gui/imageview.h
@@ -1,78 +1,85 @@
1#ifndef _IMAGE_VIEW_H 1#ifndef _IMAGE_VIEW_H
2#define _IMAGE_VIEW_H 2#define _IMAGE_VIEW_H
3 3
4#include <opie2/oimagescrollview.h> 4#include <opie2/oimagescrollview.h>
5 5
6#include <qwidget.h> 6#include <qwidget.h>
7 7
8class QTimer; 8class QTimer;
9class QActionGroup; 9class QActionGroup;
10class QAction; 10class QAction;
11 11
12class QCopChannel;
13
12namespace Opie { 14namespace Opie {
13 namespace Core { 15 namespace Core {
14 class OConfig; 16 class OConfig;
15 class OKeyConfigManager; 17 class OKeyConfigManager;
16 } 18 }
17} 19}
18 20
19class ImageView:public Opie::MM::OImageScrollView 21class ImageView:public Opie::MM::OImageScrollView
20{ 22{
21 Q_OBJECT 23 Q_OBJECT
22 24
23 enum ActionIds { 25 enum ActionIds {
24 ViewInfo, 26 ViewInfo,
25 FullScreen, 27 FullScreen,
26 ShowNext, 28 ShowNext,
27 ShowPrevious, 29 ShowPrevious,
28 Zoomer, 30 Zoomer,
29 Autorotate, 31 Autorotate,
30 Autoscale 32 Autoscale
31 }; 33 };
32 34
33public: 35public:
34 ImageView(Opie::Core::OConfig *cfg,QWidget* parent,const char* name = 0, WFlags fl = 0 ); 36 ImageView(Opie::Core::OConfig *cfg,QWidget* parent,const char* name = 0, WFlags fl = 0 );
35 virtual ~ImageView(); 37 virtual ~ImageView();
36 Opie::Core::OKeyConfigManager* manager(); 38 Opie::Core::OKeyConfigManager* manager();
37 void setFullScreen(bool how,bool force=true); 39 void setFullScreen(bool how,bool force=true);
38 bool fullScreen(){return m_isFullScreen;} 40 bool fullScreen(){return m_isFullScreen;}
39 virtual void enableFullscreen(); 41 virtual void enableFullscreen();
40 void stopSlide(); 42 void stopSlide();
41 void setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup); 43 void setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup);
42 void setCloseIfHide(bool); 44 void setCloseIfHide(bool);
43 45
44signals: 46signals:
45 void dispImageInfo(const QString&); 47 void dispImageInfo(const QString&);
46 void dispNext(); 48 void dispNext();
47 void dispPrev(); 49 void dispPrev();
48 void toggleFullScreen(); 50 void toggleFullScreen();
49 void hideMe(); 51 void hideMe();
50 void toggleZoomer(); 52 void toggleZoomer();
51 void toggleAutoscale(); 53 void toggleAutoscale();
52 void toggleAutorotate(); 54 void toggleAutorotate();
53 55
54protected: 56protected:
55 Opie::Core::OConfig * m_cfg; 57 Opie::Core::OConfig * m_cfg;
56 Opie::Core::OKeyConfigManager*m_viewManager; 58 Opie::Core::OKeyConfigManager*m_viewManager;
57 void initKeys(); 59 void initKeys();
58 bool m_isFullScreen:1; 60 bool m_isFullScreen:1;
59 bool m_ignore_next_in:1; 61 bool m_ignore_next_in:1;
62 bool m_Rotated:1;
63
60 int focus_in_count; 64 int focus_in_count;
61 QTimer*m_slideTimer; 65 QTimer*m_slideTimer;
62 int m_slideValue; 66 int m_slideValue;
63 virtual void focusInEvent ( QFocusEvent * ); 67 virtual void focusInEvent ( QFocusEvent * );
64 QActionGroup *m_gDisplayType,*m_gPrevNext,*m_hGroup; 68 QActionGroup *m_gDisplayType,*m_gPrevNext,*m_hGroup;
65 bool closeIfHide:1; 69 bool closeIfHide:1;
70 QCopChannel* m_sysChannel;
71 int m_rotation;
66 72
67public slots: 73public slots:
68 virtual void hide(); 74 virtual void hide();
69 virtual void startSlide(int); 75 virtual void startSlide(int);
70 virtual void nextSlide(); 76 virtual void nextSlide();
77 virtual void systemMessage( const QCString&, const QByteArray& );
71 78
72protected slots: 79protected slots:
73 virtual void slotShowImageInfo(); 80 virtual void slotShowImageInfo();
74 virtual void keyReleaseEvent(QKeyEvent * e); 81 virtual void keyReleaseEvent(QKeyEvent * e);
75 virtual void contentsMousePressEvent ( QMouseEvent * e); 82 virtual void contentsMousePressEvent ( QMouseEvent * e);
76}; 83};
77 84
78#endif 85#endif
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 7570ee3..90e2e99 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -234,114 +234,120 @@ void PMainWindow::slotConfig() {
234template<class T> 234template<class T>
235void PMainWindow::initT( const char* name, T** ptr, int id) { 235void PMainWindow::initT( const char* name, T** ptr, int id) {
236 if ( *ptr ) { 236 if ( *ptr ) {
237 (*ptr)->disconnect(this, SLOT(slotReturn())); 237 (*ptr)->disconnect(this, SLOT(slotReturn()));
238 (*ptr)->setDestructiveClose(); 238 (*ptr)->setDestructiveClose();
239 m_stack->removeWidget( *ptr ); 239 m_stack->removeWidget( *ptr );
240 } 240 }
241 *ptr = new T(m_cfg, m_stack, name ); 241 *ptr = new T(m_cfg, m_stack, name );
242 m_stack->addWidget( *ptr, id ); 242 m_stack->addWidget( *ptr, id );
243 243
244 connect(*ptr, SIGNAL(sig_return()), 244 connect(*ptr, SIGNAL(sig_return()),
245 this,SLOT(slotReturn())); 245 this,SLOT(slotReturn()));
246 246
247} 247}
248 248
249void PMainWindow::initInfo() { 249void PMainWindow::initInfo() {
250 initT<imageinfo>( "Image Info", &m_info, ImageInfo ); 250 initT<imageinfo>( "Image Info", &m_info, ImageInfo );
251 connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&))); 251 connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&)));
252} 252}
253 253
254void PMainWindow::initDisp() { 254void PMainWindow::initDisp() {
255 initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); 255 initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay );
256 if (m_disp) { 256 if (m_disp) {
257 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 257 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
258 m_disp->setMinimumSize(QApplication::desktop()->size()/2); 258 //m_disp->setMinimumSize(QApplication::desktop()->size()/2);
259 } 259 }
260 m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType); 260 m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType);
261 m_disp->setAutoScale(!m_aUnscaled->isOn()); 261 m_disp->setAutoScale(!m_aUnscaled->isOn());
262 m_disp->setAutoRotate(m_aAutoRotate->isOn()); 262 m_disp->setAutoRotate(m_aAutoRotate->isOn());
263 m_disp->setShowZoomer(m_aZoomer->isOn()); 263 m_disp->setShowZoomer(m_aZoomer->isOn());
264 m_disp->setBackgroundColor(white); 264 m_disp->setBackgroundColor(white);
265 connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); 265 connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&)));
266 connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext())); 266 connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext()));
267 connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev())); 267 connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev()));
268 connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen())); 268 connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen()));
269 connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView())); 269 connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView()));
270 connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer())); 270 connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer()));
271 connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale())); 271 connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale()));
272 connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate())); 272 connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate()));
273 connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int))); 273 connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int)));
274 slotFullScreenToggled(m_aFullScreen->isOn()); 274 slotFullScreenToggled(m_aFullScreen->isOn());
275 } 275 }
276} 276}
277 277
278void PMainWindow::slotToggleFullScreen() 278void PMainWindow::slotToggleFullScreen()
279{ 279{
280 bool current = !m_aFullScreen->isOn(); 280 bool current = !m_aFullScreen->isOn();
281 m_aFullScreen->setOn(current); 281 m_aFullScreen->setOn(current);
282} 282}
283 283
284void PMainWindow::slotFullScreenButton(bool current) 284void PMainWindow::slotFullScreenButton(bool current)
285{ 285{
286 if (autoSave) { 286 if (autoSave) {
287 m_cfg->writeEntry("fullscreen",current); 287 m_cfg->writeEntry("fullscreen",current);
288 } 288 }
289 if (!m_disp) return; 289 if (!m_disp) return;
290 if (m_disp->isVisible()) { 290 if (m_disp->isVisible()) {
291 setupViewWindow(current, true); 291 setupViewWindow(current, true);
292 } 292 }
293} 293}
294 294
295void PMainWindow::setupViewWindow(bool current, bool forceDisplay) 295void PMainWindow::setupViewWindow(bool current, bool forceDisplay)
296{ 296{
297 if (!m_disp) return; 297 if (!m_disp) {
298 return;
299 }
298 if (current) { 300 if (current) {
299 m_disp->setBackgroundColor(black); 301 m_disp->setBackgroundColor(black);
300 m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); 302 m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0));
301 m_disp->setVScrollBarMode(QScrollView::AlwaysOff); 303 m_disp->setVScrollBarMode(QScrollView::AlwaysOff);
302 m_disp->setHScrollBarMode(QScrollView::AlwaysOff); 304 m_disp->setHScrollBarMode(QScrollView::AlwaysOff);
303 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); 305 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height());
306 m_disp->setFullScreen(current,forceDisplay);
304 } else { 307 } else {
305 setUpdatesEnabled(false); 308 setUpdatesEnabled(false);
306 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 309 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
307 m_disp->setMinimumSize(QApplication::desktop()->size()/2); 310
311 //m_disp->setMinimumSize(QApplication::desktop()->size()/2);
308 } else { 312 } else {
309 m_disp->setMinimumSize(10,10); 313 //m_disp->setMinimumSize(10,10);
310 } 314 }
311 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 315 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
312 m_disp->reparent(0,QPoint(50,50)); 316 m_disp->reparent(0,QPoint(10,10));
313 } else { 317 } else {
314 m_disp->reparent(0,QPoint(0,0)); 318 m_disp->reparent(0,QPoint(0,0));
315 } 319 }
316 m_disp->setBackgroundColor(white); 320 m_disp->setBackgroundColor(white);
317 m_stack->addWidget(m_disp,ImageDisplay); 321 m_stack->addWidget(m_disp,ImageDisplay);
318 m_disp->setVScrollBarMode(QScrollView::Auto); 322 m_disp->setVScrollBarMode(QScrollView::Auto);
319 m_disp->setHScrollBarMode(QScrollView::Auto); 323 m_disp->setHScrollBarMode(QScrollView::Auto);
320 if (forceDisplay || m_disp->isVisible())
321 m_stack->raiseWidget(m_disp);
322 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 324 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
323 m_disp->resize(m_disp->minimumSize()); 325 m_disp->setGeometry(30,30,QApplication::desktop()->width()-60,QApplication::desktop()->height()-60);
326 }
327 if (forceDisplay || m_disp->isVisible()) {
328 m_stack->raiseWidget(m_disp);
329 m_disp->setFocus();
324 } 330 }
325 setUpdatesEnabled(true); 331 setUpdatesEnabled(true);
326 } 332 }
327 m_disp->setFullScreen(current,forceDisplay); 333 m_disp->setFullScreen(current,forceDisplay);
328} 334}
329 335
330void PMainWindow::slotFullScreenToggled(bool current) 336void PMainWindow::slotFullScreenToggled(bool current)
331{ 337{
332 setupViewWindow(current,true); 338 setupViewWindow(current,true);
333} 339}
334 340
335/** 341/**
336 * With big Screen the plan could be to 'detach' the image 342 * With big Screen the plan could be to 'detach' the image
337 * window if visible and to create a ne wone 343 * window if visible and to create a ne wone
338 * init* already supports it but I make no use of it for 344 * init* already supports it but I make no use of it for
339 * now. We set filename and raise 345 * now. We set filename and raise
340 * 346 *
341 * ### FIXME and talk to alwin 347 * ### FIXME and talk to alwin
342 */ 348 */
343void PMainWindow::slotShowInfo( const QString& inf ) { 349void PMainWindow::slotShowInfo( const QString& inf ) {
344 if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) { 350 if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) {
345 return; 351 return;
346 } 352 }
347 if ( !m_info ) { 353 if ( !m_info ) {