// // // C++ Implementation: $MODULE$ // // Description: // // // Author: Patrick S. Vogt , (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #include "todosearch.h" #include #include #include #include "todoitem.h" TodoSearch::TodoSearch(QListView* parent, QString name) : SearchGroup(parent, name) { //_fileName = QDir::homeDirPath()+"/Applications/todolist/todolist.xml"; _todos = 0; } TodoSearch::~TodoSearch() { delete _todos; } void TodoSearch::expand() { SearchGroup::expand(); if (_search.isEmpty()) return; if (!_todos){ _todos = new OTodoAccess(); _todos->load(); } #ifdef LIPBOPIE_SEARCH ORecordList results = _todos->matchRegexp(_search); setText(0, text(0) + " (" + QString::number( results.count() ) + ")"); for (uint i = 0; i < results.count(); i++) { new TodoItem( this, new OTodo( results[i] )); } #else ORecordList list = _todos->allRecords(); QArray m_currentQuery( list.count() ); for( uint i=0; i