-rw-r--r-- | korganizer/kowhatsnextview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 2f7409d..8371523 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -190,49 +190,49 @@ void KOWhatsNextView::updateView() | |||
190 | if ( ! itemAdded ) { | 190 | if ( ! itemAdded ) { |
191 | appendDay ( iii, mEventDate ); | 191 | appendDay ( iii, mEventDate ); |
192 | itemAdded = true; | 192 | itemAdded = true; |
193 | 193 | ||
194 | } | 194 | } |
195 | appendEvent(todo); | 195 | appendEvent(todo); |
196 | } | 196 | } |
197 | todo = todos.next(); | 197 | todo = todos.next(); |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | 201 | ||
202 | if (events.count() > 0) { | 202 | if (events.count() > 0) { |
203 | // mText += "<p></p>"; | 203 | // mText += "<p></p>"; |
204 | // kil.loadIcon("month",KIcon::NoGroup,22,KIcon::DefaultState,&ipath); | 204 | // kil.loadIcon("month",KIcon::NoGroup,22,KIcon::DefaultState,&ipath); |
205 | // mText += "<h2>"; | 205 | // mText += "<h2>"; |
206 | //mText += " <img src=\""; | 206 | //mText += " <img src=\""; |
207 | //mText += ipath; | 207 | //mText += ipath; |
208 | //mText += "\">"; | 208 | //mText += "\">"; |
209 | if ( ! itemAdded ) { | 209 | if ( ! itemAdded ) { |
210 | appendDay ( iii, mEventDate ); | 210 | appendDay ( iii, mEventDate ); |
211 | 211 | ||
212 | } | 212 | } |
213 | // for first day (iii == 0) | 213 | // for first day (iii == 0) |
214 | // we may have syncevents, or events in the past, which maybe should nor be diaplayed | 214 | // we may have syncevents, or events in the past, which maybe should not be diaplayed |
215 | // for that reason we cannot append <table> in appendDay () for iii == 0 | 215 | // for that reason we cannot append <table> in appendDay () for iii == 0 |
216 | // we must append it in the first successful call of appendEvent() | 216 | // we must append it in the first successful call of appendEvent() |
217 | Event *ev = events.first(); | 217 | Event *ev = events.first(); |
218 | while(ev) { | 218 | while(ev) { |
219 | //qDebug("+++++event append %s", ev->summary().latin1()); | 219 | //qDebug("+++++event append %s", ev->summary().latin1()); |
220 | if ( true /*!ev->recurrence()->doesRecur() || ev->recursOn( mEventDate)*/) { | 220 | if ( true /*!ev->recurrence()->doesRecur() || ev->recursOn( mEventDate)*/) { |
221 | if ( appendEvent(ev, false , iii!= 0,!itemAdded ) ) | 221 | if ( appendEvent(ev, false , iii!= 0,!itemAdded ) ) |
222 | itemAdded = true; | 222 | itemAdded = true; |
223 | } | 223 | } |
224 | ev = events.next(); | 224 | ev = events.next(); |
225 | } | 225 | } |
226 | 226 | ||
227 | //mText += "</table>\n"; | 227 | //mText += "</table>\n"; |
228 | } | 228 | } |
229 | 229 | ||
230 | todo = todos.first(); | 230 | todo = todos.first(); |
231 | while(todo) { | 231 | while(todo) { |
232 | if ( !todo->isCompleted() &&todo->hasDueDate() && todo->dtDue().date() == mEventDate ) { | 232 | if ( !todo->isCompleted() &&todo->hasDueDate() && todo->dtDue().date() == mEventDate ) { |
233 | if ( ! itemAdded ) { | 233 | if ( ! itemAdded ) { |
234 | appendDay ( iii, mEventDate ); | 234 | appendDay ( iii, mEventDate ); |
235 | itemAdded = true; | 235 | itemAdded = true; |
236 | } | 236 | } |
237 | appendEvent(todo); | 237 | appendEvent(todo); |
238 | } | 238 | } |
@@ -332,49 +332,49 @@ void KOWhatsNextView::updateView() | |||
332 | appendEvent(to, true); | 332 | appendEvent(to, true); |
333 | } | 333 | } |
334 | } | 334 | } |
335 | } | 335 | } |
336 | to = todos.next(); | 336 | to = todos.next(); |
337 | } | 337 | } |
338 | } | 338 | } |
339 | if (replys > 0 ) mText += "</table>\n"; | 339 | if (replys > 0 ) mText += "</table>\n"; |
340 | 340 | ||
341 | 341 | ||
342 | mText += "</td></tr>\n</table>\n"; | 342 | mText += "</td></tr>\n</table>\n"; |
343 | 343 | ||
344 | mView->setText(mText); | 344 | mView->setText(mText); |
345 | mView->setFocus(); | 345 | mView->setFocus(); |
346 | 346 | ||
347 | // QPixmap bPix = SmallIcon( "back" ); | 347 | // QPixmap bPix = SmallIcon( "back" ); |
348 | // qDebug("xxxxxxxxxxxxxxxxxxxxx "); | 348 | // qDebug("xxxxxxxxxxxxxxxxxxxxx "); |
349 | // QWidget* test = new QWidget(); | 349 | // QWidget* test = new QWidget(); |
350 | // test->setBackgroundMode(FixedPixmap ); | 350 | // test->setBackgroundMode(FixedPixmap ); |
351 | // test->setBackgroundPixmap ( bPix ); | 351 | // test->setBackgroundPixmap ( bPix ); |
352 | // test->resize( 300, 400 ); | 352 | // test->resize( 300, 400 ); |
353 | // test->show(); | 353 | // test->show(); |
354 | // mView->setBackgroundMode(FixedPixmap ); | 354 | // mView->setBackgroundMode(FixedPixmap ); |
355 | // mView->setBackgroundPixmap ( bPix ); | 355 | // mView->setBackgroundPixmap ( bPix ); |
356 | qDebug("%s ",mText.latin1()); | 356 | // qDebug("%s ",mText.latin1()); |
357 | } | 357 | } |
358 | 358 | ||
359 | void KOWhatsNextView::appendDay( int i, QDate eventDate ) | 359 | void KOWhatsNextView::appendDay( int i, QDate eventDate ) |
360 | { | 360 | { |
361 | QString date; | 361 | QString date; |
362 | QString day = KGlobal::locale()->formatDate( eventDate , KOPrefs::instance()->mShortDateInViewer); | 362 | QString day = KGlobal::locale()->formatDate( eventDate , KOPrefs::instance()->mShortDateInViewer); |
363 | if ( ! KOPrefs::instance()->mShortDateInViewer && QApplication::desktop()->width() < 320 ) { | 363 | if ( ! KOPrefs::instance()->mShortDateInViewer && QApplication::desktop()->width() < 320 ) { |
364 | if ( i == 0 ) { | 364 | if ( i == 0 ) { |
365 | //mText += "<table>\n"; | 365 | //mText += "<table>\n"; |
366 | return;//date = "<em><font color=\"#008000\"><em>" + day+"</font></em>"; | 366 | return;//date = "<em><font color=\"#008000\"><em>" + day+"</font></em>"; |
367 | } | 367 | } |
368 | else if ( i == 1 ) | 368 | else if ( i == 1 ) |
369 | date = "<em><font color=\"#000080\">" + day + "</font></em>" ; | 369 | date = "<em><font color=\"#000080\">" + day + "</font></em>" ; |
370 | else date = "<em><font color=\"#000080\">" + day + "</font></em>"; | 370 | else date = "<em><font color=\"#000080\">" + day + "</font></em>"; |
371 | mText += "<h2>" + date + "</h2>\n"; | 371 | mText += "<h2>" + date + "</h2>\n"; |
372 | //mText += "<big><big><strong>" + date + "</strong></big></big>\n"; | 372 | //mText += "<big><big><strong>" + date + "</strong></big></big>\n"; |
373 | mText += "<table>\n"; | 373 | mText += "<table>\n"; |
374 | 374 | ||
375 | 375 | ||
376 | 376 | ||
377 | } else { | 377 | } else { |
378 | if ( i == 0 ) { | 378 | if ( i == 0 ) { |
379 | //mText += "<table>\n"; | 379 | //mText += "<table>\n"; |
380 | return;// date = "<font color=\"#008000\"><em>" +i18n("Today: ") +"</em>" + day+"</font>"; | 380 | return;// date = "<font color=\"#008000\"><em>" +i18n("Today: ") +"</em>" + day+"</font>"; |