summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-02 11:55:36 (UTC)
committer zautrix <zautrix>2005-02-02 11:55:36 (UTC)
commite770226d68f5fdb8484003bbb9898848cec901a8 (patch) (unidiff)
treeecf8f795d6f8673405c22010c82fb167a41a7aa3
parent2a184b0d9095c6175e7bdf2f5d5561470b8d6307 (diff)
downloadkdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.zip
kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.tar.gz
kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.tar.bz2
jepp
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt7
-rw-r--r--bin/kdepim/korganizer/featuresKOPI.txt29
-rw-r--r--korganizer/komonthview.cpp33
-rw-r--r--korganizer/komonthview.h6
-rw-r--r--korganizer/koviewmanager.cpp4
5 files changed, 46 insertions, 33 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 4f8fcc7..ac70a55 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,109 +1,110 @@
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.0.2 ************ 3********** VERSION 2.0.2 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed the layout problem of the day label buttons 6Fixed the layout problem of the day label buttons
7of the agenda view introduced in version 2.0.1. 7of the agenda view introduced in version 2.0.1.
8 8
9Added WhatsThis support for the todo view and the list view. 9Added WhatsThis support for the todo view and the list view.
10 10
11Added a quite useful and quite hidden feature (to KO/Pi). 11Added a quite useful feature to the montview.
12Who does find it first? 12Just click on the week numbers on the left.
13Hint: You have to click somewhere in the views ... 13And on top of the week numbers there is now a "week view quick selector".
14(Click on the black triangle).
14 15
15 16
16********** VERSION 2.0.1 ************ 17********** VERSION 2.0.1 ************
17 18
18Oooops ... I forgot to test on the Zaurus 5500 ... 19Oooops ... I forgot to test on the Zaurus 5500 ...
19 20
20Fixed many problems of new (english) strings (and german translations) 21Fixed many problems of new (english) strings (and german translations)
21introduced in the latest versions, where the text was not fitting on the 22introduced in the latest versions, where the text was not fitting on the
22240x320 display of the Zaurus 5500. 23240x320 display of the Zaurus 5500.
23 24
24KO/Pi: 25KO/Pi:
25Added a popup menu ( press pen and hold to get popup ) to the agenda view 26Added a popup menu ( press pen and hold to get popup ) to the agenda view
26with many useful items (add event/todo, show next week, two weeks, month, journal). 27with many useful items (add event/todo, show next week, two weeks, month, journal).
27 28
28Added items to the todolist popup menu for: 29Added items to the todolist popup menu for:
29Display all opened, all closed or all todos flat. 30Display all opened, all closed or all todos flat.
30The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 31The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
31Made the reparenting of todos on the desktop possible via Drag&Drop. 32Made the reparenting of todos on the desktop possible via Drag&Drop.
32Fixed several bugs in setting the completed datetime for todos. 33Fixed several bugs in setting the completed datetime for todos.
33Added info about completed datetime of todos to the todo viewer. 34Added info about completed datetime of todos to the todo viewer.
34Now displaying a completed todo (with completed datetime set) in the agenda view 35Now displaying a completed todo (with completed datetime set) in the agenda view
35at the time of the completion. Such that now it is possible to see in the agenda view 36at the time of the completion. Such that now it is possible to see in the agenda view
36when what todo was completed. 37when what todo was completed.
37Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 38Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
38Now the behaviour is: 39Now the behaviour is:
39Setting a parent to complete sets all (sub)childs to complete. 40Setting a parent to complete sets all (sub)childs to complete.
40Setting a parent to uncomplete does not change the childs. 41Setting a parent to uncomplete does not change the childs.
41Setting a child to uncomplete sets all parent to uncomplete. 42Setting a child to uncomplete sets all parent to uncomplete.
42Setting a child to complete does not change the parents. 43Setting a child to complete does not change the parents.
43 44
44Smart updating and double buffering of the daymatrix. 45Smart updating and double buffering of the daymatrix.
45Showing holidays in the day matrix. 46Showing holidays in the day matrix.
46Many other small performance updates. 47Many other small performance updates.
47 48
48Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 49Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
49 50
50Now the translation file usertranslation.txt is supposed to be in utf8 format. 51Now the translation file usertranslation.txt is supposed to be in utf8 format.
51If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu. 52If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
52 53
53 54
54********** VERSION 2.0.0 ************ 55********** VERSION 2.0.0 ************
55 56
56Stable release 2.0.0! 57Stable release 2.0.0!
57 58
58KO/Pi: 59KO/Pi:
59Fixed problem in edit dialog recreation at startup. 60Fixed problem in edit dialog recreation at startup.
60Made "toggle view*" menu items enabled context sensitive. 61Made "toggle view*" menu items enabled context sensitive.
61Changed agenda size menu to items 1-10. 62Changed agenda size menu to items 1-10.
62Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 63Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
63Usebility enhancements in the KO/Pi menus. 64Usebility enhancements in the KO/Pi menus.
64Birthday import now adds year to summary. 65Birthday import now adds year to summary.
65What's Next view shows age in years for birthday. 66What's Next view shows age in years for birthday.
66 67
67OM/Pi: 68OM/Pi:
68Added three info lines to display subject, from and to of selected mails. 69Added three info lines to display subject, from and to of selected mails.
69 70
70KA/Pi: 71KA/Pi:
71Fixed jump bar behaviour on Zaurus. 72Fixed jump bar behaviour on Zaurus.
72Now KA/Pi search field supports searching for a range of starting characters. 73Now KA/Pi search field supports searching for a range of starting characters.
73E.g. to search for all contact beginning with b to n, type 74E.g. to search for all contact beginning with b to n, type
74b-n 75b-n
75in the search field. 76in the search field.
76 77
77********** VERSION 1.9.20 ************ 78********** VERSION 1.9.20 ************
78 79
79KO/Pi: 80KO/Pi:
80Added for the "dislplay one day" agenda mode 81Added for the "dislplay one day" agenda mode
81info in the caption and in the day lables: 82info in the caption and in the day lables:
82Now it is displayed, if the selected day is from "day before yesterday" 83Now it is displayed, if the selected day is from "day before yesterday"
83to "day after tomorrow". 84to "day after tomorrow".
84Made it possible to delete a Todo, which has sub-todos. 85Made it possible to delete a Todo, which has sub-todos.
85Fixed two small problems in the todo view. 86Fixed two small problems in the todo view.
86Added missing German translation for filter edit and print dialog. 87Added missing German translation for filter edit and print dialog.
87Made search dialog closeable by cancel key. 88Made search dialog closeable by cancel key.
88 89
89Made it possible to select in the date picker the (ligt grey ) 90Made it possible to select in the date picker the (ligt grey )
90dates of the prev./next month with the mouse. 91dates of the prev./next month with the mouse.
91 92
92OM/Pi: 93OM/Pi:
93"Delete mail" icon in main window now deletes all selected mails. 94"Delete mail" icon in main window now deletes all selected mails.
94Fixed the problem, that the state flag of imap mails was ignored. 95Fixed the problem, that the state flag of imap mails was ignored.
95Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 96Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
96to indecate that they are already seen. 97to indecate that they are already seen.
97Fixed the problem that the body of some mails was not displayed in the 98Fixed the problem that the body of some mails was not displayed in the
98mail viewer when fetching them from the imap server directly to read them. 99mail viewer when fetching them from the imap server directly to read them.
99Made it (configurable) possible to show the "To:" field in the list view. 100Made it (configurable) possible to show the "To:" field in the list view.
100Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 101Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
101Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 102Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
102local storage folder (specified in account settings) of the account of the mail. 103local storage folder (specified in account settings) of the account of the mail.
103Removed some memory leaks in OM/Pi. 104Removed some memory leaks in OM/Pi.
104 105
105 106
106********** VERSION 1.9.19 ************ 107********** VERSION 1.9.19 ************
107 108
108Added a lot of missing translations to KA/Pi, 109Added a lot of missing translations to KA/Pi,
109Added some missing translations to KO/Pi and OM/Pi. 110Added some missing translations to KO/Pi and OM/Pi.
diff --git a/bin/kdepim/korganizer/featuresKOPI.txt b/bin/kdepim/korganizer/featuresKOPI.txt
index 052680e..c056dca 100644
--- a/bin/kdepim/korganizer/featuresKOPI.txt
+++ b/bin/kdepim/korganizer/featuresKOPI.txt
@@ -47,198 +47,193 @@ KO/Pi can import/export ics and vcs files.
47KO/Pi can save/load ics backup files. 47KO/Pi can save/load ics backup files.
48KO/Pi can send ics and vcs files via infrared, with and without timezone settings.( Zaurus only ) 48KO/Pi can send ics and vcs files via infrared, with and without timezone settings.( Zaurus only )
49KO/Pi can receive files via infrared directly, after beam receive is enabled.( Zaurus only ) 49KO/Pi can receive files via infrared directly, after beam receive is enabled.( Zaurus only )
50 Via the search function you can send any number/selection of events/tasks/journal via infrared. 50 Via the search function you can send any number/selection of events/tasks/journal via infrared.
51Via the search function you can export and save any number/selection of events/tasks/journal to an ics file. 51Via the search function you can export and save any number/selection of events/tasks/journal to an ics file.
52Via the search function you can export and save any number/selection of journals and descriptions of events/todos to a plain text file. 52Via the search function you can export and save any number/selection of journals and descriptions of events/todos to a plain text file.
53KO/Pi can import xml calendar/todo data from Opie/old Qtopia environment. 53KO/Pi can import xml calendar/todo data from Opie/old Qtopia environment.
54KO/Pi can sync calendar/todo data with new Sharp Rom DTM model PIM applications, found on Zaurus 7x0/860 and Sharp Rom 3.1 (and above) for 5x00 series. 54KO/Pi can sync calendar/todo data with new Sharp Rom DTM model PIM applications, found on Zaurus 7x0/860 and Sharp Rom 3.1 (and above) for 5x00 series.
55(Hint: Rename /home/QtPalmtop/bin/datebook to e.g. /home/QtPalmtop/bin/datebookwech 55(Hint: Rename /home/QtPalmtop/bin/datebook to e.g. /home/QtPalmtop/bin/datebookwech
56to prevent alarm notification by the Sharp calendar app) 56to prevent alarm notification by the Sharp calendar app)
57KO/Pi can sync calendar/todo/journal data with any local ics file. 57KO/Pi can sync calendar/todo/journal data with any local ics file.
58In KO/Pi you can create a specific profile for each device to sync with. 58In KO/Pi you can create a specific profile for each device to sync with.
59 KO/Pi can automatically down/upload a remote ics file to a temp file via user specified system command (e.g. ssh/scp, ftp, ...) to sync with. 59 KO/Pi can automatically down/upload a remote ics file to a temp file via user specified system command (e.g. ssh/scp, ftp, ...) to sync with.
60 KO/Pi can ask you, if a conflict while syncing is detected and displays a detailed view of both events/todos. 60 KO/Pi can ask you, if a conflict while syncing is detected and displays a detailed view of both events/todos.
61 Multiple sync with many profiles at once is supported. Read "Multi Sync HowTo". 61 Multiple sync with many profiles at once is supported. Read "Multi Sync HowTo".
62 KO/Pi can sync after an easy and quick setup via network in the "Pi-Sync" mode with another running instance of KO/Pi with "Pi-Sync" enabled. 62 KO/Pi can sync after an easy and quick setup via network in the "Pi-Sync" mode with another running instance of KO/Pi with "Pi-Sync" enabled.
63 KO/Pi on Linux can sync with KDE calendar data. 63 KO/Pi on Linux can sync with KDE calendar data.
64 KO/Pi on the Zaurus can sync with KDE calendar data on desktop via Pi-Sync. Read "KDE-Sync HowTo". 64 KO/Pi on the Zaurus can sync with KDE calendar data on desktop via Pi-Sync. Read "KDE-Sync HowTo".
65 KO/Pi can sync and export data to mobile phones. Supported models are depending of the used lib, libgammu. 65 KO/Pi can sync and export data to mobile phones. Supported models are depending of the used lib, libgammu.
66 If KO/Pi detects that the saved file on disk has changed,(e.g. a remote sync from somewhere has happened), 66 If KO/Pi detects that the saved file on disk has changed,(e.g. a remote sync from somewhere has happened),
67 it asks you, if you want to overwrite the file or if you want to sync with the file. Such that no data is lost. 67 it asks you, if you want to overwrite the file or if you want to sync with the file. Such that no data is lost.
68KO/Pi can save/load templates for events/todos. 68KO/Pi can save/load templates for events/todos.
692) 692)
70Filter: 70Filter:
71You can define filters for displaying/not displaying specified categories. 71You can define filters for displaying/not displaying specified categories.
72Quick access to the first 20 filters via hotkeys 1-0 and <ctrl>1-0 72Quick access to the first 20 filters via hotkeys 1-0 and <ctrl>1-0
733) 733)
74Managing categories: 74Managing categories:
75After importing/loading/syncing there may be new categories in events or todos which are not in the category list. 75After importing/loading/syncing there may be new categories in events or todos which are not in the category list.
76 You can choose what to do with these categories: 76 You can choose what to do with these categories:
77 -Add to category list 77 -Add to category list
78 -Or remove them from events/todos 78 -Or remove them from events/todos
79In the list view/search dialog you can quickly assign categories to all selected items. 79In the list view/search dialog you can quickly assign categories to all selected items.
80 You can choose 80 You can choose
81 -to add a selection of categories to the list of categories 81 -to add a selection of categories to the list of categories
82 -to set a selection of categories as the new list of categories 82 -to set a selection of categories as the new list of categories
83You can specify a color to every categorie. 83You can specify a color to every categorie.
84 The events/tasks of this categorie are displayed with this color in the agenda view. 84 The events/tasks of this categorie are displayed with this color in the agenda view.
85 You can configure, if the events/tasks categorie color is shown in todo view/month view as well. 85 You can configure, if the events/tasks categorie color is shown in todo view/month view as well.
864) 864)
87Cancelling of items: 87Cancelling of items:
88You can cancel an event/todo without deleting them. 88You can cancel an event/todo without deleting them.
89The cancelled event/todo is then displayed stricked out. 89The cancelled event/todo is then displayed stricked out.
905) 905)
91Addressbook access: 91Addressbook access:
92You can access address entries stored in KA/Pi. 92You can access address entries stored in KA/Pi.
93You cam import birtdays from KA/Pi. 93You cam import birtdays from KA/Pi.
94In KA/Pi you can configure a new resource to get read-only acces to Opie addressbook data. 94In KA/Pi you can configure a new resource to get read-only acces to Opie addressbook data.
956) 956)
96Quick editing: 96Quick editing:
97You can quickly clone, move, cancel, beam events/todos. 97You can quickly clone, move, cancel, beam events/todos.
98When dragging a recurrent event in agenda view, this recurrence is automatically added to the list of recurrence exceptions and a non-recurring clone is created. 98When dragging a recurrent event in agenda view, this recurrence is automatically added to the list of recurrence exceptions and a non-recurring clone is created.
99If you click on a day number in month view, a new edit event dialog pops up. 99If you click on a day number in month view, a new edit event dialog pops up.
1007) 1007)
101Fast navigation: 101Fast navigation:
102There are many shortcuts for fast changing the view. Please refer to shortcut-key description. 102There are many shortcuts for fast changing the view. Please refer to shortcut-key description.
103If you click on the week number in month view, this week is shown in agenda view. 103If you click on the week number in month view, this week is shown in agenda view.
1048) 1048)
105Printing: 105Printing:
106On the desktop version, you can print out a vertical range of the agenda view "as you see it". 106On the desktop version, you can print out a vertical range of the agenda view "as you see it".
107And you can print on the desktop version a day view, three kinds of a week view and a month view. 107And you can print on the desktop version a day view, three kinds of a week view and a month view.
108You can print the todo list as well. 108You can print the todo list as well.
1099) 1099)
110Configuration: 110Configuration:
111There are many advanced configuration possibilities. 111There are many advanced configuration possibilities.
112You can configure for every item in the toolbar, whether it should be shown or not. 112You can configure for every item in the toolbar, whether it should be shown or not.
113There are two item sizes for toolbar icons available. (Useful for 5x00 user and small display). 113There are two item sizes for toolbar icons available. (Useful for 5x00 user and small display).
114You can configure the font/fontsize for every view. 114You can configure the font/fontsize for every view.
11510) 11510)
116Language: 116Language:
117KO/Pi is available in English, German, French and Italian. 117KO/Pi is available in English, German, French and Italian.
11811) 11811)
119Alarm: 119Alarm:
120For Zaurus there is an alarm applet available with additional timer functionality. 120For Zaurus there is an alarm applet available with additional timer functionality.
121This alarm applet will make the Zaurus wake up, if the device is in suspend mode. 121This alarm applet will make the Zaurus wake up, if the device is in suspend mode.
122On the desktop (e.g. Windows) you can enable in KO/Pi the internal alarm notification, 122On the desktop (e.g. Windows) you can enable in KO/Pi the internal alarm notification,
123such that you are informed about an alarm, if the program is running. 123such that you are informed about an alarm, if the program is running.
12412) 12412)
125What'sThis Help: 125What'sThis Help:
126To use the What'sThis Help, you have to enable the What'sThis icon in the toolbar. 126To use the What'sThis Help, you have to enable the What'sThis icon in the toolbar.
127(Choose menu: ME-Toolbar or Action-Configure Toolbar ). 127(Choose menu: ME-Toolbar or Action-Configure Toolbar ).
128(You have to restart to reload the changed toolbar config). 128(You have to restart to reload the changed toolbar config).
129Now click on the QWhat'sThis Icon 129Now click on the QWhat'sThis Icon
130in the top right corner of KO/Pi. 130in the top right corner of KO/Pi.
131Then click now after that on an item in the Agenda View or in the month view 131Then click now after that on an item in the Agenda View or in the month view
132you will get a detailed display of the items content. 132you will get a detailed display of the items content.
133 133
134 134
135 135
136****************************************************** 136******************************************************
137B) Useful features, that are not straighforward to see 137B) Useful features, that are not straighforward to see
138****************************************************** 138******************************************************
139 139
1401) Right mouse click on Zaurus 1401) Right mouse click on Zaurus
1412) Moving of items in the agenda view 1412) Moving of items in the agenda view
1423) Creating exceptions for recurring events 1423) Creating exceptions for recurring events
1434) Accessing the week in agenda view from the Month view 1434) Navigation in month view
1445) Navigation in month view 1445) Navigation in agenda view
1456) Navigation in agenda view 1456) Monthview as week view
1467) Monthview as week view 1467) Switching display mode in date edit
1478) Switching display mode in date edit
148 147
1491) 1481)
150Right mouse click on Zaurus: 149Right mouse click on Zaurus:
151In KO/Pi on the desktop a right mouse click will popup an menu on some items. 150In KO/Pi on the desktop a right mouse click will popup an menu on some items.
152On the Zaurus there can only the stylus be used. 151On the Zaurus there can only the stylus be used.
153To simulte a right mouse click with the stylus press is and hold it down 152To simulte a right mouse click with the stylus press is and hold it down
154for 1-2 seconds. If you release it then, a menu pops up, if there is 153for 1-2 seconds. If you release it then, a menu pops up, if there is
155a menu available for this particular item. 154a menu available for this particular item.
156On some places the menu pops up without releasing the stylus. 155On some places the menu pops up without releasing the stylus.
157That bevaviour is not a bug, it is caused by the the behaviour of the 156That bevaviour is not a bug, it is caused by the the behaviour of the
158single left click on the item. 157single left click on the item.
159 158
1602) 1592)
161Moving of items in the agenda view: 160Moving of items in the agenda view:
162In the agenda view you can move an item by clicking on it and holding 161In the agenda view you can move an item by clicking on it and holding
163the mouse down. 162the mouse down.
164You have to move the mouse some distance before the items actually 163You have to move the mouse some distance before the items actually
165starts to move. That is not abug, that is a feature to prevent 164starts to move. That is not abug, that is a feature to prevent
166you to make unwanted moves of the item when you click on it(and moving the 165you to make unwanted moves of the item when you click on it(and moving the
167mouse only a small distance with this click) 166mouse only a small distance with this click)
168 167
1693) 1683)
170Creating exceptions for recurring events: 169Creating exceptions for recurring events:
171To create an exception for a recurring event, 170To create an exception for a recurring event,
172move this event in the agenda view. 171move this event in the agenda view.
173This recurrence is automatically added to the list 172This recurrence is automatically added to the list
174of recurrence exceptions and a non-recurring clone is created. 173of recurrence exceptions and a non-recurring clone is created.
175To cancel a single recurrence, create an exception by moving it 174To cancel a single recurrence, create an exception by moving it
176and then move it back and cancel it. 175and then move it back and cancel it.
177 176
1784) 1774)
179Accessing the week in agenda view from the month view:
180In the month view there are on the left week numbers displayed.
181Click on a week number to see this week in the agenda view.
182
1835)
184Navigation in month view: 178Navigation in month view:
185If you select the month view with the icon in the toolbar, 179If you select the month view with the icon in the toolbar,
186the selected data range in the date navigator 180the selected data range in the date navigator
187is set automatically to the complete month. 181is set automatically to the complete month.
188(Click on month view and then the space bar to see the 182(Click on month view and then the space bar to see the
189selected data range in the date navigator). 183selected data range in the date navigator).
190If you select in the data navigator 184If you select in the data navigator
191(automatically by clicking on the month view or manually) 185(automatically by clicking on the month view or manually)
192a date range from the first of the month to the 186a date range from the first of the month to the
19328.-31. of the month (the 28.-31. is valid for every month!) 18728.-31. of the month (the 28.-31. is valid for every month!)
194then the (month-)navigation keys will select automatically the 188then the (month-)navigation keys will select automatically the
195complete next month as date range. 189complete next month as date range.
196 190
1976) 1915)
198Navigation in agenda view: 192Navigation in agenda view:
199If you select (as an example) 4 days in the date navigator 193If you select (as an example) 4 days in the date navigator
200the (week-) navigation key will select the same 4 days in the next week. 194the (week-) navigation key will select the same 4 days in the next week.
201If you want to get the next 4 days after the selected 4 days selected, 195If you want to get the next 4 days after the selected 4 days selected,
202you have to switch the navigation mode to "next days mode" 196you have to switch the navigation mode to "next days mode"
203by clicking on the next days icons. 197by clicking on the next days icons.
204Now the next days from today are selected, but after selecting 198Now the next days from today are selected, but after selecting
2054 days in the day navigator the (week-) navigation key 1994 days in the day navigator the (week-) navigation key
206will select the next 4 days. 200will select the next 4 days.
207The "next days mode" is turned off by clicking on the 201The "next days mode" is turned off by clicking on the
208week view, work week view or day view button. 202week view, work week view or day view button.
209The agenda view has "time labels" on the left, which displays the hours from 0-24. 203The agenda view has "time labels" on the left, which displays the hours from 0-24.
210If you press the mouse on the timelabels and move it up/down you can 204If you press the mouse on the timelabels and move it up/down you can
211increase/decrease the agenda size quickly. 205increase/decrease the agenda size quickly.
212 In the agenda view you can click on the day labels (e.g. Mon 14) 206 In the agenda view you can click on the day labels (e.g. Mon 14)
213to see the selected date in single day mode. 207to see the selected date in single day mode.
214If you click in single day mode the day label you will switch back to 208If you click in single day mode the day label you will switch back to
215the previously selected date range. 209the previously selected date range.
216Right of the day labels is a ">" button. 210Right of the day labels is a ">" button.
217If you click this button, you will go one day ahead. 211If you click this button, you will go one day ahead.
218Left of the day labels is the month name displayed. 212Left of the day labels is the month name displayed.
219If you click this button, the month view is shown. 213If you click this button, the month view is shown.
220 214
2217) 2156)
222Monthview as week view: 216Monthview as week view:
223On the left side of the monthview are the week number labels displayed. 217On the left side of the monthview are the week number labels displayed.
224On top of these labels is a "W" displayed. 218If you click on these labels, the month view will show this week zoomed.
225If you click on this button the month view mode will switch to week view mode. 219To go back to monthly view click the left label again.
226To switch back, please click the button, which now displays a "M". 220You can quickly select a week number by clicking the black triangle
221on top of the week number labels.
227 222
2288) 2237)
229Switching display mode in date edit: 224Switching display mode in date edit:
230On several places is a date edit used. 225On several places is a date edit used.
231You can scroll the dates by selecting the part of the date (month, day, year) 226You can scroll the dates by selecting the part of the date (month, day, year)
232in the lineedit and pressing the key up/key down key. 227in the lineedit and pressing the key up/key down key.
233The display mode of a date edit is initially short date mode. 228The display mode of a date edit is initially short date mode.
234(I.e. weekday names are not displayed) 229(I.e. weekday names are not displayed)
235If you doubleclick in the lineedit the mode switches to long date mode. 230If you doubleclick in the lineedit the mode switches to long date mode.
236Now the weekday names are displayed for better overview. 231Now the weekday names are displayed for better overview.
237To switch back simply doubleclick again in the line edit. 232To switch back simply doubleclick again in the line edit.
238 233
239 234
240 235
241 236
242 237
243 238
244 239
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 00b1e92..f2cfb75 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -705,237 +705,252 @@ void MonthViewCell::defaultAction( QListBoxItem *item )
705{ 705{
706 if ( !item ) return; 706 if ( !item ) return;
707 707
708 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 708 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
709 Incidence *incidence = eventItem->incidence(); 709 Incidence *incidence = eventItem->incidence();
710 if ( incidence ) mMonthView->defaultAction( incidence ); 710 if ( incidence ) mMonthView->defaultAction( incidence );
711} 711}
712void MonthViewCell::showDay() 712void MonthViewCell::showDay()
713{ 713{
714 emit showDaySignal( date() ); 714 emit showDaySignal( date() );
715} 715}
716void MonthViewCell::newEvent() 716void MonthViewCell::newEvent()
717{ 717{
718 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 718 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
719 emit newEventSignal( dt ); 719 emit newEventSignal( dt );
720} 720}
721void MonthViewCell::cellClicked( QListBoxItem *item ) 721void MonthViewCell::cellClicked( QListBoxItem *item )
722{ 722{
723 static QListBoxItem * lastClicked = 0; 723 static QListBoxItem * lastClicked = 0;
724 if ( item == 0 ) { 724 if ( item == 0 ) {
725 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 725 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
726 emit newEventSignal( dt ); 726 emit newEventSignal( dt );
727 return; 727 return;
728 } 728 }
729 /* 729 /*
730 if ( lastClicked ) 730 if ( lastClicked )
731 if ( ! item ) { 731 if ( ! item ) {
732 if ( lastClicked->listBox() != item->listBox() ) 732 if ( lastClicked->listBox() != item->listBox() )
733 lastClicked->listBox()->clearSelection(); 733 lastClicked->listBox()->clearSelection();
734 } 734 }
735 */ 735 */
736 736
737 mMonthView->setSelectedCell( this ); 737 mMonthView->setSelectedCell( this );
738 if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true ); 738 if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true );
739 select(); 739 select();
740} 740}
741 741
742void MonthViewCell::contextMenu( QListBoxItem *item ) 742void MonthViewCell::contextMenu( QListBoxItem *item )
743{ 743{
744 if ( !item ) return; 744 if ( !item ) return;
745 745
746 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 746 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
747 Incidence *incidence = eventItem->incidence(); 747 Incidence *incidence = eventItem->incidence();
748 if ( incidence ) mMonthView->showContextMenu( incidence ); 748 if ( incidence ) mMonthView->showContextMenu( incidence );
749} 749}
750 750
751void MonthViewCell::selection( QListBoxItem *item ) 751void MonthViewCell::selection( QListBoxItem *item )
752{ 752{
753 if ( !item ) return; 753 if ( !item ) return;
754 754
755 mMonthView->setSelectedCell( this ); 755 mMonthView->setSelectedCell( this );
756} 756}
757 757
758 758
759// ******************************************************************************* 759// *******************************************************************************
760// ******************************************************************************* 760// *******************************************************************************
761// ******************************************************************************* 761// *******************************************************************************
762 762
763 763
764KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) 764KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
765 : KOEventView( calendar, parent, name ), 765 : KOEventView( calendar, parent, name ),
766 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), 766 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
767 mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) 767 mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
768{ 768{
769 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 769 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
770 mShowWeekView = KOPrefs::instance()->mMonthViewWeek; 770 mShowWeekView = KOPrefs::instance()->mMonthViewWeek;
771 if ( mShowWeekView ) 771 if ( mShowWeekView )
772 mWeekStartsMonday = true; 772 mWeekStartsMonday = true;
773 updatePossible = false; 773 updatePossible = false;
774 mCells.setAutoDelete( true ); 774 mCells.setAutoDelete( true );
775 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 775 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
776 // mDayLayout = new QGridLayout( this ); 776 // mDayLayout = new QGridLayout( this );
777 // create the day of the week labels (Sun, Mon, etc) and add them to 777 // create the day of the week labels (Sun, Mon, etc) and add them to
778 // the layout. 778 // the layout.
779 mDayLabels.resize( mDaysPerWeek ); 779 mDayLabels.resize( mDaysPerWeek );
780 QFont bfont = font(); 780 QFont bfont = font();
781 if ( QApplication::desktop()->width() < 650 ) { 781 if ( QApplication::desktop()->width() < 650 ) {
782 bfont.setPointSize( bfont.pointSize() - 2 ); 782 bfont.setPointSize( bfont.pointSize() - 2 );
783 } 783 }
784 bfont.setBold( true ); 784 bfont.setBold( true );
785 int i; 785 int i;
786 786
787 for( i = 0; i < mDaysPerWeek; i++ ) { 787 for( i = 0; i < mDaysPerWeek; i++ ) {
788 QLabel *label = new QLabel( this ); 788 QLabel *label = new QLabel( this );
789 label->setFont(bfont); 789 label->setFont(bfont);
790 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 790 label->setFrameStyle(QFrame::Panel|QFrame::Raised);
791 label->setLineWidth(1); 791 label->setLineWidth(1);
792 label->setAlignment(AlignCenter); 792 label->setAlignment(AlignCenter);
793 mDayLabels.insert( i, label ); 793 mDayLabels.insert( i, label );
794 } 794 }
795 795
796 bfont.setBold( false ); 796 bfont.setBold( false );
797 mWeekLabels.resize( mNumWeeks+1 ); 797 mWeekLabels.resize( mNumWeeks+1 );
798 for( i = 0; i < mNumWeeks+1; i++ ) { 798 for( i = 0; i < mNumWeeks+1; i++ ) {
799 KOWeekButton *label = new KOWeekButton( this ); 799 KOWeekButton *label = new KOWeekButton( this );
800 label->setFont(bfont); 800 label->setFont(bfont);
801 connect( label, SIGNAL( selectWeekNum ( int )),this, SIGNAL( selectWeekNum ( int )) ); 801 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
802 label->setFlat(true); 802 label->setFlat(true);
803 QWhatsThis::add(label,i18n("Click on the week number to\nshow week in agenda view")); 803 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
804 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 804 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
805 //label->setLineWidth(1); 805 //label->setLineWidth(1);
806 //label->setAlignment(AlignCenter); 806 //label->setAlignment(AlignCenter);
807 mWeekLabels.insert( i, label ); 807 mWeekLabels.insert( i, label );
808 } 808 }
809 mWeekLabels[mNumWeeks]->setText( i18n("W")); 809 mWeekLabels[mNumWeeks]->setText( i18n(""));
810 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nswitch to week mode view")); 810 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
811 int row, col; 811 int row, col;
812 QPopupMenu * wpo = new QPopupMenu (this);
813 wpo->insertItem( i18n("W#"), 0 );
814 for ( i = 1; i < 54; i++ )
815 wpo->insertItem( i18n("%1").arg(i), i );
816 mWeekLabels[mNumWeeks]->setPopup( wpo );
812 mCells.resize( mNumCells ); 817 mCells.resize( mNumCells );
813 for( row = 0; row < mNumWeeks; ++row ) { 818 for( row = 0; row < mNumWeeks; ++row ) {
814 for( col = 0; col < mDaysPerWeek; ++col ) { 819 for( col = 0; col < mDaysPerWeek; ++col ) {
815 MonthViewCell *cell = new MonthViewCell( this ); 820 MonthViewCell *cell = new MonthViewCell( this );
816 mCells.insert( row * mDaysPerWeek + col, cell ); 821 mCells.insert( row * mDaysPerWeek + col, cell );
817 822
818 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 823 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
819 SLOT( defaultAction( Incidence * ) ) ); 824 SLOT( defaultAction( Incidence * ) ) );
820 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 825 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
821 SIGNAL( newEventSignal( QDateTime ) ) ); 826 SIGNAL( newEventSignal( QDateTime ) ) );
822 connect( cell, SIGNAL( showDaySignal( QDate ) ), 827 connect( cell, SIGNAL( showDaySignal( QDate ) ),
823 SIGNAL( showDaySignal( QDate ) ) ); 828 SIGNAL( showDaySignal( QDate ) ) );
824 } 829 }
825 } 830 }
826 831
827 connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), 832 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
828 SLOT( switchView() ) ); 833 connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) );
829 mContextMenu = eventPopup(); 834 mContextMenu = eventPopup();
830 // updateConfig(); //useless here 835 // updateConfig(); //useless here
831 836
832 emit incidenceSelected( 0 ); 837 emit incidenceSelected( 0 );
833} 838}
834 839
835KOMonthView::~KOMonthView() 840KOMonthView::~KOMonthView()
836{ 841{
837 delete mContextMenu; 842 delete mContextMenu;
838} 843}
844void KOMonthView::selectDateWeekNum ( int )
845{
846
847}
848void KOMonthView::selectInternalWeekNum ( int n )
849{
850 emit selectWeekNum ( n );
851 switchView();
852}
853
839void KOMonthView::switchView() 854void KOMonthView::switchView()
840{ 855{
841 if ( selectedCell( ) ) 856 if ( selectedCell( ) )
842 selectedCell()->deselect(); 857 selectedCell()->deselect();
843 mShowWeekView = !mShowWeekView; 858 mShowWeekView = !mShowWeekView;
844 KOPrefs::instance()->mMonthViewWeek = mShowWeekView; 859 KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
845 emit showNavigator( !mShowWeekView ); 860 //emit showNavigator( !mShowWeekView );
846 computeLayout(); 861 computeLayout();
847 updateConfig(); 862 updateConfig();
848} 863}
849 864
850int KOMonthView::maxDatesHint() 865int KOMonthView::maxDatesHint()
851{ 866{
852 return mNumCells; 867 return mNumCells;
853} 868}
854 869
855int KOMonthView::currentDateCount() 870int KOMonthView::currentDateCount()
856{ 871{
857 return mNumCells; 872 return mNumCells;
858} 873}
859 874
860QPtrList<Incidence> KOMonthView::selectedIncidences() 875QPtrList<Incidence> KOMonthView::selectedIncidences()
861{ 876{
862 QPtrList<Incidence> selected; 877 QPtrList<Incidence> selected;
863 878
864 if ( mSelectedCell ) { 879 if ( mSelectedCell ) {
865 Incidence *incidence = mSelectedCell->selectedIncidence(); 880 Incidence *incidence = mSelectedCell->selectedIncidence();
866 if ( incidence ) selected.append( incidence ); 881 if ( incidence ) selected.append( incidence );
867 } 882 }
868 883
869 return selected; 884 return selected;
870} 885}
871 886
872DateList KOMonthView::selectedDates() 887DateList KOMonthView::selectedDates()
873{ 888{
874 DateList selected; 889 DateList selected;
875 890
876 if ( mSelectedCell ) { 891 if ( mSelectedCell ) {
877 QDate qd = mSelectedCell->selectedIncidenceDate(); 892 QDate qd = mSelectedCell->selectedIncidenceDate();
878 if ( qd.isValid() ) selected.append( qd ); 893 if ( qd.isValid() ) selected.append( qd );
879 } 894 }
880 895
881 return selected; 896 return selected;
882} 897}
883 898
884void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, 899void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
885 const QDate &td) 900 const QDate &td)
886{ 901{
887#ifndef KORG_NOPRINTER 902#ifndef KORG_NOPRINTER
888 calPrinter->preview(CalPrinter::Month, fd, td); 903 calPrinter->preview(CalPrinter::Month, fd, td);
889#endif 904#endif
890} 905}
891 906
892void KOMonthView::updateConfig() 907void KOMonthView::updateConfig()
893{ 908{
894 909
895 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 910 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
896 911
897 if ( mShowWeekView ) 912 if ( mShowWeekView )
898 mWeekStartsMonday = true; 913 mWeekStartsMonday = true;
899 QFontMetrics fontmetric(mDayLabels[0]->font()); 914 QFontMetrics fontmetric(mDayLabels[0]->font());
900 mWidthLongDayLabel = 0; 915 mWidthLongDayLabel = 0;
901 916
902 for (int i = 0; i < 7; i++) { 917 for (int i = 0; i < 7; i++) {
903 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 918 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
904 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 919 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
905 } 920 }
906 bool temp = mShowSatSunComp ; 921 bool temp = mShowSatSunComp ;
907 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 922 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
908 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) 923 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog )
909 computeLayout(); 924 computeLayout();
910 updateDayLabels(); 925 updateDayLabels();
911 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); 926 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks);
912 int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; 927 int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks;
913 //resizeEvent( 0 ); 928 //resizeEvent( 0 );
914 for (uint i = 0; i < mCells.count(); ++i) { 929 for (uint i = 0; i < mCells.count(); ++i) {
915 mCells[i]->updateConfig(); 930 mCells[i]->updateConfig();
916 } 931 }
917#ifdef DESKTOP_VERSION 932#ifdef DESKTOP_VERSION
918 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 933 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
919#endif 934#endif
920 updateView(); 935 updateView();
921} 936}
922 937
923void KOMonthView::updateDayLabels() 938void KOMonthView::updateDayLabels()
924{ 939{
925 940
926 for (int i = 0; i < 7; i++) { 941 for (int i = 0; i < 7; i++) {
927 if (mWeekStartsMonday) { 942 if (mWeekStartsMonday) {
928 bool show = mShortDayLabels; 943 bool show = mShortDayLabels;
929 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > mDayLabels[i]->width() ) 944 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > mDayLabels[i]->width() )
930 show = true; 945 show = true;
931 mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 946 mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
932 } else { 947 } else {
933 if (i==0) mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); 948 if (i==0) mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels));
934 else mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); 949 else mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels));
935 950
936 } 951 }
937 } 952 }
938} 953}
939 954
940void KOMonthView::showDates(const QDate &start, const QDate &) 955void KOMonthView::showDates(const QDate &start, const QDate &)
941{ 956{
@@ -1129,284 +1144,284 @@ void KOMonthView::computeLayoutWeek()
1129 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) 1144 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
1130 return; 1145 return;
1131 1146
1132 if ( wid < hei ) 1147 if ( wid < hei )
1133 daysToShow = 2; 1148 daysToShow = 2;
1134 else 1149 else
1135 daysToShow = 3; 1150 daysToShow = 3;
1136 mShowSatSunComp = true; 1151 mShowSatSunComp = true;
1137 combinedSatSun = true; 1152 combinedSatSun = true;
1138 1153
1139 //qDebug("KOMonthView::computeLayout()------------------------------------ "); 1154 //qDebug("KOMonthView::computeLayout()------------------------------------ ");
1140 QFontMetrics fm ( mWeekLabels[0]->font() ); 1155 QFontMetrics fm ( mWeekLabels[0]->font() );
1141 int weeklabelwid = fm.width( "888" ); 1156 int weeklabelwid = fm.width( "888" );
1142 wid -= weeklabelwid; 1157 wid -= weeklabelwid;
1143 1158
1144 int colWid = wid / daysToShow; 1159 int colWid = wid / daysToShow;
1145 int lastCol = wid - ( colWid*6 ); 1160 int lastCol = wid - ( colWid*6 );
1146 int dayLabelHei = mDayLabels[0]->sizeHint().height(); 1161 int dayLabelHei = mDayLabels[0]->sizeHint().height();
1147 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow ); 1162 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
1148 int colModulo = wid % daysToShow; 1163 int colModulo = wid % daysToShow;
1149 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1; 1164 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1;
1150 //qDebug("rowmod %d ", rowModulo); 1165 //qDebug("rowmod %d ", rowModulo);
1151 int i; 1166 int i;
1152 int x,y,w,h; 1167 int x,y,w,h;
1153 x= 0; 1168 x= 0;
1154 y= 0; 1169 y= 0;
1155 w = colWid; 1170 w = colWid;
1156 h = dayLabelHei ; 1171 h = dayLabelHei ;
1157 for ( i = 0; i < 7; i++) { 1172 for ( i = 0; i < 7; i++) {
1158 if ( i && !( i % daysToShow) && i < 6) { 1173 if ( i && !( i % daysToShow) && i < 6) {
1159 y += hei/(5-daysToShow); 1174 y += hei/(5-daysToShow);
1160 x = 0; 1175 x = 0;
1161 w = colWid; 1176 w = colWid;
1162 } 1177 }
1163 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1178 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1164 ++w; 1179 ++w;
1165 } 1180 }
1166 if ( i >= 5 ) { 1181 if ( i >= 5 ) {
1167 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h); 1182 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
1168 x -= (w/2 ); 1183 x -= (w/2 );
1169 } 1184 }
1170 else 1185 else
1171 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1186 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1172 x += w; 1187 x += w;
1173 } 1188 }
1174 x= 0; 1189 x= 0;
1175 y= dayLabelHei; 1190 y= dayLabelHei;
1176 w = colWid; 1191 w = colWid;
1177 h = cellHei; 1192 h = cellHei;
1178 for ( i = 0; i < mCells.count(); ++i) { 1193 for ( i = 0; i < mCells.count(); ++i) {
1179 if ( i > 6 ) { 1194 if ( i > 6 ) {
1180 mCells[i]->hide(); 1195 mCells[i]->hide();
1181 continue; 1196 continue;
1182 } 1197 }
1183 1198
1184 w = colWid; 1199 w = colWid;
1185 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1200 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1186 ++w; 1201 ++w;
1187 } 1202 }
1188 if ( i == (daysToShow-1-rowModulo)*7) 1203 if ( i == (daysToShow-1-rowModulo)*7)
1189 ++h; 1204 ++h;
1190 1205
1191 if ( i >= 5 ) { 1206 if ( i >= 5 ) {
1192 if ( i ==5 ) { 1207 if ( i ==5 ) {
1193 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1208 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
1194 x -= w ;y += h/2; 1209 x -= w ;y += h/2;
1195 } else { 1210 } else {
1196 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) { 1211 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) {
1197 ++w; 1212 ++w;
1198 } 1213 }
1199 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1214 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
1200 y -= h/2; 1215 y -= h/2;
1201 } 1216 }
1202 } else 1217 } else
1203 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1218 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1204 1219
1205 1220
1206 x += w; 1221 x += w;
1207 if ( x + w/2 > wid ) { 1222 if ( x + w/2 > wid ) {
1208 x = 0; 1223 x = 0;
1209 y += h+dayLabelHei ; 1224 y += h+dayLabelHei ;
1210 } 1225 }
1211 } 1226 }
1212 y= dayLabelHei; 1227 y= dayLabelHei;
1213 h = cellHei ; 1228 h = cellHei ;
1214 mWeekLabels[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); 1229 mWeekLabels[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei);
1215 for ( i = 1; i < 6; i++) { 1230 for ( i = 1; i < 6; i++) {
1216 mWeekLabels[i]->hide(); 1231 mWeekLabels[i]->hide();
1217 } 1232 }
1218 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1233 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1219 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1234 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1220 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1235 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1221 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; 1236 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ;
1222 updateDayLabels(); 1237 updateDayLabels();
1223 bool forceUpdate = !updatePossible; 1238 bool forceUpdate = !updatePossible;
1224 updatePossible = true; 1239 updatePossible = true;
1225 mWeekLabels[mNumWeeks]->setText( i18n("M")); 1240 //mWeekLabels[mNumWeeks]->setText( i18n("M"));
1226 if ( forceUpdate ) 1241 if ( forceUpdate )
1227 updateView(); 1242 updateView();
1228} 1243}
1229void KOMonthView::computeLayout() 1244void KOMonthView::computeLayout()
1230{ 1245{
1231 // select the appropriate heading string size. E.g. "Wednesday" or "Wed". 1246 // select the appropriate heading string size. E.g. "Wednesday" or "Wed".
1232 // note this only changes the text if the requested size crosses the 1247 // note this only changes the text if the requested size crosses the
1233 // threshold between big enough to support the full name and not big 1248 // threshold between big enough to support the full name and not big
1234 // enough. 1249 // enough.
1235 if ( mShowWeekView ){ 1250 if ( mShowWeekView ){
1236 computeLayoutWeek(); 1251 computeLayoutWeek();
1237 return; 1252 return;
1238 } 1253 }
1239 int daysToShow = 7; 1254 int daysToShow = 7;
1240 bool combinedSatSun = false; 1255 bool combinedSatSun = false;
1241 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1256 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1242 daysToShow = 6; 1257 daysToShow = 6;
1243 combinedSatSun = true; 1258 combinedSatSun = true;
1244 } 1259 }
1245 int tWid = topLevelWidget()->size().width(); 1260 int tWid = topLevelWidget()->size().width();
1246 int tHei = topLevelWidget()->size().height(); 1261 int tHei = topLevelWidget()->size().height();
1247 1262
1248 int wid = size().width();//e 1263 int wid = size().width();//e
1249 int hei = size().height()-1; 1264 int hei = size().height()-1;
1250 1265
1251 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) 1266 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
1252 return; 1267 return;
1253 //qDebug("KOMonthView::computeLayout()------------------------------------ "); 1268 //qDebug("KOMonthView::computeLayout()------------------------------------ ");
1254 QFontMetrics fm ( mWeekLabels[0]->font() ); 1269 QFontMetrics fm ( mWeekLabels[0]->font() );
1255 int weeklabelwid = fm.width( "888" ); 1270 int weeklabelwid = fm.width( "888" );
1256 wid -= weeklabelwid; 1271 wid -= weeklabelwid;
1257 1272
1258 int colWid = wid / daysToShow; 1273 int colWid = wid / daysToShow;
1259 int lastCol = wid - ( colWid*6 ); 1274 int lastCol = wid - ( colWid*6 );
1260 int dayLabelHei = mDayLabels[0]->sizeHint().height(); 1275 int dayLabelHei = mDayLabels[0]->sizeHint().height();
1261 int cellHei = (hei - dayLabelHei) /6; 1276 int cellHei = (hei - dayLabelHei) /6;
1262 int colModulo = wid % daysToShow; 1277 int colModulo = wid % daysToShow;
1263 int rowModulo = (hei- dayLabelHei) % 6; 1278 int rowModulo = (hei- dayLabelHei) % 6;
1264 //qDebug("rowmod %d ", rowModulo); 1279 //qDebug("rowmod %d ", rowModulo);
1265 int i; 1280 int i;
1266 int x,y,w,h; 1281 int x,y,w,h;
1267 x= 0; 1282 x= 0;
1268 y= 0; 1283 y= 0;
1269 w = colWid; 1284 w = colWid;
1270 h = dayLabelHei ; 1285 h = dayLabelHei ;
1271 for ( i = 0; i < 7; i++) { 1286 for ( i = 0; i < 7; i++) {
1272 if ( i == daysToShow-colModulo ) 1287 if ( i == daysToShow-colModulo )
1273 ++w; 1288 ++w;
1274 if ( combinedSatSun ) { 1289 if ( combinedSatSun ) {
1275 if ( i >= daysToShow-1 ) { 1290 if ( i >= daysToShow-1 ) {
1276 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h); 1291 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
1277 x -= w/2 ; 1292 x -= w/2 ;
1278 } 1293 }
1279 else 1294 else
1280 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1295 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1281 } else 1296 } else
1282 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1297 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1283 x += w; 1298 x += w;
1284 } 1299 }
1285 x= 0; 1300 x= 0;
1286 y= dayLabelHei; 1301 y= dayLabelHei;
1287 w = colWid; 1302 w = colWid;
1288 h = cellHei ; 1303 h = cellHei ;
1289 for ( i = 0; i < mCells.count(); ++i) { 1304 for ( i = 0; i < mCells.count(); ++i) {
1290 mCells[i]->show(); 1305 mCells[i]->show();
1291 w = colWid; 1306 w = colWid;
1292 if ( ((i) % 7) >= 7-colModulo ) { 1307 if ( ((i) % 7) >= 7-colModulo ) {
1293 ++w; 1308 ++w;
1294 } 1309 }
1295 if ( i == (6-rowModulo)*7) 1310 if ( i == (6-rowModulo)*7)
1296 ++h; 1311 ++h;
1297 if ( combinedSatSun ) { 1312 if ( combinedSatSun ) {
1298 if ( (i)%7 >= daysToShow-1 ) { 1313 if ( (i)%7 >= daysToShow-1 ) {
1299 if ( (i)%7 == daysToShow-1 ) { 1314 if ( (i)%7 == daysToShow-1 ) {
1300 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1315 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
1301 x -= w ;y += h/2; 1316 x -= w ;y += h/2;
1302 } else { 1317 } else {
1303 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1318 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
1304 y -= h/2; 1319 y -= h/2;
1305 } 1320 }
1306 } else 1321 } else
1307 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1322 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1308 1323
1309 } 1324 }
1310 else 1325 else
1311 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1326 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1312 x += w; 1327 x += w;
1313 if ( x + w/2 > wid ) { 1328 if ( x + w/2 > wid ) {
1314 x = 0; 1329 x = 0;
1315 y += h; 1330 y += h;
1316 } 1331 }
1317 } 1332 }
1318 y= dayLabelHei; 1333 y= dayLabelHei;
1319 h = cellHei ; 1334 h = cellHei ;
1320 for ( i = 0; i < 6; i++) { 1335 for ( i = 0; i < 6; i++) {
1321 mWeekLabels[i]->show(); 1336 mWeekLabels[i]->show();
1322 if ( i == (6-rowModulo)) 1337 if ( i == (6-rowModulo))
1323 ++h; 1338 ++h;
1324 mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h); 1339 mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h);
1325 y += h; 1340 y += h;
1326 } 1341 }
1327 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1342 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1328 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1343 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1329 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1344 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1330 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; 1345 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ;
1331 updateDayLabels(); 1346 updateDayLabels();
1332 bool forceUpdate = !updatePossible; 1347 bool forceUpdate = !updatePossible;
1333 updatePossible = true; 1348 updatePossible = true;
1334 mWeekLabels[mNumWeeks]->setText( i18n("W")); 1349 //mWeekLabels[mNumWeeks]->setText( i18n("W"));
1335 if ( forceUpdate ) 1350 if ( forceUpdate )
1336 updateView(); 1351 updateView();
1337} 1352}
1338 1353
1339void KOMonthView::showContextMenu( Incidence *incidence ) 1354void KOMonthView::showContextMenu( Incidence *incidence )
1340{ 1355{
1341 mContextMenu->showIncidencePopup(incidence); 1356 mContextMenu->showIncidencePopup(incidence);
1342 /* 1357 /*
1343 if( incidence && incidence->type() == "Event" ) { 1358 if( incidence && incidence->type() == "Event" ) {
1344 Event *event = static_cast<Event *>(incidence); 1359 Event *event = static_cast<Event *>(incidence);
1345 mContextMenu->showEventPopup(event); 1360 mContextMenu->showEventPopup(event);
1346 } else { 1361 } else {
1347 kdDebug() << "MonthView::showContextMenu(): cast failed." << endl; 1362 kdDebug() << "MonthView::showContextMenu(): cast failed." << endl;
1348 } 1363 }
1349 */ 1364 */
1350} 1365}
1351MonthViewCell * KOMonthView::selectedCell( ) 1366MonthViewCell * KOMonthView::selectedCell( )
1352{ 1367{
1353 return mSelectedCell; 1368 return mSelectedCell;
1354} 1369}
1355void KOMonthView::setSelectedCell( MonthViewCell *cell ) 1370void KOMonthView::setSelectedCell( MonthViewCell *cell )
1356{ 1371{
1357 // qDebug("KOMonthView::setSelectedCell "); 1372 // qDebug("KOMonthView::setSelectedCell ");
1358 if ( mSelectedCell && mSelectedCell != cell ) { 1373 if ( mSelectedCell && mSelectedCell != cell ) {
1359 MonthViewCell * mvc = mSelectedCell; 1374 MonthViewCell * mvc = mSelectedCell;
1360 mSelectedCell = cell; 1375 mSelectedCell = cell;
1361 mvc->deselect(); 1376 mvc->deselect();
1362 } else 1377 } else
1363 mSelectedCell = cell; 1378 mSelectedCell = cell;
1364 // if ( mSelectedCell ) 1379 // if ( mSelectedCell )
1365 // mSelectedCell->select(); 1380 // mSelectedCell->select();
1366 if ( !mSelectedCell ) 1381 if ( !mSelectedCell )
1367 emit incidenceSelected( 0 ); 1382 emit incidenceSelected( 0 );
1368 else 1383 else
1369 emit incidenceSelected( mSelectedCell->selectedIncidence() ); 1384 emit incidenceSelected( mSelectedCell->selectedIncidence() );
1370} 1385}
1371 1386
1372void KOMonthView::processSelectionChange() 1387void KOMonthView::processSelectionChange()
1373{ 1388{
1374 QPtrList<Incidence> incidences = selectedIncidences(); 1389 QPtrList<Incidence> incidences = selectedIncidences();
1375 if (incidences.count() > 0) { 1390 if (incidences.count() > 0) {
1376 emit incidenceSelected( incidences.first() ); 1391 emit incidenceSelected( incidences.first() );
1377 } else { 1392 } else {
1378 emit incidenceSelected( 0 ); 1393 emit incidenceSelected( 0 );
1379 } 1394 }
1380} 1395}
1381 1396
1382void KOMonthView::clearSelection() 1397void KOMonthView::clearSelection()
1383{ 1398{
1384 if ( mSelectedCell ) { 1399 if ( mSelectedCell ) {
1385 mSelectedCell->deselect(); 1400 mSelectedCell->deselect();
1386 mSelectedCell = 0; 1401 mSelectedCell = 0;
1387 } 1402 }
1388} 1403}
1389void KOMonthView::keyPressEvent ( QKeyEvent * e ) 1404void KOMonthView::keyPressEvent ( QKeyEvent * e )
1390{ 1405{
1391 //qDebug("KOMonthView::keyPressEvent "); 1406 //qDebug("KOMonthView::keyPressEvent ");
1392 switch(e->key()) { 1407 switch(e->key()) {
1393 case Key_Up: 1408 case Key_Up:
1394 { 1409 {
1395 emit prevMonth(); 1410 emit prevMonth();
1396 mCells[0]->setFocus(); 1411 mCells[0]->setFocus();
1397 } 1412 }
1398 e->accept(); 1413 e->accept();
1399 break; 1414 break;
1400 case Key_Down: 1415 case Key_Down:
1401 { 1416 {
1402 emit nextMonth(); 1417 emit nextMonth();
1403 mCells[0]->setFocus(); 1418 mCells[0]->setFocus();
1404 1419
1405 } 1420 }
1406 e->accept(); 1421 e->accept();
1407 break; 1422 break;
1408 default: 1423 default:
1409 e->ignore(); 1424 e->ignore();
1410 break; 1425 break;
1411 } 1426 }
1412} 1427}
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 0bc3743..1ed200b 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -147,137 +147,139 @@ class MonthViewCell : public QWidget
147 void enableScrollBars( bool ); 147 void enableScrollBars( bool );
148 148
149 Incidence *selectedIncidence(); 149 Incidence *selectedIncidence();
150 QDate selectedIncidenceDate(); 150 QDate selectedIncidenceDate();
151 151
152 void deselect(); 152 void deselect();
153 void select(); 153 void select();
154 void clear(); 154 void clear();
155 155
156#ifdef DESKTOP_VERSION 156#ifdef DESKTOP_VERSION
157 static QToolTipGroup *toolTipGroup(); 157 static QToolTipGroup *toolTipGroup();
158#endif 158#endif
159 signals: 159 signals:
160 void defaultAction( Incidence * ); 160 void defaultAction( Incidence * );
161 void newEventSignal( QDateTime ); 161 void newEventSignal( QDateTime );
162 void showDaySignal( QDate ); 162 void showDaySignal( QDate );
163 163
164 protected: 164 protected:
165 QString mToolTip; 165 QString mToolTip;
166 void resizeEvent( QResizeEvent * ); 166 void resizeEvent( QResizeEvent * );
167 167
168 protected slots: 168 protected slots:
169 void defaultAction( QListBoxItem * ); 169 void defaultAction( QListBoxItem * );
170 void contextMenu( QListBoxItem * ); 170 void contextMenu( QListBoxItem * );
171 void selection( QListBoxItem * ); 171 void selection( QListBoxItem * );
172 void cellClicked( QListBoxItem * ); 172 void cellClicked( QListBoxItem * );
173 void newEvent(); 173 void newEvent();
174 void showDay(); 174 void showDay();
175 175
176 private: 176 private:
177 KOMonthView *mMonthView; 177 KOMonthView *mMonthView;
178 178
179 QDate mDate; 179 QDate mDate;
180 bool mPrimary; 180 bool mPrimary;
181 bool mHoliday; 181 bool mHoliday;
182 QString mHolidayString; 182 QString mHolidayString;
183 183
184 //QLabel *mLabel; 184 //QLabel *mLabel;
185 QPushButton *mLabel; 185 QPushButton *mLabel;
186 QListBox *mItemList; 186 QListBox *mItemList;
187#ifdef DESKTOP_VERSION 187#ifdef DESKTOP_VERSION
188 static QToolTipGroup *mToolTipGroup; 188 static QToolTipGroup *mToolTipGroup;
189#endif 189#endif
190 QSize mLabelSize; 190 QSize mLabelSize;
191 QSize mLabelBigSize; 191 QSize mLabelBigSize;
192 QPalette mHolidayPalette; 192 QPalette mHolidayPalette;
193 QPalette mStandardPalette; 193 QPalette mStandardPalette;
194 QPalette mPrimaryPalette; 194 QPalette mPrimaryPalette;
195 QPalette mNonPrimaryPalette; 195 QPalette mNonPrimaryPalette;
196 void setMyPalette(); 196 void setMyPalette();
197 QPalette getPalette (); 197 QPalette getPalette ();
198 void keyPressEvent ( QKeyEvent * ) ; 198 void keyPressEvent ( QKeyEvent * ) ;
199 199
200}; 200};
201 201
202 202
203class KOMonthView: public KOEventView 203class KOMonthView: public KOEventView
204{ 204{
205 Q_OBJECT 205 Q_OBJECT
206 public: 206 public:
207 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); 207 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
208 ~KOMonthView(); 208 ~KOMonthView();
209 209
210 /** Returns maximum number of days supported by the komonthview */ 210 /** Returns maximum number of days supported by the komonthview */
211 virtual int maxDatesHint(); 211 virtual int maxDatesHint();
212 212
213 /** Returns number of currently shown dates. */ 213 /** Returns number of currently shown dates. */
214 virtual int currentDateCount(); 214 virtual int currentDateCount();
215 215
216 /** returns the currently selected events */ 216 /** returns the currently selected events */
217 virtual QPtrList<Incidence> selectedIncidences(); 217 virtual QPtrList<Incidence> selectedIncidences();
218 218
219 /** returns dates of the currently selected events */ 219 /** returns dates of the currently selected events */
220 virtual DateList selectedDates(); 220 virtual DateList selectedDates();
221 221
222 virtual void printPreview(CalPrinter *calPrinter, 222 virtual void printPreview(CalPrinter *calPrinter,
223 const QDate &, const QDate &); 223 const QDate &, const QDate &);
224 bool isMonthView() { return true; } 224 bool isMonthView() { return true; }
225 bool isUpdatePossible() { return updatePossible; } 225 bool isUpdatePossible() { return updatePossible; }
226 226
227 MonthViewCell * selectedCell(); 227 MonthViewCell * selectedCell();
228 public slots: 228 public slots:
229 virtual void updateView(); 229 virtual void updateView();
230 virtual void updateConfig(); 230 virtual void updateConfig();
231 virtual void showDates(const QDate &start, const QDate &end); 231 virtual void showDates(const QDate &start, const QDate &end);
232 virtual void showEvents(QPtrList<Event> eventList); 232 virtual void showEvents(QPtrList<Event> eventList);
233 233
234 void changeEventDisplay(Event *, int); 234 void changeEventDisplay(Event *, int);
235 235
236 void clearSelection(); 236 void clearSelection();
237 237
238 void showContextMenu( Incidence * ); 238 void showContextMenu( Incidence * );
239 239
240 void setSelectedCell( MonthViewCell * ); 240 void setSelectedCell( MonthViewCell * );
241 241
242 protected slots: 242 protected slots:
243 void selectDateWeekNum ( int );
244 void selectInternalWeekNum ( int );
243 void switchView(); 245 void switchView();
244 void processSelectionChange(); 246 void processSelectionChange();
245 signals: 247 signals:
246 void nextMonth(); 248 void nextMonth();
247 void prevMonth(); 249 void prevMonth();
248 void showNavigator( bool ); 250 void showNavigator( bool );
249 void selectWeekNum ( int ); 251 void selectWeekNum ( int );
250 void showDaySignal( QDate ); 252 void showDaySignal( QDate );
251 protected: 253 protected:
252 void resizeEvent(QResizeEvent *); 254 void resizeEvent(QResizeEvent *);
253 void viewChanged(); 255 void viewChanged();
254 void updateDayLabels(); 256 void updateDayLabels();
255 257
256 private: 258 private:
257 bool mShowWeekView; 259 bool mShowWeekView;
258 bool updatePossible; 260 bool updatePossible;
259 int mDaysPerWeek; 261 int mDaysPerWeek;
260 int mNumWeeks; 262 int mNumWeeks;
261 int mNumCells; 263 int mNumCells;
262 bool mWeekStartsMonday; 264 bool mWeekStartsMonday;
263 bool mShowSatSunComp; 265 bool mShowSatSunComp;
264 void computeLayout(); 266 void computeLayout();
265 void computeLayoutWeek(); 267 void computeLayoutWeek();
266 268
267 QPtrVector<MonthViewCell> mCells; 269 QPtrVector<MonthViewCell> mCells;
268 QPtrVector<QLabel> mDayLabels; 270 QPtrVector<QLabel> mDayLabels;
269 QPtrVector<KOWeekButton> mWeekLabels; 271 QPtrVector<KOWeekButton> mWeekLabels;
270 272
271 bool mShortDayLabels; 273 bool mShortDayLabels;
272 int mWidthLongDayLabel; 274 int mWidthLongDayLabel;
273 275
274 QDate mStartDate; 276 QDate mStartDate;
275 277
276 MonthViewCell *mSelectedCell; 278 MonthViewCell *mSelectedCell;
277 279
278 KOEventPopupMenu *mContextMenu; 280 KOEventPopupMenu *mContextMenu;
279 void keyPressEvent ( QKeyEvent * ) ; 281 void keyPressEvent ( QKeyEvent * ) ;
280 282
281}; 283};
282 284
283#endif 285#endif
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 8aa0697..ca3de59 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -129,193 +129,193 @@ void KOViewManager::showDateView( int view, QDate date)
129 showJournalView(); 129 showJournalView();
130 } else if (view == 8 ) { 130 } else if (view == 8 ) {
131 globalFlagBlockAgenda = 1; 131 globalFlagBlockAgenda = 1;
132 if ( mCurrentAgendaView != 3 ) 132 if ( mCurrentAgendaView != 3 )
133 mCurrentAgendaView = -1; 133 mCurrentAgendaView = -1;
134 showAgendaView(KOPrefs::instance()->mFullViewMonth); 134 showAgendaView(KOPrefs::instance()->mFullViewMonth);
135 globalFlagBlockAgenda = 2; 135 globalFlagBlockAgenda = 2;
136 mMainView->dateNavigator()->selectDates( date , 136 mMainView->dateNavigator()->selectDates( date ,
137 KOPrefs::instance()->mNextXDays ); 137 KOPrefs::instance()->mNextXDays );
138 mFlagShowNextxDays = true; 138 mFlagShowNextxDays = true;
139 mCurrentAgendaView = 3 ; 139 mCurrentAgendaView = 3 ;
140 } if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode ) 140 } if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode )
141 if ( lastMode ) { 141 if ( lastMode ) {
142 mCurrentAgendaView = lastCount ; 142 mCurrentAgendaView = lastCount ;
143 mMainView->dateNavigator()->selectDates( lastDate, lastCount); 143 mMainView->dateNavigator()->selectDates( lastDate, lastCount);
144 mFlagShowNextxDays = lastNDMode; 144 mFlagShowNextxDays = lastNDMode;
145 if ( mFlagShowNextxDays ) { 145 if ( mFlagShowNextxDays ) {
146 mCurrentAgendaView = 3 ; 146 mCurrentAgendaView = 3 ;
147 } 147 }
148 } else 148 } else
149 showWeekView(); 149 showWeekView();
150 } else if (view == 10) { 150 } else if (view == 10) {
151 mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() ); 151 mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() );
152 } 152 }
153 lastMode = view; 153 lastMode = view;
154} 154}
155 155
156 156
157 157
158void KOViewManager::writeSettings(KConfig *config) 158void KOViewManager::writeSettings(KConfig *config)
159{ 159{
160 config->setGroup("General"); 160 config->setGroup("General");
161 161
162 QString view; 162 QString view;
163 if (mCurrentView == mWhatsNextView) view = "WhatsNext"; 163 if (mCurrentView == mWhatsNextView) view = "WhatsNext";
164 else if (mCurrentView == mMonthView) view = "Month"; 164 else if (mCurrentView == mMonthView) view = "Month";
165 else if (mCurrentView == mListView) view = "List"; 165 else if (mCurrentView == mListView) view = "List";
166 else if (mCurrentView == mJournalView) view = "Journal"; 166 else if (mCurrentView == mJournalView) view = "Journal";
167 else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; 167 else if (mCurrentView == mTimeSpanView) view = "TimeSpan";
168 else if (mCurrentView == mTodoView) view = "Todo"; 168 else if (mCurrentView == mTodoView) view = "Todo";
169 else view = "Agenda"; 169 else view = "Agenda";
170 170
171 config->writeEntry("Current View",view); 171 config->writeEntry("Current View",view);
172 172
173 if (mAgendaView) { 173 if (mAgendaView) {
174 mAgendaView->writeSettings(config); 174 mAgendaView->writeSettings(config);
175 } 175 }
176 if (mTimeSpanView) { 176 if (mTimeSpanView) {
177 mTimeSpanView->writeSettings(config); 177 mTimeSpanView->writeSettings(config);
178 } 178 }
179 if (mListView) { 179 if (mListView) {
180 mListView->writeSettings(config); 180 mListView->writeSettings(config);
181 } 181 }
182 if (mTodoView) { 182 if (mTodoView) {
183 mTodoView->saveLayout(config,"Todo View"); 183 mTodoView->saveLayout(config,"Todo View");
184 } 184 }
185} 185}
186 186
187void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) 187void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
188{ 188{
189 189
190 //mFlagShowNextxDays = false; 190 //mFlagShowNextxDays = false;
191 //if(view == mCurrentView) return; 191 //if(view == mCurrentView) return;
192 if ( view == 0 ) { 192 if ( view == 0 ) {
193 view = mCurrentView; 193 view = mCurrentView;
194 if ( view == 0 ) 194 if ( view == 0 )
195 return; 195 return;
196 } 196 }
197 bool full = fullScreen; 197 bool full = fullScreen;
198 if(view == mCurrentView && view != mWhatsNextView ) { 198 if(view == mCurrentView && view != mWhatsNextView ) {
199 if ( mCurrentAgendaView < 0 ) 199 if ( mCurrentAgendaView < 0 )
200 return; 200 return;
201 full = mMainView->leftFrame()->isVisible(); 201 full = mMainView->leftFrame()->isVisible();
202 } else { 202 } else {
203 mCurrentView = view; 203 mCurrentView = view;
204 // bool full = fullScreen; 204 // bool full = fullScreen;
205 bool isFull = !mMainView->leftFrame()->isVisible(); 205 bool isFull = !mMainView->leftFrame()->isVisible();
206 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) 206 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen )
207 full = true; 207 full = true;
208 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) 208 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen )
209 full = false; 209 full = false;
210 } 210 }
211 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); 211 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime();
212 //raiseCurrentView( full ); 212 //raiseCurrentView( full );
213 mMainView->processIncidenceSelection( 0 ); 213 mMainView->processIncidenceSelection( 0 );
214 //mMainView->updateView(); 214 //mMainView->updateView();
215 raiseCurrentView( full, true ); 215 raiseCurrentView( full, true );
216 mMainView->adaptNavigationUnits(); 216 mMainView->adaptNavigationUnits();
217} 217}
218 218
219void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) 219void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
220{ 220{
221 mCurrentAgendaView = 0; 221 mCurrentAgendaView = 0;
222 int wid = mMainView->width() ; 222 int wid = mMainView->width() ;
223 int hei = mMainView->height(); 223 int hei = mMainView->height();
224 if ( mCurrentView == mMonthView ) { 224 if ( mCurrentView == mMonthView ) {
225 if ( !KOPrefs::instance()->mMonthViewWeek ) { 225 if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) {
226 mMainView->navigatorBar()->show(); 226 mMainView->navigatorBar()->show();
227 hei -= mMainView->navigatorBar()->sizeHint().height(); 227 hei -= mMainView->navigatorBar()->sizeHint().height();
228 } 228 }
229 //mMainView->navigatorBar()->hide(); 229 //mMainView->navigatorBar()->hide();
230 } else { 230 } else {
231 mMainView->navigatorBar()->hide(); 231 mMainView->navigatorBar()->hide();
232 } 232 }
233 if ( fullScreen ) { 233 if ( fullScreen ) {
234 mMainView->leftFrame()->hide(); 234 mMainView->leftFrame()->hide();
235 } else { 235 } else {
236 mMainView->leftFrame()->show(); 236 mMainView->leftFrame()->show();
237 if ( KOPrefs::instance()->mVerticalScreen ) 237 if ( KOPrefs::instance()->mVerticalScreen )
238 hei -= mMainView->leftFrame()->height(); 238 hei -= mMainView->leftFrame()->height();
239 else 239 else
240 wid -= mMainView->leftFrame()->width(); 240 wid -= mMainView->leftFrame()->width();
241 } 241 }
242 emit signalFullScreen( !fullScreen ); 242 emit signalFullScreen( !fullScreen );
243 if ( callUpdateView ) 243 if ( callUpdateView )
244 mMainView->updateView(); 244 mMainView->updateView();
245 245
246 if ( globalFlagBlockAgenda == 5 ) { 246 if ( globalFlagBlockAgenda == 5 ) {
247 globalFlagBlockAgenda = 4; 247 globalFlagBlockAgenda = 4;
248 globalFlagBlockAgendaItemPaint = 1; 248 globalFlagBlockAgendaItemPaint = 1;
249 } 249 }
250 mMainView->viewStack()->raiseWidget(mCurrentView); 250 mMainView->viewStack()->raiseWidget(mCurrentView);
251 if ( globalFlagBlockAgenda == 4 ) { 251 if ( globalFlagBlockAgenda == 4 ) {
252 if ( mCurrentView == mAgendaView ) { 252 if ( mCurrentView == mAgendaView ) {
253 //globalFlagBlockAgenda =1 ; 253 //globalFlagBlockAgenda =1 ;
254 if ( KOPrefs::instance()->mSetTimeToDayStartAt ) 254 if ( KOPrefs::instance()->mSetTimeToDayStartAt )
255 mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); 255 mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins );
256 else if ( KOPrefs::instance()->mCenterOnCurrentTime ) 256 else if ( KOPrefs::instance()->mCenterOnCurrentTime )
257 mAgendaView->setStartHour( QTime::currentTime ().hour() ); 257 mAgendaView->setStartHour( QTime::currentTime ().hour() );
258 qApp->processEvents(); 258 qApp->processEvents();
259 //qDebug("qApp->processEvents() "); 259 //qDebug("qApp->processEvents() ");
260 globalFlagBlockAgenda = 0; 260 globalFlagBlockAgenda = 0;
261 mAgendaView->repaintAgenda(); 261 mAgendaView->repaintAgenda();
262 262
263 } 263 }
264 globalFlagBlockAgenda = 0; 264 globalFlagBlockAgenda = 0;
265 } 265 }
266 emit signalAgendaView( mCurrentView == mAgendaView ); 266 emit signalAgendaView( mCurrentView == mAgendaView );
267 //qDebug("raiseCurrentView ende "); 267 //qDebug("raiseCurrentView ende ");
268 268
269} 269}
270 270
271void KOViewManager::updateView() 271void KOViewManager::updateView()
272{ 272{
273 // qDebug("KOViewManager::updateView() "); 273 // qDebug("KOViewManager::updateView() ");
274 // if we are updating mTodoView, we get endless recursion 274 // if we are updating mTodoView, we get endless recursion
275 if ( mTodoView == mCurrentView ) 275 if ( mTodoView == mCurrentView )
276 return; 276 return;
277 if ( mCurrentView ) mCurrentView->updateView(); 277 if ( mCurrentView ) mCurrentView->updateView();
278 278
279} 279}
280 280
281void KOViewManager::updateView(const QDate &start, const QDate &end) 281void KOViewManager::updateView(const QDate &start, const QDate &end)
282{ 282{
283 // kdDebug() << "KOViewManager::updateView()" << endl; 283 // kdDebug() << "KOViewManager::updateView()" << endl;
284 284
285 if (mCurrentView) mCurrentView->showDates(start, end); 285 if (mCurrentView) mCurrentView->showDates(start, end);
286 286
287 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); 287 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView();
288} 288}
289 289
290 290
291void KOViewManager::updateWNview() 291void KOViewManager::updateWNview()
292{ 292{
293 if ( mCurrentView == mWhatsNextView && mWhatsNextView ) 293 if ( mCurrentView == mWhatsNextView && mWhatsNextView )
294 mWhatsNextView->updateView(); 294 mWhatsNextView->updateView();
295 295
296} 296}
297void KOViewManager::showWhatsNextView() 297void KOViewManager::showWhatsNextView()
298{ 298{
299 if (!mWhatsNextView) { 299 if (!mWhatsNextView) {
300 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), 300 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(),
301 "KOViewManager::WhatsNextView"); 301 "KOViewManager::WhatsNextView");
302 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); 302 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog());
303 connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); 303 connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig()));
304 addView(mWhatsNextView); 304 addView(mWhatsNextView);
305 connect(this, SIGNAL( printWNV() ), 305 connect(this, SIGNAL( printWNV() ),
306 mWhatsNextView, SLOT( printMe() ) ); 306 mWhatsNextView, SLOT( printMe() ) );
307 } 307 }
308 globalFlagBlockAgenda = 1; 308 globalFlagBlockAgenda = 1;
309 showView(mWhatsNextView, true ); 309 showView(mWhatsNextView, true );
310 //mWhatsNextView->updateView(); 310 //mWhatsNextView->updateView();
311 311
312} 312}
313 313
314void KOViewManager::showListView() 314void KOViewManager::showListView()
315{ 315{
316 if (!mListView) { 316 if (!mListView) {
317 mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); 317 mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView");
318 addView(mListView); 318 addView(mListView);
319 319
320 connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), 320 connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)),
321 mMainView, SLOT(showIncidence(Incidence *))); 321 mMainView, SLOT(showIncidence(Incidence *)));
@@ -425,193 +425,193 @@ void KOViewManager::showDayView()
425 showAgendaView(); 425 showAgendaView();
426 qApp->processEvents(); 426 qApp->processEvents();
427 globalFlagBlockAgenda = 2; 427 globalFlagBlockAgenda = 2;
428 globalFlagBlockLabel = 0; 428 globalFlagBlockLabel = 0;
429 mMainView->dateNavigator()->selectDates( 1 ); 429 mMainView->dateNavigator()->selectDates( 1 );
430 mCurrentAgendaView = 1 ; 430 mCurrentAgendaView = 1 ;
431 431
432} 432}
433 433
434void KOViewManager::showWorkWeekView() 434void KOViewManager::showWorkWeekView()
435{ 435{
436 mFlagShowNextxDays = false; 436 mFlagShowNextxDays = false;
437 globalFlagBlockAgenda = 1; 437 globalFlagBlockAgenda = 1;
438 globalFlagBlockLabel = 1; 438 globalFlagBlockLabel = 1;
439 if ( mCurrentAgendaView != 5 ) 439 if ( mCurrentAgendaView != 5 )
440 mCurrentAgendaView = -1; 440 mCurrentAgendaView = -1;
441 showAgendaView(); 441 showAgendaView();
442 qApp->processEvents(); 442 qApp->processEvents();
443 globalFlagBlockAgenda = 2; 443 globalFlagBlockAgenda = 2;
444 globalFlagBlockLabel = 0; 444 globalFlagBlockLabel = 0;
445 mMainView->dateNavigator()->selectWorkWeek(); 445 mMainView->dateNavigator()->selectWorkWeek();
446 mCurrentAgendaView = 5 ; 446 mCurrentAgendaView = 5 ;
447 447
448} 448}
449 449
450void KOViewManager::showWeekView() 450void KOViewManager::showWeekView()
451{ 451{
452 /* 452 /*
453 globalFlagBlockAgenda = 2; 453 globalFlagBlockAgenda = 2;
454 qDebug("4globalFlagBlockAgenda = 2; "); 454 qDebug("4globalFlagBlockAgenda = 2; ");
455 //globalFlagBlockPainting = true; 455 //globalFlagBlockPainting = true;
456 mMainView->dateNavigator()->selectWeek(); 456 mMainView->dateNavigator()->selectWeek();
457 showAgendaView(); 457 showAgendaView();
458 */ 458 */
459 459
460 460
461 mFlagShowNextxDays = false; 461 mFlagShowNextxDays = false;
462 globalFlagBlockAgenda = 1; 462 globalFlagBlockAgenda = 1;
463 globalFlagBlockLabel = 1; 463 globalFlagBlockLabel = 1;
464 if ( mCurrentAgendaView != 7 ) 464 if ( mCurrentAgendaView != 7 )
465 mCurrentAgendaView = -1; 465 mCurrentAgendaView = -1;
466 showAgendaView(); 466 showAgendaView();
467 qApp->processEvents(); 467 qApp->processEvents();
468 globalFlagBlockAgenda = 2; 468 globalFlagBlockAgenda = 2;
469 globalFlagBlockLabel = 0; 469 globalFlagBlockLabel = 0;
470 mMainView->dateNavigator()->selectWeek(); 470 mMainView->dateNavigator()->selectWeek();
471 mCurrentAgendaView = 7 ; 471 mCurrentAgendaView = 7 ;
472} 472}
473 473
474void KOViewManager::showNextXView() 474void KOViewManager::showNextXView()
475{ 475{
476 476
477 globalFlagBlockAgenda = 1; 477 globalFlagBlockAgenda = 1;
478 if ( mCurrentAgendaView != 3 ) 478 if ( mCurrentAgendaView != 3 )
479 mCurrentAgendaView = -1; 479 mCurrentAgendaView = -1;
480 showAgendaView(KOPrefs::instance()->mFullViewMonth); 480 showAgendaView(KOPrefs::instance()->mFullViewMonth);
481 globalFlagBlockAgenda = 2; 481 globalFlagBlockAgenda = 2;
482 mMainView->dateNavigator()->selectDates( QDate::currentDate(), 482 mMainView->dateNavigator()->selectDates( QDate::currentDate(),
483 KOPrefs::instance()->mNextXDays ); 483 KOPrefs::instance()->mNextXDays );
484 mFlagShowNextxDays = true; 484 mFlagShowNextxDays = true;
485 mCurrentAgendaView = 3 ; 485 mCurrentAgendaView = 3 ;
486} 486}
487bool KOViewManager::showsNextDays() 487bool KOViewManager::showsNextDays()
488{ 488{
489 return mFlagShowNextxDays; 489 return mFlagShowNextxDays;
490} 490}
491void KOViewManager::showMonthView() 491void KOViewManager::showMonthView()
492{ 492{
493 if (!mMonthView) { 493 if (!mMonthView) {
494 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); 494 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView");
495 495
496 addView(mMonthView); 496 addView(mMonthView);
497 // mMonthView->show(); 497 // mMonthView->show();
498 // SIGNALS/SLOTS FOR MONTH VIEW 498 // SIGNALS/SLOTS FOR MONTH VIEW
499 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), 499 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)),
500 mMainView, SLOT(newEvent(QDateTime))); 500 mMainView, SLOT(newEvent(QDateTime)));
501 501
502 connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), 502 connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)),
503 mMainView, SLOT(showIncidence(Incidence *))); 503 mMainView, SLOT(showIncidence(Incidence *)));
504 connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), 504 connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)),
505 mMainView, SLOT(editIncidence(Incidence *))); 505 mMainView, SLOT(editIncidence(Incidence *)));
506 connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), 506 connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)),
507 mMainView, SLOT(deleteIncidence(Incidence *))); 507 mMainView, SLOT(deleteIncidence(Incidence *)));
508 508
509 connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), 509 connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ),
510 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 510 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
511 connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), 511 connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ),
512 mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); 512 mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
513 connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), 513 connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ),
514 mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); 514 mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
515 515
516 connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 516 connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
517 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 517 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
518 connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 518 connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
519 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 519 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
520 connect( mMonthView, SIGNAL( selectWeekNum( int ) ), 520 connect( mMonthView, SIGNAL( selectWeekNum( int ) ),
521 mMainView, SLOT ( selectWeekNum( int ) ) ); 521 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
522 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), 522 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ),
523 mMainView, SLOT ( showDay( QDate ) ) ); 523 mMainView, SLOT ( showDay( QDate ) ) );
524 connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); 524 connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig()));
525 connect( mMonthView, SIGNAL(nextMonth() ), 525 connect( mMonthView, SIGNAL(nextMonth() ),
526 mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); 526 mMainView->navigatorBar(), SIGNAL(goNextMonth() ) );
527 connect( mMonthView, SIGNAL(prevMonth() ), 527 connect( mMonthView, SIGNAL(prevMonth() ),
528 mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); 528 mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) );
529 connect( mMonthView, SIGNAL( showNavigator(bool) ), 529 connect( mMonthView, SIGNAL( showNavigator(bool) ),
530 mMainView, SLOT ( showNavigatorBar(bool) ) ); 530 mMainView, SLOT ( showNavigatorBar(bool) ) );
531 } 531 }
532 532
533 globalFlagBlockAgenda = 1; 533 globalFlagBlockAgenda = 1;
534 //mFlagShowNextxDays = false; 534 //mFlagShowNextxDays = false;
535 // if(mMonthView == mCurrentView) return; 535 // if(mMonthView == mCurrentView) return;
536 if ( KOPrefs::instance()->mMonthViewWeek ) 536 if ( KOPrefs::instance()->mMonthViewWeek )
537 mMainView->dateNavigator()->selectWeek(); 537 mMainView->dateNavigator()->selectWeek();
538 else 538 else
539 mMainView->dateNavigator()->selectMonth(); 539 mMainView->dateNavigator()->selectMonth();
540 540
541 showView(mMonthView, true ); 541 showView(mMonthView, true );
542 542
543} 543}
544 544
545void KOViewManager::showTodoView() 545void KOViewManager::showTodoView()
546{ 546{
547 //mFlagShowNextxDays = false; 547 //mFlagShowNextxDays = false;
548 if ( !mTodoView ) { 548 if ( !mTodoView ) {
549 mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), 549 mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(),
550 "KOViewManager::TodoView" ); 550 "KOViewManager::TodoView" );
551 551
552 addView( mTodoView ); 552 addView( mTodoView );
553 // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); 553 // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold );
554 554
555 // SIGNALS/SLOTS FOR TODO VIEW 555 // SIGNALS/SLOTS FOR TODO VIEW
556 connect( mTodoView, SIGNAL( newTodoSignal() ), 556 connect( mTodoView, SIGNAL( newTodoSignal() ),
557 mMainView, SLOT( newTodo() ) ); 557 mMainView, SLOT( newTodo() ) );
558 connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), 558 connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ),
559 mMainView, SLOT( newSubTodo( Todo *) ) ); 559 mMainView, SLOT( newSubTodo( Todo *) ) );
560 connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), 560 connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ),
561 mMainView, SLOT( showTodo( Todo * ) ) ); 561 mMainView, SLOT( showTodo( Todo * ) ) );
562 connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), 562 connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ),
563 mMainView, SLOT( editTodo( Todo * ) ) ); 563 mMainView, SLOT( editTodo( Todo * ) ) );
564 connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), 564 connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ),
565 mMainView, SLOT( deleteTodo( Todo * ) ) ); 565 mMainView, SLOT( deleteTodo( Todo * ) ) );
566 connect( mTodoView, SIGNAL( purgeCompletedSignal() ), 566 connect( mTodoView, SIGNAL( purgeCompletedSignal() ),
567 mMainView, SLOT( purgeCompleted() ) ); 567 mMainView, SLOT( purgeCompleted() ) );
568 568
569 connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), 569 connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ),
570 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 570 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
571 571
572 connect( mMainView, SIGNAL( configChanged() ), mTodoView, 572 connect( mMainView, SIGNAL( configChanged() ), mTodoView,
573 SLOT( updateConfig() ) ); 573 SLOT( updateConfig() ) );
574 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, 574 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView,
575 SLOT( updateTodo( Todo *, int ) ) ); 575 SLOT( updateTodo( Todo *, int ) ) );
576 connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), 576 connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ),
577 mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); 577 mMainView, SIGNAL ( todoModified( Todo *, int ) ) );
578 connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), 578 connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ),
579 mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); 579 mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
580 connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), 580 connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ),
581 mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); 581 mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
582 connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), 582 connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ),
583 mMainView, SLOT ( todo_unsub( Todo * ) ) ); 583 mMainView, SLOT ( todo_unsub( Todo * ) ) );
584 connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), 584 connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
585 mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); 585 mMainView, SLOT ( todo_resub( Todo *, Todo *) ) );
586 connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), 586 connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ),
587 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 587 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
588 connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), 588 connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ),
589 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 589 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
590 KConfig *config = KOGlobals::config(); 590 KConfig *config = KOGlobals::config();
591 mTodoView->restoreLayout(config,"Todo View"); 591 mTodoView->restoreLayout(config,"Todo View");
592 mTodoView->setNavigator( mMainView->dateNavigator() ); 592 mTodoView->setNavigator( mMainView->dateNavigator() );
593 } 593 }
594 594
595 globalFlagBlockAgenda = 1; 595 globalFlagBlockAgenda = 1;
596 showView( mTodoView, true ); 596 showView( mTodoView, true );
597 597
598} 598}
599 599
600void KOViewManager::showJournalView() 600void KOViewManager::showJournalView()
601{ 601{
602 //mFlagShowNextxDays = false; 602 //mFlagShowNextxDays = false;
603 if (!mJournalView) { 603 if (!mJournalView) {
604 mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(), 604 mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(),
605 "KOViewManager::JournalView"); 605 "KOViewManager::JournalView");
606 connect( mMainView, SIGNAL( configChanged() ), mJournalView, 606 connect( mMainView, SIGNAL( configChanged() ), mJournalView,
607 SLOT( updateConfig() ) ); 607 SLOT( updateConfig() ) );
608 connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); 608 connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) );
609 addView(mJournalView); 609 addView(mJournalView);
610 } 610 }
611 611
612 showView(mJournalView); 612 showView(mJournalView);
613 mMainView->dateNavigator()->selectDates( 1 ); 613 mMainView->dateNavigator()->selectDates( 1 );
614} 614}
615 615
616void KOViewManager::showTimeSpanView() 616void KOViewManager::showTimeSpanView()
617{ 617{