summaryrefslogtreecommitdiff
path: root/libopie/pim/oevent.cpp
Side-by-side diff
Diffstat (limited to 'libopie/pim/oevent.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/oevent.cpp40
1 files changed, 36 insertions, 4 deletions
diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp
index 83b191f..e4f5d92 100644
--- a/libopie/pim/oevent.cpp
+++ b/libopie/pim/oevent.cpp
@@ -237,8 +237,28 @@ bool OEvent::match( const QRegExp& re )const {
QString OEvent::toRichText()const {
- QString text;
+ QString text, value;
+
+ // description
+ text += "<b><h3><img src=\"datebook/DateBook\">";
if ( !description().isEmpty() ) {
- text += "<b>" + QObject::tr( "Description:") + "</b><br>";
- text += Qtopia::escapeString(description() ).
- replace(QRegExp( "[\n]"), "<br>" ) + "<br>";
+ text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "" );
+ }
+ text += "</h3></b><br><hr><br>";
+
+ // location
+ if ( !(value = location()).isEmpty() ) {
+ text += "<b>" + QObject::tr( "Location:" ) + "</b> ";
+ text += Qtopia::escapeString(value) + "<br>";
+ }
+
+ // all day event
+ if ( isAllDay() ) {
+ text += "<b><i>" + QObject::tr( "This is an all day event" ) + "</i></b><br>";
}
+ // multiple day event
+ else if ( isMultipleDay () ) {
+ text += "<b><i>" + QObject::tr( "This is a multiple day event" ) + "</i></b><br>";
+ }
+ // start & end times
+ else {
+ // start time
if ( startDateTime().isValid() ) {
@@ -248,2 +268,4 @@ QString OEvent::toRichText()const {
}
+
+ // end time
if ( endDateTime().isValid() ) {
@@ -253,2 +275,12 @@ QString OEvent::toRichText()const {
}
+ }
+
+ // categories
+ if ( categoryNames("Calendar").count() ){
+ text += "<b>" + QObject::tr( "Category:") + "</b> ";
+ text += categoryNames("Calendar").join(", ");
+ text += "<br>";
+ }
+
+ //notes
if ( !note().isEmpty() ) {