author | alwin <alwin> | 2004-11-01 01:58:25 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-01 01:58:25 (UTC) |
commit | d69955ef9cddc3acc37b9dc96945cd4bae56eed5 (patch) (unidiff) | |
tree | 7982a6da8f8141292eb0a1c09ce384784af2801d /noncore | |
parent | 01fb5d6957984fe6fe5ed2109a024be7e8159d16 (diff) | |
download | opie-d69955ef9cddc3acc37b9dc96945cd4bae56eed5.zip opie-d69955ef9cddc3acc37b9dc96945cd4bae56eed5.tar.gz opie-d69955ef9cddc3acc37b9dc96945cd4bae56eed5.tar.bz2 |
some menu working
some debug messages removed
tried to remove some interesting effects when switching view mode
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.cpp | 1 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 7 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.h | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 54 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.h | 4 |
5 files changed, 45 insertions, 23 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp index e70d6a6..7afb62d 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp +++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp | |||
@@ -58,3 +58,2 @@ void imageinfo::initKeys() | |||
58 | { | 58 | { |
59 | odebug << "init imageinfo keys" << oendl; | ||
60 | #if 0 | 59 | #if 0 |
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index c7e48cb..86db732 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp | |||
@@ -89,3 +89,3 @@ void ImageView::initKeys() | |||
89 | if (!m_cfg) { | 89 | if (!m_cfg) { |
90 | m_cfg = new Opie::Core::OConfig("phunkview"); | 90 | m_cfg = new Opie::Core::OConfig("opie-eye"); |
91 | m_cfg->setGroup("image_view_keys" ); | 91 | m_cfg->setGroup("image_view_keys" ); |
@@ -192,3 +192,3 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e) | |||
192 | 192 | ||
193 | void ImageView::setFullScreen(bool how) | 193 | void ImageView::setFullScreen(bool how,bool force) |
194 | { | 194 | { |
@@ -198,3 +198,3 @@ void ImageView::setFullScreen(bool how) | |||
198 | setFixedSize(qApp->desktop()->size()); | 198 | setFixedSize(qApp->desktop()->size()); |
199 | showFullScreen(); | 199 | if (force) showFullScreen(); |
200 | } else { | 200 | } else { |
@@ -236,3 +236,2 @@ void ImageView::enableFullscreen() | |||
236 | setUpdatesEnabled(true); | 236 | setUpdatesEnabled(true); |
237 | |||
238 | } | 237 | } |
diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h index 640905a..2408211 100644 --- a/noncore/graphics/opie-eye/gui/imageview.h +++ b/noncore/graphics/opie-eye/gui/imageview.h | |||
@@ -36,3 +36,3 @@ public: | |||
36 | Opie::Core::OKeyConfigManager* manager(); | 36 | Opie::Core::OKeyConfigManager* manager(); |
37 | void setFullScreen(bool how); | 37 | void setFullScreen(bool how,bool force=true); |
38 | bool fullScreen(){return m_isFullScreen;} | 38 | bool fullScreen(){return m_isFullScreen;} |
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 570ee45..ece51a1 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp | |||
@@ -45,4 +45,4 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | |||
45 | setCaption( QObject::tr("Opie Eye Caramba" ) ); | 45 | setCaption( QObject::tr("Opie Eye Caramba" ) ); |
46 | m_cfg = new Opie::Core::OConfig("phunkview"); | 46 | m_cfg = new Opie::Core::OConfig("opie-eye"); |
47 | m_cfg->setGroup("Zecke_view" ); | 47 | m_cfg->setGroup("main" ); |
48 | 48 | ||
@@ -110,3 +110,2 @@ void PMainWindow::slotRotateToggled(bool how) | |||
110 | { | 110 | { |
111 | odebug << "Autorotate: " << how << oendl; | ||
112 | autoRotate = how; | 111 | autoRotate = how; |
@@ -228,2 +227,3 @@ void PMainWindow::initT( const char* name, T** ptr, int id) { | |||
228 | } | 227 | } |
228 | |||
229 | void PMainWindow::initInfo() { | 229 | void PMainWindow::initInfo() { |
@@ -232,2 +232,3 @@ void PMainWindow::initInfo() { | |||
232 | } | 232 | } |
233 | |||
233 | void PMainWindow::initDisp() { | 234 | void PMainWindow::initDisp() { |
@@ -258,3 +259,2 @@ void PMainWindow::slotToggleFullScreen() | |||
258 | { | 259 | { |
259 | odebug << "Toggle full " << oendl; | ||
260 | bool current = !m_aFullScreen->isOn(); | 260 | bool current = !m_aFullScreen->isOn(); |
@@ -263,8 +263,24 @@ void PMainWindow::slotToggleFullScreen() | |||
263 | 263 | ||
264 | void PMainWindow::slotFullScreenToggled(bool current) | 264 | void PMainWindow::slotFullScreenButton(bool current) |
265 | { | ||
266 | if (m_disp) odebug << "Disp fenster ist hidden: "<<m_disp->isHidden()<<oendl; | ||
267 | if (!m_disp) return; | ||
268 | |||
269 | /* I can not solve this effects here - it seems that we require some | ||
270 | status variable, too. so we will live with some interesting effects | ||
271 | meanwhile */ | ||
272 | #if 0 | ||
273 | bool th = m_disp->isHidden(); | ||
274 | setupViewWindow(current, false); | ||
275 | /* realy - after setting up the fullscreenmode while the window is hidden | ||
276 | it is unvisibile not hidden!!!!! Hell. */ | ||
277 | if (th) m_disp->hide(); | ||
278 | #endif | ||
279 | setupViewWindow(current, true); | ||
280 | } | ||
281 | |||
282 | void PMainWindow::setupViewWindow(bool current, bool forceDisplay) | ||
265 | { | 283 | { |
266 | odebug << "slotFullScreenToggled " << current << oendl; | ||
267 | if (!m_disp) return; | 284 | if (!m_disp) return; |
268 | if (current) { | 285 | if (current) { |
269 | odebug << "full" << oendl; | ||
270 | m_disp->setBackgroundColor(black); | 286 | m_disp->setBackgroundColor(black); |
@@ -276,3 +292,2 @@ void PMainWindow::slotFullScreenToggled(bool current) | |||
276 | setUpdatesEnabled(false); | 292 | setUpdatesEnabled(false); |
277 | odebug << "window" << oendl; | ||
278 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { | 293 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { |
@@ -291,3 +306,4 @@ void PMainWindow::slotFullScreenToggled(bool current) | |||
291 | m_disp->setHScrollBarMode(QScrollView::Auto); | 306 | m_disp->setHScrollBarMode(QScrollView::Auto); |
292 | m_stack->raiseWidget(m_disp); | 307 | if (forceDisplay || m_disp->isVisible()) |
308 | m_stack->raiseWidget(m_disp); | ||
293 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { | 309 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { |
@@ -297,3 +313,8 @@ void PMainWindow::slotFullScreenToggled(bool current) | |||
297 | } | 313 | } |
298 | m_disp->setFullScreen(current); | 314 | m_disp->setFullScreen(current,forceDisplay); |
315 | } | ||
316 | |||
317 | void PMainWindow::slotFullScreenToggled(bool current) | ||
318 | { | ||
319 | setupViewWindow(current,true); | ||
299 | } | 320 | } |
@@ -331,3 +352,2 @@ void PMainWindow::slotShowInfo( const QString& inf ) { | |||
331 | void PMainWindow::slotDisplay( const QString& inf ) { | 352 | void PMainWindow::slotDisplay( const QString& inf ) { |
332 | odebug << "slotDisplay: " << inf << oendl; | ||
333 | if ( !m_disp ) { | 353 | if ( !m_disp ) { |
@@ -349,3 +369,2 @@ void PMainWindow::slotDisplay( const QString& inf ) { | |||
349 | if (m_disp->fullScreen()) { | 369 | if (m_disp->fullScreen()) { |
350 | //m_disp->showFullScreen(); | ||
351 | qwsDisplay()->requestFocus( m_disp->winId(), TRUE); | 370 | qwsDisplay()->requestFocus( m_disp->winId(), TRUE); |
@@ -520,3 +539,3 @@ void PMainWindow::setupActions() | |||
520 | m_aFullScreen->setOn(false); | 539 | m_aFullScreen->setOn(false); |
521 | connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenToggled(bool))); | 540 | connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool))); |
522 | 541 | ||
@@ -571,3 +590,3 @@ void PMainWindow::setupToolbar() | |||
571 | m_aTrash->addTo(toolBar); | 590 | m_aTrash->addTo(toolBar); |
572 | m_aSetup->addTo(toolBar); | 591 | // m_aSetup->addTo(toolBar); |
573 | 592 | ||
@@ -588,2 +607,4 @@ void PMainWindow::setupMenu() | |||
588 | menuBar()->insertItem( tr( "Show" ), dispMenu ); | 607 | menuBar()->insertItem( tr( "Show" ), dispMenu ); |
608 | settingsMenu = new QPopupMenu( menuBar() ); | ||
609 | menuBar()->insertItem( tr( "Settings" ), settingsMenu ); | ||
589 | 610 | ||
@@ -606,6 +627,4 @@ void PMainWindow::setupMenu() | |||
606 | fileMenu->insertSeparator(); | 627 | fileMenu->insertSeparator(); |
607 | m_aSetup->addTo(fileMenu); | ||
608 | m_aTrash->addTo(fileMenu); | 628 | m_aTrash->addTo(fileMenu); |
609 | 629 | ||
610 | m_aHideToolbar->addTo(dispMenu); | ||
611 | listviewMenu = new QPopupMenu(dispMenu); | 630 | listviewMenu = new QPopupMenu(dispMenu); |
@@ -618,2 +637,5 @@ void PMainWindow::setupMenu() | |||
618 | m_gPrevNext->addTo(dispMenu); | 637 | m_gPrevNext->addTo(dispMenu); |
638 | |||
639 | m_aSetup->addTo(settingsMenu); | ||
640 | m_aHideToolbar->addTo(settingsMenu); | ||
619 | } | 641 | } |
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h index 65151fc..703965b 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.h +++ b/noncore/graphics/opie-eye/gui/mainwindow.h | |||
@@ -66,2 +66,3 @@ protected slots: | |||
66 | void listviewselected(QAction*); | 66 | void listviewselected(QAction*); |
67 | void slotFullScreenButton(bool); | ||
67 | 68 | ||
@@ -71,2 +72,3 @@ private: | |||
71 | void initDisp(); | 72 | void initDisp(); |
73 | void setupViewWindow(bool full, bool forceDisplay); | ||
72 | 74 | ||
@@ -83,3 +85,3 @@ private: | |||
83 | QToolBar *toolBar; | 85 | QToolBar *toolBar; |
84 | QPopupMenu *fileMenu,*dispMenu,*fsMenu,*listviewMenu; | 86 | QPopupMenu *fileMenu,*dispMenu,*fsMenu,*listviewMenu,*settingsMenu; |
85 | QAction*m_aShowInfo,*m_aBeam,*m_aTrash,*m_aViewfile,*m_aDirUp,*m_aStartSlide; | 87 | QAction*m_aShowInfo,*m_aBeam,*m_aTrash,*m_aViewfile,*m_aDirUp,*m_aStartSlide; |