summaryrefslogtreecommitdiff
path: root/core/pim/osearch/doclnksearch.cpp
authortille <tille>2003-05-11 19:19:30 (UTC)
committer tille <tille>2003-05-11 19:19:30 (UTC)
commit43c18630840a98aed8deb96b454957c40f0a4344 (patch) (side-by-side diff)
tree60e5b68d1d172c77560d5af7bea83e81be7144a6 /core/pim/osearch/doclnksearch.cpp
parent38dc2fd6258f11ba0507c7bd8f8dfd5b39bc0df5 (diff)
downloadopie-43c18630840a98aed8deb96b454957c40f0a4344.zip
opie-43c18630840a98aed8deb96b454957c40f0a4344.tar.gz
opie-43c18630840a98aed8deb96b454957c40f0a4344.tar.bz2
improved applnk and doclnk searching
clean up: - mainwindow: handling of searchgroups - searchgroups: introduced load, search and insertItem functions - flexible actions handling - doclnksearch inherits applnksearch
Diffstat (limited to 'core/pim/osearch/doclnksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/doclnksearch.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/core/pim/osearch/doclnksearch.cpp b/core/pim/osearch/doclnksearch.cpp
index e99a385..f2a60e9 100644
--- a/core/pim/osearch/doclnksearch.cpp
+++ b/core/pim/osearch/doclnksearch.cpp
@@ -17,30 +17,22 @@
#include "doclnkitem.h"
-DocLnkSearch::DocLnkSearch(QListView* parent, QString name): SearchGroup(parent, name)
+DocLnkSearch::DocLnkSearch(QListView* parent, QString name)
+: AppLnkSearch(parent, name)
{
- _docs = 0;
}
DocLnkSearch::~DocLnkSearch()
{
- delete _docs;
}
-
-void DocLnkSearch::expand()
+void DocLnkSearch::load()
{
- SearchGroup::expand();
- if (_search.isEmpty()) return;
- if (!_docs) _docs = new DocLnkSet(QPEApplication::documentDir());
- QList<DocLnk> appList = _docs->children();
- for ( DocLnk *app = appList.first(); app != 0; app = appList.next() ){
-// if (app->name().contains(_search) || app->comment().contains(_search))
- if ( (_search.match( app->name() ) != -1)
- || (_search.match(app->comment()) != -1)
- || (_search.match(app->exec()) != -1) )
- new DocLnkItem( this, app );
- }
+ _apps = new DocLnkSet(QPEApplication::documentDir());
}
+void DocLnkSearch::insertItem( void *rec )
+{
+ new DocLnkItem( this, (DocLnk*)rec );
+}