summaryrefslogtreecommitdiff
authoralwin <alwin>2004-11-01 01:58:25 (UTC)
committer alwin <alwin>2004-11-01 01:58:25 (UTC)
commitd69955ef9cddc3acc37b9dc96945cd4bae56eed5 (patch) (side-by-side diff)
tree7982a6da8f8141292eb0a1c09ce384784af2801d
parent01fb5d6957984fe6fe5ed2109a024be7e8159d16 (diff)
downloadopie-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
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imageinfoui.cpp1
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp7
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.h2
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp54
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h4
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()
{
- odebug << "init imageinfo keys" << oendl;
#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()
if (!m_cfg) {
- m_cfg = new Opie::Core::OConfig("phunkview");
+ m_cfg = new Opie::Core::OConfig("opie-eye");
m_cfg->setGroup("image_view_keys" );
@@ -192,3 +192,3 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e)
-void ImageView::setFullScreen(bool how)
+void ImageView::setFullScreen(bool how,bool force)
{
@@ -198,3 +198,3 @@ void ImageView::setFullScreen(bool how)
setFixedSize(qApp->desktop()->size());
- showFullScreen();
+ if (force) showFullScreen();
} else {
@@ -236,3 +236,2 @@ void ImageView::enableFullscreen()
setUpdatesEnabled(true);
-
}
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:
Opie::Core::OKeyConfigManager* manager();
- void setFullScreen(bool how);
+ void setFullScreen(bool how,bool force=true);
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)
setCaption( QObject::tr("Opie Eye Caramba" ) );
- m_cfg = new Opie::Core::OConfig("phunkview");
- m_cfg->setGroup("Zecke_view" );
+ m_cfg = new Opie::Core::OConfig("opie-eye");
+ m_cfg->setGroup("main" );
@@ -110,3 +110,2 @@ void PMainWindow::slotRotateToggled(bool how)
{
- odebug << "Autorotate: " << how << oendl;
autoRotate = how;
@@ -228,2 +227,3 @@ void PMainWindow::initT( const char* name, T** ptr, int id) {
}
+
void PMainWindow::initInfo() {
@@ -232,2 +232,3 @@ void PMainWindow::initInfo() {
}
+
void PMainWindow::initDisp() {
@@ -258,3 +259,2 @@ void PMainWindow::slotToggleFullScreen()
{
- odebug << "Toggle full " << oendl;
bool current = !m_aFullScreen->isOn();
@@ -263,8 +263,24 @@ void PMainWindow::slotToggleFullScreen()
-void PMainWindow::slotFullScreenToggled(bool current)
+void PMainWindow::slotFullScreenButton(bool current)
+{
+ if (m_disp) odebug << "Disp fenster ist hidden: "<<m_disp->isHidden()<<oendl;
+ if (!m_disp) return;
+
+ /* I can not solve this effects here - it seems that we require some
+ status variable, too. so we will live with some interesting effects
+ meanwhile */
+#if 0
+ bool th = m_disp->isHidden();
+ setupViewWindow(current, false);
+ /* realy - after setting up the fullscreenmode while the window is hidden
+ it is unvisibile not hidden!!!!! Hell. */
+ if (th) m_disp->hide();
+#endif
+ setupViewWindow(current, true);
+}
+
+void PMainWindow::setupViewWindow(bool current, bool forceDisplay)
{
- odebug << "slotFullScreenToggled " << current << oendl;
if (!m_disp) return;
if (current) {
- odebug << "full" << oendl;
m_disp->setBackgroundColor(black);
@@ -276,3 +292,2 @@ void PMainWindow::slotFullScreenToggled(bool current)
setUpdatesEnabled(false);
- odebug << "window" << oendl;
if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
@@ -291,3 +306,4 @@ void PMainWindow::slotFullScreenToggled(bool current)
m_disp->setHScrollBarMode(QScrollView::Auto);
- m_stack->raiseWidget(m_disp);
+ if (forceDisplay || m_disp->isVisible())
+ m_stack->raiseWidget(m_disp);
if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
@@ -297,3 +313,8 @@ void PMainWindow::slotFullScreenToggled(bool current)
}
- m_disp->setFullScreen(current);
+ m_disp->setFullScreen(current,forceDisplay);
+}
+
+void PMainWindow::slotFullScreenToggled(bool current)
+{
+ setupViewWindow(current,true);
}
@@ -331,3 +352,2 @@ void PMainWindow::slotShowInfo( const QString& inf ) {
void PMainWindow::slotDisplay( const QString& inf ) {
- odebug << "slotDisplay: " << inf << oendl;
if ( !m_disp ) {
@@ -349,3 +369,2 @@ void PMainWindow::slotDisplay( const QString& inf ) {
if (m_disp->fullScreen()) {
- //m_disp->showFullScreen();
qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
@@ -520,3 +539,3 @@ void PMainWindow::setupActions()
m_aFullScreen->setOn(false);
- connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenToggled(bool)));
+ connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool)));
@@ -571,3 +590,3 @@ void PMainWindow::setupToolbar()
m_aTrash->addTo(toolBar);
- m_aSetup->addTo(toolBar);
+// m_aSetup->addTo(toolBar);
@@ -588,2 +607,4 @@ void PMainWindow::setupMenu()
menuBar()->insertItem( tr( "Show" ), dispMenu );
+ settingsMenu = new QPopupMenu( menuBar() );
+ menuBar()->insertItem( tr( "Settings" ), settingsMenu );
@@ -606,6 +627,4 @@ void PMainWindow::setupMenu()
fileMenu->insertSeparator();
- m_aSetup->addTo(fileMenu);
m_aTrash->addTo(fileMenu);
- m_aHideToolbar->addTo(dispMenu);
listviewMenu = new QPopupMenu(dispMenu);
@@ -618,2 +637,5 @@ void PMainWindow::setupMenu()
m_gPrevNext->addTo(dispMenu);
+
+ m_aSetup->addTo(settingsMenu);
+ m_aHideToolbar->addTo(settingsMenu);
}
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:
void listviewselected(QAction*);
+ void slotFullScreenButton(bool);
@@ -71,2 +72,3 @@ private:
void initDisp();
+ void setupViewWindow(bool full, bool forceDisplay);
@@ -83,3 +85,3 @@ private:
QToolBar *toolBar;
- QPopupMenu *fileMenu,*dispMenu,*fsMenu,*listviewMenu;
+ QPopupMenu *fileMenu,*dispMenu,*fsMenu,*listviewMenu,*settingsMenu;
QAction*m_aShowInfo,*m_aBeam,*m_aTrash,*m_aViewfile,*m_aDirUp,*m_aStartSlide;