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