author | alwin <alwin> | 2004-04-21 23:16:47 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-21 23:16:47 (UTC) |
commit | a0952719afc122e5a16d81253a9de86ee7e608b8 (patch) (side-by-side diff) | |
tree | 27adc7b1f02de96ade6dd07be0f48e6dda868bf9 | |
parent | 9230c9dd6bef33603cef1727be95dafc8065f66c (diff) | |
download | opie-a0952719afc122e5a16d81253a9de86ee7e608b8.zip opie-a0952719afc122e5a16d81253a9de86ee7e608b8.tar.gz opie-a0952719afc122e5a16d81253a9de86ee7e608b8.tar.bz2 |
only adds valid doc-links to list
-rw-r--r-- | noncore/graphics/opie-eye/impl/doc/doc_lister.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp index 73b2863..8066472 100644 --- a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp +++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp @@ -1,97 +1,97 @@ /* * GPLv2 zecke@handhelds.org */ #include "doc_lister.h" #include <lib/slavemaster.h> /* OPIE */ #include <opie2/odebug.h> #include <qpe/config.h> #include <qpe/qpeapplication.h> #include <qpe/applnk.h> using namespace Opie::Core; /* QT */ #include <qdir.h> #include <qfileinfo.h> Doc_DirLister::Doc_DirLister() : PDirLister( "doc_dir_lister" ) { 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, SLOT(slotThumbInfo(const QString&, const QString&)) ); connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)), this, SLOT(slotFullInfo(const QString&, const QString&)) ); connect( master, SIGNAL(sig_thumbNail(const QString&, const QPixmap&)), this, SLOT(slotThumbNail(const QString&, const QPixmap&)) ); m_namemap.clear(); m_filemap.clear(); } QString Doc_DirLister::defaultPath()const { return ""; QPEApplication::documentDir(); } QString Doc_DirLister::setStartPath(const QString&) { static const QString Mtype_str("image/jpeg;image/gif;image/bmp;image/png"); if (m_namemap.isEmpty()) { DocLnkSet ds; Global::findDocuments(&ds,Mtype_str); QListIterator<DocLnk> dit(ds.children()); for( ; dit.current(); ++dit) { - owarn << (*dit)->file() << oendl; + if (! (*dit)->isValid()) continue; m_namemap[(*dit)->name()]=(*dit)->file(); m_filemap[(*dit)->file()]=(*dit)->name(); } } return QString::null; } QString Doc_DirLister::currentPath()const { return QString::null; } QStringList Doc_DirLister::folders()const { return QStringList(); } QStringList Doc_DirLister::files()const { QStringList out; QMap<QString,QString>::ConstIterator it; for (it = m_namemap.begin();it != m_namemap.end();++it) { out.append(it.key()); } return out; } void Doc_DirLister::deleteImage( const QString& ) { } 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; } QString fname = m_namemap[str]; SlaveMaster::self()->thumbNail( fname, w, h ); } 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(); } QString fname = m_namemap[str]; return SlaveMaster::self()->image( fname, f, m ); } void Doc_DirLister::imageInfo( const QString& str) { |