author | mickeyl <mickeyl> | 2004-11-16 19:14:18 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-11-16 19:14:18 (UTC) |
commit | ea3945a9bd8f9830f70b1efa133f9df13b19362f (patch) (unidiff) | |
tree | f2ea22cc50e9aa8aa73ee7dea148f41c563c9666 /noncore/unsupported/libopie/pim/odatebookaccess.cpp | |
parent | 1c6f490e8541626f68422e0a3a7c7281d7f5b7d3 (diff) | |
download | opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.zip opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.gz opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.bz2 |
libopie1 goes into unsupported
Diffstat (limited to 'noncore/unsupported/libopie/pim/odatebookaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/libopie/pim/odatebookaccess.cpp | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/noncore/unsupported/libopie/pim/odatebookaccess.cpp b/noncore/unsupported/libopie/pim/odatebookaccess.cpp new file mode 100644 index 0000000..d95fed6 --- a/dev/null +++ b/noncore/unsupported/libopie/pim/odatebookaccess.cpp | |||
@@ -0,0 +1,81 @@ | |||
1 | #include "obackendfactory.h" | ||
2 | #include "odatebookaccess.h" | ||
3 | |||
4 | /** | ||
5 | * Simple constructor | ||
6 | * It takes a ODateBookAccessBackend as parent. If it is 0 the default implementation | ||
7 | * will be used! | ||
8 | * @param back The backend to be used or 0 for the default backend | ||
9 | * @param ac What kind of access is intended | ||
10 | */ | ||
11 | ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac ) | ||
12 | : OPimAccessTemplate<OEvent>( back ) | ||
13 | { | ||
14 | if (!back ) | ||
15 | back = OBackendFactory<ODateBookAccessBackend>::Default("datebook", QString::null ); | ||
16 | |||
17 | m_backEnd = back; | ||
18 | setBackEnd( m_backEnd ); | ||
19 | } | ||
20 | ODateBookAccess::~ODateBookAccess() { | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * @return all events available | ||
25 | */ | ||
26 | ODateBookAccess::List ODateBookAccess::rawEvents()const { | ||
27 | QArray<int> ints = m_backEnd->rawEvents(); | ||
28 | |||
29 | List lis( ints, this ); | ||
30 | return lis; | ||
31 | } | ||
32 | |||
33 | /** | ||
34 | * @return all repeating events | ||
35 | */ | ||
36 | ODateBookAccess::List ODateBookAccess::rawRepeats()const { | ||
37 | QArray<int> ints = m_backEnd->rawRepeats(); | ||
38 | |||
39 | List lis( ints, this ); | ||
40 | return lis; | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * @return all non repeating events | ||
45 | */ | ||
46 | ODateBookAccess::List ODateBookAccess::nonRepeats()const { | ||
47 | QArray<int> ints = m_backEnd->nonRepeats(); | ||
48 | |||
49 | List lis( ints, this ); | ||
50 | return lis; | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * @return dates in the time span between from and to | ||
55 | * @param from Include all events from... | ||
56 | * @param to Include all events to... | ||
57 | */ | ||
58 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) const { | ||
59 | return m_backEnd->effectiveEvents( from, to ); | ||
60 | } | ||
61 | /** | ||
62 | * @return all events at a given datetime | ||
63 | */ | ||
64 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) const { | ||
65 | return m_backEnd->effectiveEvents( start ); | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * @return non repeating dates in the time span between from and to | ||
70 | * @param from Include all events from... | ||
71 | * @param to Include all events to... | ||
72 | */ | ||
73 | OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) const { | ||
74 | return m_backEnd->effectiveNonRepeatingEvents( from, to ); | ||
75 | } | ||
76 | /** | ||
77 | * @return all non repeating events at a given datetime | ||
78 | */ | ||
79 | OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDateTime& start ) const { | ||
80 | return m_backEnd->effectiveNonRepeatingEvents( start ); | ||
81 | } | ||