author | tille <tille> | 2003-05-09 11:45:00 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-09 11:45:00 (UTC) |
commit | 7183dce01fa07a905d259cb79a8792ca993a75f6 (patch) (unidiff) | |
tree | 2531c922576652d6f87a91bac14d2082343ded8c | |
parent | 49cc0e47343578c0dfe1294afdf574ebfc1f4f4b (diff) | |
download | opie-7183dce01fa07a905d259cb79a8792ca993a75f6.zip opie-7183dce01fa07a905d259cb79a8792ca993a75f6.tar.gz opie-7183dce01fa07a905d259cb79a8792ca993a75f6.tar.bz2 |
toShortString now contains start time and date
-rw-r--r-- | libopie/pim/oevent.cpp | 14 | ||||
-rw-r--r-- | libopie2/opiepim/oevent.cpp | 14 |
2 files changed, 26 insertions, 2 deletions
diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp index 28cf873..b731c8a 100644 --- a/libopie/pim/oevent.cpp +++ b/libopie/pim/oevent.cpp | |||
@@ -237,33 +237,45 @@ QString OEvent::toRichText()const { | |||
237 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; | 237 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
238 | } | 238 | } |
239 | if ( endDateTime().isValid() ) { | 239 | if ( endDateTime().isValid() ) { |
240 | text += "<b>" + QObject::tr( "End:") + "</b> "; | 240 | text += "<b>" + QObject::tr( "End:") + "</b> "; |
241 | text += Qtopia::escapeString(endDateTime().toString() ). | 241 | text += Qtopia::escapeString(endDateTime().toString() ). |
242 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; | 242 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
243 | } | 243 | } |
244 | if ( !note().isEmpty() ) { | 244 | if ( !note().isEmpty() ) { |
245 | text += "<b>" + QObject::tr( "Note:") + "</b><br>"; | 245 | text += "<b>" + QObject::tr( "Note:") + "</b><br>"; |
246 | text += note(); | 246 | text += note(); |
247 | // text += Qtopia::escapeString(note() ). | 247 | // text += Qtopia::escapeString(note() ). |
248 | // replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; | 248 | // replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
249 | } | 249 | } |
250 | return text; | 250 | return text; |
251 | } | 251 | } |
252 | QString OEvent::toShortText()const { | 252 | QString OEvent::toShortText()const { |
253 | return description(); | 253 | QString text; |
254 | text += QString::number( startDateTime().date().day() ); | ||
255 | text += "."; | ||
256 | text += QString::number( startDateTime().date().month() ); | ||
257 | text += "."; | ||
258 | text += QString::number( startDateTime().date().year() ); | ||
259 | text += " "; | ||
260 | text += QString::number( startDateTime().time().hour() ); | ||
261 | text += ":"; | ||
262 | text += QString::number( startDateTime().time().minute() ); | ||
263 | text += " - "; | ||
264 | text += description(); | ||
265 | return text; | ||
254 | } | 266 | } |
255 | QString OEvent::type()const { | 267 | QString OEvent::type()const { |
256 | return QString::fromLatin1("OEvent"); | 268 | return QString::fromLatin1("OEvent"); |
257 | } | 269 | } |
258 | QString OEvent::recordField( int /*id */ )const { | 270 | QString OEvent::recordField( int /*id */ )const { |
259 | return QString::null; | 271 | return QString::null; |
260 | } | 272 | } |
261 | int OEvent::rtti() { | 273 | int OEvent::rtti() { |
262 | return OPimResolver::DateBook; | 274 | return OPimResolver::DateBook; |
263 | } | 275 | } |
264 | bool OEvent::loadFromStream( QDataStream& ) { | 276 | bool OEvent::loadFromStream( QDataStream& ) { |
265 | return true; | 277 | return true; |
266 | } | 278 | } |
267 | bool OEvent::saveToStream( QDataStream& )const { | 279 | bool OEvent::saveToStream( QDataStream& )const { |
268 | return true; | 280 | return true; |
269 | } | 281 | } |
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp index 28cf873..b731c8a 100644 --- a/libopie2/opiepim/oevent.cpp +++ b/libopie2/opiepim/oevent.cpp | |||
@@ -237,33 +237,45 @@ QString OEvent::toRichText()const { | |||
237 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; | 237 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
238 | } | 238 | } |
239 | if ( endDateTime().isValid() ) { | 239 | if ( endDateTime().isValid() ) { |
240 | text += "<b>" + QObject::tr( "End:") + "</b> "; | 240 | text += "<b>" + QObject::tr( "End:") + "</b> "; |
241 | text += Qtopia::escapeString(endDateTime().toString() ). | 241 | text += Qtopia::escapeString(endDateTime().toString() ). |
242 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; | 242 | replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
243 | } | 243 | } |
244 | if ( !note().isEmpty() ) { | 244 | if ( !note().isEmpty() ) { |
245 | text += "<b>" + QObject::tr( "Note:") + "</b><br>"; | 245 | text += "<b>" + QObject::tr( "Note:") + "</b><br>"; |
246 | text += note(); | 246 | text += note(); |
247 | // text += Qtopia::escapeString(note() ). | 247 | // text += Qtopia::escapeString(note() ). |
248 | // replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; | 248 | // replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
249 | } | 249 | } |
250 | return text; | 250 | return text; |
251 | } | 251 | } |
252 | QString OEvent::toShortText()const { | 252 | QString OEvent::toShortText()const { |
253 | return description(); | 253 | QString text; |
254 | text += QString::number( startDateTime().date().day() ); | ||
255 | text += "."; | ||
256 | text += QString::number( startDateTime().date().month() ); | ||
257 | text += "."; | ||
258 | text += QString::number( startDateTime().date().year() ); | ||
259 | text += " "; | ||
260 | text += QString::number( startDateTime().time().hour() ); | ||
261 | text += ":"; | ||
262 | text += QString::number( startDateTime().time().minute() ); | ||
263 | text += " - "; | ||
264 | text += description(); | ||
265 | return text; | ||
254 | } | 266 | } |
255 | QString OEvent::type()const { | 267 | QString OEvent::type()const { |
256 | return QString::fromLatin1("OEvent"); | 268 | return QString::fromLatin1("OEvent"); |
257 | } | 269 | } |
258 | QString OEvent::recordField( int /*id */ )const { | 270 | QString OEvent::recordField( int /*id */ )const { |
259 | return QString::null; | 271 | return QString::null; |
260 | } | 272 | } |
261 | int OEvent::rtti() { | 273 | int OEvent::rtti() { |
262 | return OPimResolver::DateBook; | 274 | return OPimResolver::DateBook; |
263 | } | 275 | } |
264 | bool OEvent::loadFromStream( QDataStream& ) { | 276 | bool OEvent::loadFromStream( QDataStream& ) { |
265 | return true; | 277 | return true; |
266 | } | 278 | } |
267 | bool OEvent::saveToStream( QDataStream& )const { | 279 | bool OEvent::saveToStream( QDataStream& )const { |
268 | return true; | 280 | return true; |
269 | } | 281 | } |