summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/.cvsignore2
-rw-r--r--noncore/graphics/opie-eye/gui/gui.pro15
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp23
-rw-r--r--noncore/graphics/opie-eye/iface/dirlister.cpp13
-rw-r--r--noncore/graphics/opie-eye/iface/dirlister.h6
-rw-r--r--noncore/graphics/opie-eye/iface/iface.pro7
-rw-r--r--noncore/graphics/opie-eye/iface/ifaceinfo.h0
-rw-r--r--noncore/graphics/opie-eye/impl/dcim/dcim.pro10
-rw-r--r--noncore/graphics/opie-eye/impl/dcim/dcim_dirview.cpp28
-rw-r--r--noncore/graphics/opie-eye/impl/dcim/dcim_dirview.h26
-rw-r--r--noncore/graphics/opie-eye/impl/dcim/dcim_ifaceinfo.cpp22
-rw-r--r--noncore/graphics/opie-eye/impl/dcim/dcim_ifaceinfo.h22
-rw-r--r--noncore/graphics/opie-eye/impl/dcim/dcim_lister.cpp181
-rw-r--r--noncore/graphics/opie-eye/impl/dcim/dcim_lister.h71
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir.pro10
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp3
-rw-r--r--noncore/graphics/opie-eye/impl/dir/dir_lister.cpp12
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc.pro7
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_ifaceinfo.cpp2
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.cpp15
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.h1
-rw-r--r--noncore/graphics/opie-eye/lib/slavemaster.cpp18
-rw-r--r--noncore/graphics/opie-eye/lib/slavemaster.h10
-rw-r--r--noncore/graphics/opie-eye/phunk_view.pro37
-rw-r--r--noncore/graphics/opie-eye/slave/.cvsignore2
25 files changed, 479 insertions, 64 deletions
diff --git a/noncore/graphics/opie-eye/.cvsignore b/noncore/graphics/opie-eye/.cvsignore
new file mode 100644
index 0000000..52494fb
--- a/dev/null
+++ b/noncore/graphics/opie-eye/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+*.moc
diff --git a/noncore/graphics/opie-eye/gui/gui.pro b/noncore/graphics/opie-eye/gui/gui.pro
new file mode 100644
index 0000000..b9f0bf8
--- a/dev/null
+++ b/noncore/graphics/opie-eye/gui/gui.pro
@@ -0,0 +1,15 @@
+HEADERS += gui/filesystem.h \
+ gui/iconview.h \
+ gui/imageinfoui.h \
+ gui/imageview.h \
+ gui/mainwindow.h \
+ gui/viewmodebutton.h
+
+SOURCES += gui/filesystem.cpp \
+ gui/iconview.cpp \
+ gui/imageinfoui.cpp \
+ gui/imageview.cpp \
+ gui/mainwindow.cpp \
+ gui/viewmodebutton.cpp
+
+
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index 652acc9..7196aba 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -43,3 +43,2 @@ namespace {
static QPixmap* _unkPix = 0;
- static QPixmap* _picPix = 0;
static QPixmap* _emptyPix = 0;
@@ -100,3 +99,3 @@ namespace {
- inline void IconViewItem::setPixmap( const QPixmap & icon, bool recalc, bool redraw)
+ inline void IconViewItem::setPixmap( const QPixmap & , bool, bool )
{
@@ -105,3 +104,3 @@ namespace {
}
- inline void IconViewItem::setPixmap( const QPixmap & icon)
+ inline void IconViewItem::setPixmap( const QPixmap & )
{
@@ -255,6 +254,3 @@ void PIconView::slotDirUp()
{
- if (m_path.isEmpty()) return;
- QDir dir( m_path );
- dir.cdUp();
- slotChangeDir( dir.absPath() );
+ slotChangeDir( currentView()->dirLister()->dirUp( m_path ) );
}
@@ -381,7 +377,13 @@ void PIconView::slotViewChanged( int i) {
ViewMap* map = viewMap();
- if (!map) {setCurrentView(0l); return;}
+ if (!map) {
+ setCurrentView(0l);
+ return;
+ }
+
if (map->find(str) == map->end()) {
owarn << "Key not found" << oendl;
- setCurrentView(0l); return;
+ setCurrentView(0l);
+ return;
}
+
m_cfg->writeEntry("LastView",str);
@@ -403,3 +405,4 @@ void PIconView::slotViewChanged( int i) {
- /* reload now */
+ /* reload now with default Path*/
+ m_path = lis->defaultPath();
QTimer::singleShot( 0, this, SLOT(slotReloadDir()));
diff --git a/noncore/graphics/opie-eye/iface/dirlister.cpp b/noncore/graphics/opie-eye/iface/dirlister.cpp
index 7cf4361..e0ae63b 100644
--- a/noncore/graphics/opie-eye/iface/dirlister.cpp
+++ b/noncore/graphics/opie-eye/iface/dirlister.cpp
@@ -2,2 +2,3 @@
+#include <qdir.h>
@@ -9 +10,13 @@ PDirLister::~PDirLister()
{}
+
+/**
+ * Change dir one level up. The default implementation
+ * is to use QDir to change the dir.
+ * If you've a flat filesystem return \par path immediately.
+ */
+QString PDirLister::dirUp( const QString& path )const {
+ QDir dir( path );
+ dir.cdUp();
+
+ return dir.absPath();
+}
diff --git a/noncore/graphics/opie-eye/iface/dirlister.h b/noncore/graphics/opie-eye/iface/dirlister.h
index 9c7b2a9..68e8495 100644
--- a/noncore/graphics/opie-eye/iface/dirlister.h
+++ b/noncore/graphics/opie-eye/iface/dirlister.h
@@ -25,2 +25,6 @@ public:
virtual QStringList files()const = 0;
+ virtual QString nameToFname(const QString&name)const = 0;
+ virtual QString dirUp(const QString&)const ;
+
+
public slots:
@@ -31,3 +35,3 @@ public slots:
virtual QImage image( const QString&, Factor, int max = 0) = 0;
- virtual QString nameToFname(const QString&name)const = 0;
+
diff --git a/noncore/graphics/opie-eye/iface/iface.pro b/noncore/graphics/opie-eye/iface/iface.pro
new file mode 100644
index 0000000..2ec499a
--- a/dev/null
+++ b/noncore/graphics/opie-eye/iface/iface.pro
@@ -0,0 +1,7 @@
+HEADERS += iface/dirlister.h \
+ iface/dirview.h \
+ iface/ifaceinfo.h \
+ iface/slaveiface.h
+
+SOURCES += iface/dirlister.cpp \
+ iface/dirview.cpp
diff --git a/noncore/graphics/opie-eye/iface/ifaceinfo.h b/noncore/graphics/opie-eye/iface/ifaceinfo.h
index 74e0db6..3af2fce 100644
--- a/noncore/graphics/opie-eye/iface/ifaceinfo.h
+++ b/noncore/graphics/opie-eye/iface/ifaceinfo.h
diff --git a/noncore/graphics/opie-eye/impl/dcim/dcim.pro b/noncore/graphics/opie-eye/impl/dcim/dcim.pro
new file mode 100644
index 0000000..a8e8f05
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dcim/dcim.pro
@@ -0,0 +1,10 @@
+HEADERS += impl/dcim/dcim_dirview.h \
+ impl/dcim/dcim_ifaceinfo.h \
+ impl/dcim/dcim_lister.h
+
+
+
+SOURCES += impl/dcim/dcim_dirview.cpp \
+ impl/dcim/dcim_ifaceinfo.cpp \
+ impl/dcim/dcim_lister.cpp
+
diff --git a/noncore/graphics/opie-eye/impl/dcim/dcim_dirview.cpp b/noncore/graphics/opie-eye/impl/dcim/dcim_dirview.cpp
new file mode 100644
index 0000000..e55c27a
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dcim/dcim_dirview.cpp
@@ -0,0 +1,28 @@
+#include "dcim_dirview.h"
+
+#include "dcim_lister.h"
+#include "dcim_ifaceinfo.h"
+
+PHUNK_VIEW_INTERFACE( "Digital Camera", DCIM_DirView );
+
+DCIM_DirView::DCIM_DirView( const Config& cfg )
+ : PDirView( cfg ), m_lister( 0l ), m_info( 0l )
+{}
+
+DCIM_DirView::~DCIM_DirView()
+{}
+
+PInterfaceInfo* DCIM_DirView::interfaceInfo()const {
+ if ( !m_info )
+ m_info = new DCIM_InterfaceInfo;
+
+ return m_info;
+}
+
+
+PDirLister* DCIM_DirView::dirLister()const {
+ if ( !m_lister )
+ m_lister = new DCIM_DirLister();
+
+ return m_lister;
+}
diff --git a/noncore/graphics/opie-eye/impl/dcim/dcim_dirview.h b/noncore/graphics/opie-eye/impl/dcim/dcim_dirview.h
new file mode 100644
index 0000000..7fc38ec
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dcim/dcim_dirview.h
@@ -0,0 +1,26 @@
+/*
+ * GPLv2 only zecke@handhelds.org
+ */
+
+#ifndef DCIM_DIR_VIEW_H
+#define DCIM_DIR_VIEW_H
+
+#include <iface/dirview.h>
+
+/*
+ * Implementation for USB Host Digital Cameras
+ * like my Casio QV 500 and boring Yakumo
+ */
+struct DCIM_DirView : public PDirView {
+ DCIM_DirView( const Config& );
+ ~DCIM_DirView();
+
+ PInterfaceInfo* interfaceInfo()const;
+ PDirLister * dirLister ()const;
+
+private:
+ mutable PDirLister *m_lister;
+ mutable PInterfaceInfo *m_info ;
+};
+
+#endif
diff --git a/noncore/graphics/opie-eye/impl/dcim/dcim_ifaceinfo.cpp b/noncore/graphics/opie-eye/impl/dcim/dcim_ifaceinfo.cpp
new file mode 100644
index 0000000..ca94dc5
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dcim/dcim_ifaceinfo.cpp
@@ -0,0 +1,22 @@
+/*
+ * GPLv2
+ * zecke@handhelds.org
+ */
+
+
+#include "dcim_ifaceinfo.h"
+
+#include <qobject.h>
+
+DCIM_InterfaceInfo::DCIM_InterfaceInfo() {}
+DCIM_InterfaceInfo::~DCIM_InterfaceInfo() {}
+
+QString DCIM_InterfaceInfo::name()const {
+ return QObject::tr( "Digital Camera View" );
+}
+
+QWidget* DCIM_InterfaceInfo::configWidget( const Config& ) {
+ return 0l;
+}
+
+void DCIM_InterfaceInfo::writeConfig( QWidget*, Config& ) {}
diff --git a/noncore/graphics/opie-eye/impl/dcim/dcim_ifaceinfo.h b/noncore/graphics/opie-eye/impl/dcim/dcim_ifaceinfo.h
new file mode 100644
index 0000000..6396047
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dcim/dcim_ifaceinfo.h
@@ -0,0 +1,22 @@
+/*
+ * GPLv2
+ * zecke@handhelds.org
+ */
+
+#ifndef DCIM_IFACE_INFO_H
+#define DCIM_IFACE_INFO_H
+
+#include <iface/ifaceinfo.h>
+
+class DCIM_InterfaceInfo : public PInterfaceInfo {
+public:
+ DCIM_InterfaceInfo();
+ virtual ~DCIM_InterfaceInfo();
+
+ QString name()const;
+ QWidget* configWidget( const Config& );
+ void writeConfig( QWidget* wid, Config& );
+};
+
+
+#endif
diff --git a/noncore/graphics/opie-eye/impl/dcim/dcim_lister.cpp b/noncore/graphics/opie-eye/impl/dcim/dcim_lister.cpp
new file mode 100644
index 0000000..3c3d702
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dcim/dcim_lister.cpp
@@ -0,0 +1,181 @@
+/*
+ * GPLv2 zecke@handhelds.org
+ */
+
+#include "dcim_lister.h"
+#include <lib/slavemaster.h>
+
+#include <opie2/odebug.h>
+#include <qpe/storage.h>
+
+#include <qdir.h>
+#include <qfileinfo.h>
+#include <qimage.h>
+
+DCIM_DirLister::DCIM_DirLister()
+ : PDirLister( "dcim_dirlister" )
+{
+
+ /*
+ * create a SlaveMaster and lets connect the signal of
+ * it to our interface
+ */
+ SlaveHelper::slaveConnectSignals( this );
+ m_mode = ListingUnknown;
+}
+
+DCIM_DirLister::~DCIM_DirLister() {}
+
+QString DCIM_DirLister::defaultPath()const {
+ m_mode = ListingStart;
+ return QString::null;
+}
+
+QString DCIM_DirLister::setStartPath( const QString& str) {
+ /**
+ * IconView adds a '/' to path. Lets strip
+ * that.
+ */
+ QString st = str.mid( 1 );
+ if ( ListingStart == m_mode && m_map.contains( st ) ) {
+ m_path = m_map[st]+ "/dcim";
+ m_mode = ListingFolder;
+ }else if ( m_mode == ListingFolder ) {
+ m_mode = ListingFiles;
+ m_path = str;
+ }else if ( m_mode == ListingReFolder ) {
+ m_mode = ListingFolder;
+ }
+
+ owarn << " StartPath2 " << str << " " << m_path << oendl;
+
+ return m_path;
+}
+
+
+QString DCIM_DirLister::currentPath()const {
+ return m_path;
+}
+
+/*
+ * depending on the mode we will either
+ * Find Digital Cameras
+ */
+QStringList DCIM_DirLister::folders()const {
+ QStringList lst;
+
+ switch( m_mode ) {
+ case ListingUnknown:
+ case ListingStart:
+ lst = findCameras();
+ break;
+ case ListingFolder:
+ lst = findAlbums();
+ break;
+ case ListingFiles:
+ default:
+ break;
+ }
+
+ return lst;
+}
+
+QStringList DCIM_DirLister::files()const {
+ if ( m_mode != ListingFiles )
+ return QStringList();
+ else
+ return findImages();
+}
+
+QString DCIM_DirLister::dirUp( const QString& p )const {
+ QString str;
+
+ switch( m_mode ) {
+ case ListingFiles:
+ m_mode = ListingReFolder;
+ str = PDirLister::dirUp( p );
+ break;
+ case ListingFolder:
+ m_mode = ListingStart;
+ break;
+ case ListingUnknown:
+ case ListingStart:
+ default:
+ break;
+ }
+
+ /* down cases */
+ owarn << " New String " << str << " old path " << m_mode << oendl;
+ m_path = str;
+ return str;
+}
+
+
+QStringList DCIM_DirLister::findCameras()const {
+ QStringList lst;
+ StorageInfo inf;
+
+ m_map.clear();
+
+ const QList<FileSystem> &list = inf.fileSystems();
+ QListIterator<FileSystem> it( list );
+
+
+ FileSystem *sys;
+ for ( sys = it.current(); (sys=it.current())!=0 ; ++it )
+ if ( QFileInfo( sys->path() + "/dcim/" ).exists() ) {
+ lst << sys->name();
+ m_map.insert( sys->name(), sys->path() );
+ }
+
+ if ( lst.isEmpty() ) {
+ m_mode = ListingUnknown;
+ lst << QObject::tr("Error no Camera Dir found");
+ }else
+ m_mode = ListingStart;
+
+ return lst;
+}
+
+QStringList DCIM_DirLister::findAlbums()const {
+ QStringList lst = QDir( m_path ).entryList( QDir::Dirs );
+ lst.remove( "." );
+ lst.remove( ".." );
+
+ return lst;
+}
+
+QStringList DCIM_DirLister::findImages()const {
+ return QDir( m_path ).entryList("*.jpg *.jpeg *.png", QDir::Files );
+}
+
+void DCIM_DirLister::deleteImage( const QString& fl ) {
+ QFileInfo inf( fl );
+ QFile::remove( fl );
+ QFile::remove( inf.dirPath ()+"/preview"+
+ inf.fileName() );
+}
+
+void DCIM_DirLister::thumbNail( const QString& _str, int w, int h ) {
+ QFileInfo inf( _str );
+ QString str = QFileInfo( inf.dirPath()+"/preview"+ inf.fileName() ).exists() ?
+ inf.dirPath()+"/preview"+ inf.fileName() : _str;
+
+ SlaveMaster::self()->thumbNail( str, w, h );
+}
+
+QImage DCIM_DirLister::image( const QString& str, Factor f, int m ) {
+ return SlaveMaster::self()->image( str, f, m );
+}
+
+void DCIM_DirLister::imageInfo( const QString& str ) {
+ SlaveMaster::self()->thumbInfo( str );
+}
+
+void DCIM_DirLister::fullImageInfo( const QString& str ) {
+ SlaveMaster::self()->imageInfo( str );
+}
+
+QString DCIM_DirLister::nameToFname( const QString& name )const {
+ return name;
+}
diff --git a/noncore/graphics/opie-eye/impl/dcim/dcim_lister.h b/noncore/graphics/opie-eye/impl/dcim/dcim_lister.h
new file mode 100644
index 0000000..d0a2031
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dcim/dcim_lister.h
@@ -0,0 +1,71 @@
+/*
+ * GPLv2 zecke@handhelds.org
+ */
+
+#ifndef DCIM_LISTER_H
+#define DCIM_LISTER_H
+
+#include <iface/dirlister.h>
+
+#include <qmap.h>
+
+class Config;
+
+/**
+ * The DirLister is responsible for
+ * telling the GUI about files and folders
+ * and to load them.
+ * The DCIM is a special FileSystem lister
+ * in the that it starts with an overview
+ * of available 'Cameras'. It looks via 'Storage'
+ * for paths including a 'dcim' directory.
+ * And offers these as folders.
+ * Then it only lists Images. It tries to use
+ * the 'preview' directory to generate a thumbnail
+ * but will use the full image for the QImage
+ * call.
+ *
+ */
+class DCIM_DirLister : public PDirLister {
+ Q_OBJECT
+public:
+ enum ListMode{
+ ListingUnknown = -1,
+ ListingStart=1, /* give an overview over files */
+ ListingFolder, /* give access to albums */
+ ListingFiles, /* list the content of the album */
+ ListingReFolder
+ };
+ DCIM_DirLister();
+ ~DCIM_DirLister();
+
+ QString defaultPath()const;
+ QString setStartPath( const QString& );
+
+ QString currentPath()const;
+ QStringList folders()const;
+ QStringList files() const;
+
+ void deleteImage( const QString& );
+
+ void thumbNail( const QString&, int, int );
+ QImage image( const QString&, Factor, int );
+ void imageInfo( const QString& );
+ void fullImageInfo( const QString& );
+
+
+ virtual QString nameToFname( const QString& )const;
+ virtual QString dirUp(const QString& )const;
+
+private:
+ QStringList findCameras()const;
+ QStringList findAlbums ()const;
+ QStringList findImages ()const;
+
+private:
+ mutable QString m_path;
+ mutable ListMode m_mode;
+ mutable QMap<QString, QString> m_map;
+};
+
+#endif
diff --git a/noncore/graphics/opie-eye/impl/dir/dir.pro b/noncore/graphics/opie-eye/impl/dir/dir.pro
new file mode 100644
index 0000000..675c327
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/dir/dir.pro
@@ -0,0 +1,10 @@
+HEADERS += impl/dir/dir_dirview.h \
+ impl/dir/dir_ifaceinfo.h \
+ impl/dir/dir_lister.h
+
+
+
+SOURCES += impl/dir/dir_dirview.cpp \
+ impl/dir/dir_ifaceinfo.cpp \
+ impl/dir/dir_lister.cpp
+
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp
index 5599ad1..f4a6a87 100644
--- a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp
+++ b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp
@@ -10,3 +10,2 @@
#include <qpe/config.h>
-using namespace Opie::Core;
@@ -36,3 +35,3 @@ DirInterfaceInfo::~DirInterfaceInfo() {
QString DirInterfaceInfo::name()const {
- return QString::fromLatin1(QObject::tr("DirView" ));
+ return QObject::tr("Directory View" );
}
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp
index 3717297..d8b332a 100644
--- a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp
+++ b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp
@@ -23,13 +23,3 @@ Dir_DirLister::Dir_DirLister( bool list )
owarn << "All Files " << m_allFiles << "" << oendl;
-
- SlaveMaster* master = SlaveMaster::self();
- connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) );
- connect( master, SIGNAL(sig_end()), this, SIGNAL(sig_end()) );
- connect( master, SIGNAL(sig_thumbInfo(const QString&, const QString&)),
- this, SIGNAL(sig_thumbInfo(const QString&, const QString&)) );
- connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)),
- this, SIGNAL(sig_fullInfo(const QString&, const QString&)) );
- connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)),
- this, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)) );
-
+ SlaveHelper::slaveConnectSignals( this );
}
diff --git a/noncore/graphics/opie-eye/impl/doc/doc.pro b/noncore/graphics/opie-eye/impl/doc/doc.pro
new file mode 100644
index 0000000..076aa3b
--- a/dev/null
+++ b/noncore/graphics/opie-eye/impl/doc/doc.pro
@@ -0,0 +1,7 @@
+HEADERS += impl/doc/doc_dirview.h \
+ impl/doc/doc_ifaceinfo.h \
+ impl/doc/doc_lister.h
+
+SOURCES += impl/doc/doc_dirview.cpp \
+ impl/doc/doc_ifaceinfo.cpp \
+ impl/doc/doc_lister.cpp
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_ifaceinfo.cpp b/noncore/graphics/opie-eye/impl/doc/doc_ifaceinfo.cpp
index a6d6f3c..356a4b6 100644
--- a/noncore/graphics/opie-eye/impl/doc/doc_ifaceinfo.cpp
+++ b/noncore/graphics/opie-eye/impl/doc/doc_ifaceinfo.cpp
@@ -40,3 +40,3 @@ QString DocInterfaceInfo::name()const {
-QWidget* DocInterfaceInfo::configWidget(const Config& cfg) {
+QWidget* DocInterfaceInfo::configWidget(const Config& ) {
#if 0
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
index d4d1831..722fb95 100644
--- a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
+++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
@@ -23,2 +23,3 @@ Doc_DirLister::Doc_DirLister()
{
+ /* connect the signals */
SlaveMaster* master = SlaveMaster::self();
@@ -38,3 +39,3 @@ Doc_DirLister::Doc_DirLister()
QString Doc_DirLister::defaultPath()const {
- return ""; QPEApplication::documentDir();
+ return QString::null;
}
@@ -80,3 +81,2 @@ void Doc_DirLister::thumbNail( const QString& str, int w, int h) {
if (m_namemap.find(str)==m_namemap.end()) {
- owarn << "Item " << str << " not found" << oendl;
return;
@@ -89,3 +89,2 @@ QImage Doc_DirLister::image( const QString& str, Factor f, int m) {
if (m_namemap.find(str)==m_namemap.end()) {
- owarn << "Item " << str << " not found" << oendl;
return QImage();
@@ -98,3 +97,2 @@ void Doc_DirLister::imageInfo( const QString& str) {
if (m_namemap.find(str)==m_namemap.end()) {
- owarn << "Item " << str << " not found" << oendl;
return;
@@ -107,3 +105,2 @@ void Doc_DirLister::fullImageInfo( const QString& str) {
if (m_namemap.find(str)==m_namemap.end()) {
- owarn << "Item " << str << " not found" << oendl;
return;
@@ -117,3 +114,2 @@ void Doc_DirLister::slotFullInfo(const QString&f, const QString&t)
if (m_filemap.find(f)==m_filemap.end()) {
- owarn << "Item " << f << " not found" << oendl;
return;
@@ -127,3 +123,2 @@ void Doc_DirLister::slotThumbInfo(const QString&f, const QString&t)
if (m_filemap.find(f)==m_filemap.end()) {
- owarn << "Item " << f << " not found" << oendl;
return;
@@ -137,3 +132,2 @@ void Doc_DirLister::slotThumbNail(const QString&f, const QPixmap&p)
if (m_filemap.find(f)==m_filemap.end()) {
- owarn << "Item " << f << " not found" << oendl;
return;
@@ -147,3 +141,2 @@ QString Doc_DirLister::nameToFname(const QString&name)const
if (m_namemap.find(name)==m_namemap.end()) {
- owarn << "Item " << name << " not found" << oendl;
return QString::null;
@@ -152 +145,5 @@ QString Doc_DirLister::nameToFname(const QString&name)const
}
+
+QString Doc_DirLister::dirUp( const QString& p ) const{
+ return p;
+}
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.h b/noncore/graphics/opie-eye/impl/doc/doc_lister.h
index a65b616..5884a35 100644
--- a/noncore/graphics/opie-eye/impl/doc/doc_lister.h
+++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.h
@@ -31,2 +31,3 @@ public:
virtual QString nameToFname(const QString&name)const;
+ QString dirUp( const QString& )const;
diff --git a/noncore/graphics/opie-eye/lib/slavemaster.cpp b/noncore/graphics/opie-eye/lib/slavemaster.cpp
index 5bb7ab8..d7165cc 100644
--- a/noncore/graphics/opie-eye/lib/slavemaster.cpp
+++ b/noncore/graphics/opie-eye/lib/slavemaster.cpp
@@ -151,4 +151,20 @@ void SlaveMaster::slotTimerStart() {
-QImage SlaveMaster::image( const QString& str, PDirLister::Factor, int ) {
+QImage SlaveMaster::image( const QString& , PDirLister::Factor, int ) {
return QImage();
}
+
+
+namespace SlaveHelper {
+void slaveConnectSignals( QObject* target ) {
+ SlaveMaster* master = SlaveMaster::self();
+
+ QObject::connect( master, SIGNAL(sig_start()), target, SIGNAL(sig_start()) );
+ QObject::connect( master, SIGNAL(sig_end()), target, SIGNAL(sig_end()) );
+ QObject::connect( master, SIGNAL(sig_thumbInfo(const QString&, const QString&)),
+ target, SIGNAL(sig_thumbInfo(const QString&, const QString&)) );
+ QObject::connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)),
+ target, SIGNAL(sig_fullInfo(const QString&, const QString&)) );
+ QObject::connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)),
+ target, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)) );
+}
+}
diff --git a/noncore/graphics/opie-eye/lib/slavemaster.h b/noncore/graphics/opie-eye/lib/slavemaster.h
index f5284a6..98c3403 100644
--- a/noncore/graphics/opie-eye/lib/slavemaster.h
+++ b/noncore/graphics/opie-eye/lib/slavemaster.h
@@ -10,2 +10,12 @@
+namespace SlaveHelper {
+/**
+ * Small Helper to create a SlaveMaster
+ * and to connect its' signals to the
+ * object. To use the object as a proxy
+ */
+void slaveConnectSignals( QObject* );
+}
+
+
class SlaveMaster : public QObject {
diff --git a/noncore/graphics/opie-eye/phunk_view.pro b/noncore/graphics/opie-eye/phunk_view.pro
index 0a57a0f..b266f9a 100644
--- a/noncore/graphics/opie-eye/phunk_view.pro
+++ b/noncore/graphics/opie-eye/phunk_view.pro
@@ -6,31 +6,10 @@ TARGET = opie-eye
-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/imageview.h \
- gui/viewmodebutton.h \
- impl/doc/doc_lister.h impl/doc/doc_dirview.h \
- impl/doc/doc_ifaceinfo.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/imageview.cpp \
- gui/viewmodebutton.cpp \
- impl/doc/doc_lister.cpp impl/doc/doc_dirview.cpp \
- impl/doc/doc_ifaceinfo.cpp
-# A list of source files
-
-INTERFACES =
-# list of ui files
+
+include( gui/gui.pro )
+include( lib/lib.pro )
+include( iface/iface.pro )
+include( impl/doc/doc.pro )
+include( impl/dir/dir.pro )
+include( impl/dcim/dcim.pro )
+
diff --git a/noncore/graphics/opie-eye/slave/.cvsignore b/noncore/graphics/opie-eye/slave/.cvsignore
new file mode 100644
index 0000000..52494fb
--- a/dev/null
+++ b/noncore/graphics/opie-eye/slave/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+*.moc