summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
index 0ebda98..77c0253 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
@@ -48,4 +48,4 @@
#include <opie2/opimnotifymanager.h>
-#include <opie2/orecur.h>
-#include <opie2/otimezone.h>
+#include <opie2/opimrecurrence.h>
+#include <opie2/opimtimezone.h>
#include <opie2/odatebookaccessbackend_xml.h>
@@ -83,6 +83,6 @@ namespace {
time_t start, end, created, rp_end;
- ORecur* rec;
- ORecur* recur() {
+ OPimRecurrence* rec;
+ OPimRecurrence* recur() {
if (!rec)
- rec = new ORecur;
+ rec = new OPimRecurrence;
@@ -116,4 +116,4 @@ namespace {
- // FIXME: Use OEvent::toMap() here !! (eilers)
- inline void save( const OEvent& ev, QString& buf ) {
+ // FIXME: Use OPimEvent::toMap() here !! (eilers)
+ inline void save( const OPimEvent& ev, QString& buf ) {
qWarning("Saving %d %s", ev.uid(), ev.description().latin1() );
@@ -148,5 +148,5 @@ namespace {
*/
- OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() );
- buf += " start=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.startDateTime(), OTimeZone::utc() ) ) ) + "\"";
- buf += " end=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.endDateTime() , OTimeZone::utc() ) ) ) + "\"";
+ OPimTimeZone zone( ev.timeZone().isEmpty() ? OPimTimeZone::current() : ev.timeZone() );
+ buf += " start=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.startDateTime(), OPimTimeZone::utc() ) ) ) + "\"";
+ buf += " end=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.endDateTime() , OPimTimeZone::utc() ) ) ) + "\"";
if (!ev.note().isEmpty() ) {
@@ -179,4 +179,4 @@ namespace {
- inline bool forAll( const QMap<int, OEvent>& list, QFile& file ) {
- QMap<int, OEvent>::ConstIterator it;
+ inline bool forAll( const QMap<int, OPimEvent>& list, QFile& file ) {
+ QMap<int, OPimEvent>::ConstIterator it;
QString buf;
@@ -266,3 +266,3 @@ QArray<int> ODateBookAccessBackend_XML::allRecords()const {
uint i = 0;
- QMap<int, OEvent>::ConstIterator it;
+ QMap<int, OPimEvent>::ConstIterator it;
@@ -279,3 +279,3 @@ QArray<int> ODateBookAccessBackend_XML::allRecords()const {
}
-QArray<int> ODateBookAccessBackend_XML::queryByExample(const OEvent&, int, const QDateTime& ) {
+QArray<int> ODateBookAccessBackend_XML::queryByExample(const OPimEvent&, int, const QDateTime& ) {
return QArray<int>();
@@ -287,3 +287,3 @@ void ODateBookAccessBackend_XML::clear() {
}
-OEvent ODateBookAccessBackend_XML::find( int uid ) const{
+OPimEvent ODateBookAccessBackend_XML::find( int uid ) const{
if ( m_raw.contains( uid ) )
@@ -293,3 +293,3 @@ OEvent ODateBookAccessBackend_XML::find( int uid ) const{
}
-bool ODateBookAccessBackend_XML::add( const OEvent& ev ) {
+bool ODateBookAccessBackend_XML::add( const OPimEvent& ev ) {
m_changed = true;
@@ -309,3 +309,3 @@ bool ODateBookAccessBackend_XML::remove( int uid ) {
}
-bool ODateBookAccessBackend_XML::replace( const OEvent& ev ) {
+bool ODateBookAccessBackend_XML::replace( const OPimEvent& ev ) {
replace( ev.uid() ); // ??? Shouldn't this be "remove( ev.uid() ) ??? (eilers)
@@ -319,3 +319,3 @@ QArray<int> ODateBookAccessBackend_XML::rawRepeats()const {
uint i = 0;
- QMap<int, OEvent>::ConstIterator it;
+ QMap<int, OPimEvent>::ConstIterator it;
@@ -331,3 +331,3 @@ QArray<int> ODateBookAccessBackend_XML::nonRepeats()const {
uint i = 0;
- QMap<int, OEvent>::ConstIterator it;
+ QMap<int, OPimEvent>::ConstIterator it;
@@ -340,5 +340,5 @@ QArray<int> ODateBookAccessBackend_XML::nonRepeats()const {
}
-OEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats() {
- OEvent::ValueList list;
- QMap<int, OEvent>::ConstIterator it;
+OPimEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats() {
+ OPimEvent::ValueList list;
+ QMap<int, OPimEvent>::ConstIterator it;
for (it = m_raw.begin(); it != m_raw.end(); ++it )
@@ -348,5 +348,5 @@ OEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats() {
}
-OEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats() {
- OEvent::ValueList list;
- QMap<int, OEvent>::ConstIterator it;
+OPimEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats() {
+ OPimEvent::ValueList list;
+ QMap<int, OPimEvent>::ConstIterator it;
for (it = m_rep.begin(); it != m_rep.end(); ++it )
@@ -357,3 +357,3 @@ OEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats() {
-// FIXME: Use OEvent::fromMap() (eilers)
+// FIXME: Use OPimEvent::fromMap() (eilers)
bool ODateBookAccessBackend_XML::loadFile() {
@@ -416,3 +416,3 @@ bool ODateBookAccessBackend_XML::loadFile() {
- OEvent ev;
+ OPimEvent ev;
rec = 0;
@@ -482,7 +482,7 @@ bool ODateBookAccessBackend_XML::loadFile() {
-// FIXME: Use OEvent::fromMap() which makes this obsolete.. (eilers)
-void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
+// FIXME: Use OPimEvent::fromMap() which makes this obsolete.. (eilers)
+void ODateBookAccessBackend_XML::finalizeRecord( OPimEvent& ev ) {
/* AllDay is alway in UTC */
if ( ev.isAllDay() ) {
- OTimeZone utc = OTimeZone::utc();
+ OPimTimeZone utc = OPimTimeZone::utc();
ev.setStartDateTime( utc.fromUTCDateTime( start ) );
@@ -493,13 +493,13 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
// qWarning(" Start is %d", start );
- OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() );
+ OPimTimeZone zone( ev.timeZone().isEmpty() ? OPimTimeZone::current() : ev.timeZone() );
QDateTime date = zone.toDateTime( start );
qWarning(" Start is %s", date.toString().latin1() );
- ev.setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) );
+ ev.setStartDateTime( zone.toDateTime( date, OPimTimeZone::current() ) );
date = zone.toDateTime( end );
- ev.setEndDateTime ( zone.toDateTime( date, OTimeZone::current() ) );
+ ev.setEndDateTime ( zone.toDateTime( date, OPimTimeZone::current() ) );
}
if ( rec && rec->doesRecur() ) {
- OTimeZone utc = OTimeZone::utc();
- ORecur recu( *rec ); // call copy c'tor;
+ OPimTimeZone utc = OPimTimeZone::utc();
+ OPimRecurrence recu( *rec ); // call copy c'tor;
recu.setEndDate ( utc.fromUTCDateTime( rp_end ).date() );
@@ -526,3 +526,3 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
}
-void ODateBookAccessBackend_XML::setField( OEvent& e, int id, const QString& value) {
+void ODateBookAccessBackend_XML::setField( OPimEvent& e, int id, const QString& value) {
// qWarning(" setting %s", value.latin1() );
@@ -556,13 +556,13 @@ void ODateBookAccessBackend_XML::setField( OEvent& e, int id, const QString& val
if ( value == "Daily" )
- recur()->setType( ORecur::Daily );
+ recur()->setType( OPimRecurrence::Daily );
else if ( value == "Weekly" )
- recur()->setType( ORecur::Weekly);
+ recur()->setType( OPimRecurrence::Weekly);
else if ( value == "MonthlyDay" )
- recur()->setType( ORecur::MonthlyDay );
+ recur()->setType( OPimRecurrence::MonthlyDay );
else if ( value == "MonthlyDate" )
- recur()->setType( ORecur::MonthlyDate );
+ recur()->setType( OPimRecurrence::MonthlyDate );
else if ( value == "Yearly" )
- recur()->setType( ORecur::Yearly );
+ recur()->setType( OPimRecurrence::Yearly );
else
- recur()->setType( ORecur::NoRepeat );
+ recur()->setType( OPimRecurrence::NoRepeat );
break;
@@ -629,3 +629,3 @@ QArray<int> ODateBookAccessBackend_XML::matchRegexp( const QRegExp &r ) const
uint arraycounter = 0;
- QMap<int, OEvent>::ConstIterator it;
+ QMap<int, OPimEvent>::ConstIterator it;