summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-05 14:55:14 (UTC)
committer zautrix <zautrix>2005-01-05 14:55:14 (UTC)
commit71017beb975666a0f654898ed6a40a5303d567dc (patch) (unidiff)
tree39f3c0e3c890ee90806e93d9ce9bd9024be11d55
parentdf0200487afbfa59b80a79e548d70b5203019003 (diff)
downloadkdepimpi-71017beb975666a0f654898ed6a40a5303d567dc.zip
kdepimpi-71017beb975666a0f654898ed6a40a5303d567dc.tar.gz
kdepimpi-71017beb975666a0f654898ed6a40a5303d567dc.tar.bz2
minor fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt1
-rw-r--r--korganizer/koagenda.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index bfe87f0..1a8b885 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,393 +1,394 @@
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.16 ************ 3********** VERSION 1.9.16 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed search dialog size on Z 6000 (480x640 display). 6Fixed search dialog size on Z 6000 (480x640 display).
7Added setting to hide/show time in agenda items. 7Added setting to hide/show time in agenda items.
8Added setting to hide not running todos in todo view. 8Added setting to hide not running todos in todo view.
9Added columns for start date/time in todo view. 9Added columns for start date/time in todo view.
10Replaced the solid half-hour lines in agenda view by dot lines.
10 11
11********** VERSION 1.9.15 ************ 12********** VERSION 1.9.15 ************
12 13
13Usebilty enhancements in KO/Pi: 14Usebilty enhancements in KO/Pi:
14When clicking on the date in a month view cell, the day view is shown. 15When clicking on the date in a month view cell, the day view is shown.
15Old behaviour was, that the "new event" dialog popped up. 16Old behaviour was, that the "new event" dialog popped up.
16 17
17Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 18Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
18That means, you can restore the latest 19That means, you can restore the latest
19event/todo/journal you have deleted. 20event/todo/journal you have deleted.
20A journal is deleted, if you clear all the text of the journal. 21A journal is deleted, if you clear all the text of the journal.
21 22
22Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 23Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
23 24
24KA/Pi starting in 480x640 resolution: 25KA/Pi starting in 480x640 resolution:
25Hide the filter action in toolbar 26Hide the filter action in toolbar
26and added icons for undo/delete/redo in toolbar. 27and added icons for undo/delete/redo in toolbar.
27 28
28Change in OM/Pi ViewMail dialog: 29Change in OM/Pi ViewMail dialog:
29When clicking on the "delete" icon the mail is deleted after confirmation as usual. But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 30When clicking on the "delete" icon the mail is deleted after confirmation as usual. But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
30 31
31Fixed a crash when deleting mail-accounts in OM/Pi. 32Fixed a crash when deleting mail-accounts in OM/Pi.
32 33
33 34
34********** VERSION 1.9.14 ************ 35********** VERSION 1.9.14 ************
35 36
36Fixed some problems with the dialog sizes when switching 37Fixed some problems with the dialog sizes when switching
37portrait/landscape mode on 640x480 PDA display. 38portrait/landscape mode on 640x480 PDA display.
38 39
39Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 40Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
40 41
41Fixed an ugly bug in KOpieMail: 42Fixed an ugly bug in KOpieMail:
42KOpieMail was not able to write files (mails) to MSDOS file system, 43KOpieMail was not able to write files (mails) to MSDOS file system,
43like on an usual preformatted SD card. That should work now. 44like on an usual preformatted SD card. That should work now.
44To save your mail data on the Sd card do the following: 45To save your mail data on the Sd card do the following:
45Create a dir on the SD card: 46Create a dir on the SD card:
46mkdir /mnt/card/localmail 47mkdir /mnt/card/localmail
47Go to your home dir: 48Go to your home dir:
48cd 49cd
49Go to kopiemail data storage dir: 50Go to kopiemail data storage dir:
50cd kdepim/apps/kopiemail 51cd kdepim/apps/kopiemail
51Create a symlink to the SD card: 52Create a symlink to the SD card:
52ls -s /mnt/card/localmail 53ls -s /mnt/card/localmail
53Now KOpieMail will store all mails on the SD card. 54Now KOpieMail will store all mails on the SD card.
54 55
55KO/Pi Monthview: 56KO/Pi Monthview:
56Now "Go to Today" selects the current month from day 1-end, 57Now "Go to Today" selects the current month from day 1-end,
57not the current date + some days. 58not the current date + some days.
58I.e. "Go to Today" shows now always 59I.e. "Go to Today" shows now always
59the current month with first day of month in the first row. 60the current month with first day of month in the first row.
60 61
61Added missing German translation. 62Added missing German translation.
62 63
63Fixed icons of executeable on Wintendo. 64Fixed icons of executeable on Wintendo.
64 65
65Added a "Show next Mail" button to the OM/Pi 66Added a "Show next Mail" button to the OM/Pi
66mail viewer such that the mail below the current mail 67mail viewer such that the mail below the current mail
67in the mail list view of the current folder 68in the mail list view of the current folder
68can be read with a single click. 69can be read with a single click.
69 70
70 71
71********** VERSION 1.9.13 ************ 72********** VERSION 1.9.13 ************
72 73
73Fixed nasty PwM/Pi file reading bug, when 74Fixed nasty PwM/Pi file reading bug, when
74the used hash algo of file is different then the global 75the used hash algo of file is different then the global
75hash algo. 76hash algo.
76 77
77Added KA/Pi support for opie mailit mailapplication. 78Added KA/Pi support for opie mailit mailapplication.
78 79
79Fixed some bugs in OM/Pi. 80Fixed some bugs in OM/Pi.
80Now character conversion tables are available for the Zaurus 81Now character conversion tables are available for the Zaurus
81to make OM/Pi working properly. 82to make OM/Pi working properly.
82To get the character conversion in OM/Pi working, please download 83To get the character conversion in OM/Pi working, please download
83at the sourceforge project site the package 84at the sourceforge project site the package
84sr-character-conversion_SharpROM_arm.ipk.zip 85sr-character-conversion_SharpROM_arm.ipk.zip
85(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 86(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
86from the section "general files for KDE/Pim" 87from the section "general files for KDE/Pim"
87Instructions how to install this package are in a ReadMe in this file. 88Instructions how to install this package are in a ReadMe in this file.
88 89
89 90
90Fixed the orientation change problem in KA/Pi when switching 91Fixed the orientation change problem in KA/Pi when switching
91portrait/landscape mode. 92portrait/landscape mode.
92 93
93French translation available for KA/Pi and OM/Pi. 94French translation available for KA/Pi and OM/Pi.
94 95
95Fixed some problems with categories in KO/Pi in DTM sync. 96Fixed some problems with categories in KO/Pi in DTM sync.
96 97
97Added selection dialog for export to phone in KA/Pi. 98Added selection dialog for export to phone in KA/Pi.
98 99
99If in KO/Pi is an attendee selected to add to a meeting and this 100If in KO/Pi is an attendee selected to add to a meeting and this
100attendee is already in the list of attendees, this person is not added 101attendee is already in the list of attendees, this person is not added
101again. 102again.
102 103
103Some menu cleanup in KA/Pi. 104Some menu cleanup in KA/Pi.
104 105
105********** VERSION 1.9.12 ************ 106********** VERSION 1.9.12 ************
106 107
107Fix for the bug in KO/Pi What's Next view of version 1.9.11. 108Fix for the bug in KO/Pi What's Next view of version 1.9.11.
108 109
109Bugfix: Licence file is now shown again. 110Bugfix: Licence file is now shown again.
110 111
111OM/Pi now supports Unicode (utf8 charset). 112OM/Pi now supports Unicode (utf8 charset).
112Fixed some bugs in OM/Pi. 113Fixed some bugs in OM/Pi.
113 114
114KA/Pi has more German translation. 115KA/Pi has more German translation.
115 116
116 117
117********** VERSION 1.9.11 ************ 118********** VERSION 1.9.11 ************
118 119
119Fixed several problems in PWM/Pi, like 120Fixed several problems in PWM/Pi, like
120asking the user, if unsaved changed are pending 121asking the user, if unsaved changed are pending
121when closing the app. 122when closing the app.
122And PwM/Pi handles now different texts for the 123And PwM/Pi handles now different texts for the
123fields Description, Username, Password, configurable per category. 124fields Description, Username, Password, configurable per category.
124 125
125Fixed a crash in KO/Pi , when importing/loading vcs files 126Fixed a crash in KO/Pi , when importing/loading vcs files
126which have an entry with an attendee with state: 127which have an entry with an attendee with state:
127NEEDS ACTION 128NEEDS ACTION
128 129
129Fixed some problems in the German translation of OM/Pi, 130Fixed some problems in the German translation of OM/Pi,
130which makes some dialogs not fitting on the screen 131which makes some dialogs not fitting on the screen
131of the Z 5500. 132of the Z 5500.
132 133
133Fixed Qtopia crash, when disabling/deinstalling 134Fixed Qtopia crash, when disabling/deinstalling
134KO/Pi alarm applet. 135KO/Pi alarm applet.
135 136
136Implemented direct KDE<->KA/Pi sync for KA/Pi running 137Implemented direct KDE<->KA/Pi sync for KA/Pi running
137on Linux desktop. 138on Linux desktop.
138 139
139Added feature "remove sync info" to sync menu. 140Added feature "remove sync info" to sync menu.
140 141
141Tweaked the KO/Pi What's next view a bit, added 142Tweaked the KO/Pi What's next view a bit, added
142setting to hide events that are done. 143setting to hide events that are done.
143 144
144Disabled "beam receive enabled" on startup to 145Disabled "beam receive enabled" on startup to
145avoid problems if Fastload is enabled. 146avoid problems if Fastload is enabled.
146Please set "beam receive enabled", 147Please set "beam receive enabled",
147if you want to receive data via IR. 148if you want to receive data via IR.
148 149
149Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 150Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
150on Linux desktop. 151on Linux desktop.
151 152
152Made in KA/Pi scrolling possible, if details view is selected. 153Made in KA/Pi scrolling possible, if details view is selected.
153(The keyboard focus is set automatically to the search line) 154(The keyboard focus is set automatically to the search line)
154 155
155Fixed a bug in DMT sync, that a new entry in DTM was added 156Fixed a bug in DMT sync, that a new entry in DTM was added
156on every sync to Kx/Pi. 157on every sync to Kx/Pi.
157 158
158Fixed missing writing of KA/Pi categories to DMT entries when syncing. 159Fixed missing writing of KA/Pi categories to DMT entries when syncing.
159 160
160Fixed a bug in DMT sync with todos created in KO/Pi containing 161Fixed a bug in DMT sync with todos created in KO/Pi containing
161non-latin1 characters. 162non-latin1 characters.
162 163
163Rearranged package contents of Sharp-ipks and made all 164Rearranged package contents of Sharp-ipks and made all
164packages installable on SD again. 165packages installable on SD again.
165 166
166Fixed the writing of addressbook data in DTM sync. 167Fixed the writing of addressbook data in DTM sync.
167Empty fields in KA/Pi were not removed. 168Empty fields in KA/Pi were not removed.
168 169
169Added better category handling in KA/Pi: 170Added better category handling in KA/Pi:
170Added item 171Added item
171Edit Categories and 172Edit Categories and
172Manage new categories 173Manage new categories
173to the settings menu. 174to the settings menu.
174Possible to configure a view to display categories. 175Possible to configure a view to display categories.
175 176
176Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 177Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
177 178
178Fixed displaying of "free" days and time in KO Monthview and Agendaview. 179Fixed displaying of "free" days and time in KO Monthview and Agendaview.
179 180
180... and many other bugfixes. 181... and many other bugfixes.
181 182
182********** VERSION 1.9.10 ************ 183********** VERSION 1.9.10 ************
183 184
184Many internal small bugfixes. 185Many internal small bugfixes.
185And fix of the "big" bug in KO/Pi, 186And fix of the "big" bug in KO/Pi,
186that after Syncing the appointments had an offset by several hours. 187that after Syncing the appointments had an offset by several hours.
187That was a problem with the internal timezone setting, 188That was a problem with the internal timezone setting,
188introduced by the changed timezone configuration settings. 189introduced by the changed timezone configuration settings.
189 190
190German translation for OM/Pi is now available. 191German translation for OM/Pi is now available.
191 192
192 193
193********** VERSION 1.9.9 ************ 194********** VERSION 1.9.9 ************
194 195
195KDE-Pim/Pi has a new Member! 196KDE-Pim/Pi has a new Member!
196It is called PWM/Pi (Passwordmanager/platform-independent) 197It is called PWM/Pi (Passwordmanager/platform-independent)
197and it is available for the Zaurus. 198and it is available for the Zaurus.
198It is planned, that it will be available later for Windows. 199It is planned, that it will be available later for Windows.
199(And for Linux, of course). 200(And for Linux, of course).
200It is a port of the Passwordmanager of KDE. 201It is a port of the Passwordmanager of KDE.
201It will need the MicroKDElibs to run. 202It will need the MicroKDElibs to run.
202 203
203Made loading of addressbooks in KA/Pi up to 7 times faster! 204Made loading of addressbooks in KA/Pi up to 7 times faster!
204The bigger your addressbook file, the more starting speed 205The bigger your addressbook file, the more starting speed
205will you gain. (relatively) 206will you gain. (relatively)
206 207
207The Qtopia addressbook connector is now platform independend 208The Qtopia addressbook connector is now platform independend
208as well and should work on any platform for importing/exporting 209as well and should work on any platform for importing/exporting
209Qtopia and Opie XML files. 210Qtopia and Opie XML files.
210 211
211Added a +30min feature to the timezone settings to make 212Added a +30min feature to the timezone settings to make
212KDE-Pim/Pi useable in Australia and other parts on the 213KDE-Pim/Pi useable in Australia and other parts on the
213world with strange timezones ;-) 214world with strange timezones ;-)
214 215
215German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 216German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
216 217
217It is now possible to disable the 218It is now possible to disable the
218"receive data via infrared" feature, such that syncing with 219"receive data via infrared" feature, such that syncing with
219Outlook is now possible again with Kx/Pi runing. 220Outlook is now possible again with Kx/Pi runing.
220Please disable it, before syncing Sharp DTM with Outlook. 221Please disable it, before syncing Sharp DTM with Outlook.
221For your convenience, the "receive data via infrared" feature 222For your convenience, the "receive data via infrared" feature
222is disabled automatically, if you sync Kx/Pi with DTM. 223is disabled automatically, if you sync Kx/Pi with DTM.
223You have to enable it again manually after syncing. 224You have to enable it again manually after syncing.
224Enabling this feature makes it impossible to start the 225Enabling this feature makes it impossible to start the
225Sharp DTM apps. If this feature is enabled, you will only get the 226Sharp DTM apps. If this feature is enabled, you will only get the
226alarm notification from KO/Pi and not from the Sharp calendar. 227alarm notification from KO/Pi and not from the Sharp calendar.
227This is very useful if you sync KO/Pi with Sharp DTM, 228This is very useful if you sync KO/Pi with Sharp DTM,
228because after syncing you usually would get notified about 229because after syncing you usually would get notified about
229an alarm by KO/Pi and the Sharp Calendar. 230an alarm by KO/Pi and the Sharp Calendar.
230 231
231Together with the Linux desktop version of KO/Pi 232Together with the Linux desktop version of KO/Pi
232it is now possible to sync KO/Pi on the Zaurus 233it is now possible to sync KO/Pi on the Zaurus
233with the complete KDE-desktop (3.3 or later) 234with the complete KDE-desktop (3.3 or later)
234calendar data easily. 235calendar data easily.
235That makes it possible to sync the Z with one 236That makes it possible to sync the Z with one
236click of a mouse with the KDE-Desktop. 237click of a mouse with the KDE-Desktop.
237This feature it available for all Zaurus platforms KO/Pi 238This feature it available for all Zaurus platforms KO/Pi
238is running on. 239is running on.
239The only thing needed is a running KO/Pi on Linux and 240The only thing needed is a running KO/Pi on Linux and
240a compiled version of the small 241a compiled version of the small
241KDE-Pim/Pi<->KDE-Desktop access command line program, 242KDE-Pim/Pi<->KDE-Desktop access command line program,
242which is in the KDE-Pim/Pi sources available. 243which is in the KDE-Pim/Pi sources available.
243 244
244The "KDE-desktop" syncing feature for KA/Pi will follow 245The "KDE-desktop" syncing feature for KA/Pi will follow
245in the next releases. 246in the next releases.
246 247
247Fixed the vcard export bug, which had the version 1.9.8. 248Fixed the vcard export bug, which had the version 1.9.8.
248 249
249Added missing GERMAN translation to KO/Pi. 250Added missing GERMAN translation to KO/Pi.
250Hi PsionX, could you add the missing french translation?Thx! 251Hi PsionX, could you add the missing french translation?Thx!
251 252
252Translation files for KA/Pi are available as well. 253Translation files for KA/Pi are available as well.
253GERMAN translation will be available in the next release. 254GERMAN translation will be available in the next release.
254PsionX ( yres, you again ;-) ), could you start translating 255PsionX ( yres, you again ;-) ), could you start translating
255KA/Pi? Thx! 256KA/Pi? Thx!
256 257
257You can download the version 1.9.9 at 258You can download the version 1.9.9 at
258 259
259http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 260http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
260 261
261Note: 262Note:
262To run the mail program OM/Pi you need libopenssl. 263To run the mail program OM/Pi you need libopenssl.
263A link to a download loaction is available at 264A link to a download loaction is available at
264ZSI at www.killefiz.de 265ZSI at www.killefiz.de
265 266
266 267
267********** VERSION 1.9.8 ************ 268********** VERSION 1.9.8 ************
268 269
269Fixed character decoding in OM/Pi. 270Fixed character decoding in OM/Pi.
270(e.g. German "Umlaute" were not displayed properly.) 271(e.g. German "Umlaute" were not displayed properly.)
271 272
272Made is possible to reparent todos in KO/Pi. 273Made is possible to reparent todos in KO/Pi.
273Use contextmenu or keys (look at Help-Keys + Colors) for that. 274Use contextmenu or keys (look at Help-Keys + Colors) for that.
274 275
275Added the missing Sync-Howto and WhatsNew to the packages. 276Added the missing Sync-Howto and WhatsNew to the packages.
276 277
277KO/Pi on Linux desktop can now sync with KDE desktop. 278KO/Pi on Linux desktop can now sync with KDE desktop.
278That means: When using KO/Pi on Linux desktop for syncing with 279That means: When using KO/Pi on Linux desktop for syncing with
279KDE desktop and the Zaurus, the Zaurus can be synced now 280KDE desktop and the Zaurus, the Zaurus can be synced now
280with all KDE-Calendar resources, not only with one local file. 281with all KDE-Calendar resources, not only with one local file.
281(That makes it possible to sync the Zaurus with the 282(That makes it possible to sync the Zaurus with the
282calendar data on a Kolab server) 283calendar data on a Kolab server)
283 284
284KA/Pi syncing with KDE desktop will be available in the next version. 285KA/Pi syncing with KDE desktop will be available in the next version.
285 286
286 287
287********** VERSION 1.9.7 ************ 288********** VERSION 1.9.7 ************
288 289
289KO/Pi - KA/Pi on Windows: 290KO/Pi - KA/Pi on Windows:
290Now a directory can be defined by the user, where the 291Now a directory can be defined by the user, where the
291application/config data should be saved. 292application/config data should be saved.
292 Define your desired path in the evironment variable 293 Define your desired path in the evironment variable
293 MICROKDEHOME 294 MICROKDEHOME
294 before starting KO/Pi or KA/Pi. 295 before starting KO/Pi or KA/Pi.
295 296
296An easy Kx/Pi to Kx/Pi syncing is now possible 297An easy Kx/Pi to Kx/Pi syncing is now possible
297(it is called Pi-Sync) via network. 298(it is called Pi-Sync) via network.
298Please look at the Sync Howto. 299Please look at the Sync Howto.
299 300
300Exporting of calendar data and contacts to mobile phones is now possible. 301Exporting of calendar data and contacts to mobile phones is now possible.
301The SyncHowto is updated with information howto 302The SyncHowto is updated with information howto
302access/sync mobile phones. 303access/sync mobile phones.
303Please look at the Sync Howto. 304Please look at the Sync Howto.
304 305
305Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 306Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
306Please disable Fastload for the original contact/calendar applications 307Please disable Fastload for the original contact/calendar applications
307and close them. 308and close them.
308KO/Pi and KA/Pi must be running in order to receive the data. 309KO/Pi and KA/Pi must be running in order to receive the data.
309(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 310(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
310 311
311In the KA/Pi details view are now the preferred tel. numbers displayed on top 312In the KA/Pi details view are now the preferred tel. numbers displayed on top
312of the other data ( emails/tel.numbers/addresses) 313of the other data ( emails/tel.numbers/addresses)
313 314
314Fixed some syncing problems in KA/Pi. 315Fixed some syncing problems in KA/Pi.
315 316
316Added font settings for the KA/Pi details view. 317Added font settings for the KA/Pi details view.
317Added fields "children's name" and "gender" to KA/Pi. 318Added fields "children's name" and "gender" to KA/Pi.
318 319
319Made searching in KA/Pi better: 320Made searching in KA/Pi better:
320Now the first item in a view is selected after a search automatically and 321Now the first item in a view is selected after a search automatically and
321the views can be scrolled up/down when the search input field has the keyboard focus. 322the views can be scrolled up/down when the search input field has the keyboard focus.
322 323
323And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 324And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
324 325
325 326
326********** VERSION 1.9.6 ************ 327********** VERSION 1.9.6 ************
327 328
328Changes in the external application communication on the Zaurus 329Changes in the external application communication on the Zaurus
329in order to use less RAM when the apps are running. 330in order to use less RAM when the apps are running.
330First syncing of addressbooks (KA/Pi) is possible. 331First syncing of addressbooks (KA/Pi) is possible.
331 332
332 333
333********** VERSION 1.9.5a ************ 334********** VERSION 1.9.5a ************
334 335
335Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 336Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
336Fixed some small bugs. 337Fixed some small bugs.
337KA/Pi shows now the birthday in summary view. 338KA/Pi shows now the birthday in summary view.
338Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 339Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
339for displaying dates. 340for displaying dates.
340 341
341 342
342********** VERSION 1.9.5 ************ 343********** VERSION 1.9.5 ************
343 344
344There is still no Addressbook syncing! 345There is still no Addressbook syncing!
345 346
346New in 1.9.5: 347New in 1.9.5:
347 348
348Many bugfixes. 349Many bugfixes.
349Better searching in KA/Pi. 350Better searching in KA/Pi.
350You can configure in KA/Pi if you want to search only after 351You can configure in KA/Pi if you want to search only after
351<return> key pressed. 352<return> key pressed.
352 353
353Better mail downloading in OM/Pi. 354Better mail downloading in OM/Pi.
354 355
355First experimental alpha version of sync of KO/Pi with mobile phones. 356First experimental alpha version of sync of KO/Pi with mobile phones.
356See gammu documentation for supported phones. 357See gammu documentation for supported phones.
357You 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. 358You 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.
358Quick hint how to use: 359Quick hint how to use:
359NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 360NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
360Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 361Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
361Create syncprofile - mobile device 362Create syncprofile - mobile device
362Remove entry for model. (Leave empty ). 363Remove entry for model. (Leave empty ).
363Enable infrared on Zaurus and your Phone. 364Enable infrared on Zaurus and your Phone.
364Sync. 365Sync.
365To get a more detailed log, start kopi from konsole. 366To get a more detailed log, start kopi from konsole.
366 367
367********** VERSION 1.9.4 ************ 368********** VERSION 1.9.4 ************
368 369
369This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 370This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
370 371
371WARNING: 372WARNING:
372PLEASE BACKUP ALL YOUR DATA! 373PLEASE BACKUP ALL YOUR DATA!
373We have changed a lot and maybe there are some unknown problems. 374We have changed a lot and maybe there are some unknown problems.
374 375
375SYNC HANDLING HAS CHANGED! 376SYNC HANDLING HAS CHANGED!
376Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 377Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
377(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 378(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
378 379
379You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 380You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
380If 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. 381If 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.
381 382
382As programs are available: 383As programs are available:
383KO/Pi (korganizer ipk) - a calendar program. 384KO/Pi (korganizer ipk) - a calendar program.
384KA/Pi (kaddressbook ipk ) - an addressbook 385KA/Pi (kaddressbook ipk ) - an addressbook
385OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 386OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
386 387
387An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 388An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
388(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 389(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
389 390
390All the applications are installed in a "Pim" TAB. 391All the applications are installed in a "Pim" TAB.
391If 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 392If 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
392 393
393All the application are integrated. 394All the application are integrated.
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 6532705..eb3791e 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -858,771 +858,776 @@ void KOAgenda::endItemAction()
858 placeItem->repaint(false); 858 placeItem->repaint(false);
859 placeItem = placeItem->nextMultiItem(); 859 placeItem = placeItem->nextMultiItem();
860 } 860 }
861 emit itemModified( modifiedItem, mActionType ); 861 emit itemModified( modifiedItem, mActionType );
862 862
863 863
864 placeItem = modifiedItem; 864 placeItem = modifiedItem;
865 while ( placeItem ) { 865 while ( placeItem ) {
866 oldconflictItems = placeItem->conflictItems(); 866 oldconflictItems = placeItem->conflictItems();
867 for ( item=oldconflictItems.first(); item != 0; 867 for ( item=oldconflictItems.first(); item != 0;
868 item=oldconflictItems.next() ) { 868 item=oldconflictItems.next() ) {
869 placeSubCells(item); 869 placeSubCells(item);
870 } 870 }
871 placeSubCells( placeItem ); 871 placeSubCells( placeItem );
872 placeItem = placeItem->nextMultiItem(); 872 placeItem = placeItem->nextMultiItem();
873 873
874 } 874 }
875 placeItem = modifiedItem; 875 placeItem = modifiedItem;
876 while ( placeItem ) { 876 while ( placeItem ) {
877 oldconflictItems = placeItem->conflictItems(); 877 oldconflictItems = placeItem->conflictItems();
878 for ( item=oldconflictItems.first(); item != 0; 878 for ( item=oldconflictItems.first(); item != 0;
879 item=oldconflictItems.next() ) { 879 item=oldconflictItems.next() ) {
880 globalFlagBlockAgendaItemUpdate = 0; 880 globalFlagBlockAgendaItemUpdate = 0;
881 item->repaintMe(); 881 item->repaintMe();
882 globalFlagBlockAgendaItemUpdate = 1; 882 globalFlagBlockAgendaItemUpdate = 1;
883 item->repaint(false); 883 item->repaint(false);
884 } 884 }
885 placeItem = placeItem->nextMultiItem(); 885 placeItem = placeItem->nextMultiItem();
886 } 886 }
887 /* 887 /*
888 888
889 oldconflictItems = modifiedItem->conflictItems(); 889 oldconflictItems = modifiedItem->conflictItems();
890 for ( item=oldconflictItems.first(); item != 0; 890 for ( item=oldconflictItems.first(); item != 0;
891 item=oldconflictItems.next() ) { 891 item=oldconflictItems.next() ) {
892 globalFlagBlockAgendaItemUpdate = 0; 892 globalFlagBlockAgendaItemUpdate = 0;
893 item->paintMe(false); 893 item->paintMe(false);
894 globalFlagBlockAgendaItemUpdate = 1; 894 globalFlagBlockAgendaItemUpdate = 1;
895 item->repaint(false); 895 item->repaint(false);
896 } 896 }
897 */ 897 */
898 898
899 899
900 } 900 }
901 901
902 } 902 }
903 903
904 mScrollUpTimer.stop(); 904 mScrollUpTimer.stop();
905 mScrollDownTimer.stop(); 905 mScrollDownTimer.stop();
906 setCursor( arrowCursor ); 906 setCursor( arrowCursor );
907 mActionItem = 0; 907 mActionItem = 0;
908 mActionType = NOP; 908 mActionType = NOP;
909 mItemMoved = 0; 909 mItemMoved = 0;
910 910
911} 911}
912 912
913void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) 913void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
914{ 914{
915// kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; 915// kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl;
916// QPoint point = viewport()->mapToGlobal(viewportPos); 916// QPoint point = viewport()->mapToGlobal(viewportPos);
917// kdDebug() << "Global: " << point.x() << "," << point.y() << endl; 917// kdDebug() << "Global: " << point.x() << "," << point.y() << endl;
918// point = clipper()->mapFromGlobal(point); 918// point = clipper()->mapFromGlobal(point);
919// kdDebug() << "clipper: " << point.x() << "," << point.y() << endl; 919// kdDebug() << "clipper: " << point.x() << "," << point.y() << endl;
920 920
921 int x,y; 921 int x,y;
922 viewportToContents(viewportPos.x(),viewportPos.y(),x,y); 922 viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
923// kdDebug() << "contents: " << x << "," << y << "\n" << endl; 923// kdDebug() << "contents: " << x << "," << y << "\n" << endl;
924 int gx,gy; 924 int gx,gy;
925 contentsToGrid(x,y,gx,gy); 925 contentsToGrid(x,y,gx,gy);
926 926
927 // Change cursor to resize cursor if appropriate 927 // Change cursor to resize cursor if appropriate
928 if (mAllDayMode) { 928 if (mAllDayMode) {
929 int gridDistanceX = (x - gx * mGridSpacingX); 929 int gridDistanceX = (x - gx * mGridSpacingX);
930 if (gridDistanceX < mResizeBorderWidth && 930 if (gridDistanceX < mResizeBorderWidth &&
931 moveItem->cellX() == gx) { 931 moveItem->cellX() == gx) {
932 setCursor(sizeHorCursor); 932 setCursor(sizeHorCursor);
933 } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && 933 } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth &&
934 moveItem->cellXWidth() == gx) { 934 moveItem->cellXWidth() == gx) {
935 setCursor(sizeHorCursor); 935 setCursor(sizeHorCursor);
936 } else { 936 } else {
937 setCursor(arrowCursor); 937 setCursor(arrowCursor);
938 } 938 }
939 } else { 939 } else {
940 int gridDistanceY = (y - gy * mGridSpacingY); 940 int gridDistanceY = (y - gy * mGridSpacingY);
941 if (gridDistanceY < mResizeBorderWidth && 941 if (gridDistanceY < mResizeBorderWidth &&
942 moveItem->cellYTop() == gy && 942 moveItem->cellYTop() == gy &&
943 !moveItem->firstMultiItem()) { 943 !moveItem->firstMultiItem()) {
944 setCursor(sizeVerCursor); 944 setCursor(sizeVerCursor);
945 } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && 945 } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth &&
946 moveItem->cellYBottom() == gy && 946 moveItem->cellYBottom() == gy &&
947 !moveItem->lastMultiItem()) { 947 !moveItem->lastMultiItem()) {
948 setCursor(sizeVerCursor); 948 setCursor(sizeVerCursor);
949 } else { 949 } else {
950 setCursor(arrowCursor); 950 setCursor(arrowCursor);
951 } 951 }
952 } 952 }
953} 953}
954 954
955 955
956/* 956/*
957 Place item in cell and take care that multiple items using the same cell do 957 Place item in cell and take care that multiple items using the same cell do
958 not overlap. This method is not yet optimal. It doesnīt use the maximum space 958 not overlap. This method is not yet optimal. It doesnīt use the maximum space
959 it can get in all cases. 959 it can get in all cases.
960 At the moment the method has a bug: When an item is placed only the sub cell 960 At the moment the method has a bug: When an item is placed only the sub cell
961 widths of the items are changed, which are within the Y region the item to 961 widths of the items are changed, which are within the Y region the item to
962 place spans. When the sub cell width change of one of this items affects a 962 place spans. When the sub cell width change of one of this items affects a
963 cell, where other items are, which do not overlap in Y with the item to place, 963 cell, where other items are, which do not overlap in Y with the item to place,
964 the display gets corrupted, although the corruption looks quite nice. 964 the display gets corrupted, although the corruption looks quite nice.
965*/ 965*/
966void KOAgenda::placeSubCells(KOAgendaItem *placeItem) 966void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
967{ 967{
968 968
969 QPtrList<KOAgendaItem> conflictItems; 969 QPtrList<KOAgendaItem> conflictItems;
970 int maxSubCells = 0; 970 int maxSubCells = 0;
971 QIntDict<KOAgendaItem> subCellDict(5); 971 QIntDict<KOAgendaItem> subCellDict(5);
972 972
973 KOAgendaItem *item; 973 KOAgendaItem *item;
974 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 974 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
975 if (item != placeItem) { 975 if (item != placeItem) {
976 if (placeItem->cellX() <= item->cellXWidth() && 976 if (placeItem->cellX() <= item->cellXWidth() &&
977 placeItem->cellXWidth() >= item->cellX()) { 977 placeItem->cellXWidth() >= item->cellX()) {
978 if ((placeItem->cellYTop() <= item->cellYBottom()) && 978 if ((placeItem->cellYTop() <= item->cellYBottom()) &&
979 (placeItem->cellYBottom() >= item->cellYTop())) { 979 (placeItem->cellYBottom() >= item->cellYTop())) {
980 conflictItems.append(item); 980 conflictItems.append(item);
981 if (item->subCells() > maxSubCells) 981 if (item->subCells() > maxSubCells)
982 maxSubCells = item->subCells(); 982 maxSubCells = item->subCells();
983 subCellDict.insert(item->subCell(),item); 983 subCellDict.insert(item->subCell(),item);
984 } 984 }
985 } 985 }
986 } 986 }
987 } 987 }
988 988
989 if (conflictItems.count() > 0) { 989 if (conflictItems.count() > 0) {
990 // Look for unused sub cell and insert item 990 // Look for unused sub cell and insert item
991 int i; 991 int i;
992 for(i=0;i<maxSubCells;++i) { 992 for(i=0;i<maxSubCells;++i) {
993 if (!subCellDict.find(i)) { 993 if (!subCellDict.find(i)) {
994 placeItem->setSubCell(i); 994 placeItem->setSubCell(i);
995 break; 995 break;
996 } 996 }
997 } 997 }
998 if (i == maxSubCells) { 998 if (i == maxSubCells) {
999 placeItem->setSubCell(maxSubCells); 999 placeItem->setSubCell(maxSubCells);
1000 maxSubCells++; // add new item to number of sub cells 1000 maxSubCells++; // add new item to number of sub cells
1001 } 1001 }
1002 1002
1003 // Prepare for sub cell geometry adjustment 1003 // Prepare for sub cell geometry adjustment
1004 int newSubCellWidth; 1004 int newSubCellWidth;
1005 if (mAllDayMode) newSubCellWidth = mGridSpacingY / maxSubCells; 1005 if (mAllDayMode) newSubCellWidth = mGridSpacingY / maxSubCells;
1006 else newSubCellWidth = mGridSpacingX / maxSubCells; 1006 else newSubCellWidth = mGridSpacingX / maxSubCells;
1007 conflictItems.append(placeItem); 1007 conflictItems.append(placeItem);
1008 1008
1009 1009
1010 // Adjust sub cell geometry of all items 1010 // Adjust sub cell geometry of all items
1011 for ( item=conflictItems.first(); item != 0; 1011 for ( item=conflictItems.first(); item != 0;
1012 item=conflictItems.next() ) { 1012 item=conflictItems.next() ) {
1013 item->setSubCells(maxSubCells); 1013 item->setSubCells(maxSubCells);
1014 if (mAllDayMode) { 1014 if (mAllDayMode) {
1015 item->resize(item->cellWidth() * mGridSpacingX, newSubCellWidth); 1015 item->resize(item->cellWidth() * mGridSpacingX, newSubCellWidth);
1016 } else { 1016 } else {
1017 item->resize(newSubCellWidth, item->cellHeight() * mGridSpacingY); 1017 item->resize(newSubCellWidth, item->cellHeight() * mGridSpacingY);
1018 } 1018 }
1019 int x,y; 1019 int x,y;
1020 gridToContents(item->cellX(),item->cellYTop(),x,y); 1020 gridToContents(item->cellX(),item->cellYTop(),x,y);
1021 if (mAllDayMode) { 1021 if (mAllDayMode) {
1022 y += item->subCell() * newSubCellWidth; 1022 y += item->subCell() * newSubCellWidth;
1023 } else { 1023 } else {
1024 x += item->subCell() * newSubCellWidth; 1024 x += item->subCell() * newSubCellWidth;
1025 } 1025 }
1026 moveChild(item,x,y); 1026 moveChild(item,x,y);
1027 // qDebug("moveChild %s %d %d ", item->incidence()->summary().latin1() ,x,y); 1027 // qDebug("moveChild %s %d %d ", item->incidence()->summary().latin1() ,x,y);
1028 //item->updateItem(); 1028 //item->updateItem();
1029 } 1029 }
1030 1030
1031 } else { 1031 } else {
1032 placeItem->setSubCell(0); 1032 placeItem->setSubCell(0);
1033 placeItem->setSubCells(1); 1033 placeItem->setSubCells(1);
1034 if (mAllDayMode) placeItem->resize(placeItem->width(),mGridSpacingY); 1034 if (mAllDayMode) placeItem->resize(placeItem->width(),mGridSpacingY);
1035 else placeItem->resize(mGridSpacingX,placeItem->height()); 1035 else placeItem->resize(mGridSpacingX,placeItem->height());
1036 int x,y; 1036 int x,y;
1037 gridToContents(placeItem->cellX(),placeItem->cellYTop(),x,y); 1037 gridToContents(placeItem->cellX(),placeItem->cellYTop(),x,y);
1038 moveChild(placeItem,x,y); 1038 moveChild(placeItem,x,y);
1039 } 1039 }
1040 placeItem->setConflictItems(conflictItems); 1040 placeItem->setConflictItems(conflictItems);
1041 // for ( item=conflictItems.first(); item != 0; 1041 // for ( item=conflictItems.first(); item != 0;
1042// item=conflictItems.next() ) { 1042// item=conflictItems.next() ) {
1043// //item->updateItem(); 1043// //item->updateItem();
1044// //qDebug("xxx item->updateItem() %s %d %d", item->incidence()->summary().latin1(),item->x(), item->y() ); 1044// //qDebug("xxx item->updateItem() %s %d %d", item->incidence()->summary().latin1(),item->x(), item->y() );
1045// } 1045// }
1046// placeItem->updateItem(); 1046// placeItem->updateItem();
1047} 1047}
1048 1048
1049void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) 1049void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1050{ 1050{
1051 if ( globalFlagBlockAgenda ) 1051 if ( globalFlagBlockAgenda )
1052 return; 1052 return;
1053 //qDebug("KOAgenda::drawContents "); 1053 //qDebug("KOAgenda::drawContents ");
1054 if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) 1054 if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() )
1055 ;//drawContentsToPainter(); 1055 ;//drawContentsToPainter();
1056 1056
1057 QPaintDevice* pd = p->device(); 1057 QPaintDevice* pd = p->device();
1058 p->end(); 1058 p->end();
1059 int vx, vy; 1059 int vx, vy;
1060 int selectionX = KOGlobals::self()->reverseLayout() ? 1060 int selectionX = KOGlobals::self()->reverseLayout() ?
1061 (mColumns - 1 - mSelectionCellX) * mGridSpacingX : 1061 (mColumns - 1 - mSelectionCellX) * mGridSpacingX :
1062 mSelectionCellX * mGridSpacingX; 1062 mSelectionCellX * mGridSpacingX;
1063 contentsToViewport ( cx, cy, vx,vy); 1063 contentsToViewport ( cx, cy, vx,vy);
1064 // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ; 1064 // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ;
1065 if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) 1065 if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) )
1066 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); 1066 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
1067 1067
1068 if ( mSelectionHeight > 0 ) { 1068 if ( mSelectionHeight > 0 ) {
1069 //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); 1069 //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
1070 if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && 1070 if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
1071 ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { 1071 ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
1072 contentsToViewport ( selectionX, mSelectionYTop, vx,vy); 1072 contentsToViewport ( selectionX, mSelectionYTop, vx,vy);
1073 bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); 1073 bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
1074 } 1074 }
1075 } 1075 }
1076 //qDebug("btbl "); 1076 //qDebug("btbl ");
1077 p->begin( pd ); 1077 p->begin( pd );
1078 //qDebug("end "); 1078 //qDebug("end ");
1079} 1079}
1080 1080
1081void KOAgenda::finishUpdate() 1081void KOAgenda::finishUpdate()
1082{ 1082{
1083 1083
1084 KOAgendaItem *item; 1084 KOAgendaItem *item;
1085 globalFlagBlockAgendaItemPaint = 1; 1085 globalFlagBlockAgendaItemPaint = 1;
1086 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 1086 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
1087 if ( !item->isVisible() ) 1087 if ( !item->isVisible() )
1088 item->show(); 1088 item->show();
1089 1089
1090 } 1090 }
1091 globalFlagBlockAgendaItemUpdate = 0; 1091 globalFlagBlockAgendaItemUpdate = 0;
1092 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 1092 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
1093 item->repaintMe( ); 1093 item->repaintMe( );
1094 } 1094 }
1095 globalFlagBlockAgendaItemUpdate = 1; 1095 globalFlagBlockAgendaItemUpdate = 1;
1096 qApp->processEvents(); 1096 qApp->processEvents();
1097 globalFlagBlockAgendaItemPaint = 0; 1097 globalFlagBlockAgendaItemPaint = 0;
1098 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 1098 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
1099 item->repaint( false ); 1099 item->repaint( false );
1100 } 1100 }
1101 1101
1102} 1102}
1103 1103
1104/* 1104/*
1105 Draw grid in the background of the agenda. 1105 Draw grid in the background of the agenda.
1106*/ 1106*/
1107void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// int cx, int cy, int cw, int ch) 1107void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// int cx, int cy, int cw, int ch)
1108{ 1108{
1109 1109
1110 1110
1111 if ( ! mGridSpacingX || ! mGridSpacingY ||! mHolidayMask ) 1111 if ( ! mGridSpacingX || ! mGridSpacingY ||! mHolidayMask )
1112 return; 1112 return;
1113 if ( globalFlagBlockAgenda > 1 && globalFlagBlockAgenda < 4 ) 1113 if ( globalFlagBlockAgenda > 1 && globalFlagBlockAgenda < 4 )
1114 return; 1114 return;
1115 int cx = 0, cy = 0, cw = contentsWidth(), ch = contentsHeight(); 1115 int cx = 0, cy = 0, cw = contentsWidth(), ch = contentsHeight();
1116 if ( ch < 1 ) 1116 if ( ch < 1 )
1117 ch = 1; 1117 ch = 1;
1118 if ( mPaintPixmap.width() < contentsWidth()+42 || mPaintPixmap.height() < ch ) { 1118 if ( mPaintPixmap.width() < contentsWidth()+42 || mPaintPixmap.height() < ch ) {
1119 mPaintPixmap.resize( contentsWidth()+42, ch ); 1119 mPaintPixmap.resize( contentsWidth()+42, ch );
1120 } 1120 }
1121 mCurPixWid = contentsWidth(); 1121 mCurPixWid = contentsWidth();
1122 mCurPixHei = ch; 1122 mCurPixHei = ch;
1123 if ( mHighlightPixmap.width() < mGridSpacingX-1 || mHighlightPixmap.height() < ch ) { 1123 if ( mHighlightPixmap.width() < mGridSpacingX-1 || mHighlightPixmap.height() < ch ) {
1124 mHighlightPixmap.resize( mGridSpacingX-1, ch ); 1124 mHighlightPixmap.resize( mGridSpacingX-1, ch );
1125 mHighlightPixmap.fill ( KOPrefs::instance()->mHighlightColor ); 1125 mHighlightPixmap.fill ( KOPrefs::instance()->mHighlightColor );
1126 } 1126 }
1127 mPixPainter.begin( &mPaintPixmap) ; 1127 mPixPainter.begin( &mPaintPixmap) ;
1128 //qDebug("wid %d hei %d ",mPaintPixmap.width(),mPaintPixmap.height() ); 1128 //qDebug("wid %d hei %d ",mPaintPixmap.width(),mPaintPixmap.height() );
1129 QPainter * p ; 1129 QPainter * p ;
1130 if (paint == 0) { 1130 if (paint == 0) {
1131 mPaintPixmap.fill(KOPrefs::instance()->mAgendaBgColor); 1131 mPaintPixmap.fill(KOPrefs::instance()->mAgendaBgColor);
1132 p = &mPixPainter; 1132 p = &mPixPainter;
1133 } 1133 }
1134 else 1134 else
1135 p = paint ; 1135 p = paint ;
1136 // qDebug("++++++KOAgenda::drawContentsTo Painter %d %d %d %d ", cx, cy, cw, ch); 1136 // qDebug("++++++KOAgenda::drawContentsTo Painter %d %d %d %d ", cx, cy, cw, ch);
1137 1137
1138 //--cx;++cw; 1138 //--cx;++cw;
1139 int lGridSpacingY = mGridSpacingY*2; 1139 int lGridSpacingY = mGridSpacingY*2;
1140 int selDay; 1140 int selDay;
1141 if ( !backgroundOnly ) 1141 if ( !backgroundOnly )
1142 for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) 1142 for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay)
1143 { 1143 {
1144 if ( mSelectedDates[selDay] == QDateTime::currentDateTime ().date() && KOPrefs::instance()->mHighlightCurrentDay) { 1144 if ( mSelectedDates[selDay] == QDateTime::currentDateTime ().date() && KOPrefs::instance()->mHighlightCurrentDay) {
1145 int x1 = cx; 1145 int x1 = cx;
1146 int y1 = 0; 1146 int y1 = 0;
1147 if (y1 < cy) y1 = cy; 1147 if (y1 < cy) y1 = cy;
1148 int x2 = cx+cw-1; 1148 int x2 = cx+cw-1;
1149 int y2 = contentsHeight(); 1149 int y2 = contentsHeight();
1150 if (y2 > cy+ch-1) y2=cy+ch-1; 1150 if (y2 > cy+ch-1) y2=cy+ch-1;
1151 if (x2 >= x1 && y2 >= y1) { 1151 if (x2 >= x1 && y2 >= y1) {
1152 int gxStart = selDay; 1152 int gxStart = selDay;
1153 int gxEnd = gxStart ; 1153 int gxEnd = gxStart ;
1154 int xStart = KOGlobals::self()->reverseLayout() ? 1154 int xStart = KOGlobals::self()->reverseLayout() ?
1155 (mColumns - 1 - gxStart)*mGridSpacingX : 1155 (mColumns - 1 - gxStart)*mGridSpacingX :
1156 gxStart*mGridSpacingX; 1156 gxStart*mGridSpacingX;
1157 if (xStart < x1) xStart = x1; 1157 if (xStart < x1) xStart = x1;
1158 int xEnd = KOGlobals::self()->reverseLayout() ? 1158 int xEnd = KOGlobals::self()->reverseLayout() ?
1159 (mColumns - gxStart)*mGridSpacingX-1 : 1159 (mColumns - gxStart)*mGridSpacingX-1 :
1160 (gxStart+1)*mGridSpacingX-1; 1160 (gxStart+1)*mGridSpacingX-1;
1161 if (xEnd > x2) xEnd = x2; 1161 if (xEnd > x2) xEnd = x2;
1162 if ( KOPrefs::instance()->mUseHighlightLightColor ) 1162 if ( KOPrefs::instance()->mUseHighlightLightColor )
1163 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, 1163 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1,
1164 KOPrefs::instance()->mAgendaBgColor.light()); 1164 KOPrefs::instance()->mAgendaBgColor.light());
1165 else 1165 else
1166 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, 1166 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1,
1167 KOPrefs::instance()->mAgendaBgColor.dark()); 1167 KOPrefs::instance()->mAgendaBgColor.dark());
1168 1168
1169 } 1169 }
1170 } 1170 }
1171 } 1171 }
1172 // Highlight working hours 1172 // Highlight working hours
1173 1173
1174 if ( !backgroundOnly ) 1174 if ( !backgroundOnly )
1175 if (mWorkingHoursEnable) { 1175 if (mWorkingHoursEnable) {
1176 int x1 = cx; 1176 int x1 = cx;
1177 int y1 = mWorkingHoursYTop; 1177 int y1 = mWorkingHoursYTop;
1178 if (y1 < cy) y1 = cy; 1178 if (y1 < cy) y1 = cy;
1179 int x2 = cx+cw-1; 1179 int x2 = cx+cw-1;
1180 // int x2 = mGridSpacingX * 5 - 1; 1180 // int x2 = mGridSpacingX * 5 - 1;
1181 // if (x2 > cx+cw-1) x2 = cx + cw - 1; 1181 // if (x2 > cx+cw-1) x2 = cx + cw - 1;
1182 int y2 = mWorkingHoursYBottom; 1182 int y2 = mWorkingHoursYBottom;
1183 if (y2 > cy+ch-1) y2=cy+ch-1; 1183 if (y2 > cy+ch-1) y2=cy+ch-1;
1184 1184
1185 if (x2 >= x1 && y2 >= y1) { 1185 if (x2 >= x1 && y2 >= y1) {
1186 // qDebug("x1 %d mGridSpacingX %d ", x1, mGridSpacingX ); 1186 // qDebug("x1 %d mGridSpacingX %d ", x1, mGridSpacingX );
1187 int gxStart = x1/mGridSpacingX; 1187 int gxStart = x1/mGridSpacingX;
1188 int gxEnd = x2/mGridSpacingX; 1188 int gxEnd = x2/mGridSpacingX;
1189 while(gxStart <= gxEnd) { 1189 while(gxStart <= gxEnd) {
1190 if (gxStart < int(mHolidayMask->count()) && 1190 if (gxStart < int(mHolidayMask->count()) &&
1191 !mHolidayMask->at(gxStart)) { 1191 !mHolidayMask->at(gxStart)) {
1192 int xStart = KOGlobals::self()->reverseLayout() ? 1192 int xStart = KOGlobals::self()->reverseLayout() ?
1193 (mColumns - 1 - gxStart)*mGridSpacingX : 1193 (mColumns - 1 - gxStart)*mGridSpacingX :
1194 gxStart*mGridSpacingX; 1194 gxStart*mGridSpacingX;
1195 if (xStart < x1) xStart = x1; 1195 if (xStart < x1) xStart = x1;
1196 int xEnd = KOGlobals::self()->reverseLayout() ? 1196 int xEnd = KOGlobals::self()->reverseLayout() ?
1197 (mColumns - gxStart)*mGridSpacingX-1 : 1197 (mColumns - gxStart)*mGridSpacingX-1 :
1198 (gxStart+1)*mGridSpacingX-1; 1198 (gxStart+1)*mGridSpacingX-1;
1199 if (xEnd > x2) xEnd = x2; 1199 if (xEnd > x2) xEnd = x2;
1200 if ( mSelectedDates[gxStart] == QDateTime::currentDateTime ().date()&& KOPrefs::instance()->mHighlightCurrentDay ) { 1200 if ( mSelectedDates[gxStart] == QDateTime::currentDateTime ().date()&& KOPrefs::instance()->mHighlightCurrentDay ) {
1201 if ( KOPrefs::instance()->mUseHighlightLightColor ) 1201 if ( KOPrefs::instance()->mUseHighlightLightColor )
1202 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, 1202 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1,
1203 KOPrefs::instance()->mWorkingHoursColor.light()); 1203 KOPrefs::instance()->mWorkingHoursColor.light());
1204 else 1204 else
1205 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, 1205 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1,
1206 KOPrefs::instance()->mWorkingHoursColor.dark()); 1206 KOPrefs::instance()->mWorkingHoursColor.dark());
1207 } else { 1207 } else {
1208 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, 1208 p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1,
1209 KOPrefs::instance()->mWorkingHoursColor); 1209 KOPrefs::instance()->mWorkingHoursColor);
1210 } 1210 }
1211 } 1211 }
1212 ++gxStart; 1212 ++gxStart;
1213 } 1213 }
1214 } 1214 }
1215 } 1215 }
1216 /* 1216 /*
1217 int selectionX = KOGlobals::self()->reverseLayout() ? 1217 int selectionX = KOGlobals::self()->reverseLayout() ?
1218 (mColumns - 1 - mSelectionCellX) * mGridSpacingX : 1218 (mColumns - 1 - mSelectionCellX) * mGridSpacingX :
1219 mSelectionCellX * mGridSpacingX; 1219 mSelectionCellX * mGridSpacingX;
1220 1220
1221 // Draw selection 1221 // Draw selection
1222 if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && 1222 if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
1223 ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { 1223 ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
1224 // TODO: paint only part within cx,cy,cw,ch 1224 // TODO: paint only part within cx,cy,cw,ch
1225 p->fillRect( selectionX, mSelectionYTop, mGridSpacingX, 1225 p->fillRect( selectionX, mSelectionYTop, mGridSpacingX,
1226 mSelectionHeight, KOPrefs::instance()->mHighlightColor ); 1226 mSelectionHeight, KOPrefs::instance()->mHighlightColor );
1227 } 1227 }
1228 */ 1228 */
1229 // Draw vertical lines of grid 1229 // Draw vertical lines of grid
1230 1230
1231 int x = ((int)(cx/mGridSpacingX))*mGridSpacingX; 1231 int x = ((int)(cx/mGridSpacingX))*mGridSpacingX;
1232 if ( mGridSpacingX > 0 ) { 1232 if ( mGridSpacingX > 0 ) {
1233 while (x < cx + cw) { 1233 while (x < cx + cw) {
1234 p->drawLine(x,cy,x,cy+ch); 1234 p->drawLine(x,cy,x,cy+ch);
1235 x+=mGridSpacingX; 1235 x+=mGridSpacingX;
1236 } 1236 }
1237 } 1237 }
1238 // Draw horizontal lines of grid 1238 // Draw horizontal lines of grid
1239 int y = ((int)(cy/lGridSpacingY))*lGridSpacingY; 1239 int y = ((int)(cy/lGridSpacingY))*lGridSpacingY;
1240 if ( lGridSpacingY > 0 ) { 1240 if ( lGridSpacingY > 0 ) {
1241 while (y < cy + ch) { 1241 while (y < cy + ch) {
1242 p->setPen( SolidLine );
1243 p->drawLine(cx,y,cx+cw,y);
1244 y+=lGridSpacingY;
1245 p->setPen( DotLine );
1242 p->drawLine(cx,y,cx+cw,y); 1246 p->drawLine(cx,y,cx+cw,y);
1243 y+=lGridSpacingY; 1247 y+=lGridSpacingY;
1244 } 1248 }
1249 p->setPen( SolidLine );
1245 } 1250 }
1246 mPixPainter.end() ; 1251 mPixPainter.end() ;
1247} 1252}
1248 1253
1249/* 1254/*
1250 Convert srcollview contents coordinates to agenda grid coordinates. 1255 Convert srcollview contents coordinates to agenda grid coordinates.
1251*/ 1256*/
1252void KOAgenda::contentsToGrid (int x, int y, int& gx, int& gy) 1257void KOAgenda::contentsToGrid (int x, int y, int& gx, int& gy)
1253{ 1258{
1254 gx = KOGlobals::self()->reverseLayout() ? mColumns - 1 - x/mGridSpacingX : 1259 gx = KOGlobals::self()->reverseLayout() ? mColumns - 1 - x/mGridSpacingX :
1255 x/mGridSpacingX; 1260 x/mGridSpacingX;
1256 gy = y/mGridSpacingY; 1261 gy = y/mGridSpacingY;
1257} 1262}
1258 1263
1259/* 1264/*
1260 Convert agenda grid coordinates to scrollview contents coordinates. 1265 Convert agenda grid coordinates to scrollview contents coordinates.
1261*/ 1266*/
1262void KOAgenda::gridToContents (int gx, int gy, int& x, int& y) 1267void KOAgenda::gridToContents (int gx, int gy, int& x, int& y)
1263{ 1268{
1264 x = KOGlobals::self()->reverseLayout() ? (mColumns - 1 - gx)*mGridSpacingX: 1269 x = KOGlobals::self()->reverseLayout() ? (mColumns - 1 - gx)*mGridSpacingX:
1265 gx*mGridSpacingX; 1270 gx*mGridSpacingX;
1266 y = gy*mGridSpacingY; 1271 y = gy*mGridSpacingY;
1267} 1272}
1268 1273
1269 1274
1270/* 1275/*
1271 Return Y coordinate corresponding to time. Coordinates are rounded to fit into 1276 Return Y coordinate corresponding to time. Coordinates are rounded to fit into
1272 the grid. 1277 the grid.
1273*/ 1278*/
1274int KOAgenda::timeToY(const QTime &time) 1279int KOAgenda::timeToY(const QTime &time)
1275{ 1280{
1276 int minutesPerCell = 24 * 60 / mRows; 1281 int minutesPerCell = 24 * 60 / mRows;
1277 int timeMinutes = time.hour() * 60 + time.minute(); 1282 int timeMinutes = time.hour() * 60 + time.minute();
1278 int Y = (timeMinutes + (minutesPerCell / 2)) / minutesPerCell; 1283 int Y = (timeMinutes + (minutesPerCell / 2)) / minutesPerCell;
1279 return Y; 1284 return Y;
1280} 1285}
1281 1286
1282 1287
1283/* 1288/*
1284 Return time corresponding to cell y coordinate. Coordinates are rounded to 1289 Return time corresponding to cell y coordinate. Coordinates are rounded to
1285 fit into the grid. 1290 fit into the grid.
1286*/ 1291*/
1287QTime KOAgenda::gyToTime(int gy) 1292QTime KOAgenda::gyToTime(int gy)
1288{ 1293{
1289 1294
1290 int secondsPerCell = 24 * 60 * 60/ mRows; 1295 int secondsPerCell = 24 * 60 * 60/ mRows;
1291 1296
1292 int timeSeconds = secondsPerCell * gy; 1297 int timeSeconds = secondsPerCell * gy;
1293 1298
1294 QTime time( 0, 0, 0 ); 1299 QTime time( 0, 0, 0 );
1295 if ( timeSeconds < 24 * 60 * 60 ) { 1300 if ( timeSeconds < 24 * 60 * 60 ) {
1296 time = time.addSecs(timeSeconds); 1301 time = time.addSecs(timeSeconds);
1297 } else { 1302 } else {
1298 time.setHMS( 23, 59, 59 ); 1303 time.setHMS( 23, 59, 59 );
1299 } 1304 }
1300 1305
1301 return time; 1306 return time;
1302} 1307}
1303 1308
1304void KOAgenda::setStartHour(int startHour) 1309void KOAgenda::setStartHour(int startHour)
1305{ 1310{
1306 int startCell = startHour * mRows / 24; 1311 int startCell = startHour * mRows / 24;
1307 setContentsPos(0,startCell * gridSpacingY()); 1312 setContentsPos(0,startCell * gridSpacingY());
1308} 1313}
1309void KOAgenda::hideUnused() 1314void KOAgenda::hideUnused()
1310{ 1315{
1311 // experimental only 1316 // experimental only
1312 // return; 1317 // return;
1313 KOAgendaItem *item; 1318 KOAgendaItem *item;
1314 for ( item=mUnusedItems.first(); item != 0; item=mUnusedItems.next() ) { 1319 for ( item=mUnusedItems.first(); item != 0; item=mUnusedItems.next() ) {
1315 item->hide(); 1320 item->hide();
1316 } 1321 }
1317} 1322}
1318 1323
1319 1324
1320KOAgendaItem *KOAgenda::getNewItem(Incidence * event,QDate qd, QWidget* view) 1325KOAgendaItem *KOAgenda::getNewItem(Incidence * event,QDate qd, QWidget* view)
1321{ 1326{
1322 1327
1323 KOAgendaItem *fi; 1328 KOAgendaItem *fi;
1324 for ( fi=mUnusedItems.first(); fi != 0; fi=mUnusedItems.next() ) { 1329 for ( fi=mUnusedItems.first(); fi != 0; fi=mUnusedItems.next() ) {
1325 if ( fi->incidence() == event ) { 1330 if ( fi->incidence() == event ) {
1326 mUnusedItems.remove(); 1331 mUnusedItems.remove();
1327 fi->init( event, qd ); 1332 fi->init( event, qd );
1328 return fi; 1333 return fi;
1329 } 1334 }
1330 } 1335 }
1331 fi=mUnusedItems.first(); 1336 fi=mUnusedItems.first();
1332 if ( fi ) { 1337 if ( fi ) {
1333 mUnusedItems.remove(); 1338 mUnusedItems.remove();
1334 fi->init( event, qd ); 1339 fi->init( event, qd );
1335 return fi; 1340 return fi;
1336 } 1341 }
1337 // qDebug("new KOAgendaItem "); 1342 // qDebug("new KOAgendaItem ");
1338 1343
1339 KOAgendaItem* agendaItem = new KOAgendaItem( event, qd, view, mAllDayMode ); 1344 KOAgendaItem* agendaItem = new KOAgendaItem( event, qd, view, mAllDayMode );
1340 agendaItem->installEventFilter(this); 1345 agendaItem->installEventFilter(this);
1341 addChild(agendaItem,0,0); 1346 addChild(agendaItem,0,0);
1342 return agendaItem; 1347 return agendaItem;
1343} 1348}
1344KOAgendaItem * KOAgenda::getItemForTodo ( Todo * todo ) 1349KOAgendaItem * KOAgenda::getItemForTodo ( Todo * todo )
1345{ 1350{
1346 KOAgendaItem *item; 1351 KOAgendaItem *item;
1347 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 1352 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
1348 if ( item->incidence() == todo ) { 1353 if ( item->incidence() == todo ) {
1349 mItems.remove(); 1354 mItems.remove();
1350 return item; 1355 return item;
1351 } 1356 }
1352 } 1357 }
1353 return 0; 1358 return 0;
1354} 1359}
1355 1360
1356 1361
1357void KOAgenda::updateTodo( Todo * todo, int days, bool remove) 1362void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
1358{ 1363{
1359 1364
1360 KOAgendaItem *item; 1365 KOAgendaItem *item;
1361 item = getItemForTodo ( todo ); 1366 item = getItemForTodo ( todo );
1362 //qDebug("KOAgenda::updateTodo %d %d %d %d", this, todo, days, remove); 1367 //qDebug("KOAgenda::updateTodo %d %d %d %d", this, todo, days, remove);
1363 if ( item ) { 1368 if ( item ) {
1364 blockSignals( true ); 1369 blockSignals( true );
1365 //qDebug("item found "); 1370 //qDebug("item found ");
1366 item->hide(); 1371 item->hide();
1367 item->setCellX(-2, -1 ); 1372 item->setCellX(-2, -1 );
1368 item->select(false); 1373 item->select(false);
1369 mUnusedItems.append( item ); 1374 mUnusedItems.append( item );
1370 mItems.remove( item ); 1375 mItems.remove( item );
1371 QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); 1376 QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
1372 KOAgendaItem *itemit; 1377 KOAgendaItem *itemit;
1373 //globalFlagBlockAgendaItemPaint = 1; 1378 //globalFlagBlockAgendaItemPaint = 1;
1374 for ( itemit=oldconflictItems.first(); itemit != 0; 1379 for ( itemit=oldconflictItems.first(); itemit != 0;
1375 itemit=oldconflictItems.next() ) { 1380 itemit=oldconflictItems.next() ) {
1376 if ( itemit != item ) 1381 if ( itemit != item )
1377 placeSubCells(itemit); 1382 placeSubCells(itemit);
1378 } 1383 }
1379 qApp->processEvents(); 1384 qApp->processEvents();
1380 //globalFlagBlockAgendaItemPaint = 0; 1385 //globalFlagBlockAgendaItemPaint = 0;
1381 for ( itemit=oldconflictItems.first(); itemit != 0; 1386 for ( itemit=oldconflictItems.first(); itemit != 0;
1382 itemit=oldconflictItems.next() ) { 1387 itemit=oldconflictItems.next() ) {
1383 globalFlagBlockAgendaItemUpdate = 0; 1388 globalFlagBlockAgendaItemUpdate = 0;
1384 if ( itemit != item ) 1389 if ( itemit != item )
1385 itemit->repaintMe(); 1390 itemit->repaintMe();
1386 globalFlagBlockAgendaItemUpdate = 1; 1391 globalFlagBlockAgendaItemUpdate = 1;
1387 itemit->repaint(); 1392 itemit->repaint();
1388 } 1393 }
1389 blockSignals( false ); 1394 blockSignals( false );
1390 } 1395 }
1391 if ( remove ) { 1396 if ( remove ) {
1392 //qDebug("remove****************************************** "); 1397 //qDebug("remove****************************************** ");
1393 return; 1398 return;
1394 } 1399 }
1395 //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); 1400 //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ ");
1396 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < QDate::currentDate())&& ( KOPrefs::instance()->mShowTodoInAgenda ); 1401 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < QDate::currentDate())&& ( KOPrefs::instance()->mShowTodoInAgenda );
1397 QDate currentDate; 1402 QDate currentDate;
1398 if ( overdue ) { 1403 if ( overdue ) {
1399 currentDate = QDate::currentDate(); 1404 currentDate = QDate::currentDate();
1400 days += todo->dtDue().date().daysTo( currentDate ); 1405 days += todo->dtDue().date().daysTo( currentDate );
1401 } 1406 }
1402 else 1407 else
1403 currentDate = todo->dtDue().date(); 1408 currentDate = todo->dtDue().date();
1404 1409
1405 if ( todo->doesFloat() || overdue ) { 1410 if ( todo->doesFloat() || overdue ) {
1406 if ( ! mAllDayMode ) return; 1411 if ( ! mAllDayMode ) return;
1407 // aldayagenda 1412 // aldayagenda
1408 globalFlagBlockAgendaItemPaint = 1; 1413 globalFlagBlockAgendaItemPaint = 1;
1409 item = insertAllDayItem(todo, currentDate,days, days); 1414 item = insertAllDayItem(todo, currentDate,days, days);
1410 item->show(); 1415 item->show();
1411 1416
1412 } 1417 }
1413 else { 1418 else {
1414 if ( mAllDayMode ) return; 1419 if ( mAllDayMode ) return;
1415 // mAgenda 1420 // mAgenda
1416 globalFlagBlockAgendaItemPaint = 1; 1421 globalFlagBlockAgendaItemPaint = 1;
1417 int endY = timeToY(todo->dtDue().time()) - 1; 1422 int endY = timeToY(todo->dtDue().time()) - 1;
1418 int hi = 12/KOPrefs::instance()->mHourSize; 1423 int hi = 12/KOPrefs::instance()->mHourSize;
1419 int startY = endY - 1-hi; 1424 int startY = endY - 1-hi;
1420 item = insertItem(todo,currentDate,days,startY,endY); 1425 item = insertItem(todo,currentDate,days,startY,endY);
1421 item->show(); 1426 item->show();
1422 } 1427 }
1423 qApp->processEvents(); 1428 qApp->processEvents();
1424 globalFlagBlockAgendaItemPaint = 0; 1429 globalFlagBlockAgendaItemPaint = 0;
1425 QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); 1430 QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
1426 KOAgendaItem *itemit; 1431 KOAgendaItem *itemit;
1427 for ( itemit=oldconflictItems.first(); itemit != 0; 1432 for ( itemit=oldconflictItems.first(); itemit != 0;
1428 itemit=oldconflictItems.next() ) { 1433 itemit=oldconflictItems.next() ) {
1429 globalFlagBlockAgendaItemUpdate = 0; 1434 globalFlagBlockAgendaItemUpdate = 0;
1430 itemit->repaintMe(); 1435 itemit->repaintMe();
1431 globalFlagBlockAgendaItemUpdate = 1; 1436 globalFlagBlockAgendaItemUpdate = 1;
1432 itemit->repaint(); 1437 itemit->repaint();
1433 } 1438 }
1434 globalFlagBlockAgendaItemUpdate = 0; 1439 globalFlagBlockAgendaItemUpdate = 0;
1435 item->repaintMe(); 1440 item->repaintMe();
1436 globalFlagBlockAgendaItemUpdate = 1; 1441 globalFlagBlockAgendaItemUpdate = 1;
1437 item->repaint(); 1442 item->repaint();
1438} 1443}
1439/* 1444/*
1440 Insert KOAgendaItem into agenda. 1445 Insert KOAgendaItem into agenda.
1441*/ 1446*/
1442KOAgendaItem *KOAgenda::insertItem (Incidence *event,QDate qd,int X,int YTop,int YBottom) 1447KOAgendaItem *KOAgenda::insertItem (Incidence *event,QDate qd,int X,int YTop,int YBottom)
1443{ 1448{
1444 //kdDebug() << "KOAgenda::insertItem:" << event->summary() << "-" << qd.toString() << " ;top, bottom:" << YTop << "," << YBottom << endl; 1449 //kdDebug() << "KOAgenda::insertItem:" << event->summary() << "-" << qd.toString() << " ;top, bottom:" << YTop << "," << YBottom << endl;
1445 1450
1446 if (mAllDayMode) { 1451 if (mAllDayMode) {
1447 kdDebug() << "KOAgenda: calling insertItem in all-day mode is illegal." << endl; 1452 kdDebug() << "KOAgenda: calling insertItem in all-day mode is illegal." << endl;
1448 return 0; 1453 return 0;
1449 } 1454 }
1450 1455
1451 KOAgendaItem *agendaItem = getNewItem(event,qd,viewport()); 1456 KOAgendaItem *agendaItem = getNewItem(event,qd,viewport());
1452 //agendaItem->setFrameStyle(WinPanel|Raised); 1457 //agendaItem->setFrameStyle(WinPanel|Raised);
1453 1458
1454 int YSize = YBottom - YTop + 1; 1459 int YSize = YBottom - YTop + 1;
1455 if (YSize < 0) { 1460 if (YSize < 0) {
1456 kdDebug() << "KOAgenda::insertItem(): Text: " << agendaItem->text() << " YSize<0" << endl; 1461 kdDebug() << "KOAgenda::insertItem(): Text: " << agendaItem->text() << " YSize<0" << endl;
1457 YSize = 1; 1462 YSize = 1;
1458 } 1463 }
1459 int iheight = mGridSpacingY * YSize; 1464 int iheight = mGridSpacingY * YSize;
1460 1465
1461 agendaItem->resize(mGridSpacingX,iheight ); 1466 agendaItem->resize(mGridSpacingX,iheight );
1462 agendaItem->setCellXY(X,YTop,YBottom); 1467 agendaItem->setCellXY(X,YTop,YBottom);
1463 agendaItem->setCellXWidth(X); 1468 agendaItem->setCellXWidth(X);
1464 1469
1465 //addChild(agendaItem,X*mGridSpacingX,YTop*mGridSpacingY); 1470 //addChild(agendaItem,X*mGridSpacingX,YTop*mGridSpacingY);
1466 mItems.append(agendaItem); 1471 mItems.append(agendaItem);
1467 1472
1468 placeSubCells(agendaItem); 1473 placeSubCells(agendaItem);
1469 1474
1470 //agendaItem->show(); 1475 //agendaItem->show();
1471 1476
1472 marcus_bains(); 1477 marcus_bains();
1473 1478
1474 return agendaItem; 1479 return agendaItem;
1475} 1480}
1476 1481
1477 1482
1478/* 1483/*
1479 Insert all-day KOAgendaItem into agenda. 1484 Insert all-day KOAgendaItem into agenda.
1480*/ 1485*/
1481KOAgendaItem *KOAgenda::insertAllDayItem (Incidence *event,QDate qd,int XBegin,int XEnd) 1486KOAgendaItem *KOAgenda::insertAllDayItem (Incidence *event,QDate qd,int XBegin,int XEnd)
1482{ 1487{
1483 if (!mAllDayMode) { 1488 if (!mAllDayMode) {
1484 return 0; 1489 return 0;
1485 } 1490 }
1486 1491
1487 KOAgendaItem *agendaItem = getNewItem(event,qd,viewport()); 1492 KOAgendaItem *agendaItem = getNewItem(event,qd,viewport());
1488 1493
1489 agendaItem->setCellXY(XBegin,0,0); 1494 agendaItem->setCellXY(XBegin,0,0);
1490 agendaItem->setCellXWidth(XEnd); 1495 agendaItem->setCellXWidth(XEnd);
1491 agendaItem->resize(mGridSpacingX * agendaItem->cellWidth(),mGridSpacingY); 1496 agendaItem->resize(mGridSpacingX * agendaItem->cellWidth(),mGridSpacingY);
1492 1497
1493 //addChild(agendaItem,XBegin*mGridSpacingX,0); 1498 //addChild(agendaItem,XBegin*mGridSpacingX,0);
1494 mItems.append(agendaItem); 1499 mItems.append(agendaItem);
1495 1500
1496 placeSubCells(agendaItem); 1501 placeSubCells(agendaItem);
1497 1502
1498 //agendaItem->show(); 1503 //agendaItem->show();
1499 1504
1500 return agendaItem; 1505 return agendaItem;
1501} 1506}
1502 1507
1503 1508
1504void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd, 1509void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd,
1505 int YTop,int YBottom) 1510 int YTop,int YBottom)
1506{ 1511{
1507 if (mAllDayMode) { 1512 if (mAllDayMode) {
1508 ; 1513 ;
1509 return; 1514 return;
1510 } 1515 }
1511 1516
1512 int cellX,cellYTop,cellYBottom; 1517 int cellX,cellYTop,cellYBottom;
1513 QString newtext; 1518 QString newtext;
1514 int width = XEnd - XBegin + 1; 1519 int width = XEnd - XBegin + 1;
1515 int count = 0; 1520 int count = 0;
1516 KOAgendaItem *current = 0; 1521 KOAgendaItem *current = 0;
1517 QPtrList<KOAgendaItem> multiItems; 1522 QPtrList<KOAgendaItem> multiItems;
1518 for (cellX = XBegin;cellX <= XEnd;++cellX) { 1523 for (cellX = XBegin;cellX <= XEnd;++cellX) {
1519 if (cellX == XBegin) cellYTop = YTop; 1524 if (cellX == XBegin) cellYTop = YTop;
1520 else cellYTop = 0; 1525 else cellYTop = 0;
1521 if (cellX == XEnd) cellYBottom = YBottom; 1526 if (cellX == XEnd) cellYBottom = YBottom;
1522 else cellYBottom = rows() - 1; 1527 else cellYBottom = rows() - 1;
1523 newtext = QString("(%1/%2): ").arg(++count).arg(width); 1528 newtext = QString("(%1/%2): ").arg(++count).arg(width);
1524 newtext.append(event->summary()); 1529 newtext.append(event->summary());
1525 current = insertItem(event,qd,cellX,cellYTop,cellYBottom); 1530 current = insertItem(event,qd,cellX,cellYTop,cellYBottom);
1526 current->setText(newtext); 1531 current->setText(newtext);
1527 multiItems.append(current); 1532 multiItems.append(current);
1528 } 1533 }
1529 1534
1530 KOAgendaItem *next = 0; 1535 KOAgendaItem *next = 0;
1531 KOAgendaItem *last = multiItems.last(); 1536 KOAgendaItem *last = multiItems.last();
1532 KOAgendaItem *first = multiItems.first(); 1537 KOAgendaItem *first = multiItems.first();
1533 KOAgendaItem *setFirst,*setLast; 1538 KOAgendaItem *setFirst,*setLast;
1534 current = first; 1539 current = first;
1535 while (current) { 1540 while (current) {
1536 next = multiItems.next(); 1541 next = multiItems.next();
1537 if (current == first) setFirst = 0; 1542 if (current == first) setFirst = 0;
1538 else setFirst = first; 1543 else setFirst = first;
1539 if (current == last) setLast = 0; 1544 if (current == last) setLast = 0;
1540 else setLast = last; 1545 else setLast = last;
1541 1546
1542 current->setMultiItem(setFirst,next,setLast); 1547 current->setMultiItem(setFirst,next,setLast);
1543 current = next; 1548 current = next;
1544 } 1549 }
1545 1550
1546 marcus_bains(); 1551 marcus_bains();
1547} 1552}
1548 1553
1549 1554
1550//QSizePolicy KOAgenda::sizePolicy() const 1555//QSizePolicy KOAgenda::sizePolicy() const
1551//{ 1556//{
1552 // Thought this would make the all-day event agenda minimum size and the 1557 // Thought this would make the all-day event agenda minimum size and the
1553 // normal agenda take the remaining space. But it doesnīt work. The QSplitter 1558 // normal agenda take the remaining space. But it doesnīt work. The QSplitter
1554 // donīt seem to think that an Expanding widget needs more space than a 1559 // donīt seem to think that an Expanding widget needs more space than a
1555 // Preferred one. 1560 // Preferred one.
1556 // But it doesnīt hurt, so it stays. 1561 // But it doesnīt hurt, so it stays.
1557// if (mAllDayMode) { 1562// if (mAllDayMode) {
1558// return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); 1563// return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
1559// } else { 1564// } else {
1560// return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); 1565// return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
1561// } 1566// }
1562//} 1567//}
1563void KOAgenda::finishResize ( ) 1568void KOAgenda::finishResize ( )
1564{ 1569{
1565 //qDebug("finishResize+++++++++++++++++++++++++++++++ ( ) "); 1570 //qDebug("finishResize+++++++++++++++++++++++++++++++ ( ) ");
1566 if ( globalFlagBlockAgenda == 0 ) { 1571 if ( globalFlagBlockAgenda == 0 ) {
1567 finishUpdate(); 1572 finishUpdate();
1568 //qDebug("finishUpdate() called "); 1573 //qDebug("finishUpdate() called ");
1569 } 1574 }
1570} 1575}
1571/* 1576/*
1572 Overridden from QScrollView to provide proper resizing of KOAgendaItems. 1577 Overridden from QScrollView to provide proper resizing of KOAgendaItems.
1573*/ 1578*/
1574void KOAgenda::resizeEvent ( QResizeEvent *ev ) 1579void KOAgenda::resizeEvent ( QResizeEvent *ev )
1575{ 1580{
1576 1581
1577 mResizeTimer.start( 150 , true ); 1582 mResizeTimer.start( 150 , true );
1578 computeSizes(); 1583 computeSizes();
1579 return; 1584 return;
1580 1585
1581} 1586}
1582void KOAgenda::computeSizes() 1587void KOAgenda::computeSizes()
1583{ 1588{
1584 if ( globalFlagBlockStartup ) 1589 if ( globalFlagBlockStartup )
1585 return; 1590 return;
1586 1591
1587 if (mAllDayMode) { 1592 if (mAllDayMode) {
1588 mGridSpacingX = (width()-3) / mColumns; 1593 mGridSpacingX = (width()-3) / mColumns;
1589 mGridSpacingY = height() - 2 * frameWidth() - 1; 1594 mGridSpacingY = height() - 2 * frameWidth() - 1;
1590 resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY + 1); 1595 resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY + 1);
1591// mGridSpacingY = height(); 1596// mGridSpacingY = height();
1592// resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); 1597// resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 );
1593 1598
1594 KOAgendaItem *item; 1599 KOAgendaItem *item;
1595 int subCellWidth; 1600 int subCellWidth;
1596 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 1601 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
1597 subCellWidth = mGridSpacingY / item->subCells(); 1602 subCellWidth = mGridSpacingY / item->subCells();
1598 item->resize(mGridSpacingX * item->cellWidth(),subCellWidth); 1603 item->resize(mGridSpacingX * item->cellWidth(),subCellWidth);
1599 moveChild(item,KOGlobals::self()->reverseLayout() ? 1604 moveChild(item,KOGlobals::self()->reverseLayout() ?
1600 (mColumns - 1 - item->cellX()) * mGridSpacingX : 1605 (mColumns - 1 - item->cellX()) * mGridSpacingX :
1601 item->cellX() * mGridSpacingX, 1606 item->cellX() * mGridSpacingX,
1602 item->subCell() * subCellWidth); 1607 item->subCell() * subCellWidth);
1603 } 1608 }
1604 KOPrefs::instance()->mAllDaySize = mGridSpacingY; 1609 KOPrefs::instance()->mAllDaySize = mGridSpacingY;
1605 } else { 1610 } else {
1606 mGridSpacingX = (width() - verticalScrollBar()->width()-3)/mColumns; 1611 mGridSpacingX = (width() - verticalScrollBar()->width()-3)/mColumns;
1607 if (height() > mGridSpacingY * mRows + 1 ) { 1612 if (height() > mGridSpacingY * mRows + 1 ) {
1608 KOPrefs::instance()->mHourSize = ((height())/mRows)+1; 1613 KOPrefs::instance()->mHourSize = ((height())/mRows)+1;
1609 mGridSpacingY = KOPrefs::instance()->mHourSize ; 1614 mGridSpacingY = KOPrefs::instance()->mHourSize ;
1610 resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); 1615 resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 );
1611 emit resizedSignal(); 1616 emit resizedSignal();
1612 } else 1617 } else
1613 resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); 1618 resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 );
1614 KOAgendaItem *item; 1619 KOAgendaItem *item;
1615 int subCellWidth; 1620 int subCellWidth;
1616 1621
1617 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 1622 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
1618 subCellWidth = mGridSpacingX / item->subCells(); 1623 subCellWidth = mGridSpacingX / item->subCells();
1619 item->resize(subCellWidth,item->height()); 1624 item->resize(subCellWidth,item->height());
1620 moveChild(item,(KOGlobals::self()->reverseLayout() ? 1625 moveChild(item,(KOGlobals::self()->reverseLayout() ?
1621 (mColumns - 1 - item->cellX()) * mGridSpacingX : 1626 (mColumns - 1 - item->cellX()) * mGridSpacingX :
1622 item->cellX() * mGridSpacingX) + 1627 item->cellX() * mGridSpacingX) +
1623 item->subCell() * subCellWidth,childY(item)); 1628 item->subCell() * subCellWidth,childY(item));
1624 } 1629 }
1625 } 1630 }
1626 int cw = contentsWidth(); 1631 int cw = contentsWidth();
1627 int ch = contentsHeight(); 1632 int ch = contentsHeight();
1628 if ( mAllDayMode ) { 1633 if ( mAllDayMode ) {