summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp71
1 files changed, 49 insertions, 22 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 9c2ac82..bfae1b5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -656,12 +656,13 @@ void MainWindow::initActions()
KOPrefs *p = KOPrefs::instance();
//QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
QPopupMenu *viewMenu = new QPopupMenu( this );
QPopupMenu *actionMenu = new QPopupMenu( this );
mCurrentItemMenu = new QPopupMenu ( this );
+ QPopupMenu *nextConflictMenu = new QPopupMenu ( this );
QPopupMenu *importMenu = new QPopupMenu( this );
QPopupMenu *importMenu_X = new QPopupMenu( this );
QPopupMenu *exportMenu_X = new QPopupMenu( this );
QPopupMenu *beamMenu_X = new QPopupMenu( this );
selectFilterMenu = new QPopupMenu( this );
selectFilterMenu->setCheckable( true );
@@ -786,21 +787,48 @@ void MainWindow::initActions()
icon = loadPixmap( pathString + "search" );
QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
search_action->addTo( actionMenu );
connect( search_action, SIGNAL( activated() ),
mView->dialogManager(), SLOT( showSearchDialog() ) );
+ actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu );
+ action = new QAction( "Undo Delete", i18n("All events"), 0, this );
+ action->addTo( nextConflictMenu );
+ connect( action, SIGNAL( activated() ),
+ mView, SLOT( conflictAll() ) );
+
+ action = new QAction( "Undo Delete", i18n("Allday events"), 0, this );
+ action->addTo( nextConflictMenu );
+ connect( action, SIGNAL( activated() ),
+ mView, SLOT( conflictAllday() ) );
+
+ action = new QAction( "Undo Delete", i18n("Events with time"), 0, this );
+ action->addTo( nextConflictMenu );
+ connect( action, SIGNAL( activated() ),
+ mView, SLOT( conflictNotAll() ) );
+
actionMenu->insertSeparator();
+ icon = loadPixmap( pathString + "newevent" );
+ QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
+ ne_action->addTo( mCurrentItemMenu );
+ connect( ne_action, SIGNAL( activated() ),
+ mView, SLOT( newEvent() ) );
+ icon = loadPixmap( pathString + "newtodo" );
+ configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
+ QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
+ nt_action->addTo( mCurrentItemMenu );
+ connect( nt_action, SIGNAL( activated() ),
+ mView, SLOT( newTodo() ) );
+ mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
+ this );
+ mNewSubTodoAction->addTo( mCurrentItemMenu );
+ connect( mNewSubTodoAction, SIGNAL( activated() ),
+ mView, SLOT( newSubTodo() ) );
-
- action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
- action->addTo( mCurrentItemMenu );
- connect( action, SIGNAL( activated() ),
- mView, SLOT( undo_delete() ) );
mCurrentItemMenu->insertSeparator();
icon = loadPixmap( pathString + "newevent" );
configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
configureToolBarMenu->insertSeparator();
configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
@@ -841,24 +869,18 @@ void MainWindow::initActions()
#endif
mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
mCancelAction->addTo( mCurrentItemMenu );
connect( mCancelAction, SIGNAL( activated() ),
mView, SLOT( toggleCancelIncidence() ) );
- QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
- ne_action->addTo( actionMenu );
- connect( ne_action, SIGNAL( activated() ),
- mView, SLOT( newEvent() ) );
- icon = loadPixmap( pathString + "newtodo" );
- configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
- QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
- nt_action->addTo( actionMenu );
- connect( nt_action, SIGNAL( activated() ),
- mView, SLOT( newTodo() ) );
-
-
+
+ mCurrentItemMenu->insertSeparator();
+ action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
+ action->addTo( mCurrentItemMenu );
+ connect( action, SIGNAL( activated() ),
+ mView, SLOT( undo_delete() ) );
// ***********************
if ( KOPrefs::instance()->mVerticalScreen ) {
icon = SmallIcon( "1updownarrow" );
} else {
icon = SmallIcon("1leftrightarrow" );
@@ -993,17 +1015,13 @@ void MainWindow::initActions()
action = new QAction( "view_timespan", "Time Span", 0, this );
action->addTo( viewMenu );
connect( action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showTimeSpanView() ) );
#endif
- mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
- this );
- mNewSubTodoAction->addTo( actionMenu );
- connect( mNewSubTodoAction, SIGNAL( activated() ),
- mView, SLOT( newSubTodo() ) );
+
action = new QAction( "purge_completed", i18n("Purge Completed..."), 0,
this );
action->addTo( actionMenu );
connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
@@ -1562,12 +1580,13 @@ void MainWindow::keyBindings()
i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+
i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+
+ i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+
i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+
i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
@@ -2096,12 +2115,20 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
mView->newTodo();
else {
mView->goToday();
showSelectedDates = true;
}
break;
+ case Qt::Key_Q:
+ if ( e->state() == Qt::ControlButton )
+ mView->conflictNotAll();
+ else if ( e->state() == Qt::ShiftButton )
+ mView->conflictAllday();
+ else
+ mView->conflictAll();
+ break;
case Qt::Key_J:
mView->viewManager()->showJournalView();
break;
case Qt::Key_B:
mView->editIncidenceDescription();;
break;