summaryrefslogtreecommitdiff
authoralwin <alwin>2004-04-14 08:25:56 (UTC)
committer alwin <alwin>2004-04-14 08:25:56 (UTC)
commit3ed50198400e432b308ca58178f562e2e256de0e (patch) (side-by-side diff)
tree309807f0fcd25684a32c74e742089755553e9c11
parent79558e549b0ce1fa17fe79fc437859d137ad821f (diff)
downloadopie-3ed50198400e432b308ca58178f562e2e256de0e.zip
opie-3ed50198400e432b308ca58178f562e2e256de0e.tar.gz
opie-3ed50198400e432b308ca58178f562e2e256de0e.tar.bz2
in BigScreen mode the imagedisplay will get a minimum size half of the screen
Zecke: I had to deactivate your viewbuttons 'cause you forgot to add the files for it ;)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp21
-rw-r--r--noncore/graphics/opie-eye/phunk_view.pro8
2 files changed, 22 insertions, 7 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index dd9cced..f63b5a1 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -1,24 +1,25 @@
/*
* GPLv2 zecke@handhelds.org
* No WArranty...
*/
#include "mainwindow.h"
#include "iconview.h"
#include "filesystem.h"
#include "imageinfoui.h"
#include "imageview.h"
+#if 0
#include "viewmodebutton.h"
-
+#endif
#include <iface/ifaceinfo.h>
#include <iface/dirview.h>
#include <opie2/odebug.h>
#include <opie2/owidgetstack.h>
#include <opie2/oapplicationfactory.h>
#include <opie2/otabwidget.h>
#include <opie2/okeyconfigwidget.h>
#include <qpe/resource.h>
#include <qpe/config.h>
#include <qpe/ir.h>
@@ -53,24 +54,26 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
m_stack = new Opie::Ui::OWidgetStack( this );
setCentralWidget( m_stack );
m_view = new PIconView( m_stack, m_cfg );
m_stack->addWidget( m_view, IconView );
m_stack->raiseWidget( IconView );
connect(m_view, SIGNAL(sig_display(const QString&)),
this, SLOT(slotDisplay(const QString&)));
connect(m_view, SIGNAL(sig_showInfo(const QString&)),
this, SLOT(slotShowInfo(const QString&)) );
+ m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce);
+
QToolButton *btn = new QToolButton( bar );
btn->setIconSet( Resource::loadIconSet( "up" ) );
connect( btn, SIGNAL(clicked()),
m_view, SLOT(slotDirUp()) );
btn = new PFileSystem( bar );
connect( btn, SIGNAL( changeDir( const QString& ) ),
m_view, SLOT(slotChangeDir( const QString& ) ) );
btn = new QToolButton( bar );
btn->setIconSet( Resource::loadIconSet( "edit" ) );
connect( btn, SIGNAL(clicked()),
@@ -79,39 +82,48 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
if ( Ir::supported() ) {
btn = new QToolButton( bar );
btn->setIconSet( Resource::loadIconSet( "beam" ) );
connect( btn, SIGNAL(clicked()),
m_view, SLOT(slotBeam()) );
}
btn = new QToolButton( bar );
btn->setIconSet( Resource::loadIconSet( "trash" ) );
connect( btn, SIGNAL(clicked() ),
m_view, SLOT(slotTrash() ) );
+#if 0
btn = new ViewModeButton( bar );
connect( btn, SIGNAL(changeMode(int)),
m_view, SLOT(slotChangeMode(int)));
-
+#endif
btn = new QToolButton( bar );
btn->setIconSet( Resource::loadIconSet( "SettingsIcon" ) );
connect( btn, SIGNAL(clicked() ),
this, SLOT(slotConfig() ) );
rotateButton = new QToolButton(bar);
rotateButton->setIconSet( Resource::loadIconSet( "rotate" ) );
rotateButton->setToggleButton(true);
+
+ odebug << "Mode = " << m_stack->mode() << oendl;
+ if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
rotateButton->setOn(true);
- connect(rotateButton,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool)));
autoRotate = true;
+ } else {
+ rotateButton->setOn(false);
+ autoRotate = false;
+ }
+
+ connect(rotateButton,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool)));
btn = new QToolButton(bar);
btn->setIconSet( Resource::loadIconSet( "1to1" ) );
btn->setToggleButton(true);
btn->setOn(false);
connect(btn,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool)));
autoScale = true;
btn = new QToolButton(bar);
btn->setIconSet( Resource::loadIconSet( "mag" ) );
btn->setToggleButton(true);
btn->setOn(true);
@@ -239,24 +251,27 @@ void PMainWindow::initT( const char* name, T** ptr, int id) {
connect(*ptr, SIGNAL(sig_return()),
this,SLOT(slotReturn()));
}
void PMainWindow::initInfo() {
initT<imageinfo>( "Image Info", &m_info, ImageInfo );
connect(m_info,SIGNAL(dispImage(const QString&)),this,SLOT(slotDisplay(const QString&)));
}
void PMainWindow::initDisp() {
initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay );
if (m_disp) {
+ if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
+ m_disp->setMinimumSize(QApplication::desktop()->size()/2);
+ }
m_disp->setAutoScale(autoScale);
m_disp->setAutoRotate(autoRotate);
m_disp->setShowZoomer(zoomerOn);
connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&)));
}
}
/**
* With big Screen the plan could be to 'detach' the image
* window if visible and to create a ne wone
* init* already supports it but I make no use of it for
* now. We set filename and raise
diff --git a/noncore/graphics/opie-eye/phunk_view.pro b/noncore/graphics/opie-eye/phunk_view.pro
index e9459ad..0aa7e14 100644
--- a/noncore/graphics/opie-eye/phunk_view.pro
+++ b/noncore/graphics/opie-eye/phunk_view.pro
@@ -3,39 +3,39 @@ DESTDIR = $(OPIEDIR)/bin
TEMPLATE = app
TARGET = opie-eye
# the name of the resulting object
HEADERS = gui/iconview.h gui/filesystem.h gui/mainwindow.h \
lib/imagecache.h impl/dir/dir_dirview.h \
iface/dirview.h iface/dirlister.h iface/ifaceinfo.h \
impl/dir/dir_lister.h impl/dir/dir_ifaceinfo.h \
lib/slavemaster.h \
iface/slaveiface.h \
gui/imageinfoui.h gui/imagescrollview.h \
gui/imageview.h \
- lib/oimagezoomer.h \
- gui/viewmodebutton.h
+ lib/oimagezoomer.h #\
+# gui/viewmodebutton.h
# A list header files
SOURCES = gui/iconview.cpp gui/filesystem.cpp gui/mainwindow.cpp \
lib/imagecache.cpp lib/viewmap.cpp \
impl/dir/dir_dirview.cpp iface/dirlister.cpp \
iface/dirview.cpp impl/dir/dir_lister.cpp \
impl/dir/dir_ifaceinfo.cpp lib/slavemaster.cpp \
gui/imageinfoui.cpp gui/imagescrollview.cpp \
gui/imageview.cpp \
- lib/oimagezoomer.cpp \
- gui/viewmodebutton.cpp
+ lib/oimagezoomer.cpp #\
+# gui/viewmodebutton.cpp
# A list of source files
INTERFACES =
# list of ui files
INCLUDEPATH += . $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopiecore2 -lopieui2