summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-04 23:05:50 (UTC)
committer zautrix <zautrix>2005-02-04 23:05:50 (UTC)
commitc6dceabcb41f6300ca97e69872fc801451944a32 (patch) (unidiff)
tree40a47b4c306329f47645f1ac7f2bc9420a67066c
parent53099ae3a9ef02549536dab3dd6870b7a2874284 (diff)
downloadkdepimpi-c6dceabcb41f6300ca97e69872fc801451944a32.zip
kdepimpi-c6dceabcb41f6300ca97e69872fc801451944a32.tar.gz
kdepimpi-c6dceabcb41f6300ca97e69872fc801451944a32.tar.bz2
nochn fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--korganizer/kotodoview.cpp21
-rw-r--r--korganizer/kotodoview.h1
3 files changed, 16 insertions, 8 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 7214035..14dcdac 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,905 +1,907 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.3 ************ 3********** VERSION 2.0.3 ************
4 4
5KO/Pi: 5KO/Pi:
6Added feature for changing alarm settings for many items at once: 6Added feature for changing alarm settings for many items at once:
7Open list view (or search dialog), select the desired items and choose in 7Open list view (or search dialog), select the desired items and choose in
8the popup menu: Set alarm for selected... 8the popup menu: Set alarm for selected...
9 9
10Added to the event/todo viewer the option to send an email to 10Added to the event/todo viewer the option to send an email to
11all attendees or all selected (with RSVP) attendees. 11all attendees or all selected (with RSVP) attendees.
12 12
13Made the week-month mode changing in month view faster. 13Made the week-month mode changing in month view faster.
14 14
15Made month view better useable with keyboard. 15Made month view better useable with keyboard.
16Now TAB key jumps to next cell with an event/todo. 16Now TAB key jumps to next cell with an event/todo.
17Scroll in cell with coursor keys, scroll in time (next week) with 17Scroll in cell with coursor keys, scroll in time (next week) with
18Shift/Control + coursorkeys. 18Shift/Control + coursorkeys.
19 19
20Fixeg bug that the todo view flat mode was reset after first view update.
21
20********** VERSION 2.0.2 ************ 22********** VERSION 2.0.2 ************
21 23
22KO/Pi: 24KO/Pi:
23Fixed the layout problem of the day label buttons 25Fixed the layout problem of the day label buttons
24of the agenda view introduced in version 2.0.1. 26of the agenda view introduced in version 2.0.1.
25 27
26Added WhatsThis support for the todo view and the list view. 28Added WhatsThis support for the todo view and the list view.
27 29
28Added a quite useful feature to the montview. 30Added a quite useful feature to the montview.
29Just click on the week numbers on the left. 31Just click on the week numbers on the left.
30And in the top right corner of month view/agenda view 32And in the top right corner of month view/agenda view
31there is now a "week number quick selector". 33there is now a "week number quick selector".
32(Click on the black triangle). 34(Click on the black triangle).
33 35
34Made the quite difficult timezone change in KO/Pi easy. 36Made the quite difficult timezone change in KO/Pi easy.
35 37
36OM/Pi: 38OM/Pi:
37Fixed too small icons on desktop. 39Fixed too small icons on desktop.
38Fixed non visible icons in mainwindow on Z with fastload enabled. 40Fixed non visible icons in mainwindow on Z with fastload enabled.
39Added signature file setting to smtp account config. 41Added signature file setting to smtp account config.
40And the signature can be edited and saved in the edit mail dialog. 42And the signature can be edited and saved in the edit mail dialog.
41That does mean: 43That does mean:
42Simply edit the signature for the selected smtp account in the 44Simply edit the signature for the selected smtp account in the
43edit new mail dialog and press the "save signature" button there. 45edit new mail dialog and press the "save signature" button there.
44Then the signature is saved to the file specified in the smtp account settings. 46Then the signature is saved to the file specified in the smtp account settings.
45If there is no file specified, it is saved automatically to the file 47If there is no file specified, it is saved automatically to the file
46kdepim/apps/kopiemail/<accountname>.sig. 48kdepim/apps/kopiemail/<accountname>.sig.
47 49
48 50
49 51
50********** VERSION 2.0.1 ************ 52********** VERSION 2.0.1 ************
51 53
52Oooops ... I forgot to test on the Zaurus 5500 ... 54Oooops ... I forgot to test on the Zaurus 5500 ...
53 55
54Fixed many problems of new (english) strings (and german translations) 56Fixed many problems of new (english) strings (and german translations)
55introduced in the latest versions, where the text was not fitting on the 57introduced in the latest versions, where the text was not fitting on the
56240x320 display of the Zaurus 5500. 58240x320 display of the Zaurus 5500.
57 59
58KO/Pi: 60KO/Pi:
59Added a popup menu ( press pen and hold to get popup ) to the agenda view 61Added a popup menu ( press pen and hold to get popup ) to the agenda view
60with many useful items (add event/todo, show next week, two weeks, month, journal). 62with many useful items (add event/todo, show next week, two weeks, month, journal).
61 63
62Added items to the todolist popup menu for: 64Added items to the todolist popup menu for:
63Display all opened, all closed or all todos flat. 65Display all opened, all closed or all todos flat.
64The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 66The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
65Made the reparenting of todos on the desktop possible via Drag&Drop. 67Made the reparenting of todos on the desktop possible via Drag&Drop.
66Fixed several bugs in setting the completed datetime for todos. 68Fixed several bugs in setting the completed datetime for todos.
67Added info about completed datetime of todos to the todo viewer. 69Added info about completed datetime of todos to the todo viewer.
68Now displaying a completed todo (with completed datetime set) in the agenda view 70Now displaying a completed todo (with completed datetime set) in the agenda view
69at the time of the completion. Such that now it is possible to see in the agenda view 71at the time of the completion. Such that now it is possible to see in the agenda view
70when what todo was completed. 72when what todo was completed.
71Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 73Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
72Now the behaviour is: 74Now the behaviour is:
73Setting a parent to complete sets all (sub)childs to complete. 75Setting a parent to complete sets all (sub)childs to complete.
74Setting a parent to uncomplete does not change the childs. 76Setting a parent to uncomplete does not change the childs.
75Setting a child to uncomplete sets all parent to uncomplete. 77Setting a child to uncomplete sets all parent to uncomplete.
76Setting a child to complete does not change the parents. 78Setting a child to complete does not change the parents.
77 79
78Smart updating and double buffering of the daymatrix. 80Smart updating and double buffering of the daymatrix.
79Showing holidays in the day matrix. 81Showing holidays in the day matrix.
80Many other small performance updates. 82Many other small performance updates.
81 83
82Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 84Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
83 85
84Now the translation file usertranslation.txt is supposed to be in utf8 format. 86Now the translation file usertranslation.txt is supposed to be in utf8 format.
85If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu. 87If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
86 88
87 89
88********** VERSION 2.0.0 ************ 90********** VERSION 2.0.0 ************
89 91
90Stable release 2.0.0! 92Stable release 2.0.0!
91 93
92KO/Pi: 94KO/Pi:
93Fixed problem in edit dialog recreation at startup. 95Fixed problem in edit dialog recreation at startup.
94Made "toggle view*" menu items enabled context sensitive. 96Made "toggle view*" menu items enabled context sensitive.
95Changed agenda size menu to items 1-10. 97Changed agenda size menu to items 1-10.
96Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 98Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
97Usebility enhancements in the KO/Pi menus. 99Usebility enhancements in the KO/Pi menus.
98Birthday import now adds year to summary. 100Birthday import now adds year to summary.
99What's Next view shows age in years for birthday. 101What's Next view shows age in years for birthday.
100 102
101OM/Pi: 103OM/Pi:
102Added three info lines to display subject, from and to of selected mails. 104Added three info lines to display subject, from and to of selected mails.
103 105
104KA/Pi: 106KA/Pi:
105Fixed jump bar behaviour on Zaurus. 107Fixed jump bar behaviour on Zaurus.
106Now KA/Pi search field supports searching for a range of starting characters. 108Now KA/Pi search field supports searching for a range of starting characters.
107E.g. to search for all contact beginning with b to n, type 109E.g. to search for all contact beginning with b to n, type
108b-n 110b-n
109in the search field. 111in the search field.
110 112
111********** VERSION 1.9.20 ************ 113********** VERSION 1.9.20 ************
112 114
113KO/Pi: 115KO/Pi:
114Added for the "dislplay one day" agenda mode 116Added for the "dislplay one day" agenda mode
115info in the caption and in the day lables: 117info in the caption and in the day lables:
116Now it is displayed, if the selected day is from "day before yesterday" 118Now it is displayed, if the selected day is from "day before yesterday"
117to "day after tomorrow". 119to "day after tomorrow".
118Made it possible to delete a Todo, which has sub-todos. 120Made it possible to delete a Todo, which has sub-todos.
119Fixed two small problems in the todo view. 121Fixed two small problems in the todo view.
120Added missing German translation for filter edit and print dialog. 122Added missing German translation for filter edit and print dialog.
121Made search dialog closeable by cancel key. 123Made search dialog closeable by cancel key.
122 124
123Made it possible to select in the date picker the (ligt grey ) 125Made it possible to select in the date picker the (ligt grey )
124dates of the prev./next month with the mouse. 126dates of the prev./next month with the mouse.
125 127
126OM/Pi: 128OM/Pi:
127"Delete mail" icon in main window now deletes all selected mails. 129"Delete mail" icon in main window now deletes all selected mails.
128Fixed the problem, that the state flag of imap mails was ignored. 130Fixed the problem, that the state flag of imap mails was ignored.
129Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 131Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
130to indecate that they are already seen. 132to indecate that they are already seen.
131Fixed the problem that the body of some mails was not displayed in the 133Fixed the problem that the body of some mails was not displayed in the
132mail viewer when fetching them from the imap server directly to read them. 134mail viewer when fetching them from the imap server directly to read them.
133Made it (configurable) possible to show the "To:" field in the list view. 135Made it (configurable) possible to show the "To:" field in the list view.
134Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 136Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
135Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 137Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
136local storage folder (specified in account settings) of the account of the mail. 138local storage folder (specified in account settings) of the account of the mail.
137Removed some memory leaks in OM/Pi. 139Removed some memory leaks in OM/Pi.
138 140
139 141
140********** VERSION 1.9.19 ************ 142********** VERSION 1.9.19 ************
141 143
142Added a lot of missing translations to KA/Pi, 144Added a lot of missing translations to KA/Pi,
143Added some missing translations to KO/Pi and OM/Pi. 145Added some missing translations to KO/Pi and OM/Pi.
144 146
145Fixed some minor problems in KA/Pi + KO/Pi. 147Fixed some minor problems in KA/Pi + KO/Pi.
146 148
147Fixed a crash when closing PwM/Pi. 149Fixed a crash when closing PwM/Pi.
148Added German translation for PwM/Pi. 150Added German translation for PwM/Pi.
149 151
150Made view change and Month View update faster in KO/Pi. 152Made view change and Month View update faster in KO/Pi.
151 153
152 154
153********** VERSION 1.9.18 ************ 155********** VERSION 1.9.18 ************
154 156
155FYI: The VERSION 1.9.17 was a testing release only. 157FYI: The VERSION 1.9.17 was a testing release only.
156Please read the changelog of VERSION 1.9.17 as well. 158Please read the changelog of VERSION 1.9.17 as well.
157 159
158Cleaned up the syncing config dialog. 160Cleaned up the syncing config dialog.
159Added sync config options for date range for events. 161Added sync config options for date range for events.
160Added sync config options for filters on incoming data. 162Added sync config options for filters on incoming data.
161Added sync config options for filters on outgoing data. 163Added sync config options for filters on outgoing data.
162Please read the updated SyncHowTo about the new filter settings. 164Please read the updated SyncHowTo about the new filter settings.
163These filter settings make it now possible to sync with shared 165These filter settings make it now possible to sync with shared
164calendars without writing back private or confidential data 166calendars without writing back private or confidential data
165(via the outgoing filters). 167(via the outgoing filters).
166To sync only with particular parts of a shared calendar, 168To sync only with particular parts of a shared calendar,
167the incoming filter settings can be used. 169the incoming filter settings can be used.
168An example can be found in the SyncHowTo. 170An example can be found in the SyncHowTo.
169Same for shared addressbooks. 171Same for shared addressbooks.
170 172
171Added a setting for the global kdepim data storage. 173Added a setting for the global kdepim data storage.
172Usually the data is stored in (yourhomedir/kdepim). 174Usually the data is stored in (yourhomedir/kdepim).
173Now you can set in the Global config dialog TAB, subTAB "Data storage path" 175Now you can set in the Global config dialog TAB, subTAB "Data storage path"
174a directory where all the kdepim data is stored. 176a directory where all the kdepim data is stored.
175That makes it easy to save all kdepim data on a SD card on the Z, for example. 177That makes it easy to save all kdepim data on a SD card on the Z, for example.
176 178
177KO/Pi: 179KO/Pi:
178The timeedit input has a pulldown list for times. 180The timeedit input has a pulldown list for times.
179If opened, this pulldown list should now has the right time highlighted. 181If opened, this pulldown list should now has the right time highlighted.
180Added the possibility to exclude events/todos/journals in a filter. 182Added the possibility to exclude events/todos/journals in a filter.
181You should exclude journals, if you do not want them to sync with a public calendar. 183You should exclude journals, if you do not want them to sync with a public calendar.
182 184
183KA/Pi: 185KA/Pi:
184Added the possibility to in/exclude public/private/confidential contacts to a filter. 186Added the possibility to in/exclude public/private/confidential contacts to a filter.
185If 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 ... 187If 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 ...
186Added printing of card view and details view on desktop. 188Added printing of card view and details view on desktop.
187Printing of list view is not working... 189Printing of list view is not working...
188Added button for removing pictures in contact editor. 190Added button for removing pictures in contact editor.
189Parsing data fix of KA/Pi version 1.9.17. 191Parsing data fix of KA/Pi version 1.9.17.
190Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 192Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
191Fixed some syncing merging problems. 193Fixed some syncing merging problems.
192 194
193 195
194********** VERSION 1.9.17 ************ 196********** VERSION 1.9.17 ************
195 197
196KO/Pi: 198KO/Pi:
197Fixed that tooltips were not updated after moving an item in agenda view. 199Fixed that tooltips were not updated after moving an item in agenda view.
198Fixed a bug in sorting start date for recurring events in list view. 200Fixed a bug in sorting start date for recurring events in list view.
199Changed the left button in todo viewer from "Agenda" to "Set completed". 201Changed the left button in todo viewer from "Agenda" to "Set completed".
200This 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. 202This 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.
201Added more info in the todo viewer: Startdate, parent/sub todos. 203Added more info in the todo viewer: Startdate, parent/sub todos.
202 204
203 205
204KA/Pi: 206KA/Pi:
205All fields search does now actually search all the (possible) fields, 207All fields search does now actually search all the (possible) fields,
206not only those listed in the contact list. 208not only those listed in the contact list.
207Made is possible to inline a picture in a vcard on the Z. 209Made is possible to inline a picture in a vcard on the Z.
208This was only possible on the desktop, now is it possible on the Z as well. 210This was only possible on the desktop, now is it possible on the Z as well.
209Fixed of missing save settings after filter configuration. 211Fixed of missing save settings after filter configuration.
210Made saving of addressbook much faster. 212Made saving of addressbook much faster.
211Fixed extension widget layout problem. 213Fixed extension widget layout problem.
212Fixed saving of default formatted name settings. 214Fixed saving of default formatted name settings.
213Fixed formatted name handling in edit dialog. 215Fixed formatted name handling in edit dialog.
214Added an option for changing formatted names of many contacts 216Added an option for changing formatted names of many contacts
215(menu: File - Change - Set formatted name). 217(menu: File - Change - Set formatted name).
216 218
217QWhatsThis was not working on the Z ( only black rectangle was shown). 219QWhatsThis was not working on the Z ( only black rectangle was shown).
218This is Fixed. 220This is Fixed.
219 221
220KDE-Sync: 222KDE-Sync:
221Now readonly KDE resources are synced as well. 223Now readonly KDE resources are synced as well.
222(They are not changed in KDE itself, of course). 224(They are not changed in KDE itself, of course).
223 225
224 226
225 227
226********** VERSION 1.9.16 ************ 228********** VERSION 1.9.16 ************
227 229
228KO/Pi: 230KO/Pi:
229Fixed search dialog size on Z 6000 (480x640 display). 231Fixed search dialog size on Z 6000 (480x640 display).
230Added setting to hide/show time in agenda items. 232Added setting to hide/show time in agenda items.
231Added setting to hide not running todos in todo view. 233Added setting to hide not running todos in todo view.
232Added columns for start date/time in todo view. 234Added columns for start date/time in todo view.
233Replaced the solid half-hour lines in agenda view by dot lines. 235Replaced the solid half-hour lines in agenda view by dot lines.
234Added possibility of printing the What's Next View on the desktop 236Added possibility of printing the What's Next View on the desktop
235(i.e. Windows and Linux). 237(i.e. Windows and Linux).
236Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 238Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
237Added tooltips in month view.(Tooltips only available on desktop) 239Added tooltips in month view.(Tooltips only available on desktop)
238 240
239Fixed a strange problem in KO/Pi alarm applet. 241Fixed a strange problem in KO/Pi alarm applet.
240Did not find the actual problem, 242Did not find the actual problem,
241such that now Qtopia reboots again if deinstalling the alarm applet. 243such that now Qtopia reboots again if deinstalling the alarm applet.
242But the alarm applet should work again. 244But the alarm applet should work again.
243 245
244KA/Pi: 246KA/Pi:
245Fixed the problem, that internal pictures were not saved. 247Fixed the problem, that internal pictures were not saved.
246 248
247Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 249Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
248 250
249Fixed some minor problems. (Like word wrap in help text windows). 251Fixed some minor problems. (Like word wrap in help text windows).
250 252
251Fixed a compiling problem in microkde/kresources. 253Fixed a compiling problem in microkde/kresources.
252 254
253KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 255KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
254This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 256This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
255such that now syncing KO/Pi with Sharp DTM should work on the 257such that now syncing KO/Pi with Sharp DTM should work on the
256Zaurus C 3000 model. 258Zaurus C 3000 model.
257 259
258********** VERSION 1.9.15 ************ 260********** VERSION 1.9.15 ************
259 261
260Usebilty enhancements in KO/Pi: 262Usebilty enhancements in KO/Pi:
261When clicking on the date in a month view cell, the day view is shown. 263When clicking on the date in a month view cell, the day view is shown.
262Old behaviour was, that the "new event" dialog popped up. 264Old behaviour was, that the "new event" dialog popped up.
263 265
264Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 266Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
265That means, you can restore the latest 267That means, you can restore the latest
266event/todo/journal you have deleted. 268event/todo/journal you have deleted.
267A journal is deleted, if you clear all the text of the journal. 269A journal is deleted, if you clear all the text of the journal.
268 270
269Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 271Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
270 272
271KA/Pi starting in 480x640 resolution: 273KA/Pi starting in 480x640 resolution:
272Hide the filter action in toolbar 274Hide the filter action in toolbar
273and added icons for undo/delete/redo in toolbar. 275and added icons for undo/delete/redo in toolbar.
274 276
275Change in OM/Pi ViewMail dialog: 277Change in OM/Pi ViewMail dialog:
276When clicking on the "delete" icon the mail is deleted after confirmation as usual. 278When clicking on the "delete" icon the mail is deleted after confirmation as usual.
277But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 279But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
278 280
279Fixed a crash when deleting mail-accounts in OM/Pi. 281Fixed a crash when deleting mail-accounts in OM/Pi.
280 282
281 283
282********** VERSION 1.9.14 ************ 284********** VERSION 1.9.14 ************
283 285
284Fixed some problems with the dialog sizes when switching 286Fixed some problems with the dialog sizes when switching
285portrait/landscape mode on 640x480 PDA display. 287portrait/landscape mode on 640x480 PDA display.
286 288
287Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 289Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
288 290
289Fixed an ugly bug in KOpieMail: 291Fixed an ugly bug in KOpieMail:
290KOpieMail was not able to write files (mails) to MSDOS file system, 292KOpieMail was not able to write files (mails) to MSDOS file system,
291like on an usual preformatted SD card. That should work now. 293like on an usual preformatted SD card. That should work now.
292To save your mail data on the Sd card do the following: 294To save your mail data on the Sd card do the following:
293Create a dir on the SD card: 295Create a dir on the SD card:
294mkdir /mnt/card/localmail 296mkdir /mnt/card/localmail
295Go to your home dir: 297Go to your home dir:
296cd 298cd
297Go to kopiemail data storage dir: 299Go to kopiemail data storage dir:
298cd kdepim/apps/kopiemail 300cd kdepim/apps/kopiemail
299Create a symlink to the SD card: 301Create a symlink to the SD card:
300ls -s /mnt/card/localmail 302ls -s /mnt/card/localmail
301Now KOpieMail will store all mails on the SD card. 303Now KOpieMail will store all mails on the SD card.
302 304
303KO/Pi Monthview: 305KO/Pi Monthview:
304Now "Go to Today" selects the current month from day 1-end, 306Now "Go to Today" selects the current month from day 1-end,
305not the current date + some days. 307not the current date + some days.
306I.e. "Go to Today" shows now always 308I.e. "Go to Today" shows now always
307the current month with first day of month in the first row. 309the current month with first day of month in the first row.
308 310
309Added missing German translation. 311Added missing German translation.
310 312
311Fixed icons of executeable on Wintendo. 313Fixed icons of executeable on Wintendo.
312 314
313Added a "Show next Mail" button to the OM/Pi 315Added a "Show next Mail" button to the OM/Pi
314mail viewer such that the mail below the current mail 316mail viewer such that the mail below the current mail
315in the mail list view of the current folder 317in the mail list view of the current folder
316can be read with a single click. 318can be read with a single click.
317 319
318 320
319********** VERSION 1.9.13 ************ 321********** VERSION 1.9.13 ************
320 322
321Fixed nasty PwM/Pi file reading bug, when 323Fixed nasty PwM/Pi file reading bug, when
322the used hash algo of file is different then the global 324the used hash algo of file is different then the global
323hash algo. 325hash algo.
324 326
325Added KA/Pi support for opie mailit mailapplication. 327Added KA/Pi support for opie mailit mailapplication.
326 328
327Fixed some bugs in OM/Pi. 329Fixed some bugs in OM/Pi.
328Now character conversion tables are available for the Zaurus 330Now character conversion tables are available for the Zaurus
329to make OM/Pi working properly. 331to make OM/Pi working properly.
330To get the character conversion in OM/Pi working, please download 332To get the character conversion in OM/Pi working, please download
331at the sourceforge project site the package 333at the sourceforge project site the package
332sr-character-conversion_SharpROM_arm.ipk.zip 334sr-character-conversion_SharpROM_arm.ipk.zip
333(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 335(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
334from the section "general files for KDE/Pim" 336from the section "general files for KDE/Pim"
335Instructions how to install this package are in a ReadMe in this file. 337Instructions how to install this package are in a ReadMe in this file.
336 338
337 339
338Fixed the orientation change problem in KA/Pi when switching 340Fixed the orientation change problem in KA/Pi when switching
339portrait/landscape mode. 341portrait/landscape mode.
340 342
341French translation available for KA/Pi and OM/Pi. 343French translation available for KA/Pi and OM/Pi.
342 344
343Fixed some problems with categories in KO/Pi in DTM sync. 345Fixed some problems with categories in KO/Pi in DTM sync.
344 346
345Added selection dialog for export to phone in KA/Pi. 347Added selection dialog for export to phone in KA/Pi.
346 348
347If in KO/Pi is an attendee selected to add to a meeting and this 349If in KO/Pi is an attendee selected to add to a meeting and this
348attendee is already in the list of attendees, this person is not added 350attendee is already in the list of attendees, this person is not added
349again. 351again.
350 352
351Some menu cleanup in KA/Pi. 353Some menu cleanup in KA/Pi.
352 354
353********** VERSION 1.9.12 ************ 355********** VERSION 1.9.12 ************
354 356
355Fix for the bug in KO/Pi What's Next view of version 1.9.11. 357Fix for the bug in KO/Pi What's Next view of version 1.9.11.
356 358
357Bugfix: Licence file is now shown again. 359Bugfix: Licence file is now shown again.
358 360
359OM/Pi now supports Unicode (utf8 charset). 361OM/Pi now supports Unicode (utf8 charset).
360Fixed some bugs in OM/Pi. 362Fixed some bugs in OM/Pi.
361 363
362KA/Pi has more German translation. 364KA/Pi has more German translation.
363 365
364 366
365********** VERSION 1.9.11 ************ 367********** VERSION 1.9.11 ************
366 368
367Fixed several problems in PWM/Pi, like 369Fixed several problems in PWM/Pi, like
368asking the user, if unsaved changed are pending 370asking the user, if unsaved changed are pending
369when closing the app. 371when closing the app.
370And PwM/Pi handles now different texts for the 372And PwM/Pi handles now different texts for the
371fields Description, Username, Password, configurable per category. 373fields Description, Username, Password, configurable per category.
372 374
373Fixed a crash in KO/Pi , when importing/loading vcs files 375Fixed a crash in KO/Pi , when importing/loading vcs files
374which have an entry with an attendee with state: 376which have an entry with an attendee with state:
375NEEDS ACTION 377NEEDS ACTION
376 378
377Fixed some problems in the German translation of OM/Pi, 379Fixed some problems in the German translation of OM/Pi,
378which makes some dialogs not fitting on the screen 380which makes some dialogs not fitting on the screen
379of the Z 5500. 381of the Z 5500.
380 382
381Fixed Qtopia crash, when disabling/deinstalling 383Fixed Qtopia crash, when disabling/deinstalling
382KO/Pi alarm applet. 384KO/Pi alarm applet.
383 385
384Implemented direct KDE<->KA/Pi sync for KA/Pi running 386Implemented direct KDE<->KA/Pi sync for KA/Pi running
385on Linux desktop. 387on Linux desktop.
386 388
387Added feature "remove sync info" to sync menu. 389Added feature "remove sync info" to sync menu.
388 390
389Tweaked the KO/Pi What's next view a bit, added 391Tweaked the KO/Pi What's next view a bit, added
390setting to hide events that are done. 392setting to hide events that are done.
391 393
392Disabled "beam receive enabled" on startup to 394Disabled "beam receive enabled" on startup to
393avoid problems if Fastload is enabled. 395avoid problems if Fastload is enabled.
394Please set "beam receive enabled", 396Please set "beam receive enabled",
395if you want to receive data via IR. 397if you want to receive data via IR.
396 398
397Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 399Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
398on Linux desktop. 400on Linux desktop.
399 401
400Made in KA/Pi scrolling possible, if details view is selected. 402Made in KA/Pi scrolling possible, if details view is selected.
401(The keyboard focus is set automatically to the search line) 403(The keyboard focus is set automatically to the search line)
402 404
403Fixed a bug in DMT sync, that a new entry in DTM was added 405Fixed a bug in DMT sync, that a new entry in DTM was added
404on every sync to Kx/Pi. 406on every sync to Kx/Pi.
405 407
406Fixed missing writing of KA/Pi categories to DMT entries when syncing. 408Fixed missing writing of KA/Pi categories to DMT entries when syncing.
407 409
408Fixed a bug in DMT sync with todos created in KO/Pi containing 410Fixed a bug in DMT sync with todos created in KO/Pi containing
409non-latin1 characters. 411non-latin1 characters.
410 412
411Rearranged package contents of Sharp-ipks and made all 413Rearranged package contents of Sharp-ipks and made all
412packages installable on SD again. 414packages installable on SD again.
413 415
414Fixed the writing of addressbook data in DTM sync. 416Fixed the writing of addressbook data in DTM sync.
415Empty fields in KA/Pi were not removed. 417Empty fields in KA/Pi were not removed.
416 418
417Added better category handling in KA/Pi: 419Added better category handling in KA/Pi:
418Added item 420Added item
419Edit Categories and 421Edit Categories and
420Manage new categories 422Manage new categories
421to the settings menu. 423to the settings menu.
422Possible to configure a view to display categories. 424Possible to configure a view to display categories.
423 425
424Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 426Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
425 427
426Fixed displaying of "free" days and time in KO Monthview and Agendaview. 428Fixed displaying of "free" days and time in KO Monthview and Agendaview.
427 429
428... and many other bugfixes. 430... and many other bugfixes.
429 431
430********** VERSION 1.9.10 ************ 432********** VERSION 1.9.10 ************
431 433
432Many internal small bugfixes. 434Many internal small bugfixes.
433And fix of the "big" bug in KO/Pi, 435And fix of the "big" bug in KO/Pi,
434that after Syncing the appointments had an offset by several hours. 436that after Syncing the appointments had an offset by several hours.
435That was a problem with the internal timezone setting, 437That was a problem with the internal timezone setting,
436introduced by the changed timezone configuration settings. 438introduced by the changed timezone configuration settings.
437 439
438German translation for OM/Pi is now available. 440German translation for OM/Pi is now available.
439 441
440 442
441********** VERSION 1.9.9 ************ 443********** VERSION 1.9.9 ************
442 444
443KDE-Pim/Pi has a new Member! 445KDE-Pim/Pi has a new Member!
444It is called PWM/Pi (Passwordmanager/platform-independent) 446It is called PWM/Pi (Passwordmanager/platform-independent)
445and it is available for the Zaurus. 447and it is available for the Zaurus.
446It is planned, that it will be available later for Windows. 448It is planned, that it will be available later for Windows.
447(And for Linux, of course). 449(And for Linux, of course).
448It is a port of the Passwordmanager of KDE. 450It is a port of the Passwordmanager of KDE.
449It will need the MicroKDElibs to run. 451It will need the MicroKDElibs to run.
450 452
451Made loading of addressbooks in KA/Pi up to 7 times faster! 453Made loading of addressbooks in KA/Pi up to 7 times faster!
452The bigger your addressbook file, the more starting speed 454The bigger your addressbook file, the more starting speed
453will you gain. (relatively) 455will you gain. (relatively)
454 456
455The Qtopia addressbook connector is now platform independend 457The Qtopia addressbook connector is now platform independend
456as well and should work on any platform for importing/exporting 458as well and should work on any platform for importing/exporting
457Qtopia and Opie XML files. 459Qtopia and Opie XML files.
458 460
459Added a +30min feature to the timezone settings to make 461Added a +30min feature to the timezone settings to make
460KDE-Pim/Pi useable in Australia and other parts on the 462KDE-Pim/Pi useable in Australia and other parts on the
461world with strange timezones ;-) 463world with strange timezones ;-)
462 464
463German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 465German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
464 466
465It is now possible to disable the 467It is now possible to disable the
466"receive data via infrared" feature, such that syncing with 468"receive data via infrared" feature, such that syncing with
467Outlook is now possible again with Kx/Pi runing. 469Outlook is now possible again with Kx/Pi runing.
468Please disable it, before syncing Sharp DTM with Outlook. 470Please disable it, before syncing Sharp DTM with Outlook.
469For your convenience, the "receive data via infrared" feature 471For your convenience, the "receive data via infrared" feature
470is disabled automatically, if you sync Kx/Pi with DTM. 472is disabled automatically, if you sync Kx/Pi with DTM.
471You have to enable it again manually after syncing. 473You have to enable it again manually after syncing.
472Enabling this feature makes it impossible to start the 474Enabling this feature makes it impossible to start the
473Sharp DTM apps. If this feature is enabled, you will only get the 475Sharp DTM apps. If this feature is enabled, you will only get the
474alarm notification from KO/Pi and not from the Sharp calendar. 476alarm notification from KO/Pi and not from the Sharp calendar.
475This is very useful if you sync KO/Pi with Sharp DTM, 477This is very useful if you sync KO/Pi with Sharp DTM,
476because after syncing you usually would get notified about 478because after syncing you usually would get notified about
477an alarm by KO/Pi and the Sharp Calendar. 479an alarm by KO/Pi and the Sharp Calendar.
478 480
479Together with the Linux desktop version of KO/Pi 481Together with the Linux desktop version of KO/Pi
480it is now possible to sync KO/Pi on the Zaurus 482it is now possible to sync KO/Pi on the Zaurus
481with the complete KDE-desktop (3.3 or later) 483with the complete KDE-desktop (3.3 or later)
482calendar data easily. 484calendar data easily.
483That makes it possible to sync the Z with one 485That makes it possible to sync the Z with one
484click of a mouse with the KDE-Desktop. 486click of a mouse with the KDE-Desktop.
485This feature it available for all Zaurus platforms KO/Pi 487This feature it available for all Zaurus platforms KO/Pi
486is running on. 488is running on.
487The only thing needed is a running KO/Pi on Linux and 489The only thing needed is a running KO/Pi on Linux and
488a compiled version of the small 490a compiled version of the small
489KDE-Pim/Pi<->KDE-Desktop access command line program, 491KDE-Pim/Pi<->KDE-Desktop access command line program,
490which is in the KDE-Pim/Pi sources available. 492which is in the KDE-Pim/Pi sources available.
491 493
492The "KDE-desktop" syncing feature for KA/Pi will follow 494The "KDE-desktop" syncing feature for KA/Pi will follow
493in the next releases. 495in the next releases.
494 496
495Fixed the vcard export bug, which had the version 1.9.8. 497Fixed the vcard export bug, which had the version 1.9.8.
496 498
497Added missing GERMAN translation to KO/Pi. 499Added missing GERMAN translation to KO/Pi.
498Hi PsionX, could you add the missing french translation?Thx! 500Hi PsionX, could you add the missing french translation?Thx!
499 501
500Translation files for KA/Pi are available as well. 502Translation files for KA/Pi are available as well.
501GERMAN translation will be available in the next release. 503GERMAN translation will be available in the next release.
502PsionX ( yres, you again ;-) ), could you start translating 504PsionX ( yres, you again ;-) ), could you start translating
503KA/Pi? Thx! 505KA/Pi? Thx!
504 506
505You can download the version 1.9.9 at 507You can download the version 1.9.9 at
506 508
507http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 509http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
508 510
509Note: 511Note:
510To run the mail program OM/Pi you need libopenssl. 512To run the mail program OM/Pi you need libopenssl.
511A link to a download loaction is available at 513A link to a download loaction is available at
512ZSI at www.killefiz.de 514ZSI at www.killefiz.de
513 515
514 516
515********** VERSION 1.9.8 ************ 517********** VERSION 1.9.8 ************
516 518
517Fixed character decoding in OM/Pi. 519Fixed character decoding in OM/Pi.
518(e.g. German "Umlaute" were not displayed properly.) 520(e.g. German "Umlaute" were not displayed properly.)
519 521
520Made is possible to reparent todos in KO/Pi. 522Made is possible to reparent todos in KO/Pi.
521Use contextmenu or keys (look at Help-Keys + Colors) for that. 523Use contextmenu or keys (look at Help-Keys + Colors) for that.
522 524
523Added the missing Sync-Howto and WhatsNew to the packages. 525Added the missing Sync-Howto and WhatsNew to the packages.
524 526
525KO/Pi on Linux desktop can now sync with KDE desktop. 527KO/Pi on Linux desktop can now sync with KDE desktop.
526That means: When using KO/Pi on Linux desktop for syncing with 528That means: When using KO/Pi on Linux desktop for syncing with
527KDE desktop and the Zaurus, the Zaurus can be synced now 529KDE desktop and the Zaurus, the Zaurus can be synced now
528with all KDE-Calendar resources, not only with one local file. 530with all KDE-Calendar resources, not only with one local file.
529(That makes it possible to sync the Zaurus with the 531(That makes it possible to sync the Zaurus with the
530calendar data on a Kolab server) 532calendar data on a Kolab server)
531 533
532KA/Pi syncing with KDE desktop will be available in the next version. 534KA/Pi syncing with KDE desktop will be available in the next version.
533 535
534 536
535********** VERSION 1.9.7 ************ 537********** VERSION 1.9.7 ************
536 538
537KO/Pi - KA/Pi on Windows: 539KO/Pi - KA/Pi on Windows:
538Now a directory can be defined by the user, where the 540Now a directory can be defined by the user, where the
539application/config data should be saved. 541application/config data should be saved.
540 Define your desired path in the evironment variable 542 Define your desired path in the evironment variable
541 MICROKDEHOME 543 MICROKDEHOME
542 before starting KO/Pi or KA/Pi. 544 before starting KO/Pi or KA/Pi.
543 545
544An easy Kx/Pi to Kx/Pi syncing is now possible 546An easy Kx/Pi to Kx/Pi syncing is now possible
545(it is called Pi-Sync) via network. 547(it is called Pi-Sync) via network.
546Please look at the Sync Howto. 548Please look at the Sync Howto.
547 549
548Exporting of calendar data and contacts to mobile phones is now possible. 550Exporting of calendar data and contacts to mobile phones is now possible.
549The SyncHowto is updated with information howto 551The SyncHowto is updated with information howto
550access/sync mobile phones. 552access/sync mobile phones.
551Please look at the Sync Howto. 553Please look at the Sync Howto.
552 554
553Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 555Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
554Please disable Fastload for the original contact/calendar applications 556Please disable Fastload for the original contact/calendar applications
555and close them. 557and close them.
556KO/Pi and KA/Pi must be running in order to receive the data. 558KO/Pi and KA/Pi must be running in order to receive the data.
557(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 559(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
558 560
559In the KA/Pi details view are now the preferred tel. numbers displayed on top 561In the KA/Pi details view are now the preferred tel. numbers displayed on top
560of the other data ( emails/tel.numbers/addresses) 562of the other data ( emails/tel.numbers/addresses)
561 563
562Fixed some syncing problems in KA/Pi. 564Fixed some syncing problems in KA/Pi.
563 565
564Added font settings for the KA/Pi details view. 566Added font settings for the KA/Pi details view.
565Added fields "children's name" and "gender" to KA/Pi. 567Added fields "children's name" and "gender" to KA/Pi.
566 568
567Made searching in KA/Pi better: 569Made searching in KA/Pi better:
568Now the first item in a view is selected after a search automatically and 570Now the first item in a view is selected after a search automatically and
569the views can be scrolled up/down when the search input field has the keyboard focus. 571the views can be scrolled up/down when the search input field has the keyboard focus.
570 572
571And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 573And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
572 574
573 575
574********** VERSION 1.9.6 ************ 576********** VERSION 1.9.6 ************
575 577
576Changes in the external application communication on the Zaurus 578Changes in the external application communication on the Zaurus
577in order to use less RAM when the apps are running. 579in order to use less RAM when the apps are running.
578First syncing of addressbooks (KA/Pi) is possible. 580First syncing of addressbooks (KA/Pi) is possible.
579 581
580 582
581********** VERSION 1.9.5a ************ 583********** VERSION 1.9.5a ************
582 584
583Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 585Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
584Fixed some small bugs. 586Fixed some small bugs.
585KA/Pi shows now the birthday in summary view. 587KA/Pi shows now the birthday in summary view.
586Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 588Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
587for displaying dates. 589for displaying dates.
588 590
589 591
590********** VERSION 1.9.5 ************ 592********** VERSION 1.9.5 ************
591 593
592There is still no Addressbook syncing! 594There is still no Addressbook syncing!
593 595
594New in 1.9.5: 596New in 1.9.5:
595 597
596Many bugfixes. 598Many bugfixes.
597Better searching in KA/Pi. 599Better searching in KA/Pi.
598You can configure in KA/Pi if you want to search only after 600You can configure in KA/Pi if you want to search only after
599<return> key pressed. 601<return> key pressed.
600 602
601Better mail downloading in OM/Pi. 603Better mail downloading in OM/Pi.
602 604
603First experimental alpha version of sync of KO/Pi with mobile phones. 605First experimental alpha version of sync of KO/Pi with mobile phones.
604See gammu documentation for supported phones. 606See gammu documentation for supported phones.
605You 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. 607You 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.
606Quick hint how to use: 608Quick hint how to use:
607NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 609NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
608Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 610Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
609Create syncprofile - mobile device 611Create syncprofile - mobile device
610Remove entry for model. (Leave empty ). 612Remove entry for model. (Leave empty ).
611Enable infrared on Zaurus and your Phone. 613Enable infrared on Zaurus and your Phone.
612Sync. 614Sync.
613To get a more detailed log, start kopi from konsole. 615To get a more detailed log, start kopi from konsole.
614 616
615********** VERSION 1.9.4 ************ 617********** VERSION 1.9.4 ************
616 618
617This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 619This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
618 620
619WARNING: 621WARNING:
620PLEASE BACKUP ALL YOUR DATA! 622PLEASE BACKUP ALL YOUR DATA!
621We have changed a lot and maybe there are some unknown problems. 623We have changed a lot and maybe there are some unknown problems.
622 624
623SYNC HANDLING HAS CHANGED! 625SYNC HANDLING HAS CHANGED!
624Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 626Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
625(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 627(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
626 628
627You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 629You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
628If 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. 630If 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.
629 631
630As programs are available: 632As programs are available:
631KO/Pi (korganizer ipk) - a calendar program. 633KO/Pi (korganizer ipk) - a calendar program.
632KA/Pi (kaddressbook ipk ) - an addressbook 634KA/Pi (kaddressbook ipk ) - an addressbook
633OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 635OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
634 636
635An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 637An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
636(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 638(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
637 639
638All the applications are installed in a "Pim" TAB. 640All the applications are installed in a "Pim" TAB.
639If 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 641If 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
640 642
641All the application are integrated. 643All the application are integrated.
642Such 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. 644Such 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.
643 645
644HINT: 646HINT:
645If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 647If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
646 648
647What's new? 649What's new?
648 650
649SYNC HANDLING HAS CHANGED! 651SYNC HANDLING HAS CHANGED!
650Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 652Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
651(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 653(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
652 654
653New in OM/Pi: 655New in OM/Pi:
654When 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. 656When 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.
655 657
656New in KO/Pi: 658New in KO/Pi:
657French is now available for KO/Pi. 659French is now available for KO/Pi.
658Choose menu:Actions - Configure:TAB locale 660Choose menu:Actions - Configure:TAB locale
659Syncing has changed. 661Syncing has changed.
660Phone sync available soon. 662Phone sync available soon.
661Not much changes, I cannot remember them ... 663Not much changes, I cannot remember them ...
662 664
663New in KA/Pi: 665New in KA/Pi:
664Beaming possible. 666Beaming possible.
665Sharp DTM readonly access possible( create a new DTM resource ); 667Sharp DTM readonly access possible( create a new DTM resource );
666Better searching possible. 668Better searching possible.
667Search is performed only after pressing the return key. 669Search is performed only after pressing the return key.
668Use wildcard * to specify parts of a name. 670Use wildcard * to specify parts of a name.
669 671
670Better 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 * . 672Better 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 * .
671 673
672A big improvement is the new management of the contact access. 674A big improvement is the new management of the contact access.
673In version 1.9.3, every application was using their own addressbook access data. 675In version 1.9.3, every application was using their own addressbook access data.
674That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 676That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
675That was wasting of memory, if you had several hundreds of contacts. 677That was wasting of memory, if you had several hundreds of contacts.
676 678
677Now only KA/Pi accesses the addressbook. 679Now only KA/Pi accesses the addressbook.
678If 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. 680If 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.
679If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 681If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
680That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 682That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
681 683
682New in the KO/Pi alarm applet: 684New in the KO/Pi alarm applet:
683Configure your own timer popup menu! 685Configure your own timer popup menu!
684(Text and minutes for timer countdown) 686(Text and minutes for timer countdown)
685Just edit the file 687Just edit the file
686(yourhomedir)/.kopialarmtimerrc 688(yourhomedir)/.kopialarmtimerrc
687and start/stop a timer to get a new menu with the data of this file. 689and start/stop a timer to get a new menu with the data of this file.
688 690
689********** VERSION 1.9.3 ************ 691********** VERSION 1.9.3 ************
6901) 6921)
691Now KO/Pi on Windows imports directly the calendar data of 693Now KO/Pi on Windows imports directly the calendar data of
692an installed Outlook. Should work with OL version >= 2000. 694an installed Outlook. Should work with OL version >= 2000.
693 695
694********** VERSION 1.9.2 ************ 696********** VERSION 1.9.2 ************
6951) 6971)
696KDE-Pim/Pi has got a new member: 698KDE-Pim/Pi has got a new member:
697KmicroMail (KM/Pi) is a mail program, 699KmicroMail (KM/Pi) is a mail program,
698which can handle IMAP and POP mail access. 700which can handle IMAP and POP mail access.
699It is based on Opie-Mail v3. 701It is based on Opie-Mail v3.
700All dependencies to the Opie libraries ar removed, 702All dependencies to the Opie libraries ar removed,
701such that no additional Opie lib is needed. 703such that no additional Opie lib is needed.
702It is already integrated in KO/Pi and KA/Pi. 704It is already integrated in KO/Pi and KA/Pi.
703It it now available for the Zaurus,probably it 705It it now available for the Zaurus,probably it
704will be available for other platforms later. 706will be available for other platforms later.
705Hint: 707Hint:
706Create your own contact (name + email) 708Create your own contact (name + email)
707in KA/Pi, select this contact and choose menu: 709in KA/Pi, select this contact and choose menu:
708Settings - Set Who Am I. 710Settings - Set Who Am I.
709Now the settings of this contact are used as 711Now the settings of this contact are used as
710the sender data in KM/Pi. 712the sender data in KM/Pi.
7112) 7132)
712KDE-Pim/Pi is split up in five different 714KDE-Pim/Pi is split up in five different
713packages now precompiled for Sharp Zaurus: 715packages now precompiled for Sharp Zaurus:
714--kmicrokdelibs_1.9.2_arm.ipk 716--kmicrokdelibs_1.9.2_arm.ipk
715The libs are needed for any 717The libs are needed for any
716of the following programs: 718of the following programs:
717--kaddressbook_1.9.2_arm.ipk 719--kaddressbook_1.9.2_arm.ipk
718--kmicromail_1.9.2_arm.ipk 720--kmicromail_1.9.2_arm.ipk
719--korganizer_1.9.2_arm.ipk 721--korganizer_1.9.2_arm.ipk
720Independ from that, there is the alarm applet 722Independ from that, there is the alarm applet
721available for KO/Pi, which also offers 723available for KO/Pi, which also offers
722quick access for a new mail or 724quick access for a new mail or
723showing the addressbook.: 725showing the addressbook.:
724--korganizer-alarm_1.9.2_arm.ipk 726--korganizer-alarm_1.9.2_arm.ipk
725Independend means, that the alarm applet 727Independend means, that the alarm applet
726does not need any of the libs or programs above to run. 728does not need any of the libs or programs above to run.
727But it would be quite useless without these programs. 729But it would be quite useless without these programs.
728NOTE: 730NOTE:
729If you get a 731If you get a
730"This application depends on other programs" 732"This application depends on other programs"
731during installation of 733during installation of
732--kmicrokdelibs_1.9.2_arm.ipk 734--kmicrokdelibs_1.9.2_arm.ipk
733you probably do not have to care about that. 735you probably do not have to care about that.
734kmicrokdelibs_1.9.2 will come with some 736kmicrokdelibs_1.9.2 will come with some
735resource plugins, which needs additional libraries. 737resource plugins, which needs additional libraries.
736(E.g. libopie1, if you want to use the 738(E.g. libopie1, if you want to use the
737opie resource connector in KA/Pi). 739opie resource connector in KA/Pi).
738If you do not have this libraries installed, 740If you do not have this libraries installed,
739you simply cannot use the resource. 741you simply cannot use the resource.
740To make it clear: 742To make it clear:
741If the libraries are missing, the applications 743If the libraries are missing, the applications
742using kmicrokdelibs will start, 744using kmicrokdelibs will start,
743because the resources are plugins. 745because the resources are plugins.
7443) 7463)
745KO/Pi and friends are now installable on SD-Card! 747KO/Pi and friends are now installable on SD-Card!
746It is recommended to install all libs and apps 748It is recommended to install all libs and apps
747on the SD card or all in the internal storage. 749on the SD card or all in the internal storage.
748There may be problems, if this is mixed. 750There may be problems, if this is mixed.
7494) 7514)
750Fixed two bugs in the alarm notification on Windows. 752Fixed two bugs in the alarm notification on Windows.
7515) 7535)
752Great improvement! 754Great improvement!
753KO/Pi uses now the latest version of libical. 755KO/Pi uses now the latest version of libical.
754Libical is the library which actually reads 756Libical is the library which actually reads
755the calendar files and extract the data from it. 757the calendar files and extract the data from it.
756With the old version, there were problems 758With the old version, there were problems
757(crashes or program hangs) when licical did read 759(crashes or program hangs) when licical did read
758files, which were not stored from KO/Pi. 760files, which were not stored from KO/Pi.
759I do not know, if the new libical works perfect, 761I do not know, if the new libical works perfect,
760but actually it works much better than 762but actually it works much better than
761the old version. 763the old version.
762There are no problems with compatibility with 764There are no problems with compatibility with
763old calendar files of KO/Pi, of course! 765old calendar files of KO/Pi, of course!
7646) 7666)
765New in KA/Pi: 767New in KA/Pi:
766Opie addressbook resource connector available! 768Opie addressbook resource connector available!
767You will need libopie1 and the opie addressbook, 769You will need libopie1 and the opie addressbook,
768of course. 770of course.
769With the Opie addressbook resource connector, 771With the Opie addressbook resource connector,
770you can access the Opie addressbook readonly in KA/Pi. 772you can access the Opie addressbook readonly in KA/Pi.
771If you want to edit or import the data into KA/Pi, 773If you want to edit or import the data into KA/Pi,
772do this: 774do this:
773a) Create an Opie resource. 775a) Create an Opie resource.
774 (Menu: Settings-Configure Resources). 776 (Menu: Settings-Configure Resources).
775After configuration and restarting KA/Pi you should see 777After configuration and restarting KA/Pi you should see
776the Opie contacts in KA/Pi. 778the Opie contacts in KA/Pi.
777b) Select some or all Opie contacts. 779b) Select some or all Opie contacts.
778(NOTE: +++++ 780(NOTE: +++++
779To know exactly, what contacts are Opie contacts, 781To know exactly, what contacts are Opie contacts,
780do this: Choose menu: 782do this: Choose menu:
781View-Modify View - TAB Fields. 783View-Modify View - TAB Fields.
782Select in the above list "Resource" and click 784Select in the above list "Resource" and click
783down arrow to add it to the "Selected fields". 785down arrow to add it to the "Selected fields".
784Click OK. 786Click OK.
785Now you have a new column "Resource" in your list, 787Now you have a new column "Resource" in your list,
786where you can see, what an Opie resource is. 788where you can see, what an Opie resource is.
787++++ NOTE end.) 789++++ NOTE end.)
788Ok, we do have now some Opie contacts seleted. 790Ok, we do have now some Opie contacts seleted.
789(Use SHIFT or CTRL key in order to multiple select). 791(Use SHIFT or CTRL key in order to multiple select).
790c) Choose menu: Edit-Copy. 792c) Choose menu: Edit-Copy.
791d) Choose menu: Edit-Paste. 793d) Choose menu: Edit-Paste.
792e) Select the resource, you want to add the contacts to. 794e) Select the resource, you want to add the contacts to.
793Congrats! Now you have read/write access to the copied 795Congrats! Now you have read/write access to the copied
794opie contacts as "real" KA/Pi contacts. 796opie contacts as "real" KA/Pi contacts.
795 797
796 798
797********** VERSION 1.9.1 ************ 799********** VERSION 1.9.1 ************
7981) 8001)
799 +++ IMPORTANT 1 +++ 801 +++ IMPORTANT 1 +++
800 802
801The storing place of the default calendar 803The storing place of the default calendar
802file has changed! 804file has changed!
803The default calendar file was 805The default calendar file was
804Applications/korganizer/mycalendar.ics 806Applications/korganizer/mycalendar.ics
805on Zaurus and 807on Zaurus and
806(yourHomeDir)/korganizer/mycalendar.ics 808(yourHomeDir)/korganizer/mycalendar.ics
807on Windows/Linux desktop. Now it is 809on Windows/Linux desktop. Now it is
808(yourHomeDir)/kdepim/korganizer/mycalendar.ics 810(yourHomeDir)/kdepim/korganizer/mycalendar.ics
809on Zaurus, Windows and Linux. 811on Zaurus, Windows and Linux.
810To load the old file, choose menu 812To load the old file, choose menu
811File-Load calendar backup. 813File-Load calendar backup.
812(It should be loaded automatically 814(It should be loaded automatically
813at startup with a warning message displayed). 815at startup with a warning message displayed).
814The place of the configuration file has changed too. 816The place of the configuration file has changed too.
815If you want to use your old KO/Pi config, 817If you want to use your old KO/Pi config,
816copy it to 818copy it to
817(yourHomeDir)/kdepim/config/korganizerrc 819(yourHomeDir)/kdepim/config/korganizerrc
818Please read VERSION 1.9.0 - topic 3) as well! 820Please read VERSION 1.9.0 - topic 3) as well!
819 821
820 +++ IMPORTANT 2 +++ 822 +++ IMPORTANT 2 +++
821 823
822Because of the new paths, you will need 824Because of the new paths, you will need
823a new version of the KO/Pi alarm applet 825a new version of the KO/Pi alarm applet
824for Zaurus. 826for Zaurus.
825Use version >= 1.9.1 827Use version >= 1.9.1
826 828
8272) 8292)
828Now the QWhat'sThis Icon works for items 830Now the QWhat'sThis Icon works for items
829in the month view as well. 831in the month view as well.
830(See VERSION 1.7.8 Topic 1) ). 832(See VERSION 1.7.8 Topic 1) ).
8313) 8333)
832You can import birtsdays/anniversaries 834You can import birtsdays/anniversaries
833from KA/Pi into KO/Pi. 835from KA/Pi into KO/Pi.
834Choose menu File-Import birthdays. 836Choose menu File-Import birthdays.
835If you import twice, already imported items 837If you import twice, already imported items
836will not be imported again, if they 838will not be imported again, if they
837have not been changed in KO/Pi. 839have not been changed in KO/Pi.
8384) 8404)
839When syncing with sharp DTM, now a progress 841When syncing with sharp DTM, now a progress
840is shown, when the data is written back. 842is shown, when the data is written back.
841If there is much data in KO/Pi and no data 843If there is much data in KO/Pi and no data
842in DTM, that can take a long time. 844in DTM, that can take a long time.
843(But only for the first time ). 845(But only for the first time ).
8445) 8465)
845In the search dialog, you can search 847In the search dialog, you can search
846now for the name/email of an attendee 848now for the name/email of an attendee
847of an event/todo. 849of an event/todo.
848To get more space for displaying 850To get more space for displaying
849search results, the buttons 851search results, the buttons
850for "search" and "close" on the 852for "search" and "close" on the
851bottom are removed in the PDA version. 853bottom are removed in the PDA version.
852You have to click OK in the top right 854You have to click OK in the top right
853corner to do a search. 855corner to do a search.
8546) 8566)
855Now it is possible to disable the displaying 857Now it is possible to disable the displaying
856of todo items in the Allday part of the Agenda. 858of todo items in the Allday part of the Agenda.
857Choose Menu Action-Configure, 859Choose Menu Action-Configure,
858TAB Todo View, checkbox 860TAB Todo View, checkbox
859"Allday Agenda view shows todos" 861"Allday Agenda view shows todos"
8607) 8627)
861If FastLoad is enabled, now the settings and the 863If FastLoad is enabled, now the settings and the
862calendar data are saved, when KO/Pi is closed. 864calendar data are saved, when KO/Pi is closed.
863(If no Fastload is enabled, KO/Pi saves 865(If no Fastload is enabled, KO/Pi saves
864the data as well, of course) 866the data as well, of course)
8658) 8678)
866The Agenda View has a minimize-splitter now, 868The Agenda View has a minimize-splitter now,
867such that the height of the allday part can be 869such that the height of the allday part can be
868changed quickly. 870changed quickly.
869 871
870********** VERSION 1.9.0 ************ 872********** VERSION 1.9.0 ************
8711) 8731)
872KO/Pi is now merged with the new microKDE from KA/Pi. 874KO/Pi is now merged with the new microKDE from KA/Pi.
873KO/Pi accesses now KA/Pi as the addressbook. 875KO/Pi accesses now KA/Pi as the addressbook.
874The other ddressbook-plugins are not working any longer. 876The other ddressbook-plugins are not working any longer.
875(It is planned, that later KA/Pi itself uses these plugins) 877(It is planned, that later KA/Pi itself uses these plugins)
876New versions of KO/Pi are only available 878New versions of KO/Pi are only available
877together with KA/Pi as the KDE-Pim/Pi package. 879together with KA/Pi as the KDE-Pim/Pi package.
8782) 8802)
879If you click on an attendee of a meeting in the 881If you click on an attendee of a meeting in the
880event viewer, a detailed summary of the 882event viewer, a detailed summary of the
881attendee is shown. 883attendee is shown.
8823) 8843)
883The place of the configuration file has changed. 885The place of the configuration file has changed.
884If you want to use your old KO/Pi config, copy 886If you want to use your old KO/Pi config, copy
885Applications/korganizer/config_korganizerrc 887Applications/korganizer/config_korganizerrc
886to 888to
887Applications/korganizer/config/korganizerrc 889Applications/korganizer/config/korganizerrc
888 890
889********** VERSION 1.7.8 ************ 891********** VERSION 1.7.8 ************
8901) 8921)
891Now the QWhat'sThis ist working. 893Now the QWhat'sThis ist working.
892Enable the QWhat'sThis icon in the toolbar. 894Enable the QWhat'sThis icon in the toolbar.
893(You have to restart to reload the changed toolbar config). 895(You have to restart to reload the changed toolbar config).
894Now click on the QWhat'sThis Icon 896Now click on the QWhat'sThis Icon
895in the top right corner of KO/Pi. 897in the top right corner of KO/Pi.
896Then click on an item in the Agenda View: 898Then click on an item in the Agenda View:
897You will get a detailed display of the items content. 899You will get a detailed display of the items content.
8982) 9002)
899Some other very minor changes. 901Some other very minor changes.
900But I have forgotten the details ... 902But I have forgotten the details ...
901For that reason I start this log here: 903For that reason I start this log here:
902To document my changes, when I am doing it. 904To document my changes, when I am doing it.
903 905
904********** VERSION 1.7.7 ************ 906********** VERSION 1.7.7 ************
905Stable Version of KO/Pi 907Stable Version of KO/Pi
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 03a8f1c..1a1bce5 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1,1303 +1,1308 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 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 <qlayout.h> 24#include <qlayout.h>
25#include <qheader.h> 25#include <qheader.h>
26#include <qcursor.h> 26#include <qcursor.h>
27#include <qwhatsthis.h> 27#include <qwhatsthis.h>
28 28
29#include <qvbox.h> 29#include <qvbox.h>
30#include <kdebug.h> 30#include <kdebug.h>
31#include "koprefs.h" 31#include "koprefs.h"
32#include <klocale.h> 32#include <klocale.h>
33#include <kglobal.h> 33#include <kglobal.h>
34#include <kiconloader.h> 34#include <kiconloader.h>
35#include <kmessagebox.h> 35#include <kmessagebox.h>
36 36
37#include <libkcal/icaldrag.h> 37#include <libkcal/icaldrag.h>
38#include <libkcal/vcaldrag.h> 38#include <libkcal/vcaldrag.h>
39#include <libkcal/calfilter.h> 39#include <libkcal/calfilter.h>
40#include <libkcal/dndfactory.h> 40#include <libkcal/dndfactory.h>
41#include <libkcal/calendarresources.h> 41#include <libkcal/calendarresources.h>
42#include <libkcal/resourcecalendar.h> 42#include <libkcal/resourcecalendar.h>
43#include <kresources/resourceselectdialog.h> 43#include <kresources/resourceselectdialog.h>
44#include <libkcal/kincidenceformatter.h> 44#include <libkcal/kincidenceformatter.h>
45#ifndef DESKTOP_VERSION 45#ifndef DESKTOP_VERSION
46#include <qpe/qpeapplication.h> 46#include <qpe/qpeapplication.h>
47#else 47#else
48#include <qapplication.h> 48#include <qapplication.h>
49#endif 49#endif
50#ifndef KORG_NOPRINTER 50#ifndef KORG_NOPRINTER
51#include "calprinter.h" 51#include "calprinter.h"
52#endif 52#endif
53#include "docprefs.h" 53#include "docprefs.h"
54 54
55#include "kotodoview.h" 55#include "kotodoview.h"
56using namespace KOrg; 56using namespace KOrg;
57 57
58 58
59class KOTodoViewWhatsThis :public QWhatsThis 59class KOTodoViewWhatsThis :public QWhatsThis
60{ 60{
61public: 61public:
62 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 62 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
63 63
64protected: 64protected:
65 virtual QString text( const QPoint& p) 65 virtual QString text( const QPoint& p)
66 { 66 {
67 return _view->getWhatsThisText(p) ; 67 return _view->getWhatsThisText(p) ;
68 } 68 }
69private: 69private:
70 QWidget* _wid; 70 QWidget* _wid;
71 KOTodoView * _view; 71 KOTodoView * _view;
72}; 72};
73 73
74KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, 74KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent,
75 const char *name) : 75 const char *name) :
76 KListView(parent,name) 76 KListView(parent,name)
77{ 77{
78 mName = QString ( name ); 78 mName = QString ( name );
79 mCalendar = calendar; 79 mCalendar = calendar;
80#ifndef DESKTOP_VERSION 80#ifndef DESKTOP_VERSION
81 QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); 81 QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold );
82#endif 82#endif
83 mOldCurrent = 0; 83 mOldCurrent = 0;
84 mMousePressed = false; 84 mMousePressed = false;
85 85
86 setAcceptDrops(true); 86 setAcceptDrops(true);
87 viewport()->setAcceptDrops(true); 87 viewport()->setAcceptDrops(true);
88 int size = 16; 88 int size = 16;
89 if (qApp->desktop()->width() < 300 ) 89 if (qApp->desktop()->width() < 300 )
90 size = 12; 90 size = 12;
91 setTreeStepSize( size + 6 ); 91 setTreeStepSize( size + 6 );
92 92
93} 93}
94 94
95void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) 95void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
96{ 96{
97#ifndef KORG_NODND 97#ifndef KORG_NODND
98// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; 98// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl;
99 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 99 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
100 !QTextDrag::canDecode( e ) ) { 100 !QTextDrag::canDecode( e ) ) {
101 e->ignore(); 101 e->ignore();
102 return; 102 return;
103 } 103 }
104 104
105 mOldCurrent = currentItem(); 105 mOldCurrent = currentItem();
106#endif 106#endif
107} 107}
108 108
109 109
110void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) 110void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
111{ 111{
112#ifndef KORG_NODND 112#ifndef KORG_NODND
113// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; 113// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl;
114 114
115 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 115 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
116 !QTextDrag::canDecode( e ) ) { 116 !QTextDrag::canDecode( e ) ) {
117 e->ignore(); 117 e->ignore();
118 return; 118 return;
119 } 119 }
120 120
121 e->accept(); 121 e->accept();
122#endif 122#endif
123} 123}
124 124
125void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) 125void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *)
126{ 126{
127#ifndef KORG_NODND 127#ifndef KORG_NODND
128// kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; 128// kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl;
129 129
130 setCurrentItem(mOldCurrent); 130 setCurrentItem(mOldCurrent);
131 setSelected(mOldCurrent,true); 131 setSelected(mOldCurrent,true);
132#endif 132#endif
133} 133}
134 134
135void KOTodoListView::contentsDropEvent(QDropEvent *e) 135void KOTodoListView::contentsDropEvent(QDropEvent *e)
136{ 136{
137#ifndef KORG_NODND 137#ifndef KORG_NODND
138// kdDebug() << "KOTodoListView::contentsDropEvent" << endl; 138// kdDebug() << "KOTodoListView::contentsDropEvent" << endl;
139 139
140 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 140 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
141 !QTextDrag::canDecode( e ) ) { 141 !QTextDrag::canDecode( e ) ) {
142 e->ignore(); 142 e->ignore();
143 return; 143 return;
144 } 144 }
145 145
146 DndFactory factory( mCalendar ); 146 DndFactory factory( mCalendar );
147 Todo *todo = factory.createDropTodo(e); 147 Todo *todo = factory.createDropTodo(e);
148 148
149 if (todo) { 149 if (todo) {
150 e->acceptAction(); 150 e->acceptAction();
151 151
152 KOTodoViewItem *destination = 152 KOTodoViewItem *destination =
153 (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); 153 (KOTodoViewItem *)itemAt(contentsToViewport(e->pos()));
154 Todo *destinationEvent = 0; 154 Todo *destinationEvent = 0;
155 if (destination) destinationEvent = destination->todo(); 155 if (destination) destinationEvent = destination->todo();
156 156
157 Todo *existingTodo = mCalendar->todo(todo->uid()); 157 Todo *existingTodo = mCalendar->todo(todo->uid());
158 158
159 if(existingTodo) { 159 if(existingTodo) {
160 Incidence *to = destinationEvent; 160 Incidence *to = destinationEvent;
161 while(to) { 161 while(to) {
162 if (to->uid() == todo->uid()) { 162 if (to->uid() == todo->uid()) {
163 KMessageBox::sorry(this, 163 KMessageBox::sorry(this,
164 i18n("Cannot move To-Do to itself\nor a child of itself"), 164 i18n("Cannot move To-Do to itself\nor a child of itself"),
165 i18n("Drop To-Do")); 165 i18n("Drop To-Do"));
166 delete todo; 166 delete todo;
167 return; 167 return;
168 } 168 }
169 to = to->relatedTo(); 169 to = to->relatedTo();
170 } 170 }
171 internalDrop = true; 171 internalDrop = true;
172 if ( destinationEvent ) 172 if ( destinationEvent )
173 reparentTodoSignal( destinationEvent, existingTodo ); 173 reparentTodoSignal( destinationEvent, existingTodo );
174 else 174 else
175 unparentTodoSignal(existingTodo); 175 unparentTodoSignal(existingTodo);
176 delete todo; 176 delete todo;
177 } else { 177 } else {
178 mCalendar->addTodo(todo); 178 mCalendar->addTodo(todo);
179 emit todoDropped(todo, KOGlobals::EVENTADDED); 179 emit todoDropped(todo, KOGlobals::EVENTADDED);
180 if ( destinationEvent ) 180 if ( destinationEvent )
181 reparentTodoSignal( destinationEvent, todo ); 181 reparentTodoSignal( destinationEvent, todo );
182 } 182 }
183 } 183 }
184 else { 184 else {
185 QString text; 185 QString text;
186 if (QTextDrag::decode(e,text)) { 186 if (QTextDrag::decode(e,text)) {
187 //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); 187 //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
188 KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); 188 KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) ));
189 qDebug("Dropped : " + text); 189 qDebug("Dropped : " + text);
190 QStringList emails = QStringList::split(",",text); 190 QStringList emails = QStringList::split(",",text);
191 for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { 191 for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
192 int pos = (*it).find("<"); 192 int pos = (*it).find("<");
193 QString name = (*it).left(pos); 193 QString name = (*it).left(pos);
194 QString email = (*it).mid(pos); 194 QString email = (*it).mid(pos);
195 if (!email.isEmpty() && todoi) { 195 if (!email.isEmpty() && todoi) {
196 todoi->todo()->addAttendee(new Attendee(name,email)); 196 todoi->todo()->addAttendee(new Attendee(name,email));
197 } 197 }
198 } 198 }
199 } 199 }
200 else { 200 else {
201 qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); 201 qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable ");
202 e->ignore(); 202 e->ignore();
203 } 203 }
204 } 204 }
205#endif 205#endif
206} 206}
207 207
208void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) 208void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
209{ 209{
210#ifndef KORG_NODND 210#ifndef KORG_NODND
211 QPoint p(contentsToViewport(e->pos())); 211 QPoint p(contentsToViewport(e->pos()));
212 QListViewItem *i = itemAt(p); 212 QListViewItem *i = itemAt(p);
213 mMousePressed = false; 213 mMousePressed = false;
214 if (i) { 214 if (i) {
215 // if the user clicked into the root decoration of the item, don't 215 // if the user clicked into the root decoration of the item, don't
216 // try to start a drag! 216 // try to start a drag!
217 if (p.x() > header()->sectionPos(header()->mapToIndex(0)) + 217 if (p.x() > header()->sectionPos(header()->mapToIndex(0)) +
218 treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + 218 treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) +
219 itemMargin() || 219 itemMargin() ||
220 p.x() < header()->sectionPos(header()->mapToIndex(0))) { 220 p.x() < header()->sectionPos(header()->mapToIndex(0))) {
221 if (e->button()==Qt::LeftButton) { 221 if (e->button()==Qt::LeftButton) {
222 mPressPos = e->pos(); 222 mPressPos = e->pos();
223 mMousePressed = true; 223 mMousePressed = true;
224 } 224 }
225 } 225 }
226 } 226 }
227#endif 227#endif
228 QListView::contentsMousePressEvent(e); 228 QListView::contentsMousePressEvent(e);
229} 229}
230void KOTodoListView::paintEvent(QPaintEvent* e) 230void KOTodoListView::paintEvent(QPaintEvent* e)
231{ 231{
232 emit paintNeeded(); 232 emit paintNeeded();
233 QListView::paintEvent( e); 233 QListView::paintEvent( e);
234} 234}
235void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) 235void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
236{ 236{
237 237
238#ifndef KORG_NODND 238#ifndef KORG_NODND
239 //QListView::contentsMouseMoveEvent(e); 239 //QListView::contentsMouseMoveEvent(e);
240 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > 240 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() >
241 QApplication::startDragDistance()*3) { 241 QApplication::startDragDistance()*3) {
242 mMousePressed = false; 242 mMousePressed = false;
243 QListViewItem *item = itemAt(contentsToViewport(mPressPos)); 243 QListViewItem *item = itemAt(contentsToViewport(mPressPos));
244 if (item) { 244 if (item) {
245 DndFactory factory( mCalendar ); 245 DndFactory factory( mCalendar );
246 ICalDrag *vd = factory.createDrag( 246 ICalDrag *vd = factory.createDrag(
247 ((KOTodoViewItem *)item)->todo(),viewport()); 247 ((KOTodoViewItem *)item)->todo(),viewport());
248 internalDrop = false; 248 internalDrop = false;
249 // we cannot do any senseful here, because the DnD is still broken in Qt 249 // we cannot do any senseful here, because the DnD is still broken in Qt
250 if (vd->drag()) { 250 if (vd->drag()) {
251 if ( !internalDrop ) { 251 if ( !internalDrop ) {
252 //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); 252 //emit deleteTodo( ((KOTodoViewItem *)item)->todo() );
253 qDebug("Dnd: External move: Delete drag source "); 253 qDebug("Dnd: External move: Delete drag source ");
254 } else 254 } else
255 qDebug("Dnd: Internal move "); 255 qDebug("Dnd: Internal move ");
256 256
257 } else { 257 } else {
258 if ( !internalDrop ) { 258 if ( !internalDrop ) {
259 qDebug("Dnd: External Copy"); 259 qDebug("Dnd: External Copy");
260 } else 260 } else
261 qDebug("DnD: Internal copy: Copy pending"); 261 qDebug("DnD: Internal copy: Copy pending");
262 } 262 }
263 } 263 }
264 } 264 }
265#endif 265#endif
266} 266}
267void KOTodoListView::keyPressEvent ( QKeyEvent * e ) 267void KOTodoListView::keyPressEvent ( QKeyEvent * e )
268{ 268{
269 269
270 QListViewItem* cn; 270 QListViewItem* cn;
271 if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { 271 if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) {
272 cn = currentItem(); 272 cn = currentItem();
273 if ( cn ) { 273 if ( cn ) {
274 KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); 274 KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
275 if ( ci ){ 275 if ( ci ){
276 if ( e->state() == ShiftButton ) 276 if ( e->state() == ShiftButton )
277 ci->setOn( false ); 277 ci->setOn( false );
278 else 278 else
279 ci->setOn( true ); 279 ci->setOn( true );
280 cn = cn->itemBelow(); 280 cn = cn->itemBelow();
281 if ( cn ) { 281 if ( cn ) {
282 setCurrentItem ( cn ); 282 setCurrentItem ( cn );
283 ensureItemVisible ( cn ); 283 ensureItemVisible ( cn );
284 } 284 }
285 285
286 } 286 }
287 } 287 }
288 288
289 return; 289 return;
290 } 290 }
291 291
292 // qDebug("KOTodoListView::keyPressEvent "); 292 // qDebug("KOTodoListView::keyPressEvent ");
293 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { 293 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) {
294 switch ( e->key() ) { 294 switch ( e->key() ) {
295 case Qt::Key_Down: 295 case Qt::Key_Down:
296 case Qt::Key_Up: 296 case Qt::Key_Up:
297 QListView::keyPressEvent ( e ); 297 QListView::keyPressEvent ( e );
298 break; 298 break;
299 case Qt::Key_Left: 299 case Qt::Key_Left:
300 case Qt::Key_Right: 300 case Qt::Key_Right:
301 QListView::keyPressEvent ( e ); 301 QListView::keyPressEvent ( e );
302 e->accept(); 302 e->accept();
303 return; 303 return;
304 break; 304 break;
305 default: 305 default:
306 e->ignore(); 306 e->ignore();
307 break; 307 break;
308 } 308 }
309 return; 309 return;
310 } 310 }
311 e->ignore(); 311 e->ignore();
312} 312}
313void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) 313void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e)
314{ 314{
315 QListView::contentsMouseReleaseEvent(e); 315 QListView::contentsMouseReleaseEvent(e);
316 mMousePressed = false; 316 mMousePressed = false;
317} 317}
318 318
319void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) 319void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
320{ 320{
321 if (!e) return; 321 if (!e) return;
322 322
323 QPoint vp = contentsToViewport(e->pos()); 323 QPoint vp = contentsToViewport(e->pos());
324 324
325 QListViewItem *item = itemAt(vp); 325 QListViewItem *item = itemAt(vp);
326 326
327 emit double_Clicked(item); 327 emit double_Clicked(item);
328 if (!item) return; 328 if (!item) return;
329 329
330 emit doubleClicked(item,vp,0); 330 emit doubleClicked(item,vp,0);
331} 331}
332 332
333///////////////////////////////////////////////////////////////////////////// 333/////////////////////////////////////////////////////////////////////////////
334 334
335KOQuickTodo::KOQuickTodo(QWidget *parent) : 335KOQuickTodo::KOQuickTodo(QWidget *parent) :
336 QLineEdit(parent) 336 QLineEdit(parent)
337{ 337{
338 setText(i18n("Click to add a new Todo")); 338 setText(i18n("Click to add a new Todo"));
339} 339}
340 340
341void KOQuickTodo::focusInEvent(QFocusEvent *ev) 341void KOQuickTodo::focusInEvent(QFocusEvent *ev)
342{ 342{
343 if ( text()==i18n("Click to add a new Todo") ) 343 if ( text()==i18n("Click to add a new Todo") )
344 setText(""); 344 setText("");
345 QLineEdit::focusInEvent(ev); 345 QLineEdit::focusInEvent(ev);
346} 346}
347 347
348void KOQuickTodo::focusOutEvent(QFocusEvent *ev) 348void KOQuickTodo::focusOutEvent(QFocusEvent *ev)
349{ 349{
350 setText(i18n("Click to add a new Todo")); 350 setText(i18n("Click to add a new Todo"));
351 QLineEdit::focusOutEvent(ev); 351 QLineEdit::focusOutEvent(ev);
352} 352}
353 353
354///////////////////////////////////////////////////////////////////////////// 354/////////////////////////////////////////////////////////////////////////////
355 355
356KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : 356KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
357 KOrg::BaseView(calendar,parent,name) 357 KOrg::BaseView(calendar,parent,name)
358{ 358{
359 mPendingUpdateBeforeRepaint = false; 359 mPendingUpdateBeforeRepaint = false;
360 isFlatDisplay = false; 360 isFlatDisplay = false;
361 mNavigator = 0; 361 mNavigator = 0;
362 QBoxLayout *topLayout = new QVBoxLayout(this); 362 QBoxLayout *topLayout = new QVBoxLayout(this);
363 mName = QString ( name ); 363 mName = QString ( name );
364 mBlockUpdate = false; 364 mBlockUpdate = false;
365 mQuickAdd = new KOQuickTodo(this); 365 mQuickAdd = new KOQuickTodo(this);
366 topLayout->addWidget(mQuickAdd); 366 topLayout->addWidget(mQuickAdd);
367 367
368 if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); 368 if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide();
369 369
370 mTodoListView = new KOTodoListView(calendar,this, name ); 370 mTodoListView = new KOTodoListView(calendar,this, name );
371 topLayout->addWidget(mTodoListView); 371 topLayout->addWidget(mTodoListView);
372 //mTodoListView->header()->setMaximumHeight(30); 372 //mTodoListView->header()->setMaximumHeight(30);
373 mTodoListView->setRootIsDecorated(true); 373 mTodoListView->setRootIsDecorated(true);
374 mTodoListView->setAllColumnsShowFocus(true); 374 mTodoListView->setAllColumnsShowFocus(true);
375 375
376 mTodoListView->setShowSortIndicator(true); 376 mTodoListView->setShowSortIndicator(true);
377 377
378 mTodoListView->addColumn(i18n("Todo")); 378 mTodoListView->addColumn(i18n("Todo"));
379 mTodoListView->addColumn(i18n("Prio")); 379 mTodoListView->addColumn(i18n("Prio"));
380 mTodoListView->setColumnAlignment(1,AlignHCenter); 380 mTodoListView->setColumnAlignment(1,AlignHCenter);
381 mTodoListView->addColumn(i18n("Complete")); 381 mTodoListView->addColumn(i18n("Complete"));
382 mTodoListView->setColumnAlignment(2,AlignCenter); 382 mTodoListView->setColumnAlignment(2,AlignCenter);
383 383
384 mTodoListView->addColumn(i18n("Due Date")); 384 mTodoListView->addColumn(i18n("Due Date"));
385 mTodoListView->setColumnAlignment(3,AlignLeft); 385 mTodoListView->setColumnAlignment(3,AlignLeft);
386 mTodoListView->addColumn(i18n("Due Time")); 386 mTodoListView->addColumn(i18n("Due Time"));
387 mTodoListView->setColumnAlignment(4,AlignHCenter); 387 mTodoListView->setColumnAlignment(4,AlignHCenter);
388 388
389 mTodoListView->addColumn(i18n("Start Date")); 389 mTodoListView->addColumn(i18n("Start Date"));
390 mTodoListView->setColumnAlignment(5,AlignLeft); 390 mTodoListView->setColumnAlignment(5,AlignLeft);
391 mTodoListView->addColumn(i18n("Start Time")); 391 mTodoListView->addColumn(i18n("Start Time"));
392 mTodoListView->setColumnAlignment(6,AlignHCenter); 392 mTodoListView->setColumnAlignment(6,AlignHCenter);
393 393
394 mTodoListView->addColumn(i18n("Cancelled")); 394 mTodoListView->addColumn(i18n("Cancelled"));
395 mTodoListView->addColumn(i18n("Categories")); 395 mTodoListView->addColumn(i18n("Categories"));
396#if 0 396#if 0
397 mTodoListView->addColumn(i18n("Sort Id")); 397 mTodoListView->addColumn(i18n("Sort Id"));
398 mTodoListView->setColumnAlignment(4,AlignHCenter); 398 mTodoListView->setColumnAlignment(4,AlignHCenter);
399#endif 399#endif
400 400
401 mTodoListView->setMinimumHeight( 60 ); 401 mTodoListView->setMinimumHeight( 60 );
402 mTodoListView->setItemsRenameable( true ); 402 mTodoListView->setItemsRenameable( true );
403 mTodoListView->setRenameable( 0 ); 403 mTodoListView->setRenameable( 0 );
404 mTodoListView->setColumnWidth( 0, 120 ); 404 mTodoListView->setColumnWidth( 0, 120 );
405 mTodoListView->setColumnWidthMode(0, QListView::Manual); 405 mTodoListView->setColumnWidthMode(0, QListView::Manual);
406 mTodoListView->setColumnWidthMode(1, QListView::Manual); 406 mTodoListView->setColumnWidthMode(1, QListView::Manual);
407 mTodoListView->setColumnWidthMode(2, QListView::Manual); 407 mTodoListView->setColumnWidthMode(2, QListView::Manual);
408 mTodoListView->setColumnWidthMode(3, QListView::Manual); 408 mTodoListView->setColumnWidthMode(3, QListView::Manual);
409 mTodoListView->setColumnWidthMode(4, QListView::Manual); 409 mTodoListView->setColumnWidthMode(4, QListView::Manual);
410 mTodoListView->setColumnWidthMode(5, QListView::Manual); 410 mTodoListView->setColumnWidthMode(5, QListView::Manual);
411 mTodoListView->setColumnWidthMode(6, QListView::Manual); 411 mTodoListView->setColumnWidthMode(6, QListView::Manual);
412 mTodoListView->setColumnWidthMode(7, QListView::Manual); 412 mTodoListView->setColumnWidthMode(7, QListView::Manual);
413 mTodoListView->setColumnWidthMode(8, QListView::Manual); 413 mTodoListView->setColumnWidthMode(8, QListView::Manual);
414 414
415 415
416 new KOTodoViewWhatsThis(mTodoListView->viewport(),this); 416 new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
417 417
418 mPriorityPopupMenu = new QPopupMenu(this); 418 mPriorityPopupMenu = new QPopupMenu(this);
419 for (int i = 1; i <= 5; i++) { 419 for (int i = 1; i <= 5; i++) {
420 QString label = QString ("%1").arg (i); 420 QString label = QString ("%1").arg (i);
421 mPriority[mPriorityPopupMenu->insertItem (label)] = i; 421 mPriority[mPriorityPopupMenu->insertItem (label)] = i;
422 } 422 }
423 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); 423 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
424 424
425 mPercentageCompletedPopupMenu = new QPopupMenu(this); 425 mPercentageCompletedPopupMenu = new QPopupMenu(this);
426 for (int i = 0; i <= 100; i+=20) { 426 for (int i = 0; i <= 100; i+=20) {
427 QString label = QString ("%1 %").arg (i); 427 QString label = QString ("%1 %").arg (i);
428 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; 428 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
429 } 429 }
430 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); 430 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
431 431
432 432
433 433
434 mItemPopupMenu = new QPopupMenu(this); 434 mItemPopupMenu = new QPopupMenu(this);
435 mItemPopupMenu->insertItem(i18n("Show..."), this, 435 mItemPopupMenu->insertItem(i18n("Show..."), this,
436 SLOT (showTodo())); 436 SLOT (showTodo()));
437 mItemPopupMenu->insertItem(i18n("Edit..."), this, 437 mItemPopupMenu->insertItem(i18n("Edit..."), this,
438 SLOT (editTodo())); 438 SLOT (editTodo()));
439 mItemPopupMenu->insertItem( i18n("Delete"), this, 439 mItemPopupMenu->insertItem( i18n("Delete"), this,
440 SLOT (deleteTodo())); 440 SLOT (deleteTodo()));
441 mItemPopupMenu->insertItem( i18n("Clone..."), this, 441 mItemPopupMenu->insertItem( i18n("Clone..."), this,
442 SLOT (cloneTodo())); 442 SLOT (cloneTodo()));
443 mItemPopupMenu->insertItem( i18n("Move..."), this, 443 mItemPopupMenu->insertItem( i18n("Move..."), this,
444 SLOT (moveTodo())); 444 SLOT (moveTodo()));
445 mItemPopupMenu->insertItem( i18n("Beam..."), this, 445 mItemPopupMenu->insertItem( i18n("Beam..."), this,
446 SLOT (beamTodo())); 446 SLOT (beamTodo()));
447 mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, 447 mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this,
448 SLOT (cancelTodo())); 448 SLOT (cancelTodo()));
449 mItemPopupMenu->insertSeparator(); 449 mItemPopupMenu->insertSeparator();
450 450
451 mItemPopupMenu->insertItem( i18n("New Todo..."), this, 451 mItemPopupMenu->insertItem( i18n("New Todo..."), this,
452 SLOT (newTodo())); 452 SLOT (newTodo()));
453 mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, 453 mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this,
454 SLOT (newSubTodo())); 454 SLOT (newSubTodo()));
455 mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, 455 mItemPopupMenu->insertItem(i18n("Unparent Todo"), this,
456 SLOT (unparentTodo()),0,21); 456 SLOT (unparentTodo()),0,21);
457 mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, 457 mItemPopupMenu->insertItem(i18n("Reparent Todo"), this,
458 SLOT (reparentTodo()),0,22); 458 SLOT (reparentTodo()),0,22);
459 mItemPopupMenu->insertSeparator(); 459 mItemPopupMenu->insertSeparator();
460#if 0 460#if 0
461 mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), 461 mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"),
462 this, SLOT( purgeCompleted() ) ); 462 this, SLOT( purgeCompleted() ) );
463 mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), 463 mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"),
464 this, SLOT( toggleCompleted() ),0, 33 ); 464 this, SLOT( toggleCompleted() ),0, 33 );
465 mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), 465 mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
466 this, SLOT( toggleQuickTodo() ),0, 34 ); 466 this, SLOT( toggleQuickTodo() ),0, 34 );
467 mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), 467 mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
468 this, SLOT( toggleRunning() ),0, 35 ); 468 this, SLOT( toggleRunning() ),0, 35 );
469 469
470#endif 470#endif
471 mPopupMenu = new QPopupMenu(this); 471 mPopupMenu = new QPopupMenu(this);
472 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, 472 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this,
473 SLOT (newTodo()),0,1); 473 SLOT (newTodo()),0,1);
474 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), 474 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"),
475 this, SLOT(purgeCompleted()),0,2); 475 this, SLOT(purgeCompleted()),0,2);
476 mPopupMenu->insertItem(i18n("Show Completed"), 476 mPopupMenu->insertItem(i18n("Show Completed"),
477 this, SLOT( toggleCompleted() ),0,3 ); 477 this, SLOT( toggleCompleted() ),0,3 );
478 mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), 478 mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
479 this, SLOT( toggleQuickTodo() ),0,4 ); 479 this, SLOT( toggleQuickTodo() ),0,4 );
480 mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), 480 mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
481 this, SLOT( toggleRunning() ),0,5 ); 481 this, SLOT( toggleRunning() ),0,5 );
482 mPopupMenu->insertItem(i18n(" set all open","Display all opened"), 482 mPopupMenu->insertItem(i18n(" set all open","Display all opened"),
483 this, SLOT( setAllOpen() ),0,6 ); 483 this, SLOT( setAllOpen() ),0,6 );
484 mPopupMenu->insertItem(i18n(" set all close","Display all closed"), 484 mPopupMenu->insertItem(i18n(" set all close","Display all closed"),
485 this, SLOT( setAllClose() ),0,7 ); 485 this, SLOT( setAllClose() ),0,7 );
486 mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), 486 mPopupMenu->insertItem(i18n(" set all flat","Display all flat"),
487 this, SLOT( setAllFlat() ),0,8 ); 487 this, SLOT( setAllFlat() ),0,8 );
488 mDocPrefs = new DocPrefs( name ); 488 mDocPrefs = new DocPrefs( name );
489 489
490 mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); 490 mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu );
491 mPopupMenu->setCheckable( true ); 491 mPopupMenu->setCheckable( true );
492 mItemPopupMenu->setCheckable( true ); 492 mItemPopupMenu->setCheckable( true );
493 493
494 494
495 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); 495 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo );
496 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); 496 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo );
497 497
498 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); 498 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo);
499 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); 499 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo );
500 500
501 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); 501 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos);
502 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); 502 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos );
503 503
504 504
505 // Double clicking conflicts with opening/closing the subtree 505 // Double clicking conflicts with opening/closing the subtree
506 connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), 506 connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ),
507 SLOT( editItem( QListViewItem *) ) ); 507 SLOT( editItem( QListViewItem *) ) );
508 /* 508 /*
509 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, 509 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *,
510 const QPoint &,int ) ), 510 const QPoint &,int ) ),
511 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 511 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
512 */ 512 */
513 connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, 513 connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *,
514 const QPoint &,int ) ), 514 const QPoint &,int ) ),
515 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 515 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
516 connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), 516 connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ),
517 SLOT( itemClicked( QListViewItem * ) ) ); 517 SLOT( itemClicked( QListViewItem * ) ) );
518 connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), 518 connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ),
519 SLOT( itemDoubleClicked( QListViewItem * ) ) ); 519 SLOT( itemDoubleClicked( QListViewItem * ) ) );
520 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 520 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
521 SLOT( updateView() ) ); 521 SLOT( updateView() ) );
522 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 522 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
523 SLOT( todoModified(Todo *, int) ) ); 523 SLOT( todoModified(Todo *, int) ) );
524 connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), 524 connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ),
525 SLOT( itemStateChanged( QListViewItem * ) ) ); 525 SLOT( itemStateChanged( QListViewItem * ) ) );
526 connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), 526 connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ),
527 SLOT( itemStateChanged( QListViewItem * ) ) ); 527 SLOT( itemStateChanged( QListViewItem * ) ) );
528 connect( mTodoListView, SIGNAL( paintNeeded() ), 528 connect( mTodoListView, SIGNAL( paintNeeded() ),
529 SLOT( paintNeeded()) ); 529 SLOT( paintNeeded()) );
530 530
531#if 0 531#if 0
532 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), 532 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)),
533 SLOT(selectionChanged(QListViewItem *))); 533 SLOT(selectionChanged(QListViewItem *)));
534 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), 534 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)),
535 SLOT(selectionChanged(QListViewItem *))); 535 SLOT(selectionChanged(QListViewItem *)));
536 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), 536 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)),
537 SLOT(selectionChanged(QListViewItem *))); 537 SLOT(selectionChanged(QListViewItem *)));
538#endif 538#endif
539 539
540 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); 540 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) ));
541 connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); 541 connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) ));
542 connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); 542 connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) ));
543 543
544 connect( mTodoListView, SIGNAL(selectionChanged() ), 544 connect( mTodoListView, SIGNAL(selectionChanged() ),
545 SLOT( processSelectionChange() ) ); 545 SLOT( processSelectionChange() ) );
546 connect( mQuickAdd, SIGNAL( returnPressed () ), 546 connect( mQuickAdd, SIGNAL( returnPressed () ),
547 SLOT( addQuickTodo() ) ); 547 SLOT( addQuickTodo() ) );
548 548
549} 549}
550 550
551KOTodoView::~KOTodoView() 551KOTodoView::~KOTodoView()
552{ 552{
553 delete mDocPrefs; 553 delete mDocPrefs;
554} 554}
555QString KOTodoView::getWhatsThisText(QPoint p) 555QString KOTodoView::getWhatsThisText(QPoint p)
556{ 556{
557 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); 557 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
558 if ( item ) 558 if ( item )
559 return KIncidenceFormatter::instance()->getFormattedText( item->todo() ); 559 return KIncidenceFormatter::instance()->getFormattedText( item->todo() );
560 return i18n("That is the todo view" ); 560 return i18n("That is the todo view" );
561 561
562} 562}
563 563
564void KOTodoView::jumpToDate () 564void KOTodoView::jumpToDate ()
565{ 565{
566 // if (mActiveItem) { 566 // if (mActiveItem) {
567// mActiveItem->todo()); 567// mActiveItem->todo());
568// if ( mActiveItem->todo()->hasDueDate() ) 568// if ( mActiveItem->todo()->hasDueDate() )
569// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); 569// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() );
570} 570}
571void KOTodoView::paintNeeded() 571void KOTodoView::paintNeeded()
572{ 572{
573 if ( mPendingUpdateBeforeRepaint ) { 573 if ( mPendingUpdateBeforeRepaint ) {
574 updateView(); 574 updateView();
575 mPendingUpdateBeforeRepaint = false; 575 mPendingUpdateBeforeRepaint = false;
576 } 576 }
577} 577}
578void KOTodoView::paintEvent(QPaintEvent * pevent) 578void KOTodoView::paintEvent(QPaintEvent * pevent)
579{ 579{
580 if ( mPendingUpdateBeforeRepaint ) { 580 if ( mPendingUpdateBeforeRepaint ) {
581 updateView(); 581 updateView();
582 mPendingUpdateBeforeRepaint = false; 582 mPendingUpdateBeforeRepaint = false;
583 } 583 }
584 KOrg::BaseView::paintEvent( pevent); 584 KOrg::BaseView::paintEvent( pevent);
585} 585}
586 586
587void KOTodoView::updateView() 587void KOTodoView::updateView()
588{ 588{
589 pendingSubtodo = 0; 589 pendingSubtodo = 0;
590 if ( mBlockUpdate ) { 590 if ( mBlockUpdate ) {
591 return; 591 return;
592 } 592 }
593 if ( !isVisible() ) { 593 if ( !isVisible() ) {
594 mPendingUpdateBeforeRepaint = true; 594 mPendingUpdateBeforeRepaint = true;
595 return; 595 return;
596 } 596 }
597 //qDebug("KOTodoView::updateView() %x", this); 597 //qDebug("KOTodoView::updateView() %x", this);
598 if ( isFlatDisplay ) { 598 if ( isFlatDisplay ) {
599 setAllFlat(); 599 displayAllFlat();
600 return; 600 return;
601 } 601 }
602 //qDebug("update "); 602 //qDebug("update ");
603// kdDebug() << "KOTodoView::updateView()" << endl; 603// kdDebug() << "KOTodoView::updateView()" << endl;
604 QFont fo = KOPrefs::instance()->mTodoViewFont; 604 QFont fo = KOPrefs::instance()->mTodoViewFont;
605 mTodoListView->clear(); 605 mTodoListView->clear();
606 if ( mName == "todolistsmall" ) { 606 if ( mName == "todolistsmall" ) {
607 if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { 607 if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) {
608 int ps = fo.pointSize() -2; 608 int ps = fo.pointSize() -2;
609 if ( ps > 12 ) 609 if ( ps > 12 )
610 ps -= 2; 610 ps -= 2;
611 fo.setPointSize( ps ); 611 fo.setPointSize( ps );
612 } 612 }
613 } 613 }
614 614
615 mTodoListView->setFont( fo ); 615 mTodoListView->setFont( fo );
616 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); 616 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont );
617 //mTodoListView->header()->setMaximumHeight(fm.height()); 617 //mTodoListView->header()->setMaximumHeight(fm.height());
618 QPtrList<Todo> todoList = calendar()->todos(); 618 QPtrList<Todo> todoList = calendar()->todos();
619 619
620/* 620/*
621 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; 621 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl;
622 Event *t; 622 Event *t;
623 for(t = todoList.first(); t; t = todoList.next()) { 623 for(t = todoList.first(); t; t = todoList.next()) {
624 kdDebug() << " " << t->getSummary() << endl; 624 kdDebug() << " " << t->getSummary() << endl;
625 625
626 if (t->getRelatedTo()) { 626 if (t->getRelatedTo()) {
627 kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; 627 kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl;
628 } 628 }
629 629
630 QPtrList<Event> l = t->getRelations(); 630 QPtrList<Event> l = t->getRelations();
631 Event *c; 631 Event *c;
632 for(c=l.first();c;c=l.next()) { 632 for(c=l.first();c;c=l.next()) {
633 kdDebug() << " - relation: " << c->getSummary() << endl; 633 kdDebug() << " - relation: " << c->getSummary() << endl;
634 } 634 }
635 } 635 }
636*/ 636*/
637 637
638 // Put for each Event a KOTodoViewItem in the list view. Don't rely on a 638 // Put for each Event a KOTodoViewItem in the list view. Don't rely on a
639 // specific order of events. That means that we have to generate parent items 639 // specific order of events. That means that we have to generate parent items
640 // recursively for proper hierarchical display of Todos. 640 // recursively for proper hierarchical display of Todos.
641 mTodoMap.clear(); 641 mTodoMap.clear();
642 Todo *todo; 642 Todo *todo;
643 todo = todoList.first();// todo; todo = todoList.next()) { 643 todo = todoList.first();// todo; todo = todoList.next()) {
644 while ( todo ) { 644 while ( todo ) {
645 bool next = true; 645 bool next = true;
646 // qDebug("todo %s ", todo->summary().latin1()); 646 // qDebug("todo %s ", todo->summary().latin1());
647 Incidence *incidence = todo->relatedTo(); 647 Incidence *incidence = todo->relatedTo();
648 while ( incidence ) { 648 while ( incidence ) {
649 if ( incidence->type() == "Todo") { 649 if ( incidence->type() == "Todo") {
650 //qDebug("related %s ",incidence->summary().latin1() ); 650 //qDebug("related %s ",incidence->summary().latin1() );
651 if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { 651 if ( !(todoList.contains ( ((Todo* )incidence ) ) )) {
652 //qDebug("related not found "); 652 //qDebug("related not found ");
653 todoList.remove( ); 653 todoList.remove( );
654 todo = todoList.current(); 654 todo = todoList.current();
655 next = false; 655 next = false;
656 incidence = 0; 656 incidence = 0;
657 657
658 } else { 658 } else {
659 //qDebug("related found "); 659 //qDebug("related found ");
660 incidence = incidence->relatedTo(); 660 incidence = incidence->relatedTo();
661 } 661 }
662 } else 662 } else
663 incidence = 0; 663 incidence = 0;
664 } 664 }
665 if ( next ) 665 if ( next )
666 todo = todoList.next(); 666 todo = todoList.next();
667 } 667 }
668// qDebug("again .... "); 668// qDebug("again .... ");
669// for(todo = todoList.first(); todo; todo = todoList.next()) { 669// for(todo = todoList.first(); todo; todo = todoList.next()) {
670 670
671// qDebug("yytodo %s ", todo->summary().latin1()); 671// qDebug("yytodo %s ", todo->summary().latin1());
672// } 672// }
673 //qDebug("for "); 673 //qDebug("for ");
674 for(todo = todoList.first(); todo; todo = todoList.next()) { 674 for(todo = todoList.first(); todo; todo = todoList.next()) {
675 if (!mTodoMap.contains(todo) && checkTodo( todo ) ) 675 if (!mTodoMap.contains(todo) && checkTodo( todo ) )
676 { 676 {
677 insertTodoItem(todo); 677 insertTodoItem(todo);
678 } 678 }
679 } 679 }
680 //qDebug("for end "); 680 //qDebug("for end ");
681 // Restore opened/closed state 681 // Restore opened/closed state
682 mTodoListView->blockSignals( true ); 682 mTodoListView->blockSignals( true );
683 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); 683 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() );
684 mTodoListView->blockSignals( false ); 684 mTodoListView->blockSignals( false );
685 mTodoListView->setFocus(); 685 mTodoListView->setFocus();
686 processSelectionChange(); 686 processSelectionChange();
687} 687}
688 688
689bool KOTodoView::checkTodo( Todo * todo ) 689bool KOTodoView::checkTodo( Todo * todo )
690{ 690{
691 691
692 if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) 692 if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() )
693 return false; 693 return false;
694 if ( !todo->isCompleted() ) { 694 if ( !todo->isCompleted() ) {
695 if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) 695 if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() )
696 return true; 696 return true;
697 } 697 }
698 if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { 698 if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) {
699 if ( todo->hasStartDate() ) 699 if ( todo->hasStartDate() )
700 if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) 700 if ( mNavigator->selectedDates().last() < todo->dtStart().date() )
701 return false; 701 return false;
702 if ( todo->hasDueDate() ) 702 if ( todo->hasDueDate() )
703 if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) 703 if ( mNavigator->selectedDates().first() > todo->dtDue().date() )
704 return false; 704 return false;
705 } 705 }
706 return true; 706 return true;
707} 707}
708 708
709void KOTodoView::restoreItemState( QListViewItem *item ) 709void KOTodoView::restoreItemState( QListViewItem *item )
710{ 710{
711 pendingSubtodo = 0; 711 pendingSubtodo = 0;
712 while( item ) { 712 while( item ) {
713 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 713 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
714 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); 714 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) );
715 if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); 715 if( item->childCount() > 0 ) restoreItemState( item->firstChild() );
716 item = item->nextSibling(); 716 item = item->nextSibling();
717 } 717 }
718} 718}
719 719
720 720
721QMap<Todo *,KOTodoViewItem *>::ConstIterator 721QMap<Todo *,KOTodoViewItem *>::ConstIterator
722 KOTodoView::insertTodoItem(Todo *todo) 722 KOTodoView::insertTodoItem(Todo *todo)
723{ 723{
724 724
725// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; 725// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
726 // TODO: Check, if dynmaic cast is necessary 726 // TODO: Check, if dynmaic cast is necessary
727 727
728 pendingSubtodo = 0; 728 pendingSubtodo = 0;
729 Incidence *incidence = todo->relatedTo(); 729 Incidence *incidence = todo->relatedTo();
730 if (incidence && incidence->type() == "Todo") { 730 if (incidence && incidence->type() == "Todo") {
731 Todo *relatedTodo = static_cast<Todo *>(incidence); 731 Todo *relatedTodo = static_cast<Todo *>(incidence);
732 732
733// kdDebug() << " has Related" << endl; 733// kdDebug() << " has Related" << endl;
734 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 734 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
735 itemIterator = mTodoMap.find(relatedTodo); 735 itemIterator = mTodoMap.find(relatedTodo);
736 if (itemIterator == mTodoMap.end()) { 736 if (itemIterator == mTodoMap.end()) {
737// kdDebug() << " related not yet in list" << endl; 737// kdDebug() << " related not yet in list" << endl;
738 itemIterator = insertTodoItem (relatedTodo); 738 itemIterator = insertTodoItem (relatedTodo);
739 } 739 }
740 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem 740 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem
741 // and one into the map. Sure finding is more easy but why? -zecke 741 // and one into the map. Sure finding is more easy but why? -zecke
742 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); 742 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
743 return mTodoMap.insert(todo,todoItem); 743 return mTodoMap.insert(todo,todoItem);
744 } else { 744 } else {
745// kdDebug() << " no Related" << endl; 745// kdDebug() << " no Related" << endl;
746 // see above -zecke 746 // see above -zecke
747 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 747 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
748 return mTodoMap.insert(todo,todoItem); 748 return mTodoMap.insert(todo,todoItem);
749 } 749 }
750} 750}
751 751
752 752
753void KOTodoView::updateConfig() 753void KOTodoView::updateConfig()
754{ 754{
755 updateView(); 755 updateView();
756 mTodoListView->repaintContents(); 756 mTodoListView->repaintContents();
757} 757}
758 758
759QPtrList<Incidence> KOTodoView::selectedIncidences() 759QPtrList<Incidence> KOTodoView::selectedIncidences()
760{ 760{
761 QPtrList<Incidence> selected; 761 QPtrList<Incidence> selected;
762 762
763 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 763 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
764// if (!item) item = mActiveItem; 764// if (!item) item = mActiveItem;
765 if (item) selected.append(item->todo()); 765 if (item) selected.append(item->todo());
766 766
767 return selected; 767 return selected;
768} 768}
769 769
770QPtrList<Todo> KOTodoView::selectedTodos() 770QPtrList<Todo> KOTodoView::selectedTodos()
771{ 771{
772 QPtrList<Todo> selected; 772 QPtrList<Todo> selected;
773 773
774 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 774 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
775// if (!item) item = mActiveItem; 775// if (!item) item = mActiveItem;
776 if (item) selected.append(item->todo()); 776 if (item) selected.append(item->todo());
777 777
778 return selected; 778 return selected;
779} 779}
780 780
781void KOTodoView::changeEventDisplay(Event *, int) 781void KOTodoView::changeEventDisplay(Event *, int)
782{ 782{
783 updateView(); 783 updateView();
784} 784}
785 785
786void KOTodoView::showDates(const QDate &, const QDate &) 786void KOTodoView::showDates(const QDate &, const QDate &)
787{ 787{
788} 788}
789 789
790void KOTodoView::showEvents(QPtrList<Event>) 790void KOTodoView::showEvents(QPtrList<Event>)
791{ 791{
792 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; 792 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl;
793} 793}
794 794
795void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, 795void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
796 const QDate &td) 796 const QDate &td)
797{ 797{
798#ifndef KORG_NOPRINTER 798#ifndef KORG_NOPRINTER
799 calPrinter->preview(CalPrinter::Todolist, fd, td); 799 calPrinter->preview(CalPrinter::Todolist, fd, td);
800#endif 800#endif
801} 801}
802 802
803void KOTodoView::editItem(QListViewItem *item ) 803void KOTodoView::editItem(QListViewItem *item )
804{ 804{
805 // qDebug("editItem(QListViewItem *item ) "); 805 // qDebug("editItem(QListViewItem *item ) ");
806 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 806 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
807} 807}
808 808
809void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 809void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
810{ 810{
811 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 811 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
812} 812}
813 813
814void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) 814void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
815{ 815{
816 pendingSubtodo = 0; 816 pendingSubtodo = 0;
817 mActiveItem = (KOTodoViewItem *)item; 817 mActiveItem = (KOTodoViewItem *)item;
818 if (item) { 818 if (item) {
819 switch (column){ 819 switch (column){
820 case 1: 820 case 1:
821 mPriorityPopupMenu->popup(QCursor::pos ()); break; 821 mPriorityPopupMenu->popup(QCursor::pos ()); break;
822 case 2: 822 case 2:
823 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; 823 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break;
824 case 3: 824 case 3:
825 moveTodo(); 825 moveTodo();
826 break; 826 break;
827 case 8: 827 case 8:
828 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; 828 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break;
829 default: 829 default:
830 mItemPopupMenu->popup(QCursor::pos()); 830 mItemPopupMenu->popup(QCursor::pos());
831 } 831 }
832 } else mPopupMenu->popup(QCursor::pos()); 832 } else mPopupMenu->popup(QCursor::pos());
833} 833}
834void KOTodoView::newTodo() 834void KOTodoView::newTodo()
835{ 835{
836 emit newTodoSignal(); 836 emit newTodoSignal();
837} 837}
838 838
839void KOTodoView::newSubTodo() 839void KOTodoView::newSubTodo()
840{ 840{
841 if (mActiveItem) { 841 if (mActiveItem) {
842 emit newSubTodoSignal(mActiveItem->todo()); 842 emit newSubTodoSignal(mActiveItem->todo());
843 } 843 }
844} 844}
845void KOTodoView::unparentTodo() 845void KOTodoView::unparentTodo()
846{ 846{
847 if (mActiveItem) { 847 if (mActiveItem) {
848 emit unparentTodoSignal(mActiveItem->todo()); 848 emit unparentTodoSignal(mActiveItem->todo());
849 } 849 }
850} 850}
851 851
852void KOTodoView::reparentTodo() 852void KOTodoView::reparentTodo()
853{ 853{
854 if (mActiveItem) { 854 if (mActiveItem) {
855 qDebug("KOTodoView::reparentTodo() "); 855 qDebug("KOTodoView::reparentTodo() ");
856 topLevelWidget()->setCaption(i18n("Click on new parent item")); 856 topLevelWidget()->setCaption(i18n("Click on new parent item"));
857 pendingSubtodo = mActiveItem; 857 pendingSubtodo = mActiveItem;
858 } 858 }
859} 859}
860void KOTodoView::editTodo() 860void KOTodoView::editTodo()
861{ 861{
862 if (mActiveItem) { 862 if (mActiveItem) {
863 emit editTodoSignal(mActiveItem->todo()); 863 emit editTodoSignal(mActiveItem->todo());
864 } 864 }
865} 865}
866void KOTodoView::cloneTodo() 866void KOTodoView::cloneTodo()
867{ 867{
868 if (mActiveItem) { 868 if (mActiveItem) {
869 emit cloneTodoSignal((Incidence*)mActiveItem->todo()); 869 emit cloneTodoSignal((Incidence*)mActiveItem->todo());
870 } 870 }
871} 871}
872void KOTodoView::cancelTodo() 872void KOTodoView::cancelTodo()
873{ 873{
874 if (mActiveItem) { 874 if (mActiveItem) {
875 emit cancelTodoSignal((Incidence*)mActiveItem->todo()); 875 emit cancelTodoSignal((Incidence*)mActiveItem->todo());
876 } 876 }
877} 877}
878void KOTodoView::moveTodo() 878void KOTodoView::moveTodo()
879{ 879{
880 if (mActiveItem) { 880 if (mActiveItem) {
881 emit moveTodoSignal((Incidence*)mActiveItem->todo()); 881 emit moveTodoSignal((Incidence*)mActiveItem->todo());
882 } 882 }
883} 883}
884void KOTodoView::beamTodo() 884void KOTodoView::beamTodo()
885{ 885{
886 if (mActiveItem) { 886 if (mActiveItem) {
887 emit beamTodoSignal((Incidence*)mActiveItem->todo()); 887 emit beamTodoSignal((Incidence*)mActiveItem->todo());
888 } 888 }
889} 889}
890 890
891 891
892void KOTodoView::showTodo() 892void KOTodoView::showTodo()
893{ 893{
894 if (mActiveItem) { 894 if (mActiveItem) {
895 emit showTodoSignal(mActiveItem->todo()); 895 emit showTodoSignal(mActiveItem->todo());
896 } 896 }
897} 897}
898 898
899void KOTodoView::deleteTodo() 899void KOTodoView::deleteTodo()
900{ 900{
901 if (mActiveItem) { 901 if (mActiveItem) {
902 emit deleteTodoSignal(mActiveItem->todo()); 902 emit deleteTodoSignal(mActiveItem->todo());
903 } 903 }
904} 904}
905 905
906void KOTodoView::setNewPriority(int index) 906void KOTodoView::setNewPriority(int index)
907{ 907{
908 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 908 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
909 mActiveItem->todo()->setPriority(mPriority[index]); 909 mActiveItem->todo()->setPriority(mPriority[index]);
910 mActiveItem->construct(); 910 mActiveItem->construct();
911 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); 911 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
912 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 912 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
913 } 913 }
914} 914}
915 915
916void KOTodoView::setNewPercentage(int index) 916void KOTodoView::setNewPercentage(int index)
917{ 917{
918 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 918 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
919 919
920 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { 920 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
921 mActiveItem->setOn( true ); 921 mActiveItem->setOn( true );
922 return; 922 return;
923 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { 923 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
924 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); 924 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
925 if ( par && par->isOn() ) 925 if ( par && par->isOn() )
926 par->setOn( false ); 926 par->setOn( false );
927 } 927 }
928 if (mPercentage[index] == 100) { 928 if (mPercentage[index] == 100) {
929 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 929 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
930 } else { 930 } else {
931 mActiveItem->todo()->setCompleted(false); 931 mActiveItem->todo()->setCompleted(false);
932 } 932 }
933 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 933 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
934 mActiveItem->construct(); 934 mActiveItem->construct();
935 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 935 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
936 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 936 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
937 } 937 }
938} 938}
939 939
940 940
941QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) 941QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
942{ 942{
943 QPopupMenu* tempMenu = new QPopupMenu (this); 943 QPopupMenu* tempMenu = new QPopupMenu (this);
944 QStringList checkedCategories = todoItem->todo()->categories (); 944 QStringList checkedCategories = todoItem->todo()->categories ();
945 945
946 tempMenu->setCheckable (true); 946 tempMenu->setCheckable (true);
947 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 947 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
948 it != KOPrefs::instance()->mCustomCategories.end (); 948 it != KOPrefs::instance()->mCustomCategories.end ();
949 ++it) { 949 ++it) {
950 int index = tempMenu->insertItem (*it); 950 int index = tempMenu->insertItem (*it);
951 mCategory[index] = *it; 951 mCategory[index] = *it;
952 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); 952 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true);
953 } 953 }
954 954
955 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); 955 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
956 return tempMenu; 956 return tempMenu;
957 957
958 958
959} 959}
960void KOTodoView::changedCategories(int index) 960void KOTodoView::changedCategories(int index)
961{ 961{
962 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 962 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
963 QStringList categories = mActiveItem->todo()->categories (); 963 QStringList categories = mActiveItem->todo()->categories ();
964 if (categories.find (mCategory[index]) != categories.end ()) 964 if (categories.find (mCategory[index]) != categories.end ())
965 categories.remove (mCategory[index]); 965 categories.remove (mCategory[index]);
966 else 966 else
967 categories.insert (categories.end(), mCategory[index]); 967 categories.insert (categories.end(), mCategory[index]);
968 categories.sort (); 968 categories.sort ();
969 mActiveItem->todo()->setCategories (categories); 969 mActiveItem->todo()->setCategories (categories);
970 mActiveItem->construct(); 970 mActiveItem->construct();
971 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 971 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
972 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); 972 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
973 } 973 }
974} 974}
975void KOTodoView::itemDoubleClicked(QListViewItem *item) 975void KOTodoView::itemDoubleClicked(QListViewItem *item)
976{ 976{
977 if ( pendingSubtodo != 0 ) { 977 if ( pendingSubtodo != 0 ) {
978 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 978 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
979 } 979 }
980 pendingSubtodo = 0; 980 pendingSubtodo = 0;
981 if (!item) { 981 if (!item) {
982 newTodo(); 982 newTodo();
983 return; 983 return;
984 } 984 }
985 if ( KOPrefs::instance()->mEditOnDoubleClick ) 985 if ( KOPrefs::instance()->mEditOnDoubleClick )
986 editItem( item ); 986 editItem( item );
987 else 987 else
988 showItem( item , QPoint(), 0 ); 988 showItem( item , QPoint(), 0 );
989} 989}
990void KOTodoView::itemClicked(QListViewItem *item) 990void KOTodoView::itemClicked(QListViewItem *item)
991{ 991{
992 992
993 if (!item) { 993 if (!item) {
994 if ( pendingSubtodo != 0 ) { 994 if ( pendingSubtodo != 0 ) {
995 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 995 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
996 } 996 }
997 pendingSubtodo = 0; 997 pendingSubtodo = 0;
998 return; 998 return;
999 } 999 }
1000 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1000 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1001 if ( pendingSubtodo != 0 ) { 1001 if ( pendingSubtodo != 0 ) {
1002 bool allowReparent = true; 1002 bool allowReparent = true;
1003 QListViewItem *par = item; 1003 QListViewItem *par = item;
1004 while ( par ) { 1004 while ( par ) {
1005 if ( par == pendingSubtodo ) { 1005 if ( par == pendingSubtodo ) {
1006 allowReparent = false; 1006 allowReparent = false;
1007 break; 1007 break;
1008 } 1008 }
1009 par = par->parent(); 1009 par = par->parent();
1010 } 1010 }
1011 if ( !allowReparent ) { 1011 if ( !allowReparent ) {
1012 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); 1012 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
1013 qDebug("Recursive reparenting not possible "); 1013 qDebug("Recursive reparenting not possible ");
1014 pendingSubtodo = 0; 1014 pendingSubtodo = 0;
1015 } else { 1015 } else {
1016 Todo* newParent = todoItem->todo(); 1016 Todo* newParent = todoItem->todo();
1017 Todo* newSub = pendingSubtodo->todo(); 1017 Todo* newSub = pendingSubtodo->todo();
1018 pendingSubtodo = 0; 1018 pendingSubtodo = 0;
1019 emit reparentTodoSignal( newParent,newSub ); 1019 emit reparentTodoSignal( newParent,newSub );
1020 return; 1020 return;
1021 } 1021 }
1022 } 1022 }
1023#if 0 1023#if 0
1024 // handled by the item itself 1024 // handled by the item itself
1025 bool completed = todoItem->todo()->isCompleted(); // Completed or not? 1025 bool completed = todoItem->todo()->isCompleted(); // Completed or not?
1026 qDebug("com %d ",completed ); 1026 qDebug("com %d ",completed );
1027 qDebug("itemclicked "); 1027 qDebug("itemclicked ");
1028 if (todoItem->isOn()) { 1028 if (todoItem->isOn()) {
1029 qDebug("on "); 1029 qDebug("on ");
1030 if (!completed) { 1030 if (!completed) {
1031 qDebug("set true "); 1031 qDebug("set true ");
1032 todoItem->todo()->setCompleted(QDateTime::currentDateTime()); 1032 todoItem->todo()->setCompleted(QDateTime::currentDateTime());
1033 } 1033 }
1034 } else { 1034 } else {
1035 qDebug("not on "); 1035 qDebug("not on ");
1036 if (completed) { 1036 if (completed) {
1037 qDebug("set false "); 1037 qDebug("set false ");
1038 todoItem->todo()->setCompleted(false); 1038 todoItem->todo()->setCompleted(false);
1039 } 1039 }
1040 } 1040 }
1041#endif 1041#endif
1042} 1042}
1043 1043
1044void KOTodoView::setDocumentId( const QString &id ) 1044void KOTodoView::setDocumentId( const QString &id )
1045{ 1045{
1046 kdDebug() << "KOTodoView::setDocumentId()" << endl; 1046 kdDebug() << "KOTodoView::setDocumentId()" << endl;
1047 1047
1048 mDocPrefs->setDoc( id ); 1048 mDocPrefs->setDoc( id );
1049} 1049}
1050 1050
1051void KOTodoView::itemStateChanged( QListViewItem *item ) 1051void KOTodoView::itemStateChanged( QListViewItem *item )
1052{ 1052{
1053 if (!item) return; 1053 if (!item) return;
1054 1054
1055 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1055 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1056 1056
1057// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; 1057// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl;
1058 1058
1059 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); 1059 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() );
1060} 1060}
1061 1061
1062void KOTodoView::saveLayout(KConfig *config, const QString &group) const 1062void KOTodoView::saveLayout(KConfig *config, const QString &group) const
1063{ 1063{
1064 mTodoListView->saveLayout(config,group); 1064 mTodoListView->saveLayout(config,group);
1065} 1065}
1066 1066
1067void KOTodoView::restoreLayout(KConfig *config, const QString &group) 1067void KOTodoView::restoreLayout(KConfig *config, const QString &group)
1068{ 1068{
1069 mTodoListView->restoreLayout(config,group); 1069 mTodoListView->restoreLayout(config,group);
1070} 1070}
1071 1071
1072void KOTodoView::processSelectionChange() 1072void KOTodoView::processSelectionChange()
1073{ 1073{
1074// kdDebug() << "KOTodoView::processSelectionChange()" << endl; 1074// kdDebug() << "KOTodoView::processSelectionChange()" << endl;
1075 1075
1076 KOTodoViewItem *item = 1076 KOTodoViewItem *item =
1077 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); 1077 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() );
1078 1078
1079 if ( !item ) { 1079 if ( !item ) {
1080 emit incidenceSelected( 0 ); 1080 emit incidenceSelected( 0 );
1081 } else { 1081 } else {
1082 emit incidenceSelected( item->todo() ); 1082 emit incidenceSelected( item->todo() );
1083 } 1083 }
1084} 1084}
1085 1085
1086void KOTodoView::modified(bool b) 1086void KOTodoView::modified(bool b)
1087{ 1087{
1088 emit isModified(b); 1088 emit isModified(b);
1089} 1089}
1090void KOTodoView::setTodoModified( Todo* todo ) 1090void KOTodoView::setTodoModified( Todo* todo )
1091{ 1091{
1092 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); 1092 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED );
1093} 1093}
1094void KOTodoView::clearSelection() 1094void KOTodoView::clearSelection()
1095{ 1095{
1096 mTodoListView->selectAll( false ); 1096 mTodoListView->selectAll( false );
1097} 1097}
1098void KOTodoView::setAllOpen() 1098void KOTodoView::setAllOpen()
1099{ 1099{
1100 if ( isFlatDisplay ) { 1100 if ( isFlatDisplay ) {
1101 isFlatDisplay = false; 1101 isFlatDisplay = false;
1102 mPopupMenu->setItemChecked( 8,false ); 1102 mPopupMenu->setItemChecked( 8,false );
1103 updateView(); 1103 updateView();
1104 } 1104 }
1105 setOpen(mTodoListView->firstChild(), true); 1105 setOpen(mTodoListView->firstChild(), true);
1106} 1106}
1107void KOTodoView::setAllClose() 1107void KOTodoView::setAllClose()
1108{ 1108{
1109 if ( isFlatDisplay ) { 1109 if ( isFlatDisplay ) {
1110 isFlatDisplay = false; 1110 isFlatDisplay = false;
1111 mPopupMenu->setItemChecked( 8,false ); 1111 mPopupMenu->setItemChecked( 8,false );
1112 updateView(); 1112 updateView();
1113 } 1113 }
1114 setOpen(mTodoListView->firstChild(), false); 1114 setOpen(mTodoListView->firstChild(), false);
1115} 1115}
1116void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1116void KOTodoView::setOpen( QListViewItem* item, bool setOpenI)
1117{ 1117{
1118 1118
1119 while ( item ) { 1119 while ( item ) {
1120 setOpen( item->firstChild(), setOpenI ); 1120 setOpen( item->firstChild(), setOpenI );
1121 item->setOpen( setOpenI ); 1121 item->setOpen( setOpenI );
1122 item = item->nextSibling(); 1122 item = item->nextSibling();
1123 } 1123 }
1124} 1124}
1125 1125
1126void KOTodoView::setAllFlat() 1126void KOTodoView::displayAllFlat()
1127{ 1127{
1128 if ( isFlatDisplay ) {
1129 isFlatDisplay = false;
1130 mPopupMenu->setItemChecked( 8,false );
1131 updateView();
1132 return;
1133 }
1134 pendingSubtodo = 0; 1128 pendingSubtodo = 0;
1135 if ( mBlockUpdate ) { 1129 if ( mBlockUpdate ) {
1136 return; 1130 return;
1137 } 1131 }
1138 mPopupMenu->setItemChecked( 8,true ); 1132 mPopupMenu->setItemChecked( 8,true );
1139 isFlatDisplay = true; 1133 isFlatDisplay = true;
1140 QPtrList<Todo> todoList = calendar()->todos(); 1134 QPtrList<Todo> todoList = calendar()->todos();
1141 mTodoMap.clear(); 1135 mTodoMap.clear();
1142 mTodoListView->clear(); 1136 mTodoListView->clear();
1143 Todo *todo; 1137 Todo *todo;
1144 for(todo = todoList.first(); todo; todo = todoList.next()) { 1138 for(todo = todoList.first(); todo; todo = todoList.next()) {
1145 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 1139 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
1146 mTodoMap.insert(todo,todoItem); 1140 mTodoMap.insert(todo,todoItem);
1147 } 1141 }
1148 mTodoListView->setFocus(); 1142 mTodoListView->setFocus();
1149 processSelectionChange(); 1143 processSelectionChange();
1150} 1144}
1151 1145
1146void KOTodoView::setAllFlat()
1147{
1148 if ( isFlatDisplay ) {
1149 isFlatDisplay = false;
1150 mPopupMenu->setItemChecked( 8,false );
1151 updateView();
1152 return;
1153 }
1154 displayAllFlat();
1155}
1156
1152void KOTodoView::purgeCompleted() 1157void KOTodoView::purgeCompleted()
1153{ 1158{
1154 emit purgeCompletedSignal(); 1159 emit purgeCompletedSignal();
1155} 1160}
1156void KOTodoView::toggleQuickTodo() 1161void KOTodoView::toggleQuickTodo()
1157{ 1162{
1158 if ( mQuickAdd->isVisible() ) { 1163 if ( mQuickAdd->isVisible() ) {
1159 mQuickAdd->hide(); 1164 mQuickAdd->hide();
1160 KOPrefs::instance()->mEnableQuickTodo = false; 1165 KOPrefs::instance()->mEnableQuickTodo = false;
1161 } 1166 }
1162 else { 1167 else {
1163 mQuickAdd->show(); 1168 mQuickAdd->show();
1164 KOPrefs::instance()->mEnableQuickTodo = true; 1169 KOPrefs::instance()->mEnableQuickTodo = true;
1165 } 1170 }
1166 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); 1171 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo);
1167 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); 1172 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo );
1168} 1173}
1169 1174
1170void KOTodoView::toggleRunning() 1175void KOTodoView::toggleRunning()
1171{ 1176{
1172 KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; 1177 KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos;
1173 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); 1178 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos);
1174 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); 1179 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos );
1175 updateView(); 1180 updateView();
1176} 1181}
1177 1182
1178void KOTodoView::toggleCompleted() 1183void KOTodoView::toggleCompleted()
1179{ 1184{
1180 KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; 1185 KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo;
1181 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); 1186 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo );
1182 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); 1187 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo );
1183 updateView(); 1188 updateView();
1184} 1189}
1185 1190
1186void KOTodoView::addQuickTodo() 1191void KOTodoView::addQuickTodo()
1187{ 1192{
1188 Todo *todo = new Todo(); 1193 Todo *todo = new Todo();
1189 todo->setSummary(mQuickAdd->text()); 1194 todo->setSummary(mQuickAdd->text());
1190 todo->setOrganizer(KOPrefs::instance()->email()); 1195 todo->setOrganizer(KOPrefs::instance()->email());
1191 CalFilter * cf = mCalendar->filter(); 1196 CalFilter * cf = mCalendar->filter();
1192 if ( cf ) { 1197 if ( cf ) {
1193 if ( cf->isEnabled()&& cf->showCategories()) { 1198 if ( cf->isEnabled()&& cf->showCategories()) {
1194 todo->setCategories(cf->categoryList()); 1199 todo->setCategories(cf->categoryList());
1195 } 1200 }
1196 if ( cf->isEnabled() ) 1201 if ( cf->isEnabled() )
1197 todo->setSecrecy( cf->getSecrecy()); 1202 todo->setSecrecy( cf->getSecrecy());
1198 } 1203 }
1199 mCalendar->addTodo(todo); 1204 mCalendar->addTodo(todo);
1200 mQuickAdd->setText(""); 1205 mQuickAdd->setText("");
1201 todoModified (todo, KOGlobals::EVENTADDED ); 1206 todoModified (todo, KOGlobals::EVENTADDED );
1202 updateView(); 1207 updateView();
1203} 1208}
1204void KOTodoView::keyPressEvent ( QKeyEvent * e ) 1209void KOTodoView::keyPressEvent ( QKeyEvent * e )
1205{ 1210{
1206 // e->ignore(); 1211 // e->ignore();
1207 //return; 1212 //return;
1208 //qDebug("KOTodoView::keyPressEvent "); 1213 //qDebug("KOTodoView::keyPressEvent ");
1209 switch ( e->key() ) { 1214 switch ( e->key() ) {
1210 case Qt::Key_Down: 1215 case Qt::Key_Down:
1211 case Qt::Key_Up: 1216 case Qt::Key_Up:
1212 QWidget::keyPressEvent ( e ); 1217 QWidget::keyPressEvent ( e );
1213 break; 1218 break;
1214 1219
1215 case Qt::Key_Q: 1220 case Qt::Key_Q:
1216 toggleQuickTodo(); 1221 toggleQuickTodo();
1217 break; 1222 break;
1218 case Qt::Key_U: 1223 case Qt::Key_U:
1219 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { 1224 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) {
1220 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1225 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1221 unparentTodo(); 1226 unparentTodo();
1222 e->accept(); 1227 e->accept();
1223 } else 1228 } else
1224 e->ignore(); 1229 e->ignore();
1225 break; 1230 break;
1226 case Qt::Key_S: 1231 case Qt::Key_S:
1227 if ( e->state() == Qt::ControlButton ) { 1232 if ( e->state() == Qt::ControlButton ) {
1228 e->ignore(); 1233 e->ignore();
1229 break; 1234 break;
1230 } 1235 }
1231 if ( e->state() == Qt::ShiftButton ) { 1236 if ( e->state() == Qt::ShiftButton ) {
1232 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1237 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1233 reparentTodo(); 1238 reparentTodo();
1234 e->accept(); 1239 e->accept();
1235 } else 1240 } else
1236 e->ignore(); 1241 e->ignore();
1237 break; 1242 break;
1238 case Qt::Key_P: 1243 case Qt::Key_P:
1239 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { 1244 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) {
1240 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1245 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1241 if ( pendingSubtodo ) 1246 if ( pendingSubtodo )
1242 itemClicked(mActiveItem); 1247 itemClicked(mActiveItem);
1243 e->accept(); 1248 e->accept();
1244 } else 1249 } else
1245 e->ignore(); 1250 e->ignore();
1246 break; 1251 break;
1247 case Qt::Key_Escape: 1252 case Qt::Key_Escape:
1248 if ( pendingSubtodo ) { 1253 if ( pendingSubtodo ) {
1249 itemClicked(0); 1254 itemClicked(0);
1250 e->accept(); 1255 e->accept();
1251 } else 1256 } else
1252 e->ignore(); 1257 e->ignore();
1253 break; 1258 break;
1254 default: 1259 default:
1255 e->ignore(); 1260 e->ignore();
1256 } 1261 }
1257 1262
1258 if ( true ) { 1263 if ( true ) {
1259 if ( e->key() == Qt::Key_I ) { 1264 if ( e->key() == Qt::Key_I ) {
1260 KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); 1265 KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem();
1261 if ( cn ) { 1266 if ( cn ) {
1262 mActiveItem = cn; 1267 mActiveItem = cn;
1263 KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); 1268 KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
1264 if ( ci ){ 1269 if ( ci ){
1265 showTodo(); 1270 showTodo();
1266 cn = (KOTodoViewItem*)cn->itemBelow(); 1271 cn = (KOTodoViewItem*)cn->itemBelow();
1267 if ( cn ) { 1272 if ( cn ) {
1268 mTodoListView->setCurrentItem ( cn ); 1273 mTodoListView->setCurrentItem ( cn );
1269 mTodoListView->ensureItemVisible ( cn ); 1274 mTodoListView->ensureItemVisible ( cn );
1270 } 1275 }
1271 1276
1272 } 1277 }
1273 } 1278 }
1274 e->accept(); 1279 e->accept();
1275 1280
1276 } 1281 }
1277 1282
1278 } 1283 }
1279 1284
1280} 1285}
1281void KOTodoView::updateTodo( Todo * t, int type ) 1286void KOTodoView::updateTodo( Todo * t, int type )
1282{ 1287{
1283 if ( mBlockUpdate) 1288 if ( mBlockUpdate)
1284 return; 1289 return;
1285 1290
1286 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 1291 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
1287 itemIterator = mTodoMap.find(t); 1292 itemIterator = mTodoMap.find(t);
1288 if (itemIterator != mTodoMap.end()) { 1293 if (itemIterator != mTodoMap.end()) {
1289 (*itemIterator)->construct(); 1294 (*itemIterator)->construct();
1290 } else { 1295 } else {
1291 if ( type == KOGlobals::EVENTADDED ) { 1296 if ( type == KOGlobals::EVENTADDED ) {
1292 insertTodoItem( t ); 1297 insertTodoItem( t );
1293 } 1298 }
1294 } 1299 }
1295 1300
1296} 1301}
1297 1302
1298void KOTodoView::todoModified(Todo * t , int p ) 1303void KOTodoView::todoModified(Todo * t , int p )
1299{ 1304{
1300 mBlockUpdate = true; 1305 mBlockUpdate = true;
1301 emit todoModifiedSignal ( t, p ); 1306 emit todoModifiedSignal ( t, p );
1302 mBlockUpdate = false; 1307 mBlockUpdate = false;
1303} 1308}
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 1642132..462f0a6 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -1,254 +1,255 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 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#ifndef KOTODOVIEW_H 23#ifndef KOTODOVIEW_H
24#define KOTODOVIEW_H 24#define KOTODOVIEW_H
25 25
26#include <qfont.h> 26#include <qfont.h>
27#include <qfontmetrics.h> 27#include <qfontmetrics.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qptrlist.h> 29#include <qptrlist.h>
30#include <qstrlist.h> 30#include <qstrlist.h>
31#include <qlistbox.h> 31#include <qlistbox.h>
32#include <qpopupmenu.h> 32#include <qpopupmenu.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qmap.h> 34#include <qmap.h>
35#include <qlistview.h> 35#include <qlistview.h>
36#include <klistview.h> 36#include <klistview.h>
37 37
38#include <libkcal/calendar.h> 38#include <libkcal/calendar.h>
39#include <libkcal/todo.h> 39#include <libkcal/todo.h>
40 40
41#include <korganizer/baseview.h> 41#include <korganizer/baseview.h>
42 42
43#include "kotodoviewitem.h" 43#include "kotodoviewitem.h"
44#include "koprefs.h" 44#include "koprefs.h"
45#include "koglobals.h" 45#include "koglobals.h"
46#include "datenavigator.h" 46#include "datenavigator.h"
47 47
48class QDragEnterEvent; 48class QDragEnterEvent;
49class QDragMoveEvent; 49class QDragMoveEvent;
50class QDragLeaveEvent; 50class QDragLeaveEvent;
51class QDropEvent; 51class QDropEvent;
52 52
53class DocPrefs; 53class DocPrefs;
54 54
55class KOTodoListView : public KListView 55class KOTodoListView : public KListView
56{ 56{
57 Q_OBJECT 57 Q_OBJECT
58 public: 58 public:
59 KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); 59 KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0);
60 virtual ~KOTodoListView() {} 60 virtual ~KOTodoListView() {}
61 61
62 signals: 62 signals:
63 void paintNeeded(); 63 void paintNeeded();
64 void todoDropped(Todo *, int); 64 void todoDropped(Todo *, int);
65 void double_Clicked(QListViewItem *item); 65 void double_Clicked(QListViewItem *item);
66 void reparentTodoSignal( Todo *,Todo * ); 66 void reparentTodoSignal( Todo *,Todo * );
67 void unparentTodoSignal(Todo *); 67 void unparentTodoSignal(Todo *);
68 void deleteTodo( Todo * ); 68 void deleteTodo( Todo * );
69 protected: 69 protected:
70 void contentsDragEnterEvent(QDragEnterEvent *); 70 void contentsDragEnterEvent(QDragEnterEvent *);
71 void contentsDragMoveEvent(QDragMoveEvent *); 71 void contentsDragMoveEvent(QDragMoveEvent *);
72 void contentsDragLeaveEvent(QDragLeaveEvent *); 72 void contentsDragLeaveEvent(QDragLeaveEvent *);
73 void contentsDropEvent(QDropEvent *); 73 void contentsDropEvent(QDropEvent *);
74 74
75 void contentsMousePressEvent(QMouseEvent *); 75 void contentsMousePressEvent(QMouseEvent *);
76 void contentsMouseMoveEvent(QMouseEvent *); 76 void contentsMouseMoveEvent(QMouseEvent *);
77 void contentsMouseReleaseEvent(QMouseEvent *); 77 void contentsMouseReleaseEvent(QMouseEvent *);
78 void contentsMouseDoubleClickEvent(QMouseEvent *); 78 void contentsMouseDoubleClickEvent(QMouseEvent *);
79 79
80 private: 80 private:
81 void paintEvent(QPaintEvent * pevent); 81 void paintEvent(QPaintEvent * pevent);
82 bool internalDrop; 82 bool internalDrop;
83 QString mName; 83 QString mName;
84 Calendar *mCalendar; 84 Calendar *mCalendar;
85 QPoint mPressPos; 85 QPoint mPressPos;
86 bool mMousePressed; 86 bool mMousePressed;
87 QListViewItem *mOldCurrent; 87 QListViewItem *mOldCurrent;
88 void keyPressEvent ( QKeyEvent * ) ; 88 void keyPressEvent ( QKeyEvent * ) ;
89}; 89};
90 90
91 91
92/** 92/**
93 This is the line-edit on top of the todoview for fast addition of new todos 93 This is the line-edit on top of the todoview for fast addition of new todos
94*/ 94*/
95class KOQuickTodo : public QLineEdit 95class KOQuickTodo : public QLineEdit
96{ 96{
97 public: 97 public:
98 KOQuickTodo(QWidget *parent=0); 98 KOQuickTodo(QWidget *parent=0);
99 protected: 99 protected:
100 void focusInEvent(QFocusEvent *ev); 100 void focusInEvent(QFocusEvent *ev);
101 void focusOutEvent(QFocusEvent *ev); 101 void focusOutEvent(QFocusEvent *ev);
102}; 102};
103 103
104 104
105/** 105/**
106 This class provides a multi-column list view of todo events. 106 This class provides a multi-column list view of todo events.
107 107
108 @short multi-column list view of todo events. 108 @short multi-column list view of todo events.
109 @author Cornelius Schumacher <schumacher@kde.org> 109 @author Cornelius Schumacher <schumacher@kde.org>
110*/ 110*/
111class KOTodoView : public KOrg::BaseView 111class KOTodoView : public KOrg::BaseView
112{ 112{
113 Q_OBJECT 113 Q_OBJECT
114 public: 114 public:
115 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); 115 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 );
116 ~KOTodoView(); 116 ~KOTodoView();
117 117
118 QPtrList<Incidence> selectedIncidences(); 118 QPtrList<Incidence> selectedIncidences();
119 QPtrList<Todo> selectedTodos(); 119 QPtrList<Todo> selectedTodos();
120 120
121 DateList selectedDates() 121 DateList selectedDates()
122 {DateList q; 122 {DateList q;
123 return q;} 123 return q;}
124 124
125 /** Return number of shown dates. TodoView does not show dates, */ 125 /** Return number of shown dates. TodoView does not show dates, */
126 int currentDateCount() { return 0; } 126 int currentDateCount() { return 0; }
127 127
128 void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); 128 void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td);
129 129
130 void setDocumentId( const QString & ); 130 void setDocumentId( const QString & );
131 131
132 void saveLayout(KConfig *config, const QString &group) const; 132 void saveLayout(KConfig *config, const QString &group) const;
133 void restoreLayout(KConfig *config, const QString &group); 133 void restoreLayout(KConfig *config, const QString &group);
134 /** Create a popup menu to set categories */ 134 /** Create a popup menu to set categories */
135 QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); 135 QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem);
136 void setNavigator( DateNavigator* nav ) {mNavigator = nav;} 136 void setNavigator( DateNavigator* nav ) {mNavigator = nav;}
137 QString getWhatsThisText(QPoint p); 137 QString getWhatsThisText(QPoint p);
138 138
139 public slots: 139 public slots:
140 void updateView(); 140 void updateView();
141 void updateConfig(); 141 void updateConfig();
142 142
143 void changeEventDisplay(Event *, int); 143 void changeEventDisplay(Event *, int);
144 144
145 void showDates(const QDate &start, const QDate &end); 145 void showDates(const QDate &start, const QDate &end);
146 void showEvents(QPtrList<Event> eventList); 146 void showEvents(QPtrList<Event> eventList);
147 147
148 void clearSelection(); 148 void clearSelection();
149 void jumpToDate (); 149 void jumpToDate ();
150 150
151 void editItem(QListViewItem *item); 151 void editItem(QListViewItem *item);
152 void showItem(QListViewItem *item,const QPoint &,int); 152 void showItem(QListViewItem *item,const QPoint &,int);
153 void popupMenu(QListViewItem *item,const QPoint &,int); 153 void popupMenu(QListViewItem *item,const QPoint &,int);
154 void newTodo(); 154 void newTodo();
155 void newSubTodo(); 155 void newSubTodo();
156 void unparentTodo(); 156 void unparentTodo();
157 void reparentTodo(); 157 void reparentTodo();
158 void showTodo(); 158 void showTodo();
159 void editTodo(); 159 void editTodo();
160 void cloneTodo(); 160 void cloneTodo();
161 void cancelTodo(); 161 void cancelTodo();
162 void moveTodo(); 162 void moveTodo();
163 void beamTodo(); 163 void beamTodo();
164 void deleteTodo(); 164 void deleteTodo();
165 165
166 void setNewPriority(int); 166 void setNewPriority(int);
167 void setNewPercentage(int); 167 void setNewPercentage(int);
168 void changedCategories(int); 168 void changedCategories(int);
169 169
170 void setAllOpen(); 170 void setAllOpen();
171 void setAllClose(); 171 void setAllClose();
172 void setAllFlat(); 172 void setAllFlat();
173 void displayAllFlat();
173 174
174 void purgeCompleted(); 175 void purgeCompleted();
175 void toggleCompleted(); 176 void toggleCompleted();
176 void toggleRunning(); 177 void toggleRunning();
177 void toggleQuickTodo(); 178 void toggleQuickTodo();
178 void updateTodo( Todo *, int ); 179 void updateTodo( Todo *, int );
179 180
180 void itemClicked(QListViewItem *); 181 void itemClicked(QListViewItem *);
181 void itemStateChanged(QListViewItem *); 182 void itemStateChanged(QListViewItem *);
182 void modified(bool); 183 void modified(bool);
183 void itemDoubleClicked(QListViewItem *item); 184 void itemDoubleClicked(QListViewItem *item);
184 185
185 signals: 186 signals:
186 void newTodoSignal(); 187 void newTodoSignal();
187 void newSubTodoSignal(Todo *); 188 void newSubTodoSignal(Todo *);
188 void unparentTodoSignal(Todo *); 189 void unparentTodoSignal(Todo *);
189 void reparentTodoSignal( Todo *,Todo * ); 190 void reparentTodoSignal( Todo *,Todo * );
190 void showTodoSignal(Todo *); 191 void showTodoSignal(Todo *);
191 192
192 void editTodoSignal(Todo *); 193 void editTodoSignal(Todo *);
193 void deleteTodoSignal(Todo *); 194 void deleteTodoSignal(Todo *);
194 void todoModifiedSignal (Todo *, int); 195 void todoModifiedSignal (Todo *, int);
195 196
196 void isModified(bool); 197 void isModified(bool);
197 void cloneTodoSignal( Incidence * ); 198 void cloneTodoSignal( Incidence * );
198 void cancelTodoSignal( Incidence * ); 199 void cancelTodoSignal( Incidence * );
199 void moveTodoSignal( Incidence * ); 200 void moveTodoSignal( Incidence * );
200 void beamTodoSignal( Incidence * ); 201 void beamTodoSignal( Incidence * );
201 void purgeCompletedSignal(); 202 void purgeCompletedSignal();
202 203
203 protected slots: 204 protected slots:
204 void paintNeeded(); 205 void paintNeeded();
205 void processSelectionChange(); 206 void processSelectionChange();
206 void addQuickTodo(); 207 void addQuickTodo();
207 void setTodoModified( Todo* ); 208 void setTodoModified( Todo* );
208 void todoModified(Todo *, int ); 209 void todoModified(Todo *, int );
209 210
210 private: 211 private:
211 /* 212 /*
212 * the TodoEditor approach is rather unscaling in the long 213 * the TodoEditor approach is rather unscaling in the long
213 * run. 214 * run.
214 * Korganizer keeps it in memory and we need to update 215 * Korganizer keeps it in memory and we need to update
215 * 1. make KOTodoViewItem a QObject again? 216 * 1. make KOTodoViewItem a QObject again?
216 * 2. add a public method for setting one todo modified? 217 * 2. add a public method for setting one todo modified?
217 * 3. add a private method for setting a todo modified + friend here? 218 * 3. add a private method for setting a todo modified + friend here?
218 * -- zecke 2002-07-08 219 * -- zecke 2002-07-08
219 */ 220 */
220 friend class KOTodoListView; 221 friend class KOTodoListView;
221 void paintEvent(QPaintEvent * pevent); 222 void paintEvent(QPaintEvent * pevent);
222 bool mPendingUpdateBeforeRepaint; 223 bool mPendingUpdateBeforeRepaint;
223 friend class KOTodoViewItem; 224 friend class KOTodoViewItem;
224 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); 225 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
225 void restoreItemState( QListViewItem * ); 226 void restoreItemState( QListViewItem * );
226 227
227 bool checkTodo( Todo * ); 228 bool checkTodo( Todo * );
228 bool isFlatDisplay; 229 bool isFlatDisplay;
229 void setOpen( QListViewItem*, bool setOpen); 230 void setOpen( QListViewItem*, bool setOpen);
230 KOTodoListView *mTodoListView; 231 KOTodoListView *mTodoListView;
231 QPopupMenu *mItemPopupMenu; 232 QPopupMenu *mItemPopupMenu;
232 QPopupMenu *mPopupMenu; 233 QPopupMenu *mPopupMenu;
233 QPopupMenu *mPriorityPopupMenu; 234 QPopupMenu *mPriorityPopupMenu;
234 QPopupMenu *mPercentageCompletedPopupMenu; 235 QPopupMenu *mPercentageCompletedPopupMenu;
235 QPopupMenu *mCategoryPopupMenu; 236 QPopupMenu *mCategoryPopupMenu;
236 237
237 QMap<int, int> mPercentage; 238 QMap<int, int> mPercentage;
238 QMap<int, int> mPriority; 239 QMap<int, int> mPriority;
239 QMap<int, QString> mCategory; 240 QMap<int, QString> mCategory;
240 KOTodoViewItem *mActiveItem; 241 KOTodoViewItem *mActiveItem;
241 242
242 QMap<Todo *,KOTodoViewItem *> mTodoMap; 243 QMap<Todo *,KOTodoViewItem *> mTodoMap;
243 QString mName; 244 QString mName;
244 245
245 DocPrefs *mDocPrefs; 246 DocPrefs *mDocPrefs;
246 QString mCurrentDoc; 247 QString mCurrentDoc;
247 KOQuickTodo *mQuickAdd; 248 KOQuickTodo *mQuickAdd;
248 bool mBlockUpdate; 249 bool mBlockUpdate;
249 void keyPressEvent ( QKeyEvent * ) ; 250 void keyPressEvent ( QKeyEvent * ) ;
250 KOTodoViewItem * pendingSubtodo; 251 KOTodoViewItem * pendingSubtodo;
251 DateNavigator* mNavigator; 252 DateNavigator* mNavigator;
252}; 253};
253 254
254#endif 255#endif