Diffstat (limited to 'noncore/graphics/opie-eye/impl/dir/dir_lister.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_lister.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp index 16758d7..3717297 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp +++ b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp | |||
@@ -1,47 +1,47 @@ | |||
1 | /* | 1 | /* |
2 | * GPLv2 zecke@handhelds.org | 2 | * GPLv2 zecke@handhelds.org |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include "dir_lister.h" | 5 | #include "dir_lister.h" |
6 | 6 | ||
7 | #include <lib/slavemaster.h> | 7 | #include <lib/slavemaster.h> |
8 | 8 | ||
9 | /* OPIE */ | 9 | /* OPIE */ |
10 | #include <opie2/odebug.h> | 10 | #include <opie2/odebug.h> |
11 | #include <qpe/config.h> | 11 | #include <qpe/config.h> |
12 | #include <qpe/qpeapplication.h> | 12 | #include <qpe/qpeapplication.h> |
13 | using namespace Opie::Core; | 13 | using namespace Opie::Core; |
14 | 14 | ||
15 | /* QT */ | 15 | /* QT */ |
16 | #include <qdir.h> | 16 | #include <qdir.h> |
17 | #include <qfileinfo.h> | 17 | #include <qfileinfo.h> |
18 | 18 | ||
19 | Dir_DirLister::Dir_DirLister( bool list ) | 19 | Dir_DirLister::Dir_DirLister( bool list ) |
20 | : PDirLister( "dir_dir_lister" ) | 20 | : PDirLister( "dir_dir_lister" ) |
21 | { | 21 | { |
22 | m_allFiles = list; | 22 | m_allFiles = list; |
23 | owarn << "All Files " << m_allFiles << "" << oendl; | 23 | owarn << "All Files " << m_allFiles << "" << oendl; |
24 | 24 | ||
25 | SlaveMaster* master = SlaveMaster::self(); | 25 | SlaveMaster* master = SlaveMaster::self(); |
26 | connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) ); | 26 | connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) ); |
27 | connect( master, SIGNAL(sig_end()), this, SIGNAL(sig_end()) ); | 27 | connect( master, SIGNAL(sig_end()), this, SIGNAL(sig_end()) ); |
28 | connect( master, SIGNAL(sig_thumbInfo(const QString&, const QString&)), | 28 | connect( master, SIGNAL(sig_thumbInfo(const QString&, const QString&)), |
29 | this, 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&)), | 30 | connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)), |
31 | this, 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&)), | 32 | connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)), |
33 | this, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)) ); | 33 | this, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)) ); |
34 | 34 | ||
35 | } | 35 | } |
36 | 36 | ||
37 | QString Dir_DirLister::defaultPath()const { | 37 | QString Dir_DirLister::defaultPath()const { |
38 | return QPEApplication::documentDir(); | 38 | return QPEApplication::documentDir(); |
39 | } | 39 | } |
40 | 40 | ||
41 | QString Dir_DirLister::setStartPath( const QString& path ) { | 41 | QString Dir_DirLister::setStartPath( const QString& path ) { |
42 | m_currentDir.cd( path ); | 42 | m_currentDir.cd( path ); |
43 | if (!m_currentDir.exists() ) | 43 | if (!m_currentDir.exists() ) |
44 | m_currentDir.cd(defaultPath()); | 44 | m_currentDir.cd(defaultPath()); |
45 | 45 | ||
46 | 46 | ||
47 | return m_currentDir.absPath(); | 47 | return m_currentDir.absPath(); |
@@ -74,24 +74,29 @@ QStringList Dir_DirLister::files()const { | |||
74 | } | 74 | } |
75 | return out; | 75 | return out; |
76 | } | 76 | } |
77 | } | 77 | } |
78 | 78 | ||
79 | void Dir_DirLister::deleteImage( const QString& fl) { | 79 | void Dir_DirLister::deleteImage( const QString& fl) { |
80 | QFile::remove( fl ); | 80 | QFile::remove( fl ); |
81 | } | 81 | } |
82 | 82 | ||
83 | void Dir_DirLister::thumbNail( const QString& str, int w, int h) { | 83 | void Dir_DirLister::thumbNail( const QString& str, int w, int h) { |
84 | SlaveMaster::self()->thumbNail( str, w, h ); | 84 | SlaveMaster::self()->thumbNail( str, w, h ); |
85 | } | 85 | } |
86 | 86 | ||
87 | QImage Dir_DirLister::image( const QString& str, Factor f, int m) { | 87 | QImage Dir_DirLister::image( const QString& str, Factor f, int m) { |
88 | return SlaveMaster::self()->image( str, f, m ); | 88 | return SlaveMaster::self()->image( str, f, m ); |
89 | } | 89 | } |
90 | 90 | ||
91 | void Dir_DirLister::imageInfo( const QString& str) { | 91 | void Dir_DirLister::imageInfo( const QString& str) { |
92 | SlaveMaster::self()->thumbInfo( str ); | 92 | SlaveMaster::self()->thumbInfo( str ); |
93 | } | 93 | } |
94 | 94 | ||
95 | void Dir_DirLister::fullImageInfo( const QString& str) { | 95 | void Dir_DirLister::fullImageInfo( const QString& str) { |
96 | SlaveMaster::self()->imageInfo( str ); | 96 | SlaveMaster::self()->imageInfo( str ); |
97 | } | 97 | } |
98 | |||
99 | QString Dir_DirLister::nameToFname(const QString&name)const | ||
100 | { | ||
101 | return name; | ||
102 | } | ||