summaryrefslogtreecommitdiff
path: root/core/pim/osearch/datebooksearch.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/osearch/datebooksearch.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/osearch/datebooksearch.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp
index 50c76e0..2b4660a 100644
--- a/core/pim/osearch/datebooksearch.cpp
+++ b/core/pim/osearch/datebooksearch.cpp
@@ -8,25 +8,28 @@
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "datebooksearch.h"
-
#include "eventitem.h"
+#include <opie2/opimevent.h>
+#include <opie2/opimrecurrence.h>
+
+
#include <qpe/resource.h>
#include <qpe/config.h>
-#include <opie/oevent.h>
-#include <opie/orecur.h>
-#include <opie/odatebookaccess.h>
+
#include <qiconset.h>
#include <qaction.h>
#include <qdatetime.h>
#include <qpopupmenu.h>
+
+
DatebookSearch::DatebookSearch(QListView* parent, QString name)
: SearchGroup(parent, name), _dates(0), _popupMenu(0)
{
QIconSet is = Resource::loadIconSet( "datebook/DateBookSmall" );
setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
actionShowPastEvents = new QAction( QObject::tr("show past events"),QString::null, 0, 0, 0, true );
@@ -56,21 +59,21 @@ void DatebookSearch::load()
_dates = new ODateBookAccess();
_dates->load();
}
int DatebookSearch::search()
{
- ORecordList<OEvent> results = _dates->matchRegexp(_search);
+ OPimRecordList<OPimEvent> results = _dates->matchRegexp(_search);
for (uint i = 0; i < results.count(); i++)
- insertItem( new OEvent( results[i] ) );
+ insertItem( new OPimEvent( results[i] ) );
return _resultCount;
}
void DatebookSearch::insertItem( void *rec )
{
- OEvent *ev = (OEvent*)rec;
+ OPimEvent *ev = (OPimEvent*)rec;
if ( !actionShowPastEvents->isOn() &&
ev->endDateTime() < QDateTime::currentDateTime() &&
!ev->recurrence().doesRecur()
) return;
if ( !actionSearchInDates->isOn() && (
ev->lastHitField() == Qtopia::StartDateTime ||