summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2004-10-06 12:40:40 (UTC)
committer zautrix <zautrix>2004-10-06 12:40:40 (UTC)
commit3e949ed97c7a65eeaddecb1048872cd8595b3caf (patch) (unidiff)
treea964f4f0ac4d0390655f72aec71185c3f26f04de /korganizer/mainwindow.cpp
parent8ac1973bfa65844df80d74c482559470bc704041 (diff)
downloadkdepimpi-3e949ed97c7a65eeaddecb1048872cd8595b3caf.zip
kdepimpi-3e949ed97c7a65eeaddecb1048872cd8595b3caf.tar.gz
kdepimpi-3e949ed97c7a65eeaddecb1048872cd8595b3caf.tar.bz2
added missing actions in kopi
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 6a9a2f1..bd14fbf 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -632,16 +632,34 @@ void MainWindow::initActions()
632 connect( mEditAction, SIGNAL( activated() ), 632 connect( mEditAction, SIGNAL( activated() ),
633 mView, SLOT( editIncidence() ) ); 633 mView, SLOT( editIncidence() ) );
634 634
635 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 635 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
636 mDeleteAction->addTo( actionMenu ); 636 mDeleteAction->addTo( actionMenu );
637 connect( mDeleteAction, SIGNAL( activated() ), 637 connect( mDeleteAction, SIGNAL( activated() ),
638 mView, SLOT( deleteIncidence() ) ); 638 mView, SLOT( deleteIncidence() ) );
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();
641 659
642 action = new QAction( "purge_completed", i18n("Purge Completed"), 0, 660 action = new QAction( "purge_completed", i18n("Purge Completed"), 0,
643 this ); 661 this );
644 action->addTo( actionMenu ); 662 action->addTo( actionMenu );
645 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 663 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
646 664
647 icon = loadPixmap( pathString + "search" ); 665 icon = loadPixmap( pathString + "search" );
@@ -1181,17 +1199,17 @@ void MainWindow::exportToPhone( int mode )
1181 if ( mode == 2 ) 1199 if ( mode == 2 )
1182 delSel = mCalendar->incidences(); 1200 delSel = mCalendar->incidences();
1183 CalendarLocal* cal = new CalendarLocal(); 1201 CalendarLocal* cal = new CalendarLocal();
1184 cal->setLocalTime(); 1202 cal->setLocalTime();
1185 Incidence *incidence = delSel.first(); 1203 Incidence *incidence = delSel.first();
1186 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1204 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1187 QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); 1205 QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
1188 while ( incidence ) { 1206 while ( incidence ) {
1189 if ( incidence->type() != "journal" ) { 1207 if ( incidence->type() != "Journal" ) {
1190 bool add = true; 1208 bool add = true;
1191 if ( inFuture ) { 1209 if ( inFuture ) {
1192 QDateTime dt; 1210 QDateTime dt;
1193 if ( incidence->type() == "Todo" ) { 1211 if ( incidence->type() == "Todo" ) {
1194 Todo * t = (Todo*)incidence; 1212 Todo * t = (Todo*)incidence;
1195 if ( t->hasDueDate() ) 1213 if ( t->hasDueDate() )
1196 dt = t->dtDue(); 1214 dt = t->dtDue();
1197 else 1215 else
@@ -1493,16 +1511,21 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
1493 } 1511 }
1494} 1512}
1495 1513
1496void MainWindow::enableIncidenceActions( bool enabled ) 1514void MainWindow::enableIncidenceActions( bool enabled )
1497{ 1515{
1498 mShowAction->setEnabled( enabled ); 1516 mShowAction->setEnabled( enabled );
1499 mEditAction->setEnabled( enabled ); 1517 mEditAction->setEnabled( 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}
1502 1525
1503void MainWindow::importOL() 1526void MainWindow::importOL()
1504{ 1527{
1505#ifdef _WIN32_ 1528#ifdef _WIN32_
1506 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); 1529 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );
1507 id->exec(); 1530 id->exec();
1508 delete id; 1531 delete id;