summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--korganizer/mainwindow.cpp12
-rw-r--r--korganizer/mainwindow.h1
3 files changed, 12 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index af994ae..ec6a4ec 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,100 +1,100 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.1.6 ************ 3********** VERSION 2.1.6 ************
4 4
5KO/Pi: 5KO/Pi:
6Added to the list view (the list view is used in search dialog as well) the possibility to print it. 6Added to the list view (the list view is used in search dialog as well) the possibility to print it.
7Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 7Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
8Added to the list view the possibility to add all subtodos of selected todos to an export. 8Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
9Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 9Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
10 10
11********** VERSION 2.1.5 ************ 11********** VERSION 2.1.5 ************
12 12
13This is the new stable version. 13This is the new stable version.
14Bugfix: 14Bugfix:
15Fixed a problem with agenda popup on the desktop in KO/Pi. 15Fixed a problem with agenda popup on the desktop in KO/Pi.
16Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 16Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
17Added config option to not display completed todos in agenda view. 17Added config option to not display completed todos in agenda view.
18Addressee view is now using the formatted name, if defined. 18Addressee view is now using the formatted name, if defined.
19That makes it possible to display "lastname, firstname" in that view now. 19That makes it possible to display "lastname, firstname" in that view now.
20To set the formatted name for all contacts, please use menu: 20To set the formatted name for all contacts, please use menu:
21Edit->Change->Set formatted name. 21Edit->Change->Set formatted name.
22Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 22Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
23 23
24********** VERSION 2.1.4 ************ 24********** VERSION 2.1.4 ************
25 25
26Fixed two more bugs in the KA/Pi CSV import dialog: 26Fixed two more bugs in the KA/Pi CSV import dialog:
27Made it possible to read multi-line fields and import it to the "Note" field. 27Made it possible to read multi-line fields and import it to the "Note" field.
28Fixed a problem in mapping custom fields, whatever a custem field is... 28Fixed a problem in mapping custom fields, whatever a custem field is...
29 29
30********** VERSION 2.1.3 ************ 30********** VERSION 2.1.3 ************
31 31
32Changed the menu structure of the alarm applet: 32Changed the menu structure of the alarm applet:
33Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 33Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
34 34
35Fixed several problems in the KA/Pi CSV import dialog: 35Fixed several problems in the KA/Pi CSV import dialog:
36Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 36Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
37 37
38 38
39********** VERSION 2.1.2 ************ 39********** VERSION 2.1.2 ************
40 40
41Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 41Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
42 42
43Fixed a problem when importing data from Outlook with mutiple categories set. 43Fixed a problem when importing data from Outlook with mutiple categories set.
44 44
45Changed display of days in datenavigator: 45Changed display of days in datenavigator:
46Birthdays are now blue, not dark green. 46Birthdays are now blue, not dark green.
47When todo view is shown, no birtdays are shown and days with due todos are shown blue. 47When todo view is shown, no birtdays are shown and days with due todos are shown blue.
48When journal view is shown, only holidays are shown and days with journals are blue. 48When journal view is shown, only holidays are shown and days with journals are blue.
49 49
50Added Backup options to global config: 50Added Backup options to global config:
51You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). 51You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
52It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. 52It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
53The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. 53The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
54 54
55********** VERSION 2.1.1 ************ 55********** VERSION 2.1.1 ************
56 56
57Stable release 2.1.1! 57Stable release 2.1.1!
58 58
59KO/Pi: 59KO/Pi:
60Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 60Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
61 61
62********** VERSION 2.1.0 ************ 62********** VERSION 2.1.0 ************
63 63
64Stable release 2.1.0! 64Stable release 2.1.0!
65 65
66Summary of changes/fixes compared to version 2.0.6: 66Summary of changes/fixes compared to version 2.0.6:
67 67
68Many bugs of version 2.0.6 fixed. 68Many bugs of version 2.0.6 fixed.
69Most of them were small bugs, but some of them were important. 69Most of them were small bugs, but some of them were important.
70It is recommended to use version 2.1.0 and not version 2.0.6. 70It is recommended to use version 2.1.0 and not version 2.0.6.
71 71
72Important changes: 72Important changes:
73 73
74Added recurring todos to KO/Pi. 74Added recurring todos to KO/Pi.
75 75
76Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 76Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
77 77
78Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 78Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
79 79
80Datenavigator can now display many months. Very useful on the desktop. 80Datenavigator can now display many months. Very useful on the desktop.
81 81
82KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 82KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
83 83
84Made alarm sound working on Linux desktop. 84Made alarm sound working on Linux desktop.
85 85
86Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. 86Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
87 87
88Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. 88Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
89 89
90Many other usebility enhancements. 90Many other usebility enhancements.
91Special thanks to Ben for his suggestions! 91Special thanks to Ben for his suggestions!
92 92
93You can find the complete changelog 93You can find the complete changelog
94from version 1.7.7 to 2.1.0 94from version 1.7.7 to 2.1.0
95in the source package or on 95in the source package or on
96 96
97http://www.pi-sync.net/html/changelog.html 97http://www.pi-sync.net/html/changelog.html
98 98
99 99
100 100
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 481eab4..20f8b57 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -790,533 +790,538 @@ void MainWindow::initActions()
790 icon = loadPixmap( pathString + "allday" ); 790 icon = loadPixmap( pathString + "allday" );
791 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 791 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
792 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 792 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
793 action->addTo( viewMenu ); 793 action->addTo( viewMenu );
794 connect( action, SIGNAL( activated() ), 794 connect( action, SIGNAL( activated() ),
795 mView, SLOT( toggleAllDaySize() ) ); 795 mView, SLOT( toggleAllDaySize() ) );
796 mToggleAllday = action; 796 mToggleAllday = action;
797 797
798 798
799 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 799 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
800 mToggleNav, SLOT( setEnabled ( bool ) ) ); 800 mToggleNav, SLOT( setEnabled ( bool ) ) );
801 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 801 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
802 mToggleFilter, SLOT( setEnabled ( bool ) ) ); 802 mToggleFilter, SLOT( setEnabled ( bool ) ) );
803 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 803 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
804 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 804 mToggleAllday, SLOT( setEnabled ( bool ) ) );
805 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 805 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
806 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); 806 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
807 807
808 viewMenu->insertSeparator(); 808 viewMenu->insertSeparator();
809 icon = loadPixmap( pathString + "picker" ); 809 icon = loadPixmap( pathString + "picker" );
810 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); 810 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
811 action->addTo( viewMenu ); 811 action->addTo( viewMenu );
812 connect( action, SIGNAL( activated() ), 812 connect( action, SIGNAL( activated() ),
813 mView, SLOT( showDatePicker() ) ); 813 mView, SLOT( showDatePicker() ) );
814 action->addTo( iconToolBar ); 814 action->addTo( iconToolBar );
815 viewMenu->insertSeparator(); 815 viewMenu->insertSeparator();
816 816
817 if ( p-> mShowIconToggleFull ) 817 if ( p-> mShowIconToggleFull )
818 FSaction->addTo( iconToolBar ); 818 FSaction->addTo( iconToolBar );
819 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); 819 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar );
820 820
821 //******************** 821 //********************
822 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); 822 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
823 823
824 824
825 icon = loadPixmap( pathString + "whatsnext" ); 825 icon = loadPixmap( pathString + "whatsnext" );
826 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 826 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
827 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 827 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
828 whatsnext_action->addTo( viewMenu ); 828 whatsnext_action->addTo( viewMenu );
829 connect( whatsnext_action, SIGNAL( activated() ), 829 connect( whatsnext_action, SIGNAL( activated() ),
830 mView->viewManager(), SLOT( showWhatsNextView() ) ); 830 mView->viewManager(), SLOT( showWhatsNextView() ) );
831 831
832 icon = loadPixmap( pathString + "xdays" ); 832 icon = loadPixmap( pathString + "xdays" );
833 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 833 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
834 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 834 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
835 xdays_action->addTo( viewMenu ); 835 xdays_action->addTo( viewMenu );
836 connect( xdays_action, SIGNAL( activated() ), 836 connect( xdays_action, SIGNAL( activated() ),
837 mView->viewManager(), SLOT( showNextXView() ) ); 837 mView->viewManager(), SLOT( showNextXView() ) );
838 838
839 839
840 icon = loadPixmap( pathString + "journal" ); 840 icon = loadPixmap( pathString + "journal" );
841 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 841 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
842 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 842 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
843 viewjournal_action->addTo( viewMenu ); 843 viewjournal_action->addTo( viewMenu );
844 connect( viewjournal_action, SIGNAL( activated() ), 844 connect( viewjournal_action, SIGNAL( activated() ),
845 mView->viewManager(), SLOT( showJournalView() ) ); 845 mView->viewManager(), SLOT( showJournalView() ) );
846 846
847 847
848 icon = loadPixmap( pathString + "day" ); 848 icon = loadPixmap( pathString + "day" );
849 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 849 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
850 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 850 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
851 day1_action->addTo( viewMenu ); 851 day1_action->addTo( viewMenu );
852 // action->addTo( toolBar ); 852 // action->addTo( toolBar );
853 connect( day1_action, SIGNAL( activated() ), 853 connect( day1_action, SIGNAL( activated() ),
854 mView->viewManager(), SLOT( showDayView() ) ); 854 mView->viewManager(), SLOT( showDayView() ) );
855 855
856 icon = loadPixmap( pathString + "workweek" ); 856 icon = loadPixmap( pathString + "workweek" );
857 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 857 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
858 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 858 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
859 day5_action->addTo( viewMenu ); 859 day5_action->addTo( viewMenu );
860 connect( day5_action, SIGNAL( activated() ), 860 connect( day5_action, SIGNAL( activated() ),
861 mView->viewManager(), SLOT( showWorkWeekView() ) ); 861 mView->viewManager(), SLOT( showWorkWeekView() ) );
862 862
863 icon = loadPixmap( pathString + "week" ); 863 icon = loadPixmap( pathString + "week" );
864 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 864 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
865 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 865 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
866 day7_action->addTo( viewMenu ); 866 day7_action->addTo( viewMenu );
867 connect( day7_action, SIGNAL( activated() ), 867 connect( day7_action, SIGNAL( activated() ),
868 mView->viewManager(), SLOT( showWeekView() ) ); 868 mView->viewManager(), SLOT( showWeekView() ) );
869 869
870 icon = loadPixmap( pathString + "workweek2" ); 870 icon = loadPixmap( pathString + "workweek2" );
871 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 871 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
872 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 872 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
873 day6_action->addTo( viewMenu ); 873 day6_action->addTo( viewMenu );
874 connect( day6_action, SIGNAL( activated() ), 874 connect( day6_action, SIGNAL( activated() ),
875 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 875 mView->viewManager(), SLOT( showMonthViewWeek() ) );
876 876
877 icon = loadPixmap( pathString + "month" ); 877 icon = loadPixmap( pathString + "month" );
878 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 878 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
879 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 879 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
880 month_action->addTo( viewMenu ); 880 month_action->addTo( viewMenu );
881 connect( month_action, SIGNAL( activated() ), 881 connect( month_action, SIGNAL( activated() ),
882 mView->viewManager(), SLOT( showMonthView() ) ); 882 mView->viewManager(), SLOT( showMonthView() ) );
883 883
884 icon = loadPixmap( pathString + "list" ); 884 icon = loadPixmap( pathString + "list" );
885 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 885 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
886 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 886 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
887 showlist_action->addTo( viewMenu ); 887 showlist_action->addTo( viewMenu );
888 connect( showlist_action, SIGNAL( activated() ), 888 connect( showlist_action, SIGNAL( activated() ),
889 mView->viewManager(), SLOT( showListView() ) ); 889 mView->viewManager(), SLOT( showListView() ) );
890 890
891 icon = loadPixmap( pathString + "todo" ); 891 icon = loadPixmap( pathString + "todo" );
892 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 892 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
893 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 893 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
894 todoview_action->addTo( viewMenu ); 894 todoview_action->addTo( viewMenu );
895 connect( todoview_action, SIGNAL( activated() ), 895 connect( todoview_action, SIGNAL( activated() ),
896 mView->viewManager(), SLOT( showTodoView() ) ); 896 mView->viewManager(), SLOT( showTodoView() ) );
897 897
898 898
899 899
900#if 0 900#if 0
901 action = new QAction( "view_timespan", "Time Span", 0, this ); 901 action = new QAction( "view_timespan", "Time Span", 0, this );
902 action->addTo( viewMenu ); 902 action->addTo( viewMenu );
903 connect( action, SIGNAL( activated() ), 903 connect( action, SIGNAL( activated() ),
904 mView->viewManager(), SLOT( showTimeSpanView() ) ); 904 mView->viewManager(), SLOT( showTimeSpanView() ) );
905#endif 905#endif
906 906
907 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 907 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
908 this ); 908 this );
909 mNewSubTodoAction->addTo( actionMenu ); 909 mNewSubTodoAction->addTo( actionMenu );
910 connect( mNewSubTodoAction, SIGNAL( activated() ), 910 connect( mNewSubTodoAction, SIGNAL( activated() ),
911 mView, SLOT( newSubTodo() ) ); 911 mView, SLOT( newSubTodo() ) );
912 912
913 actionMenu->insertSeparator(); 913 actionMenu->insertSeparator();
914 914
915 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 915 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
916 mShowAction->addTo( actionMenu ); 916 mShowAction->addTo( actionMenu );
917 connect( mShowAction, SIGNAL( activated() ), 917 connect( mShowAction, SIGNAL( activated() ),
918 mView, SLOT( showIncidence() ) ); 918 mView, SLOT( showIncidence() ) );
919 919
920 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 920 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
921 mEditAction->addTo( actionMenu ); 921 mEditAction->addTo( actionMenu );
922 connect( mEditAction, SIGNAL( activated() ), 922 connect( mEditAction, SIGNAL( activated() ),
923 mView, SLOT( editIncidence() ) ); 923 mView, SLOT( editIncidence() ) );
924 924
925 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 925 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
926 mDeleteAction->addTo( actionMenu ); 926 mDeleteAction->addTo( actionMenu );
927 connect( mDeleteAction, SIGNAL( activated() ), 927 connect( mDeleteAction, SIGNAL( activated() ),
928 mView, SLOT( deleteIncidence() ) ); 928 mView, SLOT( deleteIncidence() ) );
929 929
930 930
931 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 931 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
932 mCloneAction->addTo( actionMenu ); 932 mCloneAction->addTo( actionMenu );
933 connect( mCloneAction, SIGNAL( activated() ), 933 connect( mCloneAction, SIGNAL( activated() ),
934 mView, SLOT( cloneIncidence() ) ); 934 mView, SLOT( cloneIncidence() ) );
935 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 935 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
936 mMoveAction->addTo( actionMenu ); 936 mMoveAction->addTo( actionMenu );
937 connect( mMoveAction, SIGNAL( activated() ), 937 connect( mMoveAction, SIGNAL( activated() ),
938 mView, SLOT( moveIncidence() ) ); 938 mView, SLOT( moveIncidence() ) );
939 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 939 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
940 mBeamAction->addTo( actionMenu ); 940 mBeamAction->addTo( actionMenu );
941 connect( mBeamAction, SIGNAL( activated() ), 941 connect( mBeamAction, SIGNAL( activated() ),
942 mView, SLOT( beamIncidence() ) ); 942 mView, SLOT( beamIncidence() ) );
943 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 943 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
944 mCancelAction->addTo( actionMenu ); 944 mCancelAction->addTo( actionMenu );
945 connect( mCancelAction, SIGNAL( activated() ), 945 connect( mCancelAction, SIGNAL( activated() ),
946 mView, SLOT( toggleCancelIncidence() ) ); 946 mView, SLOT( toggleCancelIncidence() ) );
947 947
948 actionMenu->insertSeparator(); 948 actionMenu->insertSeparator();
949 949
950 action = new QAction( "purge_completed", i18n("Purge Completed"), 0, 950 action = new QAction( "purge_completed", i18n("Purge Completed"), 0,
951 this ); 951 this );
952 action->addTo( actionMenu ); 952 action->addTo( actionMenu );
953 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 953 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
954 954
955 icon = loadPixmap( pathString + "search" ); 955 icon = loadPixmap( pathString + "search" );
956 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 956 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
957 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); 957 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
958 search_action->addTo( actionMenu ); 958 search_action->addTo( actionMenu );
959 connect( search_action, SIGNAL( activated() ), 959 connect( search_action, SIGNAL( activated() ),
960 mView->dialogManager(), SLOT( showSearchDialog() ) ); 960 mView->dialogManager(), SLOT( showSearchDialog() ) );
961 961
962 962
963 963
964 if ( KOPrefs::instance()->mShowFullMenu ) { 964 if ( KOPrefs::instance()->mShowFullMenu ) {
965 actionMenu->insertSeparator(); 965 actionMenu->insertSeparator();
966 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 966 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
967 967
968 } 968 }
969 // actionMenu->insertSeparator(); 969 // actionMenu->insertSeparator();
970 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 970 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
971 this ); 971 this );
972 action->addTo( importMenu_X ); 972 action->addTo( importMenu_X );
973 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 973 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
974 action = new QAction( "import_quick", i18n("Import last file"), 0, 974 action = new QAction( "import_quick", i18n("Import last file"), 0,
975 this ); 975 this );
976 action->addTo( importMenu_X ); 976 action->addTo( importMenu_X );
977 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 977 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
978 importMenu_X->insertSeparator(); 978 importMenu_X->insertSeparator();
979 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 979 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
980 this ); 980 this );
981 action->addTo( importMenu_X ); 981 action->addTo( importMenu_X );
982 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 982 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
983 //#ifndef DESKTOP_VERSION 983 //#ifndef DESKTOP_VERSION
984 importMenu_X->insertSeparator(); 984 importMenu_X->insertSeparator();
985 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 985 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
986 this ); 986 this );
987 action->addTo( importMenu_X ); 987 action->addTo( importMenu_X );
988 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 988 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
989 //#else 989 //#else
990#ifdef _OL_IMPORT_ 990#ifdef _OL_IMPORT_
991 importMenu_X->insertSeparator(); 991 importMenu_X->insertSeparator();
992 action = new QAction( "import_ol", i18n("Import from OL"), 0, 992 action = new QAction( "import_ol", i18n("Import from OL"), 0,
993 this ); 993 this );
994 action->addTo( importMenu_X ); 994 action->addTo( importMenu_X );
995 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 995 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
996#endif 996#endif
997 //#endif 997 //#endif
998 998
999 //importMenu->insertSeparator(); 999 //importMenu->insertSeparator();
1000 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 1000 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
1001 this ); 1001 this );
1002 action->addTo( importMenu ); 1002 action->addTo( importMenu );
1003 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 1003 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
1004 1004
1005 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, 1005 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0,
1006 this ); 1006 this );
1007 action->addTo( importMenu ); 1007 action->addTo( importMenu );
1008 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 1008 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
1009 importMenu->insertSeparator(); 1009 importMenu->insertSeparator();
1010 importMenu->insertItem( i18n("Import"), importMenu_X ); 1010 importMenu->insertItem( i18n("Import"), importMenu_X );
1011 //importMenu->insertSeparator(); 1011 //importMenu->insertSeparator();
1012 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 1012 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
1013 this ); 1013 this );
1014 action->addTo( exportMenu_X ); 1014 action->addTo( exportMenu_X );
1015 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 1015 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
1016 1016
1017 1017
1018 //LR 1018 //LR
1019 QPopupMenu *ex2phone = new QPopupMenu( this ); 1019 QPopupMenu *ex2phone = new QPopupMenu( this );
1020 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1020 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1021 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1021 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1022 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 1022 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
1023 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); 1023 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone );
1024 1024
1025 importMenu->insertItem( i18n("Export"), exportMenu_X ); 1025 importMenu->insertItem( i18n("Export"), exportMenu_X );
1026#ifndef DESKTOP_VERSION 1026#ifndef DESKTOP_VERSION
1027 //importMenu->insertSeparator(); 1027 //importMenu->insertSeparator();
1028 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 1028 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0,
1029 this ); 1029 this );
1030 brAction->addTo( beamMenu_X ); 1030 brAction->addTo( beamMenu_X );
1031 brAction->setToggleAction (true ) ; 1031 brAction->setToggleAction (true ) ;
1032 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 1032 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
1033 1033
1034 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 1034 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
1035 this ); 1035 this );
1036 action->addTo( beamMenu_X ); 1036 action->addTo( beamMenu_X );
1037 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 1037 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
1038 1038
1039 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 1039 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
1040 this ); 1040 this );
1041 action->addTo( beamMenu_X ); 1041 action->addTo( beamMenu_X );
1042 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 1042 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
1043 importMenu->insertItem( i18n("Beam"), beamMenu_X ); 1043 importMenu->insertItem( i18n("Beam"), beamMenu_X );
1044#else 1044#else
1045 //importMenu->insertSeparator(); 1045 //importMenu->insertSeparator();
1046 icon = loadPixmap( pathString + "print" ); 1046 icon = loadPixmap( pathString + "print" );
1047 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 1047 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
1048 action->addTo( beamMenu_X ); 1048 action->addTo( beamMenu_X );
1049 connect( action, SIGNAL( activated() ), 1049 connect( action, SIGNAL( activated() ),
1050 this, SLOT( printCal() ) ); 1050 this, SLOT( printCal() ) );
1051 1051
1052 icon = loadPixmap( pathString + "print" ); 1052 icon = loadPixmap( pathString + "print" );
1053 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1053 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1054 action->addTo( beamMenu_X ); 1054 action->addTo( beamMenu_X );
1055 connect( action, SIGNAL( activated() ), 1055 connect( action, SIGNAL( activated() ),
1056 this, SLOT( printSel() ) ); 1056 this, SLOT( printSel() ) );
1057 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1057 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1058 action->addTo( beamMenu_X ); 1058 action->addTo( beamMenu_X );
1059 connect( action, SIGNAL( activated() ), 1059 connect( action, SIGNAL( activated() ),
1060 mView->viewManager(), SLOT( slotprintWNV() ) ); 1060 mView->viewManager(), SLOT( slotprintWNV() ) );
1061 1061
1062 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1062 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1063 action->addTo( beamMenu_X ); 1063 action->addTo( beamMenu_X );
1064 connect( action, SIGNAL( activated() ), 1064 connect( action, SIGNAL( activated() ),
1065 mView, SLOT( slotprintSelInc() ) ); 1065 mView, SLOT( slotprintSelInc() ) );
1066 1066
1067 icon = loadPixmap( pathString + "print" );
1068 action = new QAction( i18n("Print list view..."),icon,i18n("Print list view..."), 0, this );
1069 action->addTo( beamMenu_X );
1070 connect( action, SIGNAL( activated() ),
1071 this, SLOT( printListView() ) );
1067 1072
1068 importMenu->insertItem( i18n("Print"), beamMenu_X ); 1073 importMenu->insertItem( i18n("Print"), beamMenu_X );
1069#endif 1074#endif
1070 importMenu->insertSeparator(); 1075 importMenu->insertSeparator();
1071 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1076 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1072 this ); 1077 this );
1073 action->addTo( importMenu ); 1078 action->addTo( importMenu );
1074 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1079 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1075 importMenu->insertSeparator(); 1080 importMenu->insertSeparator();
1076 action = new QAction( "beam all", i18n("Save"), 0, 1081 action = new QAction( "beam all", i18n("Save"), 0,
1077 this ); 1082 this );
1078 action->addTo( importMenu ); 1083 action->addTo( importMenu );
1079 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1084 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1080 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1085 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
1081 this ); 1086 this );
1082 action->addTo( importMenu ); 1087 action->addTo( importMenu );
1083 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1088 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
1084 1089
1085 //menuBar->insertItem( "Configure",configureMenu ); 1090 //menuBar->insertItem( "Configure",configureMenu );
1086 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1091 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1087 icon = loadPixmap( "korganizer/korganizer" ); 1092 icon = loadPixmap( "korganizer/korganizer" );
1088 1093
1089 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1094 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
1090 action->addTo( helpMenu ); 1095 action->addTo( helpMenu );
1091 connect( action, SIGNAL( activated() ), 1096 connect( action, SIGNAL( activated() ),
1092 SLOT( whatsNew() ) ); 1097 SLOT( whatsNew() ) );
1093 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1098 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
1094 action->addTo( helpMenu ); 1099 action->addTo( helpMenu );
1095 connect( action, SIGNAL( activated() ), 1100 connect( action, SIGNAL( activated() ),
1096 SLOT( features() ) ); 1101 SLOT( features() ) );
1097 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1102 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1098 action->addTo( helpMenu ); 1103 action->addTo( helpMenu );
1099 connect( action, SIGNAL( activated() ), 1104 connect( action, SIGNAL( activated() ),
1100 SLOT( keyBindings() ) ); 1105 SLOT( keyBindings() ) );
1101 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); 1106 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1102 action->addTo( helpMenu ); 1107 action->addTo( helpMenu );
1103 connect( action, SIGNAL( activated() ), 1108 connect( action, SIGNAL( activated() ),
1104 SLOT( storagehowto() ) ); 1109 SLOT( storagehowto() ) );
1105 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); 1110 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
1106 action->addTo( helpMenu ); 1111 action->addTo( helpMenu );
1107 connect( action, SIGNAL( activated() ), 1112 connect( action, SIGNAL( activated() ),
1108 SLOT( timetrackinghowto() ) ); 1113 SLOT( timetrackinghowto() ) );
1109 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1114 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1110 action->addTo( helpMenu ); 1115 action->addTo( helpMenu );
1111 connect( action, SIGNAL( activated() ), 1116 connect( action, SIGNAL( activated() ),
1112 SLOT( synchowto() ) ); 1117 SLOT( synchowto() ) );
1113 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1118 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1114 action->addTo( helpMenu ); 1119 action->addTo( helpMenu );
1115 connect( action, SIGNAL( activated() ), 1120 connect( action, SIGNAL( activated() ),
1116 SLOT( kdesynchowto() ) ); 1121 SLOT( kdesynchowto() ) );
1117 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1122 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1118 action->addTo( helpMenu ); 1123 action->addTo( helpMenu );
1119 connect( action, SIGNAL( activated() ), 1124 connect( action, SIGNAL( activated() ),
1120 SLOT( multisynchowto() ) ); 1125 SLOT( multisynchowto() ) );
1121 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1126 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
1122 action->addTo( helpMenu ); 1127 action->addTo( helpMenu );
1123 connect( action, SIGNAL( activated() ), 1128 connect( action, SIGNAL( activated() ),
1124 SLOT( aboutAutoSaving() ) ); 1129 SLOT( aboutAutoSaving() ) );
1125 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1130 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
1126 action->addTo( helpMenu ); 1131 action->addTo( helpMenu );
1127 connect( action, SIGNAL( activated() ), 1132 connect( action, SIGNAL( activated() ),
1128 SLOT( aboutKnownBugs() ) ); 1133 SLOT( aboutKnownBugs() ) );
1129 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1134 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
1130 action->addTo( helpMenu ); 1135 action->addTo( helpMenu );
1131 connect( action, SIGNAL( activated() ), 1136 connect( action, SIGNAL( activated() ),
1132 SLOT( usertrans() ) ); 1137 SLOT( usertrans() ) );
1133 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1138 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
1134 action->addTo( helpMenu ); 1139 action->addTo( helpMenu );
1135 connect( action, SIGNAL( activated() ), 1140 connect( action, SIGNAL( activated() ),
1136 SLOT( faq() ) ); 1141 SLOT( faq() ) );
1137 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1142 action = new QAction( "licence", i18n("Licence..."), 0, this );
1138 action->addTo( helpMenu ); 1143 action->addTo( helpMenu );
1139 connect( action, SIGNAL( activated() ), 1144 connect( action, SIGNAL( activated() ),
1140 SLOT( licence() ) ); 1145 SLOT( licence() ) );
1141 action = new QAction( "about", i18n("About..."), 0, this ); 1146 action = new QAction( "about", i18n("About..."), 0, this );
1142 action->addTo( helpMenu ); 1147 action->addTo( helpMenu );
1143 connect( action, SIGNAL( activated() ), 1148 connect( action, SIGNAL( activated() ),
1144 SLOT( about() ) ); 1149 SLOT( about() ) );
1145 //menuBar->insertSeparator(); 1150 //menuBar->insertSeparator();
1146 1151
1147 // ****************************************************** 1152 // ******************************************************
1148 // menubar icons 1153 // menubar icons
1149 1154
1150 1155
1151 1156
1152 //menuBar->insertItem( iconToolBar ); 1157 //menuBar->insertItem( iconToolBar );
1153 //xdays_action 1158 //xdays_action
1154 if (p-> mShowIconNewEvent) 1159 if (p-> mShowIconNewEvent)
1155 ne_action->addTo( iconToolBar ); 1160 ne_action->addTo( iconToolBar );
1156 if (p->mShowIconNewTodo ) 1161 if (p->mShowIconNewTodo )
1157 nt_action->addTo( iconToolBar ); 1162 nt_action->addTo( iconToolBar );
1158 if (p-> mShowIconSearch) 1163 if (p-> mShowIconSearch)
1159 search_action->addTo( iconToolBar ); 1164 search_action->addTo( iconToolBar );
1160 if (p-> mShowIconWhatsThis) 1165 if (p-> mShowIconWhatsThis)
1161 QWhatsThis::whatsThisButton ( iconToolBar ); 1166 QWhatsThis::whatsThisButton ( iconToolBar );
1162 if (p-> mShowIconNext) 1167 if (p-> mShowIconNext)
1163 whatsnext_action->addTo( viewToolBar ); 1168 whatsnext_action->addTo( viewToolBar );
1164 if (p-> mShowIconNextDays) 1169 if (p-> mShowIconNextDays)
1165 xdays_action->addTo( viewToolBar ); 1170 xdays_action->addTo( viewToolBar );
1166 if (p-> mShowIconJournal) 1171 if (p-> mShowIconJournal)
1167 viewjournal_action->addTo( viewToolBar ); 1172 viewjournal_action->addTo( viewToolBar );
1168 if (p-> mShowIconDay1) 1173 if (p-> mShowIconDay1)
1169 day1_action->addTo( viewToolBar ); 1174 day1_action->addTo( viewToolBar );
1170 if (p-> mShowIconDay5) 1175 if (p-> mShowIconDay5)
1171 day5_action->addTo( viewToolBar ); 1176 day5_action->addTo( viewToolBar );
1172 if (p-> mShowIconDay7) 1177 if (p-> mShowIconDay7)
1173 day7_action->addTo( viewToolBar ); 1178 day7_action->addTo( viewToolBar );
1174 if (p-> mShowIconDay6) 1179 if (p-> mShowIconDay6)
1175 day6_action->addTo( viewToolBar ); 1180 day6_action->addTo( viewToolBar );
1176 if (p-> mShowIconMonth) 1181 if (p-> mShowIconMonth)
1177 month_action->addTo( viewToolBar ); 1182 month_action->addTo( viewToolBar );
1178 if (p-> mShowIconList) 1183 if (p-> mShowIconList)
1179 showlist_action->addTo( viewToolBar ); 1184 showlist_action->addTo( viewToolBar );
1180 if (p-> mShowIconTodoview) 1185 if (p-> mShowIconTodoview)
1181 todoview_action->addTo( viewToolBar ); 1186 todoview_action->addTo( viewToolBar );
1182 1187
1183 icon = loadPixmap( pathString + "2leftarrowB" ); 1188 icon = loadPixmap( pathString + "2leftarrowB" );
1184 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1189 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1185 if (p-> mShowIconBackFast) { 1190 if (p-> mShowIconBackFast) {
1186 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1191 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1187 connect( action, SIGNAL( activated() ), 1192 connect( action, SIGNAL( activated() ),
1188 mView, SLOT( goPreviousMonth() ) ); 1193 mView, SLOT( goPreviousMonth() ) );
1189 action->addTo( navigatorToolBar ); 1194 action->addTo( navigatorToolBar );
1190 } 1195 }
1191 icon = loadPixmap( pathString + "1leftarrowB" ); 1196 icon = loadPixmap( pathString + "1leftarrowB" );
1192 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1197 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1193 if (p-> mShowIconBack) { 1198 if (p-> mShowIconBack) {
1194 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1199 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1195 connect( action, SIGNAL( activated() ), 1200 connect( action, SIGNAL( activated() ),
1196 mView, SLOT( goPrevious() ) ); 1201 mView, SLOT( goPrevious() ) );
1197 action->addTo( navigatorToolBar ); 1202 action->addTo( navigatorToolBar );
1198 } 1203 }
1199 icon = loadPixmap( pathString + "today" ); 1204 icon = loadPixmap( pathString + "today" );
1200 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1205 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1201 if (p-> mShowIconToday) 1206 if (p-> mShowIconToday)
1202 today_action->addTo( navigatorToolBar ); 1207 today_action->addTo( navigatorToolBar );
1203 icon = loadPixmap( pathString + "1rightarrowB" ); 1208 icon = loadPixmap( pathString + "1rightarrowB" );
1204 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1209 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1205 if (p-> mShowIconForward) { 1210 if (p-> mShowIconForward) {
1206 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1211 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1207 connect( action, SIGNAL( activated() ), 1212 connect( action, SIGNAL( activated() ),
1208 mView, SLOT( goNext() ) ); 1213 mView, SLOT( goNext() ) );
1209 action->addTo( navigatorToolBar ); 1214 action->addTo( navigatorToolBar );
1210 } 1215 }
1211 icon = loadPixmap( pathString + "2rightarrowB" ); 1216 icon = loadPixmap( pathString + "2rightarrowB" );
1212 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1217 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1213 if (p-> mShowIconForwardFast) { 1218 if (p-> mShowIconForwardFast) {
1214 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1219 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1215 connect( action, SIGNAL( activated() ), 1220 connect( action, SIGNAL( activated() ),
1216 mView, SLOT( goNextMonth() ) ); 1221 mView, SLOT( goNextMonth() ) );
1217 action->addTo( navigatorToolBar ); 1222 action->addTo( navigatorToolBar );
1218 } 1223 }
1219 1224
1220 1225
1221 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); 1226 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6);
1222 1227
1223 1228
1224 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); 1229 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true);
1225 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); 1230 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true);
1226 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); 1231 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true);
1227 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); 1232 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true);
1228 1233
1229 if (p-> mShowIconNewEvent) 1234 if (p-> mShowIconNewEvent)
1230 configureToolBarMenu->setItemChecked( 10, true ); 1235 configureToolBarMenu->setItemChecked( 10, true );
1231 if (p->mShowIconNewTodo ) 1236 if (p->mShowIconNewTodo )
1232 configureToolBarMenu->setItemChecked( 20, true ); 1237 configureToolBarMenu->setItemChecked( 20, true );
1233 if (p-> mShowIconSearch) 1238 if (p-> mShowIconSearch)
1234 configureToolBarMenu->setItemChecked( 120, true ); 1239 configureToolBarMenu->setItemChecked( 120, true );
1235 if (p-> mShowIconList) 1240 if (p-> mShowIconList)
1236 configureToolBarMenu->setItemChecked( 30, true ); 1241 configureToolBarMenu->setItemChecked( 30, true );
1237 if (p-> mShowIconDay1) 1242 if (p-> mShowIconDay1)
1238 configureToolBarMenu->setItemChecked( 40, true ); 1243 configureToolBarMenu->setItemChecked( 40, true );
1239 if (p-> mShowIconDay5) 1244 if (p-> mShowIconDay5)
1240 configureToolBarMenu->setItemChecked( 50, true ); 1245 configureToolBarMenu->setItemChecked( 50, true );
1241 if (p-> mShowIconDay6) 1246 if (p-> mShowIconDay6)
1242 configureToolBarMenu->setItemChecked( 75, true ); 1247 configureToolBarMenu->setItemChecked( 75, true );
1243 if (p-> mShowIconDay7) 1248 if (p-> mShowIconDay7)
1244 configureToolBarMenu->setItemChecked( 60, true ); 1249 configureToolBarMenu->setItemChecked( 60, true );
1245 if (p-> mShowIconMonth) 1250 if (p-> mShowIconMonth)
1246 configureToolBarMenu->setItemChecked( 70, true ); 1251 configureToolBarMenu->setItemChecked( 70, true );
1247 if (p-> mShowIconTodoview) 1252 if (p-> mShowIconTodoview)
1248 configureToolBarMenu->setItemChecked( 80, true ); 1253 configureToolBarMenu->setItemChecked( 80, true );
1249 if (p-> mShowIconBackFast) 1254 if (p-> mShowIconBackFast)
1250 configureToolBarMenu->setItemChecked( 200, true ); 1255 configureToolBarMenu->setItemChecked( 200, true );
1251 if (p-> mShowIconBack) 1256 if (p-> mShowIconBack)
1252 configureToolBarMenu->setItemChecked( 210, true ); 1257 configureToolBarMenu->setItemChecked( 210, true );
1253 if (p-> mShowIconToday) 1258 if (p-> mShowIconToday)
1254 configureToolBarMenu->setItemChecked( 130, true ); 1259 configureToolBarMenu->setItemChecked( 130, true );
1255 if (p-> mShowIconForward) 1260 if (p-> mShowIconForward)
1256 configureToolBarMenu->setItemChecked( 220, true ); 1261 configureToolBarMenu->setItemChecked( 220, true );
1257 if (p-> mShowIconForwardFast) 1262 if (p-> mShowIconForwardFast)
1258 configureToolBarMenu->setItemChecked( 230, true ); 1263 configureToolBarMenu->setItemChecked( 230, true );
1259 if (p-> mShowIconNextDays) 1264 if (p-> mShowIconNextDays)
1260 configureToolBarMenu->setItemChecked( 100, true ); 1265 configureToolBarMenu->setItemChecked( 100, true );
1261 if (p-> mShowIconNext) 1266 if (p-> mShowIconNext)
1262 configureToolBarMenu->setItemChecked( 110, true ); 1267 configureToolBarMenu->setItemChecked( 110, true );
1263 if (p-> mShowIconJournal) 1268 if (p-> mShowIconJournal)
1264 configureToolBarMenu->setItemChecked( 90, true ); 1269 configureToolBarMenu->setItemChecked( 90, true );
1265 if (p-> mShowIconWhatsThis) 1270 if (p-> mShowIconWhatsThis)
1266 configureToolBarMenu->setItemChecked( 300, true ); 1271 configureToolBarMenu->setItemChecked( 300, true );
1267 if (p-> mShowIconWeekNum) 1272 if (p-> mShowIconWeekNum)
1268 configureToolBarMenu->setItemChecked( 400, true ); 1273 configureToolBarMenu->setItemChecked( 400, true );
1269 if (!p-> mShowIconStretch) { 1274 if (!p-> mShowIconStretch) {
1270 QLabel* dummy = new QLabel( iconToolBar ); 1275 QLabel* dummy = new QLabel( iconToolBar );
1271 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1276 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1272 dummy->setMinimumWidth( 0 ); 1277 dummy->setMinimumWidth( 0 );
1273 iconToolBar->setStretchableWidget ( dummy ) ; 1278 iconToolBar->setStretchableWidget ( dummy ) ;
1274 } 1279 }
1275 else { 1280 else {
1276 iconToolBar->setHorizontalStretchable (true ); 1281 iconToolBar->setHorizontalStretchable (true );
1277 viewToolBar->setHorizontalStretchable (true ); 1282 viewToolBar->setHorizontalStretchable (true );
1278 navigatorToolBar->setHorizontalStretchable (true ); 1283 navigatorToolBar->setHorizontalStretchable (true );
1279 iconToolBar->setVerticalStretchable (true ); 1284 iconToolBar->setVerticalStretchable (true );
1280 viewToolBar->setVerticalStretchable (true ); 1285 viewToolBar->setVerticalStretchable (true );
1281 navigatorToolBar->setVerticalStretchable (true ); 1286 navigatorToolBar->setVerticalStretchable (true );
1282 configureToolBarMenu->setItemChecked( 5, true ); 1287 configureToolBarMenu->setItemChecked( 5, true );
1283 } 1288 }
1284 if (p-> mShowIconFilter) 1289 if (p-> mShowIconFilter)
1285 configureToolBarMenu->setItemChecked( 7, true ); 1290 configureToolBarMenu->setItemChecked( 7, true );
1286 if (p-> mShowIconOnetoolbar) 1291 if (p-> mShowIconOnetoolbar)
1287 configureToolBarMenu->setItemChecked( 6, true ); 1292 configureToolBarMenu->setItemChecked( 6, true );
1288 1293
1289 1294
1290 if ( filterMenubar ) { 1295 if ( filterMenubar ) {
1291 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); 1296 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) );
1292 connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); 1297 connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) );
1293 } 1298 }
1294 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1299 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1295 configureAgenda( p->mHourSize ); 1300 configureAgenda( p->mHourSize );
1296 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1301 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1297} 1302}
1298 1303
1299void MainWindow::exportToPhone( int mode ) 1304void MainWindow::exportToPhone( int mode )
1300{ 1305{
1301 1306
1302 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1307 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1303 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1308 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1304 KOex2phonePrefs ex2phone; 1309 KOex2phonePrefs ex2phone;
1305 1310
1306 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1311 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1307 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1312 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1308 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1313 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1309 if ( mode == 1 ) 1314 if ( mode == 1 )
1310 ex2phone.setCaption(i18n("Export complete calendar")); 1315 ex2phone.setCaption(i18n("Export complete calendar"));
1311 if ( mode == 2 ) 1316 if ( mode == 2 )
1312 ex2phone.setCaption(i18n("Export filtered calendar")); 1317 ex2phone.setCaption(i18n("Export filtered calendar"));
1313 1318
1314 if ( !ex2phone.exec() ) { 1319 if ( !ex2phone.exec() ) {
1315 return; 1320 return;
1316 } 1321 }
1317 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1322 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1318 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1323 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1319 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1324 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1320 1325
1321 int inFuture = 0; 1326 int inFuture = 0;
1322 if ( ex2phone.mWriteBackFuture->isChecked() ) 1327 if ( ex2phone.mWriteBackFuture->isChecked() )
@@ -2167,334 +2172,337 @@ void MainWindow::selectFilterPopup( int fil )
2167 2172
2168} 2173}
2169void MainWindow::configureToolBar( int item ) 2174void MainWindow::configureToolBar( int item )
2170{ 2175{
2171 2176
2172 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); 2177 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) );
2173 KOPrefs *p = KOPrefs::instance(); 2178 KOPrefs *p = KOPrefs::instance();
2174 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); 2179 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 );
2175 p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); 2180 p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 );
2176 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); 2181 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 );
2177 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); 2182 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
2178 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); 2183 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
2179 p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); 2184 p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 );
2180 p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); 2185 p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 );
2181 p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); 2186 p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 );
2182 p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); 2187 p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 );
2183 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); 2188 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
2184 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 2189 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
2185 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 2190 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
2186 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); 2191 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
2187 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); 2192 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 );
2188 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); 2193 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
2189 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); 2194 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
2190 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); 2195 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
2191 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); 2196 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
2192 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); 2197 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
2193 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); 2198 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
2194 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); 2199 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
2195 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 2200 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
2196 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 2201 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
2197 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 2202 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
2198 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 2203 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
2199 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 2204 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
2200 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); 2205 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 );
2201 // initActions(); 2206 // initActions();
2202} 2207}
2203void MainWindow::setCaption ( const QString & c ) 2208void MainWindow::setCaption ( const QString & c )
2204{ 2209{
2205 QString cap = c; 2210 QString cap = c;
2206 cap.replace( QRegExp("\n"), " " ); 2211 cap.replace( QRegExp("\n"), " " );
2207 cap = cap.stripWhiteSpace(); 2212 cap = cap.stripWhiteSpace();
2208 if ( cap.isEmpty() ) 2213 if ( cap.isEmpty() )
2209 cap = "KO/Pi"; 2214 cap = "KO/Pi";
2210 QWidget::setCaption( cap ); 2215 QWidget::setCaption( cap );
2211} 2216}
2212void MainWindow::setCaptionToDates() 2217void MainWindow::setCaptionToDates()
2213{ 2218{
2214 QString selDates; 2219 QString selDates;
2215 QDate date = mView->startDate(); 2220 QDate date = mView->startDate();
2216 if ( ! date.isValid() ) { 2221 if ( ! date.isValid() ) {
2217 setCaption(""); 2222 setCaption("");
2218 return; 2223 return;
2219 } 2224 }
2220 selDates = KGlobal::locale()->formatDate( date, true); 2225 selDates = KGlobal::locale()->formatDate( date, true);
2221 if (mView->startDate() < mView->endDate() ) 2226 if (mView->startDate() < mView->endDate() )
2222 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); 2227 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
2223 else { 2228 else {
2224 QString addString; 2229 QString addString;
2225 if ( date == QDateTime::currentDateTime().date() ) 2230 if ( date == QDateTime::currentDateTime().date() )
2226 addString = i18n("Today"); 2231 addString = i18n("Today");
2227 else if ( date == QDateTime::currentDateTime().date().addDays(1) ) 2232 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
2228 addString = i18n("Tomorrow"); 2233 addString = i18n("Tomorrow");
2229 if ( !addString.isEmpty() ) 2234 if ( !addString.isEmpty() )
2230 selDates = addString+", "+selDates ; 2235 selDates = addString+", "+selDates ;
2231 } 2236 }
2232 setCaption( i18n("Dates: ") + selDates ); 2237 setCaption( i18n("Dates: ") + selDates );
2233 2238
2234} 2239}
2235void MainWindow::showConfigureAgenda( ) 2240void MainWindow::showConfigureAgenda( )
2236{ 2241{
2237 int iii; 2242 int iii;
2238 for ( iii = 1;iii<= 10 ;++iii ){ 2243 for ( iii = 1;iii<= 10 ;++iii ){
2239 configureAgendaMenu->setItemChecked( (iii+1)*2, false ); 2244 configureAgendaMenu->setItemChecked( (iii+1)*2, false );
2240 } 2245 }
2241 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); 2246 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true );
2242} 2247}
2243void MainWindow::configureAgenda( int item ) 2248void MainWindow::configureAgenda( int item )
2244{ 2249{
2245 if ( KOPrefs::instance()->mHourSize == item ) 2250 if ( KOPrefs::instance()->mHourSize == item )
2246 return; 2251 return;
2247 KOPrefs::instance()->mHourSize=item; 2252 KOPrefs::instance()->mHourSize=item;
2248 mView->viewManager()->agendaView()->updateConfig(); 2253 mView->viewManager()->agendaView()->updateConfig();
2249} 2254}
2250 2255
2251void MainWindow::saveCalendar() 2256void MainWindow::saveCalendar()
2252{ 2257{
2253 QString fn = KOPrefs::instance()->mLastSaveFile; 2258 QString fn = KOPrefs::instance()->mLastSaveFile;
2254 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); 2259 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this );
2255 2260
2256 if ( fn == "" ) 2261 if ( fn == "" )
2257 return; 2262 return;
2258 QFileInfo info; 2263 QFileInfo info;
2259 info.setFile( fn ); 2264 info.setFile( fn );
2260 QString mes; 2265 QString mes;
2261 bool createbup = true; 2266 bool createbup = true;
2262 if ( info. exists() ) { 2267 if ( info. exists() ) {
2263 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; 2268 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ;
2264 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 2269 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
2265 i18n("Overwrite!"), i18n("Cancel"), 0, 2270 i18n("Overwrite!"), i18n("Cancel"), 0,
2266 0, 1 ); 2271 0, 1 );
2267 if ( result != 0 ) { 2272 if ( result != 0 ) {
2268 createbup = false; 2273 createbup = false;
2269 } 2274 }
2270 } 2275 }
2271 if ( createbup ) { 2276 if ( createbup ) {
2272 mView->saveCalendar( fn ); 2277 mView->saveCalendar( fn );
2273 mes = i18n("KO/Pi:Saved %1").arg(fn); 2278 mes = i18n("KO/Pi:Saved %1").arg(fn);
2274 KOPrefs::instance()->mLastSaveFile = fn; 2279 KOPrefs::instance()->mLastSaveFile = fn;
2275 setCaption(mes); 2280 setCaption(mes);
2276 } 2281 }
2277} 2282}
2278void MainWindow::loadCalendar() 2283void MainWindow::loadCalendar()
2279{ 2284{
2280 2285
2281 QString fn = KOPrefs::instance()->mLastLoadFile; 2286 QString fn = KOPrefs::instance()->mLastLoadFile;
2282 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); 2287 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
2283 2288
2284 if ( fn == "" ) 2289 if ( fn == "" )
2285 return; 2290 return;
2286 QFileInfo info; 2291 QFileInfo info;
2287 info.setFile( fn ); 2292 info.setFile( fn );
2288 QString mess; 2293 QString mess;
2289 bool loadbup = true; 2294 bool loadbup = true;
2290 if ( info. exists() ) { 2295 if ( info. exists() ) {
2291 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 2296 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
2292 int result = QMessageBox::warning( this, "KO/Pi: Warning!", 2297 int result = QMessageBox::warning( this, "KO/Pi: Warning!",
2293 mess, 2298 mess,
2294 i18n("Load!"), i18n("Cancel"), 0, 2299 i18n("Load!"), i18n("Cancel"), 0,
2295 0, 1 ); 2300 0, 1 );
2296 if ( result != 0 ) { 2301 if ( result != 0 ) {
2297 loadbup = false; 2302 loadbup = false;
2298 } 2303 }
2299 } else { 2304 } else {
2300 QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2305 QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2301 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, 2306 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0,
2302 0, 1 ); 2307 0, 1 );
2303 2308
2304 return; 2309 return;
2305 } 2310 }
2306 if ( loadbup ) { 2311 if ( loadbup ) {
2307 mView->openCalendar( fn ); 2312 mView->openCalendar( fn );
2308 KOPrefs::instance()->mLastLoadFile = fn; 2313 KOPrefs::instance()->mLastLoadFile = fn;
2309 mess = i18n("KO/Pi:Loaded %1").arg(fn) ; 2314 mess = i18n("KO/Pi:Loaded %1").arg(fn) ;
2310 setCaption(mess); 2315 setCaption(mess);
2311 } 2316 }
2312 2317
2313} 2318}
2314void MainWindow::quickImportIcal() 2319void MainWindow::quickImportIcal()
2315{ 2320{
2316 importFile( KOPrefs::instance()->mLastImportFile, false ); 2321 importFile( KOPrefs::instance()->mLastImportFile, false );
2317} 2322}
2318void MainWindow::importFile( QString fn, bool quick ) 2323void MainWindow::importFile( QString fn, bool quick )
2319{ 2324{
2320 QFileInfo info; 2325 QFileInfo info;
2321 info.setFile( fn ); 2326 info.setFile( fn );
2322 QString mess; 2327 QString mess;
2323 bool loadbup = true; 2328 bool loadbup = true;
2324 if ( !info. exists() ) { 2329 if ( !info. exists() ) {
2325 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); 2330 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30));
2326 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2331 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2327 mess ); 2332 mess );
2328 return; 2333 return;
2329 } 2334 }
2330 int result = 0; 2335 int result = 0;
2331 if ( !quick ) { 2336 if ( !quick ) {
2332 mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 2337 mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
2333 result = QMessageBox::warning( this, "KO/Pi: Warning!", 2338 result = QMessageBox::warning( this, "KO/Pi: Warning!",
2334 mess, 2339 mess,
2335 "Import", "Cancel", 0, 2340 "Import", "Cancel", 0,
2336 0, 1 ); 2341 0, 1 );
2337 } 2342 }
2338 if ( result == 0 ) { 2343 if ( result == 0 ) {
2339 if ( mView->openCalendar( fn, true )) { 2344 if ( mView->openCalendar( fn, true )) {
2340 KOPrefs::instance()->mLastImportFile = fn; 2345 KOPrefs::instance()->mLastImportFile = fn;
2341 setCaption(i18n("Imported file successfully")); 2346 setCaption(i18n("Imported file successfully"));
2342 } else { 2347 } else {
2343 setCaption(i18n("Error importing file")); 2348 setCaption(i18n("Error importing file"));
2344 } 2349 }
2345 } 2350 }
2346} 2351}
2347 2352
2348void MainWindow::importIcal() 2353void MainWindow::importIcal()
2349{ 2354{
2350 2355
2351 QString fn =KOPrefs::instance()->mLastImportFile; 2356 QString fn =KOPrefs::instance()->mLastImportFile;
2352 2357
2353 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); 2358 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this );
2354 if ( fn == "" ) 2359 if ( fn == "" )
2355 return; 2360 return;
2356 importFile( fn, true ); 2361 importFile( fn, true );
2357 2362
2358} 2363}
2359 2364
2360void MainWindow::exportVCalendar() 2365void MainWindow::exportVCalendar()
2361{ 2366{
2362 QString fn = KOPrefs::instance()->mLastVcalFile; 2367 QString fn = KOPrefs::instance()->mLastVcalFile;
2363 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); 2368 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this );
2364 if ( fn == "" ) 2369 if ( fn == "" )
2365 return; 2370 return;
2366 QFileInfo info; 2371 QFileInfo info;
2367 info.setFile( fn ); 2372 info.setFile( fn );
2368 QString mes; 2373 QString mes;
2369 bool createbup = true; 2374 bool createbup = true;
2370 if ( info. exists() ) { 2375 if ( info. exists() ) {
2371 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); 2376 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
2372 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 2377 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
2373 i18n("Overwrite!"), i18n("Cancel"), 0, 2378 i18n("Overwrite!"), i18n("Cancel"), 0,
2374 0, 1 ); 2379 0, 1 );
2375 if ( result != 0 ) { 2380 if ( result != 0 ) {
2376 createbup = false; 2381 createbup = false;
2377 } 2382 }
2378 } 2383 }
2379 if ( createbup ) { 2384 if ( createbup ) {
2380 if ( mView->exportVCalendar( fn ) ) { 2385 if ( mView->exportVCalendar( fn ) ) {
2381 KOPrefs::instance()->mLastVcalFile = fn; 2386 KOPrefs::instance()->mLastVcalFile = fn;
2382 if ( fn.length() > 20 ) 2387 if ( fn.length() > 20 )
2383 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; 2388 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ;
2384 else 2389 else
2385 mes = i18n("KO/Pi:Exported to %1").arg(fn ); 2390 mes = i18n("KO/Pi:Exported to %1").arg(fn );
2386 setCaption(mes); 2391 setCaption(mes);
2387 } 2392 }
2388 } 2393 }
2389 2394
2390} 2395}
2391QString MainWindow::sentSyncFile() 2396QString MainWindow::sentSyncFile()
2392{ 2397{
2393#ifdef DESKTOP_VERSION 2398#ifdef DESKTOP_VERSION
2394 return locateLocal( "tmp", "copysynccal.ics" ); 2399 return locateLocal( "tmp", "copysynccal.ics" );
2395#else 2400#else
2396 return QString( "/tmp/copysynccal.ics" ); 2401 return QString( "/tmp/copysynccal.ics" );
2397#endif 2402#endif
2398} 2403}
2399 2404
2400void MainWindow::syncFileRequest() 2405void MainWindow::syncFileRequest()
2401{ 2406{
2402 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2407 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2403 mSyncManager->slotSyncMenu( 999 ); 2408 mSyncManager->slotSyncMenu( 999 );
2404 } 2409 }
2405 2410
2406 setCaption(i18n("Saving Data to temp file ..." )); 2411 setCaption(i18n("Saving Data to temp file ..." ));
2407 mView->saveCalendar( sentSyncFile() ); 2412 mView->saveCalendar( sentSyncFile() );
2408 setCaption(i18n("Data saved to temp file!" )); 2413 setCaption(i18n("Data saved to temp file!" ));
2409 2414
2410} 2415}
2411void MainWindow::getFile( bool success ) 2416void MainWindow::getFile( bool success )
2412{ 2417{
2413 if ( ! success ) { 2418 if ( ! success ) {
2414 setCaption( i18n("Error receiving file. Nothing changed!") ); 2419 setCaption( i18n("Error receiving file. Nothing changed!") );
2415 return; 2420 return;
2416 } 2421 }
2417 mView->openCalendar( sentSyncFile() ); 2422 mView->openCalendar( sentSyncFile() );
2418 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2423 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2419 mSyncManager->slotSyncMenu( 999 ); 2424 mSyncManager->slotSyncMenu( 999 );
2420 } 2425 }
2421 setCaption( i18n("Pi-Sync successful!") ); 2426 setCaption( i18n("Pi-Sync successful!") );
2422} 2427}
2423 2428void MainWindow::printListView()
2429{
2430 qDebug("MainWindow::printListView() ");
2431}
2424void MainWindow::printSel( ) 2432void MainWindow::printSel( )
2425{ 2433{
2426 mView->viewManager()->agendaView()->agenda()->printSelection(); 2434 mView->viewManager()->agendaView()->agenda()->printSelection();
2427} 2435}
2428 2436
2429void MainWindow::printCal() 2437void MainWindow::printCal()
2430{ 2438{
2431 mView->print();//mCp->showDialog(); 2439 mView->print();//mCp->showDialog();
2432} 2440}
2433 2441
2434 2442
2435#include "libkdepim/kdatepicker.h" 2443#include "libkdepim/kdatepicker.h"
2436#include <kdatetbl.h> 2444#include <kdatetbl.h>
2437 2445
2438void MainWindow::weekAction() 2446void MainWindow::weekAction()
2439{ 2447{
2440 int month; 2448 int month;
2441 KPopupFrame* popup = new KPopupFrame(this); 2449 KPopupFrame* popup = new KPopupFrame(this);
2442 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); 2450 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup);
2443 // ----- 2451 // -----
2444 picker->resize(picker->sizeHint()); 2452 picker->resize(picker->sizeHint());
2445 popup->setMainWidget(picker); 2453 popup->setMainWidget(picker);
2446 picker->setFocus(); 2454 picker->setFocus();
2447 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2455 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2448 int x = 0; 2456 int x = 0;
2449 int y = iconToolBar->height(); 2457 int y = iconToolBar->height();
2450 int dX = 0; 2458 int dX = 0;
2451 int dY = 0; 2459 int dY = 0;
2452 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2460 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2453 if ( iconToolBar->y() > height()/2 ) { 2461 if ( iconToolBar->y() > height()/2 ) {
2454 dY = picker->sizeHint().height()+8; 2462 dY = picker->sizeHint().height()+8;
2455 y = 0; 2463 y = 0;
2456 } 2464 }
2457 } else { 2465 } else {
2458 if ( iconToolBar->x() > width()/2 ) { // right side 2466 if ( iconToolBar->x() > width()/2 ) { // right side
2459 x=0; 2467 x=0;
2460 dX= picker->sizeHint().width()+8; 2468 dX= picker->sizeHint().width()+8;
2461 y = 0; 2469 y = 0;
2462 } else { 2470 } else {
2463 x= iconToolBar->width(); 2471 x= iconToolBar->width();
2464 y = 0; 2472 y = 0;
2465 } 2473 }
2466 } 2474 }
2467 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2475 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2468 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) 2476 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2469 { 2477 {
2470 month = picker->getResult(); 2478 month = picker->getResult();
2471 emit selectWeek ( month ); 2479 emit selectWeek ( month );
2472 //qDebug("weekSelected %d ", month); 2480 //qDebug("weekSelected %d ", month);
2473 } 2481 }
2474 delete popup; 2482 delete popup;
2475} 2483}
2476 2484
2477void MainWindow::hideEvent ( QHideEvent * ) 2485void MainWindow::hideEvent ( QHideEvent * )
2478{ 2486{
2479 QString message; 2487 QString message;
2480 QDateTime nextA = mCalendar->nextAlarmEventDateTime(); 2488 QDateTime nextA = mCalendar->nextAlarmEventDateTime();
2481 if ( nextA.isValid() ) { 2489 if ( nextA.isValid() ) {
2482 QString sum = mCalendar->nextSummary(); 2490 QString sum = mCalendar->nextSummary();
2483 2491
2484 message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false)); 2492 message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false));
2485 setCaption( message ); 2493 setCaption( message );
2486 } 2494 }
2487} 2495}
2488 2496
2489void MainWindow::resizeEvent( QResizeEvent* e) 2497void MainWindow::resizeEvent( QResizeEvent* e)
2490{ 2498{
2491#ifndef DESKTOP_VERSION 2499#ifndef DESKTOP_VERSION
2492 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) { 2500 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) {
2493 if (QApplication::desktop()->width() > QApplication::desktop()->height() ) 2501 if (QApplication::desktop()->width() > QApplication::desktop()->height() )
2494 filterToolBar->hide(); 2502 filterToolBar->hide();
2495 else 2503 else
2496 filterToolBar->show(); 2504 filterToolBar->show();
2497 } 2505 }
2498#endif 2506#endif
2499 QMainWindow::resizeEvent( e); 2507 QMainWindow::resizeEvent( e);
2500} 2508}
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 6895e36..1105783 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -1,167 +1,168 @@
1#ifndef KORGE_MAINWINDOW_H 1#ifndef KORGE_MAINWINDOW_H
2#define KORGE_MAINWINDOW_H 2#define KORGE_MAINWINDOW_H
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5#include <qtimer.h> 5#include <qtimer.h>
6#include <qdict.h> 6#include <qdict.h>
7#include <qfile.h> 7#include <qfile.h>
8#include <qmenubar.h> 8#include <qmenubar.h>
9#include <qtextstream.h> 9#include <qtextstream.h>
10#include <qregexp.h> 10#include <qregexp.h>
11 11
12#include <libkcal/incidence.h> 12#include <libkcal/incidence.h>
13#include <ksyncmanager.h> 13#include <ksyncmanager.h>
14#ifndef DESKTOP_VERSION 14#ifndef DESKTOP_VERSION
15#include <qcopchannel_qws.h> 15#include <qcopchannel_qws.h>
16#endif 16#endif
17class QAction; 17class QAction;
18class CalendarView; 18class CalendarView;
19class KSyncProfile; 19class KSyncProfile;
20#ifdef DESKTOP_VERSION 20#ifdef DESKTOP_VERSION
21 21
22#define QPEToolBar QToolBar 22#define QPEToolBar QToolBar
23#define QPEMenuBar QMenuBar 23#define QPEMenuBar QMenuBar
24#endif 24#endif
25class QPEToolBar; 25class QPEToolBar;
26class QPEMenuBar; 26class QPEMenuBar;
27 27
28 28
29namespace KCal { 29namespace KCal {
30class CalendarLocal; 30class CalendarLocal;
31} 31}
32 32
33using namespace KCal; 33using namespace KCal;
34 34
35class MainWindow : public QMainWindow 35class MainWindow : public QMainWindow
36{ 36{
37 Q_OBJECT 37 Q_OBJECT
38 public: 38 public:
39 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); 39 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
40 ~MainWindow(); 40 ~MainWindow();
41 bool beamReceiveEnabled(); 41 bool beamReceiveEnabled();
42 static QString defaultFileName(); 42 static QString defaultFileName();
43 static QString syncFileName(); 43 static QString syncFileName();
44 static QString resourcePath(); 44 static QString resourcePath();
45 public slots: 45 public slots:
46 void setUsesBigPixmaps ( bool ); 46 void setUsesBigPixmaps ( bool );
47 void setCaption ( const QString & ); 47 void setCaption ( const QString & );
48 void updateWeekNum(const KCal::DateList &); 48 void updateWeekNum(const KCal::DateList &);
49 void updateWeek(QDate); 49 void updateWeek(QDate);
50 void updateFilterToolbar(); 50 void updateFilterToolbar();
51 virtual void showMaximized (); 51 virtual void showMaximized ();
52 void configureAgenda( int ); 52 void configureAgenda( int );
53 void recieve( const QCString& msg, const QByteArray& data ); 53 void recieve( const QCString& msg, const QByteArray& data );
54 protected slots: 54 protected slots:
55 void setCaptionToDates(); 55 void setCaptionToDates();
56 void weekAction(); 56 void weekAction();
57 void about(); 57 void about();
58 void licence(); 58 void licence();
59 void faq(); 59 void faq();
60 void usertrans(); 60 void usertrans();
61 void features(); 61 void features();
62 void synchowto(); 62 void synchowto();
63 void storagehowto(); 63 void storagehowto();
64 void timetrackinghowto(); 64 void timetrackinghowto();
65 void kdesynchowto(); 65 void kdesynchowto();
66 void multisynchowto(); 66 void multisynchowto();
67 void whatsNew(); 67 void whatsNew();
68 void keyBindings(); 68 void keyBindings();
69 void aboutAutoSaving();; 69 void aboutAutoSaving();;
70 void aboutKnownBugs(); 70 void aboutKnownBugs();
71 71
72 void processIncidenceSelection( Incidence * ); 72 void processIncidenceSelection( Incidence * );
73 73
74 void importQtopia(); 74 void importQtopia();
75 void importBday(); 75 void importBday();
76 void importOL(); 76 void importOL();
77 void importIcal(); 77 void importIcal();
78 void importFile( QString, bool ); 78 void importFile( QString, bool );
79 void quickImportIcal(); 79 void quickImportIcal();
80 80
81 void slotModifiedChanged( bool ); 81 void slotModifiedChanged( bool );
82 82
83 void save(); 83 void save();
84 void saveStopTimer(); 84 void saveStopTimer();
85 void configureToolBar( int ); 85 void configureToolBar( int );
86 void printSel(); 86 void printSel();
87 void printCal(); 87 void printCal();
88 void printListView();
88 void saveCalendar(); 89 void saveCalendar();
89 void loadCalendar(); 90 void loadCalendar();
90 void exportVCalendar(); 91 void exportVCalendar();
91 void fillFilterMenu(); 92 void fillFilterMenu();
92 void fillFilterMenuTB(); 93 void fillFilterMenuTB();
93 void selectFilter( int ); 94 void selectFilter( int );
94 void fillFilterMenuPopup(); 95 void fillFilterMenuPopup();
95 void selectFilterPopup( int ); 96 void selectFilterPopup( int );
96 void exportToPhone( int ); 97 void exportToPhone( int );
97 void toggleBeamReceive(); 98 void toggleBeamReceive();
98 void disableBR(bool); 99 void disableBR(bool);
99 signals: 100 signals:
100 void selectWeek ( int ); 101 void selectWeek ( int );
101 private slots: 102 private slots:
102 void showConfigureAgenda(); 103 void showConfigureAgenda();
103 void getFile( bool ); 104 void getFile( bool );
104 void syncFileRequest(); 105 void syncFileRequest();
105 106
106 protected: 107 protected:
107 void hideEvent ( QHideEvent * ); 108 void hideEvent ( QHideEvent * );
108 QString sentSyncFile(); 109 QString sentSyncFile();
109 void displayText( QString, QString); 110 void displayText( QString, QString);
110 void enableIncidenceActions( bool ); 111 void enableIncidenceActions( bool );
111 112
112 private: 113 private:
113 bool mBRdisabled; 114 bool mBRdisabled;
114#ifndef DESKTOP_VERSION 115#ifndef DESKTOP_VERSION
115 QCopChannel* infrared; 116 QCopChannel* infrared;
116#endif 117#endif
117 QAction* brAction; 118 QAction* brAction;
118 KSyncManager* mSyncManager; 119 KSyncManager* mSyncManager;
119 bool mClosed; 120 bool mClosed;
120 void saveOnClose(); 121 void saveOnClose();
121 bool mFlagKeyPressed; 122 bool mFlagKeyPressed;
122 bool mBlockAtStartup; 123 bool mBlockAtStartup;
123 QPEToolBar *iconToolBar; 124 QPEToolBar *iconToolBar;
124 QPEToolBar *viewToolBar; 125 QPEToolBar *viewToolBar;
125 QPEToolBar *navigatorToolBar; 126 QPEToolBar *navigatorToolBar;
126 QPEToolBar *filterToolBar; 127 QPEToolBar *filterToolBar;
127 QMenuBar *filterMenubar; 128 QMenuBar *filterMenubar;
128 QPopupMenu * filterPopupMenu; 129 QPopupMenu * filterPopupMenu;
129 void initActions(); 130 void initActions();
130 void setDefaultPreferences(); 131 void setDefaultPreferences();
131 void resizeEvent( QResizeEvent* e); 132 void resizeEvent( QResizeEvent* e);
132 void keyPressEvent ( QKeyEvent * ) ; 133 void keyPressEvent ( QKeyEvent * ) ;
133 void keyReleaseEvent ( QKeyEvent * ) ; 134 void keyReleaseEvent ( QKeyEvent * ) ;
134 QPopupMenu *configureToolBarMenu; 135 QPopupMenu *configureToolBarMenu;
135 QPopupMenu *selectFilterMenu; 136 QPopupMenu *selectFilterMenu;
136 QPopupMenu *selectFilterMenuTB; 137 QPopupMenu *selectFilterMenuTB;
137 QPopupMenu *configureAgendaMenu, *syncMenu; 138 QPopupMenu *configureAgendaMenu, *syncMenu;
138 CalendarLocal *mCalendar; 139 CalendarLocal *mCalendar;
139 CalendarView *mView; 140 CalendarView *mView;
140 QAction *mNewSubTodoAction; 141 QAction *mNewSubTodoAction;
141 QAction *mWeekAction; 142 QAction *mWeekAction;
142 QFont mWeekFont; 143 QFont mWeekFont;
143 QPixmap mWeekPixmap; 144 QPixmap mWeekPixmap;
144 QColor mWeekBgColor; 145 QColor mWeekBgColor;
145 146
146 QAction *mShowAction; 147 QAction *mShowAction;
147 QAction *mEditAction; 148 QAction *mEditAction;
148 QAction *mDeleteAction; 149 QAction *mDeleteAction;
149 QAction *mCloneAction; 150 QAction *mCloneAction;
150 QAction *mMoveAction; 151 QAction *mMoveAction;
151 QAction *mBeamAction; 152 QAction *mBeamAction;
152 QAction *mCancelAction; 153 QAction *mCancelAction;
153 154
154 QAction *mToggleNav; 155 QAction *mToggleNav;
155 QAction *mToggleFilter; 156 QAction *mToggleFilter;
156 QAction *mToggleAllday; 157 QAction *mToggleAllday;
157 QAction *actionFilterMenuTB; 158 QAction *actionFilterMenuTB;
158 159
159 void closeEvent( QCloseEvent* ce ); 160 void closeEvent( QCloseEvent* ce );
160 QTimer mSaveTimer; 161 QTimer mSaveTimer;
161 //bool mBlockSaveFlag; 162 //bool mBlockSaveFlag;
162 bool mCalendarModifiedFlag; 163 bool mCalendarModifiedFlag;
163 QPixmap loadPixmap( QString ); 164 QPixmap loadPixmap( QString );
164}; 165};
165 166
166 167
167#endif 168#endif