summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--korganizer/komonthview.cpp32
-rw-r--r--korganizer/komonthview.h5
3 files changed, 35 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index d4b7971..95a1866 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,1043 +1,1045 @@
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.15 ************ 3********** VERSION 2.0.15 ************
4 4
5PwM/Pi: 5PwM/Pi:
6Added keyboard shorcuts for 6Added keyboard shorcuts for
7- toggling summary view (space bar) 7- toggling summary view (space bar)
8- delete item (delete + backspace key) 8- delete item (delete + backspace key)
9- add new item ( i + n key) 9- add new item ( i + n key)
10Fixed length of info in the title. 10Fixed length of info in the title.
11 11
12KO/Pi-KA/Pi: 12KO/Pi-KA/Pi:
13Changed "ME" menu bar entry to an icon. 13Changed "ME" menu bar entry to an icon.
14 14
15KO/Pi: 15KO/Pi:
16Fixed two minor bugs in displaying todos. 16Fixed two minor bugs in displaying todos.
17If in month view a cell is selected, the key shortcut "d" shows now that date.
18Added complete info for a todo in month view as an icon left of the text.
17 19
18 20
19********** VERSION 2.0.14 ************ 21********** VERSION 2.0.14 ************
20 22
21Made Passwordmanager PwM/Pi more userfriendly: 23Made Passwordmanager PwM/Pi more userfriendly:
22Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 24Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
23Fixed bug in KO/Pi todo printing. 25Fixed bug in KO/Pi todo printing.
24Made Qtopia calendar import possible on desktop . 26Made Qtopia calendar import possible on desktop .
25 27
26********** VERSION 2.0.13 ************ 28********** VERSION 2.0.13 ************
27 29
28Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. 30Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter.
29 31
30In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". 32In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down".
31 33
32OM/Pi: 34OM/Pi:
33Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. 35Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails.
34Added missing German translation. 36Added missing German translation.
35Added warning if path is specified in local folder settings of account config. 37Added warning if path is specified in local folder settings of account config.
36 38
37********** VERSION 2.0.12 ************ 39********** VERSION 2.0.12 ************
38 40
39KO/Pi: 41KO/Pi:
40Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. 42Fixed a bug in todo start/due date handling for non recurring todos with a start and due date.
41Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. 43Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes.
42Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. 44Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer.
43 45
44Fixed problem in pi-sync mode when wrong password was sent. 46Fixed problem in pi-sync mode when wrong password was sent.
45 47
46OM/Pi: 48OM/Pi:
47Fixed a crash when displaying mails with "Show mail as html" was checked in the config. 49Fixed a crash when displaying mails with "Show mail as html" was checked in the config.
48Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. 50Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled.
49 51
50********** VERSION 2.0.11 ************ 52********** VERSION 2.0.11 ************
51 53
52Fixed some problems in pi-sync mode 54Fixed some problems in pi-sync mode
53(e.g. details of events were not synced properly) 55(e.g. details of events were not synced properly)
54 56
55********** VERSION 2.0.10 ************ 57********** VERSION 2.0.10 ************
56 58
57KO/Pi: 59KO/Pi:
58In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. 60In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view.
59This is fixed. 61This is fixed.
60Changed the search dialog a bit to make it more user friendly. 62Changed the search dialog a bit to make it more user friendly.
61(E.g.: Removed message box about "no items found" and set key focus to search line edit after search). 63(E.g.: Removed message box about "no items found" and set key focus to search line edit after search).
62 64
63Added config option to hide the week number in KO/Pi toolbar. 65Added config option to hide the week number in KO/Pi toolbar.
64 66
65********** VERSION 2.0.9 ************ 67********** VERSION 2.0.9 ************
66 68
67Made month view icons for multiday events a bit nicer. 69Made month view icons for multiday events a bit nicer.
68Some minor fixes in KO/Pi 70Some minor fixes in KO/Pi
69(e.g. go to today did not work for new week view properly). 71(e.g. go to today did not work for new week view properly).
70 72
71 73
72********** VERSION 2.0.8 ************ 74********** VERSION 2.0.8 ************
73 75
74Fixed a problem in dependency info in the ipk files for the Zaurus. 76Fixed a problem in dependency info in the ipk files for the Zaurus.
75 77
76Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. 78Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar.
77 79
78Added a "go today" button to the datepicker. 80Added a "go today" button to the datepicker.
79 81
80Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) 82Added "created" and "last modified" to event/todo viewer (and What'sThis viewer)
81and made it configureable to show these values. 83and made it configureable to show these values.
82 84
83Fixed a problem for events (from external iCal files) that do have a duration but no end date. 85Fixed a problem for events (from external iCal files) that do have a duration but no end date.
84 86
85 87
86********** VERSION 2.0.7 ************ 88********** VERSION 2.0.7 ************
87 89
88Added global application font settings 90Added global application font settings
89(for all KDE-Pim/Pi apps) to the general settings. 91(for all KDE-Pim/Pi apps) to the general settings.
90 92
91Fixed a problem in OM/Pi when trying to login to some IMAP servers 93Fixed a problem in OM/Pi when trying to login to some IMAP servers
92(like the IMAP server of Apple: mail.mac.com ) 94(like the IMAP server of Apple: mail.mac.com )
93 95
94Added recurring todos to KO/Pi. 96Added recurring todos to KO/Pi.
95 97
96 98
97********** VERSION 2.0.6 ************ 99********** VERSION 2.0.6 ************
98 100
99Some bugfixes in the pi-sync mode. 101Some bugfixes in the pi-sync mode.
100Added German translation for pi-sync mode. 102Added German translation for pi-sync mode.
101 103
102KO/Pi: 104KO/Pi:
103Made the todolist using alternate background. 105Made the todolist using alternate background.
104 106
105Other minor fixes in KO/Pi. 107Other minor fixes in KO/Pi.
106 108
107 109
108********** VERSION 2.0.5 ************ 110********** VERSION 2.0.5 ************
109 111
110Bugfixes in KO/Pi. 112Bugfixes in KO/Pi.
111 113
112********** VERSION 2.0.4 ************ 114********** VERSION 2.0.4 ************
113 115
114KO/Pi: 116KO/Pi:
115Fixed problem loading translations for summary/location edit boxes in event/todo editor. 117Fixed problem loading translations for summary/location edit boxes in event/todo editor.
116 118
117Added a general "select week number" to the toolbar. 119Added a general "select week number" to the toolbar.
118 120
119Fixed some small problem of the new features introduced in version 2.0.3. 121Fixed some small problem of the new features introduced in version 2.0.3.
120 122
121Made it possible to specify one specific category as category color, 123Made it possible to specify one specific category as category color,
122if more than one categories are selected. 124if more than one categories are selected.
123 125
124Fixed a bug in saving colors for categories with non-ascii characters. 126Fixed a bug in saving colors for categories with non-ascii characters.
125(Like, e.g. German Umlauts). 127(Like, e.g. German Umlauts).
126Propably you have to set your colors again for those categories. 128Propably you have to set your colors again for those categories.
127 129
128 130
129********** VERSION 2.0.3 ************ 131********** VERSION 2.0.3 ************
130 132
131KO/Pi: 133KO/Pi:
132Added feature for changing alarm settings for many items at once: 134Added feature for changing alarm settings for many items at once:
133Open list view (or search dialog), select the desired items and choose in 135Open list view (or search dialog), select the desired items and choose in
134the popup menu: Set alarm for selected... 136the popup menu: Set alarm for selected...
135 137
136Added to the event/todo viewer the option to send an email to 138Added to the event/todo viewer the option to send an email to
137all attendees or all selected (with RSVP) attendees. 139all attendees or all selected (with RSVP) attendees.
138 140
139Made the week-month mode changing in month view faster. 141Made the week-month mode changing in month view faster.
140 142
141Made month view better useable with keyboard. 143Made month view better useable with keyboard.
142Now TAB key jumps to next cell with an event/todo. 144Now TAB key jumps to next cell with an event/todo.
143Scroll in cell with coursor keys, scroll in time (next week) with 145Scroll in cell with coursor keys, scroll in time (next week) with
144Shift/Control + coursorkeys. 146Shift/Control + coursorkeys.
145 147
146Fixed bug that the todo view flat mode was reset after first view update. 148Fixed bug that the todo view flat mode was reset after first view update.
147 149
148If a todo is displayed closed in the todo view, 150If a todo is displayed closed in the todo view,
149it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. 151it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties.
150 152
151Added info about the numbers of years to the caption (title) information about a birthday event. 153Added info about the numbers of years to the caption (title) information about a birthday event.
152 154
153Made completion date in todo editor editable. 155Made completion date in todo editor editable.
154 156
155Added possibility to save/load templates for journals. 157Added possibility to save/load templates for journals.
156(Which is just a simple "save text to file" or "insert text from file". 158(Which is just a simple "save text to file" or "insert text from file".
157 159
158********** VERSION 2.0.2 ************ 160********** VERSION 2.0.2 ************
159 161
160KO/Pi: 162KO/Pi:
161Fixed the layout problem of the day label buttons 163Fixed the layout problem of the day label buttons
162of the agenda view introduced in version 2.0.1. 164of the agenda view introduced in version 2.0.1.
163 165
164Added WhatsThis support for the todo view and the list view. 166Added WhatsThis support for the todo view and the list view.
165 167
166Added a quite useful feature to the montview. 168Added a quite useful feature to the montview.
167Just click on the week numbers on the left. 169Just click on the week numbers on the left.
168And in the top right corner of month view/agenda view 170And in the top right corner of month view/agenda view
169there is now a "week number quick selector". 171there is now a "week number quick selector".
170(Click on the black triangle). 172(Click on the black triangle).
171 173
172Made the quite difficult timezone change in KO/Pi easy. 174Made the quite difficult timezone change in KO/Pi easy.
173 175
174OM/Pi: 176OM/Pi:
175Fixed too small icons on desktop. 177Fixed too small icons on desktop.
176Fixed non visible icons in mainwindow on Z with fastload enabled. 178Fixed non visible icons in mainwindow on Z with fastload enabled.
177Added signature file setting to smtp account config. 179Added signature file setting to smtp account config.
178And the signature can be edited and saved in the edit mail dialog. 180And the signature can be edited and saved in the edit mail dialog.
179That does mean: 181That does mean:
180Simply edit the signature for the selected smtp account in the 182Simply edit the signature for the selected smtp account in the
181edit new mail dialog and press the "save signature" button there. 183edit new mail dialog and press the "save signature" button there.
182Then the signature is saved to the file specified in the smtp account settings. 184Then the signature is saved to the file specified in the smtp account settings.
183If there is no file specified, it is saved automatically to the file 185If there is no file specified, it is saved automatically to the file
184kdepim/apps/kopiemail/<accountname>.sig. 186kdepim/apps/kopiemail/<accountname>.sig.
185 187
186 188
187 189
188********** VERSION 2.0.1 ************ 190********** VERSION 2.0.1 ************
189 191
190Oooops ... I forgot to test on the Zaurus 5500 ... 192Oooops ... I forgot to test on the Zaurus 5500 ...
191 193
192Fixed many problems of new (english) strings (and german translations) 194Fixed many problems of new (english) strings (and german translations)
193introduced in the latest versions, where the text was not fitting on the 195introduced in the latest versions, where the text was not fitting on the
194240x320 display of the Zaurus 5500. 196240x320 display of the Zaurus 5500.
195 197
196KO/Pi: 198KO/Pi:
197Added a popup menu ( press pen and hold to get popup ) to the agenda view 199Added a popup menu ( press pen and hold to get popup ) to the agenda view
198with many useful items (add event/todo, show next week, two weeks, month, journal). 200with many useful items (add event/todo, show next week, two weeks, month, journal).
199 201
200Added items to the todolist popup menu for: 202Added items to the todolist popup menu for:
201Display all opened, all closed or all todos flat. 203Display all opened, all closed or all todos flat.
202The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 204The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
203Made the reparenting of todos on the desktop possible via Drag&Drop. 205Made the reparenting of todos on the desktop possible via Drag&Drop.
204Fixed several bugs in setting the completed datetime for todos. 206Fixed several bugs in setting the completed datetime for todos.
205Added info about completed datetime of todos to the todo viewer. 207Added info about completed datetime of todos to the todo viewer.
206Now displaying a completed todo (with completed datetime set) in the agenda view 208Now displaying a completed todo (with completed datetime set) in the agenda view
207at the time of the completion. Such that now it is possible to see in the agenda view 209at the time of the completion. Such that now it is possible to see in the agenda view
208when what todo was completed. 210when what todo was completed.
209Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 211Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
210Now the behaviour is: 212Now the behaviour is:
211Setting a parent to complete sets all (sub)childs to complete. 213Setting a parent to complete sets all (sub)childs to complete.
212Setting a parent to uncomplete does not change the childs. 214Setting a parent to uncomplete does not change the childs.
213Setting a child to uncomplete sets all parent to uncomplete. 215Setting a child to uncomplete sets all parent to uncomplete.
214Setting a child to complete does not change the parents. 216Setting a child to complete does not change the parents.
215 217
216Smart updating and double buffering of the daymatrix. 218Smart updating and double buffering of the daymatrix.
217Showing holidays in the day matrix. 219Showing holidays in the day matrix.
218Many other small performance updates. 220Many other small performance updates.
219 221
220Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 222Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
221 223
222Now the translation file usertranslation.txt is supposed to be in utf8 format. 224Now the translation file usertranslation.txt is supposed to be in utf8 format.
223If 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. 225If 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.
224 226
225 227
226********** VERSION 2.0.0 ************ 228********** VERSION 2.0.0 ************
227 229
228Stable release 2.0.0! 230Stable release 2.0.0!
229 231
230KO/Pi: 232KO/Pi:
231Fixed problem in edit dialog recreation at startup. 233Fixed problem in edit dialog recreation at startup.
232Made "toggle view*" menu items enabled context sensitive. 234Made "toggle view*" menu items enabled context sensitive.
233Changed agenda size menu to items 1-10. 235Changed agenda size menu to items 1-10.
234Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 236Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
235Usebility enhancements in the KO/Pi menus. 237Usebility enhancements in the KO/Pi menus.
236Birthday import now adds year to summary. 238Birthday import now adds year to summary.
237What's Next view shows age in years for birthday. 239What's Next view shows age in years for birthday.
238 240
239OM/Pi: 241OM/Pi:
240Added three info lines to display subject, from and to of selected mails. 242Added three info lines to display subject, from and to of selected mails.
241 243
242KA/Pi: 244KA/Pi:
243Fixed jump bar behaviour on Zaurus. 245Fixed jump bar behaviour on Zaurus.
244Now KA/Pi search field supports searching for a range of starting characters. 246Now KA/Pi search field supports searching for a range of starting characters.
245E.g. to search for all contact beginning with b to n, type 247E.g. to search for all contact beginning with b to n, type
246b-n 248b-n
247in the search field. 249in the search field.
248 250
249********** VERSION 1.9.20 ************ 251********** VERSION 1.9.20 ************
250 252
251KO/Pi: 253KO/Pi:
252Added for the "dislplay one day" agenda mode 254Added for the "dislplay one day" agenda mode
253info in the caption and in the day lables: 255info in the caption and in the day lables:
254Now it is displayed, if the selected day is from "day before yesterday" 256Now it is displayed, if the selected day is from "day before yesterday"
255to "day after tomorrow". 257to "day after tomorrow".
256Made it possible to delete a Todo, which has sub-todos. 258Made it possible to delete a Todo, which has sub-todos.
257Fixed two small problems in the todo view. 259Fixed two small problems in the todo view.
258Added missing German translation for filter edit and print dialog. 260Added missing German translation for filter edit and print dialog.
259Made search dialog closeable by cancel key. 261Made search dialog closeable by cancel key.
260 262
261Made it possible to select in the date picker the (ligt grey ) 263Made it possible to select in the date picker the (ligt grey )
262dates of the prev./next month with the mouse. 264dates of the prev./next month with the mouse.
263 265
264OM/Pi: 266OM/Pi:
265"Delete mail" icon in main window now deletes all selected mails. 267"Delete mail" icon in main window now deletes all selected mails.
266Fixed the problem, that the state flag of imap mails was ignored. 268Fixed the problem, that the state flag of imap mails was ignored.
267Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 269Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
268to indecate that they are already seen. 270to indecate that they are already seen.
269Fixed the problem that the body of some mails was not displayed in the 271Fixed the problem that the body of some mails was not displayed in the
270mail viewer when fetching them from the imap server directly to read them. 272mail viewer when fetching them from the imap server directly to read them.
271Made it (configurable) possible to show the "To:" field in the list view. 273Made it (configurable) possible to show the "To:" field in the list view.
272Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 274Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
273Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 275Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
274local storage folder (specified in account settings) of the account of the mail. 276local storage folder (specified in account settings) of the account of the mail.
275Removed some memory leaks in OM/Pi. 277Removed some memory leaks in OM/Pi.
276 278
277 279
278********** VERSION 1.9.19 ************ 280********** VERSION 1.9.19 ************
279 281
280Added a lot of missing translations to KA/Pi, 282Added a lot of missing translations to KA/Pi,
281Added some missing translations to KO/Pi and OM/Pi. 283Added some missing translations to KO/Pi and OM/Pi.
282 284
283Fixed some minor problems in KA/Pi + KO/Pi. 285Fixed some minor problems in KA/Pi + KO/Pi.
284 286
285Fixed a crash when closing PwM/Pi. 287Fixed a crash when closing PwM/Pi.
286Added German translation for PwM/Pi. 288Added German translation for PwM/Pi.
287 289
288Made view change and Month View update faster in KO/Pi. 290Made view change and Month View update faster in KO/Pi.
289 291
290 292
291********** VERSION 1.9.18 ************ 293********** VERSION 1.9.18 ************
292 294
293FYI: The VERSION 1.9.17 was a testing release only. 295FYI: The VERSION 1.9.17 was a testing release only.
294Please read the changelog of VERSION 1.9.17 as well. 296Please read the changelog of VERSION 1.9.17 as well.
295 297
296Cleaned up the syncing config dialog. 298Cleaned up the syncing config dialog.
297Added sync config options for date range for events. 299Added sync config options for date range for events.
298Added sync config options for filters on incoming data. 300Added sync config options for filters on incoming data.
299Added sync config options for filters on outgoing data. 301Added sync config options for filters on outgoing data.
300Please read the updated SyncHowTo about the new filter settings. 302Please read the updated SyncHowTo about the new filter settings.
301These filter settings make it now possible to sync with shared 303These filter settings make it now possible to sync with shared
302calendars without writing back private or confidential data 304calendars without writing back private or confidential data
303(via the outgoing filters). 305(via the outgoing filters).
304To sync only with particular parts of a shared calendar, 306To sync only with particular parts of a shared calendar,
305the incoming filter settings can be used. 307the incoming filter settings can be used.
306An example can be found in the SyncHowTo. 308An example can be found in the SyncHowTo.
307Same for shared addressbooks. 309Same for shared addressbooks.
308 310
309Added a setting for the global kdepim data storage. 311Added a setting for the global kdepim data storage.
310Usually the data is stored in (yourhomedir/kdepim). 312Usually the data is stored in (yourhomedir/kdepim).
311Now you can set in the Global config dialog TAB, subTAB "Data storage path" 313Now you can set in the Global config dialog TAB, subTAB "Data storage path"
312a directory where all the kdepim data is stored. 314a directory where all the kdepim data is stored.
313That makes it easy to save all kdepim data on a SD card on the Z, for example. 315That makes it easy to save all kdepim data on a SD card on the Z, for example.
314 316
315KO/Pi: 317KO/Pi:
316The timeedit input has a pulldown list for times. 318The timeedit input has a pulldown list for times.
317If opened, this pulldown list should now has the right time highlighted. 319If opened, this pulldown list should now has the right time highlighted.
318Added the possibility to exclude events/todos/journals in a filter. 320Added the possibility to exclude events/todos/journals in a filter.
319You should exclude journals, if you do not want them to sync with a public calendar. 321You should exclude journals, if you do not want them to sync with a public calendar.
320 322
321KA/Pi: 323KA/Pi:
322Added the possibility to in/exclude public/private/confidential contacts to a filter. 324Added the possibility to in/exclude public/private/confidential contacts to a filter.
323If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 325If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
324Added printing of card view and details view on desktop. 326Added printing of card view and details view on desktop.
325Printing of list view is not working... 327Printing of list view is not working...
326Added button for removing pictures in contact editor. 328Added button for removing pictures in contact editor.
327Parsing data fix of KA/Pi version 1.9.17. 329Parsing data fix of KA/Pi version 1.9.17.
328Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 330Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
329Fixed some syncing merging problems. 331Fixed some syncing merging problems.
330 332
331 333
332********** VERSION 1.9.17 ************ 334********** VERSION 1.9.17 ************
333 335
334KO/Pi: 336KO/Pi:
335Fixed that tooltips were not updated after moving an item in agenda view. 337Fixed that tooltips were not updated after moving an item in agenda view.
336Fixed a bug in sorting start date for recurring events in list view. 338Fixed a bug in sorting start date for recurring events in list view.
337Changed the left button in todo viewer from "Agenda" to "Set completed". 339Changed the left button in todo viewer from "Agenda" to "Set completed".
338This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. 340This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
339Added more info in the todo viewer: Startdate, parent/sub todos. 341Added more info in the todo viewer: Startdate, parent/sub todos.
340 342
341 343
342KA/Pi: 344KA/Pi:
343All fields search does now actually search all the (possible) fields, 345All fields search does now actually search all the (possible) fields,
344not only those listed in the contact list. 346not only those listed in the contact list.
345Made is possible to inline a picture in a vcard on the Z. 347Made is possible to inline a picture in a vcard on the Z.
346This was only possible on the desktop, now is it possible on the Z as well. 348This was only possible on the desktop, now is it possible on the Z as well.
347Fixed of missing save settings after filter configuration. 349Fixed of missing save settings after filter configuration.
348Made saving of addressbook much faster. 350Made saving of addressbook much faster.
349Fixed extension widget layout problem. 351Fixed extension widget layout problem.
350Fixed saving of default formatted name settings. 352Fixed saving of default formatted name settings.
351Fixed formatted name handling in edit dialog. 353Fixed formatted name handling in edit dialog.
352Added an option for changing formatted names of many contacts 354Added an option for changing formatted names of many contacts
353(menu: File - Change - Set formatted name). 355(menu: File - Change - Set formatted name).
354 356
355QWhatsThis was not working on the Z ( only black rectangle was shown). 357QWhatsThis was not working on the Z ( only black rectangle was shown).
356This is Fixed. 358This is Fixed.
357 359
358KDE-Sync: 360KDE-Sync:
359Now readonly KDE resources are synced as well. 361Now readonly KDE resources are synced as well.
360(They are not changed in KDE itself, of course). 362(They are not changed in KDE itself, of course).
361 363
362 364
363 365
364********** VERSION 1.9.16 ************ 366********** VERSION 1.9.16 ************
365 367
366KO/Pi: 368KO/Pi:
367Fixed search dialog size on Z 6000 (480x640 display). 369Fixed search dialog size on Z 6000 (480x640 display).
368Added setting to hide/show time in agenda items. 370Added setting to hide/show time in agenda items.
369Added setting to hide not running todos in todo view. 371Added setting to hide not running todos in todo view.
370Added columns for start date/time in todo view. 372Added columns for start date/time in todo view.
371Replaced the solid half-hour lines in agenda view by dot lines. 373Replaced the solid half-hour lines in agenda view by dot lines.
372Added possibility of printing the What's Next View on the desktop 374Added possibility of printing the What's Next View on the desktop
373(i.e. Windows and Linux). 375(i.e. Windows and Linux).
374Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 376Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
375Added tooltips in month view.(Tooltips only available on desktop) 377Added tooltips in month view.(Tooltips only available on desktop)
376 378
377Fixed a strange problem in KO/Pi alarm applet. 379Fixed a strange problem in KO/Pi alarm applet.
378Did not find the actual problem, 380Did not find the actual problem,
379such that now Qtopia reboots again if deinstalling the alarm applet. 381such that now Qtopia reboots again if deinstalling the alarm applet.
380But the alarm applet should work again. 382But the alarm applet should work again.
381 383
382KA/Pi: 384KA/Pi:
383Fixed the problem, that internal pictures were not saved. 385Fixed the problem, that internal pictures were not saved.
384 386
385Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 387Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
386 388
387Fixed some minor problems. (Like word wrap in help text windows). 389Fixed some minor problems. (Like word wrap in help text windows).
388 390
389Fixed a compiling problem in microkde/kresources. 391Fixed a compiling problem in microkde/kresources.
390 392
391KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 393KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
392This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 394This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
393such that now syncing KO/Pi with Sharp DTM should work on the 395such that now syncing KO/Pi with Sharp DTM should work on the
394Zaurus C 3000 model. 396Zaurus C 3000 model.
395 397
396********** VERSION 1.9.15 ************ 398********** VERSION 1.9.15 ************
397 399
398Usebilty enhancements in KO/Pi: 400Usebilty enhancements in KO/Pi:
399When clicking on the date in a month view cell, the day view is shown. 401When clicking on the date in a month view cell, the day view is shown.
400Old behaviour was, that the "new event" dialog popped up. 402Old behaviour was, that the "new event" dialog popped up.
401 403
402Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 404Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
403That means, you can restore the latest 405That means, you can restore the latest
404event/todo/journal you have deleted. 406event/todo/journal you have deleted.
405A journal is deleted, if you clear all the text of the journal. 407A journal is deleted, if you clear all the text of the journal.
406 408
407Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 409Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
408 410
409KA/Pi starting in 480x640 resolution: 411KA/Pi starting in 480x640 resolution:
410Hide the filter action in toolbar 412Hide the filter action in toolbar
411and added icons for undo/delete/redo in toolbar. 413and added icons for undo/delete/redo in toolbar.
412 414
413Change in OM/Pi ViewMail dialog: 415Change in OM/Pi ViewMail dialog:
414When clicking on the "delete" icon the mail is deleted after confirmation as usual. 416When clicking on the "delete" icon the mail is deleted after confirmation as usual.
415But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 417But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
416 418
417Fixed a crash when deleting mail-accounts in OM/Pi. 419Fixed a crash when deleting mail-accounts in OM/Pi.
418 420
419 421
420********** VERSION 1.9.14 ************ 422********** VERSION 1.9.14 ************
421 423
422Fixed some problems with the dialog sizes when switching 424Fixed some problems with the dialog sizes when switching
423portrait/landscape mode on 640x480 PDA display. 425portrait/landscape mode on 640x480 PDA display.
424 426
425Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 427Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
426 428
427Fixed an ugly bug in KOpieMail: 429Fixed an ugly bug in KOpieMail:
428KOpieMail was not able to write files (mails) to MSDOS file system, 430KOpieMail was not able to write files (mails) to MSDOS file system,
429like on an usual preformatted SD card. That should work now. 431like on an usual preformatted SD card. That should work now.
430To save your mail data on the Sd card do the following: 432To save your mail data on the Sd card do the following:
431Create a dir on the SD card: 433Create a dir on the SD card:
432mkdir /mnt/card/localmail 434mkdir /mnt/card/localmail
433Go to your home dir: 435Go to your home dir:
434cd 436cd
435Go to kopiemail data storage dir: 437Go to kopiemail data storage dir:
436cd kdepim/apps/kopiemail 438cd kdepim/apps/kopiemail
437Create a symlink to the SD card: 439Create a symlink to the SD card:
438ls -s /mnt/card/localmail 440ls -s /mnt/card/localmail
439Now KOpieMail will store all mails on the SD card. 441Now KOpieMail will store all mails on the SD card.
440 442
441KO/Pi Monthview: 443KO/Pi Monthview:
442Now "Go to Today" selects the current month from day 1-end, 444Now "Go to Today" selects the current month from day 1-end,
443not the current date + some days. 445not the current date + some days.
444I.e. "Go to Today" shows now always 446I.e. "Go to Today" shows now always
445the current month with first day of month in the first row. 447the current month with first day of month in the first row.
446 448
447Added missing German translation. 449Added missing German translation.
448 450
449Fixed icons of executeable on Wintendo. 451Fixed icons of executeable on Wintendo.
450 452
451Added a "Show next Mail" button to the OM/Pi 453Added a "Show next Mail" button to the OM/Pi
452mail viewer such that the mail below the current mail 454mail viewer such that the mail below the current mail
453in the mail list view of the current folder 455in the mail list view of the current folder
454can be read with a single click. 456can be read with a single click.
455 457
456 458
457********** VERSION 1.9.13 ************ 459********** VERSION 1.9.13 ************
458 460
459Fixed nasty PwM/Pi file reading bug, when 461Fixed nasty PwM/Pi file reading bug, when
460the used hash algo of file is different then the global 462the used hash algo of file is different then the global
461hash algo. 463hash algo.
462 464
463Added KA/Pi support for opie mailit mailapplication. 465Added KA/Pi support for opie mailit mailapplication.
464 466
465Fixed some bugs in OM/Pi. 467Fixed some bugs in OM/Pi.
466Now character conversion tables are available for the Zaurus 468Now character conversion tables are available for the Zaurus
467to make OM/Pi working properly. 469to make OM/Pi working properly.
468To get the character conversion in OM/Pi working, please download 470To get the character conversion in OM/Pi working, please download
469at the sourceforge project site the package 471at the sourceforge project site the package
470sr-character-conversion_SharpROM_arm.ipk.zip 472sr-character-conversion_SharpROM_arm.ipk.zip
471(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 473(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
472from the section "general files for KDE/Pim" 474from the section "general files for KDE/Pim"
473Instructions how to install this package are in a ReadMe in this file. 475Instructions how to install this package are in a ReadMe in this file.
474 476
475 477
476Fixed the orientation change problem in KA/Pi when switching 478Fixed the orientation change problem in KA/Pi when switching
477portrait/landscape mode. 479portrait/landscape mode.
478 480
479French translation available for KA/Pi and OM/Pi. 481French translation available for KA/Pi and OM/Pi.
480 482
481Fixed some problems with categories in KO/Pi in DTM sync. 483Fixed some problems with categories in KO/Pi in DTM sync.
482 484
483Added selection dialog for export to phone in KA/Pi. 485Added selection dialog for export to phone in KA/Pi.
484 486
485If in KO/Pi is an attendee selected to add to a meeting and this 487If in KO/Pi is an attendee selected to add to a meeting and this
486attendee is already in the list of attendees, this person is not added 488attendee is already in the list of attendees, this person is not added
487again. 489again.
488 490
489Some menu cleanup in KA/Pi. 491Some menu cleanup in KA/Pi.
490 492
491********** VERSION 1.9.12 ************ 493********** VERSION 1.9.12 ************
492 494
493Fix for the bug in KO/Pi What's Next view of version 1.9.11. 495Fix for the bug in KO/Pi What's Next view of version 1.9.11.
494 496
495Bugfix: Licence file is now shown again. 497Bugfix: Licence file is now shown again.
496 498
497OM/Pi now supports Unicode (utf8 charset). 499OM/Pi now supports Unicode (utf8 charset).
498Fixed some bugs in OM/Pi. 500Fixed some bugs in OM/Pi.
499 501
500KA/Pi has more German translation. 502KA/Pi has more German translation.
501 503
502 504
503********** VERSION 1.9.11 ************ 505********** VERSION 1.9.11 ************
504 506
505Fixed several problems in PWM/Pi, like 507Fixed several problems in PWM/Pi, like
506asking the user, if unsaved changed are pending 508asking the user, if unsaved changed are pending
507when closing the app. 509when closing the app.
508And PwM/Pi handles now different texts for the 510And PwM/Pi handles now different texts for the
509fields Description, Username, Password, configurable per category. 511fields Description, Username, Password, configurable per category.
510 512
511Fixed a crash in KO/Pi , when importing/loading vcs files 513Fixed a crash in KO/Pi , when importing/loading vcs files
512which have an entry with an attendee with state: 514which have an entry with an attendee with state:
513NEEDS ACTION 515NEEDS ACTION
514 516
515Fixed some problems in the German translation of OM/Pi, 517Fixed some problems in the German translation of OM/Pi,
516which makes some dialogs not fitting on the screen 518which makes some dialogs not fitting on the screen
517of the Z 5500. 519of the Z 5500.
518 520
519Fixed Qtopia crash, when disabling/deinstalling 521Fixed Qtopia crash, when disabling/deinstalling
520KO/Pi alarm applet. 522KO/Pi alarm applet.
521 523
522Implemented direct KDE<->KA/Pi sync for KA/Pi running 524Implemented direct KDE<->KA/Pi sync for KA/Pi running
523on Linux desktop. 525on Linux desktop.
524 526
525Added feature "remove sync info" to sync menu. 527Added feature "remove sync info" to sync menu.
526 528
527Tweaked the KO/Pi What's next view a bit, added 529Tweaked the KO/Pi What's next view a bit, added
528setting to hide events that are done. 530setting to hide events that are done.
529 531
530Disabled "beam receive enabled" on startup to 532Disabled "beam receive enabled" on startup to
531avoid problems if Fastload is enabled. 533avoid problems if Fastload is enabled.
532Please set "beam receive enabled", 534Please set "beam receive enabled",
533if you want to receive data via IR. 535if you want to receive data via IR.
534 536
535Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 537Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
536on Linux desktop. 538on Linux desktop.
537 539
538Made in KA/Pi scrolling possible, if details view is selected. 540Made in KA/Pi scrolling possible, if details view is selected.
539(The keyboard focus is set automatically to the search line) 541(The keyboard focus is set automatically to the search line)
540 542
541Fixed a bug in DMT sync, that a new entry in DTM was added 543Fixed a bug in DMT sync, that a new entry in DTM was added
542on every sync to Kx/Pi. 544on every sync to Kx/Pi.
543 545
544Fixed missing writing of KA/Pi categories to DMT entries when syncing. 546Fixed missing writing of KA/Pi categories to DMT entries when syncing.
545 547
546Fixed a bug in DMT sync with todos created in KO/Pi containing 548Fixed a bug in DMT sync with todos created in KO/Pi containing
547non-latin1 characters. 549non-latin1 characters.
548 550
549Rearranged package contents of Sharp-ipks and made all 551Rearranged package contents of Sharp-ipks and made all
550packages installable on SD again. 552packages installable on SD again.
551 553
552Fixed the writing of addressbook data in DTM sync. 554Fixed the writing of addressbook data in DTM sync.
553Empty fields in KA/Pi were not removed. 555Empty fields in KA/Pi were not removed.
554 556
555Added better category handling in KA/Pi: 557Added better category handling in KA/Pi:
556Added item 558Added item
557Edit Categories and 559Edit Categories and
558Manage new categories 560Manage new categories
559to the settings menu. 561to the settings menu.
560Possible to configure a view to display categories. 562Possible to configure a view to display categories.
561 563
562Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 564Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
563 565
564Fixed displaying of "free" days and time in KO Monthview and Agendaview. 566Fixed displaying of "free" days and time in KO Monthview and Agendaview.
565 567
566... and many other bugfixes. 568... and many other bugfixes.
567 569
568********** VERSION 1.9.10 ************ 570********** VERSION 1.9.10 ************
569 571
570Many internal small bugfixes. 572Many internal small bugfixes.
571And fix of the "big" bug in KO/Pi, 573And fix of the "big" bug in KO/Pi,
572that after Syncing the appointments had an offset by several hours. 574that after Syncing the appointments had an offset by several hours.
573That was a problem with the internal timezone setting, 575That was a problem with the internal timezone setting,
574introduced by the changed timezone configuration settings. 576introduced by the changed timezone configuration settings.
575 577
576German translation for OM/Pi is now available. 578German translation for OM/Pi is now available.
577 579
578 580
579********** VERSION 1.9.9 ************ 581********** VERSION 1.9.9 ************
580 582
581KDE-Pim/Pi has a new Member! 583KDE-Pim/Pi has a new Member!
582It is called PWM/Pi (Passwordmanager/platform-independent) 584It is called PWM/Pi (Passwordmanager/platform-independent)
583and it is available for the Zaurus. 585and it is available for the Zaurus.
584It is planned, that it will be available later for Windows. 586It is planned, that it will be available later for Windows.
585(And for Linux, of course). 587(And for Linux, of course).
586It is a port of the Passwordmanager of KDE. 588It is a port of the Passwordmanager of KDE.
587It will need the MicroKDElibs to run. 589It will need the MicroKDElibs to run.
588 590
589Made loading of addressbooks in KA/Pi up to 7 times faster! 591Made loading of addressbooks in KA/Pi up to 7 times faster!
590The bigger your addressbook file, the more starting speed 592The bigger your addressbook file, the more starting speed
591will you gain. (relatively) 593will you gain. (relatively)
592 594
593The Qtopia addressbook connector is now platform independend 595The Qtopia addressbook connector is now platform independend
594as well and should work on any platform for importing/exporting 596as well and should work on any platform for importing/exporting
595Qtopia and Opie XML files. 597Qtopia and Opie XML files.
596 598
597Added a +30min feature to the timezone settings to make 599Added a +30min feature to the timezone settings to make
598KDE-Pim/Pi useable in Australia and other parts on the 600KDE-Pim/Pi useable in Australia and other parts on the
599world with strange timezones ;-) 601world with strange timezones ;-)
600 602
601German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 603German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
602 604
603It is now possible to disable the 605It is now possible to disable the
604"receive data via infrared" feature, such that syncing with 606"receive data via infrared" feature, such that syncing with
605Outlook is now possible again with Kx/Pi runing. 607Outlook is now possible again with Kx/Pi runing.
606Please disable it, before syncing Sharp DTM with Outlook. 608Please disable it, before syncing Sharp DTM with Outlook.
607For your convenience, the "receive data via infrared" feature 609For your convenience, the "receive data via infrared" feature
608is disabled automatically, if you sync Kx/Pi with DTM. 610is disabled automatically, if you sync Kx/Pi with DTM.
609You have to enable it again manually after syncing. 611You have to enable it again manually after syncing.
610Enabling this feature makes it impossible to start the 612Enabling this feature makes it impossible to start the
611Sharp DTM apps. If this feature is enabled, you will only get the 613Sharp DTM apps. If this feature is enabled, you will only get the
612alarm notification from KO/Pi and not from the Sharp calendar. 614alarm notification from KO/Pi and not from the Sharp calendar.
613This is very useful if you sync KO/Pi with Sharp DTM, 615This is very useful if you sync KO/Pi with Sharp DTM,
614because after syncing you usually would get notified about 616because after syncing you usually would get notified about
615an alarm by KO/Pi and the Sharp Calendar. 617an alarm by KO/Pi and the Sharp Calendar.
616 618
617Together with the Linux desktop version of KO/Pi 619Together with the Linux desktop version of KO/Pi
618it is now possible to sync KO/Pi on the Zaurus 620it is now possible to sync KO/Pi on the Zaurus
619with the complete KDE-desktop (3.3 or later) 621with the complete KDE-desktop (3.3 or later)
620calendar data easily. 622calendar data easily.
621That makes it possible to sync the Z with one 623That makes it possible to sync the Z with one
622click of a mouse with the KDE-Desktop. 624click of a mouse with the KDE-Desktop.
623This feature it available for all Zaurus platforms KO/Pi 625This feature it available for all Zaurus platforms KO/Pi
624is running on. 626is running on.
625The only thing needed is a running KO/Pi on Linux and 627The only thing needed is a running KO/Pi on Linux and
626a compiled version of the small 628a compiled version of the small
627KDE-Pim/Pi<->KDE-Desktop access command line program, 629KDE-Pim/Pi<->KDE-Desktop access command line program,
628which is in the KDE-Pim/Pi sources available. 630which is in the KDE-Pim/Pi sources available.
629 631
630The "KDE-desktop" syncing feature for KA/Pi will follow 632The "KDE-desktop" syncing feature for KA/Pi will follow
631in the next releases. 633in the next releases.
632 634
633Fixed the vcard export bug, which had the version 1.9.8. 635Fixed the vcard export bug, which had the version 1.9.8.
634 636
635Added missing GERMAN translation to KO/Pi. 637Added missing GERMAN translation to KO/Pi.
636Hi PsionX, could you add the missing french translation?Thx! 638Hi PsionX, could you add the missing french translation?Thx!
637 639
638Translation files for KA/Pi are available as well. 640Translation files for KA/Pi are available as well.
639GERMAN translation will be available in the next release. 641GERMAN translation will be available in the next release.
640PsionX ( yres, you again ;-) ), could you start translating 642PsionX ( yres, you again ;-) ), could you start translating
641KA/Pi? Thx! 643KA/Pi? Thx!
642 644
643You can download the version 1.9.9 at 645You can download the version 1.9.9 at
644 646
645http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 647http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
646 648
647Note: 649Note:
648To run the mail program OM/Pi you need libopenssl. 650To run the mail program OM/Pi you need libopenssl.
649A link to a download loaction is available at 651A link to a download loaction is available at
650ZSI at www.killefiz.de 652ZSI at www.killefiz.de
651 653
652 654
653********** VERSION 1.9.8 ************ 655********** VERSION 1.9.8 ************
654 656
655Fixed character decoding in OM/Pi. 657Fixed character decoding in OM/Pi.
656(e.g. German "Umlaute" were not displayed properly.) 658(e.g. German "Umlaute" were not displayed properly.)
657 659
658Made is possible to reparent todos in KO/Pi. 660Made is possible to reparent todos in KO/Pi.
659Use contextmenu or keys (look at Help-Keys + Colors) for that. 661Use contextmenu or keys (look at Help-Keys + Colors) for that.
660 662
661Added the missing Sync-Howto and WhatsNew to the packages. 663Added the missing Sync-Howto and WhatsNew to the packages.
662 664
663KO/Pi on Linux desktop can now sync with KDE desktop. 665KO/Pi on Linux desktop can now sync with KDE desktop.
664That means: When using KO/Pi on Linux desktop for syncing with 666That means: When using KO/Pi on Linux desktop for syncing with
665KDE desktop and the Zaurus, the Zaurus can be synced now 667KDE desktop and the Zaurus, the Zaurus can be synced now
666with all KDE-Calendar resources, not only with one local file. 668with all KDE-Calendar resources, not only with one local file.
667(That makes it possible to sync the Zaurus with the 669(That makes it possible to sync the Zaurus with the
668calendar data on a Kolab server) 670calendar data on a Kolab server)
669 671
670KA/Pi syncing with KDE desktop will be available in the next version. 672KA/Pi syncing with KDE desktop will be available in the next version.
671 673
672 674
673********** VERSION 1.9.7 ************ 675********** VERSION 1.9.7 ************
674 676
675KO/Pi - KA/Pi on Windows: 677KO/Pi - KA/Pi on Windows:
676Now a directory can be defined by the user, where the 678Now a directory can be defined by the user, where the
677application/config data should be saved. 679application/config data should be saved.
678 Define your desired path in the evironment variable 680 Define your desired path in the evironment variable
679 MICROKDEHOME 681 MICROKDEHOME
680 before starting KO/Pi or KA/Pi. 682 before starting KO/Pi or KA/Pi.
681 683
682An easy Kx/Pi to Kx/Pi syncing is now possible 684An easy Kx/Pi to Kx/Pi syncing is now possible
683(it is called Pi-Sync) via network. 685(it is called Pi-Sync) via network.
684Please look at the Sync Howto. 686Please look at the Sync Howto.
685 687
686Exporting of calendar data and contacts to mobile phones is now possible. 688Exporting of calendar data and contacts to mobile phones is now possible.
687The SyncHowto is updated with information howto 689The SyncHowto is updated with information howto
688access/sync mobile phones. 690access/sync mobile phones.
689Please look at the Sync Howto. 691Please look at the Sync Howto.
690 692
691Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 693Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
692Please disable Fastload for the original contact/calendar applications 694Please disable Fastload for the original contact/calendar applications
693and close them. 695and close them.
694KO/Pi and KA/Pi must be running in order to receive the data. 696KO/Pi and KA/Pi must be running in order to receive the data.
695(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 697(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
696 698
697In the KA/Pi details view are now the preferred tel. numbers displayed on top 699In the KA/Pi details view are now the preferred tel. numbers displayed on top
698of the other data ( emails/tel.numbers/addresses) 700of the other data ( emails/tel.numbers/addresses)
699 701
700Fixed some syncing problems in KA/Pi. 702Fixed some syncing problems in KA/Pi.
701 703
702Added font settings for the KA/Pi details view. 704Added font settings for the KA/Pi details view.
703Added fields "children's name" and "gender" to KA/Pi. 705Added fields "children's name" and "gender" to KA/Pi.
704 706
705Made searching in KA/Pi better: 707Made searching in KA/Pi better:
706Now the first item in a view is selected after a search automatically and 708Now the first item in a view is selected after a search automatically and
707the views can be scrolled up/down when the search input field has the keyboard focus. 709the views can be scrolled up/down when the search input field has the keyboard focus.
708 710
709And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 711And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
710 712
711 713
712********** VERSION 1.9.6 ************ 714********** VERSION 1.9.6 ************
713 715
714Changes in the external application communication on the Zaurus 716Changes in the external application communication on the Zaurus
715in order to use less RAM when the apps are running. 717in order to use less RAM when the apps are running.
716First syncing of addressbooks (KA/Pi) is possible. 718First syncing of addressbooks (KA/Pi) is possible.
717 719
718 720
719********** VERSION 1.9.5a ************ 721********** VERSION 1.9.5a ************
720 722
721Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 723Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
722Fixed some small bugs. 724Fixed some small bugs.
723KA/Pi shows now the birthday in summary view. 725KA/Pi shows now the birthday in summary view.
724Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 726Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
725for displaying dates. 727for displaying dates.
726 728
727 729
728********** VERSION 1.9.5 ************ 730********** VERSION 1.9.5 ************
729 731
730There is still no Addressbook syncing! 732There is still no Addressbook syncing!
731 733
732New in 1.9.5: 734New in 1.9.5:
733 735
734Many bugfixes. 736Many bugfixes.
735Better searching in KA/Pi. 737Better searching in KA/Pi.
736You can configure in KA/Pi if you want to search only after 738You can configure in KA/Pi if you want to search only after
737<return> key pressed. 739<return> key pressed.
738 740
739Better mail downloading in OM/Pi. 741Better mail downloading in OM/Pi.
740 742
741First experimental alpha version of sync of KO/Pi with mobile phones. 743First experimental alpha version of sync of KO/Pi with mobile phones.
742See gammu documentation for supported phones. 744See gammu documentation for supported phones.
743You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. 745You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp.
744Quick hint how to use: 746Quick hint how to use:
745NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 747NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
746Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 748Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
747Create syncprofile - mobile device 749Create syncprofile - mobile device
748Remove entry for model. (Leave empty ). 750Remove entry for model. (Leave empty ).
749Enable infrared on Zaurus and your Phone. 751Enable infrared on Zaurus and your Phone.
750Sync. 752Sync.
751To get a more detailed log, start kopi from konsole. 753To get a more detailed log, start kopi from konsole.
752 754
753********** VERSION 1.9.4 ************ 755********** VERSION 1.9.4 ************
754 756
755This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 757This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
756 758
757WARNING: 759WARNING:
758PLEASE BACKUP ALL YOUR DATA! 760PLEASE BACKUP ALL YOUR DATA!
759We have changed a lot and maybe there are some unknown problems. 761We have changed a lot and maybe there are some unknown problems.
760 762
761SYNC HANDLING HAS CHANGED! 763SYNC HANDLING HAS CHANGED!
762Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 764Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
763(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 765(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
764 766
765You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 767You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
766If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. 768If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well.
767 769
768As programs are available: 770As programs are available:
769KO/Pi (korganizer ipk) - a calendar program. 771KO/Pi (korganizer ipk) - a calendar program.
770KA/Pi (kaddressbook ipk ) - an addressbook 772KA/Pi (kaddressbook ipk ) - an addressbook
771OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 773OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
772 774
773An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 775An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
774(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 776(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
775 777
776All the applications are installed in a "Pim" TAB. 778All the applications are installed in a "Pim" TAB.
777If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk 779If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk
778 780
779All the application are integrated. 781All the application are integrated.
780Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. 782Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail.
781 783
782HINT: 784HINT:
783If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 785If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
784 786
785What's new? 787What's new?
786 788
787SYNC HANDLING HAS CHANGED! 789SYNC HANDLING HAS CHANGED!
788Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 790Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
789(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 791(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
790 792
791New in OM/Pi: 793New in OM/Pi:
792When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. 794When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails.
793 795
794New in KO/Pi: 796New in KO/Pi:
795French is now available for KO/Pi. 797French is now available for KO/Pi.
796Choose menu:Actions - Configure:TAB locale 798Choose menu:Actions - Configure:TAB locale
797Syncing has changed. 799Syncing has changed.
798Phone sync available soon. 800Phone sync available soon.
799Not much changes, I cannot remember them ... 801Not much changes, I cannot remember them ...
800 802
801New in KA/Pi: 803New in KA/Pi:
802Beaming possible. 804Beaming possible.
803Sharp DTM readonly access possible( create a new DTM resource ); 805Sharp DTM readonly access possible( create a new DTM resource );
804Better searching possible. 806Better searching possible.
805Search is performed only after pressing the return key. 807Search is performed only after pressing the return key.
806Use wildcard * to specify parts of a name. 808Use wildcard * to specify parts of a name.
807 809
808Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . 810Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * .
809 811
810A big improvement is the new management of the contact access. 812A big improvement is the new management of the contact access.
811In version 1.9.3, every application was using their own addressbook access data. 813In version 1.9.3, every application was using their own addressbook access data.
812That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 814That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
813That was wasting of memory, if you had several hundreds of contacts. 815That was wasting of memory, if you had several hundreds of contacts.
814 816
815Now only KA/Pi accesses the addressbook. 817Now only KA/Pi accesses the addressbook.
816If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. 818If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them.
817If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 819If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
818That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 820That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
819 821
820New in the KO/Pi alarm applet: 822New in the KO/Pi alarm applet:
821Configure your own timer popup menu! 823Configure your own timer popup menu!
822(Text and minutes for timer countdown) 824(Text and minutes for timer countdown)
823Just edit the file 825Just edit the file
824(yourhomedir)/.kopialarmtimerrc 826(yourhomedir)/.kopialarmtimerrc
825and start/stop a timer to get a new menu with the data of this file. 827and start/stop a timer to get a new menu with the data of this file.
826 828
827********** VERSION 1.9.3 ************ 829********** VERSION 1.9.3 ************
8281) 8301)
829Now KO/Pi on Windows imports directly the calendar data of 831Now KO/Pi on Windows imports directly the calendar data of
830an installed Outlook. Should work with OL version >= 2000. 832an installed Outlook. Should work with OL version >= 2000.
831 833
832********** VERSION 1.9.2 ************ 834********** VERSION 1.9.2 ************
8331) 8351)
834KDE-Pim/Pi has got a new member: 836KDE-Pim/Pi has got a new member:
835KmicroMail (KM/Pi) is a mail program, 837KmicroMail (KM/Pi) is a mail program,
836which can handle IMAP and POP mail access. 838which can handle IMAP and POP mail access.
837It is based on Opie-Mail v3. 839It is based on Opie-Mail v3.
838All dependencies to the Opie libraries ar removed, 840All dependencies to the Opie libraries ar removed,
839such that no additional Opie lib is needed. 841such that no additional Opie lib is needed.
840It is already integrated in KO/Pi and KA/Pi. 842It is already integrated in KO/Pi and KA/Pi.
841It it now available for the Zaurus,probably it 843It it now available for the Zaurus,probably it
842will be available for other platforms later. 844will be available for other platforms later.
843Hint: 845Hint:
844Create your own contact (name + email) 846Create your own contact (name + email)
845in KA/Pi, select this contact and choose menu: 847in KA/Pi, select this contact and choose menu:
846Settings - Set Who Am I. 848Settings - Set Who Am I.
847Now the settings of this contact are used as 849Now the settings of this contact are used as
848the sender data in KM/Pi. 850the sender data in KM/Pi.
8492) 8512)
850KDE-Pim/Pi is split up in five different 852KDE-Pim/Pi is split up in five different
851packages now precompiled for Sharp Zaurus: 853packages now precompiled for Sharp Zaurus:
852--kmicrokdelibs_1.9.2_arm.ipk 854--kmicrokdelibs_1.9.2_arm.ipk
853The libs are needed for any 855The libs are needed for any
854of the following programs: 856of the following programs:
855--kaddressbook_1.9.2_arm.ipk 857--kaddressbook_1.9.2_arm.ipk
856--kmicromail_1.9.2_arm.ipk 858--kmicromail_1.9.2_arm.ipk
857--korganizer_1.9.2_arm.ipk 859--korganizer_1.9.2_arm.ipk
858Independ from that, there is the alarm applet 860Independ from that, there is the alarm applet
859available for KO/Pi, which also offers 861available for KO/Pi, which also offers
860quick access for a new mail or 862quick access for a new mail or
861showing the addressbook.: 863showing the addressbook.:
862--korganizer-alarm_1.9.2_arm.ipk 864--korganizer-alarm_1.9.2_arm.ipk
863Independend means, that the alarm applet 865Independend means, that the alarm applet
864does not need any of the libs or programs above to run. 866does not need any of the libs or programs above to run.
865But it would be quite useless without these programs. 867But it would be quite useless without these programs.
866NOTE: 868NOTE:
867If you get a 869If you get a
868"This application depends on other programs" 870"This application depends on other programs"
869during installation of 871during installation of
870--kmicrokdelibs_1.9.2_arm.ipk 872--kmicrokdelibs_1.9.2_arm.ipk
871you probably do not have to care about that. 873you probably do not have to care about that.
872kmicrokdelibs_1.9.2 will come with some 874kmicrokdelibs_1.9.2 will come with some
873resource plugins, which needs additional libraries. 875resource plugins, which needs additional libraries.
874(E.g. libopie1, if you want to use the 876(E.g. libopie1, if you want to use the
875opie resource connector in KA/Pi). 877opie resource connector in KA/Pi).
876If you do not have this libraries installed, 878If you do not have this libraries installed,
877you simply cannot use the resource. 879you simply cannot use the resource.
878To make it clear: 880To make it clear:
879If the libraries are missing, the applications 881If the libraries are missing, the applications
880using kmicrokdelibs will start, 882using kmicrokdelibs will start,
881because the resources are plugins. 883because the resources are plugins.
8823) 8843)
883KO/Pi and friends are now installable on SD-Card! 885KO/Pi and friends are now installable on SD-Card!
884It is recommended to install all libs and apps 886It is recommended to install all libs and apps
885on the SD card or all in the internal storage. 887on the SD card or all in the internal storage.
886There may be problems, if this is mixed. 888There may be problems, if this is mixed.
8874) 8894)
888Fixed two bugs in the alarm notification on Windows. 890Fixed two bugs in the alarm notification on Windows.
8895) 8915)
890Great improvement! 892Great improvement!
891KO/Pi uses now the latest version of libical. 893KO/Pi uses now the latest version of libical.
892Libical is the library which actually reads 894Libical is the library which actually reads
893the calendar files and extract the data from it. 895the calendar files and extract the data from it.
894With the old version, there were problems 896With the old version, there were problems
895(crashes or program hangs) when licical did read 897(crashes or program hangs) when licical did read
896files, which were not stored from KO/Pi. 898files, which were not stored from KO/Pi.
897I do not know, if the new libical works perfect, 899I do not know, if the new libical works perfect,
898but actually it works much better than 900but actually it works much better than
899the old version. 901the old version.
900There are no problems with compatibility with 902There are no problems with compatibility with
901old calendar files of KO/Pi, of course! 903old calendar files of KO/Pi, of course!
9026) 9046)
903New in KA/Pi: 905New in KA/Pi:
904Opie addressbook resource connector available! 906Opie addressbook resource connector available!
905You will need libopie1 and the opie addressbook, 907You will need libopie1 and the opie addressbook,
906of course. 908of course.
907With the Opie addressbook resource connector, 909With the Opie addressbook resource connector,
908you can access the Opie addressbook readonly in KA/Pi. 910you can access the Opie addressbook readonly in KA/Pi.
909If you want to edit or import the data into KA/Pi, 911If you want to edit or import the data into KA/Pi,
910do this: 912do this:
911a) Create an Opie resource. 913a) Create an Opie resource.
912 (Menu: Settings-Configure Resources). 914 (Menu: Settings-Configure Resources).
913After configuration and restarting KA/Pi you should see 915After configuration and restarting KA/Pi you should see
914the Opie contacts in KA/Pi. 916the Opie contacts in KA/Pi.
915b) Select some or all Opie contacts. 917b) Select some or all Opie contacts.
916(NOTE: +++++ 918(NOTE: +++++
917To know exactly, what contacts are Opie contacts, 919To know exactly, what contacts are Opie contacts,
918do this: Choose menu: 920do this: Choose menu:
919View-Modify View - TAB Fields. 921View-Modify View - TAB Fields.
920Select in the above list "Resource" and click 922Select in the above list "Resource" and click
921down arrow to add it to the "Selected fields". 923down arrow to add it to the "Selected fields".
922Click OK. 924Click OK.
923Now you have a new column "Resource" in your list, 925Now you have a new column "Resource" in your list,
924where you can see, what an Opie resource is. 926where you can see, what an Opie resource is.
925++++ NOTE end.) 927++++ NOTE end.)
926Ok, we do have now some Opie contacts seleted. 928Ok, we do have now some Opie contacts seleted.
927(Use SHIFT or CTRL key in order to multiple select). 929(Use SHIFT or CTRL key in order to multiple select).
928c) Choose menu: Edit-Copy. 930c) Choose menu: Edit-Copy.
929d) Choose menu: Edit-Paste. 931d) Choose menu: Edit-Paste.
930e) Select the resource, you want to add the contacts to. 932e) Select the resource, you want to add the contacts to.
931Congrats! Now you have read/write access to the copied 933Congrats! Now you have read/write access to the copied
932opie contacts as "real" KA/Pi contacts. 934opie contacts as "real" KA/Pi contacts.
933 935
934 936
935********** VERSION 1.9.1 ************ 937********** VERSION 1.9.1 ************
9361) 9381)
937 +++ IMPORTANT 1 +++ 939 +++ IMPORTANT 1 +++
938 940
939The storing place of the default calendar 941The storing place of the default calendar
940file has changed! 942file has changed!
941The default calendar file was 943The default calendar file was
942Applications/korganizer/mycalendar.ics 944Applications/korganizer/mycalendar.ics
943on Zaurus and 945on Zaurus and
944(yourHomeDir)/korganizer/mycalendar.ics 946(yourHomeDir)/korganizer/mycalendar.ics
945on Windows/Linux desktop. Now it is 947on Windows/Linux desktop. Now it is
946(yourHomeDir)/kdepim/korganizer/mycalendar.ics 948(yourHomeDir)/kdepim/korganizer/mycalendar.ics
947on Zaurus, Windows and Linux. 949on Zaurus, Windows and Linux.
948To load the old file, choose menu 950To load the old file, choose menu
949File-Load calendar backup. 951File-Load calendar backup.
950(It should be loaded automatically 952(It should be loaded automatically
951at startup with a warning message displayed). 953at startup with a warning message displayed).
952The place of the configuration file has changed too. 954The place of the configuration file has changed too.
953If you want to use your old KO/Pi config, 955If you want to use your old KO/Pi config,
954copy it to 956copy it to
955(yourHomeDir)/kdepim/config/korganizerrc 957(yourHomeDir)/kdepim/config/korganizerrc
956Please read VERSION 1.9.0 - topic 3) as well! 958Please read VERSION 1.9.0 - topic 3) as well!
957 959
958 +++ IMPORTANT 2 +++ 960 +++ IMPORTANT 2 +++
959 961
960Because of the new paths, you will need 962Because of the new paths, you will need
961a new version of the KO/Pi alarm applet 963a new version of the KO/Pi alarm applet
962for Zaurus. 964for Zaurus.
963Use version >= 1.9.1 965Use version >= 1.9.1
964 966
9652) 9672)
966Now the QWhat'sThis Icon works for items 968Now the QWhat'sThis Icon works for items
967in the month view as well. 969in the month view as well.
968(See VERSION 1.7.8 Topic 1) ). 970(See VERSION 1.7.8 Topic 1) ).
9693) 9713)
970You can import birtsdays/anniversaries 972You can import birtsdays/anniversaries
971from KA/Pi into KO/Pi. 973from KA/Pi into KO/Pi.
972Choose menu File-Import birthdays. 974Choose menu File-Import birthdays.
973If you import twice, already imported items 975If you import twice, already imported items
974will not be imported again, if they 976will not be imported again, if they
975have not been changed in KO/Pi. 977have not been changed in KO/Pi.
9764) 9784)
977When syncing with sharp DTM, now a progress 979When syncing with sharp DTM, now a progress
978is shown, when the data is written back. 980is shown, when the data is written back.
979If there is much data in KO/Pi and no data 981If there is much data in KO/Pi and no data
980in DTM, that can take a long time. 982in DTM, that can take a long time.
981(But only for the first time ). 983(But only for the first time ).
9825) 9845)
983In the search dialog, you can search 985In the search dialog, you can search
984now for the name/email of an attendee 986now for the name/email of an attendee
985of an event/todo. 987of an event/todo.
986To get more space for displaying 988To get more space for displaying
987search results, the buttons 989search results, the buttons
988for "search" and "close" on the 990for "search" and "close" on the
989bottom are removed in the PDA version. 991bottom are removed in the PDA version.
990You have to click OK in the top right 992You have to click OK in the top right
991corner to do a search. 993corner to do a search.
9926) 9946)
993Now it is possible to disable the displaying 995Now it is possible to disable the displaying
994of todo items in the Allday part of the Agenda. 996of todo items in the Allday part of the Agenda.
995Choose Menu Action-Configure, 997Choose Menu Action-Configure,
996TAB Todo View, checkbox 998TAB Todo View, checkbox
997"Allday Agenda view shows todos" 999"Allday Agenda view shows todos"
9987) 10007)
999If FastLoad is enabled, now the settings and the 1001If FastLoad is enabled, now the settings and the
1000calendar data are saved, when KO/Pi is closed. 1002calendar data are saved, when KO/Pi is closed.
1001(If no Fastload is enabled, KO/Pi saves 1003(If no Fastload is enabled, KO/Pi saves
1002the data as well, of course) 1004the data as well, of course)
10038) 10058)
1004The Agenda View has a minimize-splitter now, 1006The Agenda View has a minimize-splitter now,
1005such that the height of the allday part can be 1007such that the height of the allday part can be
1006changed quickly. 1008changed quickly.
1007 1009
1008********** VERSION 1.9.0 ************ 1010********** VERSION 1.9.0 ************
10091) 10111)
1010KO/Pi is now merged with the new microKDE from KA/Pi. 1012KO/Pi is now merged with the new microKDE from KA/Pi.
1011KO/Pi accesses now KA/Pi as the addressbook. 1013KO/Pi accesses now KA/Pi as the addressbook.
1012The other ddressbook-plugins are not working any longer. 1014The other ddressbook-plugins are not working any longer.
1013(It is planned, that later KA/Pi itself uses these plugins) 1015(It is planned, that later KA/Pi itself uses these plugins)
1014New versions of KO/Pi are only available 1016New versions of KO/Pi are only available
1015together with KA/Pi as the KDE-Pim/Pi package. 1017together with KA/Pi as the KDE-Pim/Pi package.
10162) 10182)
1017If you click on an attendee of a meeting in the 1019If you click on an attendee of a meeting in the
1018event viewer, a detailed summary of the 1020event viewer, a detailed summary of the
1019attendee is shown. 1021attendee is shown.
10203) 10223)
1021The place of the configuration file has changed. 1023The place of the configuration file has changed.
1022If you want to use your old KO/Pi config, copy 1024If you want to use your old KO/Pi config, copy
1023Applications/korganizer/config_korganizerrc 1025Applications/korganizer/config_korganizerrc
1024to 1026to
1025Applications/korganizer/config/korganizerrc 1027Applications/korganizer/config/korganizerrc
1026 1028
1027********** VERSION 1.7.8 ************ 1029********** VERSION 1.7.8 ************
10281) 10301)
1029Now the QWhat'sThis ist working. 1031Now the QWhat'sThis ist working.
1030Enable the QWhat'sThis icon in the toolbar. 1032Enable the QWhat'sThis icon in the toolbar.
1031(You have to restart to reload the changed toolbar config). 1033(You have to restart to reload the changed toolbar config).
1032Now click on the QWhat'sThis Icon 1034Now click on the QWhat'sThis Icon
1033in the top right corner of KO/Pi. 1035in the top right corner of KO/Pi.
1034Then click on an item in the Agenda View: 1036Then click on an item in the Agenda View:
1035You will get a detailed display of the items content. 1037You will get a detailed display of the items content.
10362) 10382)
1037Some other very minor changes. 1039Some other very minor changes.
1038But I have forgotten the details ... 1040But I have forgotten the details ...
1039For that reason I start this log here: 1041For that reason I start this log here:
1040To document my changes, when I am doing it. 1042To document my changes, when I am doing it.
1041 1043
1042********** VERSION 1.7.7 ************ 1044********** VERSION 1.7.7 ************
1043Stable Version of KO/Pi 1045Stable Version of KO/Pi
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index f983ff9..4bf9dea 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1,1670 +1,1696 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qpopupmenu.h> 20#include <qpopupmenu.h>
21#include <qfont.h> 21#include <qfont.h>
22#include <qfontmetrics.h> 22#include <qfontmetrics.h>
23#include <qkeycode.h> 23#include <qkeycode.h>
24#include <qhbox.h> 24#include <qhbox.h>
25#include <qvbox.h> 25#include <qvbox.h>
26#include <qwidgetstack.h> 26#include <qwidgetstack.h>
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qtooltip.h> 28#include <qtooltip.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qtimer.h> 30#include <qtimer.h>
31#include <qwhatsthis.h> 31#include <qwhatsthis.h>
32#ifndef DESKTOP_VERSION 32#ifndef DESKTOP_VERSION
33#include <qpe/qpeapplication.h> 33#include <qpe/qpeapplication.h>
34#else 34#else
35#include <qapplication.h> 35#include <qapplication.h>
36#endif 36#endif
37 37
38#include <kdebug.h> 38#include <kdebug.h>
39#include <klocale.h> 39#include <klocale.h>
40#include <kglobal.h> 40#include <kglobal.h>
41#include <kconfig.h> 41#include <kconfig.h>
42#include <kiconloader.h> 42#include <kiconloader.h>
43 43
44#include <kcalendarsystem.h> 44#include <kcalendarsystem.h>
45 45
46#ifndef KORG_NOPRINTER 46#ifndef KORG_NOPRINTER
47#include "calprinter.h" 47#include "calprinter.h"
48#endif 48#endif
49#include "koprefs.h" 49#include "koprefs.h"
50#ifndef KORG_NOPLUGINS 50#ifndef KORG_NOPLUGINS
51#include "kocore.h" 51#include "kocore.h"
52#endif 52#endif
53#include "koglobals.h" 53#include "koglobals.h"
54#include <libkcal/kincidenceformatter.h> 54#include <libkcal/kincidenceformatter.h>
55 55
56#include "komonthview.h" 56#include "komonthview.h"
57 57
58#define PIXMAP_SIZE 5 58#define PIXMAP_SIZE 5
59#ifdef DESKTOP_VERSION 59#ifdef DESKTOP_VERSION
60QToolTipGroup *MonthViewCell::mToolTipGroup = 0; 60QToolTipGroup *MonthViewCell::mToolTipGroup = 0;
61#endif 61#endif
62class KNOWhatsThis :public QWhatsThis 62class KNOWhatsThis :public QWhatsThis
63{ 63{
64public: 64public:
65 KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { }; 65 KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { };
66 //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); }; 66 //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); };
67 67
68protected: 68protected:
69 virtual QString text( const QPoint& p) 69 virtual QString text( const QPoint& p)
70 { 70 {
71 return _wid->getWhatsThisText(p) ; 71 return _wid->getWhatsThisText(p) ;
72 }; 72 };
73private: 73private:
74 KNoScrollListBox* _wid; 74 KNoScrollListBox* _wid;
75 75
76}; 76};
77 77
78 78
79KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) 79KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
80 : QListBox(parent, name, WRepaintNoErase) 80 : QListBox(parent, name, WRepaintNoErase)
81{ 81{
82#ifndef DESKTOP_VERSION 82#ifndef DESKTOP_VERSION
83 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); 83 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
84#endif 84#endif
85 mWT = new KNOWhatsThis(this); 85 mWT = new KNOWhatsThis(this);
86} 86}
87KNoScrollListBox::~KNoScrollListBox() 87KNoScrollListBox::~KNoScrollListBox()
88{ 88{
89 89
90} 90}
91QString KNoScrollListBox::getWhatsThisText(QPoint p) 91QString KNoScrollListBox::getWhatsThisText(QPoint p)
92{ 92{
93 QListBoxItem* item = itemAt ( p ); 93 QListBoxItem* item = itemAt ( p );
94 if ( ! item ) { 94 if ( ! item ) {
95 return i18n("Click in the cell\nto add an event!"); 95 return i18n("Click in the cell\nto add an event!");
96 } 96 }
97 return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence(), 97 return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence(),
98 KOPrefs::instance()->mWTshowDetails, 98 KOPrefs::instance()->mWTshowDetails,
99 KOPrefs::instance()->mWTshowCreated, 99 KOPrefs::instance()->mWTshowCreated,
100 KOPrefs::instance()->mWTshowChanged); 100 KOPrefs::instance()->mWTshowChanged);
101} 101}
102void KNoScrollListBox::keyPressEvent(QKeyEvent *e) 102void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
103{ 103{
104 104
105 switch(e->key()) { 105 switch(e->key()) {
106 case Key_Right: 106 case Key_Right:
107 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 107 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
108 { 108 {
109 e->ignore(); 109 e->ignore();
110 return; 110 return;
111 } 111 }
112 scrollBy(10,0); 112 scrollBy(10,0);
113 break; 113 break;
114 case Key_Left: 114 case Key_Left:
115 if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 115 if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
116 { 116 {
117 e->ignore(); 117 e->ignore();
118 return; 118 return;
119 } 119 }
120 scrollBy(-10,0); 120 scrollBy(-10,0);
121 break; 121 break;
122 case Key_Up: 122 case Key_Up:
123 if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { 123 if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
124 e->ignore(); 124 e->ignore();
125 break; 125 break;
126 } 126 }
127 setCurrentItem((currentItem()+count()-1)%count()); 127 setCurrentItem((currentItem()+count()-1)%count());
128 if(!itemVisible(currentItem())) { 128 if(!itemVisible(currentItem())) {
129 if((unsigned int) currentItem() == (count()-1)) { 129 if((unsigned int) currentItem() == (count()-1)) {
130 setTopItem(currentItem()-numItemsVisible()+1); 130 setTopItem(currentItem()-numItemsVisible()+1);
131 } else { 131 } else {
132 setTopItem(topItem()-1); 132 setTopItem(topItem()-1);
133 } 133 }
134 } 134 }
135 break; 135 break;
136 case Key_Down: 136 case Key_Down:
137 if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { 137 if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
138 e->ignore(); 138 e->ignore();
139 break; 139 break;
140 } 140 }
141 setCurrentItem((currentItem()+1)%count()); 141 setCurrentItem((currentItem()+1)%count());
142 if(!itemVisible(currentItem())) { 142 if(!itemVisible(currentItem())) {
143 if(currentItem() == 0) { 143 if(currentItem() == 0) {
144 setTopItem(0); 144 setTopItem(0);
145 } else { 145 } else {
146 setTopItem(topItem()+1); 146 setTopItem(topItem()+1);
147 } 147 }
148 } 148 }
149 break; 149 break;
150 case Key_I: 150 case Key_I:
151 QTimer::singleShot( 11, this, SLOT ( oneDown() ) ); 151 QTimer::singleShot( 11, this, SLOT ( oneDown() ) );
152 e->ignore(); 152 e->ignore();
153 break; 153 break;
154 case Key_Shift: 154 case Key_Shift:
155 emit shiftDown(); 155 emit shiftDown();
156 break; 156 break;
157 default: 157 default:
158 e->ignore(); 158 e->ignore();
159 break; 159 break;
160 } 160 }
161} 161}
162 162
163void KNoScrollListBox::oneDown() 163void KNoScrollListBox::oneDown()
164{ 164{
165 setCurrentItem((currentItem()+1)%count()); 165 setCurrentItem((currentItem()+1)%count());
166 if(!itemVisible(currentItem())) { 166 if(!itemVisible(currentItem())) {
167 if(currentItem() == 0) { 167 if(currentItem() == 0) {
168 setTopItem(0); 168 setTopItem(0);
169 } else { 169 } else {
170 setTopItem(topItem()+1); 170 setTopItem(topItem()+1);
171 } 171 }
172 } 172 }
173} 173}
174void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) 174void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
175{ 175{
176 switch(e->key()) { 176 switch(e->key()) {
177 case Key_Shift: 177 case Key_Shift:
178 emit shiftUp(); 178 emit shiftUp();
179 break; 179 break;
180 default: 180 default:
181 break; 181 break;
182 } 182 }
183} 183}
184 184
185void KNoScrollListBox::mousePressEvent(QMouseEvent *e) 185void KNoScrollListBox::mousePressEvent(QMouseEvent *e)
186{ 186{
187 QListBox::mousePressEvent(e); 187 QListBox::mousePressEvent(e);
188 188
189 if(e->button() == RightButton) { 189 if(e->button() == RightButton) {
190 emit rightClick(); 190 emit rightClick();
191 } 191 }
192} 192}
193 193
194MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) 194MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s)
195 : QListBoxItem() 195 : QListBoxItem()
196{ 196{
197 setText( s ); 197 setText( s );
198 mMultiday = 0; 198 mMultiday = 0;
199 mIncidence = incidence; 199 mIncidence = incidence;
200 mDate = qd; 200 mDate = qd;
201 mRecur = false; 201 mRecur = false;
202 mAlarm = false; 202 mAlarm = false;
203 mReply = false; 203 mReply = false;
204 mInfo = false; 204 mInfo = false;
205} 205}
206 206
207void MonthViewItem::paint(QPainter *p) 207void MonthViewItem::paint(QPainter *p)
208{ 208{
209#if QT_VERSION >= 0x030000 209#if QT_VERSION >= 0x030000
210 bool sel = isSelected(); 210 bool sel = isSelected();
211#else 211#else
212 bool sel = selected(); 212 bool sel = selected();
213#endif 213#endif
214 214
215 215
216 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) 216 if (KOPrefs::instance()->mMonthViewUsesCategoryColor)
217 { 217 {
218 p->setBackgroundColor( palette().color( QPalette::Normal, \ 218 p->setBackgroundColor( palette().color( QPalette::Normal, \
219 sel ? QColorGroup::Highlight : QColorGroup::Background ) ); 219 sel ? QColorGroup::Highlight : QColorGroup::Background ) );
220 p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) ); 220 p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) );
221 } 221 }
222 int x = 1; 222 int x = 1;
223 //int y = 3;//(height() - mRecurPixmap.height()) /2; 223 //int y = 3;//(height() - mRecurPixmap.height()) /2;
224 int size = PIXMAP_SIZE; 224 int size = PIXMAP_SIZE;
225 if ( QApplication::desktop()->width() < 300 ) 225 if ( QApplication::desktop()->width() < 300 )
226 size = 3; 226 size = 3;
227 int heihei = height( listBox () ); 227 int heihei = height( listBox () );
228 int y = (heihei - size -1 ) /2; 228 int y = (heihei - size -1 ) /2;
229 229
230 if ( KOPrefs::instance()->mMonthShowIcons ) { 230 if ( KOPrefs::instance()->mMonthShowIcons ) {
231 if ( mInfo ) { 231 if ( mInfo ) {
232 p->fillRect ( x, y,size,size, Qt::darkGreen ); 232 p->fillRect ( x, y,size,size, Qt::darkGreen );
233 x += size + 1; 233 x += size + 1;
234 } 234 }
235 if ( mRecur ) { 235 if ( mRecur ) {
236 p->fillRect ( x, y,size,size, Qt::blue ); 236 p->fillRect ( x, y,size,size, Qt::blue );
237 x += size + 1; 237 x += size + 1;
238 } 238 }
239 if ( mAlarm ) { 239 if ( mAlarm ) {
240 p->fillRect ( x, y,size,size, Qt::red ); 240 p->fillRect ( x, y,size,size, Qt::red );
241 x += size + 1; 241 x += size + 1;
242 } 242 }
243 if ( mReply ) { 243 if ( mReply ) {
244 p->fillRect ( x, y,size,size, Qt::yellow ); 244 p->fillRect ( x, y,size,size, Qt::yellow );
245 x += size + 1; 245 x += size + 1;
246 } 246 }
247 } 247 }
248 if ( mMultiday ) { 248 if ( mMultiday ) {
249 int yyy = y+(size/2); 249 int yyy = y+(size/2);
250 int sizeM = size+2; 250 int sizeM = size+2;
251 p->setBrush( QBrush::SolidPattern ); 251 p->setBrush( QBrush::SolidPattern );
252 p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ; 252 p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ;
253 if ( mMultiday == 2 || mMultiday == 3 ) { 253 if ( mMultiday == 2 || mMultiday == 3 ) {
254 QPointArray pa ( 3 ); 254 QPointArray pa ( 3 );
255 pa.setPoint (0, x, yyy ); 255 pa.setPoint (0, x, yyy );
256 pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 ); 256 pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 );
257 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 ); 257 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 );
258 p->drawPolygon( pa ); 258 p->drawPolygon( pa );
259 } 259 }
260 if ( mMultiday == 2 || mMultiday == 1 ) { 260 if ( mMultiday == 2 || mMultiday == 1 ) {
261 QPointArray pa ( 3 ); 261 QPointArray pa ( 3 );
262 pa.setPoint (0, x+sizeM +sizeM/2, yyy ); 262 pa.setPoint (0, x+sizeM +sizeM/2, yyy );
263 pa.setPoint (1, x+sizeM, yyy+sizeM/2 ); 263 pa.setPoint (1, x+sizeM, yyy+sizeM/2 );
264 pa.setPoint (2, x+sizeM, yyy-sizeM/2 ); 264 pa.setPoint (2, x+sizeM, yyy-sizeM/2 );
265 p->drawPolygon( pa ); 265 p->drawPolygon( pa );
266 } 266 }
267 if ( mMultiday == 1 ) { 267 if ( mMultiday == 1 ) {
268 // p->fillRect ( x, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); 268 // p->fillRect ( x, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) );
269 269
270 p->drawLine ( x+1, yyy-sizeM/2, x+1, yyy+sizeM/2 ); 270 p->drawLine ( x+1, yyy-sizeM/2, x+1, yyy+sizeM/2 );
271 } 271 }
272 if ( mMultiday == 3 ) { 272 if ( mMultiday == 3 ) {
273 // p->fillRect ( x+sizeM, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); 273 // p->fillRect ( x+sizeM, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) );
274 p->drawLine ( x+sizeM +sizeM/2-1, yyy-sizeM/2, x+sizeM +sizeM/2-1, yyy+sizeM/2 ); 274 p->drawLine ( x+sizeM +sizeM/2-1, yyy-sizeM/2, x+sizeM +sizeM/2-1, yyy+sizeM/2 );
275 275
276 } 276 }
277 x += sizeM/2 + 1; 277 x += sizeM/2 + 1;
278 x += sizeM + 1; 278 x += sizeM + 1;
279 } 279 }
280
281 if ( mIncidence->type() == "Todo" ){
282 Todo* td = ( Todo* ) mIncidence;
283 if ( td->isCompleted() ) {
284 int half = size/2;
285 p->drawLine ( x, heihei/2, x +half , heihei/2 +half ) ;
286 p->drawLine ( x +half , heihei/2 +half , x +half+half +2 , heihei/2 -2 ) ;
287 x += half+half + 4;
288
289 } else {
290 int val = td->percentComplete()/20;
291 p->fillRect ( x+1, y-1, val ,size+2,Qt::black );
292 p->drawRect ( x, y-1,7,size+2);
293 x += size + 3;
294 }
295 }
280 QFontMetrics fm = p->fontMetrics(); 296 QFontMetrics fm = p->fontMetrics();
281 int yPos; 297 int yPos;
282 int pmheight = size; 298 int pmheight = size;
283 if( pmheight < fm.height() ) 299 if( pmheight < fm.height() )
284 yPos = fm.ascent() + fm.leading()/2; 300 yPos = fm.ascent() + fm.leading()/2;
285 else 301 else
286 yPos = pmheight/2 - fm.height()/2 + fm.ascent(); 302 yPos = pmheight/2 - fm.height()/2 + fm.ascent();
287 p->setPen( palette().color( QPalette::Normal, sel ? \ 303 p->setPen( palette().color( QPalette::Normal, sel ? \
288 QColorGroup::HighlightedText : QColorGroup::Foreground ) ); 304 QColorGroup::HighlightedText : QColorGroup::Foreground ) );
289 p->drawText( x, yPos, text() ); 305 p->drawText( x, yPos, text() );
290 if ( mIncidence->cancelled() ) { 306 if ( mIncidence->cancelled() ) {
291 int wid = fm.width( text() ); 307 int wid = fm.width( text() );
292 p->drawLine( x, heihei/2 ,x+wid, heihei/2 ); 308 p->drawLine( x, heihei/2 ,x+wid, heihei/2 );
293 } 309 }
294 310
295} 311}
296 312
297int MonthViewItem::height(const QListBox *lb) const 313int MonthViewItem::height(const QListBox *lb) const
298{ 314{
299 if ( lb ) 315 if ( lb )
300 return lb->fontMetrics().lineSpacing()+1; 316 return lb->fontMetrics().lineSpacing()+1;
301 return 10; 317 return 10;
302} 318}
303 319
304int MonthViewItem::width(const QListBox *lb) const 320int MonthViewItem::width(const QListBox *lb) const
305{ 321{
306 int size = PIXMAP_SIZE; 322 int size = PIXMAP_SIZE;
307 if ( QApplication::desktop()->width() < 300 ) 323 if ( QApplication::desktop()->width() < 300 )
308 size = 3; 324 size = 3;
309 int x = 1; 325 int x = 1;
310 if ( KOPrefs::instance()->mMonthShowIcons ) { 326 if ( KOPrefs::instance()->mMonthShowIcons ) {
311 if ( mInfo ) { 327 if ( mInfo ) {
312 x += size + 1; 328 x += size + 1;
313 } 329 }
314 if( mRecur ) { 330 if( mRecur ) {
315 x += size+1; 331 x += size+1;
316 } 332 }
317 if( mAlarm ) { 333 if( mAlarm ) {
318 x += size+1; 334 x += size+1;
319 } 335 }
320 if( mReply ) { 336 if( mReply ) {
321 x += size+1; 337 x += size+1;
322 } 338 }
323 } 339 }
324 if( mMultiday ) { 340 if( mMultiday ) {
325 x += size+1+2+size/2; 341 x += size+1+2+size/2;
326 } 342 }
327 343
328 return( x + lb->fontMetrics().width( text() ) + 1 ); 344 return( x + lb->fontMetrics().width( text() ) + 1 );
329} 345}
330 346
331 347
332MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par ) 348MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
333 : QWidget( par ), 349 : QWidget( par ),
334 mMonthView( parent ) 350 mMonthView( parent )
335{ 351{
336 352
337 QVBoxLayout *topLayout = new QVBoxLayout( this ); 353 QVBoxLayout *topLayout = new QVBoxLayout( this );
338 354
339 // mLabel = new QLabel( this );QPushButton 355 // mLabel = new QLabel( this );QPushButton
340 mLabel = new QPushButton( this ); 356 mLabel = new QPushButton( this );
341 //mLabel->setFrameStyle( QFrame::Panel | QFrame::Plain ); 357 //mLabel->setFrameStyle( QFrame::Panel | QFrame::Plain );
342 //mLabel->setLineWidth( 1 ); 358 //mLabel->setLineWidth( 1 );
343 //mLabel->setAlignment( AlignCenter ); 359 //mLabel->setAlignment( AlignCenter );
344 mLabel->setFlat( true ); 360 mLabel->setFlat( true );
345 mLabel->setFocusPolicy(NoFocus); 361 mLabel->setFocusPolicy(NoFocus);
346 mItemList = new KNoScrollListBox( this ); 362 mItemList = new KNoScrollListBox( this );
347 mItemList->setMinimumSize( 10, 10 ); 363 mItemList->setMinimumSize( 10, 10 );
348 mItemList->setFrameStyle( QFrame::Panel | QFrame::Plain ); 364 mItemList->setFrameStyle( QFrame::Panel | QFrame::Plain );
349 mItemList->setLineWidth( 1 ); 365 mItemList->setLineWidth( 1 );
350 topLayout->addWidget( mItemList ); 366 topLayout->addWidget( mItemList );
351 mLabel->raise(); 367 mLabel->raise();
352 // QColor( 0,0,255 ) QColor( 160,1600,255 ) 368 // QColor( 0,0,255 ) QColor( 160,1600,255 )
353 mStandardPalette = palette(); 369 mStandardPalette = palette();
354 mStandardPalette.setColor(QColorGroup::Base, mStandardPalette.color( QPalette::Normal, QColorGroup::Background ) ); 370 mStandardPalette.setColor(QColorGroup::Base, mStandardPalette.color( QPalette::Normal, QColorGroup::Background ) );
355 371
356 enableScrollBars( false ); 372 enableScrollBars( false );
357 updateConfig(); 373 updateConfig();
358 //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() )); 374 //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() ));
359 connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() )); 375 connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() ));
360 connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ), 376 connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ),
361 SLOT( defaultAction( QListBoxItem * ) ) ); 377 SLOT( defaultAction( QListBoxItem * ) ) );
362 connect( mItemList, SIGNAL( rightButtonPressed( QListBoxItem *, 378 connect( mItemList, SIGNAL( rightButtonPressed( QListBoxItem *,
363 const QPoint &) ), 379 const QPoint &) ),
364 SLOT( contextMenu( QListBoxItem * ) ) ); 380 SLOT( contextMenu( QListBoxItem * ) ) );
365 connect( mItemList, SIGNAL( highlighted( QListBoxItem *) ), 381 connect( mItemList, SIGNAL( highlighted( QListBoxItem *) ),
366 SLOT( selection( QListBoxItem * ) ) ); 382 SLOT( selection( QListBoxItem * ) ) );
367 connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ), 383 connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ),
368 SLOT( cellClicked( QListBoxItem * ) ) ); 384 SLOT( cellClicked( QListBoxItem * ) ) );
369 connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ), 385 connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ),
370 SLOT( selection( QListBoxItem * ) ) ); 386 SLOT( selection( QListBoxItem * ) ) );
371} 387}
372#ifdef DESKTOP_VERSION 388#ifdef DESKTOP_VERSION
373QToolTipGroup *MonthViewCell::toolTipGroup() 389QToolTipGroup *MonthViewCell::toolTipGroup()
374{ 390{
375 if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); 391 if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0);
376 return mToolTipGroup; 392 return mToolTipGroup;
377} 393}
378#endif 394#endif
379 395
380void MonthViewCell::setDate( const QDate &date ) 396void MonthViewCell::setDate( const QDate &date )
381{ 397{
382 // kdDebug() << "MonthViewCell::setDate(): " << date.toString() << endl; 398 // kdDebug() << "MonthViewCell::setDate(): " << date.toString() << endl;
383 mDate = date; 399 mDate = date;
384 400
385 401
386 402
387 //resizeEvent( 0 ); 403 //resizeEvent( 0 );
388} 404}
389 405
390QDate MonthViewCell::date() const 406QDate MonthViewCell::date() const
391{ 407{
392 return mDate; 408 return mDate;
393} 409}
394 410
395void MonthViewCell::setPrimary( bool primary ) 411void MonthViewCell::setPrimary( bool primary )
396{ 412{
397 mPrimary = primary; 413 mPrimary = primary;
398 //setMyPalette(); 414 //setMyPalette();
399} 415}
400void MonthViewCell::setMyPalette() 416void MonthViewCell::setMyPalette()
401{ 417{
402 418
403 if ( mHoliday) { 419 if ( mHoliday) {
404 setPalette( mHolidayPalette ); 420 setPalette( mHolidayPalette );
405 } else { 421 } else {
406 if ( mPrimary ) { 422 if ( mPrimary ) {
407 setPalette( mPrimaryPalette ); 423 setPalette( mPrimaryPalette );
408 } else { 424 } else {
409 setPalette( mNonPrimaryPalette ); 425 setPalette( mNonPrimaryPalette );
410 } 426 }
411 } 427 }
412 QPalette pal = palette(); 428 QPalette pal = palette();
413 429
414 mLabel->setPalette( QPalette ( pal.color( QPalette::Normal,QColorGroup::Base),pal.color(QPalette::Normal,QColorGroup::Base ) )); 430 mLabel->setPalette( QPalette ( pal.color( QPalette::Normal,QColorGroup::Base),pal.color(QPalette::Normal,QColorGroup::Base ) ));
415} 431}
416QPalette MonthViewCell::getPalette () 432QPalette MonthViewCell::getPalette ()
417{ 433{
418 if ( !KOPrefs::instance()->mMonthViewUsesDayColors ) 434 if ( !KOPrefs::instance()->mMonthViewUsesDayColors )
419 return mStandardPalette; 435 return mStandardPalette;
420 if ( mHoliday) { 436 if ( mHoliday) {
421 return mHolidayPalette ; 437 return mHolidayPalette ;
422 } else { 438 } else {
423 if ( mPrimary ) { 439 if ( mPrimary ) {
424 return mPrimaryPalette ; 440 return mPrimaryPalette ;
425 } 441 }
426 } 442 }
427 return mNonPrimaryPalette; 443 return mNonPrimaryPalette;
428} 444}
429bool MonthViewCell::isPrimary() const 445bool MonthViewCell::isPrimary() const
430{ 446{
431 return mPrimary; 447 return mPrimary;
432} 448}
433 449
434void MonthViewCell::setHoliday( bool holiday ) 450void MonthViewCell::setHoliday( bool holiday )
435{ 451{
436 mHoliday = holiday; 452 mHoliday = holiday;
437 //setMyPalette(); 453 //setMyPalette();
438} 454}
439 455
440void MonthViewCell::setHoliday( const QString &holiday ) 456void MonthViewCell::setHoliday( const QString &holiday )
441{ 457{
442 mHolidayString = holiday; 458 mHolidayString = holiday;
443 459
444 if ( !holiday.isEmpty() ) { 460 if ( !holiday.isEmpty() ) {
445 setHoliday( true ); 461 setHoliday( true );
446 } 462 }
447} 463}
448void MonthViewCell::keyPressEvent ( QKeyEvent * e ) 464void MonthViewCell::keyPressEvent ( QKeyEvent * e )
449{ 465{
450 466
451 e->ignore(); 467 e->ignore();
452 468
453} 469}
454 470
455void MonthViewCell::startUpdateCell() 471void MonthViewCell::startUpdateCell()
456{ 472{
457 473
458 mItemList->setFocusPolicy(NoFocus); 474 mItemList->setFocusPolicy(NoFocus);
459 if ( !mMonthView->isUpdatePossible() ) 475 if ( !mMonthView->isUpdatePossible() )
460 return; 476 return;
461 477
462 /* 478 /*
463 if ( !isVisible() ){ 479 if ( !isVisible() ){
464 return; 480 return;
465 } 481 }
466 */ 482 */
467 // qDebug("MonthViewCell::updateCell() "); 483 // qDebug("MonthViewCell::updateCell() ");
468 setPrimary( mDate.month()%2 ); 484 setPrimary( mDate.month()%2 );
469 setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); 485 setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays);
470 if ( mDate == QDate::currentDate() ) { 486 if ( mDate == QDate::currentDate() ) {
471 mItemList->setLineWidth( 3 ); 487 mItemList->setLineWidth( 3 );
472 } else { 488 } else {
473 mItemList->setLineWidth( 1 ); 489 mItemList->setLineWidth( 1 );
474 } 490 }
475 mItemList->clear(); 491 mItemList->clear();
476 492
477#ifdef DESKTOP_VERSION 493#ifdef DESKTOP_VERSION
478 QToolTip::remove(this); 494 QToolTip::remove(this);
479#endif 495#endif
480 mToolTip = ""; 496 mToolTip = "";
481 //qApp->processEvents(); 497 //qApp->processEvents();
482 if ( !mHolidayString.isEmpty() ) { 498 if ( !mHolidayString.isEmpty() ) {
483 MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString ); 499 MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString );
484 item->setPalette( mHolidayPalette ); 500 item->setPalette( mHolidayPalette );
485 mItemList->insertItem( item ); 501 mItemList->insertItem( item );
486 mToolTip += mHolidayString+"\n"; 502 mToolTip += mHolidayString+"\n";
487 } 503 }
488} 504}
489 505
490void MonthViewCell::insertEvent(Event *event) 506void MonthViewCell::insertEvent(Event *event)
491{ 507{
492 508
493 mItemList->setFocusPolicy(WheelFocus); 509 mItemList->setFocusPolicy(WheelFocus);
494 if ( !(event->doesRecur() == Recurrence::rNone) ) { 510 if ( !(event->doesRecur() == Recurrence::rNone) ) {
495 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) 511 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
496 return; 512 return;
497 else 513 else
498 if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) 514 if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly )
499 return; 515 return;
500 } 516 }
501 517
502 if ( event->categories().contains("Holiday") || 518 if ( event->categories().contains("Holiday") ||
503 event->categories().contains(i18n("Holiday"))) { 519 event->categories().contains(i18n("Holiday"))) {
504 setHoliday( true ); 520 setHoliday( true );
505 if ( mDate.dayOfWeek() == 7 ) 521 if ( mDate.dayOfWeek() == 7 )
506 mItemList->setLineWidth( 3 ); 522 mItemList->setLineWidth( 3 );
507 } 523 }
508 QString text; 524 QString text;
509 int multiday = 0;// 1 = start, 2 = midddle, 3 = end day 525 int multiday = 0;// 1 = start, 2 = midddle, 3 = end day
510 if (event->isMultiDay()) { 526 if (event->isMultiDay()) {
511 QString prefix = "<->";multiday = 2; 527 QString prefix = "<->";multiday = 2;
512 QString time; 528 QString time;
513 if ( event->doesRecur() ) { 529 if ( event->doesRecur() ) {
514 if ( event->recursOn( mDate) ) { 530 if ( event->recursOn( mDate) ) {
515 prefix ="->" ;multiday = 1; 531 prefix ="->" ;multiday = 1;
516 } 532 }
517 else { 533 else {
518 int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); 534 int days = event->dtStart().date().daysTo ( event->dtEnd().date() );
519 if ( event->recursOn( mDate.addDays( -days)) ) { 535 if ( event->recursOn( mDate.addDays( -days)) ) {
520 prefix ="<-" ;multiday = 3; 536 prefix ="<-" ;multiday = 3;
521 } 537 }
522 } 538 }
523 539
524 } else { 540 } else {
525 if (mDate == event->dtStart().date()) { 541 if (mDate == event->dtStart().date()) {
526 prefix ="->" ;multiday = 1; 542 prefix ="->" ;multiday = 1;
527 } else if (mDate == event->dtEnd().date()) { 543 } else if (mDate == event->dtEnd().date()) {
528 prefix ="<-" ;multiday = 3; 544 prefix ="<-" ;multiday = 3;
529 } 545 }
530 } 546 }
531 if ( !event->doesFloat() ) { 547 if ( !event->doesFloat() ) {
532 if ( mDate == event->dtStart().date () ) 548 if ( mDate == event->dtStart().date () )
533 time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; 549 time = KGlobal::locale()->formatTime(event->dtStart().time())+" ";
534 else if ( mDate == event->dtEnd().date () ) 550 else if ( mDate == event->dtEnd().date () )
535 time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; 551 time = KGlobal::locale()->formatTime(event->dtEnd().time())+" ";
536 552
537 } 553 }
538 text = time + event->summary(); 554 text = time + event->summary();
539 mToolTip += prefix + text; 555 mToolTip += prefix + text;
540 } else { 556 } else {
541 if (event->doesFloat()) { 557 if (event->doesFloat()) {
542 text = event->summary(); 558 text = event->summary();
543 mToolTip += text; 559 mToolTip += text;
544 } 560 }
545 else { 561 else {
546 text = KGlobal::locale()->formatTime(event->dtStart().time()); 562 text = KGlobal::locale()->formatTime(event->dtStart().time());
547 text += " " + event->summary(); 563 text += " " + event->summary();
548 mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); 564 mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary();
549 } 565 }
550 } 566 }
551 567
552 MonthViewItem *item = new MonthViewItem( event, mDate, text ); 568 MonthViewItem *item = new MonthViewItem( event, mDate, text );
553 QPalette pal; 569 QPalette pal;
554 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 570 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
555 QStringList categories = event->categories(); 571 QStringList categories = event->categories();
556 QString cat = categories.first(); 572 QString cat = categories.first();
557 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { 573 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) {
558 pal = getPalette(); 574 pal = getPalette();
559 if (cat.isEmpty()) { 575 if (cat.isEmpty()) {
560 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); 576 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor);
561 } else { 577 } else {
562 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); 578 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat)));
563 } 579 }
564 580
565 } else { 581 } else {
566 if (cat.isEmpty()) { 582 if (cat.isEmpty()) {
567 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 583 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
568 } else { 584 } else {
569 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 585 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
570 } 586 }
571 } 587 }
572 588
573 } else { 589 } else {
574 pal = mStandardPalette ; 590 pal = mStandardPalette ;
575 } 591 }
576 item->setPalette( pal ); 592 item->setPalette( pal );
577 item->setRecur( event->recurrence()->doesRecur() ); 593 item->setRecur( event->recurrence()->doesRecur() );
578 item->setAlarm( event->isAlarmEnabled() && multiday < 2 ); 594 item->setAlarm( event->isAlarmEnabled() && multiday < 2 );
579 item->setMoreInfo( event->description().length() > 0 ); 595 item->setMoreInfo( event->description().length() > 0 );
580#ifdef DESKTOP_VERSION 596#ifdef DESKTOP_VERSION
581 Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, 597 Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails,
582 KOPrefs::instance()->email()); 598 KOPrefs::instance()->email());
583 if ( me != 0 ) { 599 if ( me != 0 ) {
584 if ( me->status() == Attendee::NeedsAction && me->RSVP()) 600 if ( me->status() == Attendee::NeedsAction && me->RSVP())
585 item->setReply(true && multiday < 2); 601 item->setReply(true && multiday < 2);
586 else 602 else
587 item->setReply(false); 603 item->setReply(false);
588 } else 604 } else
589 item->setReply(false); 605 item->setReply(false);
590#endif 606#endif
591 item->setMultiDay( multiday ); 607 item->setMultiDay( multiday );
592 mItemList->insertItem( item ); 608 mItemList->insertItem( item );
593 mToolTip += "\n"; 609 mToolTip += "\n";
594} 610}
595void MonthViewCell::insertTodo(Todo *todo) 611void MonthViewCell::insertTodo(Todo *todo)
596{ 612{
597 mItemList->setFocusPolicy(WheelFocus); 613 mItemList->setFocusPolicy(WheelFocus);
598 QString text; 614 QString text;
599 if (todo->hasDueDate()) { 615 if (todo->hasDueDate()) {
600 if (!todo->doesFloat()) { 616 if (!todo->doesFloat()) {
601 text += KGlobal::locale()->formatTime(todo->dtDue().time()); 617 text += KGlobal::locale()->formatTime(todo->dtDue().time());
602 text += " "; 618 text += " ";
603 } 619 }
604 } 620 }
605 text += i18n("T: %1").arg(todo->summary()); 621 text += todo->summary();
606 622
607 MonthViewItem *item = new MonthViewItem( todo, mDate, text ); 623 MonthViewItem *item = new MonthViewItem( todo, mDate, text );
608 //item->setPalette( mStandardPalette ); 624 //item->setPalette( mStandardPalette );
609 QPalette pal; 625 QPalette pal;
610 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 626 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
611 QStringList categories = todo->categories(); 627 QStringList categories = todo->categories();
612 QString cat = categories.first(); 628 QString cat = categories.first();
613 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { 629 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) {
614 pal = getPalette(); 630 pal = getPalette();
615 if (cat.isEmpty()) { 631 if (cat.isEmpty()) {
616 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); 632 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor);
617 } else { 633 } else {
618 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); 634 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat)));
619 } 635 }
620 636
621 } else { 637 } else {
622 if (cat.isEmpty()) { 638 if (cat.isEmpty()) {
623 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 639 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
624 } else { 640 } else {
625 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 641 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
626 } 642 }
627 } 643 }
628 644
629 } else { 645 } else {
630 pal = mStandardPalette ; 646 pal = mStandardPalette ;
631 } 647 }
632 item->setPalette( pal ); 648 item->setPalette( pal );
633 item->setRecur( todo->recurrence()->doesRecur() ); 649 item->setRecur( todo->recurrence()->doesRecur() );
634 item->setAlarm( todo->isAlarmEnabled() ); 650 item->setAlarm( todo->isAlarmEnabled() );
635 item->setMoreInfo( todo->description().length() > 0 ); 651 item->setMoreInfo( todo->description().length() > 0 );
636 mItemList->insertItem( item ); 652 mItemList->insertItem( item );
637 mToolTip += text+"\n"; 653 mToolTip += text+"\n";
638} 654}
639void MonthViewCell::finishUpdateCell() 655void MonthViewCell::finishUpdateCell()
640{ 656{
641#ifdef DESKTOP_VERSION 657#ifdef DESKTOP_VERSION
642 if (mToolTip != "") 658 if (mToolTip != "")
643 QToolTip::add(this,mToolTip,toolTipGroup(),""); 659 QToolTip::add(this,mToolTip,toolTipGroup(),"");
644#endif 660#endif
645 mItemList->sort(); 661 mItemList->sort();
646 //setMyPalette(); 662 //setMyPalette();
647 setMyPalette(); 663 setMyPalette();
648 QString text; 664 QString text;
649 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog; 665 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog;
650 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) { 666 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) {
651 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " "; 667 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " ";
652 mLabel->resize( mLabelBigSize ); 668 mLabel->resize( mLabelBigSize );
653 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); 669 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
654 } else { 670 } else {
655 mLabel->resize( mLabelSize ); 671 mLabel->resize( mLabelSize );
656 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); 672 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
657 } 673 }
658 674
659 mLabel->setText( text ); 675 mLabel->setText( text );
660 resizeEvent( 0 ); 676 resizeEvent( 0 );
661} 677}
662void MonthViewCell::updateCell() 678void MonthViewCell::updateCell()
663{ 679{
664 qDebug("MonthViewCell::updateCell() "); 680 //qDebug("MonthViewCell::updateCell() ");
665 if ( !mMonthView->isUpdatePossible() ) 681 if ( !mMonthView->isUpdatePossible() )
666 return; 682 return;
667 startUpdateCell(); 683 startUpdateCell();
668 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 684 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
669 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); 685 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true );
670 Event *event; 686 Event *event;
671 for( event = events.first(); event; event = events.next() ) { // for event 687 for( event = events.first(); event; event = events.next() ) { // for event
672 insertEvent(event); 688 insertEvent(event);
673 } 689 }
674 // insert due todos 690 // insert due todos
675 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); 691 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
676 Todo *todo; 692 Todo *todo;
677 for(todo = todos.first(); todo; todo = todos.next()) { 693 for(todo = todos.first(); todo; todo = todos.next()) {
678 insertTodo( todo ); 694 insertTodo( todo );
679 } 695 }
680 finishUpdateCell(); 696 finishUpdateCell();
681 // if ( isVisible()) 697 // if ( isVisible())
682 //qApp->processEvents(); 698 //qApp->processEvents();
683} 699}
684 700
685void MonthViewCell::updateConfig( bool bigFont ) // = false 701void MonthViewCell::updateConfig( bool bigFont ) // = false
686{ 702{
687 703
688 if ( bigFont ) { 704 if ( bigFont ) {
689 QFont fo = KOPrefs::instance()->mMonthViewFont; 705 QFont fo = KOPrefs::instance()->mMonthViewFont;
690 int ps = fo.pointSize() + 2; 706 int ps = fo.pointSize() + 2;
691 if ( ps < 18 ) 707 if ( ps < 18 )
692 ps += 2; 708 ps += 2;
693 fo.setPointSize( ps ); 709 fo.setPointSize( ps );
694 setFont( fo ); 710 setFont( fo );
695 } else 711 } else
696 setFont( KOPrefs::instance()->mMonthViewFont ); 712 setFont( KOPrefs::instance()->mMonthViewFont );
697 713
698 QFontMetrics fm( font() ); 714 QFontMetrics fm( font() );
699 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); 715 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 );
700 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); 716 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 );
701 mHolidayPalette = mStandardPalette; 717 mHolidayPalette = mStandardPalette;
702 mPrimaryPalette = mStandardPalette; 718 mPrimaryPalette = mStandardPalette;
703 mNonPrimaryPalette = mStandardPalette; 719 mNonPrimaryPalette = mStandardPalette;
704 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) { 720 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) {
705 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor ); 721 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor );
706 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor ); 722 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor );
707 mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark()); 723 mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark());
708 mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark()); 724 mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark());
709 mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor); 725 mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor);
710 mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor); 726 mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor);
711 mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark()); 727 mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark());
712 mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor); 728 mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor);
713 mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor); 729 mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor);
714 } 730 }
715 //updateCell(); 731 //updateCell();
716} 732}
717 733
718void MonthViewCell::enableScrollBars( bool enabled ) 734void MonthViewCell::enableScrollBars( bool enabled )
719{ 735{
720 if ( enabled ) { 736 if ( enabled ) {
721 mItemList->setVScrollBarMode(QScrollView::Auto); 737 mItemList->setVScrollBarMode(QScrollView::Auto);
722 mItemList->setHScrollBarMode(QScrollView::Auto); 738 mItemList->setHScrollBarMode(QScrollView::Auto);
723 } else { 739 } else {
724 mItemList->setVScrollBarMode(QScrollView::AlwaysOff); 740 mItemList->setVScrollBarMode(QScrollView::AlwaysOff);
725 mItemList->setHScrollBarMode(QScrollView::AlwaysOff); 741 mItemList->setHScrollBarMode(QScrollView::AlwaysOff);
726 } 742 }
727} 743}
728 744
729Incidence *MonthViewCell::selectedIncidence() 745Incidence *MonthViewCell::selectedIncidence()
730{ 746{
731 int index = mItemList->currentItem(); 747 int index = mItemList->currentItem();
732 if ( index < 0 ) return 0; 748 if ( index < 0 ) return 0;
733 749
734 MonthViewItem *item = 750 MonthViewItem *item =
735 static_cast<MonthViewItem *>( mItemList->item( index ) ); 751 static_cast<MonthViewItem *>( mItemList->item( index ) );
736 752
737 if ( !item ) return 0; 753 if ( !item ) return 0;
738 754
739 return item->incidence(); 755 return item->incidence();
740} 756}
741 757
742QDate MonthViewCell::selectedIncidenceDate() 758QDate MonthViewCell::selectedIncidenceDate()
743{ 759{
744 QDate qd; 760 QDate qd;
745 int index = mItemList->currentItem(); 761 int index = mItemList->currentItem();
746 if ( index < 0 ) return qd; 762 if ( index < 0 ) return qd;
747 763
748 MonthViewItem *item = 764 MonthViewItem *item =
749 static_cast<MonthViewItem *>( mItemList->item( index ) ); 765 static_cast<MonthViewItem *>( mItemList->item( index ) );
750 766
751 if ( !item ) return qd; 767 if ( !item ) return qd;
752 768
753 return item->incidenceDate(); 769 return item->incidenceDate();
754} 770}
755 771
756void MonthViewCell::deselect() 772void MonthViewCell::deselect()
757{ 773{
758 mItemList->clearSelection(); 774 mItemList->clearSelection();
759 enableScrollBars( false ); 775 enableScrollBars( false );
760 // updateCell(); 776 // updateCell();
761} 777}
762void MonthViewCell::select() 778void MonthViewCell::select()
763{ 779{
764 ;// updateCell(); 780 ;// updateCell();
765} 781}
766 782
767void MonthViewCell::resizeEvent ( QResizeEvent * ) 783void MonthViewCell::resizeEvent ( QResizeEvent * )
768{ 784{
769 if ( !mMonthView->isUpdatePossible() ) 785 if ( !mMonthView->isUpdatePossible() )
770 return; 786 return;
771 787
772 int size = height() - mLabel->height() - 2; 788 int size = height() - mLabel->height() - 2;
773 if ( size > 0 ) 789 if ( size > 0 )
774 mItemList->verticalScrollBar()->setMaximumHeight( size ); 790 mItemList->verticalScrollBar()->setMaximumHeight( size );
775 size = width() - mLabel->width() -2; 791 size = width() - mLabel->width() -2;
776 if ( size > 0 ) 792 if ( size > 0 )
777 mItemList->horizontalScrollBar()->setMaximumWidth( size ); 793 mItemList->horizontalScrollBar()->setMaximumWidth( size );
778 mLabel->move( width()-mItemList->lineWidth() - mLabel->width(), height()-mItemList->lineWidth() - mLabel->height() ); 794 mLabel->move( width()-mItemList->lineWidth() - mLabel->width(), height()-mItemList->lineWidth() - mLabel->height() );
779 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 795 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
780} 796}
781 797
782void MonthViewCell::defaultAction( QListBoxItem *item ) 798void MonthViewCell::defaultAction( QListBoxItem *item )
783{ 799{
784 if ( !item ) return; 800 if ( !item ) return;
785 801
786 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 802 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
787 Incidence *incidence = eventItem->incidence(); 803 Incidence *incidence = eventItem->incidence();
788 if ( incidence ) mMonthView->defaultAction( incidence ); 804 if ( incidence ) mMonthView->defaultAction( incidence );
789} 805}
790void MonthViewCell::showDay() 806void MonthViewCell::showDay()
791{ 807{
792 emit showDaySignal( date() ); 808 emit showDaySignal( date() );
793} 809}
794void MonthViewCell::newEvent() 810void MonthViewCell::newEvent()
795{ 811{
796 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 812 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
797 emit newEventSignal( dt ); 813 emit newEventSignal( dt );
798} 814}
799void MonthViewCell::cellClicked( QListBoxItem *item ) 815void MonthViewCell::cellClicked( QListBoxItem *item )
800{ 816{
801 static QListBoxItem * lastClicked = 0; 817 static QListBoxItem * lastClicked = 0;
802 if ( item == 0 ) { 818 if ( item == 0 ) {
803 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 819 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
804 emit newEventSignal( dt ); 820 emit newEventSignal( dt );
805 return; 821 return;
806 } 822 }
807 /* 823 /*
808 if ( lastClicked ) 824 if ( lastClicked )
809 if ( ! item ) { 825 if ( ! item ) {
810 if ( lastClicked->listBox() != item->listBox() ) 826 if ( lastClicked->listBox() != item->listBox() )
811 lastClicked->listBox()->clearSelection(); 827 lastClicked->listBox()->clearSelection();
812 } 828 }
813 */ 829 */
814 830
815 mMonthView->setSelectedCell( this ); 831 mMonthView->setSelectedCell( this );
816 if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true ); 832 if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true );
817 select(); 833 select();
818} 834}
819 835
820void MonthViewCell::contextMenu( QListBoxItem *item ) 836void MonthViewCell::contextMenu( QListBoxItem *item )
821{ 837{
822 if ( !item ) return; 838 if ( !item ) return;
823 839
824 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 840 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
825 Incidence *incidence = eventItem->incidence(); 841 Incidence *incidence = eventItem->incidence();
826 if ( incidence ) mMonthView->showContextMenu( incidence ); 842 if ( incidence ) mMonthView->showContextMenu( incidence );
827} 843}
828 844
829void MonthViewCell::selection( QListBoxItem *item ) 845void MonthViewCell::selection( QListBoxItem *item )
830{ 846{
831 if ( !item ) return; 847 if ( !item ) return;
832 848
833 mMonthView->setSelectedCell( this ); 849 mMonthView->setSelectedCell( this );
834} 850}
835 851
836 852
837// ******************************************************************************* 853// *******************************************************************************
838// ******************************************************************************* 854// *******************************************************************************
839// ******************************************************************************* 855// *******************************************************************************
840 856
841 857
842KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) 858KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
843 : KOEventView( calendar, parent, name ), 859 : KOEventView( calendar, parent, name ),
844 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), 860 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
845 mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) 861 mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
846{ 862{
847 mShortDayLabelsM = false; 863 mShortDayLabelsM = false;
848 mShortDayLabelsW = false; 864 mShortDayLabelsW = false;
849 skipResize = false; 865 skipResize = false;
850 clPending = true; 866 clPending = true;
851 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); 867 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" );
852 mWidStack = new QWidgetStack( this ); 868 mWidStack = new QWidgetStack( this );
853 QVBoxLayout* hb = new QVBoxLayout( this ); 869 QVBoxLayout* hb = new QVBoxLayout( this );
854 mMonthView = new QWidget( mWidStack ); 870 mMonthView = new QWidget( mWidStack );
855 mWeekView = new QWidget( mWidStack ); 871 mWeekView = new QWidget( mWidStack );
856#if QT_VERSION >= 0x030000 872#if QT_VERSION >= 0x030000
857 mWidStack->addWidget(mMonthView ); 873 mWidStack->addWidget(mMonthView );
858 mWidStack->addWidget(mWeekView ); 874 mWidStack->addWidget(mWeekView );
859#else 875#else
860 mWidStack->addWidget( mMonthView, 1 ); 876 mWidStack->addWidget( mMonthView, 1 );
861 mWidStack->addWidget( mWeekView , 1 ); 877 mWidStack->addWidget( mWeekView , 1 );
862#endif 878#endif
863 hb->addWidget( mNavigatorBar ); 879 hb->addWidget( mNavigatorBar );
864 hb->addWidget( mWidStack ); 880 hb->addWidget( mWidStack );
865 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 881 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
866 mShowWeekView = KOPrefs::instance()->mMonthViewWeek; 882 mShowWeekView = KOPrefs::instance()->mMonthViewWeek;
867 if ( mShowWeekView ) 883 if ( mShowWeekView )
868 mWeekStartsMonday = true; 884 mWeekStartsMonday = true;
869 updatePossible = false; 885 updatePossible = false;
870 //updatePossible = true; 886 //updatePossible = true;
871 mCells.setAutoDelete( true ); 887 mCells.setAutoDelete( true );
872 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 888 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
873 mDayLabels.resize( mDaysPerWeek ); 889 mDayLabels.resize( mDaysPerWeek );
874 mDayLabelsW.resize( mDaysPerWeek ); 890 mDayLabelsW.resize( mDaysPerWeek );
875 QFont bfont = font(); 891 QFont bfont = font();
876 if ( QApplication::desktop()->width() < 650 ) { 892 if ( QApplication::desktop()->width() < 650 ) {
877 bfont.setPointSize( bfont.pointSize() - 2 ); 893 bfont.setPointSize( bfont.pointSize() - 2 );
878 } 894 }
879 bfont.setBold( true ); 895 bfont.setBold( true );
880 int i; 896 int i;
881 897
882 for( i = 0; i < mDaysPerWeek; i++ ) { 898 for( i = 0; i < mDaysPerWeek; i++ ) {
883 QLabel *label = new QLabel( mMonthView ); 899 QLabel *label = new QLabel( mMonthView );
884 label->setFont(bfont); 900 label->setFont(bfont);
885 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 901 label->setFrameStyle(QFrame::Panel|QFrame::Raised);
886 label->setLineWidth(1); 902 label->setLineWidth(1);
887 label->setAlignment(AlignCenter); 903 label->setAlignment(AlignCenter);
888 mDayLabels.insert( i, label ); 904 mDayLabels.insert( i, label );
889 label = new QLabel( mWeekView ); 905 label = new QLabel( mWeekView );
890 label->setFont(bfont); 906 label->setFont(bfont);
891 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 907 label->setFrameStyle(QFrame::Panel|QFrame::Raised);
892 label->setLineWidth(1); 908 label->setLineWidth(1);
893 label->setAlignment(AlignCenter); 909 label->setAlignment(AlignCenter);
894 mDayLabelsW.insert( i, label ); 910 mDayLabelsW.insert( i, label );
895 } 911 }
896 912
897 bfont.setBold( false ); 913 bfont.setBold( false );
898 mWeekLabels.resize( mNumWeeks+1 ); 914 mWeekLabels.resize( mNumWeeks+1 );
899 mWeekLabelsW.resize( 2 ); 915 mWeekLabelsW.resize( 2 );
900 for( i = 0; i < mNumWeeks+1; i++ ) { 916 for( i = 0; i < mNumWeeks+1; i++ ) {
901 KOWeekButton *label = new KOWeekButton( mMonthView ); 917 KOWeekButton *label = new KOWeekButton( mMonthView );
902 label->setFocusPolicy(NoFocus); 918 label->setFocusPolicy(NoFocus);
903 label->setFont(bfont); 919 label->setFont(bfont);
904 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 920 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
905 label->setFlat(true); 921 label->setFlat(true);
906 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 922 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
907 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 923 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
908 //label->setLineWidth(1); 924 //label->setLineWidth(1);
909 //label->setAlignment(AlignCenter); 925 //label->setAlignment(AlignCenter);
910 mWeekLabels.insert( i, label ); 926 mWeekLabels.insert( i, label );
911 } 927 }
912 mWeekLabels[mNumWeeks]->setText( i18n("W")); 928 mWeekLabels[mNumWeeks]->setText( i18n("W"));
913 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); 929 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
914 930
915 for( i = 0; i < 1+1; i++ ) { 931 for( i = 0; i < 1+1; i++ ) {
916 KOWeekButton *label = new KOWeekButton( mWeekView ); 932 KOWeekButton *label = new KOWeekButton( mWeekView );
917 label->setFocusPolicy(NoFocus); 933 label->setFocusPolicy(NoFocus);
918 label->setFont(bfont); 934 label->setFont(bfont);
919 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 935 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
920 label->setFlat(true); 936 label->setFlat(true);
921 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 937 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
922 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 938 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
923 //label->setLineWidth(1); 939 //label->setLineWidth(1);
924 //label->setAlignment(AlignCenter); 940 //label->setAlignment(AlignCenter);
925 mWeekLabelsW.insert( i, label ); 941 mWeekLabelsW.insert( i, label );
926 } 942 }
927 mWeekLabelsW[1]->setText( i18n("W")); 943 mWeekLabelsW[1]->setText( i18n("W"));
928 944
929 945
930 int row, col; 946 int row, col;
931 mCells.resize( mNumCells ); 947 mCells.resize( mNumCells );
932 for( row = 0; row < mNumWeeks; ++row ) { 948 for( row = 0; row < mNumWeeks; ++row ) {
933 for( col = 0; col < mDaysPerWeek; ++col ) { 949 for( col = 0; col < mDaysPerWeek; ++col ) {
934 MonthViewCell *cell = new MonthViewCell( this, mMonthView ); 950 MonthViewCell *cell = new MonthViewCell( this, mMonthView );
935 mCells.insert( row * mDaysPerWeek + col, cell ); 951 mCells.insert( row * mDaysPerWeek + col, cell );
936 952
937 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 953 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
938 SLOT( defaultAction( Incidence * ) ) ); 954 SLOT( defaultAction( Incidence * ) ) );
939 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 955 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
940 SIGNAL( newEventSignal( QDateTime ) ) ); 956 SIGNAL( newEventSignal( QDateTime ) ) );
941 connect( cell, SIGNAL( showDaySignal( QDate ) ), 957 connect( cell, SIGNAL( showDaySignal( QDate ) ),
942 SIGNAL( showDaySignal( QDate ) ) ); 958 SIGNAL( showDaySignal( QDate ) ) );
943 } 959 }
944 } 960 }
945 mCellsW.resize( mDaysPerWeek ); 961 mCellsW.resize( mDaysPerWeek );
946 for( col = 0; col < mDaysPerWeek; ++col ) { 962 for( col = 0; col < mDaysPerWeek; ++col ) {
947 MonthViewCell *cell = new MonthViewCell( this, mWeekView ); 963 MonthViewCell *cell = new MonthViewCell( this, mWeekView );
948 mCellsW.insert( col, cell ); 964 mCellsW.insert( col, cell );
949 965
950 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 966 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
951 SLOT( defaultAction( Incidence * ) ) ); 967 SLOT( defaultAction( Incidence * ) ) );
952 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 968 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
953 SIGNAL( newEventSignal( QDateTime ) ) ); 969 SIGNAL( newEventSignal( QDateTime ) ) );
954 connect( cell, SIGNAL( showDaySignal( QDate ) ), 970 connect( cell, SIGNAL( showDaySignal( QDate ) ),
955 SIGNAL( showDaySignal( QDate ) ) ); 971 SIGNAL( showDaySignal( QDate ) ) );
956 cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont ); 972 cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
957 } 973 }
958 974
959 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); 975 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
960 mContextMenu = eventPopup(); 976 mContextMenu = eventPopup();
961 // updateConfig(); //useless here... 977 // updateConfig(); //useless here...
962 // ... but we need mWidthLongDayLabel computed 978 // ... but we need mWidthLongDayLabel computed
963 QFontMetrics fontmetric(mDayLabels[0]->font()); 979 QFontMetrics fontmetric(mDayLabels[0]->font());
964 mWidthLongDayLabel = 0; 980 mWidthLongDayLabel = 0;
965 for (int i = 0; i < 7; i++) { 981 for (int i = 0; i < 7; i++) {
966 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 982 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
967 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 983 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
968 } 984 }
969 985
970 //mWeekLabels[mNumWeeks]->setText( i18n("W")); 986 //mWeekLabels[mNumWeeks]->setText( i18n("W"));
971 987
972#if 0 988#if 0
973 if ( mShowWeekView ) 989 if ( mShowWeekView )
974 mWidStack->raiseWidget( mWeekView ); 990 mWidStack->raiseWidget( mWeekView );
975 else 991 else
976 mWidStack->raiseWidget( mMonthView ); 992 mWidStack->raiseWidget( mMonthView );
977#endif 993#endif
978 994
979 emit incidenceSelected( 0 ); 995 emit incidenceSelected( 0 );
980#ifndef DESKTOP_VERSION 996#ifndef DESKTOP_VERSION
981 resize( QApplication::desktop()->size() ); 997 resize( QApplication::desktop()->size() );
982#else 998#else
983 resize(640, 480 ); 999 resize(640, 480 );
984 updatePossible = true; 1000 updatePossible = true;
985#endif 1001#endif
986 computeLayout(); 1002 computeLayout();
987 1003
988 if ( mShowWeekView ) 1004 if ( mShowWeekView )
989 mWidStack->raiseWidget( mWeekView ); 1005 mWidStack->raiseWidget( mWeekView );
990 else 1006 else
991 mWidStack->raiseWidget( mMonthView ); 1007 mWidStack->raiseWidget( mMonthView );
992} 1008}
993 1009
994KOMonthView::~KOMonthView() 1010KOMonthView::~KOMonthView()
995{ 1011{
996 delete mContextMenu; 1012 delete mContextMenu;
997} 1013}
998 1014
999void KOMonthView::selectInternalWeekNum ( int n ) 1015void KOMonthView::selectInternalWeekNum ( int n )
1000{ 1016{
1001 switchView(); 1017 switchView();
1002 if ( !KOPrefs::instance()->mMonthViewWeek ) 1018 if ( !KOPrefs::instance()->mMonthViewWeek )
1003 emit selectMonth (); 1019 emit selectMonth ();
1004 else 1020 else
1005 emit selectWeekNum ( n ); 1021 emit selectWeekNum ( n );
1006} 1022}
1007 1023
1008int KOMonthView::currentWeek() 1024int KOMonthView::currentWeek()
1009{ 1025{
1010 if ( mShowWeekView ) 1026 if ( mShowWeekView )
1011 return mWeekLabelsW[0]->getWeekNum(); 1027 return mWeekLabelsW[0]->getWeekNum();
1012 return mWeekLabels[0]->getWeekNum(); 1028 return mWeekLabels[0]->getWeekNum();
1013} 1029}
1014void KOMonthView::switchView() 1030void KOMonthView::switchView()
1015{ 1031{
1016 if ( selectedCell( ) ) 1032 if ( selectedCell( ) )
1017 selectedCell()->deselect(); 1033 selectedCell()->deselect();
1018 mShowWeekView = !mShowWeekView; 1034 mShowWeekView = !mShowWeekView;
1019 KOPrefs::instance()->mMonthViewWeek = mShowWeekView; 1035 KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
1020 if ( clPending ) { 1036 if ( clPending ) {
1021 computeLayout(); 1037 computeLayout();
1022 updateConfig(); 1038 updateConfig();
1023 } 1039 }
1024 if ( mShowWeekView ) 1040 if ( mShowWeekView )
1025 mWidStack->raiseWidget( mWeekView ); 1041 mWidStack->raiseWidget( mWeekView );
1026 else 1042 else
1027 mWidStack->raiseWidget( mMonthView ); 1043 mWidStack->raiseWidget( mMonthView );
1028 clPending = false; 1044 clPending = false;
1029} 1045}
1030 1046
1031int KOMonthView::maxDatesHint() 1047int KOMonthView::maxDatesHint()
1032{ 1048{
1033 return mNumCells; 1049 return mNumCells;
1034} 1050}
1035 1051
1036int KOMonthView::currentDateCount() 1052int KOMonthView::currentDateCount()
1037{ 1053{
1038 return mNumCells; 1054 return mNumCells;
1039} 1055}
1040 1056
1041QPtrList<Incidence> KOMonthView::selectedIncidences() 1057QPtrList<Incidence> KOMonthView::selectedIncidences()
1042{ 1058{
1043 QPtrList<Incidence> selected; 1059 QPtrList<Incidence> selected;
1044 1060
1045 if ( mSelectedCell ) { 1061 if ( mSelectedCell ) {
1046 Incidence *incidence = mSelectedCell->selectedIncidence(); 1062 Incidence *incidence = mSelectedCell->selectedIncidence();
1047 if ( incidence ) selected.append( incidence ); 1063 if ( incidence ) selected.append( incidence );
1048 } 1064 }
1049 1065
1050 return selected; 1066 return selected;
1051} 1067}
1052 1068
1053DateList KOMonthView::selectedDates() 1069DateList KOMonthView::selectedDates()
1054{ 1070{
1055 DateList selected; 1071 DateList selected;
1056 1072
1057 if ( mSelectedCell ) { 1073 if ( mSelectedCell ) {
1058 QDate qd = mSelectedCell->selectedIncidenceDate(); 1074 QDate qd = mSelectedCell->selectedIncidenceDate();
1059 if ( qd.isValid() ) selected.append( qd ); 1075 if ( qd.isValid() ) selected.append( qd );
1060 } 1076 }
1061 1077
1062 return selected; 1078 return selected;
1063} 1079}
1064 1080
1065void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, 1081void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1066 const QDate &td) 1082 const QDate &td)
1067{ 1083{
1068#ifndef KORG_NOPRINTER 1084#ifndef KORG_NOPRINTER
1069 calPrinter->preview(CalPrinter::Month, fd, td); 1085 calPrinter->preview(CalPrinter::Month, fd, td);
1070#endif 1086#endif
1071} 1087}
1072 1088
1073void KOMonthView::updateConfig() 1089void KOMonthView::updateConfig()
1074{ 1090{
1075 1091
1076 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 1092 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
1077 1093
1078 if ( mShowWeekView ) { 1094 if ( mShowWeekView ) {
1079 mWeekStartsMonday = true; 1095 mWeekStartsMonday = true;
1080 } 1096 }
1081 QFontMetrics fontmetric(mDayLabels[0]->font()); 1097 QFontMetrics fontmetric(mDayLabels[0]->font());
1082 mWidthLongDayLabel = 0; 1098 mWidthLongDayLabel = 0;
1083 1099
1084 for (int i = 0; i < 7; i++) { 1100 for (int i = 0; i < 7; i++) {
1085 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 1101 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
1086 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 1102 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
1087 } 1103 }
1088 bool temp = mShowSatSunComp ; 1104 bool temp = mShowSatSunComp ;
1089 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 1105 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
1090 if ( ! mShowWeekView ) { 1106 if ( ! mShowWeekView ) {
1091 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) 1107 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog )
1092 computeLayout(); 1108 computeLayout();
1093 } 1109 }
1094 updateDayLabels(); 1110 updateDayLabels();
1095 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); 1111 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks);
1096 //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; 1112 //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks;
1097 //resizeEvent( 0 ); 1113 //resizeEvent( 0 );
1098 for (uint i = 0; i < mCells.count(); ++i) { 1114 for (uint i = 0; i < mCells.count(); ++i) {
1099 mCells[i]->updateConfig(); 1115 mCells[i]->updateConfig();
1100 } 1116 }
1101 1117
1102 for (uint i = 0; i < mCellsW.count(); ++i) { 1118 for (uint i = 0; i < mCellsW.count(); ++i) {
1103 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont); 1119 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont);
1104 } 1120 }
1105#ifdef DESKTOP_VERSION 1121#ifdef DESKTOP_VERSION
1106 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 1122 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
1107#endif 1123#endif
1108 updateView(); 1124 updateView();
1109} 1125}
1110 1126
1111void KOMonthView::updateDayLabels() 1127void KOMonthView::updateDayLabels()
1112{ 1128{
1113 1129
1114 QPtrVector<QLabel> *mDayLabelsT; 1130 QPtrVector<QLabel> *mDayLabelsT;
1115 1131
1116 mDayLabelsT = &mDayLabelsW; 1132 mDayLabelsT = &mDayLabelsW;
1117 for (int i = 0; i < 7; i++) { 1133 for (int i = 0; i < 7; i++) {
1118 if (mWeekStartsMonday) { 1134 if (mWeekStartsMonday) {
1119 bool show = mShortDayLabelsW; 1135 bool show = mShortDayLabelsW;
1120 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) 1136 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
1121 show = true; 1137 show = true;
1122 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 1138 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
1123 } else { 1139 } else {
1124 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW)); 1140 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW));
1125 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW)); 1141 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW));
1126 1142
1127 } 1143 }
1128 } 1144 }
1129 mDayLabelsT = &mDayLabels; 1145 mDayLabelsT = &mDayLabels;
1130 for (int i = 0; i < 7; i++) { 1146 for (int i = 0; i < 7; i++) {
1131 if (mWeekStartsMonday) { 1147 if (mWeekStartsMonday) {
1132 bool show = mShortDayLabelsM; 1148 bool show = mShortDayLabelsM;
1133 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) 1149 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
1134 show = true; 1150 show = true;
1135 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 1151 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
1136 } else { 1152 } else {
1137 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsM)); 1153 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsM));
1138 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsM)); 1154 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsM));
1139 1155
1140 } 1156 }
1141 } 1157 }
1142 1158
1143} 1159}
1144 1160
1145void KOMonthView::showDates(const QDate &start, const QDate &) 1161void KOMonthView::showDates(const QDate &start, const QDate &)
1146{ 1162{
1147 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl; 1163 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl;
1148 1164
1149 QPtrVector<MonthViewCell> *cells; 1165 QPtrVector<MonthViewCell> *cells;
1150 QPtrVector<QLabel> *dayLabels; 1166 QPtrVector<QLabel> *dayLabels;
1151 QPtrVector<KOWeekButton> *weekLabels; 1167 QPtrVector<KOWeekButton> *weekLabels;
1152 int weekNum = 6; 1168 int weekNum = 6;
1153 if ( mShowWeekView ) { 1169 if ( mShowWeekView ) {
1154 weekNum = 1; 1170 weekNum = 1;
1155 cells = &mCellsW; 1171 cells = &mCellsW;
1156 dayLabels = &mDayLabelsW; 1172 dayLabels = &mDayLabelsW;
1157 weekLabels = &mWeekLabelsW; 1173 weekLabels = &mWeekLabelsW;
1158 } else { 1174 } else {
1159 cells = &mCells; 1175 cells = &mCells;
1160 dayLabels = &mDayLabels; 1176 dayLabels = &mDayLabels;
1161 weekLabels = &mWeekLabels; 1177 weekLabels = &mWeekLabels;
1162 } 1178 }
1163 1179
1164 mStartDate = start; 1180 mStartDate = start;
1165 1181
1166 int startWeekDay = mWeekStartsMonday ? 1 : 7; 1182 int startWeekDay = mWeekStartsMonday ? 1 : 7;
1167 1183
1168 while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) { 1184 while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) {
1169 mStartDate = mStartDate.addDays( -1 ); 1185 mStartDate = mStartDate.addDays( -1 );
1170 } 1186 }
1171 1187
1172 bool primary = false; 1188 bool primary = false;
1173 uint i; 1189 uint i;
1174 for( i = 0; i < (*cells).size(); ++i ) { 1190 for( i = 0; i < (*cells).size(); ++i ) {
1175 QDate date = mStartDate.addDays( i ); 1191 QDate date = mStartDate.addDays( i );
1176 (*cells)[i]->setDate( date ); 1192 (*cells)[i]->setDate( date );
1177 1193
1178#ifndef KORG_NOPLUGINS 1194#ifndef KORG_NOPLUGINS
1179 // add holiday, if present 1195 // add holiday, if present
1180 QString hstring(KOCore::self()->holiday(date)); 1196 QString hstring(KOCore::self()->holiday(date));
1181 (*cells)[i]->setHoliday( hstring ); 1197 (*cells)[i]->setHoliday( hstring );
1182#endif 1198#endif
1183 1199
1184 } 1200 }
1185 QDate date = mStartDate.addDays( mWeekStartsMonday ? 3 : 4 ); 1201 QDate date = mStartDate.addDays( mWeekStartsMonday ? 3 : 4 );
1186 for( i = 0; i < weekNum; ++i ) { 1202 for( i = 0; i < weekNum; ++i ) {
1187 int wno; 1203 int wno;
1188 // remember, according to ISO 8601, the first week of the year is the 1204 // remember, according to ISO 8601, the first week of the year is the
1189 // first week that contains a thursday. Thus we must subtract off 4, 1205 // first week that contains a thursday. Thus we must subtract off 4,
1190 // not just 1. 1206 // not just 1.
1191 int dayOfYear = date.dayOfYear(); 1207 int dayOfYear = date.dayOfYear();
1192 if (dayOfYear % 7 != 0) 1208 if (dayOfYear % 7 != 0)
1193 wno = dayOfYear / 7 + 1; 1209 wno = dayOfYear / 7 + 1;
1194 else 1210 else
1195 wno =dayOfYear / 7; 1211 wno =dayOfYear / 7;
1196 (*weekLabels)[i]->setWeekNum( wno ); 1212 (*weekLabels)[i]->setWeekNum( wno );
1197 date = date.addDays( 7 ); 1213 date = date.addDays( 7 );
1198 } 1214 }
1199 updateView(); 1215 updateView();
1200} 1216}
1201 1217
1202void KOMonthView::showEvents(QPtrList<Event>) 1218void KOMonthView::showEvents(QPtrList<Event>)
1203{ 1219{
1204 qDebug("KOMonthView::selectEvents is not implemented yet. "); 1220 qDebug("KOMonthView::selectEvents is not implemented yet. ");
1205} 1221}
1206 1222
1207void KOMonthView::changeEventDisplay(Event *, int) 1223void KOMonthView::changeEventDisplay(Event *, int)
1208{ 1224{
1209 // this should be re-written to be much more efficient, but this 1225 // this should be re-written to be much more efficient, but this
1210 // quick-and-dirty-hack gets the job done for right now. 1226 // quick-and-dirty-hack gets the job done for right now.
1211 updateView(); 1227 updateView();
1212} 1228}
1213 1229
1214void KOMonthView::updateView() 1230void KOMonthView::updateView()
1215{ 1231{
1216 1232
1217 if ( !updatePossible ) 1233 if ( !updatePossible )
1218 return; 1234 return;
1219 //QTime ti; 1235 //QTime ti;
1220 //ti.start(); 1236 //ti.start();
1237 clearSelection();
1221 QPtrVector<MonthViewCell> *cells; 1238 QPtrVector<MonthViewCell> *cells;
1222 if ( mShowWeekView ) { 1239 if ( mShowWeekView ) {
1223 cells = &mCellsW; 1240 cells = &mCellsW;
1224 } else { 1241 } else {
1225 cells = &mCells; 1242 cells = &mCells;
1226 } 1243 }
1227#if 1 1244#if 1
1228 int i; 1245 int i;
1229 int timeSpan = (*cells).size()-1; 1246 int timeSpan = (*cells).size()-1;
1230 if ( KOPrefs::instance()->mMonthViewWeek ) 1247 if ( KOPrefs::instance()->mMonthViewWeek )
1231 timeSpan = 6; 1248 timeSpan = 6;
1232 for( i = 0; i < timeSpan + 1; ++i ) { 1249 for( i = 0; i < timeSpan + 1; ++i ) {
1233 (*cells)[i]->startUpdateCell(); 1250 (*cells)[i]->startUpdateCell();
1234 } 1251 }
1235 1252
1236 QPtrList<Event> events = calendar()->events(); 1253 QPtrList<Event> events = calendar()->events();
1237 Event *event; 1254 Event *event;
1238 QDateTime dt; 1255 QDateTime dt;
1239 bool ok; 1256 bool ok;
1240 QDate endDate = mStartDate.addDays( timeSpan ); 1257 QDate endDate = mStartDate.addDays( timeSpan );
1241 for( event = events.first(); event; event = events.next() ) { // for event 1258 for( event = events.first(); event; event = events.next() ) { // for event
1242 if ( event->doesRecur() ) { 1259 if ( event->doesRecur() ) {
1243 bool last; 1260 bool last;
1244 QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); 1261 QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last );
1245 QDateTime incidenceEnd; 1262 QDateTime incidenceEnd;
1246 int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); 1263 int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() );
1247 bool invalid = false; 1264 bool invalid = false;
1248 while( true ) { 1265 while( true ) {
1249 if ( incidenceStart.isValid() ) { 1266 if ( incidenceStart.isValid() ) {
1250 incidenceEnd = incidenceStart.addDays( eventlen ); 1267 incidenceEnd = incidenceStart.addDays( eventlen );
1251 int st = incidenceStart.date().daysTo( endDate ); 1268 int st = incidenceStart.date().daysTo( endDate );
1252 if ( st >= 0 ) { // start before timeend 1269 if ( st >= 0 ) { // start before timeend
1253 int end = mStartDate.daysTo( incidenceEnd.date() ); 1270 int end = mStartDate.daysTo( incidenceEnd.date() );
1254 if ( end >= 0 ) { // end after timestart --- got one! 1271 if ( end >= 0 ) { // end after timestart --- got one!
1255 //normalize 1272 //normalize
1256 st = timeSpan - st; 1273 st = timeSpan - st;
1257 if ( st < 0 ) st = 0; 1274 if ( st < 0 ) st = 0;
1258 if ( end > timeSpan ) end = timeSpan; 1275 if ( end > timeSpan ) end = timeSpan;
1259 int iii; 1276 int iii;
1260 //qDebug("found %s %d %d ",event->summary().latin1(), st, end ); 1277 //qDebug("found %s %d %d ",event->summary().latin1(), st, end );
1261 for ( iii = st;iii<= end;++iii) 1278 for ( iii = st;iii<= end;++iii)
1262 (*cells)[iii]->insertEvent( event ); 1279 (*cells)[iii]->insertEvent( event );
1263 } 1280 }
1264 } 1281 }
1265 } else { 1282 } else {
1266 if ( invalid ) 1283 if ( invalid )
1267 break; 1284 break;
1268 invalid = true; 1285 invalid = true;
1269 //qDebug("invalid %s", event->summary().latin1()); 1286 //qDebug("invalid %s", event->summary().latin1());
1270 incidenceStart = QDateTime( mStartDate ).addSecs( -2 );; 1287 incidenceStart = QDateTime( mStartDate ).addSecs( -2 );;
1271 } 1288 }
1272 if ( last ) 1289 if ( last )
1273 break; 1290 break;
1274 bool ok; 1291 bool ok;
1275 incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); 1292 incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok );
1276 if ( ! ok ) 1293 if ( ! ok )
1277 break; 1294 break;
1278 if ( incidenceStart.date() > endDate ) 1295 if ( incidenceStart.date() > endDate )
1279 break; 1296 break;
1280 } 1297 }
1281 } else { // no recur 1298 } else { // no recur
1282 int st = event->dtStart().date().daysTo( endDate ); 1299 int st = event->dtStart().date().daysTo( endDate );
1283 if ( st >= 0 ) { // start before timeend 1300 if ( st >= 0 ) { // start before timeend
1284 int end = mStartDate.daysTo( event->dtEnd().date() ); 1301 int end = mStartDate.daysTo( event->dtEnd().date() );
1285 if ( end >= 0 ) { // end after timestart --- got one! 1302 if ( end >= 0 ) { // end after timestart --- got one!
1286 //normalize 1303 //normalize
1287 st = timeSpan - st; 1304 st = timeSpan - st;
1288 if ( st < 0 ) st = 0; 1305 if ( st < 0 ) st = 0;
1289 if ( end > timeSpan ) end = timeSpan; 1306 if ( end > timeSpan ) end = timeSpan;
1290 int iii; 1307 int iii;
1291 for ( iii = st;iii<= end;++iii) 1308 for ( iii = st;iii<= end;++iii)
1292 (*cells)[iii]->insertEvent( event ); 1309 (*cells)[iii]->insertEvent( event );
1293 } 1310 }
1294 } 1311 }
1295 } 1312 }
1296 } 1313 }
1297 // insert due todos 1314 // insert due todos
1298 QPtrList<Todo> todos = calendar()->todos( ); 1315 QPtrList<Todo> todos = calendar()->todos( );
1299 Todo *todo; 1316 Todo *todo;
1300 for(todo = todos.first(); todo; todo = todos.next()) { 1317 for(todo = todos.first(); todo; todo = todos.next()) {
1301 //insertTodo( todo ); 1318 //insertTodo( todo );
1302 if ( todo->hasDueDate() ) { 1319 if ( todo->hasDueDate() ) {
1303 int day = mStartDate.daysTo( todo->dtDue().date() ); 1320 int day = mStartDate.daysTo( todo->dtDue().date() );
1304 if ( day >= 0 && day < timeSpan + 1) { 1321 if ( day >= 0 && day < timeSpan + 1) {
1305 (*cells)[day]->insertTodo( todo ); 1322 (*cells)[day]->insertTodo( todo );
1306 } 1323 }
1307 } 1324 }
1308 } 1325 }
1309 1326
1310 for( i = 0; i < timeSpan+1; ++i ) { 1327 for( i = 0; i < timeSpan+1; ++i ) {
1311 (*cells)[i]->finishUpdateCell(); 1328 (*cells)[i]->finishUpdateCell();
1312 } 1329 }
1313 processSelectionChange(); 1330 processSelectionChange();
1314 (*cells)[0]->setFocus(); 1331 (*cells)[0]->setFocus();
1315 1332
1316 1333
1317#else 1334#else
1318 // old code 1335 // old code
1319 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); 1336 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
1320 int i; 1337 int i;
1321 for( i = 0; i < (*cells).count(); ++i ) { 1338 for( i = 0; i < (*cells).count(); ++i ) {
1322 (*cells)[i]->updateCell(); 1339 (*cells)[i]->updateCell();
1323 } 1340 }
1324 1341
1325 //qDebug("KOMonthView::updateView() "); 1342 //qDebug("KOMonthView::updateView() ");
1326 processSelectionChange(); 1343 processSelectionChange();
1327 // qDebug("---------------------------------------------------------------------+ "); 1344 // qDebug("---------------------------------------------------------------------+ ");
1328 (*cells)[0]->setFocus(); 1345 (*cells)[0]->setFocus();
1329#endif 1346#endif
1330 1347
1331 //qDebug("update time %d ", ti.elapsed()); 1348 //qDebug("update time %d ", ti.elapsed());
1332} 1349}
1333 1350
1334void KOMonthView::resizeEvent(QResizeEvent * e) 1351void KOMonthView::resizeEvent(QResizeEvent * e)
1335{ 1352{
1336 //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); 1353 //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height());
1337 computeLayout(); 1354 computeLayout();
1338 clPending = true; 1355 clPending = true;
1339 if ( mShowWeekView ) 1356 if ( mShowWeekView )
1340 mCellsW[0]->setFocus(); 1357 mCellsW[0]->setFocus();
1341 else 1358 else
1342 mCells[0]->setFocus(); 1359 mCells[0]->setFocus();
1343} 1360}
1344void KOMonthView::computeLayoutWeek() 1361void KOMonthView::computeLayoutWeek()
1345{ 1362{
1346 static int lastWid = 0; 1363 static int lastWid = 0;
1347 static int lastHei = 0; 1364 static int lastHei = 0;
1348 int daysToShow; 1365 int daysToShow;
1349 bool combinedSatSun = false; 1366 bool combinedSatSun = false;
1350 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1367 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1351 daysToShow = 6; 1368 daysToShow = 6;
1352 combinedSatSun = true; 1369 combinedSatSun = true;
1353 } 1370 }
1354 int tWid = topLevelWidget()->size().width(); 1371 int tWid = topLevelWidget()->size().width();
1355 int tHei = topLevelWidget()->size().height(); 1372 int tHei = topLevelWidget()->size().height();
1356 1373
1357 int wid = width();//e 1374 int wid = width();//e
1358 int hei = height()-1-mNavigatorBar->height(); 1375 int hei = height()-1-mNavigatorBar->height();
1359 1376
1360 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) 1377 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
1361 return; 1378 return;
1362 1379
1363 if ( lastWid == width() && lastHei == height() ) 1380 if ( lastWid == width() && lastHei == height() )
1364 return; 1381 return;
1365 lastWid = width(); 1382 lastWid = width();
1366 lastHei = height(); 1383 lastHei = height();
1367 1384
1368 1385
1369 if ( wid < hei ) 1386 if ( wid < hei )
1370 daysToShow = 2; 1387 daysToShow = 2;
1371 else 1388 else
1372 daysToShow = 3; 1389 daysToShow = 3;
1373 mShowSatSunComp = true; 1390 mShowSatSunComp = true;
1374 combinedSatSun = true; 1391 combinedSatSun = true;
1375 1392
1376 //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ "); 1393 //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ ");
1377 QFontMetrics fm ( mWeekLabels[0]->font() ); 1394 QFontMetrics fm ( mWeekLabels[0]->font() );
1378 int weeklabelwid = fm.width( "888" ); 1395 int weeklabelwid = fm.width( "888" );
1379 wid -= weeklabelwid; 1396 wid -= weeklabelwid;
1380 1397
1381 int colWid = wid / daysToShow; 1398 int colWid = wid / daysToShow;
1382 int lastCol = wid - ( colWid*6 ); 1399 int lastCol = wid - ( colWid*6 );
1383 int dayLabelHei = mDayLabelsW[0]->sizeHint().height(); 1400 int dayLabelHei = mDayLabelsW[0]->sizeHint().height();
1384 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow ); 1401 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
1385 int colModulo = wid % daysToShow; 1402 int colModulo = wid % daysToShow;
1386 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1; 1403 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1;
1387 //qDebug("rowmod %d ", rowModulo); 1404 //qDebug("rowmod %d ", rowModulo);
1388 int i; 1405 int i;
1389 int x,y,w,h; 1406 int x,y,w,h;
1390 x= 0; 1407 x= 0;
1391 y= 0; 1408 y= 0;
1392 w = colWid; 1409 w = colWid;
1393 h = dayLabelHei ; 1410 h = dayLabelHei ;
1394 for ( i = 0; i < 7; i++) { 1411 for ( i = 0; i < 7; i++) {
1395 if ( i && !( i % daysToShow) && i < 6) { 1412 if ( i && !( i % daysToShow) && i < 6) {
1396 y += hei/(5-daysToShow); 1413 y += hei/(5-daysToShow);
1397 x = 0; 1414 x = 0;
1398 w = colWid; 1415 w = colWid;
1399 } 1416 }
1400 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1417 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1401 ++w; 1418 ++w;
1402 } 1419 }
1403 if ( i >= 5 ) { 1420 if ( i >= 5 ) {
1404 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h); 1421 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
1405 x -= (w/2 ); 1422 x -= (w/2 );
1406 } 1423 }
1407 else 1424 else
1408 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w,h); 1425 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w,h);
1409 x += w; 1426 x += w;
1410 } 1427 }
1411 x= 0; 1428 x= 0;
1412 y= dayLabelHei; 1429 y= dayLabelHei;
1413 w = colWid; 1430 w = colWid;
1414 h = cellHei; 1431 h = cellHei;
1415 for ( i = 0; i < mCellsW.count(); ++i) { 1432 for ( i = 0; i < mCellsW.count(); ++i) {
1416 if ( i > 6 ) { 1433 if ( i > 6 ) {
1417 mCellsW[i]->hide(); 1434 mCellsW[i]->hide();
1418 continue; 1435 continue;
1419 } 1436 }
1420 1437
1421 w = colWid; 1438 w = colWid;
1422 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1439 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1423 ++w; 1440 ++w;
1424 } 1441 }
1425 if ( i == (daysToShow-1-rowModulo)*7) 1442 if ( i == (daysToShow-1-rowModulo)*7)
1426 ++h; 1443 ++h;
1427 1444
1428 if ( i >= 5 ) { 1445 if ( i >= 5 ) {
1429 if ( i ==5 ) { 1446 if ( i ==5 ) {
1430 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1447 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
1431 x -= w ;y += h/2; 1448 x -= w ;y += h/2;
1432 } else { 1449 } else {
1433 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) { 1450 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) {
1434 ++w; 1451 ++w;
1435 } 1452 }
1436 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1453 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
1437 y -= h/2; 1454 y -= h/2;
1438 } 1455 }
1439 } else 1456 } else
1440 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1457 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h );
1441 1458
1442 1459
1443 x += w; 1460 x += w;
1444 if ( x + w/2 > wid ) { 1461 if ( x + w/2 > wid ) {
1445 x = 0; 1462 x = 0;
1446 y += h+dayLabelHei ; 1463 y += h+dayLabelHei ;
1447 } 1464 }
1448 } 1465 }
1449 y= dayLabelHei; 1466 y= dayLabelHei;
1450 h = cellHei ; 1467 h = cellHei ;
1451 mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); 1468 mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei);
1452 mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1469 mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1453 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1470 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1454 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1471 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1455 mShortDayLabelsW = mDayLabelsW[0]->width()-2 < mWidthLongDayLabel ; 1472 mShortDayLabelsW = mDayLabelsW[0]->width()-2 < mWidthLongDayLabel ;
1456 updateDayLabels(); 1473 updateDayLabels();
1457 //bool forceUpdate = !updatePossible; 1474 //bool forceUpdate = !updatePossible;
1458 updatePossible = true; 1475 updatePossible = true;
1459 //mWeekLabels[mNumWeeks]->setText( i18n("M")); 1476 //mWeekLabels[mNumWeeks]->setText( i18n("M"));
1460 //if ( forceUpdate ) 1477 //if ( forceUpdate )
1461 // updateView(); 1478 // updateView();
1462} 1479}
1463void KOMonthView::computeLayout() 1480void KOMonthView::computeLayout()
1464{ 1481{
1465 1482
1466 1483
1467 static int lastWid = 0; 1484 static int lastWid = 0;
1468 static int lastHei = 0; 1485 static int lastHei = 0;
1469 1486
1470 if ( mShowWeekView ){ 1487 if ( mShowWeekView ){
1471 computeLayoutWeek(); 1488 computeLayoutWeek();
1472 return; 1489 return;
1473 } 1490 }
1474 int daysToShow = 7; 1491 int daysToShow = 7;
1475 bool combinedSatSun = false; 1492 bool combinedSatSun = false;
1476 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1493 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1477 daysToShow = 6; 1494 daysToShow = 6;
1478 combinedSatSun = true; 1495 combinedSatSun = true;
1479 } 1496 }
1480 int tWid = topLevelWidget()->size().width(); 1497 int tWid = topLevelWidget()->size().width();
1481 int tHei = topLevelWidget()->size().height(); 1498 int tHei = topLevelWidget()->size().height();
1482 1499
1483 int wid = width();//e 1500 int wid = width();//e
1484 int hei = height()-1-mNavigatorBar->height(); 1501 int hei = height()-1-mNavigatorBar->height();
1485 1502
1486 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) { 1503 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) {
1487 return; 1504 return;
1488 } 1505 }
1489 if ( lastWid == width() && lastHei == height() ){ 1506 if ( lastWid == width() && lastHei == height() ){
1490 return; 1507 return;
1491 } 1508 }
1492 1509
1493 lastWid = width(); 1510 lastWid = width();
1494 lastHei = height(); 1511 lastHei = height();
1495 //qDebug("KOMonthView::computeLayout() MMM ------------------------------------ "); 1512 //qDebug("KOMonthView::computeLayout() MMM ------------------------------------ ");
1496 QFontMetrics fm ( mWeekLabels[0]->font() ); 1513 QFontMetrics fm ( mWeekLabels[0]->font() );
1497 int weeklabelwid = fm.width( "888" ); 1514 int weeklabelwid = fm.width( "888" );
1498 wid -= weeklabelwid; 1515 wid -= weeklabelwid;
1499 1516
1500 int colWid = wid / daysToShow; 1517 int colWid = wid / daysToShow;
1501 int lastCol = wid - ( colWid*6 ); 1518 int lastCol = wid - ( colWid*6 );
1502 int dayLabelHei = mDayLabels[0]->sizeHint().height(); 1519 int dayLabelHei = mDayLabels[0]->sizeHint().height();
1503 int cellHei = (hei - dayLabelHei) /6; 1520 int cellHei = (hei - dayLabelHei) /6;
1504 int colModulo = wid % daysToShow; 1521 int colModulo = wid % daysToShow;
1505 int rowModulo = (hei- dayLabelHei) % 6; 1522 int rowModulo = (hei- dayLabelHei) % 6;
1506 //qDebug("rowmod %d ", rowModulo); 1523 //qDebug("rowmod %d ", rowModulo);
1507 int i; 1524 int i;
1508 int x,y,w,h; 1525 int x,y,w,h;
1509 x= 0; 1526 x= 0;
1510 y= 0; 1527 y= 0;
1511 w = colWid; 1528 w = colWid;
1512 h = dayLabelHei ; 1529 h = dayLabelHei ;
1513 for ( i = 0; i < 7; i++) { 1530 for ( i = 0; i < 7; i++) {
1514 if ( i == daysToShow-colModulo ) 1531 if ( i == daysToShow-colModulo )
1515 ++w; 1532 ++w;
1516 if ( combinedSatSun ) { 1533 if ( combinedSatSun ) {
1517 if ( i >= daysToShow-1 ) { 1534 if ( i >= daysToShow-1 ) {
1518 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h); 1535 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
1519 x -= w/2 ; 1536 x -= w/2 ;
1520 } 1537 }
1521 else 1538 else
1522 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1539 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1523 } else 1540 } else
1524 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1541 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1525 x += w; 1542 x += w;
1526 } 1543 }
1527 x= 0; 1544 x= 0;
1528 y= dayLabelHei; 1545 y= dayLabelHei;
1529 w = colWid; 1546 w = colWid;
1530 h = cellHei ; 1547 h = cellHei ;
1531 for ( i = 0; i < mCells.count(); ++i) { 1548 for ( i = 0; i < mCells.count(); ++i) {
1532 //qDebug("iii %d ", i); 1549 //qDebug("iii %d ", i);
1533 w = colWid; 1550 w = colWid;
1534 if ( ((i) % 7) >= 7-colModulo ) { 1551 if ( ((i) % 7) >= 7-colModulo ) {
1535 ++w; 1552 ++w;
1536 } 1553 }
1537 if ( i == (6-rowModulo)*7) 1554 if ( i == (6-rowModulo)*7)
1538 ++h; 1555 ++h;
1539 if ( combinedSatSun ) { 1556 if ( combinedSatSun ) {
1540 if ( (i)%7 >= daysToShow-1 ) { 1557 if ( (i)%7 >= daysToShow-1 ) {
1541 if ( (i)%7 == daysToShow-1 ) { 1558 if ( (i)%7 == daysToShow-1 ) {
1542 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1559 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
1543 x -= w ;y += h/2; 1560 x -= w ;y += h/2;
1544 } else { 1561 } else {
1545 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1562 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
1546 y -= h/2; 1563 y -= h/2;
1547 } 1564 }
1548 } else 1565 } else
1549 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1566 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1550 1567
1551 } 1568 }
1552 else 1569 else
1553 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1570 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1554 x += w; 1571 x += w;
1555 if ( x + w/2 > wid ) { 1572 if ( x + w/2 > wid ) {
1556 x = 0; 1573 x = 0;
1557 y += h; 1574 y += h;
1558 } 1575 }
1559 } 1576 }
1560 y= dayLabelHei; 1577 y= dayLabelHei;
1561 h = cellHei ; 1578 h = cellHei ;
1562 for ( i = 0; i < 6; i++) { 1579 for ( i = 0; i < 6; i++) {
1563 if ( i == (6-rowModulo)) 1580 if ( i == (6-rowModulo))
1564 ++h; 1581 ++h;
1565 mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h); 1582 mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h);
1566 y += h; 1583 y += h;
1567 } 1584 }
1568 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1585 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1569 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1586 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1570 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1587 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1571 mShortDayLabelsM = mDayLabels[0]->width()-2 < mWidthLongDayLabel ; 1588 mShortDayLabelsM = mDayLabels[0]->width()-2 < mWidthLongDayLabel ;
1572 updateDayLabels(); 1589 updateDayLabels();
1573 //bool forceUpdate = !updatePossible; 1590 //bool forceUpdate = !updatePossible;
1574 updatePossible = true; 1591 updatePossible = true;
1575 //mWeekLabels[mNumWeeks]->setText( i18n("W")); 1592 //mWeekLabels[mNumWeeks]->setText( i18n("W"));
1576} 1593}
1577 1594
1578void KOMonthView::showContextMenu( Incidence *incidence ) 1595void KOMonthView::showContextMenu( Incidence *incidence )
1579{ 1596{
1580 mContextMenu->showIncidencePopup(incidence); 1597 mContextMenu->showIncidencePopup(incidence);
1581 /* 1598 /*
1582 if( incidence && incidence->type() == "Event" ) { 1599 if( incidence && incidence->type() == "Event" ) {
1583 Event *event = static_cast<Event *>(incidence); 1600 Event *event = static_cast<Event *>(incidence);
1584 mContextMenu->showEventPopup(event); 1601 mContextMenu->showEventPopup(event);
1585 } else { 1602 } else {
1586 kdDebug() << "MonthView::showContextMenu(): cast failed." << endl; 1603 kdDebug() << "MonthView::showContextMenu(): cast failed." << endl;
1587 } 1604 }
1588 */ 1605 */
1589} 1606}
1590MonthViewCell * KOMonthView::selectedCell( ) 1607MonthViewCell * KOMonthView::selectedCell( )
1591{ 1608{
1592 return mSelectedCell; 1609 return mSelectedCell;
1593} 1610}
1594void KOMonthView::setSelectedCell( MonthViewCell *cell ) 1611void KOMonthView::setSelectedCell( MonthViewCell *cell )
1595{ 1612{
1596 // qDebug("KOMonthView::setSelectedCell "); 1613 //qDebug("KOMonthView::setSelectedCell ");
1597 if ( mSelectedCell && mSelectedCell != cell ) { 1614 if ( mSelectedCell && mSelectedCell != cell ) {
1598 MonthViewCell * mvc = mSelectedCell; 1615 MonthViewCell * mvc = mSelectedCell;
1599 mSelectedCell = cell; 1616 mSelectedCell = cell;
1600 mvc->deselect(); 1617 mvc->deselect();
1601 } else 1618 } else
1602 mSelectedCell = cell; 1619 mSelectedCell = cell;
1603 // if ( mSelectedCell ) 1620 // if ( mSelectedCell )
1604 // mSelectedCell->select(); 1621 // mSelectedCell->select();
1605 if ( !mSelectedCell ) 1622 if ( !mSelectedCell )
1606 emit incidenceSelected( 0 ); 1623 emit incidenceSelected( 0 );
1607 else 1624 else
1608 emit incidenceSelected( mSelectedCell->selectedIncidence() ); 1625 emit incidenceSelected( mSelectedCell->selectedIncidence() );
1609} 1626}
1610 1627
1611void KOMonthView::processSelectionChange() 1628void KOMonthView::processSelectionChange()
1612{ 1629{
1613 QPtrList<Incidence> incidences = selectedIncidences(); 1630 QPtrList<Incidence> incidences = selectedIncidences();
1614 if (incidences.count() > 0) { 1631 if (incidences.count() > 0) {
1615 emit incidenceSelected( incidences.first() ); 1632 emit incidenceSelected( incidences.first() );
1616 } else { 1633 } else {
1617 emit incidenceSelected( 0 ); 1634 emit incidenceSelected( 0 );
1635 clearSelection();
1618 } 1636 }
1619} 1637}
1620 1638
1621void KOMonthView::clearSelection() 1639void KOMonthView::clearSelection()
1622{ 1640{
1623 if ( mSelectedCell ) { 1641 if ( mSelectedCell ) {
1624 mSelectedCell->deselect(); 1642 mSelectedCell->deselect();
1625 mSelectedCell = 0; 1643 mSelectedCell = 0;
1626 } 1644 }
1627} 1645}
1628void KOMonthView::keyPressEvent ( QKeyEvent * e ) 1646void KOMonthView::keyPressEvent ( QKeyEvent * e )
1629{ 1647{
1630 //qDebug("KOMonthView::keyPressEvent "); 1648 //qDebug("KOMonthView::keyPressEvent ");
1631 switch(e->key()) { 1649 switch(e->key()) {
1632 case Key_Up: 1650 case Key_Up:
1633 { 1651 {
1634 if ( mShowWeekView ) { 1652 if ( mShowWeekView ) {
1635 mCellsW[0]->setFocus(); 1653 mCellsW[0]->setFocus();
1636 emit selectWeekNum ( currentWeek() - 1 ); 1654 emit selectWeekNum ( currentWeek() - 1 );
1637 } 1655 }
1638 else { 1656 else {
1639 mCells[0]->setFocus(); 1657 mCells[0]->setFocus();
1640 emit prevMonth(); 1658 emit prevMonth();
1641 } 1659 }
1642 } 1660 }
1643 e->accept(); 1661 e->accept();
1644 break; 1662 break;
1645 case Key_Down: 1663 case Key_Down:
1646 { 1664 {
1647 if ( mShowWeekView ) { 1665 if ( mShowWeekView ) {
1648 mCellsW[0]->setFocus(); 1666 mCellsW[0]->setFocus();
1649 emit selectWeekNum ( currentWeek() +1); 1667 emit selectWeekNum ( currentWeek() +1);
1650 } 1668 }
1651 else { 1669 else {
1652 mCells[0]->setFocus(); 1670 mCells[0]->setFocus();
1653 emit nextMonth(); 1671 emit nextMonth();
1654 } 1672 }
1655 1673
1656 } 1674 }
1657 e->accept(); 1675 e->accept();
1658 break; 1676 break;
1659 case Key_Return: 1677 case Key_Return:
1660 case Key_Enter: 1678 case Key_Enter:
1661 { 1679 {
1662 selectInternalWeekNum ( currentWeek() ); 1680 selectInternalWeekNum ( currentWeek() );
1663 } 1681 }
1664 e->accept(); 1682 e->accept();
1665 break; 1683 break;
1684 case Key_D:
1685 if ( mSelectedCell ) {
1686 mSelectedCell->showDay();
1687 e->accept();
1688 } else {
1689 e->ignore();
1690 }
1691 break;
1666 default: 1692 default:
1667 e->ignore(); 1693 e->ignore();
1668 break; 1694 break;
1669 } 1695 }
1670} 1696}
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index f92a69a..fd8cbf2 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -1,301 +1,304 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#ifndef _KOMONTHVIEW_H 20#ifndef _KOMONTHVIEW_H
21#define _KOMONTHVIEW_H 21#define _KOMONTHVIEW_H
22 22
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qframe.h> 24#include <qframe.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26#include <qlistbox.h> 26#include <qlistbox.h>
27#include <qpoint.h> 27#include <qpoint.h>
28#include <qwidgetstack.h> 28#include <qwidgetstack.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qintdict.h> 30#include <qintdict.h>
31#include <qpushbutton.h> 31#include <qpushbutton.h>
32#include <qvaluelist.h> 32#include <qvaluelist.h>
33#include <qptrvector.h> 33#include <qptrvector.h>
34 34
35#include <libkcal/calendar.h> 35#include <libkcal/calendar.h>
36#include <libkcal/event.h> 36#include <libkcal/event.h>
37 37
38#include "koeventview.h" 38#include "koeventview.h"
39#include "navigatorbar.h" 39#include "navigatorbar.h"
40 40
41#ifdef DESKTOP_VERSION 41#ifdef DESKTOP_VERSION
42class QToolTipGroup; 42class QToolTipGroup;
43#endif 43#endif
44 44
45class KNOWhatsThis; 45class KNOWhatsThis;
46class KOWeekButton : public QPushButton 46class KOWeekButton : public QPushButton
47{ 47{
48 Q_OBJECT 48 Q_OBJECT
49 public: 49 public:
50 KOWeekButton( QWidget *parent=0, const char *name=0 ) : 50 KOWeekButton( QWidget *parent=0, const char *name=0 ) :
51 QPushButton( parent, name) 51 QPushButton( parent, name)
52 { 52 {
53 connect( this, SIGNAL( clicked() ), 53 connect( this, SIGNAL( clicked() ),
54 SLOT( bottonClicked() )); 54 SLOT( bottonClicked() ));
55 mNumber = -1; 55 mNumber = -1;
56 } 56 }
57 void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));} 57 void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));}
58 int getWeekNum() { return mNumber;} 58 int getWeekNum() { return mNumber;}
59 signals: 59 signals:
60 void selectWeekNum ( int ); 60 void selectWeekNum ( int );
61private: 61private:
62 int mNumber; 62 int mNumber;
63private slots : 63private slots :
64 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); } 64 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); }
65}; 65};
66 66
67class KNoScrollListBox: public QListBox 67class KNoScrollListBox: public QListBox
68{ 68{
69 Q_OBJECT 69 Q_OBJECT
70 public: 70 public:
71 KNoScrollListBox(QWidget *parent=0, const char *name=0); 71 KNoScrollListBox(QWidget *parent=0, const char *name=0);
72 ~KNoScrollListBox(); 72 ~KNoScrollListBox();
73 QString getWhatsThisText(QPoint p) ; 73 QString getWhatsThisText(QPoint p) ;
74 74
75 signals: 75 signals:
76 void shiftDown(); 76 void shiftDown();
77 void shiftUp(); 77 void shiftUp();
78 void rightClick(); 78 void rightClick();
79 79
80 protected slots: 80 protected slots:
81 void oneDown(); 81 void oneDown();
82 void keyPressEvent(QKeyEvent *); 82 void keyPressEvent(QKeyEvent *);
83 void keyReleaseEvent(QKeyEvent *); 83 void keyReleaseEvent(QKeyEvent *);
84 void mousePressEvent(QMouseEvent *); 84 void mousePressEvent(QMouseEvent *);
85 85
86 private: 86 private:
87 KNOWhatsThis * mWT; 87 KNOWhatsThis * mWT;
88}; 88};
89 89
90 90
91class MonthViewItem: public QListBoxItem 91class MonthViewItem: public QListBoxItem
92{ 92{
93 public: 93 public:
94 MonthViewItem( Incidence *, QDate qd, const QString & title ); 94 MonthViewItem( Incidence *, QDate qd, const QString & title );
95 95
96 void setRecur(bool on) { mRecur = on; } 96 void setRecur(bool on) { mRecur = on; }
97 void setAlarm(bool on) { mAlarm = on; } 97 void setAlarm(bool on) { mAlarm = on; }
98 void setReply(bool on) { mReply = on; } 98 void setReply(bool on) { mReply = on; }
99 void setMoreInfo(bool on) { mInfo = on; } 99 void setMoreInfo(bool on) { mInfo = on; }
100 void setMultiDay(int type) { mMultiday = type; } 100 void setMultiDay(int type) { mMultiday = type; }
101 101
102 102
103 void setPalette(const QPalette &p) { mPalette = p; } 103 void setPalette(const QPalette &p) { mPalette = p; }
104 QPalette palette() const { return mPalette; } 104 QPalette palette() const { return mPalette; }
105 105
106 Incidence *incidence() const { return mIncidence; } 106 Incidence *incidence() const { return mIncidence; }
107 QDate incidenceDate() { return mDate; } 107 QDate incidenceDate() { return mDate; }
108 108
109 protected: 109 protected:
110 virtual void paint(QPainter *); 110 virtual void paint(QPainter *);
111 virtual int height(const QListBox *) const; 111 virtual int height(const QListBox *) const;
112 virtual int width(const QListBox *) const; 112 virtual int width(const QListBox *) const;
113 113
114 private: 114 private:
115 int mMultiday; 115 int mMultiday;
116 bool mRecur; 116 bool mRecur;
117 bool mAlarm; 117 bool mAlarm;
118 bool mReply; 118 bool mReply;
119 bool mInfo; 119 bool mInfo;
120 120
121 QPalette mPalette; 121 QPalette mPalette;
122 QDate mDate; 122 QDate mDate;
123 123
124 Incidence *mIncidence; 124 Incidence *mIncidence;
125}; 125};
126 126
127 127
128class KOMonthView; 128class KOMonthView;
129 129
130class MonthViewCell : public QWidget 130class MonthViewCell : public QWidget
131{ 131{
132 Q_OBJECT 132 Q_OBJECT
133 public: 133 public:
134 MonthViewCell(KOMonthView *,QWidget* ); 134 MonthViewCell(KOMonthView *,QWidget* );
135 135
136 void setDate( const QDate & ); 136 void setDate( const QDate & );
137 QDate date() const; 137 QDate date() const;
138 138
139 void setPrimary( bool ); 139 void setPrimary( bool );
140 bool isPrimary() const; 140 bool isPrimary() const;
141 141
142 void setHoliday( bool ); 142 void setHoliday( bool );
143 void setHoliday( const QString & ); 143 void setHoliday( const QString & );
144 144
145 void updateCell(); 145 void updateCell();
146 void startUpdateCell(); 146 void startUpdateCell();
147 void finishUpdateCell(); 147 void finishUpdateCell();
148 void insertEvent(Event *); 148 void insertEvent(Event *);
149 void insertTodo(Todo *); 149 void insertTodo(Todo *);
150 150
151 void updateConfig( bool bigFont = false ); 151 void updateConfig( bool bigFont = false );
152 152
153 void enableScrollBars( bool ); 153 void enableScrollBars( bool );
154 154
155 Incidence *selectedIncidence(); 155 Incidence *selectedIncidence();
156 QDate selectedIncidenceDate(); 156 QDate selectedIncidenceDate();
157 157
158 void deselect(); 158 void deselect();
159 void select(); 159 void select();
160 160
161#ifdef DESKTOP_VERSION 161#ifdef DESKTOP_VERSION
162 static QToolTipGroup *toolTipGroup(); 162 static QToolTipGroup *toolTipGroup();
163#endif 163#endif
164 signals: 164 signals:
165 void defaultAction( Incidence * ); 165 void defaultAction( Incidence * );
166 void newEventSignal( QDateTime ); 166 void newEventSignal( QDateTime );
167 void showDaySignal( QDate ); 167 void showDaySignal( QDate );
168 168
169 protected: 169 protected:
170 QString mToolTip; 170 QString mToolTip;
171 void resizeEvent( QResizeEvent * ); 171 void resizeEvent( QResizeEvent * );
172 172
173
174public slots:
175 void showDay();
176
173 protected slots: 177 protected slots:
174 void defaultAction( QListBoxItem * ); 178 void defaultAction( QListBoxItem * );
175 void contextMenu( QListBoxItem * ); 179 void contextMenu( QListBoxItem * );
176 void selection( QListBoxItem * ); 180 void selection( QListBoxItem * );
177 void cellClicked( QListBoxItem * ); 181 void cellClicked( QListBoxItem * );
178 void newEvent(); 182 void newEvent();
179 void showDay();
180 183
181 private: 184 private:
182 KOMonthView *mMonthView; 185 KOMonthView *mMonthView;
183 186
184 QDate mDate; 187 QDate mDate;
185 bool mPrimary; 188 bool mPrimary;
186 bool mHoliday; 189 bool mHoliday;
187 QString mHolidayString; 190 QString mHolidayString;
188 191
189 //QLabel *mLabel; 192 //QLabel *mLabel;
190 QPushButton *mLabel; 193 QPushButton *mLabel;
191 QListBox *mItemList; 194 QListBox *mItemList;
192#ifdef DESKTOP_VERSION 195#ifdef DESKTOP_VERSION
193 static QToolTipGroup *mToolTipGroup; 196 static QToolTipGroup *mToolTipGroup;
194#endif 197#endif
195 QSize mLabelSize; 198 QSize mLabelSize;
196 QSize mLabelBigSize; 199 QSize mLabelBigSize;
197 QPalette mHolidayPalette; 200 QPalette mHolidayPalette;
198 QPalette mStandardPalette; 201 QPalette mStandardPalette;
199 QPalette mPrimaryPalette; 202 QPalette mPrimaryPalette;
200 QPalette mNonPrimaryPalette; 203 QPalette mNonPrimaryPalette;
201 void setMyPalette(); 204 void setMyPalette();
202 QPalette getPalette (); 205 QPalette getPalette ();
203 void keyPressEvent ( QKeyEvent * ) ; 206 void keyPressEvent ( QKeyEvent * ) ;
204 207
205}; 208};
206 209
207 210
208class KOMonthView: public KOEventView 211class KOMonthView: public KOEventView
209{ 212{
210 Q_OBJECT 213 Q_OBJECT
211 public: 214 public:
212 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); 215 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
213 ~KOMonthView(); 216 ~KOMonthView();
214 217
215 /** Returns maximum number of days supported by the komonthview */ 218 /** Returns maximum number of days supported by the komonthview */
216 virtual int maxDatesHint(); 219 virtual int maxDatesHint();
217 220
218 /** Returns number of currently shown dates. */ 221 /** Returns number of currently shown dates. */
219 virtual int currentDateCount(); 222 virtual int currentDateCount();
220 223
221 /** returns the currently selected events */ 224 /** returns the currently selected events */
222 virtual QPtrList<Incidence> selectedIncidences(); 225 virtual QPtrList<Incidence> selectedIncidences();
223 226
224 /** returns dates of the currently selected events */ 227 /** returns dates of the currently selected events */
225 virtual DateList selectedDates(); 228 virtual DateList selectedDates();
226 229
227 virtual void printPreview(CalPrinter *calPrinter, 230 virtual void printPreview(CalPrinter *calPrinter,
228 const QDate &, const QDate &); 231 const QDate &, const QDate &);
229 bool isMonthView() { return !mShowWeekView; } 232 bool isMonthView() { return !mShowWeekView; }
230 bool isUpdatePossible() { return updatePossible; } 233 bool isUpdatePossible() { return updatePossible; }
231 234
232 MonthViewCell * selectedCell(); 235 MonthViewCell * selectedCell();
233 bool skipResize; 236 bool skipResize;
234 NavigatorBar* navigatorBar() { return mNavigatorBar ;} 237 NavigatorBar* navigatorBar() { return mNavigatorBar ;}
235 public slots: 238 public slots:
236 virtual void updateView(); 239 virtual void updateView();
237 virtual void updateConfig(); 240 virtual void updateConfig();
238 virtual void showDates(const QDate &start, const QDate &end); 241 virtual void showDates(const QDate &start, const QDate &end);
239 virtual void showEvents(QPtrList<Event> eventList); 242 virtual void showEvents(QPtrList<Event> eventList);
240 243
241 void changeEventDisplay(Event *, int); 244 void changeEventDisplay(Event *, int);
242 245
243 void clearSelection(); 246 void clearSelection();
244 247
245 void showContextMenu( Incidence * ); 248 void showContextMenu( Incidence * );
246 249
247 void setSelectedCell( MonthViewCell * ); 250 void setSelectedCell( MonthViewCell * );
248 void switchView(); 251 void switchView();
249 252
250 protected slots: 253 protected slots:
251 void selectInternalWeekNum ( int ); 254 void selectInternalWeekNum ( int );
252 void processSelectionChange(); 255 void processSelectionChange();
253 signals: 256 signals:
254 void nextMonth(); 257 void nextMonth();
255 void prevMonth(); 258 void prevMonth();
256 void selectWeekNum ( int ); 259 void selectWeekNum ( int );
257 void selectMonth (); 260 void selectMonth ();
258 void showDaySignal( QDate ); 261 void showDaySignal( QDate );
259 protected: 262 protected:
260 void resizeEvent(QResizeEvent *); 263 void resizeEvent(QResizeEvent *);
261 void viewChanged(); 264 void viewChanged();
262 void updateDayLabels(); 265 void updateDayLabels();
263 266
264 private: 267 private:
265 NavigatorBar* mNavigatorBar; 268 NavigatorBar* mNavigatorBar;
266 int currentWeek(); 269 int currentWeek();
267 bool clPending; 270 bool clPending;
268 QWidgetStack * mWidStack; 271 QWidgetStack * mWidStack;
269 QWidget* mMonthView; 272 QWidget* mMonthView;
270 QWidget* mWeekView; 273 QWidget* mWeekView;
271 bool mShowWeekView; 274 bool mShowWeekView;
272 bool updatePossible; 275 bool updatePossible;
273 int mDaysPerWeek; 276 int mDaysPerWeek;
274 int mNumWeeks; 277 int mNumWeeks;
275 int mNumCells; 278 int mNumCells;
276 bool mWeekStartsMonday; 279 bool mWeekStartsMonday;
277 bool mShowSatSunComp; 280 bool mShowSatSunComp;
278 void computeLayout(); 281 void computeLayout();
279 void computeLayoutWeek(); 282 void computeLayoutWeek();
280 283
281 QPtrVector<MonthViewCell> mCells; 284 QPtrVector<MonthViewCell> mCells;
282 QPtrVector<QLabel> mDayLabels; 285 QPtrVector<QLabel> mDayLabels;
283 QPtrVector<KOWeekButton> mWeekLabels; 286 QPtrVector<KOWeekButton> mWeekLabels;
284 QPtrVector<MonthViewCell> mCellsW; 287 QPtrVector<MonthViewCell> mCellsW;
285 QPtrVector<QLabel> mDayLabelsW; 288 QPtrVector<QLabel> mDayLabelsW;
286 QPtrVector<KOWeekButton> mWeekLabelsW; 289 QPtrVector<KOWeekButton> mWeekLabelsW;
287 290
288 bool mShortDayLabelsM; 291 bool mShortDayLabelsM;
289 bool mShortDayLabelsW; 292 bool mShortDayLabelsW;
290 int mWidthLongDayLabel; 293 int mWidthLongDayLabel;
291 294
292 QDate mStartDate; 295 QDate mStartDate;
293 296
294 MonthViewCell *mSelectedCell; 297 MonthViewCell *mSelectedCell;
295 298
296 KOEventPopupMenu *mContextMenu; 299 KOEventPopupMenu *mContextMenu;
297 void keyPressEvent ( QKeyEvent * ) ; 300 void keyPressEvent ( QKeyEvent * ) ;
298 301
299}; 302};
300 303
301#endif 304#endif