summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index a96bfbd..e532867 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -1,327 +1,325 @@
1/* 1/*
2 * GPLv2 zecke@handhelds.org 2 * GPLv2 zecke@handhelds.org
3 * No WArranty... 3 * No WArranty...
4 */ 4 */
5#include "mainwindow.h" 5#include "mainwindow.h"
6#include "imageview.h" 6#include "imageview.h"
7 7
8#include "iconview.h" 8#include "iconview.h"
9#include "filesystem.h" 9#include "filesystem.h"
10#include "imageinfoui.h" 10#include "imageinfoui.h"
11#include "viewmodebutton.h" 11#include "viewmodebutton.h"
12#include "basesetup.h" 12#include "basesetup.h"
13 13
14#include <iface/ifaceinfo.h> 14#include <iface/ifaceinfo.h>
15#include <iface/dirview.h> 15#include <iface/dirview.h>
16 16
17#include <opie2/odebug.h> 17#include <opie2/odebug.h>
18#include <opie2/owidgetstack.h> 18#include <opie2/owidgetstack.h>
19#include <opie2/oapplicationfactory.h> 19#include <opie2/oapplicationfactory.h>
20#include <opie2/otabwidget.h> 20#include <opie2/otabwidget.h>
21#include <opie2/okeyconfigwidget.h> 21#include <opie2/okeyconfigwidget.h>
22 22
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24#include <qpe/config.h> 24#include <qpe/config.h>
25#include <qpe/ir.h> 25#include <qpe/ir.h>
26#include <qpe/storage.h> 26#include <qpe/storage.h>
27#include <qpe/applnk.h> 27#include <qpe/applnk.h>
28 28
29#include <qtoolbar.h> 29#include <qtoolbar.h>
30#include <qtoolbutton.h> 30#include <qtoolbutton.h>
31#include <qlayout.h> 31#include <qlayout.h>
32#include <qdialog.h> 32#include <qdialog.h>
33#include <qmap.h> 33#include <qmap.h>
34#include <qtimer.h> 34#include <qtimer.h>
35#include <qframe.h> 35#include <qframe.h>
36#include <qmenubar.h> 36#include <qmenubar.h>
37#include <qaction.h> 37#include <qaction.h>
38 38
39//OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" ) 39//OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" )
40OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) 40OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>)
41 41
42PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) 42PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
43 : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 ) 43 : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 )
44{ 44{
45 setCaption( QObject::tr("Opie Eye" ) ); 45 setCaption( QObject::tr("Opie Eye" ) );
46 m_cfg = new Opie::Core::OConfig("opie-eye"); 46 m_cfg = new Opie::Core::OConfig("opie-eye");
47 m_cfg->setGroup("main" ); 47 m_cfg->setGroup("main" );
48 readConfig(); 48 readConfig();
49 m_setDocCalled = false; 49 m_setDocCalled = false;
50 m_polishDone = false; 50 m_polishDone = false;
51 m_SmallWindow = QApplication::desktop()->size().width()<330; 51 m_SmallWindow = QApplication::desktop()->size().width()<330;
52 52
53 m_storage = new StorageInfo(); 53 m_storage = new StorageInfo();
54 connect(m_storage, SIGNAL(disksChanged() ), 54 connect(m_storage, SIGNAL(disksChanged() ),
55 this, SLOT( dirChanged() ) ); 55 this, SLOT( dirChanged() ) );
56 56
57 m_stack = new Opie::Ui::OWidgetStack( this ); 57 m_stack = new Opie::Ui::OWidgetStack( this );
58 setCentralWidget( m_stack ); 58 setCentralWidget( m_stack );
59 59
60 m_view = new PIconView( m_stack, m_cfg ); 60 m_view = new PIconView( m_stack, m_cfg );
61 m_stack->addWidget( m_view, IconView ); 61 m_stack->addWidget( m_view, IconView );
62 m_stack->raiseWidget( IconView ); 62 m_stack->raiseWidget( IconView );
63 63
64 connect(m_view, SIGNAL(sig_display(const QString&)), 64 connect(m_view, SIGNAL(sig_display(const QString&)),
65 this, SLOT(slotDisplay(const QString&))); 65 this, SLOT(slotDisplay(const QString&)));
66 connect(m_view, SIGNAL(sig_showInfo(const QString&)), 66 connect(m_view, SIGNAL(sig_showInfo(const QString&)),
67 this, SLOT(slotShowInfo(const QString&)) ); 67 this, SLOT(slotShowInfo(const QString&)) );
68 connect(this,SIGNAL(changeListMode(int)),m_view,SLOT(slotChangeMode(int))); 68 connect(this,SIGNAL(changeListMode(int)),m_view,SLOT(slotChangeMode(int)));
69 69
70 m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce);
71
72 listviewMenu = 0; 70 listviewMenu = 0;
73 /* setup menu and toolbar */ 71 /* setup menu and toolbar */
74 setupActions(); 72 setupActions();
75 setupToolbar(); 73 setupToolbar();
76 setupMenu(); 74 setupMenu();
77 m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true)); 75 m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true));
78 m_aAutoRotate->setEnabled(!m_aUnscaled->isOn()); 76 m_aAutoRotate->setEnabled(!m_aUnscaled->isOn());
79 if (m_aForceSmall) { 77 if (m_aForceSmall) {
80 m_aForceSmall->setOn(m_cfg->readBoolEntry("dontshowseperate",true)); 78 m_aForceSmall->setOn(m_cfg->readBoolEntry("dontshowseperate",true));
81 } 79 }
82 odebug << "mainwindow constructor done" << oendl; 80 odebug << "mainwindow constructor done" << oendl;
83} 81}
84 82
85PMainWindow::~PMainWindow() { 83PMainWindow::~PMainWindow() {
86} 84}
87 85
88void PMainWindow::slotToggleZoomer() 86void PMainWindow::slotToggleZoomer()
89{ 87{
90 m_aZoomer->setOn(!m_aZoomer->isOn()); 88 m_aZoomer->setOn(!m_aZoomer->isOn());
91} 89}
92 90
93void PMainWindow::slotZoomerToggled(bool how) 91void PMainWindow::slotZoomerToggled(bool how)
94{ 92{
95 if (m_disp) { 93 if (m_disp) {
96 m_disp->setShowZoomer(how); 94 m_disp->setShowZoomer(how);
97 } 95 }
98 if (autoSave) { 96 if (autoSave) {
99 m_cfg->writeEntry("zoomeron",how); 97 m_cfg->writeEntry("zoomeron",how);
100 } 98 }
101} 99}
102 100
103void PMainWindow::slotToggleAutorotate() 101void PMainWindow::slotToggleAutorotate()
104{ 102{
105 if (!m_aAutoRotate->isEnabled()) return; 103 if (!m_aAutoRotate->isEnabled()) return;
106 m_aAutoRotate->setOn(!m_aAutoRotate->isOn()); 104 m_aAutoRotate->setOn(!m_aAutoRotate->isOn());
107} 105}
108 106
109void PMainWindow::slotToggleAutoscale() 107void PMainWindow::slotToggleAutoscale()
110{ 108{
111 m_aUnscaled->setOn(!m_aUnscaled->isOn()); 109 m_aUnscaled->setOn(!m_aUnscaled->isOn());
112} 110}
113 111
114void PMainWindow::slotRotateToggled(bool how) 112void PMainWindow::slotRotateToggled(bool how)
115{ 113{
116 if (autoSave) { 114 if (autoSave) {
117 m_cfg->writeEntry("autorotate",how); 115 m_cfg->writeEntry("autorotate",how);
118 } 116 }
119 if (m_disp) { 117 if (m_disp) {
120 m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),how); 118 m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),how);
121 } 119 }
122} 120}
123 121
124void PMainWindow::slotScaleToggled(bool how) 122void PMainWindow::slotScaleToggled(bool how)
125{ 123{
126 if (autoSave) { 124 if (autoSave) {
127 m_cfg->writeEntry("unscaled",how); 125 m_cfg->writeEntry("unscaled",how);
128 } 126 }
129 odebug << "Unscaled: " << m_aUnscaled->isOn() << oendl; 127 odebug << "Unscaled: " << m_aUnscaled->isOn() << oendl;
130 odebug << "How: " << how << oendl; 128 odebug << "How: " << how << oendl;
131 if (how) { 129 if (how) {
132 m_aAutoRotate->setOn(false); 130 m_aAutoRotate->setOn(false);
133 } 131 }
134 if (m_disp) { 132 if (m_disp) {
135 m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),m_aAutoRotate->isOn()); 133 m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),m_aAutoRotate->isOn());
136 } 134 }
137 m_aAutoRotate->setEnabled(!how); 135 m_aAutoRotate->setEnabled(!how);
138 odebug << "Autorotate: " << m_aAutoRotate->isOn() << oendl; 136 odebug << "Autorotate: " << m_aAutoRotate->isOn() << oendl;
139} 137}
140 138
141void PMainWindow::slotConfig() { 139void PMainWindow::slotConfig() {
142 /* 140 /*
143 * have a tab with the possible views 141 * have a tab with the possible views
144 * a tab for globals image cache size.. scaled loading 142 * a tab for globals image cache size.. scaled loading
145 * and one tab for the KeyConfigs 143 * and one tab for the KeyConfigs
146 */ 144 */
147 QDialog dlg(this, 0, true); 145 QDialog dlg(this, 0, true);
148 dlg.setCaption( tr("Opie Eye - Config" ) ); 146 dlg.setCaption( tr("Opie Eye - Config" ) );
149 147
150 QHBoxLayout *lay = new QHBoxLayout(&dlg); 148 QHBoxLayout *lay = new QHBoxLayout(&dlg);
151 Opie::Ui::OTabWidget *wid = new Opie::Ui::OTabWidget(&dlg ); 149 Opie::Ui::OTabWidget *wid = new Opie::Ui::OTabWidget(&dlg );
152 lay->addWidget( wid ); 150 lay->addWidget( wid );
153 151
154 BaseSetup*bSetup = new BaseSetup(m_cfg,wid); 152 BaseSetup*bSetup = new BaseSetup(m_cfg,wid);
155 wid->addTab(bSetup,"SettingsIcon","Basics setup"); 153 wid->addTab(bSetup,"SettingsIcon","Basics setup");
156 154
157 ViewMap *vM = viewMap(); 155 ViewMap *vM = viewMap();
158 ViewMap::Iterator _it = vM->begin(); 156 ViewMap::Iterator _it = vM->begin();
159 QMap<PDirView*, QWidget*> lst; 157 QMap<PDirView*, QWidget*> lst;
160 158
161 for( ; _it != vM->end(); ++_it ) { 159 for( ; _it != vM->end(); ++_it ) {
162 PDirView *view = (_it.data())(*m_cfg); 160 PDirView *view = (_it.data())(*m_cfg);
163 PInterfaceInfo *inf = view->interfaceInfo(); 161 PInterfaceInfo *inf = view->interfaceInfo();
164 QWidget *_wid = inf->configWidget( *m_cfg ); 162 QWidget *_wid = inf->configWidget( *m_cfg );
165 if (!_wid) continue; 163 if (!_wid) continue;
166 _wid->reparent(wid, QPoint() ); 164 _wid->reparent(wid, QPoint() );
167 lst.insert( view, _wid ); 165 lst.insert( view, _wid );
168 wid->addTab( _wid, "fileopen", inf->name() ); 166 wid->addTab( _wid, "fileopen", inf->name() );
169 } 167 }
170 168
171/* 169/*
172 * Add the KeyConfigWidget 170 * Add the KeyConfigWidget
173 */ 171 */
174 Opie::Ui::OKeyConfigWidget* keyWid = new Opie::Ui::OKeyConfigWidget( wid, "key config" ); 172 Opie::Ui::OKeyConfigWidget* keyWid = new Opie::Ui::OKeyConfigWidget( wid, "key config" );
175 keyWid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue ); 173 keyWid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue );
176 keyWid->insert( tr("Browser Keyboard Actions"), m_view->manager() ); 174 keyWid->insert( tr("Browser Keyboard Actions"), m_view->manager() );
177 QWidget*w = m_stack->visibleWidget(); 175 QWidget*w = m_stack->visibleWidget();
178 176
179 bool reminfo = false; 177 bool reminfo = false;
180 if ( !m_info ) { 178 if ( !m_info ) {
181 reminfo = true; 179 reminfo = true;
182 initInfo(); 180 initInfo();
183 m_info->hide(); 181 m_info->hide();
184 } 182 }
185 keyWid->insert( tr("Imageinfo Keyboard Actions"), m_info->manager() ); 183 keyWid->insert( tr("Imageinfo Keyboard Actions"), m_info->manager() );
186 184
187 bool remdisp = false; 185 bool remdisp = false;
188 if ( !m_disp ) { 186 if ( !m_disp ) {
189 remdisp = true; 187 remdisp = true;
190 initDisp(); 188 initDisp();
191 m_disp->hide(); 189 m_disp->hide();
192 } 190 }
193 keyWid->insert( tr("Imageview Keyboard Actions"), m_disp->manager() ); 191 keyWid->insert( tr("Imageview Keyboard Actions"), m_disp->manager() );
194 192
195 keyWid->load(); 193 keyWid->load();
196 wid->addTab( keyWid, QString::fromLatin1("AppsIcon" ), tr("Keyboard Configuration") ); 194 wid->addTab( keyWid, QString::fromLatin1("AppsIcon" ), tr("Keyboard Configuration") );
197 wid->setCurrentTab(0); 195 wid->setCurrentTab(0);
198 bool act = ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ); 196 bool act = ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted );
199 197
200/* 198/*
201 * clean up 199 * clean up
202 *apply changes 200 *apply changes
203 */ 201 */
204 202
205 QMap<PDirView*, QWidget*>::Iterator it; 203 QMap<PDirView*, QWidget*>::Iterator it;
206 for ( it = lst.begin(); it != lst.end(); ++it ) { 204 for ( it = lst.begin(); it != lst.end(); ++it ) {
207 if ( act ) 205 if ( act )
208 it.key()->interfaceInfo()->writeConfig(it.data(), *m_cfg); 206 it.key()->interfaceInfo()->writeConfig(it.data(), *m_cfg);
209 delete it.key(); 207 delete it.key();
210 } 208 }
211 209
212 210
213 if ( act ) { 211 if ( act ) {
214 keyWid->save(); 212 keyWid->save();
215 m_disp->manager()->save(); 213 m_disp->manager()->save();
216 m_info->manager()->save(); 214 m_info->manager()->save();
217 m_view->manager()->save(); 215 m_view->manager()->save();
218 bSetup->save_values(); 216 bSetup->save_values();
219 m_view->resetView(); 217 m_view->resetView();
220 readConfig(); 218 readConfig();
221 } 219 }
222 delete keyWid; 220 delete keyWid;
223 221
224 m_stack->raiseWidget(w); 222 m_stack->raiseWidget(w);
225 if (remdisp) { 223 if (remdisp) {
226 m_disp->hide(); 224 m_disp->hide();
227 } 225 }
228 if (reminfo) { 226 if (reminfo) {
229 m_info->hide(); 227 m_info->hide();
230 } 228 }
231} 229}
232 230
233/* 231/*
234 * create a new image info component 232 * create a new image info component
235 * and detach the current one 233 * and detach the current one
236 * we will make the other delete on exit 234 * we will make the other delete on exit
237 */ 235 */
238template<class T> 236template<class T>
239void PMainWindow::initT( const char* name, T** ptr, int id) { 237void PMainWindow::initT( const char* name, T** ptr, int id) {
240 if ( *ptr ) { 238 if ( *ptr ) {
241 (*ptr)->disconnect(this, SLOT(slotReturn())); 239 (*ptr)->disconnect(this, SLOT(slotReturn()));
242 (*ptr)->setDestructiveClose(); 240 (*ptr)->setDestructiveClose();
243 m_stack->removeWidget( *ptr ); 241 m_stack->removeWidget( *ptr );
244 } 242 }
245 *ptr = new T(m_cfg, m_stack, name ); 243 *ptr = new T(m_cfg, m_stack, name );
246 m_stack->addWidget( *ptr, id ); 244 m_stack->addWidget( *ptr, id );
247 245
248 connect(*ptr, SIGNAL(sig_return()), 246 connect(*ptr, SIGNAL(sig_return()),
249 this,SLOT(slotReturn())); 247 this,SLOT(slotReturn()));
250 248
251} 249}
252 250
253void PMainWindow::initInfo() { 251void PMainWindow::initInfo() {
254 initT<imageinfo>( "Image Info", &m_info, ImageInfo ); 252 initT<imageinfo>( "Image Info", &m_info, ImageInfo );
255 connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&))); 253 connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&)));
256} 254}
257 255
258void PMainWindow::initDisp() { 256void PMainWindow::initDisp() {
259 initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); 257 initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay );
260 if (m_disp) { 258 if (m_disp) {
261// if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 259// if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
262 //m_disp->setMinimumSize(QApplication::desktop()->size()/2); 260 //m_disp->setMinimumSize(QApplication::desktop()->size()/2);
263// } 261// }
264 m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType); 262 m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType);
265 m_disp->setAutoScale(!m_aUnscaled->isOn()); 263 m_disp->setAutoScale(!m_aUnscaled->isOn());
266 m_disp->setAutoRotate(m_aAutoRotate->isOn()); 264 m_disp->setAutoRotate(m_aAutoRotate->isOn());
267 m_disp->setShowZoomer(m_aZoomer->isOn()); 265 m_disp->setShowZoomer(m_aZoomer->isOn());
268 m_disp->setBackgroundColor(white); 266 m_disp->setBackgroundColor(white);
269 connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); 267 connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&)));
270 connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext())); 268 connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext()));
271 connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev())); 269 connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev()));
272 connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen())); 270 connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen()));
273 connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView())); 271 connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView()));
274 connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer())); 272 connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer()));
275 connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale())); 273 connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale()));
276 connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate())); 274 connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate()));
277 connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int))); 275 connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int)));
278 slotFullScreenToggled(m_aFullScreen->isOn()); 276 slotFullScreenToggled(m_aFullScreen->isOn());
279 } 277 }
280} 278}
281 279
282void PMainWindow::slotToggleFullScreen() 280void PMainWindow::slotToggleFullScreen()
283{ 281{
284 bool current = !m_aFullScreen->isOn(); 282 bool current = !m_aFullScreen->isOn();
285 m_aFullScreen->setOn(current); 283 m_aFullScreen->setOn(current);
286} 284}
287 285
288void PMainWindow::slotFullScreenButton(bool current) 286void PMainWindow::slotFullScreenButton(bool current)
289{ 287{
290 if (autoSave) { 288 if (autoSave) {
291 m_cfg->writeEntry("fullscreen",current); 289 m_cfg->writeEntry("fullscreen",current);
292 } 290 }
293 if (!m_disp) return; 291 if (!m_disp) return;
294 if (m_disp->isVisible()) { 292 if (m_disp->isVisible()) {
295 setupViewWindow(current, true); 293 setupViewWindow(current, true);
296 } 294 }
297} 295}
298 296
299void PMainWindow::setupViewWindow(bool current, bool forceDisplay) 297void PMainWindow::setupViewWindow(bool current, bool forceDisplay)
300{ 298{
301 if (!m_disp) { 299 if (!m_disp) {
302 return; 300 return;
303 } 301 }
304 if (current) { 302 if (current) {
305 m_disp->setBackgroundColor(black); 303 m_disp->setBackgroundColor(black);
306 m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); 304 m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0));
307 m_disp->setVScrollBarMode(QScrollView::AlwaysOff); 305 m_disp->setVScrollBarMode(QScrollView::AlwaysOff);
308 m_disp->setHScrollBarMode(QScrollView::AlwaysOff); 306 m_disp->setHScrollBarMode(QScrollView::AlwaysOff);
309 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); 307 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height());
310 m_disp->setFullScreen(current,forceDisplay); 308 m_disp->setFullScreen(current,forceDisplay);
311 } else { 309 } else {
312 setUpdatesEnabled(false); 310 setUpdatesEnabled(false);
313#if 0 311#if 0
314 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 312 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
315 313
316 //m_disp->setMinimumSize(QApplication::desktop()->size()/2); 314 //m_disp->setMinimumSize(QApplication::desktop()->size()/2);
317 } else { 315 } else {
318 //m_disp->setMinimumSize(10,10); 316 //m_disp->setMinimumSize(10,10);
319 } 317 }
320#endif 318#endif
321 m_disp->setBackgroundColor(white); 319 m_disp->setBackgroundColor(white);
322 m_stack->addWidget(m_disp,ImageDisplay); 320 m_stack->addWidget(m_disp,ImageDisplay);
323 m_disp->setVScrollBarMode(QScrollView::Auto); 321 m_disp->setVScrollBarMode(QScrollView::Auto);
324 m_disp->setHScrollBarMode(QScrollView::Auto); 322 m_disp->setHScrollBarMode(QScrollView::Auto);
325 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 323 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
326 m_disp->setGeometry(30,30,QApplication::desktop()->width()-60,QApplication::desktop()->height()-60); 324 m_disp->setGeometry(30,30,QApplication::desktop()->width()-60,QApplication::desktop()->height()-60);
327 } 325 }