summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/datenavigator.cpp15
-rw-r--r--korganizer/datenavigator.h3
-rw-r--r--korganizer/komonthview.cpp8
-rw-r--r--korganizer/komonthview.h3
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koviewmanager.cpp62
-rw-r--r--korganizer/koviewmanager.h2
-rw-r--r--korganizer/mainwindow.cpp12
-rw-r--r--korganizer/navigatorbar.cpp26
-rw-r--r--korganizer/navigatorbar.h4
13 files changed, 124 insertions, 19 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index a3ea5ee..3d8edfc 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,518 +1,520 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.8 ************ 3********** VERSION 2.0.8 ************
4 4
5Fixed a problem in dependency info in the ipk files for the Zaurus. 5Fixed a problem in dependency info in the ipk files for the Zaurus.
6 6
7Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar.
8
7 9
8********** VERSION 2.0.7 ************ 10********** VERSION 2.0.7 ************
9 11
10Added global application font settings 12Added global application font settings
11(for all KDE-Pim/Pi apps) to the general settings. 13(for all KDE-Pim/Pi apps) to the general settings.
12 14
13Fixed a problem in OM/Pi when trying to login to some IMAP servers 15Fixed a problem in OM/Pi when trying to login to some IMAP servers
14(like the IMAP server of Apple: mail.mac.com ) 16(like the IMAP server of Apple: mail.mac.com )
15 17
16Added recurring todos to KO/Pi. 18Added recurring todos to KO/Pi.
17 19
18 20
19********** VERSION 2.0.6 ************ 21********** VERSION 2.0.6 ************
20 22
21Some bugfixes in the pi-sync mode. 23Some bugfixes in the pi-sync mode.
22Added German translation for pi-sync mode. 24Added German translation for pi-sync mode.
23 25
24KO/Pi: 26KO/Pi:
25Made the todolist using alternate background. 27Made the todolist using alternate background.
26 28
27Other minor fixes in KO/Pi. 29Other minor fixes in KO/Pi.
28 30
29 31
30********** VERSION 2.0.5 ************ 32********** VERSION 2.0.5 ************
31 33
32Bugfixes in KO/Pi. 34Bugfixes in KO/Pi.
33 35
34********** VERSION 2.0.4 ************ 36********** VERSION 2.0.4 ************
35 37
36KO/Pi: 38KO/Pi:
37Fixed problem loading translations for summary/location edit boxes in event/todo editor. 39Fixed problem loading translations for summary/location edit boxes in event/todo editor.
38 40
39Added a general "select week number" to the toolbar. 41Added a general "select week number" to the toolbar.
40 42
41Fixed some small problem of the new features introduced in version 2.0.3. 43Fixed some small problem of the new features introduced in version 2.0.3.
42 44
43Made it possible to specify one specific category as category color, 45Made it possible to specify one specific category as category color,
44if more than one categories are selected. 46if more than one categories are selected.
45 47
46Fixed a bug in saving colors for categories with non-ascii characters. 48Fixed a bug in saving colors for categories with non-ascii characters.
47(Like, e.g. German Umlauts). 49(Like, e.g. German Umlauts).
48Propably you have to set your colors again for those categories. 50Propably you have to set your colors again for those categories.
49 51
50 52
51********** VERSION 2.0.3 ************ 53********** VERSION 2.0.3 ************
52 54
53KO/Pi: 55KO/Pi:
54Added feature for changing alarm settings for many items at once: 56Added feature for changing alarm settings for many items at once:
55Open list view (or search dialog), select the desired items and choose in 57Open list view (or search dialog), select the desired items and choose in
56the popup menu: Set alarm for selected... 58the popup menu: Set alarm for selected...
57 59
58Added to the event/todo viewer the option to send an email to 60Added to the event/todo viewer the option to send an email to
59all attendees or all selected (with RSVP) attendees. 61all attendees or all selected (with RSVP) attendees.
60 62
61Made the week-month mode changing in month view faster. 63Made the week-month mode changing in month view faster.
62 64
63Made month view better useable with keyboard. 65Made month view better useable with keyboard.
64Now TAB key jumps to next cell with an event/todo. 66Now TAB key jumps to next cell with an event/todo.
65Scroll in cell with coursor keys, scroll in time (next week) with 67Scroll in cell with coursor keys, scroll in time (next week) with
66Shift/Control + coursorkeys. 68Shift/Control + coursorkeys.
67 69
68Fixed bug that the todo view flat mode was reset after first view update. 70Fixed bug that the todo view flat mode was reset after first view update.
69 71
70If a todo is displayed closed in the todo view, 72If a todo is displayed closed in the todo view,
71it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. 73it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties.
72 74
73Added info about the numbers of years to the caption (title) information about a birthday event. 75Added info about the numbers of years to the caption (title) information about a birthday event.
74 76
75Made completion date in todo editor editable. 77Made completion date in todo editor editable.
76 78
77Added possibility to save/load templates for journals. 79Added possibility to save/load templates for journals.
78(Which is just a simple "save text to file" or "insert text from file". 80(Which is just a simple "save text to file" or "insert text from file".
79 81
80********** VERSION 2.0.2 ************ 82********** VERSION 2.0.2 ************
81 83
82KO/Pi: 84KO/Pi:
83Fixed the layout problem of the day label buttons 85Fixed the layout problem of the day label buttons
84of the agenda view introduced in version 2.0.1. 86of the agenda view introduced in version 2.0.1.
85 87
86Added WhatsThis support for the todo view and the list view. 88Added WhatsThis support for the todo view and the list view.
87 89
88Added a quite useful feature to the montview. 90Added a quite useful feature to the montview.
89Just click on the week numbers on the left. 91Just click on the week numbers on the left.
90And in the top right corner of month view/agenda view 92And in the top right corner of month view/agenda view
91there is now a "week number quick selector". 93there is now a "week number quick selector".
92(Click on the black triangle). 94(Click on the black triangle).
93 95
94Made the quite difficult timezone change in KO/Pi easy. 96Made the quite difficult timezone change in KO/Pi easy.
95 97
96OM/Pi: 98OM/Pi:
97Fixed too small icons on desktop. 99Fixed too small icons on desktop.
98Fixed non visible icons in mainwindow on Z with fastload enabled. 100Fixed non visible icons in mainwindow on Z with fastload enabled.
99Added signature file setting to smtp account config. 101Added signature file setting to smtp account config.
100And the signature can be edited and saved in the edit mail dialog. 102And the signature can be edited and saved in the edit mail dialog.
101That does mean: 103That does mean:
102Simply edit the signature for the selected smtp account in the 104Simply edit the signature for the selected smtp account in the
103edit new mail dialog and press the "save signature" button there. 105edit new mail dialog and press the "save signature" button there.
104Then the signature is saved to the file specified in the smtp account settings. 106Then the signature is saved to the file specified in the smtp account settings.
105If there is no file specified, it is saved automatically to the file 107If there is no file specified, it is saved automatically to the file
106kdepim/apps/kopiemail/<accountname>.sig. 108kdepim/apps/kopiemail/<accountname>.sig.
107 109
108 110
109 111
110********** VERSION 2.0.1 ************ 112********** VERSION 2.0.1 ************
111 113
112Oooops ... I forgot to test on the Zaurus 5500 ... 114Oooops ... I forgot to test on the Zaurus 5500 ...
113 115
114Fixed many problems of new (english) strings (and german translations) 116Fixed many problems of new (english) strings (and german translations)
115introduced in the latest versions, where the text was not fitting on the 117introduced in the latest versions, where the text was not fitting on the
116240x320 display of the Zaurus 5500. 118240x320 display of the Zaurus 5500.
117 119
118KO/Pi: 120KO/Pi:
119Added a popup menu ( press pen and hold to get popup ) to the agenda view 121Added a popup menu ( press pen and hold to get popup ) to the agenda view
120with many useful items (add event/todo, show next week, two weeks, month, journal). 122with many useful items (add event/todo, show next week, two weeks, month, journal).
121 123
122Added items to the todolist popup menu for: 124Added items to the todolist popup menu for:
123Display all opened, all closed or all todos flat. 125Display all opened, all closed or all todos flat.
124The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 126The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
125Made the reparenting of todos on the desktop possible via Drag&Drop. 127Made the reparenting of todos on the desktop possible via Drag&Drop.
126Fixed several bugs in setting the completed datetime for todos. 128Fixed several bugs in setting the completed datetime for todos.
127Added info about completed datetime of todos to the todo viewer. 129Added info about completed datetime of todos to the todo viewer.
128Now displaying a completed todo (with completed datetime set) in the agenda view 130Now displaying a completed todo (with completed datetime set) in the agenda view
129at the time of the completion. Such that now it is possible to see in the agenda view 131at the time of the completion. Such that now it is possible to see in the agenda view
130when what todo was completed. 132when what todo was completed.
131Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 133Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
132Now the behaviour is: 134Now the behaviour is:
133Setting a parent to complete sets all (sub)childs to complete. 135Setting a parent to complete sets all (sub)childs to complete.
134Setting a parent to uncomplete does not change the childs. 136Setting a parent to uncomplete does not change the childs.
135Setting a child to uncomplete sets all parent to uncomplete. 137Setting a child to uncomplete sets all parent to uncomplete.
136Setting a child to complete does not change the parents. 138Setting a child to complete does not change the parents.
137 139
138Smart updating and double buffering of the daymatrix. 140Smart updating and double buffering of the daymatrix.
139Showing holidays in the day matrix. 141Showing holidays in the day matrix.
140Many other small performance updates. 142Many other small performance updates.
141 143
142Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 144Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
143 145
144Now the translation file usertranslation.txt is supposed to be in utf8 format. 146Now the translation file usertranslation.txt is supposed to be in utf8 format.
145If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu. 147If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
146 148
147 149
148********** VERSION 2.0.0 ************ 150********** VERSION 2.0.0 ************
149 151
150Stable release 2.0.0! 152Stable release 2.0.0!
151 153
152KO/Pi: 154KO/Pi:
153Fixed problem in edit dialog recreation at startup. 155Fixed problem in edit dialog recreation at startup.
154Made "toggle view*" menu items enabled context sensitive. 156Made "toggle view*" menu items enabled context sensitive.
155Changed agenda size menu to items 1-10. 157Changed agenda size menu to items 1-10.
156Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 158Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
157Usebility enhancements in the KO/Pi menus. 159Usebility enhancements in the KO/Pi menus.
158Birthday import now adds year to summary. 160Birthday import now adds year to summary.
159What's Next view shows age in years for birthday. 161What's Next view shows age in years for birthday.
160 162
161OM/Pi: 163OM/Pi:
162Added three info lines to display subject, from and to of selected mails. 164Added three info lines to display subject, from and to of selected mails.
163 165
164KA/Pi: 166KA/Pi:
165Fixed jump bar behaviour on Zaurus. 167Fixed jump bar behaviour on Zaurus.
166Now KA/Pi search field supports searching for a range of starting characters. 168Now KA/Pi search field supports searching for a range of starting characters.
167E.g. to search for all contact beginning with b to n, type 169E.g. to search for all contact beginning with b to n, type
168b-n 170b-n
169in the search field. 171in the search field.
170 172
171********** VERSION 1.9.20 ************ 173********** VERSION 1.9.20 ************
172 174
173KO/Pi: 175KO/Pi:
174Added for the "dislplay one day" agenda mode 176Added for the "dislplay one day" agenda mode
175info in the caption and in the day lables: 177info in the caption and in the day lables:
176Now it is displayed, if the selected day is from "day before yesterday" 178Now it is displayed, if the selected day is from "day before yesterday"
177to "day after tomorrow". 179to "day after tomorrow".
178Made it possible to delete a Todo, which has sub-todos. 180Made it possible to delete a Todo, which has sub-todos.
179Fixed two small problems in the todo view. 181Fixed two small problems in the todo view.
180Added missing German translation for filter edit and print dialog. 182Added missing German translation for filter edit and print dialog.
181Made search dialog closeable by cancel key. 183Made search dialog closeable by cancel key.
182 184
183Made it possible to select in the date picker the (ligt grey ) 185Made it possible to select in the date picker the (ligt grey )
184dates of the prev./next month with the mouse. 186dates of the prev./next month with the mouse.
185 187
186OM/Pi: 188OM/Pi:
187"Delete mail" icon in main window now deletes all selected mails. 189"Delete mail" icon in main window now deletes all selected mails.
188Fixed the problem, that the state flag of imap mails was ignored. 190Fixed the problem, that the state flag of imap mails was ignored.
189Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 191Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
190to indecate that they are already seen. 192to indecate that they are already seen.
191Fixed the problem that the body of some mails was not displayed in the 193Fixed the problem that the body of some mails was not displayed in the
192mail viewer when fetching them from the imap server directly to read them. 194mail viewer when fetching them from the imap server directly to read them.
193Made it (configurable) possible to show the "To:" field in the list view. 195Made it (configurable) possible to show the "To:" field in the list view.
194Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 196Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
195Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 197Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
196local storage folder (specified in account settings) of the account of the mail. 198local storage folder (specified in account settings) of the account of the mail.
197Removed some memory leaks in OM/Pi. 199Removed some memory leaks in OM/Pi.
198 200
199 201
200********** VERSION 1.9.19 ************ 202********** VERSION 1.9.19 ************
201 203
202Added a lot of missing translations to KA/Pi, 204Added a lot of missing translations to KA/Pi,
203Added some missing translations to KO/Pi and OM/Pi. 205Added some missing translations to KO/Pi and OM/Pi.
204 206
205Fixed some minor problems in KA/Pi + KO/Pi. 207Fixed some minor problems in KA/Pi + KO/Pi.
206 208
207Fixed a crash when closing PwM/Pi. 209Fixed a crash when closing PwM/Pi.
208Added German translation for PwM/Pi. 210Added German translation for PwM/Pi.
209 211
210Made view change and Month View update faster in KO/Pi. 212Made view change and Month View update faster in KO/Pi.
211 213
212 214
213********** VERSION 1.9.18 ************ 215********** VERSION 1.9.18 ************
214 216
215FYI: The VERSION 1.9.17 was a testing release only. 217FYI: The VERSION 1.9.17 was a testing release only.
216Please read the changelog of VERSION 1.9.17 as well. 218Please read the changelog of VERSION 1.9.17 as well.
217 219
218Cleaned up the syncing config dialog. 220Cleaned up the syncing config dialog.
219Added sync config options for date range for events. 221Added sync config options for date range for events.
220Added sync config options for filters on incoming data. 222Added sync config options for filters on incoming data.
221Added sync config options for filters on outgoing data. 223Added sync config options for filters on outgoing data.
222Please read the updated SyncHowTo about the new filter settings. 224Please read the updated SyncHowTo about the new filter settings.
223These filter settings make it now possible to sync with shared 225These filter settings make it now possible to sync with shared
224calendars without writing back private or confidential data 226calendars without writing back private or confidential data
225(via the outgoing filters). 227(via the outgoing filters).
226To sync only with particular parts of a shared calendar, 228To sync only with particular parts of a shared calendar,
227the incoming filter settings can be used. 229the incoming filter settings can be used.
228An example can be found in the SyncHowTo. 230An example can be found in the SyncHowTo.
229Same for shared addressbooks. 231Same for shared addressbooks.
230 232
231Added a setting for the global kdepim data storage. 233Added a setting for the global kdepim data storage.
232Usually the data is stored in (yourhomedir/kdepim). 234Usually the data is stored in (yourhomedir/kdepim).
233Now you can set in the Global config dialog TAB, subTAB "Data storage path" 235Now you can set in the Global config dialog TAB, subTAB "Data storage path"
234a directory where all the kdepim data is stored. 236a directory where all the kdepim data is stored.
235That makes it easy to save all kdepim data on a SD card on the Z, for example. 237That makes it easy to save all kdepim data on a SD card on the Z, for example.
236 238
237KO/Pi: 239KO/Pi:
238The timeedit input has a pulldown list for times. 240The timeedit input has a pulldown list for times.
239If opened, this pulldown list should now has the right time highlighted. 241If opened, this pulldown list should now has the right time highlighted.
240Added the possibility to exclude events/todos/journals in a filter. 242Added the possibility to exclude events/todos/journals in a filter.
241You should exclude journals, if you do not want them to sync with a public calendar. 243You should exclude journals, if you do not want them to sync with a public calendar.
242 244
243KA/Pi: 245KA/Pi:
244Added the possibility to in/exclude public/private/confidential contacts to a filter. 246Added the possibility to in/exclude public/private/confidential contacts to a filter.
245If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 247If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
246Added printing of card view and details view on desktop. 248Added printing of card view and details view on desktop.
247Printing of list view is not working... 249Printing of list view is not working...
248Added button for removing pictures in contact editor. 250Added button for removing pictures in contact editor.
249Parsing data fix of KA/Pi version 1.9.17. 251Parsing data fix of KA/Pi version 1.9.17.
250Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 252Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
251Fixed some syncing merging problems. 253Fixed some syncing merging problems.
252 254
253 255
254********** VERSION 1.9.17 ************ 256********** VERSION 1.9.17 ************
255 257
256KO/Pi: 258KO/Pi:
257Fixed that tooltips were not updated after moving an item in agenda view. 259Fixed that tooltips were not updated after moving an item in agenda view.
258Fixed a bug in sorting start date for recurring events in list view. 260Fixed a bug in sorting start date for recurring events in list view.
259Changed the left button in todo viewer from "Agenda" to "Set completed". 261Changed the left button in todo viewer from "Agenda" to "Set completed".
260This 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. 262This 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.
261Added more info in the todo viewer: Startdate, parent/sub todos. 263Added more info in the todo viewer: Startdate, parent/sub todos.
262 264
263 265
264KA/Pi: 266KA/Pi:
265All fields search does now actually search all the (possible) fields, 267All fields search does now actually search all the (possible) fields,
266not only those listed in the contact list. 268not only those listed in the contact list.
267Made is possible to inline a picture in a vcard on the Z. 269Made is possible to inline a picture in a vcard on the Z.
268This was only possible on the desktop, now is it possible on the Z as well. 270This was only possible on the desktop, now is it possible on the Z as well.
269Fixed of missing save settings after filter configuration. 271Fixed of missing save settings after filter configuration.
270Made saving of addressbook much faster. 272Made saving of addressbook much faster.
271Fixed extension widget layout problem. 273Fixed extension widget layout problem.
272Fixed saving of default formatted name settings. 274Fixed saving of default formatted name settings.
273Fixed formatted name handling in edit dialog. 275Fixed formatted name handling in edit dialog.
274Added an option for changing formatted names of many contacts 276Added an option for changing formatted names of many contacts
275(menu: File - Change - Set formatted name). 277(menu: File - Change - Set formatted name).
276 278
277QWhatsThis was not working on the Z ( only black rectangle was shown). 279QWhatsThis was not working on the Z ( only black rectangle was shown).
278This is Fixed. 280This is Fixed.
279 281
280KDE-Sync: 282KDE-Sync:
281Now readonly KDE resources are synced as well. 283Now readonly KDE resources are synced as well.
282(They are not changed in KDE itself, of course). 284(They are not changed in KDE itself, of course).
283 285
284 286
285 287
286********** VERSION 1.9.16 ************ 288********** VERSION 1.9.16 ************
287 289
288KO/Pi: 290KO/Pi:
289Fixed search dialog size on Z 6000 (480x640 display). 291Fixed search dialog size on Z 6000 (480x640 display).
290Added setting to hide/show time in agenda items. 292Added setting to hide/show time in agenda items.
291Added setting to hide not running todos in todo view. 293Added setting to hide not running todos in todo view.
292Added columns for start date/time in todo view. 294Added columns for start date/time in todo view.
293Replaced the solid half-hour lines in agenda view by dot lines. 295Replaced the solid half-hour lines in agenda view by dot lines.
294Added possibility of printing the What's Next View on the desktop 296Added possibility of printing the What's Next View on the desktop
295(i.e. Windows and Linux). 297(i.e. Windows and Linux).
296Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 298Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
297Added tooltips in month view.(Tooltips only available on desktop) 299Added tooltips in month view.(Tooltips only available on desktop)
298 300
299Fixed a strange problem in KO/Pi alarm applet. 301Fixed a strange problem in KO/Pi alarm applet.
300Did not find the actual problem, 302Did not find the actual problem,
301such that now Qtopia reboots again if deinstalling the alarm applet. 303such that now Qtopia reboots again if deinstalling the alarm applet.
302But the alarm applet should work again. 304But the alarm applet should work again.
303 305
304KA/Pi: 306KA/Pi:
305Fixed the problem, that internal pictures were not saved. 307Fixed the problem, that internal pictures were not saved.
306 308
307Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 309Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
308 310
309Fixed some minor problems. (Like word wrap in help text windows). 311Fixed some minor problems. (Like word wrap in help text windows).
310 312
311Fixed a compiling problem in microkde/kresources. 313Fixed a compiling problem in microkde/kresources.
312 314
313KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 315KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
314This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 316This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
315such that now syncing KO/Pi with Sharp DTM should work on the 317such that now syncing KO/Pi with Sharp DTM should work on the
316Zaurus C 3000 model. 318Zaurus C 3000 model.
317 319
318********** VERSION 1.9.15 ************ 320********** VERSION 1.9.15 ************
319 321
320Usebilty enhancements in KO/Pi: 322Usebilty enhancements in KO/Pi:
321When clicking on the date in a month view cell, the day view is shown. 323When clicking on the date in a month view cell, the day view is shown.
322Old behaviour was, that the "new event" dialog popped up. 324Old behaviour was, that the "new event" dialog popped up.
323 325
324Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 326Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
325That means, you can restore the latest 327That means, you can restore the latest
326event/todo/journal you have deleted. 328event/todo/journal you have deleted.
327A journal is deleted, if you clear all the text of the journal. 329A journal is deleted, if you clear all the text of the journal.
328 330
329Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 331Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
330 332
331KA/Pi starting in 480x640 resolution: 333KA/Pi starting in 480x640 resolution:
332Hide the filter action in toolbar 334Hide the filter action in toolbar
333and added icons for undo/delete/redo in toolbar. 335and added icons for undo/delete/redo in toolbar.
334 336
335Change in OM/Pi ViewMail dialog: 337Change in OM/Pi ViewMail dialog:
336When clicking on the "delete" icon the mail is deleted after confirmation as usual. 338When clicking on the "delete" icon the mail is deleted after confirmation as usual.
337But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 339But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
338 340
339Fixed a crash when deleting mail-accounts in OM/Pi. 341Fixed a crash when deleting mail-accounts in OM/Pi.
340 342
341 343
342********** VERSION 1.9.14 ************ 344********** VERSION 1.9.14 ************
343 345
344Fixed some problems with the dialog sizes when switching 346Fixed some problems with the dialog sizes when switching
345portrait/landscape mode on 640x480 PDA display. 347portrait/landscape mode on 640x480 PDA display.
346 348
347Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 349Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
348 350
349Fixed an ugly bug in KOpieMail: 351Fixed an ugly bug in KOpieMail:
350KOpieMail was not able to write files (mails) to MSDOS file system, 352KOpieMail was not able to write files (mails) to MSDOS file system,
351like on an usual preformatted SD card. That should work now. 353like on an usual preformatted SD card. That should work now.
352To save your mail data on the Sd card do the following: 354To save your mail data on the Sd card do the following:
353Create a dir on the SD card: 355Create a dir on the SD card:
354mkdir /mnt/card/localmail 356mkdir /mnt/card/localmail
355Go to your home dir: 357Go to your home dir:
356cd 358cd
357Go to kopiemail data storage dir: 359Go to kopiemail data storage dir:
358cd kdepim/apps/kopiemail 360cd kdepim/apps/kopiemail
359Create a symlink to the SD card: 361Create a symlink to the SD card:
360ls -s /mnt/card/localmail 362ls -s /mnt/card/localmail
361Now KOpieMail will store all mails on the SD card. 363Now KOpieMail will store all mails on the SD card.
362 364
363KO/Pi Monthview: 365KO/Pi Monthview:
364Now "Go to Today" selects the current month from day 1-end, 366Now "Go to Today" selects the current month from day 1-end,
365not the current date + some days. 367not the current date + some days.
366I.e. "Go to Today" shows now always 368I.e. "Go to Today" shows now always
367the current month with first day of month in the first row. 369the current month with first day of month in the first row.
368 370
369Added missing German translation. 371Added missing German translation.
370 372
371Fixed icons of executeable on Wintendo. 373Fixed icons of executeable on Wintendo.
372 374
373Added a "Show next Mail" button to the OM/Pi 375Added a "Show next Mail" button to the OM/Pi
374mail viewer such that the mail below the current mail 376mail viewer such that the mail below the current mail
375in the mail list view of the current folder 377in the mail list view of the current folder
376can be read with a single click. 378can be read with a single click.
377 379
378 380
379********** VERSION 1.9.13 ************ 381********** VERSION 1.9.13 ************
380 382
381Fixed nasty PwM/Pi file reading bug, when 383Fixed nasty PwM/Pi file reading bug, when
382the used hash algo of file is different then the global 384the used hash algo of file is different then the global
383hash algo. 385hash algo.
384 386
385Added KA/Pi support for opie mailit mailapplication. 387Added KA/Pi support for opie mailit mailapplication.
386 388
387Fixed some bugs in OM/Pi. 389Fixed some bugs in OM/Pi.
388Now character conversion tables are available for the Zaurus 390Now character conversion tables are available for the Zaurus
389to make OM/Pi working properly. 391to make OM/Pi working properly.
390To get the character conversion in OM/Pi working, please download 392To get the character conversion in OM/Pi working, please download
391at the sourceforge project site the package 393at the sourceforge project site the package
392sr-character-conversion_SharpROM_arm.ipk.zip 394sr-character-conversion_SharpROM_arm.ipk.zip
393(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 395(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
394from the section "general files for KDE/Pim" 396from the section "general files for KDE/Pim"
395Instructions how to install this package are in a ReadMe in this file. 397Instructions how to install this package are in a ReadMe in this file.
396 398
397 399
398Fixed the orientation change problem in KA/Pi when switching 400Fixed the orientation change problem in KA/Pi when switching
399portrait/landscape mode. 401portrait/landscape mode.
400 402
401French translation available for KA/Pi and OM/Pi. 403French translation available for KA/Pi and OM/Pi.
402 404
403Fixed some problems with categories in KO/Pi in DTM sync. 405Fixed some problems with categories in KO/Pi in DTM sync.
404 406
405Added selection dialog for export to phone in KA/Pi. 407Added selection dialog for export to phone in KA/Pi.
406 408
407If in KO/Pi is an attendee selected to add to a meeting and this 409If in KO/Pi is an attendee selected to add to a meeting and this
408attendee is already in the list of attendees, this person is not added 410attendee is already in the list of attendees, this person is not added
409again. 411again.
410 412
411Some menu cleanup in KA/Pi. 413Some menu cleanup in KA/Pi.
412 414
413********** VERSION 1.9.12 ************ 415********** VERSION 1.9.12 ************
414 416
415Fix for the bug in KO/Pi What's Next view of version 1.9.11. 417Fix for the bug in KO/Pi What's Next view of version 1.9.11.
416 418
417Bugfix: Licence file is now shown again. 419Bugfix: Licence file is now shown again.
418 420
419OM/Pi now supports Unicode (utf8 charset). 421OM/Pi now supports Unicode (utf8 charset).
420Fixed some bugs in OM/Pi. 422Fixed some bugs in OM/Pi.
421 423
422KA/Pi has more German translation. 424KA/Pi has more German translation.
423 425
424 426
425********** VERSION 1.9.11 ************ 427********** VERSION 1.9.11 ************
426 428
427Fixed several problems in PWM/Pi, like 429Fixed several problems in PWM/Pi, like
428asking the user, if unsaved changed are pending 430asking the user, if unsaved changed are pending
429when closing the app. 431when closing the app.
430And PwM/Pi handles now different texts for the 432And PwM/Pi handles now different texts for the
431fields Description, Username, Password, configurable per category. 433fields Description, Username, Password, configurable per category.
432 434
433Fixed a crash in KO/Pi , when importing/loading vcs files 435Fixed a crash in KO/Pi , when importing/loading vcs files
434which have an entry with an attendee with state: 436which have an entry with an attendee with state:
435NEEDS ACTION 437NEEDS ACTION
436 438
437Fixed some problems in the German translation of OM/Pi, 439Fixed some problems in the German translation of OM/Pi,
438which makes some dialogs not fitting on the screen 440which makes some dialogs not fitting on the screen
439of the Z 5500. 441of the Z 5500.
440 442
441Fixed Qtopia crash, when disabling/deinstalling 443Fixed Qtopia crash, when disabling/deinstalling
442KO/Pi alarm applet. 444KO/Pi alarm applet.
443 445
444Implemented direct KDE<->KA/Pi sync for KA/Pi running 446Implemented direct KDE<->KA/Pi sync for KA/Pi running
445on Linux desktop. 447on Linux desktop.
446 448
447Added feature "remove sync info" to sync menu. 449Added feature "remove sync info" to sync menu.
448 450
449Tweaked the KO/Pi What's next view a bit, added 451Tweaked the KO/Pi What's next view a bit, added
450setting to hide events that are done. 452setting to hide events that are done.
451 453
452Disabled "beam receive enabled" on startup to 454Disabled "beam receive enabled" on startup to
453avoid problems if Fastload is enabled. 455avoid problems if Fastload is enabled.
454Please set "beam receive enabled", 456Please set "beam receive enabled",
455if you want to receive data via IR. 457if you want to receive data via IR.
456 458
457Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 459Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
458on Linux desktop. 460on Linux desktop.
459 461
460Made in KA/Pi scrolling possible, if details view is selected. 462Made in KA/Pi scrolling possible, if details view is selected.
461(The keyboard focus is set automatically to the search line) 463(The keyboard focus is set automatically to the search line)
462 464
463Fixed a bug in DMT sync, that a new entry in DTM was added 465Fixed a bug in DMT sync, that a new entry in DTM was added
464on every sync to Kx/Pi. 466on every sync to Kx/Pi.
465 467
466Fixed missing writing of KA/Pi categories to DMT entries when syncing. 468Fixed missing writing of KA/Pi categories to DMT entries when syncing.
467 469
468Fixed a bug in DMT sync with todos created in KO/Pi containing 470Fixed a bug in DMT sync with todos created in KO/Pi containing
469non-latin1 characters. 471non-latin1 characters.
470 472
471Rearranged package contents of Sharp-ipks and made all 473Rearranged package contents of Sharp-ipks and made all
472packages installable on SD again. 474packages installable on SD again.
473 475
474Fixed the writing of addressbook data in DTM sync. 476Fixed the writing of addressbook data in DTM sync.
475Empty fields in KA/Pi were not removed. 477Empty fields in KA/Pi were not removed.
476 478
477Added better category handling in KA/Pi: 479Added better category handling in KA/Pi:
478Added item 480Added item
479Edit Categories and 481Edit Categories and
480Manage new categories 482Manage new categories
481to the settings menu. 483to the settings menu.
482Possible to configure a view to display categories. 484Possible to configure a view to display categories.
483 485
484Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 486Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
485 487
486Fixed displaying of "free" days and time in KO Monthview and Agendaview. 488Fixed displaying of "free" days and time in KO Monthview and Agendaview.
487 489
488... and many other bugfixes. 490... and many other bugfixes.
489 491
490********** VERSION 1.9.10 ************ 492********** VERSION 1.9.10 ************
491 493
492Many internal small bugfixes. 494Many internal small bugfixes.
493And fix of the "big" bug in KO/Pi, 495And fix of the "big" bug in KO/Pi,
494that after Syncing the appointments had an offset by several hours. 496that after Syncing the appointments had an offset by several hours.
495That was a problem with the internal timezone setting, 497That was a problem with the internal timezone setting,
496introduced by the changed timezone configuration settings. 498introduced by the changed timezone configuration settings.
497 499
498German translation for OM/Pi is now available. 500German translation for OM/Pi is now available.
499 501
500 502
501********** VERSION 1.9.9 ************ 503********** VERSION 1.9.9 ************
502 504
503KDE-Pim/Pi has a new Member! 505KDE-Pim/Pi has a new Member!
504It is called PWM/Pi (Passwordmanager/platform-independent) 506It is called PWM/Pi (Passwordmanager/platform-independent)
505and it is available for the Zaurus. 507and it is available for the Zaurus.
506It is planned, that it will be available later for Windows. 508It is planned, that it will be available later for Windows.
507(And for Linux, of course). 509(And for Linux, of course).
508It is a port of the Passwordmanager of KDE. 510It is a port of the Passwordmanager of KDE.
509It will need the MicroKDElibs to run. 511It will need the MicroKDElibs to run.
510 512
511Made loading of addressbooks in KA/Pi up to 7 times faster! 513Made loading of addressbooks in KA/Pi up to 7 times faster!
512The bigger your addressbook file, the more starting speed 514The bigger your addressbook file, the more starting speed
513will you gain. (relatively) 515will you gain. (relatively)
514 516
515The Qtopia addressbook connector is now platform independend 517The Qtopia addressbook connector is now platform independend
516as well and should work on any platform for importing/exporting 518as well and should work on any platform for importing/exporting
517Qtopia and Opie XML files. 519Qtopia and Opie XML files.
518 520
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 2d4cb74..5f1bee4 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -762,523 +762,523 @@
762{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, 762{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" },
763{ "Current","Aktuelle" }, 763{ "Current","Aktuelle" },
764{ "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, 764{ "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" },
765{ "All","Alle" }, 765{ "All","Alle" },
766{ "Data Loss Warning","Datenverlust Warnung" }, 766{ "Data Loss Warning","Datenverlust Warnung" },
767{ "Proceed","Weitermachen" }, 767{ "Proceed","Weitermachen" },
768{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, 768{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" },
769{ "Filter disabled ","Filter abgeschaltet" }, 769{ "Filter disabled ","Filter abgeschaltet" },
770{ "Filter selected: ","Gewählter Filter: " }, 770{ "Filter selected: ","Gewählter Filter: " },
771{ "Toggle Cancel","Gecancelt ändern" }, 771{ "Toggle Cancel","Gecancelt ändern" },
772{ "&Toggle Cancel","Gecancel&t ändern" }, 772{ "&Toggle Cancel","Gecancel&t ändern" },
773{ "Configure Toolbar","Konfiguriere Toolbar" }, 773{ "Configure Toolbar","Konfiguriere Toolbar" },
774{ "Stretched TB","Gedehnte TB" }, 774{ "Stretched TB","Gedehnte TB" },
775{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, 775{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" },
776{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, 776{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" },
777{ "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, 777{ "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" },
778{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, 778{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" },
779{ "Imported file successfully","Datei erfolgreich importiert" }, 779{ "Imported file successfully","Datei erfolgreich importiert" },
780{ "Error importing file","Fehler beim Importieren der Datei" }, 780{ "Error importing file","Fehler beim Importieren der Datei" },
781{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, 781{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
782{ "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, 782{ "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" },
783{ "Overwrite!","Überschreiben!" }, 783{ "Overwrite!","Überschreiben!" },
784{ "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, 784{ "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" },
785{ "Load backup filename","Lade Backup Dateiname" }, 785{ "Load backup filename","Lade Backup Dateiname" },
786{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, 786{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
787{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, 787{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
788{ "Save backup filename","Speichere Backup Dateiname" }, 788{ "Save backup filename","Speichere Backup Dateiname" },
789{ "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, 789{ "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" },
790{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 790{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
791{ "Details of attendee","Teilnehmerdetails" }, 791{ "Details of attendee","Teilnehmerdetails" },
792{ "Work phone:\n","Telefon Arbeit:\n" }, 792{ "Work phone:\n","Telefon Arbeit:\n" },
793{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, 793{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
794{ "Home phone:\n","Telefon privat:\n" }, 794{ "Home phone:\n","Telefon privat:\n" },
795{ "Mobile home phone:\n","Mobiltelefon privat:\n" }, 795{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
796{ "Email:\n","Email:\n" }, 796{ "Email:\n","Email:\n" },
797{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, 797{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
798{ "Audio Al.: ","Audio Al.: " }, 798{ "Audio Al.: ","Audio Al.: " },
799{ "Proc.Al.: ","Proz.Al.: " }, 799{ "Proc.Al.: ","Proz.Al.: " },
800{ "No sound set","Kein Sound definiert" }, 800{ "No sound set","Kein Sound definiert" },
801{ "*.wav|Wav Files","*.wav|Wav Dateien" }, 801{ "*.wav|Wav Files","*.wav|Wav Dateien" },
802{ "No program set","Kein Programm definiert" }, 802{ "No program set","Kein Programm definiert" },
803{ "Running '%1'","Ausführen '%1'" }, 803{ "Running '%1'","Ausführen '%1'" },
804{ "Playing '%1'","Abspielen '%1'" }, 804{ "Playing '%1'","Abspielen '%1'" },
805{ "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, 805{ "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" },
806{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, 806{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
807{ "Load!","Laden!" }, 807{ "Load!","Laden!" },
808{ "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, 808{ "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" },
809{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, 809{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
810{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, 810{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
811{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, 811{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
812{ "Features + hints...","Eigenschaften + Tipps..." }, 812{ "Features + hints...","Eigenschaften + Tipps..." },
813{ "User translation...","Benutzer Übersetzung..." }, 813{ "User translation...","Benutzer Übersetzung..." },
814{ "Sync HowTo...","Synchronisation HowTo..." }, 814{ "Sync HowTo...","Synchronisation HowTo..." },
815{ "Print calendar...","Drucke Kalender..." }, 815{ "Print calendar...","Drucke Kalender..." },
816{ "Anniversary","Jahrestag" }, 816{ "Anniversary","Jahrestag" },
817{ "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, 817{ "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" },
818{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, 818{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
819{ "Next recurrence is on: ","Nächste Wiederholung ist am:" }, 819{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
820{ "<b>Alarm on: </b>","<b>Alarm am: </b>" }, 820{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
821{ "<b>Access: </b>","<b>Zugriff: </b>" }, 821{ "<b>Access: </b>","<b>Zugriff: </b>" },
822{ "(%1 min before)","(%1 min vorher)" }, 822{ "(%1 min before)","(%1 min vorher)" },
823{ "<b>Categories: </b>","<b>Kategorien: </b>" }, 823{ "<b>Categories: </b>","<b>Kategorien: </b>" },
824{ "Save Journal/Description...","Speichere Journal/Details..." }, 824{ "Save Journal/Description...","Speichere Journal/Details..." },
825{ "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, 825{ "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." },
826{ "Continue","Weitermachen" }, 826{ "Continue","Weitermachen" },
827{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, 827{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" },
828{ "Attendee:","Teilnehmer:" }, 828{ "Attendee:","Teilnehmer:" },
829{ "Click OK to search ->","Klicke zum Suchen auf OK ->" }, 829{ "Click OK to search ->","Klicke zum Suchen auf OK ->" },
830{ "On day ","Am Tag " }, 830{ "On day ","Am Tag " },
831{ "%1 of ","%1 des Monats" }, 831{ "%1 of ","%1 des Monats" },
832{ "%1 of the year","%1 des Jahres" }, 832{ "%1 of the year","%1 des Jahres" },
833{ "Anonymous","Anonymo" }, 833{ "Anonymous","Anonymo" },
834{ "nobody@nowhere","niemand@nirgendwo" }, 834{ "nobody@nowhere","niemand@nirgendwo" },
835{ "calendar.html","calendar.html" }, 835{ "calendar.html","calendar.html" },
836{ " Local Time"," Locale Zeit" }, 836{ " Local Time"," Locale Zeit" },
837{ "Unknown Name","Unbekannter Name" }, 837{ "Unknown Name","Unbekannter Name" },
838{ "unknown@nowhere","unbekannt@nirgendwo" }, 838{ "unknown@nowhere","unbekannt@nirgendwo" },
839{ "Beam via IR!","Beam via IR!" }, 839{ "Beam via IR!","Beam via IR!" },
840{ "Next Month","Nächster Monat" }, 840{ "Next Month","Nächster Monat" },
841{ "Prio","Prio" }, 841{ "Prio","Prio" },
842{ "Reparent Todo","Mache Sub-Todo" }, 842{ "Reparent Todo","Mache Sub-Todo" },
843{ "tomorrow","morgen" }, 843{ "tomorrow","morgen" },
844{ "today","heute" }, 844{ "today","heute" },
845{ "yesterday","gestern" }, 845{ "yesterday","gestern" },
846{ "Ok","Ok" }, 846{ "Ok","Ok" },
847{ "Ok+Agenda","Ok+Agenda" }, 847{ "Ok+Agenda","Ok+Agenda" },
848{ "Email","Email" }, 848{ "Email","Email" },
849{ "RSVP","RSVP" }, 849{ "RSVP","RSVP" },
850{ "Email:","Email:" }, 850{ "Email:","Email:" },
851{ "Appointment Time ","Termin Zeit " }, 851{ "Appointment Time ","Termin Zeit " },
852{ "2","2" }, 852{ "2","2" },
853{ "3","3" }, 853{ "3","3" },
854{ "4","4" }, 854{ "4","4" },
855{ " 0 %"," 0 %" }, 855{ " 0 %"," 0 %" },
856{ " 20 %"," 20 %" }, 856{ " 20 %"," 20 %" },
857{ " 40 %"," 40 %" }, 857{ " 40 %"," 40 %" },
858{ " 60 %"," 60 %" }, 858{ " 60 %"," 60 %" },
859{ " 80 %"," 80 %" }, 859{ " 80 %"," 80 %" },
860{ "100 %","100 %" }, 860{ "100 %","100 %" },
861{ "Filter","Filter" }, 861{ "Filter","Filter" },
862{ "Configure","Konfiguriere" }, 862{ "Configure","Konfiguriere" },
863{ "What's Next","What's Next" }, 863{ "What's Next","What's Next" },
864{ "Complete calendar...","Kompletten Kalender..." }, 864{ "Complete calendar...","Kompletten Kalender..." },
865{ "Filtered calendar...","Gefilterten Kalender..." }, 865{ "Filtered calendar...","Gefilterten Kalender..." },
866{ "Export to phone","Exportiere zum Handy" }, 866{ "Export to phone","Exportiere zum Handy" },
867{ "Beam receive enabled","Beam Empfang an" }, 867{ "Beam receive enabled","Beam Empfang an" },
868{ "What's new?","Was ist neu?" }, 868{ "What's new?","Was ist neu?" },
869{ "FAQ...","FAQ..." }, 869{ "FAQ...","FAQ..." },
870{ "Licence...","Licence..." }, 870{ "Licence...","Licence..." },
871{ "What's This?","What's This?" }, 871{ "What's This?","What's This?" },
872{ "&Edit...","&Editiere..." }, 872{ "&Edit...","&Editiere..." },
873{ "Oktober","Oktober" }, 873{ "Oktober","Oktober" },
874{ "Title","Titel" }, 874{ "Title","Titel" },
875{ "%1 %","%1 %" }, 875{ "%1 %","%1 %" },
876{ "Enable Pi-Sync","Schalte Pi-Sync an" }, 876{ "Enable Pi-Sync","Schalte Pi-Sync an" },
877{ "Import!","Importiere!" }, 877{ "Import!","Importiere!" },
878{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, 878{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" },
879{ "Export to phone options","Export ans Handy Optionen" }, 879{ "Export to phone options","Export ans Handy Optionen" },
880{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 880{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
881{ "I/O device: ","I/O device: " }, 881{ "I/O device: ","I/O device: " },
882{ "Connection: ","Connection: " }, 882{ "Connection: ","Connection: " },
883{ "Model(opt.): ","Model(opt.): " }, 883{ "Model(opt.): ","Model(opt.): " },
884{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, 884{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" },
885{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, 885{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " },
886{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, 886{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" },
887{ "Export to mobile phone!","Exportiere auf das Handy!" }, 887{ "Export to mobile phone!","Exportiere auf das Handy!" },
888{ "Export complete calendar","Exportiere kompletten Kalender" }, 888{ "Export complete calendar","Exportiere kompletten Kalender" },
889{ "Writing to phone...","Sende Daten ans Handy..." }, 889{ "Writing to phone...","Sende Daten ans Handy..." },
890{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 890{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
891{ "Retry","Nochmal versuchen" }, 891{ "Retry","Nochmal versuchen" },
892{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 892{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
893{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 893{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
894{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 894{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
895{ "Export filtered calendar","Exportiere gefilterten Kalender" }, 895{ "Export filtered calendar","Exportiere gefilterten Kalender" },
896{ "Preferences","Vorlieben" }, 896{ "Preferences","Vorlieben" },
897{ "Global","Global" }, 897{ "Global","Global" },
898{ "Phone","Phone" }, 898{ "Phone","Phone" },
899{ "SMS","SMS" }, 899{ "SMS","SMS" },
900{ "Fax","Fax" }, 900{ "Fax","Fax" },
901{ "Pager","Pager" }, 901{ "Pager","Pager" },
902{ "SIP","SIP" }, 902{ "SIP","SIP" },
903{ "Italian","Italienisch" }, 903{ "Italian","Italienisch" },
904{ "24:00","24:00" }, 904{ "24:00","24:00" },
905{ "12:00am","12:00am" }, 905{ "12:00am","12:00am" },
906{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 906{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
907{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 907{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
908{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 908{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
909{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 909{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
910{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 910{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
911{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 911{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
912{ "Used Mail Client","Benutzter Mail Client" }, 912{ "Used Mail Client","Benutzter Mail Client" },
913{ "Channel:","Channel:" }, 913{ "Channel:","Channel:" },
914{ "Message:","Message:" }, 914{ "Message:","Message:" },
915{ "Parameters:","Parameter:" }, 915{ "Parameters:","Parameter:" },
916{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 916{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
917{ "extra Message:","extra Message:" }, 917{ "extra Message:","extra Message:" },
918{ "extra Parameters:","extra Parameter:" }, 918{ "extra Parameters:","extra Parameter:" },
919{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 919{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
920{ "External Apps.","Externe Appl." }, 920{ "External Apps.","Externe Appl." },
921{ "24 hours","24 Std." }, 921{ "24 hours","24 Std." },
922{ "3 hours","3 Std." }, 922{ "3 hours","3 Std." },
923{ "1 hour","1 Std." }, 923{ "1 hour","1 Std." },
924{ "15 minutes","15 Min." }, 924{ "15 minutes","15 Min." },
925{ "5 minutes","5 Min." }, 925{ "5 minutes","5 Min." },
926{ "1 minute","1 Min." }, 926{ "1 minute","1 Min." },
927{ "23","23" }, 927{ "23","23" },
928{ "Mon 15","Mon 15" }, 928{ "Mon 15","Mon 15" },
929{ "Configure KO","Konfiguriere KO" }, 929{ "Configure KO","Konfiguriere KO" },
930{ "Event text","Termin Text" }, 930{ "Event text","Termin Text" },
931{ "ToDo","ToDo" }, 931{ "ToDo","ToDo" },
932{ "Today","Heute" }, 932{ "Today","Heute" },
933{ "What's Next View","What's Next Ansicht" }, 933{ "What's Next View","What's Next Ansicht" },
934{ "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, 934{ "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" },
935{ "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, 935{ "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" },
936{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, 936{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
937{ "Alarm","Alarm" }, 937{ "Alarm","Alarm" },
938{ "Used %1 Client","Benutzter %1 Client" }, 938{ "Used %1 Client","Benutzter %1 Client" },
939{ "No email client installed","Kein Email Klient installiert" }, 939{ "No email client installed","Kein Email Klient installiert" },
940{ "Userdefined email client","Benutzerdef. Email Klient" }, 940{ "Userdefined email client","Benutzerdef. Email Klient" },
941{ "OM/Pi email client","OM/Pi Email Klient" }, 941{ "OM/Pi email client","OM/Pi Email Klient" },
942{ "Include in multiple ","Beziehe in multiple " }, 942{ "Include in multiple ","Beziehe in multiple " },
943{ "calendar ","Kalender " }, 943{ "calendar ","Kalender " },
944{ "addressbook ","Adressbuch " }, 944{ "addressbook ","Adressbuch " },
945{ "pwmanager","PWmanager" }, 945{ "pwmanager","PWmanager" },
946{ " sync"," Sync ein" }, 946{ " sync"," Sync ein" },
947{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 947{ "Write back synced data","Schreibe gesyncte Daten zurück" },
948{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 948{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
949{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 949{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
950{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 950{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
951{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 951{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
952{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 952{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
953{ "Help...","Hilfe..." }, 953{ "Help...","Hilfe..." },
954{ "Local file Cal:","Lokale Datei Kal:" }, 954{ "Local file Cal:","Lokale Datei Kal:" },
955{ "Local file ABook:","Lokale Datei ABuch:" }, 955{ "Local file ABook:","Lokale Datei ABuch:" },
956{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 956{ "Local file PWMgr:","Lokale Datei PWMgr:" },
957{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 957{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
958{ "Calendar:","Kalender:" }, 958{ "Calendar:","Kalender:" },
959{ "AddressBook:","AdressBuch:" }, 959{ "AddressBook:","AdressBuch:" },
960{ "PWManager:","PWManager:" }, 960{ "PWManager:","PWManager:" },
961{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 961{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
962{ "ssh/scp","ssh/scp" }, 962{ "ssh/scp","ssh/scp" },
963{ "ftp","ftp" }, 963{ "ftp","ftp" },
964{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 964{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
965{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 965{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
966{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 966{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
967{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 967{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
968{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 968{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
969{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 969{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
970{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 970{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
971{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 971{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
972{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 972{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
973{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 973{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
974{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 974{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
975{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 975{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
976{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 976{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
977{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 977{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
978{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 978{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
979{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, 979{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
980{ "KDE-Pim Sync","KDE-Pim Sync" }, 980{ "KDE-Pim Sync","KDE-Pim Sync" },
981{ "Multiple profiles","Multi-Sync Profile" }, 981{ "Multiple profiles","Multi-Sync Profile" },
982{ "Device: ","Gerät: " }, 982{ "Device: ","Gerät: " },
983{ "Multiple sync started.","Multi-Sync gestartet." }, 983{ "Multiple sync started.","Multi-Sync gestartet." },
984{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 984{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
985{ "Turn filter on","Schalte Filter an" }, 985{ "Turn filter on","Schalte Filter an" },
986{ "Turn filter off","Schalte Filter aus" }, 986{ "Turn filter off","Schalte Filter aus" },
987{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 987{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
988{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 988{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
989{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 989{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
990{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, 990{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" },
991{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, 991{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" },
992{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, 992{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" },
993{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, 993{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" },
994{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, 994{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" },
995{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, 995{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" },
996{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 996{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
997{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 997{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
998{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 998{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
999{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 999{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
1000{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 1000{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
1001{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, 1001{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" },
1002{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, 1002{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" },
1003{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 1003{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
1004{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, 1004{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" },
1005{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 1005{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
1006{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, 1006{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" },
1007{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 1007{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
1008{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, 1008{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" },
1009{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, 1009{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" },
1010{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 1010{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
1011{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, 1011{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" },
1012{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, 1012{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" },
1013{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, 1013{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" },
1014{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1014{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1015{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1015{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1016{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1016{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1017{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1017{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1018{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1018{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1019{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, 1019{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" },
1020{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, 1020{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" },
1021{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1021{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1022{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1022{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1023{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, 1023{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" },
1024{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datenavigator</p>\n" }, 1024{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datenavigator</p>\n" },
1025{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, 1025{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" },
1026{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, 1026{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" },
1027{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" }, 1027{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" },
1028{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" }, 1028{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" },
1029{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, 1029{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" },
1030{ "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " }, 1030{ "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " },
1031{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, 1031{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" },
1032{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, 1032{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" },
1033{ "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, 1033{ "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" },
1034{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, 1034{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" },
1035{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, 1035{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" },
1036{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, 1036{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" },
1037{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1037{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1038{ "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, 1038{ "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" },
1039{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1039{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1040{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1040{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1041{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1041{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1042{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, 1042{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" },
1043{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, 1043{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" },
1044{ "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, 1044{ "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" },
1045{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1045{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1046{ "KO/Pi FAQ","KO/Pi FAQ" }, 1046{ "KO/Pi FAQ","KO/Pi FAQ" },
1047{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, 1047{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" },
1048{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1048{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1049{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1049{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1050{ "From: ","Von: " }, 1050{ "From: ","Von: " },
1051{ "Remove sync info","Entferne Sync Info" }, 1051{ "Remove sync info","Entferne Sync Info" },
1052{ "For all profiles","Für alle Profile" }, 1052{ "For all profiles","Für alle Profile" },
1053{ "Hide not Running","Verstecke nicht Laufende" }, 1053{ "Hide not Running","Verstecke nicht Laufende" },
1054{ "ME","ME" }, 1054{ "ME","ME" },
1055{ "Toolbar","Toolbar" }, 1055{ "Toolbar","Toolbar" },
1056{ "Undo Delete...","Löschen rückgängig machen..." }, 1056{ "Undo Delete...","Löschen rückgängig machen..." },
1057{ "Undo Delete","Löschen rückgängig machen" }, 1057{ "Undo Delete","Löschen rückgängig machen" },
1058{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1058{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1059{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1059{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1060{ "Januar","Januar" }, 1060{ "Januar","Januar" },
1061{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1061{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1062{ "No Filter","Kein Filter" }, 1062{ "No Filter","Kein Filter" },
1063{ "Multiple Sync options","Multi Sync Optionen" }, 1063{ "Multiple Sync options","Multi Sync Optionen" },
1064{ "Sync algo options","Sync Ablauf Optionen" }, 1064{ "Sync algo options","Sync Ablauf Optionen" },
1065{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1065{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1066{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1066{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1067{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1067{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1068{ "Write back options","Optionen zum Zurückschreiben" }, 1068{ "Write back options","Optionen zum Zurückschreiben" },
1069{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1069{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1070{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1070{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1071{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1071{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1072{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1072{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1073{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1073{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1074{ "Time period","Zeitspanne" }, 1074{ "Time period","Zeitspanne" },
1075{ "From ","Von " }, 1075{ "From ","Von " },
1076{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1076{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1077{ " weeks in the future "," Wochen in der Zukunft " }, 1077{ " weeks in the future "," Wochen in der Zukunft " },
1078{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1078{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1079{ "Local temp file:","Lokale temp Datei:" }, 1079{ "Local temp file:","Lokale temp Datei:" },
1080{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1080{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1081{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1081{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1082{ "Language","Sprache" }, 1082{ "Language","Sprache" },
1083{ "Time Format","Zeit Format" }, 1083{ "Time Format","Zeit Format" },
1084{ "Time Zone","Zeit Zone" }, 1084{ "Time Zone","Zeit Zone" },
1085{ "%1 groups subscribed","%1 Guppen abboniert" }, 1085{ "%1 groups subscribed","%1 Guppen abboniert" },
1086{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 1086{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
1087{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1087{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1088{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1088{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1089{ "Save settings","Speichere Einstellungen" }, 1089{ "Save settings","Speichere Einstellungen" },
1090{ "Save standard","Speichere Standard" }, 1090{ "Save standard","Speichere Standard" },
1091{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1091{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1092{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1092{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1093{ "Data storage path","Daten Speicherpfad" }, 1093{ "Data storage path","Daten Speicherpfad" },
1094{ "Language","Sprache" }, 1094{ "Language","Sprache" },
1095{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1095{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1096{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1096{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1097{ "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, 1097{ "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" },
1098{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1098{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1099{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1099{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1100{ "KO/Pi","KO/Pi" }, 1100{ "KO/Pi","KO/Pi" },
1101{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1101{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1102{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1102{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1103{ "Sound.Al.: ","Sound.Al.: " }, 1103{ "Sound.Al.: ","Sound.Al.: " },
1104{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1104{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1105{ "Restore","Wiederherstellen" }, 1105{ "Restore","Wiederherstellen" },
1106{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1106{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1107{ "% completed","% komplett" }, 1107{ "% completed","% komplett" },
1108{ "%d item(s) found.","%d Item(s) gefunden." }, 1108{ "%d item(s) found.","%d Item(s) gefunden." },
1109{ "Set complete","Setze auf erledigt" }, 1109{ "Set complete","Setze auf erledigt" },
1110{ "(cancelled)","(gecancelt)" }, 1110{ "(cancelled)","(gecancelt)" },
1111{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1111{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1112{ " Local time "," Locale Zeit " }, 1112{ " Local time "," Locale Zeit " },
1113{ "Form2","Form2" }, 1113{ "Form2","Form2" },
1114{ "Filter enabled","Filter angeschaltet" }, 1114{ "Filter enabled","Filter angeschaltet" },
1115{ "Edit Filters","Ändere Filter" }, 1115{ "Edit Filters","Ändere Filter" },
1116{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1116{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1117{ "Agenda","Agenda" }, 1117{ "Agenda","Agenda" },
1118{ " ("," (" }, 1118{ " ("," (" },
1119{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1119{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1120{ "Print","Print" }, 1120{ "Print","Print" },
1121{ "&Setup Printer...","Drucker &Setup..." }, 1121{ "&Setup Printer...","Drucker &Setup..." },
1122{ "View Type","Zeige Typ" }, 1122{ "View Type","Zeige Typ" },
1123{ "Page &orientation:","Seiten Ausrichtung:" }, 1123{ "Page &orientation:","Seiten Ausrichtung:" },
1124{ "Use Default of Selected Style","Default des selektierten Stils" }, 1124{ "Use Default of Selected Style","Default des selektierten Stils" },
1125{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1125{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1126{ "Portrait","Portrait" }, 1126{ "Portrait","Portrait" },
1127{ "Landscape","Landschaft" }, 1127{ "Landscape","Landschaft" },
1128{ "Print day","Drucke Tag" }, 1128{ "Print day","Drucke Tag" },
1129{ "CalPrintDay_Base","CalPrintDay_Base" }, 1129{ "CalPrintDay_Base","CalPrintDay_Base" },
1130{ "Date && Time Range","Datum && Zeitspanne" }, 1130{ "Date && Time Range","Datum && Zeitspanne" },
1131{ "&End date:","&Enddatum:" }, 1131{ "&End date:","&Enddatum:" },
1132{ "&Start date:","&Startdatum:" }, 1132{ "&Start date:","&Startdatum:" },
1133{ "Start &time:","Startzeit:" }, 1133{ "Start &time:","Startzeit:" },
1134{ "End ti&me:","Endzeit:" }, 1134{ "End ti&me:","Endzeit:" },
1135{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1135{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1136{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1136{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1137{ "Alt+D","Alt+D" }, 1137{ "Alt+D","Alt+D" },
1138{ "&Use colors","Nutze Farben" }, 1138{ "&Use colors","Nutze Farben" },
1139{ "Alt+U","Alt+U" }, 1139{ "Alt+U","Alt+U" },
1140{ "Print week","Drucke Woche" }, 1140{ "Print week","Drucke Woche" },
1141{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1141{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1142{ "Use &colors","Nutze Farben" }, 1142{ "Use &colors","Nutze Farben" },
1143{ "Type of View","Typ der Ansicht" }, 1143{ "Type of View","Typ der Ansicht" },
1144{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1144{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1145{ "Alt+F","Alt+F" }, 1145{ "Alt+F","Alt+F" },
1146{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1146{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1147{ "Alt+T","Alt+T" }, 1147{ "Alt+T","Alt+T" },
1148{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1148{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1149{ "Print month","Drucke Monat" }, 1149{ "Print month","Drucke Monat" },
1150{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1150{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1151{ "&Start month:","&Startmonat:" }, 1151{ "&Start month:","&Startmonat:" },
1152{ "&End month:","&Endmonat:" }, 1152{ "&End month:","&Endmonat:" },
1153{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1153{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1154{ "Print todos","Drucke Todos" }, 1154{ "Print todos","Drucke Todos" },
1155{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1155{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1156{ "Include &description of the item","Inclusive Itembeschreibung" }, 1156{ "Include &description of the item","Inclusive Itembeschreibung" },
1157{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1157{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1158{ "Include &priority of the item","Inclusive Priorität des Items" }, 1158{ "Include &priority of the item","Inclusive Priorität des Items" },
1159{ "Items to Print","Zu druckende Items" }, 1159{ "Items to Print","Zu druckende Items" },
1160{ "&From:","Von:" }, 1160{ "&From:","Von:" },
1161{ "&To:","Bis:" }, 1161{ "&To:","Bis:" },
1162{ "Print &all todo items","Drucke alle Todo Items" }, 1162{ "Print &all todo items","Drucke alle Todo Items" },
1163{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1163{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1164{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1164{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1165{ "Todo List","Todo Liste" }, 1165{ "Todo List","Todo Liste" },
1166{ "&Title:","&Titel:" }, 1166{ "&Title:","&Titel:" },
1167{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, 1167{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
1168{ "Todo list","Todo Liste" }, 1168{ "Todo list","Todo Liste" },
1169{ "&Print...","Drucke..." }, 1169{ "&Print...","Drucke..." },
1170{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1170{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1171{ "[Unconfigured]","[Unkonfiguriert]" }, 1171{ "[Unconfigured]","[Unkonfiguriert]" },
1172{ "OK","OK" }, 1172{ "OK","OK" },
1173{ "FilterEditor","FilterEditor" }, 1173{ "FilterEditor","FilterEditor" },
1174{ "Include","Inclusive" }, 1174{ "Include","Inclusive" },
1175{ "Exclude","Exclusive" }, 1175{ "Exclude","Exclusive" },
1176{ "Edit Selection...","Editiere Auswahl" }, 1176{ "Edit Selection...","Editiere Auswahl" },
1177{ "recurring events","wiederholende Termine" }, 1177{ "recurring events","wiederholende Termine" },
1178{ "recurr. events","wiederh.Termine" }, 1178{ "recurr. events","wiederh.Termine" },
1179{ "completed to-dos","erledigte Todos" }, 1179{ "completed to-dos","erledigte Todos" },
1180{ "events","Termine" }, 1180{ "events","Termine" },
1181{ "todos","Todos" }, 1181{ "todos","Todos" },
1182{ "journals","Journale" }, 1182{ "journals","Journale" },
1183{ "public","öffentl." }, 1183{ "public","öffentl." },
1184{ "private","privat" }, 1184{ "private","privat" },
1185{ "confidential","vertraul." }, 1185{ "confidential","vertraul." },
1186{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1186{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
1187{ "Yesterday","Gestern" }, 1187{ "Yesterday","Gestern" },
1188{ "Day after tomorrow","Übermorgen" }, 1188{ "Day after tomorrow","Übermorgen" },
1189{ "Tomorrow","Morgen" }, 1189{ "Tomorrow","Morgen" },
1190{ "Day before yesterday","Vorgestern" }, 1190{ "Day before yesterday","Vorgestern" },
1191{ "Size %1","Größe %1" }, 1191{ "Size %1","Größe %1" },
1192{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1192{ "New Agendasize: %1","Neue Agendagröße: %1" },
1193{ " (%1 y.)"," (%1 J.)" }, 1193{ " (%1 y.)"," (%1 J.)" },
1194{ "Allday:","Ganztägig:" }, 1194{ "Allday:","Ganztägig:" },
1195{ "compl.todos","erled.Todos" }, 1195{ "compl.todos","erled.Todos" },
1196{ "Day view","Tagesansicht" }, 1196{ "Day view","Tagesansicht" },
1197{ "Next days","Nächste Tage" }, 1197{ "Next days","Nächste Tage" },
1198{ "Next week","Nächste Woche" }, 1198{ "Next week","Nächste Woche" },
1199{ "Next two weeks","Nächste zwei Wochen" }, 1199{ "Next two weeks","Nächste zwei Wochen" },
1200{ "Next month","Nächster Monat" }, 1200{ "Next month","Nächster Monat" },
1201{ "Journal view","Journal" }, 1201{ "Journal view","Journal" },
1202{ "Display all opened","Zeige alle geöffnet" }, 1202{ "Display all opened","Zeige alle geöffnet" },
1203{ "Display all closed","Zeige alle geschlossen" }, 1203{ "Display all closed","Zeige alle geschlossen" },
1204{ "Display all flat","Zeige alle flach" }, 1204{ "Display all flat","Zeige alle flach" },
1205{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1205{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1206{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1206{ "Default todo done color:","Standard Todo erledigt Farbe" },
1207{ "Select week %1-%2","Wähle Woche %1-%2" }, 1207{ "Select week %1-%2","Wähle Woche %1-%2" },
1208{ "Select Week","Wähle Woche" }, 1208{ "Select Week","Wähle Woche" },
1209{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1209{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1210{ "Set Alarm!","Setze Alarm!" }, 1210{ "Set Alarm!","Setze Alarm!" },
1211{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1211{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1212{ " and "," und " }, 1212{ " and "," und " },
1213{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1213{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1214{ "Mail to selected","Mail an Ausgewählte" }, 1214{ "Mail to selected","Mail an Ausgewählte" },
1215{ "Mail to all","Mail an Alle" }, 1215{ "Mail to all","Mail an Alle" },
1216{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1216{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1217{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1217{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1218{ " on"," am" }, 1218{ " on"," am" },
1219{ " completed on "," erledigt am " }, 1219{ " completed on "," erledigt am " },
1220{ "Save as Event template","Speichere als Vorlage" }, 1220{ "Save as Event template","Speichere als Vorlage" },
1221{ "Load Event template","Lade Termin Vorlage" }, 1221{ "Load Event template","Lade Termin Vorlage" },
1222{ "Save as Journal template","Speichere als Journal Vorlage" }, 1222{ "Save as Journal template","Speichere als Journal Vorlage" },
1223{ "Insert Journal template","Füge Journal Vorlage ein" }, 1223{ "Insert Journal template","Füge Journal Vorlage ein" },
1224{ "Sub todos:<br>","Unter Todos:<br>" }, 1224{ "Sub todos:<br>","Unter Todos:<br>" },
1225{ "Parent todo:<br>","Über Todo:<br>" }, 1225{ "Parent todo:<br>","Über Todo:<br>" },
1226{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1226{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1227{ " completed"," erledigt" }, 1227{ " completed"," erledigt" },
1228{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1228{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1229{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1229{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1230{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1230{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1231{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1231{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1232{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, 1232{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
1233{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1233{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1234{ "Error","Fehler" }, 1234{ "Error","Fehler" },
1235{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1235{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1236{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1236{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1237{ "Warning","Warnung" }, 1237{ "Warning","Warnung" },
1238{ "Select week number","Wähle Wochen Nummer" }, 1238{ "Select week number","Wähle Wochen Nummer" },
1239{ "Februar","Februar" }, 1239{ "Februar","Februar" },
1240{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1240{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1241{ "W","W" }, 1241{ "W","W" },
1242{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1242{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1243{ "T: %1","T: %1" }, 1243{ "T: %1","T: %1" },
1244{ "Start: ","Start: " }, 1244{ "Start: ","Start: " },
1245{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1245{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1246{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1246{ "Password for remote access:","Passwort für fernen Zugriff:" },
1247{ "Remote IP address:","Ferne IP Adresse:" }, 1247{ "Remote IP address:","Ferne IP Adresse:" },
1248{ "Remote port number:","Ferne Port Nummer:" }, 1248{ "Remote port number:","Ferne Port Nummer:" },
1249{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1249{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1250{ "Remote from: ","Fern von: " }, 1250{ "Remote from: ","Fern von: " },
1251{ "Local from: ","Lokal von: " }, 1251{ "Local from: ","Lokal von: " },
1252{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, 1252{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
1253{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1253{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1254{ "Write back","Schreibe zurück" }, 1254{ "Write back","Schreibe zurück" },
1255{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1255{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1256{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1256{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1257{ "Received sync request","Sync Anfrage erhalten" }, 1257{ "Received sync request","Sync Anfrage erhalten" },
1258{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, 1258{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
1259{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1259{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1260{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1260{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1261{ "Sending file...","Sende Datei..." }, 1261{ "Sending file...","Sende Datei..." },
1262{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1262{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1263{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1263{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1264{ "Received %1 bytes","%1 Bytes erhalten" }, 1264{ "Received %1 bytes","%1 Bytes erhalten" },
1265{ "Writing file to disk...","Speichere Datei..." }, 1265{ "Writing file to disk...","Speichere Datei..." },
1266{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1266{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1267{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1267{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1268{ "Synchronize!","Synchronisiere!" }, 1268{ "Synchronize!","Synchronisiere!" },
1269{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1269{ "High clock skew!","Großer Uhrzeitunterschied!" },
1270{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1270{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1271{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, 1271{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
1272{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1272{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1273{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1273{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1274{ "","" }, 1274{ "List week view","Listenwochenansicht" },
1275{ "","" }, 1275{ "List week","Listenwochenansicht" },
1276{ "","" }, 1276{ "","" },
1277{ "","" }, 1277{ "","" },
1278{ "","" }, 1278{ "","" },
1279{ "","" }, 1279{ "","" },
1280{ "","" }, 1280{ "","" },
1281{ "","" }, 1281{ "","" },
1282{ "","" }, 1282{ "","" },
1283{ "","" }, 1283{ "","" },
1284{ "","" }, \ No newline at end of file 1284{ "","" }, \ No newline at end of file
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index 8b7c993..b0eac51 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -1,300 +1,315 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include "datenavigator.h" 24#include "datenavigator.h"
25 25
26#include "koglobals.h" 26#include "koglobals.h"
27 27
28#include <kcalendarsystem.h> 28#include <kcalendarsystem.h>
29 29
30#include <kdebug.h> 30#include <kdebug.h>
31#include <kglobal.h> 31#include <kglobal.h>
32#include <klocale.h> 32#include <klocale.h>
33 33
34using namespace KCal; 34using namespace KCal;
35 35
36DateNavigator::DateNavigator( QObject *parent, const char *name , KOViewManager * v) 36DateNavigator::DateNavigator( QObject *parent, const char *name , KOViewManager * v)
37 : QObject( parent, name ) 37 : QObject( parent, name )
38{ 38{
39 mViewManager = v; 39 mViewManager = v;
40 mSelectedDates.append( QDate::currentDate() ); 40 mSelectedDates.append( QDate::currentDate() );
41} 41}
42 42
43DateNavigator::~DateNavigator() 43DateNavigator::~DateNavigator()
44{ 44{
45} 45}
46 46
47void DateNavigator::slotMonthSelect( int m ) 47void DateNavigator::slotMonthSelect( int m )
48{ 48{
49 QDate firstSelected = mSelectedDates.first(); 49 QDate firstSelected = mSelectedDates.first();
50 int weekDay = firstSelected.dayOfWeek(); 50 int weekDay = firstSelected.dayOfWeek();
51 int diff = m - firstSelected.month() ; 51 int diff = m - firstSelected.month() ;
52 firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, diff ); 52 firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, diff );
53 53
54 if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 ) 54 if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 )
55 selectMonthByDate( firstSelected ); 55 selectMonthByDate( firstSelected );
56 else 56 else
57 selectWeekByDay( weekDay, firstSelected ); 57 selectWeekByDay( weekDay, firstSelected );
58 58
59} 59}
60 60
61void DateNavigator::slotDaySelect( QDate d ) 61void DateNavigator::slotDaySelect( QDate d )
62{ 62{
63 QDate firstSelected = mSelectedDates.first(); 63 QDate firstSelected = mSelectedDates.first();
64 int weekDay = firstSelected.dayOfWeek(); 64 int weekDay = firstSelected.dayOfWeek();
65 //int diff = firstSelected.daysTo( d ) ; 65 //int diff = firstSelected.daysTo( d ) ;
66 firstSelected = firstSelected.addDays( firstSelected .daysTo( d ) ); 66 firstSelected = firstSelected.addDays( firstSelected .daysTo( d ) );
67 67
68 selectWeekByDay( weekDay, firstSelected ); 68 selectWeekByDay( weekDay, firstSelected );
69 69
70} 70}
71 71
72void DateNavigator::selectMonthByDate( const QDate & firstSelected ) 72void DateNavigator::selectMonthByDate( const QDate & firstSelected )
73{ 73{
74 74
75 int monthDay = firstSelected.day(); 75 int monthDay = firstSelected.day();
76 QDate date = firstSelected.addDays( 1-monthDay ); 76 QDate date = firstSelected.addDays( 1-monthDay );
77 selectDates( date , date.daysInMonth ()); 77 selectDates( date , date.daysInMonth ());
78 78
79} 79}
80void DateNavigator::selectMonth() 80void DateNavigator::selectMonth()
81{ 81{
82 82
83 QDate date =mSelectedDates.first(); 83 QDate date =mSelectedDates.first();
84 selectMonthByDate( date ); 84 selectMonthByDate( date );
85} 85}
86void DateNavigator::selectMonthFromMonthview()
87{
88
89 QDate date =mSelectedDates.first().addDays( 7 );
90 selectMonthByDate( date );
91}
86 92
87DateList DateNavigator::selectedDates() 93DateList DateNavigator::selectedDates()
88{ 94{
89 return mSelectedDates; 95 return mSelectedDates;
90} 96}
91 97
92int DateNavigator::datesCount() const 98int DateNavigator::datesCount() const
93{ 99{
94 return mSelectedDates.count(); 100 return mSelectedDates.count();
95} 101}
96 102
97void DateNavigator::selectDates( const DateList& dateList ) 103void DateNavigator::selectDates( const DateList& dateList )
98{ 104{
99 if (dateList.count() > 0) { 105 if (dateList.count() > 0) {
100 mSelectedDates = dateList; 106 mSelectedDates = dateList;
101 emitSelected(); 107 emitSelected();
102 } 108 }
103} 109}
104 110
105void DateNavigator::selectDate( const QDate &date ) 111void DateNavigator::selectDate( const QDate &date )
106{ 112{
107 QDate d = date; 113 QDate d = date;
108 114
109 if ( !d.isValid() ) { 115 if ( !d.isValid() ) {
110 d = QDate::currentDate(); 116 d = QDate::currentDate();
111 } 117 }
112 118
113 mSelectedDates.clear(); 119 mSelectedDates.clear();
114 mSelectedDates.append( d ); 120 mSelectedDates.append( d );
115 121
116 emitSelected(); 122 emitSelected();
117} 123}
118 124
119void DateNavigator::selectDates( int count ) 125void DateNavigator::selectDates( int count )
120{ 126{
121 127
122 QDate d = mSelectedDates.first(); 128 QDate d = mSelectedDates.first();
123 selectDates( d, count ); 129 selectDates( d, count );
124} 130}
125 131
126void DateNavigator::selectDates( const QDate &d, int count ) 132void DateNavigator::selectDates( const QDate &d, int count )
127{ 133{
128 DateList dates; 134 DateList dates;
129 135
130 int i; 136 int i;
131 for( i = 0; i < count; ++i ) { 137 for( i = 0; i < count; ++i ) {
132 dates.append( d.addDays( i ) ); 138 dates.append( d.addDays( i ) );
133 } 139 }
134 140
135 mSelectedDates = dates; 141 mSelectedDates = dates;
136 142
137 emitSelected(); 143 emitSelected();
138} 144}
139 145
140void DateNavigator::selectWeekByDay( int weekDay, const QDate &d ) 146void DateNavigator::selectWeekByDay( int weekDay, const QDate &d )
141{ 147{
142 // qDebug("selectWeekByDay( %d %s ", weekDay, d.toString().latin1()); 148 // qDebug("selectWeekByDay( %d %s ", weekDay, d.toString().latin1());
143 int dateCount = mSelectedDates.count(); 149 int dateCount = mSelectedDates.count();
144 bool weekStart = ( weekDay == KGlobal::locale()->weekStartDay() ); 150 bool weekStart = ( weekDay == KGlobal::locale()->weekStartDay() );
145 if ( weekDay == 1 && dateCount == 5 ) selectWorkWeek( d ); 151 if ( weekDay == 1 && dateCount == 5 ) selectWorkWeek( d );
146 else if ( weekStart && dateCount == 7 ) selectWeek( d ); 152 else if ( weekStart && dateCount == 7 ) selectWeek( d );
147 else selectDates( d, dateCount ); 153 else selectDates( d, dateCount );
148} 154}
149 155
150void DateNavigator::selectWeek() 156void DateNavigator::selectWeek()
151{ 157{
152 QDate d = mSelectedDates.first(); 158 QDate d = mSelectedDates.first();
153 selectWeek( d ); 159 selectWeek( d );
154} 160}
155void DateNavigator::selectWeek( int num ) 161void DateNavigator::selectWeek( int num )
156{ 162{
157 int year = mSelectedDates.first().year(); 163 int year = mSelectedDates.first().year();
158 QDate d = QDate ( year, 1,1); 164 QDate d = QDate ( year, 1,1);
159 while ( d.dayOfWeek() != 4 ) 165 while ( d.dayOfWeek() != 4 )
160 d = d.addDays( 1 ); 166 d = d.addDays( 1 );
161 selectWeek( d.addDays ( (num-1) *7 ) ); 167 selectWeek( d.addDays ( (num-1) *7 ) );
162} 168}
163void DateNavigator::selectWeekFromMonthView( int num ) 169void DateNavigator::selectWeekFromMonthView( int num )
164{ 170{
165 int year = mSelectedDates.first().year(); 171 int year = mSelectedDates.first().year();
166 if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 ) 172 if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 )
167 ++year; 173 ++year;
168 if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 ) 174 if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 )
169 --year; 175 --year;
170 QDate d = QDate ( year, 1,1); 176 QDate d = QDate ( year, 1,1);
171 while ( d.dayOfWeek() != 4 ) 177 while ( d.dayOfWeek() != 4 )
172 d = d.addDays( 1 ); 178 d = d.addDays( 1 );
173 selectWeek( d.addDays ( (num-1) *7 ) ); 179 selectWeek( d.addDays ( (num-1) *7 ) );
174} 180}
175void DateNavigator::selectWeek( const QDate &d ) 181void DateNavigator::selectWeek( const QDate &d )
176{ 182{
177 int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d ); 183 int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d );
178 184
179 int weekStart = KGlobal::locale()->weekStartDay(); 185 int weekStart = KGlobal::locale()->weekStartDay();
180 QDate firstDate = d.addDays( weekStart - dayOfWeek ); 186 QDate firstDate = d.addDays( weekStart - dayOfWeek );
181 187
182 if ( weekStart != 1 && dayOfWeek < weekStart ) { 188 if ( weekStart != 1 && dayOfWeek < weekStart ) {
183 firstDate = firstDate.addDays(-7 ); 189 firstDate = firstDate.addDays(-7 );
184 } 190 }
185 191
186 192
187 selectDates( firstDate, 7 ); 193 selectDates( firstDate, 7 );
188} 194}
189 195
190void DateNavigator::selectWorkWeek() 196void DateNavigator::selectWorkWeek()
191{ 197{
192 QDate d = mSelectedDates.first(); 198 QDate d = mSelectedDates.first();
193 selectWorkWeek( d ); 199 selectWorkWeek( d );
194} 200}
195 201
196void DateNavigator::selectWorkWeek( const QDate &d ) 202void DateNavigator::selectWorkWeek( const QDate &d )
197{ 203{
198 int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d ); 204 int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d );
199 205
200 QDate firstDate = d.addDays( 1 - dayOfWeek ); 206 QDate firstDate = d.addDays( 1 - dayOfWeek );
201 207
202 int weekStart = KGlobal::locale()->weekStartDay(); 208 int weekStart = KGlobal::locale()->weekStartDay();
203 if ( weekStart != 1 && dayOfWeek >= weekStart ) { 209 if ( weekStart != 1 && dayOfWeek >= weekStart ) {
204 firstDate = firstDate.addDays( 7 ); 210 firstDate = firstDate.addDays( 7 );
205 } 211 }
206 212
207 selectDates( firstDate, 5 ); 213 selectDates( firstDate, 5 );
208} 214}
209 215
210void DateNavigator::selectTodayMonth() 216void DateNavigator::selectTodayMonth()
211{ 217{
212 QDate date = QDate::currentDate().addDays( 1-QDate::currentDate().day() ); 218 QDate date = QDate::currentDate().addDays( 1-QDate::currentDate().day() );
213 selectDates( date , date.daysInMonth ()); 219 selectDates( date , date.daysInMonth ());
214 220
215} 221}
216void DateNavigator::selectToday() 222void DateNavigator::selectToday()
217{ 223{
218 QDate d = QDate::currentDate(); 224 QDate d = QDate::currentDate();
219 225
220 int dateCount = mSelectedDates.count(); 226 int dateCount = mSelectedDates.count();
221 if ( dateCount == 5 && d.dayOfWeek() < 6 ) selectWorkWeek( d ); 227 if ( dateCount == 5 && d.dayOfWeek() < 6 ) selectWorkWeek( d );
222 else if ( dateCount == 7 ) selectWeek( d ); 228 else if ( dateCount == 7 ) selectWeek( d );
223 else selectDates( d, dateCount ); 229 else selectDates( d, dateCount );
224} 230}
225 231
226void DateNavigator::selectPreviousYear() 232void DateNavigator::selectPreviousYear()
227{ 233{
228 QDate firstSelected = mSelectedDates.first(); 234 QDate firstSelected = mSelectedDates.first();
229 int weekDay = firstSelected.dayOfWeek(); 235 int weekDay = firstSelected.dayOfWeek();
230 firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, -1 ); 236 firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, -1 );
231 237
232 selectWeekByDay( weekDay, firstSelected ); 238 selectWeekByDay( weekDay, firstSelected );
233} 239}
234 240
235void DateNavigator::selectPreviousMonth() 241void DateNavigator::selectPreviousMonth()
236{ 242{
237 QDate firstSelected = mSelectedDates.first(); 243 QDate firstSelected = mSelectedDates.first();
238 int weekDay = firstSelected.dayOfWeek(); 244 int weekDay = firstSelected.dayOfWeek();
239 firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, -1 ); 245 firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, -1 );
240 246
241 247
242 if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 ) 248 if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 )
243 selectMonthByDate( firstSelected ); 249 selectMonthByDate( firstSelected );
244 else 250 else
245 selectWeekByDay( weekDay, firstSelected ); 251 selectWeekByDay( weekDay, firstSelected );
246} 252}
247 253
248void DateNavigator::selectNextMonth() 254void DateNavigator::selectNextMonth()
249{ 255{
250 QDate firstSelected = mSelectedDates.first(); 256 QDate firstSelected = mSelectedDates.first();
251 int weekDay = firstSelected.dayOfWeek(); 257 int weekDay = firstSelected.dayOfWeek();
252 258
253 firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 ); 259 firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 );
254 260
255 if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 ) 261 if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 )
256 selectMonthByDate( firstSelected ); 262 selectMonthByDate( firstSelected );
257 else 263 else
258 selectWeekByDay( weekDay, firstSelected ); 264 selectWeekByDay( weekDay, firstSelected );
259 265
260} 266}
267void DateNavigator::selectPreviousWeek()
268{
269 selectDates( mSelectedDates.first().addDays( -7 ), datesCount() );
270}
271
272void DateNavigator::selectNextWeek()
273{
274 selectDates( mSelectedDates.first().addDays( 7 ), datesCount() );
275}
261 276
262void DateNavigator::selectNextYear() 277void DateNavigator::selectNextYear()
263{ 278{
264 QDate firstSelected = mSelectedDates.first(); 279 QDate firstSelected = mSelectedDates.first();
265 int weekDay = firstSelected.dayOfWeek(); 280 int weekDay = firstSelected.dayOfWeek();
266 firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 ); 281 firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 );
267 282
268 selectWeekByDay( weekDay, firstSelected ); 283 selectWeekByDay( weekDay, firstSelected );
269} 284}
270 285
271void DateNavigator::selectPrevious() 286void DateNavigator::selectPrevious()
272{ 287{
273 int offset = -7; 288 int offset = -7;
274 if ( datesCount() == 1 ) { 289 if ( datesCount() == 1 ) {
275 offset = -1; 290 offset = -1;
276 } 291 }
277 if ( mViewManager ) 292 if ( mViewManager )
278 if ( mViewManager->showsNextDays() ) 293 if ( mViewManager->showsNextDays() )
279 offset = -datesCount(); 294 offset = -datesCount();
280 selectDates( mSelectedDates.first().addDays( offset ), datesCount() ); 295 selectDates( mSelectedDates.first().addDays( offset ), datesCount() );
281} 296}
282 297
283void DateNavigator::selectNext() 298void DateNavigator::selectNext()
284{ 299{
285 int offset = 7; 300 int offset = 7;
286 if ( datesCount() == 1 ) { 301 if ( datesCount() == 1 ) {
287 offset = 1; 302 offset = 1;
288 } 303 }
289 if ( mViewManager ) 304 if ( mViewManager )
290 if ( mViewManager->showsNextDays() ) 305 if ( mViewManager->showsNextDays() )
291 offset = datesCount(); 306 offset = datesCount();
292 selectDates( mSelectedDates.first().addDays( offset ), datesCount() ); 307 selectDates( mSelectedDates.first().addDays( offset ), datesCount() );
293} 308}
294 309
295void DateNavigator::emitSelected() 310void DateNavigator::emitSelected()
296{ 311{
297 emit datesSelected( mSelectedDates ); 312 emit datesSelected( mSelectedDates );
298} 313}
299 314
300//#include "datenavigator.moc" 315//#include "datenavigator.moc"
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h
index 4265e84..9742d41 100644
--- a/korganizer/datenavigator.h
+++ b/korganizer/datenavigator.h
@@ -1,91 +1,94 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef DATENAVIGATOR_H 23#ifndef DATENAVIGATOR_H
24#define DATENAVIGATOR_H 24#define DATENAVIGATOR_H
25 25
26#include <libkcal/incidencebase.h> 26#include <libkcal/incidencebase.h>
27 27
28#include <qobject.h> 28#include <qobject.h>
29#include "koviewmanager.h" 29#include "koviewmanager.h"
30 30
31/** 31/**
32 This class controls date navigation. All requests to move the views to another 32 This class controls date navigation. All requests to move the views to another
33 date are sent to the DateNavigator. The DateNavigator processes the new 33 date are sent to the DateNavigator. The DateNavigator processes the new
34 selection of dates and emits the required signals for the views. 34 selection of dates and emits the required signals for the views.
35*/ 35*/
36class DateNavigator : public QObject 36class DateNavigator : public QObject
37{ 37{
38 Q_OBJECT 38 Q_OBJECT
39 public: 39 public:
40 DateNavigator( QObject *parent = 0, const char *name = 0 , KOViewManager * v = 0); 40 DateNavigator( QObject *parent = 0, const char *name = 0 , KOViewManager * v = 0);
41 ~DateNavigator(); 41 ~DateNavigator();
42 42
43 KCal::DateList selectedDates(); 43 KCal::DateList selectedDates();
44 44
45 int datesCount() const; 45 int datesCount() const;
46 46
47 public slots: 47 public slots:
48 void selectDates( const KCal::DateList & ); 48 void selectDates( const KCal::DateList & );
49 void selectDate( const QDate & ); 49 void selectDate( const QDate & );
50 50
51 void selectDates( int count ); 51 void selectDates( int count );
52 void selectDates( const QDate &, int count ); 52 void selectDates( const QDate &, int count );
53 53
54 void selectWeek(); 54 void selectWeek();
55 void selectWeek( int weeknum ); 55 void selectWeek( int weeknum );
56 void selectWeekFromMonthView( int weeknum ); 56 void selectWeekFromMonthView( int weeknum );
57 void selectWeek( const QDate & ); 57 void selectWeek( const QDate & );
58 58
59 void selectWorkWeek(); 59 void selectWorkWeek();
60 void selectWorkWeek( const QDate & ); 60 void selectWorkWeek( const QDate & );
61 61
62 void selectWeekByDay( int weekDay, const QDate & ); 62 void selectWeekByDay( int weekDay, const QDate & );
63 63
64 void selectToday(); 64 void selectToday();
65 void selectTodayMonth(); 65 void selectTodayMonth();
66 66
67 void selectPreviousYear(); 67 void selectPreviousYear();
68 void selectPreviousMonth(); 68 void selectPreviousMonth();
69 void selectNextMonth(); 69 void selectNextMonth();
70 void selectPreviousWeek();
71 void selectNextWeek();
70 void selectNextYear(); 72 void selectNextYear();
71 73
72 void selectMonth(); 74 void selectMonth();
75 void selectMonthFromMonthview();
73 void selectMonthByDate( const QDate & ); 76 void selectMonthByDate( const QDate & );
74 77
75 void selectPrevious(); 78 void selectPrevious();
76 void selectNext(); 79 void selectNext();
77 void slotMonthSelect( int ); 80 void slotMonthSelect( int );
78 void slotDaySelect( QDate d ); 81 void slotDaySelect( QDate d );
79 82
80 signals: 83 signals:
81 void datesSelected( const KCal::DateList & ); 84 void datesSelected( const KCal::DateList & );
82 85
83 protected: 86 protected:
84 void emitSelected(); 87 void emitSelected();
85 88
86 private: 89 private:
87 KOViewManager * mViewManager; 90 KOViewManager * mViewManager;
88 KCal::DateList mSelectedDates; 91 KCal::DateList mSelectedDates;
89}; 92};
90 93
91#endif 94#endif
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index d0380e3..f9bc1ca 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -440,1037 +440,1039 @@ void MonthViewCell::startUpdateCell()
440 item->setPalette( mHolidayPalette ); 440 item->setPalette( mHolidayPalette );
441 mItemList->insertItem( item ); 441 mItemList->insertItem( item );
442 mToolTip += mHolidayString+"\n"; 442 mToolTip += mHolidayString+"\n";
443 } 443 }
444} 444}
445 445
446void MonthViewCell::insertEvent(Event *event) 446void MonthViewCell::insertEvent(Event *event)
447{ 447{
448 448
449 mItemList->setFocusPolicy(WheelFocus); 449 mItemList->setFocusPolicy(WheelFocus);
450 if ( !(event->doesRecur() == Recurrence::rNone) ) { 450 if ( !(event->doesRecur() == Recurrence::rNone) ) {
451 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) 451 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
452 return; 452 return;
453 else 453 else
454 if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) 454 if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly )
455 return; 455 return;
456 } 456 }
457 457
458 if ( event->categories().contains("Holiday") || 458 if ( event->categories().contains("Holiday") ||
459 event->categories().contains(i18n("Holiday"))) { 459 event->categories().contains(i18n("Holiday"))) {
460 setHoliday( true ); 460 setHoliday( true );
461 if ( mDate.dayOfWeek() == 7 ) 461 if ( mDate.dayOfWeek() == 7 )
462 mItemList->setLineWidth( 3 ); 462 mItemList->setLineWidth( 3 );
463 } 463 }
464 QString text; 464 QString text;
465 if (event->isMultiDay()) { 465 if (event->isMultiDay()) {
466 QString prefix = "<->"; 466 QString prefix = "<->";
467 if ( event->doesRecur() ) { 467 if ( event->doesRecur() ) {
468 if ( event->recursOn( mDate) ) 468 if ( event->recursOn( mDate) )
469 prefix ="->" ; 469 prefix ="->" ;
470 else { 470 else {
471 int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); 471 int days = event->dtStart().date().daysTo ( event->dtEnd().date() );
472 if ( event->recursOn( mDate.addDays( -days)) ) 472 if ( event->recursOn( mDate.addDays( -days)) )
473 prefix ="<-" ; 473 prefix ="<-" ;
474 } 474 }
475 475
476 } else { 476 } else {
477 if (mDate == event->dtStart().date()) { 477 if (mDate == event->dtStart().date()) {
478 prefix ="->" ; 478 prefix ="->" ;
479 } else if (mDate == event->dtEnd().date()) { 479 } else if (mDate == event->dtEnd().date()) {
480 prefix ="<-" ; 480 prefix ="<-" ;
481 } 481 }
482 } 482 }
483 if ( !event->doesFloat() ) { 483 if ( !event->doesFloat() ) {
484 if ( mDate == event->dtStart().date () ) 484 if ( mDate == event->dtStart().date () )
485 prefix += KGlobal::locale()->formatTime(event->dtStart().time())+" "; 485 prefix += KGlobal::locale()->formatTime(event->dtStart().time())+" ";
486 else if ( mDate == event->dtEnd().date () ) 486 else if ( mDate == event->dtEnd().date () )
487 prefix += KGlobal::locale()->formatTime(event->dtEnd().time())+" "; 487 prefix += KGlobal::locale()->formatTime(event->dtEnd().time())+" ";
488 488
489 } 489 }
490 text = prefix + event->summary(); 490 text = prefix + event->summary();
491 mToolTip += text; 491 mToolTip += text;
492 } else { 492 } else {
493 if (event->doesFloat()) { 493 if (event->doesFloat()) {
494 text = event->summary(); 494 text = event->summary();
495 mToolTip += text; 495 mToolTip += text;
496 } 496 }
497 else { 497 else {
498 text = KGlobal::locale()->formatTime(event->dtStart().time()); 498 text = KGlobal::locale()->formatTime(event->dtStart().time());
499 text += " " + event->summary(); 499 text += " " + event->summary();
500 mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); 500 mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary();
501 } 501 }
502 } 502 }
503 503
504 MonthViewItem *item = new MonthViewItem( event, mDate, text ); 504 MonthViewItem *item = new MonthViewItem( event, mDate, text );
505 QPalette pal; 505 QPalette pal;
506 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 506 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
507 QStringList categories = event->categories(); 507 QStringList categories = event->categories();
508 QString cat = categories.first(); 508 QString cat = categories.first();
509 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { 509 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) {
510 pal = getPalette(); 510 pal = getPalette();
511 if (cat.isEmpty()) { 511 if (cat.isEmpty()) {
512 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); 512 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor);
513 } else { 513 } else {
514 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); 514 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat)));
515 } 515 }
516 516
517 } else { 517 } else {
518 if (cat.isEmpty()) { 518 if (cat.isEmpty()) {
519 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 519 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
520 } else { 520 } else {
521 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 521 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
522 } 522 }
523 } 523 }
524 524
525 } else { 525 } else {
526 pal = mStandardPalette ; 526 pal = mStandardPalette ;
527 } 527 }
528 item->setPalette( pal ); 528 item->setPalette( pal );
529 item->setRecur( event->recurrence()->doesRecur() ); 529 item->setRecur( event->recurrence()->doesRecur() );
530 item->setAlarm( event->isAlarmEnabled() ); 530 item->setAlarm( event->isAlarmEnabled() );
531 item->setMoreInfo( event->description().length() > 0 ); 531 item->setMoreInfo( event->description().length() > 0 );
532#ifdef DESKTOP_VERSION 532#ifdef DESKTOP_VERSION
533 Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, 533 Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails,
534 KOPrefs::instance()->email()); 534 KOPrefs::instance()->email());
535 if ( me != 0 ) { 535 if ( me != 0 ) {
536 if ( me->status() == Attendee::NeedsAction && me->RSVP()) 536 if ( me->status() == Attendee::NeedsAction && me->RSVP())
537 item->setReply(true); 537 item->setReply(true);
538 else 538 else
539 item->setReply(false); 539 item->setReply(false);
540 } else 540 } else
541 item->setReply(false); 541 item->setReply(false);
542#endif 542#endif
543 mItemList->insertItem( item ); 543 mItemList->insertItem( item );
544 mToolTip += "\n"; 544 mToolTip += "\n";
545} 545}
546void MonthViewCell::insertTodo(Todo *todo) 546void MonthViewCell::insertTodo(Todo *todo)
547{ 547{
548 mItemList->setFocusPolicy(WheelFocus); 548 mItemList->setFocusPolicy(WheelFocus);
549 QString text; 549 QString text;
550 if (todo->hasDueDate()) { 550 if (todo->hasDueDate()) {
551 if (!todo->doesFloat()) { 551 if (!todo->doesFloat()) {
552 text += KGlobal::locale()->formatTime(todo->dtDue().time()); 552 text += KGlobal::locale()->formatTime(todo->dtDue().time());
553 text += " "; 553 text += " ";
554 } 554 }
555 } 555 }
556 text += i18n("T: %1").arg(todo->summary()); 556 text += i18n("T: %1").arg(todo->summary());
557 557
558 MonthViewItem *item = new MonthViewItem( todo, mDate, text ); 558 MonthViewItem *item = new MonthViewItem( todo, mDate, text );
559 //item->setPalette( mStandardPalette ); 559 //item->setPalette( mStandardPalette );
560 QPalette pal; 560 QPalette pal;
561 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 561 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
562 QStringList categories = todo->categories(); 562 QStringList categories = todo->categories();
563 QString cat = categories.first(); 563 QString cat = categories.first();
564 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { 564 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) {
565 pal = getPalette(); 565 pal = getPalette();
566 if (cat.isEmpty()) { 566 if (cat.isEmpty()) {
567 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); 567 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor);
568 } else { 568 } else {
569 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); 569 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat)));
570 } 570 }
571 571
572 } else { 572 } else {
573 if (cat.isEmpty()) { 573 if (cat.isEmpty()) {
574 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 574 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
575 } else { 575 } else {
576 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 576 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
577 } 577 }
578 } 578 }
579 579
580 } else { 580 } else {
581 pal = mStandardPalette ; 581 pal = mStandardPalette ;
582 } 582 }
583 item->setPalette( pal ); 583 item->setPalette( pal );
584 item->setRecur( todo->recurrence()->doesRecur() ); 584 item->setRecur( todo->recurrence()->doesRecur() );
585 item->setAlarm( todo->isAlarmEnabled() ); 585 item->setAlarm( todo->isAlarmEnabled() );
586 item->setMoreInfo( todo->description().length() > 0 ); 586 item->setMoreInfo( todo->description().length() > 0 );
587 mItemList->insertItem( item ); 587 mItemList->insertItem( item );
588 mToolTip += text+"\n"; 588 mToolTip += text+"\n";
589} 589}
590void MonthViewCell::finishUpdateCell() 590void MonthViewCell::finishUpdateCell()
591{ 591{
592#ifdef DESKTOP_VERSION 592#ifdef DESKTOP_VERSION
593 if (mToolTip != "") 593 if (mToolTip != "")
594 QToolTip::add(this,mToolTip,toolTipGroup(),""); 594 QToolTip::add(this,mToolTip,toolTipGroup(),"");
595#endif 595#endif
596 mItemList->sort(); 596 mItemList->sort();
597 //setMyPalette(); 597 //setMyPalette();
598 setMyPalette(); 598 setMyPalette();
599 QString text; 599 QString text;
600 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog; 600 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog;
601 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) { 601 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) {
602 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " "; 602 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " ";
603 mLabel->resize( mLabelBigSize ); 603 mLabel->resize( mLabelBigSize );
604 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); 604 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
605 } else { 605 } else {
606 mLabel->resize( mLabelSize ); 606 mLabel->resize( mLabelSize );
607 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); 607 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
608 } 608 }
609 609
610 mLabel->setText( text ); 610 mLabel->setText( text );
611 resizeEvent( 0 ); 611 resizeEvent( 0 );
612} 612}
613void MonthViewCell::updateCell() 613void MonthViewCell::updateCell()
614{ 614{
615 qDebug("MonthViewCell::updateCell() "); 615 qDebug("MonthViewCell::updateCell() ");
616 if ( !mMonthView->isUpdatePossible() ) 616 if ( !mMonthView->isUpdatePossible() )
617 return; 617 return;
618 startUpdateCell(); 618 startUpdateCell();
619 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 619 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
620 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); 620 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true );
621 Event *event; 621 Event *event;
622 for( event = events.first(); event; event = events.next() ) { // for event 622 for( event = events.first(); event; event = events.next() ) { // for event
623 insertEvent(event); 623 insertEvent(event);
624 } 624 }
625 // insert due todos 625 // insert due todos
626 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); 626 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
627 Todo *todo; 627 Todo *todo;
628 for(todo = todos.first(); todo; todo = todos.next()) { 628 for(todo = todos.first(); todo; todo = todos.next()) {
629 insertTodo( todo ); 629 insertTodo( todo );
630 } 630 }
631 finishUpdateCell(); 631 finishUpdateCell();
632 // if ( isVisible()) 632 // if ( isVisible())
633 //qApp->processEvents(); 633 //qApp->processEvents();
634} 634}
635 635
636void MonthViewCell::updateConfig( bool bigFont ) // = false 636void MonthViewCell::updateConfig( bool bigFont ) // = false
637{ 637{
638 638
639 if ( bigFont ) { 639 if ( bigFont ) {
640 QFont fo = KOPrefs::instance()->mMonthViewFont; 640 QFont fo = KOPrefs::instance()->mMonthViewFont;
641 int ps = fo.pointSize() + 2; 641 int ps = fo.pointSize() + 2;
642 if ( ps < 18 ) 642 if ( ps < 18 )
643 ps += 2; 643 ps += 2;
644 fo.setPointSize( ps ); 644 fo.setPointSize( ps );
645 setFont( fo ); 645 setFont( fo );
646 } else 646 } else
647 setFont( KOPrefs::instance()->mMonthViewFont ); 647 setFont( KOPrefs::instance()->mMonthViewFont );
648 648
649 QFontMetrics fm( font() ); 649 QFontMetrics fm( font() );
650 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); 650 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 );
651 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); 651 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 );
652 mHolidayPalette = mStandardPalette; 652 mHolidayPalette = mStandardPalette;
653 mPrimaryPalette = mStandardPalette; 653 mPrimaryPalette = mStandardPalette;
654 mNonPrimaryPalette = mStandardPalette; 654 mNonPrimaryPalette = mStandardPalette;
655 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) { 655 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) {
656 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor ); 656 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor );
657 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor ); 657 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor );
658 mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark()); 658 mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark());
659 mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark()); 659 mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark());
660 mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor); 660 mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor);
661 mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor); 661 mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor);
662 mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark()); 662 mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark());
663 mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor); 663 mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor);
664 mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor); 664 mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor);
665 } 665 }
666 //updateCell(); 666 //updateCell();
667} 667}
668 668
669void MonthViewCell::enableScrollBars( bool enabled ) 669void MonthViewCell::enableScrollBars( bool enabled )
670{ 670{
671 if ( enabled ) { 671 if ( enabled ) {
672 mItemList->setVScrollBarMode(QScrollView::Auto); 672 mItemList->setVScrollBarMode(QScrollView::Auto);
673 mItemList->setHScrollBarMode(QScrollView::Auto); 673 mItemList->setHScrollBarMode(QScrollView::Auto);
674 } else { 674 } else {
675 mItemList->setVScrollBarMode(QScrollView::AlwaysOff); 675 mItemList->setVScrollBarMode(QScrollView::AlwaysOff);
676 mItemList->setHScrollBarMode(QScrollView::AlwaysOff); 676 mItemList->setHScrollBarMode(QScrollView::AlwaysOff);
677 } 677 }
678} 678}
679 679
680Incidence *MonthViewCell::selectedIncidence() 680Incidence *MonthViewCell::selectedIncidence()
681{ 681{
682 int index = mItemList->currentItem(); 682 int index = mItemList->currentItem();
683 if ( index < 0 ) return 0; 683 if ( index < 0 ) return 0;
684 684
685 MonthViewItem *item = 685 MonthViewItem *item =
686 static_cast<MonthViewItem *>( mItemList->item( index ) ); 686 static_cast<MonthViewItem *>( mItemList->item( index ) );
687 687
688 if ( !item ) return 0; 688 if ( !item ) return 0;
689 689
690 return item->incidence(); 690 return item->incidence();
691} 691}
692 692
693QDate MonthViewCell::selectedIncidenceDate() 693QDate MonthViewCell::selectedIncidenceDate()
694{ 694{
695 QDate qd; 695 QDate qd;
696 int index = mItemList->currentItem(); 696 int index = mItemList->currentItem();
697 if ( index < 0 ) return qd; 697 if ( index < 0 ) return qd;
698 698
699 MonthViewItem *item = 699 MonthViewItem *item =
700 static_cast<MonthViewItem *>( mItemList->item( index ) ); 700 static_cast<MonthViewItem *>( mItemList->item( index ) );
701 701
702 if ( !item ) return qd; 702 if ( !item ) return qd;
703 703
704 return item->incidenceDate(); 704 return item->incidenceDate();
705} 705}
706 706
707void MonthViewCell::deselect() 707void MonthViewCell::deselect()
708{ 708{
709 mItemList->clearSelection(); 709 mItemList->clearSelection();
710 enableScrollBars( false ); 710 enableScrollBars( false );
711 // updateCell(); 711 // updateCell();
712} 712}
713void MonthViewCell::select() 713void MonthViewCell::select()
714{ 714{
715 ;// updateCell(); 715 ;// updateCell();
716} 716}
717 717
718void MonthViewCell::resizeEvent ( QResizeEvent * ) 718void MonthViewCell::resizeEvent ( QResizeEvent * )
719{ 719{
720 if ( !mMonthView->isUpdatePossible() ) 720 if ( !mMonthView->isUpdatePossible() )
721 return; 721 return;
722 722
723 int size = height() - mLabel->height() - 2; 723 int size = height() - mLabel->height() - 2;
724 if ( size > 0 ) 724 if ( size > 0 )
725 mItemList->verticalScrollBar()->setMaximumHeight( size ); 725 mItemList->verticalScrollBar()->setMaximumHeight( size );
726 size = width() - mLabel->width() -2; 726 size = width() - mLabel->width() -2;
727 if ( size > 0 ) 727 if ( size > 0 )
728 mItemList->horizontalScrollBar()->setMaximumWidth( size ); 728 mItemList->horizontalScrollBar()->setMaximumWidth( size );
729 mLabel->move( width()-mItemList->lineWidth() - mLabel->width(), height()-mItemList->lineWidth() - mLabel->height() ); 729 mLabel->move( width()-mItemList->lineWidth() - mLabel->width(), height()-mItemList->lineWidth() - mLabel->height() );
730 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 730 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
731} 731}
732 732
733void MonthViewCell::defaultAction( QListBoxItem *item ) 733void MonthViewCell::defaultAction( QListBoxItem *item )
734{ 734{
735 if ( !item ) return; 735 if ( !item ) return;
736 736
737 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 737 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
738 Incidence *incidence = eventItem->incidence(); 738 Incidence *incidence = eventItem->incidence();
739 if ( incidence ) mMonthView->defaultAction( incidence ); 739 if ( incidence ) mMonthView->defaultAction( incidence );
740} 740}
741void MonthViewCell::showDay() 741void MonthViewCell::showDay()
742{ 742{
743 emit showDaySignal( date() ); 743 emit showDaySignal( date() );
744} 744}
745void MonthViewCell::newEvent() 745void MonthViewCell::newEvent()
746{ 746{
747 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 747 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
748 emit newEventSignal( dt ); 748 emit newEventSignal( dt );
749} 749}
750void MonthViewCell::cellClicked( QListBoxItem *item ) 750void MonthViewCell::cellClicked( QListBoxItem *item )
751{ 751{
752 static QListBoxItem * lastClicked = 0; 752 static QListBoxItem * lastClicked = 0;
753 if ( item == 0 ) { 753 if ( item == 0 ) {
754 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 754 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
755 emit newEventSignal( dt ); 755 emit newEventSignal( dt );
756 return; 756 return;
757 } 757 }
758 /* 758 /*
759 if ( lastClicked ) 759 if ( lastClicked )
760 if ( ! item ) { 760 if ( ! item ) {
761 if ( lastClicked->listBox() != item->listBox() ) 761 if ( lastClicked->listBox() != item->listBox() )
762 lastClicked->listBox()->clearSelection(); 762 lastClicked->listBox()->clearSelection();
763 } 763 }
764 */ 764 */
765 765
766 mMonthView->setSelectedCell( this ); 766 mMonthView->setSelectedCell( this );
767 if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true ); 767 if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true );
768 select(); 768 select();
769} 769}
770 770
771void MonthViewCell::contextMenu( QListBoxItem *item ) 771void MonthViewCell::contextMenu( QListBoxItem *item )
772{ 772{
773 if ( !item ) return; 773 if ( !item ) return;
774 774
775 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 775 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
776 Incidence *incidence = eventItem->incidence(); 776 Incidence *incidence = eventItem->incidence();
777 if ( incidence ) mMonthView->showContextMenu( incidence ); 777 if ( incidence ) mMonthView->showContextMenu( incidence );
778} 778}
779 779
780void MonthViewCell::selection( QListBoxItem *item ) 780void MonthViewCell::selection( QListBoxItem *item )
781{ 781{
782 if ( !item ) return; 782 if ( !item ) return;
783 783
784 mMonthView->setSelectedCell( this ); 784 mMonthView->setSelectedCell( this );
785} 785}
786 786
787 787
788// ******************************************************************************* 788// *******************************************************************************
789// ******************************************************************************* 789// *******************************************************************************
790// ******************************************************************************* 790// *******************************************************************************
791 791
792 792
793KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) 793KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
794 : KOEventView( calendar, parent, name ), 794 : KOEventView( calendar, parent, name ),
795 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), 795 mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
796 mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) 796 mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
797{ 797{
798 mShortDayLabelsM = false; 798 mShortDayLabelsM = false;
799 mShortDayLabelsW = false; 799 mShortDayLabelsW = false;
800 skipResize = false; 800 skipResize = false;
801 clPending = true; 801 clPending = true;
802 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); 802 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" );
803 mWidStack = new QWidgetStack( this ); 803 mWidStack = new QWidgetStack( this );
804 QVBoxLayout* hb = new QVBoxLayout( this ); 804 QVBoxLayout* hb = new QVBoxLayout( this );
805 mMonthView = new QWidget( mWidStack ); 805 mMonthView = new QWidget( mWidStack );
806 mWeekView = new QWidget( mWidStack ); 806 mWeekView = new QWidget( mWidStack );
807#if QT_VERSION >= 0x030000 807#if QT_VERSION >= 0x030000
808 mWidStack->addWidget(mMonthView ); 808 mWidStack->addWidget(mMonthView );
809 mWidStack->addWidget(mWeekView ); 809 mWidStack->addWidget(mWeekView );
810#else 810#else
811 mWidStack->addWidget( mMonthView, 1 ); 811 mWidStack->addWidget( mMonthView, 1 );
812 mWidStack->addWidget( mWeekView , 1 ); 812 mWidStack->addWidget( mWeekView , 1 );
813#endif 813#endif
814 hb->addWidget( mNavigatorBar ); 814 hb->addWidget( mNavigatorBar );
815 hb->addWidget( mWidStack ); 815 hb->addWidget( mWidStack );
816 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 816 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
817 mShowWeekView = KOPrefs::instance()->mMonthViewWeek; 817 mShowWeekView = KOPrefs::instance()->mMonthViewWeek;
818 if ( mShowWeekView ) 818 if ( mShowWeekView )
819 mWeekStartsMonday = true; 819 mWeekStartsMonday = true;
820 updatePossible = false; 820 updatePossible = false;
821 //updatePossible = true; 821 //updatePossible = true;
822 mCells.setAutoDelete( true ); 822 mCells.setAutoDelete( true );
823 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 823 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
824 mDayLabels.resize( mDaysPerWeek ); 824 mDayLabels.resize( mDaysPerWeek );
825 mDayLabelsW.resize( mDaysPerWeek ); 825 mDayLabelsW.resize( mDaysPerWeek );
826 QFont bfont = font(); 826 QFont bfont = font();
827 if ( QApplication::desktop()->width() < 650 ) { 827 if ( QApplication::desktop()->width() < 650 ) {
828 bfont.setPointSize( bfont.pointSize() - 2 ); 828 bfont.setPointSize( bfont.pointSize() - 2 );
829 } 829 }
830 bfont.setBold( true ); 830 bfont.setBold( true );
831 int i; 831 int i;
832 832
833 for( i = 0; i < mDaysPerWeek; i++ ) { 833 for( i = 0; i < mDaysPerWeek; i++ ) {
834 QLabel *label = new QLabel( mMonthView ); 834 QLabel *label = new QLabel( mMonthView );
835 label->setFont(bfont); 835 label->setFont(bfont);
836 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 836 label->setFrameStyle(QFrame::Panel|QFrame::Raised);
837 label->setLineWidth(1); 837 label->setLineWidth(1);
838 label->setAlignment(AlignCenter); 838 label->setAlignment(AlignCenter);
839 mDayLabels.insert( i, label ); 839 mDayLabels.insert( i, label );
840 label = new QLabel( mWeekView ); 840 label = new QLabel( mWeekView );
841 label->setFont(bfont); 841 label->setFont(bfont);
842 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 842 label->setFrameStyle(QFrame::Panel|QFrame::Raised);
843 label->setLineWidth(1); 843 label->setLineWidth(1);
844 label->setAlignment(AlignCenter); 844 label->setAlignment(AlignCenter);
845 mDayLabelsW.insert( i, label ); 845 mDayLabelsW.insert( i, label );
846 } 846 }
847 847
848 bfont.setBold( false ); 848 bfont.setBold( false );
849 mWeekLabels.resize( mNumWeeks+1 ); 849 mWeekLabels.resize( mNumWeeks+1 );
850 mWeekLabelsW.resize( 2 ); 850 mWeekLabelsW.resize( 2 );
851 for( i = 0; i < mNumWeeks+1; i++ ) { 851 for( i = 0; i < mNumWeeks+1; i++ ) {
852 KOWeekButton *label = new KOWeekButton( mMonthView ); 852 KOWeekButton *label = new KOWeekButton( mMonthView );
853 label->setFocusPolicy(NoFocus); 853 label->setFocusPolicy(NoFocus);
854 label->setFont(bfont); 854 label->setFont(bfont);
855 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 855 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
856 label->setFlat(true); 856 label->setFlat(true);
857 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 857 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
858 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 858 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
859 //label->setLineWidth(1); 859 //label->setLineWidth(1);
860 //label->setAlignment(AlignCenter); 860 //label->setAlignment(AlignCenter);
861 mWeekLabels.insert( i, label ); 861 mWeekLabels.insert( i, label );
862 } 862 }
863 mWeekLabels[mNumWeeks]->setText( i18n("W")); 863 mWeekLabels[mNumWeeks]->setText( i18n("W"));
864 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); 864 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
865 865
866 for( i = 0; i < 1+1; i++ ) { 866 for( i = 0; i < 1+1; i++ ) {
867 KOWeekButton *label = new KOWeekButton( mWeekView ); 867 KOWeekButton *label = new KOWeekButton( mWeekView );
868 label->setFocusPolicy(NoFocus); 868 label->setFocusPolicy(NoFocus);
869 label->setFont(bfont); 869 label->setFont(bfont);
870 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 870 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
871 label->setFlat(true); 871 label->setFlat(true);
872 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 872 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
873 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 873 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
874 //label->setLineWidth(1); 874 //label->setLineWidth(1);
875 //label->setAlignment(AlignCenter); 875 //label->setAlignment(AlignCenter);
876 mWeekLabelsW.insert( i, label ); 876 mWeekLabelsW.insert( i, label );
877 } 877 }
878 mWeekLabelsW[1]->setText( i18n("W")); 878 mWeekLabelsW[1]->setText( i18n("W"));
879 879
880 880
881 int row, col; 881 int row, col;
882 mCells.resize( mNumCells ); 882 mCells.resize( mNumCells );
883 for( row = 0; row < mNumWeeks; ++row ) { 883 for( row = 0; row < mNumWeeks; ++row ) {
884 for( col = 0; col < mDaysPerWeek; ++col ) { 884 for( col = 0; col < mDaysPerWeek; ++col ) {
885 MonthViewCell *cell = new MonthViewCell( this, mMonthView ); 885 MonthViewCell *cell = new MonthViewCell( this, mMonthView );
886 mCells.insert( row * mDaysPerWeek + col, cell ); 886 mCells.insert( row * mDaysPerWeek + col, cell );
887 887
888 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 888 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
889 SLOT( defaultAction( Incidence * ) ) ); 889 SLOT( defaultAction( Incidence * ) ) );
890 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 890 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
891 SIGNAL( newEventSignal( QDateTime ) ) ); 891 SIGNAL( newEventSignal( QDateTime ) ) );
892 connect( cell, SIGNAL( showDaySignal( QDate ) ), 892 connect( cell, SIGNAL( showDaySignal( QDate ) ),
893 SIGNAL( showDaySignal( QDate ) ) ); 893 SIGNAL( showDaySignal( QDate ) ) );
894 } 894 }
895 } 895 }
896 mCellsW.resize( mDaysPerWeek ); 896 mCellsW.resize( mDaysPerWeek );
897 for( col = 0; col < mDaysPerWeek; ++col ) { 897 for( col = 0; col < mDaysPerWeek; ++col ) {
898 MonthViewCell *cell = new MonthViewCell( this, mWeekView ); 898 MonthViewCell *cell = new MonthViewCell( this, mWeekView );
899 mCellsW.insert( col, cell ); 899 mCellsW.insert( col, cell );
900 900
901 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 901 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
902 SLOT( defaultAction( Incidence * ) ) ); 902 SLOT( defaultAction( Incidence * ) ) );
903 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 903 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
904 SIGNAL( newEventSignal( QDateTime ) ) ); 904 SIGNAL( newEventSignal( QDateTime ) ) );
905 connect( cell, SIGNAL( showDaySignal( QDate ) ), 905 connect( cell, SIGNAL( showDaySignal( QDate ) ),
906 SIGNAL( showDaySignal( QDate ) ) ); 906 SIGNAL( showDaySignal( QDate ) ) );
907 cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont ); 907 cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
908 } 908 }
909 909
910 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); 910 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
911 mContextMenu = eventPopup(); 911 mContextMenu = eventPopup();
912 // updateConfig(); //useless here... 912 // updateConfig(); //useless here...
913 // ... but we need mWidthLongDayLabel computed 913 // ... but we need mWidthLongDayLabel computed
914 QFontMetrics fontmetric(mDayLabels[0]->font()); 914 QFontMetrics fontmetric(mDayLabels[0]->font());
915 mWidthLongDayLabel = 0; 915 mWidthLongDayLabel = 0;
916 for (int i = 0; i < 7; i++) { 916 for (int i = 0; i < 7; i++) {
917 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 917 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
918 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 918 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
919 } 919 }
920 920
921 //mWeekLabels[mNumWeeks]->setText( i18n("W")); 921 //mWeekLabels[mNumWeeks]->setText( i18n("W"));
922 922
923#if 0 923#if 0
924 if ( mShowWeekView ) 924 if ( mShowWeekView )
925 mWidStack->raiseWidget( mWeekView ); 925 mWidStack->raiseWidget( mWeekView );
926 else 926 else
927 mWidStack->raiseWidget( mMonthView ); 927 mWidStack->raiseWidget( mMonthView );
928#endif 928#endif
929 929
930 emit incidenceSelected( 0 ); 930 emit incidenceSelected( 0 );
931#ifndef DESKTOP_VERSION 931#ifndef DESKTOP_VERSION
932 resize( QApplication::desktop()->size() ); 932 resize( QApplication::desktop()->size() );
933#else 933#else
934 resize(640, 480 ); 934 resize(640, 480 );
935 updatePossible = true; 935 updatePossible = true;
936#endif 936#endif
937 computeLayout(); 937 computeLayout();
938 938
939 if ( mShowWeekView ) 939 if ( mShowWeekView )
940 mWidStack->raiseWidget( mWeekView ); 940 mWidStack->raiseWidget( mWeekView );
941 else 941 else
942 mWidStack->raiseWidget( mMonthView ); 942 mWidStack->raiseWidget( mMonthView );
943} 943}
944 944
945KOMonthView::~KOMonthView() 945KOMonthView::~KOMonthView()
946{ 946{
947 delete mContextMenu; 947 delete mContextMenu;
948} 948}
949 949
950void KOMonthView::selectInternalWeekNum ( int n ) 950void KOMonthView::selectInternalWeekNum ( int n )
951{ 951{
952 switchView(); 952 switchView();
953 emit selectWeekNum ( n ); 953 if ( !KOPrefs::instance()->mMonthViewWeek )
954 emit selectMonth ();
955 else
956 emit selectWeekNum ( n );
954} 957}
955 958
956int KOMonthView::currentWeek() 959int KOMonthView::currentWeek()
957{ 960{
958 if ( mShowWeekView ) 961 if ( mShowWeekView )
959 return mWeekLabelsW[0]->getWeekNum(); 962 return mWeekLabelsW[0]->getWeekNum();
960 return mWeekLabels[0]->getWeekNum(); 963 return mWeekLabels[0]->getWeekNum();
961} 964}
962void KOMonthView::switchView() 965void KOMonthView::switchView()
963{ 966{
964
965 if ( selectedCell( ) ) 967 if ( selectedCell( ) )
966 selectedCell()->deselect(); 968 selectedCell()->deselect();
967 mShowWeekView = !mShowWeekView; 969 mShowWeekView = !mShowWeekView;
968 KOPrefs::instance()->mMonthViewWeek = mShowWeekView; 970 KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
969 if ( clPending ) { 971 if ( clPending ) {
970 computeLayout(); 972 computeLayout();
971 updateConfig(); 973 updateConfig();
972 } 974 }
973 if ( mShowWeekView ) 975 if ( mShowWeekView )
974 mWidStack->raiseWidget( mWeekView ); 976 mWidStack->raiseWidget( mWeekView );
975 else 977 else
976 mWidStack->raiseWidget( mMonthView ); 978 mWidStack->raiseWidget( mMonthView );
977 clPending = false; 979 clPending = false;
978} 980}
979 981
980int KOMonthView::maxDatesHint() 982int KOMonthView::maxDatesHint()
981{ 983{
982 return mNumCells; 984 return mNumCells;
983} 985}
984 986
985int KOMonthView::currentDateCount() 987int KOMonthView::currentDateCount()
986{ 988{
987 return mNumCells; 989 return mNumCells;
988} 990}
989 991
990QPtrList<Incidence> KOMonthView::selectedIncidences() 992QPtrList<Incidence> KOMonthView::selectedIncidences()
991{ 993{
992 QPtrList<Incidence> selected; 994 QPtrList<Incidence> selected;
993 995
994 if ( mSelectedCell ) { 996 if ( mSelectedCell ) {
995 Incidence *incidence = mSelectedCell->selectedIncidence(); 997 Incidence *incidence = mSelectedCell->selectedIncidence();
996 if ( incidence ) selected.append( incidence ); 998 if ( incidence ) selected.append( incidence );
997 } 999 }
998 1000
999 return selected; 1001 return selected;
1000} 1002}
1001 1003
1002DateList KOMonthView::selectedDates() 1004DateList KOMonthView::selectedDates()
1003{ 1005{
1004 DateList selected; 1006 DateList selected;
1005 1007
1006 if ( mSelectedCell ) { 1008 if ( mSelectedCell ) {
1007 QDate qd = mSelectedCell->selectedIncidenceDate(); 1009 QDate qd = mSelectedCell->selectedIncidenceDate();
1008 if ( qd.isValid() ) selected.append( qd ); 1010 if ( qd.isValid() ) selected.append( qd );
1009 } 1011 }
1010 1012
1011 return selected; 1013 return selected;
1012} 1014}
1013 1015
1014void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, 1016void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1015 const QDate &td) 1017 const QDate &td)
1016{ 1018{
1017#ifndef KORG_NOPRINTER 1019#ifndef KORG_NOPRINTER
1018 calPrinter->preview(CalPrinter::Month, fd, td); 1020 calPrinter->preview(CalPrinter::Month, fd, td);
1019#endif 1021#endif
1020} 1022}
1021 1023
1022void KOMonthView::updateConfig() 1024void KOMonthView::updateConfig()
1023{ 1025{
1024 1026
1025 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 1027 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
1026 1028
1027 if ( mShowWeekView ) { 1029 if ( mShowWeekView ) {
1028 mWeekStartsMonday = true; 1030 mWeekStartsMonday = true;
1029 } 1031 }
1030 QFontMetrics fontmetric(mDayLabels[0]->font()); 1032 QFontMetrics fontmetric(mDayLabels[0]->font());
1031 mWidthLongDayLabel = 0; 1033 mWidthLongDayLabel = 0;
1032 1034
1033 for (int i = 0; i < 7; i++) { 1035 for (int i = 0; i < 7; i++) {
1034 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 1036 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
1035 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 1037 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
1036 } 1038 }
1037 bool temp = mShowSatSunComp ; 1039 bool temp = mShowSatSunComp ;
1038 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 1040 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
1039 if ( ! mShowWeekView ) { 1041 if ( ! mShowWeekView ) {
1040 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) 1042 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog )
1041 computeLayout(); 1043 computeLayout();
1042 } 1044 }
1043 updateDayLabels(); 1045 updateDayLabels();
1044 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); 1046 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks);
1045 //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; 1047 //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks;
1046 //resizeEvent( 0 ); 1048 //resizeEvent( 0 );
1047 for (uint i = 0; i < mCells.count(); ++i) { 1049 for (uint i = 0; i < mCells.count(); ++i) {
1048 mCells[i]->updateConfig(); 1050 mCells[i]->updateConfig();
1049 } 1051 }
1050 1052
1051 for (uint i = 0; i < mCellsW.count(); ++i) { 1053 for (uint i = 0; i < mCellsW.count(); ++i) {
1052 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont); 1054 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont);
1053 } 1055 }
1054#ifdef DESKTOP_VERSION 1056#ifdef DESKTOP_VERSION
1055 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 1057 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
1056#endif 1058#endif
1057 updateView(); 1059 updateView();
1058} 1060}
1059 1061
1060void KOMonthView::updateDayLabels() 1062void KOMonthView::updateDayLabels()
1061{ 1063{
1062 1064
1063 QPtrVector<QLabel> *mDayLabelsT; 1065 QPtrVector<QLabel> *mDayLabelsT;
1064 1066
1065 mDayLabelsT = &mDayLabelsW; 1067 mDayLabelsT = &mDayLabelsW;
1066 for (int i = 0; i < 7; i++) { 1068 for (int i = 0; i < 7; i++) {
1067 if (mWeekStartsMonday) { 1069 if (mWeekStartsMonday) {
1068 bool show = mShortDayLabelsW; 1070 bool show = mShortDayLabelsW;
1069 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) 1071 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
1070 show = true; 1072 show = true;
1071 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 1073 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
1072 } else { 1074 } else {
1073 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW)); 1075 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW));
1074 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW)); 1076 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW));
1075 1077
1076 } 1078 }
1077 } 1079 }
1078 mDayLabelsT = &mDayLabels; 1080 mDayLabelsT = &mDayLabels;
1079 for (int i = 0; i < 7; i++) { 1081 for (int i = 0; i < 7; i++) {
1080 if (mWeekStartsMonday) { 1082 if (mWeekStartsMonday) {
1081 bool show = mShortDayLabelsM; 1083 bool show = mShortDayLabelsM;
1082 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) 1084 if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() )
1083 show = true; 1085 show = true;
1084 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); 1086 (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
1085 } else { 1087 } else {
1086 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsM)); 1088 if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsM));
1087 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsM)); 1089 else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsM));
1088 1090
1089 } 1091 }
1090 } 1092 }
1091 1093
1092} 1094}
1093 1095
1094void KOMonthView::showDates(const QDate &start, const QDate &) 1096void KOMonthView::showDates(const QDate &start, const QDate &)
1095{ 1097{
1096 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl; 1098 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl;
1097 1099
1098 QPtrVector<MonthViewCell> *cells; 1100 QPtrVector<MonthViewCell> *cells;
1099 QPtrVector<QLabel> *dayLabels; 1101 QPtrVector<QLabel> *dayLabels;
1100 QPtrVector<KOWeekButton> *weekLabels; 1102 QPtrVector<KOWeekButton> *weekLabels;
1101 int weekNum = 6; 1103 int weekNum = 6;
1102 if ( mShowWeekView ) { 1104 if ( mShowWeekView ) {
1103 weekNum = 1; 1105 weekNum = 1;
1104 cells = &mCellsW; 1106 cells = &mCellsW;
1105 dayLabels = &mDayLabelsW; 1107 dayLabels = &mDayLabelsW;
1106 weekLabels = &mWeekLabelsW; 1108 weekLabels = &mWeekLabelsW;
1107 } else { 1109 } else {
1108 cells = &mCells; 1110 cells = &mCells;
1109 dayLabels = &mDayLabels; 1111 dayLabels = &mDayLabels;
1110 weekLabels = &mWeekLabels; 1112 weekLabels = &mWeekLabels;
1111 } 1113 }
1112 1114
1113 mStartDate = start; 1115 mStartDate = start;
1114 1116
1115 int startWeekDay = mWeekStartsMonday ? 1 : 7; 1117 int startWeekDay = mWeekStartsMonday ? 1 : 7;
1116 1118
1117 while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) { 1119 while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) {
1118 mStartDate = mStartDate.addDays( -1 ); 1120 mStartDate = mStartDate.addDays( -1 );
1119 } 1121 }
1120 1122
1121 bool primary = false; 1123 bool primary = false;
1122 uint i; 1124 uint i;
1123 for( i = 0; i < (*cells).size(); ++i ) { 1125 for( i = 0; i < (*cells).size(); ++i ) {
1124 QDate date = mStartDate.addDays( i ); 1126 QDate date = mStartDate.addDays( i );
1125 (*cells)[i]->setDate( date ); 1127 (*cells)[i]->setDate( date );
1126 1128
1127#ifndef KORG_NOPLUGINS 1129#ifndef KORG_NOPLUGINS
1128 // add holiday, if present 1130 // add holiday, if present
1129 QString hstring(KOCore::self()->holiday(date)); 1131 QString hstring(KOCore::self()->holiday(date));
1130 (*cells)[i]->setHoliday( hstring ); 1132 (*cells)[i]->setHoliday( hstring );
1131#endif 1133#endif
1132 1134
1133 } 1135 }
1134 QDate date = mStartDate.addDays( mWeekStartsMonday ? 3 : 4 ); 1136 QDate date = mStartDate.addDays( mWeekStartsMonday ? 3 : 4 );
1135 for( i = 0; i < weekNum; ++i ) { 1137 for( i = 0; i < weekNum; ++i ) {
1136 int wno; 1138 int wno;
1137 // remember, according to ISO 8601, the first week of the year is the 1139 // remember, according to ISO 8601, the first week of the year is the
1138 // first week that contains a thursday. Thus we must subtract off 4, 1140 // first week that contains a thursday. Thus we must subtract off 4,
1139 // not just 1. 1141 // not just 1.
1140 int dayOfYear = date.dayOfYear(); 1142 int dayOfYear = date.dayOfYear();
1141 if (dayOfYear % 7 != 0) 1143 if (dayOfYear % 7 != 0)
1142 wno = dayOfYear / 7 + 1; 1144 wno = dayOfYear / 7 + 1;
1143 else 1145 else
1144 wno =dayOfYear / 7; 1146 wno =dayOfYear / 7;
1145 (*weekLabels)[i]->setWeekNum( wno ); 1147 (*weekLabels)[i]->setWeekNum( wno );
1146 date = date.addDays( 7 ); 1148 date = date.addDays( 7 );
1147 } 1149 }
1148 updateView(); 1150 updateView();
1149} 1151}
1150 1152
1151void KOMonthView::showEvents(QPtrList<Event>) 1153void KOMonthView::showEvents(QPtrList<Event>)
1152{ 1154{
1153 qDebug("KOMonthView::selectEvents is not implemented yet. "); 1155 qDebug("KOMonthView::selectEvents is not implemented yet. ");
1154} 1156}
1155 1157
1156void KOMonthView::changeEventDisplay(Event *, int) 1158void KOMonthView::changeEventDisplay(Event *, int)
1157{ 1159{
1158 // this should be re-written to be much more efficient, but this 1160 // this should be re-written to be much more efficient, but this
1159 // quick-and-dirty-hack gets the job done for right now. 1161 // quick-and-dirty-hack gets the job done for right now.
1160 updateView(); 1162 updateView();
1161} 1163}
1162 1164
1163void KOMonthView::updateView() 1165void KOMonthView::updateView()
1164{ 1166{
1165 1167
1166 if ( !updatePossible ) 1168 if ( !updatePossible )
1167 return; 1169 return;
1168 //QTime ti; 1170 //QTime ti;
1169 //ti.start(); 1171 //ti.start();
1170 QPtrVector<MonthViewCell> *cells; 1172 QPtrVector<MonthViewCell> *cells;
1171 if ( mShowWeekView ) { 1173 if ( mShowWeekView ) {
1172 cells = &mCellsW; 1174 cells = &mCellsW;
1173 } else { 1175 } else {
1174 cells = &mCells; 1176 cells = &mCells;
1175 } 1177 }
1176#if 1 1178#if 1
1177 int i; 1179 int i;
1178 int timeSpan = (*cells).size()-1; 1180 int timeSpan = (*cells).size()-1;
1179 if ( KOPrefs::instance()->mMonthViewWeek ) 1181 if ( KOPrefs::instance()->mMonthViewWeek )
1180 timeSpan = 6; 1182 timeSpan = 6;
1181 for( i = 0; i < timeSpan + 1; ++i ) { 1183 for( i = 0; i < timeSpan + 1; ++i ) {
1182 (*cells)[i]->startUpdateCell(); 1184 (*cells)[i]->startUpdateCell();
1183 } 1185 }
1184 1186
1185 QPtrList<Event> events = calendar()->events(); 1187 QPtrList<Event> events = calendar()->events();
1186 Event *event; 1188 Event *event;
1187 QDateTime dt; 1189 QDateTime dt;
1188 bool ok; 1190 bool ok;
1189 QDate endDate = mStartDate.addDays( timeSpan ); 1191 QDate endDate = mStartDate.addDays( timeSpan );
1190 for( event = events.first(); event; event = events.next() ) { // for event 1192 for( event = events.first(); event; event = events.next() ) { // for event
1191 if ( event->doesRecur() ) { 1193 if ( event->doesRecur() ) {
1192 bool last; 1194 bool last;
1193 QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); 1195 QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last );
1194 QDateTime incidenceEnd; 1196 QDateTime incidenceEnd;
1195 int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); 1197 int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() );
1196 bool invalid = false; 1198 bool invalid = false;
1197 while( true ) { 1199 while( true ) {
1198 if ( incidenceStart.isValid() ) { 1200 if ( incidenceStart.isValid() ) {
1199 incidenceEnd = incidenceStart.addDays( eventlen ); 1201 incidenceEnd = incidenceStart.addDays( eventlen );
1200 int st = incidenceStart.date().daysTo( endDate ); 1202 int st = incidenceStart.date().daysTo( endDate );
1201 if ( st >= 0 ) { // start before timeend 1203 if ( st >= 0 ) { // start before timeend
1202 int end = mStartDate.daysTo( incidenceEnd.date() ); 1204 int end = mStartDate.daysTo( incidenceEnd.date() );
1203 if ( end >= 0 ) { // end after timestart --- got one! 1205 if ( end >= 0 ) { // end after timestart --- got one!
1204 //normalize 1206 //normalize
1205 st = timeSpan - st; 1207 st = timeSpan - st;
1206 if ( st < 0 ) st = 0; 1208 if ( st < 0 ) st = 0;
1207 if ( end > timeSpan ) end = timeSpan; 1209 if ( end > timeSpan ) end = timeSpan;
1208 int iii; 1210 int iii;
1209 //qDebug("found %s %d %d ",event->summary().latin1(), st, end ); 1211 //qDebug("found %s %d %d ",event->summary().latin1(), st, end );
1210 for ( iii = st;iii<= end;++iii) 1212 for ( iii = st;iii<= end;++iii)
1211 (*cells)[iii]->insertEvent( event ); 1213 (*cells)[iii]->insertEvent( event );
1212 } 1214 }
1213 } 1215 }
1214 } else { 1216 } else {
1215 if ( invalid ) 1217 if ( invalid )
1216 break; 1218 break;
1217 invalid = true; 1219 invalid = true;
1218 //qDebug("invalid %s", event->summary().latin1()); 1220 //qDebug("invalid %s", event->summary().latin1());
1219 incidenceStart = QDateTime( mStartDate ).addSecs( -2 );; 1221 incidenceStart = QDateTime( mStartDate ).addSecs( -2 );;
1220 } 1222 }
1221 if ( last ) 1223 if ( last )
1222 break; 1224 break;
1223 bool ok; 1225 bool ok;
1224 incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); 1226 incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok );
1225 if ( ! ok ) 1227 if ( ! ok )
1226 break; 1228 break;
1227 if ( incidenceStart.date() > endDate ) 1229 if ( incidenceStart.date() > endDate )
1228 break; 1230 break;
1229 } 1231 }
1230 } else { // no recur 1232 } else { // no recur
1231 int st = event->dtStart().date().daysTo( endDate ); 1233 int st = event->dtStart().date().daysTo( endDate );
1232 if ( st >= 0 ) { // start before timeend 1234 if ( st >= 0 ) { // start before timeend
1233 int end = mStartDate.daysTo( event->dtEnd().date() ); 1235 int end = mStartDate.daysTo( event->dtEnd().date() );
1234 if ( end >= 0 ) { // end after timestart --- got one! 1236 if ( end >= 0 ) { // end after timestart --- got one!
1235 //normalize 1237 //normalize
1236 st = timeSpan - st; 1238 st = timeSpan - st;
1237 if ( st < 0 ) st = 0; 1239 if ( st < 0 ) st = 0;
1238 if ( end > timeSpan ) end = timeSpan; 1240 if ( end > timeSpan ) end = timeSpan;
1239 int iii; 1241 int iii;
1240 for ( iii = st;iii<= end;++iii) 1242 for ( iii = st;iii<= end;++iii)
1241 (*cells)[iii]->insertEvent( event ); 1243 (*cells)[iii]->insertEvent( event );
1242 } 1244 }
1243 } 1245 }
1244 } 1246 }
1245 } 1247 }
1246 // insert due todos 1248 // insert due todos
1247 QPtrList<Todo> todos = calendar()->todos( ); 1249 QPtrList<Todo> todos = calendar()->todos( );
1248 Todo *todo; 1250 Todo *todo;
1249 for(todo = todos.first(); todo; todo = todos.next()) { 1251 for(todo = todos.first(); todo; todo = todos.next()) {
1250 //insertTodo( todo ); 1252 //insertTodo( todo );
1251 if ( todo->hasDueDate() ) { 1253 if ( todo->hasDueDate() ) {
1252 int day = mStartDate.daysTo( todo->dtDue().date() ); 1254 int day = mStartDate.daysTo( todo->dtDue().date() );
1253 if ( day >= 0 && day < timeSpan + 1) { 1255 if ( day >= 0 && day < timeSpan + 1) {
1254 (*cells)[day]->insertTodo( todo ); 1256 (*cells)[day]->insertTodo( todo );
1255 } 1257 }
1256 } 1258 }
1257 } 1259 }
1258 1260
1259 for( i = 0; i < timeSpan+1; ++i ) { 1261 for( i = 0; i < timeSpan+1; ++i ) {
1260 (*cells)[i]->finishUpdateCell(); 1262 (*cells)[i]->finishUpdateCell();
1261 } 1263 }
1262 processSelectionChange(); 1264 processSelectionChange();
1263 (*cells)[0]->setFocus(); 1265 (*cells)[0]->setFocus();
1264 1266
1265 1267
1266#else 1268#else
1267 // old code 1269 // old code
1268 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); 1270 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
1269 int i; 1271 int i;
1270 for( i = 0; i < (*cells).count(); ++i ) { 1272 for( i = 0; i < (*cells).count(); ++i ) {
1271 (*cells)[i]->updateCell(); 1273 (*cells)[i]->updateCell();
1272 } 1274 }
1273 1275
1274 //qDebug("KOMonthView::updateView() "); 1276 //qDebug("KOMonthView::updateView() ");
1275 processSelectionChange(); 1277 processSelectionChange();
1276 // qDebug("---------------------------------------------------------------------+ "); 1278 // qDebug("---------------------------------------------------------------------+ ");
1277 (*cells)[0]->setFocus(); 1279 (*cells)[0]->setFocus();
1278#endif 1280#endif
1279 1281
1280 //qDebug("update time %d ", ti.elapsed()); 1282 //qDebug("update time %d ", ti.elapsed());
1281} 1283}
1282 1284
1283void KOMonthView::resizeEvent(QResizeEvent * e) 1285void KOMonthView::resizeEvent(QResizeEvent * e)
1284{ 1286{
1285 //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); 1287 //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height());
1286 computeLayout(); 1288 computeLayout();
1287 clPending = true; 1289 clPending = true;
1288 if ( mShowWeekView ) 1290 if ( mShowWeekView )
1289 mCellsW[0]->setFocus(); 1291 mCellsW[0]->setFocus();
1290 else 1292 else
1291 mCells[0]->setFocus(); 1293 mCells[0]->setFocus();
1292} 1294}
1293void KOMonthView::computeLayoutWeek() 1295void KOMonthView::computeLayoutWeek()
1294{ 1296{
1295 static int lastWid = 0; 1297 static int lastWid = 0;
1296 static int lastHei = 0; 1298 static int lastHei = 0;
1297 int daysToShow; 1299 int daysToShow;
1298 bool combinedSatSun = false; 1300 bool combinedSatSun = false;
1299 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1301 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1300 daysToShow = 6; 1302 daysToShow = 6;
1301 combinedSatSun = true; 1303 combinedSatSun = true;
1302 } 1304 }
1303 int tWid = topLevelWidget()->size().width(); 1305 int tWid = topLevelWidget()->size().width();
1304 int tHei = topLevelWidget()->size().height(); 1306 int tHei = topLevelWidget()->size().height();
1305 1307
1306 int wid = width();//e 1308 int wid = width();//e
1307 int hei = height()-1-mNavigatorBar->height(); 1309 int hei = height()-1-mNavigatorBar->height();
1308 1310
1309 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) 1311 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
1310 return; 1312 return;
1311 1313
1312 if ( lastWid == width() && lastHei == height() ) 1314 if ( lastWid == width() && lastHei == height() )
1313 return; 1315 return;
1314 lastWid = width(); 1316 lastWid = width();
1315 lastHei = height(); 1317 lastHei = height();
1316 1318
1317 1319
1318 if ( wid < hei ) 1320 if ( wid < hei )
1319 daysToShow = 2; 1321 daysToShow = 2;
1320 else 1322 else
1321 daysToShow = 3; 1323 daysToShow = 3;
1322 mShowSatSunComp = true; 1324 mShowSatSunComp = true;
1323 combinedSatSun = true; 1325 combinedSatSun = true;
1324 1326
1325 //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ "); 1327 //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ ");
1326 QFontMetrics fm ( mWeekLabels[0]->font() ); 1328 QFontMetrics fm ( mWeekLabels[0]->font() );
1327 int weeklabelwid = fm.width( "888" ); 1329 int weeklabelwid = fm.width( "888" );
1328 wid -= weeklabelwid; 1330 wid -= weeklabelwid;
1329 1331
1330 int colWid = wid / daysToShow; 1332 int colWid = wid / daysToShow;
1331 int lastCol = wid - ( colWid*6 ); 1333 int lastCol = wid - ( colWid*6 );
1332 int dayLabelHei = mDayLabelsW[0]->sizeHint().height(); 1334 int dayLabelHei = mDayLabelsW[0]->sizeHint().height();
1333 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow ); 1335 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
1334 int colModulo = wid % daysToShow; 1336 int colModulo = wid % daysToShow;
1335 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1; 1337 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1;
1336 //qDebug("rowmod %d ", rowModulo); 1338 //qDebug("rowmod %d ", rowModulo);
1337 int i; 1339 int i;
1338 int x,y,w,h; 1340 int x,y,w,h;
1339 x= 0; 1341 x= 0;
1340 y= 0; 1342 y= 0;
1341 w = colWid; 1343 w = colWid;
1342 h = dayLabelHei ; 1344 h = dayLabelHei ;
1343 for ( i = 0; i < 7; i++) { 1345 for ( i = 0; i < 7; i++) {
1344 if ( i && !( i % daysToShow) && i < 6) { 1346 if ( i && !( i % daysToShow) && i < 6) {
1345 y += hei/(5-daysToShow); 1347 y += hei/(5-daysToShow);
1346 x = 0; 1348 x = 0;
1347 w = colWid; 1349 w = colWid;
1348 } 1350 }
1349 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1351 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1350 ++w; 1352 ++w;
1351 } 1353 }
1352 if ( i >= 5 ) { 1354 if ( i >= 5 ) {
1353 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h); 1355 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
1354 x -= (w/2 ); 1356 x -= (w/2 );
1355 } 1357 }
1356 else 1358 else
1357 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w,h); 1359 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w,h);
1358 x += w; 1360 x += w;
1359 } 1361 }
1360 x= 0; 1362 x= 0;
1361 y= dayLabelHei; 1363 y= dayLabelHei;
1362 w = colWid; 1364 w = colWid;
1363 h = cellHei; 1365 h = cellHei;
1364 for ( i = 0; i < mCellsW.count(); ++i) { 1366 for ( i = 0; i < mCellsW.count(); ++i) {
1365 if ( i > 6 ) { 1367 if ( i > 6 ) {
1366 mCellsW[i]->hide(); 1368 mCellsW[i]->hide();
1367 continue; 1369 continue;
1368 } 1370 }
1369 1371
1370 w = colWid; 1372 w = colWid;
1371 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1373 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1372 ++w; 1374 ++w;
1373 } 1375 }
1374 if ( i == (daysToShow-1-rowModulo)*7) 1376 if ( i == (daysToShow-1-rowModulo)*7)
1375 ++h; 1377 ++h;
1376 1378
1377 if ( i >= 5 ) { 1379 if ( i >= 5 ) {
1378 if ( i ==5 ) { 1380 if ( i ==5 ) {
1379 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1381 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h/2 );
1380 x -= w ;y += h/2; 1382 x -= w ;y += h/2;
1381 } else { 1383 } else {
1382 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) { 1384 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) {
1383 ++w; 1385 ++w;
1384 } 1386 }
1385 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1387 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 );
1386 y -= h/2; 1388 y -= h/2;
1387 } 1389 }
1388 } else 1390 } else
1389 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1391 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h );
1390 1392
1391 1393
1392 x += w; 1394 x += w;
1393 if ( x + w/2 > wid ) { 1395 if ( x + w/2 > wid ) {
1394 x = 0; 1396 x = 0;
1395 y += h+dayLabelHei ; 1397 y += h+dayLabelHei ;
1396 } 1398 }
1397 } 1399 }
1398 y= dayLabelHei; 1400 y= dayLabelHei;
1399 h = cellHei ; 1401 h = cellHei ;
1400 mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); 1402 mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei);
1401 mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1403 mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1402 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1404 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1403 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1405 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1404 mShortDayLabelsW = mDayLabelsW[0]->width()-2 < mWidthLongDayLabel ; 1406 mShortDayLabelsW = mDayLabelsW[0]->width()-2 < mWidthLongDayLabel ;
1405 updateDayLabels(); 1407 updateDayLabels();
1406 //bool forceUpdate = !updatePossible; 1408 //bool forceUpdate = !updatePossible;
1407 updatePossible = true; 1409 updatePossible = true;
1408 //mWeekLabels[mNumWeeks]->setText( i18n("M")); 1410 //mWeekLabels[mNumWeeks]->setText( i18n("M"));
1409 //if ( forceUpdate ) 1411 //if ( forceUpdate )
1410 // updateView(); 1412 // updateView();
1411} 1413}
1412void KOMonthView::computeLayout() 1414void KOMonthView::computeLayout()
1413{ 1415{
1414 1416
1415 1417
1416 static int lastWid = 0; 1418 static int lastWid = 0;
1417 static int lastHei = 0; 1419 static int lastHei = 0;
1418 1420
1419 if ( mShowWeekView ){ 1421 if ( mShowWeekView ){
1420 computeLayoutWeek(); 1422 computeLayoutWeek();
1421 return; 1423 return;
1422 } 1424 }
1423 int daysToShow = 7; 1425 int daysToShow = 7;
1424 bool combinedSatSun = false; 1426 bool combinedSatSun = false;
1425 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1427 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1426 daysToShow = 6; 1428 daysToShow = 6;
1427 combinedSatSun = true; 1429 combinedSatSun = true;
1428 } 1430 }
1429 int tWid = topLevelWidget()->size().width(); 1431 int tWid = topLevelWidget()->size().width();
1430 int tHei = topLevelWidget()->size().height(); 1432 int tHei = topLevelWidget()->size().height();
1431 1433
1432 int wid = width();//e 1434 int wid = width();//e
1433 int hei = height()-1-mNavigatorBar->height(); 1435 int hei = height()-1-mNavigatorBar->height();
1434 1436
1435 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) { 1437 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) {
1436 return; 1438 return;
1437 } 1439 }
1438 if ( lastWid == width() && lastHei == height() ){ 1440 if ( lastWid == width() && lastHei == height() ){
1439 return; 1441 return;
1440 } 1442 }
1441 1443
1442 lastWid = width(); 1444 lastWid = width();
1443 lastHei = height(); 1445 lastHei = height();
1444 //qDebug("KOMonthView::computeLayout() MMM ------------------------------------ "); 1446 //qDebug("KOMonthView::computeLayout() MMM ------------------------------------ ");
1445 QFontMetrics fm ( mWeekLabels[0]->font() ); 1447 QFontMetrics fm ( mWeekLabels[0]->font() );
1446 int weeklabelwid = fm.width( "888" ); 1448 int weeklabelwid = fm.width( "888" );
1447 wid -= weeklabelwid; 1449 wid -= weeklabelwid;
1448 1450
1449 int colWid = wid / daysToShow; 1451 int colWid = wid / daysToShow;
1450 int lastCol = wid - ( colWid*6 ); 1452 int lastCol = wid - ( colWid*6 );
1451 int dayLabelHei = mDayLabels[0]->sizeHint().height(); 1453 int dayLabelHei = mDayLabels[0]->sizeHint().height();
1452 int cellHei = (hei - dayLabelHei) /6; 1454 int cellHei = (hei - dayLabelHei) /6;
1453 int colModulo = wid % daysToShow; 1455 int colModulo = wid % daysToShow;
1454 int rowModulo = (hei- dayLabelHei) % 6; 1456 int rowModulo = (hei- dayLabelHei) % 6;
1455 //qDebug("rowmod %d ", rowModulo); 1457 //qDebug("rowmod %d ", rowModulo);
1456 int i; 1458 int i;
1457 int x,y,w,h; 1459 int x,y,w,h;
1458 x= 0; 1460 x= 0;
1459 y= 0; 1461 y= 0;
1460 w = colWid; 1462 w = colWid;
1461 h = dayLabelHei ; 1463 h = dayLabelHei ;
1462 for ( i = 0; i < 7; i++) { 1464 for ( i = 0; i < 7; i++) {
1463 if ( i == daysToShow-colModulo ) 1465 if ( i == daysToShow-colModulo )
1464 ++w; 1466 ++w;
1465 if ( combinedSatSun ) { 1467 if ( combinedSatSun ) {
1466 if ( i >= daysToShow-1 ) { 1468 if ( i >= daysToShow-1 ) {
1467 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h); 1469 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
1468 x -= w/2 ; 1470 x -= w/2 ;
1469 } 1471 }
1470 else 1472 else
1471 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1473 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1472 } else 1474 } else
1473 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1475 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1474 x += w; 1476 x += w;
1475 } 1477 }
1476 x= 0; 1478 x= 0;
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 03f9dc6..2f6f5dc 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -1,298 +1,299 @@
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#ifndef _KOMONTHVIEW_H 20#ifndef _KOMONTHVIEW_H
21#define _KOMONTHVIEW_H 21#define _KOMONTHVIEW_H
22 22
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qframe.h> 24#include <qframe.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26#include <qlistbox.h> 26#include <qlistbox.h>
27#include <qpoint.h> 27#include <qpoint.h>
28#include <qwidgetstack.h> 28#include <qwidgetstack.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qintdict.h> 30#include <qintdict.h>
31#include <qpushbutton.h> 31#include <qpushbutton.h>
32#include <qvaluelist.h> 32#include <qvaluelist.h>
33#include <qptrvector.h> 33#include <qptrvector.h>
34 34
35#include <libkcal/calendar.h> 35#include <libkcal/calendar.h>
36#include <libkcal/event.h> 36#include <libkcal/event.h>
37 37
38#include "koeventview.h" 38#include "koeventview.h"
39#include "navigatorbar.h" 39#include "navigatorbar.h"
40 40
41#ifdef DESKTOP_VERSION 41#ifdef DESKTOP_VERSION
42class QToolTipGroup; 42class QToolTipGroup;
43#endif 43#endif
44 44
45class KNOWhatsThis; 45class KNOWhatsThis;
46class KOWeekButton : public QPushButton 46class KOWeekButton : public QPushButton
47{ 47{
48 Q_OBJECT 48 Q_OBJECT
49 public: 49 public:
50 KOWeekButton( QWidget *parent=0, const char *name=0 ) : 50 KOWeekButton( QWidget *parent=0, const char *name=0 ) :
51 QPushButton( parent, name) 51 QPushButton( parent, name)
52 { 52 {
53 connect( this, SIGNAL( clicked() ), 53 connect( this, SIGNAL( clicked() ),
54 SLOT( bottonClicked() )); 54 SLOT( bottonClicked() ));
55 mNumber = -1; 55 mNumber = -1;
56 } 56 }
57 void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));} 57 void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));}
58 int getWeekNum() { return mNumber;} 58 int getWeekNum() { return mNumber;}
59 signals: 59 signals:
60 void selectWeekNum ( int ); 60 void selectWeekNum ( int );
61private: 61private:
62 int mNumber; 62 int mNumber;
63private slots : 63private slots :
64 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); } 64 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); }
65}; 65};
66 66
67class KNoScrollListBox: public QListBox 67class KNoScrollListBox: public QListBox
68{ 68{
69 Q_OBJECT 69 Q_OBJECT
70 public: 70 public:
71 KNoScrollListBox(QWidget *parent=0, const char *name=0); 71 KNoScrollListBox(QWidget *parent=0, const char *name=0);
72 ~KNoScrollListBox(); 72 ~KNoScrollListBox();
73 QString getWhatsThisText(QPoint p) ; 73 QString getWhatsThisText(QPoint p) ;
74 74
75 signals: 75 signals:
76 void shiftDown(); 76 void shiftDown();
77 void shiftUp(); 77 void shiftUp();
78 void rightClick(); 78 void rightClick();
79 79
80 protected slots: 80 protected slots:
81 void oneDown(); 81 void oneDown();
82 void keyPressEvent(QKeyEvent *); 82 void keyPressEvent(QKeyEvent *);
83 void keyReleaseEvent(QKeyEvent *); 83 void keyReleaseEvent(QKeyEvent *);
84 void mousePressEvent(QMouseEvent *); 84 void mousePressEvent(QMouseEvent *);
85 85
86 private: 86 private:
87 KNOWhatsThis * mWT; 87 KNOWhatsThis * mWT;
88}; 88};
89 89
90 90
91class MonthViewItem: public QListBoxItem 91class MonthViewItem: public QListBoxItem
92{ 92{
93 public: 93 public:
94 MonthViewItem( Incidence *, QDate qd, const QString & title ); 94 MonthViewItem( Incidence *, QDate qd, const QString & title );
95 95
96 void setRecur(bool on) { mRecur = on; } 96 void setRecur(bool on) { mRecur = on; }
97 void setAlarm(bool on) { mAlarm = on; } 97 void setAlarm(bool on) { mAlarm = on; }
98 void setReply(bool on) { mReply = on; } 98 void setReply(bool on) { mReply = on; }
99 void setMoreInfo(bool on) { mInfo = on; } 99 void setMoreInfo(bool on) { mInfo = on; }
100 100
101 101
102 void setPalette(const QPalette &p) { mPalette = p; } 102 void setPalette(const QPalette &p) { mPalette = p; }
103 QPalette palette() const { return mPalette; } 103 QPalette palette() const { return mPalette; }
104 104
105 Incidence *incidence() const { return mIncidence; } 105 Incidence *incidence() const { return mIncidence; }
106 QDate incidenceDate() { return mDate; } 106 QDate incidenceDate() { return mDate; }
107 107
108 protected: 108 protected:
109 virtual void paint(QPainter *); 109 virtual void paint(QPainter *);
110 virtual int height(const QListBox *) const; 110 virtual int height(const QListBox *) const;
111 virtual int width(const QListBox *) const; 111 virtual int width(const QListBox *) const;
112 112
113 private: 113 private:
114 bool mRecur; 114 bool mRecur;
115 bool mAlarm; 115 bool mAlarm;
116 bool mReply; 116 bool mReply;
117 bool mInfo; 117 bool mInfo;
118 118
119 QPalette mPalette; 119 QPalette mPalette;
120 QDate mDate; 120 QDate mDate;
121 121
122 Incidence *mIncidence; 122 Incidence *mIncidence;
123}; 123};
124 124
125 125
126class KOMonthView; 126class KOMonthView;
127 127
128class MonthViewCell : public QWidget 128class MonthViewCell : public QWidget
129{ 129{
130 Q_OBJECT 130 Q_OBJECT
131 public: 131 public:
132 MonthViewCell(KOMonthView *,QWidget* ); 132 MonthViewCell(KOMonthView *,QWidget* );
133 133
134 void setDate( const QDate & ); 134 void setDate( const QDate & );
135 QDate date() const; 135 QDate date() const;
136 136
137 void setPrimary( bool ); 137 void setPrimary( bool );
138 bool isPrimary() const; 138 bool isPrimary() const;
139 139
140 void setHoliday( bool ); 140 void setHoliday( bool );
141 void setHoliday( const QString & ); 141 void setHoliday( const QString & );
142 142
143 void updateCell(); 143 void updateCell();
144 void startUpdateCell(); 144 void startUpdateCell();
145 void finishUpdateCell(); 145 void finishUpdateCell();
146 void insertEvent(Event *); 146 void insertEvent(Event *);
147 void insertTodo(Todo *); 147 void insertTodo(Todo *);
148 148
149 void updateConfig( bool bigFont = false ); 149 void updateConfig( bool bigFont = false );
150 150
151 void enableScrollBars( bool ); 151 void enableScrollBars( bool );
152 152
153 Incidence *selectedIncidence(); 153 Incidence *selectedIncidence();
154 QDate selectedIncidenceDate(); 154 QDate selectedIncidenceDate();
155 155
156 void deselect(); 156 void deselect();
157 void select(); 157 void select();
158 158
159#ifdef DESKTOP_VERSION 159#ifdef DESKTOP_VERSION
160 static QToolTipGroup *toolTipGroup(); 160 static QToolTipGroup *toolTipGroup();
161#endif 161#endif
162 signals: 162 signals:
163 void defaultAction( Incidence * ); 163 void defaultAction( Incidence * );
164 void newEventSignal( QDateTime ); 164 void newEventSignal( QDateTime );
165 void showDaySignal( QDate ); 165 void showDaySignal( QDate );
166 166
167 protected: 167 protected:
168 QString mToolTip; 168 QString mToolTip;
169 void resizeEvent( QResizeEvent * ); 169 void resizeEvent( QResizeEvent * );
170 170
171 protected slots: 171 protected slots:
172 void defaultAction( QListBoxItem * ); 172 void defaultAction( QListBoxItem * );
173 void contextMenu( QListBoxItem * ); 173 void contextMenu( QListBoxItem * );
174 void selection( QListBoxItem * ); 174 void selection( QListBoxItem * );
175 void cellClicked( QListBoxItem * ); 175 void cellClicked( QListBoxItem * );
176 void newEvent(); 176 void newEvent();
177 void showDay(); 177 void showDay();
178 178
179 private: 179 private:
180 KOMonthView *mMonthView; 180 KOMonthView *mMonthView;
181 181
182 QDate mDate; 182 QDate mDate;
183 bool mPrimary; 183 bool mPrimary;
184 bool mHoliday; 184 bool mHoliday;
185 QString mHolidayString; 185 QString mHolidayString;
186 186
187 //QLabel *mLabel; 187 //QLabel *mLabel;
188 QPushButton *mLabel; 188 QPushButton *mLabel;
189 QListBox *mItemList; 189 QListBox *mItemList;
190#ifdef DESKTOP_VERSION 190#ifdef DESKTOP_VERSION
191 static QToolTipGroup *mToolTipGroup; 191 static QToolTipGroup *mToolTipGroup;
192#endif 192#endif
193 QSize mLabelSize; 193 QSize mLabelSize;
194 QSize mLabelBigSize; 194 QSize mLabelBigSize;
195 QPalette mHolidayPalette; 195 QPalette mHolidayPalette;
196 QPalette mStandardPalette; 196 QPalette mStandardPalette;
197 QPalette mPrimaryPalette; 197 QPalette mPrimaryPalette;
198 QPalette mNonPrimaryPalette; 198 QPalette mNonPrimaryPalette;
199 void setMyPalette(); 199 void setMyPalette();
200 QPalette getPalette (); 200 QPalette getPalette ();
201 void keyPressEvent ( QKeyEvent * ) ; 201 void keyPressEvent ( QKeyEvent * ) ;
202 202
203}; 203};
204 204
205 205
206class KOMonthView: public KOEventView 206class KOMonthView: public KOEventView
207{ 207{
208 Q_OBJECT 208 Q_OBJECT
209 public: 209 public:
210 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); 210 KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
211 ~KOMonthView(); 211 ~KOMonthView();
212 212
213 /** Returns maximum number of days supported by the komonthview */ 213 /** Returns maximum number of days supported by the komonthview */
214 virtual int maxDatesHint(); 214 virtual int maxDatesHint();
215 215
216 /** Returns number of currently shown dates. */ 216 /** Returns number of currently shown dates. */
217 virtual int currentDateCount(); 217 virtual int currentDateCount();
218 218
219 /** returns the currently selected events */ 219 /** returns the currently selected events */
220 virtual QPtrList<Incidence> selectedIncidences(); 220 virtual QPtrList<Incidence> selectedIncidences();
221 221
222 /** returns dates of the currently selected events */ 222 /** returns dates of the currently selected events */
223 virtual DateList selectedDates(); 223 virtual DateList selectedDates();
224 224
225 virtual void printPreview(CalPrinter *calPrinter, 225 virtual void printPreview(CalPrinter *calPrinter,
226 const QDate &, const QDate &); 226 const QDate &, const QDate &);
227 bool isMonthView() { return true; } 227 bool isMonthView() { return true; }
228 bool isUpdatePossible() { return updatePossible; } 228 bool isUpdatePossible() { return updatePossible; }
229 229
230 MonthViewCell * selectedCell(); 230 MonthViewCell * selectedCell();
231 bool skipResize; 231 bool skipResize;
232 NavigatorBar* navigatorBar() { return mNavigatorBar ;} 232 NavigatorBar* navigatorBar() { return mNavigatorBar ;}
233 public slots: 233 public slots:
234 virtual void updateView(); 234 virtual void updateView();
235 virtual void updateConfig(); 235 virtual void updateConfig();
236 virtual void showDates(const QDate &start, const QDate &end); 236 virtual void showDates(const QDate &start, const QDate &end);
237 virtual void showEvents(QPtrList<Event> eventList); 237 virtual void showEvents(QPtrList<Event> eventList);
238 238
239 void changeEventDisplay(Event *, int); 239 void changeEventDisplay(Event *, int);
240 240
241 void clearSelection(); 241 void clearSelection();
242 242
243 void showContextMenu( Incidence * ); 243 void showContextMenu( Incidence * );
244 244
245 void setSelectedCell( MonthViewCell * ); 245 void setSelectedCell( MonthViewCell * );
246 void switchView();
246 247
247 protected slots: 248 protected slots:
248 void selectInternalWeekNum ( int ); 249 void selectInternalWeekNum ( int );
249 void switchView();
250 void processSelectionChange(); 250 void processSelectionChange();
251 signals: 251 signals:
252 void nextMonth(); 252 void nextMonth();
253 void prevMonth(); 253 void prevMonth();
254 void selectWeekNum ( int ); 254 void selectWeekNum ( int );
255 void selectMonth ();
255 void showDaySignal( QDate ); 256 void showDaySignal( QDate );
256 protected: 257 protected:
257 void resizeEvent(QResizeEvent *); 258 void resizeEvent(QResizeEvent *);
258 void viewChanged(); 259 void viewChanged();
259 void updateDayLabels(); 260 void updateDayLabels();
260 261
261 private: 262 private:
262 NavigatorBar* mNavigatorBar; 263 NavigatorBar* mNavigatorBar;
263 int currentWeek(); 264 int currentWeek();
264 bool clPending; 265 bool clPending;
265 QWidgetStack * mWidStack; 266 QWidgetStack * mWidStack;
266 QWidget* mMonthView; 267 QWidget* mMonthView;
267 QWidget* mWeekView; 268 QWidget* mWeekView;
268 bool mShowWeekView; 269 bool mShowWeekView;
269 bool updatePossible; 270 bool updatePossible;
270 int mDaysPerWeek; 271 int mDaysPerWeek;
271 int mNumWeeks; 272 int mNumWeeks;
272 int mNumCells; 273 int mNumCells;
273 bool mWeekStartsMonday; 274 bool mWeekStartsMonday;
274 bool mShowSatSunComp; 275 bool mShowSatSunComp;
275 void computeLayout(); 276 void computeLayout();
276 void computeLayoutWeek(); 277 void computeLayoutWeek();
277 278
278 QPtrVector<MonthViewCell> mCells; 279 QPtrVector<MonthViewCell> mCells;
279 QPtrVector<QLabel> mDayLabels; 280 QPtrVector<QLabel> mDayLabels;
280 QPtrVector<KOWeekButton> mWeekLabels; 281 QPtrVector<KOWeekButton> mWeekLabels;
281 QPtrVector<MonthViewCell> mCellsW; 282 QPtrVector<MonthViewCell> mCellsW;
282 QPtrVector<QLabel> mDayLabelsW; 283 QPtrVector<QLabel> mDayLabelsW;
283 QPtrVector<KOWeekButton> mWeekLabelsW; 284 QPtrVector<KOWeekButton> mWeekLabelsW;
284 285
285 bool mShortDayLabelsM; 286 bool mShortDayLabelsM;
286 bool mShortDayLabelsW; 287 bool mShortDayLabelsW;
287 int mWidthLongDayLabel; 288 int mWidthLongDayLabel;
288 289
289 QDate mStartDate; 290 QDate mStartDate;
290 291
291 MonthViewCell *mSelectedCell; 292 MonthViewCell *mSelectedCell;
292 293
293 KOEventPopupMenu *mContextMenu; 294 KOEventPopupMenu *mContextMenu;
294 void keyPressEvent ( QKeyEvent * ) ; 295 void keyPressEvent ( QKeyEvent * ) ;
295 296
296}; 297};
297 298
298#endif 299#endif
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 7efb6a6..5efc247 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -1,484 +1,485 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <time.h> 24#include <time.h>
25#ifndef _WIN32_ 25#ifndef _WIN32_
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <qtextstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
33#include <qfont.h> 33#include <qfont.h>
34#include <qcolor.h> 34#include <qcolor.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kglobalsettings.h> 39#include <kglobalsettings.h>
40#include <kconfig.h> 40#include <kconfig.h>
41#include <klocale.h> 41#include <klocale.h>
42#include <kdebug.h> 42#include <kdebug.h>
43#include <kemailsettings.h> 43#include <kemailsettings.h>
44#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
45#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
46 46
47#include "koprefs.h" 47#include "koprefs.h"
48#include "mainwindow.h" 48#include "mainwindow.h"
49 49
50KOPrefs *KOPrefs::mInstance = 0; 50KOPrefs *KOPrefs::mInstance = 0;
51static KStaticDeleter<KOPrefs> insd; 51static KStaticDeleter<KOPrefs> insd;
52 52
53KOPrefs::KOPrefs() : 53KOPrefs::KOPrefs() :
54 KPimPrefs("korganizerrc") 54 KPimPrefs("korganizerrc")
55{ 55{
56 mCategoryColors.setAutoDelete(true); 56 mCategoryColors.setAutoDelete(true);
57 fillMailDefaults(); 57 fillMailDefaults();
58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196); 58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
59 QColor defaultHolidayColor = QColor(255,0,0); 59 QColor defaultHolidayColor = QColor(255,0,0);
60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
63 QColor defaultTodoDueTodayColor = QColor(255,220,100); 63 QColor defaultTodoDueTodayColor = QColor(255,220,100);
64 QColor defaultTodoOverdueColor = QColor(255,153,125); 64 QColor defaultTodoOverdueColor = QColor(255,153,125);
65 65
66 66
67 KPrefs::setCurrentGroup("General"); 67 KPrefs::setCurrentGroup("General");
68 68
69 69
70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
71 71
72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
74 addItemBool("ShowIconSearch",&mShowIconSearch,true); 74 addItemBool("ShowIconSearch",&mShowIconSearch,true);
75 addItemBool("ShowIconList",&mShowIconList,true); 75 addItemBool("ShowIconList",&mShowIconList,true);
76 addItemBool("ShowIconDay1",&mShowIconDay1,true); 76 addItemBool("ShowIconDay1",&mShowIconDay1,true);
77 addItemBool("ShowIconDay5",&mShowIconDay5,true); 77 addItemBool("ShowIconDay5",&mShowIconDay5,true);
78 addItemBool("ShowIconDay6",&mShowIconDay6,true);
78 addItemBool("ShowIconDay7",&mShowIconDay7,true); 79 addItemBool("ShowIconDay7",&mShowIconDay7,true);
79 addItemBool("ShowIconMonth",&mShowIconMonth,true); 80 addItemBool("ShowIconMonth",&mShowIconMonth,true);
80 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
81 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
82 addItemBool("ShowIconBack",&mShowIconBack,true); 83 addItemBool("ShowIconBack",&mShowIconBack,true);
83 addItemBool("ShowIconToday",&mShowIconToday,true); 84 addItemBool("ShowIconToday",&mShowIconToday,true);
84 addItemBool("ShowIconForward",&mShowIconForward,true); 85 addItemBool("ShowIconForward",&mShowIconForward,true);
85 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
86 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
87 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 88 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
88 addItemBool("ShowIconNext",&mShowIconNext,true); 89 addItemBool("ShowIconNext",&mShowIconNext,true);
89 addItemBool("ShowIconJournal",&mShowIconJournal,true); 90 addItemBool("ShowIconJournal",&mShowIconJournal,true);
90 addItemBool("ShowIconStretch",&mShowIconStretch,true); 91 addItemBool("ShowIconStretch",&mShowIconStretch,true);
91 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 92 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
92 93
93 addItemBool("AskForQuit",&mAskForQuit,false); 94 addItemBool("AskForQuit",&mAskForQuit,false);
94 95
95#ifndef DESKTOP_VERSION 96#ifndef DESKTOP_VERSION
96 addItemBool("ShowFullMenu",&mShowFullMenu,false); 97 addItemBool("ShowFullMenu",&mShowFullMenu,false);
97#else 98#else
98 addItemBool("ShowFullMenu",&mShowFullMenu,true); 99 addItemBool("ShowFullMenu",&mShowFullMenu,true);
99#endif 100#endif
100 addItemBool("ToolBarHor",&mToolBarHor, true ); 101 addItemBool("ToolBarHor",&mToolBarHor, true );
101 addItemBool("ToolBarUp",&mToolBarUp, false ); 102 addItemBool("ToolBarUp",&mToolBarUp, false );
102 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 103 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
103 addItemInt("Whats Next Days",&mWhatsNextDays,3); 104 addItemInt("Whats Next Days",&mWhatsNextDays,3);
104 addItemInt("Whats Next Prios",&mWhatsNextPrios,1); 105 addItemInt("Whats Next Prios",&mWhatsNextPrios,1);
105 106
106 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); 107 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true);
107 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); 108 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true);
108 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); 109 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false);
109 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); 110 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true);
110 addItemInt("AllDay Size",&mAllDaySize,28); 111 addItemInt("AllDay Size",&mAllDaySize,28);
111 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; 112 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav";
112 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); 113 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm );
113 114
114 addItemStringList("LocationDefaults",&mLocationDefaults ); 115 addItemStringList("LocationDefaults",&mLocationDefaults );
115 addItemStringList("EventSummary User",&mEventSummaryUser); 116 addItemStringList("EventSummary User",&mEventSummaryUser);
116 addItemStringList("TodoSummary User",&mTodoSummaryUser); 117 addItemStringList("TodoSummary User",&mTodoSummaryUser);
117 118
118 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 119 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
119 addItemBool("Enable Project View",&mEnableProjectView,false); 120 addItemBool("Enable Project View",&mEnableProjectView,false);
120 addItemBool("Auto Save",&mAutoSave,false); 121 addItemBool("Auto Save",&mAutoSave,false);
121 addItemInt("Auto Save Interval",&mAutoSaveInterval,3); 122 addItemInt("Auto Save Interval",&mAutoSaveInterval,3);
122 addItemBool("Confirm Deletes",&mConfirm,true); 123 addItemBool("Confirm Deletes",&mConfirm,true);
123 addItemString("Archive File",&mArchiveFile); 124 addItemString("Archive File",&mArchiveFile);
124 addItemString("Html Export File",&mHtmlExportFile, 125 addItemString("Html Export File",&mHtmlExportFile,
125 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); 126 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html"));
126 addItemBool("Html With Save",&mHtmlWithSave,false); 127 addItemBool("Html With Save",&mHtmlWithSave,false);
127 128
128 KPrefs::setCurrentGroup("Personal Settings"); 129 KPrefs::setCurrentGroup("Personal Settings");
129 130
130 addItemInt("Mail Client",&mMailClient,MailClientKMail); 131 addItemInt("Mail Client",&mMailClient,MailClientKMail);
131 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 132 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
132 addItemBool("Bcc",&mBcc,false); 133 addItemBool("Bcc",&mBcc,false);
133 134
134 KPrefs::setCurrentGroup("Time & Date"); 135 KPrefs::setCurrentGroup("Time & Date");
135 136
136 137
137 addItemInt("Default Start Time",&mStartTime,10); 138 addItemInt("Default Start Time",&mStartTime,10);
138 addItemInt("Default Duration",&mDefaultDuration,2); 139 addItemInt("Default Duration",&mDefaultDuration,2);
139 addItemInt("Default Alarm Time",&mAlarmTime,3); 140 addItemInt("Default Alarm Time",&mAlarmTime,3);
140 KPrefs::setCurrentGroup("AlarmSettings"); 141 KPrefs::setCurrentGroup("AlarmSettings");
141 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 142 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
142 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 143 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
143 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 144 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
144 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 145 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
145 146
146 147
147 KPrefs::setCurrentGroup("Calendar"); 148 KPrefs::setCurrentGroup("Calendar");
148 149
149 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 150 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
150 151
151 KPrefs::setCurrentGroup("Fonts"); 152 KPrefs::setCurrentGroup("Fonts");
152 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 153 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
153 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() ); 154 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() );
154 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont()); 155 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont());
155 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont()); 156 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont());
156 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont()); 157 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont());
157 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont()); 158 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont());
158 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont()); 159 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont());
159 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont()); 160 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont());
160 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont()); 161 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont());
161 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont()); 162 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont());
162 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont()); 163 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont());
163 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont()); 164 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont());
164 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont()); 165 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont());
165 166
166 KPrefs::setCurrentGroup("RemoteSyncing"); 167 KPrefs::setCurrentGroup("RemoteSyncing");
167 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 168 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
168 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 169 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
169 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 170 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
170 addItemInt("LastSyncTime",&mLastSyncTime,0); 171 addItemInt("LastSyncTime",&mLastSyncTime,0);
171 172
172#ifdef _WIN32_ 173#ifdef _WIN32_
173 QString hdp= locateLocal("data","korganizer")+"\\\\"; 174 QString hdp= locateLocal("data","korganizer")+"\\\\";
174#else 175#else
175 QString hdp= locateLocal("data","korganizer")+"/"; 176 QString hdp= locateLocal("data","korganizer")+"/";
176#endif 177#endif
177 178
178 KPrefs::setCurrentGroup("LoadSaveFileNames"); 179 KPrefs::setCurrentGroup("LoadSaveFileNames");
179 180
180 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 181 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
181 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 182 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
182 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 183 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
183 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); 184 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" );
184 185
185 186
186 KPrefs::setCurrentGroup("Locale"); 187 KPrefs::setCurrentGroup("Locale");
187 addItemBool("ShortDateInViewer",&mShortDateInViewer,false); 188 addItemBool("ShortDateInViewer",&mShortDateInViewer,false);
188 189
189 190
190 KPrefs::setCurrentGroup("Colors"); 191 KPrefs::setCurrentGroup("Colors");
191 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); 192 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor);
192 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); 193 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
193 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); 194 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
194 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); 195 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
195 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 196 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
196 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); 197 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
197 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); 198 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor);
198 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); 199 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor);
199 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); 200 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 ));
200 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); 201 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 ));
201 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); 202 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 ));
202 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); 203 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true);
203 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); 204 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true);
204 addItemBool("MonthViewWeek",&mMonthViewWeek,false); 205 addItemBool("MonthViewWeek",&mMonthViewWeek,false);
205 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); 206 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false);
206 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); 207 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 ));
207 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); 208 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 ));
208 addItemBool("UseAppColors",&mUseAppColors,false); 209 addItemBool("UseAppColors",&mUseAppColors,false);
209 210
210 211
211 212
212 KPrefs::setCurrentGroup("Views"); 213 KPrefs::setCurrentGroup("Views");
213 addItemBool("Show Date Navigator",&mShowDateNavigator,true); 214 addItemBool("Show Date Navigator",&mShowDateNavigator,true);
214 addItemInt("Hour Size",&mHourSize,8); 215 addItemInt("Hour Size",&mHourSize,8);
215 addItemBool("Show Daily Recurrences",&mDailyRecur,true); 216 addItemBool("Show Daily Recurrences",&mDailyRecur,true);
216 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); 217 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true);
217 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); 218 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true);
218 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); 219 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true);
219 addItemBool("ShowShortMonthName",&mMonthShowShort,false); 220 addItemBool("ShowShortMonthName",&mMonthShowShort,false);
220 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); 221 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true);
221#ifdef DESKTOP_VERION 222#ifdef DESKTOP_VERION
222 addItemBool("Enable ToolTips",&mEnableToolTips,true); 223 addItemBool("Enable ToolTips",&mEnableToolTips,true);
223#else 224#else
224 addItemBool("Enable ToolTips",&mEnableToolTips,false); 225 addItemBool("Enable ToolTips",&mEnableToolTips,false);
225#endif 226#endif
226 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); 227 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false);
227 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); 228 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false);
228 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); 229 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true);
229 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); 230 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true);
230 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); 231 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true);
231 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); 232 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false);
232 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); 233 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false);
233 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); 234 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true);
234 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); 235 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true);
235 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; 236 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);;
236 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); 237 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true);
237 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); 238 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false);
238 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); 239 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false);
239 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); 240 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true);
240 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); 241 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false);
241 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); 242 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false);
242 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); 243 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true);
243 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); 244 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true);
244 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); 245 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false);
245 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); 246 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false);
246#ifdef DESKTOP_VERSION 247#ifdef DESKTOP_VERSION
247 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); 248 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true);
248#else 249#else
249 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); 250 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false);
250#endif 251#endif
251 addItemInt("Day Begins",&mDayBegins,7); 252 addItemInt("Day Begins",&mDayBegins,7);
252 addItemInt("Working Hours Start",&mWorkingHoursStart,8); 253 addItemInt("Working Hours Start",&mWorkingHoursStart,8);
253 addItemInt("Working Hours End",&mWorkingHoursEnd,17); 254 addItemInt("Working Hours End",&mWorkingHoursEnd,17);
254 addItemBool("Exclude Holidays",&mExcludeHolidays,true); 255 addItemBool("Exclude Holidays",&mExcludeHolidays,true);
255 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); 256 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true);
256 257
257 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); 258 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false);
258 addItemBool("Full View Month",&mFullViewMonth,true); 259 addItemBool("Full View Month",&mFullViewMonth,true);
259 addItemBool("Full View Todo",&mFullViewTodo,true); 260 addItemBool("Full View Todo",&mFullViewTodo,true);
260 addItemBool("Quick Todo",&mEnableQuickTodo,false); 261 addItemBool("Quick Todo",&mEnableQuickTodo,false);
261 262
262 addItemInt("Next X Days",&mNextXDays,3); 263 addItemInt("Next X Days",&mNextXDays,3);
263 264
264 KPrefs::setCurrentGroup("Printer"); 265 KPrefs::setCurrentGroup("Printer");
265 266
266 KPrefs::setCurrentGroup("Layout"); 267 KPrefs::setCurrentGroup("Layout");
267 268
268 addItemBool("CompactDialogs",&mCompactDialogs,false); 269 addItemBool("CompactDialogs",&mCompactDialogs,false);
269 addItemBool("VerticalScreen",&mVerticalScreen,true); 270 addItemBool("VerticalScreen",&mVerticalScreen,true);
270 271
271 KPrefs::setCurrentGroup("KOrganizer Plugins"); 272 KPrefs::setCurrentGroup("KOrganizer Plugins");
272 273
273 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); 274 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays");
274 275
275 KPrefs::setCurrentGroup("Group Scheduling"); 276 KPrefs::setCurrentGroup("Group Scheduling");
276 277
277 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); 278 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
278 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); 279 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
279 addItemStringList("AdditionalMails",&mAdditionalMails,""); 280 addItemStringList("AdditionalMails",&mAdditionalMails,"");
280 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); 281 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
281 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); 282 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
282 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); 283 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
283 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); 284 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto);
284 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); 285 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto);
285 286
286 KPrefs::setCurrentGroup( "Editors" ); 287 KPrefs::setCurrentGroup( "Editors" );
287 288
288 addItemStringList( "EventTemplates", &mEventTemplates ); 289 addItemStringList( "EventTemplates", &mEventTemplates );
289 addItemStringList( "TodoTemplates", &mTodoTemplates ); 290 addItemStringList( "TodoTemplates", &mTodoTemplates );
290 291
291 addItemInt("DestinationPolicy",&mDestination,standardDestination); 292 addItemInt("DestinationPolicy",&mDestination,standardDestination);
292 293
293 294
294 295
295} 296}
296 297
297 298
298KOPrefs::~KOPrefs() 299KOPrefs::~KOPrefs()
299{ 300{
300 if (mInstance == this) 301 if (mInstance == this)
301 mInstance = insd.setObject(0); 302 mInstance = insd.setObject(0);
302 303
303 //qDebug("KOPrefs::~KOPrefs() "); 304 //qDebug("KOPrefs::~KOPrefs() ");
304} 305}
305 306
306 307
307KOPrefs *KOPrefs::instance() 308KOPrefs *KOPrefs::instance()
308{ 309{
309 if (!mInstance) { 310 if (!mInstance) {
310 mInstance = insd.setObject(new KOPrefs()); 311 mInstance = insd.setObject(new KOPrefs());
311 mInstance->readConfig(); 312 mInstance->readConfig();
312 } 313 }
313 314
314 return mInstance; 315 return mInstance;
315} 316}
316 317
317void KOPrefs::usrSetDefaults() 318void KOPrefs::usrSetDefaults()
318{ 319{
319 320
320} 321}
321 322
322void KOPrefs::fillMailDefaults() 323void KOPrefs::fillMailDefaults()
323{ 324{
324 if (mName.isEmpty()) mName = i18n("Anonymous"); 325 if (mName.isEmpty()) mName = i18n("Anonymous");
325 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); 326 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere");
326} 327}
327 328
328void KOPrefs::setTimeZoneIdDefault() 329void KOPrefs::setTimeZoneIdDefault()
329{ 330{
330 ; 331 ;
331} 332}
332 333
333void KOPrefs::setAllDefaults() 334void KOPrefs::setAllDefaults()
334{ 335{
335 setCategoryDefaults(); 336 setCategoryDefaults();
336 mEventSummaryUser = getDefaultList() ; 337 mEventSummaryUser = getDefaultList() ;
337 mTodoSummaryUser = getDefaultList() ; 338 mTodoSummaryUser = getDefaultList() ;
338 mLocationDefaults = getLocationDefaultList(); 339 mLocationDefaults = getLocationDefaultList();
339} 340}
340 341
341void KOPrefs::setCategoryDefaults() 342void KOPrefs::setCategoryDefaults()
342{ 343{
343 mCustomCategories.clear(); 344 mCustomCategories.clear();
344 mCustomCategories = getDefaultList(); 345 mCustomCategories = getDefaultList();
345 346
346 QStringList::Iterator it; 347 QStringList::Iterator it;
347 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 348 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
348 setCategoryColor(*it,mDefaultCategoryColor); 349 setCategoryColor(*it,mDefaultCategoryColor);
349 } 350 }
350} 351}
351QStringList KOPrefs::getLocationDefaultList() 352QStringList KOPrefs::getLocationDefaultList()
352{ 353{
353 QStringList retval ; 354 QStringList retval ;
354 retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") 355 retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach")
355 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") 356 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room")
356 << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") 357 << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten")
357 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; 358 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ;
358 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") 359 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("")
359 360
360 retval.sort(); 361 retval.sort();
361 return retval; 362 return retval;
362} 363}
363QStringList KOPrefs::getDefaultList() 364QStringList KOPrefs::getDefaultList()
364{ 365{
365 QStringList retval ; 366 QStringList retval ;
366 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") 367 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer")
367 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") 368 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner")
368 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") 369 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts")
369 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") 370 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids")
370 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") 371 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel")
371 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") 372 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping")
372 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") 373 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University")
373 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; 374 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ;
374 retval.sort(); 375 retval.sort();
375 //qDebug("cat %s ", retval.join("-").latin1()); 376 //qDebug("cat %s ", retval.join("-").latin1());
376 return retval; 377 return retval;
377} 378}
378 379
379void KOPrefs::usrReadConfig() 380void KOPrefs::usrReadConfig()
380{ 381{
381 config()->setGroup("General"); 382 config()->setGroup("General");
382 383
383 //qDebug("KOPrefs::usrReadConfig() "); 384 //qDebug("KOPrefs::usrReadConfig() ");
384 mCustomCategories = config()->readListEntry("Custom Categories"); 385 mCustomCategories = config()->readListEntry("Custom Categories");
385 mOldLoadedLanguage = mOldLanguage ; 386 mOldLoadedLanguage = mOldLanguage ;
386 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; 387 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage;
387 if (mLocationDefaults.isEmpty()) { 388 if (mLocationDefaults.isEmpty()) {
388 mLocationDefaults = getLocationDefaultList(); 389 mLocationDefaults = getLocationDefaultList();
389 } 390 }
390 391
391 if (mEventSummaryUser.isEmpty()) { 392 if (mEventSummaryUser.isEmpty()) {
392 mEventSummaryUser = getDefaultList() ; 393 mEventSummaryUser = getDefaultList() ;
393 } 394 }
394 if (mTodoSummaryUser.isEmpty()) { 395 if (mTodoSummaryUser.isEmpty()) {
395 mTodoSummaryUser = getDefaultList() ; 396 mTodoSummaryUser = getDefaultList() ;
396 } 397 }
397 398
398 if (mCustomCategories.isEmpty()) setCategoryDefaults(); 399 if (mCustomCategories.isEmpty()) setCategoryDefaults();
399 400
400 config()->setGroup("Personal Settings"); 401 config()->setGroup("Personal Settings");
401 mName = config()->readEntry("user_name",""); 402 mName = config()->readEntry("user_name","");
402 mEmail = config()->readEntry("user_email",""); 403 mEmail = config()->readEntry("user_email","");
403 fillMailDefaults(); 404 fillMailDefaults();
404 405
405 config()->setGroup("Category Colors"); 406 config()->setGroup("Category Colors");
406 QStringList::Iterator it; 407 QStringList::Iterator it;
407 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 408 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
408 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); 409 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor));
409 410
410 } 411 }
411 412
412 KPimPrefs::usrReadConfig(); 413 KPimPrefs::usrReadConfig();
413} 414}
414 415
415 416
416void KOPrefs::usrWriteConfig() 417void KOPrefs::usrWriteConfig()
417{ 418{
418 config()->setGroup("General"); 419 config()->setGroup("General");
419 config()->writeEntry("Custom Categories",mCustomCategories); 420 config()->writeEntry("Custom Categories",mCustomCategories);
420 421
421 config()->setGroup("Personal Settings"); 422 config()->setGroup("Personal Settings");
422 config()->writeEntry("user_name",mName); 423 config()->writeEntry("user_name",mName);
423 config()->writeEntry("user_email",mEmail); 424 config()->writeEntry("user_email",mEmail);
424 425
425 config()->setGroup("Category Colors"); 426 config()->setGroup("Category Colors");
426 QDictIterator<QColor> it(mCategoryColors); 427 QDictIterator<QColor> it(mCategoryColors);
427 while (it.current()) { 428 while (it.current()) {
428 config()->writeEntry(it.currentKey(),*(it.current())); 429 config()->writeEntry(it.currentKey(),*(it.current()));
429 ++it; 430 ++it;
430 } 431 }
431 432
432 433
433 KPimPrefs::usrWriteConfig(); 434 KPimPrefs::usrWriteConfig();
434} 435}
435 436
436void KOPrefs::setCategoryColor(QString cat,const QColor & color) 437void KOPrefs::setCategoryColor(QString cat,const QColor & color)
437{ 438{
438 mCategoryColors.replace(cat,new QColor(color)); 439 mCategoryColors.replace(cat,new QColor(color));
439} 440}
440 441
441QColor *KOPrefs::categoryColor(QString cat) 442QColor *KOPrefs::categoryColor(QString cat)
442{ 443{
443 QColor *color = 0; 444 QColor *color = 0;
444 445
445 if (!cat.isEmpty()) color = mCategoryColors[cat]; 446 if (!cat.isEmpty()) color = mCategoryColors[cat];
446 447
447 if (color) return color; 448 if (color) return color;
448 else return &mDefaultCategoryColor; 449 else return &mDefaultCategoryColor;
449} 450}
450 451
451void KOPrefs::setFullName(const QString &name) 452void KOPrefs::setFullName(const QString &name)
452{ 453{
453 mName = name; 454 mName = name;
454} 455}
455 456
456void KOPrefs::setEmail(const QString &email) 457void KOPrefs::setEmail(const QString &email)
457{ 458{
458 //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); 459 //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() );
459 mEmail = email; 460 mEmail = email;
460} 461}
461 462
462QString KOPrefs::fullName() 463QString KOPrefs::fullName()
463{ 464{
464 if (mEmailControlCenter) { 465 if (mEmailControlCenter) {
465 KEMailSettings settings; 466 KEMailSettings settings;
466 return settings.getSetting(KEMailSettings::RealName); 467 return settings.getSetting(KEMailSettings::RealName);
467 } else { 468 } else {
468 return mName; 469 return mName;
469 } 470 }
470} 471}
471 472
472QString KOPrefs::email() 473QString KOPrefs::email()
473{ 474{
474 if (mEmailControlCenter) { 475 if (mEmailControlCenter) {
475 KEMailSettings settings; 476 KEMailSettings settings;
476 return settings.getSetting(KEMailSettings::EmailAddress); 477 return settings.getSetting(KEMailSettings::EmailAddress);
477 } else { 478 } else {
478 return mEmail; 479 return mEmail;
479 } 480 }
480} 481}
481KConfig* KOPrefs::getConfig() 482KConfig* KOPrefs::getConfig()
482{ 483{
483 return config(); 484 return config();
484} 485}
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index fa69d52..e300067 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -1,283 +1,284 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOPREFS_H 23#ifndef KOPREFS_H
24#define KOPREFS_H 24#define KOPREFS_H
25 25
26 26
27#include <libkdepim/kpimprefs.h> 27#include <libkdepim/kpimprefs.h>
28#include <qdict.h> 28#include <qdict.h>
29 29
30class KConfig; 30class KConfig;
31class QFont; 31class QFont;
32class QColor; 32class QColor;
33class QStringList; 33class QStringList;
34 34
35class KOPrefs : public KPimPrefs 35class KOPrefs : public KPimPrefs
36{ 36{
37 public: 37 public:
38 enum { FormatVCalendar, FormatICalendar }; 38 enum { FormatVCalendar, FormatICalendar };
39 enum { MailClientKMail, MailClientSendmail }; 39 enum { MailClientKMail, MailClientSendmail };
40 enum { IMIPDummy, IMIPKMail }; 40 enum { IMIPDummy, IMIPKMail };
41 enum { IMIPOutbox, IMIPdirectsend }; 41 enum { IMIPOutbox, IMIPdirectsend };
42 enum { neverAuto, addressbookAuto, selectedAuto }; 42 enum { neverAuto, addressbookAuto, selectedAuto };
43 enum { standardDestination, askDestination }; 43 enum { standardDestination, askDestination };
44 44
45 virtual ~KOPrefs(); 45 virtual ~KOPrefs();
46 46
47 /** Get instance of KOPrefs. It is made sure that there is only one 47 /** Get instance of KOPrefs. It is made sure that there is only one
48 instance. */ 48 instance. */
49 static KOPrefs *instance(); 49 static KOPrefs *instance();
50 50
51 /** Set preferences to default values */ 51 /** Set preferences to default values */
52 void usrSetDefaults(); 52 void usrSetDefaults();
53 53
54 /** Read preferences from config file */ 54 /** Read preferences from config file */
55 void usrReadConfig(); 55 void usrReadConfig();
56 56
57 /** Write preferences to config file */ 57 /** Write preferences to config file */
58 void usrWriteConfig(); 58 void usrWriteConfig();
59 void setCategoryDefaults(); 59 void setCategoryDefaults();
60 void setAllDefaults(); 60 void setAllDefaults();
61 61
62 protected: 62 protected:
63 void setTimeZoneIdDefault(); 63 void setTimeZoneIdDefault();
64 64
65 /** Fill empty mail fields with default values. */ 65 /** Fill empty mail fields with default values. */
66 void fillMailDefaults(); 66 void fillMailDefaults();
67 67
68 private: 68 private:
69 /** Constructor disabled for public. Use instance() to create a KOPrefs 69 /** Constructor disabled for public. Use instance() to create a KOPrefs
70 object. */ 70 object. */
71 KOPrefs(); 71 KOPrefs();
72 72
73 static KOPrefs *mInstance; 73 static KOPrefs *mInstance;
74 QStringList getDefaultList(); 74 QStringList getDefaultList();
75 QStringList getLocationDefaultList(); 75 QStringList getLocationDefaultList();
76 public: 76 public:
77 // preferences data 77 // preferences data
78 KConfig* getConfig(); 78 KConfig* getConfig();
79 void setFullName(const QString &); 79 void setFullName(const QString &);
80 QString fullName(); 80 QString fullName();
81 void setEmail(const QString &); 81 void setEmail(const QString &);
82 QString email(); 82 QString email();
83 83
84 QString mAdditional; 84 QString mAdditional;
85 85
86 bool mEmailControlCenter; 86 bool mEmailControlCenter;
87 87
88 bool mBcc; 88 bool mBcc;
89 bool mAutoSave; 89 bool mAutoSave;
90 int mAutoSaveInterval; 90 int mAutoSaveInterval;
91 bool mConfirm; 91 bool mConfirm;
92 92
93 bool mEnableGroupScheduling; 93 bool mEnableGroupScheduling;
94 bool mEnableProjectView; 94 bool mEnableProjectView;
95 95
96 int mDefaultFormat; 96 int mDefaultFormat;
97 int mMailClient; 97 int mMailClient;
98 98
99 int mStartTime; 99 int mStartTime;
100 int mDefaultDuration; 100 int mDefaultDuration;
101 int mAlarmTime; 101 int mAlarmTime;
102 102
103 int mWorkingHoursStart; 103 int mWorkingHoursStart;
104 int mWorkingHoursEnd; 104 int mWorkingHoursEnd;
105 bool mExcludeHolidays; 105 bool mExcludeHolidays;
106 bool mExcludeSaturdays; 106 bool mExcludeSaturdays;
107 bool mMarcusBainsShowSeconds; 107 bool mMarcusBainsShowSeconds;
108 108
109 QFont mTimeBarFont; 109 QFont mTimeBarFont;
110 QFont mMonthViewFont; 110 QFont mMonthViewFont;
111 QFont mAgendaViewFont; 111 QFont mAgendaViewFont;
112 QFont mMarcusBainsFont; 112 QFont mMarcusBainsFont;
113 QFont mTimeLabelsFont; 113 QFont mTimeLabelsFont;
114 QFont mTodoViewFont; 114 QFont mTodoViewFont;
115 QFont mListViewFont; 115 QFont mListViewFont;
116 QFont mDateNavigatorFont; 116 QFont mDateNavigatorFont;
117 QFont mEditBoxFont; 117 QFont mEditBoxFont;
118 QFont mJornalViewFont; 118 QFont mJornalViewFont;
119 QFont mWhatsNextFont; 119 QFont mWhatsNextFont;
120 QFont mEventViewFont; 120 QFont mEventViewFont;
121 121
122 122
123 123
124 124
125 QColor mHolidayColor; 125 QColor mHolidayColor;
126 QColor mHighlightColor; 126 QColor mHighlightColor;
127 QColor mEventColor; 127 QColor mEventColor;
128 QColor mTodoDoneColor; 128 QColor mTodoDoneColor;
129 QColor mAgendaBgColor; 129 QColor mAgendaBgColor;
130 QColor mWorkingHoursColor; 130 QColor mWorkingHoursColor;
131 QColor mTodoDueTodayColor; 131 QColor mTodoDueTodayColor;
132 QColor mTodoOverdueColor; 132 QColor mTodoOverdueColor;
133 QColor mMonthViewEvenColor; 133 QColor mMonthViewEvenColor;
134 QColor mMonthViewOddColor; 134 QColor mMonthViewOddColor;
135 QColor mMonthViewHolidayColor; 135 QColor mMonthViewHolidayColor;
136 bool mMonthViewUsesDayColors; 136 bool mMonthViewUsesDayColors;
137 bool mMonthViewSatSunTog; 137 bool mMonthViewSatSunTog;
138 bool mMonthViewWeek; 138 bool mMonthViewWeek;
139 QColor mAppColor1; 139 QColor mAppColor1;
140 QColor mAppColor2; 140 QColor mAppColor2;
141 bool mUseAppColors; 141 bool mUseAppColors;
142 142
143 int mDayBegins; 143 int mDayBegins;
144 int mHourSize; 144 int mHourSize;
145 int mAllDaySize; 145 int mAllDaySize;
146 bool mShowFullMenu; 146 bool mShowFullMenu;
147 bool mDailyRecur; 147 bool mDailyRecur;
148 bool mWeeklyRecur; 148 bool mWeeklyRecur;
149 bool mMonthDailyRecur; 149 bool mMonthDailyRecur;
150 bool mMonthWeeklyRecur; 150 bool mMonthWeeklyRecur;
151 bool mMonthShowIcons; 151 bool mMonthShowIcons;
152 bool mMonthShowShort; 152 bool mMonthShowShort;
153 bool mEnableToolTips; 153 bool mEnableToolTips;
154 bool mEnableMonthScroll; 154 bool mEnableMonthScroll;
155 bool mFullViewMonth; 155 bool mFullViewMonth;
156 bool mMonthViewUsesCategoryColor; 156 bool mMonthViewUsesCategoryColor;
157 bool mFullViewTodo; 157 bool mFullViewTodo;
158 bool mShowCompletedTodo; 158 bool mShowCompletedTodo;
159 bool mMarcusBainsEnabled; 159 bool mMarcusBainsEnabled;
160 int mNextXDays; 160 int mNextXDays;
161 int mWhatsNextDays; 161 int mWhatsNextDays;
162 int mWhatsNextPrios; 162 int mWhatsNextPrios;
163 bool mEnableQuickTodo; 163 bool mEnableQuickTodo;
164 164
165 bool mCompactDialogs; 165 bool mCompactDialogs;
166 bool mVerticalScreen; 166 bool mVerticalScreen;
167 167
168 bool mShowIconNewTodo; 168 bool mShowIconNewTodo;
169 bool mShowIconNewEvent; 169 bool mShowIconNewEvent;
170 bool mShowIconSearch; 170 bool mShowIconSearch;
171 bool mShowIconList; 171 bool mShowIconList;
172 bool mShowIconDay1; 172 bool mShowIconDay1;
173 bool mShowIconDay5; 173 bool mShowIconDay5;
174 bool mShowIconDay6;
174 bool mShowIconDay7; 175 bool mShowIconDay7;
175 bool mShowIconMonth; 176 bool mShowIconMonth;
176 bool mShowIconTodoview; 177 bool mShowIconTodoview;
177 bool mShowIconBackFast; 178 bool mShowIconBackFast;
178 bool mShowIconBack; 179 bool mShowIconBack;
179 bool mShowIconToday; 180 bool mShowIconToday;
180 bool mShowIconForward; 181 bool mShowIconForward;
181 bool mShowIconForwardFast; 182 bool mShowIconForwardFast;
182 bool mShowIconWhatsThis; 183 bool mShowIconWhatsThis;
183 bool mShowIconNextDays; 184 bool mShowIconNextDays;
184 bool mShowIconNext; 185 bool mShowIconNext;
185 bool mShowIconJournal; 186 bool mShowIconJournal;
186 187
187 bool mShowIconStretch; 188 bool mShowIconStretch;
188 189
189 bool mToolBarHor; 190 bool mToolBarHor;
190 bool mToolBarUp; 191 bool mToolBarUp;
191 bool mToolBarMiniIcons; 192 bool mToolBarMiniIcons;
192 193
193 bool mAskForQuit; 194 bool mAskForQuit;
194 bool mUsePassWd; 195 bool mUsePassWd;
195 bool mShowSyncEvents; 196 bool mShowSyncEvents;
196 bool mShowTodoInAgenda; 197 bool mShowTodoInAgenda;
197 bool mShowTimeInAgenda; 198 bool mShowTimeInAgenda;
198 bool mHideNonStartedTodos; 199 bool mHideNonStartedTodos;
199 200
200 int mLastSyncTime; 201 int mLastSyncTime;
201 void setCategoryColor(QString cat,const QColor & color); 202 void setCategoryColor(QString cat,const QColor & color);
202 QColor *categoryColor(QString cat); 203 QColor *categoryColor(QString cat);
203 204
204 QString mArchiveFile; 205 QString mArchiveFile;
205 QString mHtmlExportFile; 206 QString mHtmlExportFile;
206 bool mHtmlWithSave; 207 bool mHtmlWithSave;
207 208
208 QStringList mSelectedPlugins; 209 QStringList mSelectedPlugins;
209 210
210 QString mLastImportFile; 211 QString mLastImportFile;
211 QString mLastVcalFile; 212 QString mLastVcalFile;
212 QString mLastSaveFile; 213 QString mLastSaveFile;
213 QString mLastLoadFile; 214 QString mLastLoadFile;
214 215
215 216
216 QString mDefaultAlarmFile; 217 QString mDefaultAlarmFile;
217 int mIMIPScheduler; 218 int mIMIPScheduler;
218 int mIMIPSend; 219 int mIMIPSend;
219 QStringList mAdditionalMails; 220 QStringList mAdditionalMails;
220 int mIMIPAutoRefresh; 221 int mIMIPAutoRefresh;
221 int mIMIPAutoInsertReply; 222 int mIMIPAutoInsertReply;
222 int mIMIPAutoInsertRequest; 223 int mIMIPAutoInsertRequest;
223 int mIMIPAutoFreeBusy; 224 int mIMIPAutoFreeBusy;
224 int mIMIPAutoFreeBusyReply; 225 int mIMIPAutoFreeBusyReply;
225 226
226 QStringList mTodoTemplates; 227 QStringList mTodoTemplates;
227 QStringList mEventTemplates; 228 QStringList mEventTemplates;
228 229
229 int mDestination; 230 int mDestination;
230 231
231 232
232 bool mEditOnDoubleClick; 233 bool mEditOnDoubleClick;
233 bool mViewChangeHoldFullscreen; 234 bool mViewChangeHoldFullscreen;
234 bool mViewChangeHoldNonFullscreen; 235 bool mViewChangeHoldNonFullscreen;
235 bool mCenterOnCurrentTime; 236 bool mCenterOnCurrentTime;
236 bool mSetTimeToDayStartAt; 237 bool mSetTimeToDayStartAt;
237 bool mHighlightCurrentDay; 238 bool mHighlightCurrentDay;
238 bool mUseHighlightLightColor; 239 bool mUseHighlightLightColor;
239 bool mListViewMonthTimespan; 240 bool mListViewMonthTimespan;
240 bool mWNViewShowsParents; 241 bool mWNViewShowsParents;
241 bool mWNViewShowsPast; 242 bool mWNViewShowsPast;
242 bool mWNViewShowLocation; 243 bool mWNViewShowLocation;
243 bool mTodoViewShowsPercentage; 244 bool mTodoViewShowsPercentage;
244 bool mTodoViewUsesCatColors; 245 bool mTodoViewUsesCatColors;
245 bool mMonthViewUsesBigFont; 246 bool mMonthViewUsesBigFont;
246 bool mTodoViewUsesSmallFont; 247 bool mTodoViewUsesSmallFont;
247 bool mTodoViewUsesForegroundColor; 248 bool mTodoViewUsesForegroundColor;
248 bool mMonthViewUsesForegroundColor; 249 bool mMonthViewUsesForegroundColor;
249 250
250 bool mHightlightDateTimeEdit; 251 bool mHightlightDateTimeEdit;
251 bool mShortDateInViewer; 252 bool mShortDateInViewer;
252 253
253 bool mShowDateNavigator; 254 bool mShowDateNavigator;
254 255
255 QStringList mLocationDefaults; 256 QStringList mLocationDefaults;
256 QStringList mEventSummaryUser; 257 QStringList mEventSummaryUser;
257 QStringList mTodoSummaryUser; 258 QStringList mTodoSummaryUser;
258 259
259 bool mUseInternalAlarmNotification; 260 bool mUseInternalAlarmNotification;
260 int mAlarmPlayBeeps; 261 int mAlarmPlayBeeps;
261 int mAlarmSuspendTime; 262 int mAlarmSuspendTime;
262 int mAlarmSuspendCount; 263 int mAlarmSuspendCount;
263 int mAlarmBeepInterval; 264 int mAlarmBeepInterval;
264 int mOldLanguage; 265 int mOldLanguage;
265 int mOldLoadedLanguage; 266 int mOldLoadedLanguage;
266 267
267 268
268 QString mActiveSyncPort; 269 QString mActiveSyncPort;
269 QString mActiveSyncIP; 270 QString mActiveSyncIP;
270 271
271 private: 272 private:
272 QDict<QColor> mCategoryColors; 273 QDict<QColor> mCategoryColors;
273 QColor mDefaultCategoryColor; 274 QColor mDefaultCategoryColor;
274 275
275 QFont mDefaultTimeBarFont; 276 QFont mDefaultTimeBarFont;
276 QFont mDefaultViewFont; 277 QFont mDefaultViewFont;
277 QFont mDefaultMonthViewFont; 278 QFont mDefaultMonthViewFont;
278 279
279 QString mName; 280 QString mName;
280 QString mEmail; 281 QString mEmail;
281}; 282};
282 283
283#endif 284#endif
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index f8f6c1d..e22f096 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -1,674 +1,714 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 3
4 Copyright (c) 2001 4 Copyright (c) 2001
5 Cornelius Schumacher <schumacher@kde.org> 5 Cornelius Schumacher <schumacher@kde.org>
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or 9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 20
21 As a special exception, permission is given to link this program 21 As a special exception, permission is given to link this program
22 with any edition of Qt, and distribute the resulting executable, 22 with any edition of Qt, and distribute the resulting executable,
23 without including the source code for Qt in the source distribution. 23 without including the source code for Qt in the source distribution.
24*/ 24*/
25 25
26#include <qwidgetstack.h> 26#include <qwidgetstack.h>
27 27
28#include <kconfig.h> 28#include <kconfig.h>
29#include <kglobal.h> 29#include <kglobal.h>
30#ifndef DESKTOP_VERSION 30#ifndef DESKTOP_VERSION
31#include <qpe/qpeapplication.h> 31#include <qpe/qpeapplication.h>
32#else 32#else
33#include <qapplication.h> 33#include <qapplication.h>
34#endif 34#endif
35#include <qdatetime.h> 35#include <qdatetime.h>
36#include "calendarview.h" 36#include "calendarview.h"
37#include "datenavigator.h" 37#include "datenavigator.h"
38#include "kotodoview.h" 38#include "kotodoview.h"
39#include "koagendaview.h" 39#include "koagendaview.h"
40#include "kodialogmanager.h" 40#include "kodialogmanager.h"
41#include "komonthview.h" 41#include "komonthview.h"
42#include "kolistview.h" 42#include "kolistview.h"
43#include "kowhatsnextview.h" 43#include "kowhatsnextview.h"
44#include "kojournalview.h" 44#include "kojournalview.h"
45#include "kotimespanview.h" 45#include "kotimespanview.h"
46#include "koprefs.h" 46#include "koprefs.h"
47#include "navigatorbar.h" 47#include "navigatorbar.h"
48#include "kdatenavigator.h" 48#include "kdatenavigator.h"
49 49
50#include "koviewmanager.h" 50#include "koviewmanager.h"
51//extern bool externFlagMonthviewBlockPainting; 51//extern bool externFlagMonthviewBlockPainting;
52 52
53//bool globalFlagBlockPainting = false; 53//bool globalFlagBlockPainting = false;
54int globalFlagBlockAgenda = 0; 54int globalFlagBlockAgenda = 0;
55int globalFlagBlockLabel = 0; 55int globalFlagBlockLabel = 0;
56int globalFlagBlockAgendaItemPaint = 1; 56int globalFlagBlockAgendaItemPaint = 1;
57int globalFlagBlockAgendaItemUpdate = 1; 57int globalFlagBlockAgendaItemUpdate = 1;
58 58
59 59
60KOViewManager::KOViewManager( CalendarView *mainView ) : 60KOViewManager::KOViewManager( CalendarView *mainView ) :
61 QObject(), mMainView( mainView ) 61 QObject(), mMainView( mainView )
62{ 62{
63 mCurrentView = 0; 63 mCurrentView = 0;
64 64
65 mWhatsNextView = 0; 65 mWhatsNextView = 0;
66 mTodoView = 0; 66 mTodoView = 0;
67 mAgendaView = 0; 67 mAgendaView = 0;
68 mMonthView = 0; 68 mMonthView = 0;
69 mListView = 0; 69 mListView = 0;
70 mJournalView = 0; 70 mJournalView = 0;
71 mTimeSpanView = 0; 71 mTimeSpanView = 0;
72 mCurrentAgendaView = 0 ; 72 mCurrentAgendaView = 0 ;
73 mFlagShowNextxDays = false; 73 mFlagShowNextxDays = false;
74} 74}
75 75
76KOViewManager::~KOViewManager() 76KOViewManager::~KOViewManager()
77{ 77{
78} 78}
79 79
80 80
81KOrg::BaseView *KOViewManager::currentView() 81KOrg::BaseView *KOViewManager::currentView()
82{ 82{
83 return mCurrentView; 83 return mCurrentView;
84} 84}
85 85
86void KOViewManager::readSettings(KConfig *config) 86void KOViewManager::readSettings(KConfig *config)
87{ 87{
88 config->setGroup("General"); 88 config->setGroup("General");
89 QString view = config->readEntry("Current View"); 89 QString view = config->readEntry("Current View");
90 if (view == "WhatsNext") showWhatsNextView(); 90 if (view == "WhatsNext") showWhatsNextView();
91 else if (view == "Month") showMonthView(); 91 else if (view == "Month") {
92 if ( KOPrefs::instance()->mMonthViewWeek )
93 showMonthView();
94 else
95 showMonthViewWeek();
96 }
92 else if (view == "List") showListView(); 97 else if (view == "List") showListView();
93 else if (view == "Journal") showJournalView(); 98 else if (view == "Journal") showJournalView();
94 else if (view == "TimeSpan") showTimeSpanView(); 99 else if (view == "TimeSpan") showTimeSpanView();
95 else if (view == "Todo") showTodoView(); 100 else if (view == "Todo") showTodoView();
96 else { 101 else {
97 config->setGroup( "Views" ); 102 config->setGroup( "Views" );
98 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 103 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
99 mCurrentAgendaView = dateCount; 104 mCurrentAgendaView = dateCount;
100 showAgendaView(); 105 showAgendaView();
101 mCurrentAgendaView = dateCount; 106 mCurrentAgendaView = dateCount;
102#ifdef DESKTOP_VERSION 107#ifdef DESKTOP_VERSION
103 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) ); 108 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) );
104#endif 109#endif
105 } 110 }
106} 111}
107 112
108void KOViewManager::showDateView( int view, QDate date) 113void KOViewManager::showDateView( int view, QDate date)
109{ 114{
110 static int lastMode = 0; 115 static int lastMode = 0;
111 static int lastCount = 0; 116 static int lastCount = 0;
112 static bool lastNDMode = false; 117 static bool lastNDMode = false;
113 static QDate lastDate; 118 static QDate lastDate;
114 //qDebug("date %d %s", view, date.toString().latin1()); 119 //qDebug("date %d %s", view, date.toString().latin1());
115 120
116 if (view != 9) 121 if (view != 9)
117 lastMode = 0; 122 lastMode = 0;
118 //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays ); 123 //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays );
119 bool savemFlagShowNextxDays = mFlagShowNextxDays; 124 bool savemFlagShowNextxDays = mFlagShowNextxDays;
120 mFlagShowNextxDays = false; 125 mFlagShowNextxDays = false;
121 if ( view == 3 ) { 126 if ( view == 3 ) {
122 //mCurrentAgendaView = 1 ; 127 //mCurrentAgendaView = 1 ;
123 lastDate = mMainView->dateNavigator()->selectedDates().first(); 128 lastDate = mMainView->dateNavigator()->selectedDates().first();
124 lastCount = mMainView->dateNavigator()->selectedDates().count(); 129 lastCount = mMainView->dateNavigator()->selectedDates().count();
125 lastNDMode = savemFlagShowNextxDays; 130 lastNDMode = savemFlagShowNextxDays;
126 mMainView->showDay( date ); 131 mMainView->showDay( date );
127 lastMode = 1; 132 lastMode = 1;
128 } else if (view == 4 ) { 133 } else if (view == 4 ) {
129 mCurrentAgendaView = 7 ; 134 mCurrentAgendaView = 7 ;
130 mMainView->dateNavigator()->selectDates( date, 7 ); 135 mMainView->dateNavigator()->selectDates( date, 7 );
131 } else if (view == 5 ) { 136 } else if (view == 5 ) {
132 mCurrentAgendaView = 14 ; 137 mCurrentAgendaView = 14 ;
133 mMainView->dateNavigator()->selectDates( date, 14); 138 mMainView->dateNavigator()->selectDates( date, 14);
134 } else if (view == 6 ) { 139 } else if (view == 6 ) {
135 //mMainView->dateNavigator()->selectDates( date, 7 ); 140 //mMainView->dateNavigator()->selectDates( date, 7 );
136 showMonthView(); 141 showMonthView();
137 } else if (view == 7 ) { 142 } else if (view == 7 ) {
138 mMainView->dateNavigator()->selectDate( date ); 143 mMainView->dateNavigator()->selectDate( date );
139 showJournalView(); 144 showJournalView();
140 } else if (view == 8 ) { 145 } else if (view == 8 ) {
141 globalFlagBlockAgenda = 1; 146 globalFlagBlockAgenda = 1;
142 if ( mCurrentAgendaView != 3 ) 147 if ( mCurrentAgendaView != 3 )
143 mCurrentAgendaView = -1; 148 mCurrentAgendaView = -1;
144 showAgendaView(KOPrefs::instance()->mFullViewMonth); 149 showAgendaView(KOPrefs::instance()->mFullViewMonth);
145 globalFlagBlockAgenda = 2; 150 globalFlagBlockAgenda = 2;
146 mMainView->dateNavigator()->selectDates( date , 151 mMainView->dateNavigator()->selectDates( date ,
147 KOPrefs::instance()->mNextXDays ); 152 KOPrefs::instance()->mNextXDays );
148 mFlagShowNextxDays = true; 153 mFlagShowNextxDays = true;
149 mCurrentAgendaView = 3 ; 154 mCurrentAgendaView = 3 ;
150 } if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode ) 155 } if (view == 9) { // return behaviour, for getting back from mode == 3 (single day mode )
151 if ( lastMode ) { 156 if ( lastMode ) {
152 mCurrentAgendaView = lastCount ; 157 mCurrentAgendaView = lastCount ;
153 mMainView->dateNavigator()->selectDates( lastDate, lastCount); 158 mMainView->dateNavigator()->selectDates( lastDate, lastCount);
154 mFlagShowNextxDays = lastNDMode; 159 mFlagShowNextxDays = lastNDMode;
155 if ( mFlagShowNextxDays ) { 160 if ( mFlagShowNextxDays ) {
156 mCurrentAgendaView = 3 ; 161 mCurrentAgendaView = 3 ;
157 } 162 }
158 } else 163 } else
159 showWeekView(); 164 showWeekView();
160 } else if (view == 10) { 165 } else if (view == 10) {
161 mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() ); 166 mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() );
162 } 167 }
163} 168}
164 169
165 170
166 171
167void KOViewManager::writeSettings(KConfig *config) 172void KOViewManager::writeSettings(KConfig *config)
168{ 173{
169 config->setGroup("General"); 174 config->setGroup("General");
170 175
171 QString view; 176 QString view;
172 if (mCurrentView == mWhatsNextView) view = "WhatsNext"; 177 if (mCurrentView == mWhatsNextView) view = "WhatsNext";
173 else if (mCurrentView == mMonthView) view = "Month"; 178 else if (mCurrentView == mMonthView) view = "Month";
174 else if (mCurrentView == mListView) view = "List"; 179 else if (mCurrentView == mListView) view = "List";
175 else if (mCurrentView == mJournalView) view = "Journal"; 180 else if (mCurrentView == mJournalView) view = "Journal";
176 else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; 181 else if (mCurrentView == mTimeSpanView) view = "TimeSpan";
177 else if (mCurrentView == mTodoView) view = "Todo"; 182 else if (mCurrentView == mTodoView) view = "Todo";
178 else view = "Agenda"; 183 else view = "Agenda";
179 184
180 config->writeEntry("Current View",view); 185 config->writeEntry("Current View",view);
181 186
182 if (mAgendaView) { 187 if (mAgendaView) {
183 mAgendaView->writeSettings(config); 188 mAgendaView->writeSettings(config);
184 } 189 }
185 if (mTimeSpanView) { 190 if (mTimeSpanView) {
186 mTimeSpanView->writeSettings(config); 191 mTimeSpanView->writeSettings(config);
187 } 192 }
188 if (mListView) { 193 if (mListView) {
189 mListView->writeSettings(config); 194 mListView->writeSettings(config);
190 } 195 }
191 if (mTodoView) { 196 if (mTodoView) {
192 mTodoView->saveLayout(config,"Todo View"); 197 mTodoView->saveLayout(config,"Todo View");
193 } 198 }
194} 199}
195 200
196void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) 201void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
197{ 202{
198 203
199 //mFlagShowNextxDays = false; 204 //mFlagShowNextxDays = false;
200 //if(view == mCurrentView) return; 205 //if(view == mCurrentView) return;
201 if ( view == 0 ) { 206 if ( view == 0 ) {
202 view = mCurrentView; 207 view = mCurrentView;
203 if ( view == 0 ) 208 if ( view == 0 )
204 return; 209 return;
205 } 210 }
206 bool full = fullScreen; 211 bool full = fullScreen;
207 if(view == mCurrentView && view != mWhatsNextView ) { 212 if(view == mCurrentView && view != mWhatsNextView ) {
208 if ( mCurrentAgendaView < 0 ) 213 if ( mCurrentAgendaView < 0 )
209 return; 214 return;
210 full = mMainView->leftFrame()->isVisible(); 215 if ( view != mMonthView )
216 full = mMainView->leftFrame()->isVisible();
211 } else { 217 } else {
212 if ( view == mMonthView && mMonthView) 218 if ( view == mMonthView && mMonthView)
213 ;//mMonthView->skipResize = true ; 219 ;//mMonthView->skipResize = true ;
214 mCurrentView = view; 220 mCurrentView = view;
215 // bool full = fullScreen; 221 // bool full = fullScreen;
216 bool isFull = !mMainView->leftFrame()->isVisible(); 222 bool isFull = !mMainView->leftFrame()->isVisible();
217 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) 223 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen )
218 full = true; 224 full = true;
219 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) 225 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen )
220 full = false; 226 full = false;
221 } 227 }
222 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); 228 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime();
223 //raiseCurrentView( full ); 229 //raiseCurrentView( full );
224 mMainView->processIncidenceSelection( 0 ); 230 mMainView->processIncidenceSelection( 0 );
225 //mMainView->updateView(); 231 //mMainView->updateView();
226 raiseCurrentView( full, true ); 232 raiseCurrentView( full, true );
227 mMainView->adaptNavigationUnits(); 233 mMainView->adaptNavigationUnits();
228} 234}
229 235
230void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) 236void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
231{ 237{
232 mCurrentAgendaView = 0; 238 mCurrentAgendaView = 0;
233 if ( fullScreen ) { 239 if ( fullScreen ) {
234 mMainView->leftFrame()->hide(); 240 mMainView->leftFrame()->hide();
235 } else { 241 } else {
236 mMainView->leftFrame()->show(); 242 mMainView->leftFrame()->show();
237 } 243 }
238 emit signalFullScreen( !fullScreen ); 244 emit signalFullScreen( !fullScreen );
239 if ( callUpdateView ) 245 if ( callUpdateView )
240 mMainView->updateView(); 246 mMainView->updateView();
241 247
242 if ( globalFlagBlockAgenda == 5 ) { 248 if ( globalFlagBlockAgenda == 5 ) {
243 globalFlagBlockAgenda = 4; 249 globalFlagBlockAgenda = 4;
244 globalFlagBlockAgendaItemPaint = 1; 250 globalFlagBlockAgendaItemPaint = 1;
245 } 251 }
246 mMainView->viewStack()->raiseWidget(mCurrentView); 252 mMainView->viewStack()->raiseWidget(mCurrentView);
247 if ( globalFlagBlockAgenda == 4 ) { 253 if ( globalFlagBlockAgenda == 4 ) {
248 if ( mCurrentView == mAgendaView ) { 254 if ( mCurrentView == mAgendaView ) {
249 //globalFlagBlockAgenda =1 ; 255 //globalFlagBlockAgenda =1 ;
250 if ( KOPrefs::instance()->mSetTimeToDayStartAt ) 256 if ( KOPrefs::instance()->mSetTimeToDayStartAt )
251 mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); 257 mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins );
252 else if ( KOPrefs::instance()->mCenterOnCurrentTime ) 258 else if ( KOPrefs::instance()->mCenterOnCurrentTime )
253 mAgendaView->setStartHour( QTime::currentTime ().hour() ); 259 mAgendaView->setStartHour( QTime::currentTime ().hour() );
254 qApp->processEvents(); 260 qApp->processEvents();
255 //qDebug("qApp->processEvents() "); 261 //qDebug("qApp->processEvents() ");
256 globalFlagBlockAgenda = 0; 262 globalFlagBlockAgenda = 0;
257 mAgendaView->repaintAgenda(); 263 mAgendaView->repaintAgenda();
258 264
259 } 265 }
260 globalFlagBlockAgenda = 0; 266 globalFlagBlockAgenda = 0;
261 } 267 }
262 emit signalAgendaView( mCurrentView == mAgendaView ); 268 emit signalAgendaView( mCurrentView == mAgendaView );
263 //qDebug("raiseCurrentView ende "); 269 //qDebug("raiseCurrentView ende ");
264 270
265} 271}
266 272
267void KOViewManager::updateView() 273void KOViewManager::updateView()
268{ 274{
269 // qDebug("KOViewManager::updateView() "); 275 // qDebug("KOViewManager::updateView() ");
270 // if we are updating mTodoView, we get endless recursion 276 // if we are updating mTodoView, we get endless recursion
271 if ( mTodoView == mCurrentView ) 277 if ( mTodoView == mCurrentView )
272 return; 278 return;
273 if ( mCurrentView ) mCurrentView->updateView(); 279 if ( mCurrentView ) mCurrentView->updateView();
274 280
275} 281}
276 282
277void KOViewManager::updateView(const QDate &start, const QDate &end) 283void KOViewManager::updateView(const QDate &start, const QDate &end)
278{ 284{
279 // kdDebug() << "KOViewManager::updateView()" << endl; 285 // kdDebug() << "KOViewManager::updateView()" << endl;
280 286
281 if (mCurrentView) mCurrentView->showDates(start, end); 287 if (mCurrentView) mCurrentView->showDates(start, end);
282 288
283 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); 289 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView();
284} 290}
285 291
286 292
287void KOViewManager::updateWNview() 293void KOViewManager::updateWNview()
288{ 294{
289 if ( mCurrentView == mWhatsNextView && mWhatsNextView ) 295 if ( mCurrentView == mWhatsNextView && mWhatsNextView )
290 mWhatsNextView->updateView(); 296 mWhatsNextView->updateView();
291 297
292} 298}
293void KOViewManager::showWhatsNextView() 299void KOViewManager::showWhatsNextView()
294{ 300{
295 if (!mWhatsNextView) { 301 if (!mWhatsNextView) {
296 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), 302 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(),
297 "KOViewManager::WhatsNextView"); 303 "KOViewManager::WhatsNextView");
298 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); 304 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog());
299 connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); 305 connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig()));
300 addView(mWhatsNextView); 306 addView(mWhatsNextView);
301 connect(this, SIGNAL( printWNV() ), 307 connect(this, SIGNAL( printWNV() ),
302 mWhatsNextView, SLOT( printMe() ) ); 308 mWhatsNextView, SLOT( printMe() ) );
303 } 309 }
304 globalFlagBlockAgenda = 1; 310 globalFlagBlockAgenda = 1;
305 showView(mWhatsNextView, true ); 311 showView(mWhatsNextView, true );
306 //mWhatsNextView->updateView(); 312 //mWhatsNextView->updateView();
307 313
308} 314}
309 315
310void KOViewManager::showListView() 316void KOViewManager::showListView()
311{ 317{
312 if (!mListView) { 318 if (!mListView) {
313 mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); 319 mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView");
314 addView(mListView); 320 addView(mListView);
315 321
316 connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), 322 connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)),
317 mMainView, SLOT(showIncidence(Incidence *))); 323 mMainView, SLOT(showIncidence(Incidence *)));
318 connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), 324 connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)),
319 mMainView, SLOT(editIncidence(Incidence *))); 325 mMainView, SLOT(editIncidence(Incidence *)));
320 connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), 326 connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)),
321 mMainView, SLOT(deleteIncidence(Incidence *))); 327 mMainView, SLOT(deleteIncidence(Incidence *)));
322 connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), 328 connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ),
323 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 329 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
324 connect( mListView, SIGNAL( signalNewEvent() ), 330 connect( mListView, SIGNAL( signalNewEvent() ),
325 mMainView, SLOT( newEvent() ) ); 331 mMainView, SLOT( newEvent() ) );
326 connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); 332 connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig()));
327 connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), 333 connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ),
328 mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); 334 mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
329 connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), 335 connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ),
330 mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); 336 mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
331 connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 337 connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
332 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 338 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
333 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 339 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
334 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 340 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
335 } 341 }
336 // bool temp = mFlagShowNextxDays; 342 // bool temp = mFlagShowNextxDays;
337 //globalFlagBlockPainting = true; 343 //globalFlagBlockPainting = true;
338 globalFlagBlockAgenda = 1; 344 globalFlagBlockAgenda = 1;
339 if ( KOPrefs::instance()->mListViewMonthTimespan ) { 345 if ( KOPrefs::instance()->mListViewMonthTimespan ) {
340 mMainView->setBlockShowDates( true ); 346 mMainView->setBlockShowDates( true );
341 mMainView->dateNavigator()->selectMonth(); 347 mMainView->dateNavigator()->selectMonth();
342 mMainView->setBlockShowDates( false ); 348 mMainView->setBlockShowDates( false );
343 } 349 }
344 showView(mListView, KOPrefs::instance()->mFullViewTodo); 350 showView(mListView, KOPrefs::instance()->mFullViewTodo);
345 //mFlagShowNextxDays = temp; 351 //mFlagShowNextxDays = temp;
346} 352}
347 353
348void KOViewManager::showAgendaView( bool fullScreen ) 354void KOViewManager::showAgendaView( bool fullScreen )
349{ 355{
350 356
351 mMainView->dialogManager()->hideSearchDialog(); 357 mMainView->dialogManager()->hideSearchDialog();
352 // qDebug("KOViewManager::showAgendaView "); 358 // qDebug("KOViewManager::showAgendaView ");
353 bool full; 359 bool full;
354 full = fullScreen; 360 full = fullScreen;
355 if (!mAgendaView) { 361 if (!mAgendaView) {
356 full = false; 362 full = false;
357 mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); 363 mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView");
358 addView(mAgendaView); 364 addView(mAgendaView);
359#ifndef DESKTOP_VERSION 365#ifndef DESKTOP_VERSION
360 QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); 366 QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold );
361#endif 367#endif
362 connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), 368 connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )),
363 mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); 369 mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) ));
364 370
365 // SIGNALS/SLOTS FOR DAY/WEEK VIEW 371 // SIGNALS/SLOTS FOR DAY/WEEK VIEW
366 372
367 connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); 373 connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate )));
368 374
369 connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), 375 connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)),
370 mMainView, SLOT(newTodoDateTime(QDateTime,bool))); 376 mMainView, SLOT(newTodoDateTime(QDateTime,bool)));
371 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), 377 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)),
372 mMainView, SLOT(newEvent(QDateTime))); 378 mMainView, SLOT(newEvent(QDateTime)));
373 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), 379 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)),
374 mMainView, SLOT(newEvent(QDateTime,QDateTime))); 380 mMainView, SLOT(newEvent(QDateTime,QDateTime)));
375 connect(mAgendaView,SIGNAL(newEventSignal(QDate)), 381 connect(mAgendaView,SIGNAL(newEventSignal(QDate)),
376 mMainView, SLOT(newEvent(QDate))); 382 mMainView, SLOT(newEvent(QDate)));
377 383
378 connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), 384 connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)),
379 mMainView, SLOT(editIncidence(Incidence *))); 385 mMainView, SLOT(editIncidence(Incidence *)));
380 connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), 386 connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)),
381 mMainView, SLOT(showIncidence(Incidence *))); 387 mMainView, SLOT(showIncidence(Incidence *)));
382 connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), 388 connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)),
383 mMainView, SLOT(deleteIncidence(Incidence *))); 389 mMainView, SLOT(deleteIncidence(Incidence *)));
384 390
385 connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), 391 connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ),
386 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 392 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
387 393
388 connect(mAgendaView, SIGNAL( toggleExpand() ), 394 connect(mAgendaView, SIGNAL( toggleExpand() ),
389 mMainView, SLOT( toggleExpand() ) ); 395 mMainView, SLOT( toggleExpand() ) );
390 396
391 connect(mMainView, SIGNAL( calendarViewExpanded( bool ) ), 397 connect(mMainView, SIGNAL( calendarViewExpanded( bool ) ),
392 mAgendaView, SLOT( setExpandedButton( bool ) ) ); 398 mAgendaView, SLOT( setExpandedButton( bool ) ) );
393 connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), 399 connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ),
394 mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; 400 mMainView, SLOT(cloneIncidence(Incidence *) ) ) ;
395 connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), 401 connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ),
396 mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; 402 mMainView, SLOT(cancelIncidence(Incidence *) ) ) ;
397 connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); 403 connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig()));
398 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, 404 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView,
399 SLOT( updateTodo( Todo *, int ) ) ); 405 SLOT( updateTodo( Todo *, int ) ) );
400 connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), 406 connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )),
401 mMainView, SIGNAL( todoModified( Todo *, int ))); 407 mMainView, SIGNAL( todoModified( Todo *, int )));
402 connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 408 connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
403 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 409 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
404 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 410 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
405 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 411 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
406 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), 412 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ),
407 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); 413 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
408 mAgendaView->readSettings(); 414 mAgendaView->readSettings();
409 mAgendaView->updateConfig(); 415 mAgendaView->updateConfig();
410 } 416 }
411 417
412 showView( mAgendaView, full); 418 showView( mAgendaView, full);
413 419
414} 420}
415 421
416void KOViewManager::showDayView() 422void KOViewManager::showDayView()
417{ 423{
418 mFlagShowNextxDays = false; 424 mFlagShowNextxDays = false;
419 globalFlagBlockLabel = 1; 425 globalFlagBlockLabel = 1;
420 globalFlagBlockAgenda = 1; 426 globalFlagBlockAgenda = 1;
421 if ( mCurrentAgendaView != 1 ) 427 if ( mCurrentAgendaView != 1 )
422 mCurrentAgendaView = -1; 428 mCurrentAgendaView = -1;
423 showAgendaView(); 429 showAgendaView();
424 qApp->processEvents(); 430 qApp->processEvents();
425 globalFlagBlockAgenda = 2; 431 globalFlagBlockAgenda = 2;
426 globalFlagBlockLabel = 0; 432 globalFlagBlockLabel = 0;
427 mMainView->dateNavigator()->selectDates( 1 ); 433 mMainView->dateNavigator()->selectDates( 1 );
428 mCurrentAgendaView = 1 ; 434 mCurrentAgendaView = 1 ;
429 435
430} 436}
431 437
432void KOViewManager::showWorkWeekView() 438void KOViewManager::showWorkWeekView()
433{ 439{
434 mFlagShowNextxDays = false; 440 mFlagShowNextxDays = false;
435 globalFlagBlockAgenda = 1; 441 globalFlagBlockAgenda = 1;
436 globalFlagBlockLabel = 1; 442 globalFlagBlockLabel = 1;
437 if ( mCurrentAgendaView != 5 ) 443 if ( mCurrentAgendaView != 5 )
438 mCurrentAgendaView = -1; 444 mCurrentAgendaView = -1;
439 showAgendaView(); 445 showAgendaView();
440 qApp->processEvents(); 446 qApp->processEvents();
441 globalFlagBlockAgenda = 2; 447 globalFlagBlockAgenda = 2;
442 globalFlagBlockLabel = 0; 448 globalFlagBlockLabel = 0;
443 mMainView->dateNavigator()->selectWorkWeek(); 449 mMainView->dateNavigator()->selectWorkWeek();
444 mCurrentAgendaView = 5 ; 450 mCurrentAgendaView = 5 ;
445 451
446} 452}
447 453
448void KOViewManager::showWeekView() 454void KOViewManager::showWeekView()
449{ 455{
450 /* 456 /*
451 globalFlagBlockAgenda = 2; 457 globalFlagBlockAgenda = 2;
452 qDebug("4globalFlagBlockAgenda = 2; "); 458 qDebug("4globalFlagBlockAgenda = 2; ");
453 //globalFlagBlockPainting = true; 459 //globalFlagBlockPainting = true;
454 mMainView->dateNavigator()->selectWeek(); 460 mMainView->dateNavigator()->selectWeek();
455 showAgendaView(); 461 showAgendaView();
456 */ 462 */
457 463
458 464
459 mFlagShowNextxDays = false; 465 mFlagShowNextxDays = false;
460 globalFlagBlockAgenda = 1; 466 globalFlagBlockAgenda = 1;
461 globalFlagBlockLabel = 1; 467 globalFlagBlockLabel = 1;
462 if ( mCurrentAgendaView != 7 ) 468 if ( mCurrentAgendaView != 7 )
463 mCurrentAgendaView = -1; 469 mCurrentAgendaView = -1;
464 showAgendaView(); 470 showAgendaView();
465 qApp->processEvents(); 471 qApp->processEvents();
466 globalFlagBlockAgenda = 2; 472 globalFlagBlockAgenda = 2;
467 globalFlagBlockLabel = 0; 473 globalFlagBlockLabel = 0;
468 mMainView->dateNavigator()->selectWeek(); 474 mMainView->dateNavigator()->selectWeek();
469 mCurrentAgendaView = 7 ; 475 mCurrentAgendaView = 7 ;
470} 476}
471 477
472void KOViewManager::showNextXView() 478void KOViewManager::showNextXView()
473{ 479{
474 480
475 globalFlagBlockAgenda = 1; 481 globalFlagBlockAgenda = 1;
476 if ( mCurrentAgendaView != 3 ) 482 if ( mCurrentAgendaView != 3 )
477 mCurrentAgendaView = -1; 483 mCurrentAgendaView = -1;
478 showAgendaView(KOPrefs::instance()->mFullViewMonth); 484 showAgendaView(KOPrefs::instance()->mFullViewMonth);
479 globalFlagBlockAgenda = 2; 485 globalFlagBlockAgenda = 2;
480 mMainView->dateNavigator()->selectDates( QDate::currentDate(), 486 mMainView->dateNavigator()->selectDates( QDate::currentDate(),
481 KOPrefs::instance()->mNextXDays ); 487 KOPrefs::instance()->mNextXDays );
482 mFlagShowNextxDays = true; 488 mFlagShowNextxDays = true;
483 mCurrentAgendaView = 3 ; 489 mCurrentAgendaView = 3 ;
484} 490}
485bool KOViewManager::showsNextDays() 491bool KOViewManager::showsNextDays()
486{ 492{
487 return mFlagShowNextxDays; 493 return mFlagShowNextxDays;
488} 494}
489void KOViewManager::showMonthView() 495void KOViewManager::createMonthView()
490 { 496{
491 if (!mMonthView) { 497if (!mMonthView) {
492 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); 498 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView");
493 499
494 addView(mMonthView); 500 addView(mMonthView);
495 // mMonthView->show(); 501 // mMonthView->show();
496 // SIGNALS/SLOTS FOR MONTH VIEW 502 // SIGNALS/SLOTS FOR MONTH VIEW
497 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), 503 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)),
498 mMainView, SLOT(newEvent(QDateTime))); 504 mMainView, SLOT(newEvent(QDateTime)));
499 505
500 connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), 506 connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)),
501 mMainView, SLOT(showIncidence(Incidence *))); 507 mMainView, SLOT(showIncidence(Incidence *)));
502 connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), 508 connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)),
503 mMainView, SLOT(editIncidence(Incidence *))); 509 mMainView, SLOT(editIncidence(Incidence *)));
504 connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), 510 connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)),
505 mMainView, SLOT(deleteIncidence(Incidence *))); 511 mMainView, SLOT(deleteIncidence(Incidence *)));
506 512
507 connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), 513 connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ),
508 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 514 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
509 connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), 515 connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ),
510 mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); 516 mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
511 connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), 517 connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ),
512 mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); 518 mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
513 519
514 connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 520 connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
515 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 521 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
516 connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 522 connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
517 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 523 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
518 connect( mMonthView, SIGNAL( selectWeekNum( int ) ), 524 connect( mMonthView, SIGNAL( selectWeekNum( int ) ),
519 mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); 525 mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) );
526 connect( mMonthView, SIGNAL( selectMonth() ),
527 mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) );
520 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), 528 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ),
521 mMainView, SLOT ( showDay( QDate ) ) ); 529 mMainView, SLOT ( showDay( QDate ) ) );
522 connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); 530 connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig()));
523 connect( mMonthView, SIGNAL(nextMonth() ), 531 connect( mMonthView, SIGNAL(nextMonth() ),
524 mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); 532 mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) );
525 connect( mMonthView, SIGNAL(prevMonth() ), 533 connect( mMonthView, SIGNAL(prevMonth() ),
526 mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); 534 mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) );
527 connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), 535 connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ),
528 mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); 536 mMainView->dateNavigator(), SLOT( selectPreviousYear() ) );
529 connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), 537 connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ),
530 mMainView->dateNavigator(), SLOT( selectNextYear() ) ); 538 mMainView->dateNavigator(), SLOT( selectNextYear() ) );
531 connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), 539 connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ),
532 mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); 540 mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) );
533 connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), 541 connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ),
534 mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); 542 mMainView->dateNavigator(), SLOT( selectNextMonth() ) );
543 connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ),
544 mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) );
545 connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ),
546 mMainView->dateNavigator(), SLOT( selectNextWeek() ) );
535 547
536 connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 548 connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
537 mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); 549 mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) );
538 550
539 551
540 connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), 552 connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ),
541 mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); 553 mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) );
542 554
543 } 555 }
556}
557void KOViewManager::showMonthViewWeek()
558{
559 createMonthView();
560 bool full = true;
561 if ( mCurrentView == mMonthView)
562 full = mMainView->leftFrame()->isVisible();
563 if ( !KOPrefs::instance()->mMonthViewWeek ) {
564 mMonthView->switchView();
565 if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
566 full = false;
567 else
568 full = true;
569 }
570 mMainView->dateNavigator()->selectWeek();
571 showView(mMonthView, full );
572}
544 573
574void KOViewManager::showMonthView()
575 {
576
577 createMonthView();
545 globalFlagBlockAgenda = 1; 578 globalFlagBlockAgenda = 1;
546 //mFlagShowNextxDays = false; 579 //mFlagShowNextxDays = false;
547 // if(mMonthView == mCurrentView) return; 580 bool full = true;
548 if ( KOPrefs::instance()->mMonthViewWeek ) 581 if ( mCurrentView == mMonthView)
549 mMainView->dateNavigator()->selectWeek(); 582 full = mMainView->leftFrame()->isVisible();
550 else 583 // if(mMonthView == mCurrentView) return;
551 mMainView->dateNavigator()->selectMonth(); 584 if ( KOPrefs::instance()->mMonthViewWeek ) {
585 mMonthView->switchView();
586 if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
587 full = false;
588 else
589 full = true;
590 }
591 mMainView->dateNavigator()->selectMonth();
552 592
553 showView(mMonthView, true ); 593 showView(mMonthView, full );
554 594
555} 595}
556 596
557void KOViewManager::showTodoView() 597void KOViewManager::showTodoView()
558{ 598{
559 //mFlagShowNextxDays = false; 599 //mFlagShowNextxDays = false;
560 if ( !mTodoView ) { 600 if ( !mTodoView ) {
561 mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), 601 mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(),
562 "KOViewManager::TodoView" ); 602 "KOViewManager::TodoView" );
563 603
564 addView( mTodoView ); 604 addView( mTodoView );
565 // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); 605 // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold );
566 606
567 // SIGNALS/SLOTS FOR TODO VIEW 607 // SIGNALS/SLOTS FOR TODO VIEW
568 connect( mTodoView, SIGNAL( newTodoSignal() ), 608 connect( mTodoView, SIGNAL( newTodoSignal() ),
569 mMainView, SLOT( newTodo() ) ); 609 mMainView, SLOT( newTodo() ) );
570 connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), 610 connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ),
571 mMainView, SLOT( newSubTodo( Todo *) ) ); 611 mMainView, SLOT( newSubTodo( Todo *) ) );
572 connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), 612 connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ),
573 mMainView, SLOT( showTodo( Todo * ) ) ); 613 mMainView, SLOT( showTodo( Todo * ) ) );
574 connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), 614 connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ),
575 mMainView, SLOT( editTodo( Todo * ) ) ); 615 mMainView, SLOT( editTodo( Todo * ) ) );
576 connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), 616 connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ),
577 mMainView, SLOT( deleteTodo( Todo * ) ) ); 617 mMainView, SLOT( deleteTodo( Todo * ) ) );
578 connect( mTodoView, SIGNAL( purgeCompletedSignal() ), 618 connect( mTodoView, SIGNAL( purgeCompletedSignal() ),
579 mMainView, SLOT( purgeCompleted() ) ); 619 mMainView, SLOT( purgeCompleted() ) );
580 620
581 connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), 621 connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ),
582 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 622 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
583 623
584 connect( mMainView, SIGNAL( configChanged() ), mTodoView, 624 connect( mMainView, SIGNAL( configChanged() ), mTodoView,
585 SLOT( updateConfig() ) ); 625 SLOT( updateConfig() ) );
586 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, 626 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView,
587 SLOT( updateTodo( Todo *, int ) ) ); 627 SLOT( updateTodo( Todo *, int ) ) );
588 connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), 628 connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ),
589 mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); 629 mMainView, SIGNAL ( todoModified( Todo *, int ) ) );
590 connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), 630 connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ),
591 mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); 631 mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
592 connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), 632 connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ),
593 mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); 633 mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
594 connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), 634 connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ),
595 mMainView, SLOT ( todo_unsub( Todo * ) ) ); 635 mMainView, SLOT ( todo_unsub( Todo * ) ) );
596 connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), 636 connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
597 mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); 637 mMainView, SLOT ( todo_resub( Todo *, Todo *) ) );
598 connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), 638 connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ),
599 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 639 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
600 connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), 640 connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ),
601 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 641 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
602 KConfig *config = KOGlobals::config(); 642 KConfig *config = KOGlobals::config();
603 mTodoView->restoreLayout(config,"Todo View"); 643 mTodoView->restoreLayout(config,"Todo View");
604 mTodoView->setNavigator( mMainView->dateNavigator() ); 644 mTodoView->setNavigator( mMainView->dateNavigator() );
605 } 645 }
606 646
607 globalFlagBlockAgenda = 1; 647 globalFlagBlockAgenda = 1;
608 showView( mTodoView, true ); 648 showView( mTodoView, true );
609 649
610} 650}
611 651
612void KOViewManager::showJournalView() 652void KOViewManager::showJournalView()
613{ 653{
614 //mFlagShowNextxDays = false; 654 //mFlagShowNextxDays = false;
615 if (!mJournalView) { 655 if (!mJournalView) {
616 mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(), 656 mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(),
617 "KOViewManager::JournalView"); 657 "KOViewManager::JournalView");
618 connect( mMainView, SIGNAL( configChanged() ), mJournalView, 658 connect( mMainView, SIGNAL( configChanged() ), mJournalView,
619 SLOT( updateConfig() ) ); 659 SLOT( updateConfig() ) );
620 connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); 660 connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) );
621 addView(mJournalView); 661 addView(mJournalView);
622 } 662 }
623 663
624 showView(mJournalView); 664 showView(mJournalView);
625 mMainView->dateNavigator()->selectDates( 1 ); 665 mMainView->dateNavigator()->selectDates( 1 );
626} 666}
627 667
628void KOViewManager::showTimeSpanView() 668void KOViewManager::showTimeSpanView()
629{ 669{
630 //mFlagShowNextxDays = false; 670 //mFlagShowNextxDays = false;
631 if (!mTimeSpanView) { 671 if (!mTimeSpanView) {
632 mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(), 672 mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(),
633 "KOViewManager::TimeSpanView"); 673 "KOViewManager::TimeSpanView");
634 addView(mTimeSpanView); 674 addView(mTimeSpanView);
635 675
636 mTimeSpanView->readSettings(); 676 mTimeSpanView->readSettings();
637 } 677 }
638 678
639 showView(mTimeSpanView); 679 showView(mTimeSpanView);
640} 680}
641 681
642Incidence *KOViewManager::currentSelection() 682Incidence *KOViewManager::currentSelection()
643{ 683{
644 if (!mCurrentView) return 0; 684 if (!mCurrentView) return 0;
645 if ( mCurrentView == mListView ) { 685 if ( mCurrentView == mListView ) {
646 if ( mListView->currentItem() ) 686 if ( mListView->currentItem() )
647 return mListView->currentItem(); 687 return mListView->currentItem();
648 } 688 }
649 return mCurrentView->selectedIncidences().first(); 689 return mCurrentView->selectedIncidences().first();
650} 690}
651 691
652QDate KOViewManager::currentSelectionDate() 692QDate KOViewManager::currentSelectionDate()
653{ 693{
654 QDate qd; 694 QDate qd;
655 if (mCurrentView) { 695 if (mCurrentView) {
656 DateList qvl = mCurrentView->selectedDates(); 696 DateList qvl = mCurrentView->selectedDates();
657 if (!qvl.isEmpty()) qd = qvl.first(); 697 if (!qvl.isEmpty()) qd = qvl.first();
658 } 698 }
659 return qd; 699 return qd;
660} 700}
661 701
662void KOViewManager::addView(KOrg::BaseView *view) 702void KOViewManager::addView(KOrg::BaseView *view)
663{ 703{
664#if QT_VERSION >= 0x030000 704#if QT_VERSION >= 0x030000
665 mMainView->viewStack()->addWidget( view ); 705 mMainView->viewStack()->addWidget( view );
666#else 706#else
667 mMainView->viewStack()->addWidget( view, 1 ); 707 mMainView->viewStack()->addWidget( view, 1 );
668#endif 708#endif
669} 709}
670 710
671void KOViewManager::setDocumentId( const QString &id ) 711void KOViewManager::setDocumentId( const QString &id )
672{ 712{
673 if (mTodoView) mTodoView->setDocumentId( id ); 713 if (mTodoView) mTodoView->setDocumentId( id );
674} 714}
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 66ab138..8f0bf82 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -1,118 +1,120 @@
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
31class CalendarView; 31class CalendarView;
32 32
33class KOListView; 33class KOListView;
34class KOAgendaView; 34class KOAgendaView;
35class KOMonthView; 35class KOMonthView;
36class KOTimeSpanView; 36class KOTimeSpanView;
37class KOTodoView; 37class KOTodoView;
38class KOWhatsNextView; 38class KOWhatsNextView;
39class KOJournalView; 39class KOJournalView;
40 40
41using namespace KCal; 41using 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*/
47class KOViewManager : public QObject 47class 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( const QDate &start, const QDate &end ); 69 void updateView( const QDate &start, const QDate &end );
70 70
71 void raiseCurrentView( bool fullScreen = false , bool updateView = false); 71 void raiseCurrentView( bool fullScreen = false , bool updateView = false);
72 72
73 void addView(KOrg::BaseView *); 73 void addView(KOrg::BaseView *);
74 74
75 Incidence *currentSelection(); 75 Incidence *currentSelection();
76 QDate currentSelectionDate(); 76 QDate currentSelectionDate();
77 77
78 KOAgendaView *agendaView() const { return mAgendaView; } 78 KOAgendaView *agendaView() const { return mAgendaView; }
79 79
80 signals: 80 signals:
81 void printWNV(); 81 void printWNV();
82 void signalFullScreen( bool ); 82 void signalFullScreen( bool );
83 void signalAgendaView( bool ); 83 void signalAgendaView( bool );
84 public slots: 84 public slots:
85 void showDateView( int, QDate ); 85 void showDateView( int, QDate );
86 void updateView(); 86 void updateView();
87 void showWhatsNextView(); 87 void showWhatsNextView();
88 void showListView(); 88 void showListView();
89 void showAgendaView( bool fullScreen = false ); 89 void showAgendaView( bool fullScreen = false );
90 void showDayView(); 90 void showDayView();
91 void showWorkWeekView(); 91 void showWorkWeekView();
92 void showWeekView(); 92 void showWeekView();
93 void showNextXView(); 93 void showNextXView();
94 void showMonthView(); 94 void showMonthView();
95 void showMonthViewWeek();
95 void showTodoView(); 96 void showTodoView();
96 void showJournalView(); 97 void showJournalView();
97 void showTimeSpanView(); 98 void showTimeSpanView();
98 99
99 private: 100 private:
101 void createMonthView();
100 CalendarView *mMainView; 102 CalendarView *mMainView;
101 103
102 int mCurrentAgendaView; 104 int mCurrentAgendaView;
103 KOAgendaView *mAgendaView; 105 KOAgendaView *mAgendaView;
104 KOListView *mListView; 106 KOListView *mListView;
105 KOMonthView *mMonthView; 107 KOMonthView *mMonthView;
106 KOTodoView *mTodoView; 108 KOTodoView *mTodoView;
107 KOWhatsNextView *mWhatsNextView; 109 KOWhatsNextView *mWhatsNextView;
108 KOJournalView *mJournalView; 110 KOJournalView *mJournalView;
109 KOTimeSpanView *mTimeSpanView; 111 KOTimeSpanView *mTimeSpanView;
110 112
111 KOrg::BaseView *mCurrentView; // currently active event view 113 KOrg::BaseView *mCurrentView; // currently active event view
112 114
113 int mAgendaViewMode; 115 int mAgendaViewMode;
114 bool mFlagShowNextxDays; 116 bool mFlagShowNextxDays;
115 117
116}; 118};
117 119
118#endif 120#endif
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index ab0e4d6..16031b8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -204,1871 +204,1883 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
204 QFileInfo finfo ( defaultFileName() ); 204 QFileInfo finfo ( defaultFileName() );
205 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); 205 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics");
206 qDebug("oldfile %s ", oldFile.latin1()); 206 qDebug("oldfile %s ", oldFile.latin1());
207 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; 207 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n";
208 finfo.setFile( oldFile ); 208 finfo.setFile( oldFile );
209 if (finfo.exists() ) { 209 if (finfo.exists() ) {
210 KMessageBox::information( this, message); 210 KMessageBox::information( this, message);
211 mView->openCalendar( oldFile ); 211 mView->openCalendar( oldFile );
212 qApp->processEvents(); 212 qApp->processEvents();
213 } else { 213 } else {
214 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); 214 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
215 finfo.setFile( oldFile ); 215 finfo.setFile( oldFile );
216 if (finfo.exists() ) { 216 if (finfo.exists() ) {
217 KMessageBox::information( this, message); 217 KMessageBox::information( this, message);
218 mView->openCalendar( oldFile ); 218 mView->openCalendar( oldFile );
219 qApp->processEvents(); 219 qApp->processEvents();
220 } 220 }
221 } 221 }
222 mView->saveCalendar( defaultFileName() ); 222 mView->saveCalendar( defaultFileName() );
223 newFile = true; 223 newFile = true;
224 } 224 }
225 225
226 QTime neededSaveTime = QDateTime::currentDateTime().time(); 226 QTime neededSaveTime = QDateTime::currentDateTime().time();
227 mView->openCalendar( defaultFileName() ); 227 mView->openCalendar( defaultFileName() );
228 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 228 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
229 qDebug("KO: Calendar loading time: %d ms",msNeeded ); 229 qDebug("KO: Calendar loading time: %d ms",msNeeded );
230 230
231 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { 231 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) {
232 KOPrefs::instance()->setAllDefaults(); 232 KOPrefs::instance()->setAllDefaults();
233 int count = mView->addCategories(); 233 int count = mView->addCategories();
234 } 234 }
235 processIncidenceSelection( 0 ); 235 processIncidenceSelection( 0 );
236 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), 236 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
237 SLOT( processIncidenceSelection( Incidence * ) ) ); 237 SLOT( processIncidenceSelection( Incidence * ) ) );
238 connect( mView, SIGNAL( modifiedChanged( bool ) ), 238 connect( mView, SIGNAL( modifiedChanged( bool ) ),
239 SLOT( slotModifiedChanged( bool ) ) ); 239 SLOT( slotModifiedChanged( bool ) ) );
240 240
241 241
242 connect( mView, SIGNAL( tempDisableBR(bool) ), 242 connect( mView, SIGNAL( tempDisableBR(bool) ),
243 SLOT( disableBR(bool) ) ); 243 SLOT( disableBR(bool) ) );
244 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 244 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
245 mView->setModified( false ); 245 mView->setModified( false );
246 mBlockAtStartup = false; 246 mBlockAtStartup = false;
247 mView->setModified( false ); 247 mView->setModified( false );
248 setCentralWidget( mView ); 248 setCentralWidget( mView );
249 globalFlagBlockStartup = 0; 249 globalFlagBlockStartup = 0;
250 mView->show(); 250 mView->show();
251 delete splash; 251 delete splash;
252 if ( newFile ) 252 if ( newFile )
253 mView->updateConfig(); 253 mView->updateConfig();
254 // qApp->processEvents(); 254 // qApp->processEvents();
255 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 255 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
256 //fillSyncMenu(); 256 //fillSyncMenu();
257 257
258 258
259 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 259 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
260 connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); 260 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
261 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 261 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
262 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 262 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
263 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 263 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
264 mSyncManager->setDefaultFileName( sentSyncFile()); 264 mSyncManager->setDefaultFileName( sentSyncFile());
265 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 265 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
266 mSyncManager->fillSyncMenu(); 266 mSyncManager->fillSyncMenu();
267 267
268 268
269 269
270 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 270 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
271 if ( showWarning ) { 271 if ( showWarning ) {
272 KMessageBox::information( this, 272 KMessageBox::information( this,
273 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); 273 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
274 qApp->processEvents(); 274 qApp->processEvents();
275 mView->dialogManager()->showSyncOptions(); 275 mView->dialogManager()->showSyncOptions();
276 } 276 }
277 277
278 //US listen for result adressed from Ka/Pi 278 //US listen for result adressed from Ka/Pi
279#ifndef DESKTOP_VERSION 279#ifndef DESKTOP_VERSION
280 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 280 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
281#endif 281#endif
282#ifndef DESKTOP_VERSION 282#ifndef DESKTOP_VERSION
283 infrared = 0; 283 infrared = 0;
284#endif 284#endif
285 updateWeek( mView->startDate() ); 285 updateWeek( mView->startDate() );
286 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 286 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
287 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 287 SLOT( updateWeekNum( const KCal::DateList & ) ) );
288 mBRdisabled = false; 288 mBRdisabled = false;
289 //toggleBeamReceive(); 289 //toggleBeamReceive();
290} 290}
291MainWindow::~MainWindow() 291MainWindow::~MainWindow()
292{ 292{
293 //qDebug("MainWindow::~MainWindow() "); 293 //qDebug("MainWindow::~MainWindow() ");
294 //save toolbar location 294 //save toolbar location
295 delete mCalendar; 295 delete mCalendar;
296 delete mSyncManager; 296 delete mSyncManager;
297#ifndef DESKTOP_VERSION 297#ifndef DESKTOP_VERSION
298 if ( infrared ) 298 if ( infrared )
299 delete infrared; 299 delete infrared;
300#endif 300#endif
301 301
302 302
303} 303}
304 304
305void MainWindow::disableBR(bool b) 305void MainWindow::disableBR(bool b)
306{ 306{
307#ifndef DESKTOP_VERSION 307#ifndef DESKTOP_VERSION
308 if ( b ) { 308 if ( b ) {
309 if ( infrared ) { 309 if ( infrared ) {
310 toggleBeamReceive(); 310 toggleBeamReceive();
311 mBRdisabled = true; 311 mBRdisabled = true;
312 } 312 }
313 mBRdisabled = true; 313 mBRdisabled = true;
314 } else { 314 } else {
315 if ( mBRdisabled ) { 315 if ( mBRdisabled ) {
316 mBRdisabled = false; 316 mBRdisabled = false;
317 //makes no sense,because other cal ap is probably running 317 //makes no sense,because other cal ap is probably running
318 // toggleBeamReceive(); 318 // toggleBeamReceive();
319 } 319 }
320 } 320 }
321#endif 321#endif
322 322
323} 323}
324bool MainWindow::beamReceiveEnabled() 324bool MainWindow::beamReceiveEnabled()
325{ 325{
326#ifndef DESKTOP_VERSION 326#ifndef DESKTOP_VERSION
327 return ( infrared != 0 ); 327 return ( infrared != 0 );
328#endif 328#endif
329 return false; 329 return false;
330} 330}
331 331
332void MainWindow::toggleBeamReceive() 332void MainWindow::toggleBeamReceive()
333{ 333{
334 if ( mBRdisabled ) 334 if ( mBRdisabled )
335 return; 335 return;
336#ifndef DESKTOP_VERSION 336#ifndef DESKTOP_VERSION
337 if ( infrared ) { 337 if ( infrared ) {
338 qDebug("disable BeamReceive "); 338 qDebug("disable BeamReceive ");
339 delete infrared; 339 delete infrared;
340 infrared = 0; 340 infrared = 0;
341 brAction->setOn(false); 341 brAction->setOn(false);
342 return; 342 return;
343 } 343 }
344 qDebug("enable BeamReceive "); 344 qDebug("enable BeamReceive ");
345 brAction->setOn(true); 345 brAction->setOn(true);
346 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 346 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
347 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 347 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
348#endif 348#endif
349} 349}
350void MainWindow::showMaximized () 350void MainWindow::showMaximized ()
351{ 351{
352#ifndef DESKTOP_VERSION 352#ifndef DESKTOP_VERSION
353 if ( ! globalFlagBlockStartup ) 353 if ( ! globalFlagBlockStartup )
354 if ( mClosed ) 354 if ( mClosed )
355 mView->goToday(); 355 mView->goToday();
356#endif 356#endif
357 QWidget::showMaximized () ; 357 QWidget::showMaximized () ;
358 mClosed = false; 358 mClosed = false;
359} 359}
360void MainWindow::closeEvent( QCloseEvent* ce ) 360void MainWindow::closeEvent( QCloseEvent* ce )
361{ 361{
362 362
363 363
364 364
365 if ( ! KOPrefs::instance()->mAskForQuit ) { 365 if ( ! KOPrefs::instance()->mAskForQuit ) {
366 saveOnClose(); 366 saveOnClose();
367 mClosed = true; 367 mClosed = true;
368 ce->accept(); 368 ce->accept();
369 return; 369 return;
370 370
371 } 371 }
372 372
373 switch( QMessageBox::information( this, "KO/Pi", 373 switch( QMessageBox::information( this, "KO/Pi",
374 i18n("Do you really want\nto close KO/Pi?"), 374 i18n("Do you really want\nto close KO/Pi?"),
375 i18n("Close"), i18n("No"), 375 i18n("Close"), i18n("No"),
376 0, 0 ) ) { 376 0, 0 ) ) {
377 case 0: 377 case 0:
378 saveOnClose(); 378 saveOnClose();
379 mClosed = true; 379 mClosed = true;
380 ce->accept(); 380 ce->accept();
381 break; 381 break;
382 case 1: 382 case 1:
383 ce->ignore(); 383 ce->ignore();
384 break; 384 break;
385 case 2: 385 case 2:
386 386
387 default: 387 default:
388 break; 388 break;
389 } 389 }
390 390
391 391
392} 392}
393 393
394void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 394void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
395{ 395{
396 QDataStream stream( data, IO_ReadOnly ); 396 QDataStream stream( data, IO_ReadOnly );
397 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 397 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
398 //QString datamess; 398 //QString datamess;
399 //qDebug("message "); 399 //qDebug("message ");
400 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 400 qDebug("KO: QCOP message received: %s ", cmsg.data() );
401 401
402 if ( cmsg == "setDocument(QString)" ) { 402 if ( cmsg == "setDocument(QString)" ) {
403 QDataStream stream( data, IO_ReadOnly ); 403 QDataStream stream( data, IO_ReadOnly );
404 QString fileName; 404 QString fileName;
405 stream >> fileName; 405 stream >> fileName;
406 //qDebug("filename %s ", fileName.latin1()); 406 //qDebug("filename %s ", fileName.latin1());
407 showMaximized(); 407 showMaximized();
408 raise(); 408 raise();
409 KOPrefs::instance()->mLastSyncedLocalFile = fileName ; 409 KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
410 mSyncManager->slotSyncMenu( 1002 ); 410 mSyncManager->slotSyncMenu( 1002 );
411 return; 411 return;
412 } 412 }
413 413
414 if ( cmsg == "-writeFile" ) { 414 if ( cmsg == "-writeFile" ) {
415 // I made from the "-writeFile" an "-writeAlarm" 415 // I made from the "-writeFile" an "-writeAlarm"
416 mView->viewManager()->showWhatsNextView(); 416 mView->viewManager()->showWhatsNextView();
417 mCalendar->checkAlarmForIncidence( 0, true); 417 mCalendar->checkAlarmForIncidence( 0, true);
418 showMaximized(); 418 showMaximized();
419 raise(); 419 raise();
420 return; 420 return;
421 421
422 } 422 }
423 if ( cmsg == "-writeFileSilent" ) { 423 if ( cmsg == "-writeFileSilent" ) {
424 // I made from the "-writeFile" an "-writeAlarm" 424 // I made from the "-writeFile" an "-writeAlarm"
425 // mView->viewManager()->showWhatsNextView(); 425 // mView->viewManager()->showWhatsNextView();
426 mCalendar->checkAlarmForIncidence( 0, true); 426 mCalendar->checkAlarmForIncidence( 0, true);
427 //showMaximized(); 427 //showMaximized();
428 //raise(); 428 //raise();
429 hide(); 429 hide();
430 return; 430 return;
431 } 431 }
432 if ( cmsg == "-newCountdown" ) { 432 if ( cmsg == "-newCountdown" ) {
433 qDebug("newCountdown "); 433 qDebug("newCountdown ");
434 434
435 } 435 }
436 QString msg ; 436 QString msg ;
437 QString allmsg = cmsg; 437 QString allmsg = cmsg;
438 while ( allmsg.length() > 0 ) { 438 while ( allmsg.length() > 0 ) {
439 int nextC = allmsg.find( "-", 1 ); 439 int nextC = allmsg.find( "-", 1 );
440 if ( nextC == -1 ) { 440 if ( nextC == -1 ) {
441 msg = allmsg; 441 msg = allmsg;
442 allmsg = ""; 442 allmsg = "";
443 } else{ 443 } else{
444 msg = allmsg.left( nextC ); 444 msg = allmsg.left( nextC );
445 allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); 445 allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
446 } 446 }
447 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); 447 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
448 if ( msg == "-newEvent" ) { 448 if ( msg == "-newEvent" ) {
449 mView->newEvent(); 449 mView->newEvent();
450 } 450 }
451 if ( msg == "-newTodo" ) { 451 if ( msg == "-newTodo" ) {
452 mView->newTodo(); 452 mView->newTodo();
453 453
454 } 454 }
455 if ( msg == "-showWN" ) { 455 if ( msg == "-showWN" ) {
456 mView->viewManager()->showWhatsNextView(); 456 mView->viewManager()->showWhatsNextView();
457 } 457 }
458 if ( msg == "-showTodo" ) { 458 if ( msg == "-showTodo" ) {
459 mView->viewManager()->showTodoView(); 459 mView->viewManager()->showTodoView();
460 } 460 }
461 if ( msg == "-showList" ) { 461 if ( msg == "-showList" ) {
462 mView->viewManager()->showListView(); 462 mView->viewManager()->showListView();
463 } 463 }
464 else if ( msg == "-showDay" ) { 464 else if ( msg == "-showDay" ) {
465 mView->viewManager()->showDayView(); 465 mView->viewManager()->showDayView();
466 } 466 }
467 else if ( msg == "-showWWeek" ) { 467 else if ( msg == "-showWWeek" ) {
468 mView->viewManager()->showWorkWeekView(); 468 mView->viewManager()->showWorkWeekView();
469 } 469 }
470 else if ( msg == "-ringSync" ) { 470 else if ( msg == "-ringSync" ) {
471 mSyncManager->multiSync( false ); 471 mSyncManager->multiSync( false );
472 } 472 }
473 else if ( msg == "-showWeek" ) { 473 else if ( msg == "-showWeek" ) {
474 mView->viewManager()->showWeekView(); 474 mView->viewManager()->showWeekView();
475 } 475 }
476 else if ( msg == "-showTodo" ) { 476 else if ( msg == "-showTodo" ) {
477 mView->viewManager()->showTodoView(); 477 mView->viewManager()->showTodoView();
478 } 478 }
479 else if ( msg == "-showJournal" ) { 479 else if ( msg == "-showJournal" ) {
480 mView->dateNavigator()->selectDates( 1 ); 480 mView->dateNavigator()->selectDates( 1 );
481 mView->dateNavigator()->selectToday(); 481 mView->dateNavigator()->selectToday();
482 mView->viewManager()->showJournalView(); 482 mView->viewManager()->showJournalView();
483 } 483 }
484 else if ( msg == "-showKO" ) { 484 else if ( msg == "-showKO" ) {
485 mView->viewManager()->showNextXView(); 485 mView->viewManager()->showNextXView();
486 } 486 }
487 else if ( msg == "-showWNext" || msg == "nextView()" ) { 487 else if ( msg == "-showWNext" || msg == "nextView()" ) {
488 mView->viewManager()->showWhatsNextView(); 488 mView->viewManager()->showWhatsNextView();
489 } 489 }
490 else if ( msg == "-showNextXView" ) { 490 else if ( msg == "-showNextXView" ) {
491 mView->viewManager()->showNextXView(); 491 mView->viewManager()->showNextXView();
492 } 492 }
493 493
494 494
495 } 495 }
496 496
497 showMaximized(); 497 showMaximized();
498 raise(); 498 raise();
499} 499}
500 500
501QPixmap MainWindow::loadPixmap( QString name ) 501QPixmap MainWindow::loadPixmap( QString name )
502{ 502{
503 return SmallIcon( name ); 503 return SmallIcon( name );
504 504
505} 505}
506void MainWindow::initActions() 506void MainWindow::initActions()
507{ 507{
508 //KOPrefs::instance()->mShowFullMenu 508 //KOPrefs::instance()->mShowFullMenu
509 iconToolBar->clear(); 509 iconToolBar->clear();
510 KOPrefs *p = KOPrefs::instance(); 510 KOPrefs *p = KOPrefs::instance();
511 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 511 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
512 512
513 QPopupMenu *viewMenu = new QPopupMenu( this ); 513 QPopupMenu *viewMenu = new QPopupMenu( this );
514 QPopupMenu *actionMenu = new QPopupMenu( this ); 514 QPopupMenu *actionMenu = new QPopupMenu( this );
515 QPopupMenu *importMenu = new QPopupMenu( this ); 515 QPopupMenu *importMenu = new QPopupMenu( this );
516 selectFilterMenu = new QPopupMenu( this ); 516 selectFilterMenu = new QPopupMenu( this );
517 selectFilterMenu->setCheckable( true ); 517 selectFilterMenu->setCheckable( true );
518 syncMenu = new QPopupMenu( this ); 518 syncMenu = new QPopupMenu( this );
519 configureAgendaMenu = new QPopupMenu( this ); 519 configureAgendaMenu = new QPopupMenu( this );
520 configureToolBarMenu = new QPopupMenu( this ); 520 configureToolBarMenu = new QPopupMenu( this );
521 QPopupMenu *helpMenu = new QPopupMenu( this ); 521 QPopupMenu *helpMenu = new QPopupMenu( this );
522 if ( KOPrefs::instance()->mShowFullMenu ) { 522 if ( KOPrefs::instance()->mShowFullMenu ) {
523 QMenuBar *menuBar1; 523 QMenuBar *menuBar1;
524 menuBar1 = menuBar(); 524 menuBar1 = menuBar();
525 menuBar1->insertItem( i18n("File"), importMenu ); 525 menuBar1->insertItem( i18n("File"), importMenu );
526 menuBar1->insertItem( i18n("View"), viewMenu ); 526 menuBar1->insertItem( i18n("View"), viewMenu );
527 menuBar1->insertItem( i18n("Actions"), actionMenu ); 527 menuBar1->insertItem( i18n("Actions"), actionMenu );
528#ifdef DESKTOP_VERSION 528#ifdef DESKTOP_VERSION
529 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 529 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
530 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 530 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
531#else 531#else
532 menuBar1->insertItem( i18n("Sync"), syncMenu ); 532 menuBar1->insertItem( i18n("Sync"), syncMenu );
533 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 533 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
534#endif 534#endif
535 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 535 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
536 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 536 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
537 menuBar1->insertItem( i18n("Help"), helpMenu ); 537 menuBar1->insertItem( i18n("Help"), helpMenu );
538 } else { 538 } else {
539 QPEMenuBar *menuBar1; 539 QPEMenuBar *menuBar1;
540 menuBar1 = new QPEMenuBar( iconToolBar ); 540 menuBar1 = new QPEMenuBar( iconToolBar );
541 QPopupMenu *menuBar = new QPopupMenu( this ); 541 QPopupMenu *menuBar = new QPopupMenu( this );
542 menuBar1->insertItem( i18n("ME"), menuBar); 542 menuBar1->insertItem( i18n("ME"), menuBar);
543 menuBar->insertItem( i18n("File"), importMenu ); 543 menuBar->insertItem( i18n("File"), importMenu );
544 menuBar->insertItem( i18n("View"), viewMenu ); 544 menuBar->insertItem( i18n("View"), viewMenu );
545 menuBar->insertItem( i18n("Actions"), actionMenu ); 545 menuBar->insertItem( i18n("Actions"), actionMenu );
546 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 546 menuBar->insertItem( i18n("Synchronize"), syncMenu );
547 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 547 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
548 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 548 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
549 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 549 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
550 menuBar->insertItem( i18n("Help"), helpMenu ); 550 menuBar->insertItem( i18n("Help"), helpMenu );
551 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 551 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
552 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 552 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
553 } 553 }
554 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 554 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
555 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 555 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
556 QIconSet icon; 556 QIconSet icon;
557 int pixWid = 22, pixHei = 22; 557 int pixWid = 22, pixHei = 22;
558 QString pathString = ""; 558 QString pathString = "";
559 if ( !p->mToolBarMiniIcons ) { 559 if ( !p->mToolBarMiniIcons ) {
560 if ( QApplication::desktop()->width() < 480 ) { 560 if ( QApplication::desktop()->width() < 480 ) {
561 pathString += "icons16/"; 561 pathString += "icons16/";
562 pixWid = 18; pixHei = 16; 562 pixWid = 18; pixHei = 16;
563 } 563 }
564 } else { 564 } else {
565 pathString += "iconsmini/"; 565 pathString += "iconsmini/";
566 pixWid = 18; pixHei = 16; 566 pixWid = 18; pixHei = 16;
567 } 567 }
568 mWeekBgColor = iconToolBar->backgroundColor(); 568 mWeekBgColor = iconToolBar->backgroundColor();
569 mWeekPixmap.resize( pixWid , pixHei ); 569 mWeekPixmap.resize( pixWid , pixHei );
570 mWeekPixmap.fill( mWeekBgColor ); 570 mWeekPixmap.fill( mWeekBgColor );
571 icon = mWeekPixmap; 571 icon = mWeekPixmap;
572 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 572 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
573 mWeekAction->addTo( iconToolBar ); 573 mWeekAction->addTo( iconToolBar );
574 mWeekFont = font(); 574 mWeekFont = font();
575 575
576 int fontPoint = mWeekFont.pointSize(); 576 int fontPoint = mWeekFont.pointSize();
577 QFontMetrics f( mWeekFont ); 577 QFontMetrics f( mWeekFont );
578 int fontWid = f.width( "30" ); 578 int fontWid = f.width( "30" );
579 while ( fontWid > pixWid ) { 579 while ( fontWid > pixWid ) {
580 --fontPoint; 580 --fontPoint;
581 mWeekFont.setPointSize( fontPoint ); 581 mWeekFont.setPointSize( fontPoint );
582 QFontMetrics f( mWeekFont ); 582 QFontMetrics f( mWeekFont );
583 fontWid = f.width( "30" ); 583 fontWid = f.width( "30" );
584 qDebug("dec-- "); 584 qDebug("dec-- ");
585 } 585 }
586 586
587 connect( mWeekAction, SIGNAL( activated() ), 587 connect( mWeekAction, SIGNAL( activated() ),
588 this, SLOT( weekAction() ) ); 588 this, SLOT( weekAction() ) );
589 589
590 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 590 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
591 591
592 //#endif 592 //#endif
593 // ****************** 593 // ******************
594 QAction *action; 594 QAction *action;
595 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 595 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
596 configureToolBarMenu->setCheckable( true ); 596 configureToolBarMenu->setCheckable( true );
597 597
598 598
599 configureAgendaMenu->setCheckable( true ); 599 configureAgendaMenu->setCheckable( true );
600 int iii ; 600 int iii ;
601 for ( iii = 1;iii<= 10 ;++iii ){ 601 for ( iii = 1;iii<= 10 ;++iii ){
602 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 602 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
603 } 603 }
604 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 604 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
605 605
606 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 606 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
607 this, SLOT( showConfigureAgenda( ) ) ); 607 this, SLOT( showConfigureAgenda( ) ) );
608 608
609 icon = loadPixmap( pathString + "configure" ); 609 icon = loadPixmap( pathString + "configure" );
610 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); 610 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this );
611 action->addTo( actionMenu ); 611 action->addTo( actionMenu );
612 connect( action, SIGNAL( activated() ), 612 connect( action, SIGNAL( activated() ),
613 mView, SLOT( edit_options() ) ); 613 mView, SLOT( edit_options() ) );
614 actionMenu->insertSeparator(); 614 actionMenu->insertSeparator();
615 615
616 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 616 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
617 action->addTo( actionMenu ); 617 action->addTo( actionMenu );
618 connect( action, SIGNAL( activated() ), 618 connect( action, SIGNAL( activated() ),
619 mView, SLOT( undo_delete() ) ); 619 mView, SLOT( undo_delete() ) );
620 actionMenu->insertSeparator(); 620 actionMenu->insertSeparator();
621 621
622 icon = loadPixmap( pathString + "newevent" ); 622 icon = loadPixmap( pathString + "newevent" );
623 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 623 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
624 configureToolBarMenu->insertSeparator(); 624 configureToolBarMenu->insertSeparator();
625 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 625 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
626 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 626 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
627 ne_action->addTo( actionMenu ); 627 ne_action->addTo( actionMenu );
628 connect( ne_action, SIGNAL( activated() ), 628 connect( ne_action, SIGNAL( activated() ),
629 mView, SLOT( newEvent() ) ); 629 mView, SLOT( newEvent() ) );
630 icon = loadPixmap( pathString + "newtodo" ); 630 icon = loadPixmap( pathString + "newtodo" );
631 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 631 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
632 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 632 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
633 nt_action->addTo( actionMenu ); 633 nt_action->addTo( actionMenu );
634 connect( nt_action, SIGNAL( activated() ), 634 connect( nt_action, SIGNAL( activated() ),
635 mView, SLOT( newTodo() ) ); 635 mView, SLOT( newTodo() ) );
636 636
637 icon = loadPixmap( pathString + "today" ); 637 icon = loadPixmap( pathString + "today" );
638 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 638 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
639 today_action->addTo( viewMenu ); 639 today_action->addTo( viewMenu );
640 connect( today_action, SIGNAL( activated() ), 640 connect( today_action, SIGNAL( activated() ),
641 mView, SLOT( goToday() ) ); 641 mView, SLOT( goToday() ) );
642 viewMenu->insertSeparator(); 642 viewMenu->insertSeparator();
643 643
644 icon = loadPixmap( pathString + "navi" ); 644 icon = loadPixmap( pathString + "navi" );
645 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 645 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
646 action->addTo( viewMenu ); 646 action->addTo( viewMenu );
647 connect( action, SIGNAL( activated() ), 647 connect( action, SIGNAL( activated() ),
648 mView, SLOT( toggleDateNavigatorWidget() ) ); 648 mView, SLOT( toggleDateNavigatorWidget() ) );
649 mToggleNav = action ; 649 mToggleNav = action ;
650 icon = loadPixmap( pathString + "filter" ); 650 icon = loadPixmap( pathString + "filter" );
651 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); 651 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
652 action->addTo( viewMenu ); 652 action->addTo( viewMenu );
653 connect( action, SIGNAL( activated() ), 653 connect( action, SIGNAL( activated() ),
654 mView, SLOT( toggleFilter() ) ); 654 mView, SLOT( toggleFilter() ) );
655 mToggleFilter = action; 655 mToggleFilter = action;
656 icon = loadPixmap( pathString + "allday" ); 656 icon = loadPixmap( pathString + "allday" );
657 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 657 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
658 action->addTo( viewMenu ); 658 action->addTo( viewMenu );
659 connect( action, SIGNAL( activated() ), 659 connect( action, SIGNAL( activated() ),
660 mView, SLOT( toggleAllDaySize() ) ); 660 mView, SLOT( toggleAllDaySize() ) );
661 mToggleAllday = action; 661 mToggleAllday = action;
662 662
663 663
664 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 664 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
665 mToggleNav, SLOT( setEnabled ( bool ) ) ); 665 mToggleNav, SLOT( setEnabled ( bool ) ) );
666 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 666 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
667 mToggleFilter, SLOT( setEnabled ( bool ) ) ); 667 mToggleFilter, SLOT( setEnabled ( bool ) ) );
668 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 668 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
669 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 669 mToggleAllday, SLOT( setEnabled ( bool ) ) );
670 670
671 viewMenu->insertSeparator(); 671 viewMenu->insertSeparator();
672 icon = loadPixmap( pathString + "picker" ); 672 icon = loadPixmap( pathString + "picker" );
673 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); 673 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
674 action->addTo( viewMenu ); 674 action->addTo( viewMenu );
675 connect( action, SIGNAL( activated() ), 675 connect( action, SIGNAL( activated() ),
676 mView, SLOT( showDatePicker() ) ); 676 mView, SLOT( showDatePicker() ) );
677 action->addTo( iconToolBar ); 677 action->addTo( iconToolBar );
678 viewMenu->insertSeparator(); 678 viewMenu->insertSeparator();
679 icon = loadPixmap( pathString + "list" ); 679 icon = loadPixmap( pathString + "list" );
680 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 680 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
681 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 681 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
682 showlist_action->addTo( viewMenu ); 682 showlist_action->addTo( viewMenu );
683 connect( showlist_action, SIGNAL( activated() ), 683 connect( showlist_action, SIGNAL( activated() ),
684 mView->viewManager(), SLOT( showListView() ) ); 684 mView->viewManager(), SLOT( showListView() ) );
685 685
686 686
687 icon = loadPixmap( pathString + "day" ); 687 icon = loadPixmap( pathString + "day" );
688 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 688 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
689 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 689 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
690 day1_action->addTo( viewMenu ); 690 day1_action->addTo( viewMenu );
691 // action->addTo( toolBar ); 691 // action->addTo( toolBar );
692 connect( day1_action, SIGNAL( activated() ), 692 connect( day1_action, SIGNAL( activated() ),
693 mView->viewManager(), SLOT( showDayView() ) ); 693 mView->viewManager(), SLOT( showDayView() ) );
694 694
695 icon = loadPixmap( pathString + "workweek" ); 695 icon = loadPixmap( pathString + "workweek" );
696 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 696 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
697 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 697 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
698 day5_action->addTo( viewMenu ); 698 day5_action->addTo( viewMenu );
699 connect( day5_action, SIGNAL( activated() ), 699 connect( day5_action, SIGNAL( activated() ),
700 mView->viewManager(), SLOT( showWorkWeekView() ) ); 700 mView->viewManager(), SLOT( showWorkWeekView() ) );
701 701
702 icon = loadPixmap( pathString + "week" ); 702 icon = loadPixmap( pathString + "week" );
703 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 703 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
704 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 704 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
705 day7_action->addTo( viewMenu ); 705 day7_action->addTo( viewMenu );
706 connect( day7_action, SIGNAL( activated() ), 706 connect( day7_action, SIGNAL( activated() ),
707 mView->viewManager(), SLOT( showWeekView() ) ); 707 mView->viewManager(), SLOT( showWeekView() ) );
708 708
709 icon = loadPixmap( pathString + "month" ); 709 icon = loadPixmap( pathString + "month" );
710 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 710 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
711 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 711 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
712 month_action->addTo( viewMenu ); 712 month_action->addTo( viewMenu );
713 connect( month_action, SIGNAL( activated() ), 713 connect( month_action, SIGNAL( activated() ),
714 mView->viewManager(), SLOT( showMonthView() ) ); 714 mView->viewManager(), SLOT( showMonthView() ) );
715 715
716 icon = loadPixmap( pathString + "workweek2" );
717 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
718 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
719 day6_action->addTo( viewMenu );
720 connect( day6_action, SIGNAL( activated() ),
721 mView->viewManager(), SLOT( showMonthViewWeek() ) );
722
716 icon = loadPixmap( pathString + "todo" ); 723 icon = loadPixmap( pathString + "todo" );
717 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 724 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
718 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 725 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
719 todoview_action->addTo( viewMenu ); 726 todoview_action->addTo( viewMenu );
720 connect( todoview_action, SIGNAL( activated() ), 727 connect( todoview_action, SIGNAL( activated() ),
721 mView->viewManager(), SLOT( showTodoView() ) ); 728 mView->viewManager(), SLOT( showTodoView() ) );
722 729
723 icon = loadPixmap( pathString + "journal" ); 730 icon = loadPixmap( pathString + "journal" );
724 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 731 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
725 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 732 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
726 viewjournal_action->addTo( viewMenu ); 733 viewjournal_action->addTo( viewMenu );
727 connect( viewjournal_action, SIGNAL( activated() ), 734 connect( viewjournal_action, SIGNAL( activated() ),
728 mView->viewManager(), SLOT( showJournalView() ) ); 735 mView->viewManager(), SLOT( showJournalView() ) );
729 736
730 icon = loadPixmap( pathString + "xdays" ); 737 icon = loadPixmap( pathString + "xdays" );
731 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); 738 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 );
732 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 739 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
733 xdays_action->addTo( viewMenu ); 740 xdays_action->addTo( viewMenu );
734 connect( xdays_action, SIGNAL( activated() ), 741 connect( xdays_action, SIGNAL( activated() ),
735 mView->viewManager(), SLOT( showNextXView() ) ); 742 mView->viewManager(), SLOT( showNextXView() ) );
736 743
737 icon = loadPixmap( pathString + "whatsnext" ); 744 icon = loadPixmap( pathString + "whatsnext" );
738 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); 745 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 );
739 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 746 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
740 whatsnext_action->addTo( viewMenu ); 747 whatsnext_action->addTo( viewMenu );
741 connect( whatsnext_action, SIGNAL( activated() ), 748 connect( whatsnext_action, SIGNAL( activated() ),
742 mView->viewManager(), SLOT( showWhatsNextView() ) ); 749 mView->viewManager(), SLOT( showWhatsNextView() ) );
743 750
744#if 0 751#if 0
745 action = new QAction( "view_timespan", "Time Span", 0, this ); 752 action = new QAction( "view_timespan", "Time Span", 0, this );
746 action->addTo( viewMenu ); 753 action->addTo( viewMenu );
747 connect( action, SIGNAL( activated() ), 754 connect( action, SIGNAL( activated() ),
748 mView->viewManager(), SLOT( showTimeSpanView() ) ); 755 mView->viewManager(), SLOT( showTimeSpanView() ) );
749#endif 756#endif
750 757
751 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 758 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
752 this ); 759 this );
753 mNewSubTodoAction->addTo( actionMenu ); 760 mNewSubTodoAction->addTo( actionMenu );
754 connect( mNewSubTodoAction, SIGNAL( activated() ), 761 connect( mNewSubTodoAction, SIGNAL( activated() ),
755 mView, SLOT( newSubTodo() ) ); 762 mView, SLOT( newSubTodo() ) );
756 763
757 actionMenu->insertSeparator(); 764 actionMenu->insertSeparator();
758 765
759 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 766 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
760 mShowAction->addTo( actionMenu ); 767 mShowAction->addTo( actionMenu );
761 connect( mShowAction, SIGNAL( activated() ), 768 connect( mShowAction, SIGNAL( activated() ),
762 mView, SLOT( showIncidence() ) ); 769 mView, SLOT( showIncidence() ) );
763 770
764 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 771 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
765 mEditAction->addTo( actionMenu ); 772 mEditAction->addTo( actionMenu );
766 connect( mEditAction, SIGNAL( activated() ), 773 connect( mEditAction, SIGNAL( activated() ),
767 mView, SLOT( editIncidence() ) ); 774 mView, SLOT( editIncidence() ) );
768 775
769 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 776 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
770 mDeleteAction->addTo( actionMenu ); 777 mDeleteAction->addTo( actionMenu );
771 connect( mDeleteAction, SIGNAL( activated() ), 778 connect( mDeleteAction, SIGNAL( activated() ),
772 mView, SLOT( deleteIncidence() ) ); 779 mView, SLOT( deleteIncidence() ) );
773 780
774 781
775 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 782 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
776 mCloneAction->addTo( actionMenu ); 783 mCloneAction->addTo( actionMenu );
777 connect( mCloneAction, SIGNAL( activated() ), 784 connect( mCloneAction, SIGNAL( activated() ),
778 mView, SLOT( cloneIncidence() ) ); 785 mView, SLOT( cloneIncidence() ) );
779 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 786 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
780 mMoveAction->addTo( actionMenu ); 787 mMoveAction->addTo( actionMenu );
781 connect( mMoveAction, SIGNAL( activated() ), 788 connect( mMoveAction, SIGNAL( activated() ),
782 mView, SLOT( moveIncidence() ) ); 789 mView, SLOT( moveIncidence() ) );
783 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 790 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
784 mBeamAction->addTo( actionMenu ); 791 mBeamAction->addTo( actionMenu );
785 connect( mBeamAction, SIGNAL( activated() ), 792 connect( mBeamAction, SIGNAL( activated() ),
786 mView, SLOT( beamIncidence() ) ); 793 mView, SLOT( beamIncidence() ) );
787 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 794 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
788 mCancelAction->addTo( actionMenu ); 795 mCancelAction->addTo( actionMenu );
789 connect( mCancelAction, SIGNAL( activated() ), 796 connect( mCancelAction, SIGNAL( activated() ),
790 mView, SLOT( toggleCancelIncidence() ) ); 797 mView, SLOT( toggleCancelIncidence() ) );
791 798
792 actionMenu->insertSeparator(); 799 actionMenu->insertSeparator();
793 800
794 action = new QAction( "purge_completed", i18n("Purge Completed"), 0, 801 action = new QAction( "purge_completed", i18n("Purge Completed"), 0,
795 this ); 802 this );
796 action->addTo( actionMenu ); 803 action->addTo( actionMenu );
797 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 804 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
798 805
799 icon = loadPixmap( pathString + "search" ); 806 icon = loadPixmap( pathString + "search" );
800 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 807 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
801 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); 808 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4);
802 search_action->addTo( actionMenu ); 809 search_action->addTo( actionMenu );
803 connect( search_action, SIGNAL( activated() ), 810 connect( search_action, SIGNAL( activated() ),
804 mView->dialogManager(), SLOT( showSearchDialog() ) ); 811 mView->dialogManager(), SLOT( showSearchDialog() ) );
805 812
806 813
807 814
808 if ( KOPrefs::instance()->mShowFullMenu ) { 815 if ( KOPrefs::instance()->mShowFullMenu ) {
809 actionMenu->insertSeparator(); 816 actionMenu->insertSeparator();
810 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 817 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
811 818
812 } 819 }
813 // actionMenu->insertSeparator(); 820 // actionMenu->insertSeparator();
814 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 821 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
815 this ); 822 this );
816 action->addTo( importMenu ); 823 action->addTo( importMenu );
817 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 824 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
818 action = new QAction( "import_quick", i18n("Import last file"), 0, 825 action = new QAction( "import_quick", i18n("Import last file"), 0,
819 this ); 826 this );
820 action->addTo( importMenu ); 827 action->addTo( importMenu );
821 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 828 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
822 importMenu->insertSeparator(); 829 importMenu->insertSeparator();
823 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 830 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
824 this ); 831 this );
825 action->addTo( importMenu ); 832 action->addTo( importMenu );
826 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 833 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
827#ifndef DESKTOP_VERSION 834#ifndef DESKTOP_VERSION
828 importMenu->insertSeparator(); 835 importMenu->insertSeparator();
829 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 836 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
830 this ); 837 this );
831 action->addTo( importMenu ); 838 action->addTo( importMenu );
832 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 839 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
833#else 840#else
834#ifdef _OL_IMPORT_ 841#ifdef _OL_IMPORT_
835 importMenu->insertSeparator(); 842 importMenu->insertSeparator();
836 action = new QAction( "import_ol", i18n("Import from OL"), 0, 843 action = new QAction( "import_ol", i18n("Import from OL"), 0,
837 this ); 844 this );
838 action->addTo( importMenu ); 845 action->addTo( importMenu );
839 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 846 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
840#endif 847#endif
841#endif 848#endif
842 849
843 importMenu->insertSeparator(); 850 importMenu->insertSeparator();
844 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 851 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
845 this ); 852 this );
846 action->addTo( importMenu ); 853 action->addTo( importMenu );
847 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 854 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
848 855
849 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, 856 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0,
850 this ); 857 this );
851 action->addTo( importMenu ); 858 action->addTo( importMenu );
852 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 859 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
853 860
854 importMenu->insertSeparator(); 861 importMenu->insertSeparator();
855 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 862 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
856 this ); 863 this );
857 action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 864 action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
858 865
859 866
860 //LR 867 //LR
861 QPopupMenu *ex2phone = new QPopupMenu( this ); 868 QPopupMenu *ex2phone = new QPopupMenu( this );
862 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 869 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
863 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 870 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
864 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 871 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
865 importMenu->insertItem( i18n("Export to phone"), ex2phone ); 872 importMenu->insertItem( i18n("Export to phone"), ex2phone );
866 873
867 importMenu->insertSeparator(); 874 importMenu->insertSeparator();
868 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 875 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
869 this ); 876 this );
870 action->addTo( importMenu ); 877 action->addTo( importMenu );
871 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 878 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
872#ifndef DESKTOP_VERSION 879#ifndef DESKTOP_VERSION
873 importMenu->insertSeparator(); 880 importMenu->insertSeparator();
874 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 881 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0,
875 this ); 882 this );
876 brAction->addTo( importMenu ); 883 brAction->addTo( importMenu );
877 brAction->setToggleAction (true ) ; 884 brAction->setToggleAction (true ) ;
878 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 885 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
879 886
880 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 887 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
881 this ); 888 this );
882 action->addTo( importMenu ); 889 action->addTo( importMenu );
883 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 890 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
884 891
885 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 892 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
886 this ); 893 this );
887 action->addTo( importMenu ); 894 action->addTo( importMenu );
888 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 895 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
889#else 896#else
890 importMenu->insertSeparator(); 897 importMenu->insertSeparator();
891 icon = loadPixmap( pathString + "print" ); 898 icon = loadPixmap( pathString + "print" );
892 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 899 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
893 action->addTo( importMenu ); 900 action->addTo( importMenu );
894 connect( action, SIGNAL( activated() ), 901 connect( action, SIGNAL( activated() ),
895 this, SLOT( printCal() ) ); 902 this, SLOT( printCal() ) );
896 903
897 icon = loadPixmap( pathString + "print" ); 904 icon = loadPixmap( pathString + "print" );
898 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 905 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
899 action->addTo( importMenu ); 906 action->addTo( importMenu );
900 connect( action, SIGNAL( activated() ), 907 connect( action, SIGNAL( activated() ),
901 this, SLOT( printSel() ) ); 908 this, SLOT( printSel() ) );
902 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 909 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
903 action->addTo( importMenu ); 910 action->addTo( importMenu );
904 connect( action, SIGNAL( activated() ), 911 connect( action, SIGNAL( activated() ),
905 mView->viewManager(), SIGNAL( printWNV() ) ); 912 mView->viewManager(), SIGNAL( printWNV() ) );
906#endif 913#endif
907 importMenu->insertSeparator(); 914 importMenu->insertSeparator();
908 action = new QAction( "beam all", i18n("Save"), 0, 915 action = new QAction( "beam all", i18n("Save"), 0,
909 this ); 916 this );
910 action->addTo( importMenu ); 917 action->addTo( importMenu );
911 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 918 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
912 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 919 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
913 this ); 920 this );
914 action->addTo( importMenu ); 921 action->addTo( importMenu );
915 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 922 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
916 923
917 //menuBar->insertItem( "Configure",configureMenu ); 924 //menuBar->insertItem( "Configure",configureMenu );
918 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 925 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
919 icon = loadPixmap( "korganizer/korganizer" ); 926 icon = loadPixmap( "korganizer/korganizer" );
920 927
921 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 928 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
922 action->addTo( helpMenu ); 929 action->addTo( helpMenu );
923 connect( action, SIGNAL( activated() ), 930 connect( action, SIGNAL( activated() ),
924 SLOT( whatsNew() ) ); 931 SLOT( whatsNew() ) );
925 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 932 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
926 action->addTo( helpMenu ); 933 action->addTo( helpMenu );
927 connect( action, SIGNAL( activated() ), 934 connect( action, SIGNAL( activated() ),
928 SLOT( features() ) ); 935 SLOT( features() ) );
929 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 936 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
930 action->addTo( helpMenu ); 937 action->addTo( helpMenu );
931 connect( action, SIGNAL( activated() ), 938 connect( action, SIGNAL( activated() ),
932 SLOT( keyBindings() ) ); 939 SLOT( keyBindings() ) );
933 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 940 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
934 action->addTo( helpMenu ); 941 action->addTo( helpMenu );
935 connect( action, SIGNAL( activated() ), 942 connect( action, SIGNAL( activated() ),
936 SLOT( synchowto() ) ); 943 SLOT( synchowto() ) );
937 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 944 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
938 action->addTo( helpMenu ); 945 action->addTo( helpMenu );
939 connect( action, SIGNAL( activated() ), 946 connect( action, SIGNAL( activated() ),
940 SLOT( kdesynchowto() ) ); 947 SLOT( kdesynchowto() ) );
941 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 948 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
942 action->addTo( helpMenu ); 949 action->addTo( helpMenu );
943 connect( action, SIGNAL( activated() ), 950 connect( action, SIGNAL( activated() ),
944 SLOT( multisynchowto() ) ); 951 SLOT( multisynchowto() ) );
945 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 952 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
946 action->addTo( helpMenu ); 953 action->addTo( helpMenu );
947 connect( action, SIGNAL( activated() ), 954 connect( action, SIGNAL( activated() ),
948 SLOT( aboutAutoSaving() ) ); 955 SLOT( aboutAutoSaving() ) );
949 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 956 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
950 action->addTo( helpMenu ); 957 action->addTo( helpMenu );
951 connect( action, SIGNAL( activated() ), 958 connect( action, SIGNAL( activated() ),
952 SLOT( aboutKnownBugs() ) ); 959 SLOT( aboutKnownBugs() ) );
953 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 960 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
954 action->addTo( helpMenu ); 961 action->addTo( helpMenu );
955 connect( action, SIGNAL( activated() ), 962 connect( action, SIGNAL( activated() ),
956 SLOT( usertrans() ) ); 963 SLOT( usertrans() ) );
957 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 964 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
958 action->addTo( helpMenu ); 965 action->addTo( helpMenu );
959 connect( action, SIGNAL( activated() ), 966 connect( action, SIGNAL( activated() ),
960 SLOT( faq() ) ); 967 SLOT( faq() ) );
961 action = new QAction( "licence", i18n("Licence..."), 0, this ); 968 action = new QAction( "licence", i18n("Licence..."), 0, this );
962 action->addTo( helpMenu ); 969 action->addTo( helpMenu );
963 connect( action, SIGNAL( activated() ), 970 connect( action, SIGNAL( activated() ),
964 SLOT( licence() ) ); 971 SLOT( licence() ) );
965 action = new QAction( "about", i18n("About..."), 0, this ); 972 action = new QAction( "about", i18n("About..."), 0, this );
966 action->addTo( helpMenu ); 973 action->addTo( helpMenu );
967 connect( action, SIGNAL( activated() ), 974 connect( action, SIGNAL( activated() ),
968 SLOT( about() ) ); 975 SLOT( about() ) );
969 //menuBar->insertSeparator(); 976 //menuBar->insertSeparator();
970 977
971 // ****************************************************** 978 // ******************************************************
972 // menubar icons 979 // menubar icons
973 980
974 981
975 iconToolBar->setHorizontalStretchable (true ); 982 iconToolBar->setHorizontalStretchable (true );
976 //menuBar->insertItem( iconToolBar ); 983 //menuBar->insertItem( iconToolBar );
977 //xdays_action 984 //xdays_action
978 if (p-> mShowIconNewEvent) 985 if (p-> mShowIconNewEvent)
979 ne_action->addTo( iconToolBar ); 986 ne_action->addTo( iconToolBar );
980 if (p->mShowIconNewTodo ) 987 if (p->mShowIconNewTodo )
981 nt_action->addTo( iconToolBar ); 988 nt_action->addTo( iconToolBar );
982 if (p-> mShowIconSearch) 989 if (p-> mShowIconSearch)
983 search_action->addTo( iconToolBar ); 990 search_action->addTo( iconToolBar );
984 if (p-> mShowIconNext) 991 if (p-> mShowIconNext)
985 whatsnext_action->addTo( iconToolBar ); 992 whatsnext_action->addTo( iconToolBar );
986 if (p-> mShowIconNextDays) 993 if (p-> mShowIconNextDays)
987 xdays_action->addTo( iconToolBar ); 994 xdays_action->addTo( iconToolBar );
988 if (p-> mShowIconList) 995 if (p-> mShowIconList)
989 showlist_action->addTo( iconToolBar ); 996 showlist_action->addTo( iconToolBar );
990 if (p-> mShowIconDay1) 997 if (p-> mShowIconDay1)
991 day1_action->addTo( iconToolBar ); 998 day1_action->addTo( iconToolBar );
992 if (p-> mShowIconDay5) 999 if (p-> mShowIconDay5)
993 day5_action->addTo( iconToolBar ); 1000 day5_action->addTo( iconToolBar );
994 if (p-> mShowIconDay7) 1001 if (p-> mShowIconDay7)
995 day7_action->addTo( iconToolBar ); 1002 day7_action->addTo( iconToolBar );
996 if (p-> mShowIconMonth) 1003 if (p-> mShowIconMonth)
997 month_action->addTo( iconToolBar ); 1004 month_action->addTo( iconToolBar );
1005 if (p-> mShowIconDay6)
1006 day6_action->addTo( iconToolBar );
998 if (p-> mShowIconTodoview) 1007 if (p-> mShowIconTodoview)
999 todoview_action->addTo( iconToolBar ); 1008 todoview_action->addTo( iconToolBar );
1000 if (p-> mShowIconJournal) 1009 if (p-> mShowIconJournal)
1001 viewjournal_action->addTo( iconToolBar ); 1010 viewjournal_action->addTo( iconToolBar );
1002 icon = loadPixmap( pathString + "2leftarrowB" ); 1011 icon = loadPixmap( pathString + "2leftarrowB" );
1003 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); 1012 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
1004 if (p-> mShowIconBackFast) { 1013 if (p-> mShowIconBackFast) {
1005 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1014 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1006 connect( action, SIGNAL( activated() ), 1015 connect( action, SIGNAL( activated() ),
1007 mView, SLOT( goPreviousMonth() ) ); 1016 mView, SLOT( goPreviousMonth() ) );
1008 action->addTo( iconToolBar ); 1017 action->addTo( iconToolBar );
1009 } 1018 }
1010 icon = loadPixmap( pathString + "1leftarrowB" ); 1019 icon = loadPixmap( pathString + "1leftarrowB" );
1011 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); 1020 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15);
1012 if (p-> mShowIconBack) { 1021 if (p-> mShowIconBack) {
1013 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1022 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1014 connect( action, SIGNAL( activated() ), 1023 connect( action, SIGNAL( activated() ),
1015 mView, SLOT( goPrevious() ) ); 1024 mView, SLOT( goPrevious() ) );
1016 action->addTo( iconToolBar ); 1025 action->addTo( iconToolBar );
1017 } 1026 }
1018 icon = loadPixmap( pathString + "today" ); 1027 icon = loadPixmap( pathString + "today" );
1019 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1028 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1020 if (p-> mShowIconToday) 1029 if (p-> mShowIconToday)
1021 today_action->addTo( iconToolBar ); 1030 today_action->addTo( iconToolBar );
1022 icon = loadPixmap( pathString + "1rightarrowB" ); 1031 icon = loadPixmap( pathString + "1rightarrowB" );
1023 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1032 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1024 if (p-> mShowIconForward) { 1033 if (p-> mShowIconForward) {
1025 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1034 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1026 connect( action, SIGNAL( activated() ), 1035 connect( action, SIGNAL( activated() ),
1027 mView, SLOT( goNext() ) ); 1036 mView, SLOT( goNext() ) );
1028 action->addTo( iconToolBar ); 1037 action->addTo( iconToolBar );
1029 } 1038 }
1030 icon = loadPixmap( pathString + "2rightarrowB" ); 1039 icon = loadPixmap( pathString + "2rightarrowB" );
1031 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1040 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1032 if (p-> mShowIconForwardFast) { 1041 if (p-> mShowIconForwardFast) {
1033 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1042 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1034 connect( action, SIGNAL( activated() ), 1043 connect( action, SIGNAL( activated() ),
1035 mView, SLOT( goNextMonth() ) ); 1044 mView, SLOT( goNextMonth() ) );
1036 action->addTo( iconToolBar ); 1045 action->addTo( iconToolBar );
1037 } 1046 }
1038 1047
1039 1048
1040 configureToolBarMenu->insertItem(i18n("What's This?"), 300); 1049 configureToolBarMenu->insertItem(i18n("What's This?"), 300);
1041 1050
1042 if (p-> mShowIconNewEvent) 1051 if (p-> mShowIconNewEvent)
1043 configureToolBarMenu->setItemChecked( 10, true ); 1052 configureToolBarMenu->setItemChecked( 10, true );
1044 if (p->mShowIconNewTodo ) 1053 if (p->mShowIconNewTodo )
1045 configureToolBarMenu->setItemChecked( 20, true ); 1054 configureToolBarMenu->setItemChecked( 20, true );
1046 if (p-> mShowIconSearch) 1055 if (p-> mShowIconSearch)
1047 configureToolBarMenu->setItemChecked( 120, true ); 1056 configureToolBarMenu->setItemChecked( 120, true );
1048 if (p-> mShowIconList) 1057 if (p-> mShowIconList)
1049 configureToolBarMenu->setItemChecked( 30, true ); 1058 configureToolBarMenu->setItemChecked( 30, true );
1050 if (p-> mShowIconDay1) 1059 if (p-> mShowIconDay1)
1051 configureToolBarMenu->setItemChecked( 40, true ); 1060 configureToolBarMenu->setItemChecked( 40, true );
1052 if (p-> mShowIconDay5) 1061 if (p-> mShowIconDay5)
1053 configureToolBarMenu->setItemChecked( 50, true ); 1062 configureToolBarMenu->setItemChecked( 50, true );
1063 if (p-> mShowIconDay6)
1064 configureToolBarMenu->setItemChecked( 75, true );
1054 if (p-> mShowIconDay7) 1065 if (p-> mShowIconDay7)
1055 configureToolBarMenu->setItemChecked( 60, true ); 1066 configureToolBarMenu->setItemChecked( 60, true );
1056 if (p-> mShowIconMonth) 1067 if (p-> mShowIconMonth)
1057 configureToolBarMenu->setItemChecked( 70, true ); 1068 configureToolBarMenu->setItemChecked( 70, true );
1058 if (p-> mShowIconTodoview) 1069 if (p-> mShowIconTodoview)
1059 configureToolBarMenu->setItemChecked( 80, true ); 1070 configureToolBarMenu->setItemChecked( 80, true );
1060 if (p-> mShowIconBackFast) 1071 if (p-> mShowIconBackFast)
1061 configureToolBarMenu->setItemChecked( 200, true ); 1072 configureToolBarMenu->setItemChecked( 200, true );
1062 if (p-> mShowIconBack) 1073 if (p-> mShowIconBack)
1063 configureToolBarMenu->setItemChecked( 210, true ); 1074 configureToolBarMenu->setItemChecked( 210, true );
1064 if (p-> mShowIconToday) 1075 if (p-> mShowIconToday)
1065 configureToolBarMenu->setItemChecked( 130, true ); 1076 configureToolBarMenu->setItemChecked( 130, true );
1066 if (p-> mShowIconForward) 1077 if (p-> mShowIconForward)
1067 configureToolBarMenu->setItemChecked( 220, true ); 1078 configureToolBarMenu->setItemChecked( 220, true );
1068 if (p-> mShowIconForwardFast) 1079 if (p-> mShowIconForwardFast)
1069 configureToolBarMenu->setItemChecked( 230, true ); 1080 configureToolBarMenu->setItemChecked( 230, true );
1070 if (p-> mShowIconNextDays) 1081 if (p-> mShowIconNextDays)
1071 configureToolBarMenu->setItemChecked( 100, true ); 1082 configureToolBarMenu->setItemChecked( 100, true );
1072 if (p-> mShowIconNext) 1083 if (p-> mShowIconNext)
1073 configureToolBarMenu->setItemChecked( 110, true ); 1084 configureToolBarMenu->setItemChecked( 110, true );
1074 if (p-> mShowIconJournal) 1085 if (p-> mShowIconJournal)
1075 configureToolBarMenu->setItemChecked( 90, true ); 1086 configureToolBarMenu->setItemChecked( 90, true );
1076 if (p-> mShowIconWhatsThis) 1087 if (p-> mShowIconWhatsThis)
1077 configureToolBarMenu->setItemChecked( 300, true ); 1088 configureToolBarMenu->setItemChecked( 300, true );
1078 1089
1079 QLabel* dummy = new QLabel( iconToolBar ); 1090 QLabel* dummy = new QLabel( iconToolBar );
1080 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1091 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1081 if (!p-> mShowIconStretch) 1092 if (!p-> mShowIconStretch)
1082 iconToolBar->setStretchableWidget ( dummy ) ; 1093 iconToolBar->setStretchableWidget ( dummy ) ;
1083 else 1094 else
1084 configureToolBarMenu->setItemChecked( 5, true ); 1095 configureToolBarMenu->setItemChecked( 5, true );
1085 if (p-> mShowIconWhatsThis) 1096 if (p-> mShowIconWhatsThis)
1086 QWhatsThis::whatsThisButton ( iconToolBar ); 1097 QWhatsThis::whatsThisButton ( iconToolBar );
1087 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1098 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1088 configureAgenda( p->mHourSize ); 1099 configureAgenda( p->mHourSize );
1089 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1100 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1090} 1101}
1091 1102
1092void MainWindow::exportToPhone( int mode ) 1103void MainWindow::exportToPhone( int mode )
1093{ 1104{
1094 1105
1095 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1106 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1096 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1107 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1097 KOex2phonePrefs ex2phone; 1108 KOex2phonePrefs ex2phone;
1098 1109
1099 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1110 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1100 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1111 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1101 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1112 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1102 if ( mode == 1 ) 1113 if ( mode == 1 )
1103 ex2phone.setCaption(i18n("Export complete calendar")); 1114 ex2phone.setCaption(i18n("Export complete calendar"));
1104 if ( mode == 2 ) 1115 if ( mode == 2 )
1105 ex2phone.setCaption(i18n("Export filtered calendar")); 1116 ex2phone.setCaption(i18n("Export filtered calendar"));
1106 1117
1107 if ( !ex2phone.exec() ) { 1118 if ( !ex2phone.exec() ) {
1108 return; 1119 return;
1109 } 1120 }
1110 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1121 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1111 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1122 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1112 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1123 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1113 1124
1114 int inFuture = 0; 1125 int inFuture = 0;
1115 if ( ex2phone.mWriteBackFuture->isChecked() ) 1126 if ( ex2phone.mWriteBackFuture->isChecked() )
1116 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1127 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1117 QPtrList<Incidence> delSel; 1128 QPtrList<Incidence> delSel;
1118 if ( mode == 1 ) 1129 if ( mode == 1 )
1119 delSel = mCalendar->rawIncidences(); 1130 delSel = mCalendar->rawIncidences();
1120 if ( mode == 2 ) 1131 if ( mode == 2 )
1121 delSel = mCalendar->incidences(); 1132 delSel = mCalendar->incidences();
1122 CalendarLocal* cal = new CalendarLocal(); 1133 CalendarLocal* cal = new CalendarLocal();
1123 cal->setLocalTime(); 1134 cal->setLocalTime();
1124 Incidence *incidence = delSel.first(); 1135 Incidence *incidence = delSel.first();
1125 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1136 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1126 QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); 1137 QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
1127 while ( incidence ) { 1138 while ( incidence ) {
1128 if ( incidence->type() != "Journal" ) { 1139 if ( incidence->type() != "Journal" ) {
1129 bool add = true; 1140 bool add = true;
1130 if ( inFuture ) { 1141 if ( inFuture ) {
1131 QDateTime dt; 1142 QDateTime dt;
1132 if ( incidence->type() == "Todo" ) { 1143 if ( incidence->type() == "Todo" ) {
1133 Todo * t = (Todo*)incidence; 1144 Todo * t = (Todo*)incidence;
1134 if ( t->hasDueDate() ) 1145 if ( t->hasDueDate() )
1135 dt = t->dtDue(); 1146 dt = t->dtDue();
1136 else 1147 else
1137 dt = cur.addSecs( 62 ); 1148 dt = cur.addSecs( 62 );
1138 } 1149 }
1139 else { 1150 else {
1140 bool ok; 1151 bool ok;
1141 dt = incidence->getNextOccurence( cur, &ok ); 1152 dt = incidence->getNextOccurence( cur, &ok );
1142 if ( !ok ) 1153 if ( !ok )
1143 dt = cur.addSecs( -62 ); 1154 dt = cur.addSecs( -62 );
1144 } 1155 }
1145 if ( dt < cur || dt > end ) { 1156 if ( dt < cur || dt > end ) {
1146 add = false; 1157 add = false;
1147 } 1158 }
1148 } 1159 }
1149 if ( add ) { 1160 if ( add ) {
1150 Incidence *in = incidence->clone(); 1161 Incidence *in = incidence->clone();
1151 cal->addIncidence( in ); 1162 cal->addIncidence( in );
1152 } 1163 }
1153 } 1164 }
1154 incidence = delSel.next(); 1165 incidence = delSel.next();
1155 } 1166 }
1156 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 1167 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
1157 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 1168 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
1158 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1169 KPimGlobalPrefs::instance()->mEx2PhoneModel );
1159 1170
1160 setCaption( i18n("Writing to phone...")); 1171 setCaption( i18n("Writing to phone..."));
1161 if ( PhoneFormat::writeToPhone( cal ) ) 1172 if ( PhoneFormat::writeToPhone( cal ) )
1162 setCaption( i18n("Export to phone successful!")); 1173 setCaption( i18n("Export to phone successful!"));
1163 else 1174 else
1164 setCaption( i18n("Error exporting to phone!")); 1175 setCaption( i18n("Error exporting to phone!"));
1165 delete cal; 1176 delete cal;
1166} 1177}
1167 1178
1168 1179
1169void MainWindow::setDefaultPreferences() 1180void MainWindow::setDefaultPreferences()
1170{ 1181{
1171 KOPrefs *p = KOPrefs::instance(); 1182 KOPrefs *p = KOPrefs::instance();
1172 1183
1173 p->mCompactDialogs = true; 1184 p->mCompactDialogs = true;
1174 p->mConfirm = true; 1185 p->mConfirm = true;
1175 // p->mEnableQuickTodo = false; 1186 // p->mEnableQuickTodo = false;
1176 1187
1177} 1188}
1178 1189
1179QString MainWindow::resourcePath() 1190QString MainWindow::resourcePath()
1180{ 1191{
1181 return KGlobal::iconLoader()->iconPath(); 1192 return KGlobal::iconLoader()->iconPath();
1182} 1193}
1183 1194
1184void MainWindow::displayText( QString text ,QString cap ) 1195void MainWindow::displayText( QString text ,QString cap )
1185{ 1196{
1186 QDialog dia( this, "name", true ); ; 1197 QDialog dia( this, "name", true ); ;
1187 dia.setCaption( cap ); 1198 dia.setCaption( cap );
1188 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1199 QVBoxLayout* lay = new QVBoxLayout( &dia );
1189 lay->setSpacing( 3 ); 1200 lay->setSpacing( 3 );
1190 lay->setMargin( 3 ); 1201 lay->setMargin( 3 );
1191 QTextBrowser tb ( &dia ); 1202 QTextBrowser tb ( &dia );
1192 lay->addWidget( &tb ); 1203 lay->addWidget( &tb );
1193 tb.setText( text ); 1204 tb.setText( text );
1194#ifdef DESKTOP_VERSION 1205#ifdef DESKTOP_VERSION
1195 dia.resize( 640, 480); 1206 dia.resize( 640, 480);
1196#else 1207#else
1197 dia.showMaximized(); 1208 dia.showMaximized();
1198#endif 1209#endif
1199 dia.exec(); 1210 dia.exec();
1200} 1211}
1201 1212
1202void MainWindow::features() 1213void MainWindow::features()
1203{ 1214{
1204 1215
1205 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); 1216 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" );
1206} 1217}
1207 1218
1208void MainWindow::usertrans() 1219void MainWindow::usertrans()
1209{ 1220{
1210 1221
1211 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); 1222 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" );
1212} 1223}
1213 1224
1214void MainWindow::kdesynchowto() 1225void MainWindow::kdesynchowto()
1215{ 1226{
1216 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 1227 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
1217} 1228}
1218void MainWindow::multisynchowto() 1229void MainWindow::multisynchowto()
1219{ 1230{
1220 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 1231 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
1221} 1232}
1222void MainWindow::synchowto() 1233void MainWindow::synchowto()
1223{ 1234{
1224 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1235 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1225} 1236}
1226void MainWindow::faq() 1237void MainWindow::faq()
1227{ 1238{
1228 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); 1239 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
1229 1240
1230} 1241}
1231void MainWindow::whatsNew() 1242void MainWindow::whatsNew()
1232{ 1243{
1233 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1244 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1234 1245
1235} 1246}
1236void MainWindow::licence() 1247void MainWindow::licence()
1237{ 1248{
1238 KApplication::showLicence(); 1249 KApplication::showLicence();
1239 1250
1240} 1251}
1241void MainWindow::about() 1252void MainWindow::about()
1242{ 1253{
1243 QString version; 1254 QString version;
1244#include <../version> 1255#include <../version>
1245 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1256 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1246 i18n("KOrganizer/Platform-independent\n") + 1257 i18n("KOrganizer/Platform-independent\n") +
1247 "(KO/Pi) " + version + " - " + 1258 "(KO/Pi) " + version + " - " +
1248 1259
1249#ifdef DESKTOP_VERSION 1260#ifdef DESKTOP_VERSION
1250 i18n("Desktop Edition\n") + 1261 i18n("Desktop Edition\n") +
1251#else 1262#else
1252 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + 1263 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1253#endif 1264#endif
1254 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); 1265 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1255} 1266}
1256void MainWindow::keyBindings() 1267void MainWindow::keyBindings()
1257{ 1268{
1258 QString cap = i18n("KO/Pi Keys + Colors"); 1269 QString cap = i18n("KO/Pi Keys + Colors");
1259 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1270 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1260 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1271 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1261 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1272 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1262 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1273 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1263 i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ 1274 i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+
1264 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1275 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1265 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1276 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1266 i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ 1277 i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+
1267 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1278 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1268 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1279 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1269 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1280 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1270 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1281 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1271 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1282 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1272 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ 1283 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+
1273 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1284 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1274 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1285 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1275 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1286 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1276 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1287 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1277 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1288 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1278 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1289 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1279 i18n("<p><h3>In agenda view:</h3></p>\n") + 1290 i18n("<p><h3>In agenda view:</h3></p>\n") +
1280 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1291 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1281 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1292 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1282 i18n("<p><h3>In todo view:</h3></p>\n") + 1293 i18n("<p><h3>In todo view:</h3></p>\n") +
1283 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ 1294 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+
1284 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ 1295 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+
1285 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ 1296 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+
1286 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ 1297 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+
1287 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1298 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1288 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ 1299 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+
1289 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ 1300 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+
1290 i18n("<p><h3>In list view:</h3></p>\n") + 1301 i18n("<p><h3>In list view:</h3></p>\n") +
1291 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1302 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1292 i18n("<p><b>return</b>: Select item+one step down</p>\n")+ 1303 i18n("<p><b>return</b>: Select item+one step down</p>\n")+
1293 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ 1304 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+
1294 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ 1305 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+
1295 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ 1306 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+
1296 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ 1307 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+
1297 i18n("<p><h3>In event/todo viewer:</h3></p>\n") + 1308 i18n("<p><h3>In event/todo viewer:</h3></p>\n") +
1298 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ 1309 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
1299 i18n("<p><b>A</b>: Show agenda view.</p>\n")+ 1310 i18n("<p><b>A</b>: Show agenda view.</p>\n")+
1300 i18n("<p><b>E</b>: Edit item</p>\n") + 1311 i18n("<p><b>E</b>: Edit item</p>\n") +
1301 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + 1312 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
1302 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + 1313 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
1303 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ 1314 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
1304 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ 1315 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
1305 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ 1316 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
1306 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ 1317 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
1307 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ 1318 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
1308 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + 1319 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
1309 i18n("<p><b>White</b>: Item readonly</p>\n"); 1320 i18n("<p><b>White</b>: Item readonly</p>\n");
1310 displayText( text, cap); 1321 displayText( text, cap);
1311} 1322}
1312void MainWindow::aboutAutoSaving() 1323void MainWindow::aboutAutoSaving()
1313{ 1324{
1314 QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); 1325 QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n");
1315 1326
1316 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); 1327 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text);
1317 1328
1318} 1329}
1319void MainWindow::aboutKnownBugs() 1330void MainWindow::aboutKnownBugs()
1320{ 1331{
1321 QMessageBox* msg; 1332 QMessageBox* msg;
1322 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), 1333 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
1323 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ 1334 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+
1324 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ 1335 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
1325 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + 1336 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") +
1326 i18n("\nor report them in the bugtracker on\n") + 1337 i18n("\nor report them in the bugtracker on\n") +
1327 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), 1338 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
1328 QMessageBox::NoIcon, 1339 QMessageBox::NoIcon,
1329 QMessageBox::Ok, 1340 QMessageBox::Ok,
1330 QMessageBox::NoButton, 1341 QMessageBox::NoButton,
1331 QMessageBox::NoButton); 1342 QMessageBox::NoButton);
1332 msg->exec(); 1343 msg->exec();
1333 delete msg; 1344 delete msg;
1334 1345
1335} 1346}
1336 1347
1337QString MainWindow::defaultFileName() 1348QString MainWindow::defaultFileName()
1338{ 1349{
1339 return locateLocal( "data", "korganizer/mycalendar.ics" ); 1350 return locateLocal( "data", "korganizer/mycalendar.ics" );
1340} 1351}
1341QString MainWindow::syncFileName() 1352QString MainWindow::syncFileName()
1342{ 1353{
1343#ifdef DESKTOP_VERSION 1354#ifdef DESKTOP_VERSION
1344 return locateLocal( "tmp", "synccalendar.ics" ); 1355 return locateLocal( "tmp", "synccalendar.ics" );
1345#else 1356#else
1346 return QString( "/tmp/synccalendar.ics" ); 1357 return QString( "/tmp/synccalendar.ics" );
1347#endif 1358#endif
1348} 1359}
1349void MainWindow::updateWeek(QDate seda) 1360void MainWindow::updateWeek(QDate seda)
1350{ 1361{
1351 int weekNum = 0; 1362 int weekNum = 0;
1352 QDate d = QDate ( seda.year(), 1,1); 1363 QDate d = QDate ( seda.year(), 1,1);
1353 seda = seda.addDays( 1-seda.dayOfWeek() );//we are on monday 1364 seda = seda.addDays( 1-seda.dayOfWeek() );//we are on monday
1354 if ( seda.addDays(6).year() != seda.year() ) { 1365 if ( seda.addDays(6).year() != seda.year() ) {
1355 if ( seda.year() != d.year() ) { 1366 if ( seda.year() != d.year() ) {
1356 if ( d.dayOfWeek() > 4 ) 1367 if ( d.dayOfWeek() > 4 )
1357 d = QDate ( seda.year(), 1,1); 1368 d = QDate ( seda.year(), 1,1);
1358 else 1369 else
1359 weekNum = 1; 1370 weekNum = 1;
1360 } else { 1371 } else {
1361 QDate dd( seda.year()+1, 1,1); 1372 QDate dd( seda.year()+1, 1,1);
1362 if ( dd.dayOfWeek() <= 4 ) 1373 if ( dd.dayOfWeek() <= 4 )
1363 weekNum = 1; 1374 weekNum = 1;
1364 } 1375 }
1365 } 1376 }
1366 if ( weekNum == 0 ){ 1377 if ( weekNum == 0 ){
1367 int dow = d.dayOfWeek(); 1378 int dow = d.dayOfWeek();
1368 if ( dow <= 4 ) 1379 if ( dow <= 4 )
1369 d = d.addDays( 1-dow ); 1380 d = d.addDays( 1-dow );
1370 else // 5,6,7 1381 else // 5,6,7
1371 d = d.addDays( 8-dow ); 1382 d = d.addDays( 8-dow );
1372 // we have the first week of the year.we are on monday 1383 // we have the first week of the year.we are on monday
1373 weekNum = d.daysTo( seda ) / 7 +1; 1384 weekNum = d.daysTo( seda ) / 7 +1;
1374 } 1385 }
1375 1386
1376 mWeekPixmap.fill( mWeekBgColor ); 1387 mWeekPixmap.fill( mWeekBgColor );
1377 QPainter p ( &mWeekPixmap ); 1388 QPainter p ( &mWeekPixmap );
1378 p.setFont( mWeekFont ); 1389 p.setFont( mWeekFont );
1379 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); 1390 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) );
1380 p.end(); 1391 p.end();
1381 QIconSet icon3 ( mWeekPixmap ); 1392 QIconSet icon3 ( mWeekPixmap );
1382 mWeekAction->setIconSet ( icon3 ); 1393 mWeekAction->setIconSet ( icon3 );
1383 1394
1384} 1395}
1385void MainWindow::updateWeekNum(const DateList &selectedDates) 1396void MainWindow::updateWeekNum(const DateList &selectedDates)
1386{ 1397{
1387 updateWeek( selectedDates.first() ); 1398 updateWeek( selectedDates.first() );
1388} 1399}
1389void MainWindow::processIncidenceSelection( Incidence *incidence ) 1400void MainWindow::processIncidenceSelection( Incidence *incidence )
1390{ 1401{
1391 1402
1392 if ( !incidence ) { 1403 if ( !incidence ) {
1393 enableIncidenceActions( false ); 1404 enableIncidenceActions( false );
1394 1405
1395 mNewSubTodoAction->setEnabled( false ); 1406 mNewSubTodoAction->setEnabled( false );
1396 setCaptionToDates(); 1407 setCaptionToDates();
1397 return; 1408 return;
1398 1409
1399 } 1410 }
1400 1411
1401 //KGlobal::locale()->formatDateTime(nextA, true); 1412 //KGlobal::locale()->formatDateTime(nextA, true);
1402 QString startString = ""; 1413 QString startString = "";
1403 if ( incidence->type() != "Todo" ) { 1414 if ( incidence->type() != "Todo" ) {
1404 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { 1415 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
1405 if ( incidence->doesFloat() ) { 1416 if ( incidence->doesFloat() ) {
1406 startString += ": "+incidence->dtStartDateStr( true ); 1417 startString += ": "+incidence->dtStartDateStr( true );
1407 startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); 1418 startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
1408 1419
1409 } else { 1420 } else {
1410 startString = ": "+incidence->dtStartStr(true); 1421 startString = ": "+incidence->dtStartStr(true);
1411 startString += " --- "+((Event*)incidence)->dtEndStr(true); 1422 startString += " --- "+((Event*)incidence)->dtEndStr(true);
1412 1423
1413 } 1424 }
1414 1425
1415 } else { 1426 } else {
1416 if ( incidence->dtStart().time() != incidence->dtEnd().time() ) 1427 if ( incidence->dtStart().time() != incidence->dtEnd().time() )
1417 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ 1428 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
1418 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1429 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1419 if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { 1430 if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) {
1420 bool ok; 1431 bool ok;
1421 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1432 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
1422 if ( ok ) { 1433 if ( ok ) {
1423 int years = noc.date().year() - incidence->dtStart().date().year(); 1434 int years = noc.date().year() - incidence->dtStart().date().year();
1424 startString += i18n(" (%1 y.)"). arg( years ); 1435 startString += i18n(" (%1 y.)"). arg( years );
1425 } 1436 }
1426 } 1437 }
1427 else 1438 else
1428 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1439 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1429 } 1440 }
1430 1441
1431 } 1442 }
1432 else 1443 else
1433 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1444 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1434 if ( !incidence->location().isEmpty() ) 1445 if ( !incidence->location().isEmpty() )
1435 startString += " (" +incidence->location()+")"; 1446 startString += " (" +incidence->location()+")";
1436 setCaption( incidence->summary()+startString); 1447 setCaption( incidence->summary()+startString);
1437 1448
1438 enableIncidenceActions( true ); 1449 enableIncidenceActions( true );
1439 1450
1440 if ( incidence->type() == "Event" ) { 1451 if ( incidence->type() == "Event" ) {
1441 mShowAction->setText( i18n("Show Event...") ); 1452 mShowAction->setText( i18n("Show Event...") );
1442 mEditAction->setText( i18n("Edit Event...") ); 1453 mEditAction->setText( i18n("Edit Event...") );
1443 mDeleteAction->setText( i18n("Delete Event...") ); 1454 mDeleteAction->setText( i18n("Delete Event...") );
1444 1455
1445 mNewSubTodoAction->setEnabled( false ); 1456 mNewSubTodoAction->setEnabled( false );
1446 } else if ( incidence->type() == "Todo" ) { 1457 } else if ( incidence->type() == "Todo" ) {
1447 mShowAction->setText( i18n("Show Todo...") ); 1458 mShowAction->setText( i18n("Show Todo...") );
1448 mEditAction->setText( i18n("Edit Todo...") ); 1459 mEditAction->setText( i18n("Edit Todo...") );
1449 mDeleteAction->setText( i18n("Delete Todo...") ); 1460 mDeleteAction->setText( i18n("Delete Todo...") );
1450 1461
1451 mNewSubTodoAction->setEnabled( true ); 1462 mNewSubTodoAction->setEnabled( true );
1452 } else { 1463 } else {
1453 mShowAction->setText( i18n("Show...") ); 1464 mShowAction->setText( i18n("Show...") );
1454 mShowAction->setText( i18n("Edit...") ); 1465 mShowAction->setText( i18n("Edit...") );
1455 mShowAction->setText( i18n("Delete...") ); 1466 mShowAction->setText( i18n("Delete...") );
1456 1467
1457 mNewSubTodoAction->setEnabled( false ); 1468 mNewSubTodoAction->setEnabled( false );
1458 } 1469 }
1459} 1470}
1460 1471
1461void MainWindow::enableIncidenceActions( bool enabled ) 1472void MainWindow::enableIncidenceActions( bool enabled )
1462{ 1473{
1463 mShowAction->setEnabled( enabled ); 1474 mShowAction->setEnabled( enabled );
1464 mEditAction->setEnabled( enabled ); 1475 mEditAction->setEnabled( enabled );
1465 mDeleteAction->setEnabled( enabled ); 1476 mDeleteAction->setEnabled( enabled );
1466 1477
1467 mCloneAction->setEnabled( enabled ); 1478 mCloneAction->setEnabled( enabled );
1468 mMoveAction->setEnabled( enabled ); 1479 mMoveAction->setEnabled( enabled );
1469 mBeamAction->setEnabled( enabled ); 1480 mBeamAction->setEnabled( enabled );
1470 mCancelAction->setEnabled( enabled ); 1481 mCancelAction->setEnabled( enabled );
1471} 1482}
1472 1483
1473void MainWindow::importOL() 1484void MainWindow::importOL()
1474{ 1485{
1475#ifdef _OL_IMPORT_ 1486#ifdef _OL_IMPORT_
1476 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); 1487 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );
1477 id->exec(); 1488 id->exec();
1478 delete id; 1489 delete id;
1479 mView->updateView(); 1490 mView->updateView();
1480#endif 1491#endif
1481} 1492}
1482void MainWindow::importBday() 1493void MainWindow::importBday()
1483{ 1494{
1484 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1495 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1485 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), 1496 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"),
1486 i18n("Import!"), i18n("Cancel"), 0, 1497 i18n("Import!"), i18n("Cancel"), 0,
1487 0, 1 ); 1498 0, 1 );
1488 if ( result == 0 ) { 1499 if ( result == 0 ) {
1489 mView->importBday(); 1500 mView->importBday();
1490 1501
1491 } 1502 }
1492 1503
1493 1504
1494} 1505}
1495void MainWindow::importQtopia() 1506void MainWindow::importQtopia()
1496{ 1507{
1497#ifndef DESKTOP_VERSION 1508#ifndef DESKTOP_VERSION
1498 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1509 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1499 i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"), 1510 i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"),
1500 i18n("Import!"), i18n("Cancel"), 0, 1511 i18n("Import!"), i18n("Cancel"), 0,
1501 0, 1 ); 1512 0, 1 );
1502 if ( result == 0 ) { 1513 if ( result == 0 ) {
1503 QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); 1514 QString datebook = Global::applicationFileName( "datebook", "datebook.xml");
1504 QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); 1515 QString todolist = Global::applicationFileName( "todolist", "todolist.xml");
1505 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; 1516 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml";
1506 mView->importQtopia( categories, datebook, todolist ); 1517 mView->importQtopia( categories, datebook, todolist );
1507 } 1518 }
1508#else 1519#else
1509 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1520 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1510 i18n("Not supported \non desktop!\n"), 1521 i18n("Not supported \non desktop!\n"),
1511 i18n("Ok"), i18n("Cancel"), 0, 1522 i18n("Ok"), i18n("Cancel"), 0,
1512 0, 1 ); 1523 0, 1 );
1513 1524
1514#endif 1525#endif
1515} 1526}
1516 1527
1517void MainWindow::saveOnClose() 1528void MainWindow::saveOnClose()
1518{ 1529{
1519 KOPrefs *p = KOPrefs::instance(); 1530 KOPrefs *p = KOPrefs::instance();
1520 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); 1531 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal );
1521 p->mToolBarUp = iconToolBar->x() > width()/2 || 1532 p->mToolBarUp = iconToolBar->x() > width()/2 ||
1522 iconToolBar->y() > height()/2; 1533 iconToolBar->y() > height()/2;
1523 mView->writeSettings(); 1534 mView->writeSettings();
1524 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) 1535 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
1525 save(); 1536 save();
1526} 1537}
1527void MainWindow::slotModifiedChanged( bool changed ) 1538void MainWindow::slotModifiedChanged( bool changed )
1528{ 1539{
1529 if ( mBlockAtStartup ) 1540 if ( mBlockAtStartup )
1530 return; 1541 return;
1531 1542
1532 int msec; 1543 int msec;
1533 // we store the changes after 1 minute, 1544 // we store the changes after 1 minute,
1534 // and for safety reasons after 10 minutes again 1545 // and for safety reasons after 10 minutes again
1535 if ( !mSyncManager->blockSave() ) 1546 if ( !mSyncManager->blockSave() )
1536 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 1547 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
1537 else 1548 else
1538 msec = 1000 * 600; 1549 msec = 1000 * 600;
1539 mSaveTimer.start( msec, true ); // 1 minute 1550 mSaveTimer.start( msec, true ); // 1 minute
1540 qDebug("KO: Saving File in %d secs!", msec/1000); 1551 qDebug("KO: Saving File in %d secs!", msec/1000);
1541 mCalendarModifiedFlag = true; 1552 mCalendarModifiedFlag = true;
1542} 1553}
1543void MainWindow::saveStopTimer() 1554void MainWindow::saveStopTimer()
1544{ 1555{
1545 mSaveTimer.stop(); 1556 mSaveTimer.stop();
1546 if (mSaveTimer.isActive() ) 1557 if (mSaveTimer.isActive() )
1547 qDebug("ti active "); 1558 qDebug("ti active ");
1548 else 1559 else
1549 qDebug("KO: Save timer stopped"); 1560 qDebug("KO: Save timer stopped");
1550} 1561}
1551void MainWindow::save() 1562void MainWindow::save()
1552{ 1563{
1553 if ( !mCalendarModifiedFlag ) { 1564 if ( !mCalendarModifiedFlag ) {
1554 qDebug("KO: Calendar not modified. Nothing saved."); 1565 qDebug("KO: Calendar not modified. Nothing saved.");
1555 return; 1566 return;
1556 } 1567 }
1557 if ( mSyncManager->blockSave() ) 1568 if ( mSyncManager->blockSave() )
1558 return; 1569 return;
1559 mSyncManager->setBlockSave(true); 1570 mSyncManager->setBlockSave(true);
1560 if ( mView->checkFileVersion( defaultFileName()) ) { 1571 if ( mView->checkFileVersion( defaultFileName()) ) {
1561 QTime neededSaveTime = QDateTime::currentDateTime().time(); 1572 QTime neededSaveTime = QDateTime::currentDateTime().time();
1562 setCaption(i18n("KO/Pi:Saving Data to File ..." )); 1573 setCaption(i18n("KO/Pi:Saving Data to File ..." ));
1563 qDebug("KO: Start saving data to file!"); 1574 qDebug("KO: Start saving data to file!");
1564 mView->saveCalendar( defaultFileName() ); 1575 mView->saveCalendar( defaultFileName() );
1565 mCalendarModifiedFlag = false; 1576 mCalendarModifiedFlag = false;
1566 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 1577 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
1567 qDebug("KO: Needed %d ms for saving.",msNeeded ); 1578 qDebug("KO: Needed %d ms for saving.",msNeeded );
1568 QString savemes; 1579 QString savemes;
1569 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); 1580 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
1570 setCaption(savemes); 1581 setCaption(savemes);
1571 } else 1582 } else
1572 setCaption(i18n("Saving cancelled!")); 1583 setCaption(i18n("Saving cancelled!"));
1573 mSyncManager->setBlockSave( false ); 1584 mSyncManager->setBlockSave( false );
1574} 1585}
1575 1586
1576void MainWindow::keyReleaseEvent ( QKeyEvent * e) 1587void MainWindow::keyReleaseEvent ( QKeyEvent * e)
1577{ 1588{
1578 if ( !e->isAutoRepeat() ) { 1589 if ( !e->isAutoRepeat() ) {
1579 mFlagKeyPressed = false; 1590 mFlagKeyPressed = false;
1580 } 1591 }
1581} 1592}
1582void MainWindow::keyPressEvent ( QKeyEvent * e ) 1593void MainWindow::keyPressEvent ( QKeyEvent * e )
1583{ 1594{
1584 qApp->processEvents(); 1595 qApp->processEvents();
1585 if ( e->isAutoRepeat() && !mFlagKeyPressed ) { 1596 if ( e->isAutoRepeat() && !mFlagKeyPressed ) {
1586 e->ignore(); 1597 e->ignore();
1587 // qDebug(" ignore %d",e->isAutoRepeat() ); 1598 // qDebug(" ignore %d",e->isAutoRepeat() );
1588 return; 1599 return;
1589 } 1600 }
1590 if (! e->isAutoRepeat() ) 1601 if (! e->isAutoRepeat() )
1591 mFlagKeyPressed = true; 1602 mFlagKeyPressed = true;
1592 KOPrefs *p = KOPrefs::instance(); 1603 KOPrefs *p = KOPrefs::instance();
1593 bool showSelectedDates = false; 1604 bool showSelectedDates = false;
1594 int size; 1605 int size;
1595 int pro = 0; 1606 int pro = 0;
1596 //qDebug("MainWindow::keyPressEvent "); 1607 //qDebug("MainWindow::keyPressEvent ");
1597 switch ( e->key() ) { 1608 switch ( e->key() ) {
1598 case Qt::Key_Right: 1609 case Qt::Key_Right:
1599 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 1610 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
1600 mView->goNextMonth(); 1611 mView->goNextMonth();
1601 else 1612 else
1602 mView->goNext(); 1613 mView->goNext();
1603 showSelectedDates = true; 1614 showSelectedDates = true;
1604 break; 1615 break;
1605 case Qt::Key_Left: 1616 case Qt::Key_Left:
1606 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1617 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1607 mView->goPreviousMonth(); 1618 mView->goPreviousMonth();
1608 else 1619 else
1609 mView->goPrevious(); 1620 mView->goPrevious();
1610 showSelectedDates = true; 1621 showSelectedDates = true;
1611 break; 1622 break;
1612 case Qt::Key_Down: 1623 case Qt::Key_Down:
1613 mView->viewManager()->agendaView()->scrollOneHourDown(); 1624 mView->viewManager()->agendaView()->scrollOneHourDown();
1614 break; 1625 break;
1615 case Qt::Key_Up: 1626 case Qt::Key_Up:
1616 mView->viewManager()->agendaView()->scrollOneHourUp(); 1627 mView->viewManager()->agendaView()->scrollOneHourUp();
1617 break; 1628 break;
1618 case Qt::Key_I: 1629 case Qt::Key_I:
1619 mView->showIncidence(); 1630 mView->showIncidence();
1620 break; 1631 break;
1621 case Qt::Key_Delete: 1632 case Qt::Key_Delete:
1622 case Qt::Key_Backspace: 1633 case Qt::Key_Backspace:
1623 mView->deleteIncidence(); 1634 mView->deleteIncidence();
1624 break; 1635 break;
1625 case Qt::Key_D: 1636 case Qt::Key_D:
1626 mView->viewManager()->showDayView(); 1637 mView->viewManager()->showDayView();
1627 showSelectedDates = true; 1638 showSelectedDates = true;
1628 break; 1639 break;
1629 case Qt::Key_O: 1640 case Qt::Key_O:
1630 mView->toggleFilerEnabled( ); 1641 mView->toggleFilerEnabled( );
1631 break; 1642 break;
1632 case Qt::Key_0: 1643 case Qt::Key_0:
1633 case Qt::Key_1: 1644 case Qt::Key_1:
1634 case Qt::Key_2: 1645 case Qt::Key_2:
1635 case Qt::Key_3: 1646 case Qt::Key_3:
1636 case Qt::Key_4: 1647 case Qt::Key_4:
1637 case Qt::Key_5: 1648 case Qt::Key_5:
1638 case Qt::Key_6: 1649 case Qt::Key_6:
1639 case Qt::Key_7: 1650 case Qt::Key_7:
1640 case Qt::Key_8: 1651 case Qt::Key_8:
1641 case Qt::Key_9: 1652 case Qt::Key_9:
1642 pro = e->key()-48; 1653 pro = e->key()-48;
1643 if ( pro == 0 ) 1654 if ( pro == 0 )
1644 pro = 10; 1655 pro = 10;
1645 if ( e->state() == Qt::ControlButton) 1656 if ( e->state() == Qt::ControlButton)
1646 pro += 10; 1657 pro += 10;
1647 break; 1658 break;
1648 case Qt::Key_M: 1659 case Qt::Key_M:
1649 mView->viewManager()->showMonthView(); 1660 mView->viewManager()->showMonthView();
1650 showSelectedDates = true; 1661 showSelectedDates = true;
1651 break; 1662 break;
1652 case Qt::Key_Insert: 1663 case Qt::Key_Insert:
1653 mView->newEvent(); 1664 mView->newEvent();
1654 break; 1665 break;
1655 case Qt::Key_S : 1666 case Qt::Key_S :
1656 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 1667 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
1657 mView->newSubTodo(); 1668 mView->newSubTodo();
1658 else 1669 else
1659 mView->dialogManager()->showSearchDialog(); 1670 mView->dialogManager()->showSearchDialog();
1660 break; 1671 break;
1661 case Qt::Key_Y : 1672 case Qt::Key_Y :
1662 case Qt::Key_Z : 1673 case Qt::Key_Z :
1663 mView->viewManager()->showWorkWeekView(); 1674 mView->viewManager()->showWorkWeekView();
1664 showSelectedDates = true; 1675 showSelectedDates = true;
1665 break; 1676 break;
1666 case Qt::Key_U : 1677 case Qt::Key_U :
1667 mView->viewManager()->showWeekView(); 1678 mView->viewManager()->showWeekView();
1668 showSelectedDates = true; 1679 showSelectedDates = true;
1669 break; 1680 break;
1670 case Qt::Key_H : 1681 case Qt::Key_H :
1671 keyBindings(); 1682 keyBindings();
1672 break; 1683 break;
1673 case Qt::Key_W: 1684 case Qt::Key_W:
1674 mView->viewManager()->showWhatsNextView(); 1685 mView->viewManager()->showWhatsNextView();
1675 break; 1686 break;
1676 case Qt::Key_L: 1687 case Qt::Key_L:
1677 mView->viewManager()->showListView(); 1688 mView->viewManager()->showListView();
1678 break; 1689 break;
1679 case Qt::Key_N: 1690 case Qt::Key_N:
1680 mView->viewManager()->showNextXView(); 1691 mView->viewManager()->showNextXView();
1681 showSelectedDates = true; 1692 showSelectedDates = true;
1682 break; 1693 break;
1683 case Qt::Key_V: 1694 case Qt::Key_V:
1684 mView->viewManager()->showTodoView(); 1695 mView->viewManager()->showTodoView();
1685 break; 1696 break;
1686 case Qt::Key_C: 1697 case Qt::Key_C:
1687 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); 1698 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
1688 break; 1699 break;
1689 case Qt::Key_P: 1700 case Qt::Key_P:
1690 mView->showDatePicker( ); 1701 mView->showDatePicker( );
1691 break; 1702 break;
1692 case Qt::Key_F: 1703 case Qt::Key_F:
1693 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1704 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1694 mView->editFilters(); 1705 mView->editFilters();
1695 else 1706 else
1696 mView->toggleFilter(); 1707 mView->toggleFilter();
1697 break; 1708 break;
1698 case Qt::Key_X: 1709 case Qt::Key_X:
1699 mView->toggleDateNavigatorWidget(); 1710 mView->toggleDateNavigatorWidget();
1700 break; 1711 break;
1701 case Qt::Key_Space: 1712 case Qt::Key_Space:
1702 mView->toggleExpand(); 1713 mView->toggleExpand();
1703 break; 1714 break;
1704 case Qt::Key_A: 1715 case Qt::Key_A:
1705 mView->toggleAllDaySize(); 1716 mView->toggleAllDaySize();
1706 break; 1717 break;
1707 case Qt::Key_T: 1718 case Qt::Key_T:
1708 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1719 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1709 mView->newTodo(); 1720 mView->newTodo();
1710 else { 1721 else {
1711 mView->goToday(); 1722 mView->goToday();
1712 showSelectedDates = true; 1723 showSelectedDates = true;
1713 } 1724 }
1714 break; 1725 break;
1715 case Qt::Key_J: 1726 case Qt::Key_J:
1716 mView->viewManager()->showJournalView(); 1727 mView->viewManager()->showJournalView();
1717 break; 1728 break;
1718 case Qt::Key_B: 1729 case Qt::Key_B:
1719 mView->editIncidenceDescription();; 1730 mView->editIncidenceDescription();;
1720 break; 1731 break;
1721 // case Qt::Key_Return: 1732 // case Qt::Key_Return:
1722 case Qt::Key_E: 1733 case Qt::Key_E:
1723 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1734 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1724 mView->newEvent(); 1735 mView->newEvent();
1725 else 1736 else
1726 mView->editIncidence(); 1737 mView->editIncidence();
1727 break; 1738 break;
1728 case Qt::Key_Plus: 1739 case Qt::Key_Plus:
1729 size = p->mHourSize +2; 1740 size = p->mHourSize +2;
1730 if ( size <= 22 ) 1741 if ( size <= 22 )
1731 configureAgenda( size ); 1742 configureAgenda( size );
1732 break; 1743 break;
1733 case Qt::Key_Minus: 1744 case Qt::Key_Minus:
1734 size = p->mHourSize - 2; 1745 size = p->mHourSize - 2;
1735 if ( size >= 4 ) 1746 if ( size >= 4 )
1736 configureAgenda( size ); 1747 configureAgenda( size );
1737 break; 1748 break;
1738 1749
1739 1750
1740 default: 1751 default:
1741 e->ignore(); 1752 e->ignore();
1742 } 1753 }
1743 if ( pro > 0 ) { 1754 if ( pro > 0 ) {
1744 mView->selectFilter( pro-1 ); 1755 mView->selectFilter( pro-1 );
1745 } 1756 }
1746 if ( showSelectedDates ) { 1757 if ( showSelectedDates ) {
1747 ;// setCaptionToDates(); 1758 ;// setCaptionToDates();
1748 } 1759 }
1749 1760
1750} 1761}
1751 1762
1752void MainWindow::fillFilterMenu() 1763void MainWindow::fillFilterMenu()
1753{ 1764{
1754 selectFilterMenu->clear(); 1765 selectFilterMenu->clear();
1755 bool disable = false; 1766 bool disable = false;
1756 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); 1767 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 );
1757 selectFilterMenu->insertSeparator(); 1768 selectFilterMenu->insertSeparator();
1758 if ( mView->filterView()->filtersEnabled() ) { 1769 if ( mView->filterView()->filtersEnabled() ) {
1759 selectFilterMenu->insertItem(i18n ( "Turn filter off" ), 1 ); 1770 selectFilterMenu->insertItem(i18n ( "Turn filter off" ), 1 );
1760 } 1771 }
1761 else { 1772 else {
1762 selectFilterMenu->insertItem(i18n ( "Turn filter on" ), 1 ); 1773 selectFilterMenu->insertItem(i18n ( "Turn filter on" ), 1 );
1763 disable = true; 1774 disable = true;
1764 } 1775 }
1765 selectFilterMenu->insertSeparator(); 1776 selectFilterMenu->insertSeparator();
1766 QPtrList<CalFilter> fili = mView->filters(); 1777 QPtrList<CalFilter> fili = mView->filters();
1767 CalFilter *curfilter = mView->filterView()->selectedFilter(); 1778 CalFilter *curfilter = mView->filterView()->selectedFilter();
1768 CalFilter *filter = fili.first(); 1779 CalFilter *filter = fili.first();
1769 int iii = 2; 1780 int iii = 2;
1770 while(filter) { 1781 while(filter) {
1771 selectFilterMenu->insertItem( filter->name(), iii ); 1782 selectFilterMenu->insertItem( filter->name(), iii );
1772 if ( filter == curfilter) 1783 if ( filter == curfilter)
1773 selectFilterMenu->setItemChecked( iii, true ); 1784 selectFilterMenu->setItemChecked( iii, true );
1774 if ( disable ) 1785 if ( disable )
1775 selectFilterMenu->setItemEnabled( iii, false ); 1786 selectFilterMenu->setItemEnabled( iii, false );
1776 filter = fili.next(); 1787 filter = fili.next();
1777 ++iii; 1788 ++iii;
1778 } 1789 }
1779} 1790}
1780void MainWindow::selectFilter( int fil ) 1791void MainWindow::selectFilter( int fil )
1781{ 1792{
1782 if ( fil == 0 ) { 1793 if ( fil == 0 ) {
1783 mView->editFilters( ); 1794 mView->editFilters( );
1784 } else if ( fil == 1 ){ 1795 } else if ( fil == 1 ){
1785 mView->toggleFilerEnabled( ); 1796 mView->toggleFilerEnabled( );
1786 } else { 1797 } else {
1787 mView->selectFilter( fil-2 ); 1798 mView->selectFilter( fil-2 );
1788 } 1799 }
1789} 1800}
1790void MainWindow::configureToolBar( int item ) 1801void MainWindow::configureToolBar( int item )
1791{ 1802{
1792 1803
1793 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); 1804 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) );
1794 KOPrefs *p = KOPrefs::instance(); 1805 KOPrefs *p = KOPrefs::instance();
1795 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); 1806 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 );
1796 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); 1807 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
1797 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); 1808 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
1798 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); 1809 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
1799 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 1810 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
1800 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 1811 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
1801 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); 1812 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
1813 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 );
1802 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); 1814 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
1803 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); 1815 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
1804 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); 1816 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
1805 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); 1817 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
1806 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); 1818 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
1807 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); 1819 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
1808 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); 1820 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
1809 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 1821 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
1810 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 1822 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
1811 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 1823 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
1812 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 1824 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
1813 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 1825 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
1814 // initActions(); 1826 // initActions();
1815} 1827}
1816 1828
1817void MainWindow::setCaptionToDates() 1829void MainWindow::setCaptionToDates()
1818{ 1830{
1819 QString selDates; 1831 QString selDates;
1820 selDates = KGlobal::locale()->formatDate(mView->startDate(), true); 1832 selDates = KGlobal::locale()->formatDate(mView->startDate(), true);
1821 if (mView->startDate() < mView->endDate() ) 1833 if (mView->startDate() < mView->endDate() )
1822 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); 1834 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
1823 else { 1835 else {
1824 QString addString; 1836 QString addString;
1825 if ( mView->startDate() == QDateTime::currentDateTime().date() ) 1837 if ( mView->startDate() == QDateTime::currentDateTime().date() )
1826 addString = i18n("Today"); 1838 addString = i18n("Today");
1827 else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) ) 1839 else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) )
1828 addString = i18n("Tomorrow"); 1840 addString = i18n("Tomorrow");
1829 if ( !addString.isEmpty() ) 1841 if ( !addString.isEmpty() )
1830 selDates = addString+", "+selDates ; 1842 selDates = addString+", "+selDates ;
1831 } 1843 }
1832 setCaption( i18n("Dates: ") + selDates ); 1844 setCaption( i18n("Dates: ") + selDates );
1833 1845
1834} 1846}
1835void MainWindow::showConfigureAgenda( ) 1847void MainWindow::showConfigureAgenda( )
1836{ 1848{
1837 int iii; 1849 int iii;
1838 for ( iii = 1;iii<= 10 ;++iii ){ 1850 for ( iii = 1;iii<= 10 ;++iii ){
1839 configureAgendaMenu->setItemChecked( (iii+1)*2, false ); 1851 configureAgendaMenu->setItemChecked( (iii+1)*2, false );
1840 } 1852 }
1841 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); 1853 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true );
1842} 1854}
1843void MainWindow::configureAgenda( int item ) 1855void MainWindow::configureAgenda( int item )
1844{ 1856{
1845 if ( KOPrefs::instance()->mHourSize == item ) 1857 if ( KOPrefs::instance()->mHourSize == item )
1846 return; 1858 return;
1847 KOPrefs::instance()->mHourSize=item; 1859 KOPrefs::instance()->mHourSize=item;
1848 mView->viewManager()->agendaView()->updateConfig(); 1860 mView->viewManager()->agendaView()->updateConfig();
1849} 1861}
1850 1862
1851void MainWindow::saveCalendar() 1863void MainWindow::saveCalendar()
1852{ 1864{
1853 QString fn = KOPrefs::instance()->mLastSaveFile; 1865 QString fn = KOPrefs::instance()->mLastSaveFile;
1854 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); 1866 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this );
1855 1867
1856 if ( fn == "" ) 1868 if ( fn == "" )
1857 return; 1869 return;
1858 QFileInfo info; 1870 QFileInfo info;
1859 info.setFile( fn ); 1871 info.setFile( fn );
1860 QString mes; 1872 QString mes;
1861 bool createbup = true; 1873 bool createbup = true;
1862 if ( info. exists() ) { 1874 if ( info. exists() ) {
1863 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; 1875 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ;
1864 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 1876 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
1865 i18n("Overwrite!"), i18n("Cancel"), 0, 1877 i18n("Overwrite!"), i18n("Cancel"), 0,
1866 0, 1 ); 1878 0, 1 );
1867 if ( result != 0 ) { 1879 if ( result != 0 ) {
1868 createbup = false; 1880 createbup = false;
1869 } 1881 }
1870 } 1882 }
1871 if ( createbup ) { 1883 if ( createbup ) {
1872 mView->saveCalendar( fn ); 1884 mView->saveCalendar( fn );
1873 mes = i18n("KO/Pi:Saved %1").arg(fn); 1885 mes = i18n("KO/Pi:Saved %1").arg(fn);
1874 KOPrefs::instance()->mLastSaveFile = fn; 1886 KOPrefs::instance()->mLastSaveFile = fn;
1875 setCaption(mes); 1887 setCaption(mes);
1876 } 1888 }
1877} 1889}
1878void MainWindow::loadCalendar() 1890void MainWindow::loadCalendar()
1879{ 1891{
1880 1892
1881 QString fn = KOPrefs::instance()->mLastLoadFile; 1893 QString fn = KOPrefs::instance()->mLastLoadFile;
1882 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); 1894 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
1883 1895
1884 if ( fn == "" ) 1896 if ( fn == "" )
1885 return; 1897 return;
1886 QFileInfo info; 1898 QFileInfo info;
1887 info.setFile( fn ); 1899 info.setFile( fn );
1888 QString mess; 1900 QString mess;
1889 bool loadbup = true; 1901 bool loadbup = true;
1890 if ( info. exists() ) { 1902 if ( info. exists() ) {
1891 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 1903 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
1892 int result = QMessageBox::warning( this, "KO/Pi: Warning!", 1904 int result = QMessageBox::warning( this, "KO/Pi: Warning!",
1893 mess, 1905 mess,
1894 i18n("Load!"), i18n("Cancel"), 0, 1906 i18n("Load!"), i18n("Cancel"), 0,
1895 0, 1 ); 1907 0, 1 );
1896 if ( result != 0 ) { 1908 if ( result != 0 ) {
1897 loadbup = false; 1909 loadbup = false;
1898 } 1910 }
1899 } else { 1911 } else {
1900 QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1912 QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1901 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, 1913 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0,
1902 0, 1 ); 1914 0, 1 );
1903 1915
1904 return; 1916 return;
1905 } 1917 }
1906 if ( loadbup ) { 1918 if ( loadbup ) {
1907 mView->openCalendar( fn ); 1919 mView->openCalendar( fn );
1908 KOPrefs::instance()->mLastLoadFile = fn; 1920 KOPrefs::instance()->mLastLoadFile = fn;
1909 mess = i18n("KO/Pi:Loaded %1").arg(fn) ; 1921 mess = i18n("KO/Pi:Loaded %1").arg(fn) ;
1910 setCaption(mess); 1922 setCaption(mess);
1911 } 1923 }
1912 1924
1913} 1925}
1914void MainWindow::quickImportIcal() 1926void MainWindow::quickImportIcal()
1915{ 1927{
1916 importFile( KOPrefs::instance()->mLastImportFile, false ); 1928 importFile( KOPrefs::instance()->mLastImportFile, false );
1917} 1929}
1918void MainWindow::importFile( QString fn, bool quick ) 1930void MainWindow::importFile( QString fn, bool quick )
1919{ 1931{
1920 QFileInfo info; 1932 QFileInfo info;
1921 info.setFile( fn ); 1933 info.setFile( fn );
1922 QString mess; 1934 QString mess;
1923 bool loadbup = true; 1935 bool loadbup = true;
1924 if ( !info. exists() ) { 1936 if ( !info. exists() ) {
1925 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); 1937 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30));
1926 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1938 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1927 mess ); 1939 mess );
1928 return; 1940 return;
1929 } 1941 }
1930 int result = 0; 1942 int result = 0;
1931 if ( !quick ) { 1943 if ( !quick ) {
1932 mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 1944 mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
1933 result = QMessageBox::warning( this, "KO/Pi: Warning!", 1945 result = QMessageBox::warning( this, "KO/Pi: Warning!",
1934 mess, 1946 mess,
1935 "Import", "Cancel", 0, 1947 "Import", "Cancel", 0,
1936 0, 1 ); 1948 0, 1 );
1937 } 1949 }
1938 if ( result == 0 ) { 1950 if ( result == 0 ) {
1939 if ( mView->openCalendar( fn, true )) { 1951 if ( mView->openCalendar( fn, true )) {
1940 KOPrefs::instance()->mLastImportFile = fn; 1952 KOPrefs::instance()->mLastImportFile = fn;
1941 setCaption(i18n("Imported file successfully")); 1953 setCaption(i18n("Imported file successfully"));
1942 } else { 1954 } else {
1943 setCaption(i18n("Error importing file")); 1955 setCaption(i18n("Error importing file"));
1944 } 1956 }
1945 } 1957 }
1946} 1958}
1947 1959
1948void MainWindow::importIcal() 1960void MainWindow::importIcal()
1949{ 1961{
1950 1962
1951 QString fn =KOPrefs::instance()->mLastImportFile; 1963 QString fn =KOPrefs::instance()->mLastImportFile;
1952 1964
1953 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); 1965 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this );
1954 if ( fn == "" ) 1966 if ( fn == "" )
1955 return; 1967 return;
1956 importFile( fn, true ); 1968 importFile( fn, true );
1957 1969
1958} 1970}
1959 1971
1960void MainWindow::exportVCalendar() 1972void MainWindow::exportVCalendar()
1961{ 1973{
1962 QString fn = KOPrefs::instance()->mLastVcalFile; 1974 QString fn = KOPrefs::instance()->mLastVcalFile;
1963 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); 1975 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this );
1964 if ( fn == "" ) 1976 if ( fn == "" )
1965 return; 1977 return;
1966 QFileInfo info; 1978 QFileInfo info;
1967 info.setFile( fn ); 1979 info.setFile( fn );
1968 QString mes; 1980 QString mes;
1969 bool createbup = true; 1981 bool createbup = true;
1970 if ( info. exists() ) { 1982 if ( info. exists() ) {
1971 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); 1983 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
1972 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 1984 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
1973 i18n("Overwrite!"), i18n("Cancel"), 0, 1985 i18n("Overwrite!"), i18n("Cancel"), 0,
1974 0, 1 ); 1986 0, 1 );
1975 if ( result != 0 ) { 1987 if ( result != 0 ) {
1976 createbup = false; 1988 createbup = false;
1977 } 1989 }
1978 } 1990 }
1979 if ( createbup ) { 1991 if ( createbup ) {
1980 if ( mView->exportVCalendar( fn ) ) { 1992 if ( mView->exportVCalendar( fn ) ) {
1981 KOPrefs::instance()->mLastVcalFile = fn; 1993 KOPrefs::instance()->mLastVcalFile = fn;
1982 if ( fn.length() > 20 ) 1994 if ( fn.length() > 20 )
1983 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; 1995 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ;
1984 else 1996 else
1985 mes = i18n("KO/Pi:Exported to %1").arg(fn ); 1997 mes = i18n("KO/Pi:Exported to %1").arg(fn );
1986 setCaption(mes); 1998 setCaption(mes);
1987 } 1999 }
1988 } 2000 }
1989 2001
1990} 2002}
1991QString MainWindow::sentSyncFile() 2003QString MainWindow::sentSyncFile()
1992{ 2004{
1993#ifdef DESKTOP_VERSION 2005#ifdef DESKTOP_VERSION
1994 return locateLocal( "tmp", "copysynccal.ics" ); 2006 return locateLocal( "tmp", "copysynccal.ics" );
1995#else 2007#else
1996 return QString( "/tmp/copysynccal.ics" ); 2008 return QString( "/tmp/copysynccal.ics" );
1997#endif 2009#endif
1998} 2010}
1999 2011
2000void MainWindow::syncFileRequest() 2012void MainWindow::syncFileRequest()
2001{ 2013{
2002 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2014 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2003 mSyncManager->slotSyncMenu( 999 ); 2015 mSyncManager->slotSyncMenu( 999 );
2004 } 2016 }
2005 2017
2006 setCaption(i18n("Saving Data to temp file ..." )); 2018 setCaption(i18n("Saving Data to temp file ..." ));
2007 mView->saveCalendar( sentSyncFile() ); 2019 mView->saveCalendar( sentSyncFile() );
2008 setCaption(i18n("Data saved to temp file!" )); 2020 setCaption(i18n("Data saved to temp file!" ));
2009 2021
2010} 2022}
2011void MainWindow::getFile( bool success ) 2023void MainWindow::getFile( bool success )
2012{ 2024{
2013 if ( ! success ) { 2025 if ( ! success ) {
2014 setCaption( i18n("Error receiving file. Nothing changed!") ); 2026 setCaption( i18n("Error receiving file. Nothing changed!") );
2015 return; 2027 return;
2016 } 2028 }
2017 mView->openCalendar( sentSyncFile() ); 2029 mView->openCalendar( sentSyncFile() );
2018 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2030 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2019 mSyncManager->slotSyncMenu( 999 ); 2031 mSyncManager->slotSyncMenu( 999 );
2020 } 2032 }
2021 setCaption( i18n("Pi-Sync successful!") ); 2033 setCaption( i18n("Pi-Sync successful!") );
2022} 2034}
2023 2035
2024void MainWindow::printSel( ) 2036void MainWindow::printSel( )
2025{ 2037{
2026 mView->viewManager()->agendaView()->agenda()->printSelection(); 2038 mView->viewManager()->agendaView()->agenda()->printSelection();
2027} 2039}
2028 2040
2029void MainWindow::printCal() 2041void MainWindow::printCal()
2030{ 2042{
2031 mView->print();//mCp->showDialog(); 2043 mView->print();//mCp->showDialog();
2032} 2044}
2033 2045
2034 2046
2035#include "libkdepim/kdatepicker.h" 2047#include "libkdepim/kdatepicker.h"
2036#include <kdatetbl.h> 2048#include <kdatetbl.h>
2037void MainWindow::weekAction() 2049void MainWindow::weekAction()
2038{ 2050{
2039 int month; 2051 int month;
2040 KPopupFrame* popup = new KPopupFrame(this); 2052 KPopupFrame* popup = new KPopupFrame(this);
2041 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); 2053 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup);
2042 // ----- 2054 // -----
2043 picker->resize(picker->sizeHint()); 2055 picker->resize(picker->sizeHint());
2044 popup->setMainWidget(picker); 2056 popup->setMainWidget(picker);
2045 picker->setFocus(); 2057 picker->setFocus();
2046 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2058 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2047 int x = 0; 2059 int x = 0;
2048 int y = iconToolBar->height(); 2060 int y = iconToolBar->height();
2049 int dX = 0; 2061 int dX = 0;
2050 int dY = 0; 2062 int dY = 0;
2051 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2063 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2052 if ( iconToolBar->y() > height()/2 ) { 2064 if ( iconToolBar->y() > height()/2 ) {
2053 dY = picker->sizeHint().height()+8; 2065 dY = picker->sizeHint().height()+8;
2054 y = 0; 2066 y = 0;
2055 } 2067 }
2056 } else { 2068 } else {
2057 if ( iconToolBar->x() > width()/2 ) { // right side 2069 if ( iconToolBar->x() > width()/2 ) { // right side
2058 x=0; 2070 x=0;
2059 dX= picker->sizeHint().width()+8; 2071 dX= picker->sizeHint().width()+8;
2060 y = 0; 2072 y = 0;
2061 } else { 2073 } else {
2062 x= iconToolBar->width(); 2074 x= iconToolBar->width();
2063 y = 0; 2075 y = 0;
2064 } 2076 }
2065 } 2077 }
2066 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2078 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2067 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) 2079 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2068 { 2080 {
2069 month = picker->getResult(); 2081 month = picker->getResult();
2070 emit selectWeek ( month ); 2082 emit selectWeek ( month );
2071 //qDebug("weekSelected %d ", month); 2083 //qDebug("weekSelected %d ", month);
2072 } 2084 }
2073 delete popup; 2085 delete popup;
2074} 2086}
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index b591232..934e153 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -1,200 +1,222 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 3
4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qstring.h> 25#include <qstring.h>
26#include <qtooltip.h> 26#include <qtooltip.h>
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qframe.h> 29#include <qframe.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qpopupmenu.h> 31#include <qpopupmenu.h>
32#include <qapplication.h> 32#include <qapplication.h>
33 33
34#include <kdebug.h> 34#include <kdebug.h>
35#include <klocale.h> 35#include <klocale.h>
36#include <kglobal.h> 36#include <kglobal.h>
37#include <kiconloader.h> 37#include <kiconloader.h>
38#include "libkdepim/kdatepicker.h" 38#include "libkdepim/kdatepicker.h"
39#include <knotifyclient.h> 39#include <knotifyclient.h>
40#include "kdatetbl.h" 40#include "kdatetbl.h"
41 41
42#include "koglobals.h" 42#include "koglobals.h"
43#include <kglobalsettings.h> 43#include <kglobalsettings.h>
44#include "koprefs.h" 44#include "koprefs.h"
45#ifndef KORG_NOPLUGINS 45#ifndef KORG_NOPLUGINS
46#include "kocore.h" 46#include "kocore.h"
47#endif 47#endif
48 48
49#include <kcalendarsystem.h> 49#include <kcalendarsystem.h>
50 50
51#include "navigatorbar.h" 51#include "navigatorbar.h"
52 52
53NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name ) 53NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name )
54 : QWidget( parent, name ) 54 : QWidget( parent, name )
55{ 55{
56 QBoxLayout *topLayout = new QHBoxLayout( this ); 56 QBoxLayout *topLayout = new QHBoxLayout( this );
57 57
58 // Set up the control buttons and date label 58 // Set up the control buttons and date label
59 mCtrlFrame = new QFrame( this ); 59 mCtrlFrame = new QFrame( this );
60 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); 60 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised);
61 mCtrlFrame->setLineWidth(1); 61 mCtrlFrame->setLineWidth(1);
62 62
63 topLayout->addWidget( mCtrlFrame ); 63 topLayout->addWidget( mCtrlFrame );
64 64
65 QFont tfont = font(); 65 QFont tfont = font();
66 if ( QApplication::desktop()->width() >= 480 ) 66 if ( QApplication::desktop()->width() >= 480 )
67 tfont.setPointSize(tfont.pointSize()+2); 67 tfont.setPointSize(tfont.pointSize()+2);
68 tfont.setBold(true); 68 tfont.setBold(true);
69 69
70 bool isRTL = KOGlobals::self()->reverseLayout(); 70 bool isRTL = KOGlobals::self()->reverseLayout();
71#ifndef DESKTOP_VERSION 71#ifndef DESKTOP_VERSION
72 bool isDesktop = false; 72 bool isDesktop = false;
73#else 73#else
74 bool isDesktop = true; 74 bool isDesktop = true;
75#endif 75#endif
76 if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 ) 76 if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 )
77 isDesktop = true; 77 isDesktop = true;
78 // Create backward navigation buttons 78 // Create backward navigation buttons
79 mPrevYear = new QPushButton( mCtrlFrame ); 79 mPrevYear = new QPushButton( mCtrlFrame );
80 mPrevYear->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow" ) ); 80 mPrevYear->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow" ) );
81 QToolTip::add( mPrevYear, i18n("Previous Year") ); 81 QToolTip::add( mPrevYear, i18n("Previous Year") );
82 82
83 mPrevMonth = new QPushButton( mCtrlFrame ); 83 mPrevMonth = new QPushButton( mCtrlFrame );
84 mPrevMonth->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") ); 84 mPrevMonth->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") );
85 QToolTip::add( mPrevMonth, i18n("Previous Month") ); 85 QToolTip::add( mPrevMonth, i18n("Previous Month") );
86 86
87 // Create forward navigation buttons 87 // Create forward navigation buttons
88 mNextMonth = new QPushButton( mCtrlFrame ); 88 mNextMonth = new QPushButton( mCtrlFrame );
89 mNextMonth->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") ); 89 mNextMonth->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") );
90 QToolTip::add( mNextMonth, i18n("Next Month") ); 90 QToolTip::add( mNextMonth, i18n("Next Month") );
91 91
92 mPrevWeek = new QPushButton( mCtrlFrame );
93 mPrevWeek->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") );
94 QToolTip::add( mPrevWeek, i18n("Previous Week") );
95
96 // Create forward navigation buttons
97 mNextWeek = new QPushButton( mCtrlFrame );
98 mNextWeek->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") );
99 QToolTip::add( mNextWeek, i18n("Next Week") );
100
92 mNextYear = new QPushButton( mCtrlFrame ); 101 mNextYear = new QPushButton( mCtrlFrame );
93 mNextYear->setPixmap( SmallIcon( isDesktop ? "2rightarrowB": "2rightarrow") ); 102 mNextYear->setPixmap( SmallIcon( isDesktop ? "2rightarrowB": "2rightarrow") );
94 QToolTip::add( mNextYear, i18n("Next Year") ); 103 QToolTip::add( mNextYear, i18n("Next Year") );
95 mSelectMonth = new QPushButton( mCtrlFrame ); 104 mSelectMonth = new QPushButton( mCtrlFrame );
96 // Create month name label 105 // Create month name label
97 //selectMonth->setFont( tfont ); 106 //selectMonth->setFont( tfont );
98 // selectMonth->setAlignment( AlignCenter ); 107 // selectMonth->setAlignment( AlignCenter );
99 //mDateLabel = new QLabel( selectMonth ); 108 //mDateLabel = new QLabel( selectMonth );
100 //mDateLabel->setFont( tfont ); 109 //mDateLabel->setFont( tfont );
101 //mDateLabel->setAlignment( AlignCenter ); 110 //mDateLabel->setAlignment( AlignCenter );
102 if ( QString ( name ) == QString("useBigPixmaps") ) { 111 if ( QString ( name ) == QString("useBigPixmaps") ) {
103 mNextMonth->setFlat( true); 112 mNextMonth->setFlat( true);
113 mNextWeek->setFlat( true);
104 mNextYear->setFlat( true); 114 mNextYear->setFlat( true);
105 mSelectMonth->setFlat( true); 115 mSelectMonth->setFlat( true);
106 mPrevYear->setFlat( true); 116 mPrevYear->setFlat( true);
107 mPrevMonth->setFlat( true); 117 mPrevMonth->setFlat( true);
118 mPrevWeek->setFlat( true);
119 } else {
120 mPrevWeek->hide();
121 mNextWeek->hide();
108 } 122 }
109 mSelectMonth->setFont( tfont ); 123 mSelectMonth->setFont( tfont );
110 // Set minimum width to width of widest month name label 124 // Set minimum width to width of widest month name label
111 int i; 125 int i;
112 int maxwidth = 0; 126 int maxwidth = 0;
113 QFontMetrics fm ( mSelectMonth->font() ); 127 QFontMetrics fm ( mSelectMonth->font() );
114 int width = fm.width("September '00" ); 128 int width = fm.width("September '00" );
115// for( i = 1; i <= KOGlobals::self()->calendarSystem()->monthsInYear(date); 129// for( i = 1; i <= KOGlobals::self()->calendarSystem()->monthsInYear(date);
116// ++i ) { 130// ++i ) {
117// //int width = fm.width( KOGlobals::self()->calendarSystem()->monthName(i, 131// //int width = fm.width( KOGlobals::self()->calendarSystem()->monthName(i,
118// // KOGlobals::self()->calendarSystem()->year(date) ) + " 2000" ); 132// // KOGlobals::self()->calendarSystem()->year(date) ) + " 2000" );
119// int width = fm.width("September 2000" ); 133// int width = fm.width("September 2000" );
120// if ( width > maxwidth ) maxwidth = width; 134// if ( width > maxwidth ) maxwidth = width;
121// } 135// }
122 maxwidth = width+2; 136 maxwidth = width+2;
123 int size = fm.height()+2; 137 int size = fm.height()+2;
124 if ( QApplication::desktop()->width() >= 480 ) { 138 if ( QApplication::desktop()->width() >= 480 ) {
125 size += 6; 139 size += 6;
126 maxwidth+= 6; 140 maxwidth+= 6;
127 } 141 }
128 142
129 mSelectMonth->setFixedWidth( maxwidth ); 143 mSelectMonth->setFixedWidth( maxwidth );
130 mSelectMonth->setFixedHeight( size ); 144 mSelectMonth->setFixedHeight( size );
131 mPrevYear->setFixedHeight( size ); 145 mPrevYear->setFixedHeight( size );
132 mPrevMonth->setFixedHeight( size ); 146 mPrevMonth->setFixedHeight( size );
133 mNextMonth->setFixedHeight( size ); 147 mPrevWeek->setFixedHeight( size );
148 mNextMonth->setFixedHeight( size );
149 mNextWeek->setFixedHeight( size );
134 mNextYear->setFixedHeight ( size ); 150 mNextYear->setFixedHeight ( size );
135 // set up control frame layout 151 // set up control frame layout
136 QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); 152 QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 );
137 ctrlLayout->addWidget( mPrevYear, 3 ); 153 ctrlLayout->addWidget( mPrevYear, 3 );
138 ctrlLayout->addWidget( mPrevMonth, 3 ); 154 ctrlLayout->addWidget( mPrevMonth, 3 );
155 ctrlLayout->addWidget( mPrevWeek, 3 );
139 //ctrlLayout->addStretch( 1 ); 156 //ctrlLayout->addStretch( 1 );
140 // ctrlLayout->addSpacing( 1 ); 157 // ctrlLayout->addSpacing( 1 );
141 // ctrlLayout->addWidget( mDateLabel ); 158 // ctrlLayout->addWidget( mDateLabel );
142 ctrlLayout->addWidget( mSelectMonth ); 159 ctrlLayout->addWidget( mSelectMonth );
143 // ctrlLayout->addSpacing( 1 ); 160 // ctrlLayout->addSpacing( 1 );
144 // ctrlLayout->addStretch( 1 ); 161 // ctrlLayout->addStretch( 1 );
162 ctrlLayout->addWidget( mNextWeek, 3 );
145 ctrlLayout->addWidget( mNextMonth, 3 ); 163 ctrlLayout->addWidget( mNextMonth, 3 );
146 ctrlLayout->addWidget( mNextYear, 3 ); 164 ctrlLayout->addWidget( mNextYear, 3 );
147 165
148 connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) ); 166 connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) );
149 connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) ); 167 connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) );
150 connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) ); 168 connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) );
169 connect( mPrevWeek, SIGNAL( clicked() ), SIGNAL( goPrevWeek() ) );
170 connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) );
151 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); 171 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) );
152 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); 172 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) );
153 mPrevYear->setFocusPolicy(NoFocus); 173 mPrevYear->setFocusPolicy(NoFocus);
154 mPrevMonth->setFocusPolicy(NoFocus); 174 mPrevMonth->setFocusPolicy(NoFocus);
155 mNextMonth->setFocusPolicy(NoFocus); 175 mNextMonth->setFocusPolicy(NoFocus);
176 mPrevWeek->setFocusPolicy(NoFocus);
177 mNextWeek->setFocusPolicy(NoFocus);
156 mNextYear->setFocusPolicy(NoFocus); 178 mNextYear->setFocusPolicy(NoFocus);
157 mSelectMonth->setFocusPolicy(NoFocus); 179 mSelectMonth->setFocusPolicy(NoFocus);
158 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); 180 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
159 181
160} 182}
161 183
162NavigatorBar::~NavigatorBar() 184NavigatorBar::~NavigatorBar()
163{ 185{
164} 186}
165 187
166void NavigatorBar::selectMonth() 188void NavigatorBar::selectMonth()
167{ 189{
168 190
169 int month; 191 int month;
170 KPopupFrame* popup = new KPopupFrame(this); 192 KPopupFrame* popup = new KPopupFrame(this);
171 KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(popup); 193 KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(popup);
172 // ----- 194 // -----
173 picker->resize(picker->sizeHint()); 195 picker->resize(picker->sizeHint());
174 popup->setMainWidget(picker); 196 popup->setMainWidget(picker);
175 picker->setFocus(); 197 picker->setFocus();
176 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 198 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
177 if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height())))) 199 if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height()))))
178 { 200 {
179 month = picker->getResult(); 201 month = picker->getResult();
180 emit monthSelected ( month ); 202 emit monthSelected ( month );
181 } else { 203 } else {
182 KNotifyClient::beep(); 204 KNotifyClient::beep();
183 } 205 }
184 delete popup; 206 delete popup;
185} 207}
186void NavigatorBar::selectDates( const KCal::DateList &dateList ) 208void NavigatorBar::selectDates( const KCal::DateList &dateList )
187{ 209{
188 if (dateList.count() > 0) { 210 if (dateList.count() > 0) {
189 QDate date = dateList.first(); 211 QDate date = dateList.first();
190 212
191 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); 213 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
192 214
193 // compute the label at the top of the navigator 215 // compute the label at the top of the navigator
194 QString dtstr = i18n(calSys->monthName( date )) + " '" + 216 QString dtstr = i18n(calSys->monthName( date )) + " '" +
195 QString::number( calSys->year( date ) ).right(2); 217 QString::number( calSys->year( date ) ).right(2);
196 218
197 mSelectMonth->setText( dtstr ); 219 mSelectMonth->setText( dtstr );
198 } 220 }
199} 221}
200 222
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 93240a6..803c817 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -1,65 +1,69 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 3
4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2003 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 NAVIGATORBAR_H 24#ifndef NAVIGATORBAR_H
25#define NAVIGATORBAR_H 25#define NAVIGATORBAR_H
26 26
27#include <libkcal/incidencebase.h> 27#include <libkcal/incidencebase.h>
28 28
29#include <qwidget.h> 29#include <qwidget.h>
30 30
31class QPushButton; 31class QPushButton;
32class QFrame; 32class QFrame;
33class QLabel; 33class QLabel;
34 34
35class NavigatorBar: public QWidget 35class NavigatorBar: public QWidget
36{ 36{
37 Q_OBJECT 37 Q_OBJECT
38 public: 38 public:
39 NavigatorBar( const QDate & date, QWidget *parent = 0, const char *name = 0 ); 39 NavigatorBar( const QDate & date, QWidget *parent = 0, const char *name = 0 );
40 ~NavigatorBar(); 40 ~NavigatorBar();
41 41
42 public slots: 42 public slots:
43 void selectDates( const KCal::DateList & ); 43 void selectDates( const KCal::DateList & );
44 void selectMonth(); 44 void selectMonth();
45 45
46 signals: 46 signals:
47 void goNextMonth(); 47 void goNextMonth();
48 void goPrevMonth(); 48 void goPrevMonth();
49 void goNextWeek();
50 void goPrevWeek();
49 void goNextYear(); 51 void goNextYear();
50 void goPrevYear(); 52 void goPrevYear();
51 void monthSelected( int ); 53 void monthSelected( int );
52 54
53 private: 55 private:
54 QFrame *mCtrlFrame; 56 QFrame *mCtrlFrame;
55 57
56 QPushButton *mPrevYear; 58 QPushButton *mPrevYear;
57 QPushButton *mPrevMonth; 59 QPushButton *mPrevMonth;
58 QPushButton *mNextMonth; 60 QPushButton *mNextMonth;
61 QPushButton *mPrevWeek;
62 QPushButton *mNextWeek;
59 QPushButton *mNextYear; 63 QPushButton *mNextYear;
60 QPushButton *mSelectMonth; 64 QPushButton *mSelectMonth;
61 65
62 //QLabel *mDateLabel; 66 //QLabel *mDateLabel;
63}; 67};
64 68
65#endif 69#endif