summaryrefslogtreecommitdiff
authoralwin <alwin>2004-11-11 23:08:31 (UTC)
committer alwin <alwin>2004-11-11 23:08:31 (UTC)
commitee67d61c20b6840f3fb353e314d16a90c0438e7c (patch) (side-by-side diff)
tree0b49d946120d3bf93c1a5158f5635c496a43ce8c
parentb81a7aeacda23d4407cd88ee017b67ea48344a94 (diff)
downloadopie-ee67d61c20b6840f3fb353e314d16a90c0438e7c.zip
opie-ee67d61c20b6840f3fb353e314d16a90c0438e7c.tar.gz
opie-ee67d61c20b6840f3fb353e314d16a90c0438e7c.tar.bz2
removed some useless code
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
index e43baed..f5c711a 100644
--- a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
+++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
@@ -42,49 +42,48 @@ Doc_DirLister::Doc_DirLister()
}
QString Doc_DirLister::defaultPath()const {
return QString::null;
}
bool Doc_DirLister::matchCat(const AppLnk* app)
{
if (!app) return false;
if (m_catFilter==0 || app->categories().contains(m_catFilter) || m_catFilter == -1 && app->categories().count() == 0 ) {
return true;
}
return false;
}
QString Doc_DirLister::setStartPath(const QString&) {
static const QString Mtype_str("image/jpeg;image/gif;image/bmp;image/png");
if (m_namemap.isEmpty()) {
if (!m_docreads) {
Global::findDocuments(&m_ds,Mtype_str);
m_docreads = true;
}
QListIterator<DocLnk> dit(m_ds.children());
for( ; dit.current(); ++dit) {
-// if (! (*dit)->isValid()) continue;
if (!matchCat((*dit))) 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;
@@ -161,31 +160,29 @@ QString Doc_DirLister::nameToFname(const QString&name)const
return m_namemap[name];
}
QString Doc_DirLister::dirUp( const QString& p ) const{
return p;
}
QWidget* Doc_DirLister::widget(QWidget*parent)
{
CategorySelect * catmb = new CategorySelect(parent);
Categories cats( 0 );
cats.load( categoryFileName() );
QArray<int> vl( 0 );
catmb->setCategories( vl, "Document View", // No tr
"Document View" );
catmb->setRemoveCategoryEdit( TRUE );
catmb->setAllCategories( TRUE );
connect(catmb, SIGNAL(signalSelected(int)), this, SLOT(showCategory(int)));
catmb->setCurrentCategory(-2);
return catmb;
}
void Doc_DirLister::showCategory(int which)
{
- Categories cat;
- cat.load( categoryFileName() );
m_catFilter = which==-2?0:which;
m_namemap.clear();
setStartPath("");
emit sig_reloadDir();
}