-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 20 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 2 |
5 files changed, 25 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 5be1d28..da33d12 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,391 +1,394 @@ | |||
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 1.9.17 ************ | 3 | ********** VERSION 1.9.17 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed that tooltips were not updated after moving an item in agenda view. | 6 | Fixed that tooltips were not updated after moving an item in agenda view. |
7 | Fixed a bug in sorting start date for recurring events in list view. | 7 | Fixed a bug in sorting start date for recurring events in list view. |
8 | Changed the left button in todo viewer from "Agenda" to "Set completed". | ||
9 | 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. | ||
10 | |||
8 | 11 | ||
9 | KA/Pi: | 12 | KA/Pi: |
10 | All fields search does now actually search all the (possible) fields, | 13 | All fields search does now actually search all the (possible) fields, |
11 | not only those listed in the contact list. | 14 | not only those listed in the contact list. |
12 | Made is possible to inline a picture in a vcard on the Z. | 15 | Made is possible to inline a picture in a vcard on the Z. |
13 | This was only possible on the desktop, now is it possible on the Z as well. | 16 | This was only possible on the desktop, now is it possible on the Z as well. |
14 | Fixed of missing save settings after filter configuration. | 17 | Fixed of missing save settings after filter configuration. |
15 | Made saving of addressbook much faster. | 18 | Made saving of addressbook much faster. |
16 | Fixed extension widget layout problem. | 19 | Fixed extension widget layout problem. |
17 | Fixed saving of default formatted name settings. | 20 | Fixed saving of default formatted name settings. |
18 | Fixed formatted name handling in edit dialog. | 21 | Fixed formatted name handling in edit dialog. |
19 | Added an option for changing formatted names of many contacts | 22 | Added an option for changing formatted names of many contacts |
20 | (menu: File - Change - Set formatted name). | 23 | (menu: File - Change - Set formatted name). |
21 | 24 | ||
22 | QWhatsThis was not working on the Z ( only black rectangle was shown). | 25 | QWhatsThis was not working on the Z ( only black rectangle was shown). |
23 | This is Fixed. | 26 | This is Fixed. |
24 | 27 | ||
25 | KDE-Sync: | 28 | KDE-Sync: |
26 | Now readonly KDE resources are synced as well. | 29 | Now readonly KDE resources are synced as well. |
27 | (They are not changed in KDE itself, of course). | 30 | (They are not changed in KDE itself, of course). |
28 | 31 | ||
29 | 32 | ||
30 | 33 | ||
31 | ********** VERSION 1.9.16 ************ | 34 | ********** VERSION 1.9.16 ************ |
32 | 35 | ||
33 | KO/Pi: | 36 | KO/Pi: |
34 | Fixed search dialog size on Z 6000 (480x640 display). | 37 | Fixed search dialog size on Z 6000 (480x640 display). |
35 | Added setting to hide/show time in agenda items. | 38 | Added setting to hide/show time in agenda items. |
36 | Added setting to hide not running todos in todo view. | 39 | Added setting to hide not running todos in todo view. |
37 | Added columns for start date/time in todo view. | 40 | Added columns for start date/time in todo view. |
38 | Replaced the solid half-hour lines in agenda view by dot lines. | 41 | Replaced the solid half-hour lines in agenda view by dot lines. |
39 | Added possibility of printing the What's Next View on the desktop | 42 | Added possibility of printing the What's Next View on the desktop |
40 | (i.e. Windows and Linux). | 43 | (i.e. Windows and Linux). |
41 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. | 44 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. |
42 | Added tooltips in month view.(Tooltips only available on desktop) | 45 | Added tooltips in month view.(Tooltips only available on desktop) |
43 | 46 | ||
44 | Fixed a strange problem in KO/Pi alarm applet. | 47 | Fixed a strange problem in KO/Pi alarm applet. |
45 | Did not find the actual problem, | 48 | Did not find the actual problem, |
46 | such that now Qtopia reboots again if deinstalling the alarm applet. | 49 | such that now Qtopia reboots again if deinstalling the alarm applet. |
47 | But the alarm applet should work again. | 50 | But the alarm applet should work again. |
48 | 51 | ||
49 | KA/Pi: | 52 | KA/Pi: |
50 | Fixed the problem, that internal pictures were not saved. | 53 | Fixed the problem, that internal pictures were not saved. |
51 | 54 | ||
52 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. | 55 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. |
53 | 56 | ||
54 | Fixed some minor problems. (Like word wrap in help text windows). | 57 | Fixed some minor problems. (Like word wrap in help text windows). |
55 | 58 | ||
56 | Fixed a compiling problem in microkde/kresources. | 59 | Fixed a compiling problem in microkde/kresources. |
57 | 60 | ||
58 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. | 61 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. |
59 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) | 62 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) |
60 | such that now syncing KO/Pi with Sharp DTM should work on the | 63 | such that now syncing KO/Pi with Sharp DTM should work on the |
61 | Zaurus C 3000 model. | 64 | Zaurus C 3000 model. |
62 | 65 | ||
63 | ********** VERSION 1.9.15 ************ | 66 | ********** VERSION 1.9.15 ************ |
64 | 67 | ||
65 | Usebilty enhancements in KO/Pi: | 68 | Usebilty enhancements in KO/Pi: |
66 | When clicking on the date in a month view cell, the day view is shown. | 69 | When clicking on the date in a month view cell, the day view is shown. |
67 | Old behaviour was, that the "new event" dialog popped up. | 70 | Old behaviour was, that the "new event" dialog popped up. |
68 | 71 | ||
69 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 72 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
70 | That means, you can restore the latest | 73 | That means, you can restore the latest |
71 | event/todo/journal you have deleted. | 74 | event/todo/journal you have deleted. |
72 | A journal is deleted, if you clear all the text of the journal. | 75 | A journal is deleted, if you clear all the text of the journal. |
73 | 76 | ||
74 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | 77 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. |
75 | 78 | ||
76 | KA/Pi starting in 480x640 resolution: | 79 | KA/Pi starting in 480x640 resolution: |
77 | Hide the filter action in toolbar | 80 | Hide the filter action in toolbar |
78 | and added icons for undo/delete/redo in toolbar. | 81 | and added icons for undo/delete/redo in toolbar. |
79 | 82 | ||
80 | Change in OM/Pi ViewMail dialog: | 83 | Change in OM/Pi ViewMail dialog: |
81 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. | 84 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. |
82 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | 85 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). |
83 | 86 | ||
84 | Fixed a crash when deleting mail-accounts in OM/Pi. | 87 | Fixed a crash when deleting mail-accounts in OM/Pi. |
85 | 88 | ||
86 | 89 | ||
87 | ********** VERSION 1.9.14 ************ | 90 | ********** VERSION 1.9.14 ************ |
88 | 91 | ||
89 | Fixed some problems with the dialog sizes when switching | 92 | Fixed some problems with the dialog sizes when switching |
90 | portrait/landscape mode on 640x480 PDA display. | 93 | portrait/landscape mode on 640x480 PDA display. |
91 | 94 | ||
92 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 95 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
93 | 96 | ||
94 | Fixed an ugly bug in KOpieMail: | 97 | Fixed an ugly bug in KOpieMail: |
95 | KOpieMail was not able to write files (mails) to MSDOS file system, | 98 | KOpieMail was not able to write files (mails) to MSDOS file system, |
96 | like on an usual preformatted SD card. That should work now. | 99 | like on an usual preformatted SD card. That should work now. |
97 | To save your mail data on the Sd card do the following: | 100 | To save your mail data on the Sd card do the following: |
98 | Create a dir on the SD card: | 101 | Create a dir on the SD card: |
99 | mkdir /mnt/card/localmail | 102 | mkdir /mnt/card/localmail |
100 | Go to your home dir: | 103 | Go to your home dir: |
101 | cd | 104 | cd |
102 | Go to kopiemail data storage dir: | 105 | Go to kopiemail data storage dir: |
103 | cd kdepim/apps/kopiemail | 106 | cd kdepim/apps/kopiemail |
104 | Create a symlink to the SD card: | 107 | Create a symlink to the SD card: |
105 | ls -s /mnt/card/localmail | 108 | ls -s /mnt/card/localmail |
106 | Now KOpieMail will store all mails on the SD card. | 109 | Now KOpieMail will store all mails on the SD card. |
107 | 110 | ||
108 | KO/Pi Monthview: | 111 | KO/Pi Monthview: |
109 | Now "Go to Today" selects the current month from day 1-end, | 112 | Now "Go to Today" selects the current month from day 1-end, |
110 | not the current date + some days. | 113 | not the current date + some days. |
111 | I.e. "Go to Today" shows now always | 114 | I.e. "Go to Today" shows now always |
112 | the current month with first day of month in the first row. | 115 | the current month with first day of month in the first row. |
113 | 116 | ||
114 | Added missing German translation. | 117 | Added missing German translation. |
115 | 118 | ||
116 | Fixed icons of executeable on Wintendo. | 119 | Fixed icons of executeable on Wintendo. |
117 | 120 | ||
118 | Added a "Show next Mail" button to the OM/Pi | 121 | Added a "Show next Mail" button to the OM/Pi |
119 | mail viewer such that the mail below the current mail | 122 | mail viewer such that the mail below the current mail |
120 | in the mail list view of the current folder | 123 | in the mail list view of the current folder |
121 | can be read with a single click. | 124 | can be read with a single click. |
122 | 125 | ||
123 | 126 | ||
124 | ********** VERSION 1.9.13 ************ | 127 | ********** VERSION 1.9.13 ************ |
125 | 128 | ||
126 | Fixed nasty PwM/Pi file reading bug, when | 129 | Fixed nasty PwM/Pi file reading bug, when |
127 | the used hash algo of file is different then the global | 130 | the used hash algo of file is different then the global |
128 | hash algo. | 131 | hash algo. |
129 | 132 | ||
130 | Added KA/Pi support for opie mailit mailapplication. | 133 | Added KA/Pi support for opie mailit mailapplication. |
131 | 134 | ||
132 | Fixed some bugs in OM/Pi. | 135 | Fixed some bugs in OM/Pi. |
133 | Now character conversion tables are available for the Zaurus | 136 | Now character conversion tables are available for the Zaurus |
134 | to make OM/Pi working properly. | 137 | to make OM/Pi working properly. |
135 | To get the character conversion in OM/Pi working, please download | 138 | To get the character conversion in OM/Pi working, please download |
136 | at the sourceforge project site the package | 139 | at the sourceforge project site the package |
137 | sr-character-conversion_SharpROM_arm.ipk.zip | 140 | sr-character-conversion_SharpROM_arm.ipk.zip |
138 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) | 141 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) |
139 | from the section "general files for KDE/Pim" | 142 | from the section "general files for KDE/Pim" |
140 | Instructions how to install this package are in a ReadMe in this file. | 143 | Instructions how to install this package are in a ReadMe in this file. |
141 | 144 | ||
142 | 145 | ||
143 | Fixed the orientation change problem in KA/Pi when switching | 146 | Fixed the orientation change problem in KA/Pi when switching |
144 | portrait/landscape mode. | 147 | portrait/landscape mode. |
145 | 148 | ||
146 | French translation available for KA/Pi and OM/Pi. | 149 | French translation available for KA/Pi and OM/Pi. |
147 | 150 | ||
148 | Fixed some problems with categories in KO/Pi in DTM sync. | 151 | Fixed some problems with categories in KO/Pi in DTM sync. |
149 | 152 | ||
150 | Added selection dialog for export to phone in KA/Pi. | 153 | Added selection dialog for export to phone in KA/Pi. |
151 | 154 | ||
152 | If in KO/Pi is an attendee selected to add to a meeting and this | 155 | If in KO/Pi is an attendee selected to add to a meeting and this |
153 | attendee is already in the list of attendees, this person is not added | 156 | attendee is already in the list of attendees, this person is not added |
154 | again. | 157 | again. |
155 | 158 | ||
156 | Some menu cleanup in KA/Pi. | 159 | Some menu cleanup in KA/Pi. |
157 | 160 | ||
158 | ********** VERSION 1.9.12 ************ | 161 | ********** VERSION 1.9.12 ************ |
159 | 162 | ||
160 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. | 163 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. |
161 | 164 | ||
162 | Bugfix: Licence file is now shown again. | 165 | Bugfix: Licence file is now shown again. |
163 | 166 | ||
164 | OM/Pi now supports Unicode (utf8 charset). | 167 | OM/Pi now supports Unicode (utf8 charset). |
165 | Fixed some bugs in OM/Pi. | 168 | Fixed some bugs in OM/Pi. |
166 | 169 | ||
167 | KA/Pi has more German translation. | 170 | KA/Pi has more German translation. |
168 | 171 | ||
169 | 172 | ||
170 | ********** VERSION 1.9.11 ************ | 173 | ********** VERSION 1.9.11 ************ |
171 | 174 | ||
172 | Fixed several problems in PWM/Pi, like | 175 | Fixed several problems in PWM/Pi, like |
173 | asking the user, if unsaved changed are pending | 176 | asking the user, if unsaved changed are pending |
174 | when closing the app. | 177 | when closing the app. |
175 | And PwM/Pi handles now different texts for the | 178 | And PwM/Pi handles now different texts for the |
176 | fields Description, Username, Password, configurable per category. | 179 | fields Description, Username, Password, configurable per category. |
177 | 180 | ||
178 | Fixed a crash in KO/Pi , when importing/loading vcs files | 181 | Fixed a crash in KO/Pi , when importing/loading vcs files |
179 | which have an entry with an attendee with state: | 182 | which have an entry with an attendee with state: |
180 | NEEDS ACTION | 183 | NEEDS ACTION |
181 | 184 | ||
182 | Fixed some problems in the German translation of OM/Pi, | 185 | Fixed some problems in the German translation of OM/Pi, |
183 | which makes some dialogs not fitting on the screen | 186 | which makes some dialogs not fitting on the screen |
184 | of the Z 5500. | 187 | of the Z 5500. |
185 | 188 | ||
186 | Fixed Qtopia crash, when disabling/deinstalling | 189 | Fixed Qtopia crash, when disabling/deinstalling |
187 | KO/Pi alarm applet. | 190 | KO/Pi alarm applet. |
188 | 191 | ||
189 | Implemented direct KDE<->KA/Pi sync for KA/Pi running | 192 | Implemented direct KDE<->KA/Pi sync for KA/Pi running |
190 | on Linux desktop. | 193 | on Linux desktop. |
191 | 194 | ||
192 | Added feature "remove sync info" to sync menu. | 195 | Added feature "remove sync info" to sync menu. |
193 | 196 | ||
194 | Tweaked the KO/Pi What's next view a bit, added | 197 | Tweaked the KO/Pi What's next view a bit, added |
195 | setting to hide events that are done. | 198 | setting to hide events that are done. |
196 | 199 | ||
197 | Disabled "beam receive enabled" on startup to | 200 | Disabled "beam receive enabled" on startup to |
198 | avoid problems if Fastload is enabled. | 201 | avoid problems if Fastload is enabled. |
199 | Please set "beam receive enabled", | 202 | Please set "beam receive enabled", |
200 | if you want to receive data via IR. | 203 | if you want to receive data via IR. |
201 | 204 | ||
202 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running | 205 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running |
203 | on Linux desktop. | 206 | on Linux desktop. |
204 | 207 | ||
205 | Made in KA/Pi scrolling possible, if details view is selected. | 208 | Made in KA/Pi scrolling possible, if details view is selected. |
206 | (The keyboard focus is set automatically to the search line) | 209 | (The keyboard focus is set automatically to the search line) |
207 | 210 | ||
208 | Fixed a bug in DMT sync, that a new entry in DTM was added | 211 | Fixed a bug in DMT sync, that a new entry in DTM was added |
209 | on every sync to Kx/Pi. | 212 | on every sync to Kx/Pi. |
210 | 213 | ||
211 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. | 214 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. |
212 | 215 | ||
213 | Fixed a bug in DMT sync with todos created in KO/Pi containing | 216 | Fixed a bug in DMT sync with todos created in KO/Pi containing |
214 | non-latin1 characters. | 217 | non-latin1 characters. |
215 | 218 | ||
216 | Rearranged package contents of Sharp-ipks and made all | 219 | Rearranged package contents of Sharp-ipks and made all |
217 | packages installable on SD again. | 220 | packages installable on SD again. |
218 | 221 | ||
219 | Fixed the writing of addressbook data in DTM sync. | 222 | Fixed the writing of addressbook data in DTM sync. |
220 | Empty fields in KA/Pi were not removed. | 223 | Empty fields in KA/Pi were not removed. |
221 | 224 | ||
222 | Added better category handling in KA/Pi: | 225 | Added better category handling in KA/Pi: |
223 | Added item | 226 | Added item |
224 | Edit Categories and | 227 | Edit Categories and |
225 | Manage new categories | 228 | Manage new categories |
226 | to the settings menu. | 229 | to the settings menu. |
227 | Possible to configure a view to display categories. | 230 | Possible to configure a view to display categories. |
228 | 231 | ||
229 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. | 232 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. |
230 | 233 | ||
231 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. | 234 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. |
232 | 235 | ||
233 | ... and many other bugfixes. | 236 | ... and many other bugfixes. |
234 | 237 | ||
235 | ********** VERSION 1.9.10 ************ | 238 | ********** VERSION 1.9.10 ************ |
236 | 239 | ||
237 | Many internal small bugfixes. | 240 | Many internal small bugfixes. |
238 | And fix of the "big" bug in KO/Pi, | 241 | And fix of the "big" bug in KO/Pi, |
239 | that after Syncing the appointments had an offset by several hours. | 242 | that after Syncing the appointments had an offset by several hours. |
240 | That was a problem with the internal timezone setting, | 243 | That was a problem with the internal timezone setting, |
241 | introduced by the changed timezone configuration settings. | 244 | introduced by the changed timezone configuration settings. |
242 | 245 | ||
243 | German translation for OM/Pi is now available. | 246 | German translation for OM/Pi is now available. |
244 | 247 | ||
245 | 248 | ||
246 | ********** VERSION 1.9.9 ************ | 249 | ********** VERSION 1.9.9 ************ |
247 | 250 | ||
248 | KDE-Pim/Pi has a new Member! | 251 | KDE-Pim/Pi has a new Member! |
249 | It is called PWM/Pi (Passwordmanager/platform-independent) | 252 | It is called PWM/Pi (Passwordmanager/platform-independent) |
250 | and it is available for the Zaurus. | 253 | and it is available for the Zaurus. |
251 | It is planned, that it will be available later for Windows. | 254 | It is planned, that it will be available later for Windows. |
252 | (And for Linux, of course). | 255 | (And for Linux, of course). |
253 | It is a port of the Passwordmanager of KDE. | 256 | It is a port of the Passwordmanager of KDE. |
254 | It will need the MicroKDElibs to run. | 257 | It will need the MicroKDElibs to run. |
255 | 258 | ||
256 | Made loading of addressbooks in KA/Pi up to 7 times faster! | 259 | Made loading of addressbooks in KA/Pi up to 7 times faster! |
257 | The bigger your addressbook file, the more starting speed | 260 | The bigger your addressbook file, the more starting speed |
258 | will you gain. (relatively) | 261 | will you gain. (relatively) |
259 | 262 | ||
260 | The Qtopia addressbook connector is now platform independend | 263 | The Qtopia addressbook connector is now platform independend |
261 | as well and should work on any platform for importing/exporting | 264 | as well and should work on any platform for importing/exporting |
262 | Qtopia and Opie XML files. | 265 | Qtopia and Opie XML files. |
263 | 266 | ||
264 | Added a +30min feature to the timezone settings to make | 267 | Added a +30min feature to the timezone settings to make |
265 | KDE-Pim/Pi useable in Australia and other parts on the | 268 | KDE-Pim/Pi useable in Australia and other parts on the |
266 | world with strange timezones ;-) | 269 | world with strange timezones ;-) |
267 | 270 | ||
268 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. | 271 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. |
269 | 272 | ||
270 | It is now possible to disable the | 273 | It is now possible to disable the |
271 | "receive data via infrared" feature, such that syncing with | 274 | "receive data via infrared" feature, such that syncing with |
272 | Outlook is now possible again with Kx/Pi runing. | 275 | Outlook is now possible again with Kx/Pi runing. |
273 | Please disable it, before syncing Sharp DTM with Outlook. | 276 | Please disable it, before syncing Sharp DTM with Outlook. |
274 | For your convenience, the "receive data via infrared" feature | 277 | For your convenience, the "receive data via infrared" feature |
275 | is disabled automatically, if you sync Kx/Pi with DTM. | 278 | is disabled automatically, if you sync Kx/Pi with DTM. |
276 | You have to enable it again manually after syncing. | 279 | You have to enable it again manually after syncing. |
277 | Enabling this feature makes it impossible to start the | 280 | Enabling this feature makes it impossible to start the |
278 | Sharp DTM apps. If this feature is enabled, you will only get the | 281 | Sharp DTM apps. If this feature is enabled, you will only get the |
279 | alarm notification from KO/Pi and not from the Sharp calendar. | 282 | alarm notification from KO/Pi and not from the Sharp calendar. |
280 | This is very useful if you sync KO/Pi with Sharp DTM, | 283 | This is very useful if you sync KO/Pi with Sharp DTM, |
281 | because after syncing you usually would get notified about | 284 | because after syncing you usually would get notified about |
282 | an alarm by KO/Pi and the Sharp Calendar. | 285 | an alarm by KO/Pi and the Sharp Calendar. |
283 | 286 | ||
284 | Together with the Linux desktop version of KO/Pi | 287 | Together with the Linux desktop version of KO/Pi |
285 | it is now possible to sync KO/Pi on the Zaurus | 288 | it is now possible to sync KO/Pi on the Zaurus |
286 | with the complete KDE-desktop (3.3 or later) | 289 | with the complete KDE-desktop (3.3 or later) |
287 | calendar data easily. | 290 | calendar data easily. |
288 | That makes it possible to sync the Z with one | 291 | That makes it possible to sync the Z with one |
289 | click of a mouse with the KDE-Desktop. | 292 | click of a mouse with the KDE-Desktop. |
290 | This feature it available for all Zaurus platforms KO/Pi | 293 | This feature it available for all Zaurus platforms KO/Pi |
291 | is running on. | 294 | is running on. |
292 | The only thing needed is a running KO/Pi on Linux and | 295 | The only thing needed is a running KO/Pi on Linux and |
293 | a compiled version of the small | 296 | a compiled version of the small |
294 | KDE-Pim/Pi<->KDE-Desktop access command line program, | 297 | KDE-Pim/Pi<->KDE-Desktop access command line program, |
295 | which is in the KDE-Pim/Pi sources available. | 298 | which is in the KDE-Pim/Pi sources available. |
296 | 299 | ||
297 | The "KDE-desktop" syncing feature for KA/Pi will follow | 300 | The "KDE-desktop" syncing feature for KA/Pi will follow |
298 | in the next releases. | 301 | in the next releases. |
299 | 302 | ||
300 | Fixed the vcard export bug, which had the version 1.9.8. | 303 | Fixed the vcard export bug, which had the version 1.9.8. |
301 | 304 | ||
302 | Added missing GERMAN translation to KO/Pi. | 305 | Added missing GERMAN translation to KO/Pi. |
303 | Hi PsionX, could you add the missing french translation?Thx! | 306 | Hi PsionX, could you add the missing french translation?Thx! |
304 | 307 | ||
305 | Translation files for KA/Pi are available as well. | 308 | Translation files for KA/Pi are available as well. |
306 | GERMAN translation will be available in the next release. | 309 | GERMAN translation will be available in the next release. |
307 | PsionX ( yres, you again ;-) ), could you start translating | 310 | PsionX ( yres, you again ;-) ), could you start translating |
308 | KA/Pi? Thx! | 311 | KA/Pi? Thx! |
309 | 312 | ||
310 | You can download the version 1.9.9 at | 313 | You can download the version 1.9.9 at |
311 | 314 | ||
312 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 | 315 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 |
313 | 316 | ||
314 | Note: | 317 | Note: |
315 | To run the mail program OM/Pi you need libopenssl. | 318 | To run the mail program OM/Pi you need libopenssl. |
316 | A link to a download loaction is available at | 319 | A link to a download loaction is available at |
317 | ZSI at www.killefiz.de | 320 | ZSI at www.killefiz.de |
318 | 321 | ||
319 | 322 | ||
320 | ********** VERSION 1.9.8 ************ | 323 | ********** VERSION 1.9.8 ************ |
321 | 324 | ||
322 | Fixed character decoding in OM/Pi. | 325 | Fixed character decoding in OM/Pi. |
323 | (e.g. German "Umlaute" were not displayed properly.) | 326 | (e.g. German "Umlaute" were not displayed properly.) |
324 | 327 | ||
325 | Made is possible to reparent todos in KO/Pi. | 328 | Made is possible to reparent todos in KO/Pi. |
326 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | 329 | Use contextmenu or keys (look at Help-Keys + Colors) for that. |
327 | 330 | ||
328 | Added the missing Sync-Howto and WhatsNew to the packages. | 331 | Added the missing Sync-Howto and WhatsNew to the packages. |
329 | 332 | ||
330 | KO/Pi on Linux desktop can now sync with KDE desktop. | 333 | KO/Pi on Linux desktop can now sync with KDE desktop. |
331 | That means: When using KO/Pi on Linux desktop for syncing with | 334 | That means: When using KO/Pi on Linux desktop for syncing with |
332 | KDE desktop and the Zaurus, the Zaurus can be synced now | 335 | KDE desktop and the Zaurus, the Zaurus can be synced now |
333 | with all KDE-Calendar resources, not only with one local file. | 336 | with all KDE-Calendar resources, not only with one local file. |
334 | (That makes it possible to sync the Zaurus with the | 337 | (That makes it possible to sync the Zaurus with the |
335 | calendar data on a Kolab server) | 338 | calendar data on a Kolab server) |
336 | 339 | ||
337 | KA/Pi syncing with KDE desktop will be available in the next version. | 340 | KA/Pi syncing with KDE desktop will be available in the next version. |
338 | 341 | ||
339 | 342 | ||
340 | ********** VERSION 1.9.7 ************ | 343 | ********** VERSION 1.9.7 ************ |
341 | 344 | ||
342 | KO/Pi - KA/Pi on Windows: | 345 | KO/Pi - KA/Pi on Windows: |
343 | Now a directory can be defined by the user, where the | 346 | Now a directory can be defined by the user, where the |
344 | application/config data should be saved. | 347 | application/config data should be saved. |
345 | Define your desired path in the evironment variable | 348 | Define your desired path in the evironment variable |
346 | MICROKDEHOME | 349 | MICROKDEHOME |
347 | before starting KO/Pi or KA/Pi. | 350 | before starting KO/Pi or KA/Pi. |
348 | 351 | ||
349 | An easy Kx/Pi to Kx/Pi syncing is now possible | 352 | An easy Kx/Pi to Kx/Pi syncing is now possible |
350 | (it is called Pi-Sync) via network. | 353 | (it is called Pi-Sync) via network. |
351 | Please look at the Sync Howto. | 354 | Please look at the Sync Howto. |
352 | 355 | ||
353 | Exporting of calendar data and contacts to mobile phones is now possible. | 356 | Exporting of calendar data and contacts to mobile phones is now possible. |
354 | The SyncHowto is updated with information howto | 357 | The SyncHowto is updated with information howto |
355 | access/sync mobile phones. | 358 | access/sync mobile phones. |
356 | Please look at the Sync Howto. | 359 | Please look at the Sync Howto. |
357 | 360 | ||
358 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. | 361 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. |
359 | Please disable Fastload for the original contact/calendar applications | 362 | Please disable Fastload for the original contact/calendar applications |
360 | and close them. | 363 | and close them. |
361 | KO/Pi and KA/Pi must be running in order to receive the data. | 364 | KO/Pi and KA/Pi must be running in order to receive the data. |
362 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) | 365 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) |
363 | 366 | ||
364 | In the KA/Pi details view are now the preferred tel. numbers displayed on top | 367 | In the KA/Pi details view are now the preferred tel. numbers displayed on top |
365 | of the other data ( emails/tel.numbers/addresses) | 368 | of the other data ( emails/tel.numbers/addresses) |
366 | 369 | ||
367 | Fixed some syncing problems in KA/Pi. | 370 | Fixed some syncing problems in KA/Pi. |
368 | 371 | ||
369 | Added font settings for the KA/Pi details view. | 372 | Added font settings for the KA/Pi details view. |
370 | Added fields "children's name" and "gender" to KA/Pi. | 373 | Added fields "children's name" and "gender" to KA/Pi. |
371 | 374 | ||
372 | Made searching in KA/Pi better: | 375 | Made searching in KA/Pi better: |
373 | Now the first item in a view is selected after a search automatically and | 376 | Now the first item in a view is selected after a search automatically and |
374 | the views can be scrolled up/down when the search input field has the keyboard focus. | 377 | the views can be scrolled up/down when the search input field has the keyboard focus. |
375 | 378 | ||
376 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. | 379 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. |
377 | 380 | ||
378 | 381 | ||
379 | ********** VERSION 1.9.6 ************ | 382 | ********** VERSION 1.9.6 ************ |
380 | 383 | ||
381 | Changes in the external application communication on the Zaurus | 384 | Changes in the external application communication on the Zaurus |
382 | in order to use less RAM when the apps are running. | 385 | in order to use less RAM when the apps are running. |
383 | First syncing of addressbooks (KA/Pi) is possible. | 386 | First syncing of addressbooks (KA/Pi) is possible. |
384 | 387 | ||
385 | 388 | ||
386 | ********** VERSION 1.9.5a ************ | 389 | ********** VERSION 1.9.5a ************ |
387 | 390 | ||
388 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. | 391 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. |
389 | Fixed some small bugs. | 392 | Fixed some small bugs. |
390 | KA/Pi shows now the birthday in summary view. | 393 | KA/Pi shows now the birthday in summary view. |
391 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi | 394 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 363dc32..378c7d4 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2345,768 +2345,770 @@ void CalendarView::beamIncidence(Incidence * Inc) | |||
2345 | QPtrList<Incidence> delSel ; | 2345 | QPtrList<Incidence> delSel ; |
2346 | delSel.append(Inc); | 2346 | delSel.append(Inc); |
2347 | beamIncidenceList( delSel ); | 2347 | beamIncidenceList( delSel ); |
2348 | } | 2348 | } |
2349 | void CalendarView::beamCalendar() | 2349 | void CalendarView::beamCalendar() |
2350 | { | 2350 | { |
2351 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); | 2351 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); |
2352 | //qDebug("beamCalendar() "); | 2352 | //qDebug("beamCalendar() "); |
2353 | beamIncidenceList( delSel ); | 2353 | beamIncidenceList( delSel ); |
2354 | } | 2354 | } |
2355 | void CalendarView::beamFilteredCalendar() | 2355 | void CalendarView::beamFilteredCalendar() |
2356 | { | 2356 | { |
2357 | QPtrList<Incidence> delSel = mCalendar->incidences(); | 2357 | QPtrList<Incidence> delSel = mCalendar->incidences(); |
2358 | //qDebug("beamFilteredCalendar() "); | 2358 | //qDebug("beamFilteredCalendar() "); |
2359 | beamIncidenceList( delSel ); | 2359 | beamIncidenceList( delSel ); |
2360 | } | 2360 | } |
2361 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) | 2361 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) |
2362 | { | 2362 | { |
2363 | if ( beamDialog->exec () == QDialog::Rejected ) | 2363 | if ( beamDialog->exec () == QDialog::Rejected ) |
2364 | return; | 2364 | return; |
2365 | #ifdef DESKTOP_VERSION | 2365 | #ifdef DESKTOP_VERSION |
2366 | QString fn = locateLocal( "tmp", "kopibeamfile" ); | 2366 | QString fn = locateLocal( "tmp", "kopibeamfile" ); |
2367 | #else | 2367 | #else |
2368 | QString fn = "/tmp/kopibeamfile"; | 2368 | QString fn = "/tmp/kopibeamfile"; |
2369 | #endif | 2369 | #endif |
2370 | QString mes; | 2370 | QString mes; |
2371 | bool createbup = true; | 2371 | bool createbup = true; |
2372 | if ( createbup ) { | 2372 | if ( createbup ) { |
2373 | QString description = "\n"; | 2373 | QString description = "\n"; |
2374 | CalendarLocal* cal = new CalendarLocal(); | 2374 | CalendarLocal* cal = new CalendarLocal(); |
2375 | if ( beamDialog->beamLocal() ) | 2375 | if ( beamDialog->beamLocal() ) |
2376 | cal->setLocalTime(); | 2376 | cal->setLocalTime(); |
2377 | else | 2377 | else |
2378 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 2378 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2379 | Incidence *incidence = delSel.first(); | 2379 | Incidence *incidence = delSel.first(); |
2380 | bool addText = false; | 2380 | bool addText = false; |
2381 | if ( delSel.count() < 10 ) | 2381 | if ( delSel.count() < 10 ) |
2382 | addText = true; | 2382 | addText = true; |
2383 | else { | 2383 | else { |
2384 | description.sprintf(i18n(" %d items?"),delSel.count() ); | 2384 | description.sprintf(i18n(" %d items?"),delSel.count() ); |
2385 | } | 2385 | } |
2386 | while ( incidence ) { | 2386 | while ( incidence ) { |
2387 | Incidence *in = incidence->clone(); | 2387 | Incidence *in = incidence->clone(); |
2388 | if ( ! in->summary().isEmpty() ) { | 2388 | if ( ! in->summary().isEmpty() ) { |
2389 | in->setDescription(""); | 2389 | in->setDescription(""); |
2390 | } else { | 2390 | } else { |
2391 | in->setSummary( in->description().left(20)); | 2391 | in->setSummary( in->description().left(20)); |
2392 | in->setDescription(""); | 2392 | in->setDescription(""); |
2393 | } | 2393 | } |
2394 | if ( addText ) | 2394 | if ( addText ) |
2395 | description += in->summary() + "\n"; | 2395 | description += in->summary() + "\n"; |
2396 | cal->addIncidence( in ); | 2396 | cal->addIncidence( in ); |
2397 | incidence = delSel.next(); | 2397 | incidence = delSel.next(); |
2398 | } | 2398 | } |
2399 | if ( beamDialog->beamVcal() ) { | 2399 | if ( beamDialog->beamVcal() ) { |
2400 | fn += ".vcs"; | 2400 | fn += ".vcs"; |
2401 | FileStorage storage( cal, fn, new VCalFormat ); | 2401 | FileStorage storage( cal, fn, new VCalFormat ); |
2402 | storage.save(); | 2402 | storage.save(); |
2403 | } else { | 2403 | } else { |
2404 | fn += ".ics"; | 2404 | fn += ".ics"; |
2405 | FileStorage storage( cal, fn, new ICalFormat( ) ); | 2405 | FileStorage storage( cal, fn, new ICalFormat( ) ); |
2406 | storage.save(); | 2406 | storage.save(); |
2407 | } | 2407 | } |
2408 | delete cal; | 2408 | delete cal; |
2409 | mes = i18n("KO/Pi: Ready for beaming"); | 2409 | mes = i18n("KO/Pi: Ready for beaming"); |
2410 | topLevelWidget()->setCaption(mes); | 2410 | topLevelWidget()->setCaption(mes); |
2411 | KApplication::convert2latin1( fn ); | 2411 | KApplication::convert2latin1( fn ); |
2412 | #ifndef DESKTOP_VERSION | 2412 | #ifndef DESKTOP_VERSION |
2413 | Ir *ir = new Ir( this ); | 2413 | Ir *ir = new Ir( this ); |
2414 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 2414 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
2415 | ir->send( fn, description, "text/x-vCalendar" ); | 2415 | ir->send( fn, description, "text/x-vCalendar" ); |
2416 | #endif | 2416 | #endif |
2417 | } | 2417 | } |
2418 | } | 2418 | } |
2419 | void CalendarView::beamDone( Ir *ir ) | 2419 | void CalendarView::beamDone( Ir *ir ) |
2420 | { | 2420 | { |
2421 | #ifndef DESKTOP_VERSION | 2421 | #ifndef DESKTOP_VERSION |
2422 | delete ir; | 2422 | delete ir; |
2423 | #endif | 2423 | #endif |
2424 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); | 2424 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); |
2425 | topLevelWidget()->raise(); | 2425 | topLevelWidget()->raise(); |
2426 | } | 2426 | } |
2427 | 2427 | ||
2428 | void CalendarView::moveIncidence(Incidence * inc ) | 2428 | void CalendarView::moveIncidence(Incidence * inc ) |
2429 | { | 2429 | { |
2430 | if ( !inc ) return; | 2430 | if ( !inc ) return; |
2431 | // qDebug("showDatePickerForIncidence( ) "); | 2431 | // qDebug("showDatePickerForIncidence( ) "); |
2432 | if ( mDateFrame->isVisible() ) | 2432 | if ( mDateFrame->isVisible() ) |
2433 | mDateFrame->hide(); | 2433 | mDateFrame->hide(); |
2434 | else { | 2434 | else { |
2435 | int w =mDatePicker->sizeHint().width()+2*mDateFrame->lineWidth() ; | 2435 | int w =mDatePicker->sizeHint().width()+2*mDateFrame->lineWidth() ; |
2436 | int h = mDatePicker->sizeHint().height()+2*mDateFrame->lineWidth() ; | 2436 | int h = mDatePicker->sizeHint().height()+2*mDateFrame->lineWidth() ; |
2437 | int dw = QApplication::desktop()->width(); | 2437 | int dw = QApplication::desktop()->width(); |
2438 | int dh = QApplication::desktop()->height(); | 2438 | int dh = QApplication::desktop()->height(); |
2439 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2439 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2440 | mDateFrame->show(); | 2440 | mDateFrame->show(); |
2441 | } | 2441 | } |
2442 | mDatePickerMode = 2; | 2442 | mDatePickerMode = 2; |
2443 | mMoveIncidence = inc ; | 2443 | mMoveIncidence = inc ; |
2444 | QDate da; | 2444 | QDate da; |
2445 | if ( mMoveIncidence->type() == "Todo" ) { | 2445 | if ( mMoveIncidence->type() == "Todo" ) { |
2446 | Todo * to = (Todo *) mMoveIncidence; | 2446 | Todo * to = (Todo *) mMoveIncidence; |
2447 | if ( to->hasDueDate() ) | 2447 | if ( to->hasDueDate() ) |
2448 | da = to->dtDue().date(); | 2448 | da = to->dtDue().date(); |
2449 | else | 2449 | else |
2450 | da = QDate::currentDate(); | 2450 | da = QDate::currentDate(); |
2451 | } else { | 2451 | } else { |
2452 | da = mMoveIncidence->dtStart().date(); | 2452 | da = mMoveIncidence->dtStart().date(); |
2453 | } | 2453 | } |
2454 | //PENDING set date for recurring incidence to date of recurrence | 2454 | //PENDING set date for recurring incidence to date of recurrence |
2455 | //mMoveIncidenceOldDate; | 2455 | //mMoveIncidenceOldDate; |
2456 | mDatePicker->setDate( da ); | 2456 | mDatePicker->setDate( da ); |
2457 | } | 2457 | } |
2458 | void CalendarView::showDatePicker( ) | 2458 | void CalendarView::showDatePicker( ) |
2459 | { | 2459 | { |
2460 | //qDebug("CalendarView::showDatePicker( ) "); | 2460 | //qDebug("CalendarView::showDatePicker( ) "); |
2461 | if ( mDateFrame->isVisible() ) | 2461 | if ( mDateFrame->isVisible() ) |
2462 | mDateFrame->hide(); | 2462 | mDateFrame->hide(); |
2463 | else { | 2463 | else { |
2464 | int w =mDatePicker->sizeHint().width() ; | 2464 | int w =mDatePicker->sizeHint().width() ; |
2465 | int h = mDatePicker->sizeHint().height() ; | 2465 | int h = mDatePicker->sizeHint().height() ; |
2466 | int dw = QApplication::desktop()->width(); | 2466 | int dw = QApplication::desktop()->width(); |
2467 | int dh = QApplication::desktop()->height(); | 2467 | int dh = QApplication::desktop()->height(); |
2468 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2468 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2469 | mDateFrame->show(); | 2469 | mDateFrame->show(); |
2470 | } | 2470 | } |
2471 | mDatePickerMode = 1; | 2471 | mDatePickerMode = 1; |
2472 | mDatePicker->setDate( mNavigator->selectedDates().first() ); | 2472 | mDatePicker->setDate( mNavigator->selectedDates().first() ); |
2473 | } | 2473 | } |
2474 | 2474 | ||
2475 | void CalendarView::showEventEditor() | 2475 | void CalendarView::showEventEditor() |
2476 | { | 2476 | { |
2477 | #ifdef DESKTOP_VERSION | 2477 | #ifdef DESKTOP_VERSION |
2478 | mEventEditor->show(); | 2478 | mEventEditor->show(); |
2479 | #else | 2479 | #else |
2480 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { | 2480 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { |
2481 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 2481 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
2482 | qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); | 2482 | qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); |
2483 | delete mEventEditor; | 2483 | delete mEventEditor; |
2484 | mEventEditor = mDialogManager->getEventEditor(); | 2484 | mEventEditor = mDialogManager->getEventEditor(); |
2485 | } | 2485 | } |
2486 | mEventEditor->showMaximized(); | 2486 | mEventEditor->showMaximized(); |
2487 | #endif | 2487 | #endif |
2488 | } | 2488 | } |
2489 | void CalendarView::showTodoEditor() | 2489 | void CalendarView::showTodoEditor() |
2490 | { | 2490 | { |
2491 | #ifdef DESKTOP_VERSION | 2491 | #ifdef DESKTOP_VERSION |
2492 | mTodoEditor->show(); | 2492 | mTodoEditor->show(); |
2493 | #else | 2493 | #else |
2494 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { | 2494 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { |
2495 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 2495 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
2496 | qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); | 2496 | qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); |
2497 | delete mTodoEditor; | 2497 | delete mTodoEditor; |
2498 | mTodoEditor = mDialogManager->getTodoEditor(); | 2498 | mTodoEditor = mDialogManager->getTodoEditor(); |
2499 | } | 2499 | } |
2500 | mTodoEditor->showMaximized(); | 2500 | mTodoEditor->showMaximized(); |
2501 | #endif | 2501 | #endif |
2502 | } | 2502 | } |
2503 | 2503 | ||
2504 | void CalendarView::cloneIncidence() | 2504 | void CalendarView::cloneIncidence() |
2505 | { | 2505 | { |
2506 | Incidence *incidence = currentSelection(); | 2506 | Incidence *incidence = currentSelection(); |
2507 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2507 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2508 | if ( incidence ) { | 2508 | if ( incidence ) { |
2509 | cloneIncidence(incidence); | 2509 | cloneIncidence(incidence); |
2510 | } | 2510 | } |
2511 | } | 2511 | } |
2512 | void CalendarView::moveIncidence() | 2512 | void CalendarView::moveIncidence() |
2513 | { | 2513 | { |
2514 | Incidence *incidence = currentSelection(); | 2514 | Incidence *incidence = currentSelection(); |
2515 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2515 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2516 | if ( incidence ) { | 2516 | if ( incidence ) { |
2517 | moveIncidence(incidence); | 2517 | moveIncidence(incidence); |
2518 | } | 2518 | } |
2519 | } | 2519 | } |
2520 | void CalendarView::beamIncidence() | 2520 | void CalendarView::beamIncidence() |
2521 | { | 2521 | { |
2522 | Incidence *incidence = currentSelection(); | 2522 | Incidence *incidence = currentSelection(); |
2523 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2523 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2524 | if ( incidence ) { | 2524 | if ( incidence ) { |
2525 | beamIncidence(incidence); | 2525 | beamIncidence(incidence); |
2526 | } | 2526 | } |
2527 | } | 2527 | } |
2528 | void CalendarView::toggleCancelIncidence() | 2528 | void CalendarView::toggleCancelIncidence() |
2529 | { | 2529 | { |
2530 | Incidence *incidence = currentSelection(); | 2530 | Incidence *incidence = currentSelection(); |
2531 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2531 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2532 | if ( incidence ) { | 2532 | if ( incidence ) { |
2533 | cancelIncidence(incidence); | 2533 | cancelIncidence(incidence); |
2534 | } | 2534 | } |
2535 | } | 2535 | } |
2536 | 2536 | ||
2537 | 2537 | ||
2538 | void CalendarView::cancelIncidence(Incidence * inc ) | 2538 | void CalendarView::cancelIncidence(Incidence * inc ) |
2539 | { | 2539 | { |
2540 | inc->setCancelled( ! inc->cancelled() ); | 2540 | inc->setCancelled( ! inc->cancelled() ); |
2541 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); | 2541 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); |
2542 | updateView(); | 2542 | updateView(); |
2543 | } | 2543 | } |
2544 | void CalendarView::cloneIncidence(Incidence * orgInc ) | 2544 | void CalendarView::cloneIncidence(Incidence * orgInc ) |
2545 | { | 2545 | { |
2546 | Incidence * newInc = orgInc->clone(); | 2546 | Incidence * newInc = orgInc->clone(); |
2547 | newInc->recreate(); | 2547 | newInc->recreate(); |
2548 | 2548 | ||
2549 | if ( newInc->type() == "Todo" ) { | 2549 | if ( newInc->type() == "Todo" ) { |
2550 | Todo* t = (Todo*) newInc; | 2550 | Todo* t = (Todo*) newInc; |
2551 | showTodoEditor(); | 2551 | showTodoEditor(); |
2552 | mTodoEditor->editTodo( t ); | 2552 | mTodoEditor->editTodo( t ); |
2553 | if ( mTodoEditor->exec() ) { | 2553 | if ( mTodoEditor->exec() ) { |
2554 | mCalendar->addTodo( t ); | 2554 | mCalendar->addTodo( t ); |
2555 | updateView(); | 2555 | updateView(); |
2556 | } else { | 2556 | } else { |
2557 | delete t; | 2557 | delete t; |
2558 | } | 2558 | } |
2559 | } | 2559 | } |
2560 | else { | 2560 | else { |
2561 | Event* e = (Event*) newInc; | 2561 | Event* e = (Event*) newInc; |
2562 | showEventEditor(); | 2562 | showEventEditor(); |
2563 | mEventEditor->editEvent( e ); | 2563 | mEventEditor->editEvent( e ); |
2564 | if ( mEventEditor->exec() ) { | 2564 | if ( mEventEditor->exec() ) { |
2565 | mCalendar->addEvent( e ); | 2565 | mCalendar->addEvent( e ); |
2566 | updateView(); | 2566 | updateView(); |
2567 | } else { | 2567 | } else { |
2568 | delete e; | 2568 | delete e; |
2569 | } | 2569 | } |
2570 | } | 2570 | } |
2571 | } | 2571 | } |
2572 | 2572 | ||
2573 | void CalendarView::newEvent() | 2573 | void CalendarView::newEvent() |
2574 | { | 2574 | { |
2575 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. | 2575 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. |
2576 | KOAgendaView *aView = mViewManager->agendaView(); | 2576 | KOAgendaView *aView = mViewManager->agendaView(); |
2577 | if (aView) { | 2577 | if (aView) { |
2578 | if (aView->selectionStart().isValid()) { | 2578 | if (aView->selectionStart().isValid()) { |
2579 | if (aView->selectedIsAllDay()) { | 2579 | if (aView->selectedIsAllDay()) { |
2580 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); | 2580 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); |
2581 | } else { | 2581 | } else { |
2582 | newEvent(aView->selectionStart(),aView->selectionEnd()); | 2582 | newEvent(aView->selectionStart(),aView->selectionEnd()); |
2583 | } | 2583 | } |
2584 | return; | 2584 | return; |
2585 | } | 2585 | } |
2586 | } | 2586 | } |
2587 | 2587 | ||
2588 | QDate date = mNavigator->selectedDates().first(); | 2588 | QDate date = mNavigator->selectedDates().first(); |
2589 | QDateTime current = QDateTime::currentDateTime(); | 2589 | QDateTime current = QDateTime::currentDateTime(); |
2590 | if ( date <= current.date() ) { | 2590 | if ( date <= current.date() ) { |
2591 | int hour = current.time().hour() +1; | 2591 | int hour = current.time().hour() +1; |
2592 | newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), | 2592 | newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), |
2593 | QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); | 2593 | QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); |
2594 | } else | 2594 | } else |
2595 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), | 2595 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), |
2596 | QDateTime( date, QTime( KOPrefs::instance()->mStartTime + | 2596 | QDateTime( date, QTime( KOPrefs::instance()->mStartTime + |
2597 | KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); | 2597 | KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); |
2598 | } | 2598 | } |
2599 | 2599 | ||
2600 | void CalendarView::newEvent(QDateTime fh) | 2600 | void CalendarView::newEvent(QDateTime fh) |
2601 | { | 2601 | { |
2602 | newEvent(fh, | 2602 | newEvent(fh, |
2603 | QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); | 2603 | QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); |
2604 | } | 2604 | } |
2605 | 2605 | ||
2606 | void CalendarView::newEvent(QDate dt) | 2606 | void CalendarView::newEvent(QDate dt) |
2607 | { | 2607 | { |
2608 | newEvent(QDateTime(dt, QTime(0,0,0)), | 2608 | newEvent(QDateTime(dt, QTime(0,0,0)), |
2609 | QDateTime(dt, QTime(0,0,0)), true); | 2609 | QDateTime(dt, QTime(0,0,0)), true); |
2610 | } | 2610 | } |
2611 | 2611 | ||
2612 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) | 2612 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) |
2613 | { | 2613 | { |
2614 | 2614 | ||
2615 | showEventEditor(); | 2615 | showEventEditor(); |
2616 | mEventEditor->newEvent(fromHint,toHint,allDay); | 2616 | mEventEditor->newEvent(fromHint,toHint,allDay); |
2617 | if ( mFilterView->filtersEnabled() ) { | 2617 | if ( mFilterView->filtersEnabled() ) { |
2618 | CalFilter *filter = mFilterView->selectedFilter(); | 2618 | CalFilter *filter = mFilterView->selectedFilter(); |
2619 | if (filter && filter->showCategories()) { | 2619 | if (filter && filter->showCategories()) { |
2620 | mEventEditor->setCategories(filter->categoryList().join(",") ); | 2620 | mEventEditor->setCategories(filter->categoryList().join(",") ); |
2621 | } | 2621 | } |
2622 | if ( filter ) | 2622 | if ( filter ) |
2623 | mEventEditor->setSecrecy( filter->getSecrecy() ); | 2623 | mEventEditor->setSecrecy( filter->getSecrecy() ); |
2624 | } | 2624 | } |
2625 | } | 2625 | } |
2626 | void CalendarView::todoAdded(Todo * t) | 2626 | void CalendarView::todoAdded(Todo * t) |
2627 | { | 2627 | { |
2628 | 2628 | ||
2629 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); | 2629 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); |
2630 | updateTodoViews(); | 2630 | updateTodoViews(); |
2631 | } | 2631 | } |
2632 | void CalendarView::todoChanged(Todo * t) | 2632 | void CalendarView::todoChanged(Todo * t) |
2633 | { | 2633 | { |
2634 | emit todoModified( t, 4 ); | 2634 | emit todoModified( t, 4 ); |
2635 | // updateTodoViews(); | 2635 | // updateTodoViews(); |
2636 | } | 2636 | } |
2637 | void CalendarView::todoToBeDeleted(Todo *) | 2637 | void CalendarView::todoToBeDeleted(Todo *) |
2638 | { | 2638 | { |
2639 | //qDebug("todoToBeDeleted(Todo *) "); | 2639 | //qDebug("todoToBeDeleted(Todo *) "); |
2640 | updateTodoViews(); | 2640 | updateTodoViews(); |
2641 | } | 2641 | } |
2642 | void CalendarView::todoDeleted() | 2642 | void CalendarView::todoDeleted() |
2643 | { | 2643 | { |
2644 | //qDebug(" todoDeleted()"); | 2644 | //qDebug(" todoDeleted()"); |
2645 | updateTodoViews(); | 2645 | updateTodoViews(); |
2646 | } | 2646 | } |
2647 | 2647 | ||
2648 | 2648 | ||
2649 | 2649 | ||
2650 | void CalendarView::newTodo() | 2650 | void CalendarView::newTodo() |
2651 | { | 2651 | { |
2652 | 2652 | ||
2653 | showTodoEditor(); | 2653 | showTodoEditor(); |
2654 | mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true); | 2654 | mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true); |
2655 | if ( mFilterView->filtersEnabled() ) { | 2655 | if ( mFilterView->filtersEnabled() ) { |
2656 | CalFilter *filter = mFilterView->selectedFilter(); | 2656 | CalFilter *filter = mFilterView->selectedFilter(); |
2657 | if (filter && filter->showCategories()) { | 2657 | if (filter && filter->showCategories()) { |
2658 | mTodoEditor->setCategories(filter->categoryList().join(",") ); | 2658 | mTodoEditor->setCategories(filter->categoryList().join(",") ); |
2659 | } | 2659 | } |
2660 | if ( filter ) | 2660 | if ( filter ) |
2661 | mTodoEditor->setSecrecy( filter->getSecrecy() ); | 2661 | mTodoEditor->setSecrecy( filter->getSecrecy() ); |
2662 | } | 2662 | } |
2663 | } | 2663 | } |
2664 | 2664 | ||
2665 | void CalendarView::newSubTodo() | 2665 | void CalendarView::newSubTodo() |
2666 | { | 2666 | { |
2667 | Todo *todo = selectedTodo(); | 2667 | Todo *todo = selectedTodo(); |
2668 | if ( todo ) newSubTodo( todo ); | 2668 | if ( todo ) newSubTodo( todo ); |
2669 | } | 2669 | } |
2670 | 2670 | ||
2671 | void CalendarView::newSubTodo(Todo *parentEvent) | 2671 | void CalendarView::newSubTodo(Todo *parentEvent) |
2672 | { | 2672 | { |
2673 | 2673 | ||
2674 | showTodoEditor(); | 2674 | showTodoEditor(); |
2675 | mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true); | 2675 | mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true); |
2676 | } | 2676 | } |
2677 | 2677 | ||
2678 | void CalendarView::newFloatingEvent() | 2678 | void CalendarView::newFloatingEvent() |
2679 | { | 2679 | { |
2680 | DateList tmpList = mNavigator->selectedDates(); | 2680 | DateList tmpList = mNavigator->selectedDates(); |
2681 | QDate date = tmpList.first(); | 2681 | QDate date = tmpList.first(); |
2682 | 2682 | ||
2683 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), | 2683 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), |
2684 | QDateTime( date, QTime( 12, 0, 0 ) ), true ); | 2684 | QDateTime( date, QTime( 12, 0, 0 ) ), true ); |
2685 | } | 2685 | } |
2686 | 2686 | ||
2687 | 2687 | ||
2688 | void CalendarView::editEvent( Event *event ) | 2688 | void CalendarView::editEvent( Event *event ) |
2689 | { | 2689 | { |
2690 | 2690 | ||
2691 | if ( !event ) return; | 2691 | if ( !event ) return; |
2692 | if ( event->isReadOnly() ) { | 2692 | if ( event->isReadOnly() ) { |
2693 | showEvent( event ); | 2693 | showEvent( event ); |
2694 | return; | 2694 | return; |
2695 | } | 2695 | } |
2696 | showEventEditor(); | 2696 | showEventEditor(); |
2697 | mEventEditor->editEvent( event , mFlagEditDescription); | 2697 | mEventEditor->editEvent( event , mFlagEditDescription); |
2698 | } | 2698 | } |
2699 | void CalendarView::editJournal( Journal *jour ) | 2699 | void CalendarView::editJournal( Journal *jour ) |
2700 | { | 2700 | { |
2701 | if ( !jour ) return; | 2701 | if ( !jour ) return; |
2702 | mDialogManager->hideSearchDialog(); | 2702 | mDialogManager->hideSearchDialog(); |
2703 | mViewManager->showJournalView(); | 2703 | mViewManager->showJournalView(); |
2704 | mNavigator->slotDaySelect( jour->dtStart().date() ); | 2704 | mNavigator->slotDaySelect( jour->dtStart().date() ); |
2705 | } | 2705 | } |
2706 | void CalendarView::editTodo( Todo *todo ) | 2706 | void CalendarView::editTodo( Todo *todo ) |
2707 | { | 2707 | { |
2708 | if ( !todo ) return; | 2708 | if ( !todo ) return; |
2709 | 2709 | ||
2710 | if ( todo->isReadOnly() ) { | 2710 | if ( todo->isReadOnly() ) { |
2711 | showTodo( todo ); | 2711 | showTodo( todo ); |
2712 | return; | 2712 | return; |
2713 | } | 2713 | } |
2714 | showTodoEditor(); | 2714 | showTodoEditor(); |
2715 | mTodoEditor->editTodo( todo ,mFlagEditDescription); | 2715 | mTodoEditor->editTodo( todo ,mFlagEditDescription); |
2716 | 2716 | ||
2717 | } | 2717 | } |
2718 | 2718 | ||
2719 | KOEventViewerDialog* CalendarView::getEventViewerDialog() | 2719 | KOEventViewerDialog* CalendarView::getEventViewerDialog() |
2720 | { | 2720 | { |
2721 | if ( !mEventViewerDialog ) { | 2721 | if ( !mEventViewerDialog ) { |
2722 | mEventViewerDialog = new KOEventViewerDialog(this); | 2722 | mEventViewerDialog = new KOEventViewerDialog(this); |
2723 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); | 2723 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); |
2724 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); | 2724 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); |
2725 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), | 2725 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), |
2726 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 2726 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
2727 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), | 2727 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), |
2728 | viewManager(), SLOT( showAgendaView( bool ) ) ); | 2728 | viewManager(), SLOT( showAgendaView( bool ) ) ); |
2729 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), | ||
2730 | this, SLOT( todoChanged(Todo *) ) ); | ||
2729 | mEventViewerDialog->resize( 640, 480 ); | 2731 | mEventViewerDialog->resize( 640, 480 ); |
2730 | 2732 | ||
2731 | } | 2733 | } |
2732 | return mEventViewerDialog; | 2734 | return mEventViewerDialog; |
2733 | } | 2735 | } |
2734 | void CalendarView::showEvent(Event *event) | 2736 | void CalendarView::showEvent(Event *event) |
2735 | { | 2737 | { |
2736 | getEventViewerDialog()->setEvent(event); | 2738 | getEventViewerDialog()->setEvent(event); |
2737 | getEventViewerDialog()->showMe(); | 2739 | getEventViewerDialog()->showMe(); |
2738 | } | 2740 | } |
2739 | 2741 | ||
2740 | void CalendarView::showTodo(Todo *event) | 2742 | void CalendarView::showTodo(Todo *event) |
2741 | { | 2743 | { |
2742 | getEventViewerDialog()->setTodo(event); | 2744 | getEventViewerDialog()->setTodo(event); |
2743 | getEventViewerDialog()->showMe(); | 2745 | getEventViewerDialog()->showMe(); |
2744 | } | 2746 | } |
2745 | void CalendarView::showJournal( Journal *jour ) | 2747 | void CalendarView::showJournal( Journal *jour ) |
2746 | { | 2748 | { |
2747 | getEventViewerDialog()->setJournal(jour); | 2749 | getEventViewerDialog()->setJournal(jour); |
2748 | getEventViewerDialog()->showMe(); | 2750 | getEventViewerDialog()->showMe(); |
2749 | 2751 | ||
2750 | } | 2752 | } |
2751 | // void CalendarView::todoModified (Todo *event, int changed) | 2753 | // void CalendarView::todoModified (Todo *event, int changed) |
2752 | // { | 2754 | // { |
2753 | // // if (mDialogList.find (event) != mDialogList.end ()) { | 2755 | // // if (mDialogList.find (event) != mDialogList.end ()) { |
2754 | // // kdDebug() << "Todo modified and open" << endl; | 2756 | // // kdDebug() << "Todo modified and open" << endl; |
2755 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; | 2757 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; |
2756 | // // temp->modified (changed); | 2758 | // // temp->modified (changed); |
2757 | 2759 | ||
2758 | // // } | 2760 | // // } |
2759 | 2761 | ||
2760 | // mViewManager->updateView(); | 2762 | // mViewManager->updateView(); |
2761 | // } | 2763 | // } |
2762 | 2764 | ||
2763 | void CalendarView::appointment_show() | 2765 | void CalendarView::appointment_show() |
2764 | { | 2766 | { |
2765 | Event *anEvent = 0; | 2767 | Event *anEvent = 0; |
2766 | 2768 | ||
2767 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 2769 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
2768 | 2770 | ||
2769 | if (mViewManager->currentView()->isEventView()) { | 2771 | if (mViewManager->currentView()->isEventView()) { |
2770 | if ( incidence && incidence->type() == "Event" ) { | 2772 | if ( incidence && incidence->type() == "Event" ) { |
2771 | anEvent = static_cast<Event *>(incidence); | 2773 | anEvent = static_cast<Event *>(incidence); |
2772 | } | 2774 | } |
2773 | } | 2775 | } |
2774 | 2776 | ||
2775 | if (!anEvent) { | 2777 | if (!anEvent) { |
2776 | KNotifyClient::beep(); | 2778 | KNotifyClient::beep(); |
2777 | return; | 2779 | return; |
2778 | } | 2780 | } |
2779 | 2781 | ||
2780 | showEvent(anEvent); | 2782 | showEvent(anEvent); |
2781 | } | 2783 | } |
2782 | 2784 | ||
2783 | void CalendarView::appointment_edit() | 2785 | void CalendarView::appointment_edit() |
2784 | { | 2786 | { |
2785 | Event *anEvent = 0; | 2787 | Event *anEvent = 0; |
2786 | 2788 | ||
2787 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 2789 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
2788 | 2790 | ||
2789 | if (mViewManager->currentView()->isEventView()) { | 2791 | if (mViewManager->currentView()->isEventView()) { |
2790 | if ( incidence && incidence->type() == "Event" ) { | 2792 | if ( incidence && incidence->type() == "Event" ) { |
2791 | anEvent = static_cast<Event *>(incidence); | 2793 | anEvent = static_cast<Event *>(incidence); |
2792 | } | 2794 | } |
2793 | } | 2795 | } |
2794 | 2796 | ||
2795 | if (!anEvent) { | 2797 | if (!anEvent) { |
2796 | KNotifyClient::beep(); | 2798 | KNotifyClient::beep(); |
2797 | return; | 2799 | return; |
2798 | } | 2800 | } |
2799 | 2801 | ||
2800 | editEvent(anEvent); | 2802 | editEvent(anEvent); |
2801 | } | 2803 | } |
2802 | 2804 | ||
2803 | void CalendarView::appointment_delete() | 2805 | void CalendarView::appointment_delete() |
2804 | { | 2806 | { |
2805 | Event *anEvent = 0; | 2807 | Event *anEvent = 0; |
2806 | 2808 | ||
2807 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 2809 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
2808 | 2810 | ||
2809 | if (mViewManager->currentView()->isEventView()) { | 2811 | if (mViewManager->currentView()->isEventView()) { |
2810 | if ( incidence && incidence->type() == "Event" ) { | 2812 | if ( incidence && incidence->type() == "Event" ) { |
2811 | anEvent = static_cast<Event *>(incidence); | 2813 | anEvent = static_cast<Event *>(incidence); |
2812 | } | 2814 | } |
2813 | } | 2815 | } |
2814 | 2816 | ||
2815 | if (!anEvent) { | 2817 | if (!anEvent) { |
2816 | KNotifyClient::beep(); | 2818 | KNotifyClient::beep(); |
2817 | return; | 2819 | return; |
2818 | } | 2820 | } |
2819 | 2821 | ||
2820 | deleteEvent(anEvent); | 2822 | deleteEvent(anEvent); |
2821 | } | 2823 | } |
2822 | 2824 | ||
2823 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) | 2825 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) |
2824 | { | 2826 | { |
2825 | if (!sub) return; | 2827 | if (!sub) return; |
2826 | if (!parent) return; | 2828 | if (!parent) return; |
2827 | if ( sub->relatedTo() ) | 2829 | if ( sub->relatedTo() ) |
2828 | sub->relatedTo()->removeRelation(sub); | 2830 | sub->relatedTo()->removeRelation(sub); |
2829 | sub->setRelatedTo(parent); | 2831 | sub->setRelatedTo(parent); |
2830 | sub->setRelatedToUid(parent->uid()); | 2832 | sub->setRelatedToUid(parent->uid()); |
2831 | parent->addRelation(sub); | 2833 | parent->addRelation(sub); |
2832 | sub->updated(); | 2834 | sub->updated(); |
2833 | parent->updated(); | 2835 | parent->updated(); |
2834 | setModified(true); | 2836 | setModified(true); |
2835 | updateView(); | 2837 | updateView(); |
2836 | } | 2838 | } |
2837 | void CalendarView::todo_unsub(Todo *anTodo ) | 2839 | void CalendarView::todo_unsub(Todo *anTodo ) |
2838 | { | 2840 | { |
2839 | // Todo *anTodo = selectedTodo(); | 2841 | // Todo *anTodo = selectedTodo(); |
2840 | if (!anTodo) return; | 2842 | if (!anTodo) return; |
2841 | if (!anTodo->relatedTo()) return; | 2843 | if (!anTodo->relatedTo()) return; |
2842 | anTodo->relatedTo()->removeRelation(anTodo); | 2844 | anTodo->relatedTo()->removeRelation(anTodo); |
2843 | anTodo->setRelatedTo(0); | 2845 | anTodo->setRelatedTo(0); |
2844 | anTodo->updated(); | 2846 | anTodo->updated(); |
2845 | anTodo->setRelatedToUid(""); | 2847 | anTodo->setRelatedToUid(""); |
2846 | setModified(true); | 2848 | setModified(true); |
2847 | updateView(); | 2849 | updateView(); |
2848 | } | 2850 | } |
2849 | 2851 | ||
2850 | void CalendarView::deleteTodo(Todo *todo) | 2852 | void CalendarView::deleteTodo(Todo *todo) |
2851 | { | 2853 | { |
2852 | if (!todo) { | 2854 | if (!todo) { |
2853 | KNotifyClient::beep(); | 2855 | KNotifyClient::beep(); |
2854 | return; | 2856 | return; |
2855 | } | 2857 | } |
2856 | if (KOPrefs::instance()->mConfirm) { | 2858 | if (KOPrefs::instance()->mConfirm) { |
2857 | switch (msgItemDelete()) { | 2859 | switch (msgItemDelete()) { |
2858 | case KMessageBox::Continue: // OK | 2860 | case KMessageBox::Continue: // OK |
2859 | if (!todo->relations().isEmpty()) { | 2861 | if (!todo->relations().isEmpty()) { |
2860 | KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."), | 2862 | KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."), |
2861 | i18n("Delete To-Do")); | 2863 | i18n("Delete To-Do")); |
2862 | } else { | 2864 | } else { |
2863 | checkExternalId( todo ); | 2865 | checkExternalId( todo ); |
2864 | calendar()->deleteTodo(todo); | 2866 | calendar()->deleteTodo(todo); |
2865 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 2867 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
2866 | updateView(); | 2868 | updateView(); |
2867 | } | 2869 | } |
2868 | break; | 2870 | break; |
2869 | } // switch | 2871 | } // switch |
2870 | } else { | 2872 | } else { |
2871 | if (!todo->relations().isEmpty()) { | 2873 | if (!todo->relations().isEmpty()) { |
2872 | KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."), | 2874 | KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."), |
2873 | i18n("Delete To-Do")); | 2875 | i18n("Delete To-Do")); |
2874 | } else { | 2876 | } else { |
2875 | checkExternalId( todo ); | 2877 | checkExternalId( todo ); |
2876 | mCalendar->deleteTodo(todo); | 2878 | mCalendar->deleteTodo(todo); |
2877 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 2879 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
2878 | updateView(); | 2880 | updateView(); |
2879 | } | 2881 | } |
2880 | } | 2882 | } |
2881 | emit updateSearchDialog(); | 2883 | emit updateSearchDialog(); |
2882 | } | 2884 | } |
2883 | void CalendarView::deleteJournal(Journal *jour) | 2885 | void CalendarView::deleteJournal(Journal *jour) |
2884 | { | 2886 | { |
2885 | if (!jour) { | 2887 | if (!jour) { |
2886 | KNotifyClient::beep(); | 2888 | KNotifyClient::beep(); |
2887 | return; | 2889 | return; |
2888 | } | 2890 | } |
2889 | if (KOPrefs::instance()->mConfirm) { | 2891 | if (KOPrefs::instance()->mConfirm) { |
2890 | switch (msgItemDelete()) { | 2892 | switch (msgItemDelete()) { |
2891 | case KMessageBox::Continue: // OK | 2893 | case KMessageBox::Continue: // OK |
2892 | calendar()->deleteJournal(jour); | 2894 | calendar()->deleteJournal(jour); |
2893 | updateView(); | 2895 | updateView(); |
2894 | break; | 2896 | break; |
2895 | } // switch | 2897 | } // switch |
2896 | } else { | 2898 | } else { |
2897 | calendar()->deleteJournal(jour);; | 2899 | calendar()->deleteJournal(jour);; |
2898 | updateView(); | 2900 | updateView(); |
2899 | } | 2901 | } |
2900 | emit updateSearchDialog(); | 2902 | emit updateSearchDialog(); |
2901 | } | 2903 | } |
2902 | 2904 | ||
2903 | void CalendarView::deleteEvent(Event *anEvent) | 2905 | void CalendarView::deleteEvent(Event *anEvent) |
2904 | { | 2906 | { |
2905 | if (!anEvent) { | 2907 | if (!anEvent) { |
2906 | KNotifyClient::beep(); | 2908 | KNotifyClient::beep(); |
2907 | return; | 2909 | return; |
2908 | } | 2910 | } |
2909 | 2911 | ||
2910 | if (anEvent->recurrence()->doesRecur()) { | 2912 | if (anEvent->recurrence()->doesRecur()) { |
2911 | QDate itemDate = mViewManager->currentSelectionDate(); | 2913 | QDate itemDate = mViewManager->currentSelectionDate(); |
2912 | int km; | 2914 | int km; |
2913 | if (!itemDate.isValid()) { | 2915 | if (!itemDate.isValid()) { |
2914 | //kdDebug() << "Date Not Valid" << endl; | 2916 | //kdDebug() << "Date Not Valid" << endl; |
2915 | if (KOPrefs::instance()->mConfirm) { | 2917 | if (KOPrefs::instance()->mConfirm) { |
2916 | km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + | 2918 | km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + |
2917 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), | 2919 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), |
2918 | i18n("KO/Pi Confirmation"),i18n("Delete All")); | 2920 | i18n("KO/Pi Confirmation"),i18n("Delete All")); |
2919 | if ( km == KMessageBox::Continue ) | 2921 | if ( km == KMessageBox::Continue ) |
2920 | km = KMessageBox::No; // No = all below | 2922 | km = KMessageBox::No; // No = all below |
2921 | } else | 2923 | } else |
2922 | km = KMessageBox::No; | 2924 | km = KMessageBox::No; |
2923 | } else { | 2925 | } else { |
2924 | km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + | 2926 | km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + |
2925 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ | 2927 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ |
2926 | KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), | 2928 | KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), |
2927 | i18n("KO/Pi Confirmation"),i18n("Current"), | 2929 | i18n("KO/Pi Confirmation"),i18n("Current"), |
2928 | i18n("All")); | 2930 | i18n("All")); |
2929 | } | 2931 | } |
2930 | switch(km) { | 2932 | switch(km) { |
2931 | 2933 | ||
2932 | case KMessageBox::No: // Continue // all | 2934 | case KMessageBox::No: // Continue // all |
2933 | //qDebug("KMessageBox::No "); | 2935 | //qDebug("KMessageBox::No "); |
2934 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 2936 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
2935 | schedule(Scheduler::Cancel,anEvent); | 2937 | schedule(Scheduler::Cancel,anEvent); |
2936 | 2938 | ||
2937 | checkExternalId( anEvent); | 2939 | checkExternalId( anEvent); |
2938 | mCalendar->deleteEvent(anEvent); | 2940 | mCalendar->deleteEvent(anEvent); |
2939 | changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); | 2941 | changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); |
2940 | break; | 2942 | break; |
2941 | 2943 | ||
2942 | // Disabled because it does not work | 2944 | // Disabled because it does not work |
2943 | //#if 0 | 2945 | //#if 0 |
2944 | case KMessageBox::Yes: // just this one | 2946 | case KMessageBox::Yes: // just this one |
2945 | //QDate qd = mNavigator->selectedDates().first(); | 2947 | //QDate qd = mNavigator->selectedDates().first(); |
2946 | //if (!qd.isValid()) { | 2948 | //if (!qd.isValid()) { |
2947 | // kdDebug() << "no date selected, or invalid date" << endl; | 2949 | // kdDebug() << "no date selected, or invalid date" << endl; |
2948 | // KNotifyClient::beep(); | 2950 | // KNotifyClient::beep(); |
2949 | // return; | 2951 | // return; |
2950 | //} | 2952 | //} |
2951 | //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); | 2953 | //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); |
2952 | if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { | 2954 | if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { |
2953 | anEvent->addExDate(itemDate); | 2955 | anEvent->addExDate(itemDate); |
2954 | int duration = anEvent->recurrence()->duration(); | 2956 | int duration = anEvent->recurrence()->duration(); |
2955 | if ( duration > 0 ) { | 2957 | if ( duration > 0 ) { |
2956 | anEvent->recurrence()->setDuration( duration - 1 ); | 2958 | anEvent->recurrence()->setDuration( duration - 1 ); |
2957 | } | 2959 | } |
2958 | changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); | 2960 | changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); |
2959 | } | 2961 | } |
2960 | break; | 2962 | break; |
2961 | //#endif | 2963 | //#endif |
2962 | } // switch | 2964 | } // switch |
2963 | } else { | 2965 | } else { |
2964 | if (KOPrefs::instance()->mConfirm) { | 2966 | if (KOPrefs::instance()->mConfirm) { |
2965 | switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + | 2967 | switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + |
2966 | i18n("\nAre you sure you want\nto delete this event?"), | 2968 | i18n("\nAre you sure you want\nto delete this event?"), |
2967 | i18n("KO/Pi Confirmation"),i18n("Delete"))) { | 2969 | i18n("KO/Pi Confirmation"),i18n("Delete"))) { |
2968 | case KMessageBox::Continue: // OK | 2970 | case KMessageBox::Continue: // OK |
2969 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 2971 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
2970 | schedule(Scheduler::Cancel,anEvent); | 2972 | schedule(Scheduler::Cancel,anEvent); |
2971 | checkExternalId( anEvent); | 2973 | checkExternalId( anEvent); |
2972 | mCalendar->deleteEvent(anEvent); | 2974 | mCalendar->deleteEvent(anEvent); |
2973 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 2975 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
2974 | break; | 2976 | break; |
2975 | } // switch | 2977 | } // switch |
2976 | } else { | 2978 | } else { |
2977 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 2979 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
2978 | schedule(Scheduler::Cancel,anEvent); | 2980 | schedule(Scheduler::Cancel,anEvent); |
2979 | checkExternalId( anEvent); | 2981 | checkExternalId( anEvent); |
2980 | mCalendar->deleteEvent(anEvent); | 2982 | mCalendar->deleteEvent(anEvent); |
2981 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 2983 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
2982 | } | 2984 | } |
2983 | } // if-else | 2985 | } // if-else |
2984 | emit updateSearchDialog(); | 2986 | emit updateSearchDialog(); |
2985 | } | 2987 | } |
2986 | 2988 | ||
2987 | bool CalendarView::deleteEvent(const QString &uid) | 2989 | bool CalendarView::deleteEvent(const QString &uid) |
2988 | { | 2990 | { |
2989 | Event *ev = mCalendar->event(uid); | 2991 | Event *ev = mCalendar->event(uid); |
2990 | if (ev) { | 2992 | if (ev) { |
2991 | deleteEvent(ev); | 2993 | deleteEvent(ev); |
2992 | return true; | 2994 | return true; |
2993 | } else { | 2995 | } else { |
2994 | return false; | 2996 | return false; |
2995 | } | 2997 | } |
2996 | } | 2998 | } |
2997 | 2999 | ||
2998 | /*****************************************************************************/ | 3000 | /*****************************************************************************/ |
2999 | 3001 | ||
3000 | void CalendarView::action_mail() | 3002 | void CalendarView::action_mail() |
3001 | { | 3003 | { |
3002 | #ifndef KORG_NOMAIL | 3004 | #ifndef KORG_NOMAIL |
3003 | KOMailClient mailClient; | 3005 | KOMailClient mailClient; |
3004 | 3006 | ||
3005 | Incidence *incidence = currentSelection(); | 3007 | Incidence *incidence = currentSelection(); |
3006 | 3008 | ||
3007 | if (!incidence) { | 3009 | if (!incidence) { |
3008 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); | 3010 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); |
3009 | return; | 3011 | return; |
3010 | } | 3012 | } |
3011 | if(incidence->attendeeCount() == 0 ) { | 3013 | if(incidence->attendeeCount() == 0 ) { |
3012 | KMessageBox::sorry(this, | 3014 | KMessageBox::sorry(this, |
3013 | i18n("Can't generate mail:\nNo attendees defined.\n")); | 3015 | i18n("Can't generate mail:\nNo attendees defined.\n")); |
3014 | return; | 3016 | return; |
3015 | } | 3017 | } |
3016 | 3018 | ||
3017 | CalendarLocal cal_tmp; | 3019 | CalendarLocal cal_tmp; |
3018 | Event *event = 0; | 3020 | Event *event = 0; |
3019 | Event *ev = 0; | 3021 | Event *ev = 0; |
3020 | if ( incidence && incidence->type() == "Event" ) { | 3022 | if ( incidence && incidence->type() == "Event" ) { |
3021 | event = static_cast<Event *>(incidence); | 3023 | event = static_cast<Event *>(incidence); |
3022 | ev = new Event(*event); | 3024 | ev = new Event(*event); |
3023 | cal_tmp.addEvent(ev); | 3025 | cal_tmp.addEvent(ev); |
3024 | } | 3026 | } |
3025 | ICalFormat mForm(); | 3027 | ICalFormat mForm(); |
3026 | QString attachment = mForm.toString( &cal_tmp ); | 3028 | QString attachment = mForm.toString( &cal_tmp ); |
3027 | if (ev) delete(ev); | 3029 | if (ev) delete(ev); |
3028 | 3030 | ||
3029 | mailClient.mailAttendees(currentSelection(), attachment); | 3031 | mailClient.mailAttendees(currentSelection(), attachment); |
3030 | 3032 | ||
3031 | #endif | 3033 | #endif |
3032 | 3034 | ||
3033 | #if 0 | 3035 | #if 0 |
3034 | Event *anEvent = 0; | 3036 | Event *anEvent = 0; |
3035 | if (mViewManager->currentView()->isEventView()) { | 3037 | if (mViewManager->currentView()->isEventView()) { |
3036 | anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); | 3038 | anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); |
3037 | } | 3039 | } |
3038 | 3040 | ||
3039 | if (!anEvent) { | 3041 | if (!anEvent) { |
3040 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); | 3042 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); |
3041 | return; | 3043 | return; |
3042 | } | 3044 | } |
3043 | if(anEvent->attendeeCount() == 0 ) { | 3045 | if(anEvent->attendeeCount() == 0 ) { |
3044 | KMessageBox::sorry(this, | 3046 | KMessageBox::sorry(this, |
3045 | i18n("Can't generate mail:\nNo attendees defined.\n")); | 3047 | i18n("Can't generate mail:\nNo attendees defined.\n")); |
3046 | return; | 3048 | return; |
3047 | } | 3049 | } |
3048 | 3050 | ||
3049 | mailobject.emailEvent(anEvent); | 3051 | mailobject.emailEvent(anEvent); |
3050 | #endif | 3052 | #endif |
3051 | } | 3053 | } |
3052 | 3054 | ||
3053 | 3055 | ||
3054 | void CalendarView::schedule_publish(Incidence *incidence) | 3056 | void CalendarView::schedule_publish(Incidence *incidence) |
3055 | { | 3057 | { |
3056 | Event *event = 0; | 3058 | Event *event = 0; |
3057 | Todo *todo = 0; | 3059 | Todo *todo = 0; |
3058 | 3060 | ||
3059 | if (incidence == 0) { | 3061 | if (incidence == 0) { |
3060 | incidence = mViewManager->currentView()->selectedIncidences().first(); | 3062 | incidence = mViewManager->currentView()->selectedIncidences().first(); |
3061 | if (incidence == 0) { | 3063 | if (incidence == 0) { |
3062 | incidence = mTodoList->selectedIncidences().first(); | 3064 | incidence = mTodoList->selectedIncidences().first(); |
3063 | } | 3065 | } |
3064 | } | 3066 | } |
3065 | if ( incidence && incidence->type() == "Event" ) { | 3067 | if ( incidence && incidence->type() == "Event" ) { |
3066 | event = static_cast<Event *>(incidence); | 3068 | event = static_cast<Event *>(incidence); |
3067 | } else { | 3069 | } else { |
3068 | if ( incidence && incidence->type() == "Todo" ) { | 3070 | if ( incidence && incidence->type() == "Todo" ) { |
3069 | todo = static_cast<Todo *>(incidence); | 3071 | todo = static_cast<Todo *>(incidence); |
3070 | } | 3072 | } |
3071 | } | 3073 | } |
3072 | 3074 | ||
3073 | if (!event && !todo) { | 3075 | if (!event && !todo) { |
3074 | KMessageBox::sorry(this,i18n("No event selected.")); | 3076 | KMessageBox::sorry(this,i18n("No event selected.")); |
3075 | return; | 3077 | return; |
3076 | } | 3078 | } |
3077 | 3079 | ||
3078 | PublishDialog *publishdlg = new PublishDialog(); | 3080 | PublishDialog *publishdlg = new PublishDialog(); |
3079 | if (incidence->attendeeCount()>0) { | 3081 | if (incidence->attendeeCount()>0) { |
3080 | QPtrList<Attendee> attendees = incidence->attendees(); | 3082 | QPtrList<Attendee> attendees = incidence->attendees(); |
3081 | attendees.first(); | 3083 | attendees.first(); |
3082 | while ( attendees.current()!=0 ) { | 3084 | while ( attendees.current()!=0 ) { |
3083 | publishdlg->addAttendee(attendees.current()); | 3085 | publishdlg->addAttendee(attendees.current()); |
3084 | attendees.next(); | 3086 | attendees.next(); |
3085 | } | 3087 | } |
3086 | } | 3088 | } |
3087 | bool send = true; | 3089 | bool send = true; |
3088 | if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { | 3090 | if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { |
3089 | if ( publishdlg->exec() != QDialog::Accepted ) | 3091 | if ( publishdlg->exec() != QDialog::Accepted ) |
3090 | send = false; | 3092 | send = false; |
3091 | } | 3093 | } |
3092 | if ( send ) { | 3094 | if ( send ) { |
3093 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 3095 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
3094 | if ( event ) { | 3096 | if ( event ) { |
3095 | Event *ev = new Event(*event); | 3097 | Event *ev = new Event(*event); |
3096 | ev->registerObserver(0); | 3098 | ev->registerObserver(0); |
3097 | ev->clearAttendees(); | 3099 | ev->clearAttendees(); |
3098 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { | 3100 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { |
3099 | delete(ev); | 3101 | delete(ev); |
3100 | } | 3102 | } |
3101 | } else { | 3103 | } else { |
3102 | if ( todo ) { | 3104 | if ( todo ) { |
3103 | Todo *ev = new Todo(*todo); | 3105 | Todo *ev = new Todo(*todo); |
3104 | ev->registerObserver(0); | 3106 | ev->registerObserver(0); |
3105 | ev->clearAttendees(); | 3107 | ev->clearAttendees(); |
3106 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { | 3108 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { |
3107 | delete(ev); | 3109 | delete(ev); |
3108 | } | 3110 | } |
3109 | } | 3111 | } |
3110 | } | 3112 | } |
3111 | } | 3113 | } |
3112 | delete publishdlg; | 3114 | delete publishdlg; |
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 68c0e1a..772fd95 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -1,240 +1,256 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <klocale.h> | 20 | #include <klocale.h> |
21 | 21 | ||
22 | #include <libkcal/event.h> | 22 | #include <libkcal/event.h> |
23 | #include <qpushbutton.h> | 23 | #include <qpushbutton.h> |
24 | 24 | ||
25 | #include "koeventviewer.h" | 25 | #include "koeventviewer.h" |
26 | #include "koprefs.h" | 26 | #include "koprefs.h" |
27 | #include <libkcal/todo.h> | 27 | #include <libkcal/todo.h> |
28 | #include "qapp.h" | 28 | #include "qapp.h" |
29 | 29 | ||
30 | #include "koeventviewerdialog.h" | 30 | #include "koeventviewerdialog.h" |
31 | extern int globalFlagBlockAgenda; | 31 | extern int globalFlagBlockAgenda; |
32 | 32 | ||
33 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) | 33 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) |
34 | : KDialogBase(parent,name, | 34 | : KDialogBase(parent,name, |
35 | #ifndef DESKTOP_VERSION | 35 | #ifndef DESKTOP_VERSION |
36 | true , | 36 | true , |
37 | #else | 37 | #else |
38 | false, | 38 | false, |
39 | #endif | 39 | #endif |
40 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) | 40 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) |
41 | { | 41 | { |
42 | 42 | ||
43 | mEventViewer = new KOEventViewer(this); | 43 | mEventViewer = new KOEventViewer(this); |
44 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 44 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
45 | setMainWidget(mEventViewer); | 45 | setMainWidget(mEventViewer); |
46 | setButtonText(Ok, i18n("Edit") ); | 46 | setButtonText(Ok, i18n("Edit") ); |
47 | 47 | ||
48 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), | 48 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), |
49 | SLOT(editIncidence())); | 49 | SLOT(editIncidence())); |
50 | QObject::connect(this,SIGNAL(user1Clicked()), | 50 | QObject::connect(this,SIGNAL(user1Clicked()), |
51 | SLOT(showIncidence())); | 51 | SLOT(showIncidence())); |
52 | mIncidence = 0; | 52 | mIncidence = 0; |
53 | // TODO: Set a sensible size (based on the content?). | 53 | // TODO: Set a sensible size (based on the content?). |
54 | //showMaximized(); | 54 | //showMaximized(); |
55 | //qDebug("++++++++++++KOEventViewerDialog() "); | 55 | //qDebug("++++++++++++KOEventViewerDialog() "); |
56 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 56 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
57 | // setFixedSize( 240,284 ); | 57 | // setFixedSize( 240,284 ); |
58 | // move( 0, 15 ); | 58 | // move( 0, 15 ); |
59 | // } else { | 59 | // } else { |
60 | // setMinimumSize(300,200); | 60 | // setMinimumSize(300,200); |
61 | // resize(320,300); | 61 | // resize(320,300); |
62 | // } | 62 | // } |
63 | mSyncMode = false; | 63 | mSyncMode = false; |
64 | mSyncResult = 0; | 64 | mSyncResult = 0; |
65 | 65 | ||
66 | } | 66 | } |
67 | 67 | ||
68 | KOEventViewerDialog::~KOEventViewerDialog() | 68 | KOEventViewerDialog::~KOEventViewerDialog() |
69 | { | 69 | { |
70 | //qDebug("-------~KOEventViewerDialog() "); | 70 | //qDebug("-------~KOEventViewerDialog() "); |
71 | } | 71 | } |
72 | void KOEventViewerDialog::showMe() | 72 | void KOEventViewerDialog::showMe() |
73 | { | 73 | { |
74 | 74 | ||
75 | #ifdef DESKTOP_VERSION | 75 | #ifdef DESKTOP_VERSION |
76 | show(); | 76 | show(); |
77 | #else | 77 | #else |
78 | showMaximized(); | 78 | showMaximized(); |
79 | #endif | 79 | #endif |
80 | setFocus(); | 80 | setFocus(); |
81 | setActiveWindow(); | 81 | setActiveWindow(); |
82 | 82 | ||
83 | } | 83 | } |
84 | void KOEventViewerDialog::setSyncMode( bool b ) | 84 | void KOEventViewerDialog::setSyncMode( bool b ) |
85 | { | 85 | { |
86 | mSyncMode = b; | 86 | mSyncMode = b; |
87 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); | 87 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); |
88 | if ( mSyncMode ) { | 88 | if ( mSyncMode ) { |
89 | findButton( Close )->setText( i18n("Cancel Sync")); | 89 | findButton( Close )->setText( i18n("Cancel Sync")); |
90 | findButton( Ok )->setText( i18n("Remote")); | 90 | findButton( Ok )->setText( i18n("Remote")); |
91 | findButton( User1 )->setText( i18n("Local")); | 91 | findButton( User1 )->setText( i18n("Local")); |
92 | } else { | 92 | } else { |
93 | findButton( Close )->setText( i18n("Close")); | 93 | findButton( Close )->setText( i18n("Close")); |
94 | findButton( Ok )->setText( i18n("Edit")); | 94 | findButton( Ok )->setText( i18n("Edit")); |
95 | findButton( User1 )->setText( i18n("Agenda")); | 95 | findButton( User1 )->setText( i18n("Agenda")); |
96 | } | 96 | } |
97 | mEventViewer->setSyncMode( b ); | 97 | mEventViewer->setSyncMode( b ); |
98 | } | 98 | } |
99 | void KOEventViewerDialog::setColorMode( int m ) | 99 | void KOEventViewerDialog::setColorMode( int m ) |
100 | { | 100 | { |
101 | mEventViewer->setColorMode( m ); | 101 | mEventViewer->setColorMode( m ); |
102 | } | 102 | } |
103 | int KOEventViewerDialog::executeS( bool local ) | 103 | int KOEventViewerDialog::executeS( bool local ) |
104 | { | 104 | { |
105 | mSyncResult = 3; | 105 | mSyncResult = 3; |
106 | if ( local ) | 106 | if ( local ) |
107 | findButton( User1 )->setFocus(); | 107 | findButton( User1 )->setFocus(); |
108 | else | 108 | else |
109 | findButton( Ok )->setFocus(); | 109 | findButton( Ok )->setFocus(); |
110 | exec(); | 110 | exec(); |
111 | return mSyncResult; | 111 | return mSyncResult; |
112 | } | 112 | } |
113 | 113 | ||
114 | void KOEventViewerDialog::updateConfig() | 114 | void KOEventViewerDialog::updateConfig() |
115 | { | 115 | { |
116 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 116 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
117 | 117 | ||
118 | } | 118 | } |
119 | void KOEventViewerDialog::setEvent(Event *event) | 119 | void KOEventViewerDialog::setEvent(Event *event) |
120 | { | 120 | { |
121 | mEventViewer->setEvent(event); | 121 | mEventViewer->setEvent(event); |
122 | mIncidence = event; | 122 | mIncidence = event; |
123 | findButton( Close )->setFocus(); | 123 | findButton( Close )->setFocus(); |
124 | } | 124 | } |
125 | void KOEventViewerDialog::setIncidence(Incidence *in ) | 125 | void KOEventViewerDialog::setIncidence(Incidence *in ) |
126 | { | 126 | { |
127 | if ( in->type() == "Event" ) | 127 | if ( in->type() == "Event" ) |
128 | setEvent( (Event*) in ); | 128 | setEvent( (Event*) in ); |
129 | else if ( in->type() =="Todo" ) | 129 | else if ( in->type() =="Todo" ) |
130 | setTodo( (Todo*) in ); | 130 | setTodo( (Todo*) in ); |
131 | else if ( in->type() =="Journal" ) | 131 | else if ( in->type() =="Journal" ) |
132 | setJournal( (Journal*) in ); | 132 | setJournal( (Journal*) in ); |
133 | } | 133 | } |
134 | void KOEventViewerDialog::addIncidence(Incidence *in) | 134 | void KOEventViewerDialog::addIncidence(Incidence *in) |
135 | { | 135 | { |
136 | if ( in->type() == "Event" ) | 136 | if ( in->type() == "Event" ) |
137 | addEvent( (Event*) in ); | 137 | addEvent( (Event*) in ); |
138 | else if ( in->type() =="Todo" ) | 138 | else if ( in->type() =="Todo" ) |
139 | mEventViewer->setTodo( (Todo*) in, false ); | 139 | mEventViewer->setTodo( (Todo*) in, false ); |
140 | else if ( in->type() =="Journal" ) | 140 | else if ( in->type() =="Journal" ) |
141 | mEventViewer->setJournal( (Journal*) in, false ); | 141 | mEventViewer->setJournal( (Journal*) in, false ); |
142 | if ( mSyncMode ) { | 142 | if ( mSyncMode ) { |
143 | findButton( User1 )->setFocus(); | 143 | findButton( User1 )->setFocus(); |
144 | setCaption(i18n("Conflict! Please choose entry")); | 144 | setCaption(i18n("Conflict! Please choose entry")); |
145 | } | 145 | } |
146 | } | 146 | } |
147 | 147 | ||
148 | void KOEventViewerDialog::addEvent(Event *event) | 148 | void KOEventViewerDialog::addEvent(Event *event) |
149 | { | 149 | { |
150 | mEventViewer->addEvent(event); | 150 | mEventViewer->addEvent(event); |
151 | mIncidence = event; | 151 | mIncidence = event; |
152 | findButton( Close )->setFocus(); | 152 | findButton( Close )->setFocus(); |
153 | if ( !mSyncMode ) { | ||
154 | findButton( User1 )->setText( i18n("Agenda")); | ||
155 | } | ||
153 | } | 156 | } |
154 | 157 | ||
155 | void KOEventViewerDialog::setTodo(Todo *event) | 158 | void KOEventViewerDialog::setTodo(Todo *event) |
156 | { | 159 | { |
157 | mEventViewer->setTodo(event); | 160 | mEventViewer->setTodo(event); |
158 | mIncidence = (Incidence*)event; | 161 | mIncidence = (Incidence*)event; |
159 | findButton( Close )->setFocus(); | 162 | findButton( Close )->setFocus(); |
163 | if ( !mSyncMode ) { | ||
164 | findButton( User1 )->setText( i18n("Set complete")); | ||
165 | } | ||
160 | } | 166 | } |
161 | void KOEventViewerDialog::setJournal(Journal *j) | 167 | void KOEventViewerDialog::setJournal(Journal *j) |
162 | { | 168 | { |
163 | mEventViewer->setJournal(j); | 169 | mEventViewer->setJournal(j); |
164 | mIncidence = (Incidence*)j; | 170 | mIncidence = (Incidence*)j; |
165 | findButton( Close )->setFocus(); | 171 | findButton( Close )->setFocus(); |
172 | if ( !mSyncMode ) { | ||
173 | findButton( User1 )->setText( i18n("Agenda")); | ||
174 | } | ||
166 | } | 175 | } |
167 | 176 | ||
168 | void KOEventViewerDialog::addText(QString text) | 177 | void KOEventViewerDialog::addText(QString text) |
169 | { | 178 | { |
170 | mEventViewer->addText(text); | 179 | mEventViewer->addText(text); |
171 | findButton( Close )->setFocus(); | 180 | findButton( Close )->setFocus(); |
172 | } | 181 | } |
173 | void KOEventViewerDialog::editIncidence() | 182 | void KOEventViewerDialog::editIncidence() |
174 | { | 183 | { |
175 | if ( mSyncMode ) { | 184 | if ( mSyncMode ) { |
176 | mSyncResult = 2; | 185 | mSyncResult = 2; |
177 | accept(); | 186 | accept(); |
178 | return; | 187 | return; |
179 | } | 188 | } |
180 | if ( mIncidence ){ | 189 | if ( mIncidence ){ |
181 | #ifndef DESKTOP_VERSION | 190 | #ifndef DESKTOP_VERSION |
182 | hide(); | 191 | hide(); |
183 | #endif | 192 | #endif |
184 | emit editIncidence( mIncidence ); | 193 | emit editIncidence( mIncidence ); |
185 | } | 194 | } |
186 | } | 195 | } |
187 | void KOEventViewerDialog::showIncidence() | 196 | void KOEventViewerDialog::showIncidence() |
188 | { | 197 | { |
189 | 198 | ||
190 | if ( mSyncMode ) { | 199 | if ( mSyncMode ) { |
191 | mSyncResult = 1; | 200 | mSyncResult = 1; |
192 | accept(); | 201 | accept(); |
193 | return; | 202 | return; |
194 | } | 203 | } |
195 | 204 | ||
196 | if ( mIncidence ){ | 205 | if ( mIncidence ){ |
197 | #ifndef DESKTOP_VERSION | 206 | #ifndef DESKTOP_VERSION |
198 | hide(); | 207 | hide(); |
199 | #endif | 208 | #endif |
200 | QDate date; | 209 | QDate date; |
201 | if ( mIncidence->type() == "Todo" ) { | 210 | if ( mIncidence->type() == "Todo" ) { |
211 | /* | ||
202 | if ( ((Todo*)mIncidence)->hasDueDate() ) | 212 | if ( ((Todo*)mIncidence)->hasDueDate() ) |
203 | date = ((Todo*)mIncidence)->dtDue().date(); | 213 | date = ((Todo*)mIncidence)->dtDue().date(); |
204 | else { | 214 | else { |
205 | globalFlagBlockAgenda = 2; | 215 | globalFlagBlockAgenda = 2; |
206 | emit showAgendaView( false ); | 216 | emit showAgendaView( false ); |
207 | return; | 217 | return; |
208 | } | 218 | } |
219 | */ | ||
220 | ((Todo*)mIncidence)->setCompleted( true ); | ||
221 | hide(); | ||
222 | emit todoCompleted(((Todo*)mIncidence)); | ||
223 | return; | ||
224 | |||
209 | } else | 225 | } else |
210 | date = mIncidence->dtStart().date(); | 226 | date = mIncidence->dtStart().date(); |
211 | globalFlagBlockAgenda = 1; | 227 | globalFlagBlockAgenda = 1; |
212 | emit showAgendaView( false ); | 228 | emit showAgendaView( false ); |
213 | globalFlagBlockAgenda = 2; | 229 | globalFlagBlockAgenda = 2; |
214 | emit jumpToTime( date ); | 230 | emit jumpToTime( date ); |
215 | } | 231 | } |
216 | } | 232 | } |
217 | void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) | 233 | void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) |
218 | { | 234 | { |
219 | switch ( e->key() ) { | 235 | switch ( e->key() ) { |
220 | 236 | ||
221 | case Qt::Key_A : | 237 | case Qt::Key_A : |
222 | case Qt::Key_L : | 238 | case Qt::Key_L : |
223 | showIncidence(); | 239 | showIncidence(); |
224 | break; | 240 | break; |
225 | case Qt::Key_E : | 241 | case Qt::Key_E : |
226 | case Qt::Key_R : | 242 | case Qt::Key_R : |
227 | editIncidence(); | 243 | editIncidence(); |
228 | break; | 244 | break; |
229 | case Qt::Key_C: | 245 | case Qt::Key_C: |
230 | case Qt::Key_Escape: | 246 | case Qt::Key_Escape: |
231 | close(); | 247 | close(); |
232 | break; | 248 | break; |
233 | case Qt::Key_I: | 249 | case Qt::Key_I: |
234 | accept(); | 250 | accept(); |
235 | break; | 251 | break; |
236 | default: | 252 | default: |
237 | break; | 253 | break; |
238 | } | 254 | } |
239 | 255 | ||
240 | } | 256 | } |
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 21cb3ee..b6b4103 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h | |||
@@ -1,70 +1,71 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | #ifndef KOEVENTVIEWERDIALOG_H | 19 | #ifndef KOEVENTVIEWERDIALOG_H |
20 | #define KOEVENTVIEWERDIALOG_H | 20 | #define KOEVENTVIEWERDIALOG_H |
21 | // | 21 | // |
22 | // Viewer dialog for events. | 22 | // Viewer dialog for events. |
23 | // | 23 | // |
24 | 24 | ||
25 | #include <qtextview.h> | 25 | #include <qtextview.h> |
26 | 26 | ||
27 | #include <kdialogbase.h> | 27 | #include <kdialogbase.h> |
28 | 28 | ||
29 | #include <libkcal/event.h> | 29 | #include <libkcal/event.h> |
30 | 30 | ||
31 | using namespace KCal; | 31 | using namespace KCal; |
32 | 32 | ||
33 | class KOEventViewer; | 33 | class KOEventViewer; |
34 | 34 | ||
35 | class KOEventViewerDialog : public KDialogBase { | 35 | class KOEventViewerDialog : public KDialogBase { |
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | public: | 37 | public: |
38 | KOEventViewerDialog(QWidget *parent=0,const char *name=0); | 38 | KOEventViewerDialog(QWidget *parent=0,const char *name=0); |
39 | virtual ~KOEventViewerDialog(); | 39 | virtual ~KOEventViewerDialog(); |
40 | 40 | ||
41 | void setEvent(Event *event); | 41 | void setEvent(Event *event); |
42 | void addEvent(Event *event); | 42 | void addEvent(Event *event); |
43 | void setTodo(Todo *event); | 43 | void setTodo(Todo *event); |
44 | void setJournal(Journal *journal); | 44 | void setJournal(Journal *journal); |
45 | void setIncidence(Incidence *inc); | 45 | void setIncidence(Incidence *inc); |
46 | void addIncidence(Incidence *inc); | 46 | void addIncidence(Incidence *inc); |
47 | void addText(QString text); | 47 | void addText(QString text); |
48 | void showMe(); | 48 | void showMe(); |
49 | void setSyncMode( bool ); | 49 | void setSyncMode( bool ); |
50 | void setColorMode( int m ); | 50 | void setColorMode( int m ); |
51 | int executeS( bool ); | 51 | int executeS( bool ); |
52 | public slots: | 52 | public slots: |
53 | void updateConfig(); | 53 | void updateConfig(); |
54 | signals: | 54 | signals: |
55 | void editIncidence( Incidence* ); | 55 | void editIncidence( Incidence* ); |
56 | void jumpToTime( const QDate &); | 56 | void jumpToTime( const QDate &); |
57 | void showAgendaView( bool ); | 57 | void showAgendaView( bool ); |
58 | void todoCompleted(Todo*); | ||
58 | private slots: | 59 | private slots: |
59 | void editIncidence(); | 60 | void editIncidence(); |
60 | void showIncidence(); | 61 | void showIncidence(); |
61 | 62 | ||
62 | private: | 63 | private: |
63 | bool mSyncMode; | 64 | bool mSyncMode; |
64 | int mSyncResult; | 65 | int mSyncResult; |
65 | KOEventViewer *mEventViewer; | 66 | KOEventViewer *mEventViewer; |
66 | Incidence* mIncidence; | 67 | Incidence* mIncidence; |
67 | void keyPressEvent ( QKeyEvent * e ); | 68 | void keyPressEvent ( QKeyEvent * e ); |
68 | }; | 69 | }; |
69 | 70 | ||
70 | #endif | 71 | #endif |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 6f76e2c..3c251fb 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -1,115 +1,115 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 | 3 | Copyright (c) 2001 |
4 | Cornelius Schumacher <schumacher@kde.org> | 4 | Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | #ifndef KOVIEWMANAGER_H | 24 | #ifndef KOVIEWMANAGER_H |
25 | #define KOVIEWMANAGER_H | 25 | #define KOVIEWMANAGER_H |
26 | 26 | ||
27 | #include <qobject.h> | 27 | #include <qobject.h> |
28 | 28 | ||
29 | #include <korganizer/baseview.h> | 29 | #include <korganizer/baseview.h> |
30 | 30 | ||
31 | class CalendarView; | 31 | class CalendarView; |
32 | 32 | ||
33 | class KOListView; | 33 | class KOListView; |
34 | class KOAgendaView; | 34 | class KOAgendaView; |
35 | class KOMonthView; | 35 | class KOMonthView; |
36 | class KOTimeSpanView; | 36 | class KOTimeSpanView; |
37 | class KOTodoView; | 37 | class KOTodoView; |
38 | class KOWhatsNextView; | 38 | class KOWhatsNextView; |
39 | class KOJournalView; | 39 | class KOJournalView; |
40 | 40 | ||
41 | using namespace KCal; | 41 | using namespace KCal; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | This class manages the views of the calendar. It owns the objects and handles | 44 | This class manages the views of the calendar. It owns the objects and handles |
45 | creation and selection. | 45 | creation and selection. |
46 | */ | 46 | */ |
47 | class KOViewManager : public QObject | 47 | class KOViewManager : public QObject |
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | public: | 50 | public: |
51 | KOViewManager( CalendarView * ); | 51 | KOViewManager( CalendarView * ); |
52 | virtual ~KOViewManager(); | 52 | virtual ~KOViewManager(); |
53 | 53 | ||
54 | /** changes the view to be the currently selected view */ | 54 | /** changes the view to be the currently selected view */ |
55 | void showView(KOrg::BaseView *, bool fullScreen = false ); | 55 | void showView(KOrg::BaseView *, bool fullScreen = false ); |
56 | void updateWNview(); | 56 | void updateWNview(); |
57 | void readSettings(KConfig *config); | 57 | void readSettings(KConfig *config); |
58 | void writeSettings(KConfig *config); | 58 | void writeSettings(KConfig *config); |
59 | bool showsNextDays(); | 59 | bool showsNextDays(); |
60 | /** Read which view was shown last from config file */ | 60 | /** Read which view was shown last from config file */ |
61 | void readCurrentView(KConfig *); | 61 | void readCurrentView(KConfig *); |
62 | /** Write which view is currently shown to config file */ | 62 | /** Write which view is currently shown to config file */ |
63 | void writeCurrentView(KConfig *); | 63 | void writeCurrentView(KConfig *); |
64 | 64 | ||
65 | KOrg::BaseView *currentView(); | 65 | KOrg::BaseView *currentView(); |
66 | 66 | ||
67 | void setDocumentId( const QString & ); | 67 | void setDocumentId( const QString & ); |
68 | 68 | ||
69 | void updateView(); | ||
70 | void updateView( const QDate &start, const QDate &end ); | 69 | void updateView( const QDate &start, const QDate &end ); |
71 | 70 | ||
72 | void raiseCurrentView( bool fullScreen = false ); | 71 | void raiseCurrentView( bool fullScreen = false ); |
73 | 72 | ||
74 | void addView(KOrg::BaseView *); | 73 | void addView(KOrg::BaseView *); |
75 | 74 | ||
76 | Incidence *currentSelection(); | 75 | Incidence *currentSelection(); |
77 | QDate currentSelectionDate(); | 76 | QDate currentSelectionDate(); |
78 | 77 | ||
79 | KOAgendaView *agendaView() const { return mAgendaView; } | 78 | KOAgendaView *agendaView() const { return mAgendaView; } |
80 | 79 | ||
81 | signals: | 80 | signals: |
82 | void printWNV(); | 81 | void printWNV(); |
83 | public slots: | 82 | public slots: |
83 | void updateView(); | ||
84 | void showWhatsNextView(); | 84 | void showWhatsNextView(); |
85 | void showListView(); | 85 | void showListView(); |
86 | void showAgendaView( bool fullScreen = false ); | 86 | void showAgendaView( bool fullScreen = false ); |
87 | void showDayView(); | 87 | void showDayView(); |
88 | void showWorkWeekView(); | 88 | void showWorkWeekView(); |
89 | void showWeekView(); | 89 | void showWeekView(); |
90 | void showNextXView(); | 90 | void showNextXView(); |
91 | void showMonthView(); | 91 | void showMonthView(); |
92 | void showTodoView(); | 92 | void showTodoView(); |
93 | void showJournalView(); | 93 | void showJournalView(); |
94 | void showTimeSpanView(); | 94 | void showTimeSpanView(); |
95 | 95 | ||
96 | private: | 96 | private: |
97 | CalendarView *mMainView; | 97 | CalendarView *mMainView; |
98 | 98 | ||
99 | int mCurrentAgendaView; | 99 | int mCurrentAgendaView; |
100 | KOAgendaView *mAgendaView; | 100 | KOAgendaView *mAgendaView; |
101 | KOListView *mListView; | 101 | KOListView *mListView; |
102 | KOMonthView *mMonthView; | 102 | KOMonthView *mMonthView; |
103 | KOTodoView *mTodoView; | 103 | KOTodoView *mTodoView; |
104 | KOWhatsNextView *mWhatsNextView; | 104 | KOWhatsNextView *mWhatsNextView; |
105 | KOJournalView *mJournalView; | 105 | KOJournalView *mJournalView; |
106 | KOTimeSpanView *mTimeSpanView; | 106 | KOTimeSpanView *mTimeSpanView; |
107 | 107 | ||
108 | KOrg::BaseView *mCurrentView; // currently active event view | 108 | KOrg::BaseView *mCurrentView; // currently active event view |
109 | 109 | ||
110 | int mAgendaViewMode; | 110 | int mAgendaViewMode; |
111 | bool mFlagShowNextxDays; | 111 | bool mFlagShowNextxDays; |
112 | 112 | ||
113 | }; | 113 | }; |
114 | 114 | ||
115 | #endif | 115 | #endif |