author | eilers <eilers> | 2004-04-28 09:22:02 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-04-28 09:22:02 (UTC) |
commit | 134b7accd6bdc8fbc160a42f7c52c585e73f4add (patch) (unidiff) | |
tree | 5e221e990d0c94e38d816e147762f205733b0e72 /libopie2/opiepim/core/odatebookaccess.cpp | |
parent | 8ce67859c54234dabd88e17a0bc72369ea8301a3 (diff) | |
download | opie-134b7accd6bdc8fbc160a42f7c52c585e73f4add.zip opie-134b7accd6bdc8fbc160a42f7c52c585e73f4add.tar.gz opie-134b7accd6bdc8fbc160a42f7c52c585e73f4add.tar.bz2 |
Some modifications to alow use of generic OPimRecords without need to
cast them manually to the right type
Diffstat (limited to 'libopie2/opiepim/core/odatebookaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/odatebookaccess.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/odatebookaccess.cpp b/libopie2/opiepim/core/odatebookaccess.cpp index ac310c1..29298ea 100644 --- a/libopie2/opiepim/core/odatebookaccess.cpp +++ b/libopie2/opiepim/core/odatebookaccess.cpp | |||
@@ -7,48 +7,49 @@ | |||
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | #include <opie2/obackendfactory.h> | 29 | #include <opie2/obackendfactory.h> |
30 | #include <opie2/odatebookaccess.h> | 30 | #include <opie2/odatebookaccess.h> |
31 | #include <opie2/opimresolver.h> | ||
31 | 32 | ||
32 | namespace Opie { | 33 | namespace Opie { |
33 | /** | 34 | /** |
34 | * Simple constructor | 35 | * Simple constructor |
35 | * It takes a ODateBookAccessBackend as parent. If it is 0 the default implementation | 36 | * It takes a ODateBookAccessBackend as parent. If it is 0 the default implementation |
36 | * will be used! | 37 | * will be used! |
37 | * @param back The backend to be used or 0 for the default backend | 38 | * @param back The backend to be used or 0 for the default backend |
38 | * @param ac What kind of access is intended | 39 | * @param ac What kind of access is intended |
39 | */ | 40 | */ |
40 | ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac ) | 41 | ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac ) |
41 | : OPimAccessTemplate<OPimEvent>( back ) | 42 | : OPimAccessTemplate<OPimEvent>( back ) |
42 | { | 43 | { |
43 | if (!back ) | 44 | if (!back ) |
44 | back = OBackendFactory<ODateBookAccessBackend>::Default("datebook", QString::null ); | 45 | back = OBackendFactory<ODateBookAccessBackend>::Default("datebook", QString::null ); |
45 | 46 | ||
46 | m_backEnd = back; | 47 | m_backEnd = back; |
47 | setBackEnd( m_backEnd ); | 48 | setBackEnd( m_backEnd ); |
48 | } | 49 | } |
49 | ODateBookAccess::~ODateBookAccess() { | 50 | ODateBookAccess::~ODateBookAccess() { |
50 | } | 51 | } |
51 | 52 | ||
52 | /** | 53 | /** |
53 | * @return all events available | 54 | * @return all events available |
54 | */ | 55 | */ |
@@ -87,26 +88,30 @@ ODateBookAccess::List ODateBookAccess::nonRepeats()const { | |||
87 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) const { | 88 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) const { |
88 | return m_backEnd->effectiveEvents( from, to ); | 89 | return m_backEnd->effectiveEvents( from, to ); |
89 | } | 90 | } |
90 | /** | 91 | /** |
91 | * @return all events at a given datetime | 92 | * @return all events at a given datetime |
92 | */ | 93 | */ |
93 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) const { | 94 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) const { |
94 | return m_backEnd->effectiveEvents( start ); | 95 | return m_backEnd->effectiveEvents( start ); |
95 | } | 96 | } |
96 | 97 | ||
97 | /** | 98 | /** |
98 | * @return non repeating dates in the time span between from and to | 99 | * @return non repeating dates in the time span between from and to |
99 | * @param from Include all events from... | 100 | * @param from Include all events from... |
100 | * @param to Include all events to... | 101 | * @param to Include all events to... |
101 | */ | 102 | */ |
102 | OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) const { | 103 | OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) const { |
103 | return m_backEnd->effectiveNonRepeatingEvents( from, to ); | 104 | return m_backEnd->effectiveNonRepeatingEvents( from, to ); |
104 | } | 105 | } |
105 | /** | 106 | /** |
106 | * @return all non repeating events at a given datetime | 107 | * @return all non repeating events at a given datetime |
107 | */ | 108 | */ |
108 | OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDateTime& start ) const { | 109 | OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDateTime& start ) const { |
109 | return m_backEnd->effectiveNonRepeatingEvents( start ); | 110 | return m_backEnd->effectiveNonRepeatingEvents( start ); |
110 | } | 111 | } |
112 | int ODateBookAccess::rtti() const | ||
113 | { | ||
114 | return OPimResolver::DateBook; | ||
115 | } | ||
111 | 116 | ||
112 | } | 117 | } |