summaryrefslogtreecommitdiff
authorzecke <zecke>2004-08-27 22:22:44 (UTC)
committer zecke <zecke>2004-08-27 22:22:44 (UTC)
commit7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac (patch) (unidiff)
tree1d189e90585190465233a67c7c9a2a740cb1d98a
parenta6e7ebcee38719a9f33ede08ed4c8a364c2ecb20 (diff)
downloadopie-7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac.zip
opie-7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac.tar.gz
opie-7d1ca5dba4cab829d9f7a8c79fb772dc3b643eac.tar.bz2
-Removal of debug messages
-Cleanups of .pro files -Cleanups of source code And finally the long awaited DigiCam (dcim) Backend
Diffstat (more/less context) (ignore 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.h2
-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.cpp5
-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.cpp4
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.cpp17
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.h1
-rw-r--r--noncore/graphics/opie-eye/lib/slavemaster.cpp26
-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, 487 insertions, 72 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 @@
1Makefile
2*.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 @@
1HEADERS += gui/filesystem.h \
2 gui/iconview.h \
3 gui/imageinfoui.h \
4 gui/imageview.h \
5 gui/mainwindow.h \
6 gui/viewmodebutton.h
7
8SOURCES += gui/filesystem.cpp \
9 gui/iconview.cpp \
10 gui/imageinfoui.cpp \
11 gui/imageview.cpp \
12 gui/mainwindow.cpp \
13 gui/viewmodebutton.cpp
14
15
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 {
43 static QPixmap* _unkPix = 0; 43 static QPixmap* _unkPix = 0;
44 static QPixmap* _picPix = 0;
45 static QPixmap* _emptyPix = 0; 44 static QPixmap* _emptyPix = 0;
@@ -100,3 +99,3 @@ namespace {
100 99
101 inline void IconViewItem::setPixmap( const QPixmap & icon, bool recalc, bool redraw) 100 inline void IconViewItem::setPixmap( const QPixmap & , bool, bool )
102 { 101 {
@@ -105,3 +104,3 @@ namespace {
105 } 104 }
106 inline void IconViewItem::setPixmap( const QPixmap & icon) 105 inline void IconViewItem::setPixmap( const QPixmap & )
107 { 106 {
@@ -255,6 +254,3 @@ void PIconView::slotDirUp()
255{ 254{
256 if (m_path.isEmpty()) return; 255 slotChangeDir( currentView()->dirLister()->dirUp( m_path ) );
257 QDir dir( m_path );
258 dir.cdUp();
259 slotChangeDir( dir.absPath() );
260} 256}
@@ -381,7 +377,13 @@ void PIconView::slotViewChanged( int i) {
381 ViewMap* map = viewMap(); 377 ViewMap* map = viewMap();
382 if (!map) {setCurrentView(0l); return;} 378 if (!map) {
379 setCurrentView(0l);
380 return;
381 }
382
383 if (map->find(str) == map->end()) { 383 if (map->find(str) == map->end()) {
384 owarn << "Key not found" << oendl; 384 owarn << "Key not found" << oendl;
385 setCurrentView(0l); return; 385 setCurrentView(0l);
386 return;
386 } 387 }
388
387 m_cfg->writeEntry("LastView",str); 389 m_cfg->writeEntry("LastView",str);
@@ -403,3 +405,4 @@ void PIconView::slotViewChanged( int i) {
403 405
404 /* reload now */ 406 /* reload now with default Path*/
407 m_path = lis->defaultPath();
405 QTimer::singleShot( 0, this, SLOT(slotReloadDir())); 408 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 @@
2 2
3#include <qdir.h>
3 4
@@ -9 +10,13 @@ PDirLister::~PDirLister()
9{} 10{}
11
12/**
13 * Change dir one level up. The default implementation
14 * is to use QDir to change the dir.
15 * If you've a flat filesystem return \par path immediately.
16 */
17QString PDirLister::dirUp( const QString& path )const {
18 QDir dir( path );
19 dir.cdUp();
20
21 return dir.absPath();
22}
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:
25 virtual QStringList files()const = 0; 25 virtual QStringList files()const = 0;
26 virtual QString nameToFname(const QString&name)const = 0;
27 virtual QString dirUp(const QString&)const ;
28
29
26public slots: 30public slots:
@@ -31,3 +35,3 @@ public slots:
31 virtual QImage image( const QString&, Factor, int max = 0) = 0; 35 virtual QImage image( const QString&, Factor, int max = 0) = 0;
32 virtual QString nameToFname(const QString&name)const = 0; 36
33 37
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 @@
1HEADERS += iface/dirlister.h \
2 iface/dirview.h \
3 iface/ifaceinfo.h \
4 iface/slaveiface.h
5
6SOURCES += iface/dirlister.cpp \
7 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
@@ -12,3 +12,3 @@ class QWidget;
12class Config; 12class Config;
13struct PInterfaceInfo { 13struct PInterfaceInfo {
14 virtual QString name()const = 0; 14 virtual QString name()const = 0;
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 @@
1HEADERS += impl/dcim/dcim_dirview.h \
2 impl/dcim/dcim_ifaceinfo.h \
3 impl/dcim/dcim_lister.h
4
5
6
7SOURCES += impl/dcim/dcim_dirview.cpp \
8 impl/dcim/dcim_ifaceinfo.cpp \
9 impl/dcim/dcim_lister.cpp
10
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 @@
1#include "dcim_dirview.h"
2
3#include "dcim_lister.h"
4#include "dcim_ifaceinfo.h"
5
6PHUNK_VIEW_INTERFACE( "Digital Camera", DCIM_DirView );
7
8DCIM_DirView::DCIM_DirView( const Config& cfg )
9 : PDirView( cfg ), m_lister( 0l ), m_info( 0l )
10{}
11
12DCIM_DirView::~DCIM_DirView()
13{}
14
15PInterfaceInfo* DCIM_DirView::interfaceInfo()const {
16 if ( !m_info )
17 m_info = new DCIM_InterfaceInfo;
18
19 return m_info;
20}
21
22
23PDirLister* DCIM_DirView::dirLister()const {
24 if ( !m_lister )
25 m_lister = new DCIM_DirLister();
26
27 return m_lister;
28}
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 @@
1/*
2 * GPLv2 only zecke@handhelds.org
3 */
4
5#ifndef DCIM_DIR_VIEW_H
6#define DCIM_DIR_VIEW_H
7
8#include <iface/dirview.h>
9
10/*
11 * Implementation for USB Host Digital Cameras
12 * like my Casio QV 500 and boring Yakumo
13 */
14struct DCIM_DirView : public PDirView {
15 DCIM_DirView( const Config& );
16 ~DCIM_DirView();
17
18 PInterfaceInfo* interfaceInfo()const;
19 PDirLister * dirLister ()const;
20
21private:
22 mutable PDirLister *m_lister;
23 mutable PInterfaceInfo *m_info ;
24};
25
26#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 @@
1/*
2 * GPLv2
3 * zecke@handhelds.org
4 */
5
6
7#include "dcim_ifaceinfo.h"
8
9#include <qobject.h>
10
11DCIM_InterfaceInfo::DCIM_InterfaceInfo() {}
12DCIM_InterfaceInfo::~DCIM_InterfaceInfo() {}
13
14QString DCIM_InterfaceInfo::name()const {
15 return QObject::tr( "Digital Camera View" );
16}
17
18QWidget* DCIM_InterfaceInfo::configWidget( const Config& ) {
19 return 0l;
20}
21
22void 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 @@
1/*
2 * GPLv2
3 * zecke@handhelds.org
4 */
5
6#ifndef DCIM_IFACE_INFO_H
7#define DCIM_IFACE_INFO_H
8
9#include <iface/ifaceinfo.h>
10
11class DCIM_InterfaceInfo : public PInterfaceInfo {
12public:
13 DCIM_InterfaceInfo();
14 virtual ~DCIM_InterfaceInfo();
15
16 QString name()const;
17 QWidget* configWidget( const Config& );
18 void writeConfig( QWidget* wid, Config& );
19};
20
21
22#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 @@
1/*
2 * GPLv2 zecke@handhelds.org
3 */
4
5#include "dcim_lister.h"
6#include <lib/slavemaster.h>
7
8#include <opie2/odebug.h>
9#include <qpe/storage.h>
10
11#include <qdir.h>
12#include <qfileinfo.h>
13#include <qimage.h>
14
15DCIM_DirLister::DCIM_DirLister()
16 : PDirLister( "dcim_dirlister" )
17{
18
19 /*
20 * create a SlaveMaster and lets connect the signal of
21 * it to our interface
22 */
23 SlaveHelper::slaveConnectSignals( this );
24 m_mode = ListingUnknown;
25}
26
27DCIM_DirLister::~DCIM_DirLister() {}
28
29QString DCIM_DirLister::defaultPath()const {
30 m_mode = ListingStart;
31 return QString::null;
32}
33
34QString DCIM_DirLister::setStartPath( const QString& str) {
35 /**
36 * IconView adds a '/' to path. Lets strip
37 * that.
38 */
39 QString st = str.mid( 1 );
40 if ( ListingStart == m_mode && m_map.contains( st ) ) {
41 m_path = m_map[st]+ "/dcim";
42 m_mode = ListingFolder;
43 }else if ( m_mode == ListingFolder ) {
44 m_mode = ListingFiles;
45 m_path = str;
46 }else if ( m_mode == ListingReFolder ) {
47 m_mode = ListingFolder;
48 }
49
50 owarn << " StartPath2 " << str << " " << m_path << oendl;
51
52 return m_path;
53}
54
55
56QString DCIM_DirLister::currentPath()const {
57 return m_path;
58}
59
60/*
61 * depending on the mode we will either
62 * Find Digital Cameras
63 */
64QStringList DCIM_DirLister::folders()const {
65 QStringList lst;
66
67 switch( m_mode ) {
68 case ListingUnknown:
69 case ListingStart:
70 lst = findCameras();
71 break;
72 case ListingFolder:
73 lst = findAlbums();
74 break;
75 case ListingFiles:
76 default:
77 break;
78 }
79
80 return lst;
81}
82
83QStringList DCIM_DirLister::files()const {
84 if ( m_mode != ListingFiles )
85 return QStringList();
86 else
87 return findImages();
88}
89
90QString DCIM_DirLister::dirUp( const QString& p )const {
91 QString str;
92
93 switch( m_mode ) {
94 case ListingFiles:
95 m_mode = ListingReFolder;
96 str = PDirLister::dirUp( p );
97 break;
98 case ListingFolder:
99 m_mode = ListingStart;
100 break;
101 case ListingUnknown:
102 case ListingStart:
103 default:
104 break;
105 }
106
107 /* down cases */
108 owarn << " New String " << str << " old path " << m_mode << oendl;
109 m_path = str;
110 return str;
111}
112
113
114QStringList DCIM_DirLister::findCameras()const {
115 QStringList lst;
116 StorageInfo inf;
117
118 m_map.clear();
119
120 const QList<FileSystem> &list = inf.fileSystems();
121 QListIterator<FileSystem> it( list );
122
123
124 FileSystem *sys;
125 for ( sys = it.current(); (sys=it.current())!=0 ; ++it )
126 if ( QFileInfo( sys->path() + "/dcim/" ).exists() ) {
127 lst << sys->name();
128 m_map.insert( sys->name(), sys->path() );
129 }
130
131 if ( lst.isEmpty() ) {
132 m_mode = ListingUnknown;
133 lst << QObject::tr("Error no Camera Dir found");
134 }else
135 m_mode = ListingStart;
136
137 return lst;
138}
139
140QStringList DCIM_DirLister::findAlbums()const {
141 QStringList lst = QDir( m_path ).entryList( QDir::Dirs );
142 lst.remove( "." );
143 lst.remove( ".." );
144
145 return lst;
146}
147
148QStringList DCIM_DirLister::findImages()const {
149 return QDir( m_path ).entryList("*.jpg *.jpeg *.png", QDir::Files );
150}
151
152void DCIM_DirLister::deleteImage( const QString& fl ) {
153 QFileInfo inf( fl );
154 QFile::remove( fl );
155 QFile::remove( inf.dirPath ()+"/preview"+
156 inf.fileName() );
157}
158
159void DCIM_DirLister::thumbNail( const QString& _str, int w, int h ) {
160 QFileInfo inf( _str );
161 QString str = QFileInfo( inf.dirPath()+"/preview"+ inf.fileName() ).exists() ?
162 inf.dirPath()+"/preview"+ inf.fileName() : _str;
163
164 SlaveMaster::self()->thumbNail( str, w, h );
165}
166
167QImage DCIM_DirLister::image( const QString& str, Factor f, int m ) {
168 return SlaveMaster::self()->image( str, f, m );
169}
170
171void DCIM_DirLister::imageInfo( const QString& str ) {
172 SlaveMaster::self()->thumbInfo( str );
173}
174
175void DCIM_DirLister::fullImageInfo( const QString& str ) {
176 SlaveMaster::self()->imageInfo( str );
177}
178
179QString DCIM_DirLister::nameToFname( const QString& name )const {
180 return name;
181}
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 @@
1/*
2 * GPLv2 zecke@handhelds.org
3 */
4
5#ifndef DCIM_LISTER_H
6#define DCIM_LISTER_H
7
8#include <iface/dirlister.h>
9
10#include <qmap.h>
11
12class Config;
13
14/**
15 * The DirLister is responsible for
16 * telling the GUI about files and folders
17 * and to load them.
18 * The DCIM is a special FileSystem lister
19 * in the that it starts with an overview
20 * of available 'Cameras'. It looks via 'Storage'
21 * for paths including a 'dcim' directory.
22 * And offers these as folders.
23 * Then it only lists Images. It tries to use
24 * the 'preview' directory to generate a thumbnail
25 * but will use the full image for the QImage
26 * call.
27 *
28 */
29class DCIM_DirLister : public PDirLister {
30 Q_OBJECT
31public:
32 enum ListMode{
33 ListingUnknown = -1,
34 ListingStart=1, /* give an overview over files */
35 ListingFolder, /* give access to albums */
36 ListingFiles, /* list the content of the album */
37 ListingReFolder
38 };
39 DCIM_DirLister();
40 ~DCIM_DirLister();
41
42 QString defaultPath()const;
43 QString setStartPath( const QString& );
44
45 QString currentPath()const;
46 QStringList folders()const;
47 QStringList files() const;
48
49 void deleteImage( const QString& );
50
51 void thumbNail( const QString&, int, int );
52 QImage image( const QString&, Factor, int );
53 void imageInfo( const QString& );
54 void fullImageInfo( const QString& );
55
56
57 virtual QString nameToFname( const QString& )const;
58 virtual QString dirUp(const QString& )const;
59
60private:
61 QStringList findCameras()const;
62 QStringList findAlbums ()const;
63 QStringList findImages ()const;
64
65private:
66 mutable QString m_path;
67 mutable ListMode m_mode;
68 mutable QMap<QString, QString> m_map;
69};
70
71#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 @@
1HEADERS += impl/dir/dir_dirview.h \
2 impl/dir/dir_ifaceinfo.h \
3 impl/dir/dir_lister.h
4
5
6
7SOURCES += impl/dir/dir_dirview.cpp \
8 impl/dir/dir_ifaceinfo.cpp \
9 impl/dir/dir_lister.cpp
10
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 @@
10#include <qpe/config.h> 10#include <qpe/config.h>
11using namespace Opie::Core;
12 11
@@ -36,3 +35,3 @@ DirInterfaceInfo::~DirInterfaceInfo() {
36QString DirInterfaceInfo::name()const { 35QString DirInterfaceInfo::name()const {
37 return QString::fromLatin1(QObject::tr("DirView" )); 36 return QObject::tr("Directory View" );
38} 37}
@@ -47,3 +46,3 @@ QWidget* DirInterfaceInfo::configWidget(const Config& cfg) {
47void DirInterfaceInfo::writeConfig( QWidget* _wid, Config& cfg) { 46void DirInterfaceInfo::writeConfig( QWidget* _wid, Config& cfg) {
48 owarn << "Write Config" << oendl; 47 owarn << "Write Config" << oendl;
49 DirImageWidget* wid = static_cast<DirImageWidget*>(_wid); 48 DirImageWidget* wid = static_cast<DirImageWidget*>(_wid);
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 )
23 owarn << "All Files " << m_allFiles << "" << oendl; 23 owarn << "All Files " << m_allFiles << "" << oendl;
24 24 SlaveHelper::slaveConnectSignals( this );
25 SlaveMaster* master = SlaveMaster::self();
26 connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) );
27 connect( master, SIGNAL(sig_end()), this, SIGNAL(sig_end()) );
28 connect( master, SIGNAL(sig_thumbInfo(const QString&, const QString&)),
29 this, SIGNAL(sig_thumbInfo(const QString&, const QString&)) );
30 connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)),
31 this, SIGNAL(sig_fullInfo(const QString&, const QString&)) );
32 connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)),
33 this, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)) );
34
35} 25}
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 @@
1HEADERS += impl/doc/doc_dirview.h \
2 impl/doc/doc_ifaceinfo.h \
3 impl/doc/doc_lister.h
4
5SOURCES += impl/doc/doc_dirview.cpp \
6 impl/doc/doc_ifaceinfo.cpp \
7 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 {
40 40
41QWidget* DocInterfaceInfo::configWidget(const Config& cfg) { 41QWidget* DocInterfaceInfo::configWidget(const Config& ) {
42#if 0 42#if 0
@@ -52,3 +52,3 @@ void DocInterfaceInfo::writeConfig( QWidget* , Config& ) {
52#if 0 52#if 0
53 owarn << "Write Config" << oendl; 53 owarn << "Write Config" << oendl;
54 DirImageWidget* wid = static_cast<DirImageWidget*>(_wid); 54 DirImageWidget* wid = static_cast<DirImageWidget*>(_wid);
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,5 +23,6 @@ Doc_DirLister::Doc_DirLister()
23{ 23{
24 /* connect the signals */
24 SlaveMaster* master = SlaveMaster::self(); 25 SlaveMaster* master = SlaveMaster::self();
25 connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) ); 26 connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) );
26 connect( master, SIGNAL(sig_end()), this, SIGNAL(sig_end()) ); 27 connect( master, SIGNAL(sig_end()), this, SIGNAL(sig_end()) );
27 connect( master, SIGNAL(sig_thumbInfo(const QString&, const QString&)), 28 connect( master, SIGNAL(sig_thumbInfo(const QString&, const QString&)),
@@ -38,3 +39,3 @@ Doc_DirLister::Doc_DirLister()
38QString Doc_DirLister::defaultPath()const { 39QString Doc_DirLister::defaultPath()const {
39 return ""; QPEApplication::documentDir(); 40 return QString::null;
40} 41}
@@ -80,3 +81,2 @@ void Doc_DirLister::thumbNail( const QString& str, int w, int h) {
80 if (m_namemap.find(str)==m_namemap.end()) { 81 if (m_namemap.find(str)==m_namemap.end()) {
81 owarn << "Item " << str << " not found" << oendl;
82 return; 82 return;
@@ -89,3 +89,2 @@ QImage Doc_DirLister::image( const QString& str, Factor f, int m) {
89 if (m_namemap.find(str)==m_namemap.end()) { 89 if (m_namemap.find(str)==m_namemap.end()) {
90 owarn << "Item " << str << " not found" << oendl;
91 return QImage(); 90 return QImage();
@@ -98,3 +97,2 @@ void Doc_DirLister::imageInfo( const QString& str) {
98 if (m_namemap.find(str)==m_namemap.end()) { 97 if (m_namemap.find(str)==m_namemap.end()) {
99 owarn << "Item " << str << " not found" << oendl;
100 return; 98 return;
@@ -107,3 +105,2 @@ void Doc_DirLister::fullImageInfo( const QString& str) {
107 if (m_namemap.find(str)==m_namemap.end()) { 105 if (m_namemap.find(str)==m_namemap.end()) {
108 owarn << "Item " << str << " not found" << oendl;
109 return; 106 return;
@@ -117,3 +114,2 @@ void Doc_DirLister::slotFullInfo(const QString&f, const QString&t)
117 if (m_filemap.find(f)==m_filemap.end()) { 114 if (m_filemap.find(f)==m_filemap.end()) {
118 owarn << "Item " << f << " not found" << oendl;
119 return; 115 return;
@@ -127,3 +123,2 @@ void Doc_DirLister::slotThumbInfo(const QString&f, const QString&t)
127 if (m_filemap.find(f)==m_filemap.end()) { 123 if (m_filemap.find(f)==m_filemap.end()) {
128 owarn << "Item " << f << " not found" << oendl;
129 return; 124 return;
@@ -137,3 +132,2 @@ void Doc_DirLister::slotThumbNail(const QString&f, const QPixmap&p)
137 if (m_filemap.find(f)==m_filemap.end()) { 132 if (m_filemap.find(f)==m_filemap.end()) {
138 owarn << "Item " << f << " not found" << oendl;
139 return; 133 return;
@@ -147,3 +141,2 @@ QString Doc_DirLister::nameToFname(const QString&name)const
147 if (m_namemap.find(name)==m_namemap.end()) { 141 if (m_namemap.find(name)==m_namemap.end()) {
148 owarn << "Item " << name << " not found" << oendl;
149 return QString::null; 142 return QString::null;
@@ -152 +145,5 @@ QString Doc_DirLister::nameToFname(const QString&name)const
152} 145}
146
147QString Doc_DirLister::dirUp( const QString& p ) const{
148 return p;
149}
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:
31 virtual QString nameToFname(const QString&name)const; 31 virtual QString nameToFname(const QString&name)const;
32 QString dirUp( const QString& )const;
32 33
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
@@ -29,3 +29,3 @@ QDataStream & operator >> (QDataStream & str, bool & b)
29QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { 29QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) {
30 owarn << "Image request is " << inf.file.latin1() << " " << inf.width << " " << inf.height << "" << oendl; 30 owarn << "Image request is " << inf.file.latin1() << " " << inf.width << " " << inf.height << "" << oendl;
31 return s << inf.file << inf.width << inf.height; 31 return s << inf.file << inf.width << inf.height;
@@ -84,6 +84,6 @@ void SlaveMaster::thumbNail( const QString& str, int w, int h ) {
84 if ( str.isEmpty() ) { 84 if ( str.isEmpty() ) {
85 owarn << "Asking for empty nail" << oendl; 85 owarn << "Asking for empty nail" << oendl;
86 return; 86 return;
87 } 87 }
88 owarn << "Asking for thumbNail in size " << w << " " << h << "" + str << oendl; 88 owarn << "Asking for thumbNail in size " << w << " " << h << "" + str << oendl;
89 PixmapInfo item; 89 PixmapInfo item;
@@ -111,3 +111,3 @@ void SlaveMaster::recieve( const QCString& str, const QByteArray& at) {
111 111
112 owarn << "PixInfos " << pixinfos.count() << "" << oendl; 112 owarn << "PixInfos " << pixinfos.count() << "" << oendl;
113 113
@@ -151,4 +151,20 @@ void SlaveMaster::slotTimerStart() {
151 151
152QImage SlaveMaster::image( const QString& str, PDirLister::Factor, int ) { 152QImage SlaveMaster::image( const QString& , PDirLister::Factor, int ) {
153 return QImage(); 153 return QImage();
154} 154}
155
156
157namespace SlaveHelper {
158void slaveConnectSignals( QObject* target ) {
159 SlaveMaster* master = SlaveMaster::self();
160
161 QObject::connect( master, SIGNAL(sig_start()), target, SIGNAL(sig_start()) );
162 QObject::connect( master, SIGNAL(sig_end()), target, SIGNAL(sig_end()) );
163 QObject::connect( master, SIGNAL(sig_thumbInfo(const QString&, const QString&)),
164 target, SIGNAL(sig_thumbInfo(const QString&, const QString&)) );
165 QObject::connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)),
166 target, SIGNAL(sig_fullInfo(const QString&, const QString&)) );
167 QObject::connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)),
168 target, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)) );
169}
170}
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 @@
10 10
11namespace SlaveHelper {
12/**
13 * Small Helper to create a SlaveMaster
14 * and to connect its' signals to the
15 * object. To use the object as a proxy
16 */
17void slaveConnectSignals( QObject* );
18}
19
20
11class SlaveMaster : public QObject { 21class 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
6 6
7HEADERS = gui/iconview.h gui/filesystem.h gui/mainwindow.h \ 7
8 lib/imagecache.h impl/dir/dir_dirview.h \ 8include( gui/gui.pro )
9 iface/dirview.h iface/dirlister.h iface/ifaceinfo.h \ 9include( lib/lib.pro )
10 impl/dir/dir_lister.h impl/dir/dir_ifaceinfo.h \ 10include( iface/iface.pro )
11 lib/slavemaster.h \ 11include( impl/doc/doc.pro )
12 iface/slaveiface.h \ 12include( impl/dir/dir.pro )
13 gui/imageinfoui.h \ 13include( impl/dcim/dcim.pro )
14 gui/imageview.h \ 14
15 gui/viewmodebutton.h \
16 impl/doc/doc_lister.h impl/doc/doc_dirview.h \
17 impl/doc/doc_ifaceinfo.h
18
19# A list header files
20
21
22SOURCES = gui/iconview.cpp gui/filesystem.cpp gui/mainwindow.cpp \
23 lib/imagecache.cpp lib/viewmap.cpp \
24 impl/dir/dir_dirview.cpp iface/dirlister.cpp \
25 iface/dirview.cpp impl/dir/dir_lister.cpp \
26 impl/dir/dir_ifaceinfo.cpp lib/slavemaster.cpp \
27 gui/imageinfoui.cpp \
28 gui/imageview.cpp \
29 gui/viewmodebutton.cpp \
30 impl/doc/doc_lister.cpp impl/doc/doc_dirview.cpp \
31 impl/doc/doc_ifaceinfo.cpp
32# A list of source files
33
34INTERFACES =
35# list of ui files
36 15
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 @@
1Makefile
2*.moc