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 | 22 |
1 files changed, 14 insertions, 8 deletions
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 | |||
@@ -246,25 +246,25 @@ void PMainWindow::initT( const char* name, T** ptr, int id) { | |||
246 | 246 | ||
247 | } | 247 | } |
248 | 248 | ||
249 | void PMainWindow::initInfo() { | 249 | void 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 | ||
254 | void PMainWindow::initDisp() { | 254 | void 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())); |
@@ -285,51 +285,57 @@ void 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 | ||
295 | void PMainWindow::setupViewWindow(bool current, bool forceDisplay) | 295 | void 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 | ||
330 | void PMainWindow::slotFullScreenToggled(bool current) | 336 | void PMainWindow::slotFullScreenToggled(bool current) |
331 | { | 337 | { |
332 | setupViewWindow(current,true); | 338 | setupViewWindow(current,true); |
333 | } | 339 | } |
334 | 340 | ||
335 | /** | 341 | /** |