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