-rw-r--r-- | bin/kdepim/WhatsNew.txt | 10 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 8800ada..df2d9d6 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,519 +1,527 @@ | |||
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.18 ************ | 3 | ********** VERSION 2.0.18 ************ |
4 | 4 | KO/Pi: | |
5 | Fixed some minor problems. | 5 | Fixed some minor problems. |
6 | Cleaned up the KO/Pi config dialog. | 6 | Cleaned up the KO/Pi config dialog. |
7 | Fixed problem moving events in aganda view. | ||
8 | Made datepicker scaleable, i.e. if the datepicker shows now a | ||
9 | datepicker matrix depending on its size. | ||
10 | Birthdays are now displayed green in the datepicker. | ||
11 | What'sThis Help in datepicker shows all events of the day. | ||
7 | 12 | ||
13 | OM/Pi: | ||
14 | Updated the backend mail library to the latest version. | ||
15 | Please backup your mail before using this version. | ||
8 | 16 | ||
9 | ********** VERSION 2.0.17 ************ | 17 | ********** VERSION 2.0.17 ************ |
10 | 18 | ||
11 | KO/Pi: | 19 | KO/Pi: |
12 | Tooltips in month view were not sorted. Fixed. | 20 | Tooltips in month view were not sorted. Fixed. |
13 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. | 21 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. |
14 | Conflict display dialog for syncing was not on top of other windows. Fixed. | 22 | Conflict display dialog for syncing was not on top of other windows. Fixed. |
15 | Fixed some minor problems. | 23 | Fixed some minor problems. |
16 | 24 | ||
17 | Fixed an endless loop when importing vcs file with RESOURCES entry. | 25 | Fixed an endless loop when importing vcs file with RESOURCES entry. |
18 | 26 | ||
19 | ********** VERSION 2.0.16 ************ | 27 | ********** VERSION 2.0.16 ************ |
20 | OM/Pi: | 28 | OM/Pi: |
21 | Fixed the SMTP account setting the option. | 29 | Fixed the SMTP account setting the option. |
22 | Fixed something in mail sending. | 30 | Fixed something in mail sending. |
23 | 31 | ||
24 | KO/Pi: | 32 | KO/Pi: |
25 | Added possibility to export selected events/todos as vcal file. | 33 | Added possibility to export selected events/todos as vcal file. |
26 | 34 | ||
27 | ********** VERSION 2.0.15 ************ | 35 | ********** VERSION 2.0.15 ************ |
28 | 36 | ||
29 | PwM/Pi: | 37 | PwM/Pi: |
30 | Added keyboard shorcuts for | 38 | Added keyboard shorcuts for |
31 | - toggling summary view (space bar) | 39 | - toggling summary view (space bar) |
32 | - delete item (delete + backspace key) | 40 | - delete item (delete + backspace key) |
33 | - add new item ( i + n key) | 41 | - add new item ( i + n key) |
34 | Fixed length of info in the title. | 42 | Fixed length of info in the title. |
35 | 43 | ||
36 | KO/Pi-KA/Pi: | 44 | KO/Pi-KA/Pi: |
37 | Changed "ME" menu bar entry to an icon. | 45 | Changed "ME" menu bar entry to an icon. |
38 | 46 | ||
39 | KO/Pi: | 47 | KO/Pi: |
40 | Fixed two minor bugs in displaying todos. | 48 | Fixed two minor bugs in displaying todos. |
41 | If in month view a cell is selected, the key shortcut "d" shows now that date. | 49 | If in month view a cell is selected, the key shortcut "d" shows now that date. |
42 | Added complete info for a todo in month view as an icon left of the text. | 50 | Added complete info for a todo in month view as an icon left of the text. |
43 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. | 51 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. |
44 | Fixed problem of search dialog size when switching displays. | 52 | Fixed problem of search dialog size when switching displays. |
45 | Cancel key now closes date picker. | 53 | Cancel key now closes date picker. |
46 | Rearranged KO/Pi file menu structure. | 54 | Rearranged KO/Pi file menu structure. |
47 | 55 | ||
48 | OM/Pi: | 56 | OM/Pi: |
49 | Added to the SMTP account setting the option | 57 | Added to the SMTP account setting the option |
50 | "No secure connection". | 58 | "No secure connection". |
51 | You have to configure your SMTP accounts again, sorry. | 59 | You have to configure your SMTP accounts again, sorry. |
52 | 60 | ||
53 | KA/Pi: | 61 | KA/Pi: |
54 | Added support for importing quoted-printable. | 62 | Added support for importing quoted-printable. |
55 | Support was added by Peter P.. Thanks, Peter! | 63 | Support was added by Peter P.. Thanks, Peter! |
56 | 64 | ||
57 | 65 | ||
58 | ********** VERSION 2.0.14 ************ | 66 | ********** VERSION 2.0.14 ************ |
59 | 67 | ||
60 | Made Passwordmanager PwM/Pi more userfriendly: | 68 | Made Passwordmanager PwM/Pi more userfriendly: |
61 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | 69 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. |
62 | Fixed bug in KO/Pi todo printing. | 70 | Fixed bug in KO/Pi todo printing. |
63 | Made Qtopia calendar import possible on desktop . | 71 | Made Qtopia calendar import possible on desktop . |
64 | 72 | ||
65 | ********** VERSION 2.0.13 ************ | 73 | ********** VERSION 2.0.13 ************ |
66 | 74 | ||
67 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. | 75 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. |
68 | 76 | ||
69 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". | 77 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". |
70 | 78 | ||
71 | OM/Pi: | 79 | OM/Pi: |
72 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. | 80 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. |
73 | Added missing German translation. | 81 | Added missing German translation. |
74 | Added warning if path is specified in local folder settings of account config. | 82 | Added warning if path is specified in local folder settings of account config. |
75 | 83 | ||
76 | ********** VERSION 2.0.12 ************ | 84 | ********** VERSION 2.0.12 ************ |
77 | 85 | ||
78 | KO/Pi: | 86 | KO/Pi: |
79 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | 87 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. |
80 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. | 88 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. |
81 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. | 89 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. |
82 | 90 | ||
83 | Fixed problem in pi-sync mode when wrong password was sent. | 91 | Fixed problem in pi-sync mode when wrong password was sent. |
84 | 92 | ||
85 | OM/Pi: | 93 | OM/Pi: |
86 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. | 94 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. |
87 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. | 95 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. |
88 | 96 | ||
89 | ********** VERSION 2.0.11 ************ | 97 | ********** VERSION 2.0.11 ************ |
90 | 98 | ||
91 | Fixed some problems in pi-sync mode | 99 | Fixed some problems in pi-sync mode |
92 | (e.g. details of events were not synced properly) | 100 | (e.g. details of events were not synced properly) |
93 | 101 | ||
94 | ********** VERSION 2.0.10 ************ | 102 | ********** VERSION 2.0.10 ************ |
95 | 103 | ||
96 | KO/Pi: | 104 | KO/Pi: |
97 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. | 105 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. |
98 | This is fixed. | 106 | This is fixed. |
99 | Changed the search dialog a bit to make it more user friendly. | 107 | Changed the search dialog a bit to make it more user friendly. |
100 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). | 108 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). |
101 | 109 | ||
102 | Added config option to hide the week number in KO/Pi toolbar. | 110 | Added config option to hide the week number in KO/Pi toolbar. |
103 | 111 | ||
104 | ********** VERSION 2.0.9 ************ | 112 | ********** VERSION 2.0.9 ************ |
105 | 113 | ||
106 | Made month view icons for multiday events a bit nicer. | 114 | Made month view icons for multiday events a bit nicer. |
107 | Some minor fixes in KO/Pi | 115 | Some minor fixes in KO/Pi |
108 | (e.g. go to today did not work for new week view properly). | 116 | (e.g. go to today did not work for new week view properly). |
109 | 117 | ||
110 | 118 | ||
111 | ********** VERSION 2.0.8 ************ | 119 | ********** VERSION 2.0.8 ************ |
112 | 120 | ||
113 | Fixed a problem in dependency info in the ipk files for the Zaurus. | 121 | Fixed a problem in dependency info in the ipk files for the Zaurus. |
114 | 122 | ||
115 | 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. | 123 | 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. |
116 | 124 | ||
117 | Added a "go today" button to the datepicker. | 125 | Added a "go today" button to the datepicker. |
118 | 126 | ||
119 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) | 127 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) |
120 | and made it configureable to show these values. | 128 | and made it configureable to show these values. |
121 | 129 | ||
122 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. | 130 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. |
123 | 131 | ||
124 | 132 | ||
125 | ********** VERSION 2.0.7 ************ | 133 | ********** VERSION 2.0.7 ************ |
126 | 134 | ||
127 | Added global application font settings | 135 | Added global application font settings |
128 | (for all KDE-Pim/Pi apps) to the general settings. | 136 | (for all KDE-Pim/Pi apps) to the general settings. |
129 | 137 | ||
130 | Fixed a problem in OM/Pi when trying to login to some IMAP servers | 138 | Fixed a problem in OM/Pi when trying to login to some IMAP servers |
131 | (like the IMAP server of Apple: mail.mac.com ) | 139 | (like the IMAP server of Apple: mail.mac.com ) |
132 | 140 | ||
133 | Added recurring todos to KO/Pi. | 141 | Added recurring todos to KO/Pi. |
134 | 142 | ||
135 | 143 | ||
136 | ********** VERSION 2.0.6 ************ | 144 | ********** VERSION 2.0.6 ************ |
137 | 145 | ||
138 | Some bugfixes in the pi-sync mode. | 146 | Some bugfixes in the pi-sync mode. |
139 | Added German translation for pi-sync mode. | 147 | Added German translation for pi-sync mode. |
140 | 148 | ||
141 | KO/Pi: | 149 | KO/Pi: |
142 | Made the todolist using alternate background. | 150 | Made the todolist using alternate background. |
143 | 151 | ||
144 | Other minor fixes in KO/Pi. | 152 | Other minor fixes in KO/Pi. |
145 | 153 | ||
146 | 154 | ||
147 | ********** VERSION 2.0.5 ************ | 155 | ********** VERSION 2.0.5 ************ |
148 | 156 | ||
149 | Bugfixes in KO/Pi. | 157 | Bugfixes in KO/Pi. |
150 | 158 | ||
151 | ********** VERSION 2.0.4 ************ | 159 | ********** VERSION 2.0.4 ************ |
152 | 160 | ||
153 | KO/Pi: | 161 | KO/Pi: |
154 | Fixed problem loading translations for summary/location edit boxes in event/todo editor. | 162 | Fixed problem loading translations for summary/location edit boxes in event/todo editor. |
155 | 163 | ||
156 | Added a general "select week number" to the toolbar. | 164 | Added a general "select week number" to the toolbar. |
157 | 165 | ||
158 | Fixed some small problem of the new features introduced in version 2.0.3. | 166 | Fixed some small problem of the new features introduced in version 2.0.3. |
159 | 167 | ||
160 | Made it possible to specify one specific category as category color, | 168 | Made it possible to specify one specific category as category color, |
161 | if more than one categories are selected. | 169 | if more than one categories are selected. |
162 | 170 | ||
163 | Fixed a bug in saving colors for categories with non-ascii characters. | 171 | Fixed a bug in saving colors for categories with non-ascii characters. |
164 | (Like, e.g. German Umlauts). | 172 | (Like, e.g. German Umlauts). |
165 | Propably you have to set your colors again for those categories. | 173 | Propably you have to set your colors again for those categories. |
166 | 174 | ||
167 | 175 | ||
168 | ********** VERSION 2.0.3 ************ | 176 | ********** VERSION 2.0.3 ************ |
169 | 177 | ||
170 | KO/Pi: | 178 | KO/Pi: |
171 | Added feature for changing alarm settings for many items at once: | 179 | Added feature for changing alarm settings for many items at once: |
172 | Open list view (or search dialog), select the desired items and choose in | 180 | Open list view (or search dialog), select the desired items and choose in |
173 | the popup menu: Set alarm for selected... | 181 | the popup menu: Set alarm for selected... |
174 | 182 | ||
175 | Added to the event/todo viewer the option to send an email to | 183 | Added to the event/todo viewer the option to send an email to |
176 | all attendees or all selected (with RSVP) attendees. | 184 | all attendees or all selected (with RSVP) attendees. |
177 | 185 | ||
178 | Made the week-month mode changing in month view faster. | 186 | Made the week-month mode changing in month view faster. |
179 | 187 | ||
180 | Made month view better useable with keyboard. | 188 | Made month view better useable with keyboard. |
181 | Now TAB key jumps to next cell with an event/todo. | 189 | Now TAB key jumps to next cell with an event/todo. |
182 | Scroll in cell with coursor keys, scroll in time (next week) with | 190 | Scroll in cell with coursor keys, scroll in time (next week) with |
183 | Shift/Control + coursorkeys. | 191 | Shift/Control + coursorkeys. |
184 | 192 | ||
185 | Fixed bug that the todo view flat mode was reset after first view update. | 193 | Fixed bug that the todo view flat mode was reset after first view update. |
186 | 194 | ||
187 | If a todo is displayed closed in the todo view, | 195 | If a todo is displayed closed in the todo view, |
188 | it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. | 196 | it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. |
189 | 197 | ||
190 | Added info about the numbers of years to the caption (title) information about a birthday event. | 198 | Added info about the numbers of years to the caption (title) information about a birthday event. |
191 | 199 | ||
192 | Made completion date in todo editor editable. | 200 | Made completion date in todo editor editable. |
193 | 201 | ||
194 | Added possibility to save/load templates for journals. | 202 | Added possibility to save/load templates for journals. |
195 | (Which is just a simple "save text to file" or "insert text from file". | 203 | (Which is just a simple "save text to file" or "insert text from file". |
196 | 204 | ||
197 | ********** VERSION 2.0.2 ************ | 205 | ********** VERSION 2.0.2 ************ |
198 | 206 | ||
199 | KO/Pi: | 207 | KO/Pi: |
200 | Fixed the layout problem of the day label buttons | 208 | Fixed the layout problem of the day label buttons |
201 | of the agenda view introduced in version 2.0.1. | 209 | of the agenda view introduced in version 2.0.1. |
202 | 210 | ||
203 | Added WhatsThis support for the todo view and the list view. | 211 | Added WhatsThis support for the todo view and the list view. |
204 | 212 | ||
205 | Added a quite useful feature to the montview. | 213 | Added a quite useful feature to the montview. |
206 | Just click on the week numbers on the left. | 214 | Just click on the week numbers on the left. |
207 | And in the top right corner of month view/agenda view | 215 | And in the top right corner of month view/agenda view |
208 | there is now a "week number quick selector". | 216 | there is now a "week number quick selector". |
209 | (Click on the black triangle). | 217 | (Click on the black triangle). |
210 | 218 | ||
211 | Made the quite difficult timezone change in KO/Pi easy. | 219 | Made the quite difficult timezone change in KO/Pi easy. |
212 | 220 | ||
213 | OM/Pi: | 221 | OM/Pi: |
214 | Fixed too small icons on desktop. | 222 | Fixed too small icons on desktop. |
215 | Fixed non visible icons in mainwindow on Z with fastload enabled. | 223 | Fixed non visible icons in mainwindow on Z with fastload enabled. |
216 | Added signature file setting to smtp account config. | 224 | Added signature file setting to smtp account config. |
217 | And the signature can be edited and saved in the edit mail dialog. | 225 | And the signature can be edited and saved in the edit mail dialog. |
218 | That does mean: | 226 | That does mean: |
219 | Simply edit the signature for the selected smtp account in the | 227 | Simply edit the signature for the selected smtp account in the |
220 | edit new mail dialog and press the "save signature" button there. | 228 | edit new mail dialog and press the "save signature" button there. |
221 | Then the signature is saved to the file specified in the smtp account settings. | 229 | Then the signature is saved to the file specified in the smtp account settings. |
222 | If there is no file specified, it is saved automatically to the file | 230 | If there is no file specified, it is saved automatically to the file |
223 | kdepim/apps/kopiemail/<accountname>.sig. | 231 | kdepim/apps/kopiemail/<accountname>.sig. |
224 | 232 | ||
225 | 233 | ||
226 | 234 | ||
227 | ********** VERSION 2.0.1 ************ | 235 | ********** VERSION 2.0.1 ************ |
228 | 236 | ||
229 | Oooops ... I forgot to test on the Zaurus 5500 ... | 237 | Oooops ... I forgot to test on the Zaurus 5500 ... |
230 | 238 | ||
231 | Fixed many problems of new (english) strings (and german translations) | 239 | Fixed many problems of new (english) strings (and german translations) |
232 | introduced in the latest versions, where the text was not fitting on the | 240 | introduced in the latest versions, where the text was not fitting on the |
233 | 240x320 display of the Zaurus 5500. | 241 | 240x320 display of the Zaurus 5500. |
234 | 242 | ||
235 | KO/Pi: | 243 | KO/Pi: |
236 | Added a popup menu ( press pen and hold to get popup ) to the agenda view | 244 | Added a popup menu ( press pen and hold to get popup ) to the agenda view |
237 | with many useful items (add event/todo, show next week, two weeks, month, journal). | 245 | with many useful items (add event/todo, show next week, two weeks, month, journal). |
238 | 246 | ||
239 | Added items to the todolist popup menu for: | 247 | Added items to the todolist popup menu for: |
240 | Display all opened, all closed or all todos flat. | 248 | Display all opened, all closed or all todos flat. |
241 | The "flat" view makes is possible to sort all todos after ,e.g., prio or date. | 249 | The "flat" view makes is possible to sort all todos after ,e.g., prio or date. |
242 | Made the reparenting of todos on the desktop possible via Drag&Drop. | 250 | Made the reparenting of todos on the desktop possible via Drag&Drop. |
243 | Fixed several bugs in setting the completed datetime for todos. | 251 | Fixed several bugs in setting the completed datetime for todos. |
244 | Added info about completed datetime of todos to the todo viewer. | 252 | Added info about completed datetime of todos to the todo viewer. |
245 | Now displaying a completed todo (with completed datetime set) in the agenda view | 253 | Now displaying a completed todo (with completed datetime set) in the agenda view |
246 | at the time of the completion. Such that now it is possible to see in the agenda view | 254 | at the time of the completion. Such that now it is possible to see in the agenda view |
247 | when what todo was completed. | 255 | when what todo was completed. |
248 | Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. | 256 | Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. |
249 | Now the behaviour is: | 257 | Now the behaviour is: |
250 | Setting a parent to complete sets all (sub)childs to complete. | 258 | Setting a parent to complete sets all (sub)childs to complete. |
251 | Setting a parent to uncomplete does not change the childs. | 259 | Setting a parent to uncomplete does not change the childs. |
252 | Setting a child to uncomplete sets all parent to uncomplete. | 260 | Setting a child to uncomplete sets all parent to uncomplete. |
253 | Setting a child to complete does not change the parents. | 261 | Setting a child to complete does not change the parents. |
254 | 262 | ||
255 | Smart updating and double buffering of the daymatrix. | 263 | Smart updating and double buffering of the daymatrix. |
256 | Showing holidays in the day matrix. | 264 | Showing holidays in the day matrix. |
257 | Many other small performance updates. | 265 | Many other small performance updates. |
258 | 266 | ||
259 | Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. | 267 | Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. |
260 | 268 | ||
261 | Now the translation file usertranslation.txt is supposed to be in utf8 format. | 269 | Now the translation file usertranslation.txt is supposed to be in utf8 format. |
262 | 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. | 270 | 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. |
263 | 271 | ||
264 | 272 | ||
265 | ********** VERSION 2.0.0 ************ | 273 | ********** VERSION 2.0.0 ************ |
266 | 274 | ||
267 | Stable release 2.0.0! | 275 | Stable release 2.0.0! |
268 | 276 | ||
269 | KO/Pi: | 277 | KO/Pi: |
270 | Fixed problem in edit dialog recreation at startup. | 278 | Fixed problem in edit dialog recreation at startup. |
271 | Made "toggle view*" menu items enabled context sensitive. | 279 | Made "toggle view*" menu items enabled context sensitive. |
272 | Changed agenda size menu to items 1-10. | 280 | Changed agenda size menu to items 1-10. |
273 | Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. | 281 | Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. |
274 | Usebility enhancements in the KO/Pi menus. | 282 | Usebility enhancements in the KO/Pi menus. |
275 | Birthday import now adds year to summary. | 283 | Birthday import now adds year to summary. |
276 | What's Next view shows age in years for birthday. | 284 | What's Next view shows age in years for birthday. |
277 | 285 | ||
278 | OM/Pi: | 286 | OM/Pi: |
279 | Added three info lines to display subject, from and to of selected mails. | 287 | Added three info lines to display subject, from and to of selected mails. |
280 | 288 | ||
281 | KA/Pi: | 289 | KA/Pi: |
282 | Fixed jump bar behaviour on Zaurus. | 290 | Fixed jump bar behaviour on Zaurus. |
283 | Now KA/Pi search field supports searching for a range of starting characters. | 291 | Now KA/Pi search field supports searching for a range of starting characters. |
284 | E.g. to search for all contact beginning with b to n, type | 292 | E.g. to search for all contact beginning with b to n, type |
285 | b-n | 293 | b-n |
286 | in the search field. | 294 | in the search field. |
287 | 295 | ||
288 | ********** VERSION 1.9.20 ************ | 296 | ********** VERSION 1.9.20 ************ |
289 | 297 | ||
290 | KO/Pi: | 298 | KO/Pi: |
291 | Added for the "dislplay one day" agenda mode | 299 | Added for the "dislplay one day" agenda mode |
292 | info in the caption and in the day lables: | 300 | info in the caption and in the day lables: |
293 | Now it is displayed, if the selected day is from "day before yesterday" | 301 | Now it is displayed, if the selected day is from "day before yesterday" |
294 | to "day after tomorrow". | 302 | to "day after tomorrow". |
295 | Made it possible to delete a Todo, which has sub-todos. | 303 | Made it possible to delete a Todo, which has sub-todos. |
296 | Fixed two small problems in the todo view. | 304 | Fixed two small problems in the todo view. |
297 | Added missing German translation for filter edit and print dialog. | 305 | Added missing German translation for filter edit and print dialog. |
298 | Made search dialog closeable by cancel key. | 306 | Made search dialog closeable by cancel key. |
299 | 307 | ||
300 | Made it possible to select in the date picker the (ligt grey ) | 308 | Made it possible to select in the date picker the (ligt grey ) |
301 | dates of the prev./next month with the mouse. | 309 | dates of the prev./next month with the mouse. |
302 | 310 | ||
303 | OM/Pi: | 311 | OM/Pi: |
304 | "Delete mail" icon in main window now deletes all selected mails. | 312 | "Delete mail" icon in main window now deletes all selected mails. |
305 | Fixed the problem, that the state flag of imap mails was ignored. | 313 | Fixed the problem, that the state flag of imap mails was ignored. |
306 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view | 314 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view |
307 | to indecate that they are already seen. | 315 | to indecate that they are already seen. |
308 | Fixed the problem that the body of some mails was not displayed in the | 316 | Fixed the problem that the body of some mails was not displayed in the |
309 | mail viewer when fetching them from the imap server directly to read them. | 317 | mail viewer when fetching them from the imap server directly to read them. |
310 | Made it (configurable) possible to show the "To:" field in the list view. | 318 | Made it (configurable) possible to show the "To:" field in the list view. |
311 | Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. | 319 | Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. |
312 | Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the | 320 | Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the |
313 | local storage folder (specified in account settings) of the account of the mail. | 321 | local storage folder (specified in account settings) of the account of the mail. |
314 | Removed some memory leaks in OM/Pi. | 322 | Removed some memory leaks in OM/Pi. |
315 | 323 | ||
316 | 324 | ||
317 | ********** VERSION 1.9.19 ************ | 325 | ********** VERSION 1.9.19 ************ |
318 | 326 | ||
319 | Added a lot of missing translations to KA/Pi, | 327 | Added a lot of missing translations to KA/Pi, |
320 | Added some missing translations to KO/Pi and OM/Pi. | 328 | Added some missing translations to KO/Pi and OM/Pi. |
321 | 329 | ||
322 | Fixed some minor problems in KA/Pi + KO/Pi. | 330 | Fixed some minor problems in KA/Pi + KO/Pi. |
323 | 331 | ||
324 | Fixed a crash when closing PwM/Pi. | 332 | Fixed a crash when closing PwM/Pi. |
325 | Added German translation for PwM/Pi. | 333 | Added German translation for PwM/Pi. |
326 | 334 | ||
327 | Made view change and Month View update faster in KO/Pi. | 335 | Made view change and Month View update faster in KO/Pi. |
328 | 336 | ||
329 | 337 | ||
330 | ********** VERSION 1.9.18 ************ | 338 | ********** VERSION 1.9.18 ************ |
331 | 339 | ||
332 | FYI: The VERSION 1.9.17 was a testing release only. | 340 | FYI: The VERSION 1.9.17 was a testing release only. |
333 | Please read the changelog of VERSION 1.9.17 as well. | 341 | Please read the changelog of VERSION 1.9.17 as well. |
334 | 342 | ||
335 | Cleaned up the syncing config dialog. | 343 | Cleaned up the syncing config dialog. |
336 | Added sync config options for date range for events. | 344 | Added sync config options for date range for events. |
337 | Added sync config options for filters on incoming data. | 345 | Added sync config options for filters on incoming data. |
338 | Added sync config options for filters on outgoing data. | 346 | Added sync config options for filters on outgoing data. |
339 | Please read the updated SyncHowTo about the new filter settings. | 347 | Please read the updated SyncHowTo about the new filter settings. |
340 | These filter settings make it now possible to sync with shared | 348 | These filter settings make it now possible to sync with shared |
341 | calendars without writing back private or confidential data | 349 | calendars without writing back private or confidential data |
342 | (via the outgoing filters). | 350 | (via the outgoing filters). |
343 | To sync only with particular parts of a shared calendar, | 351 | To sync only with particular parts of a shared calendar, |
344 | the incoming filter settings can be used. | 352 | the incoming filter settings can be used. |
345 | An example can be found in the SyncHowTo. | 353 | An example can be found in the SyncHowTo. |
346 | Same for shared addressbooks. | 354 | Same for shared addressbooks. |
347 | 355 | ||
348 | Added a setting for the global kdepim data storage. | 356 | Added a setting for the global kdepim data storage. |
349 | Usually the data is stored in (yourhomedir/kdepim). | 357 | Usually the data is stored in (yourhomedir/kdepim). |
350 | Now you can set in the Global config dialog TAB, subTAB "Data storage path" | 358 | Now you can set in the Global config dialog TAB, subTAB "Data storage path" |
351 | a directory where all the kdepim data is stored. | 359 | a directory where all the kdepim data is stored. |
352 | That makes it easy to save all kdepim data on a SD card on the Z, for example. | 360 | That makes it easy to save all kdepim data on a SD card on the Z, for example. |
353 | 361 | ||
354 | KO/Pi: | 362 | KO/Pi: |
355 | The timeedit input has a pulldown list for times. | 363 | The timeedit input has a pulldown list for times. |
356 | If opened, this pulldown list should now has the right time highlighted. | 364 | If opened, this pulldown list should now has the right time highlighted. |
357 | Added the possibility to exclude events/todos/journals in a filter. | 365 | Added the possibility to exclude events/todos/journals in a filter. |
358 | You should exclude journals, if you do not want them to sync with a public calendar. | 366 | You should exclude journals, if you do not want them to sync with a public calendar. |
359 | 367 | ||
360 | KA/Pi: | 368 | KA/Pi: |
361 | Added the possibility to in/exclude public/private/confidential contacts to a filter. | 369 | Added the possibility to in/exclude public/private/confidential contacts to a filter. |
362 | 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 ... | 370 | 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 ... |
363 | Added printing of card view and details view on desktop. | 371 | Added printing of card view and details view on desktop. |
364 | Printing of list view is not working... | 372 | Printing of list view is not working... |
365 | Added button for removing pictures in contact editor. | 373 | Added button for removing pictures in contact editor. |
366 | Parsing data fix of KA/Pi version 1.9.17. | 374 | Parsing data fix of KA/Pi version 1.9.17. |
367 | Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. | 375 | Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. |
368 | Fixed some syncing merging problems. | 376 | Fixed some syncing merging problems. |
369 | 377 | ||
370 | 378 | ||
371 | ********** VERSION 1.9.17 ************ | 379 | ********** VERSION 1.9.17 ************ |
372 | 380 | ||
373 | KO/Pi: | 381 | KO/Pi: |
374 | Fixed that tooltips were not updated after moving an item in agenda view. | 382 | Fixed that tooltips were not updated after moving an item in agenda view. |
375 | Fixed a bug in sorting start date for recurring events in list view. | 383 | Fixed a bug in sorting start date for recurring events in list view. |
376 | Changed the left button in todo viewer from "Agenda" to "Set completed". | 384 | Changed the left button in todo viewer from "Agenda" to "Set completed". |
377 | 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. | 385 | 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. |
378 | Added more info in the todo viewer: Startdate, parent/sub todos. | 386 | Added more info in the todo viewer: Startdate, parent/sub todos. |
379 | 387 | ||
380 | 388 | ||
381 | KA/Pi: | 389 | KA/Pi: |
382 | All fields search does now actually search all the (possible) fields, | 390 | All fields search does now actually search all the (possible) fields, |
383 | not only those listed in the contact list. | 391 | not only those listed in the contact list. |
384 | Made is possible to inline a picture in a vcard on the Z. | 392 | Made is possible to inline a picture in a vcard on the Z. |
385 | This was only possible on the desktop, now is it possible on the Z as well. | 393 | This was only possible on the desktop, now is it possible on the Z as well. |
386 | Fixed of missing save settings after filter configuration. | 394 | Fixed of missing save settings after filter configuration. |
387 | Made saving of addressbook much faster. | 395 | Made saving of addressbook much faster. |
388 | Fixed extension widget layout problem. | 396 | Fixed extension widget layout problem. |
389 | Fixed saving of default formatted name settings. | 397 | Fixed saving of default formatted name settings. |
390 | Fixed formatted name handling in edit dialog. | 398 | Fixed formatted name handling in edit dialog. |
391 | Added an option for changing formatted names of many contacts | 399 | Added an option for changing formatted names of many contacts |
392 | (menu: File - Change - Set formatted name). | 400 | (menu: File - Change - Set formatted name). |
393 | 401 | ||
394 | QWhatsThis was not working on the Z ( only black rectangle was shown). | 402 | QWhatsThis was not working on the Z ( only black rectangle was shown). |
395 | This is Fixed. | 403 | This is Fixed. |
396 | 404 | ||
397 | KDE-Sync: | 405 | KDE-Sync: |
398 | Now readonly KDE resources are synced as well. | 406 | Now readonly KDE resources are synced as well. |
399 | (They are not changed in KDE itself, of course). | 407 | (They are not changed in KDE itself, of course). |
400 | 408 | ||
401 | 409 | ||
402 | 410 | ||
403 | ********** VERSION 1.9.16 ************ | 411 | ********** VERSION 1.9.16 ************ |
404 | 412 | ||
405 | KO/Pi: | 413 | KO/Pi: |
406 | Fixed search dialog size on Z 6000 (480x640 display). | 414 | Fixed search dialog size on Z 6000 (480x640 display). |
407 | Added setting to hide/show time in agenda items. | 415 | Added setting to hide/show time in agenda items. |
408 | Added setting to hide not running todos in todo view. | 416 | Added setting to hide not running todos in todo view. |
409 | Added columns for start date/time in todo view. | 417 | Added columns for start date/time in todo view. |
410 | Replaced the solid half-hour lines in agenda view by dot lines. | 418 | Replaced the solid half-hour lines in agenda view by dot lines. |
411 | Added possibility of printing the What's Next View on the desktop | 419 | Added possibility of printing the What's Next View on the desktop |
412 | (i.e. Windows and Linux). | 420 | (i.e. Windows and Linux). |
413 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. | 421 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. |
414 | Added tooltips in month view.(Tooltips only available on desktop) | 422 | Added tooltips in month view.(Tooltips only available on desktop) |
415 | 423 | ||
416 | Fixed a strange problem in KO/Pi alarm applet. | 424 | Fixed a strange problem in KO/Pi alarm applet. |
417 | Did not find the actual problem, | 425 | Did not find the actual problem, |
418 | such that now Qtopia reboots again if deinstalling the alarm applet. | 426 | such that now Qtopia reboots again if deinstalling the alarm applet. |
419 | But the alarm applet should work again. | 427 | But the alarm applet should work again. |
420 | 428 | ||
421 | KA/Pi: | 429 | KA/Pi: |
422 | Fixed the problem, that internal pictures were not saved. | 430 | Fixed the problem, that internal pictures were not saved. |
423 | 431 | ||
424 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. | 432 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. |
425 | 433 | ||
426 | Fixed some minor problems. (Like word wrap in help text windows). | 434 | Fixed some minor problems. (Like word wrap in help text windows). |
427 | 435 | ||
428 | Fixed a compiling problem in microkde/kresources. | 436 | Fixed a compiling problem in microkde/kresources. |
429 | 437 | ||
430 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. | 438 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. |
431 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) | 439 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) |
432 | such that now syncing KO/Pi with Sharp DTM should work on the | 440 | such that now syncing KO/Pi with Sharp DTM should work on the |
433 | Zaurus C 3000 model. | 441 | Zaurus C 3000 model. |
434 | 442 | ||
435 | ********** VERSION 1.9.15 ************ | 443 | ********** VERSION 1.9.15 ************ |
436 | 444 | ||
437 | Usebilty enhancements in KO/Pi: | 445 | Usebilty enhancements in KO/Pi: |
438 | When clicking on the date in a month view cell, the day view is shown. | 446 | When clicking on the date in a month view cell, the day view is shown. |
439 | Old behaviour was, that the "new event" dialog popped up. | 447 | Old behaviour was, that the "new event" dialog popped up. |
440 | 448 | ||
441 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 449 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
442 | That means, you can restore the latest | 450 | That means, you can restore the latest |
443 | event/todo/journal you have deleted. | 451 | event/todo/journal you have deleted. |
444 | A journal is deleted, if you clear all the text of the journal. | 452 | A journal is deleted, if you clear all the text of the journal. |
445 | 453 | ||
446 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | 454 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. |
447 | 455 | ||
448 | KA/Pi starting in 480x640 resolution: | 456 | KA/Pi starting in 480x640 resolution: |
449 | Hide the filter action in toolbar | 457 | Hide the filter action in toolbar |
450 | and added icons for undo/delete/redo in toolbar. | 458 | and added icons for undo/delete/redo in toolbar. |
451 | 459 | ||
452 | Change in OM/Pi ViewMail dialog: | 460 | Change in OM/Pi ViewMail dialog: |
453 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. | 461 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. |
454 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | 462 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). |
455 | 463 | ||
456 | Fixed a crash when deleting mail-accounts in OM/Pi. | 464 | Fixed a crash when deleting mail-accounts in OM/Pi. |
457 | 465 | ||
458 | 466 | ||
459 | ********** VERSION 1.9.14 ************ | 467 | ********** VERSION 1.9.14 ************ |
460 | 468 | ||
461 | Fixed some problems with the dialog sizes when switching | 469 | Fixed some problems with the dialog sizes when switching |
462 | portrait/landscape mode on 640x480 PDA display. | 470 | portrait/landscape mode on 640x480 PDA display. |
463 | 471 | ||
464 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 472 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
465 | 473 | ||
466 | Fixed an ugly bug in KOpieMail: | 474 | Fixed an ugly bug in KOpieMail: |
467 | KOpieMail was not able to write files (mails) to MSDOS file system, | 475 | KOpieMail was not able to write files (mails) to MSDOS file system, |
468 | like on an usual preformatted SD card. That should work now. | 476 | like on an usual preformatted SD card. That should work now. |
469 | To save your mail data on the Sd card do the following: | 477 | To save your mail data on the Sd card do the following: |
470 | Create a dir on the SD card: | 478 | Create a dir on the SD card: |
471 | mkdir /mnt/card/localmail | 479 | mkdir /mnt/card/localmail |
472 | Go to your home dir: | 480 | Go to your home dir: |
473 | cd | 481 | cd |
474 | Go to kopiemail data storage dir: | 482 | Go to kopiemail data storage dir: |
475 | cd kdepim/apps/kopiemail | 483 | cd kdepim/apps/kopiemail |
476 | Create a symlink to the SD card: | 484 | Create a symlink to the SD card: |
477 | ls -s /mnt/card/localmail | 485 | ls -s /mnt/card/localmail |
478 | Now KOpieMail will store all mails on the SD card. | 486 | Now KOpieMail will store all mails on the SD card. |
479 | 487 | ||
480 | KO/Pi Monthview: | 488 | KO/Pi Monthview: |
481 | Now "Go to Today" selects the current month from day 1-end, | 489 | Now "Go to Today" selects the current month from day 1-end, |
482 | not the current date + some days. | 490 | not the current date + some days. |
483 | I.e. "Go to Today" shows now always | 491 | I.e. "Go to Today" shows now always |
484 | the current month with first day of month in the first row. | 492 | the current month with first day of month in the first row. |
485 | 493 | ||
486 | Added missing German translation. | 494 | Added missing German translation. |
487 | 495 | ||
488 | Fixed icons of executeable on Wintendo. | 496 | Fixed icons of executeable on Wintendo. |
489 | 497 | ||
490 | Added a "Show next Mail" button to the OM/Pi | 498 | Added a "Show next Mail" button to the OM/Pi |
491 | mail viewer such that the mail below the current mail | 499 | mail viewer such that the mail below the current mail |
492 | in the mail list view of the current folder | 500 | in the mail list view of the current folder |
493 | can be read with a single click. | 501 | can be read with a single click. |
494 | 502 | ||
495 | 503 | ||
496 | ********** VERSION 1.9.13 ************ | 504 | ********** VERSION 1.9.13 ************ |
497 | 505 | ||
498 | Fixed nasty PwM/Pi file reading bug, when | 506 | Fixed nasty PwM/Pi file reading bug, when |
499 | the used hash algo of file is different then the global | 507 | the used hash algo of file is different then the global |
500 | hash algo. | 508 | hash algo. |
501 | 509 | ||
502 | Added KA/Pi support for opie mailit mailapplication. | 510 | Added KA/Pi support for opie mailit mailapplication. |
503 | 511 | ||
504 | Fixed some bugs in OM/Pi. | 512 | Fixed some bugs in OM/Pi. |
505 | Now character conversion tables are available for the Zaurus | 513 | Now character conversion tables are available for the Zaurus |
506 | to make OM/Pi working properly. | 514 | to make OM/Pi working properly. |
507 | To get the character conversion in OM/Pi working, please download | 515 | To get the character conversion in OM/Pi working, please download |
508 | at the sourceforge project site the package | 516 | at the sourceforge project site the package |
509 | sr-character-conversion_SharpROM_arm.ipk.zip | 517 | sr-character-conversion_SharpROM_arm.ipk.zip |
510 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) | 518 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) |
511 | from the section "general files for KDE/Pim" | 519 | from the section "general files for KDE/Pim" |
512 | Instructions how to install this package are in a ReadMe in this file. | 520 | Instructions how to install this package are in a ReadMe in this file. |
513 | 521 | ||
514 | 522 | ||
515 | Fixed the orientation change problem in KA/Pi when switching | 523 | Fixed the orientation change problem in KA/Pi when switching |
516 | portrait/landscape mode. | 524 | portrait/landscape mode. |
517 | 525 | ||
518 | French translation available for KA/Pi and OM/Pi. | 526 | French translation available for KA/Pi and OM/Pi. |
519 | 527 | ||
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 36cd990..120bc89 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -185,747 +185,747 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) | |||
185 | } else { | 185 | } else { |
186 | if (event->doesFloat()) { | 186 | if (event->doesFloat()) { |
187 | text = event->summary(); | 187 | text = event->summary(); |
188 | mToolTipText += text; | 188 | mToolTipText += text; |
189 | } | 189 | } |
190 | else { | 190 | else { |
191 | text = KGlobal::locale()->formatTime(event->dtStart().time()); | 191 | text = KGlobal::locale()->formatTime(event->dtStart().time()); |
192 | text += " " + event->summary(); | 192 | text += " " + event->summary(); |
193 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 193 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); |
194 | } | 194 | } |
195 | } | 195 | } |
196 | if ( !event->location().isEmpty() ) | 196 | if ( !event->location().isEmpty() ) |
197 | mToolTipText += " (" + event->location() + ")"; | 197 | mToolTipText += " (" + event->location() + ")"; |
198 | #if QT_VERSION >= 0x030000 | 198 | #if QT_VERSION >= 0x030000 |
199 | mToolTipText.replace( '<' , "<" ); | 199 | mToolTipText.replace( '<' , "<" ); |
200 | mToolTipText.replace( '>' , ">" ); | 200 | mToolTipText.replace( '>' , ">" ); |
201 | #else | 201 | #else |
202 | if ( mToolTipText.find ('<') >= 0 ) { | 202 | if ( mToolTipText.find ('<') >= 0 ) { |
203 | mToolTipText.replace( QRegExp("<") , "<" ); | 203 | mToolTipText.replace( QRegExp("<") , "<" ); |
204 | } | 204 | } |
205 | if ( mToolTipText.find ('>') >= 0 ) { | 205 | if ( mToolTipText.find ('>') >= 0 ) { |
206 | mToolTipText.replace( QRegExp(">") , ">" ); | 206 | mToolTipText.replace( QRegExp(">") , ">" ); |
207 | } | 207 | } |
208 | #endif | 208 | #endif |
209 | //qDebug("TTT: %s ", mToolTipText.latin1()); | 209 | //qDebug("TTT: %s ", mToolTipText.latin1()); |
210 | mToolTip.append( mToolTipText ); | 210 | mToolTip.append( mToolTipText ); |
211 | } | 211 | } |
212 | mToolTip.sort(); | 212 | mToolTip.sort(); |
213 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); | 213 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); |
214 | } | 214 | } |
215 | void KODayMatrix::setCalendar( Calendar *cal ) | 215 | void KODayMatrix::setCalendar( Calendar *cal ) |
216 | { | 216 | { |
217 | mCalendar = cal; | 217 | mCalendar = cal; |
218 | 218 | ||
219 | setAcceptDrops( mCalendar ); | 219 | setAcceptDrops( mCalendar ); |
220 | 220 | ||
221 | updateEvents(); | 221 | updateEvents(); |
222 | } | 222 | } |
223 | 223 | ||
224 | QColor KODayMatrix::getShadedColor(QColor color) | 224 | QColor KODayMatrix::getShadedColor(QColor color) |
225 | { | 225 | { |
226 | QColor shaded; | 226 | QColor shaded; |
227 | int h=0; | 227 | int h=0; |
228 | int s=0; | 228 | int s=0; |
229 | int v=0; | 229 | int v=0; |
230 | color.hsv(&h,&s,&v); | 230 | color.hsv(&h,&s,&v); |
231 | s = s/4; | 231 | s = s/4; |
232 | v = 192+v/4; | 232 | v = 192+v/4; |
233 | shaded.setHsv(h,s,v); | 233 | shaded.setHsv(h,s,v); |
234 | 234 | ||
235 | return shaded; | 235 | return shaded; |
236 | } | 236 | } |
237 | 237 | ||
238 | KODayMatrix::~KODayMatrix() | 238 | KODayMatrix::~KODayMatrix() |
239 | { | 239 | { |
240 | // delete mKODaymatrixWhatsThis; | 240 | // delete mKODaymatrixWhatsThis; |
241 | delete [] days; | 241 | delete [] days; |
242 | delete [] daylbls; | 242 | delete [] daylbls; |
243 | delete [] events; | 243 | delete [] events; |
244 | delete mToolTip; | 244 | delete mToolTip; |
245 | } | 245 | } |
246 | 246 | ||
247 | /* | 247 | /* |
248 | void KODayMatrix::setStartDate(QDate start) | 248 | void KODayMatrix::setStartDate(QDate start) |
249 | { | 249 | { |
250 | updateView(start); | 250 | updateView(start); |
251 | } | 251 | } |
252 | */ | 252 | */ |
253 | 253 | ||
254 | void KODayMatrix::addSelectedDaysTo(DateList& selDays) | 254 | void KODayMatrix::addSelectedDaysTo(DateList& selDays) |
255 | { | 255 | { |
256 | 256 | ||
257 | if (mSelStart == NOSELECTION) { | 257 | if (mSelStart == NOSELECTION) { |
258 | return; | 258 | return; |
259 | } | 259 | } |
260 | 260 | ||
261 | //cope with selection being out of matrix limits at top (< 0) | 261 | //cope with selection being out of matrix limits at top (< 0) |
262 | int i0 = mSelStart; | 262 | int i0 = mSelStart; |
263 | if (i0 < 0) { | 263 | if (i0 < 0) { |
264 | for (int i = i0; i < 0; i++) { | 264 | for (int i = i0; i < 0; i++) { |
265 | selDays.append(days[0].addDays(i)); | 265 | selDays.append(days[0].addDays(i)); |
266 | } | 266 | } |
267 | i0 = 0; | 267 | i0 = 0; |
268 | } | 268 | } |
269 | 269 | ||
270 | //cope with selection being out of matrix limits at bottom (> NUMDAYS-1) | 270 | //cope with selection being out of matrix limits at bottom (> NUMDAYS-1) |
271 | if (mSelEnd > NUMDAYS-1) { | 271 | if (mSelEnd > NUMDAYS-1) { |
272 | for (int i = i0; i <= NUMDAYS-1; i++) { | 272 | for (int i = i0; i <= NUMDAYS-1; i++) { |
273 | selDays.append(days[i]); | 273 | selDays.append(days[i]); |
274 | } | 274 | } |
275 | for (int i = NUMDAYS; i < mSelEnd; i++) { | 275 | for (int i = NUMDAYS; i < mSelEnd; i++) { |
276 | selDays.append(days[0].addDays(i)); | 276 | selDays.append(days[0].addDays(i)); |
277 | } | 277 | } |
278 | 278 | ||
279 | // apply normal routine to selection being entirely within matrix limits | 279 | // apply normal routine to selection being entirely within matrix limits |
280 | } else { | 280 | } else { |
281 | for (int i = i0; i <= mSelEnd; i++) { | 281 | for (int i = i0; i <= mSelEnd; i++) { |
282 | selDays.append(days[i]); | 282 | selDays.append(days[i]); |
283 | } | 283 | } |
284 | } | 284 | } |
285 | } | 285 | } |
286 | 286 | ||
287 | void KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end) | 287 | void KODayMatrix::setSelectedDaysFrom(const QDate& start, const QDate& end) |
288 | { | 288 | { |
289 | mSelStart = startdate.daysTo(start); | 289 | mSelStart = startdate.daysTo(start); |
290 | if ( mSelStart < 0 ) | 290 | if ( mSelStart < 0 ) |
291 | mSelStart = 0; | 291 | mSelStart = 0; |
292 | mSelEnd = startdate.daysTo(end); | 292 | mSelEnd = startdate.daysTo(end); |
293 | //qDebug("SELECTION %d %d ", mSelStart ,mSelEnd ); | 293 | //qDebug("SELECTION %d %d ", mSelStart ,mSelEnd ); |
294 | if ( mSelEnd < 0 ) | 294 | if ( mSelEnd < 0 ) |
295 | clearSelection(); | 295 | clearSelection(); |
296 | } | 296 | } |
297 | void KODayMatrix::clearSelection() | 297 | void KODayMatrix::clearSelection() |
298 | { | 298 | { |
299 | mSelEnd = mSelStart = NOSELECTION; | 299 | mSelEnd = mSelStart = NOSELECTION; |
300 | } | 300 | } |
301 | 301 | ||
302 | 302 | ||
303 | void KODayMatrix::recalculateToday() | 303 | void KODayMatrix::recalculateToday() |
304 | { | 304 | { |
305 | today = -1; | 305 | today = -1; |
306 | for (int i=0; i<NUMDAYS; i++) { | 306 | for (int i=0; i<NUMDAYS; i++) { |
307 | events[i] = 0; | 307 | events[i] = 0; |
308 | days[i] = startdate.addDays(i); | 308 | days[i] = startdate.addDays(i); |
309 | daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] )); | 309 | daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] )); |
310 | 310 | ||
311 | // if today is in the currently displayed month, hilight today | 311 | // if today is in the currently displayed month, hilight today |
312 | if (days[i].year() == QDate::currentDate().year() && | 312 | if (days[i].year() == QDate::currentDate().year() && |
313 | days[i].month() == QDate::currentDate().month() && | 313 | days[i].month() == QDate::currentDate().month() && |
314 | days[i].day() == QDate::currentDate().day()) { | 314 | days[i].day() == QDate::currentDate().day()) { |
315 | today = i; | 315 | today = i; |
316 | } | 316 | } |
317 | } | 317 | } |
318 | // qDebug(QString("Today is visible at %1.").arg(today)); | 318 | // qDebug(QString("Today is visible at %1.").arg(today)); |
319 | } | 319 | } |
320 | 320 | ||
321 | void KODayMatrix::updateView() | 321 | void KODayMatrix::updateView() |
322 | { | 322 | { |
323 | updateView(startdate); | 323 | updateView(startdate); |
324 | } | 324 | } |
325 | void KODayMatrix::repaintViewTimed() | 325 | void KODayMatrix::repaintViewTimed() |
326 | { | 326 | { |
327 | mRepaintTimer->stop(); | 327 | mRepaintTimer->stop(); |
328 | repaint(false); | 328 | repaint(false); |
329 | } | 329 | } |
330 | void KODayMatrix::updateViewTimed() | 330 | void KODayMatrix::updateViewTimed() |
331 | { | 331 | { |
332 | mUpdateTimer->stop(); | 332 | mUpdateTimer->stop(); |
333 | if ( !mCalendar ) { | 333 | if ( !mCalendar ) { |
334 | qDebug("NOT CAL "); | 334 | qDebug("NOT CAL "); |
335 | return; | 335 | return; |
336 | } | 336 | } |
337 | //qDebug("KODayMatrix::updateViewTimed "); | 337 | //qDebug("KODayMatrix::updateViewTimed "); |
338 | for(int i = 0; i < NUMDAYS; i++) { | 338 | for(int i = 0; i < NUMDAYS; i++) { |
339 | // if events are set for the day then remember to draw it bold | 339 | // if events are set for the day then remember to draw it bold |
340 | QPtrList<Event> eventlist = mCalendar->events(days[i]); | 340 | QPtrList<Event> eventlist = mCalendar->events(days[i]); |
341 | Event *event; | 341 | Event *event; |
342 | int numEvents = eventlist.count(); | 342 | int numEvents = eventlist.count(); |
343 | QString holiStr = ""; | 343 | QString holiStr = ""; |
344 | bDays.clearBit(i); | 344 | bDays.clearBit(i); |
345 | for(event=eventlist.first();event != 0;event=eventlist.next()) { | 345 | for(event=eventlist.first();event != 0;event=eventlist.next()) { |
346 | ushort recurType = event->recurrence()->doesRecur(); | 346 | ushort recurType = event->recurrence()->doesRecur(); |
347 | if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || | 347 | if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || |
348 | (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { | 348 | (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { |
349 | numEvents--; | 349 | numEvents--; |
350 | } | 350 | } |
351 | if ( event->isHoliday()) { | 351 | if ( event->isHoliday()) { |
352 | if ( !holiStr.isEmpty() ) | 352 | if ( !holiStr.isEmpty() ) |
353 | holiStr += "\n"; | 353 | holiStr += "\n"; |
354 | holiStr += event->summary(); | 354 | holiStr += event->summary(); |
355 | if ( !event->location().isEmpty() ) | 355 | if ( !event->location().isEmpty() ) |
356 | holiStr += " (" + event->location() + ")"; | 356 | holiStr += " (" + event->location() + ")"; |
357 | } | 357 | } |
358 | if ( event->isBirthday()) { | 358 | if ( event->isBirthday()) { |
359 | if ( !holiStr.isEmpty() ) | 359 | if ( !holiStr.isEmpty() ) |
360 | holiStr += "\n"; | 360 | holiStr += "\n"; |
361 | holiStr += i18n("Birthday") + ": "+event->summary(); | 361 | holiStr += i18n("Birthday") + ": "+event->summary(); |
362 | if ( !event->location().isEmpty() ) | 362 | if ( !event->location().isEmpty() ) |
363 | holiStr += " (" + event->location() + ")"; | 363 | holiStr += " (" + event->location() + ")"; |
364 | bDays.setBit(i); | 364 | bDays.setBit(i); |
365 | } | 365 | } |
366 | } | 366 | } |
367 | events[i] = numEvents; | 367 | events[i] = numEvents; |
368 | //if it is a holy day then draw it red. Sundays are consider holidays, too | 368 | //if it is a holy day then draw it red. Sundays are consider holidays, too |
369 | if ( (KOGlobals::self()->calendarSystem()->dayOfWeek(days[i]) == KOGlobals::self()->calendarSystem()->weekDayOfPray()) || | 369 | if ( (KOGlobals::self()->calendarSystem()->dayOfWeek(days[i]) == KOGlobals::self()->calendarSystem()->weekDayOfPray()) || |
370 | !holiStr.isEmpty()) { | 370 | !holiStr.isEmpty()) { |
371 | mHolidays[i] = holiStr; | 371 | mHolidays[i] = holiStr; |
372 | } else { | 372 | } else { |
373 | mHolidays[i] = QString::null; | 373 | mHolidays[i] = QString::null; |
374 | } | 374 | } |
375 | } | 375 | } |
376 | if ( ! mPendingUpdateBeforeRepaint ) | 376 | if ( ! mPendingUpdateBeforeRepaint ) |
377 | repaint(false); | 377 | repaint(false); |
378 | } | 378 | } |
379 | void KODayMatrix::updateView(QDate actdate) | 379 | void KODayMatrix::updateView(QDate actdate) |
380 | { | 380 | { |
381 | 381 | ||
382 | if ( ! actdate.isValid() ) { | 382 | if ( ! actdate.isValid() ) { |
383 | //qDebug("date not valid "); | 383 | //qDebug("date not valid "); |
384 | return; | 384 | return; |
385 | } | 385 | } |
386 | mDayChanged = false; | 386 | mDayChanged = false; |
387 | //flag to indicate if the starting day of the matrix has changed by this call | 387 | //flag to indicate if the starting day of the matrix has changed by this call |
388 | //mDayChanged = false; | 388 | //mDayChanged = false; |
389 | // if a new startdate is to be set then apply Cornelius's calculation | 389 | // if a new startdate is to be set then apply Cornelius's calculation |
390 | // of the first day to be shown | 390 | // of the first day to be shown |
391 | if (actdate != startdate) { | 391 | if (actdate != startdate) { |
392 | // reset index of selection according to shift of starting date from startdate to actdate | 392 | // reset index of selection according to shift of starting date from startdate to actdate |
393 | if (mSelStart != NOSELECTION) { | 393 | if (mSelStart != NOSELECTION) { |
394 | int tmp = actdate.daysTo(startdate); | 394 | int tmp = actdate.daysTo(startdate); |
395 | //kdDebug() << "Shift of Selection1: " << mSelStart << " - " << mSelEnd << " -> " << tmp << "(" << offset << ")" << endl; | 395 | //kdDebug() << "Shift of Selection1: " << mSelStart << " - " << mSelEnd << " -> " << tmp << "(" << offset << ")" << endl; |
396 | // shift selection if new one would be visible at least partly ! | 396 | // shift selection if new one would be visible at least partly ! |
397 | 397 | ||
398 | if (mSelStart+tmp < NUMDAYS && mSelEnd+tmp >= 0) { | 398 | if (mSelStart+tmp < NUMDAYS && mSelEnd+tmp >= 0) { |
399 | // nested if is required for next X display pushed from a different month - correction required | 399 | // nested if is required for next X display pushed from a different month - correction required |
400 | // otherwise, for month forward and backward, it must be avoided | 400 | // otherwise, for month forward and backward, it must be avoided |
401 | if( mSelStart > NUMDAYS || mSelStart < 0 ) | 401 | if( mSelStart > NUMDAYS || mSelStart < 0 ) |
402 | mSelStart = mSelStart + tmp; | 402 | mSelStart = mSelStart + tmp; |
403 | if( mSelEnd > NUMDAYS || mSelEnd < 0 ) | 403 | if( mSelEnd > NUMDAYS || mSelEnd < 0 ) |
404 | mSelEnd = mSelEnd + tmp; | 404 | mSelEnd = mSelEnd + tmp; |
405 | } | 405 | } |
406 | } | 406 | } |
407 | startdate = actdate; | 407 | startdate = actdate; |
408 | mDayChanged = true; | 408 | mDayChanged = true; |
409 | recalculateToday(); | 409 | recalculateToday(); |
410 | } | 410 | } |
411 | //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); | 411 | //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); |
412 | if ( !isVisible() ) { | 412 | if ( !isVisible() ) { |
413 | mPendingUpdateBeforeRepaint = true; | 413 | mPendingUpdateBeforeRepaint = true; |
414 | } else { | 414 | } else { |
415 | #ifdef DESKTOP_VERSION | 415 | #ifdef DESKTOP_VERSION |
416 | //mRepaintTimer->start( 100 ); | 416 | //mRepaintTimer->start( 100 ); |
417 | mUpdateTimer->start( 100 ); | 417 | mUpdateTimer->start( 100 ); |
418 | #else | 418 | #else |
419 | mRepaintTimer->start( 350 ); | 419 | mRepaintTimer->start( 350 ); |
420 | mUpdateTimer->start( 1200 ); | 420 | mUpdateTimer->start( 1200 ); |
421 | #endif | 421 | #endif |
422 | } | 422 | } |
423 | } | 423 | } |
424 | void KODayMatrix::updateEvents() | 424 | void KODayMatrix::updateEvents() |
425 | { | 425 | { |
426 | if ( !mCalendar ) return; | 426 | if ( !mCalendar ) return; |
427 | 427 | ||
428 | for( int i = 0; i < NUMDAYS; i++ ) { | 428 | for( int i = 0; i < NUMDAYS; i++ ) { |
429 | // if events are set for the day then remember to draw it bold | 429 | // if events are set for the day then remember to draw it bold |
430 | QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); | 430 | QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); |
431 | int numEvents = eventlist.count(); | 431 | int numEvents = eventlist.count(); |
432 | Event *event; | 432 | Event *event; |
433 | for( event = eventlist.first(); event != 0;event=eventlist.next()) { | 433 | for( event = eventlist.first(); event != 0;event=eventlist.next()) { |
434 | ushort recurType = event->doesRecur(); | 434 | ushort recurType = event->doesRecur(); |
435 | 435 | ||
436 | if ( ( recurType == Recurrence::rDaily && | 436 | if ( ( recurType == Recurrence::rDaily && |
437 | !KOPrefs::instance()->mDailyRecur ) || | 437 | !KOPrefs::instance()->mDailyRecur ) || |
438 | ( recurType == Recurrence::rWeekly && | 438 | ( recurType == Recurrence::rWeekly && |
439 | !KOPrefs::instance()->mWeeklyRecur ) ) { | 439 | !KOPrefs::instance()->mWeeklyRecur ) ) { |
440 | numEvents--; | 440 | numEvents--; |
441 | } | 441 | } |
442 | } | 442 | } |
443 | events[ i ] = numEvents; | 443 | events[ i ] = numEvents; |
444 | } | 444 | } |
445 | } | 445 | } |
446 | 446 | ||
447 | const QDate& KODayMatrix::getDate(int offset) | 447 | const QDate& KODayMatrix::getDate(int offset) |
448 | { | 448 | { |
449 | if (offset < 0 || offset > NUMDAYS-1) { | 449 | if (offset < 0 || offset > NUMDAYS-1) { |
450 | qDebug("Wrong offset2 %d", offset); | 450 | qDebug("Wrong offset2 %d", offset); |
451 | return days[0]; | 451 | return days[0]; |
452 | } | 452 | } |
453 | return days[offset]; | 453 | return days[offset]; |
454 | } | 454 | } |
455 | 455 | ||
456 | QString KODayMatrix::getHolidayLabel(int offset) | 456 | QString KODayMatrix::getHolidayLabel(int offset) |
457 | { | 457 | { |
458 | if (offset < 0 || offset > NUMDAYS-1) { | 458 | if (offset < 0 || offset > NUMDAYS-1) { |
459 | qDebug("Wrong offset1 %d", offset); | 459 | qDebug("Wrong offset1 %d", offset); |
460 | return QString(); | 460 | return QString(); |
461 | } | 461 | } |
462 | return mHolidays[offset]; | 462 | return mHolidays[offset]; |
463 | } | 463 | } |
464 | 464 | ||
465 | int KODayMatrix::getDayIndexFrom(int x, int y) | 465 | int KODayMatrix::getDayIndexFrom(int x, int y) |
466 | { | 466 | { |
467 | int colModulo = (width()-2) % 7; | 467 | int colModulo = (width()-2) % 7; |
468 | int rowModulo = (height()-2) % 6; | 468 | int rowModulo = (height()-2) % 6; |
469 | #if 0 | 469 | #if 0 |
470 | return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ? | 470 | return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ? |
471 | 6 - x/daysize.width() : x/daysize.width()); | 471 | 6 - x/daysize.width() : x/daysize.width()); |
472 | #endif | 472 | #endif |
473 | int xVal = (x-colModulo/2-2)/daysize.width(); | 473 | int xVal = (x-colModulo/2-2)/daysize.width(); |
474 | int yVal = (y-rowModulo/2-2)/daysize.height(); | 474 | int yVal = (y-rowModulo/2-2)/daysize.height(); |
475 | 475 | ||
476 | 476 | ||
477 | return 7*(yVal) + xVal; | 477 | return 7*(yVal) + xVal; |
478 | 478 | ||
479 | } | 479 | } |
480 | 480 | ||
481 | // ---------------------------------------------------------------------------- | 481 | // ---------------------------------------------------------------------------- |
482 | // M O U S E E V E N T H A N D L I N G | 482 | // M O U S E E V E N T H A N D L I N G |
483 | // ---------------------------------------------------------------------------- | 483 | // ---------------------------------------------------------------------------- |
484 | 484 | ||
485 | void KODayMatrix::mousePressEvent (QMouseEvent* e) | 485 | void KODayMatrix::mousePressEvent (QMouseEvent* e) |
486 | { | 486 | { |
487 | 487 | ||
488 | if ( e->button() == LeftButton ) | 488 | if ( e->button() == LeftButton ) |
489 | mouseDown = true; | 489 | mouseDown = true; |
490 | mSelStart = getDayIndexFrom(e->x(), e->y()); | 490 | mSelStart = getDayIndexFrom(e->x(), e->y()); |
491 | if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; | 491 | if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; |
492 | mSelInit = mSelStart; | 492 | mSelInit = mSelStart; |
493 | mSelEnd = mSelStart; | 493 | mSelEnd = mSelStart; |
494 | repaint(false); | 494 | repaint(false); |
495 | } | 495 | } |
496 | 496 | ||
497 | void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) | 497 | void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) |
498 | { | 498 | { |
499 | if ( e->button() == LeftButton ) | 499 | if ( e->button() == LeftButton ) |
500 | if ( ! mouseDown ) { | 500 | if ( ! mouseDown ) { |
501 | return; | 501 | return; |
502 | } | 502 | } |
503 | else | 503 | else |
504 | mouseDown = false; | 504 | mouseDown = false; |
505 | int tmp = getDayIndexFrom(e->x(), e->y()); | 505 | int tmp = getDayIndexFrom(e->x(), e->y()); |
506 | if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; | 506 | if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; |
507 | 507 | ||
508 | if (mSelInit > tmp) { | 508 | if (mSelInit > tmp) { |
509 | mSelEnd = mSelInit; | 509 | mSelEnd = mSelInit; |
510 | if (tmp != mSelStart) { | 510 | if (tmp != mSelStart) { |
511 | mSelStart = tmp; | 511 | mSelStart = tmp; |
512 | repaint(false); | 512 | repaint(false); |
513 | } | 513 | } |
514 | } else { | 514 | } else { |
515 | mSelStart = mSelInit; | 515 | mSelStart = mSelInit; |
516 | 516 | ||
517 | //repaint only if selection has changed | 517 | //repaint only if selection has changed |
518 | if (tmp != mSelEnd) { | 518 | if (tmp != mSelEnd) { |
519 | mSelEnd = tmp; | 519 | mSelEnd = tmp; |
520 | repaint(false); | 520 | repaint(false); |
521 | } | 521 | } |
522 | } | 522 | } |
523 | 523 | ||
524 | DateList daylist; | 524 | DateList daylist; |
525 | if ( mSelStart < 0 ) | 525 | if ( mSelStart < 0 ) |
526 | mSelStart = 0; | 526 | mSelStart = 0; |
527 | for (int i = mSelStart; i <= mSelEnd; i++) { | 527 | for (int i = mSelStart; i <= mSelEnd; i++) { |
528 | daylist.append(days[i]); | 528 | daylist.append(days[i]); |
529 | } | 529 | } |
530 | emit selected((const DateList)daylist); | 530 | emit selected((const DateList)daylist); |
531 | 531 | ||
532 | } | 532 | } |
533 | 533 | ||
534 | void KODayMatrix::mouseMoveEvent (QMouseEvent* e) | 534 | void KODayMatrix::mouseMoveEvent (QMouseEvent* e) |
535 | { | 535 | { |
536 | if ( ! mouseDown ) { | 536 | if ( ! mouseDown ) { |
537 | return; | 537 | return; |
538 | } | 538 | } |
539 | int tmp = getDayIndexFrom(e->x(), e->y()); | 539 | int tmp = getDayIndexFrom(e->x(), e->y()); |
540 | if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; | 540 | if (tmp > NUMDAYS-1) tmp=NUMDAYS-1; |
541 | 541 | ||
542 | if (mSelInit > tmp) { | 542 | if (mSelInit > tmp) { |
543 | mSelEnd = mSelInit; | 543 | mSelEnd = mSelInit; |
544 | if (tmp != mSelStart) { | 544 | if (tmp != mSelStart) { |
545 | mSelStart = tmp; | 545 | mSelStart = tmp; |
546 | repaint(false); | 546 | repaint(false); |
547 | } | 547 | } |
548 | } else { | 548 | } else { |
549 | mSelStart = mSelInit; | 549 | mSelStart = mSelInit; |
550 | 550 | ||
551 | //repaint only if selection has changed | 551 | //repaint only if selection has changed |
552 | if (tmp != mSelEnd) { | 552 | if (tmp != mSelEnd) { |
553 | mSelEnd = tmp; | 553 | mSelEnd = tmp; |
554 | repaint(false); | 554 | repaint(false); |
555 | } | 555 | } |
556 | } | 556 | } |
557 | } | 557 | } |
558 | 558 | ||
559 | // ---------------------------------------------------------------------------- | 559 | // ---------------------------------------------------------------------------- |
560 | // D R A G ' N D R O P H A N D L I N G | 560 | // D R A G ' N D R O P H A N D L I N G |
561 | // ---------------------------------------------------------------------------- | 561 | // ---------------------------------------------------------------------------- |
562 | 562 | ||
563 | void KODayMatrix::dragEnterEvent(QDragEnterEvent *e) | 563 | void KODayMatrix::dragEnterEvent(QDragEnterEvent *e) |
564 | { | 564 | { |
565 | #ifndef KORG_NODND | 565 | #ifndef KORG_NODND |
566 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) { | 566 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) { |
567 | e->ignore(); | 567 | e->ignore(); |
568 | return; | 568 | return; |
569 | } | 569 | } |
570 | 570 | ||
571 | // some visual feedback | 571 | // some visual feedback |
572 | // oldPalette = palette(); | 572 | // oldPalette = palette(); |
573 | // setPalette(my_HilitePalette); | 573 | // setPalette(my_HilitePalette); |
574 | // update(); | 574 | // update(); |
575 | #endif | 575 | #endif |
576 | } | 576 | } |
577 | 577 | ||
578 | void KODayMatrix::dragMoveEvent(QDragMoveEvent *e) | 578 | void KODayMatrix::dragMoveEvent(QDragMoveEvent *e) |
579 | { | 579 | { |
580 | #ifndef KORG_NODND | 580 | #ifndef KORG_NODND |
581 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) { | 581 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) { |
582 | e->ignore(); | 582 | e->ignore(); |
583 | return; | 583 | return; |
584 | } | 584 | } |
585 | 585 | ||
586 | e->accept(); | 586 | e->accept(); |
587 | #endif | 587 | #endif |
588 | } | 588 | } |
589 | 589 | ||
590 | void KODayMatrix::dragLeaveEvent(QDragLeaveEvent */*dl*/) | 590 | void KODayMatrix::dragLeaveEvent(QDragLeaveEvent */*dl*/) |
591 | { | 591 | { |
592 | #ifndef KORG_NODND | 592 | #ifndef KORG_NODND |
593 | // setPalette(oldPalette); | 593 | // setPalette(oldPalette); |
594 | // update(); | 594 | // update(); |
595 | #endif | 595 | #endif |
596 | } | 596 | } |
597 | 597 | ||
598 | void KODayMatrix::dropEvent(QDropEvent *e) | 598 | void KODayMatrix::dropEvent(QDropEvent *e) |
599 | { | 599 | { |
600 | #ifndef KORG_NODND | 600 | #ifndef KORG_NODND |
601 | // kdDebug() << "KODayMatrix::dropEvent(e) begin" << endl; | 601 | // kdDebug() << "KODayMatrix::dropEvent(e) begin" << endl; |
602 | 602 | ||
603 | if (!mCalendar || !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) { | 603 | if (!mCalendar || !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) { |
604 | e->ignore(); | 604 | e->ignore(); |
605 | return; | 605 | return; |
606 | } | 606 | } |
607 | 607 | ||
608 | DndFactory factory( mCalendar ); | 608 | DndFactory factory( mCalendar ); |
609 | Event *event = factory.createDrop(e); | 609 | Event *event = factory.createDrop(e); |
610 | 610 | ||
611 | if (event) { | 611 | if (event) { |
612 | e->acceptAction(); | 612 | e->acceptAction(); |
613 | 613 | ||
614 | Event *existingEvent = mCalendar->event(event->uid()); | 614 | Event *existingEvent = mCalendar->event(event->uid()); |
615 | 615 | ||
616 | if(existingEvent) { | 616 | if(existingEvent) { |
617 | // uniquify event | 617 | // uniquify event |
618 | event->recreate(); | 618 | event->recreate(); |
619 | /* | 619 | /* |
620 | KMessageBox::sorry(this, | 620 | KMessageBox::sorry(this, |
621 | i18n("Event already exists in this calendar."), | 621 | i18n("Event already exists in this calendar."), |
622 | i18n("Drop Event")); | 622 | i18n("Drop Event")); |
623 | delete event; | 623 | delete event; |
624 | return; | 624 | return; |
625 | */ | 625 | */ |
626 | } | 626 | } |
627 | // kdDebug() << "Drop new Event" << endl; | 627 | // kdDebug() << "Drop new Event" << endl; |
628 | // Adjust date | 628 | // Adjust date |
629 | QDateTime start = event->dtStart(); | 629 | QDateTime start = event->dtStart(); |
630 | QDateTime end = event->dtEnd(); | 630 | QDateTime end = event->dtEnd(); |
631 | int duration = start.daysTo(end); | 631 | int duration = start.daysTo(end); |
632 | int idx = getDayIndexFrom(e->pos().x(), e->pos().y()); | 632 | int idx = getDayIndexFrom(e->pos().x(), e->pos().y()); |
633 | 633 | ||
634 | start.setDate(days[idx]); | 634 | start.setDate(days[idx]); |
635 | end.setDate(days[idx].addDays(duration)); | 635 | end.setDate(days[idx].addDays(duration)); |
636 | 636 | ||
637 | event->setDtStart(start); | 637 | event->setDtStart(start); |
638 | event->setDtEnd(end); | 638 | event->setDtEnd(end); |
639 | mCalendar->addEvent(event); | 639 | mCalendar->addEvent(event); |
640 | 640 | ||
641 | emit eventDropped(event); | 641 | emit eventDropped(event); |
642 | } else { | 642 | } else { |
643 | // kdDebug() << "KODayMatrix::dropEvent(): Event from drop not decodable" << endl; | 643 | // kdDebug() << "KODayMatrix::dropEvent(): Event from drop not decodable" << endl; |
644 | e->ignore(); | 644 | e->ignore(); |
645 | } | 645 | } |
646 | #endif | 646 | #endif |
647 | } | 647 | } |
648 | 648 | ||
649 | // ---------------------------------------------------------------------------- | 649 | // ---------------------------------------------------------------------------- |
650 | // P A I N T E V E N T H A N D L I N G | 650 | // P A I N T E V E N T H A N D L I N G |
651 | // ---------------------------------------------------------------------------- | 651 | // ---------------------------------------------------------------------------- |
652 | 652 | ||
653 | void KODayMatrix::paintEvent(QPaintEvent * pevent) | 653 | void KODayMatrix::paintEvent(QPaintEvent * pevent) |
654 | { | 654 | { |
655 | QRect sz = frameRect(); | 655 | QRect sz = frameRect(); |
656 | if ( sz.width() <= 0 || sz.height() <= 0 ) | 656 | if ( sz.width() <= 0 || sz.height() <= 0 ) |
657 | return; | 657 | return; |
658 | if ( mPendingUpdateBeforeRepaint ) { | 658 | if ( mPendingUpdateBeforeRepaint ) { |
659 | updateViewTimed(); | 659 | updateViewTimed(); |
660 | mPendingUpdateBeforeRepaint = false; | 660 | mPendingUpdateBeforeRepaint = false; |
661 | } | 661 | } |
662 | if ( myPix.width() != sz.width() || myPix.height()!=sz.height() ) { | 662 | if ( myPix.width() != sz.width() || myPix.height()!=sz.height() ) { |
663 | myPix.resize(sz.size() ); | 663 | myPix.resize(sz.size() ); |
664 | } | 664 | } |
665 | QPainter p(&myPix); | 665 | QPainter p(&myPix); |
666 | p.setFont(font()); | 666 | p.setFont(font()); |
667 | 667 | ||
668 | 668 | ||
669 | int dheight = daysize.height(); | 669 | int dheight = daysize.height(); |
670 | int dwidth = daysize.width(); | 670 | int dwidth = daysize.width(); |
671 | int row,col; | 671 | int row,col; |
672 | int selw, selh; | 672 | int selw, selh; |
673 | int xyOff = frameWidth(); | 673 | int xyOff = frameWidth(); |
674 | int colModulo = sz.width() % 7; | 674 | int colModulo = sz.width() % 7; |
675 | int rowModulo = sz.height() % 6; | 675 | int rowModulo = sz.height() % 6; |
676 | //qDebug("col %d row %d ",colModulo,rowModulo ); | 676 | //qDebug("col %d row %d ",colModulo,rowModulo ); |
677 | 677 | ||
678 | bool isRTL = KOGlobals::self()->reverseLayout(); | 678 | bool isRTL = KOGlobals::self()->reverseLayout(); |
679 | 679 | ||
680 | // draw background and topleft frame | 680 | // draw background and topleft frame |
681 | p.fillRect(pevent->rect(), mDefaultBackColor); | 681 | p.fillRect(pevent->rect(), mDefaultBackColor); |
682 | p.setPen(mDefaultTextColor); | 682 | p.setPen(mDefaultTextColor); |
683 | p.drawRect(0, 0, sz.width()+1, sz.height()+1); | 683 | p.drawRect(0, 0, sz.width()+1, sz.height()+1); |
684 | int mSelStartT = mSelStart; | 684 | int mSelStartT = mSelStart; |
685 | int mSelEndT = mSelEnd; | 685 | int mSelEndT = mSelEnd; |
686 | if ( mSelEndT >= NUMDAYS ) | 686 | if ( mSelEndT >= NUMDAYS ) |
687 | mSelEndT = NUMDAYS-1; | 687 | mSelEndT = NUMDAYS-1; |
688 | // draw selected days with highlighted background color | 688 | // draw selected days with highlighted background color |
689 | if (mSelStart != NOSELECTION) { | 689 | if (mSelStart != NOSELECTION) { |
690 | bool skip = false; | 690 | bool skip = false; |
691 | if ( ! mouseDown ) { | 691 | if ( ! mouseDown ) { |
692 | int mo = days[20].month(); | 692 | int mo = days[20].month(); |
693 | //qDebug("-- %d %d ", mSelStartT, mSelEndT); | 693 | //qDebug("-- %d %d ", mSelStartT, mSelEndT); |
694 | //qDebug("%d %d %d - d %d", mo, days[mSelStartT].month() , days[mSelEndT].month(), days[mSelEndT].day() ); | 694 | //qDebug("%d %d %d - d %d", mo, days[mSelStartT].month() , days[mSelEndT].month(), days[mSelEndT].day() ); |
695 | int startMo = days[mSelStartT].month(); | 695 | int startMo = days[mSelStartT].month(); |
696 | int endMo = days[mSelEndT].month(); | 696 | int endMo = days[mSelEndT].month(); |
697 | if ( startMo == 12 && mo == 1 && endMo == 1 ) | 697 | if ( startMo == 12 && mo == 1 && endMo <= 2 ) |
698 | startMo = 1; | 698 | startMo = 1; |
699 | if ( endMo == 1 && mo == 12 ) | 699 | if ( endMo == 1 && mo == 12 ) |
700 | endMo = 12; | 700 | endMo = 12; |
701 | if ( (startMo > mo || endMo < mo) ) { | 701 | if ( (startMo > mo || endMo < mo) ) { |
702 | skip = true; | 702 | skip = true; |
703 | } else { | 703 | } else { |
704 | if ( days[mSelStartT].month() != mo ) { | 704 | if ( days[mSelStartT].month() != mo ) { |
705 | int add = days[mSelStartT].daysInMonth ()-days[mSelStartT].day(); | 705 | int add = days[mSelStartT].daysInMonth ()-days[mSelStartT].day(); |
706 | mSelStartT += add +1; | 706 | mSelStartT += add +1; |
707 | } | 707 | } |
708 | if ( days[mSelEndT].month() != mo ) { | 708 | if ( days[mSelEndT].month() != mo ) { |
709 | int sub = days[mSelEndT].day(); | 709 | int sub = days[mSelEndT].day(); |
710 | mSelEndT -= sub ; | 710 | mSelEndT -= sub ; |
711 | } | 711 | } |
712 | } | 712 | } |
713 | } | 713 | } |
714 | if ( ! skip ) { | 714 | if ( ! skip ) { |
715 | row = mSelStartT/7; | 715 | row = mSelStartT/7; |
716 | col = mSelStartT -row*7; | 716 | col = mSelStartT -row*7; |
717 | QColor selcol = KOPrefs::instance()->mHighlightColor; | 717 | QColor selcol = KOPrefs::instance()->mHighlightColor; |
718 | int addCol = 0; | 718 | int addCol = 0; |
719 | int addRow = 0; | 719 | int addRow = 0; |
720 | int addRow2 = 0; | 720 | int addRow2 = 0; |
721 | int addCol2 = 0; | 721 | int addCol2 = 0; |
722 | if (row == mSelEndT/7) { | 722 | if (row == mSelEndT/7) { |
723 | if ( rowModulo ) { | 723 | if ( rowModulo ) { |
724 | if ( row >= 6 - rowModulo ) | 724 | if ( row >= 6 - rowModulo ) |
725 | addRow = row - 5 + rowModulo; | 725 | addRow = row - 5 + rowModulo; |
726 | } | 726 | } |
727 | if ( colModulo ) { | 727 | if ( colModulo ) { |
728 | int colt1 = mSelEndT%7; | 728 | int colt1 = mSelEndT%7; |
729 | //qDebug("colt1 %d ", colt1 ); | 729 | //qDebug("colt1 %d ", colt1 ); |
730 | if ( colt1 >= 7 - colModulo ) | 730 | if ( colt1 >= 7 - colModulo ) |
731 | addCol = colt1 - 7 + colModulo+1; | 731 | addCol = colt1 - 7 + colModulo+1; |
732 | int colt = mSelStartT%7; | 732 | int colt = mSelStartT%7; |
733 | if ( colt >= 7 - colModulo ) | 733 | if ( colt >= 7 - colModulo ) |
734 | addCol2 = colt - 7 + colModulo; | 734 | addCol2 = colt - 7 + colModulo; |
735 | addCol -= addCol2; | 735 | addCol -= addCol2; |
736 | //qDebug("COL %d %d %d %d ",col , colt1 ,addCol ,addCol2 ); | 736 | //qDebug("COL %d %d %d %d ",col , colt1 ,addCol ,addCol2 ); |
737 | } | 737 | } |
738 | // Single row selection | 738 | // Single row selection |
739 | if ( row == 0) | 739 | if ( row == 0) |
740 | addRow = 1; | 740 | addRow = 1; |
741 | p.fillRect(isRTL ? (7 - (mSelEndT-mSelStartT+1) - col)*dwidth : col*dwidth+1+addCol2, | 741 | p.fillRect(isRTL ? (7 - (mSelEndT-mSelStartT+1) - col)*dwidth : col*dwidth+1+addCol2, |
742 | row*dheight+addRow, (mSelEndT-mSelStartT+1)*dwidth+addCol, dheight+1, selcol); | 742 | row*dheight+addRow, (mSelEndT-mSelStartT+1)*dwidth+addCol, dheight+1, selcol); |
743 | } else { | 743 | } else { |
744 | // draw first row to the right | 744 | // draw first row to the right |
745 | if ( colModulo ) { | 745 | if ( colModulo ) { |
746 | if ( col >= 7 - colModulo ) | 746 | if ( col >= 7 - colModulo ) |
747 | addCol2 = col - 7 + colModulo; | 747 | addCol2 = col - 7 + colModulo; |
748 | } | 748 | } |
749 | if ( rowModulo ) { | 749 | if ( rowModulo ) { |
750 | if ( row >= 6 - rowModulo ) | 750 | if ( row >= 6 - rowModulo ) |
751 | addRow = row - 5 + rowModulo; | 751 | addRow = row - 5 + rowModulo; |
752 | } | 752 | } |
753 | if ( row == 0) | 753 | if ( row == 0) |
754 | addRow = 1; | 754 | addRow = 1; |
755 | p.fillRect(isRTL ? 0 : col*dwidth+1+addCol2, row*dheight+addRow, (7-col)*dwidth+colModulo, | 755 | p.fillRect(isRTL ? 0 : col*dwidth+1+addCol2, row*dheight+addRow, (7-col)*dwidth+colModulo, |
756 | dheight+1, selcol); | 756 | dheight+1, selcol); |
757 | // draw full block till last line | 757 | // draw full block till last line |
758 | selh = mSelEndT/7-row; | 758 | selh = mSelEndT/7-row; |
759 | addRow = 0; | 759 | addRow = 0; |
760 | if ( rowModulo ) { | 760 | if ( rowModulo ) { |
761 | if ( mSelEndT/7 >= 6 - rowModulo ) | 761 | if ( mSelEndT/7 >= 6 - rowModulo ) |
762 | addRow = mSelEndT/7 - 5 + rowModulo; | 762 | addRow = mSelEndT/7 - 5 + rowModulo; |
763 | } | 763 | } |
764 | if (selh > 1) { | 764 | if (selh > 1) { |
765 | p.fillRect(1, (row+1)*dheight, 7*dwidth+colModulo, (selh-1)*dheight+addRow,selcol); | 765 | p.fillRect(1, (row+1)*dheight, 7*dwidth+colModulo, (selh-1)*dheight+addRow,selcol); |
766 | } | 766 | } |
767 | // draw last block from left to mSelEndT | 767 | // draw last block from left to mSelEndT |
768 | selw = mSelEndT-7*(mSelEndT/7)+1; | 768 | selw = mSelEndT-7*(mSelEndT/7)+1; |
769 | //qDebug("esl %d ",selw ); | 769 | //qDebug("esl %d ",selw ); |
770 | int add = 0; | 770 | int add = 0; |
771 | if ( colModulo ) { | 771 | if ( colModulo ) { |
772 | add = 7 - colModulo; | 772 | add = 7 - colModulo; |
773 | if ( selw > add ) | 773 | if ( selw > add ) |
774 | add = selw - add; | 774 | add = selw - add; |
775 | else | 775 | else |
776 | add = 0; | 776 | add = 0; |
777 | } | 777 | } |
778 | //qDebug("add %d ", add); | 778 | //qDebug("add %d ", add); |
779 | p.fillRect(isRTL ? (7-selw)*dwidth : 1, (row+selh)*dheight+addRow, | 779 | p.fillRect(isRTL ? (7-selw)*dwidth : 1, (row+selh)*dheight+addRow, |
780 | selw*dwidth+add, dheight+1, selcol); | 780 | selw*dwidth+add, dheight+1, selcol); |
781 | } | 781 | } |
782 | } | 782 | } |
783 | } | 783 | } |
784 | 784 | ||
785 | // iterate over all days in the matrix and draw the day label in appropriate colors | 785 | // iterate over all days in the matrix and draw the day label in appropriate colors |
786 | QColor actcol = mDefaultTextColorShaded; | 786 | QColor actcol = mDefaultTextColorShaded; |
787 | p.setPen(actcol); | 787 | p.setPen(actcol); |
788 | QPen tmppen; | 788 | QPen tmppen; |
789 | for(int i = 0; i < NUMDAYS; i++) { | 789 | for(int i = 0; i < NUMDAYS; i++) { |
790 | row = i/7; | 790 | row = i/7; |
791 | col = isRTL ? 6-(i-row*7) : i-row*7; | 791 | col = isRTL ? 6-(i-row*7) : i-row*7; |
792 | 792 | ||
793 | // if it is the first day of a month switch color from normal to shaded and vice versa | 793 | // if it is the first day of a month switch color from normal to shaded and vice versa |
794 | if ( KOGlobals::self()->calendarSystem()->day( days[i] ) == 1) { | 794 | if ( KOGlobals::self()->calendarSystem()->day( days[i] ) == 1) { |
795 | if (actcol == mDefaultTextColorShaded) { | 795 | if (actcol == mDefaultTextColorShaded) { |
796 | actcol = mDefaultTextColor; | 796 | actcol = mDefaultTextColor; |
797 | } else { | 797 | } else { |
798 | actcol = mDefaultTextColorShaded; | 798 | actcol = mDefaultTextColorShaded; |
799 | } | 799 | } |
800 | p.setPen(actcol); | 800 | p.setPen(actcol); |
801 | } | 801 | } |
802 | if (actcol == mDefaultTextColorShaded) { | 802 | if (actcol == mDefaultTextColorShaded) { |
803 | if ( ! mouseDown ) { | 803 | if ( ! mouseDown ) { |
804 | continue; | 804 | continue; |
805 | } | 805 | } |
806 | } | 806 | } |
807 | //Reset pen color after selected days block | 807 | //Reset pen color after selected days block |
808 | if (i == mSelEndT+1) { | 808 | if (i == mSelEndT+1) { |
809 | p.setPen(actcol); | 809 | p.setPen(actcol); |
810 | } | 810 | } |
811 | 811 | ||
812 | // if today then draw rectangle around day | 812 | // if today then draw rectangle around day |
813 | if (today == i) { | 813 | if (today == i) { |
814 | tmppen = p.pen(); | 814 | tmppen = p.pen(); |
815 | QPen mTodayPen(p.pen()); | 815 | QPen mTodayPen(p.pen()); |
816 | if ( daysize.width() < 20 ) | 816 | if ( daysize.width() < 20 ) |
817 | mTodayPen.setWidth(1); | 817 | mTodayPen.setWidth(1); |
818 | else | 818 | else |
819 | mTodayPen.setWidth(mTodayMarginWidth); | 819 | mTodayPen.setWidth(mTodayMarginWidth); |
820 | //draw red rectangle for holidays | 820 | //draw red rectangle for holidays |
821 | if (!mHolidays[i].isNull()) { | 821 | if (!mHolidays[i].isNull()) { |
822 | if (actcol == mDefaultTextColor) { | 822 | if (actcol == mDefaultTextColor) { |
823 | mTodayPen.setColor(KOPrefs::instance()->mHolidayColor); | 823 | mTodayPen.setColor(KOPrefs::instance()->mHolidayColor); |
824 | } else { | 824 | } else { |
825 | mTodayPen.setColor(mHolidayColorShaded); | 825 | mTodayPen.setColor(mHolidayColorShaded); |
826 | } | 826 | } |
827 | } | 827 | } |
828 | //draw gray rectangle for today if in selection | 828 | //draw gray rectangle for today if in selection |
829 | if (i >= mSelStartT && i <= mSelEndT) { | 829 | if (i >= mSelStartT && i <= mSelEndT) { |
830 | QColor grey("grey"); | 830 | QColor grey("grey"); |
831 | mTodayPen.setColor(grey); | 831 | mTodayPen.setColor(grey); |
832 | } | 832 | } |
833 | p.setPen(mTodayPen); | 833 | p.setPen(mTodayPen); |
834 | 834 | ||
835 | 835 | ||
836 | int addCol = 0; | 836 | int addCol = 0; |
837 | int addRow = 0; | 837 | int addRow = 0; |
838 | if (rowModulo) { | 838 | if (rowModulo) { |
839 | if ( row >= 6 - rowModulo ) | 839 | if ( row >= 6 - rowModulo ) |
840 | addRow = row - 5 + rowModulo; | 840 | addRow = row - 5 + rowModulo; |
841 | } | 841 | } |
842 | if ( colModulo ) { | 842 | if ( colModulo ) { |
843 | if ( col >= 7 - colModulo ) | 843 | if ( col >= 7 - colModulo ) |
844 | addCol = col - 6 + colModulo-1; | 844 | addCol = col - 6 + colModulo-1; |
845 | } | 845 | } |
846 | if ( col == 0 ) | 846 | if ( col == 0 ) |
847 | addCol = 1; | 847 | addCol = 1; |
848 | p.drawRect(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight+1); | 848 | p.drawRect(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight+1); |
849 | p.setPen(tmppen); | 849 | p.setPen(tmppen); |
850 | } | 850 | } |
851 | 851 | ||
852 | // if any events are on that day then draw it using a bold font | 852 | // if any events are on that day then draw it using a bold font |
853 | if (events[i] > 0) { | 853 | if (events[i] > 0) { |
854 | QFont myFont = font(); | 854 | QFont myFont = font(); |
855 | myFont.setBold(true); | 855 | myFont.setBold(true); |
856 | p.setFont(myFont); | 856 | p.setFont(myFont); |
857 | } | 857 | } |
858 | 858 | ||
859 | // if it is a holiday then use the default holiday color | 859 | // if it is a holiday then use the default holiday color |
860 | if (!mHolidays[i].isNull()) { | 860 | if (!mHolidays[i].isNull()) { |
861 | if ( bDays.testBit(i) ) { | 861 | if ( bDays.testBit(i) ) { |
862 | p.setPen(Qt::green); | 862 | p.setPen(Qt::green); |
863 | } else { | 863 | } else { |
864 | if (actcol == mDefaultTextColor) { | 864 | if (actcol == mDefaultTextColor) { |
865 | p.setPen(KOPrefs::instance()->mHolidayColor); | 865 | p.setPen(KOPrefs::instance()->mHolidayColor); |
866 | } else { | 866 | } else { |
867 | p.setPen(mHolidayColorShaded); | 867 | p.setPen(mHolidayColorShaded); |
868 | } | 868 | } |
869 | } | 869 | } |
870 | } | 870 | } |
871 | 871 | ||
872 | // draw selected days with special color | 872 | // draw selected days with special color |
873 | // DO NOT specially highlight holidays in selection ! | 873 | // DO NOT specially highlight holidays in selection ! |
874 | if (i >= mSelStartT && i <= mSelEndT) { | 874 | if (i >= mSelStartT && i <= mSelEndT) { |
875 | ;//p.setPen(mSelectedDaysColor); | 875 | ;//p.setPen(mSelectedDaysColor); |
876 | } | 876 | } |
877 | 877 | ||
878 | int addCol = 0; | 878 | int addCol = 0; |
879 | int addRow = 0; | 879 | int addRow = 0; |
880 | if ( colModulo ) { | 880 | if ( colModulo ) { |
881 | if ( col >= 7 - colModulo ) | 881 | if ( col >= 7 - colModulo ) |
882 | addCol = col - 7 + colModulo; | 882 | addCol = col - 7 + colModulo; |
883 | } | 883 | } |
884 | if ( rowModulo ) { | 884 | if ( rowModulo ) { |
885 | if ( row >= 6 - rowModulo ) | 885 | if ( row >= 6 - rowModulo ) |
886 | addRow = row - 5 + rowModulo; | 886 | addRow = row - 5 + rowModulo; |
887 | } | 887 | } |
888 | //qDebug("add %d %d -- %d %d ", col, addCol, row, addRow); | 888 | //qDebug("add %d %d -- %d %d ", col, addCol, row, addRow); |
889 | ++addCol;//++addCol; | 889 | ++addCol;//++addCol; |
890 | if ( row == 0) | 890 | if ( row == 0) |
891 | addRow = 1; | 891 | addRow = 1; |
892 | p.drawText(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight, | 892 | p.drawText(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight, |
893 | Qt::AlignHCenter | Qt::AlignVCenter, daylbls[i]); | 893 | Qt::AlignHCenter | Qt::AlignVCenter, daylbls[i]); |
894 | 894 | ||
895 | // reset color to actual color | 895 | // reset color to actual color |
896 | if (!mHolidays[i].isNull()) { | 896 | if (!mHolidays[i].isNull()) { |
897 | p.setPen(actcol); | 897 | p.setPen(actcol); |
898 | } | 898 | } |
899 | // reset bold font to plain font | 899 | // reset bold font to plain font |
900 | if (events[i] > 0) { | 900 | if (events[i] > 0) { |
901 | QFont myFont = font(); | 901 | QFont myFont = font(); |
902 | myFont.setBold(false); | 902 | myFont.setBold(false); |
903 | p.setFont(myFont); | 903 | p.setFont(myFont); |
904 | } | 904 | } |
905 | } | 905 | } |
906 | int off = xyOff; | 906 | int off = xyOff; |
907 | bitBlt (this, off, off, &myPix, 0 ,0,width(), height() ,CopyROP); | 907 | bitBlt (this, off, off, &myPix, 0 ,0,width(), height() ,CopyROP); |
908 | //qDebug("ffffffffff %d ", off); | 908 | //qDebug("ffffffffff %d ", off); |
909 | } | 909 | } |
910 | 910 | ||
911 | // ---------------------------------------------------------------------------- | 911 | // ---------------------------------------------------------------------------- |
912 | // R E SI Z E E V E N T H A N D L I N G | 912 | // R E SI Z E E V E N T H A N D L I N G |
913 | // ---------------------------------------------------------------------------- | 913 | // ---------------------------------------------------------------------------- |
914 | 914 | ||
915 | void KODayMatrix::resizeEvent(QResizeEvent *) | 915 | void KODayMatrix::resizeEvent(QResizeEvent *) |
916 | { | 916 | { |
917 | QRect sz = frameRect(); | 917 | QRect sz = frameRect(); |
918 | daysize.setHeight(sz.height()*7 / NUMDAYS); | 918 | daysize.setHeight(sz.height()*7 / NUMDAYS); |
919 | daysize.setWidth(sz.width() / 7); | 919 | daysize.setWidth(sz.width() / 7); |
920 | } | 920 | } |
921 | 921 | ||
922 | QSize KODayMatrix::sizeHint() const | 922 | QSize KODayMatrix::sizeHint() const |
923 | { | 923 | { |
924 | 924 | ||
925 | QFontMetrics fm ( font() ); | 925 | QFontMetrics fm ( font() ); |
926 | int wid = fm.width( "30") *7+3; | 926 | int wid = fm.width( "30") *7+3; |
927 | int hei = fm.height() * 6+3; | 927 | int hei = fm.height() * 6+3; |
928 | //qDebug("KODayMatrix::sizeHint()********************* %d %d", wid , hei); | 928 | //qDebug("KODayMatrix::sizeHint()********************* %d %d", wid , hei); |
929 | return QSize ( wid, hei ); | 929 | return QSize ( wid, hei ); |
930 | 930 | ||
931 | } | 931 | } |