summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7ac5b11..0956c78 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3378,99 +3378,99 @@ void CalendarView::editIncidence(Incidence *incidence)
3378 3378
3379 EditIncidenceVisitor v; 3379 EditIncidenceVisitor v;
3380 v.act( incidence, this ); 3380 v.act( incidence, this );
3381 3381
3382 } 3382 }
3383} 3383}
3384 3384
3385void CalendarView::deleteIncidence(Incidence *incidence) 3385void CalendarView::deleteIncidence(Incidence *incidence)
3386{ 3386{
3387 //qDebug(" CalendarView::deleteIncidence "); 3387 //qDebug(" CalendarView::deleteIncidence ");
3388 if ( incidence ) { 3388 if ( incidence ) {
3389 DeleteIncidenceVisitor v; 3389 DeleteIncidenceVisitor v;
3390 v.act( incidence, this ); 3390 v.act( incidence, this );
3391 } 3391 }
3392} 3392}
3393 3393
3394 3394
3395void CalendarView::lookForOutgoingMessages() 3395void CalendarView::lookForOutgoingMessages()
3396{ 3396{
3397 OutgoingDialog *ogd = mDialogManager->outgoingDialog(); 3397 OutgoingDialog *ogd = mDialogManager->outgoingDialog();
3398 ogd->loadMessages(); 3398 ogd->loadMessages();
3399} 3399}
3400 3400
3401void CalendarView::lookForIncomingMessages() 3401void CalendarView::lookForIncomingMessages()
3402{ 3402{
3403 IncomingDialog *icd = mDialogManager->incomingDialog(); 3403 IncomingDialog *icd = mDialogManager->incomingDialog();
3404 icd->retrieve(); 3404 icd->retrieve();
3405} 3405}
3406 3406
3407bool CalendarView::removeCompletedSubTodos( Todo* t ) 3407bool CalendarView::removeCompletedSubTodos( Todo* t )
3408{ 3408{
3409 bool deleteTodo = true; 3409 bool deleteTodo = true;
3410 QPtrList<Incidence> subTodos; 3410 QPtrList<Incidence> subTodos;
3411 Incidence *aTodo; 3411 Incidence *aTodo;
3412 subTodos = t->relations(); 3412 subTodos = t->relations();
3413 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { 3413 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
3414 if (! removeCompletedSubTodos( (Todo*) aTodo )) 3414 if (! removeCompletedSubTodos( (Todo*) aTodo ))
3415 deleteTodo = false; 3415 deleteTodo = false;
3416 } 3416 }
3417 if ( deleteTodo ) { 3417 if ( deleteTodo ) {
3418 if ( t->isCompleted() ) { 3418 if ( t->isCompleted() ) {
3419 checkZaurusId( t->zaurusId(), true ); 3419 checkZaurusId( t->zaurusId(), true );
3420 mCalendar->deleteTodo( t ); 3420 mCalendar->deleteTodo( t );
3421 changeTodoDisplay( t,KOGlobals::EVENTDELETED ); 3421 changeTodoDisplay( t,KOGlobals::EVENTDELETED );
3422 } 3422 }
3423 else 3423 else
3424 deleteTodo = false; 3424 deleteTodo = false;
3425 } 3425 }
3426 return deleteTodo; 3426 return deleteTodo;
3427 3427
3428} 3428}
3429void CalendarView::purgeCompleted() 3429void CalendarView::purgeCompleted()
3430{ 3430{
3431 int result = KMessageBox::warningContinueCancel(this, 3431 int result = KMessageBox::warningContinueCancel(this,
3432 i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge")); 3432 i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge"));
3433 3433
3434 if (result == KMessageBox::Continue) { 3434 if (result == KMessageBox::Continue) {
3435 3435
3436 QPtrList<Todo> todoCal; 3436 QPtrList<Todo> todoCal;
3437 QPtrList<Todo> rootTodos; 3437 QPtrList<Todo> rootTodos;
3438 //QPtrList<Incidence> rel; 3438 //QPtrList<Incidence> rel;
3439 Todo *aTodo;//, *rTodo; 3439 Todo *aTodo;//, *rTodo;
3440 Incidence *rIncidence; 3440 Incidence *rIncidence;
3441 bool childDelete = false; 3441 bool childDelete = false;
3442 bool deletedOne = true; 3442 bool deletedOne = true;
3443 todoCal = calendar()->todos(); 3443 todoCal = calendar()->todos();
3444 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { 3444 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
3445 if ( !aTodo->relatedTo() ) 3445 if ( !aTodo->relatedTo() )
3446 rootTodos.append( aTodo ); 3446 rootTodos.append( aTodo );
3447 } 3447 }
3448 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { 3448 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) {
3449 removeCompletedSubTodos( aTodo ); 3449 removeCompletedSubTodos( aTodo );
3450 } 3450 }
3451 3451
3452 updateView(); 3452 updateView();
3453 } 3453 }
3454} 3454}
3455 3455
3456void CalendarView::slotCalendarChanged() 3456void CalendarView::slotCalendarChanged()
3457{ 3457{
3458 ; 3458 ;
3459} 3459}
3460 3460
3461NavigatorBar *CalendarView::navigatorBar() 3461NavigatorBar *CalendarView::navigatorBar()
3462{ 3462{
3463 return mNavigatorBar; 3463 return mNavigatorBar;
3464} 3464}
3465 3465
3466 3466
3467 3467
3468void CalendarView::keyPressEvent ( QKeyEvent *e) 3468void CalendarView::keyPressEvent ( QKeyEvent *e)
3469{ 3469{
3470 //qDebug(" alendarView::keyPressEvent "); 3470 //qDebug(" alendarView::keyPressEvent ");
3471 e->ignore(); 3471 e->ignore();
3472} 3472}
3473 3473
3474#include "calendarview.moc" 3474//#include "calendarview.moc"
3475 3475
3476#include "calendarviewbase.moc" 3476//#include "calendarviewbase.moc"