summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/odatebookaccessbackend.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.cpp b/libopie2/opiepim/backend/odatebookaccessbackend.cpp
index 9bf4bf0..f3b7b5f 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend.cpp
@@ -25,25 +25,25 @@
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <qtl.h>
-#include <opie2/orecur.h>
+#include <opie2/opimrecurrence.h>
#include <opie2/odatebookaccessbackend.h>
using namespace Opie;
namespace {
/* a small helper to get all NonRepeating events for a range of time */
- void events( OEffectiveEvent::ValueList& tmpList, const OEvent::ValueList& events,
+ void events( OEffectiveEvent::ValueList& tmpList, const OPimEvent::ValueList& events,
const QDate& from, const QDate& to ) {
QDateTime dtStart, dtEnd;
- for ( OEvent::ValueList::ConstIterator it = events.begin(); it != events.end(); ++it ) {
+ for ( OPimEvent::ValueList::ConstIterator it = events.begin(); it != events.end(); ++it ) {
dtStart = (*it).startDateTime();
dtEnd = (*it).endDateTime();
/*
* If in range
*/
@@ -88,19 +88,19 @@ namespace {
dt = dt.addDays( 1 );
}
}
}
}
- void repeat( OEffectiveEvent::ValueList& tmpList, const OEvent::ValueList& list,
+ void repeat( OEffectiveEvent::ValueList& tmpList, const OPimEvent::ValueList& list,
const QDate& from, const QDate& to ) {
QDate repeat;
- for ( OEvent::ValueList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
+ for ( OPimEvent::ValueList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
int dur = (*it).startDateTime().date().daysTo( (*it).endDateTime().date() );
QDate itDate = from.addDays(-dur );
- ORecur rec = (*it).recurrence();
+ OPimRecurrence rec = (*it).recurrence();
if ( !rec.hasEndDate() || rec.endDate() > to ) {
rec.setEndDate( to );
rec.setHasEndDate( true );
}
while (rec.nextOcurrence(itDate, repeat ) ) {
if (repeat > to ) break;
@@ -149,23 +149,23 @@ namespace {
}
}
namespace Opie {
ODateBookAccessBackend::ODateBookAccessBackend()
- : OPimAccessBackend<OEvent>()
+ : OPimAccessBackend<OPimEvent>()
{
}
ODateBookAccessBackend::~ODateBookAccessBackend() {
}
OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveEvents( const QDate& from,
const QDate& to ) {
OEffectiveEvent::ValueList tmpList;
- OEvent::ValueList list = directNonRepeats();
+ OPimEvent::ValueList list = directNonRepeats();
events( tmpList, list, from, to );
repeat( tmpList, directRawRepeats(),from,to );
list = directRawRepeats(); // Useless, isn't it ? (eilers)
@@ -187,13 +187,13 @@ OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveEvents( const QDateT
return tmpList;
}
OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveNonRepeatingEvents( const QDate& from,
const QDate& to ) {
OEffectiveEvent::ValueList tmpList;
- OEvent::ValueList list = directNonRepeats();
+ OPimEvent::ValueList list = directNonRepeats();
events( tmpList, list, from, to );
qHeapSort( tmpList );
return tmpList;
}