summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp69
1 files changed, 48 insertions, 21 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 9c2ac82..bfae1b5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -614,96 +614,97 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
614 mView->viewManager()->showNextView(); 614 mView->viewManager()->showNextView();
615 } 615 }
616 else if ( msg == "-showNextXView" ) { 616 else if ( msg == "-showNextXView" ) {
617 mView->viewManager()->showNextXView(); 617 mView->viewManager()->showNextXView();
618 } 618 }
619 619
620 620
621 } 621 }
622 622
623 showMaximized(); 623 showMaximized();
624 raise(); 624 raise();
625} 625}
626void MainWindow::startMultiSync() 626void MainWindow::startMultiSync()
627{ 627{
628 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); 628 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
629 if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), 629 if ( QMessageBox::information( this, i18n("KDE-Pim Sync"),
630 question, 630 question,
631 i18n("Yes"), i18n("No"), 631 i18n("Yes"), i18n("No"),
632 0, 0 ) != 0 ) { 632 0, 0 ) != 0 ) {
633 setCaption(i18n("Aborted! Nothing synced!")); 633 setCaption(i18n("Aborted! Nothing synced!"));
634 return; 634 return;
635 } 635 }
636 mSyncManager->multiSync( false ); 636 mSyncManager->multiSync( false );
637#ifndef DESKTOP_VERSION 637#ifndef DESKTOP_VERSION
638 QCopEnvelope e("QPE/Application/kapi", "doRingSync"); 638 QCopEnvelope e("QPE/Application/kapi", "doRingSync");
639#endif 639#endif
640} 640}
641QPixmap MainWindow::loadPixmap( QString name ) 641QPixmap MainWindow::loadPixmap( QString name )
642{ 642{
643 return SmallIcon( name ); 643 return SmallIcon( name );
644 644
645} 645}
646void MainWindow::setUsesBigPixmaps ( bool b ) 646void MainWindow::setUsesBigPixmaps ( bool b )
647{ 647{
648 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); 648 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
649 if ( b ) 649 if ( b )
650 qDebug("KO: BigPixmaps are not supported "); 650 qDebug("KO: BigPixmaps are not supported ");
651} 651}
652void MainWindow::initActions() 652void MainWindow::initActions()
653{ 653{
654 //KOPrefs::instance()->mShowFullMenu 654 //KOPrefs::instance()->mShowFullMenu
655 iconToolBar->clear(); 655 iconToolBar->clear();
656 KOPrefs *p = KOPrefs::instance(); 656 KOPrefs *p = KOPrefs::instance();
657 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 657 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
658 658
659 QPopupMenu *viewMenu = new QPopupMenu( this ); 659 QPopupMenu *viewMenu = new QPopupMenu( this );
660 QPopupMenu *actionMenu = new QPopupMenu( this ); 660 QPopupMenu *actionMenu = new QPopupMenu( this );
661 mCurrentItemMenu = new QPopupMenu ( this ); 661 mCurrentItemMenu = new QPopupMenu ( this );
662 QPopupMenu *nextConflictMenu = new QPopupMenu ( this );
662 QPopupMenu *importMenu = new QPopupMenu( this ); 663 QPopupMenu *importMenu = new QPopupMenu( this );
663 QPopupMenu *importMenu_X = new QPopupMenu( this ); 664 QPopupMenu *importMenu_X = new QPopupMenu( this );
664 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 665 QPopupMenu *exportMenu_X = new QPopupMenu( this );
665 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 666 QPopupMenu *beamMenu_X = new QPopupMenu( this );
666 selectFilterMenu = new QPopupMenu( this ); 667 selectFilterMenu = new QPopupMenu( this );
667 selectFilterMenu->setCheckable( true ); 668 selectFilterMenu->setCheckable( true );
668 syncMenu = new QPopupMenu( this ); 669 syncMenu = new QPopupMenu( this );
669 configureAgendaMenu = new QPopupMenu( this ); 670 configureAgendaMenu = new QPopupMenu( this );
670 configureToolBarMenu = new QPopupMenu( this ); 671 configureToolBarMenu = new QPopupMenu( this );
671 QPopupMenu *helpMenu = new QPopupMenu( this ); 672 QPopupMenu *helpMenu = new QPopupMenu( this );
672 QIconSet icon; 673 QIconSet icon;
673 int pixWid = 22, pixHei = 22; 674 int pixWid = 22, pixHei = 22;
674 QString pathString = ""; 675 QString pathString = "";
675 if ( !p->mToolBarMiniIcons ) { 676 if ( !p->mToolBarMiniIcons ) {
676 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { 677 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) {
677 pathString += "icons16/"; 678 pathString += "icons16/";
678 pixWid = 18; pixHei = 16; 679 pixWid = 18; pixHei = 16;
679 } 680 }
680 } else { 681 } else {
681 pathString += "iconsmini/"; 682 pathString += "iconsmini/";
682 pixWid = 18; pixHei = 16; 683 pixWid = 18; pixHei = 16;
683 } 684 }
684 if ( KOPrefs::instance()->mShowFullMenu ) { 685 if ( KOPrefs::instance()->mShowFullMenu ) {
685 QMenuBar *menuBar1; 686 QMenuBar *menuBar1;
686 menuBar1 = menuBar(); 687 menuBar1 = menuBar();
687 menuBar1->insertItem( i18n("File"), importMenu ); 688 menuBar1->insertItem( i18n("File"), importMenu );
688 menuBar1->insertItem( i18n("View"), viewMenu ); 689 menuBar1->insertItem( i18n("View"), viewMenu );
689 menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); 690 menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu );
690 menuBar1->insertItem( i18n("Action"), actionMenu ); 691 menuBar1->insertItem( i18n("Action"), actionMenu );
691#ifdef DESKTOP_VERSION 692#ifdef DESKTOP_VERSION
692 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 693 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
693 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 694 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
694#else 695#else
695 menuBar1->insertItem( i18n("Sync"), syncMenu ); 696 menuBar1->insertItem( i18n("Sync"), syncMenu );
696 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 697 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
697#endif 698#endif
698 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 699 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
699 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 700 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
700 menuBar1->insertItem( i18n("Help"), helpMenu ); 701 menuBar1->insertItem( i18n("Help"), helpMenu );
701 } else { 702 } else {
702 QPEMenuBar *menuBar1; 703 QPEMenuBar *menuBar1;
703 menuBar1 = new QPEMenuBar( iconToolBar ); 704 menuBar1 = new QPEMenuBar( iconToolBar );
704 QPopupMenu *menuBar = new QPopupMenu( this ); 705 QPopupMenu *menuBar = new QPopupMenu( this );
705 icon = loadPixmap( pathString + "z_menu" ); 706 icon = loadPixmap( pathString + "z_menu" );
706 menuBar1->insertItem( icon.pixmap(), menuBar); 707 menuBar1->insertItem( icon.pixmap(), menuBar);
707 //menuBar1->insertItem( i18n("ME"), menuBar); 708 //menuBar1->insertItem( i18n("ME"), menuBar);
708 menuBar->insertItem( i18n("File"), importMenu ); 709 menuBar->insertItem( i18n("File"), importMenu );
709 menuBar->insertItem( i18n("View"), viewMenu ); 710 menuBar->insertItem( i18n("View"), viewMenu );
@@ -744,163 +745,184 @@ void MainWindow::initActions()
744 connect( mWeekAction, SIGNAL( activated() ), 745 connect( mWeekAction, SIGNAL( activated() ),
745 this, SLOT( weekAction() ) ); 746 this, SLOT( weekAction() ) );
746 747
747 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 748 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
748 if ( p->mShowIconFilterview ) { 749 if ( p->mShowIconFilterview ) {
749 icon = loadPixmap( pathString + "filter" ); 750 icon = loadPixmap( pathString + "filter" );
750 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 751 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
751 connect( actionFilterMenuTB, SIGNAL( activated() ), 752 connect( actionFilterMenuTB, SIGNAL( activated() ),
752 this, SLOT( fillFilterMenuTB() ) ); 753 this, SLOT( fillFilterMenuTB() ) );
753 actionFilterMenuTB->addTo( iconToolBar ); 754 actionFilterMenuTB->addTo( iconToolBar );
754 selectFilterMenuTB = new QPopupMenu( this ); 755 selectFilterMenuTB = new QPopupMenu( this );
755 selectFilterMenuTB->setCheckable( true ); 756 selectFilterMenuTB->setCheckable( true );
756 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 757 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
757 } 758 }
758 759
759 //#endif 760 //#endif
760 // ****************** 761 // ******************
761 QAction *action; 762 QAction *action;
762 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 763 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
763 configureToolBarMenu->setCheckable( true ); 764 configureToolBarMenu->setCheckable( true );
764 765
765 766
766 configureAgendaMenu->setCheckable( true ); 767 configureAgendaMenu->setCheckable( true );
767 int iii ; 768 int iii ;
768 for ( iii = 1;iii<= 10 ;++iii ){ 769 for ( iii = 1;iii<= 10 ;++iii ){
769 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 770 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
770 } 771 }
771 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 772 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
772 773
773 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 774 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
774 this, SLOT( showConfigureAgenda( ) ) ); 775 this, SLOT( showConfigureAgenda( ) ) );
775 icon = loadPixmap( pathString + "today" ); 776 icon = loadPixmap( pathString + "today" );
776 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 777 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
777 today_action->addTo( actionMenu ); 778 today_action->addTo( actionMenu );
778 connect( today_action, SIGNAL( activated() ), 779 connect( today_action, SIGNAL( activated() ),
779 mView, SLOT( goToday() ) ); 780 mView, SLOT( goToday() ) );
780 781
781 icon = loadPixmap( pathString + "picker" ); 782 icon = loadPixmap( pathString + "picker" );
782 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); 783 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
783 dPickerAction->addTo( actionMenu ); 784 dPickerAction->addTo( actionMenu );
784 connect( dPickerAction, SIGNAL( activated() ), 785 connect( dPickerAction, SIGNAL( activated() ),
785 mView, SLOT( showDatePicker() ) ); 786 mView, SLOT( showDatePicker() ) );
786 787
787 icon = loadPixmap( pathString + "search" ); 788 icon = loadPixmap( pathString + "search" );
788 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 789 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
789 search_action->addTo( actionMenu ); 790 search_action->addTo( actionMenu );
790 connect( search_action, SIGNAL( activated() ), 791 connect( search_action, SIGNAL( activated() ),
791 mView->dialogManager(), SLOT( showSearchDialog() ) ); 792 mView->dialogManager(), SLOT( showSearchDialog() ) );
793 actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu );
792 794
793 actionMenu->insertSeparator(); 795 action = new QAction( "Undo Delete", i18n("All events"), 0, this );
794 796 action->addTo( nextConflictMenu );
797 connect( action, SIGNAL( activated() ),
798 mView, SLOT( conflictAll() ) );
795 799
800 action = new QAction( "Undo Delete", i18n("Allday events"), 0, this );
801 action->addTo( nextConflictMenu );
802 connect( action, SIGNAL( activated() ),
803 mView, SLOT( conflictAllday() ) );
796 804
797 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 805 action = new QAction( "Undo Delete", i18n("Events with time"), 0, this );
798 action->addTo( mCurrentItemMenu ); 806 action->addTo( nextConflictMenu );
799 connect( action, SIGNAL( activated() ), 807 connect( action, SIGNAL( activated() ),
800 mView, SLOT( undo_delete() ) ); 808 mView, SLOT( conflictNotAll() ) );
809
810 actionMenu->insertSeparator();
811
812 icon = loadPixmap( pathString + "newevent" );
813 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
814 ne_action->addTo( mCurrentItemMenu );
815 connect( ne_action, SIGNAL( activated() ),
816 mView, SLOT( newEvent() ) );
817 icon = loadPixmap( pathString + "newtodo" );
818 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
819 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
820 nt_action->addTo( mCurrentItemMenu );
821 connect( nt_action, SIGNAL( activated() ),
822 mView, SLOT( newTodo() ) );
823 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
824 this );
825 mNewSubTodoAction->addTo( mCurrentItemMenu );
826 connect( mNewSubTodoAction, SIGNAL( activated() ),
827 mView, SLOT( newSubTodo() ) );
828
801 mCurrentItemMenu->insertSeparator(); 829 mCurrentItemMenu->insertSeparator();
802 icon = loadPixmap( pathString + "newevent" ); 830 icon = loadPixmap( pathString + "newevent" );
803 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 831 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
804 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 832 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
805 configureToolBarMenu->insertSeparator(); 833 configureToolBarMenu->insertSeparator();
806 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 834 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
807 configureToolBarMenu->insertSeparator(); 835 configureToolBarMenu->insertSeparator();
808 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 836 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
809 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 837 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
810 838
811 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); 839 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
812 mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); 840 mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this );
813 mShowAction->addTo( mCurrentItemMenu ); 841 mShowAction->addTo( mCurrentItemMenu );
814 connect( mShowAction, SIGNAL( activated() ), 842 connect( mShowAction, SIGNAL( activated() ),
815 mView, SLOT( showIncidence() ) ); 843 mView, SLOT( showIncidence() ) );
816 844
817 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 845 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
818 mEditAction->addTo( mCurrentItemMenu ); 846 mEditAction->addTo( mCurrentItemMenu );
819 connect( mEditAction, SIGNAL( activated() ), 847 connect( mEditAction, SIGNAL( activated() ),
820 mView, SLOT( editIncidence() ) ); 848 mView, SLOT( editIncidence() ) );
821 849
822 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 850 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
823 mDeleteAction->addTo( mCurrentItemMenu ); 851 mDeleteAction->addTo( mCurrentItemMenu );
824 connect( mDeleteAction, SIGNAL( activated() ), 852 connect( mDeleteAction, SIGNAL( activated() ),
825 mView, SLOT( deleteIncidence() ) ); 853 mView, SLOT( deleteIncidence() ) );
826 854
827 855
828 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 856 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
829 mCloneAction->addTo( mCurrentItemMenu ); 857 mCloneAction->addTo( mCurrentItemMenu );
830 connect( mCloneAction, SIGNAL( activated() ), 858 connect( mCloneAction, SIGNAL( activated() ),
831 mView, SLOT( cloneIncidence() ) ); 859 mView, SLOT( cloneIncidence() ) );
832 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 860 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
833 mMoveAction->addTo( mCurrentItemMenu ); 861 mMoveAction->addTo( mCurrentItemMenu );
834 connect( mMoveAction, SIGNAL( activated() ), 862 connect( mMoveAction, SIGNAL( activated() ),
835 mView, SLOT( moveIncidence() ) ); 863 mView, SLOT( moveIncidence() ) );
836#ifndef DESKTOP_VERSION 864#ifndef DESKTOP_VERSION
837 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 865 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
838 mBeamAction->addTo(mCurrentItemMenu ); 866 mBeamAction->addTo(mCurrentItemMenu );
839 connect( mBeamAction, SIGNAL( activated() ), 867 connect( mBeamAction, SIGNAL( activated() ),
840 mView, SLOT( beamIncidence() ) ); 868 mView, SLOT( beamIncidence() ) );
841#endif 869#endif
842 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 870 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
843 mCancelAction->addTo( mCurrentItemMenu ); 871 mCancelAction->addTo( mCurrentItemMenu );
844 connect( mCancelAction, SIGNAL( activated() ), 872 connect( mCancelAction, SIGNAL( activated() ),
845 mView, SLOT( toggleCancelIncidence() ) ); 873 mView, SLOT( toggleCancelIncidence() ) );
846 874
847 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
848 ne_action->addTo( actionMenu );
849 connect( ne_action, SIGNAL( activated() ),
850 mView, SLOT( newEvent() ) );
851 icon = loadPixmap( pathString + "newtodo" );
852 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
853 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
854 nt_action->addTo( actionMenu );
855 connect( nt_action, SIGNAL( activated() ),
856 mView, SLOT( newTodo() ) );
857
858 875
876 mCurrentItemMenu->insertSeparator();
877 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
878 action->addTo( mCurrentItemMenu );
879 connect( action, SIGNAL( activated() ),
880 mView, SLOT( undo_delete() ) );
859 881
860 // *********************** 882 // ***********************
861 if ( KOPrefs::instance()->mVerticalScreen ) { 883 if ( KOPrefs::instance()->mVerticalScreen ) {
862 icon = SmallIcon( "1updownarrow" ); 884 icon = SmallIcon( "1updownarrow" );
863 } else { 885 } else {
864 icon = SmallIcon("1leftrightarrow" ); 886 icon = SmallIcon("1leftrightarrow" );
865 } 887 }
866 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); 888 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
867 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 889 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
868 FSaction->addTo( viewMenu ); 890 FSaction->addTo( viewMenu );
869 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 891 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
870 892
871 893
872 icon = loadPixmap( pathString + "filter" ); 894 icon = loadPixmap( pathString + "filter" );
873 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 895 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
874 icon = loadPixmap( pathString + "configure" ); 896 icon = loadPixmap( pathString + "configure" );
875 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); 897 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
876 action->addTo( viewMenu ); 898 action->addTo( viewMenu );
877 connect( action, SIGNAL( activated() ), 899 connect( action, SIGNAL( activated() ),
878 mView, SLOT( toggleFilter() ) ); 900 mView, SLOT( toggleFilter() ) );
879 mToggleFilter = action; 901 mToggleFilter = action;
880 icon = loadPixmap( pathString + "navi" ); 902 icon = loadPixmap( pathString + "navi" );
881 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); 903 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
882 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 904 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
883 action->addTo( viewMenu ); 905 action->addTo( viewMenu );
884 connect( action, SIGNAL( activated() ), 906 connect( action, SIGNAL( activated() ),
885 mView, SLOT( toggleDateNavigatorWidget() ) ); 907 mView, SLOT( toggleDateNavigatorWidget() ) );
886 mToggleNav = action ; 908 mToggleNav = action ;
887 icon = loadPixmap( pathString + "allday" ); 909 icon = loadPixmap( pathString + "allday" );
888 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 910 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
889 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 911 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
890 action->addTo( viewMenu ); 912 action->addTo( viewMenu );
891 connect( action, SIGNAL( activated() ), 913 connect( action, SIGNAL( activated() ),
892 mView, SLOT( toggleAllDaySize() ) ); 914 mView, SLOT( toggleAllDaySize() ) );
893 mToggleAllday = action; 915 mToggleAllday = action;
894 916
895 917
896 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 918 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
897 mToggleNav, SLOT( setEnabled ( bool ) ) ); 919 mToggleNav, SLOT( setEnabled ( bool ) ) );
898 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 920 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
899 // mToggleFilter, SLOT( setEnabled ( bool ) ) ); 921 // mToggleFilter, SLOT( setEnabled ( bool ) ) );
900 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 922 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
901 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 923 mToggleAllday, SLOT( setEnabled ( bool ) ) );
902 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 924 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
903 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); 925 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
904 926
905 927
906 dPickerAction->addTo( iconToolBar ); 928 dPickerAction->addTo( iconToolBar );
@@ -951,101 +973,97 @@ void MainWindow::initActions()
951 day5_action->addTo( viewMenu ); 973 day5_action->addTo( viewMenu );
952 connect( day5_action, SIGNAL( activated() ), 974 connect( day5_action, SIGNAL( activated() ),
953 mView->viewManager(), SLOT( showWorkWeekView() ) ); 975 mView->viewManager(), SLOT( showWorkWeekView() ) );
954 976
955 icon = loadPixmap( pathString + "week" ); 977 icon = loadPixmap( pathString + "week" );
956 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 978 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
957 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 979 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
958 day7_action->addTo( viewMenu ); 980 day7_action->addTo( viewMenu );
959 connect( day7_action, SIGNAL( activated() ), 981 connect( day7_action, SIGNAL( activated() ),
960 mView->viewManager(), SLOT( showWeekView() ) ); 982 mView->viewManager(), SLOT( showWeekView() ) );
961 983
962 icon = loadPixmap( pathString + "workweek2" ); 984 icon = loadPixmap( pathString + "workweek2" );
963 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 985 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
964 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 986 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
965 day6_action->addTo( viewMenu ); 987 day6_action->addTo( viewMenu );
966 connect( day6_action, SIGNAL( activated() ), 988 connect( day6_action, SIGNAL( activated() ),
967 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 989 mView->viewManager(), SLOT( showMonthViewWeek() ) );
968 990
969 icon = loadPixmap( pathString + "month" ); 991 icon = loadPixmap( pathString + "month" );
970 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 992 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
971 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 993 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
972 month_action->addTo( viewMenu ); 994 month_action->addTo( viewMenu );
973 connect( month_action, SIGNAL( activated() ), 995 connect( month_action, SIGNAL( activated() ),
974 mView->viewManager(), SLOT( showMonthView() ) ); 996 mView->viewManager(), SLOT( showMonthView() ) );
975 997
976 icon = loadPixmap( pathString + "list" ); 998 icon = loadPixmap( pathString + "list" );
977 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 999 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
978 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 1000 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
979 showlist_action->addTo( viewMenu ); 1001 showlist_action->addTo( viewMenu );
980 connect( showlist_action, SIGNAL( activated() ), 1002 connect( showlist_action, SIGNAL( activated() ),
981 mView->viewManager(), SLOT( showListView() ) ); 1003 mView->viewManager(), SLOT( showListView() ) );
982 1004
983 icon = loadPixmap( pathString + "todo" ); 1005 icon = loadPixmap( pathString + "todo" );
984 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 1006 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
985 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 1007 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
986 todoview_action->addTo( viewMenu ); 1008 todoview_action->addTo( viewMenu );
987 connect( todoview_action, SIGNAL( activated() ), 1009 connect( todoview_action, SIGNAL( activated() ),
988 mView->viewManager(), SLOT( showTodoView() ) ); 1010 mView->viewManager(), SLOT( showTodoView() ) );
989 1011
990 1012
991 1013
992#if 0 1014#if 0
993 action = new QAction( "view_timespan", "Time Span", 0, this ); 1015 action = new QAction( "view_timespan", "Time Span", 0, this );
994 action->addTo( viewMenu ); 1016 action->addTo( viewMenu );
995 connect( action, SIGNAL( activated() ), 1017 connect( action, SIGNAL( activated() ),
996 mView->viewManager(), SLOT( showTimeSpanView() ) ); 1018 mView->viewManager(), SLOT( showTimeSpanView() ) );
997#endif 1019#endif
998 1020
999 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 1021
1000 this );
1001 mNewSubTodoAction->addTo( actionMenu );
1002 connect( mNewSubTodoAction, SIGNAL( activated() ),
1003 mView, SLOT( newSubTodo() ) );
1004 1022
1005 action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, 1023 action = new QAction( "purge_completed", i18n("Purge Completed..."), 0,
1006 this ); 1024 this );
1007 action->addTo( actionMenu ); 1025 action->addTo( actionMenu );
1008 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 1026 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
1009 1027
1010 1028
1011 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); 1029 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
1012 1030
1013 1031
1014 1032
1015 actionMenu->insertSeparator(); 1033 actionMenu->insertSeparator();
1016 action = new QAction( "manage cat", i18n("Edit category list..."), 0, 1034 action = new QAction( "manage cat", i18n("Edit category list..."), 0,
1017 this ); 1035 this );
1018 action->addTo( actionMenu ); 1036 action->addTo( actionMenu );
1019 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); 1037 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) );
1020 1038
1021 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1039 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1022 this ); 1040 this );
1023 action->addTo( actionMenu ); 1041 action->addTo( actionMenu );
1024 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1042 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1025 1043
1026 1044
1027 actionMenu->insertSeparator(); 1045 actionMenu->insertSeparator();
1028 icon = loadPixmap( pathString + "configure" ); 1046 icon = loadPixmap( pathString + "configure" );
1029 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); 1047 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
1030 action->addTo( actionMenu ); 1048 action->addTo( actionMenu );
1031 connect( action, SIGNAL( activated() ), 1049 connect( action, SIGNAL( activated() ),
1032 mView, SLOT( edit_options() ) ); 1050 mView, SLOT( edit_options() ) );
1033 action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); 1051 action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this );
1034 action->addTo( actionMenu ); 1052 action->addTo( actionMenu );
1035 connect( action, SIGNAL( activated() ), 1053 connect( action, SIGNAL( activated() ),
1036 this, SLOT( calHint() ) ); 1054 this, SLOT( calHint() ) );
1037 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); 1055 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
1038 action->addTo( actionMenu ); 1056 action->addTo( actionMenu );
1039 connect( action, SIGNAL( activated() ), 1057 connect( action, SIGNAL( activated() ),
1040 mView, SLOT( edit_global_options() ) ); 1058 mView, SLOT( edit_global_options() ) );
1041 if ( KOPrefs::instance()->mShowFullMenu ) { 1059 if ( KOPrefs::instance()->mShowFullMenu ) {
1042 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 1060 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
1043 1061
1044 } 1062 }
1045 // actionMenu->insertSeparator(); 1063 // actionMenu->insertSeparator();
1046 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 1064 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
1047 this ); 1065 this );
1048 action->addTo( importMenu_X ); 1066 action->addTo( importMenu_X );
1049 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 1067 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
1050 action = new QAction( "import_quick", i18n("Import last file"), 0, 1068 action = new QAction( "import_quick", i18n("Import last file"), 0,
1051 this ); 1069 this );
@@ -1520,96 +1538,97 @@ void MainWindow::multisynchowto()
1520} 1538}
1521void MainWindow::synchowto() 1539void MainWindow::synchowto()
1522{ 1540{
1523 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1541 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1524} 1542}
1525void MainWindow::faq() 1543void MainWindow::faq()
1526{ 1544{
1527 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); 1545 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
1528 1546
1529} 1547}
1530void MainWindow::whatsNew() 1548void MainWindow::whatsNew()
1531{ 1549{
1532 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1550 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1533 1551
1534} 1552}
1535void MainWindow::licence() 1553void MainWindow::licence()
1536{ 1554{
1537 KApplication::showLicence(); 1555 KApplication::showLicence();
1538 1556
1539} 1557}
1540void MainWindow::about() 1558void MainWindow::about()
1541{ 1559{
1542 QString version; 1560 QString version;
1543#include <../version> 1561#include <../version>
1544 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1562 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1545 i18n("KOrganizer/Platform-independent\n") + 1563 i18n("KOrganizer/Platform-independent\n") +
1546 "(KO/Pi) " + version + " - " + 1564 "(KO/Pi) " + version + " - " +
1547 1565
1548#ifdef DESKTOP_VERSION 1566#ifdef DESKTOP_VERSION
1549 i18n("Desktop Edition\n") + 1567 i18n("Desktop Edition\n") +
1550#else 1568#else
1551 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + 1569 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1552#endif 1570#endif
1553 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); 1571 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1554} 1572}
1555void MainWindow::keyBindings() 1573void MainWindow::keyBindings()
1556{ 1574{
1557 QString cap = i18n("KO/Pi Keys + Colors"); 1575 QString cap = i18n("KO/Pi Keys + Colors");
1558 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1576 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1559 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1577 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1560 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + 1578 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") +
1561 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + 1579 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") +
1562 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1580 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1563 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1581 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1564 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ 1582 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+
1565 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1583 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1566 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1584 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1567 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ 1585 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+
1586 i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+
1568 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1587 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1569 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1588 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1570 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1589 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1571 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ 1590 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+
1572 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1591 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1573 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1592 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1574 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ 1593 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+
1575 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1594 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1576 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1595 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1577 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1596 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1578 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1597 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1579 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1598 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1580 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1599 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1581 i18n("<p><h3>In agenda view:</h3></p>\n") + 1600 i18n("<p><h3>In agenda view:</h3></p>\n") +
1582 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1601 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1583 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1602 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1584 i18n("<p><h3>In todo view:</h3></p>\n") + 1603 i18n("<p><h3>In todo view:</h3></p>\n") +
1585 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ 1604 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+
1586 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ 1605 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+
1587 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ 1606 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+
1588 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ 1607 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+
1589 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1608 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1590 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ 1609 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+
1591 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ 1610 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+
1592 i18n("<p><h3>In list view:</h3></p>\n") + 1611 i18n("<p><h3>In list view:</h3></p>\n") +
1593 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1612 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1594 i18n("<p><b>return</b>: Select item+one step down</p>\n")+ 1613 i18n("<p><b>return</b>: Select item+one step down</p>\n")+
1595 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ 1614 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+
1596 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ 1615 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+
1597 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ 1616 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+
1598 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ 1617 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+
1599 i18n("<p><h3>In event/todo viewer:</h3></p>\n") + 1618 i18n("<p><h3>In event/todo viewer:</h3></p>\n") +
1600 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ 1619 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
1601 i18n("<p><b>A</b>: Show agenda view.</p>\n")+ 1620 i18n("<p><b>A</b>: Show agenda view.</p>\n")+
1602 i18n("<p><b>E</b>: Edit item</p>\n") + 1621 i18n("<p><b>E</b>: Edit item</p>\n") +
1603 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + 1622 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
1604 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + 1623 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
1605 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ 1624 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
1606 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ 1625 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
1607 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ 1626 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
1608 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ 1627 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
1609 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ 1628 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
1610 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + 1629 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
1611 i18n("<p><b>White</b>: Item readonly</p>\n"); 1630 i18n("<p><b>White</b>: Item readonly</p>\n");
1612 displayText( text, cap); 1631 displayText( text, cap);
1613} 1632}
1614void MainWindow::aboutAutoSaving() 1633void MainWindow::aboutAutoSaving()
1615{ 1634{
@@ -2054,96 +2073,104 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
2054 mView->viewManager()->showWhatsNextView(); 2073 mView->viewManager()->showWhatsNextView();
2055 break; 2074 break;
2056 case Qt::Key_L: 2075 case Qt::Key_L:
2057 mView->viewManager()->showListView(); 2076 mView->viewManager()->showListView();
2058 break; 2077 break;
2059 case Qt::Key_N: 2078 case Qt::Key_N:
2060 mView->viewManager()->showNextView(); 2079 mView->viewManager()->showNextView();
2061 break; 2080 break;
2062 case Qt::Key_V: 2081 case Qt::Key_V:
2063 mView->viewManager()->showTodoView(); 2082 mView->viewManager()->showTodoView();
2064 break; 2083 break;
2065 case Qt::Key_C: 2084 case Qt::Key_C:
2066 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); 2085 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
2067 break; 2086 break;
2068 case Qt::Key_P: 2087 case Qt::Key_P:
2069 mView->showDatePicker( ); 2088 mView->showDatePicker( );
2070 break; 2089 break;
2071 case Qt::Key_F: 2090 case Qt::Key_F:
2072 mView->editFilters(); 2091 mView->editFilters();
2073 break; 2092 break;
2074 case Qt::Key_R: 2093 case Qt::Key_R:
2075 mView->toggleFilter(); 2094 mView->toggleFilter();
2076 break; 2095 break;
2077 case Qt::Key_X: 2096 case Qt::Key_X:
2078 if ( e->state() == Qt::ControlButton ) 2097 if ( e->state() == Qt::ControlButton )
2079 mView->toggleDateNavigatorWidget(); 2098 mView->toggleDateNavigatorWidget();
2080 else { 2099 else {
2081 mView->viewManager()->showNextXView(); 2100 mView->viewManager()->showNextXView();
2082 showSelectedDates = true; 2101 showSelectedDates = true;
2083 } 2102 }
2084 break; 2103 break;
2085 case Qt::Key_Space: 2104 case Qt::Key_Space:
2086 mView->toggleExpand(); 2105 mView->toggleExpand();
2087 break; 2106 break;
2088 case Qt::Key_A: 2107 case Qt::Key_A:
2089 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) 2108 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton )
2090 mView->showNextAlarms(); 2109 mView->showNextAlarms();
2091 else 2110 else
2092 mView->toggleAllDaySize(); 2111 mView->toggleAllDaySize();
2093 break; 2112 break;
2094 case Qt::Key_T: 2113 case Qt::Key_T:
2095 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2114 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2096 mView->newTodo(); 2115 mView->newTodo();
2097 else { 2116 else {
2098 mView->goToday(); 2117 mView->goToday();
2099 showSelectedDates = true; 2118 showSelectedDates = true;
2100 } 2119 }
2101 break; 2120 break;
2121 case Qt::Key_Q:
2122 if ( e->state() == Qt::ControlButton )
2123 mView->conflictNotAll();
2124 else if ( e->state() == Qt::ShiftButton )
2125 mView->conflictAllday();
2126 else
2127 mView->conflictAll();
2128 break;
2102 case Qt::Key_J: 2129 case Qt::Key_J:
2103 mView->viewManager()->showJournalView(); 2130 mView->viewManager()->showJournalView();
2104 break; 2131 break;
2105 case Qt::Key_B: 2132 case Qt::Key_B:
2106 mView->editIncidenceDescription();; 2133 mView->editIncidenceDescription();;
2107 break; 2134 break;
2108 // case Qt::Key_Return: 2135 // case Qt::Key_Return:
2109 case Qt::Key_E: 2136 case Qt::Key_E:
2110 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2137 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2111 mView->newEvent(); 2138 mView->newEvent();
2112 else 2139 else
2113 mView->editIncidence(); 2140 mView->editIncidence();
2114 break; 2141 break;
2115 case Qt::Key_Plus: 2142 case Qt::Key_Plus:
2116 size = p->mHourSize +2; 2143 size = p->mHourSize +2;
2117 if ( size <= 22 ) 2144 if ( size <= 22 )
2118 configureAgenda( size ); 2145 configureAgenda( size );
2119 break; 2146 break;
2120 case Qt::Key_Minus: 2147 case Qt::Key_Minus:
2121 size = p->mHourSize - 2; 2148 size = p->mHourSize - 2;
2122 if ( size >= 4 ) 2149 if ( size >= 4 )
2123 configureAgenda( size ); 2150 configureAgenda( size );
2124 break; 2151 break;
2125 2152
2126 2153
2127 default: 2154 default:
2128 e->ignore(); 2155 e->ignore();
2129 } 2156 }
2130 if ( pro > 0 ) { 2157 if ( pro > 0 ) {
2131 selectFilter( pro+1 ); 2158 selectFilter( pro+1 );
2132 } 2159 }
2133 if ( showSelectedDates ) { 2160 if ( showSelectedDates ) {
2134 ;// setCaptionToDates(); 2161 ;// setCaptionToDates();
2135 } 2162 }
2136 2163
2137} 2164}
2138void MainWindow::fillFilterMenuTB() 2165void MainWindow::fillFilterMenuTB()
2139{ 2166{
2140 selectFilterMenuTB->clear(); 2167 selectFilterMenuTB->clear();
2141 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); 2168 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 );
2142 selectFilterMenuTB->insertSeparator(); 2169 selectFilterMenuTB->insertSeparator();
2143 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); 2170 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 );
2144 2171
2145 selectFilterMenuTB->insertSeparator(); 2172 selectFilterMenuTB->insertSeparator();
2146 QPtrList<CalFilter> fili = mView->filters(); 2173 QPtrList<CalFilter> fili = mView->filters();
2147 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2174 CalFilter *curfilter = mView->filterView()->selectedFilter();
2148 CalFilter *filter = fili.first(); 2175 CalFilter *filter = fili.first();
2149 int iii = 2; 2176 int iii = 2;