summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-07-07 04:18:11 (UTC)
committer zautrix <zautrix>2005-07-07 04:18:11 (UTC)
commitb4d85da57e2d558ec088af6f3b2a34b1854462c0 (patch) (side-by-side diff)
tree0860bfaae1d15aae6cd24861eaa87d0331fb364a /korganizer/mainwindow.cpp
parentcb350dbe9151db2ded62942d29d11d6c8b88eabd (diff)
downloadkdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.zip
kdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.tar.gz
kdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.tar.bz2
conflict
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
@@ -650,24 +650,25 @@ void MainWindow::setUsesBigPixmaps ( bool b )
qDebug("KO: BigPixmaps are not supported ");
}
void MainWindow::initActions()
{
//KOPrefs::instance()->mShowFullMenu
iconToolBar->clear();
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 );
syncMenu = new QPopupMenu( this );
configureAgendaMenu = new QPopupMenu( this );
configureToolBarMenu = new QPopupMenu( this );
QPopupMenu *helpMenu = new QPopupMenu( this );
QIconSet icon;
int pixWid = 22, pixHei = 22;
@@ -780,33 +781,60 @@ void MainWindow::initActions()
icon = loadPixmap( pathString + "picker" );
QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
dPickerAction->addTo( actionMenu );
connect( dPickerAction, SIGNAL( activated() ),
mView, SLOT( showDatePicker() ) );
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 );
configureToolBarMenu->insertSeparator();
configureToolBarMenu->insertItem(i18n("Week Number"), 400);
configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
//actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this );
@@ -835,36 +863,30 @@ void MainWindow::initActions()
mView, SLOT( moveIncidence() ) );
#ifndef DESKTOP_VERSION
mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
mBeamAction->addTo(mCurrentItemMenu );
connect( mBeamAction, SIGNAL( activated() ),
mView, SLOT( beamIncidence() ) );
#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" );
}
configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
FSaction->addTo( viewMenu );
connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
@@ -987,29 +1009,25 @@ void MainWindow::initActions()
connect( todoview_action, SIGNAL( activated() ),
mView->viewManager(), SLOT( showTodoView() ) );
#if 0
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() ) );
configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
actionMenu->insertSeparator();
@@ -1556,24 +1574,25 @@ void MainWindow::keyBindings()
{
QString cap = i18n("KO/Pi Keys + Colors");
QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") +
i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") +
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")+
i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+
i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
@@ -2090,24 +2109,32 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
mView->showNextAlarms();
else
mView->toggleAllDaySize();
break;
case Qt::Key_T:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
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;
// case Qt::Key_Return:
case Qt::Key_E:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
mView->newEvent();
else
mView->editIncidence();