summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index e4a11f5..1f8ad5b 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -410,24 +410,26 @@ void CalendarView::init()
410 this, SLOT ( cloneIncidence( Incidence * ) ) ); 410 this, SLOT ( cloneIncidence( Incidence * ) ) );
411 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), 411 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ),
412 this, SLOT (cancelIncidence( Incidence * ) ) ); 412 this, SLOT (cancelIncidence( Incidence * ) ) );
413 413
414 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), 414 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ),
415 this, SLOT ( moveIncidence( Incidence * ) ) ); 415 this, SLOT ( moveIncidence( Incidence * ) ) );
416 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), 416 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ),
417 this, SLOT ( beamIncidence( Incidence * ) ) ); 417 this, SLOT ( beamIncidence( Incidence * ) ) );
418 418
419 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), 419 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ),
420 this, SLOT ( todo_unsub( Todo * ) ) ); 420 this, SLOT ( todo_unsub( Todo * ) ) );
421 421
422 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
423 this, SLOT ( todo_resub( Todo *,Todo * ) ) );
422 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, 424 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList,
423 SLOT( updateTodo( Todo *, int ) ) ); 425 SLOT( updateTodo( Todo *, int ) ) );
424 connect( this, SIGNAL( todoModified( Todo *, int )), this, 426 connect( this, SIGNAL( todoModified( Todo *, int )), this,
425 SLOT( changeTodoDisplay( Todo *, int ) ) ); 427 SLOT( changeTodoDisplay( Todo *, int ) ) );
426 428
427 429
428 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); 430 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) );
429 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); 431 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) );
430 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); 432 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) );
431 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); 433 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) );
432 434
433 435
@@ -2737,24 +2739,38 @@ void CalendarView::appointment_delete()
2737 anEvent = static_cast<Event *>(incidence); 2739 anEvent = static_cast<Event *>(incidence);
2738 } 2740 }
2739 } 2741 }
2740 2742
2741 if (!anEvent) { 2743 if (!anEvent) {
2742 KNotifyClient::beep(); 2744 KNotifyClient::beep();
2743 return; 2745 return;
2744 } 2746 }
2745 2747
2746 deleteEvent(anEvent); 2748 deleteEvent(anEvent);
2747} 2749}
2748 2750
2751void CalendarView::todo_resub( Todo * parent, Todo * sub )
2752{
2753 if (!sub) return;
2754 if (!parent) return;
2755 if ( sub->relatedTo() )
2756 sub->relatedTo()->removeRelation(sub);
2757 sub->setRelatedTo(parent);
2758 sub->setRelatedToUid(parent->uid());
2759 parent->addRelation(sub);
2760 sub->updated();
2761 parent->updated();
2762 setModified(true);
2763 updateView();
2764}
2749void CalendarView::todo_unsub(Todo *anTodo ) 2765void CalendarView::todo_unsub(Todo *anTodo )
2750{ 2766{
2751 // Todo *anTodo = selectedTodo(); 2767 // Todo *anTodo = selectedTodo();
2752 if (!anTodo) return; 2768 if (!anTodo) return;
2753 if (!anTodo->relatedTo()) return; 2769 if (!anTodo->relatedTo()) return;
2754 anTodo->relatedTo()->removeRelation(anTodo); 2770 anTodo->relatedTo()->removeRelation(anTodo);
2755 anTodo->setRelatedTo(0); 2771 anTodo->setRelatedTo(0);
2756 anTodo->updated(); 2772 anTodo->updated();
2757 anTodo->setRelatedToUid(""); 2773 anTodo->setRelatedToUid("");
2758 setModified(true); 2774 setModified(true);
2759 updateView(); 2775 updateView();
2760} 2776}