summaryrefslogtreecommitdiff
path: root/libopie/pim/test/oevent_test.cpp
Unidiff
Diffstat (limited to 'libopie/pim/test/oevent_test.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/test/oevent_test.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/libopie/pim/test/oevent_test.cpp b/libopie/pim/test/oevent_test.cpp
index 50cc032..6f04995 100644
--- a/libopie/pim/test/oevent_test.cpp
+++ b/libopie/pim/test/oevent_test.cpp
@@ -3,2 +3,3 @@
3#include "../oevent.h" 3#include "../oevent.h"
4#include "../odatebookaccess.h"
4 5
@@ -21,2 +22,28 @@ int main(int argc, char* argv ) {
21 qWarning("%s", ev2.startDateTimeInZone().toString().latin1() ); 22 qWarning("%s", ev2.startDateTimeInZone().toString().latin1() );
23
24 ODateBookAccess acc;
25 if(!acc.load() ) qWarning("could not load");
26
27 ODateBookAccess::List::Iterator it;
28 ODateBookAccess::List list = acc.allRecords();
29
30 for( it = list.begin(); it != list.end(); ++it ){
31 OEvent ev = (*it);
32 qWarning("Summary: %s",ev.description().latin1() );
33 qWarning("Start: %s End: %s",ev.startDateTime().toString().latin1(), ev.endDateTime().toString().latin1() );
34 qWarning("All Day: %d",ev.isAllDay() );
35
36 }
37 QDate date1(2003,02,01 );
38 QDate date2(2003,03,01 );
39
40 OEffectiveEvent::ValueList effList = acc.effectiveEvents( date1,date2 );
41 OEffectiveEvent::ValueList::Iterator effIt;
42
43 for( effIt = effList.begin(); effIt != effList.end(); ++effIt ){
44 OEffectiveEvent ef = (*effIt);
45 qWarning("Summary: %s", ef.description().latin1() );
46 qWarning("Date: %s", ef.date().toString().latin1() );
47 }
48
22 return 0; 49 return 0;