-rw-r--r-- | korganizer/calendarview.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index b1da144..38b55f7 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2386,32 +2386,67 @@ void CalendarView::showDatePicker( ) | |||
2386 | void CalendarView::showEventEditor() | 2386 | void CalendarView::showEventEditor() |
2387 | { | 2387 | { |
2388 | #ifdef DESKTOP_VERSION | 2388 | #ifdef DESKTOP_VERSION |
2389 | mEventEditor->show(); | 2389 | mEventEditor->show(); |
2390 | #else | 2390 | #else |
2391 | mEventEditor->showMaximized(); | 2391 | mEventEditor->showMaximized(); |
2392 | #endif | 2392 | #endif |
2393 | } | 2393 | } |
2394 | void CalendarView::showTodoEditor() | 2394 | void CalendarView::showTodoEditor() |
2395 | { | 2395 | { |
2396 | #ifdef DESKTOP_VERSION | 2396 | #ifdef DESKTOP_VERSION |
2397 | mTodoEditor->show(); | 2397 | mTodoEditor->show(); |
2398 | #else | 2398 | #else |
2399 | mTodoEditor->showMaximized(); | 2399 | mTodoEditor->showMaximized(); |
2400 | #endif | 2400 | #endif |
2401 | } | 2401 | } |
2402 | |||
2403 | void CalendarView::cloneIncidence() | ||
2404 | { | ||
2405 | Incidence *incidence = currentSelection(); | ||
2406 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | ||
2407 | if ( incidence ) { | ||
2408 | cloneIncidence(incidence); | ||
2409 | } | ||
2410 | } | ||
2411 | void CalendarView::moveIncidence() | ||
2412 | { | ||
2413 | Incidence *incidence = currentSelection(); | ||
2414 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | ||
2415 | if ( incidence ) { | ||
2416 | moveIncidence(incidence); | ||
2417 | } | ||
2418 | } | ||
2419 | void CalendarView::beamIncidence() | ||
2420 | { | ||
2421 | Incidence *incidence = currentSelection(); | ||
2422 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | ||
2423 | if ( incidence ) { | ||
2424 | beamIncidence(incidence); | ||
2425 | } | ||
2426 | } | ||
2427 | void CalendarView::toggleCancelIncidence() | ||
2428 | { | ||
2429 | Incidence *incidence = currentSelection(); | ||
2430 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | ||
2431 | if ( incidence ) { | ||
2432 | cancelIncidence(incidence); | ||
2433 | } | ||
2434 | } | ||
2435 | |||
2436 | |||
2402 | void CalendarView::cancelIncidence(Incidence * inc ) | 2437 | void CalendarView::cancelIncidence(Incidence * inc ) |
2403 | { | 2438 | { |
2404 | inc->setCancelled( ! inc->cancelled() ); | 2439 | inc->setCancelled( ! inc->cancelled() ); |
2405 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); | 2440 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); |
2406 | updateView(); | 2441 | updateView(); |
2407 | } | 2442 | } |
2408 | void CalendarView::cloneIncidence(Incidence * orgInc ) | 2443 | void CalendarView::cloneIncidence(Incidence * orgInc ) |
2409 | { | 2444 | { |
2410 | Incidence * newInc = orgInc->clone(); | 2445 | Incidence * newInc = orgInc->clone(); |
2411 | newInc->recreate(); | 2446 | newInc->recreate(); |
2412 | 2447 | ||
2413 | if ( newInc->type() == "Todo" ) { | 2448 | if ( newInc->type() == "Todo" ) { |
2414 | Todo* t = (Todo*) newInc; | 2449 | Todo* t = (Todo*) newInc; |
2415 | mTodoEditor->editTodo( t ); | 2450 | mTodoEditor->editTodo( t ); |
2416 | showTodoEditor(); | 2451 | showTodoEditor(); |
2417 | if ( mTodoEditor->exec() ) { | 2452 | if ( mTodoEditor->exec() ) { |