summaryrefslogtreecommitdiffabout
path: root/libkcal/kincidenceformatter.cpp
Unidiff
Diffstat (limited to 'libkcal/kincidenceformatter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 9359fad..f8f40f1 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -84,49 +84,49 @@ void KIncidenceFormatter::setEvent(Event *event)
84 .arg(event->dtStartDateStr(shortDate)) 84 .arg(event->dtStartDateStr(shortDate))
85 .arg(event->dtEndDateStr(shortDate))); 85 .arg(event->dtEndDateStr(shortDate)));
86 } else { 86 } else {
87 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); 87 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate )));
88 } 88 }
89 } else { 89 } else {
90 if (event->isMultiDay()) { 90 if (event->isMultiDay()) {
91 mText.append(i18n("<p><b>From:</b> %1</p> ") 91 mText.append(i18n("<p><b>From:</b> %1</p> ")
92 .arg(event->dtStartStr( shortDate))); 92 .arg(event->dtStartStr( shortDate)));
93 mText.append(i18n("<p><b>To:</b> %1</p>") 93 mText.append(i18n("<p><b>To:</b> %1</p>")
94 .arg(event->dtEndStr(shortDate))); 94 .arg(event->dtEndStr(shortDate)));
95 } else { 95 } else {
96 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") 96 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>")
97 .arg(event->dtStartTimeStr()) 97 .arg(event->dtStartTimeStr())
98 .arg(event->dtEndTimeStr())); 98 .arg(event->dtEndTimeStr()));
99 mText.append(i18n("<p><b>On:</b> %1</p> ") 99 mText.append(i18n("<p><b>On:</b> %1</p> ")
100 .arg(event->dtStartDateStr( shortDate ))); 100 .arg(event->dtStartDateStr( shortDate )));
101 } 101 }
102 } 102 }
103 if (!event->location().isEmpty()) { 103 if (!event->location().isEmpty()) {
104 addTag("b",i18n("Location: ")); 104 addTag("b",i18n("Location: "));
105 mText.append(deTag(event->location())+"<br>"); 105 mText.append(deTag(event->location())+"<br>");
106 } 106 }
107 107
108 if (event->recurrence()->doesRecur()) { 108 if (event->doesRecur()) {
109 109
110 QString recurText = event->recurrence()->recurrenceText(); 110 QString recurText = event->recurrence()->recurrenceText();
111 addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); 111 addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>");
112 112
113 bool ok; 113 bool ok;
114 QDate start = QDate::currentDate(); 114 QDate start = QDate::currentDate();
115 QDateTime next; 115 QDateTime next;
116 next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); 116 next = event->getNextOccurence( QDateTime::currentDateTime() , &ok );
117 if ( ok ) { 117 if ( ok ) {
118 addTag("p",i18n("<b>Next recurrence is on:</b>") ); 118 addTag("p",i18n("<b>Next recurrence is on:</b>") );
119 addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); 119 addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate ));
120 120
121 } else { 121 } else {
122 bool last; 122 bool last;
123 QDate nextd; 123 QDate nextd;
124 nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); 124 nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last );
125 if ( last ) { 125 if ( last ) {
126 addTag("p",i18n("<b>Last recurrence was on:</b>") ); 126 addTag("p",i18n("<b>Last recurrence was on:</b>") );
127 addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); 127 addTag("p", KGlobal::locale()->formatDate( nextd, shortDate ));
128 } 128 }
129 } 129 }
130 } 130 }
131 131
132 132
@@ -195,49 +195,49 @@ void KIncidenceFormatter::setTodo(Todo *event )
195 } else { 195 } else {
196 addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); 196 addTag("h2",i18n( "Remote: " ) +deTag(event->summary()));
197 } 197 }
198 formatReadOnly(event); 198 formatReadOnly(event);
199 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 199 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
200 if ( mColorMode ) 200 if ( mColorMode )
201 mText += "</font>"; 201 mText += "</font>";
202 } 202 }
203 if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { 203 if ( event->percentComplete() == 100 && event->hasCompletedDate() ) {
204 mText +="<font color=\"#B00000\">"; 204 mText +="<font color=\"#B00000\">";
205 addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(shortDate) ) ); 205 addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(shortDate) ) );
206 mText += "</font>"; 206 mText += "</font>";
207 } else { 207 } else {
208 mText.append(i18n("<p><i>%1 % completed</i></p>") 208 mText.append(i18n("<p><i>%1 % completed</i></p>")
209 .arg(event->percentComplete())); 209 .arg(event->percentComplete()));
210 } 210 }
211 if (event->cancelled ()) { 211 if (event->cancelled ()) {
212 mText +="<font color=\"#B00000\">"; 212 mText +="<font color=\"#B00000\">";
213 addTag("i",i18n("This todo has been cancelled!")); 213 addTag("i",i18n("This todo has been cancelled!"));
214 mText.append("<br>"); 214 mText.append("<br>");
215 mText += "</font>"; 215 mText += "</font>";
216 } 216 }
217 217
218 218
219 if (event->recurrence()->doesRecur()) { 219 if (event->doesRecur()) {
220 220
221 QString recurText = event->recurrence()->recurrenceText(); 221 QString recurText = event->recurrence()->recurrenceText();
222 addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); 222 addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>");
223 } 223 }
224 224
225 if (event->hasStartDate()) { 225 if (event->hasStartDate()) {
226 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(shortDate))); 226 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(shortDate)));
227 } 227 }
228 228
229 229
230 if (event->hasDueDate()) { 230 if (event->hasDueDate()) {
231 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); 231 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate)));
232 } 232 }
233 233
234 if (!event->location().isEmpty()) { 234 if (!event->location().isEmpty()) {
235 addTag("b",i18n("Location: ")); 235 addTag("b",i18n("Location: "));
236 mText.append(deTag(event->location())+"<br>"); 236 mText.append(deTag(event->location())+"<br>");
237 } 237 }
238 238
239 mText.append(i18n("<p><b>Priority:</b> %2</p>") 239 mText.append(i18n("<p><b>Priority:</b> %2</p>")
240 .arg(QString::number(event->priority()))); 240 .arg(QString::number(event->priority())));
241 241
242 if (event->isAlarmEnabled()) { 242 if (event->isAlarmEnabled()) {
243 Alarm *alarm =event->alarms().first() ; 243 Alarm *alarm =event->alarms().first() ;