From 43c18630840a98aed8deb96b454957c40f0a4344 Mon Sep 17 00:00:00 2001 From: tille Date: Sun, 11 May 2003 19:19:30 +0000 Subject: improved applnk and doclnk searching clean up: - mainwindow: handling of searchgroups - searchgroups: introduced load, search and insertItem functions - flexible actions handling - doclnksearch inherits applnksearch --- (limited to 'core/pim/osearch/todosearch.cpp') diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp index cbe356b..6a73530 100644 --- a/core/pim/osearch/todosearch.cpp +++ b/core/pim/osearch/todosearch.cpp @@ -30,22 +30,21 @@ TodoSearch::~TodoSearch() } -void TodoSearch::expand() +void TodoSearch::load() { - SearchGroup::expand(); - if (_search.isEmpty()) return; - - if (!_todos){ _todos = new OTodoAccess(); _todos->load(); - } +} +int TodoSearch::search() +{ ORecordList results = _todos->matchRegexp(_search); - setText(0, text(0) + " (" + QString::number( results.count() ) + ")"); - for (uint i = 0; i < results.count(); i++) { + for (uint i = 0; i < results.count(); i++) new TodoItem( this, new OTodo( results[i] )); - } - + return results.count(); } +void TodoSearch::insertItem( void* ) +{ +} -- cgit v0.9.0.2