summaryrefslogtreecommitdiff
authortille <tille>2003-05-15 13:20:20 (UTC)
committer tille <tille>2003-05-15 13:20:20 (UTC)
commit7a5aff141f755ea67fccfee7ccc4fbbd3d3c0b94 (patch) (unidiff)
treee7503907e2ef21dae71141abb0954a5f3c43fe34
parent5b0993378eb33f4bf576b91286ece24d49806ccf (diff)
downloadopie-7a5aff141f755ea67fccfee7ccc4fbbd3d3c0b94.zip
opie-7a5aff141f755ea67fccfee7ccc4fbbd3d3c0b94.tar.gz
opie-7a5aff141f755ea67fccfee7ccc4fbbd3d3c0b94.tar.bz2
how did this compile last time...? ;)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/oevent.cpp10
-rw-r--r--libopie2/opiepim/oevent.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp
index 2b138c0..83b191f 100644
--- a/libopie/pim/oevent.cpp
+++ b/libopie/pim/oevent.cpp
@@ -192,65 +192,65 @@ void OEvent::setEndDateTime( const QDateTime& dt ) {
192 changeOrModify(); 192 changeOrModify();
193 data->end = dt; 193 data->end = dt;
194} 194}
195bool OEvent::isMultipleDay()const { 195bool OEvent::isMultipleDay()const {
196 return data->end.date().day() - data->start.date().day(); 196 return data->end.date().day() - data->start.date().day();
197} 197}
198bool OEvent::isAllDay()const { 198bool OEvent::isAllDay()const {
199 return data->isAllDay; 199 return data->isAllDay;
200} 200}
201void OEvent::setAllDay( bool allDay ) { 201void OEvent::setAllDay( bool allDay ) {
202 changeOrModify(); 202 changeOrModify();
203 data->isAllDay = allDay; 203 data->isAllDay = allDay;
204 if (allDay ) data->timezone = "UTC"; 204 if (allDay ) data->timezone = "UTC";
205} 205}
206void OEvent::setTimeZone( const QString& tz ) { 206void OEvent::setTimeZone( const QString& tz ) {
207 changeOrModify(); 207 changeOrModify();
208 data->timezone = tz; 208 data->timezone = tz;
209} 209}
210QString OEvent::timeZone()const { 210QString OEvent::timeZone()const {
211 if (data->isAllDay ) return QString::fromLatin1("UTC"); 211 if (data->isAllDay ) return QString::fromLatin1("UTC");
212 return data->timezone; 212 return data->timezone;
213} 213}
214bool OEvent::match( const QRegExp& re )const { 214bool OEvent::match( const QRegExp& re )const {
215 if ( re.match( data->description ) != -1 ){ 215 if ( re.match( data->description ) != -1 ){
216 setLastHitField( DatebookDescription ); 216 setLastHitField( Qtopia::DatebookDescription );
217 return true; 217 return true;
218 } 218 }
219 if ( re.match( data->note ) != -1 ){ 219 if ( re.match( data->note ) != -1 ){
220 setLastHitField( Note ); 220 setLastHitField( Qtopia::Note );
221 return true; 221 return true;
222 } 222 }
223 if ( re.match( data->location ) != -1 ){ 223 if ( re.match( data->location ) != -1 ){
224 setLastHitField( Location ); 224 setLastHitField( Qtopia::Location );
225 return true; 225 return true;
226 } 226 }
227 if ( re.match( data->start.toString() ) != -1 ){ 227 if ( re.match( data->start.toString() ) != -1 ){
228 setLastHitField( StartDateTime ); 228 setLastHitField( Qtopia::StartDateTime );
229 return true; 229 return true;
230 } 230 }
231 if ( re.match( data->end.toString() ) != -1 ){ 231 if ( re.match( data->end.toString() ) != -1 ){
232 setLastHitField( EndDateTime ); 232 setLastHitField( Qtopia::EndDateTime );
233 return true; 233 return true;
234 } 234 }
235 return false; 235 return false;
236} 236}
237QString OEvent::toRichText()const { 237QString OEvent::toRichText()const {
238 QString text; 238 QString text;
239 if ( !description().isEmpty() ) { 239 if ( !description().isEmpty() ) {
240 text += "<b>" + QObject::tr( "Description:") + "</b><br>"; 240 text += "<b>" + QObject::tr( "Description:") + "</b><br>";
241 text += Qtopia::escapeString(description() ). 241 text += Qtopia::escapeString(description() ).
242 replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; 242 replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
243 } 243 }
244 if ( startDateTime().isValid() ) { 244 if ( startDateTime().isValid() ) {
245 text += "<b>" + QObject::tr( "Start:") + "</b> "; 245 text += "<b>" + QObject::tr( "Start:") + "</b> ";
246 text += Qtopia::escapeString(startDateTime().toString() ). 246 text += Qtopia::escapeString(startDateTime().toString() ).
247 replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; 247 replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
248 } 248 }
249 if ( endDateTime().isValid() ) { 249 if ( endDateTime().isValid() ) {
250 text += "<b>" + QObject::tr( "End:") + "</b> "; 250 text += "<b>" + QObject::tr( "End:") + "</b> ";
251 text += Qtopia::escapeString(endDateTime().toString() ). 251 text += Qtopia::escapeString(endDateTime().toString() ).
252 replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; 252 replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
253 } 253 }
254 if ( !note().isEmpty() ) { 254 if ( !note().isEmpty() ) {
255 text += "<b>" + QObject::tr( "Note:") + "</b><br>"; 255 text += "<b>" + QObject::tr( "Note:") + "</b><br>";
256 text += note(); 256 text += note();
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp
index 2b138c0..83b191f 100644
--- a/libopie2/opiepim/oevent.cpp
+++ b/libopie2/opiepim/oevent.cpp
@@ -192,65 +192,65 @@ void OEvent::setEndDateTime( const QDateTime& dt ) {
192 changeOrModify(); 192 changeOrModify();
193 data->end = dt; 193 data->end = dt;
194} 194}
195bool OEvent::isMultipleDay()const { 195bool OEvent::isMultipleDay()const {
196 return data->end.date().day() - data->start.date().day(); 196 return data->end.date().day() - data->start.date().day();
197} 197}
198bool OEvent::isAllDay()const { 198bool OEvent::isAllDay()const {
199 return data->isAllDay; 199 return data->isAllDay;
200} 200}
201void OEvent::setAllDay( bool allDay ) { 201void OEvent::setAllDay( bool allDay ) {
202 changeOrModify(); 202 changeOrModify();
203 data->isAllDay = allDay; 203 data->isAllDay = allDay;
204 if (allDay ) data->timezone = "UTC"; 204 if (allDay ) data->timezone = "UTC";
205} 205}
206void OEvent::setTimeZone( const QString& tz ) { 206void OEvent::setTimeZone( const QString& tz ) {
207 changeOrModify(); 207 changeOrModify();
208 data->timezone = tz; 208 data->timezone = tz;
209} 209}
210QString OEvent::timeZone()const { 210QString OEvent::timeZone()const {
211 if (data->isAllDay ) return QString::fromLatin1("UTC"); 211 if (data->isAllDay ) return QString::fromLatin1("UTC");
212 return data->timezone; 212 return data->timezone;
213} 213}
214bool OEvent::match( const QRegExp& re )const { 214bool OEvent::match( const QRegExp& re )const {
215 if ( re.match( data->description ) != -1 ){ 215 if ( re.match( data->description ) != -1 ){
216 setLastHitField( DatebookDescription ); 216 setLastHitField( Qtopia::DatebookDescription );
217 return true; 217 return true;
218 } 218 }
219 if ( re.match( data->note ) != -1 ){ 219 if ( re.match( data->note ) != -1 ){
220 setLastHitField( Note ); 220 setLastHitField( Qtopia::Note );
221 return true; 221 return true;
222 } 222 }
223 if ( re.match( data->location ) != -1 ){ 223 if ( re.match( data->location ) != -1 ){
224 setLastHitField( Location ); 224 setLastHitField( Qtopia::Location );
225 return true; 225 return true;
226 } 226 }
227 if ( re.match( data->start.toString() ) != -1 ){ 227 if ( re.match( data->start.toString() ) != -1 ){
228 setLastHitField( StartDateTime ); 228 setLastHitField( Qtopia::StartDateTime );
229 return true; 229 return true;
230 } 230 }
231 if ( re.match( data->end.toString() ) != -1 ){ 231 if ( re.match( data->end.toString() ) != -1 ){
232 setLastHitField( EndDateTime ); 232 setLastHitField( Qtopia::EndDateTime );
233 return true; 233 return true;
234 } 234 }
235 return false; 235 return false;
236} 236}
237QString OEvent::toRichText()const { 237QString OEvent::toRichText()const {
238 QString text; 238 QString text;
239 if ( !description().isEmpty() ) { 239 if ( !description().isEmpty() ) {
240 text += "<b>" + QObject::tr( "Description:") + "</b><br>"; 240 text += "<b>" + QObject::tr( "Description:") + "</b><br>";
241 text += Qtopia::escapeString(description() ). 241 text += Qtopia::escapeString(description() ).
242 replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; 242 replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
243 } 243 }
244 if ( startDateTime().isValid() ) { 244 if ( startDateTime().isValid() ) {
245 text += "<b>" + QObject::tr( "Start:") + "</b> "; 245 text += "<b>" + QObject::tr( "Start:") + "</b> ";
246 text += Qtopia::escapeString(startDateTime().toString() ). 246 text += Qtopia::escapeString(startDateTime().toString() ).
247 replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; 247 replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
248 } 248 }
249 if ( endDateTime().isValid() ) { 249 if ( endDateTime().isValid() ) {
250 text += "<b>" + QObject::tr( "End:") + "</b> "; 250 text += "<b>" + QObject::tr( "End:") + "</b> ";
251 text += Qtopia::escapeString(endDateTime().toString() ). 251 text += Qtopia::escapeString(endDateTime().toString() ).
252 replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; 252 replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
253 } 253 }
254 if ( !note().isEmpty() ) { 254 if ( !note().isEmpty() ) {
255 text += "<b>" + QObject::tr( "Note:") + "</b><br>"; 255 text += "<b>" + QObject::tr( "Note:") + "</b><br>";
256 text += note(); 256 text += note();