summaryrefslogtreecommitdiff
path: root/libopie2
authoreilers <eilers>2003-11-17 15:55:43 (UTC)
committer eilers <eilers>2003-11-17 15:55:43 (UTC)
commit3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540 (patch) (side-by-side diff)
tree051c0bda86446e65009f2e6f42c57272e93f562c /libopie2
parentc4a6e9c529ea6bcb1c9a42fee33a70300f116c98 (diff)
downloadopie-3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540.zip
opie-3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540.tar.gz
opie-3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540.tar.bz2
Minor changes..
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp2
-rw-r--r--libopie2/opiepim/core/opimrecord.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
index 5ea945c..39c43c5 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
@@ -72,49 +72,49 @@ namespace {
FRWeekdays,
FRPosition,
FRFreq,
FRHasEndDate,
FREndDate,
FRStart,
FREnd,
FNote,
FCreated,
FTimeZone,
FRecParent,
FRecChildren,
FExceptions
};
inline void save( const OEvent& ev, QString& buf ) {
qWarning("Saving %d %s", ev.uid(), ev.description().latin1() );
buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\"";
if (!ev.location().isEmpty() )
buf += " location=\"" + Qtopia::escapeString(ev.location() ) + "\"";
buf += " categories=\""+ Qtopia::escapeString( Qtopia::Record::idsToString( ev.categories() ) ) + "\"";
buf += " uid=\"" + QString::number( ev.uid() ) + "\"";
if (ev.isAllDay() )
- buf += " type=\"AllDay\"";
+ buf += " type=\"AllDay\""; // is that all ?? (eilers)
if (ev.hasNotifiers() ) {
OPimAlarm alarm = ev.notifiers().alarms()[0]; // take only the first
int minutes = alarm.dateTime().secsTo( ev.startDateTime() ) / 60;
buf += " alarm=\"" + QString::number(minutes) + "\" sound=\"";
if ( alarm.sound() == OPimAlarm::Loud )
buf += "loud";
else
buf += "silent";
buf += "\"";
}
if ( ev.hasRecurrence() ) {
buf += ev.recurrence().toString();
}
/*
* fscking timezones :) well, we'll first convert
* the QDateTime to a QDateTime in UTC time
* and then we'll create a nice time_t
*/
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() ) ) ) + "\"";
if (!ev.note().isEmpty() ) {
diff --git a/libopie2/opiepim/core/opimrecord.h b/libopie2/opiepim/core/opimrecord.h
index 563b19c..3d774e2 100644
--- a/libopie2/opiepim/core/opimrecord.h
+++ b/libopie2/opiepim/core/opimrecord.h
@@ -74,48 +74,49 @@ public:
/**
* the name of the Record
*/
virtual QString type()const = 0;
/**
* matches the Records the regular expression?
*/
virtual bool match( const QString &regexp ) const
{setLastHitField( -1 );
return Qtopia::Record::match(QRegExp(regexp));};
/**
* if implemented this function returns which item has been
* last hit by the match() function.
* or -1 if not implemented or no hit has occured
*/
int lastHitField()const;
/**
* converts the internal structure to a map
*/
virtual QMap<int, QString> toMap()const = 0;
+ // virtual fromMap( const <int, QString>& map ) = 0; // Should be added in the future (eilers)
/**
* key value representation of extra items
*/
QMap<QString, QString> toExtraMap()const;
void setExtraMap( const QMap<QString, QString>& );
/**
* the name for a recordField
*/
virtual QString recordField(int)const = 0;
/**
* returns a reference of the
* Cross Reference Manager
* Partner 'One' is THIS PIM RECORD!
* 'Two' is the Partner where we link to
*/
OPimXRefManager& xrefmanager();
/**
* set the uid
*/
virtual void setUid( int uid );