author | eilers <eilers> | 2003-11-17 15:55:43 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-11-17 15:55:43 (UTC) |
commit | 3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540 (patch) (unidiff) | |
tree | 051c0bda86446e65009f2e6f42c57272e93f562c /libopie/pim | |
parent | c4a6e9c529ea6bcb1c9a42fee33a70300f116c98 (diff) | |
download | opie-3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540.zip opie-3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540.tar.gz opie-3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540.tar.bz2 |
Minor changes..
-rw-r--r-- | libopie/pim/odatebookaccessbackend_xml.cpp | 2 | ||||
-rw-r--r-- | libopie/pim/opimrecord.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/libopie/pim/odatebookaccessbackend_xml.cpp b/libopie/pim/odatebookaccessbackend_xml.cpp index 5ea945c..39c43c5 100644 --- a/libopie/pim/odatebookaccessbackend_xml.cpp +++ b/libopie/pim/odatebookaccessbackend_xml.cpp | |||
@@ -72,49 +72,49 @@ namespace { | |||
72 | FRWeekdays, | 72 | FRWeekdays, |
73 | FRPosition, | 73 | FRPosition, |
74 | FRFreq, | 74 | FRFreq, |
75 | FRHasEndDate, | 75 | FRHasEndDate, |
76 | FREndDate, | 76 | FREndDate, |
77 | FRStart, | 77 | FRStart, |
78 | FREnd, | 78 | FREnd, |
79 | FNote, | 79 | FNote, |
80 | FCreated, | 80 | FCreated, |
81 | FTimeZone, | 81 | FTimeZone, |
82 | FRecParent, | 82 | FRecParent, |
83 | FRecChildren, | 83 | FRecChildren, |
84 | FExceptions | 84 | FExceptions |
85 | }; | 85 | }; |
86 | inline void save( const OEvent& ev, QString& buf ) { | 86 | inline void save( const OEvent& ev, QString& buf ) { |
87 | qWarning("Saving %d %s", ev.uid(), ev.description().latin1() ); | 87 | qWarning("Saving %d %s", ev.uid(), ev.description().latin1() ); |
88 | buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; | 88 | buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; |
89 | if (!ev.location().isEmpty() ) | 89 | if (!ev.location().isEmpty() ) |
90 | buf += " location=\"" + Qtopia::escapeString(ev.location() ) + "\""; | 90 | buf += " location=\"" + Qtopia::escapeString(ev.location() ) + "\""; |
91 | 91 | ||
92 | buf += " categories=\""+ Qtopia::escapeString( Qtopia::Record::idsToString( ev.categories() ) ) + "\""; | 92 | buf += " categories=\""+ Qtopia::escapeString( Qtopia::Record::idsToString( ev.categories() ) ) + "\""; |
93 | buf += " uid=\"" + QString::number( ev.uid() ) + "\""; | 93 | buf += " uid=\"" + QString::number( ev.uid() ) + "\""; |
94 | 94 | ||
95 | if (ev.isAllDay() ) | 95 | if (ev.isAllDay() ) |
96 | buf += " type=\"AllDay\""; | 96 | buf += " type=\"AllDay\""; // is that all ?? (eilers) |
97 | 97 | ||
98 | if (ev.hasNotifiers() ) { | 98 | if (ev.hasNotifiers() ) { |
99 | OPimAlarm alarm = ev.notifiers().alarms()[0]; // take only the first | 99 | OPimAlarm alarm = ev.notifiers().alarms()[0]; // take only the first |
100 | int minutes = alarm.dateTime().secsTo( ev.startDateTime() ) / 60; | 100 | int minutes = alarm.dateTime().secsTo( ev.startDateTime() ) / 60; |
101 | buf += " alarm=\"" + QString::number(minutes) + "\" sound=\""; | 101 | buf += " alarm=\"" + QString::number(minutes) + "\" sound=\""; |
102 | if ( alarm.sound() == OPimAlarm::Loud ) | 102 | if ( alarm.sound() == OPimAlarm::Loud ) |
103 | buf += "loud"; | 103 | buf += "loud"; |
104 | else | 104 | else |
105 | buf += "silent"; | 105 | buf += "silent"; |
106 | buf += "\""; | 106 | buf += "\""; |
107 | } | 107 | } |
108 | if ( ev.hasRecurrence() ) { | 108 | if ( ev.hasRecurrence() ) { |
109 | buf += ev.recurrence().toString(); | 109 | buf += ev.recurrence().toString(); |
110 | } | 110 | } |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * fscking timezones :) well, we'll first convert | 113 | * fscking timezones :) well, we'll first convert |
114 | * the QDateTime to a QDateTime in UTC time | 114 | * the QDateTime to a QDateTime in UTC time |
115 | * and then we'll create a nice time_t | 115 | * and then we'll create a nice time_t |
116 | */ | 116 | */ |
117 | OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); | 117 | OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); |
118 | buf += " start=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.startDateTime(), OTimeZone::utc() ) ) ) + "\""; | 118 | buf += " start=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.startDateTime(), OTimeZone::utc() ) ) ) + "\""; |
119 | buf += " end=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.endDateTime() , OTimeZone::utc() ) ) ) + "\""; | 119 | buf += " end=\"" + QString::number( zone.fromUTCDateTime( zone.toDateTime( ev.endDateTime() , OTimeZone::utc() ) ) ) + "\""; |
120 | if (!ev.note().isEmpty() ) { | 120 | if (!ev.note().isEmpty() ) { |
diff --git a/libopie/pim/opimrecord.h b/libopie/pim/opimrecord.h index 563b19c..3d774e2 100644 --- a/libopie/pim/opimrecord.h +++ b/libopie/pim/opimrecord.h | |||
@@ -74,48 +74,49 @@ public: | |||
74 | 74 | ||
75 | /** | 75 | /** |
76 | * the name of the Record | 76 | * the name of the Record |
77 | */ | 77 | */ |
78 | virtual QString type()const = 0; | 78 | virtual QString type()const = 0; |
79 | 79 | ||
80 | /** | 80 | /** |
81 | * matches the Records the regular expression? | 81 | * matches the Records the regular expression? |
82 | */ | 82 | */ |
83 | virtual bool match( const QString ®exp ) const | 83 | virtual bool match( const QString ®exp ) const |
84 | {setLastHitField( -1 ); | 84 | {setLastHitField( -1 ); |
85 | return Qtopia::Record::match(QRegExp(regexp));}; | 85 | return Qtopia::Record::match(QRegExp(regexp));}; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * if implemented this function returns which item has been | 88 | * if implemented this function returns which item has been |
89 | * last hit by the match() function. | 89 | * last hit by the match() function. |
90 | * or -1 if not implemented or no hit has occured | 90 | * or -1 if not implemented or no hit has occured |
91 | */ | 91 | */ |
92 | int lastHitField()const; | 92 | int lastHitField()const; |
93 | 93 | ||
94 | /** | 94 | /** |
95 | * converts the internal structure to a map | 95 | * converts the internal structure to a map |
96 | */ | 96 | */ |
97 | virtual QMap<int, QString> toMap()const = 0; | 97 | virtual QMap<int, QString> toMap()const = 0; |
98 | // virtual fromMap( const <int, QString>& map ) = 0; // Should be added in the future (eilers) | ||
98 | 99 | ||
99 | /** | 100 | /** |
100 | * key value representation of extra items | 101 | * key value representation of extra items |
101 | */ | 102 | */ |
102 | QMap<QString, QString> toExtraMap()const; | 103 | QMap<QString, QString> toExtraMap()const; |
103 | void setExtraMap( const QMap<QString, QString>& ); | 104 | void setExtraMap( const QMap<QString, QString>& ); |
104 | 105 | ||
105 | /** | 106 | /** |
106 | * the name for a recordField | 107 | * the name for a recordField |
107 | */ | 108 | */ |
108 | virtual QString recordField(int)const = 0; | 109 | virtual QString recordField(int)const = 0; |
109 | 110 | ||
110 | /** | 111 | /** |
111 | * returns a reference of the | 112 | * returns a reference of the |
112 | * Cross Reference Manager | 113 | * Cross Reference Manager |
113 | * Partner 'One' is THIS PIM RECORD! | 114 | * Partner 'One' is THIS PIM RECORD! |
114 | * 'Two' is the Partner where we link to | 115 | * 'Two' is the Partner where we link to |
115 | */ | 116 | */ |
116 | OPimXRefManager& xrefmanager(); | 117 | OPimXRefManager& xrefmanager(); |
117 | 118 | ||
118 | /** | 119 | /** |
119 | * set the uid | 120 | * set the uid |
120 | */ | 121 | */ |
121 | virtual void setUid( int uid ); | 122 | virtual void setUid( int uid ); |