author | alwin <alwin> | 2004-04-15 14:14:41 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-15 14:14:41 (UTC) |
commit | 9e9a216efd88f47da583c481c874f0426e7d1a1e (patch) (unidiff) | |
tree | 8067e7d2298e897dcb423cf594d4efe88b579cfa | |
parent | b07457bba11c6bc13d35c31c15353350a16ad3a4 (diff) | |
download | opie-9e9a216efd88f47da583c481c874f0426e7d1a1e.zip opie-9e9a216efd88f47da583c481c874f0426e7d1a1e.tar.gz opie-9e9a216efd88f47da583c481c874f0426e7d1a1e.tar.bz2 |
added bmp support
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_lister.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp index 0a5cff4..16758d7 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp +++ b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp | |||
@@ -23,74 +23,75 @@ Dir_DirLister::Dir_DirLister( bool 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(); |
48 | } | 48 | } |
49 | 49 | ||
50 | QString Dir_DirLister::currentPath()const { | 50 | QString Dir_DirLister::currentPath()const { |
51 | return m_currentDir.absPath(); | 51 | return m_currentDir.absPath(); |
52 | } | 52 | } |
53 | 53 | ||
54 | 54 | ||
55 | QStringList Dir_DirLister::folders()const { | 55 | QStringList Dir_DirLister::folders()const { |
56 | return m_currentDir.entryList( QDir::Dirs ); | 56 | return m_currentDir.entryList( QDir::Dirs ); |
57 | } | 57 | } |
58 | 58 | ||
59 | QStringList Dir_DirLister::files()const { | 59 | QStringList Dir_DirLister::files()const { |
60 | if ( m_allFiles ) | 60 | if ( m_allFiles ) |
61 | return m_currentDir.entryList( QDir::Files ); | 61 | return m_currentDir.entryList( QDir::Files ); |
62 | else { | 62 | else { |
63 | QStringList out; | 63 | QStringList out; |
64 | QStringList list = m_currentDir.entryList( QDir::Files | QDir::Readable ); | 64 | QStringList list = m_currentDir.entryList( QDir::Files | QDir::Readable ); |
65 | for (QStringList::Iterator it = list.begin(); it != list.end();++it ) { | 65 | for (QStringList::Iterator it = list.begin(); it != list.end();++it ) { |
66 | QFileInfo inf( *it ); | 66 | QFileInfo inf( *it ); |
67 | QString ext = inf.extension(false).lower(); | 67 | QString ext = inf.extension(false).lower(); |
68 | if( ext == QString::fromLatin1("jpg") || | 68 | if( ext == QString::fromLatin1("jpg") || |
69 | ext == QString::fromLatin1("jpeg" ) || | 69 | ext == QString::fromLatin1("jpeg" ) || |
70 | ext == QString::fromLatin1("png" ) || | 70 | ext == QString::fromLatin1("png" ) || |
71 | ext == QString::fromLatin1("bmp" ) || | ||
71 | ext == QString::fromLatin1("gif" ) ) | 72 | ext == QString::fromLatin1("gif" ) ) |
72 | out.append( *it ); | 73 | out.append( *it ); |
73 | } | 74 | } |
74 | return out; | 75 | return out; |
75 | } | 76 | } |
76 | } | 77 | } |
77 | 78 | ||
78 | void Dir_DirLister::deleteImage( const QString& fl) { | 79 | void Dir_DirLister::deleteImage( const QString& fl) { |
79 | QFile::remove( fl ); | 80 | QFile::remove( fl ); |
80 | } | 81 | } |
81 | 82 | ||
82 | void Dir_DirLister::thumbNail( const QString& str, int w, int h) { | 83 | void Dir_DirLister::thumbNail( const QString& str, int w, int h) { |
83 | SlaveMaster::self()->thumbNail( str, w, h ); | 84 | SlaveMaster::self()->thumbNail( str, w, h ); |
84 | } | 85 | } |
85 | 86 | ||
86 | QImage Dir_DirLister::image( const QString& str, Factor f, int m) { | 87 | QImage Dir_DirLister::image( const QString& str, Factor f, int m) { |
87 | return SlaveMaster::self()->image( str, f, m ); | 88 | return SlaveMaster::self()->image( str, f, m ); |
88 | } | 89 | } |
89 | 90 | ||
90 | void Dir_DirLister::imageInfo( const QString& str) { | 91 | void Dir_DirLister::imageInfo( const QString& str) { |
91 | SlaveMaster::self()->thumbInfo( str ); | 92 | SlaveMaster::self()->thumbInfo( str ); |
92 | } | 93 | } |
93 | 94 | ||
94 | void Dir_DirLister::fullImageInfo( const QString& str) { | 95 | void Dir_DirLister::fullImageInfo( const QString& str) { |
95 | SlaveMaster::self()->imageInfo( str ); | 96 | SlaveMaster::self()->imageInfo( str ); |
96 | } | 97 | } |