summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp35
-rw-r--r--korganizer/calendarview.h4
-rw-r--r--korganizer/mainwindow.cpp25
-rw-r--r--korganizer/mainwindow.h6
4 files changed, 69 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index b1da144..38b55f7 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2401,2 +2401,37 @@ void CalendarView::showTodoEditor()
2401} 2401}
2402
2403void CalendarView::cloneIncidence()
2404{
2405 Incidence *incidence = currentSelection();
2406 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2407 if ( incidence ) {
2408 cloneIncidence(incidence);
2409 }
2410}
2411void CalendarView::moveIncidence()
2412{
2413 Incidence *incidence = currentSelection();
2414 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2415 if ( incidence ) {
2416 moveIncidence(incidence);
2417 }
2418}
2419void CalendarView::beamIncidence()
2420{
2421 Incidence *incidence = currentSelection();
2422 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2423 if ( incidence ) {
2424 beamIncidence(incidence);
2425 }
2426}
2427void CalendarView::toggleCancelIncidence()
2428{
2429 Incidence *incidence = currentSelection();
2430 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2431 if ( incidence ) {
2432 cancelIncidence(incidence);
2433 }
2434}
2435
2436
2402void CalendarView::cancelIncidence(Incidence * inc ) 2437void CalendarView::cancelIncidence(Incidence * inc )
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index cd54685..a713c91 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -213,2 +213,6 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
213 void deleteIncidence(); 213 void deleteIncidence();
214 void cloneIncidence();
215 void moveIncidence();
216 void beamIncidence();
217 void toggleCancelIncidence();
214 218
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 6a9a2f1..bd14fbf 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -639,2 +639,20 @@ void MainWindow::initActions()
639 639
640
641 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
642 mCloneAction->addTo( actionMenu );
643 connect( mCloneAction, SIGNAL( activated() ),
644 mView, SLOT( cloneIncidence() ) );
645 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
646 mMoveAction->addTo( actionMenu );
647 connect( mMoveAction, SIGNAL( activated() ),
648 mView, SLOT( moveIncidence() ) );
649 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
650 mBeamAction->addTo( actionMenu );
651 connect( mBeamAction, SIGNAL( activated() ),
652 mView, SLOT( beamIncidence() ) );
653 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
654 mCancelAction->addTo( actionMenu );
655 connect( mCancelAction, SIGNAL( activated() ),
656 mView, SLOT( toggleCancelIncidence() ) );
657
640 actionMenu->insertSeparator(); 658 actionMenu->insertSeparator();
@@ -1188,3 +1206,3 @@ void MainWindow::exportToPhone( int mode )
1188 while ( incidence ) { 1206 while ( incidence ) {
1189 if ( incidence->type() != "journal" ) { 1207 if ( incidence->type() != "Journal" ) {
1190 bool add = true; 1208 bool add = true;
@@ -1500,2 +1518,7 @@ void MainWindow::enableIncidenceActions( bool enabled )
1500 mDeleteAction->setEnabled( enabled ); 1518 mDeleteAction->setEnabled( enabled );
1519
1520 mCloneAction->setEnabled( enabled );
1521 mMoveAction->setEnabled( enabled );
1522 mBeamAction->setEnabled( enabled );
1523 mCancelAction->setEnabled( enabled );
1501} 1524}
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 74c7f45..4f89e03 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -199,2 +199,8 @@ class MainWindow : public QMainWindow
199 QAction *mDeleteAction; 199 QAction *mDeleteAction;
200 QAction *mCloneAction;
201 QAction *mMoveAction;
202 QAction *mBeamAction;
203 QAction *mCancelAction;
204
205
200 void closeEvent( QCloseEvent* ce ); 206 void closeEvent( QCloseEvent* ce );