summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-02 11:10:03 (UTC)
committer zautrix <zautrix>2005-02-02 11:10:03 (UTC)
commit2a184b0d9095c6175e7bdf2f5d5561470b8d6307 (patch) (unidiff)
treeb988c963639547be3afc193eb8a223f9ca7f0254
parentd2f6c50fb3b236e37aaa46ade819ab163f19868a (diff)
downloadkdepimpi-2a184b0d9095c6175e7bdf2f5d5561470b8d6307.zip
kdepimpi-2a184b0d9095c6175e7bdf2f5d5561470b8d6307.tar.gz
kdepimpi-2a184b0d9095c6175e7bdf2f5d5561470b8d6307.tar.bz2
change
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--korganizer/komonthview.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 9f34d38..4f8fcc7 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,776 +1,778 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.2 ************ 3********** VERSION 2.0.2 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed the layout problem of the day label buttons 6Fixed the layout problem of the day label buttons
7of the agenda view introduced in version 2.0.1. 7of the agenda view introduced in version 2.0.1.
8 8
9Added WhatsThis support for the todo view and the list view.
10
9Added a quite useful and quite hidden feature (to KO/Pi). 11Added a quite useful and quite hidden feature (to KO/Pi).
10Who does find it first? 12Who does find it first?
11Hint: You have to click somewhere in the views ... 13Hint: You have to click somewhere in the views ...
12 14
13 15
14********** VERSION 2.0.1 ************ 16********** VERSION 2.0.1 ************
15 17
16Oooops ... I forgot to test on the Zaurus 5500 ... 18Oooops ... I forgot to test on the Zaurus 5500 ...
17 19
18Fixed many problems of new (english) strings (and german translations) 20Fixed many problems of new (english) strings (and german translations)
19introduced in the latest versions, where the text was not fitting on the 21introduced in the latest versions, where the text was not fitting on the
20240x320 display of the Zaurus 5500. 22240x320 display of the Zaurus 5500.
21 23
22KO/Pi: 24KO/Pi:
23Added a popup menu ( press pen and hold to get popup ) to the agenda view 25Added a popup menu ( press pen and hold to get popup ) to the agenda view
24with many useful items (add event/todo, show next week, two weeks, month, journal). 26with many useful items (add event/todo, show next week, two weeks, month, journal).
25 27
26Added items to the todolist popup menu for: 28Added items to the todolist popup menu for:
27Display all opened, all closed or all todos flat. 29Display all opened, all closed or all todos flat.
28The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 30The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
29Made the reparenting of todos on the desktop possible via Drag&Drop. 31Made the reparenting of todos on the desktop possible via Drag&Drop.
30Fixed several bugs in setting the completed datetime for todos. 32Fixed several bugs in setting the completed datetime for todos.
31Added info about completed datetime of todos to the todo viewer. 33Added info about completed datetime of todos to the todo viewer.
32Now displaying a completed todo (with completed datetime set) in the agenda view 34Now displaying a completed todo (with completed datetime set) in the agenda view
33at the time of the completion. Such that now it is possible to see in the agenda view 35at the time of the completion. Such that now it is possible to see in the agenda view
34when what todo was completed. 36when what todo was completed.
35Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 37Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
36Now the behaviour is: 38Now the behaviour is:
37Setting a parent to complete sets all (sub)childs to complete. 39Setting a parent to complete sets all (sub)childs to complete.
38Setting a parent to uncomplete does not change the childs. 40Setting a parent to uncomplete does not change the childs.
39Setting a child to uncomplete sets all parent to uncomplete. 41Setting a child to uncomplete sets all parent to uncomplete.
40Setting a child to complete does not change the parents. 42Setting a child to complete does not change the parents.
41 43
42Smart updating and double buffering of the daymatrix. 44Smart updating and double buffering of the daymatrix.
43Showing holidays in the day matrix. 45Showing holidays in the day matrix.
44Many other small performance updates. 46Many other small performance updates.
45 47
46Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 48Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
47 49
48Now the translation file usertranslation.txt is supposed to be in utf8 format. 50Now the translation file usertranslation.txt is supposed to be in utf8 format.
49If 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. 51If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
50 52
51 53
52********** VERSION 2.0.0 ************ 54********** VERSION 2.0.0 ************
53 55
54Stable release 2.0.0! 56Stable release 2.0.0!
55 57
56KO/Pi: 58KO/Pi:
57Fixed problem in edit dialog recreation at startup. 59Fixed problem in edit dialog recreation at startup.
58Made "toggle view*" menu items enabled context sensitive. 60Made "toggle view*" menu items enabled context sensitive.
59Changed agenda size menu to items 1-10. 61Changed agenda size menu to items 1-10.
60Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 62Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
61Usebility enhancements in the KO/Pi menus. 63Usebility enhancements in the KO/Pi menus.
62Birthday import now adds year to summary. 64Birthday import now adds year to summary.
63What's Next view shows age in years for birthday. 65What's Next view shows age in years for birthday.
64 66
65OM/Pi: 67OM/Pi:
66Added three info lines to display subject, from and to of selected mails. 68Added three info lines to display subject, from and to of selected mails.
67 69
68KA/Pi: 70KA/Pi:
69Fixed jump bar behaviour on Zaurus. 71Fixed jump bar behaviour on Zaurus.
70Now KA/Pi search field supports searching for a range of starting characters. 72Now KA/Pi search field supports searching for a range of starting characters.
71E.g. to search for all contact beginning with b to n, type 73E.g. to search for all contact beginning with b to n, type
72b-n 74b-n
73in the search field. 75in the search field.
74 76
75********** VERSION 1.9.20 ************ 77********** VERSION 1.9.20 ************
76 78
77KO/Pi: 79KO/Pi:
78Added for the "dislplay one day" agenda mode 80Added for the "dislplay one day" agenda mode
79info in the caption and in the day lables: 81info in the caption and in the day lables:
80Now it is displayed, if the selected day is from "day before yesterday" 82Now it is displayed, if the selected day is from "day before yesterday"
81to "day after tomorrow". 83to "day after tomorrow".
82Made it possible to delete a Todo, which has sub-todos. 84Made it possible to delete a Todo, which has sub-todos.
83Fixed two small problems in the todo view. 85Fixed two small problems in the todo view.
84Added missing German translation for filter edit and print dialog. 86Added missing German translation for filter edit and print dialog.
85Made search dialog closeable by cancel key. 87Made search dialog closeable by cancel key.
86 88
87Made it possible to select in the date picker the (ligt grey ) 89Made it possible to select in the date picker the (ligt grey )
88dates of the prev./next month with the mouse. 90dates of the prev./next month with the mouse.
89 91
90OM/Pi: 92OM/Pi:
91"Delete mail" icon in main window now deletes all selected mails. 93"Delete mail" icon in main window now deletes all selected mails.
92Fixed the problem, that the state flag of imap mails was ignored. 94Fixed the problem, that the state flag of imap mails was ignored.
93Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 95Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
94to indecate that they are already seen. 96to indecate that they are already seen.
95Fixed the problem that the body of some mails was not displayed in the 97Fixed the problem that the body of some mails was not displayed in the
96mail viewer when fetching them from the imap server directly to read them. 98mail viewer when fetching them from the imap server directly to read them.
97Made it (configurable) possible to show the "To:" field in the list view. 99Made it (configurable) possible to show the "To:" field in the list view.
98Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 100Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
99Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 101Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
100local storage folder (specified in account settings) of the account of the mail. 102local storage folder (specified in account settings) of the account of the mail.
101Removed some memory leaks in OM/Pi. 103Removed some memory leaks in OM/Pi.
102 104
103 105
104********** VERSION 1.9.19 ************ 106********** VERSION 1.9.19 ************
105 107
106Added a lot of missing translations to KA/Pi, 108Added a lot of missing translations to KA/Pi,
107Added some missing translations to KO/Pi and OM/Pi. 109Added some missing translations to KO/Pi and OM/Pi.
108 110
109Fixed some minor problems in KA/Pi + KO/Pi. 111Fixed some minor problems in KA/Pi + KO/Pi.
110 112
111Fixed a crash when closing PwM/Pi. 113Fixed a crash when closing PwM/Pi.
112Added German translation for PwM/Pi. 114Added German translation for PwM/Pi.
113 115
114Made view change and Month View update faster in KO/Pi. 116Made view change and Month View update faster in KO/Pi.
115 117
116 118
117********** VERSION 1.9.18 ************ 119********** VERSION 1.9.18 ************
118 120
119FYI: The VERSION 1.9.17 was a testing release only. 121FYI: The VERSION 1.9.17 was a testing release only.
120Please read the changelog of VERSION 1.9.17 as well. 122Please read the changelog of VERSION 1.9.17 as well.
121 123
122Cleaned up the syncing config dialog. 124Cleaned up the syncing config dialog.
123Added sync config options for date range for events. 125Added sync config options for date range for events.
124Added sync config options for filters on incoming data. 126Added sync config options for filters on incoming data.
125Added sync config options for filters on outgoing data. 127Added sync config options for filters on outgoing data.
126Please read the updated SyncHowTo about the new filter settings. 128Please read the updated SyncHowTo about the new filter settings.
127These filter settings make it now possible to sync with shared 129These filter settings make it now possible to sync with shared
128calendars without writing back private or confidential data 130calendars without writing back private or confidential data
129(via the outgoing filters). 131(via the outgoing filters).
130To sync only with particular parts of a shared calendar, 132To sync only with particular parts of a shared calendar,
131the incoming filter settings can be used. 133the incoming filter settings can be used.
132An example can be found in the SyncHowTo. 134An example can be found in the SyncHowTo.
133Same for shared addressbooks. 135Same for shared addressbooks.
134 136
135Added a setting for the global kdepim data storage. 137Added a setting for the global kdepim data storage.
136Usually the data is stored in (yourhomedir/kdepim). 138Usually the data is stored in (yourhomedir/kdepim).
137Now you can set in the Global config dialog TAB, subTAB "Data storage path" 139Now you can set in the Global config dialog TAB, subTAB "Data storage path"
138a directory where all the kdepim data is stored. 140a directory where all the kdepim data is stored.
139That makes it easy to save all kdepim data on a SD card on the Z, for example. 141That makes it easy to save all kdepim data on a SD card on the Z, for example.
140 142
141KO/Pi: 143KO/Pi:
142The timeedit input has a pulldown list for times. 144The timeedit input has a pulldown list for times.
143If opened, this pulldown list should now has the right time highlighted. 145If opened, this pulldown list should now has the right time highlighted.
144Added the possibility to exclude events/todos/journals in a filter. 146Added the possibility to exclude events/todos/journals in a filter.
145You should exclude journals, if you do not want them to sync with a public calendar. 147You should exclude journals, if you do not want them to sync with a public calendar.
146 148
147KA/Pi: 149KA/Pi:
148Added the possibility to in/exclude public/private/confidential contacts to a filter. 150Added the possibility to in/exclude public/private/confidential contacts to a filter.
149If 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 ... 151If 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 ...
150Added printing of card view and details view on desktop. 152Added printing of card view and details view on desktop.
151Printing of list view is not working... 153Printing of list view is not working...
152Added button for removing pictures in contact editor. 154Added button for removing pictures in contact editor.
153Parsing data fix of KA/Pi version 1.9.17. 155Parsing data fix of KA/Pi version 1.9.17.
154Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 156Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
155Fixed some syncing merging problems. 157Fixed some syncing merging problems.
156 158
157 159
158********** VERSION 1.9.17 ************ 160********** VERSION 1.9.17 ************
159 161
160KO/Pi: 162KO/Pi:
161Fixed that tooltips were not updated after moving an item in agenda view. 163Fixed that tooltips were not updated after moving an item in agenda view.
162Fixed a bug in sorting start date for recurring events in list view. 164Fixed a bug in sorting start date for recurring events in list view.
163Changed the left button in todo viewer from "Agenda" to "Set completed". 165Changed the left button in todo viewer from "Agenda" to "Set completed".
164This 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. 166This 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.
165Added more info in the todo viewer: Startdate, parent/sub todos. 167Added more info in the todo viewer: Startdate, parent/sub todos.
166 168
167 169
168KA/Pi: 170KA/Pi:
169All fields search does now actually search all the (possible) fields, 171All fields search does now actually search all the (possible) fields,
170not only those listed in the contact list. 172not only those listed in the contact list.
171Made is possible to inline a picture in a vcard on the Z. 173Made is possible to inline a picture in a vcard on the Z.
172This was only possible on the desktop, now is it possible on the Z as well. 174This was only possible on the desktop, now is it possible on the Z as well.
173Fixed of missing save settings after filter configuration. 175Fixed of missing save settings after filter configuration.
174Made saving of addressbook much faster. 176Made saving of addressbook much faster.
175Fixed extension widget layout problem. 177Fixed extension widget layout problem.
176Fixed saving of default formatted name settings. 178Fixed saving of default formatted name settings.
177Fixed formatted name handling in edit dialog. 179Fixed formatted name handling in edit dialog.
178Added an option for changing formatted names of many contacts 180Added an option for changing formatted names of many contacts
179(menu: File - Change - Set formatted name). 181(menu: File - Change - Set formatted name).
180 182
181QWhatsThis was not working on the Z ( only black rectangle was shown). 183QWhatsThis was not working on the Z ( only black rectangle was shown).
182This is Fixed. 184This is Fixed.
183 185
184KDE-Sync: 186KDE-Sync:
185Now readonly KDE resources are synced as well. 187Now readonly KDE resources are synced as well.
186(They are not changed in KDE itself, of course). 188(They are not changed in KDE itself, of course).
187 189
188 190
189 191
190********** VERSION 1.9.16 ************ 192********** VERSION 1.9.16 ************
191 193
192KO/Pi: 194KO/Pi:
193Fixed search dialog size on Z 6000 (480x640 display). 195Fixed search dialog size on Z 6000 (480x640 display).
194Added setting to hide/show time in agenda items. 196Added setting to hide/show time in agenda items.
195Added setting to hide not running todos in todo view. 197Added setting to hide not running todos in todo view.
196Added columns for start date/time in todo view. 198Added columns for start date/time in todo view.
197Replaced the solid half-hour lines in agenda view by dot lines. 199Replaced the solid half-hour lines in agenda view by dot lines.
198Added possibility of printing the What's Next View on the desktop 200Added possibility of printing the What's Next View on the desktop
199(i.e. Windows and Linux). 201(i.e. Windows and Linux).
200Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 202Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
201Added tooltips in month view.(Tooltips only available on desktop) 203Added tooltips in month view.(Tooltips only available on desktop)
202 204
203Fixed a strange problem in KO/Pi alarm applet. 205Fixed a strange problem in KO/Pi alarm applet.
204Did not find the actual problem, 206Did not find the actual problem,
205such that now Qtopia reboots again if deinstalling the alarm applet. 207such that now Qtopia reboots again if deinstalling the alarm applet.
206But the alarm applet should work again. 208But the alarm applet should work again.
207 209
208KA/Pi: 210KA/Pi:
209Fixed the problem, that internal pictures were not saved. 211Fixed the problem, that internal pictures were not saved.
210 212
211Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 213Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
212 214
213Fixed some minor problems. (Like word wrap in help text windows). 215Fixed some minor problems. (Like word wrap in help text windows).
214 216
215Fixed a compiling problem in microkde/kresources. 217Fixed a compiling problem in microkde/kresources.
216 218
217KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 219KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
218This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 220This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
219such that now syncing KO/Pi with Sharp DTM should work on the 221such that now syncing KO/Pi with Sharp DTM should work on the
220Zaurus C 3000 model. 222Zaurus C 3000 model.
221 223
222********** VERSION 1.9.15 ************ 224********** VERSION 1.9.15 ************
223 225
224Usebilty enhancements in KO/Pi: 226Usebilty enhancements in KO/Pi:
225When clicking on the date in a month view cell, the day view is shown. 227When clicking on the date in a month view cell, the day view is shown.
226Old behaviour was, that the "new event" dialog popped up. 228Old behaviour was, that the "new event" dialog popped up.
227 229
228Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 230Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
229That means, you can restore the latest 231That means, you can restore the latest
230event/todo/journal you have deleted. 232event/todo/journal you have deleted.
231A journal is deleted, if you clear all the text of the journal. 233A journal is deleted, if you clear all the text of the journal.
232 234
233Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 235Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
234 236
235KA/Pi starting in 480x640 resolution: 237KA/Pi starting in 480x640 resolution:
236Hide the filter action in toolbar 238Hide the filter action in toolbar
237and added icons for undo/delete/redo in toolbar. 239and added icons for undo/delete/redo in toolbar.
238 240
239Change in OM/Pi ViewMail dialog: 241Change in OM/Pi ViewMail dialog:
240When clicking on the "delete" icon the mail is deleted after confirmation as usual. 242When clicking on the "delete" icon the mail is deleted after confirmation as usual.
241But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 243But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
242 244
243Fixed a crash when deleting mail-accounts in OM/Pi. 245Fixed a crash when deleting mail-accounts in OM/Pi.
244 246
245 247
246********** VERSION 1.9.14 ************ 248********** VERSION 1.9.14 ************
247 249
248Fixed some problems with the dialog sizes when switching 250Fixed some problems with the dialog sizes when switching
249portrait/landscape mode on 640x480 PDA display. 251portrait/landscape mode on 640x480 PDA display.
250 252
251Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 253Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
252 254
253Fixed an ugly bug in KOpieMail: 255Fixed an ugly bug in KOpieMail:
254KOpieMail was not able to write files (mails) to MSDOS file system, 256KOpieMail was not able to write files (mails) to MSDOS file system,
255like on an usual preformatted SD card. That should work now. 257like on an usual preformatted SD card. That should work now.
256To save your mail data on the Sd card do the following: 258To save your mail data on the Sd card do the following:
257Create a dir on the SD card: 259Create a dir on the SD card:
258mkdir /mnt/card/localmail 260mkdir /mnt/card/localmail
259Go to your home dir: 261Go to your home dir:
260cd 262cd
261Go to kopiemail data storage dir: 263Go to kopiemail data storage dir:
262cd kdepim/apps/kopiemail 264cd kdepim/apps/kopiemail
263Create a symlink to the SD card: 265Create a symlink to the SD card:
264ls -s /mnt/card/localmail 266ls -s /mnt/card/localmail
265Now KOpieMail will store all mails on the SD card. 267Now KOpieMail will store all mails on the SD card.
266 268
267KO/Pi Monthview: 269KO/Pi Monthview:
268Now "Go to Today" selects the current month from day 1-end, 270Now "Go to Today" selects the current month from day 1-end,
269not the current date + some days. 271not the current date + some days.
270I.e. "Go to Today" shows now always 272I.e. "Go to Today" shows now always
271the current month with first day of month in the first row. 273the current month with first day of month in the first row.
272 274
273Added missing German translation. 275Added missing German translation.
274 276
275Fixed icons of executeable on Wintendo. 277Fixed icons of executeable on Wintendo.
276 278
277Added a "Show next Mail" button to the OM/Pi 279Added a "Show next Mail" button to the OM/Pi
278mail viewer such that the mail below the current mail 280mail viewer such that the mail below the current mail
279in the mail list view of the current folder 281in the mail list view of the current folder
280can be read with a single click. 282can be read with a single click.
281 283
282 284
283********** VERSION 1.9.13 ************ 285********** VERSION 1.9.13 ************
284 286
285Fixed nasty PwM/Pi file reading bug, when 287Fixed nasty PwM/Pi file reading bug, when
286the used hash algo of file is different then the global 288the used hash algo of file is different then the global
287hash algo. 289hash algo.
288 290
289Added KA/Pi support for opie mailit mailapplication. 291Added KA/Pi support for opie mailit mailapplication.
290 292
291Fixed some bugs in OM/Pi. 293Fixed some bugs in OM/Pi.
292Now character conversion tables are available for the Zaurus 294Now character conversion tables are available for the Zaurus
293to make OM/Pi working properly. 295to make OM/Pi working properly.
294To get the character conversion in OM/Pi working, please download 296To get the character conversion in OM/Pi working, please download
295at the sourceforge project site the package 297at the sourceforge project site the package
296sr-character-conversion_SharpROM_arm.ipk.zip 298sr-character-conversion_SharpROM_arm.ipk.zip
297(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 299(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
298from the section "general files for KDE/Pim" 300from the section "general files for KDE/Pim"
299Instructions how to install this package are in a ReadMe in this file. 301Instructions how to install this package are in a ReadMe in this file.
300 302
301 303
302Fixed the orientation change problem in KA/Pi when switching 304Fixed the orientation change problem in KA/Pi when switching
303portrait/landscape mode. 305portrait/landscape mode.
304 306
305French translation available for KA/Pi and OM/Pi. 307French translation available for KA/Pi and OM/Pi.
306 308
307Fixed some problems with categories in KO/Pi in DTM sync. 309Fixed some problems with categories in KO/Pi in DTM sync.
308 310
309Added selection dialog for export to phone in KA/Pi. 311Added selection dialog for export to phone in KA/Pi.
310 312
311If in KO/Pi is an attendee selected to add to a meeting and this 313If in KO/Pi is an attendee selected to add to a meeting and this
312attendee is already in the list of attendees, this person is not added 314attendee is already in the list of attendees, this person is not added
313again. 315again.
314 316
315Some menu cleanup in KA/Pi. 317Some menu cleanup in KA/Pi.
316 318
317********** VERSION 1.9.12 ************ 319********** VERSION 1.9.12 ************
318 320
319Fix for the bug in KO/Pi What's Next view of version 1.9.11. 321Fix for the bug in KO/Pi What's Next view of version 1.9.11.
320 322
321Bugfix: Licence file is now shown again. 323Bugfix: Licence file is now shown again.
322 324
323OM/Pi now supports Unicode (utf8 charset). 325OM/Pi now supports Unicode (utf8 charset).
324Fixed some bugs in OM/Pi. 326Fixed some bugs in OM/Pi.
325 327
326KA/Pi has more German translation. 328KA/Pi has more German translation.
327 329
328 330
329********** VERSION 1.9.11 ************ 331********** VERSION 1.9.11 ************
330 332
331Fixed several problems in PWM/Pi, like 333Fixed several problems in PWM/Pi, like
332asking the user, if unsaved changed are pending 334asking the user, if unsaved changed are pending
333when closing the app. 335when closing the app.
334And PwM/Pi handles now different texts for the 336And PwM/Pi handles now different texts for the
335fields Description, Username, Password, configurable per category. 337fields Description, Username, Password, configurable per category.
336 338
337Fixed a crash in KO/Pi , when importing/loading vcs files 339Fixed a crash in KO/Pi , when importing/loading vcs files
338which have an entry with an attendee with state: 340which have an entry with an attendee with state:
339NEEDS ACTION 341NEEDS ACTION
340 342
341Fixed some problems in the German translation of OM/Pi, 343Fixed some problems in the German translation of OM/Pi,
342which makes some dialogs not fitting on the screen 344which makes some dialogs not fitting on the screen
343of the Z 5500. 345of the Z 5500.
344 346
345Fixed Qtopia crash, when disabling/deinstalling 347Fixed Qtopia crash, when disabling/deinstalling
346KO/Pi alarm applet. 348KO/Pi alarm applet.
347 349
348Implemented direct KDE<->KA/Pi sync for KA/Pi running 350Implemented direct KDE<->KA/Pi sync for KA/Pi running
349on Linux desktop. 351on Linux desktop.
350 352
351Added feature "remove sync info" to sync menu. 353Added feature "remove sync info" to sync menu.
352 354
353Tweaked the KO/Pi What's next view a bit, added 355Tweaked the KO/Pi What's next view a bit, added
354setting to hide events that are done. 356setting to hide events that are done.
355 357
356Disabled "beam receive enabled" on startup to 358Disabled "beam receive enabled" on startup to
357avoid problems if Fastload is enabled. 359avoid problems if Fastload is enabled.
358Please set "beam receive enabled", 360Please set "beam receive enabled",
359if you want to receive data via IR. 361if you want to receive data via IR.
360 362
361Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 363Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
362on Linux desktop. 364on Linux desktop.
363 365
364Made in KA/Pi scrolling possible, if details view is selected. 366Made in KA/Pi scrolling possible, if details view is selected.
365(The keyboard focus is set automatically to the search line) 367(The keyboard focus is set automatically to the search line)
366 368
367Fixed a bug in DMT sync, that a new entry in DTM was added 369Fixed a bug in DMT sync, that a new entry in DTM was added
368on every sync to Kx/Pi. 370on every sync to Kx/Pi.
369 371
370Fixed missing writing of KA/Pi categories to DMT entries when syncing. 372Fixed missing writing of KA/Pi categories to DMT entries when syncing.
371 373
372Fixed a bug in DMT sync with todos created in KO/Pi containing 374Fixed a bug in DMT sync with todos created in KO/Pi containing
373non-latin1 characters. 375non-latin1 characters.
374 376
375Rearranged package contents of Sharp-ipks and made all 377Rearranged package contents of Sharp-ipks and made all
376packages installable on SD again. 378packages installable on SD again.
377 379
378Fixed the writing of addressbook data in DTM sync. 380Fixed the writing of addressbook data in DTM sync.
379Empty fields in KA/Pi were not removed. 381Empty fields in KA/Pi were not removed.
380 382
381Added better category handling in KA/Pi: 383Added better category handling in KA/Pi:
382Added item 384Added item
383Edit Categories and 385Edit Categories and
384Manage new categories 386Manage new categories
385to the settings menu. 387to the settings menu.
386Possible to configure a view to display categories. 388Possible to configure a view to display categories.
387 389
388Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 390Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
389 391
390Fixed displaying of "free" days and time in KO Monthview and Agendaview. 392Fixed displaying of "free" days and time in KO Monthview and Agendaview.
391 393
392... and many other bugfixes. 394... and many other bugfixes.
393 395
394********** VERSION 1.9.10 ************ 396********** VERSION 1.9.10 ************
395 397
396Many internal small bugfixes. 398Many internal small bugfixes.
397And fix of the "big" bug in KO/Pi, 399And fix of the "big" bug in KO/Pi,
398that after Syncing the appointments had an offset by several hours. 400that after Syncing the appointments had an offset by several hours.
399That was a problem with the internal timezone setting, 401That was a problem with the internal timezone setting,
400introduced by the changed timezone configuration settings. 402introduced by the changed timezone configuration settings.
401 403
402German translation for OM/Pi is now available. 404German translation for OM/Pi is now available.
403 405
404 406
405********** VERSION 1.9.9 ************ 407********** VERSION 1.9.9 ************
406 408
407KDE-Pim/Pi has a new Member! 409KDE-Pim/Pi has a new Member!
408It is called PWM/Pi (Passwordmanager/platform-independent) 410It is called PWM/Pi (Passwordmanager/platform-independent)
409and it is available for the Zaurus. 411and it is available for the Zaurus.
410It is planned, that it will be available later for Windows. 412It is planned, that it will be available later for Windows.
411(And for Linux, of course). 413(And for Linux, of course).
412It is a port of the Passwordmanager of KDE. 414It is a port of the Passwordmanager of KDE.
413It will need the MicroKDElibs to run. 415It will need the MicroKDElibs to run.
414 416
415Made loading of addressbooks in KA/Pi up to 7 times faster! 417Made loading of addressbooks in KA/Pi up to 7 times faster!
416The bigger your addressbook file, the more starting speed 418The bigger your addressbook file, the more starting speed
417will you gain. (relatively) 419will you gain. (relatively)
418 420
419The Qtopia addressbook connector is now platform independend 421The Qtopia addressbook connector is now platform independend
420as well and should work on any platform for importing/exporting 422as well and should work on any platform for importing/exporting
421Qtopia and Opie XML files. 423Qtopia and Opie XML files.
422 424
423Added a +30min feature to the timezone settings to make 425Added a +30min feature to the timezone settings to make
424KDE-Pim/Pi useable in Australia and other parts on the 426KDE-Pim/Pi useable in Australia and other parts on the
425world with strange timezones ;-) 427world with strange timezones ;-)
426 428
427German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 429German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
428 430
429It is now possible to disable the 431It is now possible to disable the
430"receive data via infrared" feature, such that syncing with 432"receive data via infrared" feature, such that syncing with
431Outlook is now possible again with Kx/Pi runing. 433Outlook is now possible again with Kx/Pi runing.
432Please disable it, before syncing Sharp DTM with Outlook. 434Please disable it, before syncing Sharp DTM with Outlook.
433For your convenience, the "receive data via infrared" feature 435For your convenience, the "receive data via infrared" feature
434is disabled automatically, if you sync Kx/Pi with DTM. 436is disabled automatically, if you sync Kx/Pi with DTM.
435You have to enable it again manually after syncing. 437You have to enable it again manually after syncing.
436Enabling this feature makes it impossible to start the 438Enabling this feature makes it impossible to start the
437Sharp DTM apps. If this feature is enabled, you will only get the 439Sharp DTM apps. If this feature is enabled, you will only get the
438alarm notification from KO/Pi and not from the Sharp calendar. 440alarm notification from KO/Pi and not from the Sharp calendar.
439This is very useful if you sync KO/Pi with Sharp DTM, 441This is very useful if you sync KO/Pi with Sharp DTM,
440because after syncing you usually would get notified about 442because after syncing you usually would get notified about
441an alarm by KO/Pi and the Sharp Calendar. 443an alarm by KO/Pi and the Sharp Calendar.
442 444
443Together with the Linux desktop version of KO/Pi 445Together with the Linux desktop version of KO/Pi
444it is now possible to sync KO/Pi on the Zaurus 446it is now possible to sync KO/Pi on the Zaurus
445with the complete KDE-desktop (3.3 or later) 447with the complete KDE-desktop (3.3 or later)
446calendar data easily. 448calendar data easily.
447That makes it possible to sync the Z with one 449That makes it possible to sync the Z with one
448click of a mouse with the KDE-Desktop. 450click of a mouse with the KDE-Desktop.
449This feature it available for all Zaurus platforms KO/Pi 451This feature it available for all Zaurus platforms KO/Pi
450is running on. 452is running on.
451The only thing needed is a running KO/Pi on Linux and 453The only thing needed is a running KO/Pi on Linux and
452a compiled version of the small 454a compiled version of the small
453KDE-Pim/Pi<->KDE-Desktop access command line program, 455KDE-Pim/Pi<->KDE-Desktop access command line program,
454which is in the KDE-Pim/Pi sources available. 456which is in the KDE-Pim/Pi sources available.
455 457
456The "KDE-desktop" syncing feature for KA/Pi will follow 458The "KDE-desktop" syncing feature for KA/Pi will follow
457in the next releases. 459in the next releases.
458 460
459Fixed the vcard export bug, which had the version 1.9.8. 461Fixed the vcard export bug, which had the version 1.9.8.
460 462
461Added missing GERMAN translation to KO/Pi. 463Added missing GERMAN translation to KO/Pi.
462Hi PsionX, could you add the missing french translation?Thx! 464Hi PsionX, could you add the missing french translation?Thx!
463 465
464Translation files for KA/Pi are available as well. 466Translation files for KA/Pi are available as well.
465GERMAN translation will be available in the next release. 467GERMAN translation will be available in the next release.
466PsionX ( yres, you again ;-) ), could you start translating 468PsionX ( yres, you again ;-) ), could you start translating
467KA/Pi? Thx! 469KA/Pi? Thx!
468 470
469You can download the version 1.9.9 at 471You can download the version 1.9.9 at
470 472
471http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 473http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
472 474
473Note: 475Note:
474To run the mail program OM/Pi you need libopenssl. 476To run the mail program OM/Pi you need libopenssl.
475A link to a download loaction is available at 477A link to a download loaction is available at
476ZSI at www.killefiz.de 478ZSI at www.killefiz.de
477 479
478 480
479********** VERSION 1.9.8 ************ 481********** VERSION 1.9.8 ************
480 482
481Fixed character decoding in OM/Pi. 483Fixed character decoding in OM/Pi.
482(e.g. German "Umlaute" were not displayed properly.) 484(e.g. German "Umlaute" were not displayed properly.)
483 485
484Made is possible to reparent todos in KO/Pi. 486Made is possible to reparent todos in KO/Pi.
485Use contextmenu or keys (look at Help-Keys + Colors) for that. 487Use contextmenu or keys (look at Help-Keys + Colors) for that.
486 488
487Added the missing Sync-Howto and WhatsNew to the packages. 489Added the missing Sync-Howto and WhatsNew to the packages.
488 490
489KO/Pi on Linux desktop can now sync with KDE desktop. 491KO/Pi on Linux desktop can now sync with KDE desktop.
490That means: When using KO/Pi on Linux desktop for syncing with 492That means: When using KO/Pi on Linux desktop for syncing with
491KDE desktop and the Zaurus, the Zaurus can be synced now 493KDE desktop and the Zaurus, the Zaurus can be synced now
492with all KDE-Calendar resources, not only with one local file. 494with all KDE-Calendar resources, not only with one local file.
493(That makes it possible to sync the Zaurus with the 495(That makes it possible to sync the Zaurus with the
494calendar data on a Kolab server) 496calendar data on a Kolab server)
495 497
496KA/Pi syncing with KDE desktop will be available in the next version. 498KA/Pi syncing with KDE desktop will be available in the next version.
497 499
498 500
499********** VERSION 1.9.7 ************ 501********** VERSION 1.9.7 ************
500 502
501KO/Pi - KA/Pi on Windows: 503KO/Pi - KA/Pi on Windows:
502Now a directory can be defined by the user, where the 504Now a directory can be defined by the user, where the
503application/config data should be saved. 505application/config data should be saved.
504 Define your desired path in the evironment variable 506 Define your desired path in the evironment variable
505 MICROKDEHOME 507 MICROKDEHOME
506 before starting KO/Pi or KA/Pi. 508 before starting KO/Pi or KA/Pi.
507 509
508An easy Kx/Pi to Kx/Pi syncing is now possible 510An easy Kx/Pi to Kx/Pi syncing is now possible
509(it is called Pi-Sync) via network. 511(it is called Pi-Sync) via network.
510Please look at the Sync Howto. 512Please look at the Sync Howto.
511 513
512Exporting of calendar data and contacts to mobile phones is now possible. 514Exporting of calendar data and contacts to mobile phones is now possible.
513The SyncHowto is updated with information howto 515The SyncHowto is updated with information howto
514access/sync mobile phones. 516access/sync mobile phones.
515Please look at the Sync Howto. 517Please look at the Sync Howto.
516 518
517Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 519Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
518Please disable Fastload for the original contact/calendar applications 520Please disable Fastload for the original contact/calendar applications
519and close them. 521and close them.
520KO/Pi and KA/Pi must be running in order to receive the data. 522KO/Pi and KA/Pi must be running in order to receive the data.
521(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 523(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
522 524
523In the KA/Pi details view are now the preferred tel. numbers displayed on top 525In the KA/Pi details view are now the preferred tel. numbers displayed on top
524of the other data ( emails/tel.numbers/addresses) 526of the other data ( emails/tel.numbers/addresses)
525 527
526Fixed some syncing problems in KA/Pi. 528Fixed some syncing problems in KA/Pi.
527 529
528Added font settings for the KA/Pi details view. 530Added font settings for the KA/Pi details view.
529Added fields "children's name" and "gender" to KA/Pi. 531Added fields "children's name" and "gender" to KA/Pi.
530 532
531Made searching in KA/Pi better: 533Made searching in KA/Pi better:
532Now the first item in a view is selected after a search automatically and 534Now the first item in a view is selected after a search automatically and
533the views can be scrolled up/down when the search input field has the keyboard focus. 535the views can be scrolled up/down when the search input field has the keyboard focus.
534 536
535And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 537And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
536 538
537 539
538********** VERSION 1.9.6 ************ 540********** VERSION 1.9.6 ************
539 541
540Changes in the external application communication on the Zaurus 542Changes in the external application communication on the Zaurus
541in order to use less RAM when the apps are running. 543in order to use less RAM when the apps are running.
542First syncing of addressbooks (KA/Pi) is possible. 544First syncing of addressbooks (KA/Pi) is possible.
543 545
544 546
545********** VERSION 1.9.5a ************ 547********** VERSION 1.9.5a ************
546 548
547Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 549Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
548Fixed some small bugs. 550Fixed some small bugs.
549KA/Pi shows now the birthday in summary view. 551KA/Pi shows now the birthday in summary view.
550Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 552Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
551for displaying dates. 553for displaying dates.
552 554
553 555
554********** VERSION 1.9.5 ************ 556********** VERSION 1.9.5 ************
555 557
556There is still no Addressbook syncing! 558There is still no Addressbook syncing!
557 559
558New in 1.9.5: 560New in 1.9.5:
559 561
560Many bugfixes. 562Many bugfixes.
561Better searching in KA/Pi. 563Better searching in KA/Pi.
562You can configure in KA/Pi if you want to search only after 564You can configure in KA/Pi if you want to search only after
563<return> key pressed. 565<return> key pressed.
564 566
565Better mail downloading in OM/Pi. 567Better mail downloading in OM/Pi.
566 568
567First experimental alpha version of sync of KO/Pi with mobile phones. 569First experimental alpha version of sync of KO/Pi with mobile phones.
568See gammu documentation for supported phones. 570See gammu documentation for supported phones.
569You 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. 571You 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.
570Quick hint how to use: 572Quick hint how to use:
571NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 573NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
572Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 574Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
573Create syncprofile - mobile device 575Create syncprofile - mobile device
574Remove entry for model. (Leave empty ). 576Remove entry for model. (Leave empty ).
575Enable infrared on Zaurus and your Phone. 577Enable infrared on Zaurus and your Phone.
576Sync. 578Sync.
577To get a more detailed log, start kopi from konsole. 579To get a more detailed log, start kopi from konsole.
578 580
579********** VERSION 1.9.4 ************ 581********** VERSION 1.9.4 ************
580 582
581This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 583This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
582 584
583WARNING: 585WARNING:
584PLEASE BACKUP ALL YOUR DATA! 586PLEASE BACKUP ALL YOUR DATA!
585We have changed a lot and maybe there are some unknown problems. 587We have changed a lot and maybe there are some unknown problems.
586 588
587SYNC HANDLING HAS CHANGED! 589SYNC HANDLING HAS CHANGED!
588Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 590Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
589(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 591(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
590 592
591You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 593You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
592If 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. 594If 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.
593 595
594As programs are available: 596As programs are available:
595KO/Pi (korganizer ipk) - a calendar program. 597KO/Pi (korganizer ipk) - a calendar program.
596KA/Pi (kaddressbook ipk ) - an addressbook 598KA/Pi (kaddressbook ipk ) - an addressbook
597OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 599OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
598 600
599An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 601An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
600(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 602(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
601 603
602All the applications are installed in a "Pim" TAB. 604All the applications are installed in a "Pim" TAB.
603If 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 605If 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
604 606
605All the application are integrated. 607All the application are integrated.
606Such 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. 608Such 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.
607 609
608HINT: 610HINT:
609If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 611If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
610 612
611What's new? 613What's new?
612 614
613SYNC HANDLING HAS CHANGED! 615SYNC HANDLING HAS CHANGED!
614Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 616Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
615(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 617(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
616 618
617New in OM/Pi: 619New in OM/Pi:
618When 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. 620When 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.
619 621
620New in KO/Pi: 622New in KO/Pi:
621French is now available for KO/Pi. 623French is now available for KO/Pi.
622Choose menu:Actions - Configure:TAB locale 624Choose menu:Actions - Configure:TAB locale
623Syncing has changed. 625Syncing has changed.
624Phone sync available soon. 626Phone sync available soon.
625Not much changes, I cannot remember them ... 627Not much changes, I cannot remember them ...
626 628
627New in KA/Pi: 629New in KA/Pi:
628Beaming possible. 630Beaming possible.
629Sharp DTM readonly access possible( create a new DTM resource ); 631Sharp DTM readonly access possible( create a new DTM resource );
630Better searching possible. 632Better searching possible.
631Search is performed only after pressing the return key. 633Search is performed only after pressing the return key.
632Use wildcard * to specify parts of a name. 634Use wildcard * to specify parts of a name.
633 635
634Better 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 * . 636Better 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 * .
635 637
636A big improvement is the new management of the contact access. 638A big improvement is the new management of the contact access.
637In version 1.9.3, every application was using their own addressbook access data. 639In version 1.9.3, every application was using their own addressbook access data.
638That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 640That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
639That was wasting of memory, if you had several hundreds of contacts. 641That was wasting of memory, if you had several hundreds of contacts.
640 642
641Now only KA/Pi accesses the addressbook. 643Now only KA/Pi accesses the addressbook.
642If 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. 644If 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.
643If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 645If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
644That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 646That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
645 647
646New in the KO/Pi alarm applet: 648New in the KO/Pi alarm applet:
647Configure your own timer popup menu! 649Configure your own timer popup menu!
648(Text and minutes for timer countdown) 650(Text and minutes for timer countdown)
649Just edit the file 651Just edit the file
650(yourhomedir)/.kopialarmtimerrc 652(yourhomedir)/.kopialarmtimerrc
651and start/stop a timer to get a new menu with the data of this file. 653and start/stop a timer to get a new menu with the data of this file.
652 654
653********** VERSION 1.9.3 ************ 655********** VERSION 1.9.3 ************
6541) 6561)
655Now KO/Pi on Windows imports directly the calendar data of 657Now KO/Pi on Windows imports directly the calendar data of
656an installed Outlook. Should work with OL version >= 2000. 658an installed Outlook. Should work with OL version >= 2000.
657 659
658********** VERSION 1.9.2 ************ 660********** VERSION 1.9.2 ************
6591) 6611)
660KDE-Pim/Pi has got a new member: 662KDE-Pim/Pi has got a new member:
661KmicroMail (KM/Pi) is a mail program, 663KmicroMail (KM/Pi) is a mail program,
662which can handle IMAP and POP mail access. 664which can handle IMAP and POP mail access.
663It is based on Opie-Mail v3. 665It is based on Opie-Mail v3.
664All dependencies to the Opie libraries ar removed, 666All dependencies to the Opie libraries ar removed,
665such that no additional Opie lib is needed. 667such that no additional Opie lib is needed.
666It is already integrated in KO/Pi and KA/Pi. 668It is already integrated in KO/Pi and KA/Pi.
667It it now available for the Zaurus,probably it 669It it now available for the Zaurus,probably it
668will be available for other platforms later. 670will be available for other platforms later.
669Hint: 671Hint:
670Create your own contact (name + email) 672Create your own contact (name + email)
671in KA/Pi, select this contact and choose menu: 673in KA/Pi, select this contact and choose menu:
672Settings - Set Who Am I. 674Settings - Set Who Am I.
673Now the settings of this contact are used as 675Now the settings of this contact are used as
674the sender data in KM/Pi. 676the sender data in KM/Pi.
6752) 6772)
676KDE-Pim/Pi is split up in five different 678KDE-Pim/Pi is split up in five different
677packages now precompiled for Sharp Zaurus: 679packages now precompiled for Sharp Zaurus:
678--kmicrokdelibs_1.9.2_arm.ipk 680--kmicrokdelibs_1.9.2_arm.ipk
679The libs are needed for any 681The libs are needed for any
680of the following programs: 682of the following programs:
681--kaddressbook_1.9.2_arm.ipk 683--kaddressbook_1.9.2_arm.ipk
682--kmicromail_1.9.2_arm.ipk 684--kmicromail_1.9.2_arm.ipk
683--korganizer_1.9.2_arm.ipk 685--korganizer_1.9.2_arm.ipk
684Independ from that, there is the alarm applet 686Independ from that, there is the alarm applet
685available for KO/Pi, which also offers 687available for KO/Pi, which also offers
686quick access for a new mail or 688quick access for a new mail or
687showing the addressbook.: 689showing the addressbook.:
688--korganizer-alarm_1.9.2_arm.ipk 690--korganizer-alarm_1.9.2_arm.ipk
689Independend means, that the alarm applet 691Independend means, that the alarm applet
690does not need any of the libs or programs above to run. 692does not need any of the libs or programs above to run.
691But it would be quite useless without these programs. 693But it would be quite useless without these programs.
692NOTE: 694NOTE:
693If you get a 695If you get a
694"This application depends on other programs" 696"This application depends on other programs"
695during installation of 697during installation of
696--kmicrokdelibs_1.9.2_arm.ipk 698--kmicrokdelibs_1.9.2_arm.ipk
697you probably do not have to care about that. 699you probably do not have to care about that.
698kmicrokdelibs_1.9.2 will come with some 700kmicrokdelibs_1.9.2 will come with some
699resource plugins, which needs additional libraries. 701resource plugins, which needs additional libraries.
700(E.g. libopie1, if you want to use the 702(E.g. libopie1, if you want to use the
701opie resource connector in KA/Pi). 703opie resource connector in KA/Pi).
702If you do not have this libraries installed, 704If you do not have this libraries installed,
703you simply cannot use the resource. 705you simply cannot use the resource.
704To make it clear: 706To make it clear:
705If the libraries are missing, the applications 707If the libraries are missing, the applications
706using kmicrokdelibs will start, 708using kmicrokdelibs will start,
707because the resources are plugins. 709because the resources are plugins.
7083) 7103)
709KO/Pi and friends are now installable on SD-Card! 711KO/Pi and friends are now installable on SD-Card!
710It is recommended to install all libs and apps 712It is recommended to install all libs and apps
711on the SD card or all in the internal storage. 713on the SD card or all in the internal storage.
712There may be problems, if this is mixed. 714There may be problems, if this is mixed.
7134) 7154)
714Fixed two bugs in the alarm notification on Windows. 716Fixed two bugs in the alarm notification on Windows.
7155) 7175)
716Great improvement! 718Great improvement!
717KO/Pi uses now the latest version of libical. 719KO/Pi uses now the latest version of libical.
718Libical is the library which actually reads 720Libical is the library which actually reads
719the calendar files and extract the data from it. 721the calendar files and extract the data from it.
720With the old version, there were problems 722With the old version, there were problems
721(crashes or program hangs) when licical did read 723(crashes or program hangs) when licical did read
722files, which were not stored from KO/Pi. 724files, which were not stored from KO/Pi.
723I do not know, if the new libical works perfect, 725I do not know, if the new libical works perfect,
724but actually it works much better than 726but actually it works much better than
725the old version. 727the old version.
726There are no problems with compatibility with 728There are no problems with compatibility with
727old calendar files of KO/Pi, of course! 729old calendar files of KO/Pi, of course!
7286) 7306)
729New in KA/Pi: 731New in KA/Pi:
730Opie addressbook resource connector available! 732Opie addressbook resource connector available!
731You will need libopie1 and the opie addressbook, 733You will need libopie1 and the opie addressbook,
732of course. 734of course.
733With the Opie addressbook resource connector, 735With the Opie addressbook resource connector,
734you can access the Opie addressbook readonly in KA/Pi. 736you can access the Opie addressbook readonly in KA/Pi.
735If you want to edit or import the data into KA/Pi, 737If you want to edit or import the data into KA/Pi,
736do this: 738do this:
737a) Create an Opie resource. 739a) Create an Opie resource.
738 (Menu: Settings-Configure Resources). 740 (Menu: Settings-Configure Resources).
739After configuration and restarting KA/Pi you should see 741After configuration and restarting KA/Pi you should see
740the Opie contacts in KA/Pi. 742the Opie contacts in KA/Pi.
741b) Select some or all Opie contacts. 743b) Select some or all Opie contacts.
742(NOTE: +++++ 744(NOTE: +++++
743To know exactly, what contacts are Opie contacts, 745To know exactly, what contacts are Opie contacts,
744do this: Choose menu: 746do this: Choose menu:
745View-Modify View - TAB Fields. 747View-Modify View - TAB Fields.
746Select in the above list "Resource" and click 748Select in the above list "Resource" and click
747down arrow to add it to the "Selected fields". 749down arrow to add it to the "Selected fields".
748Click OK. 750Click OK.
749Now you have a new column "Resource" in your list, 751Now you have a new column "Resource" in your list,
750where you can see, what an Opie resource is. 752where you can see, what an Opie resource is.
751++++ NOTE end.) 753++++ NOTE end.)
752Ok, we do have now some Opie contacts seleted. 754Ok, we do have now some Opie contacts seleted.
753(Use SHIFT or CTRL key in order to multiple select). 755(Use SHIFT or CTRL key in order to multiple select).
754c) Choose menu: Edit-Copy. 756c) Choose menu: Edit-Copy.
755d) Choose menu: Edit-Paste. 757d) Choose menu: Edit-Paste.
756e) Select the resource, you want to add the contacts to. 758e) Select the resource, you want to add the contacts to.
757Congrats! Now you have read/write access to the copied 759Congrats! Now you have read/write access to the copied
758opie contacts as "real" KA/Pi contacts. 760opie contacts as "real" KA/Pi contacts.
759 761
760 762
761********** VERSION 1.9.1 ************ 763********** VERSION 1.9.1 ************
7621) 7641)
763 +++ IMPORTANT 1 +++ 765 +++ IMPORTANT 1 +++
764 766
765The storing place of the default calendar 767The storing place of the default calendar
766file has changed! 768file has changed!
767The default calendar file was 769The default calendar file was
768Applications/korganizer/mycalendar.ics 770Applications/korganizer/mycalendar.ics
769on Zaurus and 771on Zaurus and
770(yourHomeDir)/korganizer/mycalendar.ics 772(yourHomeDir)/korganizer/mycalendar.ics
771on Windows/Linux desktop. Now it is 773on Windows/Linux desktop. Now it is
772(yourHomeDir)/kdepim/korganizer/mycalendar.ics 774(yourHomeDir)/kdepim/korganizer/mycalendar.ics
773on Zaurus, Windows and Linux. 775on Zaurus, Windows and Linux.
774To load the old file, choose menu 776To load the old file, choose menu
775File-Load calendar backup. 777File-Load calendar backup.
776(It should be loaded automatically 778(It should be loaded automatically
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 0ef5ae4..00b1e92 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -42,1370 +42,1371 @@
42#include <kcalendarsystem.h> 42#include <kcalendarsystem.h>
43 43
44#ifndef KORG_NOPRINTER 44#ifndef KORG_NOPRINTER
45#include "calprinter.h" 45#include "calprinter.h"
46#endif 46#endif
47#include "koprefs.h" 47#include "koprefs.h"
48#ifndef KORG_NOPLUGINS 48#ifndef KORG_NOPLUGINS
49#include "kocore.h" 49#include "kocore.h"
50#endif 50#endif
51#include "koglobals.h" 51#include "koglobals.h"
52#include <libkcal/kincidenceformatter.h> 52#include <libkcal/kincidenceformatter.h>
53 53
54#include "komonthview.h" 54#include "komonthview.h"
55 55
56#define PIXMAP_SIZE 5 56#define PIXMAP_SIZE 5
57#ifdef DESKTOP_VERSION 57#ifdef DESKTOP_VERSION
58QToolTipGroup *MonthViewCell::mToolTipGroup = 0; 58QToolTipGroup *MonthViewCell::mToolTipGroup = 0;
59#endif 59#endif
60class KNOWhatsThis :public QWhatsThis 60class KNOWhatsThis :public QWhatsThis
61{ 61{
62public: 62public:
63 KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { }; 63 KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { };
64 //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); }; 64 //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); };
65 65
66protected: 66protected:
67 virtual QString text( const QPoint& p) 67 virtual QString text( const QPoint& p)
68 { 68 {
69 return _wid->getWhatsThisText(p) ; 69 return _wid->getWhatsThisText(p) ;
70 }; 70 };
71private: 71private:
72 KNoScrollListBox* _wid; 72 KNoScrollListBox* _wid;
73 73
74}; 74};
75 75
76 76
77KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) 77KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
78 : QListBox(parent, name, WRepaintNoErase) 78 : QListBox(parent, name, WRepaintNoErase)
79{ 79{
80#ifndef DESKTOP_VERSION 80#ifndef DESKTOP_VERSION
81 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); 81 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
82#endif 82#endif
83 mWT = new KNOWhatsThis(this); 83 mWT = new KNOWhatsThis(this);
84} 84}
85KNoScrollListBox::~KNoScrollListBox() 85KNoScrollListBox::~KNoScrollListBox()
86{ 86{
87 87
88} 88}
89QString KNoScrollListBox::getWhatsThisText(QPoint p) 89QString KNoScrollListBox::getWhatsThisText(QPoint p)
90{ 90{
91 QListBoxItem* item = itemAt ( p ); 91 QListBoxItem* item = itemAt ( p );
92 if ( ! item ) { 92 if ( ! item ) {
93 return i18n("Click in the cell\nto add an event!"); 93 return i18n("Click in the cell\nto add an event!");
94 } 94 }
95 return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence()); 95 return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence());
96} 96}
97void KNoScrollListBox::keyPressEvent(QKeyEvent *e) 97void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
98{ 98{
99 99
100 switch(e->key()) { 100 switch(e->key()) {
101 case Key_Right: 101 case Key_Right:
102 // if ( e->state() == Qt::ControlButton ) 102 // if ( e->state() == Qt::ControlButton )
103 { 103 {
104 e->ignore(); 104 e->ignore();
105 return; 105 return;
106 } 106 }
107 scrollBy(4,0); 107 scrollBy(4,0);
108 break; 108 break;
109 case Key_Left: 109 case Key_Left:
110 // if ( e->state() == Qt::ControlButton ) 110 // if ( e->state() == Qt::ControlButton )
111 { 111 {
112 e->ignore(); 112 e->ignore();
113 return; 113 return;
114 } 114 }
115 scrollBy(-4,0); 115 scrollBy(-4,0);
116 break; 116 break;
117 case Key_Up: 117 case Key_Up:
118 if(count() < 2) { 118 if(count() < 2) {
119 e->ignore(); 119 e->ignore();
120 break; 120 break;
121 } 121 }
122 setCurrentItem((currentItem()+count()-1)%count()); 122 setCurrentItem((currentItem()+count()-1)%count());
123 if(!itemVisible(currentItem())) { 123 if(!itemVisible(currentItem())) {
124 if((unsigned int) currentItem() == (count()-1)) { 124 if((unsigned int) currentItem() == (count()-1)) {
125 setTopItem(currentItem()-numItemsVisible()+1); 125 setTopItem(currentItem()-numItemsVisible()+1);
126 } else { 126 } else {
127 setTopItem(topItem()-1); 127 setTopItem(topItem()-1);
128 } 128 }
129 } 129 }
130 break; 130 break;
131 case Key_Down: 131 case Key_Down:
132 if(count() < 2) { 132 if(count() < 2) {
133 e->ignore(); 133 e->ignore();
134 break; 134 break;
135 } 135 }
136 setCurrentItem((currentItem()+1)%count()); 136 setCurrentItem((currentItem()+1)%count());
137 if(!itemVisible(currentItem())) { 137 if(!itemVisible(currentItem())) {
138 if(currentItem() == 0) { 138 if(currentItem() == 0) {
139 setTopItem(0); 139 setTopItem(0);
140 } else { 140 } else {
141 setTopItem(topItem()+1); 141 setTopItem(topItem()+1);
142 } 142 }
143 } 143 }
144 break; 144 break;
145 case Key_Shift: 145 case Key_Shift:
146 emit shiftDown(); 146 emit shiftDown();
147 break; 147 break;
148 default: 148 default:
149 e->ignore(); 149 e->ignore();
150 break; 150 break;
151 } 151 }
152} 152}
153 153
154void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) 154void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
155{ 155{
156 switch(e->key()) { 156 switch(e->key()) {
157 case Key_Shift: 157 case Key_Shift:
158 emit shiftUp(); 158 emit shiftUp();
159 break; 159 break;
160 default: 160 default:
161 break; 161 break;
162 } 162 }
163} 163}
164 164
165void KNoScrollListBox::mousePressEvent(QMouseEvent *e) 165void KNoScrollListBox::mousePressEvent(QMouseEvent *e)
166{ 166{
167 QListBox::mousePressEvent(e); 167 QListBox::mousePressEvent(e);
168 168
169 if(e->button() == RightButton) { 169 if(e->button() == RightButton) {
170 emit rightClick(); 170 emit rightClick();
171 } 171 }
172} 172}
173 173
174MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) 174MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s)
175 : QListBoxItem() 175 : QListBoxItem()
176{ 176{
177 setText( s ); 177 setText( s );
178 178
179 mIncidence = incidence; 179 mIncidence = incidence;
180 mDate = qd; 180 mDate = qd;
181 // QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence )); 181 // QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence ));
182 mRecur = false; 182 mRecur = false;
183 mAlarm = false; 183 mAlarm = false;
184 mReply = false; 184 mReply = false;
185 mInfo = false; 185 mInfo = false;
186} 186}
187 187
188void MonthViewItem::paint(QPainter *p) 188void MonthViewItem::paint(QPainter *p)
189{ 189{
190#if QT_VERSION >= 0x030000 190#if QT_VERSION >= 0x030000
191 bool sel = isSelected(); 191 bool sel = isSelected();
192#else 192#else
193 bool sel = selected(); 193 bool sel = selected();
194#endif 194#endif
195 195
196 196
197 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) 197 if (KOPrefs::instance()->mMonthViewUsesCategoryColor)
198 { 198 {
199 p->setBackgroundColor( palette().color( QPalette::Normal, \ 199 p->setBackgroundColor( palette().color( QPalette::Normal, \
200 sel ? QColorGroup::Highlight : QColorGroup::Background ) ); 200 sel ? QColorGroup::Highlight : QColorGroup::Background ) );
201 p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) ); 201 p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) );
202 } 202 }
203 int x = 1; 203 int x = 1;
204 int y = 3;//(height() - mRecurPixmap.height()) /2; 204 int y = 3;//(height() - mRecurPixmap.height()) /2;
205 int size = PIXMAP_SIZE; 205 int size = PIXMAP_SIZE;
206 if ( QApplication::desktop()->width() < 300 ) 206 if ( QApplication::desktop()->width() < 300 )
207 size = 3; 207 size = 3;
208 if ( KOPrefs::instance()->mMonthShowIcons ) { 208 if ( KOPrefs::instance()->mMonthShowIcons ) {
209 if ( mInfo ) { 209 if ( mInfo ) {
210 p->fillRect ( x, y,size,size, Qt::darkGreen ); 210 p->fillRect ( x, y,size,size, Qt::darkGreen );
211 x += size + 1; 211 x += size + 1;
212 } 212 }
213 if ( mRecur ) { 213 if ( mRecur ) {
214 p->fillRect ( x, y,size,size, Qt::blue ); 214 p->fillRect ( x, y,size,size, Qt::blue );
215 x += size + 1; 215 x += size + 1;
216 } 216 }
217 if ( mAlarm ) { 217 if ( mAlarm ) {
218 p->fillRect ( x, y,size,size, Qt::red ); 218 p->fillRect ( x, y,size,size, Qt::red );
219 x += size + 1; 219 x += size + 1;
220 } 220 }
221 if ( mReply ) { 221 if ( mReply ) {
222 p->fillRect ( x, y,size,size, Qt::yellow ); 222 p->fillRect ( x, y,size,size, Qt::yellow );
223 x += size + 1; 223 x += size + 1;
224 } 224 }
225 } 225 }
226 QFontMetrics fm = p->fontMetrics(); 226 QFontMetrics fm = p->fontMetrics();
227 int yPos; 227 int yPos;
228 int pmheight = size; 228 int pmheight = size;
229 if( pmheight < fm.height() ) 229 if( pmheight < fm.height() )
230 yPos = fm.ascent() + fm.leading()/2; 230 yPos = fm.ascent() + fm.leading()/2;
231 else 231 else
232 yPos = pmheight/2 - fm.height()/2 + fm.ascent(); 232 yPos = pmheight/2 - fm.height()/2 + fm.ascent();
233 p->setPen( palette().color( QPalette::Normal, sel ? \ 233 p->setPen( palette().color( QPalette::Normal, sel ? \
234 QColorGroup::HighlightedText : QColorGroup::Foreground ) ); 234 QColorGroup::HighlightedText : QColorGroup::Foreground ) );
235 p->drawText( x, yPos, text() ); 235 p->drawText( x, yPos, text() );
236 if ( mIncidence->cancelled() ) { 236 if ( mIncidence->cancelled() ) {
237 int wid = fm.width( text() ); 237 int wid = fm.width( text() );
238 p->drawLine( x, yPos- fm.height()/2+2,x+wid, yPos- fm.height()/2 +2); 238 p->drawLine( x, yPos- fm.height()/2+2,x+wid, yPos- fm.height()/2 +2);
239 } 239 }
240 240
241} 241}
242 242
243int MonthViewItem::height(const QListBox *lb) const 243int MonthViewItem::height(const QListBox *lb) const
244{ 244{
245 return lb->fontMetrics().lineSpacing()+1; 245 return lb->fontMetrics().lineSpacing()+1;
246} 246}
247 247
248int MonthViewItem::width(const QListBox *lb) const 248int MonthViewItem::width(const QListBox *lb) const
249{ 249{
250 int size = PIXMAP_SIZE; 250 int size = PIXMAP_SIZE;
251 if ( QApplication::desktop()->width() < 300 ) 251 if ( QApplication::desktop()->width() < 300 )
252 size = 3; 252 size = 3;
253 int x = 1; 253 int x = 1;
254 if ( mInfo ) { 254 if ( mInfo ) {
255 x += size + 1; 255 x += size + 1;
256 } 256 }
257 if( mRecur ) { 257 if( mRecur ) {
258 x += size+1; 258 x += size+1;
259 } 259 }
260 if( mAlarm ) { 260 if( mAlarm ) {
261 x += size+1; 261 x += size+1;
262 } 262 }
263 if( mReply ) { 263 if( mReply ) {
264 x += size+1; 264 x += size+1;
265 } 265 }
266 266
267 return( x + lb->fontMetrics().width( text() ) + 1 ); 267 return( x + lb->fontMetrics().width( text() ) + 1 );
268} 268}
269 269
270 270
271MonthViewCell::MonthViewCell( KOMonthView *parent) 271MonthViewCell::MonthViewCell( KOMonthView *parent)
272 : QWidget( parent ), 272 : QWidget( parent ),
273 mMonthView( parent ) 273 mMonthView( parent )
274{ 274{
275 275
276 QVBoxLayout *topLayout = new QVBoxLayout( this ); 276 QVBoxLayout *topLayout = new QVBoxLayout( this );
277 277
278 // mLabel = new QLabel( this );QPushButton 278 // mLabel = new QLabel( this );QPushButton
279 mLabel = new QPushButton( this ); 279 mLabel = new QPushButton( this );
280 //mLabel->setFrameStyle( QFrame::Panel | QFrame::Plain ); 280 //mLabel->setFrameStyle( QFrame::Panel | QFrame::Plain );
281 //mLabel->setLineWidth( 1 ); 281 //mLabel->setLineWidth( 1 );
282 //mLabel->setAlignment( AlignCenter ); 282 //mLabel->setAlignment( AlignCenter );
283 mLabel->setFlat( true ); 283 mLabel->setFlat( true );
284 mItemList = new KNoScrollListBox( this ); 284 mItemList = new KNoScrollListBox( this );
285 mItemList->setMinimumSize( 10, 10 ); 285 mItemList->setMinimumSize( 10, 10 );
286 mItemList->setFrameStyle( QFrame::Panel | QFrame::Plain ); 286 mItemList->setFrameStyle( QFrame::Panel | QFrame::Plain );
287 mItemList->setLineWidth( 1 ); 287 mItemList->setLineWidth( 1 );
288 topLayout->addWidget( mItemList ); 288 topLayout->addWidget( mItemList );
289 mLabel->raise(); 289 mLabel->raise();
290 // QColor( 0,0,255 ) QColor( 160,1600,255 ) 290 // QColor( 0,0,255 ) QColor( 160,1600,255 )
291 mStandardPalette = palette(); 291 mStandardPalette = palette();
292 mStandardPalette.setColor(QColorGroup::Base, mStandardPalette.color( QPalette::Normal, QColorGroup::Background ) ); 292 mStandardPalette.setColor(QColorGroup::Base, mStandardPalette.color( QPalette::Normal, QColorGroup::Background ) );
293 293
294 enableScrollBars( false ); 294 enableScrollBars( false );
295 updateConfig(); 295 updateConfig();
296 //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() )); 296 //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() ));
297 connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() )); 297 connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() ));
298 connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ), 298 connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ),
299 SLOT( defaultAction( QListBoxItem * ) ) ); 299 SLOT( defaultAction( QListBoxItem * ) ) );
300 connect( mItemList, SIGNAL( rightButtonPressed( QListBoxItem *, 300 connect( mItemList, SIGNAL( rightButtonPressed( QListBoxItem *,
301 const QPoint &) ), 301 const QPoint &) ),
302 SLOT( contextMenu( QListBoxItem * ) ) ); 302 SLOT( contextMenu( QListBoxItem * ) ) );
303 connect( mItemList, SIGNAL( highlighted( QListBoxItem *) ), 303 connect( mItemList, SIGNAL( highlighted( QListBoxItem *) ),
304 SLOT( selection( QListBoxItem * ) ) ); 304 SLOT( selection( QListBoxItem * ) ) );
305 connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ), 305 connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ),
306 SLOT( cellClicked( QListBoxItem * ) ) ); 306 SLOT( cellClicked( QListBoxItem * ) ) );
307 connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ), 307 connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ),
308 SLOT( selection( QListBoxItem * ) ) ); 308 SLOT( selection( QListBoxItem * ) ) );
309} 309}
310#ifdef DESKTOP_VERSION 310#ifdef DESKTOP_VERSION
311QToolTipGroup *MonthViewCell::toolTipGroup() 311QToolTipGroup *MonthViewCell::toolTipGroup()
312{ 312{
313 if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); 313 if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0);
314 return mToolTipGroup; 314 return mToolTipGroup;
315} 315}
316#endif 316#endif
317 317
318void MonthViewCell::setDate( const QDate &date ) 318void MonthViewCell::setDate( const QDate &date )
319{ 319{
320 // kdDebug() << "MonthViewCell::setDate(): " << date.toString() << endl; 320 // kdDebug() << "MonthViewCell::setDate(): " << date.toString() << endl;
321 mDate = date; 321 mDate = date;
322 322
323 323
324 324
325 //resizeEvent( 0 ); 325 //resizeEvent( 0 );
326} 326}
327 327
328QDate MonthViewCell::date() const 328QDate MonthViewCell::date() const
329{ 329{
330 return mDate; 330 return mDate;
331} 331}
332 332
333void MonthViewCell::setPrimary( bool primary ) 333void MonthViewCell::setPrimary( bool primary )
334{ 334{
335 mPrimary = primary; 335 mPrimary = primary;
336 //setMyPalette(); 336 //setMyPalette();
337} 337}
338void MonthViewCell::setMyPalette() 338void MonthViewCell::setMyPalette()
339{ 339{
340 340
341 if ( mHoliday) { 341 if ( mHoliday) {
342 setPalette( mHolidayPalette ); 342 setPalette( mHolidayPalette );
343 } else { 343 } else {
344 if ( mPrimary ) { 344 if ( mPrimary ) {
345 setPalette( mPrimaryPalette ); 345 setPalette( mPrimaryPalette );
346 } else { 346 } else {
347 setPalette( mNonPrimaryPalette ); 347 setPalette( mNonPrimaryPalette );
348 } 348 }
349 } 349 }
350 QPalette pal = palette(); 350 QPalette pal = palette();
351 351
352 mLabel->setPalette( QPalette ( pal.color( QPalette::Normal,QColorGroup::Base),pal.color(QPalette::Normal,QColorGroup::Base ) )); 352 mLabel->setPalette( QPalette ( pal.color( QPalette::Normal,QColorGroup::Base),pal.color(QPalette::Normal,QColorGroup::Base ) ));
353} 353}
354QPalette MonthViewCell::getPalette () 354QPalette MonthViewCell::getPalette ()
355{ 355{
356 if ( !KOPrefs::instance()->mMonthViewUsesDayColors ) 356 if ( !KOPrefs::instance()->mMonthViewUsesDayColors )
357 return mStandardPalette; 357 return mStandardPalette;
358 if ( mHoliday) { 358 if ( mHoliday) {
359 return mHolidayPalette ; 359 return mHolidayPalette ;
360 } else { 360 } else {
361 if ( mPrimary ) { 361 if ( mPrimary ) {
362 return mPrimaryPalette ; 362 return mPrimaryPalette ;
363 } 363 }
364 } 364 }
365 return mNonPrimaryPalette; 365 return mNonPrimaryPalette;
366} 366}
367bool MonthViewCell::isPrimary() const 367bool MonthViewCell::isPrimary() const
368{ 368{
369 return mPrimary; 369 return mPrimary;
370} 370}
371 371
372void MonthViewCell::setHoliday( bool holiday ) 372void MonthViewCell::setHoliday( bool holiday )
373{ 373{
374 mHoliday = holiday; 374 mHoliday = holiday;
375 //setMyPalette(); 375 //setMyPalette();
376} 376}
377 377
378void MonthViewCell::setHoliday( const QString &holiday ) 378void MonthViewCell::setHoliday( const QString &holiday )
379{ 379{
380 mHolidayString = holiday; 380 mHolidayString = holiday;
381 381
382 if ( !holiday.isEmpty() ) { 382 if ( !holiday.isEmpty() ) {
383 setHoliday( true ); 383 setHoliday( true );
384 } 384 }
385} 385}
386void MonthViewCell::keyPressEvent ( QKeyEvent * e ) 386void MonthViewCell::keyPressEvent ( QKeyEvent * e )
387{ 387{
388 388
389 e->ignore(); 389 e->ignore();
390 390
391} 391}
392void MonthViewCell::clear() 392void MonthViewCell::clear()
393{ 393{
394 mItemList->clear(); 394 mItemList->clear();
395 QApplication::removePostedEvents ( mItemList ); 395 QApplication::removePostedEvents ( mItemList );
396 QApplication::removePostedEvents ( mLabel ); 396 QApplication::removePostedEvents ( mLabel );
397 QApplication::removePostedEvents ( this ); 397 QApplication::removePostedEvents ( this );
398} 398}
399 399
400void MonthViewCell::startUpdateCell() 400void MonthViewCell::startUpdateCell()
401{ 401{
402 402
403 if ( !mMonthView->isUpdatePossible() ) 403 if ( !mMonthView->isUpdatePossible() )
404 return; 404 return;
405 /* 405 /*
406 if ( !isVisible() ){ 406 if ( !isVisible() ){
407 return; 407 return;
408 } 408 }
409 */ 409 */
410 // qDebug("MonthViewCell::updateCell() "); 410 // qDebug("MonthViewCell::updateCell() ");
411 setPrimary( mDate.month()%2 ); 411 setPrimary( mDate.month()%2 );
412 setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); 412 setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays);
413 if ( mDate == QDate::currentDate() ) { 413 if ( mDate == QDate::currentDate() ) {
414 mItemList->setLineWidth( 3 ); 414 mItemList->setLineWidth( 3 );
415 } else { 415 } else {
416 mItemList->setLineWidth( 1 ); 416 mItemList->setLineWidth( 1 );
417 } 417 }
418 mItemList->clear(); 418 mItemList->clear();
419 419
420#ifdef DESKTOP_VERSION 420#ifdef DESKTOP_VERSION
421 QToolTip::remove(this); 421 QToolTip::remove(this);
422#endif 422#endif
423 mToolTip = ""; 423 mToolTip = "";
424 //qApp->processEvents(); 424 //qApp->processEvents();
425 if ( !mHolidayString.isEmpty() ) { 425 if ( !mHolidayString.isEmpty() ) {
426 MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString ); 426 MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString );
427 item->setPalette( mHolidayPalette ); 427 item->setPalette( mHolidayPalette );
428 mItemList->insertItem( item ); 428 mItemList->insertItem( item );
429 mToolTip += mHolidayString+"\n"; 429 mToolTip += mHolidayString+"\n";
430 } 430 }
431} 431}
432 432
433void MonthViewCell::insertEvent(Event *event) 433void MonthViewCell::insertEvent(Event *event)
434{ 434{
435 if ( !(event->doesRecur() == Recurrence::rNone) ) { 435 if ( !(event->doesRecur() == Recurrence::rNone) ) {
436 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) 436 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
437 return; 437 return;
438 else 438 else
439 if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) 439 if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly )
440 return; 440 return;
441 } 441 }
442 442
443 if ( event->categories().contains("Holiday") || 443 if ( event->categories().contains("Holiday") ||
444 event->categories().contains(i18n("Holiday"))) { 444 event->categories().contains(i18n("Holiday"))) {
445 setHoliday( true ); 445 setHoliday( true );
446 if ( mDate.dayOfWeek() == 7 ) 446 if ( mDate.dayOfWeek() == 7 )
447 mItemList->setLineWidth( 3 ); 447 mItemList->setLineWidth( 3 );
448 } 448 }
449 QString text; 449 QString text;
450 if (event->isMultiDay()) { 450 if (event->isMultiDay()) {
451 QString prefix = "<->"; 451 QString prefix = "<->";
452 if ( event->doesRecur() ) { 452 if ( event->doesRecur() ) {
453 if ( event->recursOn( mDate) ) 453 if ( event->recursOn( mDate) )
454 prefix ="->" ; 454 prefix ="->" ;
455 else { 455 else {
456 int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); 456 int days = event->dtStart().date().daysTo ( event->dtEnd().date() );
457 if ( event->recursOn( mDate.addDays( -days)) ) 457 if ( event->recursOn( mDate.addDays( -days)) )
458 prefix ="<-" ; 458 prefix ="<-" ;
459 } 459 }
460 460
461 } else { 461 } else {
462 if (mDate == event->dtStart().date()) { 462 if (mDate == event->dtStart().date()) {
463 prefix ="->" ; 463 prefix ="->" ;
464 } else if (mDate == event->dtEnd().date()) { 464 } else if (mDate == event->dtEnd().date()) {
465 prefix ="<-" ; 465 prefix ="<-" ;
466 } 466 }
467 } 467 }
468 if ( !event->doesFloat() ) { 468 if ( !event->doesFloat() ) {
469 if ( mDate == event->dtStart().date () ) 469 if ( mDate == event->dtStart().date () )
470 prefix += KGlobal::locale()->formatTime(event->dtStart().time())+" "; 470 prefix += KGlobal::locale()->formatTime(event->dtStart().time())+" ";
471 else if ( mDate == event->dtEnd().date () ) 471 else if ( mDate == event->dtEnd().date () )
472 prefix += KGlobal::locale()->formatTime(event->dtEnd().time())+" "; 472 prefix += KGlobal::locale()->formatTime(event->dtEnd().time())+" ";
473 473
474 } 474 }
475 text = prefix + event->summary(); 475 text = prefix + event->summary();
476 mToolTip += text; 476 mToolTip += text;
477 } else { 477 } else {
478 if (event->doesFloat()) { 478 if (event->doesFloat()) {
479 text = event->summary(); 479 text = event->summary();
480 mToolTip += text; 480 mToolTip += text;
481 } 481 }
482 else { 482 else {
483 text = KGlobal::locale()->formatTime(event->dtStart().time()); 483 text = KGlobal::locale()->formatTime(event->dtStart().time());
484 text += " " + event->summary(); 484 text += " " + event->summary();
485 mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); 485 mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary();
486 } 486 }
487 } 487 }
488 488
489 MonthViewItem *item = new MonthViewItem( event, mDate, text ); 489 MonthViewItem *item = new MonthViewItem( event, mDate, text );
490 QPalette pal; 490 QPalette pal;
491 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 491 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
492 QStringList categories = event->categories(); 492 QStringList categories = event->categories();
493 QString cat = categories.first(); 493 QString cat = categories.first();
494 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { 494 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) {
495 pal = getPalette(); 495 pal = getPalette();
496 if (cat.isEmpty()) { 496 if (cat.isEmpty()) {
497 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); 497 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor);
498 } else { 498 } else {
499 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); 499 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat)));
500 } 500 }
501 501
502 } else { 502 } else {
503 if (cat.isEmpty()) { 503 if (cat.isEmpty()) {
504 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 504 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
505 } else { 505 } else {
506 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 506 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
507 } 507 }
508 } 508 }
509 509
510 } else { 510 } else {
511 pal = mStandardPalette ; 511 pal = mStandardPalette ;
512 } 512 }
513 item->setPalette( pal ); 513 item->setPalette( pal );
514 item->setRecur( event->recurrence()->doesRecur() ); 514 item->setRecur( event->recurrence()->doesRecur() );
515 item->setAlarm( event->isAlarmEnabled() ); 515 item->setAlarm( event->isAlarmEnabled() );
516 item->setMoreInfo( event->description().length() > 0 ); 516 item->setMoreInfo( event->description().length() > 0 );
517#ifdef DESKTOP_VERSION 517#ifdef DESKTOP_VERSION
518 Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, 518 Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails,
519 KOPrefs::instance()->email()); 519 KOPrefs::instance()->email());
520 if ( me != 0 ) { 520 if ( me != 0 ) {
521 if ( me->status() == Attendee::NeedsAction && me->RSVP()) 521 if ( me->status() == Attendee::NeedsAction && me->RSVP())
522 item->setReply(true); 522 item->setReply(true);
523 else 523 else
524 item->setReply(false); 524 item->setReply(false);
525 } else 525 } else
526 item->setReply(false); 526 item->setReply(false);
527#endif 527#endif
528 mItemList->insertItem( item ); 528 mItemList->insertItem( item );
529 mToolTip += "\n"; 529 mToolTip += "\n";
530} 530}
531void MonthViewCell::insertTodo(Todo *todo) 531void MonthViewCell::insertTodo(Todo *todo)
532{ 532{
533 QString text; 533 QString text;
534 if (todo->hasDueDate()) { 534 if (todo->hasDueDate()) {
535 if (!todo->doesFloat()) { 535 if (!todo->doesFloat()) {
536 text += KGlobal::locale()->formatTime(todo->dtDue().time()); 536 text += KGlobal::locale()->formatTime(todo->dtDue().time());
537 text += " "; 537 text += " ";
538 } 538 }
539 } 539 }
540 text += i18n("To-Do: %1").arg(todo->summary()); 540 text += i18n("To-Do: %1").arg(todo->summary());
541 541
542 MonthViewItem *item = new MonthViewItem( todo, mDate, text ); 542 MonthViewItem *item = new MonthViewItem( todo, mDate, text );
543 //item->setPalette( mStandardPalette ); 543 //item->setPalette( mStandardPalette );
544 QPalette pal; 544 QPalette pal;
545 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 545 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
546 QStringList categories = todo->categories(); 546 QStringList categories = todo->categories();
547 QString cat = categories.first(); 547 QString cat = categories.first();
548 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { 548 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) {
549 pal = getPalette(); 549 pal = getPalette();
550 if (cat.isEmpty()) { 550 if (cat.isEmpty()) {
551 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); 551 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor);
552 } else { 552 } else {
553 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); 553 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat)));
554 } 554 }
555 555
556 } else { 556 } else {
557 if (cat.isEmpty()) { 557 if (cat.isEmpty()) {
558 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 558 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
559 } else { 559 } else {
560 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 560 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
561 } 561 }
562 } 562 }
563 563
564 } else { 564 } else {
565 pal = mStandardPalette ; 565 pal = mStandardPalette ;
566 } 566 }
567 item->setPalette( pal ); 567 item->setPalette( pal );
568 mItemList->insertItem( item ); 568 mItemList->insertItem( item );
569 mToolTip += text+"\n"; 569 mToolTip += text+"\n";
570} 570}
571void MonthViewCell::finishUpdateCell() 571void MonthViewCell::finishUpdateCell()
572{ 572{
573#ifdef DESKTOP_VERSION 573#ifdef DESKTOP_VERSION
574 if (mToolTip != "") 574 if (mToolTip != "")
575 QToolTip::add(this,mToolTip,toolTipGroup(),""); 575 QToolTip::add(this,mToolTip,toolTipGroup(),"");
576#endif 576#endif
577 mItemList->sort(); 577 mItemList->sort();
578 //setMyPalette(); 578 //setMyPalette();
579 setMyPalette(); 579 setMyPalette();
580 QString text; 580 QString text;
581 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog; 581 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog;
582 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) { 582 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) {
583 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " "; 583 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " ";
584 mLabel->resize( mLabelBigSize ); 584 mLabel->resize( mLabelBigSize );
585 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); 585 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
586 } else { 586 } else {
587 mLabel->resize( mLabelSize ); 587 mLabel->resize( mLabelSize );
588 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); 588 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
589 } 589 }
590 590
591 mLabel->setText( text ); 591 mLabel->setText( text );
592 resizeEvent( 0 ); 592 resizeEvent( 0 );
593} 593}
594void MonthViewCell::updateCell() 594void MonthViewCell::updateCell()
595{ 595{
596 if ( !mMonthView->isUpdatePossible() ) 596 if ( !mMonthView->isUpdatePossible() )
597 return; 597 return;
598 startUpdateCell(); 598 startUpdateCell();
599 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 599 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
600 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); 600 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true );
601 Event *event; 601 Event *event;
602 for( event = events.first(); event; event = events.next() ) { // for event 602 for( event = events.first(); event; event = events.next() ) { // for event
603 insertEvent(event); 603 insertEvent(event);
604 } 604 }
605 // insert due todos 605 // insert due todos
606 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); 606 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
607 Todo *todo; 607 Todo *todo;
608 for(todo = todos.first(); todo; todo = todos.next()) { 608 for(todo = todos.first(); todo; todo = todos.next()) {
609 insertTodo( todo ); 609 insertTodo( todo );
610 } 610 }
611 finishUpdateCell(); 611 finishUpdateCell();
612 // if ( isVisible()) 612 // if ( isVisible())
613 //qApp->processEvents(); 613 //qApp->processEvents();
614} 614}
615 615
616void MonthViewCell::updateConfig() 616void MonthViewCell::updateConfig()
617{ 617{
618 setFont( KOPrefs::instance()->mMonthViewFont ); 618 setFont( KOPrefs::instance()->mMonthViewFont );
619 619
620 QFontMetrics fm( font() ); 620 QFontMetrics fm( font() );
621 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); 621 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 );
622 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); 622 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 );
623 mHolidayPalette = mStandardPalette; 623 mHolidayPalette = mStandardPalette;
624 mPrimaryPalette = mStandardPalette; 624 mPrimaryPalette = mStandardPalette;
625 mNonPrimaryPalette = mStandardPalette; 625 mNonPrimaryPalette = mStandardPalette;
626 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) { 626 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) {
627 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor ); 627 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor );
628 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor ); 628 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor );
629 mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark()); 629 mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark());
630 mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark()); 630 mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark());
631 mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor); 631 mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor);
632 mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor); 632 mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor);
633 mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark()); 633 mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark());
634 mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor); 634 mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor);
635 mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor); 635 mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor);
636 } 636 }
637 //updateCell(); 637 //updateCell();
638} 638}
639 639
640void MonthViewCell::enableScrollBars( bool enabled ) 640void MonthViewCell::enableScrollBars( bool enabled )
641{ 641{
642 if ( enabled ) { 642 if ( enabled ) {
643 mItemList->setVScrollBarMode(QScrollView::Auto); 643 mItemList->setVScrollBarMode(QScrollView::Auto);
644 mItemList->setHScrollBarMode(QScrollView::Auto); 644 mItemList->setHScrollBarMode(QScrollView::Auto);
645 } else { 645 } else {
646 mItemList->setVScrollBarMode(QScrollView::AlwaysOff); 646 mItemList->setVScrollBarMode(QScrollView::AlwaysOff);
647 mItemList->setHScrollBarMode(QScrollView::AlwaysOff); 647 mItemList->setHScrollBarMode(QScrollView::AlwaysOff);
648 } 648 }
649} 649}
650 650
651Incidence *MonthViewCell::selectedIncidence() 651Incidence *MonthViewCell::selectedIncidence()
652{ 652{
653 int index = mItemList->currentItem(); 653 int index = mItemList->currentItem();
654 if ( index < 0 ) return 0; 654 if ( index < 0 ) return 0;
655 655
656 MonthViewItem *item = 656 MonthViewItem *item =
657 static_cast<MonthViewItem *>( mItemList->item( index ) ); 657 static_cast<MonthViewItem *>( mItemList->item( index ) );
658 658
659 if ( !item ) return 0; 659 if ( !item ) return 0;
660 660
661 return item->incidence(); 661 return item->incidence();
662} 662}
663 663
664QDate MonthViewCell::selectedIncidenceDate() 664QDate MonthViewCell::selectedIncidenceDate()
665{ 665{
666 QDate qd; 666 QDate qd;
667 int index = mItemList->currentItem(); 667 int index = mItemList->currentItem();
668 if ( index < 0 ) return qd; 668 if ( index < 0 ) return qd;
669 669
670 MonthViewItem *item = 670 MonthViewItem *item =
671 static_cast<MonthViewItem *>( mItemList->item( index ) ); 671 static_cast<MonthViewItem *>( mItemList->item( index ) );
672 672
673 if ( !item ) return qd; 673 if ( !item ) return qd;
674 674
675 return item->incidenceDate(); 675 return item->incidenceDate();
676} 676}
677 677
678void MonthViewCell::deselect() 678void MonthViewCell::deselect()
679{ 679{
680 mItemList->clearSelection(); 680 mItemList->clearSelection();
681 enableScrollBars( false ); 681 enableScrollBars( false );
682 // updateCell(); 682 // updateCell();
683} 683}
684void MonthViewCell::select() 684void MonthViewCell::select()
685{ 685{
686 ;// updateCell(); 686 ;// updateCell();
687} 687}
688 688
689void MonthViewCell::resizeEvent ( QResizeEvent * ) 689void MonthViewCell::resizeEvent ( QResizeEvent * )
690{ 690{
691 if ( !mMonthView->isUpdatePossible() ) 691 if ( !mMonthView->isUpdatePossible() )
692 return; 692 return;
693 693
694 int size = height() - mLabel->height() - 2; 694 int size = height() - mLabel->height() - 2;
695 if ( size > 0 ) 695 if ( size > 0 )
696 mItemList->verticalScrollBar()->setMaximumHeight( size ); 696 mItemList->verticalScrollBar()->setMaximumHeight( size );
697 size = width() - mLabel->width() -2; 697 size = width() - mLabel->width() -2;
698 if ( size > 0 ) 698 if ( size > 0 )
699 mItemList->horizontalScrollBar()->setMaximumWidth( size ); 699 mItemList->horizontalScrollBar()->setMaximumWidth( size );
700 mLabel->move( width()-mItemList->lineWidth() - mLabel->width(), height()-mItemList->lineWidth() - mLabel->height() ); 700 mLabel->move( width()-mItemList->lineWidth() - mLabel->width(), height()-mItemList->lineWidth() - mLabel->height() );
701 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 701 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
702} 702}
703 703
704void MonthViewCell::defaultAction( QListBoxItem *item ) 704void MonthViewCell::defaultAction( QListBoxItem *item )
705{ 705{
706 if ( !item ) return; 706 if ( !item ) return;
707 707
708 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 708 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
709 Incidence *incidence = eventItem->incidence(); 709 Incidence *incidence = eventItem->incidence();
710 if ( incidence ) mMonthView->defaultAction( incidence ); 710 if ( incidence ) mMonthView->defaultAction( incidence );
711} 711}
712void MonthViewCell::showDay() 712void MonthViewCell::showDay()
713{ 713{
714 emit showDaySignal( date() ); 714 emit showDaySignal( date() );
715} 715}
716void MonthViewCell::newEvent() 716void MonthViewCell::newEvent()
717{ 717{
718 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 718 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
719 emit newEventSignal( dt ); 719 emit newEventSignal( dt );
720} 720}
721void MonthViewCell::cellClicked( QListBoxItem *item ) 721void MonthViewCell::cellClicked( QListBoxItem *item )
722{ 722{
723 static QListBoxItem * lastClicked = 0; 723 static QListBoxItem * lastClicked = 0;
724 if ( item == 0 ) { 724 if ( item == 0 ) {
725 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 725 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
726 emit newEventSignal( dt ); 726 emit newEventSignal( dt );
727 return; 727 return;
728 } 728 }
729 /* 729 /*
730 if ( lastClicked ) 730 if ( lastClicked )
731 if ( ! item ) { 731 if ( ! item ) {
732 if ( lastClicked->listBox() != item->listBox() ) 732 if ( lastClicked->listBox() != item->listBox() )
733 lastClicked->listBox()->clearSelection(); 733 lastClicked->listBox()->clearSelection();
734 } 734 }
735 */ 735 */
736 736
737 mMonthView->setSelectedCell( this ); 737 mMonthView->setSelectedCell( this );
738 if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true ); 738 if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true );
739 select(); 739 select();
740} 740}
741 741
742void MonthViewCell::contextMenu( QListBoxItem *item ) 742void MonthViewCell::contextMenu( QListBoxItem *item )
743{ 743{
744 if ( !item ) return; 744 if ( !item ) return;
745 745
746 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 746 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
747 Incidence *incidence = eventItem->incidence(); 747 Incidence *incidence = eventItem->incidence();
748 if ( incidence ) mMonthView->showContextMenu( incidence ); 748 if ( incidence ) mMonthView->showContextMenu( incidence );
749} 749}
750 750
751void MonthViewCell::selection( QListBoxItem *item ) 751void MonthViewCell::selection( QListBoxItem *item )
752{ 752{
753 if ( !item ) return; 753 if ( !item ) return;
754 754
755 mMonthView->setSelectedCell( this ); 755 mMonthView->setSelectedCell( this );
756} 756}
757 757
758 758
759// ******************************************************************************* 759// *******************************************************************************
760// ******************************************************************************* 760// *******************************************************************************
761// ******************************************************************************* 761// *******************************************************************************
762 762
763 763
764KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) 764KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
765 : KOEventView( calendar, parent, name ), 765 : KOEventView( calendar, parent, name ),
766 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), 766 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
767 mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) 767 mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
768{ 768{
769 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 769 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
770 mShowWeekView = KOPrefs::instance()->mMonthViewWeek; 770 mShowWeekView = KOPrefs::instance()->mMonthViewWeek;
771 if ( mShowWeekView ) 771 if ( mShowWeekView )
772 mWeekStartsMonday = true; 772 mWeekStartsMonday = true;
773 updatePossible = false; 773 updatePossible = false;
774 mCells.setAutoDelete( true ); 774 mCells.setAutoDelete( true );
775 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 775 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
776 // mDayLayout = new QGridLayout( this ); 776 // mDayLayout = new QGridLayout( this );
777 // create the day of the week labels (Sun, Mon, etc) and add them to 777 // create the day of the week labels (Sun, Mon, etc) and add them to
778 // the layout. 778 // the layout.
779 mDayLabels.resize( mDaysPerWeek ); 779 mDayLabels.resize( mDaysPerWeek );
780 QFont bfont = font(); 780 QFont bfont = font();
781 if ( QApplication::desktop()->width() < 650 ) { 781 if ( QApplication::desktop()->width() < 650 ) {
782 bfont.setPointSize( bfont.pointSize() - 2 ); 782 bfont.setPointSize( bfont.pointSize() - 2 );
783 } 783 }
784 bfont.setBold( true ); 784 bfont.setBold( true );
785 int i; 785 int i;
786 786
787 for( i = 0; i < mDaysPerWeek; i++ ) { 787 for( i = 0; i < mDaysPerWeek; i++ ) {
788 QLabel *label = new QLabel( this ); 788 QLabel *label = new QLabel( this );
789 label->setFont(bfont); 789 label->setFont(bfont);
790 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 790 label->setFrameStyle(QFrame::Panel|QFrame::Raised);
791 label->setLineWidth(1); 791 label->setLineWidth(1);
792 label->setAlignment(AlignCenter); 792 label->setAlignment(AlignCenter);
793 mDayLabels.insert( i, label ); 793 mDayLabels.insert( i, label );
794 } 794 }
795 795
796 bfont.setBold( false ); 796 bfont.setBold( false );
797 mWeekLabels.resize( mNumWeeks+1 ); 797 mWeekLabels.resize( mNumWeeks+1 );
798 for( i = 0; i < mNumWeeks+1; i++ ) { 798 for( i = 0; i < mNumWeeks+1; i++ ) {
799 KOWeekButton *label = new KOWeekButton( this ); 799 KOWeekButton *label = new KOWeekButton( this );
800 label->setFont(bfont); 800 label->setFont(bfont);
801 connect( label, SIGNAL( selectWeekNum ( int )),this, SIGNAL( selectWeekNum ( int )) ); 801 connect( label, SIGNAL( selectWeekNum ( int )),this, SIGNAL( selectWeekNum ( int )) );
802 label->setFlat(true); 802 label->setFlat(true);
803 QWhatsThis::add(label,i18n("Click on the week number to\nshow week in agenda view")); 803 QWhatsThis::add(label,i18n("Click on the week number to\nshow week in agenda view"));
804 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 804 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
805 //label->setLineWidth(1); 805 //label->setLineWidth(1);
806 //label->setAlignment(AlignCenter); 806 //label->setAlignment(AlignCenter);
807 mWeekLabels.insert( i, label ); 807 mWeekLabels.insert( i, label );
808 } 808 }
809 mWeekLabels[mNumWeeks]->setText( i18n("W")); 809 mWeekLabels[mNumWeeks]->setText( i18n("W"));
810 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nswitch to week mode view"));
810 int row, col; 811 int row, col;
811 mCells.resize( mNumCells ); 812 mCells.resize( mNumCells );
812 for( row = 0; row < mNumWeeks; ++row ) { 813 for( row = 0; row < mNumWeeks; ++row ) {
813 for( col = 0; col < mDaysPerWeek; ++col ) { 814 for( col = 0; col < mDaysPerWeek; ++col ) {
814 MonthViewCell *cell = new MonthViewCell( this ); 815 MonthViewCell *cell = new MonthViewCell( this );
815 mCells.insert( row * mDaysPerWeek + col, cell ); 816 mCells.insert( row * mDaysPerWeek + col, cell );
816 817
817 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 818 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
818 SLOT( defaultAction( Incidence * ) ) ); 819 SLOT( defaultAction( Incidence * ) ) );
819 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 820 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
820 SIGNAL( newEventSignal( QDateTime ) ) ); 821 SIGNAL( newEventSignal( QDateTime ) ) );
821 connect( cell, SIGNAL( showDaySignal( QDate ) ), 822 connect( cell, SIGNAL( showDaySignal( QDate ) ),
822 SIGNAL( showDaySignal( QDate ) ) ); 823 SIGNAL( showDaySignal( QDate ) ) );
823 } 824 }
824 } 825 }
825 826
826 connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), 827 connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ),
827 SLOT( switchView() ) ); 828 SLOT( switchView() ) );
828 mContextMenu = eventPopup(); 829 mContextMenu = eventPopup();
829 // updateConfig(); //useless here 830 // updateConfig(); //useless here
830 831
831 emit incidenceSelected( 0 ); 832 emit incidenceSelected( 0 );
832} 833}
833 834
834KOMonthView::~KOMonthView() 835KOMonthView::~KOMonthView()
835{ 836{
836 delete mContextMenu; 837 delete mContextMenu;
837} 838}
838void KOMonthView::switchView() 839void KOMonthView::switchView()
839{ 840{
840 if ( selectedCell( ) ) 841 if ( selectedCell( ) )
841 selectedCell()->deselect(); 842 selectedCell()->deselect();
842 mShowWeekView = !mShowWeekView; 843 mShowWeekView = !mShowWeekView;
843 KOPrefs::instance()->mMonthViewWeek = mShowWeekView; 844 KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
844 emit showNavigator( !mShowWeekView ); 845 emit showNavigator( !mShowWeekView );
845 computeLayout(); 846 computeLayout();
846 updateConfig(); 847 updateConfig();
847} 848}
848 849
849int KOMonthView::maxDatesHint() 850int KOMonthView::maxDatesHint()
850{ 851{
851 return mNumCells; 852 return mNumCells;
852} 853}
853 854
854int KOMonthView::currentDateCount() 855int KOMonthView::currentDateCount()
855{ 856{
856 return mNumCells; 857 return mNumCells;
857} 858}
858 859
859QPtrList<Incidence> KOMonthView::selectedIncidences() 860QPtrList<Incidence> KOMonthView::selectedIncidences()
860{ 861{
861 QPtrList<Incidence> selected; 862 QPtrList<Incidence> selected;
862 863
863 if ( mSelectedCell ) { 864 if ( mSelectedCell ) {
864 Incidence *incidence = mSelectedCell->selectedIncidence(); 865 Incidence *incidence = mSelectedCell->selectedIncidence();
865 if ( incidence ) selected.append( incidence ); 866 if ( incidence ) selected.append( incidence );
866 } 867 }
867 868
868 return selected; 869 return selected;
869} 870}
870 871
871DateList KOMonthView::selectedDates() 872DateList KOMonthView::selectedDates()
872{ 873{
873 DateList selected; 874 DateList selected;
874 875
875 if ( mSelectedCell ) { 876 if ( mSelectedCell ) {
876 QDate qd = mSelectedCell->selectedIncidenceDate(); 877 QDate qd = mSelectedCell->selectedIncidenceDate();
877 if ( qd.isValid() ) selected.append( qd ); 878 if ( qd.isValid() ) selected.append( qd );
878 } 879 }
879 880
880 return selected; 881 return selected;
881} 882}
882 883
883void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, 884void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
884 const QDate &td) 885 const QDate &td)
885{ 886{
886#ifndef KORG_NOPRINTER 887#ifndef KORG_NOPRINTER
887 calPrinter->preview(CalPrinter::Month, fd, td); 888 calPrinter->preview(CalPrinter::Month, fd, td);
888#endif 889#endif
889} 890}
890 891
891void KOMonthView::updateConfig() 892void KOMonthView::updateConfig()
892{ 893{
893 894
894 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 895 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
895 896
896 if ( mShowWeekView ) 897 if ( mShowWeekView )
897 mWeekStartsMonday = true; 898 mWeekStartsMonday = true;
898 QFontMetrics fontmetric(mDayLabels[0]->font()); 899 QFontMetrics fontmetric(mDayLabels[0]->font());
899 mWidthLongDayLabel = 0; 900 mWidthLongDayLabel = 0;
900 901
901 for (int i = 0; i < 7; i++) { 902 for (int i = 0; i < 7; i++) {
902 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 903 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
903 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 904 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
904 } 905 }
905 bool temp = mShowSatSunComp ; 906 bool temp = mShowSatSunComp ;
906 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 907 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
907 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) 908 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog )
908 computeLayout(); 909 computeLayout();
909 updateDayLabels(); 910 updateDayLabels();
910 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); 911 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks);
911 int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; 912 int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks;
912 //resizeEvent( 0 ); 913 //resizeEvent( 0 );
913 for (uint i = 0; i < mCells.count(); ++i) { 914 for (uint i = 0; i < mCells.count(); ++i) {
914 mCells[i]->updateConfig(); 915 mCells[i]->updateConfig();
915 } 916 }
916#ifdef DESKTOP_VERSION 917#ifdef DESKTOP_VERSION
917 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 918 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
918#endif 919#endif
919 updateView(); 920 updateView();
920} 921}
921 922
922void KOMonthView::updateDayLabels() 923void KOMonthView::updateDayLabels()
923{ 924{
924 925
925 for (int i = 0; i < 7; i++) { 926 for (int i = 0; i < 7; i++) {
926 if (mWeekStartsMonday) { 927 if (mWeekStartsMonday) {
927 bool show = mShortDayLabels; 928 bool show = mShortDayLabels;
928 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > mDayLabels[i]->width() ) 929 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > mDayLabels[i]->width() )
929 show = true; 930 show = true;
930 mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 931 mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
931 } else { 932 } else {
932 if (i==0) mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); 933 if (i==0) mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels));
933 else mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); 934 else mDayLabels[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels));
934 935
935 } 936 }
936 } 937 }
937} 938}
938 939
939void KOMonthView::showDates(const QDate &start, const QDate &) 940void KOMonthView::showDates(const QDate &start, const QDate &)
940{ 941{
941 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl; 942 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl;
942 943
943 944
944 mStartDate = start; 945 mStartDate = start;
945 946
946 int startWeekDay = mWeekStartsMonday ? 1 : 7; 947 int startWeekDay = mWeekStartsMonday ? 1 : 7;
947 948
948 while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) { 949 while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) {
949 mStartDate = mStartDate.addDays( -1 ); 950 mStartDate = mStartDate.addDays( -1 );
950 } 951 }
951 952
952 bool primary = false; 953 bool primary = false;
953 uint i; 954 uint i;
954 for( i = 0; i < mCells.size(); ++i ) { 955 for( i = 0; i < mCells.size(); ++i ) {
955 QDate date = mStartDate.addDays( i ); 956 QDate date = mStartDate.addDays( i );
956 mCells[i]->setDate( date ); 957 mCells[i]->setDate( date );
957 958
958#ifndef KORG_NOPLUGINS 959#ifndef KORG_NOPLUGINS
959 // add holiday, if present 960 // add holiday, if present
960 QString hstring(KOCore::self()->holiday(date)); 961 QString hstring(KOCore::self()->holiday(date));
961 mCells[i]->setHoliday( hstring ); 962 mCells[i]->setHoliday( hstring );
962#endif 963#endif
963 964
964 } 965 }
965 QDate date = mStartDate.addDays( mWeekStartsMonday ? 3 : 4 ); 966 QDate date = mStartDate.addDays( mWeekStartsMonday ? 3 : 4 );
966 for( i = 0; i < 6; ++i ) { 967 for( i = 0; i < 6; ++i ) {
967 int wno; 968 int wno;
968 // remember, according to ISO 8601, the first week of the year is the 969 // remember, according to ISO 8601, the first week of the year is the
969 // first week that contains a thursday. Thus we must subtract off 4, 970 // first week that contains a thursday. Thus we must subtract off 4,
970 // not just 1. 971 // not just 1.
971 int dayOfYear = date.dayOfYear(); 972 int dayOfYear = date.dayOfYear();
972 if (dayOfYear % 7 != 0) 973 if (dayOfYear % 7 != 0)
973 wno = dayOfYear / 7 + 1; 974 wno = dayOfYear / 7 + 1;
974 else 975 else
975 wno =dayOfYear / 7; 976 wno =dayOfYear / 7;
976 mWeekLabels[i]->setWeekNum( wno ); 977 mWeekLabels[i]->setWeekNum( wno );
977 date = date.addDays( 7 ); 978 date = date.addDays( 7 );
978 } 979 }
979 updateView(); 980 updateView();
980} 981}
981 982
982void KOMonthView::showEvents(QPtrList<Event>) 983void KOMonthView::showEvents(QPtrList<Event>)
983{ 984{
984 qDebug("KOMonthView::selectEvents is not implemented yet. "); 985 qDebug("KOMonthView::selectEvents is not implemented yet. ");
985} 986}
986 987
987void KOMonthView::changeEventDisplay(Event *, int) 988void KOMonthView::changeEventDisplay(Event *, int)
988{ 989{
989 // this should be re-written to be much more efficient, but this 990 // this should be re-written to be much more efficient, but this
990 // quick-and-dirty-hack gets the job done for right now. 991 // quick-and-dirty-hack gets the job done for right now.
991 updateView(); 992 updateView();
992} 993}
993 994
994void KOMonthView::updateView() 995void KOMonthView::updateView()
995{ 996{
996 997
997 if ( !updatePossible ) 998 if ( !updatePossible )
998 return; 999 return;
999 //QTime ti; 1000 //QTime ti;
1000 //ti.start(); 1001 //ti.start();
1001#if 1 1002#if 1
1002 int i; 1003 int i;
1003 int timeSpan = mCells.size()-1; 1004 int timeSpan = mCells.size()-1;
1004 if ( KOPrefs::instance()->mMonthViewWeek ) 1005 if ( KOPrefs::instance()->mMonthViewWeek )
1005 timeSpan = 6; 1006 timeSpan = 6;
1006 for( i = 0; i < timeSpan + 1; ++i ) { 1007 for( i = 0; i < timeSpan + 1; ++i ) {
1007 mCells[i]->startUpdateCell(); 1008 mCells[i]->startUpdateCell();
1008 } 1009 }
1009 1010
1010 QPtrList<Event> events = calendar()->events(); 1011 QPtrList<Event> events = calendar()->events();
1011 Event *event; 1012 Event *event;
1012 QDateTime dt; 1013 QDateTime dt;
1013 bool ok; 1014 bool ok;
1014 QDate endDate = mStartDate.addDays( timeSpan ); 1015 QDate endDate = mStartDate.addDays( timeSpan );
1015 for( event = events.first(); event; event = events.next() ) { // for event 1016 for( event = events.first(); event; event = events.next() ) { // for event
1016 if ( event->doesRecur() ) { 1017 if ( event->doesRecur() ) {
1017 bool last; 1018 bool last;
1018 QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); 1019 QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last );
1019 QDateTime incidenceEnd; 1020 QDateTime incidenceEnd;
1020 int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); 1021 int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() );
1021 bool invalid = false; 1022 bool invalid = false;
1022 while( true ) { 1023 while( true ) {
1023 if ( incidenceStart.isValid() ) { 1024 if ( incidenceStart.isValid() ) {
1024 incidenceEnd = incidenceStart.addDays( eventlen ); 1025 incidenceEnd = incidenceStart.addDays( eventlen );
1025 int st = incidenceStart.date().daysTo( endDate ); 1026 int st = incidenceStart.date().daysTo( endDate );
1026 if ( st >= 0 ) { // start before timeend 1027 if ( st >= 0 ) { // start before timeend
1027 int end = mStartDate.daysTo( incidenceEnd.date() ); 1028 int end = mStartDate.daysTo( incidenceEnd.date() );
1028 if ( end >= 0 ) { // end after timestart --- got one! 1029 if ( end >= 0 ) { // end after timestart --- got one!
1029 //normalize 1030 //normalize
1030 st = timeSpan - st; 1031 st = timeSpan - st;
1031 if ( st < 0 ) st = 0; 1032 if ( st < 0 ) st = 0;
1032 if ( end > timeSpan ) end = timeSpan; 1033 if ( end > timeSpan ) end = timeSpan;
1033 int iii; 1034 int iii;
1034 //qDebug("found %s %d %d ",event->summary().latin1(), st, end ); 1035 //qDebug("found %s %d %d ",event->summary().latin1(), st, end );
1035 for ( iii = st;iii<= end;++iii) 1036 for ( iii = st;iii<= end;++iii)
1036 mCells[iii]->insertEvent( event ); 1037 mCells[iii]->insertEvent( event );
1037 } 1038 }
1038 } 1039 }
1039 } else { 1040 } else {
1040 if ( invalid ) 1041 if ( invalid )
1041 break; 1042 break;
1042 invalid = true; 1043 invalid = true;
1043 //qDebug("invalid %s", event->summary().latin1()); 1044 //qDebug("invalid %s", event->summary().latin1());
1044 incidenceStart = QDateTime( mStartDate ); 1045 incidenceStart = QDateTime( mStartDate );
1045 } 1046 }
1046 if ( last ) 1047 if ( last )
1047 break; 1048 break;
1048 bool ok; 1049 bool ok;
1049 incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); 1050 incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok );
1050 if ( ! ok ) 1051 if ( ! ok )
1051 break; 1052 break;
1052 if ( incidenceStart.date() > endDate ) 1053 if ( incidenceStart.date() > endDate )
1053 break; 1054 break;
1054 } 1055 }
1055 } else { // no recur 1056 } else { // no recur
1056 int st = event->dtStart().date().daysTo( endDate ); 1057 int st = event->dtStart().date().daysTo( endDate );
1057 if ( st >= 0 ) { // start before timeend 1058 if ( st >= 0 ) { // start before timeend
1058 int end = mStartDate.daysTo( event->dtEnd().date() ); 1059 int end = mStartDate.daysTo( event->dtEnd().date() );
1059 if ( end >= 0 ) { // end after timestart --- got one! 1060 if ( end >= 0 ) { // end after timestart --- got one!
1060 //normalize 1061 //normalize
1061 st = timeSpan - st; 1062 st = timeSpan - st;
1062 if ( st < 0 ) st = 0; 1063 if ( st < 0 ) st = 0;
1063 if ( end > timeSpan ) end = timeSpan; 1064 if ( end > timeSpan ) end = timeSpan;
1064 int iii; 1065 int iii;
1065 for ( iii = st;iii<= end;++iii) 1066 for ( iii = st;iii<= end;++iii)
1066 mCells[iii]->insertEvent( event ); 1067 mCells[iii]->insertEvent( event );
1067 } 1068 }
1068 } 1069 }
1069 } 1070 }
1070 } 1071 }
1071 // insert due todos 1072 // insert due todos
1072 QPtrList<Todo> todos = calendar()->todos( ); 1073 QPtrList<Todo> todos = calendar()->todos( );
1073 Todo *todo; 1074 Todo *todo;
1074 for(todo = todos.first(); todo; todo = todos.next()) { 1075 for(todo = todos.first(); todo; todo = todos.next()) {
1075 //insertTodo( todo ); 1076 //insertTodo( todo );
1076 if ( todo->hasDueDate() ) { 1077 if ( todo->hasDueDate() ) {
1077 int day = mStartDate.daysTo( todo->dtDue().date() ); 1078 int day = mStartDate.daysTo( todo->dtDue().date() );
1078 if ( day >= 0 && day < timeSpan + 1) { 1079 if ( day >= 0 && day < timeSpan + 1) {
1079 mCells[day]->insertTodo( todo ); 1080 mCells[day]->insertTodo( todo );
1080 } 1081 }
1081 } 1082 }
1082 } 1083 }
1083 1084
1084 for( i = 0; i < timeSpan+1; ++i ) { 1085 for( i = 0; i < timeSpan+1; ++i ) {
1085 mCells[i]->finishUpdateCell(); 1086 mCells[i]->finishUpdateCell();
1086 } 1087 }
1087 processSelectionChange(); 1088 processSelectionChange();
1088 mCells[0]->setFocus(); 1089 mCells[0]->setFocus();
1089 1090
1090 1091
1091#else 1092#else
1092 // old code 1093 // old code
1093 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); 1094 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
1094 int i; 1095 int i;
1095 for( i = 0; i < mCells.count(); ++i ) { 1096 for( i = 0; i < mCells.count(); ++i ) {
1096 mCells[i]->updateCell(); 1097 mCells[i]->updateCell();
1097 } 1098 }
1098 1099
1099 //qDebug("KOMonthView::updateView() "); 1100 //qDebug("KOMonthView::updateView() ");
1100 processSelectionChange(); 1101 processSelectionChange();
1101 // qDebug("---------------------------------------------------------------------+ "); 1102 // qDebug("---------------------------------------------------------------------+ ");
1102 mCells[0]->setFocus(); 1103 mCells[0]->setFocus();
1103#endif 1104#endif
1104 1105
1105 //qDebug("update time %d ", ti.elapsed()); 1106 //qDebug("update time %d ", ti.elapsed());
1106} 1107}
1107 1108
1108void KOMonthView::resizeEvent(QResizeEvent * e) 1109void KOMonthView::resizeEvent(QResizeEvent * e)
1109{ 1110{
1110 computeLayout(); 1111 computeLayout();
1111 mCells[0]->setFocus(); 1112 mCells[0]->setFocus();
1112} 1113}
1113void KOMonthView::computeLayoutWeek() 1114void KOMonthView::computeLayoutWeek()
1114{ 1115{
1115 1116
1116 int daysToShow; 1117 int daysToShow;
1117 bool combinedSatSun = false; 1118 bool combinedSatSun = false;
1118 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1119 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1119 daysToShow = 6; 1120 daysToShow = 6;
1120 combinedSatSun = true; 1121 combinedSatSun = true;
1121 } 1122 }
1122 int tWid = topLevelWidget()->size().width(); 1123 int tWid = topLevelWidget()->size().width();
1123 int tHei = topLevelWidget()->size().height(); 1124 int tHei = topLevelWidget()->size().height();
1124 1125
1125 int wid = size().width();//e 1126 int wid = size().width();//e
1126 int hei = size().height()-1; 1127 int hei = size().height()-1;
1127 1128
1128 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) 1129 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
1129 return; 1130 return;
1130 1131
1131 if ( wid < hei ) 1132 if ( wid < hei )
1132 daysToShow = 2; 1133 daysToShow = 2;
1133 else 1134 else
1134 daysToShow = 3; 1135 daysToShow = 3;
1135 mShowSatSunComp = true; 1136 mShowSatSunComp = true;
1136 combinedSatSun = true; 1137 combinedSatSun = true;
1137 1138
1138 //qDebug("KOMonthView::computeLayout()------------------------------------ "); 1139 //qDebug("KOMonthView::computeLayout()------------------------------------ ");
1139 QFontMetrics fm ( mWeekLabels[0]->font() ); 1140 QFontMetrics fm ( mWeekLabels[0]->font() );
1140 int weeklabelwid = fm.width( "888" ); 1141 int weeklabelwid = fm.width( "888" );
1141 wid -= weeklabelwid; 1142 wid -= weeklabelwid;
1142 1143
1143 int colWid = wid / daysToShow; 1144 int colWid = wid / daysToShow;
1144 int lastCol = wid - ( colWid*6 ); 1145 int lastCol = wid - ( colWid*6 );
1145 int dayLabelHei = mDayLabels[0]->sizeHint().height(); 1146 int dayLabelHei = mDayLabels[0]->sizeHint().height();
1146 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow ); 1147 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
1147 int colModulo = wid % daysToShow; 1148 int colModulo = wid % daysToShow;
1148 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1; 1149 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1;
1149 //qDebug("rowmod %d ", rowModulo); 1150 //qDebug("rowmod %d ", rowModulo);
1150 int i; 1151 int i;
1151 int x,y,w,h; 1152 int x,y,w,h;
1152 x= 0; 1153 x= 0;
1153 y= 0; 1154 y= 0;
1154 w = colWid; 1155 w = colWid;
1155 h = dayLabelHei ; 1156 h = dayLabelHei ;
1156 for ( i = 0; i < 7; i++) { 1157 for ( i = 0; i < 7; i++) {
1157 if ( i && !( i % daysToShow) && i < 6) { 1158 if ( i && !( i % daysToShow) && i < 6) {
1158 y += hei/(5-daysToShow); 1159 y += hei/(5-daysToShow);
1159 x = 0; 1160 x = 0;
1160 w = colWid; 1161 w = colWid;
1161 } 1162 }
1162 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1163 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1163 ++w; 1164 ++w;
1164 } 1165 }
1165 if ( i >= 5 ) { 1166 if ( i >= 5 ) {
1166 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h); 1167 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
1167 x -= (w/2 ); 1168 x -= (w/2 );
1168 } 1169 }
1169 else 1170 else
1170 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1171 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1171 x += w; 1172 x += w;
1172 } 1173 }
1173 x= 0; 1174 x= 0;
1174 y= dayLabelHei; 1175 y= dayLabelHei;
1175 w = colWid; 1176 w = colWid;
1176 h = cellHei; 1177 h = cellHei;
1177 for ( i = 0; i < mCells.count(); ++i) { 1178 for ( i = 0; i < mCells.count(); ++i) {
1178 if ( i > 6 ) { 1179 if ( i > 6 ) {
1179 mCells[i]->hide(); 1180 mCells[i]->hide();
1180 continue; 1181 continue;
1181 } 1182 }
1182 1183
1183 w = colWid; 1184 w = colWid;
1184 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1185 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1185 ++w; 1186 ++w;
1186 } 1187 }
1187 if ( i == (daysToShow-1-rowModulo)*7) 1188 if ( i == (daysToShow-1-rowModulo)*7)
1188 ++h; 1189 ++h;
1189 1190
1190 if ( i >= 5 ) { 1191 if ( i >= 5 ) {
1191 if ( i ==5 ) { 1192 if ( i ==5 ) {
1192 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1193 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
1193 x -= w ;y += h/2; 1194 x -= w ;y += h/2;
1194 } else { 1195 } else {
1195 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) { 1196 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) {
1196 ++w; 1197 ++w;
1197 } 1198 }
1198 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1199 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
1199 y -= h/2; 1200 y -= h/2;
1200 } 1201 }
1201 } else 1202 } else
1202 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1203 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1203 1204
1204 1205
1205 x += w; 1206 x += w;
1206 if ( x + w/2 > wid ) { 1207 if ( x + w/2 > wid ) {
1207 x = 0; 1208 x = 0;
1208 y += h+dayLabelHei ; 1209 y += h+dayLabelHei ;
1209 } 1210 }
1210 } 1211 }
1211 y= dayLabelHei; 1212 y= dayLabelHei;
1212 h = cellHei ; 1213 h = cellHei ;
1213 mWeekLabels[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); 1214 mWeekLabels[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei);
1214 for ( i = 1; i < 6; i++) { 1215 for ( i = 1; i < 6; i++) {
1215 mWeekLabels[i]->hide(); 1216 mWeekLabels[i]->hide();
1216 } 1217 }
1217 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1218 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1218 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1219 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1219 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1220 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1220 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; 1221 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ;
1221 updateDayLabels(); 1222 updateDayLabels();
1222 bool forceUpdate = !updatePossible; 1223 bool forceUpdate = !updatePossible;
1223 updatePossible = true; 1224 updatePossible = true;
1224 mWeekLabels[mNumWeeks]->setText( i18n("M")); 1225 mWeekLabels[mNumWeeks]->setText( i18n("M"));
1225 if ( forceUpdate ) 1226 if ( forceUpdate )
1226 updateView(); 1227 updateView();
1227} 1228}
1228void KOMonthView::computeLayout() 1229void KOMonthView::computeLayout()
1229{ 1230{
1230 // select the appropriate heading string size. E.g. "Wednesday" or "Wed". 1231 // select the appropriate heading string size. E.g. "Wednesday" or "Wed".
1231 // note this only changes the text if the requested size crosses the 1232 // note this only changes the text if the requested size crosses the
1232 // threshold between big enough to support the full name and not big 1233 // threshold between big enough to support the full name and not big
1233 // enough. 1234 // enough.
1234 if ( mShowWeekView ){ 1235 if ( mShowWeekView ){
1235 computeLayoutWeek(); 1236 computeLayoutWeek();
1236 return; 1237 return;
1237 } 1238 }
1238 int daysToShow = 7; 1239 int daysToShow = 7;
1239 bool combinedSatSun = false; 1240 bool combinedSatSun = false;
1240 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1241 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1241 daysToShow = 6; 1242 daysToShow = 6;
1242 combinedSatSun = true; 1243 combinedSatSun = true;
1243 } 1244 }
1244 int tWid = topLevelWidget()->size().width(); 1245 int tWid = topLevelWidget()->size().width();
1245 int tHei = topLevelWidget()->size().height(); 1246 int tHei = topLevelWidget()->size().height();
1246 1247
1247 int wid = size().width();//e 1248 int wid = size().width();//e
1248 int hei = size().height()-1; 1249 int hei = size().height()-1;
1249 1250
1250 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) 1251 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
1251 return; 1252 return;
1252 //qDebug("KOMonthView::computeLayout()------------------------------------ "); 1253 //qDebug("KOMonthView::computeLayout()------------------------------------ ");
1253 QFontMetrics fm ( mWeekLabels[0]->font() ); 1254 QFontMetrics fm ( mWeekLabels[0]->font() );
1254 int weeklabelwid = fm.width( "888" ); 1255 int weeklabelwid = fm.width( "888" );
1255 wid -= weeklabelwid; 1256 wid -= weeklabelwid;
1256 1257
1257 int colWid = wid / daysToShow; 1258 int colWid = wid / daysToShow;
1258 int lastCol = wid - ( colWid*6 ); 1259 int lastCol = wid - ( colWid*6 );
1259 int dayLabelHei = mDayLabels[0]->sizeHint().height(); 1260 int dayLabelHei = mDayLabels[0]->sizeHint().height();
1260 int cellHei = (hei - dayLabelHei) /6; 1261 int cellHei = (hei - dayLabelHei) /6;
1261 int colModulo = wid % daysToShow; 1262 int colModulo = wid % daysToShow;
1262 int rowModulo = (hei- dayLabelHei) % 6; 1263 int rowModulo = (hei- dayLabelHei) % 6;
1263 //qDebug("rowmod %d ", rowModulo); 1264 //qDebug("rowmod %d ", rowModulo);
1264 int i; 1265 int i;
1265 int x,y,w,h; 1266 int x,y,w,h;
1266 x= 0; 1267 x= 0;
1267 y= 0; 1268 y= 0;
1268 w = colWid; 1269 w = colWid;
1269 h = dayLabelHei ; 1270 h = dayLabelHei ;
1270 for ( i = 0; i < 7; i++) { 1271 for ( i = 0; i < 7; i++) {
1271 if ( i == daysToShow-colModulo ) 1272 if ( i == daysToShow-colModulo )
1272 ++w; 1273 ++w;
1273 if ( combinedSatSun ) { 1274 if ( combinedSatSun ) {
1274 if ( i >= daysToShow-1 ) { 1275 if ( i >= daysToShow-1 ) {
1275 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h); 1276 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
1276 x -= w/2 ; 1277 x -= w/2 ;
1277 } 1278 }
1278 else 1279 else
1279 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1280 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1280 } else 1281 } else
1281 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1282 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1282 x += w; 1283 x += w;
1283 } 1284 }
1284 x= 0; 1285 x= 0;
1285 y= dayLabelHei; 1286 y= dayLabelHei;
1286 w = colWid; 1287 w = colWid;
1287 h = cellHei ; 1288 h = cellHei ;
1288 for ( i = 0; i < mCells.count(); ++i) { 1289 for ( i = 0; i < mCells.count(); ++i) {
1289 mCells[i]->show(); 1290 mCells[i]->show();
1290 w = colWid; 1291 w = colWid;
1291 if ( ((i) % 7) >= 7-colModulo ) { 1292 if ( ((i) % 7) >= 7-colModulo ) {
1292 ++w; 1293 ++w;
1293 } 1294 }
1294 if ( i == (6-rowModulo)*7) 1295 if ( i == (6-rowModulo)*7)
1295 ++h; 1296 ++h;
1296 if ( combinedSatSun ) { 1297 if ( combinedSatSun ) {
1297 if ( (i)%7 >= daysToShow-1 ) { 1298 if ( (i)%7 >= daysToShow-1 ) {
1298 if ( (i)%7 == daysToShow-1 ) { 1299 if ( (i)%7 == daysToShow-1 ) {
1299 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1300 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
1300 x -= w ;y += h/2; 1301 x -= w ;y += h/2;
1301 } else { 1302 } else {
1302 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1303 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
1303 y -= h/2; 1304 y -= h/2;
1304 } 1305 }
1305 } else 1306 } else
1306 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1307 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1307 1308
1308 } 1309 }
1309 else 1310 else
1310 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1311 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1311 x += w; 1312 x += w;
1312 if ( x + w/2 > wid ) { 1313 if ( x + w/2 > wid ) {
1313 x = 0; 1314 x = 0;
1314 y += h; 1315 y += h;
1315 } 1316 }
1316 } 1317 }
1317 y= dayLabelHei; 1318 y= dayLabelHei;
1318 h = cellHei ; 1319 h = cellHei ;
1319 for ( i = 0; i < 6; i++) { 1320 for ( i = 0; i < 6; i++) {
1320 mWeekLabels[i]->show(); 1321 mWeekLabels[i]->show();
1321 if ( i == (6-rowModulo)) 1322 if ( i == (6-rowModulo))
1322 ++h; 1323 ++h;
1323 mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h); 1324 mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h);
1324 y += h; 1325 y += h;
1325 } 1326 }
1326 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1327 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1327 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1328 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1328 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1329 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1329 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; 1330 mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ;
1330 updateDayLabels(); 1331 updateDayLabels();
1331 bool forceUpdate = !updatePossible; 1332 bool forceUpdate = !updatePossible;
1332 updatePossible = true; 1333 updatePossible = true;
1333 mWeekLabels[mNumWeeks]->setText( i18n("W")); 1334 mWeekLabels[mNumWeeks]->setText( i18n("W"));
1334 if ( forceUpdate ) 1335 if ( forceUpdate )
1335 updateView(); 1336 updateView();
1336} 1337}
1337 1338
1338void KOMonthView::showContextMenu( Incidence *incidence ) 1339void KOMonthView::showContextMenu( Incidence *incidence )
1339{ 1340{
1340 mContextMenu->showIncidencePopup(incidence); 1341 mContextMenu->showIncidencePopup(incidence);
1341 /* 1342 /*
1342 if( incidence && incidence->type() == "Event" ) { 1343 if( incidence && incidence->type() == "Event" ) {
1343 Event *event = static_cast<Event *>(incidence); 1344 Event *event = static_cast<Event *>(incidence);
1344 mContextMenu->showEventPopup(event); 1345 mContextMenu->showEventPopup(event);
1345 } else { 1346 } else {
1346 kdDebug() << "MonthView::showContextMenu(): cast failed." << endl; 1347 kdDebug() << "MonthView::showContextMenu(): cast failed." << endl;
1347 } 1348 }
1348 */ 1349 */
1349} 1350}
1350MonthViewCell * KOMonthView::selectedCell( ) 1351MonthViewCell * KOMonthView::selectedCell( )
1351{ 1352{
1352 return mSelectedCell; 1353 return mSelectedCell;
1353} 1354}
1354void KOMonthView::setSelectedCell( MonthViewCell *cell ) 1355void KOMonthView::setSelectedCell( MonthViewCell *cell )
1355{ 1356{
1356 // qDebug("KOMonthView::setSelectedCell "); 1357 // qDebug("KOMonthView::setSelectedCell ");
1357 if ( mSelectedCell && mSelectedCell != cell ) { 1358 if ( mSelectedCell && mSelectedCell != cell ) {
1358 MonthViewCell * mvc = mSelectedCell; 1359 MonthViewCell * mvc = mSelectedCell;
1359 mSelectedCell = cell; 1360 mSelectedCell = cell;
1360 mvc->deselect(); 1361 mvc->deselect();
1361 } else 1362 } else
1362 mSelectedCell = cell; 1363 mSelectedCell = cell;
1363 // if ( mSelectedCell ) 1364 // if ( mSelectedCell )
1364 // mSelectedCell->select(); 1365 // mSelectedCell->select();
1365 if ( !mSelectedCell ) 1366 if ( !mSelectedCell )
1366 emit incidenceSelected( 0 ); 1367 emit incidenceSelected( 0 );
1367 else 1368 else
1368 emit incidenceSelected( mSelectedCell->selectedIncidence() ); 1369 emit incidenceSelected( mSelectedCell->selectedIncidence() );
1369} 1370}
1370 1371
1371void KOMonthView::processSelectionChange() 1372void KOMonthView::processSelectionChange()
1372{ 1373{
1373 QPtrList<Incidence> incidences = selectedIncidences(); 1374 QPtrList<Incidence> incidences = selectedIncidences();
1374 if (incidences.count() > 0) { 1375 if (incidences.count() > 0) {
1375 emit incidenceSelected( incidences.first() ); 1376 emit incidenceSelected( incidences.first() );
1376 } else { 1377 } else {
1377 emit incidenceSelected( 0 ); 1378 emit incidenceSelected( 0 );
1378 } 1379 }
1379} 1380}
1380 1381
1381void KOMonthView::clearSelection() 1382void KOMonthView::clearSelection()
1382{ 1383{
1383 if ( mSelectedCell ) { 1384 if ( mSelectedCell ) {
1384 mSelectedCell->deselect(); 1385 mSelectedCell->deselect();
1385 mSelectedCell = 0; 1386 mSelectedCell = 0;
1386 } 1387 }
1387} 1388}
1388void KOMonthView::keyPressEvent ( QKeyEvent * e ) 1389void KOMonthView::keyPressEvent ( QKeyEvent * e )
1389{ 1390{
1390 //qDebug("KOMonthView::keyPressEvent "); 1391 //qDebug("KOMonthView::keyPressEvent ");
1391 switch(e->key()) { 1392 switch(e->key()) {
1392 case Key_Up: 1393 case Key_Up:
1393 { 1394 {
1394 emit prevMonth(); 1395 emit prevMonth();
1395 mCells[0]->setFocus(); 1396 mCells[0]->setFocus();
1396 } 1397 }
1397 e->accept(); 1398 e->accept();
1398 break; 1399 break;
1399 case Key_Down: 1400 case Key_Down:
1400 { 1401 {
1401 emit nextMonth(); 1402 emit nextMonth();
1402 mCells[0]->setFocus(); 1403 mCells[0]->setFocus();
1403 1404
1404 } 1405 }
1405 e->accept(); 1406 e->accept();
1406 break; 1407 break;
1407 default: 1408 default:
1408 e->ignore(); 1409 e->ignore();
1409 break; 1410 break;
1410 } 1411 }
1411} 1412}