-rw-r--r-- | bin/kdepim/WhatsNew.txt | 274 | ||||
-rw-r--r-- | changelog.txt | 136 | ||||
-rw-r--r-- | desktop/rpm/kdepim_rpm | 2 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 112 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 10 | ||||
-rw-r--r-- | libkcal/incidence.cpp | 4 | ||||
-rw-r--r-- | libkcal/incidence.h | 1 | ||||
-rw-r--r-- | version | 2 |
8 files changed, 229 insertions, 312 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 03895fd..ef0bd8b 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,279 +1,41 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.28 ************ | 3 | ********** VERSION 2.1.0 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | Stable release 2.1.0! |
6 | Fixed two problems in KO/Pi timetracking. | ||
7 | Added context menu to month view for creating new events/todos. | ||
8 | Fixed some other small bugs. | ||
9 | 6 | ||
7 | Summary of changes/fixes compared to version 2.0.6: | ||
10 | 8 | ||
11 | ********** VERSION 2.0.27 ************ | 9 | Many bugs of version 2.0.6 fixed. |
10 | Most of them were small bugs, but some of them were important. | ||
11 | It is recommended to use version 2.1.0 and not version 2.0.6. | ||
12 | 12 | ||
13 | More bugfixes. | 13 | Important changes: |
14 | Added possibility to clone in KO/Pi a todo with all its subtodos. | ||
15 | Added config option for alternate background in list views. | ||
16 | |||
17 | Added a timetracker funtionality in KO/Pi for todos in the todo view. | ||
18 | If a todo is set to started and then to stopped it is saving information about the runtime in | ||
19 | <yourhome>/kdepim/apps/timetrackerdir. | ||
20 | To read, display, print this information an external program is needed which will be developed. | ||
21 | It will display the data in a Gantt timetable view with one row for each todo. | ||
22 | It will have many possibilities sorting the data after category, parent todos, attendees, ... and for creating/printing status reports/summaries. | ||
23 | Merging of data from different computers/users will be quite easy because every run is stored in a single file. | ||
24 | |||
25 | ********** VERSION 2.0.26 ************ | ||
26 | |||
27 | Added two more fields to the KA/Pi view config: | ||
28 | A "Mobile (home)" and a "Mobile (work)" field. | ||
29 | Fixed utf8 import (e.g. for Japaneese text) in KA/Pi. | ||
30 | |||
31 | Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes. | ||
32 | And again fixed some more small bugs. | ||
33 | |||
34 | ********** VERSION 2.0.25 ************ | ||
35 | |||
36 | And again fixed some bugs. | ||
37 | |||
38 | ********** VERSION 2.0.24 ************ | ||
39 | |||
40 | Fixed again a lot of small bugs. | ||
41 | Some performance optimizations in date navigator. | ||
42 | Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row. | ||
43 | |||
44 | ********** VERSION 2.0.23 ************ | ||
45 | |||
46 | Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation. | ||
47 | Fixed the (agenda) layout of KO/Pi on 5500er. | ||
48 | Some usebility enhancements (e.g. reselection the current item of the todo view after some changes). | ||
49 | |||
50 | ********** VERSION 2.0.22 ************ | ||
51 | |||
52 | KO/Pi: | ||
53 | Fix for creating events/todos via the abgenda context menu. | ||
54 | Added option to split toolbar to 3 toolbars. | ||
55 | (Toolbar moving s disabled for this option due to a bug in Qt somewhere). | ||
56 | Added option to show one small filter-view-toolbar. | ||
57 | Added a print option to the desktop version: | ||
58 | Now you can print out the view of the "Event Viewer". | ||
59 | That means you can print all data of one particular event/todo. | ||
60 | Added scaling options to printout of Event Viewer and What'sNext View. | ||
61 | Fixed some problems in the month view in "week start sunday" mode. | ||
62 | KA/Pi: | ||
63 | Added two more config options. | ||
64 | Fixed resizing problem of address request dialog when orientation was switched. | ||
65 | Cleaned up the menu structure. | ||
66 | Fixed some more problems. | ||
67 | |||
68 | Fixed the annoying problem that scrolling continued after the key was released in KO/Pi Monthview and the KA/Pi views. | ||
69 | |||
70 | And, this is a really cool option (Ben did suggest it): | ||
71 | Now KO/Pi and KA/Pi can be run from a USB stick: | ||
72 | All data is read from and written to the stick. | ||
73 | You can enable this in the global configure option TAB with: | ||
74 | Save using LOCAL storage. | ||
75 | Just put KDE-Pim/Pi on a memory stick and you can access all your PIM data on every computer with Windows XP. It will work with the ME and Linux versions as well. I will put a memory stick version for teh next stable release online. | ||
76 | |||
77 | ********** VERSION 2.0.21 ************ | ||
78 | |||
79 | Fixed another SMTP problem in OM/Pi. | ||
80 | Some small changed in the new datenavigator in KO/Pi. | ||
81 | Changed default setting for new filter in KA/Pi to "exclude categories". | ||
82 | Changed the default font size for 640x480 display . | ||
83 | Changed popup menu behaviour in agenda and list view. | ||
84 | Fixed some layout problems of the date label size in the month view. | ||
85 | Made month view update faster. | ||
86 | Made first datenavigator repainting faster. | ||
87 | Changed the title of the event/todo edit dialogs. | ||
88 | Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). | ||
89 | Many small usebility fixes in KO/Pi. | ||
90 | Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. | ||
91 | The set of possible "next views" are the views you have toolbar buttons for. | ||
92 | |||
93 | Made alarm sound working on Linux. | ||
94 | |||
95 | KO/Pi alarm applet changed: | ||
96 | Made buttons in alarm dialog much bigger. | ||
97 | Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. | ||
98 | The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. | ||
99 | |||
100 | And because this version is realeased at Easter, I added an Easter-egg: | ||
101 | With a new undocumented command you can get a message box about the next alarm. | ||
102 | Good luck to find it! | ||
103 | |||
104 | |||
105 | |||
106 | ********** VERSION 2.0.20 ************ | ||
107 | |||
108 | Two small fixes in OM/Pi. | ||
109 | |||
110 | Better resizing of the new datenavigator in KO/Pi. | ||
111 | |||
112 | ********** VERSION 2.0.19 ************ | ||
113 | KO/Pi: | ||
114 | Enhancements and bugfixes in the new datenavigator. | ||
115 | Bugfix in this changelog: | ||
116 | The datenavigator was changed in version 2.0.18, not the datepicker. | ||
117 | |||
118 | ********** VERSION 2.0.18 ************ | ||
119 | KO/Pi: | ||
120 | Fixed some minor problems. | ||
121 | Cleaned up the KO/Pi config dialog. | ||
122 | Fixed problem moving events in aganda view. | ||
123 | Made datepicker scaleable, i.e. if the datenavigator shows now a | ||
124 | datenavigator matrix depending on its size. | ||
125 | Birthdays are now displayed green in the datenavigator. | ||
126 | What'sThis Help in datenavigator shows all events of the day. | ||
127 | |||
128 | OM/Pi: | ||
129 | Updated the backend mail library to the latest version. | ||
130 | Please backup your mail before using this version. | ||
131 | |||
132 | ********** VERSION 2.0.17 ************ | ||
133 | |||
134 | KO/Pi: | ||
135 | Tooltips in month view were not sorted. Fixed. | ||
136 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. | ||
137 | Conflict display dialog for syncing was not on top of other windows. Fixed. | ||
138 | Fixed some minor problems. | ||
139 | |||
140 | Fixed an endless loop when importing vcs file with RESOURCES entry. | ||
141 | |||
142 | ********** VERSION 2.0.16 ************ | ||
143 | OM/Pi: | ||
144 | Fixed the SMTP account setting the option. | ||
145 | Fixed something in mail sending. | ||
146 | |||
147 | KO/Pi: | ||
148 | Added possibility to export selected events/todos as vcal file. | ||
149 | |||
150 | ********** VERSION 2.0.15 ************ | ||
151 | |||
152 | PwM/Pi: | ||
153 | Added keyboard shorcuts for | ||
154 | - toggling summary view (space bar) | ||
155 | - delete item (delete + backspace key) | ||
156 | - add new item ( i + n key) | ||
157 | Fixed length of info in the title. | ||
158 | |||
159 | KO/Pi-KA/Pi: | ||
160 | Changed "ME" menu bar entry to an icon. | ||
161 | |||
162 | KO/Pi: | ||
163 | Fixed two minor bugs in displaying todos. | ||
164 | If in month view a cell is selected, the key shortcut "d" shows now that date. | ||
165 | Added complete info for a todo in month view as an icon left of the text. | ||
166 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. | ||
167 | Fixed problem of search dialog size when switching displays. | ||
168 | Cancel key now closes date picker. | ||
169 | Rearranged KO/Pi file menu structure. | ||
170 | |||
171 | OM/Pi: | ||
172 | Added to the SMTP account setting the option | ||
173 | "No secure connection". | ||
174 | You have to configure your SMTP accounts again, sorry. | ||
175 | |||
176 | KA/Pi: | ||
177 | Added support for importing quoted-printable. | ||
178 | Support was added by Peter P.. Thanks, Peter! | ||
179 | |||
180 | |||
181 | ********** VERSION 2.0.14 ************ | ||
182 | |||
183 | Made Passwordmanager PwM/Pi more userfriendly: | ||
184 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | ||
185 | Fixed bug in KO/Pi todo printing. | ||
186 | Made Qtopia calendar import possible on desktop . | ||
187 | |||
188 | ********** VERSION 2.0.13 ************ | ||
189 | |||
190 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. | ||
191 | |||
192 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". | ||
193 | |||
194 | OM/Pi: | ||
195 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. | ||
196 | Added missing German translation. | ||
197 | Added warning if path is specified in local folder settings of account config. | ||
198 | |||
199 | ********** VERSION 2.0.12 ************ | ||
200 | |||
201 | KO/Pi: | ||
202 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | ||
203 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. | ||
204 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. | ||
205 | |||
206 | Fixed problem in pi-sync mode when wrong password was sent. | ||
207 | |||
208 | OM/Pi: | ||
209 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. | ||
210 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. | ||
211 | |||
212 | ********** VERSION 2.0.11 ************ | ||
213 | |||
214 | Fixed some problems in pi-sync mode | ||
215 | (e.g. details of events were not synced properly) | ||
216 | |||
217 | ********** VERSION 2.0.10 ************ | ||
218 | |||
219 | KO/Pi: | ||
220 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. | ||
221 | This is fixed. | ||
222 | Changed the search dialog a bit to make it more user friendly. | ||
223 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). | ||
224 | |||
225 | Added config option to hide the week number in KO/Pi toolbar. | ||
226 | |||
227 | ********** VERSION 2.0.9 ************ | ||
228 | |||
229 | Made month view icons for multiday events a bit nicer. | ||
230 | Some minor fixes in KO/Pi | ||
231 | (e.g. go to today did not work for new week view properly). | ||
232 | |||
233 | |||
234 | ********** VERSION 2.0.8 ************ | ||
235 | |||
236 | Fixed a problem in dependency info in the ipk files for the Zaurus. | ||
237 | |||
238 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. | ||
239 | |||
240 | Added a "go today" button to the datepicker. | ||
241 | |||
242 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) | ||
243 | and made it configureable to show these values. | ||
244 | |||
245 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. | ||
246 | |||
247 | |||
248 | ********** VERSION 2.0.7 ************ | ||
249 | |||
250 | Added global application font settings | ||
251 | (for all KDE-Pim/Pi apps) to the general settings. | ||
252 | |||
253 | Fixed a problem in OM/Pi when trying to login to some IMAP servers | ||
254 | (like the IMAP server of Apple: mail.mac.com ) | ||
255 | 14 | ||
256 | Added recurring todos to KO/Pi. | 15 | Added recurring todos to KO/Pi. |
257 | 16 | ||
17 | Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. | ||
18 | |||
19 | Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | ||
258 | 20 | ||
259 | ********** VERSION 2.0.6 ************ | 21 | Datenavigator can now display many months. Very useful on the desktop. |
260 | 22 | ||
261 | Stable release 2.0.6! | 23 | KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. |
262 | 24 | ||
263 | Some bugfixes in the pi-sync mode. | 25 | Made alarm sound working on Linux desktop. |
264 | Added German translation for pi-sync mode. | ||
265 | 26 | ||
266 | KO/Pi: | 27 | Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. |
267 | Made the todolist using alternate background. | ||
268 | 28 | ||
269 | Other minor fixes in KO/Pi. | 29 | Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. |
270 | 30 | ||
31 | Many other usebility enhancements. | ||
32 | Special thanks to Ben for his suggestions! | ||
271 | 33 | ||
272 | You can find the complete changelog | 34 | You can find the complete changelog |
273 | from version 1.7.7 to 2.0.5 | 35 | from version 1.7.7 to 2.1.0 |
274 | in the source package or on | 36 | in the source package or on |
275 | 37 | ||
276 | http://www.pi-sync.net/html/changelog.html | 38 | http://www.pi-sync.net/html/changelog.html |
277 | 39 | ||
278 | 40 | ||
279 | 41 | ||
diff --git a/changelog.txt b/changelog.txt index 99be167..45e0322 100644 --- a/changelog.txt +++ b/changelog.txt | |||
@@ -1,1105 +1,1241 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.1.0 ************ | ||
4 | |||
5 | Stable release 2.1.0! | ||
6 | |||
7 | Summary of changes/fixes compared to version 2.0.6: | ||
8 | |||
9 | Many bugs of version 2.0.6 fixed. | ||
10 | Most of them were small bugs, but some of them were important. | ||
11 | It is recommended to use version 2.1.0 and not version 2.0.6. | ||
12 | |||
13 | Important changes: | ||
14 | |||
15 | Added recurring todos to KO/Pi. | ||
16 | |||
17 | Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. | ||
18 | |||
19 | Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | ||
20 | |||
21 | Datenavigator can now display many months. Very useful on the desktop. | ||
22 | |||
23 | KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. | ||
24 | |||
25 | Made alarm sound working on Linux desktop. | ||
26 | |||
27 | Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. | ||
28 | |||
29 | Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. | ||
30 | |||
31 | Many other usebility enhancements. | ||
32 | Special thanks to Ben for his suggestions! | ||
33 | |||
34 | You can find the complete changelog | ||
35 | from version 1.7.7 to 2.1.0 | ||
36 | in the source package or on | ||
37 | |||
38 | http://www.pi-sync.net/html/changelog.html | ||
39 | |||
40 | ********** VERSION 2.0.28 ************ | ||
41 | |||
42 | KO/Pi: | ||
43 | Fixed two problems in KO/Pi timetracking. | ||
44 | Added context menu to month view for creating new events/todos. | ||
45 | Fixed some other small bugs. | ||
46 | |||
47 | |||
48 | ********** VERSION 2.0.27 ************ | ||
49 | |||
50 | More bugfixes. | ||
51 | Added possibility to clone in KO/Pi a todo with all its subtodos. | ||
52 | Added config option for alternate background in list views. | ||
53 | |||
54 | Added a timetracker funtionality in KO/Pi for todos in the todo view. | ||
55 | If a todo is set to started and then to stopped it is saving information about the runtime in | ||
56 | <yourhome>/kdepim/apps/timetrackerdir. | ||
57 | To read, display, print this information an external program is needed which will be developed. | ||
58 | It will display the data in a Gantt timetable view with one row for each todo. | ||
59 | It will have many possibilities sorting the data after category, parent todos, attendees, ... and for creating/printing status reports/summaries. | ||
60 | Merging of data from different computers/users will be quite easy because every run is stored in a single file. | ||
61 | |||
62 | ********** VERSION 2.0.26 ************ | ||
63 | |||
64 | Added two more fields to the KA/Pi view config: | ||
65 | A "Mobile (home)" and a "Mobile (work)" field. | ||
66 | Fixed utf8 import (e.g. for Japaneese text) in KA/Pi. | ||
67 | |||
68 | Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes. | ||
69 | And again fixed some more small bugs. | ||
70 | |||
71 | ********** VERSION 2.0.25 ************ | ||
72 | |||
73 | And again fixed some bugs. | ||
74 | |||
75 | ********** VERSION 2.0.24 ************ | ||
76 | |||
77 | Fixed again a lot of small bugs. | ||
78 | Some performance optimizations in date navigator. | ||
79 | Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row. | ||
80 | |||
81 | ********** VERSION 2.0.23 ************ | ||
82 | |||
83 | Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation. | ||
84 | Fixed the (agenda) layout of KO/Pi on 5500er. | ||
85 | Some usebility enhancements (e.g. reselection the current item of the todo view after some changes). | ||
86 | |||
87 | ********** VERSION 2.0.22 ************ | ||
88 | |||
89 | KO/Pi: | ||
90 | Fix for creating events/todos via the abgenda context menu. | ||
91 | Added option to split toolbar to 3 toolbars. | ||
92 | (Toolbar moving s disabled for this option due to a bug in Qt somewhere). | ||
93 | Added option to show one small filter-view-toolbar. | ||
94 | Added a print option to the desktop version: | ||
95 | Now you can print out the view of the "Event Viewer". | ||
96 | That means you can print all data of one particular event/todo. | ||
97 | Added scaling options to printout of Event Viewer and What'sNext View. | ||
98 | Fixed some problems in the month view in "week start sunday" mode. | ||
99 | KA/Pi: | ||
100 | Added two more config options. | ||
101 | Fixed resizing problem of address request dialog when orientation was switched. | ||
102 | Cleaned up the menu structure. | ||
103 | Fixed some more problems. | ||
104 | |||
105 | Fixed the annoying problem that scrolling continued after the key was released in KO/Pi Monthview and the KA/Pi views. | ||
106 | |||
107 | And, this is a really cool option (Ben did suggest it): | ||
108 | Now KO/Pi and KA/Pi can be run from a USB stick: | ||
109 | All data is read from and written to the stick. | ||
110 | You can enable this in the global configure option TAB with: | ||
111 | Save using LOCAL storage. | ||
112 | Just put KDE-Pim/Pi on a memory stick and you can access all your PIM data on every computer with Windows XP. It will work with the ME and Linux versions as well. I will put a memory stick version for teh next stable release online. | ||
113 | |||
3 | ********** VERSION 2.0.21 ************ | 114 | ********** VERSION 2.0.21 ************ |
4 | 115 | ||
116 | Fixed another SMTP problem in OM/Pi. | ||
117 | Some small changed in the new datenavigator in KO/Pi. | ||
118 | Changed default setting for new filter in KA/Pi to "exclude categories". | ||
119 | Changed the default font size for 640x480 display . | ||
120 | Changed popup menu behaviour in agenda and list view. | ||
121 | Fixed some layout problems of the date label size in the month view. | ||
122 | Made month view update faster. | ||
123 | Made first datenavigator repainting faster. | ||
124 | Changed the title of the event/todo edit dialogs. | ||
125 | Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). | ||
126 | Many small usebility fixes in KO/Pi. | ||
127 | Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. | ||
128 | The set of possible "next views" are the views you have toolbar buttons for. | ||
129 | |||
130 | Made alarm sound working on Linux. | ||
131 | |||
132 | KO/Pi alarm applet changed: | ||
133 | Made buttons in alarm dialog much bigger. | ||
134 | Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. | ||
135 | The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. | ||
136 | |||
137 | And because this version is realeased at Easter, I added an Easter-egg: | ||
138 | With a new undocumented command you can get a message box about the next alarm. | ||
139 | Good luck to find it! | ||
140 | |||
5 | 141 | ||
6 | ********** VERSION 2.0.20 ************ | 142 | ********** VERSION 2.0.20 ************ |
7 | 143 | ||
8 | Two small fixes in OM/Pi. | 144 | Two small fixes in OM/Pi. |
9 | 145 | ||
10 | Better resizing of the new datenavigator in KO/Pi. | 146 | Better resizing of the new datenavigator in KO/Pi. |
11 | 147 | ||
12 | ********** VERSION 2.0.19 ************ | 148 | ********** VERSION 2.0.19 ************ |
13 | KO/Pi: | 149 | KO/Pi: |
14 | Enhancements and bugfixes in the new datenavigator. | 150 | Enhancements and bugfixes in the new datenavigator. |
15 | Bugfix in this changelog: | 151 | Bugfix in this changelog: |
16 | The datenavigator was changed in version 2.0.18, not the datepicker. | 152 | The datenavigator was changed in version 2.0.18, not the datepicker. |
17 | 153 | ||
18 | ********** VERSION 2.0.18 ************ | 154 | ********** VERSION 2.0.18 ************ |
19 | KO/Pi: | 155 | KO/Pi: |
20 | Fixed some minor problems. | 156 | Fixed some minor problems. |
21 | Cleaned up the KO/Pi config dialog. | 157 | Cleaned up the KO/Pi config dialog. |
22 | Fixed problem moving events in aganda view. | 158 | Fixed problem moving events in aganda view. |
23 | Made datepicker scaleable, i.e. if the datenavigator shows now a | 159 | Made datepicker scaleable, i.e. if the datenavigator shows now a |
24 | datenavigator matrix depending on its size. | 160 | datenavigator matrix depending on its size. |
25 | Birthdays are now displayed green in the datenavigator. | 161 | Birthdays are now displayed green in the datenavigator. |
26 | What'sThis Help in datenavigator shows all events of the day. | 162 | What'sThis Help in datenavigator shows all events of the day. |
27 | 163 | ||
28 | OM/Pi: | 164 | OM/Pi: |
29 | Updated the backend mail library to the latest version. | 165 | Updated the backend mail library to the latest version. |
30 | Please backup your mail before using this version. | 166 | Please backup your mail before using this version. |
31 | 167 | ||
32 | ********** VERSION 2.0.17 ************ | 168 | ********** VERSION 2.0.17 ************ |
33 | 169 | ||
34 | KO/Pi: | 170 | KO/Pi: |
35 | Tooltips in month view were not sorted. Fixed. | 171 | Tooltips in month view were not sorted. Fixed. |
36 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. | 172 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. |
37 | Conflict display dialog for syncing was not on top of other windows. Fixed. | 173 | Conflict display dialog for syncing was not on top of other windows. Fixed. |
38 | Fixed some minor problems. | 174 | Fixed some minor problems. |
39 | 175 | ||
40 | Fixed an endless loop when importing vcs file with RESOURCES entry. | 176 | Fixed an endless loop when importing vcs file with RESOURCES entry. |
41 | 177 | ||
42 | ********** VERSION 2.0.16 ************ | 178 | ********** VERSION 2.0.16 ************ |
43 | OM/Pi: | 179 | OM/Pi: |
44 | Fixed the SMTP account setting the option. | 180 | Fixed the SMTP account setting the option. |
45 | Fixed something in mail sending. | 181 | Fixed something in mail sending. |
46 | 182 | ||
47 | KO/Pi: | 183 | KO/Pi: |
48 | Added possibility to export selected events/todos as vcal file. | 184 | Added possibility to export selected events/todos as vcal file. |
49 | 185 | ||
50 | ********** VERSION 2.0.15 ************ | 186 | ********** VERSION 2.0.15 ************ |
51 | 187 | ||
52 | PwM/Pi: | 188 | PwM/Pi: |
53 | Added keyboard shorcuts for | 189 | Added keyboard shorcuts for |
54 | - toggling summary view (space bar) | 190 | - toggling summary view (space bar) |
55 | - delete item (delete + backspace key) | 191 | - delete item (delete + backspace key) |
56 | - add new item ( i + n key) | 192 | - add new item ( i + n key) |
57 | Fixed length of info in the title. | 193 | Fixed length of info in the title. |
58 | 194 | ||
59 | KO/Pi-KA/Pi: | 195 | KO/Pi-KA/Pi: |
60 | Changed "ME" menu bar entry to an icon. | 196 | Changed "ME" menu bar entry to an icon. |
61 | 197 | ||
62 | KO/Pi: | 198 | KO/Pi: |
63 | Fixed two minor bugs in displaying todos. | 199 | Fixed two minor bugs in displaying todos. |
64 | If in month view a cell is selected, the key shortcut "d" shows now that date. | 200 | If in month view a cell is selected, the key shortcut "d" shows now that date. |
65 | Added complete info for a todo in month view as an icon left of the text. | 201 | Added complete info for a todo in month view as an icon left of the text. |
66 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. | 202 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. |
67 | Fixed problem of search dialog size when switching displays. | 203 | Fixed problem of search dialog size when switching displays. |
68 | Cancel key now closes date picker. | 204 | Cancel key now closes date picker. |
69 | Rearranged KO/Pi file menu structure. | 205 | Rearranged KO/Pi file menu structure. |
70 | 206 | ||
71 | OM/Pi: | 207 | OM/Pi: |
72 | Added to the SMTP account setting the option | 208 | Added to the SMTP account setting the option |
73 | "No secure connection". | 209 | "No secure connection". |
74 | You have to configure your SMTP accounts again, sorry. | 210 | You have to configure your SMTP accounts again, sorry. |
75 | 211 | ||
76 | KA/Pi: | 212 | KA/Pi: |
77 | Added support for importing quoted-printable. | 213 | Added support for importing quoted-printable. |
78 | Support was added by Peter P.. Thanks, Peter! | 214 | Support was added by Peter P.. Thanks, Peter! |
79 | 215 | ||
80 | 216 | ||
81 | ********** VERSION 2.0.14 ************ | 217 | ********** VERSION 2.0.14 ************ |
82 | 218 | ||
83 | Made Passwordmanager PwM/Pi more userfriendly: | 219 | Made Passwordmanager PwM/Pi more userfriendly: |
84 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | 220 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. |
85 | Fixed bug in KO/Pi todo printing. | 221 | Fixed bug in KO/Pi todo printing. |
86 | Made Qtopia calendar import possible on desktop . | 222 | Made Qtopia calendar import possible on desktop . |
87 | 223 | ||
88 | ********** VERSION 2.0.13 ************ | 224 | ********** VERSION 2.0.13 ************ |
89 | 225 | ||
90 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. | 226 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. |
91 | 227 | ||
92 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". | 228 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". |
93 | 229 | ||
94 | OM/Pi: | 230 | OM/Pi: |
95 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. | 231 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. |
96 | Added missing German translation. | 232 | Added missing German translation. |
97 | Added warning if path is specified in local folder settings of account config. | 233 | Added warning if path is specified in local folder settings of account config. |
98 | 234 | ||
99 | ********** VERSION 2.0.12 ************ | 235 | ********** VERSION 2.0.12 ************ |
100 | 236 | ||
101 | KO/Pi: | 237 | KO/Pi: |
102 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | 238 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. |
103 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. | 239 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. |
104 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. | 240 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. |
105 | 241 | ||
106 | Fixed problem in pi-sync mode when wrong password was sent. | 242 | Fixed problem in pi-sync mode when wrong password was sent. |
107 | 243 | ||
108 | OM/Pi: | 244 | OM/Pi: |
109 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. | 245 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. |
110 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. | 246 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. |
111 | 247 | ||
112 | ********** VERSION 2.0.11 ************ | 248 | ********** VERSION 2.0.11 ************ |
113 | 249 | ||
114 | Fixed some problems in pi-sync mode | 250 | Fixed some problems in pi-sync mode |
115 | (e.g. details of events were not synced properly) | 251 | (e.g. details of events were not synced properly) |
116 | 252 | ||
117 | ********** VERSION 2.0.10 ************ | 253 | ********** VERSION 2.0.10 ************ |
118 | 254 | ||
119 | KO/Pi: | 255 | KO/Pi: |
120 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. | 256 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. |
121 | This is fixed. | 257 | This is fixed. |
122 | Changed the search dialog a bit to make it more user friendly. | 258 | Changed the search dialog a bit to make it more user friendly. |
123 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). | 259 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). |
124 | 260 | ||
125 | Added config option to hide the week number in KO/Pi toolbar. | 261 | Added config option to hide the week number in KO/Pi toolbar. |
126 | 262 | ||
127 | ********** VERSION 2.0.9 ************ | 263 | ********** VERSION 2.0.9 ************ |
128 | 264 | ||
129 | Made month view icons for multiday events a bit nicer. | 265 | Made month view icons for multiday events a bit nicer. |
130 | Some minor fixes in KO/Pi | 266 | Some minor fixes in KO/Pi |
131 | (e.g. go to today did not work for new week view properly). | 267 | (e.g. go to today did not work for new week view properly). |
132 | 268 | ||
133 | 269 | ||
134 | ********** VERSION 2.0.8 ************ | 270 | ********** VERSION 2.0.8 ************ |
135 | 271 | ||
136 | Fixed a problem in dependency info in the ipk files for the Zaurus. | 272 | Fixed a problem in dependency info in the ipk files for the Zaurus. |
137 | 273 | ||
138 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. | 274 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. |
139 | 275 | ||
140 | Added a "go today" button to the datepicker. | 276 | Added a "go today" button to the datepicker. |
141 | 277 | ||
142 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) | 278 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) |
143 | and made it configureable to show these values. | 279 | and made it configureable to show these values. |
144 | 280 | ||
145 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. | 281 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. |
146 | 282 | ||
147 | 283 | ||
148 | ********** VERSION 2.0.7 ************ | 284 | ********** VERSION 2.0.7 ************ |
149 | 285 | ||
150 | Added global application font settings | 286 | Added global application font settings |
151 | (for all KDE-Pim/Pi apps) to the general settings. | 287 | (for all KDE-Pim/Pi apps) to the general settings. |
152 | 288 | ||
153 | Fixed a problem in OM/Pi when trying to login to some IMAP servers | 289 | Fixed a problem in OM/Pi when trying to login to some IMAP servers |
154 | (like the IMAP server of Apple: mail.mac.com ) | 290 | (like the IMAP server of Apple: mail.mac.com ) |
155 | 291 | ||
156 | Added recurring todos to KO/Pi. | 292 | Added recurring todos to KO/Pi. |
157 | 293 | ||
158 | 294 | ||
159 | ********** VERSION 2.0.6 ************ | 295 | ********** VERSION 2.0.6 ************ |
160 | 296 | ||
161 | Some bugfixes in the pi-sync mode. | 297 | Some bugfixes in the pi-sync mode. |
162 | Added German translation for pi-sync mode. | 298 | Added German translation for pi-sync mode. |
163 | 299 | ||
164 | KO/Pi: | 300 | KO/Pi: |
165 | Made the todolist using alternate background. | 301 | Made the todolist using alternate background. |
166 | 302 | ||
167 | Other minor fixes in KO/Pi. | 303 | Other minor fixes in KO/Pi. |
168 | 304 | ||
169 | 305 | ||
170 | ********** VERSION 2.0.5 ************ | 306 | ********** VERSION 2.0.5 ************ |
171 | 307 | ||
172 | Bugfixes in KO/Pi. | 308 | Bugfixes in KO/Pi. |
173 | 309 | ||
174 | ********** VERSION 2.0.4 ************ | 310 | ********** VERSION 2.0.4 ************ |
175 | 311 | ||
176 | KO/Pi: | 312 | KO/Pi: |
177 | Fixed problem loading translations for summary/location edit boxes in event/todo editor. | 313 | Fixed problem loading translations for summary/location edit boxes in event/todo editor. |
178 | 314 | ||
179 | Added a general "select week number" to the toolbar. | 315 | Added a general "select week number" to the toolbar. |
180 | 316 | ||
181 | Fixed some small problem of the new features introduced in version 2.0.3. | 317 | Fixed some small problem of the new features introduced in version 2.0.3. |
182 | 318 | ||
183 | Made it possible to specify one specific category as category color, | 319 | Made it possible to specify one specific category as category color, |
184 | if more than one categories are selected. | 320 | if more than one categories are selected. |
185 | 321 | ||
186 | Fixed a bug in saving colors for categories with non-ascii characters. | 322 | Fixed a bug in saving colors for categories with non-ascii characters. |
187 | (Like, e.g. German Umlauts). | 323 | (Like, e.g. German Umlauts). |
188 | Propably you have to set your colors again for those categories. | 324 | Propably you have to set your colors again for those categories. |
189 | 325 | ||
190 | 326 | ||
191 | ********** VERSION 2.0.3 ************ | 327 | ********** VERSION 2.0.3 ************ |
192 | 328 | ||
193 | KO/Pi: | 329 | KO/Pi: |
194 | Added feature for changing alarm settings for many items at once: | 330 | Added feature for changing alarm settings for many items at once: |
195 | Open list view (or search dialog), select the desired items and choose in | 331 | Open list view (or search dialog), select the desired items and choose in |
196 | the popup menu: Set alarm for selected... | 332 | the popup menu: Set alarm for selected... |
197 | 333 | ||
198 | Added to the event/todo viewer the option to send an email to | 334 | Added to the event/todo viewer the option to send an email to |
199 | all attendees or all selected (with RSVP) attendees. | 335 | all attendees or all selected (with RSVP) attendees. |
200 | 336 | ||
201 | Made the week-month mode changing in month view faster. | 337 | Made the week-month mode changing in month view faster. |
202 | 338 | ||
203 | Made month view better useable with keyboard. | 339 | Made month view better useable with keyboard. |
204 | Now TAB key jumps to next cell with an event/todo. | 340 | Now TAB key jumps to next cell with an event/todo. |
205 | Scroll in cell with coursor keys, scroll in time (next week) with | 341 | Scroll in cell with coursor keys, scroll in time (next week) with |
206 | Shift/Control + coursorkeys. | 342 | Shift/Control + coursorkeys. |
207 | 343 | ||
208 | Fixed bug that the todo view flat mode was reset after first view update. | 344 | Fixed bug that the todo view flat mode was reset after first view update. |
209 | 345 | ||
210 | If a todo is displayed closed in the todo view, | 346 | If a todo is displayed closed in the todo view, |
211 | it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. | 347 | it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. |
212 | 348 | ||
213 | Added info about the numbers of years to the caption (title) information about a birthday event. | 349 | Added info about the numbers of years to the caption (title) information about a birthday event. |
214 | 350 | ||
215 | Made completion date in todo editor editable. | 351 | Made completion date in todo editor editable. |
216 | 352 | ||
217 | Added possibility to save/load templates for journals. | 353 | Added possibility to save/load templates for journals. |
218 | (Which is just a simple "save text to file" or "insert text from file". | 354 | (Which is just a simple "save text to file" or "insert text from file". |
219 | 355 | ||
220 | ********** VERSION 2.0.2 ************ | 356 | ********** VERSION 2.0.2 ************ |
221 | 357 | ||
222 | KO/Pi: | 358 | KO/Pi: |
223 | Fixed the layout problem of the day label buttons | 359 | Fixed the layout problem of the day label buttons |
224 | of the agenda view introduced in version 2.0.1. | 360 | of the agenda view introduced in version 2.0.1. |
225 | 361 | ||
226 | Added WhatsThis support for the todo view and the list view. | 362 | Added WhatsThis support for the todo view and the list view. |
227 | 363 | ||
228 | Added a quite useful feature to the montview. | 364 | Added a quite useful feature to the montview. |
229 | Just click on the week numbers on the left. | 365 | Just click on the week numbers on the left. |
230 | And in the top right corner of month view/agenda view | 366 | And in the top right corner of month view/agenda view |
231 | there is now a "week number quick selector". | 367 | there is now a "week number quick selector". |
232 | (Click on the black triangle). | 368 | (Click on the black triangle). |
233 | 369 | ||
234 | Made the quite difficult timezone change in KO/Pi easy. | 370 | Made the quite difficult timezone change in KO/Pi easy. |
235 | 371 | ||
236 | OM/Pi: | 372 | OM/Pi: |
237 | Fixed too small icons on desktop. | 373 | Fixed too small icons on desktop. |
238 | Fixed non visible icons in mainwindow on Z with fastload enabled. | 374 | Fixed non visible icons in mainwindow on Z with fastload enabled. |
239 | Added signature file setting to smtp account config. | 375 | Added signature file setting to smtp account config. |
240 | And the signature can be edited and saved in the edit mail dialog. | 376 | And the signature can be edited and saved in the edit mail dialog. |
241 | That does mean: | 377 | That does mean: |
242 | Simply edit the signature for the selected smtp account in the | 378 | Simply edit the signature for the selected smtp account in the |
243 | edit new mail dialog and press the "save signature" button there. | 379 | edit new mail dialog and press the "save signature" button there. |
244 | Then the signature is saved to the file specified in the smtp account settings. | 380 | Then the signature is saved to the file specified in the smtp account settings. |
245 | If there is no file specified, it is saved automatically to the file | 381 | If there is no file specified, it is saved automatically to the file |
246 | kdepim/apps/kopiemail/<accountname>.sig. | 382 | kdepim/apps/kopiemail/<accountname>.sig. |
247 | 383 | ||
248 | 384 | ||
249 | 385 | ||
250 | ********** VERSION 2.0.1 ************ | 386 | ********** VERSION 2.0.1 ************ |
251 | 387 | ||
252 | Oooops ... I forgot to test on the Zaurus 5500 ... | 388 | Oooops ... I forgot to test on the Zaurus 5500 ... |
253 | 389 | ||
254 | Fixed many problems of new (english) strings (and german translations) | 390 | Fixed many problems of new (english) strings (and german translations) |
255 | introduced in the latest versions, where the text was not fitting on the | 391 | introduced in the latest versions, where the text was not fitting on the |
256 | 240x320 display of the Zaurus 5500. | 392 | 240x320 display of the Zaurus 5500. |
257 | 393 | ||
258 | KO/Pi: | 394 | KO/Pi: |
259 | Added a popup menu ( press pen and hold to get popup ) to the agenda view | 395 | Added a popup menu ( press pen and hold to get popup ) to the agenda view |
260 | with many useful items (add event/todo, show next week, two weeks, month, journal). | 396 | with many useful items (add event/todo, show next week, two weeks, month, journal). |
261 | 397 | ||
262 | Added items to the todolist popup menu for: | 398 | Added items to the todolist popup menu for: |
263 | Display all opened, all closed or all todos flat. | 399 | Display all opened, all closed or all todos flat. |
264 | The "flat" view makes is possible to sort all todos after ,e.g., prio or date. | 400 | The "flat" view makes is possible to sort all todos after ,e.g., prio or date. |
265 | Made the reparenting of todos on the desktop possible via Drag&Drop. | 401 | Made the reparenting of todos on the desktop possible via Drag&Drop. |
266 | Fixed several bugs in setting the completed datetime for todos. | 402 | Fixed several bugs in setting the completed datetime for todos. |
267 | Added info about completed datetime of todos to the todo viewer. | 403 | Added info about completed datetime of todos to the todo viewer. |
268 | Now displaying a completed todo (with completed datetime set) in the agenda view | 404 | Now displaying a completed todo (with completed datetime set) in the agenda view |
269 | at the time of the completion. Such that now it is possible to see in the agenda view | 405 | at the time of the completion. Such that now it is possible to see in the agenda view |
270 | when what todo was completed. | 406 | when what todo was completed. |
271 | Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. | 407 | Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. |
272 | Now the behaviour is: | 408 | Now the behaviour is: |
273 | Setting a parent to complete sets all (sub)childs to complete. | 409 | Setting a parent to complete sets all (sub)childs to complete. |
274 | Setting a parent to uncomplete does not change the childs. | 410 | Setting a parent to uncomplete does not change the childs. |
275 | Setting a child to uncomplete sets all parent to uncomplete. | 411 | Setting a child to uncomplete sets all parent to uncomplete. |
276 | Setting a child to complete does not change the parents. | 412 | Setting a child to complete does not change the parents. |
277 | 413 | ||
278 | Smart updating and double buffering of the daymatrix. | 414 | Smart updating and double buffering of the daymatrix. |
279 | Showing holidays in the day matrix. | 415 | Showing holidays in the day matrix. |
280 | Many other small performance updates. | 416 | Many other small performance updates. |
281 | 417 | ||
282 | Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. | 418 | Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. |
283 | 419 | ||
284 | Now the translation file usertranslation.txt is supposed to be in utf8 format. | 420 | Now the translation file usertranslation.txt is supposed to be in utf8 format. |
285 | If 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. | 421 | If 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. |
286 | 422 | ||
287 | 423 | ||
288 | ********** VERSION 2.0.0 ************ | 424 | ********** VERSION 2.0.0 ************ |
289 | 425 | ||
290 | Stable release 2.0.0! | 426 | Stable release 2.0.0! |
291 | 427 | ||
292 | KO/Pi: | 428 | KO/Pi: |
293 | Fixed problem in edit dialog recreation at startup. | 429 | Fixed problem in edit dialog recreation at startup. |
294 | Made "toggle view*" menu items enabled context sensitive. | 430 | Made "toggle view*" menu items enabled context sensitive. |
295 | Changed agenda size menu to items 1-10. | 431 | Changed agenda size menu to items 1-10. |
296 | Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. | 432 | Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. |
297 | Usebility enhancements in the KO/Pi menus. | 433 | Usebility enhancements in the KO/Pi menus. |
298 | Birthday import now adds year to summary. | 434 | Birthday import now adds year to summary. |
299 | What's Next view shows age in years for birthday. | 435 | What's Next view shows age in years for birthday. |
300 | 436 | ||
301 | OM/Pi: | 437 | OM/Pi: |
302 | Added three info lines to display subject, from and to of selected mails. | 438 | Added three info lines to display subject, from and to of selected mails. |
303 | 439 | ||
304 | KA/Pi: | 440 | KA/Pi: |
305 | Fixed jump bar behaviour on Zaurus. | 441 | Fixed jump bar behaviour on Zaurus. |
306 | Now KA/Pi search field supports searching for a range of starting characters. | 442 | Now KA/Pi search field supports searching for a range of starting characters. |
307 | E.g. to search for all contact beginning with b to n, type | 443 | E.g. to search for all contact beginning with b to n, type |
308 | b-n | 444 | b-n |
309 | in the search field. | 445 | in the search field. |
310 | 446 | ||
311 | ********** VERSION 1.9.20 ************ | 447 | ********** VERSION 1.9.20 ************ |
312 | 448 | ||
313 | KO/Pi: | 449 | KO/Pi: |
314 | Added for the "dislplay one day" agenda mode | 450 | Added for the "dislplay one day" agenda mode |
315 | info in the caption and in the day lables: | 451 | info in the caption and in the day lables: |
316 | Now it is displayed, if the selected day is from "day before yesterday" | 452 | Now it is displayed, if the selected day is from "day before yesterday" |
317 | to "day after tomorrow". | 453 | to "day after tomorrow". |
318 | Made it possible to delete a Todo, which has sub-todos. | 454 | Made it possible to delete a Todo, which has sub-todos. |
319 | Fixed two small problems in the todo view. | 455 | Fixed two small problems in the todo view. |
320 | Added missing German translation for filter edit and print dialog. | 456 | Added missing German translation for filter edit and print dialog. |
321 | Made search dialog closeable by cancel key. | 457 | Made search dialog closeable by cancel key. |
322 | 458 | ||
323 | Made it possible to select in the date picker the (ligt grey ) | 459 | Made it possible to select in the date picker the (ligt grey ) |
324 | dates of the prev./next month with the mouse. | 460 | dates of the prev./next month with the mouse. |
325 | 461 | ||
326 | OM/Pi: | 462 | OM/Pi: |
327 | "Delete mail" icon in main window now deletes all selected mails. | 463 | "Delete mail" icon in main window now deletes all selected mails. |
328 | Fixed the problem, that the state flag of imap mails was ignored. | 464 | Fixed the problem, that the state flag of imap mails was ignored. |
329 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view | 465 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view |
330 | to indecate that they are already seen. | 466 | to indecate that they are already seen. |
331 | Fixed the problem that the body of some mails was not displayed in the | 467 | Fixed the problem that the body of some mails was not displayed in the |
332 | mail viewer when fetching them from the imap server directly to read them. | 468 | mail viewer when fetching them from the imap server directly to read them. |
333 | Made it (configurable) possible to show the "To:" field in the list view. | 469 | Made it (configurable) possible to show the "To:" field in the list view. |
334 | Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. | 470 | Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. |
335 | Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the | 471 | Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the |
336 | local storage folder (specified in account settings) of the account of the mail. | 472 | local storage folder (specified in account settings) of the account of the mail. |
337 | Removed some memory leaks in OM/Pi. | 473 | Removed some memory leaks in OM/Pi. |
338 | 474 | ||
339 | 475 | ||
340 | ********** VERSION 1.9.19 ************ | 476 | ********** VERSION 1.9.19 ************ |
341 | 477 | ||
342 | Added a lot of missing translations to KA/Pi, | 478 | Added a lot of missing translations to KA/Pi, |
343 | Added some missing translations to KO/Pi and OM/Pi. | 479 | Added some missing translations to KO/Pi and OM/Pi. |
344 | 480 | ||
345 | Fixed some minor problems in KA/Pi + KO/Pi. | 481 | Fixed some minor problems in KA/Pi + KO/Pi. |
346 | 482 | ||
347 | Fixed a crash when closing PwM/Pi. | 483 | Fixed a crash when closing PwM/Pi. |
348 | Added German translation for PwM/Pi. | 484 | Added German translation for PwM/Pi. |
349 | 485 | ||
350 | Made view change and Month View update faster in KO/Pi. | 486 | Made view change and Month View update faster in KO/Pi. |
351 | 487 | ||
352 | 488 | ||
353 | ********** VERSION 1.9.18 ************ | 489 | ********** VERSION 1.9.18 ************ |
354 | 490 | ||
355 | FYI: The VERSION 1.9.17 was a testing release only. | 491 | FYI: The VERSION 1.9.17 was a testing release only. |
356 | Please read the changelog of VERSION 1.9.17 as well. | 492 | Please read the changelog of VERSION 1.9.17 as well. |
357 | 493 | ||
358 | Cleaned up the syncing config dialog. | 494 | Cleaned up the syncing config dialog. |
359 | Added sync config options for date range for events. | 495 | Added sync config options for date range for events. |
360 | Added sync config options for filters on incoming data. | 496 | Added sync config options for filters on incoming data. |
361 | Added sync config options for filters on outgoing data. | 497 | Added sync config options for filters on outgoing data. |
362 | Please read the updated SyncHowTo about the new filter settings. | 498 | Please read the updated SyncHowTo about the new filter settings. |
363 | These filter settings make it now possible to sync with shared | 499 | These filter settings make it now possible to sync with shared |
364 | calendars without writing back private or confidential data | 500 | calendars without writing back private or confidential data |
365 | (via the outgoing filters). | 501 | (via the outgoing filters). |
366 | To sync only with particular parts of a shared calendar, | 502 | To sync only with particular parts of a shared calendar, |
367 | the incoming filter settings can be used. | 503 | the incoming filter settings can be used. |
368 | An example can be found in the SyncHowTo. | 504 | An example can be found in the SyncHowTo. |
369 | Same for shared addressbooks. | 505 | Same for shared addressbooks. |
370 | 506 | ||
371 | Added a setting for the global kdepim data storage. | 507 | Added a setting for the global kdepim data storage. |
372 | Usually the data is stored in (yourhomedir/kdepim). | 508 | Usually the data is stored in (yourhomedir/kdepim). |
373 | Now you can set in the Global config dialog TAB, subTAB "Data storage path" | 509 | Now you can set in the Global config dialog TAB, subTAB "Data storage path" |
374 | a directory where all the kdepim data is stored. | 510 | a directory where all the kdepim data is stored. |
375 | That makes it easy to save all kdepim data on a SD card on the Z, for example. | 511 | That makes it easy to save all kdepim data on a SD card on the Z, for example. |
376 | 512 | ||
377 | KO/Pi: | 513 | KO/Pi: |
378 | The timeedit input has a pulldown list for times. | 514 | The timeedit input has a pulldown list for times. |
379 | If opened, this pulldown list should now has the right time highlighted. | 515 | If opened, this pulldown list should now has the right time highlighted. |
380 | Added the possibility to exclude events/todos/journals in a filter. | 516 | Added the possibility to exclude events/todos/journals in a filter. |
381 | You should exclude journals, if you do not want them to sync with a public calendar. | 517 | You should exclude journals, if you do not want them to sync with a public calendar. |
382 | 518 | ||
383 | KA/Pi: | 519 | KA/Pi: |
384 | Added the possibility to in/exclude public/private/confidential contacts to a filter. | 520 | Added the possibility to in/exclude public/private/confidential contacts to a filter. |
385 | If 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 ... | 521 | If 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 ... |
386 | Added printing of card view and details view on desktop. | 522 | Added printing of card view and details view on desktop. |
387 | Printing of list view is not working... | 523 | Printing of list view is not working... |
388 | Added button for removing pictures in contact editor. | 524 | Added button for removing pictures in contact editor. |
389 | Parsing data fix of KA/Pi version 1.9.17. | 525 | Parsing data fix of KA/Pi version 1.9.17. |
390 | Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. | 526 | Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. |
391 | Fixed some syncing merging problems. | 527 | Fixed some syncing merging problems. |
392 | 528 | ||
393 | 529 | ||
394 | ********** VERSION 1.9.17 ************ | 530 | ********** VERSION 1.9.17 ************ |
395 | 531 | ||
396 | KO/Pi: | 532 | KO/Pi: |
397 | Fixed that tooltips were not updated after moving an item in agenda view. | 533 | Fixed that tooltips were not updated after moving an item in agenda view. |
398 | Fixed a bug in sorting start date for recurring events in list view. | 534 | Fixed a bug in sorting start date for recurring events in list view. |
399 | Changed the left button in todo viewer from "Agenda" to "Set completed". | 535 | Changed the left button in todo viewer from "Agenda" to "Set completed". |
400 | This 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. | 536 | This 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. |
401 | Added more info in the todo viewer: Startdate, parent/sub todos. | 537 | Added more info in the todo viewer: Startdate, parent/sub todos. |
402 | 538 | ||
403 | 539 | ||
404 | KA/Pi: | 540 | KA/Pi: |
405 | All fields search does now actually search all the (possible) fields, | 541 | All fields search does now actually search all the (possible) fields, |
406 | not only those listed in the contact list. | 542 | not only those listed in the contact list. |
407 | Made is possible to inline a picture in a vcard on the Z. | 543 | Made is possible to inline a picture in a vcard on the Z. |
408 | This was only possible on the desktop, now is it possible on the Z as well. | 544 | This was only possible on the desktop, now is it possible on the Z as well. |
409 | Fixed of missing save settings after filter configuration. | 545 | Fixed of missing save settings after filter configuration. |
410 | Made saving of addressbook much faster. | 546 | Made saving of addressbook much faster. |
411 | Fixed extension widget layout problem. | 547 | Fixed extension widget layout problem. |
412 | Fixed saving of default formatted name settings. | 548 | Fixed saving of default formatted name settings. |
413 | Fixed formatted name handling in edit dialog. | 549 | Fixed formatted name handling in edit dialog. |
414 | Added an option for changing formatted names of many contacts | 550 | Added an option for changing formatted names of many contacts |
415 | (menu: File - Change - Set formatted name). | 551 | (menu: File - Change - Set formatted name). |
416 | 552 | ||
417 | QWhatsThis was not working on the Z ( only black rectangle was shown). | 553 | QWhatsThis was not working on the Z ( only black rectangle was shown). |
418 | This is Fixed. | 554 | This is Fixed. |
419 | 555 | ||
420 | KDE-Sync: | 556 | KDE-Sync: |
421 | Now readonly KDE resources are synced as well. | 557 | Now readonly KDE resources are synced as well. |
422 | (They are not changed in KDE itself, of course). | 558 | (They are not changed in KDE itself, of course). |
423 | 559 | ||
424 | 560 | ||
425 | 561 | ||
426 | ********** VERSION 1.9.16 ************ | 562 | ********** VERSION 1.9.16 ************ |
427 | 563 | ||
428 | KO/Pi: | 564 | KO/Pi: |
429 | Fixed search dialog size on Z 6000 (480x640 display). | 565 | Fixed search dialog size on Z 6000 (480x640 display). |
430 | Added setting to hide/show time in agenda items. | 566 | Added setting to hide/show time in agenda items. |
431 | Added setting to hide not running todos in todo view. | 567 | Added setting to hide not running todos in todo view. |
432 | Added columns for start date/time in todo view. | 568 | Added columns for start date/time in todo view. |
433 | Replaced the solid half-hour lines in agenda view by dot lines. | 569 | Replaced the solid half-hour lines in agenda view by dot lines. |
434 | Added possibility of printing the What's Next View on the desktop | 570 | Added possibility of printing the What's Next View on the desktop |
435 | (i.e. Windows and Linux). | 571 | (i.e. Windows and Linux). |
436 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. | 572 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. |
437 | Added tooltips in month view.(Tooltips only available on desktop) | 573 | Added tooltips in month view.(Tooltips only available on desktop) |
438 | 574 | ||
439 | Fixed a strange problem in KO/Pi alarm applet. | 575 | Fixed a strange problem in KO/Pi alarm applet. |
440 | Did not find the actual problem, | 576 | Did not find the actual problem, |
441 | such that now Qtopia reboots again if deinstalling the alarm applet. | 577 | such that now Qtopia reboots again if deinstalling the alarm applet. |
442 | But the alarm applet should work again. | 578 | But the alarm applet should work again. |
443 | 579 | ||
444 | KA/Pi: | 580 | KA/Pi: |
445 | Fixed the problem, that internal pictures were not saved. | 581 | Fixed the problem, that internal pictures were not saved. |
446 | 582 | ||
447 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. | 583 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. |
448 | 584 | ||
449 | Fixed some minor problems. (Like word wrap in help text windows). | 585 | Fixed some minor problems. (Like word wrap in help text windows). |
450 | 586 | ||
451 | Fixed a compiling problem in microkde/kresources. | 587 | Fixed a compiling problem in microkde/kresources. |
452 | 588 | ||
453 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. | 589 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. |
454 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) | 590 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) |
455 | such that now syncing KO/Pi with Sharp DTM should work on the | 591 | such that now syncing KO/Pi with Sharp DTM should work on the |
456 | Zaurus C 3000 model. | 592 | Zaurus C 3000 model. |
457 | 593 | ||
458 | ********** VERSION 1.9.15 ************ | 594 | ********** VERSION 1.9.15 ************ |
459 | 595 | ||
460 | Usebilty enhancements in KO/Pi: | 596 | Usebilty enhancements in KO/Pi: |
461 | When clicking on the date in a month view cell, the day view is shown. | 597 | When clicking on the date in a month view cell, the day view is shown. |
462 | Old behaviour was, that the "new event" dialog popped up. | 598 | Old behaviour was, that the "new event" dialog popped up. |
463 | 599 | ||
464 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 600 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
465 | That means, you can restore the latest | 601 | That means, you can restore the latest |
466 | event/todo/journal you have deleted. | 602 | event/todo/journal you have deleted. |
467 | A journal is deleted, if you clear all the text of the journal. | 603 | A journal is deleted, if you clear all the text of the journal. |
468 | 604 | ||
469 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | 605 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. |
470 | 606 | ||
471 | KA/Pi starting in 480x640 resolution: | 607 | KA/Pi starting in 480x640 resolution: |
472 | Hide the filter action in toolbar | 608 | Hide the filter action in toolbar |
473 | and added icons for undo/delete/redo in toolbar. | 609 | and added icons for undo/delete/redo in toolbar. |
474 | 610 | ||
475 | Change in OM/Pi ViewMail dialog: | 611 | Change in OM/Pi ViewMail dialog: |
476 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. | 612 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. |
477 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | 613 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). |
478 | 614 | ||
479 | Fixed a crash when deleting mail-accounts in OM/Pi. | 615 | Fixed a crash when deleting mail-accounts in OM/Pi. |
480 | 616 | ||
481 | 617 | ||
482 | ********** VERSION 1.9.14 ************ | 618 | ********** VERSION 1.9.14 ************ |
483 | 619 | ||
484 | Fixed some problems with the dialog sizes when switching | 620 | Fixed some problems with the dialog sizes when switching |
485 | portrait/landscape mode on 640x480 PDA display. | 621 | portrait/landscape mode on 640x480 PDA display. |
486 | 622 | ||
487 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 623 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
488 | 624 | ||
489 | Fixed an ugly bug in KOpieMail: | 625 | Fixed an ugly bug in KOpieMail: |
490 | KOpieMail was not able to write files (mails) to MSDOS file system, | 626 | KOpieMail was not able to write files (mails) to MSDOS file system, |
491 | like on an usual preformatted SD card. That should work now. | 627 | like on an usual preformatted SD card. That should work now. |
492 | To save your mail data on the Sd card do the following: | 628 | To save your mail data on the Sd card do the following: |
493 | Create a dir on the SD card: | 629 | Create a dir on the SD card: |
494 | mkdir /mnt/card/localmail | 630 | mkdir /mnt/card/localmail |
495 | Go to your home dir: | 631 | Go to your home dir: |
496 | cd | 632 | cd |
497 | Go to kopiemail data storage dir: | 633 | Go to kopiemail data storage dir: |
498 | cd kdepim/apps/kopiemail | 634 | cd kdepim/apps/kopiemail |
499 | Create a symlink to the SD card: | 635 | Create a symlink to the SD card: |
500 | ls -s /mnt/card/localmail | 636 | ls -s /mnt/card/localmail |
501 | Now KOpieMail will store all mails on the SD card. | 637 | Now KOpieMail will store all mails on the SD card. |
502 | 638 | ||
503 | KO/Pi Monthview: | 639 | KO/Pi Monthview: |
504 | Now "Go to Today" selects the current month from day 1-end, | 640 | Now "Go to Today" selects the current month from day 1-end, |
505 | not the current date + some days. | 641 | not the current date + some days. |
506 | I.e. "Go to Today" shows now always | 642 | I.e. "Go to Today" shows now always |
507 | the current month with first day of month in the first row. | 643 | the current month with first day of month in the first row. |
508 | 644 | ||
509 | Added missing German translation. | 645 | Added missing German translation. |
510 | 646 | ||
511 | Fixed icons of executeable on Wintendo. | 647 | Fixed icons of executeable on Wintendo. |
512 | 648 | ||
513 | Added a "Show next Mail" button to the OM/Pi | 649 | Added a "Show next Mail" button to the OM/Pi |
514 | mail viewer such that the mail below the current mail | 650 | mail viewer such that the mail below the current mail |
515 | in the mail list view of the current folder | 651 | in the mail list view of the current folder |
516 | can be read with a single click. | 652 | can be read with a single click. |
517 | 653 | ||
518 | 654 | ||
519 | ********** VERSION 1.9.13 ************ | 655 | ********** VERSION 1.9.13 ************ |
520 | 656 | ||
521 | Fixed nasty PwM/Pi file reading bug, when | 657 | Fixed nasty PwM/Pi file reading bug, when |
522 | the used hash algo of file is different then the global | 658 | the used hash algo of file is different then the global |
523 | hash algo. | 659 | hash algo. |
524 | 660 | ||
525 | Added KA/Pi support for opie mailit mailapplication. | 661 | Added KA/Pi support for opie mailit mailapplication. |
526 | 662 | ||
527 | Fixed some bugs in OM/Pi. | 663 | Fixed some bugs in OM/Pi. |
528 | Now character conversion tables are available for the Zaurus | 664 | Now character conversion tables are available for the Zaurus |
529 | to make OM/Pi working properly. | 665 | to make OM/Pi working properly. |
530 | To get the character conversion in OM/Pi working, please download | 666 | To get the character conversion in OM/Pi working, please download |
531 | at the sourceforge project site the package | 667 | at the sourceforge project site the package |
532 | sr-character-conversion_SharpROM_arm.ipk.zip | 668 | sr-character-conversion_SharpROM_arm.ipk.zip |
533 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) | 669 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) |
534 | from the section "general files for KDE/Pim" | 670 | from the section "general files for KDE/Pim" |
535 | Instructions how to install this package are in a ReadMe in this file. | 671 | Instructions how to install this package are in a ReadMe in this file. |
536 | 672 | ||
537 | 673 | ||
538 | Fixed the orientation change problem in KA/Pi when switching | 674 | Fixed the orientation change problem in KA/Pi when switching |
539 | portrait/landscape mode. | 675 | portrait/landscape mode. |
540 | 676 | ||
541 | French translation available for KA/Pi and OM/Pi. | 677 | French translation available for KA/Pi and OM/Pi. |
542 | 678 | ||
543 | Fixed some problems with categories in KO/Pi in DTM sync. | 679 | Fixed some problems with categories in KO/Pi in DTM sync. |
544 | 680 | ||
545 | Added selection dialog for export to phone in KA/Pi. | 681 | Added selection dialog for export to phone in KA/Pi. |
546 | 682 | ||
547 | If in KO/Pi is an attendee selected to add to a meeting and this | 683 | If in KO/Pi is an attendee selected to add to a meeting and this |
548 | attendee is already in the list of attendees, this person is not added | 684 | attendee is already in the list of attendees, this person is not added |
549 | again. | 685 | again. |
550 | 686 | ||
551 | Some menu cleanup in KA/Pi. | 687 | Some menu cleanup in KA/Pi. |
552 | 688 | ||
553 | ********** VERSION 1.9.12 ************ | 689 | ********** VERSION 1.9.12 ************ |
554 | 690 | ||
555 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. | 691 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. |
556 | 692 | ||
557 | Bugfix: Licence file is now shown again. | 693 | Bugfix: Licence file is now shown again. |
558 | 694 | ||
559 | OM/Pi now supports Unicode (utf8 charset). | 695 | OM/Pi now supports Unicode (utf8 charset). |
560 | Fixed some bugs in OM/Pi. | 696 | Fixed some bugs in OM/Pi. |
561 | 697 | ||
562 | KA/Pi has more German translation. | 698 | KA/Pi has more German translation. |
563 | 699 | ||
564 | 700 | ||
565 | ********** VERSION 1.9.11 ************ | 701 | ********** VERSION 1.9.11 ************ |
566 | 702 | ||
567 | Fixed several problems in PWM/Pi, like | 703 | Fixed several problems in PWM/Pi, like |
568 | asking the user, if unsaved changed are pending | 704 | asking the user, if unsaved changed are pending |
569 | when closing the app. | 705 | when closing the app. |
570 | And PwM/Pi handles now different texts for the | 706 | And PwM/Pi handles now different texts for the |
571 | fields Description, Username, Password, configurable per category. | 707 | fields Description, Username, Password, configurable per category. |
572 | 708 | ||
573 | Fixed a crash in KO/Pi , when importing/loading vcs files | 709 | Fixed a crash in KO/Pi , when importing/loading vcs files |
574 | which have an entry with an attendee with state: | 710 | which have an entry with an attendee with state: |
575 | NEEDS ACTION | 711 | NEEDS ACTION |
576 | 712 | ||
577 | Fixed some problems in the German translation of OM/Pi, | 713 | Fixed some problems in the German translation of OM/Pi, |
578 | which makes some dialogs not fitting on the screen | 714 | which makes some dialogs not fitting on the screen |
579 | of the Z 5500. | 715 | of the Z 5500. |
580 | 716 | ||
581 | Fixed Qtopia crash, when disabling/deinstalling | 717 | Fixed Qtopia crash, when disabling/deinstalling |
582 | KO/Pi alarm applet. | 718 | KO/Pi alarm applet. |
583 | 719 | ||
584 | Implemented direct KDE<->KA/Pi sync for KA/Pi running | 720 | Implemented direct KDE<->KA/Pi sync for KA/Pi running |
585 | on Linux desktop. | 721 | on Linux desktop. |
586 | 722 | ||
587 | Added feature "remove sync info" to sync menu. | 723 | Added feature "remove sync info" to sync menu. |
588 | 724 | ||
589 | Tweaked the KO/Pi What's next view a bit, added | 725 | Tweaked the KO/Pi What's next view a bit, added |
590 | setting to hide events that are done. | 726 | setting to hide events that are done. |
591 | 727 | ||
592 | Disabled "beam receive enabled" on startup to | 728 | Disabled "beam receive enabled" on startup to |
593 | avoid problems if Fastload is enabled. | 729 | avoid problems if Fastload is enabled. |
594 | Please set "beam receive enabled", | 730 | Please set "beam receive enabled", |
595 | if you want to receive data via IR. | 731 | if you want to receive data via IR. |
596 | 732 | ||
597 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running | 733 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running |
598 | on Linux desktop. | 734 | on Linux desktop. |
599 | 735 | ||
600 | Made in KA/Pi scrolling possible, if details view is selected. | 736 | Made in KA/Pi scrolling possible, if details view is selected. |
601 | (The keyboard focus is set automatically to the search line) | 737 | (The keyboard focus is set automatically to the search line) |
602 | 738 | ||
603 | Fixed a bug in DMT sync, that a new entry in DTM was added | 739 | Fixed a bug in DMT sync, that a new entry in DTM was added |
604 | on every sync to Kx/Pi. | 740 | on every sync to Kx/Pi. |
605 | 741 | ||
606 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. | 742 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. |
607 | 743 | ||
608 | Fixed a bug in DMT sync with todos created in KO/Pi containing | 744 | Fixed a bug in DMT sync with todos created in KO/Pi containing |
609 | non-latin1 characters. | 745 | non-latin1 characters. |
610 | 746 | ||
611 | Rearranged package contents of Sharp-ipks and made all | 747 | Rearranged package contents of Sharp-ipks and made all |
612 | packages installable on SD again. | 748 | packages installable on SD again. |
613 | 749 | ||
614 | Fixed the writing of addressbook data in DTM sync. | 750 | Fixed the writing of addressbook data in DTM sync. |
615 | Empty fields in KA/Pi were not removed. | 751 | Empty fields in KA/Pi were not removed. |
616 | 752 | ||
617 | Added better category handling in KA/Pi: | 753 | Added better category handling in KA/Pi: |
618 | Added item | 754 | Added item |
619 | Edit Categories and | 755 | Edit Categories and |
620 | Manage new categories | 756 | Manage new categories |
621 | to the settings menu. | 757 | to the settings menu. |
622 | Possible to configure a view to display categories. | 758 | Possible to configure a view to display categories. |
623 | 759 | ||
624 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. | 760 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. |
625 | 761 | ||
626 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. | 762 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. |
627 | 763 | ||
628 | ... and many other bugfixes. | 764 | ... and many other bugfixes. |
629 | 765 | ||
630 | ********** VERSION 1.9.10 ************ | 766 | ********** VERSION 1.9.10 ************ |
631 | 767 | ||
632 | Many internal small bugfixes. | 768 | Many internal small bugfixes. |
633 | And fix of the "big" bug in KO/Pi, | 769 | And fix of the "big" bug in KO/Pi, |
634 | that after Syncing the appointments had an offset by several hours. | 770 | that after Syncing the appointments had an offset by several hours. |
635 | That was a problem with the internal timezone setting, | 771 | That was a problem with the internal timezone setting, |
636 | introduced by the changed timezone configuration settings. | 772 | introduced by the changed timezone configuration settings. |
637 | 773 | ||
638 | German translation for OM/Pi is now available. | 774 | German translation for OM/Pi is now available. |
639 | 775 | ||
640 | 776 | ||
641 | ********** VERSION 1.9.9 ************ | 777 | ********** VERSION 1.9.9 ************ |
642 | 778 | ||
643 | KDE-Pim/Pi has a new Member! | 779 | KDE-Pim/Pi has a new Member! |
644 | It is called PWM/Pi (Passwordmanager/platform-independent) | 780 | It is called PWM/Pi (Passwordmanager/platform-independent) |
645 | and it is available for the Zaurus. | 781 | and it is available for the Zaurus. |
646 | It is planned, that it will be available later for Windows. | 782 | It is planned, that it will be available later for Windows. |
647 | (And for Linux, of course). | 783 | (And for Linux, of course). |
648 | It is a port of the Passwordmanager of KDE. | 784 | It is a port of the Passwordmanager of KDE. |
649 | It will need the MicroKDElibs to run. | 785 | It will need the MicroKDElibs to run. |
650 | 786 | ||
651 | Made loading of addressbooks in KA/Pi up to 7 times faster! | 787 | Made loading of addressbooks in KA/Pi up to 7 times faster! |
652 | The bigger your addressbook file, the more starting speed | 788 | The bigger your addressbook file, the more starting speed |
653 | will you gain. (relatively) | 789 | will you gain. (relatively) |
654 | 790 | ||
655 | The Qtopia addressbook connector is now platform independend | 791 | The Qtopia addressbook connector is now platform independend |
656 | as well and should work on any platform for importing/exporting | 792 | as well and should work on any platform for importing/exporting |
657 | Qtopia and Opie XML files. | 793 | Qtopia and Opie XML files. |
658 | 794 | ||
659 | Added a +30min feature to the timezone settings to make | 795 | Added a +30min feature to the timezone settings to make |
660 | KDE-Pim/Pi useable in Australia and other parts on the | 796 | KDE-Pim/Pi useable in Australia and other parts on the |
661 | world with strange timezones ;-) | 797 | world with strange timezones ;-) |
662 | 798 | ||
663 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. | 799 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. |
664 | 800 | ||
665 | It is now possible to disable the | 801 | It is now possible to disable the |
666 | "receive data via infrared" feature, such that syncing with | 802 | "receive data via infrared" feature, such that syncing with |
667 | Outlook is now possible again with Kx/Pi runing. | 803 | Outlook is now possible again with Kx/Pi runing. |
668 | Please disable it, before syncing Sharp DTM with Outlook. | 804 | Please disable it, before syncing Sharp DTM with Outlook. |
669 | For your convenience, the "receive data via infrared" feature | 805 | For your convenience, the "receive data via infrared" feature |
670 | is disabled automatically, if you sync Kx/Pi with DTM. | 806 | is disabled automatically, if you sync Kx/Pi with DTM. |
671 | You have to enable it again manually after syncing. | 807 | You have to enable it again manually after syncing. |
672 | Enabling this feature makes it impossible to start the | 808 | Enabling this feature makes it impossible to start the |
673 | Sharp DTM apps. If this feature is enabled, you will only get the | 809 | Sharp DTM apps. If this feature is enabled, you will only get the |
674 | alarm notification from KO/Pi and not from the Sharp calendar. | 810 | alarm notification from KO/Pi and not from the Sharp calendar. |
675 | This is very useful if you sync KO/Pi with Sharp DTM, | 811 | This is very useful if you sync KO/Pi with Sharp DTM, |
676 | because after syncing you usually would get notified about | 812 | because after syncing you usually would get notified about |
677 | an alarm by KO/Pi and the Sharp Calendar. | 813 | an alarm by KO/Pi and the Sharp Calendar. |
678 | 814 | ||
679 | Together with the Linux desktop version of KO/Pi | 815 | Together with the Linux desktop version of KO/Pi |
680 | it is now possible to sync KO/Pi on the Zaurus | 816 | it is now possible to sync KO/Pi on the Zaurus |
681 | with the complete KDE-desktop (3.3 or later) | 817 | with the complete KDE-desktop (3.3 or later) |
682 | calendar data easily. | 818 | calendar data easily. |
683 | That makes it possible to sync the Z with one | 819 | That makes it possible to sync the Z with one |
684 | click of a mouse with the KDE-Desktop. | 820 | click of a mouse with the KDE-Desktop. |
685 | This feature it available for all Zaurus platforms KO/Pi | 821 | This feature it available for all Zaurus platforms KO/Pi |
686 | is running on. | 822 | is running on. |
687 | The only thing needed is a running KO/Pi on Linux and | 823 | The only thing needed is a running KO/Pi on Linux and |
688 | a compiled version of the small | 824 | a compiled version of the small |
689 | KDE-Pim/Pi<->KDE-Desktop access command line program, | 825 | KDE-Pim/Pi<->KDE-Desktop access command line program, |
690 | which is in the KDE-Pim/Pi sources available. | 826 | which is in the KDE-Pim/Pi sources available. |
691 | 827 | ||
692 | The "KDE-desktop" syncing feature for KA/Pi will follow | 828 | The "KDE-desktop" syncing feature for KA/Pi will follow |
693 | in the next releases. | 829 | in the next releases. |
694 | 830 | ||
695 | Fixed the vcard export bug, which had the version 1.9.8. | 831 | Fixed the vcard export bug, which had the version 1.9.8. |
696 | 832 | ||
697 | Added missing GERMAN translation to KO/Pi. | 833 | Added missing GERMAN translation to KO/Pi. |
698 | Hi PsionX, could you add the missing french translation?Thx! | 834 | Hi PsionX, could you add the missing french translation?Thx! |
699 | 835 | ||
700 | Translation files for KA/Pi are available as well. | 836 | Translation files for KA/Pi are available as well. |
701 | GERMAN translation will be available in the next release. | 837 | GERMAN translation will be available in the next release. |
702 | PsionX ( yres, you again ;-) ), could you start translating | 838 | PsionX ( yres, you again ;-) ), could you start translating |
703 | KA/Pi? Thx! | 839 | KA/Pi? Thx! |
704 | 840 | ||
705 | You can download the version 1.9.9 at | 841 | You can download the version 1.9.9 at |
706 | 842 | ||
707 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 | 843 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 |
708 | 844 | ||
709 | Note: | 845 | Note: |
710 | To run the mail program OM/Pi you need libopenssl. | 846 | To run the mail program OM/Pi you need libopenssl. |
711 | A link to a download loaction is available at | 847 | A link to a download loaction is available at |
712 | ZSI at www.killefiz.de | 848 | ZSI at www.killefiz.de |
713 | 849 | ||
714 | 850 | ||
715 | ********** VERSION 1.9.8 ************ | 851 | ********** VERSION 1.9.8 ************ |
716 | 852 | ||
717 | Fixed character decoding in OM/Pi. | 853 | Fixed character decoding in OM/Pi. |
718 | (e.g. German "Umlaute" were not displayed properly.) | 854 | (e.g. German "Umlaute" were not displayed properly.) |
719 | 855 | ||
720 | Made is possible to reparent todos in KO/Pi. | 856 | Made is possible to reparent todos in KO/Pi. |
721 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | 857 | Use contextmenu or keys (look at Help-Keys + Colors) for that. |
722 | 858 | ||
723 | Added the missing Sync-Howto and WhatsNew to the packages. | 859 | Added the missing Sync-Howto and WhatsNew to the packages. |
724 | 860 | ||
725 | KO/Pi on Linux desktop can now sync with KDE desktop. | 861 | KO/Pi on Linux desktop can now sync with KDE desktop. |
726 | That means: When using KO/Pi on Linux desktop for syncing with | 862 | That means: When using KO/Pi on Linux desktop for syncing with |
727 | KDE desktop and the Zaurus, the Zaurus can be synced now | 863 | KDE desktop and the Zaurus, the Zaurus can be synced now |
728 | with all KDE-Calendar resources, not only with one local file. | 864 | with all KDE-Calendar resources, not only with one local file. |
729 | (That makes it possible to sync the Zaurus with the | 865 | (That makes it possible to sync the Zaurus with the |
730 | calendar data on a Kolab server) | 866 | calendar data on a Kolab server) |
731 | 867 | ||
732 | KA/Pi syncing with KDE desktop will be available in the next version. | 868 | KA/Pi syncing with KDE desktop will be available in the next version. |
733 | 869 | ||
734 | 870 | ||
735 | ********** VERSION 1.9.7 ************ | 871 | ********** VERSION 1.9.7 ************ |
736 | 872 | ||
737 | KO/Pi - KA/Pi on Windows: | 873 | KO/Pi - KA/Pi on Windows: |
738 | Now a directory can be defined by the user, where the | 874 | Now a directory can be defined by the user, where the |
739 | application/config data should be saved. | 875 | application/config data should be saved. |
740 | Define your desired path in the evironment variable | 876 | Define your desired path in the evironment variable |
741 | MICROKDEHOME | 877 | MICROKDEHOME |
742 | before starting KO/Pi or KA/Pi. | 878 | before starting KO/Pi or KA/Pi. |
743 | 879 | ||
744 | An easy Kx/Pi to Kx/Pi syncing is now possible | 880 | An easy Kx/Pi to Kx/Pi syncing is now possible |
745 | (it is called Pi-Sync) via network. | 881 | (it is called Pi-Sync) via network. |
746 | Please look at the Sync Howto. | 882 | Please look at the Sync Howto. |
747 | 883 | ||
748 | Exporting of calendar data and contacts to mobile phones is now possible. | 884 | Exporting of calendar data and contacts to mobile phones is now possible. |
749 | The SyncHowto is updated with information howto | 885 | The SyncHowto is updated with information howto |
750 | access/sync mobile phones. | 886 | access/sync mobile phones. |
751 | Please look at the Sync Howto. | 887 | Please look at the Sync Howto. |
752 | 888 | ||
753 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. | 889 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. |
754 | Please disable Fastload for the original contact/calendar applications | 890 | Please disable Fastload for the original contact/calendar applications |
755 | and close them. | 891 | and close them. |
756 | KO/Pi and KA/Pi must be running in order to receive the data. | 892 | KO/Pi and KA/Pi must be running in order to receive the data. |
757 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) | 893 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) |
758 | 894 | ||
759 | In the KA/Pi details view are now the preferred tel. numbers displayed on top | 895 | In the KA/Pi details view are now the preferred tel. numbers displayed on top |
760 | of the other data ( emails/tel.numbers/addresses) | 896 | of the other data ( emails/tel.numbers/addresses) |
761 | 897 | ||
762 | Fixed some syncing problems in KA/Pi. | 898 | Fixed some syncing problems in KA/Pi. |
763 | 899 | ||
764 | Added font settings for the KA/Pi details view. | 900 | Added font settings for the KA/Pi details view. |
765 | Added fields "children's name" and "gender" to KA/Pi. | 901 | Added fields "children's name" and "gender" to KA/Pi. |
766 | 902 | ||
767 | Made searching in KA/Pi better: | 903 | Made searching in KA/Pi better: |
768 | Now the first item in a view is selected after a search automatically and | 904 | Now the first item in a view is selected after a search automatically and |
769 | the views can be scrolled up/down when the search input field has the keyboard focus. | 905 | the views can be scrolled up/down when the search input field has the keyboard focus. |
770 | 906 | ||
771 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. | 907 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. |
772 | 908 | ||
773 | 909 | ||
774 | ********** VERSION 1.9.6 ************ | 910 | ********** VERSION 1.9.6 ************ |
775 | 911 | ||
776 | Changes in the external application communication on the Zaurus | 912 | Changes in the external application communication on the Zaurus |
777 | in order to use less RAM when the apps are running. | 913 | in order to use less RAM when the apps are running. |
778 | First syncing of addressbooks (KA/Pi) is possible. | 914 | First syncing of addressbooks (KA/Pi) is possible. |
779 | 915 | ||
780 | 916 | ||
781 | ********** VERSION 1.9.5a ************ | 917 | ********** VERSION 1.9.5a ************ |
782 | 918 | ||
783 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. | 919 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. |
784 | Fixed some small bugs. | 920 | Fixed some small bugs. |
785 | KA/Pi shows now the birthday in summary view. | 921 | KA/Pi shows now the birthday in summary view. |
786 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi | 922 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi |
787 | for displaying dates. | 923 | for displaying dates. |
788 | 924 | ||
789 | 925 | ||
790 | ********** VERSION 1.9.5 ************ | 926 | ********** VERSION 1.9.5 ************ |
791 | 927 | ||
792 | There is still no Addressbook syncing! | 928 | There is still no Addressbook syncing! |
793 | 929 | ||
794 | New in 1.9.5: | 930 | New in 1.9.5: |
795 | 931 | ||
796 | Many bugfixes. | 932 | Many bugfixes. |
797 | Better searching in KA/Pi. | 933 | Better searching in KA/Pi. |
798 | You can configure in KA/Pi if you want to search only after | 934 | You can configure in KA/Pi if you want to search only after |
799 | <return> key pressed. | 935 | <return> key pressed. |
800 | 936 | ||
801 | Better mail downloading in OM/Pi. | 937 | Better mail downloading in OM/Pi. |
802 | 938 | ||
803 | First experimental alpha version of sync of KO/Pi with mobile phones. | 939 | First experimental alpha version of sync of KO/Pi with mobile phones. |
804 | See gammu documentation for supported phones. | 940 | See gammu documentation for supported phones. |
805 | You 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. | 941 | You 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. |
806 | Quick hint how to use: | 942 | Quick hint how to use: |
807 | NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! | 943 | NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! |
808 | Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. | 944 | Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. |
809 | Create syncprofile - mobile device | 945 | Create syncprofile - mobile device |
810 | Remove entry for model. (Leave empty ). | 946 | Remove entry for model. (Leave empty ). |
811 | Enable infrared on Zaurus and your Phone. | 947 | Enable infrared on Zaurus and your Phone. |
812 | Sync. | 948 | Sync. |
813 | To get a more detailed log, start kopi from konsole. | 949 | To get a more detailed log, start kopi from konsole. |
814 | 950 | ||
815 | ********** VERSION 1.9.4 ************ | 951 | ********** VERSION 1.9.4 ************ |
816 | 952 | ||
817 | This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. | 953 | This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. |
818 | 954 | ||
819 | WARNING: | 955 | WARNING: |
820 | PLEASE BACKUP ALL YOUR DATA! | 956 | PLEASE BACKUP ALL YOUR DATA! |
821 | We have changed a lot and maybe there are some unknown problems. | 957 | We have changed a lot and maybe there are some unknown problems. |
822 | 958 | ||
823 | SYNC HANDLING HAS CHANGED! | 959 | SYNC HANDLING HAS CHANGED! |
824 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. | 960 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. |
825 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). | 961 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). |
826 | 962 | ||
827 | You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. | 963 | You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. |
828 | If 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. | 964 | If 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. |
829 | 965 | ||
830 | As programs are available: | 966 | As programs are available: |
831 | KO/Pi (korganizer ipk) - a calendar program. | 967 | KO/Pi (korganizer ipk) - a calendar program. |
832 | KA/Pi (kaddressbook ipk ) - an addressbook | 968 | KA/Pi (kaddressbook ipk ) - an addressbook |
833 | OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. | 969 | OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. |
834 | 970 | ||
835 | An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. | 971 | An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. |
836 | (If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) | 972 | (If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) |
837 | 973 | ||
838 | All the applications are installed in a "Pim" TAB. | 974 | All the applications are installed in a "Pim" TAB. |
839 | If 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 | 975 | If 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 |
840 | 976 | ||
841 | All the application are integrated. | 977 | All the application are integrated. |
842 | Such 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. | 978 | Such 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. |
843 | 979 | ||
844 | HINT: | 980 | HINT: |
845 | If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. | 981 | If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. |
846 | 982 | ||
847 | What's new? | 983 | What's new? |
848 | 984 | ||
849 | SYNC HANDLING HAS CHANGED! | 985 | SYNC HANDLING HAS CHANGED! |
850 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. | 986 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. |
851 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). | 987 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). |
852 | 988 | ||
853 | New in OM/Pi: | 989 | New in OM/Pi: |
854 | When 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. | 990 | When 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. |
855 | 991 | ||
856 | New in KO/Pi: | 992 | New in KO/Pi: |
857 | French is now available for KO/Pi. | 993 | French is now available for KO/Pi. |
858 | Choose menu:Actions - Configure:TAB locale | 994 | Choose menu:Actions - Configure:TAB locale |
859 | Syncing has changed. | 995 | Syncing has changed. |
860 | Phone sync available soon. | 996 | Phone sync available soon. |
861 | Not much changes, I cannot remember them ... | 997 | Not much changes, I cannot remember them ... |
862 | 998 | ||
863 | New in KA/Pi: | 999 | New in KA/Pi: |
864 | Beaming possible. | 1000 | Beaming possible. |
865 | Sharp DTM readonly access possible( create a new DTM resource ); | 1001 | Sharp DTM readonly access possible( create a new DTM resource ); |
866 | Better searching possible. | 1002 | Better searching possible. |
867 | Search is performed only after pressing the return key. | 1003 | Search is performed only after pressing the return key. |
868 | Use wildcard * to specify parts of a name. | 1004 | Use wildcard * to specify parts of a name. |
869 | 1005 | ||
870 | Better 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 * . | 1006 | Better 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 * . |
871 | 1007 | ||
872 | A big improvement is the new management of the contact access. | 1008 | A big improvement is the new management of the contact access. |
873 | In version 1.9.3, every application was using their own addressbook access data. | 1009 | In version 1.9.3, every application was using their own addressbook access data. |
874 | That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. | 1010 | That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. |
875 | That was wasting of memory, if you had several hundreds of contacts. | 1011 | That was wasting of memory, if you had several hundreds of contacts. |
876 | 1012 | ||
877 | Now only KA/Pi accesses the addressbook. | 1013 | Now only KA/Pi accesses the addressbook. |
878 | If 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. | 1014 | If 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. |
879 | If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. | 1015 | If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. |
880 | That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. | 1016 | That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. |
881 | 1017 | ||
882 | New in the KO/Pi alarm applet: | 1018 | New in the KO/Pi alarm applet: |
883 | Configure your own timer popup menu! | 1019 | Configure your own timer popup menu! |
884 | (Text and minutes for timer countdown) | 1020 | (Text and minutes for timer countdown) |
885 | Just edit the file | 1021 | Just edit the file |
886 | (yourhomedir)/.kopialarmtimerrc | 1022 | (yourhomedir)/.kopialarmtimerrc |
887 | and start/stop a timer to get a new menu with the data of this file. | 1023 | and start/stop a timer to get a new menu with the data of this file. |
888 | 1024 | ||
889 | ********** VERSION 1.9.3 ************ | 1025 | ********** VERSION 1.9.3 ************ |
890 | 1) | 1026 | 1) |
891 | Now KO/Pi on Windows imports directly the calendar data of | 1027 | Now KO/Pi on Windows imports directly the calendar data of |
892 | an installed Outlook. Should work with OL version >= 2000. | 1028 | an installed Outlook. Should work with OL version >= 2000. |
893 | 1029 | ||
894 | ********** VERSION 1.9.2 ************ | 1030 | ********** VERSION 1.9.2 ************ |
895 | 1) | 1031 | 1) |
896 | KDE-Pim/Pi has got a new member: | 1032 | KDE-Pim/Pi has got a new member: |
897 | KmicroMail (KM/Pi) is a mail program, | 1033 | KmicroMail (KM/Pi) is a mail program, |
898 | which can handle IMAP and POP mail access. | 1034 | which can handle IMAP and POP mail access. |
899 | It is based on Opie-Mail v3. | 1035 | It is based on Opie-Mail v3. |
900 | All dependencies to the Opie libraries ar removed, | 1036 | All dependencies to the Opie libraries ar removed, |
901 | such that no additional Opie lib is needed. | 1037 | such that no additional Opie lib is needed. |
902 | It is already integrated in KO/Pi and KA/Pi. | 1038 | It is already integrated in KO/Pi and KA/Pi. |
903 | It it now available for the Zaurus,probably it | 1039 | It it now available for the Zaurus,probably it |
904 | will be available for other platforms later. | 1040 | will be available for other platforms later. |
905 | Hint: | 1041 | Hint: |
906 | Create your own contact (name + email) | 1042 | Create your own contact (name + email) |
907 | in KA/Pi, select this contact and choose menu: | 1043 | in KA/Pi, select this contact and choose menu: |
908 | Settings - Set Who Am I. | 1044 | Settings - Set Who Am I. |
909 | Now the settings of this contact are used as | 1045 | Now the settings of this contact are used as |
910 | the sender data in KM/Pi. | 1046 | the sender data in KM/Pi. |
911 | 2) | 1047 | 2) |
912 | KDE-Pim/Pi is split up in five different | 1048 | KDE-Pim/Pi is split up in five different |
913 | packages now precompiled for Sharp Zaurus: | 1049 | packages now precompiled for Sharp Zaurus: |
914 | --kmicrokdelibs_1.9.2_arm.ipk | 1050 | --kmicrokdelibs_1.9.2_arm.ipk |
915 | The libs are needed for any | 1051 | The libs are needed for any |
916 | of the following programs: | 1052 | of the following programs: |
917 | --kaddressbook_1.9.2_arm.ipk | 1053 | --kaddressbook_1.9.2_arm.ipk |
918 | --kmicromail_1.9.2_arm.ipk | 1054 | --kmicromail_1.9.2_arm.ipk |
919 | --korganizer_1.9.2_arm.ipk | 1055 | --korganizer_1.9.2_arm.ipk |
920 | Independ from that, there is the alarm applet | 1056 | Independ from that, there is the alarm applet |
921 | available for KO/Pi, which also offers | 1057 | available for KO/Pi, which also offers |
922 | quick access for a new mail or | 1058 | quick access for a new mail or |
923 | showing the addressbook.: | 1059 | showing the addressbook.: |
924 | --korganizer-alarm_1.9.2_arm.ipk | 1060 | --korganizer-alarm_1.9.2_arm.ipk |
925 | Independend means, that the alarm applet | 1061 | Independend means, that the alarm applet |
926 | does not need any of the libs or programs above to run. | 1062 | does not need any of the libs or programs above to run. |
927 | But it would be quite useless without these programs. | 1063 | But it would be quite useless without these programs. |
928 | NOTE: | 1064 | NOTE: |
929 | If you get a | 1065 | If you get a |
930 | "This application depends on other programs" | 1066 | "This application depends on other programs" |
931 | during installation of | 1067 | during installation of |
932 | --kmicrokdelibs_1.9.2_arm.ipk | 1068 | --kmicrokdelibs_1.9.2_arm.ipk |
933 | you probably do not have to care about that. | 1069 | you probably do not have to care about that. |
934 | kmicrokdelibs_1.9.2 will come with some | 1070 | kmicrokdelibs_1.9.2 will come with some |
935 | resource plugins, which needs additional libraries. | 1071 | resource plugins, which needs additional libraries. |
936 | (E.g. libopie1, if you want to use the | 1072 | (E.g. libopie1, if you want to use the |
937 | opie resource connector in KA/Pi). | 1073 | opie resource connector in KA/Pi). |
938 | If you do not have this libraries installed, | 1074 | If you do not have this libraries installed, |
939 | you simply cannot use the resource. | 1075 | you simply cannot use the resource. |
940 | To make it clear: | 1076 | To make it clear: |
941 | If the libraries are missing, the applications | 1077 | If the libraries are missing, the applications |
942 | using kmicrokdelibs will start, | 1078 | using kmicrokdelibs will start, |
943 | because the resources are plugins. | 1079 | because the resources are plugins. |
944 | 3) | 1080 | 3) |
945 | KO/Pi and friends are now installable on SD-Card! | 1081 | KO/Pi and friends are now installable on SD-Card! |
946 | It is recommended to install all libs and apps | 1082 | It is recommended to install all libs and apps |
947 | on the SD card or all in the internal storage. | 1083 | on the SD card or all in the internal storage. |
948 | There may be problems, if this is mixed. | 1084 | There may be problems, if this is mixed. |
949 | 4) | 1085 | 4) |
950 | Fixed two bugs in the alarm notification on Windows. | 1086 | Fixed two bugs in the alarm notification on Windows. |
951 | 5) | 1087 | 5) |
952 | Great improvement! | 1088 | Great improvement! |
953 | KO/Pi uses now the latest version of libical. | 1089 | KO/Pi uses now the latest version of libical. |
954 | Libical is the library which actually reads | 1090 | Libical is the library which actually reads |
955 | the calendar files and extract the data from it. | 1091 | the calendar files and extract the data from it. |
956 | With the old version, there were problems | 1092 | With the old version, there were problems |
957 | (crashes or program hangs) when licical did read | 1093 | (crashes or program hangs) when licical did read |
958 | files, which were not stored from KO/Pi. | 1094 | files, which were not stored from KO/Pi. |
959 | I do not know, if the new libical works perfect, | 1095 | I do not know, if the new libical works perfect, |
960 | but actually it works much better than | 1096 | but actually it works much better than |
961 | the old version. | 1097 | the old version. |
962 | There are no problems with compatibility with | 1098 | There are no problems with compatibility with |
963 | old calendar files of KO/Pi, of course! | 1099 | old calendar files of KO/Pi, of course! |
964 | 6) | 1100 | 6) |
965 | New in KA/Pi: | 1101 | New in KA/Pi: |
966 | Opie addressbook resource connector available! | 1102 | Opie addressbook resource connector available! |
967 | You will need libopie1 and the opie addressbook, | 1103 | You will need libopie1 and the opie addressbook, |
968 | of course. | 1104 | of course. |
969 | With the Opie addressbook resource connector, | 1105 | With the Opie addressbook resource connector, |
970 | you can access the Opie addressbook readonly in KA/Pi. | 1106 | you can access the Opie addressbook readonly in KA/Pi. |
971 | If you want to edit or import the data into KA/Pi, | 1107 | If you want to edit or import the data into KA/Pi, |
972 | do this: | 1108 | do this: |
973 | a) Create an Opie resource. | 1109 | a) Create an Opie resource. |
974 | (Menu: Settings-Configure Resources). | 1110 | (Menu: Settings-Configure Resources). |
975 | After configuration and restarting KA/Pi you should see | 1111 | After configuration and restarting KA/Pi you should see |
976 | the Opie contacts in KA/Pi. | 1112 | the Opie contacts in KA/Pi. |
977 | b) Select some or all Opie contacts. | 1113 | b) Select some or all Opie contacts. |
978 | (NOTE: +++++ | 1114 | (NOTE: +++++ |
979 | To know exactly, what contacts are Opie contacts, | 1115 | To know exactly, what contacts are Opie contacts, |
980 | do this: Choose menu: | 1116 | do this: Choose menu: |
981 | View-Modify View - TAB Fields. | 1117 | View-Modify View - TAB Fields. |
982 | Select in the above list "Resource" and click | 1118 | Select in the above list "Resource" and click |
983 | down arrow to add it to the "Selected fields". | 1119 | down arrow to add it to the "Selected fields". |
984 | Click OK. | 1120 | Click OK. |
985 | Now you have a new column "Resource" in your list, | 1121 | Now you have a new column "Resource" in your list, |
986 | where you can see, what an Opie resource is. | 1122 | where you can see, what an Opie resource is. |
987 | ++++ NOTE end.) | 1123 | ++++ NOTE end.) |
988 | Ok, we do have now some Opie contacts seleted. | 1124 | Ok, we do have now some Opie contacts seleted. |
989 | (Use SHIFT or CTRL key in order to multiple select). | 1125 | (Use SHIFT or CTRL key in order to multiple select). |
990 | c) Choose menu: Edit-Copy. | 1126 | c) Choose menu: Edit-Copy. |
991 | d) Choose menu: Edit-Paste. | 1127 | d) Choose menu: Edit-Paste. |
992 | e) Select the resource, you want to add the contacts to. | 1128 | e) Select the resource, you want to add the contacts to. |
993 | Congrats! Now you have read/write access to the copied | 1129 | Congrats! Now you have read/write access to the copied |
994 | opie contacts as "real" KA/Pi contacts. | 1130 | opie contacts as "real" KA/Pi contacts. |
995 | 1131 | ||
996 | 1132 | ||
997 | ********** VERSION 1.9.1 ************ | 1133 | ********** VERSION 1.9.1 ************ |
998 | 1) | 1134 | 1) |
999 | +++ IMPORTANT 1 +++ | 1135 | +++ IMPORTANT 1 +++ |
1000 | 1136 | ||
1001 | The storing place of the default calendar | 1137 | The storing place of the default calendar |
1002 | file has changed! | 1138 | file has changed! |
1003 | The default calendar file was | 1139 | The default calendar file was |
1004 | Applications/korganizer/mycalendar.ics | 1140 | Applications/korganizer/mycalendar.ics |
1005 | on Zaurus and | 1141 | on Zaurus and |
1006 | (yourHomeDir)/korganizer/mycalendar.ics | 1142 | (yourHomeDir)/korganizer/mycalendar.ics |
1007 | on Windows/Linux desktop. Now it is | 1143 | on Windows/Linux desktop. Now it is |
1008 | (yourHomeDir)/kdepim/korganizer/mycalendar.ics | 1144 | (yourHomeDir)/kdepim/korganizer/mycalendar.ics |
1009 | on Zaurus, Windows and Linux. | 1145 | on Zaurus, Windows and Linux. |
1010 | To load the old file, choose menu | 1146 | To load the old file, choose menu |
1011 | File-Load calendar backup. | 1147 | File-Load calendar backup. |
1012 | (It should be loaded automatically | 1148 | (It should be loaded automatically |
1013 | at startup with a warning message displayed). | 1149 | at startup with a warning message displayed). |
1014 | The place of the configuration file has changed too. | 1150 | The place of the configuration file has changed too. |
1015 | If you want to use your old KO/Pi config, | 1151 | If you want to use your old KO/Pi config, |
1016 | copy it to | 1152 | copy it to |
1017 | (yourHomeDir)/kdepim/config/korganizerrc | 1153 | (yourHomeDir)/kdepim/config/korganizerrc |
1018 | Please read VERSION 1.9.0 - topic 3) as well! | 1154 | Please read VERSION 1.9.0 - topic 3) as well! |
1019 | 1155 | ||
1020 | +++ IMPORTANT 2 +++ | 1156 | +++ IMPORTANT 2 +++ |
1021 | 1157 | ||
1022 | Because of the new paths, you will need | 1158 | Because of the new paths, you will need |
1023 | a new version of the KO/Pi alarm applet | 1159 | a new version of the KO/Pi alarm applet |
1024 | for Zaurus. | 1160 | for Zaurus. |
1025 | Use version >= 1.9.1 | 1161 | Use version >= 1.9.1 |
1026 | 1162 | ||
1027 | 2) | 1163 | 2) |
1028 | Now the QWhat'sThis Icon works for items | 1164 | Now the QWhat'sThis Icon works for items |
1029 | in the month view as well. | 1165 | in the month view as well. |
1030 | (See VERSION 1.7.8 Topic 1) ). | 1166 | (See VERSION 1.7.8 Topic 1) ). |
1031 | 3) | 1167 | 3) |
1032 | You can import birtsdays/anniversaries | 1168 | You can import birtsdays/anniversaries |
1033 | from KA/Pi into KO/Pi. | 1169 | from KA/Pi into KO/Pi. |
1034 | Choose menu File-Import birthdays. | 1170 | Choose menu File-Import birthdays. |
1035 | If you import twice, already imported items | 1171 | If you import twice, already imported items |
1036 | will not be imported again, if they | 1172 | will not be imported again, if they |
1037 | have not been changed in KO/Pi. | 1173 | have not been changed in KO/Pi. |
1038 | 4) | 1174 | 4) |
1039 | When syncing with sharp DTM, now a progress | 1175 | When syncing with sharp DTM, now a progress |
1040 | is shown, when the data is written back. | 1176 | is shown, when the data is written back. |
1041 | If there is much data in KO/Pi and no data | 1177 | If there is much data in KO/Pi and no data |
1042 | in DTM, that can take a long time. | 1178 | in DTM, that can take a long time. |
1043 | (But only for the first time ). | 1179 | (But only for the first time ). |
1044 | 5) | 1180 | 5) |
1045 | In the search dialog, you can search | 1181 | In the search dialog, you can search |
1046 | now for the name/email of an attendee | 1182 | now for the name/email of an attendee |
1047 | of an event/todo. | 1183 | of an event/todo. |
1048 | To get more space for displaying | 1184 | To get more space for displaying |
1049 | search results, the buttons | 1185 | search results, the buttons |
1050 | for "search" and "close" on the | 1186 | for "search" and "close" on the |
1051 | bottom are removed in the PDA version. | 1187 | bottom are removed in the PDA version. |
1052 | You have to click OK in the top right | 1188 | You have to click OK in the top right |
1053 | corner to do a search. | 1189 | corner to do a search. |
1054 | 6) | 1190 | 6) |
1055 | Now it is possible to disable the displaying | 1191 | Now it is possible to disable the displaying |
1056 | of todo items in the Allday part of the Agenda. | 1192 | of todo items in the Allday part of the Agenda. |
1057 | Choose Menu Action-Configure, | 1193 | Choose Menu Action-Configure, |
1058 | TAB Todo View, checkbox | 1194 | TAB Todo View, checkbox |
1059 | "Allday Agenda view shows todos" | 1195 | "Allday Agenda view shows todos" |
1060 | 7) | 1196 | 7) |
1061 | If FastLoad is enabled, now the settings and the | 1197 | If FastLoad is enabled, now the settings and the |
1062 | calendar data are saved, when KO/Pi is closed. | 1198 | calendar data are saved, when KO/Pi is closed. |
1063 | (If no Fastload is enabled, KO/Pi saves | 1199 | (If no Fastload is enabled, KO/Pi saves |
1064 | the data as well, of course) | 1200 | the data as well, of course) |
1065 | 8) | 1201 | 8) |
1066 | The Agenda View has a minimize-splitter now, | 1202 | The Agenda View has a minimize-splitter now, |
1067 | such that the height of the allday part can be | 1203 | such that the height of the allday part can be |
1068 | changed quickly. | 1204 | changed quickly. |
1069 | 1205 | ||
1070 | ********** VERSION 1.9.0 ************ | 1206 | ********** VERSION 1.9.0 ************ |
1071 | 1) | 1207 | 1) |
1072 | KO/Pi is now merged with the new microKDE from KA/Pi. | 1208 | KO/Pi is now merged with the new microKDE from KA/Pi. |
1073 | KO/Pi accesses now KA/Pi as the addressbook. | 1209 | KO/Pi accesses now KA/Pi as the addressbook. |
1074 | The other ddressbook-plugins are not working any longer. | 1210 | The other ddressbook-plugins are not working any longer. |
1075 | (It is planned, that later KA/Pi itself uses these plugins) | 1211 | (It is planned, that later KA/Pi itself uses these plugins) |
1076 | New versions of KO/Pi are only available | 1212 | New versions of KO/Pi are only available |
1077 | together with KA/Pi as the KDE-Pim/Pi package. | 1213 | together with KA/Pi as the KDE-Pim/Pi package. |
1078 | 2) | 1214 | 2) |
1079 | If you click on an attendee of a meeting in the | 1215 | If you click on an attendee of a meeting in the |
1080 | event viewer, a detailed summary of the | 1216 | event viewer, a detailed summary of the |
1081 | attendee is shown. | 1217 | attendee is shown. |
1082 | 3) | 1218 | 3) |
1083 | The place of the configuration file has changed. | 1219 | The place of the configuration file has changed. |
1084 | If you want to use your old KO/Pi config, copy | 1220 | If you want to use your old KO/Pi config, copy |
1085 | Applications/korganizer/config_korganizerrc | 1221 | Applications/korganizer/config_korganizerrc |
1086 | to | 1222 | to |
1087 | Applications/korganizer/config/korganizerrc | 1223 | Applications/korganizer/config/korganizerrc |
1088 | 1224 | ||
1089 | ********** VERSION 1.7.8 ************ | 1225 | ********** VERSION 1.7.8 ************ |
1090 | 1) | 1226 | 1) |
1091 | Now the QWhat'sThis ist working. | 1227 | Now the QWhat'sThis ist working. |
1092 | Enable the QWhat'sThis icon in the toolbar. | 1228 | Enable the QWhat'sThis icon in the toolbar. |
1093 | (You have to restart to reload the changed toolbar config). | 1229 | (You have to restart to reload the changed toolbar config). |
1094 | Now click on the QWhat'sThis Icon | 1230 | Now click on the QWhat'sThis Icon |
1095 | in the top right corner of KO/Pi. | 1231 | in the top right corner of KO/Pi. |
1096 | Then click on an item in the Agenda View: | 1232 | Then click on an item in the Agenda View: |
1097 | You will get a detailed display of the items content. | 1233 | You will get a detailed display of the items content. |
1098 | 2) | 1234 | 2) |
1099 | Some other very minor changes. | 1235 | Some other very minor changes. |
1100 | But I have forgotten the details ... | 1236 | But I have forgotten the details ... |
1101 | For that reason I start this log here: | 1237 | For that reason I start this log here: |
1102 | To document my changes, when I am doing it. | 1238 | To document my changes, when I am doing it. |
1103 | 1239 | ||
1104 | ********** VERSION 1.7.7 ************ | 1240 | ********** VERSION 1.7.7 ************ |
1105 | Stable Version of KO/Pi | 1241 | Stable Version of KO/Pi |
diff --git a/desktop/rpm/kdepim_rpm b/desktop/rpm/kdepim_rpm index 3889b6f..3b6b52e 100644 --- a/desktop/rpm/kdepim_rpm +++ b/desktop/rpm/kdepim_rpm | |||
@@ -1,84 +1,84 @@ | |||
1 | Summary: A collection of PIM programs | 1 | Summary: A collection of PIM programs |
2 | Name: KDE-Pim-Pi | 2 | Name: KDE-Pim-Pi |
3 | Version: 2.0.28 | 3 | Version: 2.1.0 |
4 | Release: SuSE_9.2 | 4 | Release: SuSE_9.2 |
5 | Copyright:GPL | 5 | Copyright:GPL |
6 | Group: Productivity/Pim | 6 | Group: Productivity/Pim |
7 | Source:http://sourceforge.net/projects/kdepimpi/ | 7 | Source:http://sourceforge.net/projects/kdepimpi/ |
8 | URL:http://sourceforge.net/projects/kdepimpi/ | 8 | URL:http://sourceforge.net/projects/kdepimpi/ |
9 | Packager: zautrix | 9 | Packager: zautrix |
10 | 10 | ||
11 | %description | 11 | %description |
12 | This package contains the platform-independent PIM programs from | 12 | This package contains the platform-independent PIM programs from |
13 | www.pi-sync.info, compiled for SuSE 9.2: | 13 | www.pi-sync.info, compiled for SuSE 9.2: |
14 | KTimeTacker/Pi | 14 | KTimeTacker/Pi |
15 | KPhone/Pi | 15 | KPhone/Pi |
16 | KAddressbook/Pi | 16 | KAddressbook/Pi |
17 | KOrganizer/Pi | 17 | KOrganizer/Pi |
18 | PasswordManager/Pi | 18 | PasswordManager/Pi |
19 | KOPieMail/Pi | 19 | KOPieMail/Pi |
20 | 20 | ||
21 | These applications do not need anything from the KDE-desktop | 21 | These applications do not need anything from the KDE-desktop |
22 | at all to run on Linux. However, there is a dependency from | 22 | at all to run on Linux. However, there is a dependency from |
23 | two KDE libs, because a small command line program is included | 23 | two KDE libs, because a small command line program is included |
24 | to make it possible to sync with the KDE-desktop applications. | 24 | to make it possible to sync with the KDE-desktop applications. |
25 | 25 | ||
26 | These applications are independent from the KDE-desktop | 26 | These applications are independent from the KDE-desktop |
27 | environment. That means, nothing of your existing | 27 | environment. That means, nothing of your existing |
28 | KDE-desktop setup will be changed, or any data | 28 | KDE-desktop setup will be changed, or any data |
29 | (calendar-addressbook) used by the KDE-desktop | 29 | (calendar-addressbook) used by the KDE-desktop |
30 | applications will be changed or accessed. | 30 | applications will be changed or accessed. |
31 | These applications stores their data and config in | 31 | These applications stores their data and config in |
32 | $HOME/kdepim/ | 32 | $HOME/kdepim/ |
33 | However, because the same file format is used, | 33 | However, because the same file format is used, |
34 | an easy exchange of data with the KDE-desktop | 34 | an easy exchange of data with the KDE-desktop |
35 | is possible. | 35 | is possible. |
36 | A small command line program is included | 36 | A small command line program is included |
37 | to make it possible to sync with the KDE-desktop applications. | 37 | to make it possible to sync with the KDE-desktop applications. |
38 | You do not need to call this program from the commandline, | 38 | You do not need to call this program from the commandline, |
39 | it is called from the KDE-Pim/Pi apps when you choose there: | 39 | it is called from the KDE-Pim/Pi apps when you choose there: |
40 | Sync with KDE_Desktop. | 40 | Sync with KDE_Desktop. |
41 | If something is going wrong, please start the | 41 | If something is going wrong, please start the |
42 | KDE-Pim/Pi program itself from the console to get detailed output. | 42 | KDE-Pim/Pi program itself from the console to get detailed output. |
43 | 43 | ||
44 | After installation, you should have a | 44 | After installation, you should have a |
45 | PIM-pi | 45 | PIM-pi |
46 | folder in your KDE start menu, where you can | 46 | folder in your KDE start menu, where you can |
47 | start the applications from. | 47 | start the applications from. |
48 | 48 | ||
49 | These programs makes it possible to sync your Zaurus easily | 49 | These programs makes it possible to sync your Zaurus easily |
50 | (with the KDE-Pim/Pi programs running on the Zaurus) | 50 | (with the KDE-Pim/Pi programs running on the Zaurus) |
51 | with the KDE-desktop calendar/addressbook data. | 51 | with the KDE-desktop calendar/addressbook data. |
52 | If you want to use that, you have to update your | 52 | If you want to use that, you have to update your |
53 | KDE-desktop to version 3.3.0 or higher. | 53 | KDE-desktop to version 3.3.0 or higher. |
54 | SuSE 9.2 contains KDE 3.3.0 such that no update is needed. | 54 | SuSE 9.2 contains KDE 3.3.0 such that no update is needed. |
55 | Actually - after the (non difficult) configuration is set up - | 55 | Actually - after the (non difficult) configuration is set up - |
56 | with two mouseklicks on the Zaurus, | 56 | with two mouseklicks on the Zaurus, |
57 | the Zaurus syncs with the corresponding KDE-Pim/Pi | 57 | the Zaurus syncs with the corresponding KDE-Pim/Pi |
58 | program on the Linux Desktop which syncs automatically | 58 | program on the Linux Desktop which syncs automatically |
59 | with the KDE-desktop data. | 59 | with the KDE-desktop data. |
60 | 60 | ||
61 | If you want to use the KDE-desktop calendar/addressbook applications, | 61 | If you want to use the KDE-desktop calendar/addressbook applications, |
62 | just install these apps in this package and use them as a syncing tool for the | 62 | just install these apps in this package and use them as a syncing tool for the |
63 | Zaurus <-> KDE-desktop sync. | 63 | Zaurus <-> KDE-desktop sync. |
64 | The sync requires a network connection from your Zaurus to | 64 | The sync requires a network connection from your Zaurus to |
65 | the PC. A detailed Sync HowTo is available in the | 65 | the PC. A detailed Sync HowTo is available in the |
66 | Help menu of the applications. | 66 | Help menu of the applications. |
67 | 67 | ||
68 | These applications makes it also possible, that you can sync | 68 | These applications makes it also possible, that you can sync |
69 | (or just export the data to) your mobile phone with your | 69 | (or just export the data to) your mobile phone with your |
70 | data of the KDE-desktop calendar/addressbook applications. | 70 | data of the KDE-desktop calendar/addressbook applications. |
71 | This is tested and working for Nokia mobile phones, | 71 | This is tested and working for Nokia mobile phones, |
72 | it may work with others as well. | 72 | it may work with others as well. |
73 | (More info about that: -> Sync HowTo) | 73 | (More info about that: -> Sync HowTo) |
74 | 74 | ||
75 | NOTE: | 75 | NOTE: |
76 | When using SuSE 9.1 you have to update your KDE to 3.3.x | 76 | When using SuSE 9.1 you have to update your KDE to 3.3.x |
77 | and you have to make an online update in SuSE 9.1 to make it | 77 | and you have to make an online update in SuSE 9.1 to make it |
78 | possible to get the infrared connection working, such that | 78 | possible to get the infrared connection working, such that |
79 | you can sync your (Nokia) mobile phone via infrared. | 79 | you can sync your (Nokia) mobile phone via infrared. |
80 | 80 | ||
81 | %files | 81 | %files |
82 | /opt/kde3/share/applnk/PIM-pi/ | 82 | /opt/kde3/share/applnk/PIM-pi/ |
83 | /opt/kdepimpi/ | 83 | /opt/kdepimpi/ |
84 | /usr/lib/libmicro* | 84 | /usr/lib/libmicro* |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f39b5e1..c8c2f28 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -1,785 +1,797 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qcstring.h> | 20 | #include <qcstring.h> |
21 | #include <qwhatsthis.h> | 21 | #include <qwhatsthis.h> |
22 | #include <qdialog.h> | 22 | #include <qdialog.h> |
23 | #include <qapplication.h> | 23 | #include <qapplication.h> |
24 | #include <qlabel.h> | 24 | #include <qlabel.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | 26 | ||
27 | #include <klocale.h> | 27 | #include <klocale.h> |
28 | #include <kapplication.h> | 28 | #include <kapplication.h> |
29 | #include <libkcal/event.h> | 29 | #include <libkcal/event.h> |
30 | #include <libkcal/todo.h> | 30 | #include <libkcal/todo.h> |
31 | #include <kdebug.h> | 31 | #include <kdebug.h> |
32 | #include <kiconloader.h> | 32 | #include <kiconloader.h> |
33 | #include <krun.h> | 33 | #include <krun.h> |
34 | #include <kglobal.h> | 34 | #include <kglobal.h> |
35 | #include <kprocess.h> | 35 | #include <kprocess.h> |
36 | #include "koprefs.h" | 36 | #include "koprefs.h" |
37 | 37 | ||
38 | #include <kabc/stdaddressbook.h> | 38 | #include <kabc/stdaddressbook.h> |
39 | 39 | ||
40 | #ifndef KORG_NODCOP | 40 | #ifndef KORG_NODCOP |
41 | #include <dcopclient.h> | 41 | #include <dcopclient.h> |
42 | #include "korganizer.h" | 42 | #include "korganizer.h" |
43 | #include "koprefs.h" | 43 | #include "koprefs.h" |
44 | #include "actionmanager.h" | 44 | #include "actionmanager.h" |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #include "koeventviewer.h" | 47 | #include "koeventviewer.h" |
48 | //#ifndef KORG_NOKABC | 48 | //#ifndef KORG_NOKABC |
49 | //#include <kabc/stdaddressbook.h> | 49 | //#include <kabc/stdaddressbook.h> |
50 | //#define size count | 50 | //#define size count |
51 | //#endif | 51 | //#endif |
52 | 52 | ||
53 | #ifdef DESKTOP_VERSION | 53 | #ifdef DESKTOP_VERSION |
54 | #include <kabc/addresseedialog.h> | 54 | #include <kabc/addresseedialog.h> |
55 | #include <kabc/addresseeview.h> | 55 | #include <kabc/addresseeview.h> |
56 | #include <qprinter.h> | 56 | #include <qprinter.h> |
57 | #include <qpainter.h> | 57 | #include <qpainter.h> |
58 | #include <qpaintdevicemetrics.h> | 58 | #include <qpaintdevicemetrics.h> |
59 | #else //DESKTOP_VERSION | 59 | #else //DESKTOP_VERSION |
60 | #include <externalapphandler.h> | 60 | #include <externalapphandler.h> |
61 | #include <qtopia/qcopenvelope_qws.h> | 61 | #include <qtopia/qcopenvelope_qws.h> |
62 | #endif //DESKTOP_VERSION | 62 | #endif //DESKTOP_VERSION |
63 | 63 | ||
64 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) | 64 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) |
65 | : QTextBrowser(parent,name) | 65 | : QTextBrowser(parent,name) |
66 | { | 66 | { |
67 | mSyncMode = false; | 67 | mSyncMode = false; |
68 | mColorMode = 0; | 68 | mColorMode = 0; |
69 | } | 69 | } |
70 | 70 | ||
71 | KOEventViewer::~KOEventViewer() | 71 | KOEventViewer::~KOEventViewer() |
72 | { | 72 | { |
73 | } | 73 | } |
74 | 74 | ||
75 | void KOEventViewer::printMe() | 75 | void KOEventViewer::printMe() |
76 | { | 76 | { |
77 | #ifdef DESKTOP_VERSION | 77 | #ifdef DESKTOP_VERSION |
78 | 78 | ||
79 | KOPrintPrefs pp ( this ); | 79 | KOPrintPrefs pp ( this ); |
80 | if (!pp.exec() ) | 80 | if (!pp.exec() ) |
81 | return; | 81 | return; |
82 | int scaleval = pp.printMode() ; | 82 | int scaleval = pp.printMode() ; |
83 | 83 | ||
84 | QPrinter printer; | 84 | QPrinter printer; |
85 | if (!printer.setup() ) | 85 | if (!printer.setup() ) |
86 | return; | 86 | return; |
87 | QPainter p; | 87 | QPainter p; |
88 | p.begin ( &printer ); | 88 | p.begin ( &printer ); |
89 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); | 89 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); |
90 | float dx, dy; | 90 | float dx, dy; |
91 | int wid = (m.width() * 9)/10; | 91 | int wid = (m.width() * 9)/10; |
92 | dx = (float) wid/(float)contentsWidth (); | 92 | dx = (float) wid/(float)contentsWidth (); |
93 | dy = (float)(m.height()) / (float)contentsHeight (); | 93 | dy = (float)(m.height()) / (float)contentsHeight (); |
94 | float scale; | 94 | float scale; |
95 | // scale to fit the width or height of the paper | 95 | // scale to fit the width or height of the paper |
96 | if ( dx < dy ) | 96 | if ( dx < dy ) |
97 | scale = dx; | 97 | scale = dx; |
98 | else | 98 | else |
99 | scale = dy; | 99 | scale = dy; |
100 | 100 | ||
101 | p.translate( m.width()/10,0 ); | 101 | p.translate( m.width()/10,0 ); |
102 | if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { | 102 | if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { |
103 | p.scale( scale, scale ); | 103 | p.scale( scale, scale ); |
104 | } | 104 | } |
105 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); | 105 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); |
106 | p.end(); | 106 | p.end(); |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | } | 109 | } |
110 | void KOEventViewer::setSource(const QString& n) | 110 | void KOEventViewer::setSource(const QString& n) |
111 | { | 111 | { |
112 | 112 | ||
113 | if ( n.left(3) == "uid" ) | 113 | if ( n.left(3) == "uid" ) |
114 | #ifdef DESKTOP_VERSION | 114 | #ifdef DESKTOP_VERSION |
115 | { | 115 | { |
116 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 116 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
117 | KABC::AddressBook::Iterator it; | 117 | KABC::AddressBook::Iterator it; |
118 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 118 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
119 | // LR I do not understand, why the uid string is different on zaurus and desktop | 119 | // LR I do not understand, why the uid string is different on zaurus and desktop |
120 | QString uid = "uid://"+(*it).uid(); | 120 | QString uid = "uid://"+(*it).uid(); |
121 | 121 | ||
122 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); | 122 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); |
123 | if (n == uid ) { | 123 | if (n == uid ) { |
124 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); | 124 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); |
125 | QDialog dia( this,"dia123", true ); | 125 | QDialog dia( this,"dia123", true ); |
126 | dia.setCaption( i18n("Details of attendee") ); | 126 | dia.setCaption( i18n("Details of attendee") ); |
127 | QVBoxLayout lay ( &dia ); | 127 | QVBoxLayout lay ( &dia ); |
128 | KABC::AddresseeView av ( &dia ); | 128 | KABC::AddresseeView av ( &dia ); |
129 | av.setAddressee( (*it) ); | 129 | av.setAddressee( (*it) ); |
130 | lay.addWidget( &av ); | 130 | lay.addWidget( &av ); |
131 | if ( QApplication::desktop()->width() < 480 ) | 131 | if ( QApplication::desktop()->width() < 480 ) |
132 | dia.resize( 220, 240); | 132 | dia.resize( 220, 240); |
133 | else { | 133 | else { |
134 | dia.resize( 400,400); | 134 | dia.resize( 400,400); |
135 | } | 135 | } |
136 | dia.exec(); | 136 | dia.exec(); |
137 | break; | 137 | break; |
138 | } | 138 | } |
139 | } | 139 | } |
140 | return; | 140 | return; |
141 | } | 141 | } |
142 | #else | 142 | #else |
143 | { | 143 | { |
144 | if ( "uid:organizer" == n ) { | 144 | if ( "uid:organizer" == n ) { |
145 | ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); | 145 | ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); |
146 | return; | 146 | return; |
147 | } | 147 | } |
148 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); | 148 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); |
149 | if (attendees.count()) { | 149 | if (attendees.count()) { |
150 | Attendee *a; | 150 | Attendee *a; |
151 | for(a=attendees.first();a;a=attendees.next()) { | 151 | for(a=attendees.first();a;a=attendees.next()) { |
152 | if ( "uid:"+a->uid() == n ) { | 152 | if ( "uid:"+a->uid() == n ) { |
153 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); | 153 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); |
154 | return; | 154 | return; |
155 | } | 155 | } |
156 | } | 156 | } |
157 | } | 157 | } |
158 | return; | 158 | return; |
159 | } | 159 | } |
160 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 160 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
161 | // the result should now arrive through method insertAttendees | 161 | // the result should now arrive through method insertAttendees |
162 | //QString uid = "uid:"+(*it).uid(); | 162 | //QString uid = "uid:"+(*it).uid(); |
163 | #endif | 163 | #endif |
164 | if ( n.left(6) == "mailto" ) { | 164 | if ( n.left(6) == "mailto" ) { |
165 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); | 165 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); |
166 | #ifndef DESKTOP_VERSION | 166 | #ifndef DESKTOP_VERSION |
167 | if ( n.mid(7,3) == "ALL" ) { | 167 | if ( n.mid(7,3) == "ALL" ) { |
168 | mailToAttendees( true ); | 168 | mailToAttendees( true ); |
169 | } else if ( n.mid(7,4) == "RSVP" ) { | 169 | } else if ( n.mid(7,4) == "RSVP" ) { |
170 | mailToAttendees( false ); | 170 | mailToAttendees( false ); |
171 | } else { | 171 | } else { |
172 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); | 172 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); |
173 | e << n.mid(7); | 173 | e << n.mid(7); |
174 | } | 174 | } |
175 | #endif | 175 | #endif |
176 | 176 | ||
177 | } | 177 | } |
178 | 178 | ||
179 | 179 | ||
180 | #ifndef KORG_NODCOP | 180 | #ifndef KORG_NODCOP |
181 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; | 181 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; |
182 | QString tmpStr; | 182 | QString tmpStr; |
183 | if (n.startsWith("mailto:")) { | 183 | if (n.startsWith("mailto:")) { |
184 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); | 184 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); |
185 | //emit showIncidence(n); | 185 | //emit showIncidence(n); |
186 | return; | 186 | return; |
187 | } else if (n.startsWith("uid:")) { | 187 | } else if (n.startsWith("uid:")) { |
188 | DCOPClient *client = KApplication::kApplication()->dcopClient(); | 188 | DCOPClient *client = KApplication::kApplication()->dcopClient(); |
189 | const QByteArray noParamData; | 189 | const QByteArray noParamData; |
190 | const QByteArray paramData; | 190 | const QByteArray paramData; |
191 | QByteArray replyData; | 191 | QByteArray replyData; |
192 | QCString replyTypeStr; | 192 | QCString replyTypeStr; |
193 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) | 193 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) |
194 | bool foundAbbrowser = PING_ABBROWSER; | 194 | bool foundAbbrowser = PING_ABBROWSER; |
195 | 195 | ||
196 | if (foundAbbrowser) { | 196 | if (foundAbbrowser) { |
197 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor | 197 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor |
198 | //client->send("kaddressbook","KAddressBookIface", | 198 | //client->send("kaddressbook","KAddressBookIface", |
199 | QDataStream arg(paramData, IO_WriteOnly); | 199 | QDataStream arg(paramData, IO_WriteOnly); |
200 | arg << n.mid(6); | 200 | arg << n.mid(6); |
201 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); | 201 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); |
202 | return; | 202 | return; |
203 | } else { | 203 | } else { |
204 | /* | 204 | /* |
205 | KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. | 205 | KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. |
206 | We start it without its main interface | 206 | We start it without its main interface |
207 | */ | 207 | */ |
208 | KIconLoader* iconLoader = new KIconLoader(); | 208 | KIconLoader* iconLoader = new KIconLoader(); |
209 | QString iconPath = iconLoader->iconPath("go",KIcon::Small); | 209 | QString iconPath = iconLoader->iconPath("go",KIcon::Small); |
210 | ActionManager::setStartedKAddressBook(true); | 210 | ActionManager::setStartedKAddressBook(true); |
211 | tmpStr = "kaddressbook --editor-only --uid "; | 211 | tmpStr = "kaddressbook --editor-only --uid "; |
212 | tmpStr += KProcess::quote(n.mid(6)); | 212 | tmpStr += KProcess::quote(n.mid(6)); |
213 | KRun::runCommand(tmpStr,"KAddressBook",iconPath); | 213 | KRun::runCommand(tmpStr,"KAddressBook",iconPath); |
214 | return; | 214 | return; |
215 | } | 215 | } |
216 | } else { | 216 | } else { |
217 | //QTextBrowser::setSource(n); | 217 | //QTextBrowser::setSource(n); |
218 | } | 218 | } |
219 | #endif | 219 | #endif |
220 | } | 220 | } |
221 | void KOEventViewer::mailToAttendees( bool all ) | 221 | void KOEventViewer::mailToAttendees( bool all ) |
222 | { | 222 | { |
223 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); | 223 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); |
224 | if (attendees.count() == 0) return; | 224 | if (attendees.count() == 0) return; |
225 | QStringList nameList; | 225 | QStringList nameList; |
226 | QStringList emailList; | 226 | QStringList emailList; |
227 | QStringList uidList; | 227 | QStringList uidList; |
228 | Attendee* a; | 228 | Attendee* a; |
229 | for(a=attendees.first();a;a=attendees.next()) { | 229 | for(a=attendees.first();a;a=attendees.next()) { |
230 | if ( !all && !a->RSVP() ) continue; | 230 | if ( !all && !a->RSVP() ) continue; |
231 | if (!a->email().isEmpty()) { | 231 | if (!a->email().isEmpty()) { |
232 | nameList.append (a->name() ); | 232 | nameList.append (a->name() ); |
233 | emailList.append (a->email() ); | 233 | emailList.append (a->email() ); |
234 | uidList.append (a->uid() ); | 234 | uidList.append (a->uid() ); |
235 | } | 235 | } |
236 | } | 236 | } |
237 | QString uid = "ComposeMailUIpick2"+mMailSubject; | 237 | QString uid = "ComposeMailUIpick2"+mMailSubject; |
238 | #ifndef DESKTOP_VERSION | 238 | #ifndef DESKTOP_VERSION |
239 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); | 239 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); |
240 | #endif | 240 | #endif |
241 | 241 | ||
242 | } | 242 | } |
243 | void KOEventViewer::addTag(const QString & tag,const QString & text) | 243 | void KOEventViewer::addTag(const QString & tag,const QString & text) |
244 | { | 244 | { |
245 | int number=text.contains("\n"); | 245 | int number=text.contains("\n"); |
246 | QString str = "<" + tag + ">"; | 246 | QString str = "<" + tag + ">"; |
247 | QString tmpText=text; | 247 | QString tmpText=text; |
248 | QString tmpStr=str; | 248 | QString tmpStr=str; |
249 | if(number !=-1) | 249 | if(number !=-1) |
250 | { | 250 | { |
251 | if (number > 0) { | 251 | if (number > 0) { |
252 | int pos=0; | 252 | int pos=0; |
253 | QString tmp; | 253 | QString tmp; |
254 | for(int i=0;i<=number;i++) { | 254 | for(int i=0;i<=number;i++) { |
255 | pos=tmpText.find("\n"); | 255 | pos=tmpText.find("\n"); |
256 | tmp=tmpText.left(pos); | 256 | tmp=tmpText.left(pos); |
257 | tmpText=tmpText.right(tmpText.length()-pos-1); | 257 | tmpText=tmpText.right(tmpText.length()-pos-1); |
258 | tmpStr+=tmp+"<br>"; | 258 | tmpStr+=tmp+"<br>"; |
259 | } | 259 | } |
260 | } | 260 | } |
261 | else tmpStr += tmpText; | 261 | else tmpStr += tmpText; |
262 | tmpStr+="</" + tag + ">"; | 262 | tmpStr+="</" + tag + ">"; |
263 | mText.append(tmpStr); | 263 | mText.append(tmpStr); |
264 | } | 264 | } |
265 | else | 265 | else |
266 | { | 266 | { |
267 | str += text + "</" + tag + ">"; | 267 | str += text + "</" + tag + ">"; |
268 | mText.append(str); | 268 | mText.append(str); |
269 | } | 269 | } |
270 | } | 270 | } |
271 | 271 | ||
272 | void KOEventViewer::setColorMode( int m ) | 272 | void KOEventViewer::setColorMode( int m ) |
273 | { | 273 | { |
274 | mColorMode = m; | 274 | mColorMode = m; |
275 | } | 275 | } |
276 | void KOEventViewer::appendEvent(Event *event, int mode ) | 276 | void KOEventViewer::appendEvent(Event *event, int mode ) |
277 | { | 277 | { |
278 | mMailSubject = ""; | 278 | mMailSubject = ""; |
279 | mCurrentIncidence = event; | 279 | mCurrentIncidence = event; |
280 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 280 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
281 | bool wideScreen = ( QApplication::desktop()->width() >= 640 ); | ||
281 | topLevelWidget()->setCaption(i18n("Event Viewer")); | 282 | topLevelWidget()->setCaption(i18n("Event Viewer")); |
282 | if ( mode == 0 ) { | 283 | if ( mode == 0 ) { |
283 | addTag("h2",deTag(event->summary())); | 284 | addTag("h2",deTag(event->summary())); |
284 | } | 285 | } |
285 | else { | 286 | else { |
286 | if ( mColorMode == 1 ) { | 287 | if ( mColorMode == 1 ) { |
287 | mText +="<font color=\"#00A000\">"; | 288 | mText +="<font color=\"#00A000\">"; |
288 | } | 289 | } |
289 | if ( mColorMode == 2 ) { | 290 | if ( mColorMode == 2 ) { |
290 | mText +="<font color=\"#C00000\">"; | 291 | mText +="<font color=\"#C00000\">"; |
291 | } | 292 | } |
292 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 293 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
293 | if ( mode == 1 ) { | 294 | if ( mode == 1 ) { |
294 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 295 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
295 | } else { | 296 | } else { |
296 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 297 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
297 | } | 298 | } |
298 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 299 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
299 | if ( mColorMode ) | 300 | if ( mColorMode ) |
300 | mText += "</font>"; | 301 | mText += "</font>"; |
301 | } | 302 | } |
302 | mMailSubject += i18n( "Meeting " )+ event->summary(); | 303 | mMailSubject += i18n( "Meeting " )+ event->summary(); |
303 | if (event->cancelled ()) { | 304 | if (event->cancelled ()) { |
304 | mText +="<font color=\"#B00000\">"; | 305 | mText +="<font color=\"#B00000\">"; |
305 | addTag("i",i18n("This event has been cancelled!")); | 306 | addTag("i",i18n("This event has been cancelled!")); |
306 | mText.append("<br>"); | 307 | mText.append("<br>"); |
307 | mText += "</font>"; | 308 | mText += "</font>"; |
308 | mMailSubject += i18n("(cancelled)"); | 309 | mMailSubject += i18n("(cancelled)"); |
309 | } | 310 | } |
310 | 311 | ||
311 | if (event->doesFloat()) { | 312 | if (event->doesFloat()) { |
312 | if (event->isMultiDay()) { | 313 | if (event->isMultiDay()) { |
313 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") | 314 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") |
314 | .arg(event->dtStartDateStr(shortDate)) | 315 | .arg(event->dtStartDateStr(shortDate)) |
315 | .arg(event->dtEndDateStr(shortDate))); | 316 | .arg(event->dtEndDateStr(shortDate))); |
316 | } else { | 317 | } else { |
317 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); | 318 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); |
318 | } | 319 | } |
319 | } else { | 320 | } else { |
320 | if (event->isMultiDay()) { | 321 | if (event->isMultiDay()) { |
321 | mText.append(i18n("<p><b>From:</b> %1</p> ") | 322 | mText.append(i18n("<p><b>From:</b> %1</p> ") |
322 | .arg(event->dtStartStr( shortDate))); | 323 | .arg(event->dtStartStr( shortDate))); |
323 | mText.append(i18n("<p><b>To:</b> %1</p>") | 324 | mText.append(i18n("<p><b>To:</b> %1</p>") |
324 | .arg(event->dtEndStr(shortDate))); | 325 | .arg(event->dtEndStr(shortDate))); |
325 | } else { | 326 | } else { |
326 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 327 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
327 | .arg(event->dtStartTimeStr()) | 328 | .arg(event->dtStartTimeStr()) |
328 | .arg(event->dtEndTimeStr())); | 329 | .arg(event->dtEndTimeStr())); |
329 | mText.append(i18n("<p><b>On:</b> %1</p> ") | 330 | mText.append(i18n("<p><b>On:</b> %1</p> ") |
330 | .arg(event->dtStartDateStr( shortDate ))); | 331 | .arg(event->dtStartDateStr( shortDate ))); |
331 | } | 332 | } |
332 | } | 333 | } |
333 | if (!event->location().isEmpty()) { | 334 | if (!event->location().isEmpty()) { |
334 | addTag("b",i18n("Location: ")); | 335 | addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); |
335 | mText.append(deTag(event->location())+"<br>"); | ||
336 | mMailSubject += i18n(" at ") + event->location(); | 336 | mMailSubject += i18n(" at ") + event->location(); |
337 | } | 337 | } |
338 | if (event->recurrence()->doesRecur()) { | 338 | if (event->recurrence()->doesRecur()) { |
339 | 339 | ||
340 | QString recurText = event->recurrence()->recurrenceText(); | 340 | QString recurText = event->recurrence()->recurrenceText(); |
341 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); | 341 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); |
342 | bool ok; | 342 | bool ok; |
343 | QDate start = QDate::currentDate(); | 343 | QDate start = QDate::currentDate(); |
344 | QDateTime next; | 344 | QDateTime next; |
345 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); | 345 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); |
346 | if ( ok ) { | 346 | if ( ok ) { |
347 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); | 347 | if ( wideScreen ){ |
348 | addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); | 348 | addTag("p",i18n("<b>Next recurrence is on:</b>") +" " + KGlobal::locale()->formatDate( next.date(), shortDate ) ); |
349 | } else { | ||
350 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); | ||
351 | addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); | ||
352 | } | ||
349 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); | 353 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); |
350 | 354 | ||
351 | } else { | 355 | } else { |
352 | bool last; | 356 | bool last; |
353 | QDate nextd; | 357 | QDate nextd; |
354 | nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); | 358 | nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); |
355 | if ( last ) { | 359 | if ( last ) { |
356 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); | 360 | if ( wideScreen ){ |
357 | addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); | 361 | addTag("p",i18n("<b>Last recurrence was on:</b>") +" " + KGlobal::locale()->formatDate( nextd, shortDate )); |
362 | } else{ | ||
363 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); | ||
364 | addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); | ||
365 | } | ||
358 | } | 366 | } |
359 | } | 367 | } |
360 | } else { | 368 | } else { |
361 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); | 369 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); |
362 | 370 | ||
363 | } | 371 | } |
364 | 372 | ||
365 | 373 | ||
366 | if (event->isAlarmEnabled()) { | 374 | if (event->isAlarmEnabled()) { |
367 | Alarm *alarm =event->alarms().first() ; | 375 | Alarm *alarm =event->alarms().first() ; |
368 | QDateTime t = alarm->time(); | 376 | QDateTime t = alarm->time(); |
369 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); | 377 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); |
370 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 378 | if(wideScreen ){ |
371 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 379 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); |
380 | }else{ | ||
381 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | ||
382 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | ||
383 | } | ||
372 | //addTag("p",s); | 384 | //addTag("p",s); |
373 | } | 385 | } |
374 | 386 | ||
375 | addTag("b",i18n("Access: ")); | 387 | addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); |
376 | mText.append(event->secrecyStr()+"<br>"); | ||
377 | 388 | ||
378 | |||
379 | |||
380 | formatCategories(event); | 389 | formatCategories(event); |
381 | 390 | ||
382 | formatReadOnly(event); | 391 | formatReadOnly(event); |
383 | formatAttendees(event); | 392 | formatAttendees(event); |
384 | 393 | ||
385 | if ( KOPrefs::instance()->mEVshowCreated ) { | 394 | if ( KOPrefs::instance()->mEVshowCreated ) { |
386 | #ifdef DESKTOP_VERSION | 395 | if(wideScreen ){ |
387 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 396 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
388 | #else | 397 | }else{ |
389 | addTag("p",i18n("<b>Created: ") +" </b>"); | 398 | addTag("p",i18n("<b>Created: ") +" </b>"); |
390 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 399 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
391 | #endif | 400 | } |
401 | |||
392 | 402 | ||
393 | } | 403 | } |
394 | if ( KOPrefs::instance()->mEVshowChanged ) { | 404 | if ( KOPrefs::instance()->mEVshowChanged ) { |
395 | #ifdef DESKTOP_VERSION | 405 | if(wideScreen ){ |
396 | addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); | 406 | addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); |
397 | #else | 407 | }else{ |
398 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | 408 | addTag("p",i18n("<b>Last modified: ") +" </b>"); |
399 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | 409 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); |
400 | #endif | 410 | } |
401 | 411 | ||
402 | } | 412 | } |
403 | if ( KOPrefs::instance()->mEVshowDetails ) { | 413 | if ( KOPrefs::instance()->mEVshowDetails ) { |
404 | if (!event->description().isEmpty()) { | 414 | if (!event->description().isEmpty()) { |
405 | addTag("p",i18n("<b>Details: </b>")); | 415 | addTag("p",i18n("<b>Details: </b>")); |
406 | addTag("p",deTag(event->description())); | 416 | addTag("p",deTag(event->description())); |
407 | } | 417 | } |
408 | } | 418 | } |
409 | setText(mText); | 419 | setText(mText); |
410 | //QWhatsThis::add(this,mText); | 420 | //QWhatsThis::add(this,mText); |
411 | 421 | ||
412 | } | 422 | } |
413 | 423 | ||
414 | void KOEventViewer::appendTodo(Todo *event, int mode ) | 424 | void KOEventViewer::appendTodo(Todo *event, int mode ) |
415 | { | 425 | { |
416 | mMailSubject = ""; | 426 | mMailSubject = ""; |
417 | mCurrentIncidence = event; | 427 | mCurrentIncidence = event; |
418 | topLevelWidget()->setCaption(i18n("Todo Viewer")); | 428 | topLevelWidget()->setCaption(i18n("Todo Viewer")); |
419 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 429 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
430 | bool wideScreen = ( QApplication::desktop()->width() >= 640 ); | ||
420 | if (mode == 0 ) | 431 | if (mode == 0 ) |
421 | addTag("h2",deTag(event->summary())); | 432 | addTag("h2",deTag(event->summary())); |
422 | else { | 433 | else { |
423 | if ( mColorMode == 1 ) { | 434 | if ( mColorMode == 1 ) { |
424 | mText +="<font color=\"#00A000\">"; | 435 | mText +="<font color=\"#00A000\">"; |
425 | } | 436 | } |
426 | if ( mColorMode == 2 ) { | 437 | if ( mColorMode == 2 ) { |
427 | mText +="<font color=\"#B00000\">"; | 438 | mText +="<font color=\"#B00000\">"; |
428 | } | 439 | } |
429 | if ( mode == 1 ) { | 440 | if ( mode == 1 ) { |
430 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 441 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
431 | } else { | 442 | } else { |
432 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 443 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
433 | } | 444 | } |
434 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 445 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
435 | if ( mColorMode ) | 446 | if ( mColorMode ) |
436 | mText += "</font>"; | 447 | mText += "</font>"; |
437 | } | 448 | } |
438 | mMailSubject += i18n( "Todo " )+ event->summary(); | 449 | mMailSubject += i18n( "Todo " )+ event->summary(); |
439 | 450 | ||
440 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | 451 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { |
441 | mText +="<font color=\"#B00000\">"; | 452 | mText +="<font color=\"#B00000\">"; |
442 | addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); | 453 | addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); |
443 | mText += "</font>"; | 454 | mText += "</font>"; |
444 | } else { | 455 | } else { |
445 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 456 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
446 | .arg(event->percentComplete())); | 457 | .arg(event->percentComplete())); |
447 | } | 458 | } |
448 | 459 | ||
449 | if (event->cancelled ()) { | 460 | if (event->cancelled ()) { |
450 | mText +="<font color=\"#B00000\">"; | 461 | mText +="<font color=\"#B00000\">"; |
451 | addTag("i",i18n("This todo has been cancelled!")); | 462 | addTag("i",i18n("This todo has been cancelled!")); |
452 | mText.append("<br>"); | 463 | mText.append("<br>"); |
453 | mText += "</font>"; | 464 | mText += "</font>"; |
454 | mMailSubject += i18n("(cancelled)"); | 465 | mMailSubject += i18n("(cancelled)"); |
455 | } | 466 | } |
456 | 467 | ||
457 | 468 | ||
458 | 469 | ||
459 | if (event->recurrence()->doesRecur()) { | 470 | if (event->recurrence()->doesRecur()) { |
460 | 471 | ||
461 | QString recurText = event->recurrence()->recurrenceText(); | 472 | QString recurText = event->recurrence()->recurrenceText(); |
462 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); | 473 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); |
463 | 474 | ||
464 | } | 475 | } |
465 | if (event->hasStartDate()) { | 476 | if (event->hasStartDate()) { |
466 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); | 477 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); |
467 | } | 478 | } |
468 | if (event->hasDueDate()) { | 479 | if (event->hasDueDate()) { |
469 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); | 480 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); |
470 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); | 481 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); |
471 | } | 482 | } |
472 | if (!event->location().isEmpty()) { | 483 | if (!event->location().isEmpty()) { |
473 | addTag("b",i18n("Location: ")); | 484 | addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); |
474 | mText.append(deTag(event->location())+"<br>"); | ||
475 | mMailSubject += i18n(" at ") + event->location(); | 485 | mMailSubject += i18n(" at ") + event->location(); |
476 | } | 486 | } |
477 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 487 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
478 | .arg(QString::number(event->priority()))); | 488 | .arg(QString::number(event->priority()))); |
479 | 489 | ||
480 | if (event->isAlarmEnabled()) { | 490 | if (event->isAlarmEnabled()) { |
481 | Alarm *alarm =event->alarms().first() ; | 491 | Alarm *alarm =event->alarms().first() ; |
482 | QDateTime t = alarm->time(); | 492 | QDateTime t = alarm->time(); |
483 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); | 493 | QString s =i18n("( %1 before )").arg( alarm->offsetText() ); |
484 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 494 | if ( wideScreen ) { |
485 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 495 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); |
486 | //addTag("p",s); | 496 | } else { |
497 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | ||
498 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | ||
499 | } | ||
487 | } | 500 | } |
488 | 501 | ||
489 | addTag("b",i18n("Access: ")); | 502 | addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); |
490 | mText.append(event->secrecyStr()+"<br>"); | ||
491 | 503 | ||
492 | formatCategories(event); | 504 | formatCategories(event); |
493 | 505 | ||
494 | formatReadOnly(event); | 506 | formatReadOnly(event); |
495 | formatAttendees(event); | 507 | formatAttendees(event); |
496 | 508 | ||
497 | if ( KOPrefs::instance()->mEVshowCreated ) { | 509 | if ( KOPrefs::instance()->mEVshowCreated ) { |
498 | #ifdef DESKTOP_VERSION | 510 | if(wideScreen ){ |
499 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 511 | |
500 | #else | 512 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
501 | addTag("p",i18n("<b>Created: ") +" </b>"); | 513 | |
502 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 514 | } else { |
503 | #endif | 515 | addTag("p",i18n("<b>Created: ") +" </b>"); |
504 | 516 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | |
517 | } | ||
505 | } | 518 | } |
506 | if ( KOPrefs::instance()->mEVshowChanged ) { | 519 | if ( KOPrefs::instance()->mEVshowChanged ) { |
507 | #ifdef DESKTOP_VERSION | 520 | if(wideScreen ){ |
508 | addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); | 521 | addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); |
509 | #else | 522 | |
510 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | 523 | } else { |
511 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | 524 | addTag("p",i18n("<b>Last modified: ") +" </b>"); |
512 | #endif | 525 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); |
513 | 526 | } | |
514 | } | 527 | } |
515 | if ( event->relatedTo() ) { | 528 | if ( event->relatedTo() ) { |
516 | addTag("b",i18n("Parent todo:<br>")); | 529 | addTag("b",i18n("Parent todo:<br>")); |
517 | mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); | 530 | mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); |
518 | } | 531 | } |
519 | QPtrList<Incidence> Relations = event->relations(); | 532 | QPtrList<Incidence> Relations = event->relations(); |
520 | Incidence *to; | 533 | Incidence *to; |
521 | if ( Relations.first() ) | 534 | if ( Relations.first() ) |
522 | addTag("b",i18n("Sub todos:<br>")); | 535 | addTag("b",i18n("Sub todos:<br>")); |
523 | for (to=Relations.first();to;to=Relations.next()) { | 536 | for (to=Relations.first();to;to=Relations.next()) { |
524 | mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | 537 | mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); |
525 | 538 | ||
526 | } | 539 | } |
527 | 540 | ||
528 | if ( KOPrefs::instance()->mEVshowDetails ) { | 541 | if ( KOPrefs::instance()->mEVshowDetails ) { |
529 | if (!event->description().isEmpty()) { | 542 | if (!event->description().isEmpty()) { |
530 | addTag("p",i18n("<b>Details: </b>")); | 543 | addTag("p",i18n("<b>Details: </b>")); |
531 | addTag("p",deTag(event->description())); | 544 | addTag("p",deTag(event->description())); |
532 | } | 545 | } |
533 | } | 546 | } |
534 | setText(mText); | 547 | setText(mText); |
535 | } | 548 | } |
536 | 549 | ||
537 | void KOEventViewer::formatCategories(Incidence *event) | 550 | void KOEventViewer::formatCategories(Incidence *event) |
538 | { | 551 | { |
539 | if (!event->categoriesStr().isEmpty()) { | 552 | if (!event->categoriesStr().isEmpty()) { |
540 | if (event->categories().count() == 1) { | 553 | if (event->categories().count() == 1) { |
541 | addTag("h3",i18n("Category")); | 554 | addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace()); |
542 | } else { | 555 | } else { |
543 | addTag("h3",i18n("Categories")); | 556 | addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ; |
544 | } | 557 | } |
545 | addTag("p",event->categoriesStr()); | ||
546 | } | 558 | } |
547 | } | 559 | } |
548 | void KOEventViewer::formatAttendees(Incidence *event) | 560 | void KOEventViewer::formatAttendees(Incidence *event) |
549 | { | 561 | { |
550 | QPtrList<Attendee> attendees = event->attendees(); | 562 | QPtrList<Attendee> attendees = event->attendees(); |
551 | if (attendees.count()) { | 563 | if (attendees.count()) { |
552 | 564 | ||
553 | 565 | ||
554 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 566 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
555 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); | 567 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); |
556 | addTag("h3",i18n("Organizer")); | 568 | addTag("h3",i18n("Organizer")); |
557 | mText.append("<ul><li>"); | 569 | mText.append("<ul><li>"); |
558 | #ifndef KORG_NOKABC | 570 | #ifndef KORG_NOKABC |
559 | 571 | ||
560 | #ifdef DESKTOP_VERSION | 572 | #ifdef DESKTOP_VERSION |
561 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 573 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
562 | KABC::Addressee::List addressList; | 574 | KABC::Addressee::List addressList; |
563 | addressList = add_book->findByEmail(event->organizer()); | 575 | addressList = add_book->findByEmail(event->organizer()); |
564 | KABC::Addressee o = addressList.first(); | 576 | KABC::Addressee o = addressList.first(); |
565 | if (!o.isEmpty() && addressList.size()<2) { | 577 | if (!o.isEmpty() && addressList.size()<2) { |
566 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 578 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
567 | mText += o.formattedName(); | 579 | mText += o.formattedName(); |
568 | mText += "</a>\n"; | 580 | mText += "</a>\n"; |
569 | } else { | 581 | } else { |
570 | mText.append(event->organizer()); | 582 | mText.append(event->organizer()); |
571 | } | 583 | } |
572 | #else //DESKTOP_VERSION | 584 | #else //DESKTOP_VERSION |
573 | mText += "<a href=\"uid:organizer\">"; | 585 | mText += "<a href=\"uid:organizer\">"; |
574 | mText += event->organizer(); | 586 | mText += event->organizer(); |
575 | mText += "</a>\n"; | 587 | mText += "</a>\n"; |
576 | #endif //DESKTOP_VERSION | 588 | #endif //DESKTOP_VERSION |
577 | 589 | ||
578 | 590 | ||
579 | #else | 591 | #else |
580 | mText.append(event->organizer()); | 592 | mText.append(event->organizer()); |
581 | #endif | 593 | #endif |
582 | 594 | ||
583 | if (iconPath) { | 595 | if (iconPath) { |
584 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; | 596 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; |
585 | mText += "<IMG src=\"" + iconPath + "\">"; | 597 | mText += "<IMG src=\"" + iconPath + "\">"; |
586 | mText += "</a>\n"; | 598 | mText += "</a>\n"; |
587 | } | 599 | } |
588 | mText.append("</li></ul>"); | 600 | mText.append("</li></ul>"); |
589 | 601 | ||
590 | addTag("h3",i18n("Attendees")); | 602 | addTag("h3",i18n("Attendees")); |
591 | Attendee *a; | 603 | Attendee *a; |
592 | mText.append("<ul>"); | 604 | mText.append("<ul>"); |
593 | int a_count = 0; | 605 | int a_count = 0; |
594 | int a_count_nr = 0; | 606 | int a_count_nr = 0; |
595 | 607 | ||
596 | for(a=attendees.first();a;a=attendees.next()) { | 608 | for(a=attendees.first();a;a=attendees.next()) { |
597 | #ifndef KORG_NOKABC | 609 | #ifndef KORG_NOKABC |
598 | #ifdef DESKTOP_VERSION | 610 | #ifdef DESKTOP_VERSION |
599 | if (a->name().isEmpty()) { | 611 | if (a->name().isEmpty()) { |
600 | addressList = add_book->findByEmail(a->email()); | 612 | addressList = add_book->findByEmail(a->email()); |
601 | KABC::Addressee o = addressList.first(); | 613 | KABC::Addressee o = addressList.first(); |
602 | if (!o.isEmpty() && addressList.size()<2) { | 614 | if (!o.isEmpty() && addressList.size()<2) { |
603 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 615 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
604 | mText += o.formattedName(); | 616 | mText += o.formattedName(); |
605 | mText += "</a>\n"; | 617 | mText += "</a>\n"; |
606 | } else { | 618 | } else { |
607 | mText += "<li>"; | 619 | mText += "<li>"; |
608 | mText.append(a->email()); | 620 | mText.append(a->email()); |
609 | mText += "\n"; | 621 | mText += "\n"; |
610 | } | 622 | } |
611 | } else { | 623 | } else { |
612 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 624 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
613 | if (!a->name().isEmpty()) mText += a->name(); | 625 | if (!a->name().isEmpty()) mText += a->name(); |
614 | else mText += a->email(); | 626 | else mText += a->email(); |
615 | mText += "</a>\n"; | 627 | mText += "</a>\n"; |
616 | } | 628 | } |
617 | #else //DESKTOP_VERSION | 629 | #else //DESKTOP_VERSION |
618 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 630 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
619 | if (!a->name().isEmpty()) mText += a->name(); | 631 | if (!a->name().isEmpty()) mText += a->name(); |
620 | else mText += a->email(); | 632 | else mText += a->email(); |
621 | mText += "</a>\n"; | 633 | mText += "</a>\n"; |
622 | #endif //DESKTOP_VERSION | 634 | #endif //DESKTOP_VERSION |
623 | #else | 635 | #else |
624 | //qDebug("nokabc "); | 636 | //qDebug("nokabc "); |
625 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 637 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
626 | if (!a->name().isEmpty()) mText += a->name(); | 638 | if (!a->name().isEmpty()) mText += a->name(); |
627 | else mText += a->email(); | 639 | else mText += a->email(); |
628 | mText += "</a>\n"; | 640 | mText += "</a>\n"; |
629 | #endif | 641 | #endif |
630 | 642 | ||
631 | 643 | ||
632 | if (!a->email().isEmpty()) { | 644 | if (!a->email().isEmpty()) { |
633 | if (iconPath) { | 645 | if (iconPath) { |
634 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; | 646 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; |
635 | if ( a->RSVP() ) { | 647 | if ( a->RSVP() ) { |
636 | ++a_count_nr; | 648 | ++a_count_nr; |
637 | mText += "<IMG src=\"" + iconPath + "\">"; | 649 | mText += "<IMG src=\"" + iconPath + "\">"; |
638 | } | 650 | } |
639 | else { | 651 | else { |
640 | ++a_count; | 652 | ++a_count; |
641 | mText += "<IMG src=\"" + NOiconPath + "\">"; | 653 | mText += "<IMG src=\"" + NOiconPath + "\">"; |
642 | } | 654 | } |
643 | mText += "</a>\n"; | 655 | mText += "</a>\n"; |
644 | } | 656 | } |
645 | } | 657 | } |
646 | if (a->status() != Attendee::NeedsAction ) | 658 | if (a->status() != Attendee::NeedsAction ) |
647 | mText +="[" + a->statusStr() + "] "; | 659 | mText +="[" + a->statusStr() + "] "; |
648 | if (a->role() == Attendee::Chair ) | 660 | if (a->role() == Attendee::Chair ) |
649 | mText +="(" + a->roleStr().left(1) + ".)"; | 661 | mText +="(" + a->roleStr().left(1) + ".)"; |
650 | } | 662 | } |
651 | mText.append("</li></ul>"); | 663 | mText.append("</li></ul>"); |
652 | if ( (a_count+a_count_nr) > 1 ) { | 664 | if ( (a_count+a_count_nr) > 1 ) { |
653 | mText += "<a href=\"mailto:ALL\">"; | 665 | mText += "<a href=\"mailto:ALL\">"; |
654 | mText += i18n( "Mail to all" ); | 666 | mText += i18n( "Mail to all" ); |
655 | mText += "</a> ( "; | 667 | mText += "</a> ( "; |
656 | mText += "<IMG src=\"" + iconPath + "\">"; | 668 | mText += "<IMG src=\"" + iconPath + "\">"; |
657 | mText += i18n( " and " ); | 669 | mText += i18n( " and " ); |
658 | mText += "<IMG src=\"" + NOiconPath + "\"> )"; | 670 | mText += "<IMG src=\"" + NOiconPath + "\"> )"; |
659 | mText += "<br>\n"; | 671 | mText += "<br>\n"; |
660 | 672 | ||
661 | 673 | ||
662 | } | 674 | } |
663 | if ( a_count_nr > 1 ) { | 675 | if ( a_count_nr > 1 ) { |
664 | mText += "<a href=\"mailto:RSVP\">"; | 676 | mText += "<a href=\"mailto:RSVP\">"; |
665 | mText += i18n( "Mail to selected" ); | 677 | mText += i18n( "Mail to selected" ); |
666 | mText += "</a> ( "; | 678 | mText += "</a> ( "; |
667 | mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath ); | 679 | mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath ); |
668 | mText += "<br>\n"; | 680 | mText += "<br>\n"; |
669 | } | 681 | } |
670 | } | 682 | } |
671 | 683 | ||
672 | } | 684 | } |
673 | void KOEventViewer::appendJournal(Journal *jour, int mode ) | 685 | void KOEventViewer::appendJournal(Journal *jour, int mode ) |
674 | { | 686 | { |
675 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 687 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
676 | if (mode == 0 ) { | 688 | if (mode == 0 ) { |
677 | addTag("h2",i18n("Journal from: ")); | 689 | addTag("h2",i18n("Journal from: ")); |
678 | } | 690 | } |
679 | else { | 691 | else { |
680 | if ( mode == 1 ) { | 692 | if ( mode == 1 ) { |
681 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); | 693 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); |
682 | } else { | 694 | } else { |
683 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); | 695 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); |
684 | } | 696 | } |
685 | } | 697 | } |
686 | topLevelWidget()->setCaption("Journal Viewer"); | 698 | topLevelWidget()->setCaption("Journal Viewer"); |
687 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); | 699 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); |
688 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | 700 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); |
689 | if (!jour->description().isEmpty()) { | 701 | if (!jour->description().isEmpty()) { |
690 | addTag("p",deTag(jour->description())); | 702 | addTag("p",deTag(jour->description())); |
691 | } | 703 | } |
692 | setText(mText); | 704 | setText(mText); |
693 | } | 705 | } |
694 | 706 | ||
695 | void KOEventViewer::formatReadOnly(Incidence *event) | 707 | void KOEventViewer::formatReadOnly(Incidence *event) |
696 | { | 708 | { |
697 | if (event->isReadOnly()) { | 709 | if (event->isReadOnly()) { |
698 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); | 710 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); |
699 | } | 711 | } |
700 | } | 712 | } |
701 | void KOEventViewer::setSyncMode( bool b ) | 713 | void KOEventViewer::setSyncMode( bool b ) |
702 | { | 714 | { |
703 | mSyncMode = b; | 715 | mSyncMode = b; |
704 | } | 716 | } |
705 | 717 | ||
706 | void KOEventViewer::setTodo(Todo *event, bool clearV ) | 718 | void KOEventViewer::setTodo(Todo *event, bool clearV ) |
707 | { | 719 | { |
708 | if ( clearV ) | 720 | if ( clearV ) |
709 | clearEvents(); | 721 | clearEvents(); |
710 | if ( mSyncMode ) { | 722 | if ( mSyncMode ) { |
711 | if ( clearV ) | 723 | if ( clearV ) |
712 | appendTodo(event,1 ); | 724 | appendTodo(event,1 ); |
713 | else | 725 | else |
714 | appendTodo(event,2); | 726 | appendTodo(event,2); |
715 | } else | 727 | } else |
716 | appendTodo(event); | 728 | appendTodo(event); |
717 | } | 729 | } |
718 | void KOEventViewer::setJournal(Journal *event, bool clearV ) | 730 | void KOEventViewer::setJournal(Journal *event, bool clearV ) |
719 | { | 731 | { |
720 | if ( clearV ) | 732 | if ( clearV ) |
721 | clearEvents(); | 733 | clearEvents(); |
722 | if ( mSyncMode ) { | 734 | if ( mSyncMode ) { |
723 | if ( clearV ) | 735 | if ( clearV ) |
724 | appendJournal(event, 1); | 736 | appendJournal(event, 1); |
725 | else | 737 | else |
726 | appendJournal(event, 2); | 738 | appendJournal(event, 2); |
727 | } else | 739 | } else |
728 | appendJournal(event); | 740 | appendJournal(event); |
729 | } | 741 | } |
730 | 742 | ||
731 | void KOEventViewer::setEvent(Event *event) | 743 | void KOEventViewer::setEvent(Event *event) |
732 | { | 744 | { |
733 | clearEvents(); | 745 | clearEvents(); |
734 | if ( mSyncMode ) | 746 | if ( mSyncMode ) |
735 | appendEvent(event, 1); | 747 | appendEvent(event, 1); |
736 | else | 748 | else |
737 | appendEvent(event); | 749 | appendEvent(event); |
738 | } | 750 | } |
739 | 751 | ||
740 | void KOEventViewer::addEvent(Event *event) | 752 | void KOEventViewer::addEvent(Event *event) |
741 | { | 753 | { |
742 | if ( mSyncMode ) | 754 | if ( mSyncMode ) |
743 | appendEvent(event, 2); | 755 | appendEvent(event, 2); |
744 | else | 756 | else |
745 | appendEvent(event); | 757 | appendEvent(event); |
746 | } | 758 | } |
747 | 759 | ||
748 | void KOEventViewer::clearEvents(bool now) | 760 | void KOEventViewer::clearEvents(bool now) |
749 | { | 761 | { |
750 | mText = ""; | 762 | mText = ""; |
751 | if (now) setText(mText); | 763 | if (now) setText(mText); |
752 | } | 764 | } |
753 | 765 | ||
754 | void KOEventViewer::addText(QString text) | 766 | void KOEventViewer::addText(QString text) |
755 | { | 767 | { |
756 | mText.append(text); | 768 | mText.append(text); |
757 | setText(mText); | 769 | setText(mText); |
758 | } | 770 | } |
759 | QString KOEventViewer::deTag(QString text) | 771 | QString KOEventViewer::deTag(QString text) |
760 | { | 772 | { |
761 | #if QT_VERSION >= 0x030000 | 773 | #if QT_VERSION >= 0x030000 |
762 | text.replace( '<' , "<" ); | 774 | text.replace( '<' , "<" ); |
763 | text.replace( '>' , ">" ); | 775 | text.replace( '>' , ">" ); |
764 | #else | 776 | #else |
765 | if ( text.find ('<') >= 0 ) { | 777 | if ( text.find ('<') >= 0 ) { |
766 | text.replace( QRegExp("<") , "<" ); | 778 | text.replace( QRegExp("<") , "<" ); |
767 | } | 779 | } |
768 | if ( text.find ('>') >= 0 ) { | 780 | if ( text.find ('>') >= 0 ) { |
769 | text.replace( QRegExp(">") , ">" ); | 781 | text.replace( QRegExp(">") , ">" ); |
770 | } | 782 | } |
771 | #endif | 783 | #endif |
772 | return text; | 784 | return text; |
773 | } | 785 | } |
774 | void KOEventViewer::keyPressEvent ( QKeyEvent * e ) | 786 | void KOEventViewer::keyPressEvent ( QKeyEvent * e ) |
775 | { | 787 | { |
776 | switch ( e->key() ) { | 788 | switch ( e->key() ) { |
777 | case Qt::Key_Return: | 789 | case Qt::Key_Return: |
778 | case Qt::Key_Enter : | 790 | case Qt::Key_Enter : |
779 | e->ignore(); | 791 | e->ignore(); |
780 | break; | 792 | break; |
781 | default: | 793 | default: |
782 | QTextBrowser::keyPressEvent ( e ); | 794 | QTextBrowser::keyPressEvent ( e ); |
783 | break; | 795 | break; |
784 | } | 796 | } |
785 | } | 797 | } |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 0a608dc..25be63a 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1,1442 +1,1444 @@ | |||
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" |
56 | using namespace KOrg; | 56 | using namespace KOrg; |
57 | 57 | ||
58 | 58 | ||
59 | class KOTodoViewWhatsThis :public QWhatsThis | 59 | class KOTodoViewWhatsThis :public QWhatsThis |
60 | { | 60 | { |
61 | public: | 61 | public: |
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 | ||
64 | protected: | 64 | protected: |
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 | } |
69 | private: | 69 | private: |
70 | QWidget* _wid; | 70 | QWidget* _wid; |
71 | KOTodoView * _view; | 71 | KOTodoView * _view; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, | 74 | KOTodoListView::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 | ||
95 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) | 95 | void 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 | ||
110 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) | 110 | void 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 | ||
125 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) | 125 | void 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 | ||
135 | void KOTodoListView::contentsDropEvent(QDropEvent *e) | 135 | void 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 Todo to itself\nor a child of itself"), | 164 | i18n("Cannot move Todo to itself\nor a child of itself"), |
165 | i18n("Drop Todo")); | 165 | i18n("Drop Todo")); |
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 | void KOTodoListView::wheelEvent (QWheelEvent *e) | 207 | void KOTodoListView::wheelEvent (QWheelEvent *e) |
208 | { | 208 | { |
209 | QListView::wheelEvent (e); | 209 | QListView::wheelEvent (e); |
210 | } | 210 | } |
211 | 211 | ||
212 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | 212 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) |
213 | { | 213 | { |
214 | 214 | ||
215 | QPoint p(contentsToViewport(e->pos())); | 215 | QPoint p(contentsToViewport(e->pos())); |
216 | QListViewItem *i = itemAt(p); | 216 | QListViewItem *i = itemAt(p); |
217 | bool rootClicked = true; | 217 | bool rootClicked = true; |
218 | if (i) { | 218 | if (i) { |
219 | // if the user clicked into the root decoration of the item, don't | 219 | // if the user clicked into the root decoration of the item, don't |
220 | // try to start a drag! | 220 | // try to start a drag! |
221 | int X = p.x(); | 221 | int X = p.x(); |
222 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); | 222 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); |
223 | if (X > header()->sectionPos(0) + | 223 | if (X > header()->sectionPos(0) + |
224 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + | 224 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + |
225 | itemMargin() +i->height()|| | 225 | itemMargin() +i->height()|| |
226 | X < header()->sectionPos(0)) { | 226 | X < header()->sectionPos(0)) { |
227 | rootClicked = false; | 227 | rootClicked = false; |
228 | } | 228 | } |
229 | } else { | 229 | } else { |
230 | rootClicked = false; | 230 | rootClicked = false; |
231 | } | 231 | } |
232 | #ifndef KORG_NODND | 232 | #ifndef KORG_NODND |
233 | mMousePressed = false; | 233 | mMousePressed = false; |
234 | if (! rootClicked && !( e->button() == RightButton) ) { | 234 | if (! rootClicked && !( e->button() == RightButton) ) { |
235 | mPressPos = e->pos(); | 235 | mPressPos = e->pos(); |
236 | mMousePressed = true; | 236 | mMousePressed = true; |
237 | } else { | 237 | } else { |
238 | mMousePressed = false; | 238 | mMousePressed = false; |
239 | } | 239 | } |
240 | #endif | 240 | #endif |
241 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); | 241 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); |
242 | #ifndef DESKTOP_VERSION | 242 | #ifndef DESKTOP_VERSION |
243 | if (!( e->button() == RightButton && rootClicked) ) | 243 | if (!( e->button() == RightButton && rootClicked) ) |
244 | QListView::contentsMousePressEvent(e); | 244 | QListView::contentsMousePressEvent(e); |
245 | #else | 245 | #else |
246 | QListView::contentsMousePressEvent(e); | 246 | QListView::contentsMousePressEvent(e); |
247 | #endif | 247 | #endif |
248 | } | 248 | } |
249 | void KOTodoListView::paintEvent(QPaintEvent* e) | 249 | void KOTodoListView::paintEvent(QPaintEvent* e) |
250 | { | 250 | { |
251 | emit paintNeeded(); | 251 | emit paintNeeded(); |
252 | QListView::paintEvent( e); | 252 | QListView::paintEvent( e); |
253 | } | 253 | } |
254 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | 254 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) |
255 | { | 255 | { |
256 | 256 | ||
257 | #ifndef KORG_NODND | 257 | #ifndef KORG_NODND |
258 | //QListView::contentsMouseMoveEvent(e); | 258 | //QListView::contentsMouseMoveEvent(e); |
259 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > | 259 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > |
260 | QApplication::startDragDistance()*3) { | 260 | QApplication::startDragDistance()*3) { |
261 | mMousePressed = false; | 261 | mMousePressed = false; |
262 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); | 262 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); |
263 | if (item) { | 263 | if (item) { |
264 | DndFactory factory( mCalendar ); | 264 | DndFactory factory( mCalendar ); |
265 | ICalDrag *vd = factory.createDrag( | 265 | ICalDrag *vd = factory.createDrag( |
266 | ((KOTodoViewItem *)item)->todo(),viewport()); | 266 | ((KOTodoViewItem *)item)->todo(),viewport()); |
267 | internalDrop = false; | 267 | internalDrop = false; |
268 | // we cannot do any senseful here, because the DnD is still broken in Qt | 268 | // we cannot do any senseful here, because the DnD is still broken in Qt |
269 | if (vd->drag()) { | 269 | if (vd->drag()) { |
270 | if ( !internalDrop ) { | 270 | if ( !internalDrop ) { |
271 | //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); | 271 | //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); |
272 | qDebug("Dnd: External move: Delete drag source "); | 272 | qDebug("Dnd: External move: Delete drag source "); |
273 | } else | 273 | } else |
274 | qDebug("Dnd: Internal move "); | 274 | qDebug("Dnd: Internal move "); |
275 | 275 | ||
276 | } else { | 276 | } else { |
277 | if ( !internalDrop ) { | 277 | if ( !internalDrop ) { |
278 | qDebug("Dnd: External Copy"); | 278 | qDebug("Dnd: External Copy"); |
279 | } else | 279 | } else |
280 | qDebug("DnD: Internal copy: Copy pending"); | 280 | qDebug("DnD: Internal copy: Copy pending"); |
281 | } | 281 | } |
282 | } | 282 | } |
283 | } | 283 | } |
284 | #endif | 284 | #endif |
285 | } | 285 | } |
286 | void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) | 286 | void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) |
287 | { | 287 | { |
288 | if ( !e->isAutoRepeat() ) { | 288 | if ( !e->isAutoRepeat() ) { |
289 | mFlagKeyPressed = false; | 289 | mFlagKeyPressed = false; |
290 | } | 290 | } |
291 | } | 291 | } |
292 | 292 | ||
293 | 293 | ||
294 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | 294 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) |
295 | { | 295 | { |
296 | qApp->processEvents(); | 296 | qApp->processEvents(); |
297 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 297 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
298 | e->ignore(); | 298 | e->ignore(); |
299 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 299 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
300 | return; | 300 | return; |
301 | } | 301 | } |
302 | if (! e->isAutoRepeat() ) | 302 | if (! e->isAutoRepeat() ) |
303 | mFlagKeyPressed = true; | 303 | mFlagKeyPressed = true; |
304 | QListViewItem* cn; | 304 | QListViewItem* cn; |
305 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { | 305 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { |
306 | cn = currentItem(); | 306 | cn = currentItem(); |
307 | if ( cn ) { | 307 | if ( cn ) { |
308 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 308 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
309 | if ( ci ){ | 309 | if ( ci ){ |
310 | if ( e->state() == ShiftButton ) | 310 | if ( e->state() == ShiftButton ) |
311 | ci->setOn( false ); | 311 | ci->setOn( false ); |
312 | else | 312 | else |
313 | ci->setOn( true ); | 313 | ci->setOn( true ); |
314 | cn = cn->itemBelow(); | 314 | cn = cn->itemBelow(); |
315 | if ( cn ) { | 315 | if ( cn ) { |
316 | setCurrentItem ( cn ); | 316 | setCurrentItem ( cn ); |
317 | ensureItemVisible ( cn ); | 317 | ensureItemVisible ( cn ); |
318 | } | 318 | } |
319 | 319 | ||
320 | } | 320 | } |
321 | } | 321 | } |
322 | 322 | ||
323 | return; | 323 | return; |
324 | } | 324 | } |
325 | 325 | ||
326 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { | 326 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { |
327 | switch ( e->key() ) { | 327 | switch ( e->key() ) { |
328 | case Qt::Key_Down: | 328 | case Qt::Key_Down: |
329 | case Qt::Key_Up: | 329 | case Qt::Key_Up: |
330 | QListView::keyPressEvent ( e ); | 330 | QListView::keyPressEvent ( e ); |
331 | break; | 331 | break; |
332 | case Qt::Key_Left: | 332 | case Qt::Key_Left: |
333 | case Qt::Key_Right: | 333 | case Qt::Key_Right: |
334 | QListView::keyPressEvent ( e ); | 334 | QListView::keyPressEvent ( e ); |
335 | e->accept(); | 335 | e->accept(); |
336 | return; | 336 | return; |
337 | break; | 337 | break; |
338 | default: | 338 | default: |
339 | e->ignore(); | 339 | e->ignore(); |
340 | break; | 340 | break; |
341 | } | 341 | } |
342 | return; | 342 | return; |
343 | } | 343 | } |
344 | e->ignore(); | 344 | e->ignore(); |
345 | } | 345 | } |
346 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) | 346 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) |
347 | { | 347 | { |
348 | QListView::contentsMouseReleaseEvent(e); | 348 | QListView::contentsMouseReleaseEvent(e); |
349 | mMousePressed = false; | 349 | mMousePressed = false; |
350 | } | 350 | } |
351 | 351 | ||
352 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 352 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
353 | { | 353 | { |
354 | if (!e) return; | 354 | if (!e) return; |
355 | 355 | ||
356 | QPoint vp = contentsToViewport(e->pos()); | 356 | QPoint vp = contentsToViewport(e->pos()); |
357 | 357 | ||
358 | QListViewItem *item = itemAt(vp); | 358 | QListViewItem *item = itemAt(vp); |
359 | 359 | ||
360 | emit double_Clicked(item); | 360 | emit double_Clicked(item); |
361 | if (!item) return; | 361 | if (!item) return; |
362 | 362 | ||
363 | emit doubleClicked(item,vp,0); | 363 | emit doubleClicked(item,vp,0); |
364 | } | 364 | } |
365 | 365 | ||
366 | ///////////////////////////////////////////////////////////////////////////// | 366 | ///////////////////////////////////////////////////////////////////////////// |
367 | 367 | ||
368 | KOQuickTodo::KOQuickTodo(QWidget *parent) : | 368 | KOQuickTodo::KOQuickTodo(QWidget *parent) : |
369 | QLineEdit(parent) | 369 | QLineEdit(parent) |
370 | { | 370 | { |
371 | setText(i18n("Click to add a new Todo")); | 371 | setText(i18n("Click to add a new Todo")); |
372 | } | 372 | } |
373 | 373 | ||
374 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) | 374 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) |
375 | { | 375 | { |
376 | if ( text()==i18n("Click to add a new Todo") ) | 376 | if ( text()==i18n("Click to add a new Todo") ) |
377 | setText(""); | 377 | setText(""); |
378 | QLineEdit::focusInEvent(ev); | 378 | QLineEdit::focusInEvent(ev); |
379 | } | 379 | } |
380 | 380 | ||
381 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | 381 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) |
382 | { | 382 | { |
383 | setText(i18n("Click to add a new Todo")); | 383 | setText(i18n("Click to add a new Todo")); |
384 | QLineEdit::focusOutEvent(ev); | 384 | QLineEdit::focusOutEvent(ev); |
385 | } | 385 | } |
386 | 386 | ||
387 | ///////////////////////////////////////////////////////////////////////////// | 387 | ///////////////////////////////////////////////////////////////////////////// |
388 | 388 | ||
389 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 389 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
390 | KOrg::BaseView(calendar,parent,name) | 390 | KOrg::BaseView(calendar,parent,name) |
391 | { | 391 | { |
392 | mPendingUpdateBeforeRepaint = false; | 392 | mPendingUpdateBeforeRepaint = false; |
393 | isFlatDisplay = false; | 393 | isFlatDisplay = false; |
394 | mNavigator = 0; | 394 | mNavigator = 0; |
395 | QBoxLayout *topLayout = new QVBoxLayout(this); | 395 | QBoxLayout *topLayout = new QVBoxLayout(this); |
396 | mName = QString ( name ); | 396 | mName = QString ( name ); |
397 | mBlockUpdate = false; | 397 | mBlockUpdate = false; |
398 | mQuickAdd = new KOQuickTodo(this); | 398 | mQuickAdd = new KOQuickTodo(this); |
399 | topLayout->addWidget(mQuickAdd); | 399 | topLayout->addWidget(mQuickAdd); |
400 | 400 | ||
401 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); | 401 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); |
402 | 402 | ||
403 | mTodoListView = new KOTodoListView(calendar,this, name ); | 403 | mTodoListView = new KOTodoListView(calendar,this, name ); |
404 | topLayout->addWidget(mTodoListView); | 404 | topLayout->addWidget(mTodoListView); |
405 | //mTodoListView->header()->setMaximumHeight(30); | 405 | //mTodoListView->header()->setMaximumHeight(30); |
406 | mTodoListView->setRootIsDecorated(true); | 406 | mTodoListView->setRootIsDecorated(true); |
407 | mTodoListView->setAllColumnsShowFocus(true); | 407 | mTodoListView->setAllColumnsShowFocus(true); |
408 | 408 | ||
409 | mTodoListView->setShowSortIndicator(true); | 409 | mTodoListView->setShowSortIndicator(true); |
410 | 410 | ||
411 | mTodoListView->addColumn(i18n("Todo")); | 411 | mTodoListView->addColumn(i18n("Todo")); |
412 | mTodoListView->addColumn(i18n("Prio")); | 412 | mTodoListView->addColumn(i18n("Prio")); |
413 | mTodoListView->setColumnAlignment(1,AlignHCenter); | 413 | mTodoListView->setColumnAlignment(1,AlignHCenter); |
414 | mTodoListView->addColumn(i18n("Complete")); | 414 | mTodoListView->addColumn(i18n("Complete")); |
415 | mTodoListView->setColumnAlignment(2,AlignCenter); | 415 | mTodoListView->setColumnAlignment(2,AlignCenter); |
416 | 416 | ||
417 | mTodoListView->addColumn(i18n("Due Date")); | 417 | mTodoListView->addColumn(i18n("Due Date")); |
418 | mTodoListView->setColumnAlignment(3,AlignLeft); | 418 | mTodoListView->setColumnAlignment(3,AlignLeft); |
419 | mTodoListView->addColumn(i18n("Due Time")); | 419 | mTodoListView->addColumn(i18n("Due Time")); |
420 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 420 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
421 | 421 | ||
422 | mTodoListView->addColumn(i18n("Start Date")); | 422 | mTodoListView->addColumn(i18n("Start Date")); |
423 | mTodoListView->setColumnAlignment(5,AlignLeft); | 423 | mTodoListView->setColumnAlignment(5,AlignLeft); |
424 | mTodoListView->addColumn(i18n("Start Time")); | 424 | mTodoListView->addColumn(i18n("Start Time")); |
425 | mTodoListView->setColumnAlignment(6,AlignHCenter); | 425 | mTodoListView->setColumnAlignment(6,AlignHCenter); |
426 | 426 | ||
427 | mTodoListView->addColumn(i18n("Cancelled")); | 427 | mTodoListView->addColumn(i18n("Cancelled")); |
428 | mTodoListView->addColumn(i18n("Categories")); | 428 | mTodoListView->addColumn(i18n("Categories")); |
429 | #if 0 | 429 | #if 0 |
430 | mTodoListView->addColumn(i18n("Sort Id")); | 430 | mTodoListView->addColumn(i18n("Sort Id")); |
431 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 431 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
432 | #endif | 432 | #endif |
433 | 433 | ||
434 | mTodoListView->setMinimumHeight( 60 ); | 434 | mTodoListView->setMinimumHeight( 60 ); |
435 | mTodoListView->setItemsRenameable( true ); | 435 | mTodoListView->setItemsRenameable( true ); |
436 | mTodoListView->setRenameable( 0 ); | 436 | mTodoListView->setRenameable( 0 ); |
437 | mTodoListView->setColumnWidth( 0, 120 ); | 437 | mTodoListView->setColumnWidth( 0, 120 ); |
438 | mTodoListView->setColumnWidthMode(0, QListView::Manual); | 438 | mTodoListView->setColumnWidthMode(0, QListView::Manual); |
439 | mTodoListView->setColumnWidthMode(1, QListView::Manual); | 439 | mTodoListView->setColumnWidthMode(1, QListView::Manual); |
440 | mTodoListView->setColumnWidthMode(2, QListView::Manual); | 440 | mTodoListView->setColumnWidthMode(2, QListView::Manual); |
441 | mTodoListView->setColumnWidthMode(3, QListView::Manual); | 441 | mTodoListView->setColumnWidthMode(3, QListView::Manual); |
442 | mTodoListView->setColumnWidthMode(4, QListView::Manual); | 442 | mTodoListView->setColumnWidthMode(4, QListView::Manual); |
443 | mTodoListView->setColumnWidthMode(5, QListView::Manual); | 443 | mTodoListView->setColumnWidthMode(5, QListView::Manual); |
444 | mTodoListView->setColumnWidthMode(6, QListView::Manual); | 444 | mTodoListView->setColumnWidthMode(6, QListView::Manual); |
445 | mTodoListView->setColumnWidthMode(7, QListView::Manual); | 445 | mTodoListView->setColumnWidthMode(7, QListView::Manual); |
446 | mTodoListView->setColumnWidthMode(8, QListView::Manual); | 446 | mTodoListView->setColumnWidthMode(8, QListView::Manual); |
447 | 447 | ||
448 | 448 | ||
449 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); | 449 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); |
450 | 450 | ||
451 | mPriorityPopupMenu = new QPopupMenu(this); | 451 | mPriorityPopupMenu = new QPopupMenu(this); |
452 | for (int i = 1; i <= 5; i++) { | 452 | for (int i = 1; i <= 5; i++) { |
453 | QString label = QString ("%1").arg (i); | 453 | QString label = QString ("%1").arg (i); |
454 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; | 454 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; |
455 | } | 455 | } |
456 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); | 456 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); |
457 | 457 | ||
458 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 458 | mPercentageCompletedPopupMenu = new QPopupMenu(this); |
459 | for (int i = 0; i <= 100; i+=20) { | 459 | for (int i = 0; i <= 100; i+=20) { |
460 | QString label = QString ("%1 %").arg (i); | 460 | QString label = QString ("%1 %").arg (i); |
461 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; | 461 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; |
462 | } | 462 | } |
463 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); | 463 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); |
464 | 464 | ||
465 | 465 | ||
466 | 466 | ||
467 | mItemPopupMenu = new QPopupMenu(this); | 467 | mItemPopupMenu = new QPopupMenu(this); |
468 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, | ||
469 | SLOT (toggleRunningItem())); | ||
470 | mItemPopupMenu->insertSeparator(); | ||
468 | mItemPopupMenu->insertItem(i18n("Show..."), this, | 471 | mItemPopupMenu->insertItem(i18n("Show..."), this, |
469 | SLOT (showTodo())); | 472 | SLOT (showTodo())); |
470 | mItemPopupMenu->insertItem(i18n("Edit..."), this, | 473 | mItemPopupMenu->insertItem(i18n("Edit..."), this, |
471 | SLOT (editTodo())); | 474 | SLOT (editTodo())); |
472 | mItemPopupMenu->insertItem( i18n("Delete"), this, | 475 | mItemPopupMenu->insertItem( i18n("Delete"), this, |
473 | SLOT (deleteTodo())); | 476 | SLOT (deleteTodo())); |
474 | mItemPopupMenu->insertItem( i18n("Clone..."), this, | 477 | mItemPopupMenu->insertItem( i18n("Clone..."), this, |
475 | SLOT (cloneTodo())); | 478 | SLOT (cloneTodo())); |
476 | mItemPopupMenu->insertItem( i18n("Move..."), this, | 479 | mItemPopupMenu->insertItem( i18n("Move..."), this, |
477 | SLOT (moveTodo())); | 480 | SLOT (moveTodo())); |
478 | mItemPopupMenu->insertItem( i18n("Beam..."), this, | 481 | mItemPopupMenu->insertItem( i18n("Beam..."), this, |
479 | SLOT (beamTodo())); | 482 | SLOT (beamTodo())); |
480 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, | 483 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, |
481 | SLOT (cancelTodo())); | 484 | SLOT (cancelTodo())); |
482 | mItemPopupMenu->insertSeparator(); | 485 | mItemPopupMenu->insertSeparator(); |
483 | 486 | /* | |
484 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, | ||
485 | SLOT (toggleRunningItem())); | ||
486 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, | 487 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, |
487 | SLOT (newTodo())); | 488 | SLOT (newTodo())); |
489 | */ | ||
488 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, | 490 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, |
489 | SLOT (newSubTodo())); | 491 | SLOT (newSubTodo())); |
490 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, | 492 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, |
491 | SLOT (unparentTodo()),0,21); | 493 | SLOT (unparentTodo()),0,21); |
492 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, | 494 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, |
493 | SLOT (reparentTodo()),0,22); | 495 | SLOT (reparentTodo()),0,22); |
494 | mItemPopupMenu->insertSeparator(); | 496 | mItemPopupMenu->insertSeparator(); |
495 | #if 0 | 497 | #if 0 |
496 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), | 498 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), |
497 | this, SLOT( purgeCompleted() ) ); | 499 | this, SLOT( purgeCompleted() ) ); |
498 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), | 500 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), |
499 | this, SLOT( toggleCompleted() ),0, 33 ); | 501 | this, SLOT( toggleCompleted() ),0, 33 ); |
500 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 502 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
501 | this, SLOT( toggleQuickTodo() ),0, 34 ); | 503 | this, SLOT( toggleQuickTodo() ),0, 34 ); |
502 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 504 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
503 | this, SLOT( toggleRunning() ),0, 35 ); | 505 | this, SLOT( toggleRunning() ),0, 35 ); |
504 | 506 | ||
505 | #endif | 507 | #endif |
506 | mPopupMenu = new QPopupMenu(this); | 508 | mPopupMenu = new QPopupMenu(this); |
507 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, | 509 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, |
508 | SLOT (newTodo()),0,1); | 510 | SLOT (newTodo()),0,1); |
509 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), | 511 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), |
510 | this, SLOT(purgeCompleted()),0,2); | 512 | this, SLOT(purgeCompleted()),0,2); |
511 | mPopupMenu->insertItem(i18n("Show Completed"), | 513 | mPopupMenu->insertItem(i18n("Show Completed"), |
512 | this, SLOT( toggleCompleted() ),0,3 ); | 514 | this, SLOT( toggleCompleted() ),0,3 ); |
513 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 515 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
514 | this, SLOT( toggleQuickTodo() ),0,4 ); | 516 | this, SLOT( toggleQuickTodo() ),0,4 ); |
515 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 517 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
516 | this, SLOT( toggleRunning() ),0,5 ); | 518 | this, SLOT( toggleRunning() ),0,5 ); |
517 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), | 519 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), |
518 | this, SLOT( setAllOpen() ),0,6 ); | 520 | this, SLOT( setAllOpen() ),0,6 ); |
519 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), | 521 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), |
520 | this, SLOT( setAllClose() ),0,7 ); | 522 | this, SLOT( setAllClose() ),0,7 ); |
521 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), | 523 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), |
522 | this, SLOT( setAllFlat() ),0,8 ); | 524 | this, SLOT( setAllFlat() ),0,8 ); |
523 | mDocPrefs = new DocPrefs( name ); | 525 | mDocPrefs = new DocPrefs( name ); |
524 | 526 | ||
525 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); | 527 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); |
526 | mPopupMenu->setCheckable( true ); | 528 | mPopupMenu->setCheckable( true ); |
527 | mItemPopupMenu->setCheckable( true ); | 529 | mItemPopupMenu->setCheckable( true ); |
528 | 530 | ||
529 | 531 | ||
530 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 532 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
531 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 533 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
532 | 534 | ||
533 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 535 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
534 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 536 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
535 | 537 | ||
536 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 538 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
537 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 539 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
538 | 540 | ||
539 | 541 | ||
540 | // Double clicking conflicts with opening/closing the subtree | 542 | // Double clicking conflicts with opening/closing the subtree |
541 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), | 543 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), |
542 | SLOT( editItem( QListViewItem *) ) ); | 544 | SLOT( editItem( QListViewItem *) ) ); |
543 | /* | 545 | /* |
544 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, | 546 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, |
545 | const QPoint &,int ) ), | 547 | const QPoint &,int ) ), |
546 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 548 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
547 | */ | 549 | */ |
548 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, | 550 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, |
549 | const QPoint &,int ) ), | 551 | const QPoint &,int ) ), |
550 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 552 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
551 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), | 553 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), |
552 | SLOT( itemClicked( QListViewItem * ) ) ); | 554 | SLOT( itemClicked( QListViewItem * ) ) ); |
553 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), | 555 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), |
554 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); | 556 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); |
555 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 557 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
556 | SLOT( updateView() ) ); | 558 | SLOT( updateView() ) ); |
557 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 559 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
558 | SLOT( todoModified(Todo *, int) ) ); | 560 | SLOT( todoModified(Todo *, int) ) ); |
559 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), | 561 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), |
560 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 562 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
561 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), | 563 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), |
562 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 564 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
563 | connect( mTodoListView, SIGNAL( paintNeeded() ), | 565 | connect( mTodoListView, SIGNAL( paintNeeded() ), |
564 | SLOT( paintNeeded()) ); | 566 | SLOT( paintNeeded()) ); |
565 | 567 | ||
566 | #if 0 | 568 | #if 0 |
567 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), | 569 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), |
568 | SLOT(selectionChanged(QListViewItem *))); | 570 | SLOT(selectionChanged(QListViewItem *))); |
569 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), | 571 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), |
570 | SLOT(selectionChanged(QListViewItem *))); | 572 | SLOT(selectionChanged(QListViewItem *))); |
571 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), | 573 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), |
572 | SLOT(selectionChanged(QListViewItem *))); | 574 | SLOT(selectionChanged(QListViewItem *))); |
573 | #endif | 575 | #endif |
574 | 576 | ||
575 | connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); | 577 | connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); |
576 | connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); | 578 | connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); |
577 | connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); | 579 | connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); |
578 | 580 | ||
579 | connect( mTodoListView, SIGNAL(selectionChanged() ), | 581 | connect( mTodoListView, SIGNAL(selectionChanged() ), |
580 | SLOT( processSelectionChange() ) ); | 582 | SLOT( processSelectionChange() ) ); |
581 | connect( mQuickAdd, SIGNAL( returnPressed () ), | 583 | connect( mQuickAdd, SIGNAL( returnPressed () ), |
582 | SLOT( addQuickTodo() ) ); | 584 | SLOT( addQuickTodo() ) ); |
583 | 585 | ||
584 | } | 586 | } |
585 | 587 | ||
586 | KOTodoView::~KOTodoView() | 588 | KOTodoView::~KOTodoView() |
587 | { | 589 | { |
588 | // delete mKOTodoViewWhatsThis; | 590 | // delete mKOTodoViewWhatsThis; |
589 | delete mDocPrefs; | 591 | delete mDocPrefs; |
590 | } | 592 | } |
591 | QString KOTodoView::getWhatsThisText(QPoint p) | 593 | QString KOTodoView::getWhatsThisText(QPoint p) |
592 | { | 594 | { |
593 | KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); | 595 | KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); |
594 | if ( item ) | 596 | if ( item ) |
595 | return KIncidenceFormatter::instance()->getFormattedText( item->todo(), | 597 | return KIncidenceFormatter::instance()->getFormattedText( item->todo(), |
596 | KOPrefs::instance()->mWTshowDetails, | 598 | KOPrefs::instance()->mWTshowDetails, |
597 | KOPrefs::instance()->mWTshowCreated, | 599 | KOPrefs::instance()->mWTshowCreated, |
598 | KOPrefs::instance()->mWTshowChanged); | 600 | KOPrefs::instance()->mWTshowChanged); |
599 | return i18n("That is the todo view" ); | 601 | return i18n("That is the todo view" ); |
600 | 602 | ||
601 | } | 603 | } |
602 | 604 | ||
603 | void KOTodoView::jumpToDate () | 605 | void KOTodoView::jumpToDate () |
604 | { | 606 | { |
605 | // if (mActiveItem) { | 607 | // if (mActiveItem) { |
606 | // mActiveItem->todo()); | 608 | // mActiveItem->todo()); |
607 | // if ( mActiveItem->todo()->hasDueDate() ) | 609 | // if ( mActiveItem->todo()->hasDueDate() ) |
608 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); | 610 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); |
609 | } | 611 | } |
610 | void KOTodoView::paintNeeded() | 612 | void KOTodoView::paintNeeded() |
611 | { | 613 | { |
612 | if ( mPendingUpdateBeforeRepaint ) { | 614 | if ( mPendingUpdateBeforeRepaint ) { |
613 | updateView(); | 615 | updateView(); |
614 | mPendingUpdateBeforeRepaint = false; | 616 | mPendingUpdateBeforeRepaint = false; |
615 | } | 617 | } |
616 | } | 618 | } |
617 | void KOTodoView::paintEvent(QPaintEvent * pevent) | 619 | void KOTodoView::paintEvent(QPaintEvent * pevent) |
618 | { | 620 | { |
619 | if ( mPendingUpdateBeforeRepaint ) { | 621 | if ( mPendingUpdateBeforeRepaint ) { |
620 | updateView(); | 622 | updateView(); |
621 | mPendingUpdateBeforeRepaint = false; | 623 | mPendingUpdateBeforeRepaint = false; |
622 | } | 624 | } |
623 | KOrg::BaseView::paintEvent( pevent); | 625 | KOrg::BaseView::paintEvent( pevent); |
624 | } | 626 | } |
625 | 627 | ||
626 | void KOTodoView::updateView() | 628 | void KOTodoView::updateView() |
627 | { | 629 | { |
628 | pendingSubtodo = 0; | 630 | pendingSubtodo = 0; |
629 | if ( mBlockUpdate ) { | 631 | if ( mBlockUpdate ) { |
630 | return; | 632 | return; |
631 | } | 633 | } |
632 | if ( !isVisible() ) { | 634 | if ( !isVisible() ) { |
633 | mPendingUpdateBeforeRepaint = true; | 635 | mPendingUpdateBeforeRepaint = true; |
634 | return; | 636 | return; |
635 | } | 637 | } |
636 | storeCurrentItem(); | 638 | storeCurrentItem(); |
637 | //qDebug("KOTodoView::updateView() %x", this); | 639 | //qDebug("KOTodoView::updateView() %x", this); |
638 | if ( isFlatDisplay ) { | 640 | if ( isFlatDisplay ) { |
639 | displayAllFlat(); | 641 | displayAllFlat(); |
640 | resetCurrentItem(); | 642 | resetCurrentItem(); |
641 | return; | 643 | return; |
642 | } | 644 | } |
643 | //qDebug("update "); | 645 | //qDebug("update "); |
644 | // kdDebug() << "KOTodoView::updateView()" << endl; | 646 | // kdDebug() << "KOTodoView::updateView()" << endl; |
645 | QFont fo = KOPrefs::instance()->mTodoViewFont; | 647 | QFont fo = KOPrefs::instance()->mTodoViewFont; |
646 | 648 | ||
647 | 649 | ||
648 | mTodoListView->clear(); | 650 | mTodoListView->clear(); |
649 | if ( mName == "todolistsmall" ) { | 651 | if ( mName == "todolistsmall" ) { |
650 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { | 652 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { |
651 | int ps = fo.pointSize() -2; | 653 | int ps = fo.pointSize() -2; |
652 | if ( ps > 12 ) | 654 | if ( ps > 12 ) |
653 | ps -= 2; | 655 | ps -= 2; |
654 | fo.setPointSize( ps ); | 656 | fo.setPointSize( ps ); |
655 | } | 657 | } |
656 | } | 658 | } |
657 | 659 | ||
658 | mTodoListView->setFont( fo ); | 660 | mTodoListView->setFont( fo ); |
659 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); | 661 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); |
660 | //mTodoListView->header()->setMaximumHeight(fm.height()); | 662 | //mTodoListView->header()->setMaximumHeight(fm.height()); |
661 | QPtrList<Todo> todoList = calendar()->todos(); | 663 | QPtrList<Todo> todoList = calendar()->todos(); |
662 | 664 | ||
663 | /* | 665 | /* |
664 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; | 666 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; |
665 | Event *t; | 667 | Event *t; |
666 | for(t = todoList.first(); t; t = todoList.next()) { | 668 | for(t = todoList.first(); t; t = todoList.next()) { |
667 | kdDebug() << " " << t->getSummary() << endl; | 669 | kdDebug() << " " << t->getSummary() << endl; |
668 | 670 | ||
669 | if (t->getRelatedTo()) { | 671 | if (t->getRelatedTo()) { |
670 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; | 672 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; |
671 | } | 673 | } |
672 | 674 | ||
673 | QPtrList<Event> l = t->getRelations(); | 675 | QPtrList<Event> l = t->getRelations(); |
674 | Event *c; | 676 | Event *c; |
675 | for(c=l.first();c;c=l.next()) { | 677 | for(c=l.first();c;c=l.next()) { |
676 | kdDebug() << " - relation: " << c->getSummary() << endl; | 678 | kdDebug() << " - relation: " << c->getSummary() << endl; |
677 | } | 679 | } |
678 | } | 680 | } |
679 | */ | 681 | */ |
680 | 682 | ||
681 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a | 683 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a |
682 | // specific order of events. That means that we have to generate parent items | 684 | // specific order of events. That means that we have to generate parent items |
683 | // recursively for proper hierarchical display of Todos. | 685 | // recursively for proper hierarchical display of Todos. |
684 | mTodoMap.clear(); | 686 | mTodoMap.clear(); |
685 | Todo *todo; | 687 | Todo *todo; |
686 | todo = todoList.first();// todo; todo = todoList.next()) { | 688 | todo = todoList.first();// todo; todo = todoList.next()) { |
687 | while ( todo ) { | 689 | while ( todo ) { |
688 | bool next = true; | 690 | bool next = true; |
689 | // qDebug("todo %s ", todo->summary().latin1()); | 691 | // qDebug("todo %s ", todo->summary().latin1()); |
690 | Incidence *incidence = todo->relatedTo(); | 692 | Incidence *incidence = todo->relatedTo(); |
691 | while ( incidence ) { | 693 | while ( incidence ) { |
692 | if ( incidence->type() == "Todo") { | 694 | if ( incidence->type() == "Todo") { |
693 | //qDebug("related %s ",incidence->summary().latin1() ); | 695 | //qDebug("related %s ",incidence->summary().latin1() ); |
694 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { | 696 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { |
695 | //qDebug("related not found "); | 697 | //qDebug("related not found "); |
696 | todoList.remove( ); | 698 | todoList.remove( ); |
697 | todo = todoList.current(); | 699 | todo = todoList.current(); |
698 | next = false; | 700 | next = false; |
699 | incidence = 0; | 701 | incidence = 0; |
700 | 702 | ||
701 | } else { | 703 | } else { |
702 | //qDebug("related found "); | 704 | //qDebug("related found "); |
703 | incidence = incidence->relatedTo(); | 705 | incidence = incidence->relatedTo(); |
704 | } | 706 | } |
705 | } else | 707 | } else |
706 | incidence = 0; | 708 | incidence = 0; |
707 | } | 709 | } |
708 | if ( next ) | 710 | if ( next ) |
709 | todo = todoList.next(); | 711 | todo = todoList.next(); |
710 | } | 712 | } |
711 | 713 | ||
712 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 714 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
713 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) | 715 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) |
714 | { | 716 | { |
715 | insertTodoItem(todo); | 717 | insertTodoItem(todo); |
716 | } | 718 | } |
717 | } | 719 | } |
718 | // Restore opened/closed state | 720 | // Restore opened/closed state |
719 | mTodoListView->blockSignals( true ); | 721 | mTodoListView->blockSignals( true ); |
720 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); | 722 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); |
721 | mTodoListView->blockSignals( false ); | 723 | mTodoListView->blockSignals( false ); |
722 | resetCurrentItem(); | 724 | resetCurrentItem(); |
723 | processSelectionChange(); | 725 | processSelectionChange(); |
724 | } | 726 | } |
725 | 727 | ||
726 | void KOTodoView::storeCurrentItem() | 728 | void KOTodoView::storeCurrentItem() |
727 | { | 729 | { |
728 | mCurItem = 0; | 730 | mCurItem = 0; |
729 | mCurItemRootParent = 0; | 731 | mCurItemRootParent = 0; |
730 | mCurItemParent = 0; | 732 | mCurItemParent = 0; |
731 | mCurItemAbove = 0; | 733 | mCurItemAbove = 0; |
732 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 734 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
733 | if (mActiveItem) { | 735 | if (mActiveItem) { |
734 | mCurItem = mActiveItem->todo(); | 736 | mCurItem = mActiveItem->todo(); |
735 | KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); | 737 | KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); |
736 | if ( activeItemAbove ) | 738 | if ( activeItemAbove ) |
737 | mCurItemAbove = activeItemAbove->todo(); | 739 | mCurItemAbove = activeItemAbove->todo(); |
738 | mCurItemRootParent = mCurItem; | 740 | mCurItemRootParent = mCurItem; |
739 | mCurItemParent = mCurItemRootParent->relatedTo(); | 741 | mCurItemParent = mCurItemRootParent->relatedTo(); |
740 | while ( mCurItemRootParent->relatedTo() != 0 ) | 742 | while ( mCurItemRootParent->relatedTo() != 0 ) |
741 | mCurItemRootParent = mCurItemRootParent->relatedTo(); | 743 | mCurItemRootParent = mCurItemRootParent->relatedTo(); |
742 | } | 744 | } |
743 | mActiveItem = 0; | 745 | mActiveItem = 0; |
744 | } | 746 | } |
745 | 747 | ||
746 | void KOTodoView::resetCurrentItem() | 748 | void KOTodoView::resetCurrentItem() |
747 | { | 749 | { |
748 | mTodoListView->setFocus(); | 750 | mTodoListView->setFocus(); |
749 | KOTodoViewItem* foundItem = 0; | 751 | KOTodoViewItem* foundItem = 0; |
750 | KOTodoViewItem* foundItemRoot = 0; | 752 | KOTodoViewItem* foundItemRoot = 0; |
751 | KOTodoViewItem* foundItemParent = 0; | 753 | KOTodoViewItem* foundItemParent = 0; |
752 | KOTodoViewItem* foundItemAbove = 0; | 754 | KOTodoViewItem* foundItemAbove = 0; |
753 | if ( mTodoListView->firstChild () ) { | 755 | if ( mTodoListView->firstChild () ) { |
754 | if ( mCurItem ) { | 756 | if ( mCurItem ) { |
755 | KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); | 757 | KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); |
756 | while ( item ) { | 758 | while ( item ) { |
757 | if ( item->todo() == mCurItem ) { | 759 | if ( item->todo() == mCurItem ) { |
758 | foundItem = item; | 760 | foundItem = item; |
759 | break; | 761 | break; |
760 | } else if ( item->todo() == mCurItemAbove ) { | 762 | } else if ( item->todo() == mCurItemAbove ) { |
761 | foundItemAbove = item; | 763 | foundItemAbove = item; |
762 | 764 | ||
763 | } | 765 | } |
764 | if ( item->todo() == mCurItemRootParent ) { | 766 | if ( item->todo() == mCurItemRootParent ) { |
765 | foundItemRoot = item; | 767 | foundItemRoot = item; |
766 | } | 768 | } |
767 | if ( item->todo() == mCurItemParent ) { | 769 | if ( item->todo() == mCurItemParent ) { |
768 | foundItemParent = item; | 770 | foundItemParent = item; |
769 | } | 771 | } |
770 | item = (KOTodoViewItem*)item->itemBelow(); | 772 | item = (KOTodoViewItem*)item->itemBelow(); |
771 | } | 773 | } |
772 | if ( ! foundItem ) { | 774 | if ( ! foundItem ) { |
773 | if ( foundItemParent ) { | 775 | if ( foundItemParent ) { |
774 | foundItem = foundItemParent; | 776 | foundItem = foundItemParent; |
775 | } else { | 777 | } else { |
776 | if ( foundItemRoot ) | 778 | if ( foundItemRoot ) |
777 | foundItem = foundItemRoot; | 779 | foundItem = foundItemRoot; |
778 | else | 780 | else |
779 | foundItem = foundItemAbove; | 781 | foundItem = foundItemAbove; |
780 | } | 782 | } |
781 | } | 783 | } |
782 | } | 784 | } |
783 | if ( foundItem ) { | 785 | if ( foundItem ) { |
784 | mTodoListView->setCurrentItem( foundItem ); | 786 | mTodoListView->setCurrentItem( foundItem ); |
785 | mTodoListView->ensureItemVisible( foundItem ); | 787 | mTodoListView->ensureItemVisible( foundItem ); |
786 | } else { | 788 | } else { |
787 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); | 789 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); |
788 | } | 790 | } |
789 | } | 791 | } |
790 | mTodoListView->setFocus(); | 792 | mTodoListView->setFocus(); |
791 | } | 793 | } |
792 | //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; | 794 | //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; |
793 | bool KOTodoView::checkTodo( Todo * todo ) | 795 | bool KOTodoView::checkTodo( Todo * todo ) |
794 | { | 796 | { |
795 | 797 | ||
796 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) | 798 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) |
797 | return false; | 799 | return false; |
798 | if ( !todo->isCompleted() ) { | 800 | if ( !todo->isCompleted() ) { |
799 | if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) | 801 | if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) |
800 | return true; | 802 | return true; |
801 | } | 803 | } |
802 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { | 804 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { |
803 | if ( todo->hasStartDate() ) | 805 | if ( todo->hasStartDate() ) |
804 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) | 806 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) |
805 | return false; | 807 | return false; |
806 | if ( todo->hasDueDate() ) | 808 | if ( todo->hasDueDate() ) |
807 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) | 809 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) |
808 | return false; | 810 | return false; |
809 | } | 811 | } |
810 | return true; | 812 | return true; |
811 | } | 813 | } |
812 | 814 | ||
813 | void KOTodoView::restoreItemState( QListViewItem *item ) | 815 | void KOTodoView::restoreItemState( QListViewItem *item ) |
814 | { | 816 | { |
815 | pendingSubtodo = 0; | 817 | pendingSubtodo = 0; |
816 | while( item ) { | 818 | while( item ) { |
817 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 819 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
818 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); | 820 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); |
819 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); | 821 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); |
820 | item = item->nextSibling(); | 822 | item = item->nextSibling(); |
821 | } | 823 | } |
822 | } | 824 | } |
823 | 825 | ||
824 | 826 | ||
825 | QMap<Todo *,KOTodoViewItem *>::ConstIterator | 827 | QMap<Todo *,KOTodoViewItem *>::ConstIterator |
826 | KOTodoView::insertTodoItem(Todo *todo) | 828 | KOTodoView::insertTodoItem(Todo *todo) |
827 | { | 829 | { |
828 | 830 | ||
829 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; | 831 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; |
830 | // TODO: Check, if dynmaic cast is necessary | 832 | // TODO: Check, if dynmaic cast is necessary |
831 | 833 | ||
832 | pendingSubtodo = 0; | 834 | pendingSubtodo = 0; |
833 | Incidence *incidence = todo->relatedTo(); | 835 | Incidence *incidence = todo->relatedTo(); |
834 | if (incidence && incidence->type() == "Todo") { | 836 | if (incidence && incidence->type() == "Todo") { |
835 | Todo *relatedTodo = static_cast<Todo *>(incidence); | 837 | Todo *relatedTodo = static_cast<Todo *>(incidence); |
836 | 838 | ||
837 | // kdDebug() << " has Related" << endl; | 839 | // kdDebug() << " has Related" << endl; |
838 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 840 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
839 | itemIterator = mTodoMap.find(relatedTodo); | 841 | itemIterator = mTodoMap.find(relatedTodo); |
840 | if (itemIterator == mTodoMap.end()) { | 842 | if (itemIterator == mTodoMap.end()) { |
841 | // kdDebug() << " related not yet in list" << endl; | 843 | // kdDebug() << " related not yet in list" << endl; |
842 | itemIterator = insertTodoItem (relatedTodo); | 844 | itemIterator = insertTodoItem (relatedTodo); |
843 | } | 845 | } |
844 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem | 846 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem |
845 | // and one into the map. Sure finding is more easy but why? -zecke | 847 | // and one into the map. Sure finding is more easy but why? -zecke |
846 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); | 848 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); |
847 | return mTodoMap.insert(todo,todoItem); | 849 | return mTodoMap.insert(todo,todoItem); |
848 | } else { | 850 | } else { |
849 | // kdDebug() << " no Related" << endl; | 851 | // kdDebug() << " no Related" << endl; |
850 | // see above -zecke | 852 | // see above -zecke |
851 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 853 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
852 | return mTodoMap.insert(todo,todoItem); | 854 | return mTodoMap.insert(todo,todoItem); |
853 | } | 855 | } |
854 | } | 856 | } |
855 | 857 | ||
856 | 858 | ||
857 | void KOTodoView::updateConfig() | 859 | void KOTodoView::updateConfig() |
858 | { | 860 | { |
859 | updateView(); | 861 | updateView(); |
860 | mTodoListView->repaintContents(); | 862 | mTodoListView->repaintContents(); |
861 | } | 863 | } |
862 | 864 | ||
863 | QPtrList<Incidence> KOTodoView::selectedIncidences() | 865 | QPtrList<Incidence> KOTodoView::selectedIncidences() |
864 | { | 866 | { |
865 | QPtrList<Incidence> selected; | 867 | QPtrList<Incidence> selected; |
866 | 868 | ||
867 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 869 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
868 | // if (!item) item = mActiveItem; | 870 | // if (!item) item = mActiveItem; |
869 | if (item) selected.append(item->todo()); | 871 | if (item) selected.append(item->todo()); |
870 | 872 | ||
871 | return selected; | 873 | return selected; |
872 | } | 874 | } |
873 | 875 | ||
874 | QPtrList<Todo> KOTodoView::selectedTodos() | 876 | QPtrList<Todo> KOTodoView::selectedTodos() |
875 | { | 877 | { |
876 | QPtrList<Todo> selected; | 878 | QPtrList<Todo> selected; |
877 | 879 | ||
878 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 880 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
879 | // if (!item) item = mActiveItem; | 881 | // if (!item) item = mActiveItem; |
880 | if (item) selected.append(item->todo()); | 882 | if (item) selected.append(item->todo()); |
881 | 883 | ||
882 | return selected; | 884 | return selected; |
883 | } | 885 | } |
884 | 886 | ||
885 | void KOTodoView::changeEventDisplay(Event *, int) | 887 | void KOTodoView::changeEventDisplay(Event *, int) |
886 | { | 888 | { |
887 | updateView(); | 889 | updateView(); |
888 | } | 890 | } |
889 | 891 | ||
890 | void KOTodoView::showDates(const QDate &, const QDate &) | 892 | void KOTodoView::showDates(const QDate &, const QDate &) |
891 | { | 893 | { |
892 | } | 894 | } |
893 | 895 | ||
894 | void KOTodoView::showEvents(QPtrList<Event>) | 896 | void KOTodoView::showEvents(QPtrList<Event>) |
895 | { | 897 | { |
896 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; | 898 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; |
897 | } | 899 | } |
898 | 900 | ||
899 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 901 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
900 | const QDate &td) | 902 | const QDate &td) |
901 | { | 903 | { |
902 | #ifndef KORG_NOPRINTER | 904 | #ifndef KORG_NOPRINTER |
903 | calPrinter->preview(CalPrinter::Todolist, fd, td); | 905 | calPrinter->preview(CalPrinter::Todolist, fd, td); |
904 | #endif | 906 | #endif |
905 | } | 907 | } |
906 | 908 | ||
907 | void KOTodoView::editItem(QListViewItem *item ) | 909 | void KOTodoView::editItem(QListViewItem *item ) |
908 | { | 910 | { |
909 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); | 911 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); |
910 | } | 912 | } |
911 | 913 | ||
912 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) | 914 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) |
913 | { | 915 | { |
914 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); | 916 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); |
915 | } | 917 | } |
916 | 918 | ||
917 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) | 919 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) |
918 | { | 920 | { |
919 | pendingSubtodo = 0; | 921 | pendingSubtodo = 0; |
920 | mActiveItem = (KOTodoViewItem *)item; | 922 | mActiveItem = (KOTodoViewItem *)item; |
921 | if (item) { | 923 | if (item) { |
922 | switch (column){ | 924 | switch (column){ |
923 | case 1: | 925 | case 1: |
924 | mPriorityPopupMenu->popup(QCursor::pos ()); break; | 926 | mPriorityPopupMenu->popup(QCursor::pos ()); break; |
925 | case 2: | 927 | case 2: |
926 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; | 928 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; |
927 | case 3: | 929 | case 3: |
928 | moveTodo(); | 930 | moveTodo(); |
929 | break; | 931 | break; |
930 | case 8: | 932 | case 8: |
931 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; | 933 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; |
932 | default: | 934 | default: |
933 | mItemPopupMenu->popup(QCursor::pos()); | 935 | mItemPopupMenu->popup(QCursor::pos()); |
934 | } | 936 | } |
935 | } else mPopupMenu->popup(QCursor::pos()); | 937 | } else mPopupMenu->popup(QCursor::pos()); |
936 | } | 938 | } |
937 | void KOTodoView::newTodo() | 939 | void KOTodoView::newTodo() |
938 | { | 940 | { |
939 | emit newTodoSignal(); | 941 | emit newTodoSignal(); |
940 | } | 942 | } |
941 | 943 | ||
942 | void KOTodoView::newSubTodo() | 944 | void KOTodoView::newSubTodo() |
943 | { | 945 | { |
944 | if (mActiveItem) { | 946 | if (mActiveItem) { |
945 | emit newSubTodoSignal(mActiveItem->todo()); | 947 | emit newSubTodoSignal(mActiveItem->todo()); |
946 | } | 948 | } |
947 | } | 949 | } |
948 | void KOTodoView::unparentTodo() | 950 | void KOTodoView::unparentTodo() |
949 | { | 951 | { |
950 | if (mActiveItem) { | 952 | if (mActiveItem) { |
951 | emit unparentTodoSignal(mActiveItem->todo()); | 953 | emit unparentTodoSignal(mActiveItem->todo()); |
952 | } | 954 | } |
953 | } | 955 | } |
954 | 956 | ||
955 | void KOTodoView::reparentTodo() | 957 | void KOTodoView::reparentTodo() |
956 | { | 958 | { |
957 | if (mActiveItem) { | 959 | if (mActiveItem) { |
958 | topLevelWidget()->setCaption(i18n("Click on new parent item")); | 960 | topLevelWidget()->setCaption(i18n("Click on new parent item")); |
959 | pendingSubtodo = mActiveItem; | 961 | pendingSubtodo = mActiveItem; |
960 | } | 962 | } |
961 | } | 963 | } |
962 | void KOTodoView::editTodo() | 964 | void KOTodoView::editTodo() |
963 | { | 965 | { |
964 | if (mActiveItem) { | 966 | if (mActiveItem) { |
965 | emit editTodoSignal(mActiveItem->todo()); | 967 | emit editTodoSignal(mActiveItem->todo()); |
966 | } | 968 | } |
967 | } | 969 | } |
968 | void KOTodoView::cloneTodo() | 970 | void KOTodoView::cloneTodo() |
969 | { | 971 | { |
970 | if (mActiveItem) { | 972 | if (mActiveItem) { |
971 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); | 973 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); |
972 | } | 974 | } |
973 | } | 975 | } |
974 | void KOTodoView::cancelTodo() | 976 | void KOTodoView::cancelTodo() |
975 | { | 977 | { |
976 | if (mActiveItem) { | 978 | if (mActiveItem) { |
977 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); | 979 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); |
978 | } | 980 | } |
979 | } | 981 | } |
980 | void KOTodoView::moveTodo() | 982 | void KOTodoView::moveTodo() |
981 | { | 983 | { |
982 | if (mActiveItem) { | 984 | if (mActiveItem) { |
983 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); | 985 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); |
984 | } | 986 | } |
985 | } | 987 | } |
986 | void KOTodoView::beamTodo() | 988 | void KOTodoView::beamTodo() |
987 | { | 989 | { |
988 | if (mActiveItem) { | 990 | if (mActiveItem) { |
989 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); | 991 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); |
990 | } | 992 | } |
991 | } | 993 | } |
992 | 994 | ||
993 | 995 | ||
994 | void KOTodoView::showTodo() | 996 | void KOTodoView::showTodo() |
995 | { | 997 | { |
996 | if (mActiveItem) { | 998 | if (mActiveItem) { |
997 | emit showTodoSignal(mActiveItem->todo()); | 999 | emit showTodoSignal(mActiveItem->todo()); |
998 | } | 1000 | } |
999 | } | 1001 | } |
1000 | 1002 | ||
1001 | void KOTodoView::deleteTodo() | 1003 | void KOTodoView::deleteTodo() |
1002 | { | 1004 | { |
1003 | if (mActiveItem) { | 1005 | if (mActiveItem) { |
1004 | emit deleteTodoSignal(mActiveItem->todo()); | 1006 | emit deleteTodoSignal(mActiveItem->todo()); |
1005 | } | 1007 | } |
1006 | } | 1008 | } |
1007 | 1009 | ||
1008 | void KOTodoView::setNewPriority(int index) | 1010 | void KOTodoView::setNewPriority(int index) |
1009 | { | 1011 | { |
1010 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1012 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1011 | mActiveItem->todo()->setPriority(mPriority[index]); | 1013 | mActiveItem->todo()->setPriority(mPriority[index]); |
1012 | mActiveItem->construct(); | 1014 | mActiveItem->construct(); |
1013 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); | 1015 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); |
1014 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1016 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1015 | } | 1017 | } |
1016 | } | 1018 | } |
1017 | 1019 | ||
1018 | void KOTodoView::setNewPercentage(int index) | 1020 | void KOTodoView::setNewPercentage(int index) |
1019 | { | 1021 | { |
1020 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1022 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1021 | 1023 | ||
1022 | if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { | 1024 | if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { |
1023 | mActiveItem->setOn( true ); | 1025 | mActiveItem->setOn( true ); |
1024 | return; | 1026 | return; |
1025 | } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { | 1027 | } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { |
1026 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); | 1028 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); |
1027 | if ( par && par->isOn() ) | 1029 | if ( par && par->isOn() ) |
1028 | par->setOn( false ); | 1030 | par->setOn( false ); |
1029 | } | 1031 | } |
1030 | if (mPercentage[index] == 100) { | 1032 | if (mPercentage[index] == 100) { |
1031 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); | 1033 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); |
1032 | } else { | 1034 | } else { |
1033 | mActiveItem->todo()->setCompleted(false); | 1035 | mActiveItem->todo()->setCompleted(false); |
1034 | } | 1036 | } |
1035 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); | 1037 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); |
1036 | mActiveItem->construct(); | 1038 | mActiveItem->construct(); |
1037 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); | 1039 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); |
1038 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1040 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1039 | } | 1041 | } |
1040 | } | 1042 | } |
1041 | 1043 | ||
1042 | 1044 | ||
1043 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) | 1045 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) |
1044 | { | 1046 | { |
1045 | QPopupMenu* tempMenu = new QPopupMenu (this); | 1047 | QPopupMenu* tempMenu = new QPopupMenu (this); |
1046 | QStringList checkedCategories = todoItem->todo()->categories (); | 1048 | QStringList checkedCategories = todoItem->todo()->categories (); |
1047 | 1049 | ||
1048 | tempMenu->setCheckable (true); | 1050 | tempMenu->setCheckable (true); |
1049 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 1051 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
1050 | it != KOPrefs::instance()->mCustomCategories.end (); | 1052 | it != KOPrefs::instance()->mCustomCategories.end (); |
1051 | ++it) { | 1053 | ++it) { |
1052 | int index = tempMenu->insertItem (*it); | 1054 | int index = tempMenu->insertItem (*it); |
1053 | mCategory[index] = *it; | 1055 | mCategory[index] = *it; |
1054 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); | 1056 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); |
1055 | } | 1057 | } |
1056 | 1058 | ||
1057 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 1059 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
1058 | return tempMenu; | 1060 | return tempMenu; |
1059 | 1061 | ||
1060 | 1062 | ||
1061 | } | 1063 | } |
1062 | void KOTodoView::changedCategories(int index) | 1064 | void KOTodoView::changedCategories(int index) |
1063 | { | 1065 | { |
1064 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1066 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1065 | QStringList categories = mActiveItem->todo()->categories (); | 1067 | QStringList categories = mActiveItem->todo()->categories (); |
1066 | QString colcat = categories.first(); | 1068 | QString colcat = categories.first(); |
1067 | if (categories.find (mCategory[index]) != categories.end ()) | 1069 | if (categories.find (mCategory[index]) != categories.end ()) |
1068 | categories.remove (mCategory[index]); | 1070 | categories.remove (mCategory[index]); |
1069 | else | 1071 | else |
1070 | categories.insert (categories.end(), mCategory[index]); | 1072 | categories.insert (categories.end(), mCategory[index]); |
1071 | categories.sort (); | 1073 | categories.sort (); |
1072 | if ( !colcat.isEmpty() ) { | 1074 | if ( !colcat.isEmpty() ) { |
1073 | if ( categories.find ( colcat ) != categories.end () ) { | 1075 | if ( categories.find ( colcat ) != categories.end () ) { |
1074 | categories.remove( colcat ); | 1076 | categories.remove( colcat ); |
1075 | categories.prepend( colcat ); | 1077 | categories.prepend( colcat ); |
1076 | } | 1078 | } |
1077 | } | 1079 | } |
1078 | mActiveItem->todo()->setCategories (categories); | 1080 | mActiveItem->todo()->setCategories (categories); |
1079 | mActiveItem->construct(); | 1081 | mActiveItem->construct(); |
1080 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1082 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1081 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); | 1083 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); |
1082 | } | 1084 | } |
1083 | } | 1085 | } |
1084 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 1086 | void KOTodoView::itemDoubleClicked(QListViewItem *item) |
1085 | { | 1087 | { |
1086 | if ( pendingSubtodo != 0 ) { | 1088 | if ( pendingSubtodo != 0 ) { |
1087 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1089 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1088 | } | 1090 | } |
1089 | pendingSubtodo = 0; | 1091 | pendingSubtodo = 0; |
1090 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); | 1092 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); |
1091 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); | 1093 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); |
1092 | //qDebug("ROW %d ", row); | 1094 | //qDebug("ROW %d ", row); |
1093 | if (!item) { | 1095 | if (!item) { |
1094 | newTodo(); | 1096 | newTodo(); |
1095 | return; | 1097 | return; |
1096 | } else { | 1098 | } else { |
1097 | if ( row == 2 || row == 1 ) { | 1099 | if ( row == 2 || row == 1 ) { |
1098 | mActiveItem = (KOTodoViewItem *) item; | 1100 | mActiveItem = (KOTodoViewItem *) item; |
1099 | newSubTodo(); | 1101 | newSubTodo(); |
1100 | return; | 1102 | return; |
1101 | } | 1103 | } |
1102 | if ( row == 5 || row == 6 ) { | 1104 | if ( row == 5 || row == 6 ) { |
1103 | mActiveItem = (KOTodoViewItem *) item; | 1105 | mActiveItem = (KOTodoViewItem *) item; |
1104 | toggleRunningItem(); | 1106 | toggleRunningItem(); |
1105 | return; | 1107 | return; |
1106 | } | 1108 | } |
1107 | } | 1109 | } |
1108 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 1110 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
1109 | editItem( item ); | 1111 | editItem( item ); |
1110 | else | 1112 | else |
1111 | showItem( item , QPoint(), 0 ); | 1113 | showItem( item , QPoint(), 0 ); |
1112 | } | 1114 | } |
1113 | void KOTodoView::toggleRunningItem() | 1115 | void KOTodoView::toggleRunningItem() |
1114 | { | 1116 | { |
1115 | // qDebug("KOTodoView::toggleRunning() "); | 1117 | // qDebug("KOTodoView::toggleRunning() "); |
1116 | if ( ! mActiveItem ) | 1118 | if ( ! mActiveItem ) |
1117 | return; | 1119 | return; |
1118 | Todo * t = mActiveItem->todo(); | 1120 | Todo * t = mActiveItem->todo(); |
1119 | if ( t->isRunning() ) { | 1121 | if ( t->isRunning() ) { |
1120 | int result = KMessageBox::warningContinueCancel(this, | 1122 | int result = KMessageBox::warningContinueCancel(this, |
1121 | i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); | 1123 | i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); |
1122 | if (result != KMessageBox::Continue) return; | 1124 | if (result != KMessageBox::Continue) return; |
1123 | t->setRunning( false ); | 1125 | t->setRunning( false ); |
1124 | mActiveItem->construct(); | 1126 | mActiveItem->construct(); |
1125 | } else { | 1127 | } else { |
1126 | int result = KMessageBox::warningContinueCancel(this, | 1128 | int result = KMessageBox::warningContinueCancel(this, |
1127 | i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); | 1129 | i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); |
1128 | if (result != KMessageBox::Continue) return; | 1130 | if (result != KMessageBox::Continue) return; |
1129 | t->setRunning( true ); | 1131 | t->setRunning( true ); |
1130 | mActiveItem->construct(); | 1132 | mActiveItem->construct(); |
1131 | } | 1133 | } |
1132 | } | 1134 | } |
1133 | 1135 | ||
1134 | void KOTodoView::itemClicked(QListViewItem *item) | 1136 | void KOTodoView::itemClicked(QListViewItem *item) |
1135 | { | 1137 | { |
1136 | //qDebug("KOTodoView::itemClicked %d", item); | 1138 | //qDebug("KOTodoView::itemClicked %d", item); |
1137 | if (!item) { | 1139 | if (!item) { |
1138 | if ( pendingSubtodo != 0 ) { | 1140 | if ( pendingSubtodo != 0 ) { |
1139 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1141 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1140 | } | 1142 | } |
1141 | pendingSubtodo = 0; | 1143 | pendingSubtodo = 0; |
1142 | return; | 1144 | return; |
1143 | } | 1145 | } |
1144 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1146 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1145 | if ( pendingSubtodo != 0 ) { | 1147 | if ( pendingSubtodo != 0 ) { |
1146 | bool allowReparent = true; | 1148 | bool allowReparent = true; |
1147 | QListViewItem *par = item; | 1149 | QListViewItem *par = item; |
1148 | while ( par ) { | 1150 | while ( par ) { |
1149 | if ( par == pendingSubtodo ) { | 1151 | if ( par == pendingSubtodo ) { |
1150 | allowReparent = false; | 1152 | allowReparent = false; |
1151 | break; | 1153 | break; |
1152 | } | 1154 | } |
1153 | par = par->parent(); | 1155 | par = par->parent(); |
1154 | } | 1156 | } |
1155 | if ( !allowReparent ) { | 1157 | if ( !allowReparent ) { |
1156 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); | 1158 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); |
1157 | pendingSubtodo = 0; | 1159 | pendingSubtodo = 0; |
1158 | } else { | 1160 | } else { |
1159 | Todo* newParent = todoItem->todo(); | 1161 | Todo* newParent = todoItem->todo(); |
1160 | Todo* newSub = pendingSubtodo->todo(); | 1162 | Todo* newSub = pendingSubtodo->todo(); |
1161 | pendingSubtodo = 0; | 1163 | pendingSubtodo = 0; |
1162 | emit reparentTodoSignal( newParent,newSub ); | 1164 | emit reparentTodoSignal( newParent,newSub ); |
1163 | return; | 1165 | return; |
1164 | } | 1166 | } |
1165 | } | 1167 | } |
1166 | 1168 | ||
1167 | } | 1169 | } |
1168 | 1170 | ||
1169 | void KOTodoView::setDocumentId( const QString &id ) | 1171 | void KOTodoView::setDocumentId( const QString &id ) |
1170 | { | 1172 | { |
1171 | 1173 | ||
1172 | mDocPrefs->setDoc( id ); | 1174 | mDocPrefs->setDoc( id ); |
1173 | } | 1175 | } |
1174 | 1176 | ||
1175 | void KOTodoView::itemStateChanged( QListViewItem *item ) | 1177 | void KOTodoView::itemStateChanged( QListViewItem *item ) |
1176 | { | 1178 | { |
1177 | if (!item) return; | 1179 | if (!item) return; |
1178 | 1180 | ||
1179 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1181 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1180 | 1182 | ||
1181 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; | 1183 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; |
1182 | 1184 | ||
1183 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); | 1185 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); |
1184 | } | 1186 | } |
1185 | 1187 | ||
1186 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const | 1188 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const |
1187 | { | 1189 | { |
1188 | mTodoListView->saveLayout(config,group); | 1190 | mTodoListView->saveLayout(config,group); |
1189 | } | 1191 | } |
1190 | 1192 | ||
1191 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) | 1193 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) |
1192 | { | 1194 | { |
1193 | mTodoListView->restoreLayout(config,group); | 1195 | mTodoListView->restoreLayout(config,group); |
1194 | } | 1196 | } |
1195 | 1197 | ||
1196 | void KOTodoView::processSelectionChange() | 1198 | void KOTodoView::processSelectionChange() |
1197 | { | 1199 | { |
1198 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; | 1200 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; |
1199 | 1201 | ||
1200 | KOTodoViewItem *item = | 1202 | KOTodoViewItem *item = |
1201 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); | 1203 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); |
1202 | 1204 | ||
1203 | if ( !item ) { | 1205 | if ( !item ) { |
1204 | emit incidenceSelected( 0 ); | 1206 | emit incidenceSelected( 0 ); |
1205 | } else { | 1207 | } else { |
1206 | emit incidenceSelected( item->todo() ); | 1208 | emit incidenceSelected( item->todo() ); |
1207 | } | 1209 | } |
1208 | } | 1210 | } |
1209 | 1211 | ||
1210 | void KOTodoView::modified(bool b) | 1212 | void KOTodoView::modified(bool b) |
1211 | { | 1213 | { |
1212 | emit isModified(b); | 1214 | emit isModified(b); |
1213 | } | 1215 | } |
1214 | void KOTodoView::setTodoModified( Todo* todo ) | 1216 | void KOTodoView::setTodoModified( Todo* todo ) |
1215 | { | 1217 | { |
1216 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); | 1218 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); |
1217 | } | 1219 | } |
1218 | void KOTodoView::clearSelection() | 1220 | void KOTodoView::clearSelection() |
1219 | { | 1221 | { |
1220 | mTodoListView->selectAll( false ); | 1222 | mTodoListView->selectAll( false ); |
1221 | } | 1223 | } |
1222 | void KOTodoView::setAllOpen() | 1224 | void KOTodoView::setAllOpen() |
1223 | { | 1225 | { |
1224 | if ( isFlatDisplay ) { | 1226 | if ( isFlatDisplay ) { |
1225 | isFlatDisplay = false; | 1227 | isFlatDisplay = false; |
1226 | mPopupMenu->setItemChecked( 8,false ); | 1228 | mPopupMenu->setItemChecked( 8,false ); |
1227 | updateView(); | 1229 | updateView(); |
1228 | } else { | 1230 | } else { |
1229 | storeCurrentItem(); | 1231 | storeCurrentItem(); |
1230 | } | 1232 | } |
1231 | setOpen(mTodoListView->firstChild(), true); | 1233 | setOpen(mTodoListView->firstChild(), true); |
1232 | resetCurrentItem(); | 1234 | resetCurrentItem(); |
1233 | } | 1235 | } |
1234 | void KOTodoView::setAllClose() | 1236 | void KOTodoView::setAllClose() |
1235 | { | 1237 | { |
1236 | if ( isFlatDisplay ) { | 1238 | if ( isFlatDisplay ) { |
1237 | isFlatDisplay = false; | 1239 | isFlatDisplay = false; |
1238 | mPopupMenu->setItemChecked( 8,false ); | 1240 | mPopupMenu->setItemChecked( 8,false ); |
1239 | updateView(); | 1241 | updateView(); |
1240 | } else { | 1242 | } else { |
1241 | storeCurrentItem(); | 1243 | storeCurrentItem(); |
1242 | } | 1244 | } |
1243 | setOpen(mTodoListView->firstChild(), false); | 1245 | setOpen(mTodoListView->firstChild(), false); |
1244 | resetCurrentItem(); | 1246 | resetCurrentItem(); |
1245 | } | 1247 | } |
1246 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) | 1248 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) |
1247 | { | 1249 | { |
1248 | 1250 | ||
1249 | while ( item ) { | 1251 | while ( item ) { |
1250 | setOpen( item->firstChild(), setOpenI ); | 1252 | setOpen( item->firstChild(), setOpenI ); |
1251 | item->setOpen( setOpenI ); | 1253 | item->setOpen( setOpenI ); |
1252 | item = item->nextSibling(); | 1254 | item = item->nextSibling(); |
1253 | } | 1255 | } |
1254 | } | 1256 | } |
1255 | 1257 | ||
1256 | void KOTodoView::displayAllFlat() | 1258 | void KOTodoView::displayAllFlat() |
1257 | { | 1259 | { |
1258 | pendingSubtodo = 0; | 1260 | pendingSubtodo = 0; |
1259 | if ( mBlockUpdate ) { | 1261 | if ( mBlockUpdate ) { |
1260 | return; | 1262 | return; |
1261 | } | 1263 | } |
1262 | mPopupMenu->setItemChecked( 8,true ); | 1264 | mPopupMenu->setItemChecked( 8,true ); |
1263 | isFlatDisplay = true; | 1265 | isFlatDisplay = true; |
1264 | QPtrList<Todo> todoList = calendar()->todos(); | 1266 | QPtrList<Todo> todoList = calendar()->todos(); |
1265 | mTodoMap.clear(); | 1267 | mTodoMap.clear(); |
1266 | mTodoListView->clear(); | 1268 | mTodoListView->clear(); |
1267 | Todo *todo; | 1269 | Todo *todo; |
1268 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 1270 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
1269 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 1271 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
1270 | mTodoMap.insert(todo,todoItem); | 1272 | mTodoMap.insert(todo,todoItem); |
1271 | } | 1273 | } |
1272 | mTodoListView->setFocus(); | 1274 | mTodoListView->setFocus(); |
1273 | processSelectionChange(); | 1275 | processSelectionChange(); |
1274 | } | 1276 | } |
1275 | 1277 | ||
1276 | void KOTodoView::setAllFlat() | 1278 | void KOTodoView::setAllFlat() |
1277 | { | 1279 | { |
1278 | if ( isFlatDisplay ) { | 1280 | if ( isFlatDisplay ) { |
1279 | isFlatDisplay = false; | 1281 | isFlatDisplay = false; |
1280 | mPopupMenu->setItemChecked( 8,false ); | 1282 | mPopupMenu->setItemChecked( 8,false ); |
1281 | updateView(); | 1283 | updateView(); |
1282 | return; | 1284 | return; |
1283 | } | 1285 | } |
1284 | storeCurrentItem(); | 1286 | storeCurrentItem(); |
1285 | displayAllFlat(); | 1287 | displayAllFlat(); |
1286 | resetCurrentItem(); | 1288 | resetCurrentItem(); |
1287 | } | 1289 | } |
1288 | 1290 | ||
1289 | void KOTodoView::purgeCompleted() | 1291 | void KOTodoView::purgeCompleted() |
1290 | { | 1292 | { |
1291 | emit purgeCompletedSignal(); | 1293 | emit purgeCompletedSignal(); |
1292 | 1294 | ||
1293 | } | 1295 | } |
1294 | void KOTodoView::toggleQuickTodo() | 1296 | void KOTodoView::toggleQuickTodo() |
1295 | { | 1297 | { |
1296 | if ( mQuickAdd->isVisible() ) { | 1298 | if ( mQuickAdd->isVisible() ) { |
1297 | mQuickAdd->hide(); | 1299 | mQuickAdd->hide(); |
1298 | KOPrefs::instance()->mEnableQuickTodo = false; | 1300 | KOPrefs::instance()->mEnableQuickTodo = false; |
1299 | } | 1301 | } |
1300 | else { | 1302 | else { |
1301 | mQuickAdd->show(); | 1303 | mQuickAdd->show(); |
1302 | KOPrefs::instance()->mEnableQuickTodo = true; | 1304 | KOPrefs::instance()->mEnableQuickTodo = true; |
1303 | } | 1305 | } |
1304 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 1306 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
1305 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 1307 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
1306 | } | 1308 | } |
1307 | 1309 | ||
1308 | void KOTodoView::toggleRunning() | 1310 | void KOTodoView::toggleRunning() |
1309 | { | 1311 | { |
1310 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; | 1312 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; |
1311 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 1313 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
1312 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 1314 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
1313 | updateView(); | 1315 | updateView(); |
1314 | } | 1316 | } |
1315 | 1317 | ||
1316 | void KOTodoView::toggleCompleted() | 1318 | void KOTodoView::toggleCompleted() |
1317 | { | 1319 | { |
1318 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; | 1320 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; |
1319 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 1321 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
1320 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 1322 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
1321 | updateView(); | 1323 | updateView(); |
1322 | } | 1324 | } |
1323 | 1325 | ||
1324 | void KOTodoView::addQuickTodo() | 1326 | void KOTodoView::addQuickTodo() |
1325 | { | 1327 | { |
1326 | Todo *todo = new Todo(); | 1328 | Todo *todo = new Todo(); |
1327 | todo->setSummary(mQuickAdd->text()); | 1329 | todo->setSummary(mQuickAdd->text()); |
1328 | todo->setOrganizer(KOPrefs::instance()->email()); | 1330 | todo->setOrganizer(KOPrefs::instance()->email()); |
1329 | CalFilter * cf = mCalendar->filter(); | 1331 | CalFilter * cf = mCalendar->filter(); |
1330 | if ( cf ) { | 1332 | if ( cf ) { |
1331 | if ( cf->isEnabled()&& cf->showCategories()) { | 1333 | if ( cf->isEnabled()&& cf->showCategories()) { |
1332 | todo->setCategories(cf->categoryList()); | 1334 | todo->setCategories(cf->categoryList()); |
1333 | } | 1335 | } |
1334 | if ( cf->isEnabled() ) | 1336 | if ( cf->isEnabled() ) |
1335 | todo->setSecrecy( cf->getSecrecy()); | 1337 | todo->setSecrecy( cf->getSecrecy()); |
1336 | } | 1338 | } |
1337 | mCalendar->addTodo(todo); | 1339 | mCalendar->addTodo(todo); |
1338 | mQuickAdd->setText(""); | 1340 | mQuickAdd->setText(""); |
1339 | todoModified (todo, KOGlobals::EVENTADDED ); | 1341 | todoModified (todo, KOGlobals::EVENTADDED ); |
1340 | updateView(); | 1342 | updateView(); |
1341 | } | 1343 | } |
1342 | 1344 | ||
1343 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) | 1345 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) |
1344 | { | 1346 | { |
1345 | // e->ignore(); | 1347 | // e->ignore(); |
1346 | //return; | 1348 | //return; |
1347 | //qDebug("KOTodoView::keyPressEvent "); | 1349 | //qDebug("KOTodoView::keyPressEvent "); |
1348 | switch ( e->key() ) { | 1350 | switch ( e->key() ) { |
1349 | case Qt::Key_Down: | 1351 | case Qt::Key_Down: |
1350 | case Qt::Key_Up: | 1352 | case Qt::Key_Up: |
1351 | QWidget::keyPressEvent ( e ); | 1353 | QWidget::keyPressEvent ( e ); |
1352 | break; | 1354 | break; |
1353 | 1355 | ||
1354 | case Qt::Key_Q: | 1356 | case Qt::Key_Q: |
1355 | toggleQuickTodo(); | 1357 | toggleQuickTodo(); |
1356 | break; | 1358 | break; |
1357 | case Qt::Key_U: | 1359 | case Qt::Key_U: |
1358 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1360 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1359 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1361 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1360 | unparentTodo(); | 1362 | unparentTodo(); |
1361 | e->accept(); | 1363 | e->accept(); |
1362 | } else | 1364 | } else |
1363 | e->ignore(); | 1365 | e->ignore(); |
1364 | break; | 1366 | break; |
1365 | case Qt::Key_S: | 1367 | case Qt::Key_S: |
1366 | if ( e->state() == Qt::ControlButton ) { | 1368 | if ( e->state() == Qt::ControlButton ) { |
1367 | e->ignore(); | 1369 | e->ignore(); |
1368 | break; | 1370 | break; |
1369 | } | 1371 | } |
1370 | if ( e->state() == Qt::ShiftButton ) { | 1372 | if ( e->state() == Qt::ShiftButton ) { |
1371 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1373 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1372 | reparentTodo(); | 1374 | reparentTodo(); |
1373 | e->accept(); | 1375 | e->accept(); |
1374 | } else | 1376 | } else |
1375 | e->ignore(); | 1377 | e->ignore(); |
1376 | break; | 1378 | break; |
1377 | case Qt::Key_P: | 1379 | case Qt::Key_P: |
1378 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1380 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1379 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1381 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1380 | if ( pendingSubtodo ) | 1382 | if ( pendingSubtodo ) |
1381 | itemClicked(mActiveItem); | 1383 | itemClicked(mActiveItem); |
1382 | e->accept(); | 1384 | e->accept(); |
1383 | } else | 1385 | } else |
1384 | e->ignore(); | 1386 | e->ignore(); |
1385 | break; | 1387 | break; |
1386 | case Qt::Key_Escape: | 1388 | case Qt::Key_Escape: |
1387 | if ( pendingSubtodo ) { | 1389 | if ( pendingSubtodo ) { |
1388 | itemClicked(0); | 1390 | itemClicked(0); |
1389 | e->accept(); | 1391 | e->accept(); |
1390 | } else | 1392 | } else |
1391 | e->ignore(); | 1393 | e->ignore(); |
1392 | break; | 1394 | break; |
1393 | default: | 1395 | default: |
1394 | e->ignore(); | 1396 | e->ignore(); |
1395 | } | 1397 | } |
1396 | 1398 | ||
1397 | if ( true ) { | 1399 | if ( true ) { |
1398 | if ( e->key() == Qt::Key_I ) { | 1400 | if ( e->key() == Qt::Key_I ) { |
1399 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); | 1401 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); |
1400 | if ( cn ) { | 1402 | if ( cn ) { |
1401 | mActiveItem = cn; | 1403 | mActiveItem = cn; |
1402 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 1404 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
1403 | if ( ci ){ | 1405 | if ( ci ){ |
1404 | showTodo(); | 1406 | showTodo(); |
1405 | cn = (KOTodoViewItem*)cn->itemBelow(); | 1407 | cn = (KOTodoViewItem*)cn->itemBelow(); |
1406 | if ( cn ) { | 1408 | if ( cn ) { |
1407 | mTodoListView->setCurrentItem ( cn ); | 1409 | mTodoListView->setCurrentItem ( cn ); |
1408 | mTodoListView->ensureItemVisible ( cn ); | 1410 | mTodoListView->ensureItemVisible ( cn ); |
1409 | } | 1411 | } |
1410 | 1412 | ||
1411 | } | 1413 | } |
1412 | } | 1414 | } |
1413 | e->accept(); | 1415 | e->accept(); |
1414 | 1416 | ||
1415 | } | 1417 | } |
1416 | 1418 | ||
1417 | } | 1419 | } |
1418 | 1420 | ||
1419 | } | 1421 | } |
1420 | void KOTodoView::updateTodo( Todo * t, int type ) | 1422 | void KOTodoView::updateTodo( Todo * t, int type ) |
1421 | { | 1423 | { |
1422 | if ( mBlockUpdate) | 1424 | if ( mBlockUpdate) |
1423 | return; | 1425 | return; |
1424 | 1426 | ||
1425 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 1427 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
1426 | itemIterator = mTodoMap.find(t); | 1428 | itemIterator = mTodoMap.find(t); |
1427 | if (itemIterator != mTodoMap.end()) { | 1429 | if (itemIterator != mTodoMap.end()) { |
1428 | (*itemIterator)->construct(); | 1430 | (*itemIterator)->construct(); |
1429 | } else { | 1431 | } else { |
1430 | if ( type == KOGlobals::EVENTADDED ) { | 1432 | if ( type == KOGlobals::EVENTADDED ) { |
1431 | insertTodoItem( t ); | 1433 | insertTodoItem( t ); |
1432 | } | 1434 | } |
1433 | } | 1435 | } |
1434 | 1436 | ||
1435 | } | 1437 | } |
1436 | 1438 | ||
1437 | void KOTodoView::todoModified(Todo * t , int p ) | 1439 | void KOTodoView::todoModified(Todo * t , int p ) |
1438 | { | 1440 | { |
1439 | mBlockUpdate = true; | 1441 | mBlockUpdate = true; |
1440 | emit todoModifiedSignal ( t, p ); | 1442 | emit todoModifiedSignal ( t, p ); |
1441 | mBlockUpdate = false; | 1443 | mBlockUpdate = false; |
1442 | } | 1444 | } |
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 78fa24f..9c35b1d 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -1,714 +1,718 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library 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 GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <kglobal.h> | 21 | #include <kglobal.h> |
22 | #include <klocale.h> | 22 | #include <klocale.h> |
23 | #include <kdebug.h> | 23 | #include <kdebug.h> |
24 | 24 | ||
25 | #include "calformat.h" | 25 | #include "calformat.h" |
26 | 26 | ||
27 | #include "incidence.h" | 27 | #include "incidence.h" |
28 | #include "todo.h" | 28 | #include "todo.h" |
29 | 29 | ||
30 | using namespace KCal; | 30 | using namespace KCal; |
31 | 31 | ||
32 | Incidence::Incidence() : | 32 | Incidence::Incidence() : |
33 | IncidenceBase(), | 33 | IncidenceBase(), |
34 | mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3) | 34 | mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3) |
35 | { | 35 | { |
36 | mRecurrence = new Recurrence(this); | 36 | mRecurrence = new Recurrence(this); |
37 | mCancelled = false; | 37 | mCancelled = false; |
38 | recreate(); | 38 | recreate(); |
39 | mHasStartDate = true; | 39 | mHasStartDate = true; |
40 | mAlarms.setAutoDelete(true); | 40 | mAlarms.setAutoDelete(true); |
41 | mAttachments.setAutoDelete(true); | 41 | mAttachments.setAutoDelete(true); |
42 | mHasRecurrenceID = false; | 42 | mHasRecurrenceID = false; |
43 | mHoliday = false; | 43 | mHoliday = false; |
44 | mBirthday = false; | 44 | mBirthday = false; |
45 | mAnniversary = false; | 45 | mAnniversary = false; |
46 | 46 | ||
47 | } | 47 | } |
48 | 48 | ||
49 | Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) | 49 | Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) |
50 | { | 50 | { |
51 | // TODO: reenable attributes currently commented out. | 51 | // TODO: reenable attributes currently commented out. |
52 | mRevision = i.mRevision; | 52 | mRevision = i.mRevision; |
53 | mCreated = i.mCreated; | 53 | mCreated = i.mCreated; |
54 | mDescription = i.mDescription; | 54 | mDescription = i.mDescription; |
55 | mSummary = i.mSummary; | 55 | mSummary = i.mSummary; |
56 | mCategories = i.mCategories; | 56 | mCategories = i.mCategories; |
57 | // Incidence *mRelatedTo; Incidence *mRelatedTo; | 57 | // Incidence *mRelatedTo; Incidence *mRelatedTo; |
58 | mRelatedTo = 0; | 58 | mRelatedTo = 0; |
59 | mRelatedToUid = i.mRelatedToUid; | 59 | mRelatedToUid = i.mRelatedToUid; |
60 | // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; | 60 | // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; |
61 | mExDates = i.mExDates; | 61 | mExDates = i.mExDates; |
62 | mAttachments = i.mAttachments; | 62 | mAttachments = i.mAttachments; |
63 | mResources = i.mResources; | 63 | mResources = i.mResources; |
64 | mSecrecy = i.mSecrecy; | 64 | mSecrecy = i.mSecrecy; |
65 | mPriority = i.mPriority; | 65 | mPriority = i.mPriority; |
66 | mLocation = i.mLocation; | 66 | mLocation = i.mLocation; |
67 | mCancelled = i.mCancelled; | 67 | mCancelled = i.mCancelled; |
68 | mHasStartDate = i.mHasStartDate; | 68 | mHasStartDate = i.mHasStartDate; |
69 | QPtrListIterator<Alarm> it( i.mAlarms ); | 69 | QPtrListIterator<Alarm> it( i.mAlarms ); |
70 | const Alarm *a; | 70 | const Alarm *a; |
71 | while( (a = it.current()) ) { | 71 | while( (a = it.current()) ) { |
72 | Alarm *b = new Alarm( *a ); | 72 | Alarm *b = new Alarm( *a ); |
73 | b->setParent( this ); | 73 | b->setParent( this ); |
74 | mAlarms.append( b ); | 74 | mAlarms.append( b ); |
75 | 75 | ||
76 | ++it; | 76 | ++it; |
77 | } | 77 | } |
78 | mAlarms.setAutoDelete(true); | 78 | mAlarms.setAutoDelete(true); |
79 | mHasRecurrenceID = i.mHasRecurrenceID; | 79 | mHasRecurrenceID = i.mHasRecurrenceID; |
80 | mRecurrenceID = i.mRecurrenceID; | 80 | mRecurrenceID = i.mRecurrenceID; |
81 | mRecurrence = new Recurrence( *(i.mRecurrence), this ); | 81 | mRecurrence = new Recurrence( *(i.mRecurrence), this ); |
82 | mHoliday = i.mHoliday ; | 82 | mHoliday = i.mHoliday ; |
83 | mBirthday = i.mBirthday; | 83 | mBirthday = i.mBirthday; |
84 | mAnniversary = i.mAnniversary; | 84 | mAnniversary = i.mAnniversary; |
85 | } | 85 | } |
86 | 86 | ||
87 | Incidence::~Incidence() | 87 | Incidence::~Incidence() |
88 | { | 88 | { |
89 | 89 | ||
90 | Incidence *ev; | 90 | Incidence *ev; |
91 | QPtrList<Incidence> Relations = relations(); | 91 | QPtrList<Incidence> Relations = relations(); |
92 | for (ev=Relations.first();ev;ev=Relations.next()) { | 92 | for (ev=Relations.first();ev;ev=Relations.next()) { |
93 | if (ev->relatedTo() == this) ev->setRelatedTo(0); | 93 | if (ev->relatedTo() == this) ev->setRelatedTo(0); |
94 | } | 94 | } |
95 | if (relatedTo()) relatedTo()->removeRelation(this); | 95 | if (relatedTo()) relatedTo()->removeRelation(this); |
96 | delete mRecurrence; | 96 | delete mRecurrence; |
97 | 97 | ||
98 | } | 98 | } |
99 | 99 | ||
100 | bool Incidence::isHoliday() const | 100 | bool Incidence::isHoliday() const |
101 | { | 101 | { |
102 | return mHoliday; | 102 | return mHoliday; |
103 | } | 103 | } |
104 | bool Incidence::isBirthday() const | 104 | bool Incidence::isBirthday() const |
105 | { | 105 | { |
106 | 106 | ||
107 | return mBirthday ; | 107 | return mBirthday ; |
108 | } | 108 | } |
109 | bool Incidence::isAnniversary() const | 109 | bool Incidence::isAnniversary() const |
110 | { | 110 | { |
111 | return mAnniversary ; | 111 | return mAnniversary ; |
112 | 112 | ||
113 | } | 113 | } |
114 | 114 | ||
115 | bool Incidence::hasRecurrenceID() const | 115 | bool Incidence::hasRecurrenceID() const |
116 | { | 116 | { |
117 | return mHasRecurrenceID; | 117 | return mHasRecurrenceID; |
118 | } | 118 | } |
119 | 119 | ||
120 | void Incidence::setHasRecurrenceID( bool b ) | 120 | void Incidence::setHasRecurrenceID( bool b ) |
121 | { | 121 | { |
122 | mHasRecurrenceID = b; | 122 | mHasRecurrenceID = b; |
123 | } | 123 | } |
124 | 124 | ||
125 | void Incidence::setRecurrenceID(QDateTime d) | 125 | void Incidence::setRecurrenceID(QDateTime d) |
126 | { | 126 | { |
127 | mRecurrenceID = d; | 127 | mRecurrenceID = d; |
128 | mHasRecurrenceID = true; | 128 | mHasRecurrenceID = true; |
129 | updated(); | 129 | updated(); |
130 | } | 130 | } |
131 | QDateTime Incidence::recurrenceID () const | 131 | QDateTime Incidence::recurrenceID () const |
132 | { | 132 | { |
133 | return mRecurrenceID; | 133 | return mRecurrenceID; |
134 | } | 134 | } |
135 | 135 | ||
136 | bool Incidence::cancelled() const | 136 | bool Incidence::cancelled() const |
137 | { | 137 | { |
138 | return mCancelled; | 138 | return mCancelled; |
139 | } | 139 | } |
140 | void Incidence::setCancelled( bool b ) | 140 | void Incidence::setCancelled( bool b ) |
141 | { | 141 | { |
142 | mCancelled = b; | 142 | mCancelled = b; |
143 | updated(); | 143 | updated(); |
144 | } | 144 | } |
145 | bool Incidence::hasStartDate() const | 145 | bool Incidence::hasStartDate() const |
146 | { | 146 | { |
147 | return mHasStartDate; | 147 | return mHasStartDate; |
148 | } | 148 | } |
149 | 149 | ||
150 | void Incidence::setHasStartDate(bool f) | 150 | void Incidence::setHasStartDate(bool f) |
151 | { | 151 | { |
152 | if (mReadOnly) return; | 152 | if (mReadOnly) return; |
153 | mHasStartDate = f; | 153 | mHasStartDate = f; |
154 | updated(); | 154 | updated(); |
155 | } | 155 | } |
156 | 156 | ||
157 | // A string comparison that considers that null and empty are the same | 157 | // A string comparison that considers that null and empty are the same |
158 | static bool stringCompare( const QString& s1, const QString& s2 ) | 158 | static bool stringCompare( const QString& s1, const QString& s2 ) |
159 | { | 159 | { |
160 | if ( s1.isEmpty() && s2.isEmpty() ) | 160 | if ( s1.isEmpty() && s2.isEmpty() ) |
161 | return true; | 161 | return true; |
162 | return s1 == s2; | 162 | return s1 == s2; |
163 | } | 163 | } |
164 | 164 | ||
165 | bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) | 165 | bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) |
166 | { | 166 | { |
167 | 167 | ||
168 | if( i1.alarms().count() != i2.alarms().count() ) { | 168 | if( i1.alarms().count() != i2.alarms().count() ) { |
169 | return false; // no need to check further | 169 | return false; // no need to check further |
170 | } | 170 | } |
171 | if ( i1.alarms().count() > 0 ) { | 171 | if ( i1.alarms().count() > 0 ) { |
172 | if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) | 172 | if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) |
173 | { | 173 | { |
174 | qDebug("alarm not equal "); | 174 | qDebug("alarm not equal "); |
175 | return false; | 175 | return false; |
176 | } | 176 | } |
177 | } | 177 | } |
178 | #if 0 | 178 | #if 0 |
179 | QPtrListIterator<Alarm> a1( i1.alarms() ); | 179 | QPtrListIterator<Alarm> a1( i1.alarms() ); |
180 | QPtrListIterator<Alarm> a2( i2.alarms() ); | 180 | QPtrListIterator<Alarm> a2( i2.alarms() ); |
181 | for( ; a1.current() && a2.current(); ++a1, ++a2 ) { | 181 | for( ; a1.current() && a2.current(); ++a1, ++a2 ) { |
182 | if( *a1.current() == *a2.current() ) { | 182 | if( *a1.current() == *a2.current() ) { |
183 | continue; | 183 | continue; |
184 | } | 184 | } |
185 | else { | 185 | else { |
186 | return false; | 186 | return false; |
187 | } | 187 | } |
188 | } | 188 | } |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { | 191 | if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { |
192 | if ( i1.hasRecurrenceID() ) { | 192 | if ( i1.hasRecurrenceID() ) { |
193 | if ( i1.recurrenceID() != i2.recurrenceID() ) | 193 | if ( i1.recurrenceID() != i2.recurrenceID() ) |
194 | return false; | 194 | return false; |
195 | } | 195 | } |
196 | 196 | ||
197 | } else { | 197 | } else { |
198 | return false; | 198 | return false; |
199 | } | 199 | } |
200 | 200 | ||
201 | if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) | 201 | if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) |
202 | return false; | 202 | return false; |
203 | if ( i1.hasStartDate() == i2.hasStartDate() ) { | 203 | if ( i1.hasStartDate() == i2.hasStartDate() ) { |
204 | if ( i1.hasStartDate() ) { | 204 | if ( i1.hasStartDate() ) { |
205 | if ( i1.dtStart() != i2.dtStart() ) | 205 | if ( i1.dtStart() != i2.dtStart() ) |
206 | return false; | 206 | return false; |
207 | } | 207 | } |
208 | } else { | 208 | } else { |
209 | return false; | 209 | return false; |
210 | } | 210 | } |
211 | if (!( *i1.recurrence() == *i2.recurrence()) ) { | 211 | if (!( *i1.recurrence() == *i2.recurrence()) ) { |
212 | qDebug("recurrence is NOT equal "); | 212 | qDebug("recurrence is NOT equal "); |
213 | return false; | 213 | return false; |
214 | } | 214 | } |
215 | return | 215 | return |
216 | // i1.created() == i2.created() && | 216 | // i1.created() == i2.created() && |
217 | stringCompare( i1.description(), i2.description() ) && | 217 | stringCompare( i1.description(), i2.description() ) && |
218 | stringCompare( i1.summary(), i2.summary() ) && | 218 | stringCompare( i1.summary(), i2.summary() ) && |
219 | i1.categories() == i2.categories() && | 219 | i1.categories() == i2.categories() && |
220 | // no need to compare mRelatedTo | 220 | // no need to compare mRelatedTo |
221 | stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && | 221 | stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && |
222 | // i1.relations() == i2.relations() && | 222 | // i1.relations() == i2.relations() && |
223 | i1.exDates() == i2.exDates() && | 223 | i1.exDates() == i2.exDates() && |
224 | i1.attachments() == i2.attachments() && | 224 | i1.attachments() == i2.attachments() && |
225 | i1.resources() == i2.resources() && | 225 | i1.resources() == i2.resources() && |
226 | i1.secrecy() == i2.secrecy() && | 226 | i1.secrecy() == i2.secrecy() && |
227 | i1.priority() == i2.priority() && | 227 | i1.priority() == i2.priority() && |
228 | i1.cancelled() == i2.cancelled() && | 228 | i1.cancelled() == i2.cancelled() && |
229 | stringCompare( i1.location(), i2.location() ); | 229 | stringCompare( i1.location(), i2.location() ); |
230 | } | 230 | } |
231 | 231 | ||
232 | Incidence* Incidence::recreateCloneException( QDate d ) | 232 | Incidence* Incidence::recreateCloneException( QDate d ) |
233 | { | 233 | { |
234 | Incidence* newInc = clone(); | 234 | Incidence* newInc = clone(); |
235 | newInc->recreate(); | 235 | newInc->recreate(); |
236 | if ( doesRecur() ) { | 236 | if ( doesRecur() ) { |
237 | addExDate( d ); | 237 | addExDate( d ); |
238 | newInc->recurrence()->unsetRecurs(); | 238 | newInc->recurrence()->unsetRecurs(); |
239 | if ( type() == "Event") { | 239 | if ( type() == "Event") { |
240 | int len = dtStart().secsTo( ((Event*)this)->dtEnd()); | 240 | int len = dtStart().secsTo( ((Event*)this)->dtEnd()); |
241 | QTime tim = dtStart().time(); | 241 | QTime tim = dtStart().time(); |
242 | newInc->setDtStart( QDateTime(d, tim) ); | 242 | newInc->setDtStart( QDateTime(d, tim) ); |
243 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); | 243 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); |
244 | } else { | 244 | } else { |
245 | int len = dtStart().secsTo( ((Todo*)this)->dtDue()); | 245 | int len = dtStart().secsTo( ((Todo*)this)->dtDue()); |
246 | QTime tim = ((Todo*)this)->dtDue().time(); | 246 | QTime tim = ((Todo*)this)->dtDue().time(); |
247 | ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); | 247 | ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); |
248 | ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); | 248 | ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); |
249 | ((Todo*)this)->setRecurDates(); | 249 | ((Todo*)this)->setRecurDates(); |
250 | } | 250 | } |
251 | newInc->setExDates( DateList () ); | 251 | newInc->setExDates( DateList () ); |
252 | } | 252 | } |
253 | return newInc; | 253 | return newInc; |
254 | } | 254 | } |
255 | 255 | ||
256 | void Incidence::recreate() | 256 | void Incidence::recreate() |
257 | { | 257 | { |
258 | setCreated(QDateTime::currentDateTime()); | 258 | setCreated(QDateTime::currentDateTime()); |
259 | 259 | ||
260 | setUid(CalFormat::createUniqueId()); | 260 | setUid(CalFormat::createUniqueId()); |
261 | 261 | ||
262 | setRevision(0); | 262 | setRevision(0); |
263 | setIDStr( ":" ); | 263 | setIDStr( ":" ); |
264 | setLastModified(QDateTime::currentDateTime()); | 264 | setLastModified(QDateTime::currentDateTime()); |
265 | } | 265 | } |
266 | void Incidence::cloneRelations( Incidence * newInc ) | 266 | void Incidence::cloneRelations( Incidence * newInc ) |
267 | { | 267 | { |
268 | // newInc is already a clone of this incidence | 268 | // newInc is already a clone of this incidence |
269 | Incidence * inc; | 269 | Incidence * inc; |
270 | Incidence * cloneInc; | 270 | Incidence * cloneInc; |
271 | QPtrList<Incidence> Relations = relations(); | 271 | QPtrList<Incidence> Relations = relations(); |
272 | for (inc=Relations.first();inc;inc=Relations.next()) { | 272 | for (inc=Relations.first();inc;inc=Relations.next()) { |
273 | cloneInc = inc->clone(); | 273 | cloneInc = inc->clone(); |
274 | cloneInc->recreate(); | 274 | cloneInc->recreate(); |
275 | cloneInc->setRelatedTo( newInc ); | 275 | cloneInc->setRelatedTo( newInc ); |
276 | inc->cloneRelations( cloneInc ); | 276 | inc->cloneRelations( cloneInc ); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | void Incidence::setReadOnly( bool readOnly ) | 279 | void Incidence::setReadOnly( bool readOnly ) |
280 | { | 280 | { |
281 | IncidenceBase::setReadOnly( readOnly ); | 281 | IncidenceBase::setReadOnly( readOnly ); |
282 | recurrence()->setRecurReadOnly( readOnly); | 282 | recurrence()->setRecurReadOnly( readOnly); |
283 | } | 283 | } |
284 | 284 | ||
285 | void Incidence::setCreated(QDateTime created) | 285 | void Incidence::setCreated(QDateTime created) |
286 | { | 286 | { |
287 | if (mReadOnly) return; | 287 | if (mReadOnly) return; |
288 | mCreated = getEvenTime(created); | 288 | mCreated = getEvenTime(created); |
289 | } | 289 | } |
290 | 290 | ||
291 | QDateTime Incidence::created() const | 291 | QDateTime Incidence::created() const |
292 | { | 292 | { |
293 | return mCreated; | 293 | return mCreated; |
294 | } | 294 | } |
295 | 295 | ||
296 | void Incidence::setRevision(int rev) | 296 | void Incidence::setRevision(int rev) |
297 | { | 297 | { |
298 | if (mReadOnly) return; | 298 | if (mReadOnly) return; |
299 | mRevision = rev; | 299 | mRevision = rev; |
300 | 300 | ||
301 | updated(); | 301 | updated(); |
302 | } | 302 | } |
303 | 303 | ||
304 | int Incidence::revision() const | 304 | int Incidence::revision() const |
305 | { | 305 | { |
306 | return mRevision; | 306 | return mRevision; |
307 | } | 307 | } |
308 | 308 | ||
309 | void Incidence::setDtStart(const QDateTime &dtStart) | 309 | void Incidence::setDtStart(const QDateTime &dtStart) |
310 | { | 310 | { |
311 | 311 | ||
312 | QDateTime dt = getEvenTime(dtStart); | 312 | QDateTime dt = getEvenTime(dtStart); |
313 | recurrence()->setRecurStart( dt); | 313 | recurrence()->setRecurStart( dt); |
314 | IncidenceBase::setDtStart( dt ); | 314 | IncidenceBase::setDtStart( dt ); |
315 | } | 315 | } |
316 | 316 | ||
317 | void Incidence::setDescription(const QString &description) | 317 | void Incidence::setDescription(const QString &description) |
318 | { | 318 | { |
319 | if (mReadOnly) return; | 319 | if (mReadOnly) return; |
320 | mDescription = description; | 320 | mDescription = description; |
321 | updated(); | 321 | updated(); |
322 | } | 322 | } |
323 | 323 | ||
324 | QString Incidence::description() const | 324 | QString Incidence::description() const |
325 | { | 325 | { |
326 | return mDescription; | 326 | return mDescription; |
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
330 | void Incidence::setSummary(const QString &summary) | 330 | void Incidence::setSummary(const QString &summary) |
331 | { | 331 | { |
332 | if (mReadOnly) return; | 332 | if (mReadOnly) return; |
333 | mSummary = summary; | 333 | mSummary = summary; |
334 | updated(); | 334 | updated(); |
335 | } | 335 | } |
336 | 336 | ||
337 | QString Incidence::summary() const | 337 | QString Incidence::summary() const |
338 | { | 338 | { |
339 | return mSummary; | 339 | return mSummary; |
340 | } | 340 | } |
341 | void Incidence::checkCategories() | 341 | void Incidence::checkCategories() |
342 | { | 342 | { |
343 | mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday")); | 343 | mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday")); |
344 | mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday")); | 344 | mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday")); |
345 | mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary")); | 345 | mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary")); |
346 | } | 346 | } |
347 | 347 | ||
348 | void Incidence::setCategories(const QStringList &categories) | 348 | void Incidence::setCategories(const QStringList &categories) |
349 | { | 349 | { |
350 | if (mReadOnly) return; | 350 | if (mReadOnly) return; |
351 | mCategories = categories; | 351 | mCategories = categories; |
352 | checkCategories(); | 352 | checkCategories(); |
353 | updated(); | 353 | updated(); |
354 | } | 354 | } |
355 | 355 | ||
356 | // TODO: remove setCategories(QString) function | 356 | // TODO: remove setCategories(QString) function |
357 | void Incidence::setCategories(const QString &catStr) | 357 | void Incidence::setCategories(const QString &catStr) |
358 | { | 358 | { |
359 | if (mReadOnly) return; | 359 | if (mReadOnly) return; |
360 | mCategories.clear(); | 360 | mCategories.clear(); |
361 | 361 | ||
362 | if (catStr.isEmpty()) return; | 362 | if (catStr.isEmpty()) return; |
363 | 363 | ||
364 | mCategories = QStringList::split(",",catStr); | 364 | mCategories = QStringList::split(",",catStr); |
365 | 365 | ||
366 | QStringList::Iterator it; | 366 | QStringList::Iterator it; |
367 | for(it = mCategories.begin();it != mCategories.end(); ++it) { | 367 | for(it = mCategories.begin();it != mCategories.end(); ++it) { |
368 | *it = (*it).stripWhiteSpace(); | 368 | *it = (*it).stripWhiteSpace(); |
369 | } | 369 | } |
370 | checkCategories(); | 370 | checkCategories(); |
371 | updated(); | 371 | updated(); |
372 | } | 372 | } |
373 | 373 | ||
374 | QStringList Incidence::categories() const | 374 | QStringList Incidence::categories() const |
375 | { | 375 | { |
376 | return mCategories; | 376 | return mCategories; |
377 | } | 377 | } |
378 | 378 | ||
379 | QString Incidence::categoriesStr() | 379 | QString Incidence::categoriesStr() |
380 | { | 380 | { |
381 | return mCategories.join(","); | 381 | return mCategories.join(","); |
382 | } | 382 | } |
383 | QString Incidence::categoriesStrWithSpace() | ||
384 | { | ||
385 | return mCategories.join(", "); | ||
386 | } | ||
383 | 387 | ||
384 | void Incidence::setRelatedToUid(const QString &relatedToUid) | 388 | void Incidence::setRelatedToUid(const QString &relatedToUid) |
385 | { | 389 | { |
386 | if (mReadOnly) return; | 390 | if (mReadOnly) return; |
387 | mRelatedToUid = relatedToUid; | 391 | mRelatedToUid = relatedToUid; |
388 | } | 392 | } |
389 | 393 | ||
390 | QString Incidence::relatedToUid() const | 394 | QString Incidence::relatedToUid() const |
391 | { | 395 | { |
392 | return mRelatedToUid; | 396 | return mRelatedToUid; |
393 | } | 397 | } |
394 | 398 | ||
395 | void Incidence::setRelatedTo(Incidence *relatedTo) | 399 | void Incidence::setRelatedTo(Incidence *relatedTo) |
396 | { | 400 | { |
397 | //qDebug("Incidence::setRelatedTo %d ", relatedTo); | 401 | //qDebug("Incidence::setRelatedTo %d ", relatedTo); |
398 | //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); | 402 | //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); |
399 | if (mReadOnly || mRelatedTo == relatedTo) return; | 403 | if (mReadOnly || mRelatedTo == relatedTo) return; |
400 | if(mRelatedTo) { | 404 | if(mRelatedTo) { |
401 | // updated(); | 405 | // updated(); |
402 | mRelatedTo->removeRelation(this); | 406 | mRelatedTo->removeRelation(this); |
403 | } | 407 | } |
404 | mRelatedTo = relatedTo; | 408 | mRelatedTo = relatedTo; |
405 | if (mRelatedTo) { | 409 | if (mRelatedTo) { |
406 | mRelatedTo->addRelation(this); | 410 | mRelatedTo->addRelation(this); |
407 | mRelatedToUid = mRelatedTo->uid(); | 411 | mRelatedToUid = mRelatedTo->uid(); |
408 | } else { | 412 | } else { |
409 | mRelatedToUid = ""; | 413 | mRelatedToUid = ""; |
410 | } | 414 | } |
411 | } | 415 | } |
412 | 416 | ||
413 | Incidence *Incidence::relatedTo() const | 417 | Incidence *Incidence::relatedTo() const |
414 | { | 418 | { |
415 | return mRelatedTo; | 419 | return mRelatedTo; |
416 | } | 420 | } |
417 | 421 | ||
418 | QPtrList<Incidence> Incidence::relations() const | 422 | QPtrList<Incidence> Incidence::relations() const |
419 | { | 423 | { |
420 | return mRelations; | 424 | return mRelations; |
421 | } | 425 | } |
422 | 426 | ||
423 | void Incidence::addRelation(Incidence *event) | 427 | void Incidence::addRelation(Incidence *event) |
424 | { | 428 | { |
425 | if( mRelations.findRef( event ) == -1 ) { | 429 | if( mRelations.findRef( event ) == -1 ) { |
426 | mRelations.append(event); | 430 | mRelations.append(event); |
427 | //updated(); | 431 | //updated(); |
428 | } | 432 | } |
429 | } | 433 | } |
430 | 434 | ||
431 | void Incidence::removeRelation(Incidence *event) | 435 | void Incidence::removeRelation(Incidence *event) |
432 | { | 436 | { |
433 | 437 | ||
434 | mRelations.removeRef(event); | 438 | mRelations.removeRef(event); |
435 | 439 | ||
436 | // if (event->getRelatedTo() == this) event->setRelatedTo(0); | 440 | // if (event->getRelatedTo() == this) event->setRelatedTo(0); |
437 | } | 441 | } |
438 | 442 | ||
439 | bool Incidence::recursOn(const QDate &qd) const | 443 | bool Incidence::recursOn(const QDate &qd) const |
440 | { | 444 | { |
441 | if (recurrence()->recursOnPure(qd) && !isException(qd)) return true; | 445 | if (recurrence()->recursOnPure(qd) && !isException(qd)) return true; |
442 | else return false; | 446 | else return false; |
443 | } | 447 | } |
444 | 448 | ||
445 | void Incidence::setExDates(const DateList &exDates) | 449 | void Incidence::setExDates(const DateList &exDates) |
446 | { | 450 | { |
447 | if (mReadOnly) return; | 451 | if (mReadOnly) return; |
448 | mExDates = exDates; | 452 | mExDates = exDates; |
449 | 453 | ||
450 | recurrence()->setRecurExDatesCount(mExDates.count()); | 454 | recurrence()->setRecurExDatesCount(mExDates.count()); |
451 | 455 | ||
452 | updated(); | 456 | updated(); |
453 | } | 457 | } |
454 | 458 | ||
455 | void Incidence::addExDate(const QDate &date) | 459 | void Incidence::addExDate(const QDate &date) |
456 | { | 460 | { |
457 | if (mReadOnly) return; | 461 | if (mReadOnly) return; |
458 | mExDates.append(date); | 462 | mExDates.append(date); |
459 | 463 | ||
460 | recurrence()->setRecurExDatesCount(mExDates.count()); | 464 | recurrence()->setRecurExDatesCount(mExDates.count()); |
461 | 465 | ||
462 | updated(); | 466 | updated(); |
463 | } | 467 | } |
464 | 468 | ||
465 | DateList Incidence::exDates() const | 469 | DateList Incidence::exDates() const |
466 | { | 470 | { |
467 | return mExDates; | 471 | return mExDates; |
468 | } | 472 | } |
469 | 473 | ||
470 | bool Incidence::isException(const QDate &date) const | 474 | bool Incidence::isException(const QDate &date) const |
471 | { | 475 | { |
472 | DateList::ConstIterator it; | 476 | DateList::ConstIterator it; |
473 | for( it = mExDates.begin(); it != mExDates.end(); ++it ) { | 477 | for( it = mExDates.begin(); it != mExDates.end(); ++it ) { |
474 | if ( (*it) == date ) { | 478 | if ( (*it) == date ) { |
475 | return true; | 479 | return true; |
476 | } | 480 | } |
477 | } | 481 | } |
478 | 482 | ||
479 | return false; | 483 | return false; |
480 | } | 484 | } |
481 | 485 | ||
482 | void Incidence::addAttachment(Attachment *attachment) | 486 | void Incidence::addAttachment(Attachment *attachment) |
483 | { | 487 | { |
484 | if (mReadOnly || !attachment) return; | 488 | if (mReadOnly || !attachment) return; |
485 | mAttachments.append(attachment); | 489 | mAttachments.append(attachment); |
486 | updated(); | 490 | updated(); |
487 | } | 491 | } |
488 | 492 | ||
489 | void Incidence::deleteAttachment(Attachment *attachment) | 493 | void Incidence::deleteAttachment(Attachment *attachment) |
490 | { | 494 | { |
491 | mAttachments.removeRef(attachment); | 495 | mAttachments.removeRef(attachment); |
492 | } | 496 | } |
493 | 497 | ||
494 | void Incidence::deleteAttachments(const QString& mime) | 498 | void Incidence::deleteAttachments(const QString& mime) |
495 | { | 499 | { |
496 | Attachment *at = mAttachments.first(); | 500 | Attachment *at = mAttachments.first(); |
497 | while (at) { | 501 | while (at) { |
498 | if (at->mimeType() == mime) | 502 | if (at->mimeType() == mime) |
499 | mAttachments.remove(); | 503 | mAttachments.remove(); |
500 | else | 504 | else |
501 | at = mAttachments.next(); | 505 | at = mAttachments.next(); |
502 | } | 506 | } |
503 | } | 507 | } |
504 | 508 | ||
505 | QPtrList<Attachment> Incidence::attachments() const | 509 | QPtrList<Attachment> Incidence::attachments() const |
506 | { | 510 | { |
507 | return mAttachments; | 511 | return mAttachments; |
508 | } | 512 | } |
509 | 513 | ||
510 | QPtrList<Attachment> Incidence::attachments(const QString& mime) const | 514 | QPtrList<Attachment> Incidence::attachments(const QString& mime) const |
511 | { | 515 | { |
512 | QPtrList<Attachment> attachments; | 516 | QPtrList<Attachment> attachments; |
513 | QPtrListIterator<Attachment> it( mAttachments ); | 517 | QPtrListIterator<Attachment> it( mAttachments ); |
514 | Attachment *at; | 518 | Attachment *at; |
515 | while ( (at = it.current()) ) { | 519 | while ( (at = it.current()) ) { |
516 | if (at->mimeType() == mime) | 520 | if (at->mimeType() == mime) |
517 | attachments.append(at); | 521 | attachments.append(at); |
518 | ++it; | 522 | ++it; |
519 | } | 523 | } |
520 | 524 | ||
521 | return attachments; | 525 | return attachments; |
522 | } | 526 | } |
523 | 527 | ||
524 | void Incidence::setResources(const QStringList &resources) | 528 | void Incidence::setResources(const QStringList &resources) |
525 | { | 529 | { |
526 | if (mReadOnly) return; | 530 | if (mReadOnly) return; |
527 | mResources = resources; | 531 | mResources = resources; |
528 | updated(); | 532 | updated(); |
529 | } | 533 | } |
530 | 534 | ||
531 | QStringList Incidence::resources() const | 535 | QStringList Incidence::resources() const |
532 | { | 536 | { |
533 | return mResources; | 537 | return mResources; |
534 | } | 538 | } |
535 | 539 | ||
536 | 540 | ||
537 | void Incidence::setPriority(int priority) | 541 | void Incidence::setPriority(int priority) |
538 | { | 542 | { |
539 | if (mReadOnly) return; | 543 | if (mReadOnly) return; |
540 | mPriority = priority; | 544 | mPriority = priority; |
541 | updated(); | 545 | updated(); |
542 | } | 546 | } |
543 | 547 | ||
544 | int Incidence::priority() const | 548 | int Incidence::priority() const |
545 | { | 549 | { |
546 | return mPriority; | 550 | return mPriority; |
547 | } | 551 | } |
548 | 552 | ||
549 | void Incidence::setSecrecy(int sec) | 553 | void Incidence::setSecrecy(int sec) |
550 | { | 554 | { |
551 | if (mReadOnly) return; | 555 | if (mReadOnly) return; |
552 | mSecrecy = sec; | 556 | mSecrecy = sec; |
553 | updated(); | 557 | updated(); |
554 | } | 558 | } |
555 | 559 | ||
556 | int Incidence::secrecy() const | 560 | int Incidence::secrecy() const |
557 | { | 561 | { |
558 | return mSecrecy; | 562 | return mSecrecy; |
559 | } | 563 | } |
560 | 564 | ||
561 | QString Incidence::secrecyStr() const | 565 | QString Incidence::secrecyStr() const |
562 | { | 566 | { |
563 | return secrecyName(mSecrecy); | 567 | return secrecyName(mSecrecy); |
564 | } | 568 | } |
565 | 569 | ||
566 | QString Incidence::secrecyName(int secrecy) | 570 | QString Incidence::secrecyName(int secrecy) |
567 | { | 571 | { |
568 | switch (secrecy) { | 572 | switch (secrecy) { |
569 | case SecrecyPublic: | 573 | case SecrecyPublic: |
570 | return i18n("Public"); | 574 | return i18n("Public"); |
571 | break; | 575 | break; |
572 | case SecrecyPrivate: | 576 | case SecrecyPrivate: |
573 | return i18n("Private"); | 577 | return i18n("Private"); |
574 | break; | 578 | break; |
575 | case SecrecyConfidential: | 579 | case SecrecyConfidential: |
576 | return i18n("Confidential"); | 580 | return i18n("Confidential"); |
577 | break; | 581 | break; |
578 | default: | 582 | default: |
579 | return i18n("Undefined"); | 583 | return i18n("Undefined"); |
580 | break; | 584 | break; |
581 | } | 585 | } |
582 | } | 586 | } |
583 | 587 | ||
584 | QStringList Incidence::secrecyList() | 588 | QStringList Incidence::secrecyList() |
585 | { | 589 | { |
586 | QStringList list; | 590 | QStringList list; |
587 | list << secrecyName(SecrecyPublic); | 591 | list << secrecyName(SecrecyPublic); |
588 | list << secrecyName(SecrecyPrivate); | 592 | list << secrecyName(SecrecyPrivate); |
589 | list << secrecyName(SecrecyConfidential); | 593 | list << secrecyName(SecrecyConfidential); |
590 | 594 | ||
591 | return list; | 595 | return list; |
592 | } | 596 | } |
593 | 597 | ||
594 | 598 | ||
595 | QPtrList<Alarm> Incidence::alarms() const | 599 | QPtrList<Alarm> Incidence::alarms() const |
596 | { | 600 | { |
597 | return mAlarms; | 601 | return mAlarms; |
598 | } | 602 | } |
599 | 603 | ||
600 | Alarm* Incidence::newAlarm() | 604 | Alarm* Incidence::newAlarm() |
601 | { | 605 | { |
602 | Alarm* alarm = new Alarm(this); | 606 | Alarm* alarm = new Alarm(this); |
603 | mAlarms.append(alarm); | 607 | mAlarms.append(alarm); |
604 | // updated(); | 608 | // updated(); |
605 | return alarm; | 609 | return alarm; |
606 | } | 610 | } |
607 | 611 | ||
608 | void Incidence::addAlarm(Alarm *alarm) | 612 | void Incidence::addAlarm(Alarm *alarm) |
609 | { | 613 | { |
610 | mAlarms.append(alarm); | 614 | mAlarms.append(alarm); |
611 | updated(); | 615 | updated(); |
612 | } | 616 | } |
613 | 617 | ||
614 | void Incidence::removeAlarm(Alarm *alarm) | 618 | void Incidence::removeAlarm(Alarm *alarm) |
615 | { | 619 | { |
616 | mAlarms.removeRef(alarm); | 620 | mAlarms.removeRef(alarm); |
617 | updated(); | 621 | updated(); |
618 | } | 622 | } |
619 | 623 | ||
620 | void Incidence::clearAlarms() | 624 | void Incidence::clearAlarms() |
621 | { | 625 | { |
622 | mAlarms.clear(); | 626 | mAlarms.clear(); |
623 | updated(); | 627 | updated(); |
624 | } | 628 | } |
625 | 629 | ||
626 | bool Incidence::isAlarmEnabled() const | 630 | bool Incidence::isAlarmEnabled() const |
627 | { | 631 | { |
628 | Alarm* alarm; | 632 | Alarm* alarm; |
629 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 633 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |
630 | if (alarm->enabled()) | 634 | if (alarm->enabled()) |
631 | return true; | 635 | return true; |
632 | } | 636 | } |
633 | return false; | 637 | return false; |
634 | } | 638 | } |
635 | 639 | ||
636 | Recurrence *Incidence::recurrence() const | 640 | Recurrence *Incidence::recurrence() const |
637 | { | 641 | { |
638 | return mRecurrence; | 642 | return mRecurrence; |
639 | } | 643 | } |
640 | void Incidence::setRecurrence( Recurrence * r) | 644 | void Incidence::setRecurrence( Recurrence * r) |
641 | { | 645 | { |
642 | delete mRecurrence; | 646 | delete mRecurrence; |
643 | mRecurrence = r; | 647 | mRecurrence = r; |
644 | } | 648 | } |
645 | 649 | ||
646 | void Incidence::setLocation(const QString &location) | 650 | void Incidence::setLocation(const QString &location) |
647 | { | 651 | { |
648 | if (mReadOnly) return; | 652 | if (mReadOnly) return; |
649 | mLocation = location; | 653 | mLocation = location; |
650 | updated(); | 654 | updated(); |
651 | } | 655 | } |
652 | 656 | ||
653 | QString Incidence::location() const | 657 | QString Incidence::location() const |
654 | { | 658 | { |
655 | return mLocation; | 659 | return mLocation; |
656 | } | 660 | } |
657 | 661 | ||
658 | ushort Incidence::doesRecur() const | 662 | ushort Incidence::doesRecur() const |
659 | { | 663 | { |
660 | if ( mRecurrence ) return mRecurrence->doesRecur(); | 664 | if ( mRecurrence ) return mRecurrence->doesRecur(); |
661 | else return Recurrence::rNone; | 665 | else return Recurrence::rNone; |
662 | } | 666 | } |
663 | 667 | ||
664 | QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const | 668 | QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const |
665 | { | 669 | { |
666 | QDateTime incidenceStart = dt; | 670 | QDateTime incidenceStart = dt; |
667 | *ok = false; | 671 | *ok = false; |
668 | if ( doesRecur() ) { | 672 | if ( doesRecur() ) { |
669 | bool last; | 673 | bool last; |
670 | recurrence()->getPreviousDateTime( incidenceStart , &last ); | 674 | recurrence()->getPreviousDateTime( incidenceStart , &last ); |
671 | int count = 0; | 675 | int count = 0; |
672 | if ( !last ) { | 676 | if ( !last ) { |
673 | while ( !last ) { | 677 | while ( !last ) { |
674 | ++count; | 678 | ++count; |
675 | incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last ); | 679 | incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last ); |
676 | if ( recursOn( incidenceStart.date() ) ) { | 680 | if ( recursOn( incidenceStart.date() ) ) { |
677 | last = true; // exit while llop | 681 | last = true; // exit while llop |
678 | } else { | 682 | } else { |
679 | if ( last ) { // no alarm on last recurrence | 683 | if ( last ) { // no alarm on last recurrence |
680 | return QDateTime (); | 684 | return QDateTime (); |
681 | } | 685 | } |
682 | int year = incidenceStart.date().year(); | 686 | int year = incidenceStart.date().year(); |
683 | // workaround for bug in recurrence | 687 | // workaround for bug in recurrence |
684 | if ( count == 100 || year < 1000 || year > 5000 ) { | 688 | if ( count == 100 || year < 1000 || year > 5000 ) { |
685 | return QDateTime (); | 689 | return QDateTime (); |
686 | } | 690 | } |
687 | incidenceStart = incidenceStart.addSecs( 1 ); | 691 | incidenceStart = incidenceStart.addSecs( 1 ); |
688 | } | 692 | } |
689 | } | 693 | } |
690 | } else { | 694 | } else { |
691 | return QDateTime (); | 695 | return QDateTime (); |
692 | } | 696 | } |
693 | } else { | 697 | } else { |
694 | if ( hasStartDate () ) { | 698 | if ( hasStartDate () ) { |
695 | incidenceStart = dtStart(); | 699 | incidenceStart = dtStart(); |
696 | } | 700 | } |
697 | if ( type() =="Todo" ) { | 701 | if ( type() =="Todo" ) { |
698 | if ( ((Todo*)this)->hasDueDate() ) | 702 | if ( ((Todo*)this)->hasDueDate() ) |
699 | incidenceStart = ((Todo*)this)->dtDue(); | 703 | incidenceStart = ((Todo*)this)->dtDue(); |
700 | } | 704 | } |
701 | } | 705 | } |
702 | if ( incidenceStart > dt ) | 706 | if ( incidenceStart > dt ) |
703 | *ok = true; | 707 | *ok = true; |
704 | return incidenceStart; | 708 | return incidenceStart; |
705 | } | 709 | } |
706 | QDateTime Incidence::dtStart() const | 710 | QDateTime Incidence::dtStart() const |
707 | { | 711 | { |
708 | if ( doesRecur() ) { | 712 | if ( doesRecur() ) { |
709 | if ( type() == "Todo" ) { | 713 | if ( type() == "Todo" ) { |
710 | ((Todo*)this)->checkSetCompletedFalse(); | 714 | ((Todo*)this)->checkSetCompletedFalse(); |
711 | } | 715 | } |
712 | } | 716 | } |
713 | return mDtStart; | 717 | return mDtStart; |
714 | } | 718 | } |
diff --git a/libkcal/incidence.h b/libkcal/incidence.h index 60070a2..327e7dd 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h | |||
@@ -1,315 +1,316 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library 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 GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | #ifndef INCIDENCE_H | 20 | #ifndef INCIDENCE_H |
21 | #define INCIDENCE_H | 21 | #define INCIDENCE_H |
22 | // | 22 | // |
23 | // Incidence - base class of calendaring components | 23 | // Incidence - base class of calendaring components |
24 | // | 24 | // |
25 | 25 | ||
26 | #include <qdatetime.h> | 26 | #include <qdatetime.h> |
27 | #include <qstringlist.h> | 27 | #include <qstringlist.h> |
28 | #include <qvaluelist.h> | 28 | #include <qvaluelist.h> |
29 | 29 | ||
30 | #include "recurrence.h" | 30 | #include "recurrence.h" |
31 | #include "alarm.h" | 31 | #include "alarm.h" |
32 | #include "attachment.h" | 32 | #include "attachment.h" |
33 | #include "listbase.h" | 33 | #include "listbase.h" |
34 | #include "incidencebase.h" | 34 | #include "incidencebase.h" |
35 | 35 | ||
36 | namespace KCal { | 36 | namespace KCal { |
37 | 37 | ||
38 | class Event; | 38 | class Event; |
39 | class Todo; | 39 | class Todo; |
40 | class Journal; | 40 | class Journal; |
41 | 41 | ||
42 | /** | 42 | /** |
43 | This class provides the base class common to all calendar components. | 43 | This class provides the base class common to all calendar components. |
44 | */ | 44 | */ |
45 | class Incidence : public IncidenceBase | 45 | class Incidence : public IncidenceBase |
46 | { | 46 | { |
47 | public: | 47 | public: |
48 | /** | 48 | /** |
49 | This class provides the interface for a visitor of calendar components. It | 49 | This class provides the interface for a visitor of calendar components. It |
50 | serves as base class for concrete visitors, which implement certain actions on | 50 | serves as base class for concrete visitors, which implement certain actions on |
51 | calendar components. It allows to add functions, which operate on the concrete | 51 | calendar components. It allows to add functions, which operate on the concrete |
52 | types of calendar components, without changing the calendar component classes. | 52 | types of calendar components, without changing the calendar component classes. |
53 | */ | 53 | */ |
54 | class Visitor | 54 | class Visitor |
55 | { | 55 | { |
56 | public: | 56 | public: |
57 | /** Destruct Incidence::Visitor */ | 57 | /** Destruct Incidence::Visitor */ |
58 | virtual ~Visitor() {} | 58 | virtual ~Visitor() {} |
59 | 59 | ||
60 | /** | 60 | /** |
61 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 61 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
62 | on an Event object. | 62 | on an Event object. |
63 | */ | 63 | */ |
64 | virtual bool visit(Event *) { return false; } | 64 | virtual bool visit(Event *) { return false; } |
65 | /** | 65 | /** |
66 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 66 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
67 | on an Todo object. | 67 | on an Todo object. |
68 | */ | 68 | */ |
69 | virtual bool visit(Todo *) { return false; } | 69 | virtual bool visit(Todo *) { return false; } |
70 | /** | 70 | /** |
71 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 71 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
72 | on an Journal object. | 72 | on an Journal object. |
73 | */ | 73 | */ |
74 | virtual bool visit(Journal *) { return false; } | 74 | virtual bool visit(Journal *) { return false; } |
75 | 75 | ||
76 | protected: | 76 | protected: |
77 | /** Constructor is protected to prevent direct creation of visitor base class. */ | 77 | /** Constructor is protected to prevent direct creation of visitor base class. */ |
78 | Visitor() {} | 78 | Visitor() {} |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | This class implements a visitor for adding an Incidence to a resource | 82 | This class implements a visitor for adding an Incidence to a resource |
83 | supporting addEvent(), addTodo() and addJournal() calls. | 83 | supporting addEvent(), addTodo() and addJournal() calls. |
84 | */ | 84 | */ |
85 | template<class T> | 85 | template<class T> |
86 | class AddVisitor : public Visitor | 86 | class AddVisitor : public Visitor |
87 | { | 87 | { |
88 | public: | 88 | public: |
89 | AddVisitor( T *r ) : mResource( r ) {} | 89 | AddVisitor( T *r ) : mResource( r ) {} |
90 | bool visit( Event *e ) { return mResource->addEvent( e ); } | 90 | bool visit( Event *e ) { return mResource->addEvent( e ); } |
91 | bool visit( Todo *t ) { return mResource->addTodo( t ); } | 91 | bool visit( Todo *t ) { return mResource->addTodo( t ); } |
92 | bool visit( Journal *j ) { return mResource->addJournal( j ); } | 92 | bool visit( Journal *j ) { return mResource->addJournal( j ); } |
93 | 93 | ||
94 | private: | 94 | private: |
95 | T *mResource; | 95 | T *mResource; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | /** enumeration for describing an event's secrecy. */ | 98 | /** enumeration for describing an event's secrecy. */ |
99 | enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }; | 99 | enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }; |
100 | typedef ListBase<Incidence> List; | 100 | typedef ListBase<Incidence> List; |
101 | Incidence(); | 101 | Incidence(); |
102 | Incidence(const Incidence &); | 102 | Incidence(const Incidence &); |
103 | ~Incidence(); | 103 | ~Incidence(); |
104 | 104 | ||
105 | /** | 105 | /** |
106 | Accept IncidenceVisitor. A class taking part in the visitor mechanism has to | 106 | Accept IncidenceVisitor. A class taking part in the visitor mechanism has to |
107 | provide this implementation: | 107 | provide this implementation: |
108 | <pre> | 108 | <pre> |
109 | bool accept(Visitor &v) { return v.visit(this); } | 109 | bool accept(Visitor &v) { return v.visit(this); } |
110 | </pre> | 110 | </pre> |
111 | */ | 111 | */ |
112 | virtual bool accept(Visitor &) { return false; } | 112 | virtual bool accept(Visitor &) { return false; } |
113 | 113 | ||
114 | virtual Incidence *clone() = 0; | 114 | virtual Incidence *clone() = 0; |
115 | virtual void cloneRelations( Incidence * ); | 115 | virtual void cloneRelations( Incidence * ); |
116 | 116 | ||
117 | virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; | 117 | virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; |
118 | void setReadOnly( bool ); | 118 | void setReadOnly( bool ); |
119 | 119 | ||
120 | /** | 120 | /** |
121 | Recreate event. The event is made a new unique event, but already stored | 121 | Recreate event. The event is made a new unique event, but already stored |
122 | event information is preserved. Sets uniquie id, creation date, last | 122 | event information is preserved. Sets uniquie id, creation date, last |
123 | modification date and revision number. | 123 | modification date and revision number. |
124 | */ | 124 | */ |
125 | void recreate(); | 125 | void recreate(); |
126 | Incidence* recreateCloneException(QDate); | 126 | Incidence* recreateCloneException(QDate); |
127 | 127 | ||
128 | /** set creation date */ | 128 | /** set creation date */ |
129 | void setCreated(QDateTime); | 129 | void setCreated(QDateTime); |
130 | /** return time and date of creation. */ | 130 | /** return time and date of creation. */ |
131 | QDateTime created() const; | 131 | QDateTime created() const; |
132 | 132 | ||
133 | /** set the number of revisions this event has seen */ | 133 | /** set the number of revisions this event has seen */ |
134 | void setRevision(int rev); | 134 | void setRevision(int rev); |
135 | /** return the number of revisions this event has seen */ | 135 | /** return the number of revisions this event has seen */ |
136 | int revision() const; | 136 | int revision() const; |
137 | 137 | ||
138 | /** Set starting date/time. */ | 138 | /** Set starting date/time. */ |
139 | virtual void setDtStart(const QDateTime &dtStart); | 139 | virtual void setDtStart(const QDateTime &dtStart); |
140 | /** Return the incidence's ending date/time as a QDateTime. */ | 140 | /** Return the incidence's ending date/time as a QDateTime. */ |
141 | virtual QDateTime dtEnd() const { return QDateTime(); } | 141 | virtual QDateTime dtEnd() const { return QDateTime(); } |
142 | 142 | ||
143 | /** sets the event's lengthy description. */ | 143 | /** sets the event's lengthy description. */ |
144 | void setDescription(const QString &description); | 144 | void setDescription(const QString &description); |
145 | /** returns a reference to the event's description. */ | 145 | /** returns a reference to the event's description. */ |
146 | QString description() const; | 146 | QString description() const; |
147 | 147 | ||
148 | /** sets the event's short summary. */ | 148 | /** sets the event's short summary. */ |
149 | void setSummary(const QString &summary); | 149 | void setSummary(const QString &summary); |
150 | /** returns a reference to the event's summary. */ | 150 | /** returns a reference to the event's summary. */ |
151 | QString summary() const; | 151 | QString summary() const; |
152 | 152 | ||
153 | /** set event's applicable categories */ | 153 | /** set event's applicable categories */ |
154 | void setCategories(const QStringList &categories); | 154 | void setCategories(const QStringList &categories); |
155 | /** set event's categories based on a comma delimited string */ | 155 | /** set event's categories based on a comma delimited string */ |
156 | void setCategories(const QString &catStr); | 156 | void setCategories(const QString &catStr); |
157 | /** return categories in a list */ | 157 | /** return categories in a list */ |
158 | QStringList categories() const; | 158 | QStringList categories() const; |
159 | /** return categories as a comma separated string */ | 159 | /** return categories as a comma separated string */ |
160 | QString categoriesStr(); | 160 | QString categoriesStr(); |
161 | QString categoriesStrWithSpace(); | ||
161 | 162 | ||
162 | /** point at some other event to which the event relates. This function should | 163 | /** point at some other event to which the event relates. This function should |
163 | * only be used when constructing a calendar before the related Event | 164 | * only be used when constructing a calendar before the related Event |
164 | * exists. */ | 165 | * exists. */ |
165 | void setRelatedToUid(const QString &); | 166 | void setRelatedToUid(const QString &); |
166 | /** what event does this one relate to? This function should | 167 | /** what event does this one relate to? This function should |
167 | * only be used when constructing a calendar before the related Event | 168 | * only be used when constructing a calendar before the related Event |
168 | * exists. */ | 169 | * exists. */ |
169 | QString relatedToUid() const; | 170 | QString relatedToUid() const; |
170 | /** point at some other event to which the event relates */ | 171 | /** point at some other event to which the event relates */ |
171 | void setRelatedTo(Incidence *relatedTo); | 172 | void setRelatedTo(Incidence *relatedTo); |
172 | /** what event does this one relate to? */ | 173 | /** what event does this one relate to? */ |
173 | Incidence *relatedTo() const; | 174 | Incidence *relatedTo() const; |
174 | /** All events that are related to this event */ | 175 | /** All events that are related to this event */ |
175 | QPtrList<Incidence> relations() const; | 176 | QPtrList<Incidence> relations() const; |
176 | /** Add an event which is related to this event */ | 177 | /** Add an event which is related to this event */ |
177 | void addRelation(Incidence *); | 178 | void addRelation(Incidence *); |
178 | /** Remove event that is related to this event */ | 179 | /** Remove event that is related to this event */ |
179 | void removeRelation(Incidence *); | 180 | void removeRelation(Incidence *); |
180 | 181 | ||
181 | /** returns the list of dates which are exceptions to the recurrence rule */ | 182 | /** returns the list of dates which are exceptions to the recurrence rule */ |
182 | DateList exDates() const; | 183 | DateList exDates() const; |
183 | /** sets the list of dates which are exceptions to the recurrence rule */ | 184 | /** sets the list of dates which are exceptions to the recurrence rule */ |
184 | void setExDates(const DateList &_exDates); | 185 | void setExDates(const DateList &_exDates); |
185 | void setExDates(const char *dates); | 186 | void setExDates(const char *dates); |
186 | /** Add a date to the list of exceptions of the recurrence rule. */ | 187 | /** Add a date to the list of exceptions of the recurrence rule. */ |
187 | void addExDate(const QDate &date); | 188 | void addExDate(const QDate &date); |
188 | 189 | ||
189 | /** returns true if there is an exception for this date in the recurrence | 190 | /** returns true if there is an exception for this date in the recurrence |
190 | rule set, or false otherwise. */ | 191 | rule set, or false otherwise. */ |
191 | bool isException(const QDate &qd) const; | 192 | bool isException(const QDate &qd) const; |
192 | 193 | ||
193 | /** add attachment to this event */ | 194 | /** add attachment to this event */ |
194 | void addAttachment(Attachment *attachment); | 195 | void addAttachment(Attachment *attachment); |
195 | /** remove and delete a specific attachment */ | 196 | /** remove and delete a specific attachment */ |
196 | void deleteAttachment(Attachment *attachment); | 197 | void deleteAttachment(Attachment *attachment); |
197 | /** remove and delete all attachments with this mime type */ | 198 | /** remove and delete all attachments with this mime type */ |
198 | void deleteAttachments(const QString& mime); | 199 | void deleteAttachments(const QString& mime); |
199 | /** return list of all associated attachments */ | 200 | /** return list of all associated attachments */ |
200 | QPtrList<Attachment> attachments() const; | 201 | QPtrList<Attachment> attachments() const; |
201 | /** find a list of attachments with this mime type */ | 202 | /** find a list of attachments with this mime type */ |
202 | QPtrList<Attachment> attachments(const QString& mime) const; | 203 | QPtrList<Attachment> attachments(const QString& mime) const; |
203 | 204 | ||
204 | /** sets the event's status the value specified. See the enumeration | 205 | /** sets the event's status the value specified. See the enumeration |
205 | * above for possible values. */ | 206 | * above for possible values. */ |
206 | void setSecrecy(int); | 207 | void setSecrecy(int); |
207 | /** return the event's secrecy. */ | 208 | /** return the event's secrecy. */ |
208 | int secrecy() const; | 209 | int secrecy() const; |
209 | /** return the event's secrecy in string format. */ | 210 | /** return the event's secrecy in string format. */ |
210 | QString secrecyStr() const; | 211 | QString secrecyStr() const; |
211 | /** return list of all availbale secrecy classes */ | 212 | /** return list of all availbale secrecy classes */ |
212 | static QStringList secrecyList(); | 213 | static QStringList secrecyList(); |
213 | /** return human-readable name of secrecy class */ | 214 | /** return human-readable name of secrecy class */ |
214 | static QString secrecyName(int); | 215 | static QString secrecyName(int); |
215 | 216 | ||
216 | /** returns TRUE if the date specified is one on which the event will | 217 | /** returns TRUE if the date specified is one on which the event will |
217 | * recur. */ | 218 | * recur. */ |
218 | bool recursOn(const QDate &qd) const; | 219 | bool recursOn(const QDate &qd) const; |
219 | 220 | ||
220 | // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): | 221 | // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): |
221 | 222 | ||
222 | /** set resources used, such as Office, Car, etc. */ | 223 | /** set resources used, such as Office, Car, etc. */ |
223 | void setResources(const QStringList &resources); | 224 | void setResources(const QStringList &resources); |
224 | /** return list of current resources */ | 225 | /** return list of current resources */ |
225 | QStringList resources() const; | 226 | QStringList resources() const; |
226 | 227 | ||
227 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ | 228 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ |
228 | void setPriority(int priority); | 229 | void setPriority(int priority); |
229 | /** get the event's priority */ | 230 | /** get the event's priority */ |
230 | int priority() const; | 231 | int priority() const; |
231 | 232 | ||
232 | /** All alarms that are associated with this incidence */ | 233 | /** All alarms that are associated with this incidence */ |
233 | QPtrList<Alarm> alarms() const; | 234 | QPtrList<Alarm> alarms() const; |
234 | /** Create a new alarm which is associated with this incidence */ | 235 | /** Create a new alarm which is associated with this incidence */ |
235 | Alarm* newAlarm(); | 236 | Alarm* newAlarm(); |
236 | /** Add an alarm which is associated with this incidence */ | 237 | /** Add an alarm which is associated with this incidence */ |
237 | void addAlarm(Alarm*); | 238 | void addAlarm(Alarm*); |
238 | /** Remove an alarm that is associated with this incidence */ | 239 | /** Remove an alarm that is associated with this incidence */ |
239 | void removeAlarm(Alarm*); | 240 | void removeAlarm(Alarm*); |
240 | /** Remove all alarms that are associated with this incidence */ | 241 | /** Remove all alarms that are associated with this incidence */ |
241 | void clearAlarms(); | 242 | void clearAlarms(); |
242 | /** return whether any alarm associated with this incidence is enabled */ | 243 | /** return whether any alarm associated with this incidence is enabled */ |
243 | bool isAlarmEnabled() const; | 244 | bool isAlarmEnabled() const; |
244 | 245 | ||
245 | /** | 246 | /** |
246 | Return the recurrence rule associated with this incidence. If there is | 247 | Return the recurrence rule associated with this incidence. If there is |
247 | none, returns an appropriate (non-0) object. | 248 | none, returns an appropriate (non-0) object. |
248 | */ | 249 | */ |
249 | Recurrence *recurrence() const; | 250 | Recurrence *recurrence() const; |
250 | void setRecurrence(Recurrence * r); | 251 | void setRecurrence(Recurrence * r); |
251 | /** | 252 | /** |
252 | Forward to Recurrence::doesRecur(). | 253 | Forward to Recurrence::doesRecur(). |
253 | */ | 254 | */ |
254 | ushort doesRecur() const; | 255 | ushort doesRecur() const; |
255 | 256 | ||
256 | /** set the event's/todo's location. Do _not_ use it with journal */ | 257 | /** set the event's/todo's location. Do _not_ use it with journal */ |
257 | void setLocation(const QString &location); | 258 | void setLocation(const QString &location); |
258 | /** return the event's/todo's location. Do _not_ use it with journal */ | 259 | /** return the event's/todo's location. Do _not_ use it with journal */ |
259 | QString location() const; | 260 | QString location() const; |
260 | /** returns TRUE or FALSE depending on whether the todo has a start date */ | 261 | /** returns TRUE or FALSE depending on whether the todo has a start date */ |
261 | bool hasStartDate() const; | 262 | bool hasStartDate() const; |
262 | /** sets the event's hasStartDate value. */ | 263 | /** sets the event's hasStartDate value. */ |
263 | void setHasStartDate(bool f); | 264 | void setHasStartDate(bool f); |
264 | QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; | 265 | QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; |
265 | bool cancelled() const; | 266 | bool cancelled() const; |
266 | void setCancelled( bool b ); | 267 | void setCancelled( bool b ); |
267 | 268 | ||
268 | bool hasRecurrenceID() const; | 269 | bool hasRecurrenceID() const; |
269 | void setHasRecurrenceID( bool b ); | 270 | void setHasRecurrenceID( bool b ); |
270 | 271 | ||
271 | void setRecurrenceID(QDateTime); | 272 | void setRecurrenceID(QDateTime); |
272 | QDateTime recurrenceID () const; | 273 | QDateTime recurrenceID () const; |
273 | QDateTime dtStart() const; | 274 | QDateTime dtStart() const; |
274 | bool isHoliday() const; | 275 | bool isHoliday() const; |
275 | bool isBirthday() const; | 276 | bool isBirthday() const; |
276 | bool isAnniversary() const; | 277 | bool isAnniversary() const; |
277 | 278 | ||
278 | 279 | ||
279 | protected: | 280 | protected: |
280 | QPtrList<Alarm> mAlarms; | 281 | QPtrList<Alarm> mAlarms; |
281 | QPtrList<Incidence> mRelations; | 282 | QPtrList<Incidence> mRelations; |
282 | QDateTime mRecurrenceID; | 283 | QDateTime mRecurrenceID; |
283 | bool mHasRecurrenceID; | 284 | bool mHasRecurrenceID; |
284 | private: | 285 | private: |
285 | void checkCategories(); | 286 | void checkCategories(); |
286 | bool mHoliday, mBirthday, mAnniversary; | 287 | bool mHoliday, mBirthday, mAnniversary; |
287 | int mRevision; | 288 | int mRevision; |
288 | bool mCancelled; | 289 | bool mCancelled; |
289 | 290 | ||
290 | // base components of jounal, event and todo | 291 | // base components of jounal, event and todo |
291 | QDateTime mCreated; | 292 | QDateTime mCreated; |
292 | QString mDescription; | 293 | QString mDescription; |
293 | QString mSummary; | 294 | QString mSummary; |
294 | QStringList mCategories; | 295 | QStringList mCategories; |
295 | Incidence *mRelatedTo; | 296 | Incidence *mRelatedTo; |
296 | QString mRelatedToUid; | 297 | QString mRelatedToUid; |
297 | DateList mExDates; | 298 | DateList mExDates; |
298 | QPtrList<Attachment> mAttachments; | 299 | QPtrList<Attachment> mAttachments; |
299 | QStringList mResources; | 300 | QStringList mResources; |
300 | bool mHasStartDate; // if todo has associated start date | 301 | bool mHasStartDate; // if todo has associated start date |
301 | 302 | ||
302 | int mSecrecy; | 303 | int mSecrecy; |
303 | int mPriority; // 1 = highest, 2 = less, etc. | 304 | int mPriority; // 1 = highest, 2 = less, etc. |
304 | 305 | ||
305 | //QPtrList<Alarm> mAlarms; | 306 | //QPtrList<Alarm> mAlarms; |
306 | Recurrence *mRecurrence; | 307 | Recurrence *mRecurrence; |
307 | 308 | ||
308 | QString mLocation; | 309 | QString mLocation; |
309 | }; | 310 | }; |
310 | 311 | ||
311 | bool operator==( const Incidence&, const Incidence& ); | 312 | bool operator==( const Incidence&, const Incidence& ); |
312 | 313 | ||
313 | } | 314 | } |
314 | 315 | ||
315 | #endif | 316 | #endif |
@@ -1 +1 @@ | |||
version = "2.0.28"; | version = "2.1.0"; | ||