summaryrefslogtreecommitdiff
path: root/core/pim/osearch/datebooksearch.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/datebooksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/datebooksearch.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp
new file mode 100644
index 0000000..85c55c2
--- a/dev/null
+++ b/core/pim/osearch/datebooksearch.cpp
@@ -0,0 +1,59 @@
1//
2//
3// C++ Implementation: $MODULE$
4//
5// Description:
6//
7//
8// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
9//
10// Copyright: See COPYING file that comes with this distribution
11//
12//
13#include "datebooksearch.h"
14
15#include "eventitem.h"
16
17#include <opie/oevent.h>
18#include <opie/odatebookaccess.h>
19
20DatebookSearch::DatebookSearch(QListView* parent, QString name)
21: SearchGroup(parent, name)
22{
23 _dates = 0;
24}
25
26
27DatebookSearch::~DatebookSearch()
28{
29 delete _dates;
30}
31
32
33void DatebookSearch::expand()
34{
35 SearchGroup::expand();
36 if (!_dates){
37 _dates = new ODateBookAccess();
38 _dates->load();
39 }
40
41 ORecordList<OEvent> list = _dates->allRecords();
42 QArray<int> m_currentQuery( list.count() );
43 for( uint i=0; i<list.count(); i++ ){
44
45 if (
46 ( list[i].description().contains( _search ) ) ||
47 ( list[i].note().contains( _search ) ) ||
48 ( list[i].location().contains( _search ) )
49 // ( _search.find( list[i].description(), 0 ) > 0 ) ||
50 // ( _search.find( list[i].note(), 0 ) > 0 ) ||
51 // ( _search.find( list[i].location(), 0 ) > 0 )
52 ){
53 new EventItem( this, new OEvent( list[i] ) );
54 // new OListViewItem( this, list[i].description() );
55 }
56
57 }
58}
59