summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-23 15:44:48 (UTC)
committer zautrix <zautrix>2005-01-23 15:44:48 (UTC)
commitabe5f73892c123110faec5648b484628b3265fd6 (patch) (unidiff)
tree8619e09ffbeb3b5ef9302a8bcb39092b426d3e43
parent6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452 (diff)
downloadkdepimpi-abe5f73892c123110faec5648b484628b3265fd6.zip
kdepimpi-abe5f73892c123110faec5648b484628b3265fd6.tar.gz
kdepimpi-abe5f73892c123110faec5648b484628b3265fd6.tar.bz2
bter today
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt7
-rw-r--r--korganizer/koagendaview.cpp18
2 files changed, 21 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index adbfd67..5bfe1c8 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,785 +1,786 @@
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 1.9.20 ************ 3********** VERSION 1.9.20 ************
4 4
5KO/Pi: 5KO/Pi:
6Added for the "dislplay one day" agenda mode
7info in the caption and in the day lables:
8Now it is displayed, if the selected day is from "day before yesterday"
9to "day after tomorrow".
6Made it possible to delete a Todo, which has sub-todos. 10Made it possible to delete a Todo, which has sub-todos.
7Fixed two small problems in the todo view. 11Fixed two small problems in the todo view.
8Added missing German translation for filter edit and print dialog. 12Added missing German translation for filter edit and print dialog.
9Made search dialog closeable by cancel key. 13Made search dialog closeable by cancel key.
10 14
11Made it possible to select in the date picker the (ligt grey ) 15Made it possible to select in the date picker the (ligt grey )
12dates of the prev./next month with the mouse. 16dates of the prev./next month with the mouse.
13 17
14Added for the "dislplay one day" agenda mode info in the caption:
15Now it is displayed, if the selected day is from "day before yesterday"
16to "day after tomorrow".
17 18
18 19
19 20
20********** VERSION 1.9.19 ************ 21********** VERSION 1.9.19 ************
21 22
22Added a lot of missing translations to KA/Pi, 23Added a lot of missing translations to KA/Pi,
23Added some missing translations to KO/Pi and OM/Pi. 24Added some missing translations to KO/Pi and OM/Pi.
24 25
25Fixed some minor problems in KA/Pi + KO/Pi. 26Fixed some minor problems in KA/Pi + KO/Pi.
26 27
27Fixed a crash when closing PwM/Pi. 28Fixed a crash when closing PwM/Pi.
28Added German translation for PwM/Pi. 29Added German translation for PwM/Pi.
29 30
30Made view change and Month View update faster in KO/Pi. 31Made view change and Month View update faster in KO/Pi.
31 32
32 33
33********** VERSION 1.9.18 ************ 34********** VERSION 1.9.18 ************
34 35
35FYI: The VERSION 1.9.17 was a testing release only. 36FYI: The VERSION 1.9.17 was a testing release only.
36Please read the changelog of VERSION 1.9.17 as well. 37Please read the changelog of VERSION 1.9.17 as well.
37 38
38Cleaned up the syncing config dialog. 39Cleaned up the syncing config dialog.
39Added sync config options for date range for events. 40Added sync config options for date range for events.
40Added sync config options for filters on incoming data. 41Added sync config options for filters on incoming data.
41Added sync config options for filters on outgoing data. 42Added sync config options for filters on outgoing data.
42Please read the updated SyncHowTo about the new filter settings. 43Please read the updated SyncHowTo about the new filter settings.
43These filter settings make it now possible to sync with shared 44These filter settings make it now possible to sync with shared
44calendars without writing back private or confidential data 45calendars without writing back private or confidential data
45(via the outgoing filters). 46(via the outgoing filters).
46To sync only with particular parts of a shared calendar, 47To sync only with particular parts of a shared calendar,
47the incoming filter settings can be used. 48the incoming filter settings can be used.
48An example can be found in the SyncHowTo. 49An example can be found in the SyncHowTo.
49Same for shared addressbooks. 50Same for shared addressbooks.
50 51
51Added a setting for the global kdepim data storage. 52Added a setting for the global kdepim data storage.
52Usually the data is stored in (yourhomedir/kdepim). 53Usually the data is stored in (yourhomedir/kdepim).
53Now you can set in the Global config dialog TAB, subTAB "Data storage path" 54Now you can set in the Global config dialog TAB, subTAB "Data storage path"
54a directory where all the kdepim data is stored. 55a directory where all the kdepim data is stored.
55That makes it easy to save all kdepim data on a SD card on the Z, for example. 56That makes it easy to save all kdepim data on a SD card on the Z, for example.
56 57
57KO/Pi: 58KO/Pi:
58The timeedit input has a pulldown list for times. 59The timeedit input has a pulldown list for times.
59If opened, this pulldown list should now has the right time highlighted. 60If opened, this pulldown list should now has the right time highlighted.
60Added the possibility to exclude events/todos/journals in a filter. 61Added the possibility to exclude events/todos/journals in a filter.
61You should exclude journals, if you do not want them to sync with a public calendar. 62You should exclude journals, if you do not want them to sync with a public calendar.
62 63
63KA/Pi: 64KA/Pi:
64Added the possibility to in/exclude public/private/confidential contacts to a filter. 65Added the possibility to in/exclude public/private/confidential contacts to a filter.
65If 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 ... 66If 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 ...
66Added printing of card view and details view on desktop. 67Added printing of card view and details view on desktop.
67Printing of list view is not working... 68Printing of list view is not working...
68Added button for removing pictures in contact editor. 69Added button for removing pictures in contact editor.
69Parsing data fix of KA/Pi version 1.9.17. 70Parsing data fix of KA/Pi version 1.9.17.
70Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 71Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
71Fixed some syncing merging problems. 72Fixed some syncing merging problems.
72 73
73 74
74********** VERSION 1.9.17 ************ 75********** VERSION 1.9.17 ************
75 76
76KO/Pi: 77KO/Pi:
77Fixed that tooltips were not updated after moving an item in agenda view. 78Fixed that tooltips were not updated after moving an item in agenda view.
78Fixed a bug in sorting start date for recurring events in list view. 79Fixed a bug in sorting start date for recurring events in list view.
79Changed the left button in todo viewer from "Agenda" to "Set completed". 80Changed the left button in todo viewer from "Agenda" to "Set completed".
80This 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. 81This 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.
81Added more info in the todo viewer: Startdate, parent/sub todos. 82Added more info in the todo viewer: Startdate, parent/sub todos.
82 83
83 84
84KA/Pi: 85KA/Pi:
85All fields search does now actually search all the (possible) fields, 86All fields search does now actually search all the (possible) fields,
86not only those listed in the contact list. 87not only those listed in the contact list.
87Made is possible to inline a picture in a vcard on the Z. 88Made is possible to inline a picture in a vcard on the Z.
88This was only possible on the desktop, now is it possible on the Z as well. 89This was only possible on the desktop, now is it possible on the Z as well.
89Fixed of missing save settings after filter configuration. 90Fixed of missing save settings after filter configuration.
90Made saving of addressbook much faster. 91Made saving of addressbook much faster.
91Fixed extension widget layout problem. 92Fixed extension widget layout problem.
92Fixed saving of default formatted name settings. 93Fixed saving of default formatted name settings.
93Fixed formatted name handling in edit dialog. 94Fixed formatted name handling in edit dialog.
94Added an option for changing formatted names of many contacts 95Added an option for changing formatted names of many contacts
95(menu: File - Change - Set formatted name). 96(menu: File - Change - Set formatted name).
96 97
97QWhatsThis was not working on the Z ( only black rectangle was shown). 98QWhatsThis was not working on the Z ( only black rectangle was shown).
98This is Fixed. 99This is Fixed.
99 100
100KDE-Sync: 101KDE-Sync:
101Now readonly KDE resources are synced as well. 102Now readonly KDE resources are synced as well.
102(They are not changed in KDE itself, of course). 103(They are not changed in KDE itself, of course).
103 104
104 105
105 106
106********** VERSION 1.9.16 ************ 107********** VERSION 1.9.16 ************
107 108
108KO/Pi: 109KO/Pi:
109Fixed search dialog size on Z 6000 (480x640 display). 110Fixed search dialog size on Z 6000 (480x640 display).
110Added setting to hide/show time in agenda items. 111Added setting to hide/show time in agenda items.
111Added setting to hide not running todos in todo view. 112Added setting to hide not running todos in todo view.
112Added columns for start date/time in todo view. 113Added columns for start date/time in todo view.
113Replaced the solid half-hour lines in agenda view by dot lines. 114Replaced the solid half-hour lines in agenda view by dot lines.
114Added possibility of printing the What's Next View on the desktop 115Added possibility of printing the What's Next View on the desktop
115(i.e. Windows and Linux). 116(i.e. Windows and Linux).
116Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 117Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
117Added tooltips in month view.(Tooltips only available on desktop) 118Added tooltips in month view.(Tooltips only available on desktop)
118 119
119Fixed a strange problem in KO/Pi alarm applet. 120Fixed a strange problem in KO/Pi alarm applet.
120Did not find the actual problem, 121Did not find the actual problem,
121such that now Qtopia reboots again if deinstalling the alarm applet. 122such that now Qtopia reboots again if deinstalling the alarm applet.
122But the alarm applet should work again. 123But the alarm applet should work again.
123 124
124KA/Pi: 125KA/Pi:
125Fixed the problem, that internal pictures were not saved. 126Fixed the problem, that internal pictures were not saved.
126 127
127Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 128Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
128 129
129Fixed some minor problems. (Like word wrap in help text windows). 130Fixed some minor problems. (Like word wrap in help text windows).
130 131
131Fixed a compiling problem in microkde/kresources. 132Fixed a compiling problem in microkde/kresources.
132 133
133KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 134KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
134This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 135This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
135such that now syncing KO/Pi with Sharp DTM should work on the 136such that now syncing KO/Pi with Sharp DTM should work on the
136Zaurus C 3000 model. 137Zaurus C 3000 model.
137 138
138********** VERSION 1.9.15 ************ 139********** VERSION 1.9.15 ************
139 140
140Usebilty enhancements in KO/Pi: 141Usebilty enhancements in KO/Pi:
141When clicking on the date in a month view cell, the day view is shown. 142When clicking on the date in a month view cell, the day view is shown.
142Old behaviour was, that the "new event" dialog popped up. 143Old behaviour was, that the "new event" dialog popped up.
143 144
144Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 145Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
145That means, you can restore the latest 146That means, you can restore the latest
146event/todo/journal you have deleted. 147event/todo/journal you have deleted.
147A journal is deleted, if you clear all the text of the journal. 148A journal is deleted, if you clear all the text of the journal.
148 149
149Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 150Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
150 151
151KA/Pi starting in 480x640 resolution: 152KA/Pi starting in 480x640 resolution:
152Hide the filter action in toolbar 153Hide the filter action in toolbar
153and added icons for undo/delete/redo in toolbar. 154and added icons for undo/delete/redo in toolbar.
154 155
155Change in OM/Pi ViewMail dialog: 156Change in OM/Pi ViewMail dialog:
156When clicking on the "delete" icon the mail is deleted after confirmation as usual. 157When clicking on the "delete" icon the mail is deleted after confirmation as usual.
157But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 158But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
158 159
159Fixed a crash when deleting mail-accounts in OM/Pi. 160Fixed a crash when deleting mail-accounts in OM/Pi.
160 161
161 162
162********** VERSION 1.9.14 ************ 163********** VERSION 1.9.14 ************
163 164
164Fixed some problems with the dialog sizes when switching 165Fixed some problems with the dialog sizes when switching
165portrait/landscape mode on 640x480 PDA display. 166portrait/landscape mode on 640x480 PDA display.
166 167
167Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 168Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
168 169
169Fixed an ugly bug in KOpieMail: 170Fixed an ugly bug in KOpieMail:
170KOpieMail was not able to write files (mails) to MSDOS file system, 171KOpieMail was not able to write files (mails) to MSDOS file system,
171like on an usual preformatted SD card. That should work now. 172like on an usual preformatted SD card. That should work now.
172To save your mail data on the Sd card do the following: 173To save your mail data on the Sd card do the following:
173Create a dir on the SD card: 174Create a dir on the SD card:
174mkdir /mnt/card/localmail 175mkdir /mnt/card/localmail
175Go to your home dir: 176Go to your home dir:
176cd 177cd
177Go to kopiemail data storage dir: 178Go to kopiemail data storage dir:
178cd kdepim/apps/kopiemail 179cd kdepim/apps/kopiemail
179Create a symlink to the SD card: 180Create a symlink to the SD card:
180ls -s /mnt/card/localmail 181ls -s /mnt/card/localmail
181Now KOpieMail will store all mails on the SD card. 182Now KOpieMail will store all mails on the SD card.
182 183
183KO/Pi Monthview: 184KO/Pi Monthview:
184Now "Go to Today" selects the current month from day 1-end, 185Now "Go to Today" selects the current month from day 1-end,
185not the current date + some days. 186not the current date + some days.
186I.e. "Go to Today" shows now always 187I.e. "Go to Today" shows now always
187the current month with first day of month in the first row. 188the current month with first day of month in the first row.
188 189
189Added missing German translation. 190Added missing German translation.
190 191
191Fixed icons of executeable on Wintendo. 192Fixed icons of executeable on Wintendo.
192 193
193Added a "Show next Mail" button to the OM/Pi 194Added a "Show next Mail" button to the OM/Pi
194mail viewer such that the mail below the current mail 195mail viewer such that the mail below the current mail
195in the mail list view of the current folder 196in the mail list view of the current folder
196can be read with a single click. 197can be read with a single click.
197 198
198 199
199********** VERSION 1.9.13 ************ 200********** VERSION 1.9.13 ************
200 201
201Fixed nasty PwM/Pi file reading bug, when 202Fixed nasty PwM/Pi file reading bug, when
202the used hash algo of file is different then the global 203the used hash algo of file is different then the global
203hash algo. 204hash algo.
204 205
205Added KA/Pi support for opie mailit mailapplication. 206Added KA/Pi support for opie mailit mailapplication.
206 207
207Fixed some bugs in OM/Pi. 208Fixed some bugs in OM/Pi.
208Now character conversion tables are available for the Zaurus 209Now character conversion tables are available for the Zaurus
209to make OM/Pi working properly. 210to make OM/Pi working properly.
210To get the character conversion in OM/Pi working, please download 211To get the character conversion in OM/Pi working, please download
211at the sourceforge project site the package 212at the sourceforge project site the package
212sr-character-conversion_SharpROM_arm.ipk.zip 213sr-character-conversion_SharpROM_arm.ipk.zip
213(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 214(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
214from the section "general files for KDE/Pim" 215from the section "general files for KDE/Pim"
215Instructions how to install this package are in a ReadMe in this file. 216Instructions how to install this package are in a ReadMe in this file.
216 217
217 218
218Fixed the orientation change problem in KA/Pi when switching 219Fixed the orientation change problem in KA/Pi when switching
219portrait/landscape mode. 220portrait/landscape mode.
220 221
221French translation available for KA/Pi and OM/Pi. 222French translation available for KA/Pi and OM/Pi.
222 223
223Fixed some problems with categories in KO/Pi in DTM sync. 224Fixed some problems with categories in KO/Pi in DTM sync.
224 225
225Added selection dialog for export to phone in KA/Pi. 226Added selection dialog for export to phone in KA/Pi.
226 227
227If in KO/Pi is an attendee selected to add to a meeting and this 228If in KO/Pi is an attendee selected to add to a meeting and this
228attendee is already in the list of attendees, this person is not added 229attendee is already in the list of attendees, this person is not added
229again. 230again.
230 231
231Some menu cleanup in KA/Pi. 232Some menu cleanup in KA/Pi.
232 233
233********** VERSION 1.9.12 ************ 234********** VERSION 1.9.12 ************
234 235
235Fix for the bug in KO/Pi What's Next view of version 1.9.11. 236Fix for the bug in KO/Pi What's Next view of version 1.9.11.
236 237
237Bugfix: Licence file is now shown again. 238Bugfix: Licence file is now shown again.
238 239
239OM/Pi now supports Unicode (utf8 charset). 240OM/Pi now supports Unicode (utf8 charset).
240Fixed some bugs in OM/Pi. 241Fixed some bugs in OM/Pi.
241 242
242KA/Pi has more German translation. 243KA/Pi has more German translation.
243 244
244 245
245********** VERSION 1.9.11 ************ 246********** VERSION 1.9.11 ************
246 247
247Fixed several problems in PWM/Pi, like 248Fixed several problems in PWM/Pi, like
248asking the user, if unsaved changed are pending 249asking the user, if unsaved changed are pending
249when closing the app. 250when closing the app.
250And PwM/Pi handles now different texts for the 251And PwM/Pi handles now different texts for the
251fields Description, Username, Password, configurable per category. 252fields Description, Username, Password, configurable per category.
252 253
253Fixed a crash in KO/Pi , when importing/loading vcs files 254Fixed a crash in KO/Pi , when importing/loading vcs files
254which have an entry with an attendee with state: 255which have an entry with an attendee with state:
255NEEDS ACTION 256NEEDS ACTION
256 257
257Fixed some problems in the German translation of OM/Pi, 258Fixed some problems in the German translation of OM/Pi,
258which makes some dialogs not fitting on the screen 259which makes some dialogs not fitting on the screen
259of the Z 5500. 260of the Z 5500.
260 261
261Fixed Qtopia crash, when disabling/deinstalling 262Fixed Qtopia crash, when disabling/deinstalling
262KO/Pi alarm applet. 263KO/Pi alarm applet.
263 264
264Implemented direct KDE<->KA/Pi sync for KA/Pi running 265Implemented direct KDE<->KA/Pi sync for KA/Pi running
265on Linux desktop. 266on Linux desktop.
266 267
267Added feature "remove sync info" to sync menu. 268Added feature "remove sync info" to sync menu.
268 269
269Tweaked the KO/Pi What's next view a bit, added 270Tweaked the KO/Pi What's next view a bit, added
270setting to hide events that are done. 271setting to hide events that are done.
271 272
272Disabled "beam receive enabled" on startup to 273Disabled "beam receive enabled" on startup to
273avoid problems if Fastload is enabled. 274avoid problems if Fastload is enabled.
274Please set "beam receive enabled", 275Please set "beam receive enabled",
275if you want to receive data via IR. 276if you want to receive data via IR.
276 277
277Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 278Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
278on Linux desktop. 279on Linux desktop.
279 280
280Made in KA/Pi scrolling possible, if details view is selected. 281Made in KA/Pi scrolling possible, if details view is selected.
281(The keyboard focus is set automatically to the search line) 282(The keyboard focus is set automatically to the search line)
282 283
283Fixed a bug in DMT sync, that a new entry in DTM was added 284Fixed a bug in DMT sync, that a new entry in DTM was added
284on every sync to Kx/Pi. 285on every sync to Kx/Pi.
285 286
286Fixed missing writing of KA/Pi categories to DMT entries when syncing. 287Fixed missing writing of KA/Pi categories to DMT entries when syncing.
287 288
288Fixed a bug in DMT sync with todos created in KO/Pi containing 289Fixed a bug in DMT sync with todos created in KO/Pi containing
289non-latin1 characters. 290non-latin1 characters.
290 291
291Rearranged package contents of Sharp-ipks and made all 292Rearranged package contents of Sharp-ipks and made all
292packages installable on SD again. 293packages installable on SD again.
293 294
294Fixed the writing of addressbook data in DTM sync. 295Fixed the writing of addressbook data in DTM sync.
295Empty fields in KA/Pi were not removed. 296Empty fields in KA/Pi were not removed.
296 297
297Added better category handling in KA/Pi: 298Added better category handling in KA/Pi:
298Added item 299Added item
299Edit Categories and 300Edit Categories and
300Manage new categories 301Manage new categories
301to the settings menu. 302to the settings menu.
302Possible to configure a view to display categories. 303Possible to configure a view to display categories.
303 304
304Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 305Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
305 306
306Fixed displaying of "free" days and time in KO Monthview and Agendaview. 307Fixed displaying of "free" days and time in KO Monthview and Agendaview.
307 308
308... and many other bugfixes. 309... and many other bugfixes.
309 310
310********** VERSION 1.9.10 ************ 311********** VERSION 1.9.10 ************
311 312
312Many internal small bugfixes. 313Many internal small bugfixes.
313And fix of the "big" bug in KO/Pi, 314And fix of the "big" bug in KO/Pi,
314that after Syncing the appointments had an offset by several hours. 315that after Syncing the appointments had an offset by several hours.
315That was a problem with the internal timezone setting, 316That was a problem with the internal timezone setting,
316introduced by the changed timezone configuration settings. 317introduced by the changed timezone configuration settings.
317 318
318German translation for OM/Pi is now available. 319German translation for OM/Pi is now available.
319 320
320 321
321********** VERSION 1.9.9 ************ 322********** VERSION 1.9.9 ************
322 323
323KDE-Pim/Pi has a new Member! 324KDE-Pim/Pi has a new Member!
324It is called PWM/Pi (Passwordmanager/platform-independent) 325It is called PWM/Pi (Passwordmanager/platform-independent)
325and it is available for the Zaurus. 326and it is available for the Zaurus.
326It is planned, that it will be available later for Windows. 327It is planned, that it will be available later for Windows.
327(And for Linux, of course). 328(And for Linux, of course).
328It is a port of the Passwordmanager of KDE. 329It is a port of the Passwordmanager of KDE.
329It will need the MicroKDElibs to run. 330It will need the MicroKDElibs to run.
330 331
331Made loading of addressbooks in KA/Pi up to 7 times faster! 332Made loading of addressbooks in KA/Pi up to 7 times faster!
332The bigger your addressbook file, the more starting speed 333The bigger your addressbook file, the more starting speed
333will you gain. (relatively) 334will you gain. (relatively)
334 335
335The Qtopia addressbook connector is now platform independend 336The Qtopia addressbook connector is now platform independend
336as well and should work on any platform for importing/exporting 337as well and should work on any platform for importing/exporting
337Qtopia and Opie XML files. 338Qtopia and Opie XML files.
338 339
339Added a +30min feature to the timezone settings to make 340Added a +30min feature to the timezone settings to make
340KDE-Pim/Pi useable in Australia and other parts on the 341KDE-Pim/Pi useable in Australia and other parts on the
341world with strange timezones ;-) 342world with strange timezones ;-)
342 343
343German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 344German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
344 345
345It is now possible to disable the 346It is now possible to disable the
346"receive data via infrared" feature, such that syncing with 347"receive data via infrared" feature, such that syncing with
347Outlook is now possible again with Kx/Pi runing. 348Outlook is now possible again with Kx/Pi runing.
348Please disable it, before syncing Sharp DTM with Outlook. 349Please disable it, before syncing Sharp DTM with Outlook.
349For your convenience, the "receive data via infrared" feature 350For your convenience, the "receive data via infrared" feature
350is disabled automatically, if you sync Kx/Pi with DTM. 351is disabled automatically, if you sync Kx/Pi with DTM.
351You have to enable it again manually after syncing. 352You have to enable it again manually after syncing.
352Enabling this feature makes it impossible to start the 353Enabling this feature makes it impossible to start the
353Sharp DTM apps. If this feature is enabled, you will only get the 354Sharp DTM apps. If this feature is enabled, you will only get the
354alarm notification from KO/Pi and not from the Sharp calendar. 355alarm notification from KO/Pi and not from the Sharp calendar.
355This is very useful if you sync KO/Pi with Sharp DTM, 356This is very useful if you sync KO/Pi with Sharp DTM,
356because after syncing you usually would get notified about 357because after syncing you usually would get notified about
357an alarm by KO/Pi and the Sharp Calendar. 358an alarm by KO/Pi and the Sharp Calendar.
358 359
359Together with the Linux desktop version of KO/Pi 360Together with the Linux desktop version of KO/Pi
360it is now possible to sync KO/Pi on the Zaurus 361it is now possible to sync KO/Pi on the Zaurus
361with the complete KDE-desktop (3.3 or later) 362with the complete KDE-desktop (3.3 or later)
362calendar data easily. 363calendar data easily.
363That makes it possible to sync the Z with one 364That makes it possible to sync the Z with one
364click of a mouse with the KDE-Desktop. 365click of a mouse with the KDE-Desktop.
365This feature it available for all Zaurus platforms KO/Pi 366This feature it available for all Zaurus platforms KO/Pi
366is running on. 367is running on.
367The only thing needed is a running KO/Pi on Linux and 368The only thing needed is a running KO/Pi on Linux and
368a compiled version of the small 369a compiled version of the small
369KDE-Pim/Pi<->KDE-Desktop access command line program, 370KDE-Pim/Pi<->KDE-Desktop access command line program,
370which is in the KDE-Pim/Pi sources available. 371which is in the KDE-Pim/Pi sources available.
371 372
372The "KDE-desktop" syncing feature for KA/Pi will follow 373The "KDE-desktop" syncing feature for KA/Pi will follow
373in the next releases. 374in the next releases.
374 375
375Fixed the vcard export bug, which had the version 1.9.8. 376Fixed the vcard export bug, which had the version 1.9.8.
376 377
377Added missing GERMAN translation to KO/Pi. 378Added missing GERMAN translation to KO/Pi.
378Hi PsionX, could you add the missing french translation?Thx! 379Hi PsionX, could you add the missing french translation?Thx!
379 380
380Translation files for KA/Pi are available as well. 381Translation files for KA/Pi are available as well.
381GERMAN translation will be available in the next release. 382GERMAN translation will be available in the next release.
382PsionX ( yres, you again ;-) ), could you start translating 383PsionX ( yres, you again ;-) ), could you start translating
383KA/Pi? Thx! 384KA/Pi? Thx!
384 385
385You can download the version 1.9.9 at 386You can download the version 1.9.9 at
386 387
387http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 388http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
388 389
389Note: 390Note:
390To run the mail program OM/Pi you need libopenssl. 391To run the mail program OM/Pi you need libopenssl.
391A link to a download loaction is available at 392A link to a download loaction is available at
392ZSI at www.killefiz.de 393ZSI at www.killefiz.de
393 394
394 395
395********** VERSION 1.9.8 ************ 396********** VERSION 1.9.8 ************
396 397
397Fixed character decoding in OM/Pi. 398Fixed character decoding in OM/Pi.
398(e.g. German "Umlaute" were not displayed properly.) 399(e.g. German "Umlaute" were not displayed properly.)
399 400
400Made is possible to reparent todos in KO/Pi. 401Made is possible to reparent todos in KO/Pi.
401Use contextmenu or keys (look at Help-Keys + Colors) for that. 402Use contextmenu or keys (look at Help-Keys + Colors) for that.
402 403
403Added the missing Sync-Howto and WhatsNew to the packages. 404Added the missing Sync-Howto and WhatsNew to the packages.
404 405
405KO/Pi on Linux desktop can now sync with KDE desktop. 406KO/Pi on Linux desktop can now sync with KDE desktop.
406That means: When using KO/Pi on Linux desktop for syncing with 407That means: When using KO/Pi on Linux desktop for syncing with
407KDE desktop and the Zaurus, the Zaurus can be synced now 408KDE desktop and the Zaurus, the Zaurus can be synced now
408with all KDE-Calendar resources, not only with one local file. 409with all KDE-Calendar resources, not only with one local file.
409(That makes it possible to sync the Zaurus with the 410(That makes it possible to sync the Zaurus with the
410calendar data on a Kolab server) 411calendar data on a Kolab server)
411 412
412KA/Pi syncing with KDE desktop will be available in the next version. 413KA/Pi syncing with KDE desktop will be available in the next version.
413 414
414 415
415********** VERSION 1.9.7 ************ 416********** VERSION 1.9.7 ************
416 417
417KO/Pi - KA/Pi on Windows: 418KO/Pi - KA/Pi on Windows:
418Now a directory can be defined by the user, where the 419Now a directory can be defined by the user, where the
419application/config data should be saved. 420application/config data should be saved.
420 Define your desired path in the evironment variable 421 Define your desired path in the evironment variable
421 MICROKDEHOME 422 MICROKDEHOME
422 before starting KO/Pi or KA/Pi. 423 before starting KO/Pi or KA/Pi.
423 424
424An easy Kx/Pi to Kx/Pi syncing is now possible 425An easy Kx/Pi to Kx/Pi syncing is now possible
425(it is called Pi-Sync) via network. 426(it is called Pi-Sync) via network.
426Please look at the Sync Howto. 427Please look at the Sync Howto.
427 428
428Exporting of calendar data and contacts to mobile phones is now possible. 429Exporting of calendar data and contacts to mobile phones is now possible.
429The SyncHowto is updated with information howto 430The SyncHowto is updated with information howto
430access/sync mobile phones. 431access/sync mobile phones.
431Please look at the Sync Howto. 432Please look at the Sync Howto.
432 433
433Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 434Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
434Please disable Fastload for the original contact/calendar applications 435Please disable Fastload for the original contact/calendar applications
435and close them. 436and close them.
436KO/Pi and KA/Pi must be running in order to receive the data. 437KO/Pi and KA/Pi must be running in order to receive the data.
437(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 438(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
438 439
439In the KA/Pi details view are now the preferred tel. numbers displayed on top 440In the KA/Pi details view are now the preferred tel. numbers displayed on top
440of the other data ( emails/tel.numbers/addresses) 441of the other data ( emails/tel.numbers/addresses)
441 442
442Fixed some syncing problems in KA/Pi. 443Fixed some syncing problems in KA/Pi.
443 444
444Added font settings for the KA/Pi details view. 445Added font settings for the KA/Pi details view.
445Added fields "children's name" and "gender" to KA/Pi. 446Added fields "children's name" and "gender" to KA/Pi.
446 447
447Made searching in KA/Pi better: 448Made searching in KA/Pi better:
448Now the first item in a view is selected after a search automatically and 449Now the first item in a view is selected after a search automatically and
449the views can be scrolled up/down when the search input field has the keyboard focus. 450the views can be scrolled up/down when the search input field has the keyboard focus.
450 451
451And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 452And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
452 453
453 454
454********** VERSION 1.9.6 ************ 455********** VERSION 1.9.6 ************
455 456
456Changes in the external application communication on the Zaurus 457Changes in the external application communication on the Zaurus
457in order to use less RAM when the apps are running. 458in order to use less RAM when the apps are running.
458First syncing of addressbooks (KA/Pi) is possible. 459First syncing of addressbooks (KA/Pi) is possible.
459 460
460 461
461********** VERSION 1.9.5a ************ 462********** VERSION 1.9.5a ************
462 463
463Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 464Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
464Fixed some small bugs. 465Fixed some small bugs.
465KA/Pi shows now the birthday in summary view. 466KA/Pi shows now the birthday in summary view.
466Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 467Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
467for displaying dates. 468for displaying dates.
468 469
469 470
470********** VERSION 1.9.5 ************ 471********** VERSION 1.9.5 ************
471 472
472There is still no Addressbook syncing! 473There is still no Addressbook syncing!
473 474
474New in 1.9.5: 475New in 1.9.5:
475 476
476Many bugfixes. 477Many bugfixes.
477Better searching in KA/Pi. 478Better searching in KA/Pi.
478You can configure in KA/Pi if you want to search only after 479You can configure in KA/Pi if you want to search only after
479<return> key pressed. 480<return> key pressed.
480 481
481Better mail downloading in OM/Pi. 482Better mail downloading in OM/Pi.
482 483
483First experimental alpha version of sync of KO/Pi with mobile phones. 484First experimental alpha version of sync of KO/Pi with mobile phones.
484See gammu documentation for supported phones. 485See gammu documentation for supported phones.
485You 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. 486You 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.
486Quick hint how to use: 487Quick hint how to use:
487NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 488NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
488Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 489Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
489Create syncprofile - mobile device 490Create syncprofile - mobile device
490Remove entry for model. (Leave empty ). 491Remove entry for model. (Leave empty ).
491Enable infrared on Zaurus and your Phone. 492Enable infrared on Zaurus and your Phone.
492Sync. 493Sync.
493To get a more detailed log, start kopi from konsole. 494To get a more detailed log, start kopi from konsole.
494 495
495********** VERSION 1.9.4 ************ 496********** VERSION 1.9.4 ************
496 497
497This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 498This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
498 499
499WARNING: 500WARNING:
500PLEASE BACKUP ALL YOUR DATA! 501PLEASE BACKUP ALL YOUR DATA!
501We have changed a lot and maybe there are some unknown problems. 502We have changed a lot and maybe there are some unknown problems.
502 503
503SYNC HANDLING HAS CHANGED! 504SYNC HANDLING HAS CHANGED!
504Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 505Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
505(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 506(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
506 507
507You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 508You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
508If 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. 509If 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.
509 510
510As programs are available: 511As programs are available:
511KO/Pi (korganizer ipk) - a calendar program. 512KO/Pi (korganizer ipk) - a calendar program.
512KA/Pi (kaddressbook ipk ) - an addressbook 513KA/Pi (kaddressbook ipk ) - an addressbook
513OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 514OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
514 515
515An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 516An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
516(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 517(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
517 518
518All the applications are installed in a "Pim" TAB. 519All the applications are installed in a "Pim" TAB.
519If 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 520If 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
520 521
521All the application are integrated. 522All the application are integrated.
522Such 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. 523Such 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.
523 524
524HINT: 525HINT:
525If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 526If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
526 527
527What's new? 528What's new?
528 529
529SYNC HANDLING HAS CHANGED! 530SYNC HANDLING HAS CHANGED!
530Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 531Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
531(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 532(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
532 533
533New in OM/Pi: 534New in OM/Pi:
534When 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. 535When 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.
535 536
536New in KO/Pi: 537New in KO/Pi:
537French is now available for KO/Pi. 538French is now available for KO/Pi.
538Choose menu:Actions - Configure:TAB locale 539Choose menu:Actions - Configure:TAB locale
539Syncing has changed. 540Syncing has changed.
540Phone sync available soon. 541Phone sync available soon.
541Not much changes, I cannot remember them ... 542Not much changes, I cannot remember them ...
542 543
543New in KA/Pi: 544New in KA/Pi:
544Beaming possible. 545Beaming possible.
545Sharp DTM readonly access possible( create a new DTM resource ); 546Sharp DTM readonly access possible( create a new DTM resource );
546Better searching possible. 547Better searching possible.
547Search is performed only after pressing the return key. 548Search is performed only after pressing the return key.
548Use wildcard * to specify parts of a name. 549Use wildcard * to specify parts of a name.
549 550
550Better 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 * . 551Better 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 * .
551 552
552A big improvement is the new management of the contact access. 553A big improvement is the new management of the contact access.
553In version 1.9.3, every application was using their own addressbook access data. 554In version 1.9.3, every application was using their own addressbook access data.
554That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 555That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
555That was wasting of memory, if you had several hundreds of contacts. 556That was wasting of memory, if you had several hundreds of contacts.
556 557
557Now only KA/Pi accesses the addressbook. 558Now only KA/Pi accesses the addressbook.
558If 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. 559If 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.
559If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 560If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
560That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 561That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
561 562
562New in the KO/Pi alarm applet: 563New in the KO/Pi alarm applet:
563Configure your own timer popup menu! 564Configure your own timer popup menu!
564(Text and minutes for timer countdown) 565(Text and minutes for timer countdown)
565Just edit the file 566Just edit the file
566(yourhomedir)/.kopialarmtimerrc 567(yourhomedir)/.kopialarmtimerrc
567and start/stop a timer to get a new menu with the data of this file. 568and start/stop a timer to get a new menu with the data of this file.
568 569
569********** VERSION 1.9.3 ************ 570********** VERSION 1.9.3 ************
5701) 5711)
571Now KO/Pi on Windows imports directly the calendar data of 572Now KO/Pi on Windows imports directly the calendar data of
572an installed Outlook. Should work with OL version >= 2000. 573an installed Outlook. Should work with OL version >= 2000.
573 574
574********** VERSION 1.9.2 ************ 575********** VERSION 1.9.2 ************
5751) 5761)
576KDE-Pim/Pi has got a new member: 577KDE-Pim/Pi has got a new member:
577KmicroMail (KM/Pi) is a mail program, 578KmicroMail (KM/Pi) is a mail program,
578which can handle IMAP and POP mail access. 579which can handle IMAP and POP mail access.
579It is based on Opie-Mail v3. 580It is based on Opie-Mail v3.
580All dependencies to the Opie libraries ar removed, 581All dependencies to the Opie libraries ar removed,
581such that no additional Opie lib is needed. 582such that no additional Opie lib is needed.
582It is already integrated in KO/Pi and KA/Pi. 583It is already integrated in KO/Pi and KA/Pi.
583It it now available for the Zaurus,probably it 584It it now available for the Zaurus,probably it
584will be available for other platforms later. 585will be available for other platforms later.
585Hint: 586Hint:
586Create your own contact (name + email) 587Create your own contact (name + email)
587in KA/Pi, select this contact and choose menu: 588in KA/Pi, select this contact and choose menu:
588Settings - Set Who Am I. 589Settings - Set Who Am I.
589Now the settings of this contact are used as 590Now the settings of this contact are used as
590the sender data in KM/Pi. 591the sender data in KM/Pi.
5912) 5922)
592KDE-Pim/Pi is split up in five different 593KDE-Pim/Pi is split up in five different
593packages now precompiled for Sharp Zaurus: 594packages now precompiled for Sharp Zaurus:
594--kmicrokdelibs_1.9.2_arm.ipk 595--kmicrokdelibs_1.9.2_arm.ipk
595The libs are needed for any 596The libs are needed for any
596of the following programs: 597of the following programs:
597--kaddressbook_1.9.2_arm.ipk 598--kaddressbook_1.9.2_arm.ipk
598--kmicromail_1.9.2_arm.ipk 599--kmicromail_1.9.2_arm.ipk
599--korganizer_1.9.2_arm.ipk 600--korganizer_1.9.2_arm.ipk
600Independ from that, there is the alarm applet 601Independ from that, there is the alarm applet
601available for KO/Pi, which also offers 602available for KO/Pi, which also offers
602quick access for a new mail or 603quick access for a new mail or
603showing the addressbook.: 604showing the addressbook.:
604--korganizer-alarm_1.9.2_arm.ipk 605--korganizer-alarm_1.9.2_arm.ipk
605Independend means, that the alarm applet 606Independend means, that the alarm applet
606does not need any of the libs or programs above to run. 607does not need any of the libs or programs above to run.
607But it would be quite useless without these programs. 608But it would be quite useless without these programs.
608NOTE: 609NOTE:
609If you get a 610If you get a
610"This application depends on other programs" 611"This application depends on other programs"
611during installation of 612during installation of
612--kmicrokdelibs_1.9.2_arm.ipk 613--kmicrokdelibs_1.9.2_arm.ipk
613you probably do not have to care about that. 614you probably do not have to care about that.
614kmicrokdelibs_1.9.2 will come with some 615kmicrokdelibs_1.9.2 will come with some
615resource plugins, which needs additional libraries. 616resource plugins, which needs additional libraries.
616(E.g. libopie1, if you want to use the 617(E.g. libopie1, if you want to use the
617opie resource connector in KA/Pi). 618opie resource connector in KA/Pi).
618If you do not have this libraries installed, 619If you do not have this libraries installed,
619you simply cannot use the resource. 620you simply cannot use the resource.
620To make it clear: 621To make it clear:
621If the libraries are missing, the applications 622If the libraries are missing, the applications
622using kmicrokdelibs will start, 623using kmicrokdelibs will start,
623because the resources are plugins. 624because the resources are plugins.
6243) 6253)
625KO/Pi and friends are now installable on SD-Card! 626KO/Pi and friends are now installable on SD-Card!
626It is recommended to install all libs and apps 627It is recommended to install all libs and apps
627on the SD card or all in the internal storage. 628on the SD card or all in the internal storage.
628There may be problems, if this is mixed. 629There may be problems, if this is mixed.
6294) 6304)
630Fixed two bugs in the alarm notification on Windows. 631Fixed two bugs in the alarm notification on Windows.
6315) 6325)
632Great improvement! 633Great improvement!
633KO/Pi uses now the latest version of libical. 634KO/Pi uses now the latest version of libical.
634Libical is the library which actually reads 635Libical is the library which actually reads
635the calendar files and extract the data from it. 636the calendar files and extract the data from it.
636With the old version, there were problems 637With the old version, there were problems
637(crashes or program hangs) when licical did read 638(crashes or program hangs) when licical did read
638files, which were not stored from KO/Pi. 639files, which were not stored from KO/Pi.
639I do not know, if the new libical works perfect, 640I do not know, if the new libical works perfect,
640but actually it works much better than 641but actually it works much better than
641the old version. 642the old version.
642There are no problems with compatibility with 643There are no problems with compatibility with
643old calendar files of KO/Pi, of course! 644old calendar files of KO/Pi, of course!
6446) 6456)
645New in KA/Pi: 646New in KA/Pi:
646Opie addressbook resource connector available! 647Opie addressbook resource connector available!
647You will need libopie1 and the opie addressbook, 648You will need libopie1 and the opie addressbook,
648of course. 649of course.
649With the Opie addressbook resource connector, 650With the Opie addressbook resource connector,
650you can access the Opie addressbook readonly in KA/Pi. 651you can access the Opie addressbook readonly in KA/Pi.
651If you want to edit or import the data into KA/Pi, 652If you want to edit or import the data into KA/Pi,
652do this: 653do this:
653a) Create an Opie resource. 654a) Create an Opie resource.
654 (Menu: Settings-Configure Resources). 655 (Menu: Settings-Configure Resources).
655After configuration and restarting KA/Pi you should see 656After configuration and restarting KA/Pi you should see
656the Opie contacts in KA/Pi. 657the Opie contacts in KA/Pi.
657b) Select some or all Opie contacts. 658b) Select some or all Opie contacts.
658(NOTE: +++++ 659(NOTE: +++++
659To know exactly, what contacts are Opie contacts, 660To know exactly, what contacts are Opie contacts,
660do this: Choose menu: 661do this: Choose menu:
661View-Modify View - TAB Fields. 662View-Modify View - TAB Fields.
662Select in the above list "Resource" and click 663Select in the above list "Resource" and click
663down arrow to add it to the "Selected fields". 664down arrow to add it to the "Selected fields".
664Click OK. 665Click OK.
665Now you have a new column "Resource" in your list, 666Now you have a new column "Resource" in your list,
666where you can see, what an Opie resource is. 667where you can see, what an Opie resource is.
667++++ NOTE end.) 668++++ NOTE end.)
668Ok, we do have now some Opie contacts seleted. 669Ok, we do have now some Opie contacts seleted.
669(Use SHIFT or CTRL key in order to multiple select). 670(Use SHIFT or CTRL key in order to multiple select).
670c) Choose menu: Edit-Copy. 671c) Choose menu: Edit-Copy.
671d) Choose menu: Edit-Paste. 672d) Choose menu: Edit-Paste.
672e) Select the resource, you want to add the contacts to. 673e) Select the resource, you want to add the contacts to.
673Congrats! Now you have read/write access to the copied 674Congrats! Now you have read/write access to the copied
674opie contacts as "real" KA/Pi contacts. 675opie contacts as "real" KA/Pi contacts.
675 676
676 677
677********** VERSION 1.9.1 ************ 678********** VERSION 1.9.1 ************
6781) 6791)
679 +++ IMPORTANT 1 +++ 680 +++ IMPORTANT 1 +++
680 681
681The storing place of the default calendar 682The storing place of the default calendar
682file has changed! 683file has changed!
683The default calendar file was 684The default calendar file was
684Applications/korganizer/mycalendar.ics 685Applications/korganizer/mycalendar.ics
685on Zaurus and 686on Zaurus and
686(yourHomeDir)/korganizer/mycalendar.ics 687(yourHomeDir)/korganizer/mycalendar.ics
687on Windows/Linux desktop. Now it is 688on Windows/Linux desktop. Now it is
688(yourHomeDir)/kdepim/korganizer/mycalendar.ics 689(yourHomeDir)/kdepim/korganizer/mycalendar.ics
689on Zaurus, Windows and Linux. 690on Zaurus, Windows and Linux.
690To load the old file, choose menu 691To load the old file, choose menu
691File-Load calendar backup. 692File-Load calendar backup.
692(It should be loaded automatically 693(It should be loaded automatically
693at startup with a warning message displayed). 694at startup with a warning message displayed).
694The place of the configuration file has changed too. 695The place of the configuration file has changed too.
695If you want to use your old KO/Pi config, 696If you want to use your old KO/Pi config,
696copy it to 697copy it to
697(yourHomeDir)/kdepim/config/korganizerrc 698(yourHomeDir)/kdepim/config/korganizerrc
698Please read VERSION 1.9.0 - topic 3) as well! 699Please read VERSION 1.9.0 - topic 3) as well!
699 700
700 +++ IMPORTANT 2 +++ 701 +++ IMPORTANT 2 +++
701 702
702Because of the new paths, you will need 703Because of the new paths, you will need
703a new version of the KO/Pi alarm applet 704a new version of the KO/Pi alarm applet
704for Zaurus. 705for Zaurus.
705Use version >= 1.9.1 706Use version >= 1.9.1
706 707
7072) 7082)
708Now the QWhat'sThis Icon works for items 709Now the QWhat'sThis Icon works for items
709in the month view as well. 710in the month view as well.
710(See VERSION 1.7.8 Topic 1) ). 711(See VERSION 1.7.8 Topic 1) ).
7113) 7123)
712You can import birtsdays/anniversaries 713You can import birtsdays/anniversaries
713from KA/Pi into KO/Pi. 714from KA/Pi into KO/Pi.
714Choose menu File-Import birthdays. 715Choose menu File-Import birthdays.
715If you import twice, already imported items 716If you import twice, already imported items
716will not be imported again, if they 717will not be imported again, if they
717have not been changed in KO/Pi. 718have not been changed in KO/Pi.
7184) 7194)
719When syncing with sharp DTM, now a progress 720When syncing with sharp DTM, now a progress
720is shown, when the data is written back. 721is shown, when the data is written back.
721If there is much data in KO/Pi and no data 722If there is much data in KO/Pi and no data
722in DTM, that can take a long time. 723in DTM, that can take a long time.
723(But only for the first time ). 724(But only for the first time ).
7245) 7255)
725In the search dialog, you can search 726In the search dialog, you can search
726now for the name/email of an attendee 727now for the name/email of an attendee
727of an event/todo. 728of an event/todo.
728To get more space for displaying 729To get more space for displaying
729search results, the buttons 730search results, the buttons
730for "search" and "close" on the 731for "search" and "close" on the
731bottom are removed in the PDA version. 732bottom are removed in the PDA version.
732You have to click OK in the top right 733You have to click OK in the top right
733corner to do a search. 734corner to do a search.
7346) 7356)
735Now it is possible to disable the displaying 736Now it is possible to disable the displaying
736of todo items in the Allday part of the Agenda. 737of todo items in the Allday part of the Agenda.
737Choose Menu Action-Configure, 738Choose Menu Action-Configure,
738TAB Todo View, checkbox 739TAB Todo View, checkbox
739"Allday Agenda view shows todos" 740"Allday Agenda view shows todos"
7407) 7417)
741If FastLoad is enabled, now the settings and the 742If FastLoad is enabled, now the settings and the
742calendar data are saved, when KO/Pi is closed. 743calendar data are saved, when KO/Pi is closed.
743(If no Fastload is enabled, KO/Pi saves 744(If no Fastload is enabled, KO/Pi saves
744the data as well, of course) 745the data as well, of course)
7458) 7468)
746The Agenda View has a minimize-splitter now, 747The Agenda View has a minimize-splitter now,
747such that the height of the allday part can be 748such that the height of the allday part can be
748changed quickly. 749changed quickly.
749 750
750********** VERSION 1.9.0 ************ 751********** VERSION 1.9.0 ************
7511) 7521)
752KO/Pi is now merged with the new microKDE from KA/Pi. 753KO/Pi is now merged with the new microKDE from KA/Pi.
753KO/Pi accesses now KA/Pi as the addressbook. 754KO/Pi accesses now KA/Pi as the addressbook.
754The other ddressbook-plugins are not working any longer. 755The other ddressbook-plugins are not working any longer.
755(It is planned, that later KA/Pi itself uses these plugins) 756(It is planned, that later KA/Pi itself uses these plugins)
756New versions of KO/Pi are only available 757New versions of KO/Pi are only available
757together with KA/Pi as the KDE-Pim/Pi package. 758together with KA/Pi as the KDE-Pim/Pi package.
7582) 7592)
759If you click on an attendee of a meeting in the 760If you click on an attendee of a meeting in the
760event viewer, a detailed summary of the 761event viewer, a detailed summary of the
761attendee is shown. 762attendee is shown.
7623) 7633)
763The place of the configuration file has changed. 764The place of the configuration file has changed.
764If you want to use your old KO/Pi config, copy 765If you want to use your old KO/Pi config, copy
765Applications/korganizer/config_korganizerrc 766Applications/korganizer/config_korganizerrc
766to 767to
767Applications/korganizer/config/korganizerrc 768Applications/korganizer/config/korganizerrc
768 769
769********** VERSION 1.7.8 ************ 770********** VERSION 1.7.8 ************
7701) 7711)
771Now the QWhat'sThis ist working. 772Now the QWhat'sThis ist working.
772Enable the QWhat'sThis icon in the toolbar. 773Enable the QWhat'sThis icon in the toolbar.
773(You have to restart to reload the changed toolbar config). 774(You have to restart to reload the changed toolbar config).
774Now click on the QWhat'sThis Icon 775Now click on the QWhat'sThis Icon
775in the top right corner of KO/Pi. 776in the top right corner of KO/Pi.
776Then click on an item in the Agenda View: 777Then click on an item in the Agenda View:
777You will get a detailed display of the items content. 778You will get a detailed display of the items content.
7782) 7792)
779Some other very minor changes. 780Some other very minor changes.
780But I have forgotten the details ... 781But I have forgotten the details ...
781For that reason I start this log here: 782For that reason I start this log here:
782To document my changes, when I am doing it. 783To document my changes, when I am doing it.
783 784
784********** VERSION 1.7.7 ************ 785********** VERSION 1.7.7 ************
785Stable Version of KO/Pi 786Stable Version of KO/Pi
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index c5acafd..6428757 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1,1456 +1,1472 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 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 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qhbox.h> 24#include <qhbox.h>
25#include <qvbox.h> 25#include <qvbox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qframe.h> 27#include <qframe.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#ifndef KORG_NOSPLITTER 29#ifndef KORG_NOSPLITTER
30#include <qsplitter.h> 30#include <qsplitter.h>
31#endif 31#endif
32#include <qfont.h> 32#include <qfont.h>
33#include <qfontmetrics.h> 33#include <qfontmetrics.h>
34#include <qpopupmenu.h> 34#include <qpopupmenu.h>
35#include <qtooltip.h> 35#include <qtooltip.h>
36#include <qpainter.h> 36#include <qpainter.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qapplication.h> 38#include <qapplication.h>
39 39
40#include <kapplication.h> 40#include <kapplication.h>
41#include <KDGanttMinimizeSplitter.h> 41#include <KDGanttMinimizeSplitter.h>
42#include <kdebug.h> 42#include <kdebug.h>
43#include <kstandarddirs.h> 43#include <kstandarddirs.h>
44#include <kiconloader.h> 44#include <kiconloader.h>
45#include <klocale.h> 45#include <klocale.h>
46#include <kconfig.h> 46#include <kconfig.h>
47#include <kglobal.h> 47#include <kglobal.h>
48#include "calendarview.h" 48#include "calendarview.h"
49#include "koviewmanager.h" 49#include "koviewmanager.h"
50 50
51#include <libkcal/calendar.h> 51#include <libkcal/calendar.h>
52#include <libkcal/icaldrag.h> 52#include <libkcal/icaldrag.h>
53#include <libkcal/dndfactory.h> 53#include <libkcal/dndfactory.h>
54 54
55#include <kcalendarsystem.h> 55#include <kcalendarsystem.h>
56 56
57#include "koglobals.h" 57#include "koglobals.h"
58#ifndef KORG_NOPLUGINS 58#ifndef KORG_NOPLUGINS
59#include "kocore.h" 59#include "kocore.h"
60#endif 60#endif
61#include "koprefs.h" 61#include "koprefs.h"
62#include "koagenda.h" 62#include "koagenda.h"
63#include "koagendaitem.h" 63#include "koagendaitem.h"
64#ifndef KORG_NOPRINTER 64#ifndef KORG_NOPRINTER
65#include "calprinter.h" 65#include "calprinter.h"
66#endif 66#endif
67 67
68#include "koagendaview.h" 68#include "koagendaview.h"
69//#include "koagendaview.moc" 69//#include "koagendaview.moc"
70 70
71//extern bool globalFlagBlockPainting; 71//extern bool globalFlagBlockPainting;
72extern int globalFlagBlockAgenda; 72extern int globalFlagBlockAgenda;
73extern int globalFlagBlockStartup; 73extern int globalFlagBlockStartup;
74extern int globalFlagBlockAgendaItemPaint; 74extern int globalFlagBlockAgendaItemPaint;
75extern int globalFlagBlockAgendaItemUpdate; 75extern int globalFlagBlockAgendaItemUpdate;
76extern int globalFlagBlockLabel; 76extern int globalFlagBlockLabel;
77using namespace KOrg; 77using namespace KOrg;
78 78
79TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : 79TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
80 QScrollView(parent,name,f) 80 QScrollView(parent,name,f)
81{ 81{
82 mRows = rows; 82 mRows = rows;
83 83
84 setMinimumHeight( 20 ); 84 setMinimumHeight( 20 );
85 mCellHeight = KOPrefs::instance()->mHourSize*4; 85 mCellHeight = KOPrefs::instance()->mHourSize*4;
86 86
87 enableClipper(true); 87 enableClipper(true);
88 88
89 setHScrollBarMode(AlwaysOff); 89 setHScrollBarMode(AlwaysOff);
90 setVScrollBarMode(AlwaysOff); 90 setVScrollBarMode(AlwaysOff);
91 91
92 resizeContents(50,mRows * mCellHeight); 92 resizeContents(50,mRows * mCellHeight);
93 93
94 viewport()->setBackgroundMode( PaletteBackground ); 94 viewport()->setBackgroundMode( PaletteBackground );
95} 95}
96 96
97void TimeLabels::setCellHeight(int height) 97void TimeLabels::setCellHeight(int height)
98{ 98{
99 mCellHeight = height; 99 mCellHeight = height;
100} 100}
101 101
102/* 102/*
103 Optimization so that only the "dirty" portion of the scroll view 103 Optimization so that only the "dirty" portion of the scroll view
104 is redrawn. Unfortunately, this is not called by default paintEvent() method. 104 is redrawn. Unfortunately, this is not called by default paintEvent() method.
105*/ 105*/
106void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) 106void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
107{ 107{
108 108
109 // if ( globalFlagBlockAgenda ) 109 // if ( globalFlagBlockAgenda )
110 // return; 110 // return;
111 // bug: the parameters cx, cy, cw, ch are the areas that need to be 111 // bug: the parameters cx, cy, cw, ch are the areas that need to be
112 // redrawn, not the area of the widget. unfortunately, this 112 // redrawn, not the area of the widget. unfortunately, this
113 // code assumes the latter... 113 // code assumes the latter...
114 114
115 // now, for a workaround... 115 // now, for a workaround...
116 // these two assignments fix the weird redraw bug 116 // these two assignments fix the weird redraw bug
117 cx = contentsX() + 2; 117 cx = contentsX() + 2;
118 cw = contentsWidth() - 2; 118 cw = contentsWidth() - 2;
119 // end of workaround 119 // end of workaround
120 120
121 int cell = ((int)(cy/mCellHeight)); 121 int cell = ((int)(cy/mCellHeight));
122 int y = cell * mCellHeight; 122 int y = cell * mCellHeight;
123 QFontMetrics fm = fontMetrics(); 123 QFontMetrics fm = fontMetrics();
124 QString hour; 124 QString hour;
125 QString suffix; 125 QString suffix;
126 QString fullTime; 126 QString fullTime;
127 int tW = fm.width("24:00i"); 127 int tW = fm.width("24:00i");
128 128
129 while (y < cy + ch) { 129 while (y < cy + ch) {
130 p->drawLine(cx,y,cx+tW,y); 130 p->drawLine(cx,y,cx+tW,y);
131 hour.setNum(cell); 131 hour.setNum(cell);
132 suffix = "am"; 132 suffix = "am";
133 133
134 // handle 24h and am/pm time formats 134 // handle 24h and am/pm time formats
135 if (KGlobal::locale()->use12Clock()) { 135 if (KGlobal::locale()->use12Clock()) {
136 if (cell > 11) suffix = "pm"; 136 if (cell > 11) suffix = "pm";
137 if (cell == 0) hour.setNum(12); 137 if (cell == 0) hour.setNum(12);
138 if (cell > 12) hour.setNum(cell - 12); 138 if (cell > 12) hour.setNum(cell - 12);
139 } else { 139 } else {
140 suffix = ":00"; 140 suffix = ":00";
141 } 141 }
142 142
143 // create string in format of "XX:XX" or "XXpm/am" 143 // create string in format of "XX:XX" or "XXpm/am"
144 fullTime = hour + suffix; 144 fullTime = hour + suffix;
145 145
146 // center and draw the time label 146 // center and draw the time label
147 int timeWidth = fm.width(fullTime+"i"); 147 int timeWidth = fm.width(fullTime+"i");
148 int offset = this->width() - timeWidth; 148 int offset = this->width() - timeWidth;
149 int borderWidth = 5; 149 int borderWidth = 5;
150 int timeHeight = fm.height(); 150 int timeHeight = fm.height();
151 timeHeight = timeHeight + 2 - ( timeHeight / 4 ); 151 timeHeight = timeHeight + 2 - ( timeHeight / 4 );
152 p->drawText(cx -borderWidth + offset, y+ timeHeight, fullTime); 152 p->drawText(cx -borderWidth + offset, y+ timeHeight, fullTime);
153 153
154 // increment indices 154 // increment indices
155 y += mCellHeight; 155 y += mCellHeight;
156 cell++; 156 cell++;
157 } 157 }
158} 158}
159 159
160/** 160/**
161 Calculates the minimum width. 161 Calculates the minimum width.
162*/ 162*/
163int TimeLabels::minimumWidth() const 163int TimeLabels::minimumWidth() const
164{ 164{
165 QFontMetrics fm = fontMetrics(); 165 QFontMetrics fm = fontMetrics();
166 166
167 //TODO: calculate this value 167 //TODO: calculate this value
168 int borderWidth = 4; 168 int borderWidth = 4;
169 169
170 // the maximum width possible 170 // the maximum width possible
171 int width = fm.width("88:88x") + borderWidth; 171 int width = fm.width("88:88x") + borderWidth;
172 172
173 return width; 173 return width;
174} 174}
175 175
176/** updates widget's internal state */ 176/** updates widget's internal state */
177void TimeLabels::updateConfig() 177void TimeLabels::updateConfig()
178{ 178{
179 // set the font 179 // set the font
180 // config->setGroup("Fonts"); 180 // config->setGroup("Fonts");
181 // QFont font = config->readFontEntry("TimeBar Font"); 181 // QFont font = config->readFontEntry("TimeBar Font");
182 setFont(KOPrefs::instance()->mTimeBarFont); 182 setFont(KOPrefs::instance()->mTimeBarFont);
183 183
184 // update geometry restrictions based on new settings 184 // update geometry restrictions based on new settings
185 setFixedWidth(minimumWidth()); 185 setFixedWidth(minimumWidth());
186 186
187 // update HourSize 187 // update HourSize
188 mCellHeight = KOPrefs::instance()->mHourSize*4; 188 mCellHeight = KOPrefs::instance()->mHourSize*4;
189 resizeContents(50,mRows * mCellHeight); 189 resizeContents(50,mRows * mCellHeight);
190} 190}
191 191
192/** update time label positions */ 192/** update time label positions */
193void TimeLabels::positionChanged() 193void TimeLabels::positionChanged()
194{ 194{
195 int adjustment = mAgenda->contentsY(); 195 int adjustment = mAgenda->contentsY();
196 setContentsPos(0, adjustment); 196 setContentsPos(0, adjustment);
197} 197}
198 198
199/** */ 199/** */
200void TimeLabels::setAgenda(KOAgenda* agenda) 200void TimeLabels::setAgenda(KOAgenda* agenda)
201{ 201{
202 mAgenda = agenda; 202 mAgenda = agenda;
203} 203}
204 204
205 205
206/** This is called in response to repaint() */ 206/** This is called in response to repaint() */
207void TimeLabels::paintEvent(QPaintEvent*) 207void TimeLabels::paintEvent(QPaintEvent*)
208{ 208{
209 209
210 // kdDebug() << "paintevent..." << endl; 210 // kdDebug() << "paintevent..." << endl;
211 // this is another hack! 211 // this is another hack!
212 // QPainter painter(this); 212 // QPainter painter(this);
213 //QString c 213 //QString c
214 repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight()); 214 repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight());
215} 215}
216 216
217//////////////////////////////////////////////////////////////////////////// 217////////////////////////////////////////////////////////////////////////////
218 218
219EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) 219EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name)
220 : QFrame(parent,name) 220 : QFrame(parent,name)
221{ 221{
222 mColumns = 1; 222 mColumns = 1;
223 mTopBox = 0; 223 mTopBox = 0;
224 mLocation = loc; 224 mLocation = loc;
225 mTopLayout = 0; 225 mTopLayout = 0;
226 mPaintWidget = 0; 226 mPaintWidget = 0;
227 mXOffset = 0; 227 mXOffset = 0;
228 if (mLocation == Top) mPixmap = SmallIcon("1uparrow"); 228 if (mLocation == Top) mPixmap = SmallIcon("1uparrow");
229 else mPixmap = SmallIcon("1downarrow"); 229 else mPixmap = SmallIcon("1downarrow");
230 mEnabled.resize(mColumns); 230 mEnabled.resize(mColumns);
231 if (mLocation == Top) 231 if (mLocation == Top)
232 setMaximumHeight(0); 232 setMaximumHeight(0);
233 else 233 else
234 setMinimumHeight(mPixmap.height()); 234 setMinimumHeight(mPixmap.height());
235} 235}
236 236
237EventIndicator::~EventIndicator() 237EventIndicator::~EventIndicator()
238{ 238{
239} 239}
240 240
241void EventIndicator::drawContents(QPainter *p) 241void EventIndicator::drawContents(QPainter *p)
242{ 242{
243 243
244 // kdDebug() << "======== top: " << contentsRect().top() << " bottom " << // contentsRect().bottom() << " left " << contentsRect().left() << " right " << contentsRect().right() << endl; 244 // kdDebug() << "======== top: " << contentsRect().top() << " bottom " << // contentsRect().bottom() << " left " << contentsRect().left() << " right " << contentsRect().right() << endl;
245 KDGanttSplitterHandle* han = 0; 245 KDGanttSplitterHandle* han = 0;
246 if ( mPaintWidget ) 246 if ( mPaintWidget )
247 han = mPaintWidget->firstHandle(); 247 han = mPaintWidget->firstHandle();
248 if ( ! han ) { 248 if ( ! han ) {
249 int i; 249 int i;
250 for(i=0;i<mColumns;++i) { 250 for(i=0;i<mColumns;++i) {
251 if (mEnabled[i]) { 251 if (mEnabled[i]) {
252 int cellWidth = contentsRect().right()/mColumns; 252 int cellWidth = contentsRect().right()/mColumns;
253 int xOffset = KOGlobals::self()->reverseLayout() ? 253 int xOffset = KOGlobals::self()->reverseLayout() ?
254 (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 : 254 (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 :
255 i*cellWidth + cellWidth/2 -mPixmap.width()/2; 255 i*cellWidth + cellWidth/2 -mPixmap.width()/2;
256 p->drawPixmap(QPoint(xOffset,0),mPixmap); 256 p->drawPixmap(QPoint(xOffset,0),mPixmap);
257 } 257 }
258 } 258 }
259 } else { 259 } else {
260 han->repaint(); 260 han->repaint();
261 //mPaintWidget->setBackgroundColor( red ); 261 //mPaintWidget->setBackgroundColor( red );
262 262
263 QPainter pa( han ); 263 QPainter pa( han );
264 int i; 264 int i;
265 bool setColor = false; 265 bool setColor = false;
266 for(i=0;i<mColumns;++i) { 266 for(i=0;i<mColumns;++i) {
267 if (mEnabled[i]) { 267 if (mEnabled[i]) {
268 setColor = true; 268 setColor = true;
269 269
270 int cellWidth = contentsRect().right()/mColumns; 270 int cellWidth = contentsRect().right()/mColumns;
271 int xOffset = KOGlobals::self()->reverseLayout() ? 271 int xOffset = KOGlobals::self()->reverseLayout() ?
272 (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 : 272 (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 :
273 i*cellWidth + cellWidth/2 -mPixmap.width()/2; 273 i*cellWidth + cellWidth/2 -mPixmap.width()/2;
274 pa.drawPixmap(QPoint(mXOffset + xOffset,0),mPixmap); 274 pa.drawPixmap(QPoint(mXOffset + xOffset,0),mPixmap);
275 //qDebug("222draw pix %d ",xOffset ); 275 //qDebug("222draw pix %d ",xOffset );
276 276
277 } 277 }
278 278
279 } 279 }
280 pa.end(); 280 pa.end();
281 281
282 } 282 }
283} 283}
284 284
285void EventIndicator::setXOffset( int x ) 285void EventIndicator::setXOffset( int x )
286{ 286{
287 mXOffset = x; 287 mXOffset = x;
288} 288}
289void EventIndicator::setPaintWidget( KDGanttMinimizeSplitter * w ) 289void EventIndicator::setPaintWidget( KDGanttMinimizeSplitter * w )
290{ 290{
291 mPaintWidget = w; 291 mPaintWidget = w;
292} 292}
293void EventIndicator::changeColumns(int columns) 293void EventIndicator::changeColumns(int columns)
294{ 294{
295 mColumns = columns; 295 mColumns = columns;
296 mEnabled.resize(mColumns); 296 mEnabled.resize(mColumns);
297 297
298 update(); 298 update();
299} 299}
300 300
301void EventIndicator::enableColumn(int column, bool enable) 301void EventIndicator::enableColumn(int column, bool enable)
302{ 302{
303 mEnabled[column] = enable; 303 mEnabled[column] = enable;
304} 304}
305 305
306 306
307//////////////////////////////////////////////////////////////////////////// 307////////////////////////////////////////////////////////////////////////////
308//////////////////////////////////////////////////////////////////////////// 308////////////////////////////////////////////////////////////////////////////
309//////////////////////////////////////////////////////////////////////////// 309////////////////////////////////////////////////////////////////////////////
310 310
311KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : 311KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
312 KOEventView (cal,parent,name) 312 KOEventView (cal,parent,name)
313{ 313{
314 mBlockUpdating = true; 314 mBlockUpdating = true;
315 mStartHour = 8; 315 mStartHour = 8;
316 mSelectedDates.append(QDate::currentDate()); 316 mSelectedDates.append(QDate::currentDate());
317 317
318 mLayoutDayLabels = 0; 318 mLayoutDayLabels = 0;
319 mDayLabelsFrame = 0; 319 mDayLabelsFrame = 0;
320 mDayLabels = 0; 320 mDayLabels = 0;
321 bool isRTL = KOGlobals::self()->reverseLayout(); 321 bool isRTL = KOGlobals::self()->reverseLayout();
322 322
323 if ( KOPrefs::instance()->mVerticalScreen ) { 323 if ( KOPrefs::instance()->mVerticalScreen ) {
324 mExpandedPixmap = SmallIcon( "1downarrow" ); 324 mExpandedPixmap = SmallIcon( "1downarrow" );
325 mNotExpandedPixmap = SmallIcon( "1uparrow" ); 325 mNotExpandedPixmap = SmallIcon( "1uparrow" );
326 } else { 326 } else {
327 mExpandedPixmap = SmallIcon( isRTL ? "1leftarrow" : "1rightarrow" ); 327 mExpandedPixmap = SmallIcon( isRTL ? "1leftarrow" : "1rightarrow" );
328 mNotExpandedPixmap = SmallIcon( isRTL ? "1rightarrow" : "1leftarrow" ); 328 mNotExpandedPixmap = SmallIcon( isRTL ? "1rightarrow" : "1leftarrow" );
329 } 329 }
330 330
331 QBoxLayout *topLayout = new QVBoxLayout(this); 331 QBoxLayout *topLayout = new QVBoxLayout(this);
332 332
333 // Create day name labels for agenda columns 333 // Create day name labels for agenda columns
334 mDayLabelsFrame = new QHBox(this); 334 mDayLabelsFrame = new QHBox(this);
335 topLayout->addWidget(mDayLabelsFrame); 335 topLayout->addWidget(mDayLabelsFrame);
336 mDayLabels = new QFrame (mDayLabelsFrame); 336 mDayLabels = new QFrame (mDayLabelsFrame);
337 mLayoutDayLabels = new QHBoxLayout(mDayLabels); 337 mLayoutDayLabels = new QHBoxLayout(mDayLabels);
338 // Create agenda splitter 338 // Create agenda splitter
339#ifndef KORG_NOSPLITTER 339#ifndef KORG_NOSPLITTER
340 mSplitterAgenda = new QSplitter(Vertical,this); 340 mSplitterAgenda = new QSplitter(Vertical,this);
341 topLayout->addWidget(mSplitterAgenda); 341 topLayout->addWidget(mSplitterAgenda);
342 mSplitterAgenda->setOpaqueResize(); 342 mSplitterAgenda->setOpaqueResize();
343 343
344 mAllDayFrame = new QHBox(mSplitterAgenda); 344 mAllDayFrame = new QHBox(mSplitterAgenda);
345 345
346 QWidget *agendaFrame = new QWidget(mSplitterAgenda); 346 QWidget *agendaFrame = new QWidget(mSplitterAgenda);
347#else 347#else
348#if 0 348#if 0
349 QWidget *mainBox = new QWidget( this ); 349 QWidget *mainBox = new QWidget( this );
350 topLayout->addWidget( mainBox ); 350 topLayout->addWidget( mainBox );
351 QBoxLayout *mainLayout = new QVBoxLayout(mainBox); 351 QBoxLayout *mainLayout = new QVBoxLayout(mainBox);
352 mAllDayFrame = new QHBox(mainBox); 352 mAllDayFrame = new QHBox(mainBox);
353 mainLayout->addWidget(mAllDayFrame); 353 mainLayout->addWidget(mAllDayFrame);
354 mainLayout->setStretchFactor( mAllDayFrame, 0 ); 354 mainLayout->setStretchFactor( mAllDayFrame, 0 );
355 mAllDayFrame->setFocusPolicy(NoFocus); 355 mAllDayFrame->setFocusPolicy(NoFocus);
356 QWidget *agendaFrame = new QWidget(mainBox); 356 QWidget *agendaFrame = new QWidget(mainBox);
357 mainLayout->addWidget(agendaFrame); 357 mainLayout->addWidget(agendaFrame);
358 mainLayout->setStretchFactor( agendaFrame, 10 ); 358 mainLayout->setStretchFactor( agendaFrame, 10 );
359 359
360 agendaFrame->setFocusPolicy(NoFocus); 360 agendaFrame->setFocusPolicy(NoFocus);
361#endif 361#endif
362 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); 362 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this);
363 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 363 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
364 topLayout->addWidget( mSplitterAgenda ); 364 topLayout->addWidget( mSplitterAgenda );
365 mAllDayFrame = new QHBox(mSplitterAgenda); 365 mAllDayFrame = new QHBox(mSplitterAgenda);
366 mAllDayFrame->setFocusPolicy(NoFocus); 366 mAllDayFrame->setFocusPolicy(NoFocus);
367 QWidget *agendaFrame = new QWidget(mSplitterAgenda); 367 QWidget *agendaFrame = new QWidget(mSplitterAgenda);
368 agendaFrame->setFocusPolicy(NoFocus); 368 agendaFrame->setFocusPolicy(NoFocus);
369 369
370#endif 370#endif
371 371
372 // Create all-day agenda widget 372 // Create all-day agenda widget
373 mDummyAllDayLeft = new QVBox( mAllDayFrame ); 373 mDummyAllDayLeft = new QVBox( mAllDayFrame );
374 374
375 mExpandButton = new QPushButton(mDummyAllDayLeft); 375 mExpandButton = new QPushButton(mDummyAllDayLeft);
376 mExpandButton->setPixmap( mNotExpandedPixmap ); 376 mExpandButton->setPixmap( mNotExpandedPixmap );
377 int widebut = mExpandButton->sizeHint().width(); 377 int widebut = mExpandButton->sizeHint().width();
378 if ( QApplication::desktop()->width() < 480 ) 378 if ( QApplication::desktop()->width() < 480 )
379 widebut = widebut*2; 379 widebut = widebut*2;
380 else 380 else
381 widebut = (widebut*3) / 2; 381 widebut = (widebut*3) / 2;
382 //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, 382 //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
383 // QSizePolicy::Fixed ) ); 383 // QSizePolicy::Fixed ) );
384 mExpandButton->setFixedSize( widebut, widebut); 384 mExpandButton->setFixedSize( widebut, widebut);
385 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); 385 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
386 mExpandButton->setFocusPolicy(NoFocus); 386 mExpandButton->setFocusPolicy(NoFocus);
387 mAllDayAgenda = new KOAgenda(1,mAllDayFrame); 387 mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
388 mAllDayAgenda->setFocusPolicy(NoFocus); 388 mAllDayAgenda->setFocusPolicy(NoFocus);
389 QWidget *dummyAllDayRight = new QWidget(mAllDayFrame); 389 QWidget *dummyAllDayRight = new QWidget(mAllDayFrame);
390 390
391 // Create event context menu for all day agenda 391 // Create event context menu for all day agenda
392 mAllDayAgendaPopup = eventPopup(); 392 mAllDayAgendaPopup = eventPopup();
393 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), 393 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
394 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); 394 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
395 395
396 // Create agenda frame 396 // Create agenda frame
397 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,3,3); 397 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,3,3);
398 // QHBox *agendaFrame = new QHBox(splitterAgenda); 398 // QHBox *agendaFrame = new QHBox(splitterAgenda);
399 399
400 // create event indicator bars 400 // create event indicator bars
401 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); 401 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame);
402 agendaLayout->addWidget(mEventIndicatorTop,0,1); 402 agendaLayout->addWidget(mEventIndicatorTop,0,1);
403 mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); 403 mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
404 mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, 404 mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom,
405 agendaFrame); 405 agendaFrame);
406 agendaLayout->addWidget(mEventIndicatorBottom,2,1); 406 agendaLayout->addWidget(mEventIndicatorBottom,2,1);
407 QWidget *dummyAgendaRight = new QWidget(agendaFrame); 407 QWidget *dummyAgendaRight = new QWidget(agendaFrame);
408 agendaLayout->addWidget(dummyAgendaRight,0,2); 408 agendaLayout->addWidget(dummyAgendaRight,0,2);
409 409
410 // Create time labels 410 // Create time labels
411 mTimeLabels = new TimeLabels(24,agendaFrame); 411 mTimeLabels = new TimeLabels(24,agendaFrame);
412 agendaLayout->addWidget(mTimeLabels,1,0); 412 agendaLayout->addWidget(mTimeLabels,1,0);
413 413
414 // Create agenda 414 // Create agenda
415 mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame); 415 mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame);
416 agendaLayout->addMultiCellWidget(mAgenda,1,1,1,2); 416 agendaLayout->addMultiCellWidget(mAgenda,1,1,1,2);
417 agendaLayout->setColStretch(1,1); 417 agendaLayout->setColStretch(1,1);
418 mAgenda->setFocusPolicy(NoFocus); 418 mAgenda->setFocusPolicy(NoFocus);
419 // Create event context menu for agenda 419 // Create event context menu for agenda
420 mAgendaPopup = eventPopup(); 420 mAgendaPopup = eventPopup();
421 421
422 mAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), 422 mAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")),
423 i18n("Toggle Alarm"),mAgenda, 423 i18n("Toggle Alarm"),mAgenda,
424 SLOT(popupAlarm()),true); 424 SLOT(popupAlarm()),true);
425 425
426 426
427 connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), 427 connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
428 mAgendaPopup,SLOT(showIncidencePopup(Incidence *))); 428 mAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
429 429
430 // make connections between dependent widgets 430 // make connections between dependent widgets
431 mTimeLabels->setAgenda(mAgenda); 431 mTimeLabels->setAgenda(mAgenda);
432 432
433 // Update widgets to reflect user preferences 433 // Update widgets to reflect user preferences
434 // updateConfig(); 434 // updateConfig();
435 435
436 // createDayLabels(); 436 // createDayLabels();
437 437
438 // these blank widgets make the All Day Event box line up with the agenda 438 // these blank widgets make the All Day Event box line up with the agenda
439 dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); 439 dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width());
440 dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); 440 dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width());
441 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); 441 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
442 442
443 // Scrolling 443 // Scrolling
444 connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)), 444 connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)),
445 mTimeLabels, SLOT(positionChanged())); 445 mTimeLabels, SLOT(positionChanged()));
446 connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)), 446 connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)),
447 SLOT(setContentsPos(int))); 447 SLOT(setContentsPos(int)));
448 448
449 // Create/Show/Edit/Delete Event 449 // Create/Show/Edit/Delete Event
450 connect(mAgenda,SIGNAL(newEventSignal(int,int)), 450 connect(mAgenda,SIGNAL(newEventSignal(int,int)),
451 SLOT(newEvent(int,int))); 451 SLOT(newEvent(int,int)));
452 connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)), 452 connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)),
453 SLOT(newEvent(int,int,int,int))); 453 SLOT(newEvent(int,int,int,int)));
454 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)), 454 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)),
455 SLOT(newEventAllDay(int,int))); 455 SLOT(newEventAllDay(int,int)));
456 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)), 456 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)),
457 SLOT(newEventAllDay(int,int))); 457 SLOT(newEventAllDay(int,int)));
458 connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), 458 connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)),
459 SLOT(newTimeSpanSelected(int,int,int,int))); 459 SLOT(newTimeSpanSelected(int,int,int,int)));
460 connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), 460 connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)),
461 SLOT(newTimeSpanSelectedAllDay(int,int,int,int))); 461 SLOT(newTimeSpanSelectedAllDay(int,int,int,int)));
462 connect(mAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView())); 462 connect(mAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView()));
463 connect(mAllDayAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView())); 463 connect(mAllDayAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView()));
464 464
465 connect(mAgenda,SIGNAL(editIncidenceSignal(Incidence *)), 465 connect(mAgenda,SIGNAL(editIncidenceSignal(Incidence *)),
466 SIGNAL(editIncidenceSignal(Incidence *))); 466 SIGNAL(editIncidenceSignal(Incidence *)));
467 connect(mAllDayAgenda,SIGNAL(editIncidenceSignal(Incidence *)), 467 connect(mAllDayAgenda,SIGNAL(editIncidenceSignal(Incidence *)),
468 SIGNAL(editIncidenceSignal(Incidence *))); 468 SIGNAL(editIncidenceSignal(Incidence *)));
469 connect(mAgenda,SIGNAL(showIncidenceSignal(Incidence *)), 469 connect(mAgenda,SIGNAL(showIncidenceSignal(Incidence *)),
470 SIGNAL(showIncidenceSignal(Incidence *))); 470 SIGNAL(showIncidenceSignal(Incidence *)));
471 connect(mAllDayAgenda,SIGNAL(showIncidenceSignal(Incidence *)), 471 connect(mAllDayAgenda,SIGNAL(showIncidenceSignal(Incidence *)),
472 SIGNAL(showIncidenceSignal(Incidence *))); 472 SIGNAL(showIncidenceSignal(Incidence *)));
473 connect(mAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)), 473 connect(mAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)),
474 SIGNAL(deleteIncidenceSignal(Incidence *))); 474 SIGNAL(deleteIncidenceSignal(Incidence *)));
475 connect(mAllDayAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)), 475 connect(mAllDayAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)),
476 SIGNAL(deleteIncidenceSignal(Incidence *))); 476 SIGNAL(deleteIncidenceSignal(Incidence *)));
477 477
478 connect(mAgenda,SIGNAL(itemModified(KOAgendaItem *, int )), 478 connect(mAgenda,SIGNAL(itemModified(KOAgendaItem *, int )),
479 SLOT(updateEventDates(KOAgendaItem *, int ))); 479 SLOT(updateEventDates(KOAgendaItem *, int )));
480 connect(mAllDayAgenda,SIGNAL(itemModified(KOAgendaItem *, int )), 480 connect(mAllDayAgenda,SIGNAL(itemModified(KOAgendaItem *, int )),
481 SLOT(updateEventDates(KOAgendaItem *, int))); 481 SLOT(updateEventDates(KOAgendaItem *, int)));
482 482
483 // event indicator update 483 // event indicator update
484 connect(mAgenda,SIGNAL(lowerYChanged(int)), 484 connect(mAgenda,SIGNAL(lowerYChanged(int)),
485 SLOT(updateEventIndicatorTop(int))); 485 SLOT(updateEventIndicatorTop(int)));
486 connect(mAgenda,SIGNAL(upperYChanged(int)), 486 connect(mAgenda,SIGNAL(upperYChanged(int)),
487 SLOT(updateEventIndicatorBottom(int))); 487 SLOT(updateEventIndicatorBottom(int)));
488 // drag signals 488 // drag signals
489 /* 489 /*
490 connect(mAgenda,SIGNAL(startDragSignal(Event *)), 490 connect(mAgenda,SIGNAL(startDragSignal(Event *)),
491 SLOT(startDrag(Event *))); 491 SLOT(startDrag(Event *)));
492 connect(mAllDayAgenda,SIGNAL(startDragSignal(Event *)), 492 connect(mAllDayAgenda,SIGNAL(startDragSignal(Event *)),
493 SLOT(startDrag(Event *))); 493 SLOT(startDrag(Event *)));
494 */ 494 */
495 // synchronize selections 495 // synchronize selections
496 connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ), 496 connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ),
497 mAllDayAgenda, SLOT( deselectItem() ) ); 497 mAllDayAgenda, SLOT( deselectItem() ) );
498 connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ), 498 connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ),
499 mAgenda, SLOT( deselectItem() ) ); 499 mAgenda, SLOT( deselectItem() ) );
500 connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ), 500 connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ),
501 SIGNAL( incidenceSelected( Incidence * ) ) ); 501 SIGNAL( incidenceSelected( Incidence * ) ) );
502 connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ), 502 connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ),
503 SIGNAL( incidenceSelected( Incidence * ) ) ); 503 SIGNAL( incidenceSelected( Incidence * ) ) );
504 connect( mAgenda, SIGNAL( resizedSignal() ), 504 connect( mAgenda, SIGNAL( resizedSignal() ),
505 SLOT( updateConfig( ) ) ); 505 SLOT( updateConfig( ) ) );
506 connect( mAgenda, SIGNAL( addToCalSignal(Incidence *, Incidence *) ), 506 connect( mAgenda, SIGNAL( addToCalSignal(Incidence *, Incidence *) ),
507 SLOT( addToCalSlot(Incidence *, Incidence * ) ) ); 507 SLOT( addToCalSlot(Incidence *, Incidence * ) ) );
508 connect( mAllDayAgenda, SIGNAL( addToCalSignal(Incidence * ,Incidence *) ), 508 connect( mAllDayAgenda, SIGNAL( addToCalSignal(Incidence * ,Incidence *) ),
509 SLOT( addToCalSlot(Incidence * , Incidence *) ) ); 509 SLOT( addToCalSlot(Incidence * , Incidence *) ) );
510 // connect( mAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); 510 // connect( mAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) );
511 //connect( mAllDayAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); 511 //connect( mAllDayAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) );
512 512
513 513
514} 514}
515 515
516void KOAgendaView::toggleAllDay() 516void KOAgendaView::toggleAllDay()
517{ 517{
518 if ( mSplitterAgenda->firstHandle() ) 518 if ( mSplitterAgenda->firstHandle() )
519 mSplitterAgenda->firstHandle()->toggle(); 519 mSplitterAgenda->firstHandle()->toggle();
520} 520}
521void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) 521void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld )
522{ 522{
523 calendar()->addIncidence( inc ); 523 calendar()->addIncidence( inc );
524 524
525 if ( incOld ) { 525 if ( incOld ) {
526 if ( incOld->type() == "Todo" ) 526 if ( incOld->type() == "Todo" )
527 emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED ); 527 emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED );
528 else 528 else
529 emit incidenceChanged(incOld, KOGlobals::EVENTEDITED); 529 emit incidenceChanged(incOld, KOGlobals::EVENTEDITED);
530 } 530 }
531 531
532} 532}
533 533
534KOAgendaView::~KOAgendaView() 534KOAgendaView::~KOAgendaView()
535{ 535{
536 delete mAgendaPopup; 536 delete mAgendaPopup;
537 delete mAllDayAgendaPopup; 537 delete mAllDayAgendaPopup;
538 delete KOAgendaItem::paintPix(); 538 delete KOAgendaItem::paintPix();
539 delete KOAgendaItem::paintPixSel(); 539 delete KOAgendaItem::paintPixSel();
540} 540}
541void KOAgendaView::resizeEvent( QResizeEvent* e ) 541void KOAgendaView::resizeEvent( QResizeEvent* e )
542{ 542{
543 //qDebug("KOAgendaView::resizeEvent( QResizeEvent* e ) %d ", e->size().width()); 543 //qDebug("KOAgendaView::resizeEvent( QResizeEvent* e ) %d ", e->size().width());
544 bool uc = false; 544 bool uc = false;
545 int ow = e->oldSize().width(); 545 int ow = e->oldSize().width();
546 int oh = e->oldSize().height(); 546 int oh = e->oldSize().height();
547 int w = e->size().width(); 547 int w = e->size().width();
548 int h = e->size().height(); 548 int h = e->size().height();
549 if ( (ow > oh && w< h ) || (ow < oh && w > h ) ) { 549 if ( (ow > oh && w< h ) || (ow < oh && w > h ) ) {
550 if ( ! mBlockUpdating && !globalFlagBlockStartup && !globalFlagBlockAgenda ) 550 if ( ! mBlockUpdating && !globalFlagBlockStartup && !globalFlagBlockAgenda )
551 uc = true; 551 uc = true;
552 //qDebug("view changed %d %d %d %d ", ow, oh , w , h); 552 //qDebug("view changed %d %d %d %d ", ow, oh , w , h);
553 } 553 }
554 mUpcomingWidth = e->size().width() ; 554 mUpcomingWidth = e->size().width() ;
555 if ( mBlockUpdating || uc ) { 555 if ( mBlockUpdating || uc ) {
556 mBlockUpdating = false; 556 mBlockUpdating = false;
557 //mAgenda->setMinimumSize(800 , 600 ); 557 //mAgenda->setMinimumSize(800 , 600 );
558 //qDebug("mAgenda->resize+++++++++++++++ "); 558 //qDebug("mAgenda->resize+++++++++++++++ ");
559 updateConfig(); 559 updateConfig();
560 //qDebug("KOAgendaView::Updating now possible "); 560 //qDebug("KOAgendaView::Updating now possible ");
561 } else 561 } else
562 createDayLabels(); 562 createDayLabels();
563 //qDebug("resizeEvent end "); 563 //qDebug("resizeEvent end ");
564 564
565} 565}
566void KOAgendaView::createDayLabels() 566void KOAgendaView::createDayLabels()
567{ 567{
568 568
569 if ( mBlockUpdating || globalFlagBlockLabel == 1) { 569 if ( mBlockUpdating || globalFlagBlockLabel == 1) {
570 // qDebug(" KOAgendaView::createDayLabels() blocked "); 570 // qDebug(" KOAgendaView::createDayLabels() blocked ");
571 return; 571 return;
572 572
573 } 573 }
574 int newHight; 574 int newHight;
575 575
576 // ### Before deleting and recreating we could check if mSelectedDates changed... 576 // ### Before deleting and recreating we could check if mSelectedDates changed...
577 // It would remove some flickering and gain speed (since this is called by 577 // It would remove some flickering and gain speed (since this is called by
578 // each updateView() call) 578 // each updateView() call)
579 579
580 int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - 2; 580 int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - 2;
581 mDayLabelsFrame->setMaximumWidth( mUpcomingWidth ); 581 mDayLabelsFrame->setMaximumWidth( mUpcomingWidth );
582 if ( maxWid < 0 ) 582 if ( maxWid < 0 )
583 maxWid = 20; 583 maxWid = 20;
584 584
585 QFont dlf = KOPrefs::instance()->mTimeLabelsFont; 585 QFont dlf = KOPrefs::instance()->mTimeLabelsFont;
586 QFontMetrics fm ( dlf ); 586 QFontMetrics fm ( dlf );
587 int selCount = mSelectedDates.count(); 587 int selCount = mSelectedDates.count();
588 QString dayTest = "Mon 20"; 588 QString dayTest = "Mon 20";
589 int wid = fm.width( dayTest ); 589 int wid = fm.width( dayTest );
590 maxWid -= ( selCount * 3 ); 590 maxWid -= ( selCount * 3 );
591 if ( maxWid < 0 ) 591 if ( maxWid < 0 )
592 maxWid = 20; 592 maxWid = 20;
593 int needWid = wid * selCount; 593 int needWid = wid * selCount;
594 //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); 594 //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid );
595 //if ( needWid > maxWid ) 595 //if ( needWid > maxWid )
596 // qDebug("DAYLABELS TOOOOOOO BIG "); 596 // qDebug("DAYLABELS TOOOOOOO BIG ");
597 while ( needWid > maxWid ) { 597 while ( needWid > maxWid ) {
598 dayTest = dayTest.left( dayTest.length() - 1 ); 598 dayTest = dayTest.left( dayTest.length() - 1 );
599 wid = fm.width( dayTest ); 599 wid = fm.width( dayTest );
600 needWid = wid * selCount; 600 needWid = wid * selCount;
601 } 601 }
602 int maxLen = dayTest.length(); 602 int maxLen = dayTest.length();
603 int fontPoint = dlf.pointSize(); 603 int fontPoint = dlf.pointSize();
604 if ( maxLen < 2 ) { 604 if ( maxLen < 2 ) {
605 int fontPoint = dlf.pointSize(); 605 int fontPoint = dlf.pointSize();
606 while ( fontPoint > 4 ) { 606 while ( fontPoint > 4 ) {
607 --fontPoint; 607 --fontPoint;
608 dlf.setPointSize( fontPoint ); 608 dlf.setPointSize( fontPoint );
609 QFontMetrics f( dlf ); 609 QFontMetrics f( dlf );
610 wid = f.width( "20" ); 610 wid = f.width( "20" );
611 needWid = wid * selCount; 611 needWid = wid * selCount;
612 if ( needWid < maxWid ) 612 if ( needWid < maxWid )
613 break; 613 break;
614 } 614 }
615 maxLen = 2; 615 maxLen = 2;
616 } 616 }
617 //qDebug("Max len %d ", dayTest.length() ); 617 //qDebug("Max len %d ", dayTest.length() );
618 618
619 QFontMetrics tempF( dlf ); 619 QFontMetrics tempF( dlf );
620 newHight = tempF.height(); 620 newHight = tempF.height();
621 mDayLabels->setFont( dlf ); 621 mDayLabels->setFont( dlf );
622 // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; 622 // mLayoutDayLabels = new QHBoxLayout(mDayLabels);;
623 // mLayoutDayLabels->addSpacing(mTimeLabels->width()); 623 // mLayoutDayLabels->addSpacing(mTimeLabels->width());
624 //mLayoutDayLabels->addSpacing( 2 ); 624 //mLayoutDayLabels->addSpacing( 2 );
625 // QFont lFont = dlf; 625 // QFont lFont = dlf;
626 bool appendLabels = false; 626 bool appendLabels = false;
627 QLabel *dayLabel; 627 QLabel *dayLabel;
628 dayLabel = mDayLabelsList.first(); 628 dayLabel = mDayLabelsList.first();
629 if ( !dayLabel ) { 629 if ( !dayLabel ) {
630 appendLabels = true; 630 appendLabels = true;
631 dayLabel = new QLabel(mDayLabels); 631 dayLabel = new QLabel(mDayLabels);
632 mDayLabelsList.append( dayLabel ); 632 mDayLabelsList.append( dayLabel );
633 mLayoutDayLabels->addWidget(dayLabel); 633 mLayoutDayLabels->addWidget(dayLabel);
634 } 634 }
635 dayLabel->setFixedWidth( mTimeLabels->width()+2 ); 635 dayLabel->setFixedWidth( mTimeLabels->width()+2 );
636 dayLabel->setFont( dlf ); 636 dayLabel->setFont( dlf );
637 dayLabel->setAlignment(QLabel::AlignHCenter); 637 dayLabel->setAlignment(QLabel::AlignHCenter);
638 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); 638 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) );
639 dayLabel->show(); 639 dayLabel->show();
640 DateList::ConstIterator dit; 640 DateList::ConstIterator dit;
641 bool oneday = (mSelectedDates.first() == mSelectedDates.last() );
641 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { 642 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
642 QDate date = *dit; 643 QDate date = *dit;
643 // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); 644 // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels);
644 if ( ! appendLabels ) { 645 if ( ! appendLabels ) {
645 dayLabel = mDayLabelsList.next(); 646 dayLabel = mDayLabelsList.next();
646 if ( !dayLabel ) 647 if ( !dayLabel )
647 appendLabels = true; 648 appendLabels = true;
648 } 649 }
649 if ( appendLabels ) { 650 if ( appendLabels ) {
650 dayLabel = new QLabel(mDayLabels); 651 dayLabel = new QLabel(mDayLabels);
651 mDayLabelsList.append( dayLabel ); 652 mDayLabelsList.append( dayLabel );
652 mLayoutDayLabels->addWidget(dayLabel); 653 mLayoutDayLabels->addWidget(dayLabel);
653 } 654 }
654 dayLabel->setMinimumWidth( 1 ); 655 dayLabel->setMinimumWidth( 1 );
655 dayLabel->setMaximumWidth( 2048 ); 656 dayLabel->setMaximumWidth( 2048 );
656 dayLabel->setFont( dlf ); 657 dayLabel->setFont( dlf );
657 dayLabel->show(); 658 dayLabel->show();
658 QString str; 659 QString str;
659 int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); 660 int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date);
660 QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); 661 QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true );
661 switch ( maxLen ) { 662 switch ( maxLen ) {
662 case 2: 663 case 2:
663 str = QString::number( date.day() ); 664 str = QString::number( date.day() );
664 break; 665 break;
665 666
666 case 3: 667 case 3:
667 str = dayName.left( 1 ) +QString::number( date.day()); 668 str = dayName.left( 1 ) +QString::number( date.day());
668 669
669 break; 670 break;
670 case 4: 671 case 4:
671 str = dayName.left( 1 ) + " " +QString::number( date.day()); 672 str = dayName.left( 1 ) + " " +QString::number( date.day());
672 673
673 break; 674 break;
674 case 5: 675 case 5:
675 str = dayName.left( 2 ) + " " +QString::number( date.day()); 676 str = dayName.left( 2 ) + " " +QString::number( date.day());
676 677
677 break; 678 break;
678 case 6: 679 case 6:
679 str = dayName.left( 3 ) + " " +QString::number( date.day()); 680 str = dayName.left( 3 ) + " " +QString::number( date.day());
680 break; 681 break;
681 682
682 default: 683 default:
683 break; 684 break;
684 } 685 }
685 686 if ( oneday ) {
687 QString addString;
688 if ( mSelectedDates.first() == QDateTime::currentDateTime().date() )
689 addString = i18n("Today");
690 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
691 addString = i18n("Tomorrow");
692 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
693 addString = i18n("Yesterday");
694 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
695 addString = i18n("Day before yesterday");
696 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
697 addString = i18n("Day after tomorrow");
698 if ( !addString.isEmpty() ) {
699 str = addString+", " + str;
700 }
701 }
686 dayLabel->setText(str); 702 dayLabel->setText(str);
687 dayLabel->setAlignment(QLabel::AlignHCenter); 703 dayLabel->setAlignment(QLabel::AlignHCenter);
688 if (date == QDate::currentDate()) { 704 if (date == QDate::currentDate()) {
689 QFont bFont = dlf; 705 QFont bFont = dlf;
690 bFont.setBold( true ); 706 bFont.setBold( true );
691 dayLabel->setFont(bFont); 707 dayLabel->setFont(bFont);
692 } 708 }
693 //dayLayout->addWidget(dayLabel); 709 //dayLayout->addWidget(dayLabel);
694 710
695#ifndef KORG_NOPLUGINS 711#ifndef KORG_NOPLUGINS
696 CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); 712 CalendarDecoration::List cds = KOCore::self()->calendarDecorations();
697 CalendarDecoration *it; 713 CalendarDecoration *it;
698 for(it = cds.first(); it; it = cds.next()) { 714 for(it = cds.first(); it; it = cds.next()) {
699 QString text = it->shortText( date ); 715 QString text = it->shortText( date );
700 if ( !text.isEmpty() ) { 716 if ( !text.isEmpty() ) {
701 QLabel *label = new QLabel(text,mDayLabels); 717 QLabel *label = new QLabel(text,mDayLabels);
702 label->setAlignment(AlignCenter); 718 label->setAlignment(AlignCenter);
703 dayLayout->addWidget(label); 719 dayLayout->addWidget(label);
704 } 720 }
705 } 721 }
706 722
707 for(it = cds.first(); it; it = cds.next()) { 723 for(it = cds.first(); it; it = cds.next()) {
708 QWidget *wid = it->smallWidget(mDayLabels,date); 724 QWidget *wid = it->smallWidget(mDayLabels,date);
709 if ( wid ) { 725 if ( wid ) {
710 // wid->setHeight(20); 726 // wid->setHeight(20);
711 dayLayout->addWidget(wid); 727 dayLayout->addWidget(wid);
712 } 728 }
713 } 729 }
714#endif 730#endif
715 } 731 }
716 if ( ! appendLabels ) { 732 if ( ! appendLabels ) {
717 dayLabel = mDayLabelsList.next(); 733 dayLabel = mDayLabelsList.next();
718 if ( !dayLabel ) 734 if ( !dayLabel )
719 appendLabels = true; 735 appendLabels = true;
720 } 736 }
721 if ( appendLabels ) { 737 if ( appendLabels ) {
722 dayLabel = new QLabel(mDayLabels); 738 dayLabel = new QLabel(mDayLabels);
723 mDayLabelsList.append( dayLabel ); 739 mDayLabelsList.append( dayLabel );
724 mLayoutDayLabels->addWidget(dayLabel); 740 mLayoutDayLabels->addWidget(dayLabel);
725 } 741 }
726 //dayLabel->hide();//test only 742 //dayLabel->hide();//test only
727 743
728 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ; 744 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ;
729 if ( offset < 0 ) offset = 0; 745 if ( offset < 0 ) offset = 0;
730 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); 746 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 );
731 dayLabel->setText("");//QString::number ( mSelectedDates.first().month() ) ); 747 dayLabel->setText("");//QString::number ( mSelectedDates.first().month() ) );
732 dayLabel->show(); 748 dayLabel->show();
733 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset ); 749 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset );
734 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2); 750 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2);
735 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); 751 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2);
736 if ( !appendLabels ) { 752 if ( !appendLabels ) {
737 dayLabel = mDayLabelsList.next(); 753 dayLabel = mDayLabelsList.next();
738 while ( dayLabel ) { 754 while ( dayLabel ) {
739 //qDebug("!dayLabel %d",dayLabel ); 755 //qDebug("!dayLabel %d",dayLabel );
740 dayLabel->hide(); 756 dayLabel->hide();
741 dayLabel = mDayLabelsList.next(); 757 dayLabel = mDayLabelsList.next();
742 } 758 }
743 } 759 }
744 //mDayLabelsFrame->show(); 760 //mDayLabelsFrame->show();
745 //mDayLabels->show(); 761 //mDayLabels->show();
746 //qDebug("heigt %d %d %d ",mDayLabelsFrame->height(), mDayLabelsFrame->sizeHint().height(), newHight); 762 //qDebug("heigt %d %d %d ",mDayLabelsFrame->height(), mDayLabelsFrame->sizeHint().height(), newHight);
747 //mDayLabelsFrame->resize( mAgenda->visibleWidth(), newHight ); 763 //mDayLabelsFrame->resize( mAgenda->visibleWidth(), newHight );
748 mDayLabelsFrame->setFixedHeight( newHight ); 764 mDayLabelsFrame->setFixedHeight( newHight );
749} 765}
750 766
751int KOAgendaView::maxDatesHint() 767int KOAgendaView::maxDatesHint()
752{ 768{
753 // Not sure about the max number of events, so return 0 for now. 769 // Not sure about the max number of events, so return 0 for now.
754 return 0; 770 return 0;
755} 771}
756 772
757int KOAgendaView::currentDateCount() 773int KOAgendaView::currentDateCount()
758{ 774{
759 return mSelectedDates.count(); 775 return mSelectedDates.count();
760} 776}
761 777
762QPtrList<Incidence> KOAgendaView::selectedIncidences() 778QPtrList<Incidence> KOAgendaView::selectedIncidences()
763{ 779{
764 QPtrList<Incidence> selected; 780 QPtrList<Incidence> selected;
765 Incidence *incidence; 781 Incidence *incidence;
766 782
767 incidence = mAgenda->selectedIncidence(); 783 incidence = mAgenda->selectedIncidence();
768 if (incidence) selected.append(incidence); 784 if (incidence) selected.append(incidence);
769 785
770 incidence = mAllDayAgenda->selectedIncidence(); 786 incidence = mAllDayAgenda->selectedIncidence();
771 if (incidence) selected.append(incidence); 787 if (incidence) selected.append(incidence);
772 788
773 return selected; 789 return selected;
774} 790}
775 791
776DateList KOAgendaView::selectedDates() 792DateList KOAgendaView::selectedDates()
777{ 793{
778 DateList selected; 794 DateList selected;
779 QDate qd; 795 QDate qd;
780 796
781 qd = mAgenda->selectedIncidenceDate(); 797 qd = mAgenda->selectedIncidenceDate();
782 if (qd.isValid()) selected.append(qd); 798 if (qd.isValid()) selected.append(qd);
783 799
784 qd = mAllDayAgenda->selectedIncidenceDate(); 800 qd = mAllDayAgenda->selectedIncidenceDate();
785 if (qd.isValid()) selected.append(qd); 801 if (qd.isValid()) selected.append(qd);
786 802
787 return selected; 803 return selected;
788} 804}
789 805
790 806
791void KOAgendaView::updateView() 807void KOAgendaView::updateView()
792{ 808{
793 if ( mBlockUpdating ) 809 if ( mBlockUpdating )
794 return; 810 return;
795 // kdDebug() << "KOAgendaView::updateView()" << endl; 811 // kdDebug() << "KOAgendaView::updateView()" << endl;
796 fillAgenda(); 812 fillAgenda();
797 813
798} 814}
799 815
800 816
801/* 817/*
802 Update configuration settings for the agenda view. This method is not 818 Update configuration settings for the agenda view. This method is not
803 complete. 819 complete.
804*/ 820*/
805void KOAgendaView::updateConfig() 821void KOAgendaView::updateConfig()
806{ 822{
807 if ( mBlockUpdating ) 823 if ( mBlockUpdating )
808 return; 824 return;
809 // kdDebug() << "KOAgendaView::updateConfig()" << endl; 825 // kdDebug() << "KOAgendaView::updateConfig()" << endl;
810 826
811 // update config for children 827 // update config for children
812 mTimeLabels->updateConfig(); 828 mTimeLabels->updateConfig();
813 mAgenda->storePosition(); 829 mAgenda->storePosition();
814 mAgenda->updateConfig(); 830 mAgenda->updateConfig();
815 mAllDayAgenda->updateConfig(); 831 mAllDayAgenda->updateConfig();
816 // widget synchronization 832 // widget synchronization
817 //TODO: find a better way, maybe signal/slot 833 //TODO: find a better way, maybe signal/slot
818 mTimeLabels->positionChanged(); 834 mTimeLabels->positionChanged();
819 835
820 // for some reason, this needs to be called explicitly 836 // for some reason, this needs to be called explicitly
821 mTimeLabels->repaint(); 837 mTimeLabels->repaint();
822 838
823 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); 839 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
824 840
825 // ToolTips displaying summary of events 841 // ToolTips displaying summary of events
826 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() 842 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
827 ->mEnableToolTips); 843 ->mEnableToolTips);
828 844
829 //setHolidayMasks(); 845 //setHolidayMasks();
830 846
831 //createDayLabels(); called by via updateView(); 847 //createDayLabels(); called by via updateView();
832 mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth()); 848 mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth());
833 updateView(); 849 updateView();
834 mAgenda->restorePosition(); 850 mAgenda->restorePosition();
835} 851}
836 852
837 853
838void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) 854void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
839{ 855{
840 // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl; 856 // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl;
841 //qDebug("KOAgendaView::updateEventDates "); 857 //qDebug("KOAgendaView::updateEventDates ");
842 QDateTime startDt,endDt; 858 QDateTime startDt,endDt;
843 QDate startDate; 859 QDate startDate;
844 int lenInSecs; 860 int lenInSecs;
845 // if ( type == KOAgenda::RESIZETOP ) 861 // if ( type == KOAgenda::RESIZETOP )
846 // qDebug("RESIZETOP "); 862 // qDebug("RESIZETOP ");
847 // if ( type == KOAgenda::RESIZEBOTTOM ) 863 // if ( type == KOAgenda::RESIZEBOTTOM )
848 // qDebug("RESIZEBOTTOM "); 864 // qDebug("RESIZEBOTTOM ");
849 // if ( type == KOAgenda::MOVE ) 865 // if ( type == KOAgenda::MOVE )
850 // qDebug("MOVE "); 866 // qDebug("MOVE ");
851 if ( item->incidence()->type() == "Event" ) { 867 if ( item->incidence()->type() == "Event" ) {
852 startDt =item->incidence()->dtStart(); 868 startDt =item->incidence()->dtStart();
853 endDt = item->incidence()->dtEnd(); 869 endDt = item->incidence()->dtEnd();
854 lenInSecs = startDt.secsTo( endDt ); 870 lenInSecs = startDt.secsTo( endDt );
855 } 871 }
856 872
857 // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); 873 // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED );
858 874
859 if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { 875 if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) {
860 startDate = mSelectedDates[item->mLastMoveXPos]; 876 startDate = mSelectedDates[item->mLastMoveXPos];
861 } else { 877 } else {
862 if (item->cellX() < 0) { 878 if (item->cellX() < 0) {
863 startDate = (mSelectedDates.first()).addDays(item->cellX()); 879 startDate = (mSelectedDates.first()).addDays(item->cellX());
864 } else { 880 } else {
865 startDate = mSelectedDates[item->cellX()]; 881 startDate = mSelectedDates[item->cellX()];
866 } 882 }
867 } 883 }
868 startDt.setDate(startDate); 884 startDt.setDate(startDate);
869 885
870 if (item->incidence()->doesFloat()) { 886 if (item->incidence()->doesFloat()) {
871 endDt.setDate(startDate.addDays(item->cellWidth() - 1)); 887 endDt.setDate(startDate.addDays(item->cellWidth() - 1));
872 } else { 888 } else {
873 if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) 889 if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE )
874 startDt.setTime(mAgenda->gyToTime(item->cellYTop())); 890 startDt.setTime(mAgenda->gyToTime(item->cellYTop()));
875 if ( item->incidence()->type() == "Event" ) { 891 if ( item->incidence()->type() == "Event" ) {
876 if ( type == KOAgenda::MOVE ) { 892 if ( type == KOAgenda::MOVE ) {
877 endDt = startDt.addSecs(lenInSecs); 893 endDt = startDt.addSecs(lenInSecs);
878 894
879 } else if ( type == KOAgenda::RESIZEBOTTOM ) { 895 } else if ( type == KOAgenda::RESIZEBOTTOM ) {
880 if (item->lastMultiItem()) { 896 if (item->lastMultiItem()) {
881 endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); 897 endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1));
882 endDt.setDate(startDate. 898 endDt.setDate(startDate.
883 addDays(item->lastMultiItem()->cellX() - item->cellX())); 899 addDays(item->lastMultiItem()->cellX() - item->cellX()));
884 } else { 900 } else {
885 endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); 901 endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1));
886 endDt.setDate(startDate); 902 endDt.setDate(startDate);
887 } 903 }
888 } 904 }
889 } else { 905 } else {
890 // todo 906 // todo
891 if (item->lastMultiItem()) { 907 if (item->lastMultiItem()) {
892 endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); 908 endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1));
893 endDt.setDate(startDate. 909 endDt.setDate(startDate.
894 addDays(item->lastMultiItem()->cellX() - item->cellX())); 910 addDays(item->lastMultiItem()->cellX() - item->cellX()));
895 } else { 911 } else {
896 //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); 912 //qDebug("tem->cellYBottom() %d",item->cellYBottom() );
897 if ( item->cellYBottom() > 0 ) 913 if ( item->cellYBottom() > 0 )
898 endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); 914 endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1));
899 else 915 else
900 endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); 916 endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time());
901 endDt.setDate(startDate); 917 endDt.setDate(startDate);
902 } 918 }
903 } 919 }
904 } 920 }
905 921
906 922
907 if ( item->incidence()->type() == "Event" ) { 923 if ( item->incidence()->type() == "Event" ) {
908 item->incidence()->setDtStart(startDt); 924 item->incidence()->setDtStart(startDt);
909 (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); 925 (static_cast<Event*>(item->incidence()))->setDtEnd(endDt);
910 } else if ( item->incidence()->type() == "Todo" ) { 926 } else if ( item->incidence()->type() == "Todo" ) {
911 (static_cast<Todo*>(item->incidence()))->setDtDue(endDt); 927 (static_cast<Todo*>(item->incidence()))->setDtDue(endDt);
912 } 928 }
913 //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); 929 //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() );
914 item->incidence()->setRevision(item->incidence()->revision()+1); 930 item->incidence()->setRevision(item->incidence()->revision()+1);
915 item->setItemDate(startDt.date()); 931 item->setItemDate(startDt.date());
916 //item->updateItem(); 932 //item->updateItem();
917 if ( item->incidence()->type() == "Todo" ) { 933 if ( item->incidence()->type() == "Todo" ) {
918 emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); 934 emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED );
919 935
920 } 936 }
921 else 937 else
922 emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); 938 emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED);
923 item->updateItem(); 939 item->updateItem();
924} 940}
925 941
926void KOAgendaView::showDates( const QDate &start, const QDate &end ) 942void KOAgendaView::showDates( const QDate &start, const QDate &end )
927{ 943{
928 // kdDebug() << "KOAgendaView::selectDates" << endl; 944 // kdDebug() << "KOAgendaView::selectDates" << endl;
929 945
930 mSelectedDates.clear(); 946 mSelectedDates.clear();
931 // qDebug("KOAgendaView::showDates "); 947 // qDebug("KOAgendaView::showDates ");
932 QDate d = start; 948 QDate d = start;
933 while (d <= end) { 949 while (d <= end) {
934 mSelectedDates.append(d); 950 mSelectedDates.append(d);
935 d = d.addDays( 1 ); 951 d = d.addDays( 1 );
936 } 952 }
937 953
938 // and update the view 954 // and update the view
939 fillAgenda(); 955 fillAgenda();
940} 956}
941 957
942 958
943void KOAgendaView::showEvents(QPtrList<Event>) 959void KOAgendaView::showEvents(QPtrList<Event>)
944{ 960{
945 kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; 961 kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl;
946} 962}
947 963
948void KOAgendaView::changeEventDisplay(Event *, int) 964void KOAgendaView::changeEventDisplay(Event *, int)
949{ 965{
950 // qDebug("KOAgendaView::changeEventDisplay "); 966 // qDebug("KOAgendaView::changeEventDisplay ");
951 // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; 967 // kdDebug() << "KOAgendaView::changeEventDisplay" << endl;
952 // this should be re-written to be MUCH smarter. Right now we 968 // this should be re-written to be MUCH smarter. Right now we
953 // are just playing dumb. 969 // are just playing dumb.
954 fillAgenda(); 970 fillAgenda();
955} 971}
956 972
957void KOAgendaView::fillAgenda(const QDate &) 973void KOAgendaView::fillAgenda(const QDate &)
958{ 974{
959 // qDebug("KOAgendaView::fillAgenda "); 975 // qDebug("KOAgendaView::fillAgenda ");
960 fillAgenda(); 976 fillAgenda();
961} 977}
962 978
963void KOAgendaView::fillAgenda() 979void KOAgendaView::fillAgenda()
964{ 980{
965 if ( globalFlagBlockStartup ) 981 if ( globalFlagBlockStartup )
966 return; 982 return;
967 if ( globalFlagBlockAgenda == 1 ) 983 if ( globalFlagBlockAgenda == 1 )
968 return; 984 return;
969 //if ( globalFlagBlockAgenda == 2 ) 985 //if ( globalFlagBlockAgenda == 2 )
970 //globalFlagBlockAgenda = 0; 986 //globalFlagBlockAgenda = 0;
971 // globalFlagBlockPainting = false; 987 // globalFlagBlockPainting = false;
972 if ( globalFlagBlockAgenda == 0 ) 988 if ( globalFlagBlockAgenda == 0 )
973 globalFlagBlockAgenda = 1; 989 globalFlagBlockAgenda = 1;
974 // clearView(); 990 // clearView();
975 //qDebug("fillAgenda()++++ "); 991 //qDebug("fillAgenda()++++ ");
976 globalFlagBlockAgendaItemPaint = 1; 992 globalFlagBlockAgendaItemPaint = 1;
977 mAllDayAgenda->changeColumns(mSelectedDates.count()); 993 mAllDayAgenda->changeColumns(mSelectedDates.count());
978 mAgenda->changeColumns(mSelectedDates.count()); 994 mAgenda->changeColumns(mSelectedDates.count());
979 qApp->processEvents(); 995 qApp->processEvents();
980 mEventIndicatorTop->changeColumns(mSelectedDates.count()); 996 mEventIndicatorTop->changeColumns(mSelectedDates.count());
981 mEventIndicatorBottom->changeColumns(mSelectedDates.count()); 997 mEventIndicatorBottom->changeColumns(mSelectedDates.count());
982 setHolidayMasks(); 998 setHolidayMasks();
983 999
984 //mAgenda->hideUnused(); 1000 //mAgenda->hideUnused();
985 //mAllDayAgenda->hideUnused(); 1001 //mAllDayAgenda->hideUnused();
986 1002
987 // mAgenda->blockNextRepaint( false ); 1003 // mAgenda->blockNextRepaint( false );
988 // mAgenda->viewport()->repaint(); 1004 // mAgenda->viewport()->repaint();
989 // mAgenda->blockNextRepaint( true ); 1005 // mAgenda->blockNextRepaint( true );
990 mMinY.resize(mSelectedDates.count()); 1006 mMinY.resize(mSelectedDates.count());
991 mMaxY.resize(mSelectedDates.count()); 1007 mMaxY.resize(mSelectedDates.count());
992 1008
993 QPtrList<Event> dayEvents; 1009 QPtrList<Event> dayEvents;
994 1010
995 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1011 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
996 // Therefore, get all of them. 1012 // Therefore, get all of them.
997 QPtrList<Todo> todos = calendar()->todos(); 1013 QPtrList<Todo> todos = calendar()->todos();
998 1014
999 mAgenda->setDateList(mSelectedDates); 1015 mAgenda->setDateList(mSelectedDates);
1000 1016
1001 QDate today = QDate::currentDate(); 1017 QDate today = QDate::currentDate();
1002 1018
1003 DateList::ConstIterator dit; 1019 DateList::ConstIterator dit;
1004 int curCol = 0; 1020 int curCol = 0;
1005 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { 1021 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
1006 QDate currentDate = *dit; 1022 QDate currentDate = *dit;
1007 // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() 1023 // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString()
1008 // << endl; 1024 // << endl;
1009 1025
1010 dayEvents = calendar()->events(currentDate,true); 1026 dayEvents = calendar()->events(currentDate,true);
1011 1027
1012 // Default values, which can never be reached 1028 // Default values, which can never be reached
1013 mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; 1029 mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1;
1014 mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; 1030 mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1;
1015 1031
1016 unsigned int numEvent; 1032 unsigned int numEvent;
1017 for(numEvent=0;numEvent<dayEvents.count();++numEvent) { 1033 for(numEvent=0;numEvent<dayEvents.count();++numEvent) {
1018 Event *event = dayEvents.at(numEvent); 1034 Event *event = dayEvents.at(numEvent);
1019 if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) 1035 if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") )
1020 if ( event->uid().left(15) == QString("last-syncEvent-") ) 1036 if ( event->uid().left(15) == QString("last-syncEvent-") )
1021 continue; 1037 continue;
1022 // kdDebug() << " Event: " << event->summary() << endl; 1038 // kdDebug() << " Event: " << event->summary() << endl;
1023 1039
1024 int beginX = currentDate.daysTo(event->dtStart().date()) + curCol; 1040 int beginX = currentDate.daysTo(event->dtStart().date()) + curCol;
1025 int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; 1041 int endX = currentDate.daysTo(event->dtEnd().date()) + curCol;
1026 1042
1027 // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; 1043 // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl;
1028 1044
1029 if (event->doesFloat()) { 1045 if (event->doesFloat()) {
1030 if (event->recurrence()->doesRecur()) { 1046 if (event->recurrence()->doesRecur()) {
1031 mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); 1047 mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
1032 } else { 1048 } else {
1033 if (beginX <= 0 && curCol == 0) { 1049 if (beginX <= 0 && curCol == 0) {
1034 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); 1050 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1035 } else if (beginX == curCol) { 1051 } else if (beginX == curCol) {
1036 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); 1052 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1037 } 1053 }
1038 } 1054 }
1039 } else if (event->isMultiDay()) { 1055 } else if (event->isMultiDay()) {
1040 if ( event->doesRecur () ) { 1056 if ( event->doesRecur () ) {
1041 QDate dateit = currentDate; 1057 QDate dateit = currentDate;
1042 int count = 0; 1058 int count = 0;
1043 int max = event->dtStart().daysTo( event->dtEnd() ) +2; 1059 int max = event->dtStart().daysTo( event->dtEnd() ) +2;
1044 while (! event->recursOn( dateit ) && count <= max ) { 1060 while (! event->recursOn( dateit ) && count <= max ) {
1045 ++count; 1061 ++count;
1046 dateit = dateit.addDays( -1 ); 1062 dateit = dateit.addDays( -1 );
1047 } 1063 }
1048 bool ok; 1064 bool ok;
1049 QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok ); 1065 QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok );
1050 if ( ok ) 1066 if ( ok )
1051 { 1067 {
1052 int secs = event->dtStart().secsTo( event->dtEnd() ); 1068 int secs = event->dtStart().secsTo( event->dtEnd() );
1053 QDateTime nextOcend =nextOcstart.addSecs( secs ); ; 1069 QDateTime nextOcend =nextOcstart.addSecs( secs ); ;
1054 beginX = currentDate.daysTo(nextOcstart.date()) + curCol; 1070 beginX = currentDate.daysTo(nextOcstart.date()) + curCol;
1055 endX = currentDate.daysTo(nextOcend.date()) + curCol; 1071 endX = currentDate.daysTo(nextOcend.date()) + curCol;
1056 1072
1057 } 1073 }
1058 } 1074 }
1059 int startY = mAgenda->timeToY(event->dtStart().time()); 1075 int startY = mAgenda->timeToY(event->dtStart().time());
1060 int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; 1076 int endY = mAgenda->timeToY(event->dtEnd().time()) - 1;
1061 //qDebug("insert %d %d %d %d %d ",beginX,endX,startY,endY , curCol ); 1077 //qDebug("insert %d %d %d %d %d ",beginX,endX,startY,endY , curCol );
1062 if ((beginX <= 0 && curCol == 0) || beginX == curCol) { 1078 if ((beginX <= 0 && curCol == 0) || beginX == curCol) {
1063 //qDebug("insert!!! "); 1079 //qDebug("insert!!! ");
1064 mAgenda->insertMultiItem(event,currentDate,beginX,endX,startY,endY); 1080 mAgenda->insertMultiItem(event,currentDate,beginX,endX,startY,endY);
1065 } 1081 }
1066 if (beginX == curCol) { 1082 if (beginX == curCol) {
1067 mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); 1083 mMaxY[curCol] = mAgenda->timeToY(QTime(23,59));
1068 if (startY < mMinY[curCol]) mMinY[curCol] = startY; 1084 if (startY < mMinY[curCol]) mMinY[curCol] = startY;
1069 } else if (endX == curCol) { 1085 } else if (endX == curCol) {
1070 mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); 1086 mMinY[curCol] = mAgenda->timeToY(QTime(0,0));
1071 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; 1087 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY;
1072 } else { 1088 } else {
1073 mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); 1089 mMinY[curCol] = mAgenda->timeToY(QTime(0,0));
1074 mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); 1090 mMaxY[curCol] = mAgenda->timeToY(QTime(23,59));
1075 } 1091 }
1076 } else { 1092 } else {
1077 int startY = mAgenda->timeToY(event->dtStart().time()); 1093 int startY = mAgenda->timeToY(event->dtStart().time());
1078 int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; 1094 int endY = mAgenda->timeToY(event->dtEnd().time()) - 1;
1079 if (endY < startY) endY = startY; 1095 if (endY < startY) endY = startY;
1080 mAgenda->insertItem(event,currentDate,curCol,startY,endY); 1096 mAgenda->insertItem(event,currentDate,curCol,startY,endY);
1081 if (startY < mMinY[curCol]) mMinY[curCol] = startY; 1097 if (startY < mMinY[curCol]) mMinY[curCol] = startY;
1082 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; 1098 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY;
1083 } 1099 }
1084 } 1100 }
1085 // ---------- [display Todos -------------- 1101 // ---------- [display Todos --------------
1086 unsigned int numTodo; 1102 unsigned int numTodo;
1087 for (numTodo = 0; numTodo < todos.count(); ++numTodo) { 1103 for (numTodo = 0; numTodo < todos.count(); ++numTodo) {
1088 Todo *todo = todos.at(numTodo); 1104 Todo *todo = todos.at(numTodo);
1089 1105
1090 if ( ! todo->hasDueDate() ) continue; // todo shall not be displayed if it has no date 1106 if ( ! todo->hasDueDate() ) continue; // todo shall not be displayed if it has no date
1091 1107
1092 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1108 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
1093 // Already completed items can be displayed on their original due date 1109 // Already completed items can be displayed on their original due date
1094 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda 1110 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda
1095 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; 1111 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda;
1096 1112
1097 if ( ((todo->dtDue().date() == currentDate) && !overdue) || 1113 if ( ((todo->dtDue().date() == currentDate) && !overdue) ||
1098 ((currentDate == today) && overdue) ) { 1114 ((currentDate == today) && overdue) ) {
1099 if ( todo->doesFloat() || overdue ) { // Todo has no due-time set or is already overdue 1115 if ( todo->doesFloat() || overdue ) { // Todo has no due-time set or is already overdue
1100 if ( KOPrefs::instance()->mShowTodoInAgenda ) 1116 if ( KOPrefs::instance()->mShowTodoInAgenda )
1101 mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); 1117 mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol);
1102 } 1118 }
1103 else { 1119 else {
1104 1120
1105 int endY = mAgenda->timeToY(todo->dtDue().time()) - 1; 1121 int endY = mAgenda->timeToY(todo->dtDue().time()) - 1;
1106 int hi = (18/KOPrefs::instance()->mHourSize); 1122 int hi = (18/KOPrefs::instance()->mHourSize);
1107 //qDebug("hei %d ",KOPrefs::instance()->mHourSize); 1123 //qDebug("hei %d ",KOPrefs::instance()->mHourSize);
1108 int startY = endY -hi; 1124 int startY = endY -hi;
1109 1125
1110 mAgenda->insertItem(todo,currentDate,curCol,startY,endY); 1126 mAgenda->insertItem(todo,currentDate,curCol,startY,endY);
1111 1127
1112 if (startY < mMinY[curCol]) mMinY[curCol] = startY; 1128 if (startY < mMinY[curCol]) mMinY[curCol] = startY;
1113 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; 1129 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY;
1114 } 1130 }
1115 } 1131 }
1116 } 1132 }
1117 // ---------- display Todos] -------------- 1133 // ---------- display Todos] --------------
1118 1134
1119 ++curCol; 1135 ++curCol;
1120 } 1136 }
1121 mAgenda->hideUnused(); 1137 mAgenda->hideUnused();
1122 mAllDayAgenda->hideUnused(); 1138 mAllDayAgenda->hideUnused();
1123 mAgenda->checkScrollBoundaries(); 1139 mAgenda->checkScrollBoundaries();
1124 1140
1125 deleteSelectedDateTime(); 1141 deleteSelectedDateTime();
1126 1142
1127 createDayLabels(); 1143 createDayLabels();
1128 emit incidenceSelected( 0 ); 1144 emit incidenceSelected( 0 );
1129 1145
1130 if ( globalFlagBlockAgenda == 2 ) { 1146 if ( globalFlagBlockAgenda == 2 ) {
1131 if ( KOPrefs::instance()->mSetTimeToDayStartAt ) 1147 if ( KOPrefs::instance()->mSetTimeToDayStartAt )
1132 setStartHour( KOPrefs::instance()->mDayBegins ); 1148 setStartHour( KOPrefs::instance()->mDayBegins );
1133 else if ( KOPrefs::instance()->mCenterOnCurrentTime ) 1149 else if ( KOPrefs::instance()->mCenterOnCurrentTime )
1134 setStartHour( QTime::currentTime ().hour() ); 1150 setStartHour( QTime::currentTime ().hour() );
1135 // qApp->processEvents(); 1151 // qApp->processEvents();
1136 } 1152 }
1137 qApp->processEvents(); 1153 qApp->processEvents();
1138 //qDebug("qApp->processEvents(); END "); 1154 //qDebug("qApp->processEvents(); END ");
1139 globalFlagBlockAgenda = 0; 1155 globalFlagBlockAgenda = 0;
1140 1156
1141 // mAgenda->hideUnused(); 1157 // mAgenda->hideUnused();
1142 //mAllDayAgenda->hideUnused(); 1158 //mAllDayAgenda->hideUnused();
1143 mAllDayAgenda->drawContentsToPainter(); 1159 mAllDayAgenda->drawContentsToPainter();
1144 mAgenda->drawContentsToPainter(); 1160 mAgenda->drawContentsToPainter();
1145 repaintAgenda(); 1161 repaintAgenda();
1146 // mAgenda->finishUpdate(); 1162 // mAgenda->finishUpdate();
1147 //mAllDayAgenda->finishUpdate(); 1163 //mAllDayAgenda->finishUpdate();
1148 1164
1149 // repaintAgenda(); 1165 // repaintAgenda();
1150 //qApp->processEvents(); 1166 //qApp->processEvents();
1151 // globalFlagBlockAgenda = 0; 1167 // globalFlagBlockAgenda = 0;
1152} 1168}
1153void KOAgendaView::repaintAgenda() 1169void KOAgendaView::repaintAgenda()
1154{ 1170{
1155 // mAllDayAgenda->drawContentsToPainter(); 1171 // mAllDayAgenda->drawContentsToPainter();
1156// mAllDayAgenda->viewport()->repaint( false ); 1172// mAllDayAgenda->viewport()->repaint( false );
1157// mAgenda->drawContentsToPainter(); 1173// mAgenda->drawContentsToPainter();
1158// mAgenda->viewport()->repaint( false ); 1174// mAgenda->viewport()->repaint( false );
1159// qApp->processEvents(); 1175// qApp->processEvents();
1160 1176
1161 //qDebug("KOAgendaView::repaintAgenda() "); 1177 //qDebug("KOAgendaView::repaintAgenda() ");
1162 //qApp->processEvents(); 1178 //qApp->processEvents();
1163 mAgenda->viewport()->repaint( false ); 1179 mAgenda->viewport()->repaint( false );
1164 mAllDayAgenda->viewport()->repaint( false ); 1180 mAllDayAgenda->viewport()->repaint( false );
1165 mAgenda->finishUpdate(); 1181 mAgenda->finishUpdate();
1166 mAllDayAgenda->finishUpdate(); 1182 mAllDayAgenda->finishUpdate();
1167} 1183}
1168 1184
1169 1185
1170void KOAgendaView::clearView() 1186void KOAgendaView::clearView()
1171{ 1187{
1172 // kdDebug() << "ClearView" << endl; 1188 // kdDebug() << "ClearView" << endl;
1173 mAllDayAgenda->clear(); 1189 mAllDayAgenda->clear();
1174 mAgenda->clear(); 1190 mAgenda->clear();
1175} 1191}
1176 1192
1177void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd, 1193void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1178 const QDate &td) 1194 const QDate &td)
1179{ 1195{
1180#ifndef KORG_NOPRINTER 1196#ifndef KORG_NOPRINTER
1181 if (fd == td) 1197 if (fd == td)
1182 calPrinter->preview(CalPrinter::Day, fd, td); 1198 calPrinter->preview(CalPrinter::Day, fd, td);
1183 else 1199 else
1184 calPrinter->preview(CalPrinter::Week, fd, td); 1200 calPrinter->preview(CalPrinter::Week, fd, td);
1185#endif 1201#endif
1186} 1202}
1187 1203
1188// void KOAgendaView::updateMovedTodo() 1204// void KOAgendaView::updateMovedTodo()
1189// { 1205// {
1190// // updateConfig(); 1206// // updateConfig();
1191// // emit updateTodoViews(); 1207// // emit updateTodoViews();
1192// } 1208// }
1193 1209
1194void KOAgendaView::newEvent(int gx, int gy) 1210void KOAgendaView::newEvent(int gx, int gy)
1195{ 1211{
1196 if (!mSelectedDates.count()) return; 1212 if (!mSelectedDates.count()) return;
1197 1213
1198 QDate day = mSelectedDates[gx]; 1214 QDate day = mSelectedDates[gx];
1199 1215
1200 QTime time = mAgenda->gyToTime(gy); 1216 QTime time = mAgenda->gyToTime(gy);
1201 QDateTime dt(day,time); 1217 QDateTime dt(day,time);
1202 // if ( dt < QDateTime::currentDateTime () ) 1218 // if ( dt < QDateTime::currentDateTime () )
1203 // dt = QDateTime::currentDateTime ().addSecs( 3600 ); 1219 // dt = QDateTime::currentDateTime ().addSecs( 3600 );
1204 emit newEventSignal(dt); 1220 emit newEventSignal(dt);
1205} 1221}
1206 1222
1207void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd) 1223void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd)
1208{ 1224{
1209 if (!mSelectedDates.count()) return; 1225 if (!mSelectedDates.count()) return;
1210 1226
1211 QDate dayStart = mSelectedDates[gxStart]; 1227 QDate dayStart = mSelectedDates[gxStart];
1212 QDate dayEnd = mSelectedDates[gxEnd]; 1228 QDate dayEnd = mSelectedDates[gxEnd];
1213 1229
1214 QTime timeStart = mAgenda->gyToTime(gyStart); 1230 QTime timeStart = mAgenda->gyToTime(gyStart);
1215 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); 1231 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 );
1216 1232
1217 QDateTime dtStart(dayStart,timeStart); 1233 QDateTime dtStart(dayStart,timeStart);
1218 QDateTime dtEnd(dayEnd,timeEnd); 1234 QDateTime dtEnd(dayEnd,timeEnd);
1219 1235
1220 emit newEventSignal(dtStart,dtEnd); 1236 emit newEventSignal(dtStart,dtEnd);
1221} 1237}
1222 1238
1223void KOAgendaView::newEventAllDay(int gx, int ) 1239void KOAgendaView::newEventAllDay(int gx, int )
1224{ 1240{
1225 if (!mSelectedDates.count()) return; 1241 if (!mSelectedDates.count()) return;
1226 1242
1227 QDate day = mSelectedDates[gx]; 1243 QDate day = mSelectedDates[gx];
1228 1244
1229 emit newEventSignal(day); 1245 emit newEventSignal(day);
1230} 1246}
1231 1247
1232void KOAgendaView::updateEventIndicatorTop(int newY) 1248void KOAgendaView::updateEventIndicatorTop(int newY)
1233{ 1249{
1234 uint i; 1250 uint i;
1235 for(i=0;i<mMinY.size();++i) { 1251 for(i=0;i<mMinY.size();++i) {
1236 if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true); 1252 if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true);
1237 else mEventIndicatorTop->enableColumn(i,false); 1253 else mEventIndicatorTop->enableColumn(i,false);
1238 } 1254 }
1239 1255
1240 mEventIndicatorTop->update(); 1256 mEventIndicatorTop->update();
1241} 1257}
1242 1258
1243void KOAgendaView::updateEventIndicatorBottom(int newY) 1259void KOAgendaView::updateEventIndicatorBottom(int newY)
1244{ 1260{
1245 uint i; 1261 uint i;
1246 for(i=0;i<mMaxY.size();++i) { 1262 for(i=0;i<mMaxY.size();++i) {
1247 if (newY <= mMaxY.at(i)) mEventIndicatorBottom->enableColumn(i,true); 1263 if (newY <= mMaxY.at(i)) mEventIndicatorBottom->enableColumn(i,true);
1248 else mEventIndicatorBottom->enableColumn(i,false); 1264 else mEventIndicatorBottom->enableColumn(i,false);
1249 } 1265 }
1250 1266
1251 mEventIndicatorBottom->update(); 1267 mEventIndicatorBottom->update();
1252} 1268}
1253 1269
1254void KOAgendaView::startDrag(Event *event) 1270void KOAgendaView::startDrag(Event *event)
1255{ 1271{
1256#ifndef KORG_NODND 1272#ifndef KORG_NODND
1257 DndFactory factory( calendar() ); 1273 DndFactory factory( calendar() );
1258 ICalDrag *vd = factory.createDrag(event,this); 1274 ICalDrag *vd = factory.createDrag(event,this);
1259 if (vd->drag()) { 1275 if (vd->drag()) {
1260 kdDebug() << "KOAgendaView::startDrag(): Delete drag source" << endl; 1276 kdDebug() << "KOAgendaView::startDrag(): Delete drag source" << endl;
1261 } 1277 }
1262#endif 1278#endif
1263} 1279}
1264 1280
1265void KOAgendaView::readSettings() 1281void KOAgendaView::readSettings()
1266{ 1282{
1267 readSettings(KOGlobals::config()); 1283 readSettings(KOGlobals::config());
1268} 1284}
1269 1285
1270void KOAgendaView::readSettings(KConfig *config) 1286void KOAgendaView::readSettings(KConfig *config)
1271{ 1287{
1272 // kdDebug() << "KOAgendaView::readSettings()" << endl; 1288 // kdDebug() << "KOAgendaView::readSettings()" << endl;
1273 1289
1274 config->setGroup("Views"); 1290 config->setGroup("Views");
1275 1291
1276 //#ifndef KORG_NOSPLITTER 1292 //#ifndef KORG_NOSPLITTER
1277 QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); 1293 QValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
1278 if (sizes.count() == 2) { 1294 if (sizes.count() == 2) {
1279 if ( sizes[0] < 20 ) { 1295 if ( sizes[0] < 20 ) {
1280 sizes[1] = sizes[1] +20 - sizes[0]; 1296 sizes[1] = sizes[1] +20 - sizes[0];
1281 sizes[0] = 20; 1297 sizes[0] = 20;
1282 } 1298 }
1283 mSplitterAgenda->setSizes(sizes); 1299 mSplitterAgenda->setSizes(sizes);
1284 // qDebug("read %d %d ",sizes[0],sizes[1] ); 1300 // qDebug("read %d %d ",sizes[0],sizes[1] );
1285 } 1301 }
1286 //#endif 1302 //#endif
1287 1303
1288 // updateConfig(); 1304 // updateConfig();
1289} 1305}
1290 1306
1291void KOAgendaView::writeSettings(KConfig *config) 1307void KOAgendaView::writeSettings(KConfig *config)
1292{ 1308{
1293 // kdDebug() << "KOAgendaView::writeSettings()" << endl; 1309 // kdDebug() << "KOAgendaView::writeSettings()" << endl;
1294 1310
1295 config->setGroup("Views"); 1311 config->setGroup("Views");
1296 1312
1297 //#ifndef KORG_NOSPLITTER 1313 //#ifndef KORG_NOSPLITTER
1298 QValueList<int> list = mSplitterAgenda->sizes(); 1314 QValueList<int> list = mSplitterAgenda->sizes();
1299 config->writeEntry("Separator AgendaView",list); 1315 config->writeEntry("Separator AgendaView",list);
1300 //qDebug("write %d %d ", list[0],list[1] ); 1316 //qDebug("write %d %d ", list[0],list[1] );
1301 //#endif 1317 //#endif
1302} 1318}
1303 1319
1304void KOAgendaView::setHolidayMasks() 1320void KOAgendaView::setHolidayMasks()
1305{ 1321{
1306 mHolidayMask.resize(mSelectedDates.count()); 1322 mHolidayMask.resize(mSelectedDates.count());
1307 1323
1308 uint i; 1324 uint i;
1309 for(i=0;i<mSelectedDates.count();++i) { 1325 for(i=0;i<mSelectedDates.count();++i) {
1310 QDate date = mSelectedDates[i]; 1326 QDate date = mSelectedDates[i];
1311 bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); 1327 bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6);
1312 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); 1328 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7);
1313 bool showHoliday = false; 1329 bool showHoliday = false;
1314 if ( KOPrefs::instance()->mExcludeHolidays ) { 1330 if ( KOPrefs::instance()->mExcludeHolidays ) {
1315 QPtrList<Event> events = calendar()->events( date, true ); 1331 QPtrList<Event> events = calendar()->events( date, true );
1316 Event *event; 1332 Event *event;
1317 for( event = events.first(); event; event = events.next() ) { 1333 for( event = events.first(); event; event = events.next() ) {
1318 if ( event->categories().contains("Holiday") || 1334 if ( event->categories().contains("Holiday") ||
1319 event->categories().contains(i18n("Holiday"))) { 1335 event->categories().contains(i18n("Holiday"))) {
1320 showHoliday = true; 1336 showHoliday = true;
1321 break; 1337 break;
1322 } 1338 }
1323 } 1339 }
1324 1340
1325 } 1341 }
1326 1342
1327#ifndef KORG_NOPLUGINS 1343#ifndef KORG_NOPLUGINS
1328 bool showHoliday = KOPrefs::instance()->mExcludeHolidays && 1344 bool showHoliday = KOPrefs::instance()->mExcludeHolidays &&
1329 !KOCore::self()->holiday(date).isEmpty(); 1345 !KOCore::self()->holiday(date).isEmpty();
1330#endif 1346#endif
1331 bool showDay = showSaturday || showSunday || showHoliday; 1347 bool showDay = showSaturday || showSunday || showHoliday;
1332 1348
1333 if (showDay) { 1349 if (showDay) {
1334 mHolidayMask.at(i) = true; 1350 mHolidayMask.at(i) = true;
1335 } else { 1351 } else {
1336 mHolidayMask.at(i) = false; 1352 mHolidayMask.at(i) = false;
1337 } 1353 }
1338 } 1354 }
1339 1355
1340 mAgenda->setHolidayMask(&mHolidayMask); 1356 mAgenda->setHolidayMask(&mHolidayMask);
1341 mAllDayAgenda->setHolidayMask(&mHolidayMask); 1357 mAllDayAgenda->setHolidayMask(&mHolidayMask);
1342} 1358}
1343 1359
1344void KOAgendaView::setContentsPos(int y) 1360void KOAgendaView::setContentsPos(int y)
1345{ 1361{
1346 mAgenda->setContentsPos(0,y); 1362 mAgenda->setContentsPos(0,y);
1347} 1363}
1348 1364
1349void KOAgendaView::setExpandedButton( bool expanded ) 1365void KOAgendaView::setExpandedButton( bool expanded )
1350{ 1366{
1351 if ( expanded ) { 1367 if ( expanded ) {
1352 mExpandButton->setPixmap( mExpandedPixmap ); 1368 mExpandButton->setPixmap( mExpandedPixmap );
1353 } else { 1369 } else {
1354 mExpandButton->setPixmap( mNotExpandedPixmap ); 1370 mExpandButton->setPixmap( mNotExpandedPixmap );
1355 } 1371 }
1356} 1372}
1357 1373
1358void KOAgendaView::clearSelection() 1374void KOAgendaView::clearSelection()
1359{ 1375{
1360 mAgenda->deselectItem(); 1376 mAgenda->deselectItem();
1361 mAllDayAgenda->deselectItem(); 1377 mAllDayAgenda->deselectItem();
1362} 1378}
1363 1379
1364void KOAgendaView::newTimeSpanSelectedAllDay(int gxStart, int gyStart, 1380void KOAgendaView::newTimeSpanSelectedAllDay(int gxStart, int gyStart,
1365 int gxEnd, int gyEnd) 1381 int gxEnd, int gyEnd)
1366{ 1382{
1367 mTimeSpanInAllDay = true; 1383 mTimeSpanInAllDay = true;
1368 newTimeSpanSelected(gxStart,gyStart,gxEnd,gyEnd); 1384 newTimeSpanSelected(gxStart,gyStart,gxEnd,gyEnd);
1369} 1385}
1370 1386
1371 1387
1372 1388
1373 1389
1374void KOAgendaView::newTimeSpanSelected(int gxStart, int gyStart, 1390void KOAgendaView::newTimeSpanSelected(int gxStart, int gyStart,
1375 int gxEnd, int gyEnd) 1391 int gxEnd, int gyEnd)
1376{ 1392{
1377 if (!mSelectedDates.count()) return; 1393 if (!mSelectedDates.count()) return;
1378 1394
1379 QDate dayStart = mSelectedDates[gxStart]; 1395 QDate dayStart = mSelectedDates[gxStart];
1380 QDate dayEnd = mSelectedDates[gxEnd]; 1396 QDate dayEnd = mSelectedDates[gxEnd];
1381 1397
1382 QTime timeStart = mAgenda->gyToTime(gyStart); 1398 QTime timeStart = mAgenda->gyToTime(gyStart);
1383 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); 1399 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 );
1384 1400
1385 QDateTime dtStart(dayStart,timeStart); 1401 QDateTime dtStart(dayStart,timeStart);
1386 QDateTime dtEnd(dayEnd,timeEnd); 1402 QDateTime dtEnd(dayEnd,timeEnd);
1387 1403
1388 mTimeSpanBegin = dtStart; 1404 mTimeSpanBegin = dtStart;
1389 mTimeSpanEnd = dtEnd; 1405 mTimeSpanEnd = dtEnd;
1390 1406
1391} 1407}
1392 1408
1393void KOAgendaView::deleteSelectedDateTime() 1409void KOAgendaView::deleteSelectedDateTime()
1394{ 1410{
1395 mTimeSpanBegin.setDate(QDate()); 1411 mTimeSpanBegin.setDate(QDate());
1396 mTimeSpanEnd.setDate(QDate()); 1412 mTimeSpanEnd.setDate(QDate());
1397 mTimeSpanInAllDay = false; 1413 mTimeSpanInAllDay = false;
1398} 1414}
1399 1415
1400void KOAgendaView::keyPressEvent ( QKeyEvent * e ) 1416void KOAgendaView::keyPressEvent ( QKeyEvent * e )
1401{ 1417{
1402 e->ignore(); 1418 e->ignore();
1403} 1419}
1404 1420
1405void KOAgendaView::scrollOneHourUp() 1421void KOAgendaView::scrollOneHourUp()
1406{ 1422{
1407 1423
1408 mAgenda->scrollBy ( 0, -mAgenda->contentsHeight () / 24 ); 1424 mAgenda->scrollBy ( 0, -mAgenda->contentsHeight () / 24 );
1409} 1425}
1410void KOAgendaView::scrollOneHourDown() 1426void KOAgendaView::scrollOneHourDown()
1411{ 1427{
1412 mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 ); 1428 mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 );
1413} 1429}
1414 1430
1415void KOAgendaView::setStartHour( int h ) 1431void KOAgendaView::setStartHour( int h )
1416{ 1432{
1417 mAgenda->setStartHour( h ); 1433 mAgenda->setStartHour( h );
1418 1434
1419} 1435}
1420 1436
1421void KOAgendaView::updateTodo( Todo * t, int ) 1437void KOAgendaView::updateTodo( Todo * t, int )
1422{ 1438{
1423 1439
1424 bool remove = false; 1440 bool remove = false;
1425 bool removeAD = false; 1441 bool removeAD = false;
1426 if ( ! t->hasDueDate() ) { 1442 if ( ! t->hasDueDate() ) {
1427 remove = true; 1443 remove = true;
1428 removeAD = true; 1444 removeAD = true;
1429 } 1445 }
1430 else { 1446 else {
1431 bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ; 1447 bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
1432 if ( overdue && 1448 if ( overdue &&
1433 QDate::currentDate() >= mSelectedDates.first() && 1449 QDate::currentDate() >= mSelectedDates.first() &&
1434 QDate::currentDate() <= mSelectedDates.last()) { 1450 QDate::currentDate() <= mSelectedDates.last()) {
1435 removeAD = false; 1451 removeAD = false;
1436 remove = true; 1452 remove = true;
1437 } 1453 }
1438 else { 1454 else {
1439 if ( t->dtDue().date() < mSelectedDates.first() || 1455 if ( t->dtDue().date() < mSelectedDates.first() ||
1440 t->dtDue().date() > mSelectedDates.last() ) { 1456 t->dtDue().date() > mSelectedDates.last() ) {
1441 remove = true; 1457 remove = true;
1442 removeAD = true; 1458 removeAD = true;
1443 } else { 1459 } else {
1444 remove = t->doesFloat(); 1460 remove = t->doesFloat();
1445 removeAD = !remove; 1461 removeAD = !remove;
1446 } 1462 }
1447 } 1463 }
1448 } 1464 }
1449 int days = mSelectedDates.first().daysTo( t->dtDue().date() ); 1465 int days = mSelectedDates.first().daysTo( t->dtDue().date() );
1450 // qDebug("daysto %d ", days ); 1466 // qDebug("daysto %d ", days );
1451 mAgenda->updateTodo( t , days, remove); 1467 mAgenda->updateTodo( t , days, remove);
1452 if ( KOPrefs::instance()->mShowTodoInAgenda ) 1468 if ( KOPrefs::instance()->mShowTodoInAgenda )
1453 mAllDayAgenda->updateTodo( t , days, removeAD); 1469 mAllDayAgenda->updateTodo( t , days, removeAD);
1454 //qDebug("KOAgendaView::updateTodo( Todo *, int ) "); 1470 //qDebug("KOAgendaView::updateTodo( Todo *, int ) ");
1455 1471
1456} 1472}