summaryrefslogtreecommitdiffabout
path: root/libkcal/kincidenceformatter.cpp
Unidiff
Diffstat (limited to 'libkcal/kincidenceformatter.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp32
1 files changed, 27 insertions, 5 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index cc3088a..1751ae3 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -12,3 +12,3 @@ static KStaticDeleter<KIncidenceFormatter> insd;
12 12
13QString KIncidenceFormatter::getFormattedText( Incidence * inc ) 13QString KIncidenceFormatter::getFormattedText( Incidence * inc, bool details, bool created , bool modified )
14{ 14{
@@ -19,2 +19,5 @@ QString KIncidenceFormatter::getFormattedText( Incidence * inc )
19// #endif 19// #endif
20 mDetails = details;
21 mCreated = created ;
22 mModified = modified;
20 mText = ""; 23 mText = "";
@@ -140,2 +143,3 @@ void KIncidenceFormatter::setEvent(Event *event)
140 formatCategories(event); 143 formatCategories(event);
144 if ( mDetails ) {
141 if (!event->description().isEmpty()) { 145 if (!event->description().isEmpty()) {
@@ -144,3 +148,3 @@ void KIncidenceFormatter::setEvent(Event *event)
144 } 148 }
145 149 }
146 150
@@ -149,2 +153,12 @@ void KIncidenceFormatter::setEvent(Event *event)
149 153
154 if ( mCreated ) {
155 addTag("p",i18n("<b>Created: ") +" </b>");
156 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
157
158 }
159 if ( mModified ) {
160 addTag("p",i18n("<b>Last modified: ") +" </b>");
161 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
162
163 }
150 164
@@ -214,2 +228,3 @@ void KIncidenceFormatter::setTodo(Todo *event )
214 formatCategories(event); 228 formatCategories(event);
229 if ( mDetails ) {
215 if (!event->description().isEmpty()) { 230 if (!event->description().isEmpty()) {
@@ -218,9 +233,16 @@ void KIncidenceFormatter::setTodo(Todo *event )
218 } 233 }
219 234 }
220
221
222 formatReadOnly(event); 235 formatReadOnly(event);
223 formatAttendees(event); 236 formatAttendees(event);
237 if ( mCreated ) {
238 addTag("p",i18n("<b>Created: ") +" </b>");
239 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
224 240
225} 241}
242 if ( mModified ) {
243 addTag("p",i18n("<b>Last modified: ") +" </b>");
244 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
245
246 }
247}
226 248