summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt13
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt9
-rw-r--r--korganizer/calendarview.cpp25
-rw-r--r--korganizer/kotodoview.cpp6
-rw-r--r--libkcal/calendar.cpp10
-rw-r--r--libkcal/calendar.h5
-rw-r--r--libkcal/incidence.cpp14
-rw-r--r--libkcal/incidence.h1
8 files changed, 73 insertions, 10 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index be0d2b2..aa6ab0a 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,257 +1,270 @@
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.27 ************
4
5More bugfixes.
6Added possibility to clone in KO/Pi a todo with all its subtodos.
7Added a timetracker funtionality in KO/Pi for todos in the todo view.
8If a todo is set to started and then to stopped it is saving information about the runtime in
9<yourhome>/kdepim/apps/timetrackerdir.
10To read, display, print this information an external program is needed which will be developed.
11It will display the data in a Gantt timetable view with one row for each todo.
12It will have many possibilities sorting the data after category, parent todos, attendees, ... and for creating/printing status reports/summaries.
13Merging of data from different computers/users will be quite easy because every run is stored in a single file.
14The program will be only available for the desktop (Linux+Windows) and it will be not Open Source.
15
3********** VERSION 2.0.26 ************ 16********** VERSION 2.0.26 ************
4 17
5Added two more fields to the KA/Pi view config: 18Added two more fields to the KA/Pi view config:
6A "Mobile (home)" and a "Mobile (work)" field. 19A "Mobile (home)" and a "Mobile (work)" field.
7Fixed utf8 import (e.g. for Japaneese text) in KA/Pi. 20Fixed utf8 import (e.g. for Japaneese text) in KA/Pi.
8 21
9Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes. 22Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes.
10And again fixed some more small bugs. 23And again fixed some more small bugs.
11 24
12********** VERSION 2.0.25 ************ 25********** VERSION 2.0.25 ************
13 26
14And again fixed some bugs. 27And again fixed some bugs.
15 28
16********** VERSION 2.0.24 ************ 29********** VERSION 2.0.24 ************
17 30
18Fixed again a lot of small bugs. 31Fixed again a lot of small bugs.
19Some performance optimizations in date navigator. 32Some performance optimizations in date navigator.
20Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row. 33Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row.
21 34
22********** VERSION 2.0.23 ************ 35********** VERSION 2.0.23 ************
23 36
24Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation. 37Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation.
25Fixed the (agenda) layout of KO/Pi on 5500er. 38Fixed the (agenda) layout of KO/Pi on 5500er.
26Some usebility enhancements (e.g. reselection the current item of the todo view after some changes). 39Some usebility enhancements (e.g. reselection the current item of the todo view after some changes).
27 40
28********** VERSION 2.0.22 ************ 41********** VERSION 2.0.22 ************
29 42
30KO/Pi: 43KO/Pi:
31Fix for creating events/todos via the abgenda context menu. 44Fix for creating events/todos via the abgenda context menu.
32Added option to split toolbar to 3 toolbars. 45Added option to split toolbar to 3 toolbars.
33(Toolbar moving s disabled for this option due to a bug in Qt somewhere). 46(Toolbar moving s disabled for this option due to a bug in Qt somewhere).
34Added option to show one small filter-view-toolbar. 47Added option to show one small filter-view-toolbar.
35Added a print option to the desktop version: 48Added a print option to the desktop version:
36Now you can print out the view of the "Event Viewer". 49Now you can print out the view of the "Event Viewer".
37That means you can print all data of one particular event/todo. 50That means you can print all data of one particular event/todo.
38Added scaling options to printout of Event Viewer and What'sNext View. 51Added scaling options to printout of Event Viewer and What'sNext View.
39Fixed some problems in the month view in "week start sunday" mode. 52Fixed some problems in the month view in "week start sunday" mode.
40KA/Pi: 53KA/Pi:
41Added two more config options. 54Added two more config options.
42Fixed resizing problem of address request dialog when orientation was switched. 55Fixed resizing problem of address request dialog when orientation was switched.
43Cleaned up the menu structure. 56Cleaned up the menu structure.
44Fixed some more problems. 57Fixed some more problems.
45 58
46Fixed the annoying problem that scrolling continued after the key was released in KO/Pi Monthview and the KA/Pi views. 59Fixed the annoying problem that scrolling continued after the key was released in KO/Pi Monthview and the KA/Pi views.
47 60
48And, this is a really cool option (Ben did suggest it): 61And, this is a really cool option (Ben did suggest it):
49Now KO/Pi and KA/Pi can be run from a USB stick: 62Now KO/Pi and KA/Pi can be run from a USB stick:
50All data is read from and written to the stick. 63All data is read from and written to the stick.
51You can enable this in the global configure option TAB with: 64You can enable this in the global configure option TAB with:
52Save using LOCAL storage. 65Save using LOCAL storage.
53Just put KDE-Pim/Pi on a memory stick and you can access all your PIM data on every computer with Windows XP. It will work with the ME and Linux versions as well. I will put a memory stick version for teh next stable release online. 66Just put KDE-Pim/Pi on a memory stick and you can access all your PIM data on every computer with Windows XP. It will work with the ME and Linux versions as well. I will put a memory stick version for teh next stable release online.
54 67
55********** VERSION 2.0.21 ************ 68********** VERSION 2.0.21 ************
56 69
57Fixed another SMTP problem in OM/Pi. 70Fixed another SMTP problem in OM/Pi.
58Some small changed in the new datenavigator in KO/Pi. 71Some small changed in the new datenavigator in KO/Pi.
59Changed default setting for new filter in KA/Pi to "exclude categories". 72Changed default setting for new filter in KA/Pi to "exclude categories".
60Changed the default font size for 640x480 display . 73Changed the default font size for 640x480 display .
61Changed popup menu behaviour in agenda and list view. 74Changed popup menu behaviour in agenda and list view.
62Fixed some layout problems of the date label size in the month view. 75Fixed some layout problems of the date label size in the month view.
63Made month view update faster. 76Made month view update faster.
64Made first datenavigator repainting faster. 77Made first datenavigator repainting faster.
65Changed the title of the event/todo edit dialogs. 78Changed the title of the event/todo edit dialogs.
66Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). 79Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course).
67Many small usebility fixes in KO/Pi. 80Many small usebility fixes in KO/Pi.
68Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. 81Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi.
69The set of possible "next views" are the views you have toolbar buttons for. 82The set of possible "next views" are the views you have toolbar buttons for.
70 83
71Made alarm sound working on Linux. 84Made alarm sound working on Linux.
72 85
73KO/Pi alarm applet changed: 86KO/Pi alarm applet changed:
74Made buttons in alarm dialog much bigger. 87Made buttons in alarm dialog much bigger.
75Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. 88Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger.
76The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. 89The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings.
77 90
78And because this version is realeased at Easter, I added an Easter-egg: 91And because this version is realeased at Easter, I added an Easter-egg:
79With a new undocumented command you can get a message box about the next alarm. 92With a new undocumented command you can get a message box about the next alarm.
80Good luck to find it! 93Good luck to find it!
81 94
82 95
83 96
84********** VERSION 2.0.20 ************ 97********** VERSION 2.0.20 ************
85 98
86Two small fixes in OM/Pi. 99Two small fixes in OM/Pi.
87 100
88Better resizing of the new datenavigator in KO/Pi. 101Better resizing of the new datenavigator in KO/Pi.
89 102
90********** VERSION 2.0.19 ************ 103********** VERSION 2.0.19 ************
91KO/Pi: 104KO/Pi:
92Enhancements and bugfixes in the new datenavigator. 105Enhancements and bugfixes in the new datenavigator.
93Bugfix in this changelog: 106Bugfix in this changelog:
94The datenavigator was changed in version 2.0.18, not the datepicker. 107The datenavigator was changed in version 2.0.18, not the datepicker.
95 108
96********** VERSION 2.0.18 ************ 109********** VERSION 2.0.18 ************
97KO/Pi: 110KO/Pi:
98Fixed some minor problems. 111Fixed some minor problems.
99Cleaned up the KO/Pi config dialog. 112Cleaned up the KO/Pi config dialog.
100Fixed problem moving events in aganda view. 113Fixed problem moving events in aganda view.
101Made datepicker scaleable, i.e. if the datenavigator shows now a 114Made datepicker scaleable, i.e. if the datenavigator shows now a
102datenavigator matrix depending on its size. 115datenavigator matrix depending on its size.
103Birthdays are now displayed green in the datenavigator. 116Birthdays are now displayed green in the datenavigator.
104What'sThis Help in datenavigator shows all events of the day. 117What'sThis Help in datenavigator shows all events of the day.
105 118
106OM/Pi: 119OM/Pi:
107Updated the backend mail library to the latest version. 120Updated the backend mail library to the latest version.
108Please backup your mail before using this version. 121Please backup your mail before using this version.
109 122
110********** VERSION 2.0.17 ************ 123********** VERSION 2.0.17 ************
111 124
112KO/Pi: 125KO/Pi:
113Tooltips in month view were not sorted. Fixed. 126Tooltips in month view were not sorted. Fixed.
114Daylabel in agenda view ( for display of one day ) was too short. Fixed. 127Daylabel in agenda view ( for display of one day ) was too short. Fixed.
115Conflict display dialog for syncing was not on top of other windows. Fixed. 128Conflict display dialog for syncing was not on top of other windows. Fixed.
116Fixed some minor problems. 129Fixed some minor problems.
117 130
118Fixed an endless loop when importing vcs file with RESOURCES entry. 131Fixed an endless loop when importing vcs file with RESOURCES entry.
119 132
120********** VERSION 2.0.16 ************ 133********** VERSION 2.0.16 ************
121OM/Pi: 134OM/Pi:
122Fixed the SMTP account setting the option. 135Fixed the SMTP account setting the option.
123Fixed something in mail sending. 136Fixed something in mail sending.
124 137
125KO/Pi: 138KO/Pi:
126Added possibility to export selected events/todos as vcal file. 139Added possibility to export selected events/todos as vcal file.
127 140
128********** VERSION 2.0.15 ************ 141********** VERSION 2.0.15 ************
129 142
130PwM/Pi: 143PwM/Pi:
131Added keyboard shorcuts for 144Added keyboard shorcuts for
132- toggling summary view (space bar) 145- toggling summary view (space bar)
133- delete item (delete + backspace key) 146- delete item (delete + backspace key)
134- add new item ( i + n key) 147- add new item ( i + n key)
135Fixed length of info in the title. 148Fixed length of info in the title.
136 149
137KO/Pi-KA/Pi: 150KO/Pi-KA/Pi:
138Changed "ME" menu bar entry to an icon. 151Changed "ME" menu bar entry to an icon.
139 152
140KO/Pi: 153KO/Pi:
141Fixed two minor bugs in displaying todos. 154Fixed two minor bugs in displaying todos.
142If in month view a cell is selected, the key shortcut "d" shows now that date. 155If in month view a cell is selected, the key shortcut "d" shows now that date.
143Added complete info for a todo in month view as an icon left of the text. 156Added complete info for a todo in month view as an icon left of the text.
144Fixed problems of displaying data when "<" or ">" are used in summary/location/description. 157Fixed problems of displaying data when "<" or ">" are used in summary/location/description.
145Fixed problem of search dialog size when switching displays. 158Fixed problem of search dialog size when switching displays.
146Cancel key now closes date picker. 159Cancel key now closes date picker.
147Rearranged KO/Pi file menu structure. 160Rearranged KO/Pi file menu structure.
148 161
149OM/Pi: 162OM/Pi:
150Added to the SMTP account setting the option 163Added to the SMTP account setting the option
151"No secure connection". 164"No secure connection".
152You have to configure your SMTP accounts again, sorry. 165You have to configure your SMTP accounts again, sorry.
153 166
154KA/Pi: 167KA/Pi:
155Added support for importing quoted-printable. 168Added support for importing quoted-printable.
156Support was added by Peter P.. Thanks, Peter! 169Support was added by Peter P.. Thanks, Peter!
157 170
158 171
159********** VERSION 2.0.14 ************ 172********** VERSION 2.0.14 ************
160 173
161Made Passwordmanager PwM/Pi more userfriendly: 174Made Passwordmanager PwM/Pi more userfriendly:
162Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 175Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
163Fixed bug in KO/Pi todo printing. 176Fixed bug in KO/Pi todo printing.
164Made Qtopia calendar import possible on desktop . 177Made Qtopia calendar import possible on desktop .
165 178
166********** VERSION 2.0.13 ************ 179********** VERSION 2.0.13 ************
167 180
168Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. 181Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter.
169 182
170In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". 183In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down".
171 184
172OM/Pi: 185OM/Pi:
173Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. 186Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails.
174Added missing German translation. 187Added missing German translation.
175Added warning if path is specified in local folder settings of account config. 188Added warning if path is specified in local folder settings of account config.
176 189
177********** VERSION 2.0.12 ************ 190********** VERSION 2.0.12 ************
178 191
179KO/Pi: 192KO/Pi:
180Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. 193Fixed a bug in todo start/due date handling for non recurring todos with a start and due date.
181Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. 194Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes.
182Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. 195Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer.
183 196
184Fixed problem in pi-sync mode when wrong password was sent. 197Fixed problem in pi-sync mode when wrong password was sent.
185 198
186OM/Pi: 199OM/Pi:
187Fixed a crash when displaying mails with "Show mail as html" was checked in the config. 200Fixed a crash when displaying mails with "Show mail as html" was checked in the config.
188Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. 201Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled.
189 202
190********** VERSION 2.0.11 ************ 203********** VERSION 2.0.11 ************
191 204
192Fixed some problems in pi-sync mode 205Fixed some problems in pi-sync mode
193(e.g. details of events were not synced properly) 206(e.g. details of events were not synced properly)
194 207
195********** VERSION 2.0.10 ************ 208********** VERSION 2.0.10 ************
196 209
197KO/Pi: 210KO/Pi:
198In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. 211In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view.
199This is fixed. 212This is fixed.
200Changed the search dialog a bit to make it more user friendly. 213Changed the search dialog a bit to make it more user friendly.
201(E.g.: Removed message box about "no items found" and set key focus to search line edit after search). 214(E.g.: Removed message box about "no items found" and set key focus to search line edit after search).
202 215
203Added config option to hide the week number in KO/Pi toolbar. 216Added config option to hide the week number in KO/Pi toolbar.
204 217
205********** VERSION 2.0.9 ************ 218********** VERSION 2.0.9 ************
206 219
207Made month view icons for multiday events a bit nicer. 220Made month view icons for multiday events a bit nicer.
208Some minor fixes in KO/Pi 221Some minor fixes in KO/Pi
209(e.g. go to today did not work for new week view properly). 222(e.g. go to today did not work for new week view properly).
210 223
211 224
212********** VERSION 2.0.8 ************ 225********** VERSION 2.0.8 ************
213 226
214Fixed a problem in dependency info in the ipk files for the Zaurus. 227Fixed a problem in dependency info in the ipk files for the Zaurus.
215 228
216Added 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. 229Added 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.
217 230
218Added a "go today" button to the datepicker. 231Added a "go today" button to the datepicker.
219 232
220Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) 233Added "created" and "last modified" to event/todo viewer (and What'sThis viewer)
221and made it configureable to show these values. 234and made it configureable to show these values.
222 235
223Fixed a problem for events (from external iCal files) that do have a duration but no end date. 236Fixed a problem for events (from external iCal files) that do have a duration but no end date.
224 237
225 238
226********** VERSION 2.0.7 ************ 239********** VERSION 2.0.7 ************
227 240
228Added global application font settings 241Added global application font settings
229(for all KDE-Pim/Pi apps) to the general settings. 242(for all KDE-Pim/Pi apps) to the general settings.
230 243
231Fixed a problem in OM/Pi when trying to login to some IMAP servers 244Fixed a problem in OM/Pi when trying to login to some IMAP servers
232(like the IMAP server of Apple: mail.mac.com ) 245(like the IMAP server of Apple: mail.mac.com )
233 246
234Added recurring todos to KO/Pi. 247Added recurring todos to KO/Pi.
235 248
236 249
237********** VERSION 2.0.6 ************ 250********** VERSION 2.0.6 ************
238 251
239Stable release 2.0.6! 252Stable release 2.0.6!
240 253
241Some bugfixes in the pi-sync mode. 254Some bugfixes in the pi-sync mode.
242Added German translation for pi-sync mode. 255Added German translation for pi-sync mode.
243 256
244KO/Pi: 257KO/Pi:
245Made the todolist using alternate background. 258Made the todolist using alternate background.
246 259
247Other minor fixes in KO/Pi. 260Other minor fixes in KO/Pi.
248 261
249 262
250You can find the complete changelog 263You can find the complete changelog
251from version 1.7.7 to 2.0.5 264from version 1.7.7 to 2.0.5
252in the source package or on 265in the source package or on
253 266
254http://www.pi-sync.net/html/changelog.html 267http://www.pi-sync.net/html/changelog.html
255 268
256 269
257 270
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 5257bff..9476a89 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -777,576 +777,581 @@
777{ "Error importing file","Fehler beim Importieren der Datei" }, 777{ "Error importing file","Fehler beim Importieren der Datei" },
778{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, 778{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
779{ "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" }, 779{ "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" },
780{ "Overwrite!","Überschreiben!" }, 780{ "Overwrite!","Überschreiben!" },
781{ "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" }, 781{ "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" },
782{ "Load backup filename","Lade Backup Dateiname" }, 782{ "Load backup filename","Lade Backup Dateiname" },
783{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, 783{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
784{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, 784{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
785{ "Save backup filename","Speichere Backup Dateiname" }, 785{ "Save backup filename","Speichere Backup Dateiname" },
786{ "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" }, 786{ "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" },
787{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 787{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
788{ "Details of attendee","Teilnehmerdetails" }, 788{ "Details of attendee","Teilnehmerdetails" },
789{ "Work phone:\n","Telefon Arbeit:\n" }, 789{ "Work phone:\n","Telefon Arbeit:\n" },
790{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, 790{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
791{ "Home phone:\n","Telefon privat:\n" }, 791{ "Home phone:\n","Telefon privat:\n" },
792{ "Mobile home phone:\n","Mobiltelefon privat:\n" }, 792{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
793{ "Email:\n","Email:\n" }, 793{ "Email:\n","Email:\n" },
794{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, 794{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
795{ "Audio Al.: ","Audio Al.: " }, 795{ "Audio Al.: ","Audio Al.: " },
796{ "Proc.Al.: ","Proz.Al.: " }, 796{ "Proc.Al.: ","Proz.Al.: " },
797{ "No sound set","Kein Sound definiert" }, 797{ "No sound set","Kein Sound definiert" },
798{ "*.wav|Wav Files","*.wav|Wav Dateien" }, 798{ "*.wav|Wav Files","*.wav|Wav Dateien" },
799{ "No program set","Kein Programm definiert" }, 799{ "No program set","Kein Programm definiert" },
800{ "Running '%1'","Ausführen '%1'" }, 800{ "Running '%1'","Ausführen '%1'" },
801{ "Playing '%1'","Abspielen '%1'" }, 801{ "Playing '%1'","Abspielen '%1'" },
802{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, 802{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
803{ "Load!","Laden!" }, 803{ "Load!","Laden!" },
804{ "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" }, 804{ "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" },
805{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, 805{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
806{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, 806{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
807{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, 807{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
808{ "Features + hints...","Eigenschaften + Tipps..." }, 808{ "Features + hints...","Eigenschaften + Tipps..." },
809{ "User translation...","Benutzer Übersetzung..." }, 809{ "User translation...","Benutzer Übersetzung..." },
810{ "Sync HowTo...","Synchronisation HowTo..." }, 810{ "Sync HowTo...","Synchronisation HowTo..." },
811{ "Print calendar...","Drucke Kalender..." }, 811{ "Print calendar...","Drucke Kalender..." },
812{ "Anniversary","Jahrestag" }, 812{ "Anniversary","Jahrestag" },
813{ "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" }, 813{ "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" },
814{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, 814{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
815{ "Next recurrence is on: ","Nächste Wiederholung ist am:" }, 815{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
816{ "<b>Alarm on: </b>","<b>Alarm am: </b>" }, 816{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
817{ "<b>Access: </b>","<b>Zugriff: </b>" }, 817{ "<b>Access: </b>","<b>Zugriff: </b>" },
818{ "(%1 min before)","(%1 min vorher)" }, 818{ "(%1 min before)","(%1 min vorher)" },
819{ "<b>Categories: </b>","<b>Kategorien: </b>" }, 819{ "<b>Categories: </b>","<b>Kategorien: </b>" },
820{ "Save Journal/Description...","Speichere Journal/Details..." }, 820{ "Save Journal/Description...","Speichere Journal/Details..." },
821{ "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." }, 821{ "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." },
822{ "Continue","Weitermachen" }, 822{ "Continue","Weitermachen" },
823{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, 823{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" },
824{ "Attendee:","Teilnehmer:" }, 824{ "Attendee:","Teilnehmer:" },
825{ "Click OK to search ->","Klicke zum Suchen auf OK ->" }, 825{ "Click OK to search ->","Klicke zum Suchen auf OK ->" },
826{ "On day ","Am Tag " }, 826{ "On day ","Am Tag " },
827{ "%1 of ","%1 des Monats" }, 827{ "%1 of ","%1 des Monats" },
828{ "%1 of the year","%1 des Jahres" }, 828{ "%1 of the year","%1 des Jahres" },
829{ "Anonymous","Anonymo" }, 829{ "Anonymous","Anonymo" },
830{ "nobody@nowhere","niemand@nirgendwo" }, 830{ "nobody@nowhere","niemand@nirgendwo" },
831{ "calendar.html","calendar.html" }, 831{ "calendar.html","calendar.html" },
832{ " Local Time"," Locale Zeit" }, 832{ " Local Time"," Locale Zeit" },
833{ "Unknown Name","Unbekannter Name" }, 833{ "Unknown Name","Unbekannter Name" },
834{ "unknown@nowhere","unbekannt@nirgendwo" }, 834{ "unknown@nowhere","unbekannt@nirgendwo" },
835{ "Beam via IR!","Beam via IR!" }, 835{ "Beam via IR!","Beam via IR!" },
836{ "Next Month","Nächster Monat" }, 836{ "Next Month","Nächster Monat" },
837{ "Prio","Prio" }, 837{ "Prio","Prio" },
838{ "Reparent Todo","Mache Sub-Todo" }, 838{ "Reparent Todo","Mache Sub-Todo" },
839{ "tomorrow","morgen" }, 839{ "tomorrow","morgen" },
840{ "today","heute" }, 840{ "today","heute" },
841{ "yesterday","gestern" }, 841{ "yesterday","gestern" },
842{ "Ok","Ok" }, 842{ "Ok","Ok" },
843{ "Ok+Agenda","Ok+Agenda" }, 843{ "Ok+Agenda","Ok+Agenda" },
844{ "Email","Email" }, 844{ "Email","Email" },
845{ "RSVP","RSVP" }, 845{ "RSVP","RSVP" },
846{ "Email:","Email:" }, 846{ "Email:","Email:" },
847{ "Appointment Time ","Termin Zeit " }, 847{ "Appointment Time ","Termin Zeit " },
848{ "2","2" }, 848{ "2","2" },
849{ "3","3" }, 849{ "3","3" },
850{ "4","4" }, 850{ "4","4" },
851{ " 0 %"," 0 %" }, 851{ " 0 %"," 0 %" },
852{ " 20 %"," 20 %" }, 852{ " 20 %"," 20 %" },
853{ " 40 %"," 40 %" }, 853{ " 40 %"," 40 %" },
854{ " 60 %"," 60 %" }, 854{ " 60 %"," 60 %" },
855{ " 80 %"," 80 %" }, 855{ " 80 %"," 80 %" },
856{ "100 %","100 %" }, 856{ "100 %","100 %" },
857{ "Filter","Filter" }, 857{ "Filter","Filter" },
858{ "Configure","Konfiguriere" }, 858{ "Configure","Konfiguriere" },
859{ "What's Next","What's Next" }, 859{ "What's Next","What's Next" },
860{ "Complete calendar...","Kompletten Kalender..." }, 860{ "Complete calendar...","Kompletten Kalender..." },
861{ "Filtered calendar...","Gefilterten Kalender..." }, 861{ "Filtered calendar...","Gefilterten Kalender..." },
862{ "Export to phone","Exportiere zum Handy" }, 862{ "Export to phone","Exportiere zum Handy" },
863{ "Beam receive enabled","Beam Empfang an" }, 863{ "Beam receive enabled","Beam Empfang an" },
864{ "What's new?","Was ist neu?" }, 864{ "What's new?","Was ist neu?" },
865{ "FAQ...","FAQ..." }, 865{ "FAQ...","FAQ..." },
866{ "Licence...","Licence..." }, 866{ "Licence...","Licence..." },
867{ "What's This?","What's This?" }, 867{ "What's This?","What's This?" },
868{ "&Edit...","&Editiere..." }, 868{ "&Edit...","&Editiere..." },
869{ "Oktober","Oktober" }, 869{ "Oktober","Oktober" },
870{ "Title","Titel" }, 870{ "Title","Titel" },
871{ "%1 %","%1 %" }, 871{ "%1 %","%1 %" },
872{ "Enable Pi-Sync","Schalte Pi-Sync an" }, 872{ "Enable Pi-Sync","Schalte Pi-Sync an" },
873{ "Import!","Importiere!" }, 873{ "Import!","Importiere!" },
874{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, 874{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" },
875{ "Export to phone options","Export ans Handy Optionen" }, 875{ "Export to phone options","Export ans Handy Optionen" },
876{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 876{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
877{ "I/O device: ","I/O device: " }, 877{ "I/O device: ","I/O device: " },
878{ "Connection: ","Connection: " }, 878{ "Connection: ","Connection: " },
879{ "Model(opt.): ","Model(opt.): " }, 879{ "Model(opt.): ","Model(opt.): " },
880{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, 880{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" },
881{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, 881{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " },
882{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, 882{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" },
883{ "Export to mobile phone!","Exportiere auf das Handy!" }, 883{ "Export to mobile phone!","Exportiere auf das Handy!" },
884{ "Export complete calendar","Exportiere kompletten Kalender" }, 884{ "Export complete calendar","Exportiere kompletten Kalender" },
885{ "Writing to phone...","Sende Daten ans Handy..." }, 885{ "Writing to phone...","Sende Daten ans Handy..." },
886{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 886{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
887{ "Retry","Nochmal versuchen" }, 887{ "Retry","Nochmal versuchen" },
888{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 888{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
889{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 889{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
890{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 890{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
891{ "Export filtered calendar","Exportiere gefilterten Kalender" }, 891{ "Export filtered calendar","Exportiere gefilterten Kalender" },
892{ "Preferences","Vorlieben" }, 892{ "Preferences","Vorlieben" },
893{ "Global","Global" }, 893{ "Global","Global" },
894{ "Phone","Phone" }, 894{ "Phone","Phone" },
895{ "SMS","SMS" }, 895{ "SMS","SMS" },
896{ "Fax","Fax" }, 896{ "Fax","Fax" },
897{ "Pager","Pager" }, 897{ "Pager","Pager" },
898{ "SIP","SIP" }, 898{ "SIP","SIP" },
899{ "Italian","Italienisch" }, 899{ "Italian","Italienisch" },
900{ "24:00","24:00" }, 900{ "24:00","24:00" },
901{ "12:00am","12:00am" }, 901{ "12:00am","12:00am" },
902{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 902{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
903{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 903{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
904{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 904{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
905{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 905{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
906{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 906{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
907{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 907{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
908{ "Used Mail Client","Benutzter Mail Client" }, 908{ "Used Mail Client","Benutzter Mail Client" },
909{ "Channel:","Channel:" }, 909{ "Channel:","Channel:" },
910{ "Message:","Message:" }, 910{ "Message:","Message:" },
911{ "Parameters:","Parameter:" }, 911{ "Parameters:","Parameter:" },
912{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 912{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
913{ "extra Message:","extra Message:" }, 913{ "extra Message:","extra Message:" },
914{ "extra Parameters:","extra Parameter:" }, 914{ "extra Parameters:","extra Parameter:" },
915{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 915{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
916{ "External Apps.","Externe Appl." }, 916{ "External Apps.","Externe Appl." },
917{ "24 hours","24 Std." }, 917{ "24 hours","24 Std." },
918{ "3 hours","3 Std." }, 918{ "3 hours","3 Std." },
919{ "1 hour","1 Std." }, 919{ "1 hour","1 Std." },
920{ "15 minutes","15 Min." }, 920{ "15 minutes","15 Min." },
921{ "5 minutes","5 Min." }, 921{ "5 minutes","5 Min." },
922{ "1 minute","1 Min." }, 922{ "1 minute","1 Min." },
923{ "23","23" }, 923{ "23","23" },
924{ "Mon 15","Mon 15" }, 924{ "Mon 15","Mon 15" },
925{ "Configure KO","Konfiguriere KO" }, 925{ "Configure KO","Konfiguriere KO" },
926{ "Event text","Termin Text" }, 926{ "Event text","Termin Text" },
927{ "ToDo","ToDo" }, 927{ "ToDo","ToDo" },
928{ "Today","Heute" }, 928{ "Today","Heute" },
929{ "What's Next View","What's Next Ansicht" }, 929{ "What's Next View","What's Next Ansicht" },
930{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, 930{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
931{ "Alarm","Alarm" }, 931{ "Alarm","Alarm" },
932{ "Used %1 Client","Benutzter %1 Client" }, 932{ "Used %1 Client","Benutzter %1 Client" },
933{ "No email client installed","Kein Email Klient installiert" }, 933{ "No email client installed","Kein Email Klient installiert" },
934{ "Userdefined email client","Benutzerdef. Email Klient" }, 934{ "Userdefined email client","Benutzerdef. Email Klient" },
935{ "OM/Pi email client","OM/Pi Email Klient" }, 935{ "OM/Pi email client","OM/Pi Email Klient" },
936{ "Include in multiple ","Beziehe in multiple " }, 936{ "Include in multiple ","Beziehe in multiple " },
937{ "calendar ","Kalender " }, 937{ "calendar ","Kalender " },
938{ "addressbook ","Adressbuch " }, 938{ "addressbook ","Adressbuch " },
939{ "pwmanager","PWmanager" }, 939{ "pwmanager","PWmanager" },
940{ " sync"," Sync ein" }, 940{ " sync"," Sync ein" },
941{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 941{ "Write back synced data","Schreibe gesyncte Daten zurück" },
942{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 942{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
943{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 943{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
944{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 944{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
945{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 945{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
946{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 946{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
947{ "Help...","Hilfe..." }, 947{ "Help...","Hilfe..." },
948{ "Local file Cal:","Lokale Datei Kal:" }, 948{ "Local file Cal:","Lokale Datei Kal:" },
949{ "Local file ABook:","Lokale Datei ABuch:" }, 949{ "Local file ABook:","Lokale Datei ABuch:" },
950{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 950{ "Local file PWMgr:","Lokale Datei PWMgr:" },
951{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 951{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
952{ "Calendar:","Kalender:" }, 952{ "Calendar:","Kalender:" },
953{ "AddressBook:","AdressBuch:" }, 953{ "AddressBook:","AdressBuch:" },
954{ "PWManager:","PWManager:" }, 954{ "PWManager:","PWManager:" },
955{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 955{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
956{ "ssh/scp","ssh/scp" }, 956{ "ssh/scp","ssh/scp" },
957{ "ftp","ftp" }, 957{ "ftp","ftp" },
958{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 958{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
959{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 959{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
960{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 960{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
961{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 961{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
962{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 962{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
963{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 963{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
964{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 964{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
965{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 965{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
966{ "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" }, 966{ "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" },
967{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 967{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
968{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 968{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
969{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 969{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
970{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 970{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
971{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 971{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
972{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 972{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
973{ "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!" }, 973{ "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!" },
974{ "KDE-Pim Sync","KDE-Pim Sync" }, 974{ "KDE-Pim Sync","KDE-Pim Sync" },
975{ "Multiple profiles","Multi-Sync Profile" }, 975{ "Multiple profiles","Multi-Sync Profile" },
976{ "Device: ","Gerät: " }, 976{ "Device: ","Gerät: " },
977{ "Multiple sync started.","Multi-Sync gestartet." }, 977{ "Multiple sync started.","Multi-Sync gestartet." },
978{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 978{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
979{ "Turn filter on","Schalte Filter an" }, 979{ "Turn filter on","Schalte Filter an" },
980{ "Turn filter off","Schalte Filter aus" }, 980{ "Turn filter off","Schalte Filter aus" },
981{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 981{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
982{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 982{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
983{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 983{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
984{ "<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" }, 984{ "<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" },
985{ "<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" }, 985{ "<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" },
986{ "<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" }, 986{ "<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" },
987{ "<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" }, 987{ "<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" },
988{ "<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" }, 988{ "<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" },
989{ "<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" }, 989{ "<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" },
990{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 990{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
991{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 991{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
992{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 992{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
993{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 993{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
994{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 994{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
995{ "<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" }, 995{ "<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" },
996{ "<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" }, 996{ "<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" },
997{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 997{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
998{ "<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" }, 998{ "<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" },
999{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 999{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
1000{ "<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" }, 1000{ "<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" },
1001{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 1001{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
1002{ "<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" }, 1002{ "<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" },
1003{ "<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" }, 1003{ "<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" },
1004{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 1004{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
1005{ "<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" }, 1005{ "<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" },
1006{ "<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" }, 1006{ "<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" },
1007{ "<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" }, 1007{ "<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" },
1008{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1008{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1009{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1009{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1010{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1010{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1011{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1011{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1012{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1012{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1013{ "<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" }, 1013{ "<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" },
1014{ "<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" }, 1014{ "<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" },
1015{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1015{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1016{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1016{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1017{ "<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" }, 1017{ "<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" },
1018{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, 1018{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" },
1019{ "<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" }, 1019{ "<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" },
1020{ "<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" }, 1020{ "<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" },
1021{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, 1021{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" },
1022{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, 1022{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" },
1023{ "<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" }, 1023{ "<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" },
1024{ "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, 1024{ "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " },
1025{ "<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" }, 1025{ "<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" },
1026{ "<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" }, 1026{ "<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" },
1027{ "<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" }, 1027{ "<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" },
1028{ "<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" }, 1028{ "<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" },
1029{ "<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" }, 1029{ "<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" },
1030{ "<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" }, 1030{ "<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" },
1031{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1031{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1032{ "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" }, 1032{ "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" },
1033{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1033{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1034{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1034{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1035{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1035{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1036{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, 1036{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" },
1037{ "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" }, 1037{ "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" },
1038{ "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" }, 1038{ "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" },
1039{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1039{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1040{ "KO/Pi FAQ","KO/Pi FAQ" }, 1040{ "KO/Pi FAQ","KO/Pi FAQ" },
1041{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, 1041{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" },
1042{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1042{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1043{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1043{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1044{ "From: ","Von: " }, 1044{ "From: ","Von: " },
1045{ "Remove sync info","Entferne Sync Info" }, 1045{ "Remove sync info","Entferne Sync Info" },
1046{ "For all profiles","Für alle Profile" }, 1046{ "For all profiles","Für alle Profile" },
1047{ "Hide not Running","Verstecke nicht Laufende" }, 1047{ "Hide not Running","Verstecke nicht Laufende" },
1048{ "ME","ME" }, 1048{ "ME","ME" },
1049{ "Toolbar","Toolbar" }, 1049{ "Toolbar","Toolbar" },
1050{ "Undo Delete...","Löschen rückgängig machen..." }, 1050{ "Undo Delete...","Löschen rückgängig machen..." },
1051{ "Undo Delete","Löschen rückgängig machen" }, 1051{ "Undo Delete","Löschen rückgängig machen" },
1052{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1052{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1053{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1053{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1054{ "Januar","Januar" }, 1054{ "Januar","Januar" },
1055{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1055{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1056{ "No Filter","Kein Filter" }, 1056{ "No Filter","Kein Filter" },
1057{ "Multiple Sync options","Multi Sync Optionen" }, 1057{ "Multiple Sync options","Multi Sync Optionen" },
1058{ "Sync algo options","Sync Ablauf Optionen" }, 1058{ "Sync algo options","Sync Ablauf Optionen" },
1059{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1059{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1060{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1060{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1061{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1061{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1062{ "Write back options","Optionen zum Zurückschreiben" }, 1062{ "Write back options","Optionen zum Zurückschreiben" },
1063{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1063{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1064{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1064{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1065{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1065{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1066{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1066{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1067{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1067{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1068{ "Time period","Zeitspanne" }, 1068{ "Time period","Zeitspanne" },
1069{ "From ","Von " }, 1069{ "From ","Von " },
1070{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1070{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1071{ " weeks in the future "," Wochen in der Zukunft " }, 1071{ " weeks in the future "," Wochen in der Zukunft " },
1072{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1072{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1073{ "Local temp file:","Lokale temp Datei:" }, 1073{ "Local temp file:","Lokale temp Datei:" },
1074{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1074{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1075{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1075{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1076{ "Language","Sprache" }, 1076{ "Language","Sprache" },
1077{ "Time Format","Zeit Format" }, 1077{ "Time Format","Zeit Format" },
1078{ "Time Zone","Zeit Zone" }, 1078{ "Time Zone","Zeit Zone" },
1079{ "%1 groups subscribed","%1 Guppen abboniert" }, 1079{ "%1 groups subscribed","%1 Guppen abboniert" },
1080{ "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" }, 1080{ "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" },
1081{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1081{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1082{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1082{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1083{ "Save settings","Speichere Einstellungen" }, 1083{ "Save settings","Speichere Einstellungen" },
1084{ "Save standard","Speichere Standard" }, 1084{ "Save standard","Speichere Standard" },
1085{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1085{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1086{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1086{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1087{ "Data storage path","Daten Speicherpfad" }, 1087{ "Data storage path","Daten Speicherpfad" },
1088{ "Language","Sprache" }, 1088{ "Language","Sprache" },
1089{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1089{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1090{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1090{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1091{ "Show events, that are done","Zeige abgelaufene Termine" }, 1091{ "Show events, that are done","Zeige abgelaufene Termine" },
1092{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1092{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1093{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1093{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1094{ "KO/Pi","KO/Pi" }, 1094{ "KO/Pi","KO/Pi" },
1095{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1095{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1096{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1096{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1097{ "Sound.Al.: ","Sound.Al.: " }, 1097{ "Sound.Al.: ","Sound.Al.: " },
1098{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1098{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1099{ "Restore","Wiederherstellen" }, 1099{ "Restore","Wiederherstellen" },
1100{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1100{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1101{ "% completed","% erledigt" }, 1101{ "% completed","% erledigt" },
1102{ "%d item(s) found.","%d Item(s) gefunden." }, 1102{ "%d item(s) found.","%d Item(s) gefunden." },
1103{ "Set complete","Setze auf erledigt" }, 1103{ "Set complete","Setze auf erledigt" },
1104{ "(cancelled)","(gecancelt)" }, 1104{ "(cancelled)","(gecancelt)" },
1105{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1105{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1106{ " Local time "," Locale Zeit " }, 1106{ " Local time "," Locale Zeit " },
1107{ "Form2","Form2" }, 1107{ "Form2","Form2" },
1108{ "Filter enabled","Filter angeschaltet" }, 1108{ "Filter enabled","Filter angeschaltet" },
1109{ "Edit Filters","Ändere Filter" }, 1109{ "Edit Filters","Ändere Filter" },
1110{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1110{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1111{ "Agenda","Agenda" }, 1111{ "Agenda","Agenda" },
1112{ " ("," (" }, 1112{ " ("," (" },
1113{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1113{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1114{ "Print","Print" }, 1114{ "Print","Print" },
1115{ "&Setup Printer...","Drucker &Setup..." }, 1115{ "&Setup Printer...","Drucker &Setup..." },
1116{ "View Type","Zeige Typ" }, 1116{ "View Type","Zeige Typ" },
1117{ "Page &orientation:","Seiten Ausrichtung:" }, 1117{ "Page &orientation:","Seiten Ausrichtung:" },
1118{ "Use Default of Selected Style","Default des selektierten Stils" }, 1118{ "Use Default of Selected Style","Default des selektierten Stils" },
1119{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1119{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1120{ "Portrait","Portrait" }, 1120{ "Portrait","Portrait" },
1121{ "Landscape","Landschaft" }, 1121{ "Landscape","Landschaft" },
1122{ "Print day","Drucke Tag" }, 1122{ "Print day","Drucke Tag" },
1123{ "CalPrintDay_Base","CalPrintDay_Base" }, 1123{ "CalPrintDay_Base","CalPrintDay_Base" },
1124{ "Date && Time Range","Datum && Zeitspanne" }, 1124{ "Date && Time Range","Datum && Zeitspanne" },
1125{ "&End date:","&Enddatum:" }, 1125{ "&End date:","&Enddatum:" },
1126{ "&Start date:","&Startdatum:" }, 1126{ "&Start date:","&Startdatum:" },
1127{ "Start &time:","Startzeit:" }, 1127{ "Start &time:","Startzeit:" },
1128{ "End ti&me:","Endzeit:" }, 1128{ "End ti&me:","Endzeit:" },
1129{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1129{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1130{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1130{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1131{ "Alt+D","Alt+D" }, 1131{ "Alt+D","Alt+D" },
1132{ "&Use colors","Nutze Farben" }, 1132{ "&Use colors","Nutze Farben" },
1133{ "Alt+U","Alt+U" }, 1133{ "Alt+U","Alt+U" },
1134{ "Print week","Drucke Woche" }, 1134{ "Print week","Drucke Woche" },
1135{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1135{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1136{ "Use &colors","Nutze Farben" }, 1136{ "Use &colors","Nutze Farben" },
1137{ "Type of View","Typ der Ansicht" }, 1137{ "Type of View","Typ der Ansicht" },
1138{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1138{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1139{ "Alt+F","Alt+F" }, 1139{ "Alt+F","Alt+F" },
1140{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1140{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1141{ "Alt+T","Alt+T" }, 1141{ "Alt+T","Alt+T" },
1142{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1142{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1143{ "Print month","Drucke Monat" }, 1143{ "Print month","Drucke Monat" },
1144{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1144{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1145{ "&Start month:","&Startmonat:" }, 1145{ "&Start month:","&Startmonat:" },
1146{ "&End month:","&Endmonat:" }, 1146{ "&End month:","&Endmonat:" },
1147{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1147{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1148{ "Print todos","Drucke Todos" }, 1148{ "Print todos","Drucke Todos" },
1149{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1149{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1150{ "Include &description of the item","Inclusive Itembeschreibung" }, 1150{ "Include &description of the item","Inclusive Itembeschreibung" },
1151{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1151{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1152{ "Include &priority of the item","Inclusive Priorität des Items" }, 1152{ "Include &priority of the item","Inclusive Priorität des Items" },
1153{ "Items to Print","Zu druckende Items" }, 1153{ "Items to Print","Zu druckende Items" },
1154{ "&From:","Von:" }, 1154{ "&From:","Von:" },
1155{ "&To:","Bis:" }, 1155{ "&To:","Bis:" },
1156{ "Print &all todo items","Drucke alle Todo Items" }, 1156{ "Print &all todo items","Drucke alle Todo Items" },
1157{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1157{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1158{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1158{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1159{ "Todo List","Todo Liste" }, 1159{ "Todo List","Todo Liste" },
1160{ "&Title:","&Titel:" }, 1160{ "&Title:","&Titel:" },
1161{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, 1161{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" },
1162{ "Todo list","Todo Liste" }, 1162{ "Todo list","Todo Liste" },
1163{ "&Print...","Drucke..." }, 1163{ "&Print...","Drucke..." },
1164{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1164{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1165{ "[Unconfigured]","[Unkonfiguriert]" }, 1165{ "[Unconfigured]","[Unkonfiguriert]" },
1166{ "OK","OK" }, 1166{ "OK","OK" },
1167{ "FilterEditor","FilterEditor" }, 1167{ "FilterEditor","FilterEditor" },
1168{ "Include","Inclusive" }, 1168{ "Include","Inclusive" },
1169{ "Exclude","Exclusive" }, 1169{ "Exclude","Exclusive" },
1170{ "Edit Selection...","Editiere Auswahl" }, 1170{ "Edit Selection...","Editiere Auswahl" },
1171{ "recurring events","wiederholende Termine" }, 1171{ "recurring events","wiederholende Termine" },
1172{ "recurr. events","wiederh.Termine" }, 1172{ "recurr. events","wiederh.Termine" },
1173{ "completed to-dos","erledigte Todos" }, 1173{ "completed to-dos","erledigte Todos" },
1174{ "events","Termine" }, 1174{ "events","Termine" },
1175{ "todos","Todos" }, 1175{ "todos","Todos" },
1176{ "journals","Journale" }, 1176{ "journals","Journale" },
1177{ "public","öffentl." }, 1177{ "public","öffentl." },
1178{ "private","privat" }, 1178{ "private","privat" },
1179{ "confidential","vertraul." }, 1179{ "confidential","vertraul." },
1180{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1180{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
1181{ "Yesterday","Gestern" }, 1181{ "Yesterday","Gestern" },
1182{ "Day after tomorrow","Übermorgen" }, 1182{ "Day after tomorrow","Übermorgen" },
1183{ "Tomorrow","Morgen" }, 1183{ "Tomorrow","Morgen" },
1184{ "Day before yesterday","Vorgestern" }, 1184{ "Day before yesterday","Vorgestern" },
1185{ "Size %1","Größe %1" }, 1185{ "Size %1","Größe %1" },
1186{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1186{ "New Agendasize: %1","Neue Agendagröße: %1" },
1187{ " (%1 y.)"," (%1 J.)" }, 1187{ " (%1 y.)"," (%1 J.)" },
1188{ "Allday:","Ganztägig:" }, 1188{ "Allday:","Ganztägig:" },
1189{ "compl.todos","erled.Todos" }, 1189{ "compl.todos","erled.Todos" },
1190{ "Day view","Tagesansicht" }, 1190{ "Day view","Tagesansicht" },
1191{ "Next days","Nächste Tage" }, 1191{ "Next days","Nächste Tage" },
1192{ "Next week","Nächste Woche" }, 1192{ "Next week","Nächste Woche" },
1193{ "Next two weeks","Nächste zwei Wochen" }, 1193{ "Next two weeks","Nächste zwei Wochen" },
1194{ "This month","Dieser Monat" }, 1194{ "This month","Dieser Monat" },
1195{ "Journal view","Journal" }, 1195{ "Journal view","Journal" },
1196{ "Display all opened","Zeige alle geöffnet" }, 1196{ "Display all opened","Zeige alle geöffnet" },
1197{ "Display all closed","Zeige alle geschlossen" }, 1197{ "Display all closed","Zeige alle geschlossen" },
1198{ "Display all flat","Zeige alle flach" }, 1198{ "Display all flat","Zeige alle flach" },
1199{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1199{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1200{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1200{ "Default todo done color:","Standard Todo erledigt Farbe" },
1201{ "Select week %1-%2","Wähle Woche %1-%2" }, 1201{ "Select week %1-%2","Wähle Woche %1-%2" },
1202{ "Select Week","Wähle Woche" }, 1202{ "Select Week","Wähle Woche" },
1203{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1203{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1204{ "Set Alarm!","Setze Alarm!" }, 1204{ "Set Alarm!","Setze Alarm!" },
1205{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1205{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1206{ " and "," und " }, 1206{ " and "," und " },
1207{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1207{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1208{ "Mail to selected","Mail an Ausgewählte" }, 1208{ "Mail to selected","Mail an Ausgewählte" },
1209{ "Mail to all","Mail an Alle" }, 1209{ "Mail to all","Mail an Alle" },
1210{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1210{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1211{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1211{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1212{ " on"," am" }, 1212{ " on"," am" },
1213{ " completed on "," erledigt am " }, 1213{ " completed on "," erledigt am " },
1214{ "Save as Event template","Speichere als Vorlage" }, 1214{ "Save as Event template","Speichere als Vorlage" },
1215{ "Load Event template","Lade Termin Vorlage" }, 1215{ "Load Event template","Lade Termin Vorlage" },
1216{ "Save as Journal template","Speichere als Journal Vorlage" }, 1216{ "Save as Journal template","Speichere als Journal Vorlage" },
1217{ "Insert Journal template","Füge Journal Vorlage ein" }, 1217{ "Insert Journal template","Füge Journal Vorlage ein" },
1218{ "Sub todos:<br>","Unter Todos:<br>" }, 1218{ "Sub todos:<br>","Unter Todos:<br>" },
1219{ "Parent todo:<br>","Über Todo:<br>" }, 1219{ "Parent todo:<br>","Über Todo:<br>" },
1220{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1220{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1221{ " completed"," erledigt" }, 1221{ " completed"," erledigt" },
1222{ "(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.info --- 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.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1222{ "(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.info --- 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.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1223{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1223{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1224{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1224{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1225{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1225{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1226{ "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?" }, 1226{ "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?" },
1227{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1227{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1228{ "Error","Fehler" }, 1228{ "Error","Fehler" },
1229{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1229{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1230{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1230{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1231{ "Warning","Warnung" }, 1231{ "Warning","Warnung" },
1232{ "Select week number","Wähle Wochen Nummer" }, 1232{ "Select week number","Wähle Wochen Nummer" },
1233{ "Februar","Februar" }, 1233{ "Februar","Februar" },
1234{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1234{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1235{ "W","W" }, 1235{ "W","W" },
1236{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1236{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1237{ "T: %1","T: %1" }, 1237{ "T: %1","T: %1" },
1238{ "Start: ","Start: " }, 1238{ "Start: ","Start: " },
1239{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1239{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1240{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1240{ "Password for remote access:","Passwort für fernen Zugriff:" },
1241{ "Remote IP address:","Ferne IP Adresse:" }, 1241{ "Remote IP address:","Ferne IP Adresse:" },
1242{ "Remote port number:","Ferne Port Nummer:" }, 1242{ "Remote port number:","Ferne Port Nummer:" },
1243{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1243{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1244{ "Remote from: ","Fern von: " }, 1244{ "Remote from: ","Fern von: " },
1245{ "Local from: ","Lokal von: " }, 1245{ "Local from: ","Lokal von: " },
1246{ "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" }, 1246{ "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" },
1247{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1247{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1248{ "Write back","Schreibe zurück" }, 1248{ "Write back","Schreibe zurück" },
1249{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1249{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1250{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1250{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1251{ "Received sync request","Sync Anfrage erhalten" }, 1251{ "Received sync request","Sync Anfrage erhalten" },
1252{ "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." }, 1252{ "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." },
1253{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1253{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1254{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1254{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1255{ "Sending file...","Sende Datei..." }, 1255{ "Sending file...","Sende Datei..." },
1256{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1256{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1257{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1257{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1258{ "Received %1 bytes","%1 Bytes erhalten" }, 1258{ "Received %1 bytes","%1 Bytes erhalten" },
1259{ "Writing file to disk...","Speichere Datei..." }, 1259{ "Writing file to disk...","Speichere Datei..." },
1260{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1260{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1261{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1261{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1262{ "Synchronize!","Synchronisiere!" }, 1262{ "Synchronize!","Synchronisiere!" },
1263{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1263{ "High clock skew!","Großer Uhrzeitunterschied!" },
1264{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1264{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1265{ "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!" }, 1265{ "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!" },
1266{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1266{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1267{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1267{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1268{ "List week view","Listenwochenansicht" }, 1268{ "List week view","Listenwochenansicht" },
1269{ "List week","Listenwochenansicht" }, 1269{ "List week","Listenwochenansicht" },
1270{ "Next Week","Nächste Woche" }, 1270{ "Next Week","Nächste Woche" },
1271{ "Previous Week","Vorherige Woche" }, 1271{ "Previous Week","Vorherige Woche" },
1272{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, 1272{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." },
1273{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1273{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1274{ "Details","Details" }, 1274{ "Details","Details" },
1275{ "Created time","Erstellt Zeit" }, 1275{ "Created time","Erstellt Zeit" },
1276{ "Last modified time","Geändert Zeit" }, 1276{ "Last modified time","Geändert Zeit" },
1277{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1277{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1278{ "View Options","Anzeige Optionen" }, 1278{ "View Options","Anzeige Optionen" },
1279{ "<b>Created: ","<b>Erstellt am: " }, 1279{ "<b>Created: ","<b>Erstellt am: " },
1280{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1280{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1281{ "Journal: ","Journal: " }, 1281{ "Journal: ","Journal: " },
1282{ "yearly","jährlich" }, 1282{ "yearly","jährlich" },
1283{ "(%1) ","%1-" }, 1283{ "(%1) ","%1-" },
1284{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1284{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1285{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1285{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1286{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1286{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1287{ "Summary/Loc.","Titel/Ort" }, 1287{ "Summary/Loc.","Titel/Ort" },
1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1289{ "Week Number","Wochennummer" }, 1289{ "Week Number","Wochennummer" },
1290{ "Import","Importiere" }, 1290{ "Import","Importiere" },
1291{ "Export","Exportiere" }, 1291{ "Export","Exportiere" },
1292{ "Beam","Beame" }, 1292{ "Beam","Beame" },
1293{ "Export selected","Exportiere Selektierte" }, 1293{ "Export selected","Exportiere Selektierte" },
1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1296{ "Journal/Details...","Journale/Details..." }, 1296{ "Journal/Details...","Journale/Details..." },
1297{ "Agenda View","Agenda Ansicht" }, 1297{ "Agenda View","Agenda Ansicht" },
1298{ "Show current time","Zeige aktuelle Zeit" }, 1298{ "Show current time","Zeige aktuelle Zeit" },
1299{ "Edit new item","Bearbeite neuen Eintrag" }, 1299{ "Edit new item","Bearbeite neuen Eintrag" },
1300{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, 1300{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" },
1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1304{ "%1 days\n","%1 Tagen\n" }, 1304{ "%1 days\n","%1 Tagen\n" },
1305{ "1 day\n","1 Tag\n" }, 1305{ "1 day\n","1 Tag\n" },
1306{ "%1 hours\n","%1 Stunden\n" }, 1306{ "%1 hours\n","%1 Stunden\n" },
1307{ "1 hour\n","1 Stunde\n" }, 1307{ "1 hour\n","1 Stunde\n" },
1308{ "%1 minutes\n","%1 Minuten\n" }, 1308{ "%1 minutes\n","%1 Minuten\n" },
1309{ "1 minute\n","1 Minute\n" }, 1309{ "1 minute\n","1 Minute\n" },
1310{ "Only one toolbar","Nur eine Toolbar" }, 1310{ "Only one toolbar","Nur eine Toolbar" },
1311{ "Print","Drucke" }, 1311{ "Print","Drucke" },
1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1313{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1313{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1316{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, 1316{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" },
1317{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1317{ "KO/Pi Printout","KO/Pi Ausdruck" },
1318{ "Print unscaled","Drucke unskaliert" }, 1318{ "Print unscaled","Drucke unskaliert" },
1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1321{ "Printout Mode","Druck Modus" }, 1321{ "Printout Mode","Druck Modus" },
1322{ "Filter menu icon","Filtermenu Icon" }, 1322{ "Filter menu icon","Filtermenu Icon" },
1323{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, 1323{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" },
1324{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, 1324{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" },
1325{ "%1d","%1t" }, 1325{ "%1d","%1t" },
1326{ "%1h","%1std" }, 1326{ "%1h","%1std" },
1327{ "%1min","%1min" }, 1327{ "%1min","%1min" },
1328{ "( %1 before )","( %1 vorher )" }, 1328{ "( %1 before )","( %1 vorher )" },
1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" }, 1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" },
1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1335{ " on "," am " }, 1335{ " on "," am " },
1336{ "On: ","Am: " }, 1336{ "On: ","Am: " },
1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1338{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1338{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1339{ "Color for running todos:","Farbe für laufende Todos:" }, 1339{ "Color for running todos:","Farbe für laufende Todos:" },
1340{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, 1340{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" },
1341{ "Todo is started","Todo is gestarted" }, 1341{ "Todo is started","Todo is gestarted" },
1342{ "Stop todo","Stoppe Todo" }, 1342{ "Stop todo","Stoppe Todo" },
1343{ "Todo is stopped","Todo ist gestoppt" }, 1343{ "Todo is stopped","Todo ist gestoppt" },
1344{ "Start todo","Starte Todo" }, 1344{ "Start todo","Starte Todo" },
1345{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, 1345{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
1346{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie\nalle Untertodos auch klonen?" },
1347{ "Todo has subtodos","Todo hat Untertodos" },
1348{ "","" },
1349{ "","" },
1350{ "","" },
1346{ "","" }, 1351{ "","" },
1347{ "","" }, 1352{ "","" },
1348{ "","" }, 1353{ "","" },
1349{ "","" }, 1354{ "","" },
1350{ "","" }, 1355{ "","" },
1351{ "","" }, 1356{ "","" },
1352{ "","" }, 1357{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index c530037..bd7376a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2323,773 +2323,794 @@ void CalendarView::edit_paste()
2323 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); 2323 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
2324} 2324}
2325 2325
2326void CalendarView::edit_options() 2326void CalendarView::edit_options()
2327{ 2327{
2328 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; 2328 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId;
2329 emit save(); 2329 emit save();
2330 emit saveStopTimer(); 2330 emit saveStopTimer();
2331 mDialogManager->showOptionsDialog(); 2331 mDialogManager->showOptionsDialog();
2332 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { 2332 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) {
2333 emit saveStopTimer(); 2333 emit saveStopTimer();
2334 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), 2334 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"),
2335 i18n("Timezone settings"),i18n("Reload"))) { 2335 i18n("Timezone settings"),i18n("Reload"))) {
2336 qDebug("KO: TZ reload cancelled "); 2336 qDebug("KO: TZ reload cancelled ");
2337 return; 2337 return;
2338 } 2338 }
2339 qDebug("KO: Timezone change "); 2339 qDebug("KO: Timezone change ");
2340 openCalendar( MainWindow::defaultFileName() ); 2340 openCalendar( MainWindow::defaultFileName() );
2341 setModified(true); 2341 setModified(true);
2342 } 2342 }
2343 else 2343 else
2344 qDebug("KO: No tz change "); 2344 qDebug("KO: No tz change ");
2345 2345
2346} 2346}
2347 2347
2348 2348
2349void CalendarView::slotSelectPickerDate( QDate d) 2349void CalendarView::slotSelectPickerDate( QDate d)
2350{ 2350{
2351 mDateFrame->hide(); 2351 mDateFrame->hide();
2352 if ( mDatePickerMode == 1 ) { 2352 if ( mDatePickerMode == 1 ) {
2353 mNavigator->slotDaySelect( d ); 2353 mNavigator->slotDaySelect( d );
2354 } else if ( mDatePickerMode == 2 ) { 2354 } else if ( mDatePickerMode == 2 ) {
2355 if ( mMoveIncidence->type() == "Todo" ) { 2355 if ( mMoveIncidence->type() == "Todo" ) {
2356 Todo * to = (Todo *) mMoveIncidence; 2356 Todo * to = (Todo *) mMoveIncidence;
2357 QTime tim; 2357 QTime tim;
2358 int len = 0; 2358 int len = 0;
2359 if ( to->hasStartDate() && to->hasDueDate() ) 2359 if ( to->hasStartDate() && to->hasDueDate() )
2360 len = to->dtStart().secsTo( to->dtDue()); 2360 len = to->dtStart().secsTo( to->dtDue());
2361 if ( to->hasDueDate() ) 2361 if ( to->hasDueDate() )
2362 tim = to->dtDue().time(); 2362 tim = to->dtDue().time();
2363 else { 2363 else {
2364 tim = QTime ( 0,0,0 ); 2364 tim = QTime ( 0,0,0 );
2365 to->setFloats( true ); 2365 to->setFloats( true );
2366 to->setHasDueDate( true ); 2366 to->setHasDueDate( true );
2367 } 2367 }
2368 QDateTime dt ( d,tim ); 2368 QDateTime dt ( d,tim );
2369 to->setDtDue( dt ); 2369 to->setDtDue( dt );
2370 2370
2371 if ( to->hasStartDate() ) { 2371 if ( to->hasStartDate() ) {
2372 if ( len>0 ) 2372 if ( len>0 )
2373 to->setDtStart(to->dtDue().addSecs( -len )); 2373 to->setDtStart(to->dtDue().addSecs( -len ));
2374 else 2374 else
2375 if (to->dtStart() > to->dtDue() ) 2375 if (to->dtStart() > to->dtDue() )
2376 to->setDtStart(to->dtDue().addDays( -3 )); 2376 to->setDtStart(to->dtDue().addDays( -3 ));
2377 } 2377 }
2378 2378
2379 todoChanged( to ); 2379 todoChanged( to );
2380 } else { 2380 } else {
2381 if ( mMoveIncidence->doesRecur() ) { 2381 if ( mMoveIncidence->doesRecur() ) {
2382#if 0 2382#if 0
2383 // PENDING implement this 2383 // PENDING implement this
2384 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); 2384 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate );
2385 mCalendar()->addIncidence( newInc ); 2385 mCalendar()->addIncidence( newInc );
2386 if ( mMoveIncidence->type() == "Todo" ) 2386 if ( mMoveIncidence->type() == "Todo" )
2387 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); 2387 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED );
2388 else 2388 else
2389 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); 2389 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED);
2390 mMoveIncidence = newInc; 2390 mMoveIncidence = newInc;
2391 2391
2392#endif 2392#endif
2393 } 2393 }
2394 QTime tim = mMoveIncidence->dtStart().time(); 2394 QTime tim = mMoveIncidence->dtStart().time();
2395 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); 2395 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd());
2396 QDateTime dt ( d,tim ); 2396 QDateTime dt ( d,tim );
2397 mMoveIncidence->setDtStart( dt ); 2397 mMoveIncidence->setDtStart( dt );
2398 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); 2398 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) );
2399 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); 2399 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED);
2400 } 2400 }
2401 2401
2402 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); 2402 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 );
2403 } 2403 }
2404} 2404}
2405 2405
2406void CalendarView::removeCategories() 2406void CalendarView::removeCategories()
2407{ 2407{
2408 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2408 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2409 QStringList catList = KOPrefs::instance()->mCustomCategories; 2409 QStringList catList = KOPrefs::instance()->mCustomCategories;
2410 QStringList catIncList; 2410 QStringList catIncList;
2411 QStringList newCatList; 2411 QStringList newCatList;
2412 Incidence* inc = incList.first(); 2412 Incidence* inc = incList.first();
2413 int i; 2413 int i;
2414 int count = 0; 2414 int count = 0;
2415 while ( inc ) { 2415 while ( inc ) {
2416 newCatList.clear(); 2416 newCatList.clear();
2417 catIncList = inc->categories() ; 2417 catIncList = inc->categories() ;
2418 for( i = 0; i< catIncList.count(); ++i ) { 2418 for( i = 0; i< catIncList.count(); ++i ) {
2419 if ( catList.contains (catIncList[i])) 2419 if ( catList.contains (catIncList[i]))
2420 newCatList.append( catIncList[i] ); 2420 newCatList.append( catIncList[i] );
2421 } 2421 }
2422 newCatList.sort(); 2422 newCatList.sort();
2423 inc->setCategories( newCatList.join(",") ); 2423 inc->setCategories( newCatList.join(",") );
2424 inc = incList.next(); 2424 inc = incList.next();
2425 } 2425 }
2426} 2426}
2427 2427
2428int CalendarView::addCategories() 2428int CalendarView::addCategories()
2429{ 2429{
2430 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2430 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2431 QStringList catList = KOPrefs::instance()->mCustomCategories; 2431 QStringList catList = KOPrefs::instance()->mCustomCategories;
2432 QStringList catIncList; 2432 QStringList catIncList;
2433 Incidence* inc = incList.first(); 2433 Incidence* inc = incList.first();
2434 int i; 2434 int i;
2435 int count = 0; 2435 int count = 0;
2436 while ( inc ) { 2436 while ( inc ) {
2437 catIncList = inc->categories() ; 2437 catIncList = inc->categories() ;
2438 for( i = 0; i< catIncList.count(); ++i ) { 2438 for( i = 0; i< catIncList.count(); ++i ) {
2439 if ( !catList.contains (catIncList[i])) { 2439 if ( !catList.contains (catIncList[i])) {
2440 catList.append( catIncList[i] ); 2440 catList.append( catIncList[i] );
2441 //qDebug("add cat %s ", catIncList[i].latin1()); 2441 //qDebug("add cat %s ", catIncList[i].latin1());
2442 ++count; 2442 ++count;
2443 } 2443 }
2444 } 2444 }
2445 inc = incList.next(); 2445 inc = incList.next();
2446 } 2446 }
2447 catList.sort(); 2447 catList.sort();
2448 KOPrefs::instance()->mCustomCategories = catList; 2448 KOPrefs::instance()->mCustomCategories = catList;
2449 return count; 2449 return count;
2450} 2450}
2451 2451
2452void CalendarView::manageCategories() 2452void CalendarView::manageCategories()
2453{ 2453{
2454 KOCatPrefs* cp = new KOCatPrefs(); 2454 KOCatPrefs* cp = new KOCatPrefs();
2455 cp->show(); 2455 cp->show();
2456 int w =cp->sizeHint().width() ; 2456 int w =cp->sizeHint().width() ;
2457 int h = cp->sizeHint().height() ; 2457 int h = cp->sizeHint().height() ;
2458 int dw = QApplication::desktop()->width(); 2458 int dw = QApplication::desktop()->width();
2459 int dh = QApplication::desktop()->height(); 2459 int dh = QApplication::desktop()->height();
2460 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2460 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2461 if ( !cp->exec() ) { 2461 if ( !cp->exec() ) {
2462 delete cp; 2462 delete cp;
2463 return; 2463 return;
2464 } 2464 }
2465 int count = 0; 2465 int count = 0;
2466 if ( cp->addCat() ) { 2466 if ( cp->addCat() ) {
2467 count = addCategories(); 2467 count = addCategories();
2468 if ( count ) { 2468 if ( count ) {
2469 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); 2469 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! "));
2470 writeSettings(); 2470 writeSettings();
2471 } else 2471 } else
2472 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); 2472 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! "));
2473 } else { 2473 } else {
2474 removeCategories(); 2474 removeCategories();
2475 updateView(); 2475 updateView();
2476 } 2476 }
2477 delete cp; 2477 delete cp;
2478} 2478}
2479 2479
2480void CalendarView::beamIncidence(Incidence * Inc) 2480void CalendarView::beamIncidence(Incidence * Inc)
2481{ 2481{
2482 QPtrList<Incidence> delSel ; 2482 QPtrList<Incidence> delSel ;
2483 delSel.append(Inc); 2483 delSel.append(Inc);
2484 beamIncidenceList( delSel ); 2484 beamIncidenceList( delSel );
2485} 2485}
2486void CalendarView::beamCalendar() 2486void CalendarView::beamCalendar()
2487{ 2487{
2488 QPtrList<Incidence> delSel = mCalendar->rawIncidences(); 2488 QPtrList<Incidence> delSel = mCalendar->rawIncidences();
2489 //qDebug("beamCalendar() "); 2489 //qDebug("beamCalendar() ");
2490 beamIncidenceList( delSel ); 2490 beamIncidenceList( delSel );
2491} 2491}
2492void CalendarView::beamFilteredCalendar() 2492void CalendarView::beamFilteredCalendar()
2493{ 2493{
2494 QPtrList<Incidence> delSel = mCalendar->incidences(); 2494 QPtrList<Incidence> delSel = mCalendar->incidences();
2495 //qDebug("beamFilteredCalendar() "); 2495 //qDebug("beamFilteredCalendar() ");
2496 beamIncidenceList( delSel ); 2496 beamIncidenceList( delSel );
2497} 2497}
2498void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) 2498void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2499{ 2499{
2500 if ( beamDialog->exec () == QDialog::Rejected ) 2500 if ( beamDialog->exec () == QDialog::Rejected )
2501 return; 2501 return;
2502#ifdef DESKTOP_VERSION 2502#ifdef DESKTOP_VERSION
2503 QString fn = locateLocal( "tmp", "kopibeamfile" ); 2503 QString fn = locateLocal( "tmp", "kopibeamfile" );
2504#else 2504#else
2505 QString fn = "/tmp/kopibeamfile"; 2505 QString fn = "/tmp/kopibeamfile";
2506#endif 2506#endif
2507 QString mes; 2507 QString mes;
2508 bool createbup = true; 2508 bool createbup = true;
2509 if ( createbup ) { 2509 if ( createbup ) {
2510 QString description = "\n"; 2510 QString description = "\n";
2511 CalendarLocal* cal = new CalendarLocal(); 2511 CalendarLocal* cal = new CalendarLocal();
2512 if ( beamDialog->beamLocal() ) 2512 if ( beamDialog->beamLocal() )
2513 cal->setLocalTime(); 2513 cal->setLocalTime();
2514 else 2514 else
2515 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2515 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2516 Incidence *incidence = delSel.first(); 2516 Incidence *incidence = delSel.first();
2517 bool addText = false; 2517 bool addText = false;
2518 if ( delSel.count() < 10 ) 2518 if ( delSel.count() < 10 )
2519 addText = true; 2519 addText = true;
2520 else { 2520 else {
2521 description.sprintf(i18n(" %d items?"),delSel.count() ); 2521 description.sprintf(i18n(" %d items?"),delSel.count() );
2522 } 2522 }
2523 while ( incidence ) { 2523 while ( incidence ) {
2524 Incidence *in = incidence->clone(); 2524 Incidence *in = incidence->clone();
2525 if ( ! in->summary().isEmpty() ) { 2525 if ( ! in->summary().isEmpty() ) {
2526 in->setDescription(""); 2526 in->setDescription("");
2527 } else { 2527 } else {
2528 in->setSummary( in->description().left(20)); 2528 in->setSummary( in->description().left(20));
2529 in->setDescription(""); 2529 in->setDescription("");
2530 } 2530 }
2531 if ( addText ) 2531 if ( addText )
2532 description += in->summary() + "\n"; 2532 description += in->summary() + "\n";
2533 cal->addIncidence( in ); 2533 cal->addIncidence( in );
2534 incidence = delSel.next(); 2534 incidence = delSel.next();
2535 } 2535 }
2536 if ( beamDialog->beamVcal() ) { 2536 if ( beamDialog->beamVcal() ) {
2537 fn += ".vcs"; 2537 fn += ".vcs";
2538 FileStorage storage( cal, fn, new VCalFormat ); 2538 FileStorage storage( cal, fn, new VCalFormat );
2539 storage.save(); 2539 storage.save();
2540 } else { 2540 } else {
2541 fn += ".ics"; 2541 fn += ".ics";
2542 FileStorage storage( cal, fn, new ICalFormat( ) ); 2542 FileStorage storage( cal, fn, new ICalFormat( ) );
2543 storage.save(); 2543 storage.save();
2544 } 2544 }
2545 delete cal; 2545 delete cal;
2546 mes = i18n("KO/Pi: Ready for beaming"); 2546 mes = i18n("KO/Pi: Ready for beaming");
2547 topLevelWidget()->setCaption(mes); 2547 topLevelWidget()->setCaption(mes);
2548 KApplication::convert2latin1( fn ); 2548 KApplication::convert2latin1( fn );
2549#ifndef DESKTOP_VERSION 2549#ifndef DESKTOP_VERSION
2550 Ir *ir = new Ir( this ); 2550 Ir *ir = new Ir( this );
2551 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 2551 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
2552 ir->send( fn, description, "text/x-vCalendar" ); 2552 ir->send( fn, description, "text/x-vCalendar" );
2553#endif 2553#endif
2554 } 2554 }
2555} 2555}
2556void CalendarView::beamDone( Ir *ir ) 2556void CalendarView::beamDone( Ir *ir )
2557{ 2557{
2558#ifndef DESKTOP_VERSION 2558#ifndef DESKTOP_VERSION
2559 delete ir; 2559 delete ir;
2560#endif 2560#endif
2561 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); 2561 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") );
2562 topLevelWidget()->raise(); 2562 topLevelWidget()->raise();
2563} 2563}
2564 2564
2565void CalendarView::moveIncidence(Incidence * inc ) 2565void CalendarView::moveIncidence(Incidence * inc )
2566{ 2566{
2567 if ( !inc ) return; 2567 if ( !inc ) return;
2568 showDatePickerPopup(); 2568 showDatePickerPopup();
2569 mDatePickerMode = 2; 2569 mDatePickerMode = 2;
2570 mMoveIncidence = inc ; 2570 mMoveIncidence = inc ;
2571 QDate da; 2571 QDate da;
2572 if ( mMoveIncidence->type() == "Todo" ) { 2572 if ( mMoveIncidence->type() == "Todo" ) {
2573 Todo * to = (Todo *) mMoveIncidence; 2573 Todo * to = (Todo *) mMoveIncidence;
2574 if ( to->hasDueDate() ) 2574 if ( to->hasDueDate() )
2575 da = to->dtDue().date(); 2575 da = to->dtDue().date();
2576 else 2576 else
2577 da = QDate::currentDate(); 2577 da = QDate::currentDate();
2578 } else { 2578 } else {
2579 da = mMoveIncidence->dtStart().date(); 2579 da = mMoveIncidence->dtStart().date();
2580 } 2580 }
2581 //PENDING set date for recurring incidence to date of recurrence 2581 //PENDING set date for recurring incidence to date of recurrence
2582 //mMoveIncidenceOldDate; 2582 //mMoveIncidenceOldDate;
2583 mDatePicker->setDate( da ); 2583 mDatePicker->setDate( da );
2584} 2584}
2585void CalendarView::showDatePickerPopup() 2585void CalendarView::showDatePickerPopup()
2586{ 2586{
2587 if ( mDateFrame->isVisible() ) 2587 if ( mDateFrame->isVisible() )
2588 mDateFrame->hide(); 2588 mDateFrame->hide();
2589 else { 2589 else {
2590 int offX = 0, offY = 0; 2590 int offX = 0, offY = 0;
2591#ifdef DESKTOP_VERSION 2591#ifdef DESKTOP_VERSION
2592 int w =mDatePicker->sizeHint().width() ; 2592 int w =mDatePicker->sizeHint().width() ;
2593 int h = mDatePicker->sizeHint().height() ; 2593 int h = mDatePicker->sizeHint().height() ;
2594 int dw = topLevelWidget()->width(); 2594 int dw = topLevelWidget()->width();
2595 int dh = topLevelWidget()->height(); 2595 int dh = topLevelWidget()->height();
2596 offX = topLevelWidget()->x(); 2596 offX = topLevelWidget()->x();
2597 offY = topLevelWidget()->y(); 2597 offY = topLevelWidget()->y();
2598#else 2598#else
2599 int w =mDatePicker->sizeHint().width() ; 2599 int w =mDatePicker->sizeHint().width() ;
2600 int h = mDatePicker->sizeHint().height() ; 2600 int h = mDatePicker->sizeHint().height() ;
2601 int dw = QApplication::desktop()->width(); 2601 int dw = QApplication::desktop()->width();
2602 int dh = QApplication::desktop()->height(); 2602 int dh = QApplication::desktop()->height();
2603#endif 2603#endif
2604 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); 2604 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h );
2605 mDateFrame->show(); 2605 mDateFrame->show();
2606 } 2606 }
2607} 2607}
2608void CalendarView::showDatePicker( ) 2608void CalendarView::showDatePicker( )
2609{ 2609{
2610 showDatePickerPopup(); 2610 showDatePickerPopup();
2611 mDatePickerMode = 1; 2611 mDatePickerMode = 1;
2612 mDatePicker->setDate( mNavigator->selectedDates().first() ); 2612 mDatePicker->setDate( mNavigator->selectedDates().first() );
2613} 2613}
2614 2614
2615void CalendarView::showEventEditor() 2615void CalendarView::showEventEditor()
2616{ 2616{
2617#ifdef DESKTOP_VERSION 2617#ifdef DESKTOP_VERSION
2618 int x,y,w,h; 2618 int x,y,w,h;
2619 x = mEventEditor->geometry().x(); 2619 x = mEventEditor->geometry().x();
2620 y = mEventEditor->geometry().y(); 2620 y = mEventEditor->geometry().y();
2621 w = mEventEditor->width(); 2621 w = mEventEditor->width();
2622 h = mEventEditor->height(); 2622 h = mEventEditor->height();
2623 mEventEditor->show(); 2623 mEventEditor->show();
2624 mEventEditor->setGeometry(x,y,w,h); 2624 mEventEditor->setGeometry(x,y,w,h);
2625#else 2625#else
2626 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { 2626 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
2627 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2627 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2628 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); 2628 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
2629 qApp->processEvents(); 2629 qApp->processEvents();
2630 delete mEventEditor; 2630 delete mEventEditor;
2631 mEventEditor = mDialogManager->getEventEditor(); 2631 mEventEditor = mDialogManager->getEventEditor();
2632 topLevelWidget()->setCaption( i18n("") ); 2632 topLevelWidget()->setCaption( i18n("") );
2633 } 2633 }
2634 mEventEditor->showMaximized(); 2634 mEventEditor->showMaximized();
2635#endif 2635#endif
2636} 2636}
2637void CalendarView::showTodoEditor() 2637void CalendarView::showTodoEditor()
2638{ 2638{
2639#ifdef DESKTOP_VERSION 2639#ifdef DESKTOP_VERSION
2640 int x,y,w,h; 2640 int x,y,w,h;
2641 x = mTodoEditor->geometry().x(); 2641 x = mTodoEditor->geometry().x();
2642 y = mTodoEditor->geometry().y(); 2642 y = mTodoEditor->geometry().y();
2643 w = mTodoEditor->width(); 2643 w = mTodoEditor->width();
2644 h = mTodoEditor->height(); 2644 h = mTodoEditor->height();
2645 mTodoEditor->show(); 2645 mTodoEditor->show();
2646 mTodoEditor->setGeometry(x,y,w,h); 2646 mTodoEditor->setGeometry(x,y,w,h);
2647#else 2647#else
2648 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { 2648 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
2649 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2649 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2650 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); 2650 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
2651 qApp->processEvents(); 2651 qApp->processEvents();
2652 delete mTodoEditor; 2652 delete mTodoEditor;
2653 mTodoEditor = mDialogManager->getTodoEditor(); 2653 mTodoEditor = mDialogManager->getTodoEditor();
2654 topLevelWidget()->setCaption( i18n("") ); 2654 topLevelWidget()->setCaption( i18n("") );
2655 } 2655 }
2656 mTodoEditor->showMaximized(); 2656 mTodoEditor->showMaximized();
2657#endif 2657#endif
2658} 2658}
2659 2659
2660void CalendarView::cloneIncidence() 2660void CalendarView::cloneIncidence()
2661{ 2661{
2662 Incidence *incidence = currentSelection(); 2662 Incidence *incidence = currentSelection();
2663 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2663 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2664 if ( incidence ) { 2664 if ( incidence ) {
2665 cloneIncidence(incidence); 2665 cloneIncidence(incidence);
2666 } 2666 }
2667} 2667}
2668void CalendarView::moveIncidence() 2668void CalendarView::moveIncidence()
2669{ 2669{
2670 Incidence *incidence = currentSelection(); 2670 Incidence *incidence = currentSelection();
2671 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2671 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2672 if ( incidence ) { 2672 if ( incidence ) {
2673 moveIncidence(incidence); 2673 moveIncidence(incidence);
2674 } 2674 }
2675} 2675}
2676void CalendarView::beamIncidence() 2676void CalendarView::beamIncidence()
2677{ 2677{
2678 Incidence *incidence = currentSelection(); 2678 Incidence *incidence = currentSelection();
2679 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2679 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2680 if ( incidence ) { 2680 if ( incidence ) {
2681 beamIncidence(incidence); 2681 beamIncidence(incidence);
2682 } 2682 }
2683} 2683}
2684void CalendarView::toggleCancelIncidence() 2684void CalendarView::toggleCancelIncidence()
2685{ 2685{
2686 Incidence *incidence = currentSelection(); 2686 Incidence *incidence = currentSelection();
2687 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2687 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2688 if ( incidence ) { 2688 if ( incidence ) {
2689 cancelIncidence(incidence); 2689 cancelIncidence(incidence);
2690 } 2690 }
2691} 2691}
2692 2692
2693 2693
2694void CalendarView::cancelIncidence(Incidence * inc ) 2694void CalendarView::cancelIncidence(Incidence * inc )
2695{ 2695{
2696 inc->setCancelled( ! inc->cancelled() ); 2696 inc->setCancelled( ! inc->cancelled() );
2697 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); 2697 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
2698 updateView(); 2698 updateView();
2699} 2699}
2700void CalendarView::cloneIncidence(Incidence * orgInc ) 2700void CalendarView::cloneIncidence(Incidence * orgInc )
2701{ 2701{
2702 Incidence * newInc = orgInc->clone(); 2702 Incidence * newInc = orgInc->clone();
2703 newInc->recreate(); 2703 newInc->recreate();
2704 2704
2705 if ( newInc->type() == "Todo" ) { 2705 if ( newInc->type() == "Todo" ) {
2706 Todo* t = (Todo*) newInc; 2706 Todo* t = (Todo*) newInc;
2707 bool cloneSub = false;
2708 if ( orgInc->relations().count() ) {
2709 int result = KMessageBox::warningYesNoCancel(this,
2710 i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ),
2711 i18n("Todo has subtodos"),
2712 i18n("Yes"),
2713 i18n("No"));
2714
2715 if ( result == KMessageBox::Cancel ) {
2716 delete t;
2717 return;
2718 }
2719 if (result == KMessageBox::Yes) cloneSub = true;
2720 }
2707 showTodoEditor(); 2721 showTodoEditor();
2708 mTodoEditor->editTodo( t ); 2722 mTodoEditor->editTodo( t );
2709 if ( mTodoEditor->exec() ) { 2723 if ( mTodoEditor->exec() ) {
2710 mCalendar->addTodo( t ); 2724 if ( cloneSub ) {
2711 updateView(); 2725 orgInc->cloneRelations( t );
2726 mCalendar->addIncidenceBranch( t );
2727 updateView();
2728
2729 } else {
2730 mCalendar->addTodo( t );
2731 updateView();
2732 }
2712 } else { 2733 } else {
2713 delete t; 2734 delete t;
2714 } 2735 }
2715 } 2736 }
2716 else { 2737 else {
2717 Event* e = (Event*) newInc; 2738 Event* e = (Event*) newInc;
2718 showEventEditor(); 2739 showEventEditor();
2719 mEventEditor->editEvent( e ); 2740 mEventEditor->editEvent( e );
2720 if ( mEventEditor->exec() ) { 2741 if ( mEventEditor->exec() ) {
2721 mCalendar->addEvent( e ); 2742 mCalendar->addEvent( e );
2722 updateView(); 2743 updateView();
2723 } else { 2744 } else {
2724 delete e; 2745 delete e;
2725 } 2746 }
2726 } 2747 }
2727 setActiveWindow(); 2748 setActiveWindow();
2728} 2749}
2729 2750
2730void CalendarView::newEvent() 2751void CalendarView::newEvent()
2731{ 2752{
2732 // TODO: Replace this code by a common eventDurationHint of KOBaseView. 2753 // TODO: Replace this code by a common eventDurationHint of KOBaseView.
2733 KOAgendaView *aView = mViewManager->agendaView(); 2754 KOAgendaView *aView = mViewManager->agendaView();
2734 if (aView) { 2755 if (aView) {
2735 if (aView->selectionStart().isValid()) { 2756 if (aView->selectionStart().isValid()) {
2736 if (aView->selectedIsAllDay()) { 2757 if (aView->selectedIsAllDay()) {
2737 newEvent(aView->selectionStart(),aView->selectionEnd(),true); 2758 newEvent(aView->selectionStart(),aView->selectionEnd(),true);
2738 } else { 2759 } else {
2739 newEvent(aView->selectionStart(),aView->selectionEnd()); 2760 newEvent(aView->selectionStart(),aView->selectionEnd());
2740 } 2761 }
2741 return; 2762 return;
2742 } 2763 }
2743 } 2764 }
2744 2765
2745 QDate date = mNavigator->selectedDates().first(); 2766 QDate date = mNavigator->selectedDates().first();
2746 QDateTime current = QDateTime::currentDateTime(); 2767 QDateTime current = QDateTime::currentDateTime();
2747 if ( date <= current.date() ) { 2768 if ( date <= current.date() ) {
2748 int hour = current.time().hour() +1; 2769 int hour = current.time().hour() +1;
2749 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), 2770 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ),
2750 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 2771 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
2751 } else 2772 } else
2752 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), 2773 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ),
2753 QDateTime( date, QTime( KOPrefs::instance()->mStartTime + 2774 QDateTime( date, QTime( KOPrefs::instance()->mStartTime +
2754 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 2775 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
2755} 2776}
2756 2777
2757void CalendarView::newEvent(QDateTime fh) 2778void CalendarView::newEvent(QDateTime fh)
2758{ 2779{
2759 newEvent(fh, 2780 newEvent(fh,
2760 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); 2781 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration)));
2761} 2782}
2762 2783
2763void CalendarView::newEvent(QDate dt) 2784void CalendarView::newEvent(QDate dt)
2764{ 2785{
2765 newEvent(QDateTime(dt, QTime(0,0,0)), 2786 newEvent(QDateTime(dt, QTime(0,0,0)),
2766 QDateTime(dt, QTime(0,0,0)), true); 2787 QDateTime(dt, QTime(0,0,0)), true);
2767} 2788}
2768void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) 2789void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint)
2769{ 2790{
2770 newEvent(fromHint, toHint, false); 2791 newEvent(fromHint, toHint, false);
2771} 2792}
2772void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) 2793void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
2773{ 2794{
2774 2795
2775 showEventEditor(); 2796 showEventEditor();
2776 mEventEditor->newEvent(fromHint,toHint,allDay); 2797 mEventEditor->newEvent(fromHint,toHint,allDay);
2777 if ( mFilterView->filtersEnabled() ) { 2798 if ( mFilterView->filtersEnabled() ) {
2778 CalFilter *filter = mFilterView->selectedFilter(); 2799 CalFilter *filter = mFilterView->selectedFilter();
2779 if (filter && filter->showCategories()) { 2800 if (filter && filter->showCategories()) {
2780 mEventEditor->setCategories(filter->categoryList().join(",") ); 2801 mEventEditor->setCategories(filter->categoryList().join(",") );
2781 } 2802 }
2782 if ( filter ) 2803 if ( filter )
2783 mEventEditor->setSecrecy( filter->getSecrecy() ); 2804 mEventEditor->setSecrecy( filter->getSecrecy() );
2784 } 2805 }
2785 mEventEditor->exec(); 2806 mEventEditor->exec();
2786 setActiveWindow(); 2807 setActiveWindow();
2787} 2808}
2788void CalendarView::todoAdded(Todo * t) 2809void CalendarView::todoAdded(Todo * t)
2789{ 2810{
2790 2811
2791 changeTodoDisplay ( t ,KOGlobals::EVENTADDED); 2812 changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
2792 updateTodoViews(); 2813 updateTodoViews();
2793} 2814}
2794void CalendarView::todoChanged(Todo * t) 2815void CalendarView::todoChanged(Todo * t)
2795{ 2816{
2796 emit todoModified( t, 4 ); 2817 emit todoModified( t, 4 );
2797 // updateTodoViews(); 2818 // updateTodoViews();
2798} 2819}
2799void CalendarView::todoToBeDeleted(Todo *) 2820void CalendarView::todoToBeDeleted(Todo *)
2800{ 2821{
2801 //qDebug("todoToBeDeleted(Todo *) "); 2822 //qDebug("todoToBeDeleted(Todo *) ");
2802 updateTodoViews(); 2823 updateTodoViews();
2803} 2824}
2804void CalendarView::todoDeleted() 2825void CalendarView::todoDeleted()
2805{ 2826{
2806 //qDebug(" todoDeleted()"); 2827 //qDebug(" todoDeleted()");
2807 updateTodoViews(); 2828 updateTodoViews();
2808} 2829}
2809 2830
2810 2831
2811void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) 2832void CalendarView::newTodoDateTime( QDateTime dt, bool allday )
2812{ 2833{
2813 showTodoEditor(); 2834 showTodoEditor();
2814 mTodoEditor->newTodo(dt,0,allday); 2835 mTodoEditor->newTodo(dt,0,allday);
2815 if ( mFilterView->filtersEnabled() ) { 2836 if ( mFilterView->filtersEnabled() ) {
2816 CalFilter *filter = mFilterView->selectedFilter(); 2837 CalFilter *filter = mFilterView->selectedFilter();
2817 if (filter && filter->showCategories()) { 2838 if (filter && filter->showCategories()) {
2818 mTodoEditor->setCategories(filter->categoryList().join(",") ); 2839 mTodoEditor->setCategories(filter->categoryList().join(",") );
2819 } 2840 }
2820 if ( filter ) 2841 if ( filter )
2821 mTodoEditor->setSecrecy( filter->getSecrecy() ); 2842 mTodoEditor->setSecrecy( filter->getSecrecy() );
2822 } 2843 }
2823 mTodoEditor->exec(); 2844 mTodoEditor->exec();
2824 setActiveWindow(); 2845 setActiveWindow();
2825} 2846}
2826 2847
2827void CalendarView::newTodo() 2848void CalendarView::newTodo()
2828{ 2849{
2829 newTodoDateTime( QDateTime(),true ); 2850 newTodoDateTime( QDateTime(),true );
2830} 2851}
2831 2852
2832void CalendarView::newSubTodo() 2853void CalendarView::newSubTodo()
2833{ 2854{
2834 Todo *todo = selectedTodo(); 2855 Todo *todo = selectedTodo();
2835 if ( todo ) newSubTodo( todo ); 2856 if ( todo ) newSubTodo( todo );
2836} 2857}
2837 2858
2838void CalendarView::newSubTodo(Todo *parentEvent) 2859void CalendarView::newSubTodo(Todo *parentEvent)
2839{ 2860{
2840 2861
2841 showTodoEditor(); 2862 showTodoEditor();
2842 mTodoEditor->newTodo(QDateTime(),parentEvent,true); 2863 mTodoEditor->newTodo(QDateTime(),parentEvent,true);
2843 mTodoEditor->exec(); 2864 mTodoEditor->exec();
2844 setActiveWindow(); 2865 setActiveWindow();
2845} 2866}
2846 2867
2847void CalendarView::newFloatingEvent() 2868void CalendarView::newFloatingEvent()
2848{ 2869{
2849 DateList tmpList = mNavigator->selectedDates(); 2870 DateList tmpList = mNavigator->selectedDates();
2850 QDate date = tmpList.first(); 2871 QDate date = tmpList.first();
2851 2872
2852 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), 2873 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
2853 QDateTime( date, QTime( 12, 0, 0 ) ), true ); 2874 QDateTime( date, QTime( 12, 0, 0 ) ), true );
2854} 2875}
2855 2876
2856 2877
2857void CalendarView::editEvent( Event *event ) 2878void CalendarView::editEvent( Event *event )
2858{ 2879{
2859 2880
2860 if ( !event ) return; 2881 if ( !event ) return;
2861 if ( event->isReadOnly() ) { 2882 if ( event->isReadOnly() ) {
2862 showEvent( event ); 2883 showEvent( event );
2863 return; 2884 return;
2864 } 2885 }
2865 showEventEditor(); 2886 showEventEditor();
2866 mEventEditor->editEvent( event , mFlagEditDescription); 2887 mEventEditor->editEvent( event , mFlagEditDescription);
2867 mEventEditor->exec(); 2888 mEventEditor->exec();
2868 setActiveWindow(); 2889 setActiveWindow();
2869 2890
2870} 2891}
2871void CalendarView::editJournal( Journal *jour ) 2892void CalendarView::editJournal( Journal *jour )
2872{ 2893{
2873 if ( !jour ) return; 2894 if ( !jour ) return;
2874 mDialogManager->hideSearchDialog(); 2895 mDialogManager->hideSearchDialog();
2875 mViewManager->showJournalView(); 2896 mViewManager->showJournalView();
2876 mNavigator->slotDaySelect( jour->dtStart().date() ); 2897 mNavigator->slotDaySelect( jour->dtStart().date() );
2877} 2898}
2878void CalendarView::editTodo( Todo *todo ) 2899void CalendarView::editTodo( Todo *todo )
2879{ 2900{
2880 if ( !todo ) return; 2901 if ( !todo ) return;
2881 2902
2882 if ( todo->isReadOnly() ) { 2903 if ( todo->isReadOnly() ) {
2883 showTodo( todo ); 2904 showTodo( todo );
2884 return; 2905 return;
2885 } 2906 }
2886 showTodoEditor(); 2907 showTodoEditor();
2887 mTodoEditor->editTodo( todo ,mFlagEditDescription); 2908 mTodoEditor->editTodo( todo ,mFlagEditDescription);
2888 mTodoEditor->exec(); 2909 mTodoEditor->exec();
2889 setActiveWindow(); 2910 setActiveWindow();
2890 2911
2891} 2912}
2892 2913
2893KOEventViewerDialog* CalendarView::getEventViewerDialog() 2914KOEventViewerDialog* CalendarView::getEventViewerDialog()
2894{ 2915{
2895 if ( !mEventViewerDialog ) { 2916 if ( !mEventViewerDialog ) {
2896 mEventViewerDialog = new KOEventViewerDialog(0); 2917 mEventViewerDialog = new KOEventViewerDialog(0);
2897 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 2918 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
2898 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 2919 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
2899 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 2920 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
2900 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 2921 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
2901 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 2922 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
2902 viewManager(), SLOT( showAgendaView( bool ) ) ); 2923 viewManager(), SLOT( showAgendaView( bool ) ) );
2903 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), 2924 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()),
2904 this, SLOT( slotViewerClosed() ) ); 2925 this, SLOT( slotViewerClosed() ) );
2905 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), 2926 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
2906 this, SLOT( todoChanged(Todo *) ) ); 2927 this, SLOT( todoChanged(Todo *) ) );
2907 mEventViewerDialog->resize( 640, 480 ); 2928 mEventViewerDialog->resize( 640, 480 );
2908 2929
2909 } 2930 }
2910 return mEventViewerDialog; 2931 return mEventViewerDialog;
2911} 2932}
2912void CalendarView::showEvent(Event *event) 2933void CalendarView::showEvent(Event *event)
2913{ 2934{
2914 getEventViewerDialog()->setEvent(event); 2935 getEventViewerDialog()->setEvent(event);
2915 getEventViewerDialog()->showMe(); 2936 getEventViewerDialog()->showMe();
2916} 2937}
2917 2938
2918void CalendarView::showTodo(Todo *event) 2939void CalendarView::showTodo(Todo *event)
2919{ 2940{
2920 getEventViewerDialog()->setTodo(event); 2941 getEventViewerDialog()->setTodo(event);
2921 getEventViewerDialog()->showMe(); 2942 getEventViewerDialog()->showMe();
2922} 2943}
2923void CalendarView::showJournal( Journal *jour ) 2944void CalendarView::showJournal( Journal *jour )
2924{ 2945{
2925 getEventViewerDialog()->setJournal(jour); 2946 getEventViewerDialog()->setJournal(jour);
2926 getEventViewerDialog()->showMe(); 2947 getEventViewerDialog()->showMe();
2927 2948
2928} 2949}
2929// void CalendarView::todoModified (Todo *event, int changed) 2950// void CalendarView::todoModified (Todo *event, int changed)
2930// { 2951// {
2931// // if (mDialogList.find (event) != mDialogList.end ()) { 2952// // if (mDialogList.find (event) != mDialogList.end ()) {
2932// // kdDebug() << "Todo modified and open" << endl; 2953// // kdDebug() << "Todo modified and open" << endl;
2933// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; 2954// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event];
2934// // temp->modified (changed); 2955// // temp->modified (changed);
2935 2956
2936// // } 2957// // }
2937 2958
2938// mViewManager->updateView(); 2959// mViewManager->updateView();
2939// } 2960// }
2940 2961
2941void CalendarView::appointment_show() 2962void CalendarView::appointment_show()
2942{ 2963{
2943 Event *anEvent = 0; 2964 Event *anEvent = 0;
2944 2965
2945 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2966 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2946 2967
2947 if (mViewManager->currentView()->isEventView()) { 2968 if (mViewManager->currentView()->isEventView()) {
2948 if ( incidence && incidence->type() == "Event" ) { 2969 if ( incidence && incidence->type() == "Event" ) {
2949 anEvent = static_cast<Event *>(incidence); 2970 anEvent = static_cast<Event *>(incidence);
2950 } 2971 }
2951 } 2972 }
2952 2973
2953 if (!anEvent) { 2974 if (!anEvent) {
2954 KNotifyClient::beep(); 2975 KNotifyClient::beep();
2955 return; 2976 return;
2956 } 2977 }
2957 2978
2958 showEvent(anEvent); 2979 showEvent(anEvent);
2959} 2980}
2960 2981
2961void CalendarView::appointment_edit() 2982void CalendarView::appointment_edit()
2962{ 2983{
2963 Event *anEvent = 0; 2984 Event *anEvent = 0;
2964 2985
2965 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2986 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2966 2987
2967 if (mViewManager->currentView()->isEventView()) { 2988 if (mViewManager->currentView()->isEventView()) {
2968 if ( incidence && incidence->type() == "Event" ) { 2989 if ( incidence && incidence->type() == "Event" ) {
2969 anEvent = static_cast<Event *>(incidence); 2990 anEvent = static_cast<Event *>(incidence);
2970 } 2991 }
2971 } 2992 }
2972 2993
2973 if (!anEvent) { 2994 if (!anEvent) {
2974 KNotifyClient::beep(); 2995 KNotifyClient::beep();
2975 return; 2996 return;
2976 } 2997 }
2977 2998
2978 editEvent(anEvent); 2999 editEvent(anEvent);
2979} 3000}
2980 3001
2981void CalendarView::appointment_delete() 3002void CalendarView::appointment_delete()
2982{ 3003{
2983 Event *anEvent = 0; 3004 Event *anEvent = 0;
2984 3005
2985 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 3006 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2986 3007
2987 if (mViewManager->currentView()->isEventView()) { 3008 if (mViewManager->currentView()->isEventView()) {
2988 if ( incidence && incidence->type() == "Event" ) { 3009 if ( incidence && incidence->type() == "Event" ) {
2989 anEvent = static_cast<Event *>(incidence); 3010 anEvent = static_cast<Event *>(incidence);
2990 } 3011 }
2991 } 3012 }
2992 3013
2993 if (!anEvent) { 3014 if (!anEvent) {
2994 KNotifyClient::beep(); 3015 KNotifyClient::beep();
2995 return; 3016 return;
2996 } 3017 }
2997 3018
2998 deleteEvent(anEvent); 3019 deleteEvent(anEvent);
2999} 3020}
3000 3021
3001void CalendarView::todo_resub( Todo * parent, Todo * sub ) 3022void CalendarView::todo_resub( Todo * parent, Todo * sub )
3002{ 3023{
3003 if (!sub) return; 3024 if (!sub) return;
3004 if ( sub->relatedTo() == parent ) 3025 if ( sub->relatedTo() == parent )
3005 return; 3026 return;
3006 sub->setRelatedTo(parent); 3027 sub->setRelatedTo(parent);
3007 sub->updated(); 3028 sub->updated();
3008 setModified(true); 3029 setModified(true);
3009 updateView(); 3030 updateView();
3010} 3031}
3011void CalendarView::todo_unsub(Todo *anTodo ) 3032void CalendarView::todo_unsub(Todo *anTodo )
3012{ 3033{
3013 todo_resub( 0, anTodo ); 3034 todo_resub( 0, anTodo );
3014} 3035}
3015 3036
3016void CalendarView::deleteTodo(Todo *todo) 3037void CalendarView::deleteTodo(Todo *todo)
3017{ 3038{
3018 if (!todo) { 3039 if (!todo) {
3019 KNotifyClient::beep(); 3040 KNotifyClient::beep();
3020 return; 3041 return;
3021 } 3042 }
3022 if (KOPrefs::instance()->mConfirm) { 3043 if (KOPrefs::instance()->mConfirm) {
3023 QString text = todo->summary().left(20); 3044 QString text = todo->summary().left(20);
3024 if (!todo->relations().isEmpty()) { 3045 if (!todo->relations().isEmpty()) {
3025 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); 3046 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!");
3026 3047
3027 } 3048 }
3028 switch (msgItemDelete(text)) { 3049 switch (msgItemDelete(text)) {
3029 case KMessageBox::Continue: // OK 3050 case KMessageBox::Continue: // OK
3030 bool deleteT = false; 3051 bool deleteT = false;
3031 if (!todo->relations().isEmpty()) { 3052 if (!todo->relations().isEmpty()) {
3032 deleteT = removeCompletedSubTodos( todo ); 3053 deleteT = removeCompletedSubTodos( todo );
3033 } 3054 }
3034 // deleteT == true: todo already deleted in removeCompletedSubTodos 3055 // deleteT == true: todo already deleted in removeCompletedSubTodos
3035 if ( !deleteT ) { 3056 if ( !deleteT ) {
3036 checkExternalId( todo ); 3057 checkExternalId( todo );
3037 calendar()->deleteTodo(todo); 3058 calendar()->deleteTodo(todo);
3038 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 3059 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
3039 updateView(); 3060 updateView();
3040 } 3061 }
3041 break; 3062 break;
3042 } // switch 3063 } // switch
3043 } else { 3064 } else {
3044 checkExternalId( todo ); 3065 checkExternalId( todo );
3045 mCalendar->deleteTodo(todo); 3066 mCalendar->deleteTodo(todo);
3046 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 3067 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
3047 updateView(); 3068 updateView();
3048 } 3069 }
3049 3070
3050 emit updateSearchDialog(); 3071 emit updateSearchDialog();
3051} 3072}
3052void CalendarView::deleteJournal(Journal *jour) 3073void CalendarView::deleteJournal(Journal *jour)
3053{ 3074{
3054 if (!jour) { 3075 if (!jour) {
3055 KNotifyClient::beep(); 3076 KNotifyClient::beep();
3056 return; 3077 return;
3057 } 3078 }
3058 if (KOPrefs::instance()->mConfirm) { 3079 if (KOPrefs::instance()->mConfirm) {
3059 switch (msgItemDelete( jour->description().left(20))) { 3080 switch (msgItemDelete( jour->description().left(20))) {
3060 case KMessageBox::Continue: // OK 3081 case KMessageBox::Continue: // OK
3061 calendar()->deleteJournal(jour); 3082 calendar()->deleteJournal(jour);
3062 updateView(); 3083 updateView();
3063 break; 3084 break;
3064 } // switch 3085 } // switch
3065 } else { 3086 } else {
3066 calendar()->deleteJournal(jour);; 3087 calendar()->deleteJournal(jour);;
3067 updateView(); 3088 updateView();
3068 } 3089 }
3069 emit updateSearchDialog(); 3090 emit updateSearchDialog();
3070} 3091}
3071 3092
3072void CalendarView::deleteEvent(Event *anEvent) 3093void CalendarView::deleteEvent(Event *anEvent)
3073{ 3094{
3074 if (!anEvent) { 3095 if (!anEvent) {
3075 KNotifyClient::beep(); 3096 KNotifyClient::beep();
3076 return; 3097 return;
3077 } 3098 }
3078 3099
3079 if (anEvent->recurrence()->doesRecur()) { 3100 if (anEvent->recurrence()->doesRecur()) {
3080 QDate itemDate = mViewManager->currentSelectionDate(); 3101 QDate itemDate = mViewManager->currentSelectionDate();
3081 int km; 3102 int km;
3082 if (!itemDate.isValid()) { 3103 if (!itemDate.isValid()) {
3083 //kdDebug() << "Date Not Valid" << endl; 3104 //kdDebug() << "Date Not Valid" << endl;
3084 if (KOPrefs::instance()->mConfirm) { 3105 if (KOPrefs::instance()->mConfirm) {
3085 km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + 3106 km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) +
3086 i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), 3107 i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"),
3087 i18n("KO/Pi Confirmation"),i18n("Delete All")); 3108 i18n("KO/Pi Confirmation"),i18n("Delete All"));
3088 if ( km == KMessageBox::Continue ) 3109 if ( km == KMessageBox::Continue )
3089 km = KMessageBox::No; // No = all below 3110 km = KMessageBox::No; // No = all below
3090 } else 3111 } else
3091 km = KMessageBox::No; 3112 km = KMessageBox::No;
3092 } else { 3113 } else {
3093 km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + 3114 km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) +
3094 i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ 3115 i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+
3095 KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), 3116 KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"),
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 7ee1eef..9b5d4ce 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -738,732 +738,732 @@ void KOTodoView::storeCurrentItem()
738 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 738 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
739 if (mActiveItem) { 739 if (mActiveItem) {
740 mCurItem = mActiveItem->todo(); 740 mCurItem = mActiveItem->todo();
741 KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); 741 KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove ();
742 if ( activeItemAbove ) 742 if ( activeItemAbove )
743 mCurItemAbove = activeItemAbove->todo(); 743 mCurItemAbove = activeItemAbove->todo();
744 mCurItemRootParent = mCurItem; 744 mCurItemRootParent = mCurItem;
745 mCurItemParent = mCurItemRootParent->relatedTo(); 745 mCurItemParent = mCurItemRootParent->relatedTo();
746 while ( mCurItemRootParent->relatedTo() != 0 ) 746 while ( mCurItemRootParent->relatedTo() != 0 )
747 mCurItemRootParent = mCurItemRootParent->relatedTo(); 747 mCurItemRootParent = mCurItemRootParent->relatedTo();
748 } 748 }
749 mActiveItem = 0; 749 mActiveItem = 0;
750} 750}
751 751
752void KOTodoView::resetCurrentItem() 752void KOTodoView::resetCurrentItem()
753{ 753{
754 mTodoListView->setFocus(); 754 mTodoListView->setFocus();
755 KOTodoViewItem* foundItem = 0; 755 KOTodoViewItem* foundItem = 0;
756 KOTodoViewItem* foundItemRoot = 0; 756 KOTodoViewItem* foundItemRoot = 0;
757 KOTodoViewItem* foundItemParent = 0; 757 KOTodoViewItem* foundItemParent = 0;
758 KOTodoViewItem* foundItemAbove = 0; 758 KOTodoViewItem* foundItemAbove = 0;
759 if ( mTodoListView->firstChild () ) { 759 if ( mTodoListView->firstChild () ) {
760 if ( mCurItem ) { 760 if ( mCurItem ) {
761 KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); 761 KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild ();
762 while ( item ) { 762 while ( item ) {
763 if ( item->todo() == mCurItem ) { 763 if ( item->todo() == mCurItem ) {
764 foundItem = item; 764 foundItem = item;
765 break; 765 break;
766 } else if ( item->todo() == mCurItemAbove ) { 766 } else if ( item->todo() == mCurItemAbove ) {
767 foundItemAbove = item; 767 foundItemAbove = item;
768 768
769 } 769 }
770 if ( item->todo() == mCurItemRootParent ) { 770 if ( item->todo() == mCurItemRootParent ) {
771 foundItemRoot = item; 771 foundItemRoot = item;
772 } 772 }
773 if ( item->todo() == mCurItemParent ) { 773 if ( item->todo() == mCurItemParent ) {
774 foundItemParent = item; 774 foundItemParent = item;
775 } 775 }
776 item = (KOTodoViewItem*)item->itemBelow(); 776 item = (KOTodoViewItem*)item->itemBelow();
777 } 777 }
778 if ( ! foundItem ) { 778 if ( ! foundItem ) {
779 if ( foundItemParent ) { 779 if ( foundItemParent ) {
780 foundItem = foundItemParent; 780 foundItem = foundItemParent;
781 } else { 781 } else {
782 if ( foundItemRoot ) 782 if ( foundItemRoot )
783 foundItem = foundItemRoot; 783 foundItem = foundItemRoot;
784 else 784 else
785 foundItem = foundItemAbove; 785 foundItem = foundItemAbove;
786 } 786 }
787 } 787 }
788 } 788 }
789 if ( foundItem ) { 789 if ( foundItem ) {
790 mTodoListView->setCurrentItem( foundItem ); 790 mTodoListView->setCurrentItem( foundItem );
791 mTodoListView->ensureItemVisible( foundItem ); 791 mTodoListView->ensureItemVisible( foundItem );
792 } else { 792 } else {
793 mTodoListView->setCurrentItem( mTodoListView->firstChild () ); 793 mTodoListView->setCurrentItem( mTodoListView->firstChild () );
794 } 794 }
795 } 795 }
796 mTodoListView->setFocus(); 796 mTodoListView->setFocus();
797} 797}
798//Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; 798//Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove;
799bool KOTodoView::checkTodo( Todo * todo ) 799bool KOTodoView::checkTodo( Todo * todo )
800{ 800{
801 801
802 if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) 802 if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() )
803 return false; 803 return false;
804 if ( !todo->isCompleted() ) { 804 if ( !todo->isCompleted() ) {
805 if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) 805 if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() )
806 return true; 806 return true;
807 } 807 }
808 if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { 808 if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) {
809 if ( todo->hasStartDate() ) 809 if ( todo->hasStartDate() )
810 if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) 810 if ( mNavigator->selectedDates().last() < todo->dtStart().date() )
811 return false; 811 return false;
812 if ( todo->hasDueDate() ) 812 if ( todo->hasDueDate() )
813 if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) 813 if ( mNavigator->selectedDates().first() > todo->dtDue().date() )
814 return false; 814 return false;
815 } 815 }
816 return true; 816 return true;
817} 817}
818 818
819void KOTodoView::restoreItemState( QListViewItem *item ) 819void KOTodoView::restoreItemState( QListViewItem *item )
820{ 820{
821 pendingSubtodo = 0; 821 pendingSubtodo = 0;
822 while( item ) { 822 while( item ) {
823 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 823 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
824 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); 824 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) );
825 if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); 825 if( item->childCount() > 0 ) restoreItemState( item->firstChild() );
826 item = item->nextSibling(); 826 item = item->nextSibling();
827 } 827 }
828} 828}
829 829
830 830
831QMap<Todo *,KOTodoViewItem *>::ConstIterator 831QMap<Todo *,KOTodoViewItem *>::ConstIterator
832 KOTodoView::insertTodoItem(Todo *todo) 832 KOTodoView::insertTodoItem(Todo *todo)
833{ 833{
834 834
835// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; 835// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
836 // TODO: Check, if dynmaic cast is necessary 836 // TODO: Check, if dynmaic cast is necessary
837 837
838 pendingSubtodo = 0; 838 pendingSubtodo = 0;
839 Incidence *incidence = todo->relatedTo(); 839 Incidence *incidence = todo->relatedTo();
840 if (incidence && incidence->type() == "Todo") { 840 if (incidence && incidence->type() == "Todo") {
841 Todo *relatedTodo = static_cast<Todo *>(incidence); 841 Todo *relatedTodo = static_cast<Todo *>(incidence);
842 842
843// kdDebug() << " has Related" << endl; 843// kdDebug() << " has Related" << endl;
844 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 844 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
845 itemIterator = mTodoMap.find(relatedTodo); 845 itemIterator = mTodoMap.find(relatedTodo);
846 if (itemIterator == mTodoMap.end()) { 846 if (itemIterator == mTodoMap.end()) {
847// kdDebug() << " related not yet in list" << endl; 847// kdDebug() << " related not yet in list" << endl;
848 itemIterator = insertTodoItem (relatedTodo); 848 itemIterator = insertTodoItem (relatedTodo);
849 } 849 }
850 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem 850 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem
851 // and one into the map. Sure finding is more easy but why? -zecke 851 // and one into the map. Sure finding is more easy but why? -zecke
852 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); 852 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
853 return mTodoMap.insert(todo,todoItem); 853 return mTodoMap.insert(todo,todoItem);
854 } else { 854 } else {
855// kdDebug() << " no Related" << endl; 855// kdDebug() << " no Related" << endl;
856 // see above -zecke 856 // see above -zecke
857 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 857 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
858 return mTodoMap.insert(todo,todoItem); 858 return mTodoMap.insert(todo,todoItem);
859 } 859 }
860} 860}
861 861
862 862
863void KOTodoView::updateConfig() 863void KOTodoView::updateConfig()
864{ 864{
865 updateView(); 865 updateView();
866 mTodoListView->repaintContents(); 866 mTodoListView->repaintContents();
867} 867}
868 868
869QPtrList<Incidence> KOTodoView::selectedIncidences() 869QPtrList<Incidence> KOTodoView::selectedIncidences()
870{ 870{
871 QPtrList<Incidence> selected; 871 QPtrList<Incidence> selected;
872 872
873 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 873 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
874// if (!item) item = mActiveItem; 874// if (!item) item = mActiveItem;
875 if (item) selected.append(item->todo()); 875 if (item) selected.append(item->todo());
876 876
877 return selected; 877 return selected;
878} 878}
879 879
880QPtrList<Todo> KOTodoView::selectedTodos() 880QPtrList<Todo> KOTodoView::selectedTodos()
881{ 881{
882 QPtrList<Todo> selected; 882 QPtrList<Todo> selected;
883 883
884 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 884 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
885// if (!item) item = mActiveItem; 885// if (!item) item = mActiveItem;
886 if (item) selected.append(item->todo()); 886 if (item) selected.append(item->todo());
887 887
888 return selected; 888 return selected;
889} 889}
890 890
891void KOTodoView::changeEventDisplay(Event *, int) 891void KOTodoView::changeEventDisplay(Event *, int)
892{ 892{
893 updateView(); 893 updateView();
894} 894}
895 895
896void KOTodoView::showDates(const QDate &, const QDate &) 896void KOTodoView::showDates(const QDate &, const QDate &)
897{ 897{
898} 898}
899 899
900void KOTodoView::showEvents(QPtrList<Event>) 900void KOTodoView::showEvents(QPtrList<Event>)
901{ 901{
902 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; 902 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl;
903} 903}
904 904
905void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, 905void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
906 const QDate &td) 906 const QDate &td)
907{ 907{
908#ifndef KORG_NOPRINTER 908#ifndef KORG_NOPRINTER
909 calPrinter->preview(CalPrinter::Todolist, fd, td); 909 calPrinter->preview(CalPrinter::Todolist, fd, td);
910#endif 910#endif
911} 911}
912 912
913void KOTodoView::editItem(QListViewItem *item ) 913void KOTodoView::editItem(QListViewItem *item )
914{ 914{
915 // qDebug("editItem(QListViewItem *item ) "); 915 // qDebug("editItem(QListViewItem *item ) ");
916 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 916 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
917} 917}
918 918
919void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 919void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
920{ 920{
921 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 921 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
922} 922}
923 923
924void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) 924void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
925{ 925{
926 pendingSubtodo = 0; 926 pendingSubtodo = 0;
927 mActiveItem = (KOTodoViewItem *)item; 927 mActiveItem = (KOTodoViewItem *)item;
928 if (item) { 928 if (item) {
929 switch (column){ 929 switch (column){
930 case 1: 930 case 1:
931 mPriorityPopupMenu->popup(QCursor::pos ()); break; 931 mPriorityPopupMenu->popup(QCursor::pos ()); break;
932 case 2: 932 case 2:
933 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; 933 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break;
934 case 3: 934 case 3:
935 moveTodo(); 935 moveTodo();
936 break; 936 break;
937 case 8: 937 case 8:
938 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; 938 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break;
939 default: 939 default:
940 mItemPopupMenu->popup(QCursor::pos()); 940 mItemPopupMenu->popup(QCursor::pos());
941 } 941 }
942 } else mPopupMenu->popup(QCursor::pos()); 942 } else mPopupMenu->popup(QCursor::pos());
943} 943}
944void KOTodoView::newTodo() 944void KOTodoView::newTodo()
945{ 945{
946 emit newTodoSignal(); 946 emit newTodoSignal();
947} 947}
948 948
949void KOTodoView::newSubTodo() 949void KOTodoView::newSubTodo()
950{ 950{
951 if (mActiveItem) { 951 if (mActiveItem) {
952 emit newSubTodoSignal(mActiveItem->todo()); 952 emit newSubTodoSignal(mActiveItem->todo());
953 } 953 }
954} 954}
955void KOTodoView::unparentTodo() 955void KOTodoView::unparentTodo()
956{ 956{
957 if (mActiveItem) { 957 if (mActiveItem) {
958 emit unparentTodoSignal(mActiveItem->todo()); 958 emit unparentTodoSignal(mActiveItem->todo());
959 } 959 }
960} 960}
961 961
962void KOTodoView::reparentTodo() 962void KOTodoView::reparentTodo()
963{ 963{
964 if (mActiveItem) { 964 if (mActiveItem) {
965 qDebug("KOTodoView::reparentTodo() "); 965 qDebug("KOTodoView::reparentTodo() ");
966 topLevelWidget()->setCaption(i18n("Click on new parent item")); 966 topLevelWidget()->setCaption(i18n("Click on new parent item"));
967 pendingSubtodo = mActiveItem; 967 pendingSubtodo = mActiveItem;
968 } 968 }
969} 969}
970void KOTodoView::editTodo() 970void KOTodoView::editTodo()
971{ 971{
972 if (mActiveItem) { 972 if (mActiveItem) {
973 emit editTodoSignal(mActiveItem->todo()); 973 emit editTodoSignal(mActiveItem->todo());
974 } 974 }
975} 975}
976void KOTodoView::cloneTodo() 976void KOTodoView::cloneTodo()
977{ 977{
978 if (mActiveItem) { 978 if (mActiveItem) {
979 emit cloneTodoSignal((Incidence*)mActiveItem->todo()); 979 emit cloneTodoSignal((Incidence*)mActiveItem->todo());
980 } 980 }
981} 981}
982void KOTodoView::cancelTodo() 982void KOTodoView::cancelTodo()
983{ 983{
984 if (mActiveItem) { 984 if (mActiveItem) {
985 emit cancelTodoSignal((Incidence*)mActiveItem->todo()); 985 emit cancelTodoSignal((Incidence*)mActiveItem->todo());
986 } 986 }
987} 987}
988void KOTodoView::moveTodo() 988void KOTodoView::moveTodo()
989{ 989{
990 if (mActiveItem) { 990 if (mActiveItem) {
991 emit moveTodoSignal((Incidence*)mActiveItem->todo()); 991 emit moveTodoSignal((Incidence*)mActiveItem->todo());
992 } 992 }
993} 993}
994void KOTodoView::beamTodo() 994void KOTodoView::beamTodo()
995{ 995{
996 if (mActiveItem) { 996 if (mActiveItem) {
997 emit beamTodoSignal((Incidence*)mActiveItem->todo()); 997 emit beamTodoSignal((Incidence*)mActiveItem->todo());
998 } 998 }
999} 999}
1000 1000
1001 1001
1002void KOTodoView::showTodo() 1002void KOTodoView::showTodo()
1003{ 1003{
1004 if (mActiveItem) { 1004 if (mActiveItem) {
1005 emit showTodoSignal(mActiveItem->todo()); 1005 emit showTodoSignal(mActiveItem->todo());
1006 } 1006 }
1007} 1007}
1008 1008
1009void KOTodoView::deleteTodo() 1009void KOTodoView::deleteTodo()
1010{ 1010{
1011 if (mActiveItem) { 1011 if (mActiveItem) {
1012 emit deleteTodoSignal(mActiveItem->todo()); 1012 emit deleteTodoSignal(mActiveItem->todo());
1013 } 1013 }
1014} 1014}
1015 1015
1016void KOTodoView::setNewPriority(int index) 1016void KOTodoView::setNewPriority(int index)
1017{ 1017{
1018 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1018 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1019 mActiveItem->todo()->setPriority(mPriority[index]); 1019 mActiveItem->todo()->setPriority(mPriority[index]);
1020 mActiveItem->construct(); 1020 mActiveItem->construct();
1021 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); 1021 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
1022 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1022 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1023 } 1023 }
1024} 1024}
1025 1025
1026void KOTodoView::setNewPercentage(int index) 1026void KOTodoView::setNewPercentage(int index)
1027{ 1027{
1028 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1028 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1029 1029
1030 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { 1030 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
1031 mActiveItem->setOn( true ); 1031 mActiveItem->setOn( true );
1032 return; 1032 return;
1033 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { 1033 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
1034 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); 1034 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
1035 if ( par && par->isOn() ) 1035 if ( par && par->isOn() )
1036 par->setOn( false ); 1036 par->setOn( false );
1037 } 1037 }
1038 if (mPercentage[index] == 100) { 1038 if (mPercentage[index] == 100) {
1039 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 1039 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
1040 } else { 1040 } else {
1041 mActiveItem->todo()->setCompleted(false); 1041 mActiveItem->todo()->setCompleted(false);
1042 } 1042 }
1043 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 1043 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
1044 mActiveItem->construct(); 1044 mActiveItem->construct();
1045 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 1045 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
1046 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1046 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1047 } 1047 }
1048} 1048}
1049 1049
1050 1050
1051QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) 1051QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
1052{ 1052{
1053 QPopupMenu* tempMenu = new QPopupMenu (this); 1053 QPopupMenu* tempMenu = new QPopupMenu (this);
1054 QStringList checkedCategories = todoItem->todo()->categories (); 1054 QStringList checkedCategories = todoItem->todo()->categories ();
1055 1055
1056 tempMenu->setCheckable (true); 1056 tempMenu->setCheckable (true);
1057 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 1057 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
1058 it != KOPrefs::instance()->mCustomCategories.end (); 1058 it != KOPrefs::instance()->mCustomCategories.end ();
1059 ++it) { 1059 ++it) {
1060 int index = tempMenu->insertItem (*it); 1060 int index = tempMenu->insertItem (*it);
1061 mCategory[index] = *it; 1061 mCategory[index] = *it;
1062 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); 1062 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true);
1063 } 1063 }
1064 1064
1065 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); 1065 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
1066 return tempMenu; 1066 return tempMenu;
1067 1067
1068 1068
1069} 1069}
1070void KOTodoView::changedCategories(int index) 1070void KOTodoView::changedCategories(int index)
1071{ 1071{
1072 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1072 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1073 QStringList categories = mActiveItem->todo()->categories (); 1073 QStringList categories = mActiveItem->todo()->categories ();
1074 QString colcat = categories.first(); 1074 QString colcat = categories.first();
1075 if (categories.find (mCategory[index]) != categories.end ()) 1075 if (categories.find (mCategory[index]) != categories.end ())
1076 categories.remove (mCategory[index]); 1076 categories.remove (mCategory[index]);
1077 else 1077 else
1078 categories.insert (categories.end(), mCategory[index]); 1078 categories.insert (categories.end(), mCategory[index]);
1079 categories.sort (); 1079 categories.sort ();
1080 if ( !colcat.isEmpty() ) { 1080 if ( !colcat.isEmpty() ) {
1081 if ( categories.find ( colcat ) != categories.end () ) { 1081 if ( categories.find ( colcat ) != categories.end () ) {
1082 categories.remove( colcat ); 1082 categories.remove( colcat );
1083 categories.prepend( colcat ); 1083 categories.prepend( colcat );
1084 } 1084 }
1085 } 1085 }
1086 mActiveItem->todo()->setCategories (categories); 1086 mActiveItem->todo()->setCategories (categories);
1087 mActiveItem->construct(); 1087 mActiveItem->construct();
1088 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1088 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1089 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); 1089 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
1090 } 1090 }
1091} 1091}
1092void KOTodoView::itemDoubleClicked(QListViewItem *item) 1092void KOTodoView::itemDoubleClicked(QListViewItem *item)
1093{ 1093{
1094 if ( pendingSubtodo != 0 ) { 1094 if ( pendingSubtodo != 0 ) {
1095 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1095 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1096 } 1096 }
1097 pendingSubtodo = 0; 1097 pendingSubtodo = 0;
1098 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1098 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1099 //qDebug("ROW %d ", row); 1099 //qDebug("ROW %d ", row);
1100 if (!item) { 1100 if (!item) {
1101 newTodo(); 1101 newTodo();
1102 return; 1102 return;
1103 } else { 1103 } else {
1104 if ( row == 2 ) { 1104 if ( row == 2 ) {
1105 mActiveItem = (KOTodoViewItem *) item; 1105 mActiveItem = (KOTodoViewItem *) item;
1106 newSubTodo(); 1106 newSubTodo();
1107 return; 1107 return;
1108 } 1108 }
1109 if ( row == 1 ) { 1109 if ( row == 1 ) {
1110 mActiveItem = (KOTodoViewItem *) item; 1110 mActiveItem = (KOTodoViewItem *) item;
1111 toggleRunningItem(); 1111 toggleRunningItem();
1112 return; 1112 return;
1113 } 1113 }
1114 } 1114 }
1115 if ( KOPrefs::instance()->mEditOnDoubleClick ) 1115 if ( KOPrefs::instance()->mEditOnDoubleClick )
1116 editItem( item ); 1116 editItem( item );
1117 else 1117 else
1118 showItem( item , QPoint(), 0 ); 1118 showItem( item , QPoint(), 0 );
1119} 1119}
1120void KOTodoView::toggleRunningItem() 1120void KOTodoView::toggleRunningItem()
1121{ 1121{
1122 qDebug("KOTodoView::toggleRunning() "); 1122 // qDebug("KOTodoView::toggleRunning() ");
1123 if ( ! mActiveItem ) 1123 if ( ! mActiveItem )
1124 return; 1124 return;
1125 Todo * t = mActiveItem->todo(); 1125 Todo * t = mActiveItem->todo();
1126 if ( t->isRunning() ) { 1126 if ( t->isRunning() ) {
1127 int result = KMessageBox::warningContinueCancel(this, 1127 int result = KMessageBox::warningContinueCancel(this,
1128 i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 20 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); 1128 i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true);
1129 if (result != KMessageBox::Continue) return; 1129 if (result != KMessageBox::Continue) return;
1130 t->setRunning( false ); 1130 t->setRunning( false );
1131 mActiveItem->construct(); 1131 mActiveItem->construct();
1132 } else { 1132 } else {
1133 int result = KMessageBox::warningContinueCancel(this, 1133 int result = KMessageBox::warningContinueCancel(this,
1134 i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 20 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); 1134 i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true);
1135 if (result != KMessageBox::Continue) return; 1135 if (result != KMessageBox::Continue) return;
1136 t->setRunning( true ); 1136 t->setRunning( true );
1137 mActiveItem->construct(); 1137 mActiveItem->construct();
1138 } 1138 }
1139} 1139}
1140 1140
1141void KOTodoView::itemClicked(QListViewItem *item) 1141void KOTodoView::itemClicked(QListViewItem *item)
1142{ 1142{
1143 //qDebug("KOTodoView::itemClicked %d", item); 1143 //qDebug("KOTodoView::itemClicked %d", item);
1144 if (!item) { 1144 if (!item) {
1145 if ( pendingSubtodo != 0 ) { 1145 if ( pendingSubtodo != 0 ) {
1146 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1146 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1147 } 1147 }
1148 pendingSubtodo = 0; 1148 pendingSubtodo = 0;
1149 return; 1149 return;
1150 } 1150 }
1151 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1151 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1152 if ( pendingSubtodo != 0 ) { 1152 if ( pendingSubtodo != 0 ) {
1153 bool allowReparent = true; 1153 bool allowReparent = true;
1154 QListViewItem *par = item; 1154 QListViewItem *par = item;
1155 while ( par ) { 1155 while ( par ) {
1156 if ( par == pendingSubtodo ) { 1156 if ( par == pendingSubtodo ) {
1157 allowReparent = false; 1157 allowReparent = false;
1158 break; 1158 break;
1159 } 1159 }
1160 par = par->parent(); 1160 par = par->parent();
1161 } 1161 }
1162 if ( !allowReparent ) { 1162 if ( !allowReparent ) {
1163 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); 1163 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
1164 qDebug("Recursive reparenting not possible "); 1164 qDebug("Recursive reparenting not possible ");
1165 pendingSubtodo = 0; 1165 pendingSubtodo = 0;
1166 } else { 1166 } else {
1167 Todo* newParent = todoItem->todo(); 1167 Todo* newParent = todoItem->todo();
1168 Todo* newSub = pendingSubtodo->todo(); 1168 Todo* newSub = pendingSubtodo->todo();
1169 pendingSubtodo = 0; 1169 pendingSubtodo = 0;
1170 emit reparentTodoSignal( newParent,newSub ); 1170 emit reparentTodoSignal( newParent,newSub );
1171 return; 1171 return;
1172 } 1172 }
1173 } 1173 }
1174#if 0 1174#if 0
1175 // handled by the item itself 1175 // handled by the item itself
1176 bool completed = todoItem->todo()->isCompleted(); // Completed or not? 1176 bool completed = todoItem->todo()->isCompleted(); // Completed or not?
1177 qDebug("com %d ",completed ); 1177 qDebug("com %d ",completed );
1178 qDebug("itemclicked "); 1178 qDebug("itemclicked ");
1179 if (todoItem->isOn()) { 1179 if (todoItem->isOn()) {
1180 qDebug("on "); 1180 qDebug("on ");
1181 if (!completed) { 1181 if (!completed) {
1182 qDebug("set true "); 1182 qDebug("set true ");
1183 todoItem->todo()->setCompleted(QDateTime::currentDateTime()); 1183 todoItem->todo()->setCompleted(QDateTime::currentDateTime());
1184 } 1184 }
1185 } else { 1185 } else {
1186 qDebug("not on "); 1186 qDebug("not on ");
1187 if (completed) { 1187 if (completed) {
1188 qDebug("set false "); 1188 qDebug("set false ");
1189 todoItem->todo()->setCompleted(false); 1189 todoItem->todo()->setCompleted(false);
1190 } 1190 }
1191 } 1191 }
1192#endif 1192#endif
1193} 1193}
1194 1194
1195void KOTodoView::setDocumentId( const QString &id ) 1195void KOTodoView::setDocumentId( const QString &id )
1196{ 1196{
1197 kdDebug() << "KOTodoView::setDocumentId()" << endl; 1197 kdDebug() << "KOTodoView::setDocumentId()" << endl;
1198 1198
1199 mDocPrefs->setDoc( id ); 1199 mDocPrefs->setDoc( id );
1200} 1200}
1201 1201
1202void KOTodoView::itemStateChanged( QListViewItem *item ) 1202void KOTodoView::itemStateChanged( QListViewItem *item )
1203{ 1203{
1204 if (!item) return; 1204 if (!item) return;
1205 1205
1206 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1206 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1207 1207
1208// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; 1208// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl;
1209 1209
1210 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); 1210 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() );
1211} 1211}
1212 1212
1213void KOTodoView::saveLayout(KConfig *config, const QString &group) const 1213void KOTodoView::saveLayout(KConfig *config, const QString &group) const
1214{ 1214{
1215 mTodoListView->saveLayout(config,group); 1215 mTodoListView->saveLayout(config,group);
1216} 1216}
1217 1217
1218void KOTodoView::restoreLayout(KConfig *config, const QString &group) 1218void KOTodoView::restoreLayout(KConfig *config, const QString &group)
1219{ 1219{
1220 mTodoListView->restoreLayout(config,group); 1220 mTodoListView->restoreLayout(config,group);
1221} 1221}
1222 1222
1223void KOTodoView::processSelectionChange() 1223void KOTodoView::processSelectionChange()
1224{ 1224{
1225// kdDebug() << "KOTodoView::processSelectionChange()" << endl; 1225// kdDebug() << "KOTodoView::processSelectionChange()" << endl;
1226 1226
1227 KOTodoViewItem *item = 1227 KOTodoViewItem *item =
1228 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); 1228 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() );
1229 1229
1230 if ( !item ) { 1230 if ( !item ) {
1231 emit incidenceSelected( 0 ); 1231 emit incidenceSelected( 0 );
1232 } else { 1232 } else {
1233 emit incidenceSelected( item->todo() ); 1233 emit incidenceSelected( item->todo() );
1234 } 1234 }
1235} 1235}
1236 1236
1237void KOTodoView::modified(bool b) 1237void KOTodoView::modified(bool b)
1238{ 1238{
1239 emit isModified(b); 1239 emit isModified(b);
1240} 1240}
1241void KOTodoView::setTodoModified( Todo* todo ) 1241void KOTodoView::setTodoModified( Todo* todo )
1242{ 1242{
1243 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); 1243 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED );
1244} 1244}
1245void KOTodoView::clearSelection() 1245void KOTodoView::clearSelection()
1246{ 1246{
1247 mTodoListView->selectAll( false ); 1247 mTodoListView->selectAll( false );
1248} 1248}
1249void KOTodoView::setAllOpen() 1249void KOTodoView::setAllOpen()
1250{ 1250{
1251 if ( isFlatDisplay ) { 1251 if ( isFlatDisplay ) {
1252 isFlatDisplay = false; 1252 isFlatDisplay = false;
1253 mPopupMenu->setItemChecked( 8,false ); 1253 mPopupMenu->setItemChecked( 8,false );
1254 updateView(); 1254 updateView();
1255 } else { 1255 } else {
1256 storeCurrentItem(); 1256 storeCurrentItem();
1257 } 1257 }
1258 setOpen(mTodoListView->firstChild(), true); 1258 setOpen(mTodoListView->firstChild(), true);
1259 resetCurrentItem(); 1259 resetCurrentItem();
1260} 1260}
1261void KOTodoView::setAllClose() 1261void KOTodoView::setAllClose()
1262{ 1262{
1263 if ( isFlatDisplay ) { 1263 if ( isFlatDisplay ) {
1264 isFlatDisplay = false; 1264 isFlatDisplay = false;
1265 mPopupMenu->setItemChecked( 8,false ); 1265 mPopupMenu->setItemChecked( 8,false );
1266 updateView(); 1266 updateView();
1267 } else { 1267 } else {
1268 storeCurrentItem(); 1268 storeCurrentItem();
1269 } 1269 }
1270 setOpen(mTodoListView->firstChild(), false); 1270 setOpen(mTodoListView->firstChild(), false);
1271 resetCurrentItem(); 1271 resetCurrentItem();
1272} 1272}
1273void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1273void KOTodoView::setOpen( QListViewItem* item, bool setOpenI)
1274{ 1274{
1275 1275
1276 while ( item ) { 1276 while ( item ) {
1277 setOpen( item->firstChild(), setOpenI ); 1277 setOpen( item->firstChild(), setOpenI );
1278 item->setOpen( setOpenI ); 1278 item->setOpen( setOpenI );
1279 item = item->nextSibling(); 1279 item = item->nextSibling();
1280 } 1280 }
1281} 1281}
1282 1282
1283void KOTodoView::displayAllFlat() 1283void KOTodoView::displayAllFlat()
1284{ 1284{
1285 pendingSubtodo = 0; 1285 pendingSubtodo = 0;
1286 if ( mBlockUpdate ) { 1286 if ( mBlockUpdate ) {
1287 return; 1287 return;
1288 } 1288 }
1289 mPopupMenu->setItemChecked( 8,true ); 1289 mPopupMenu->setItemChecked( 8,true );
1290 isFlatDisplay = true; 1290 isFlatDisplay = true;
1291 QPtrList<Todo> todoList = calendar()->todos(); 1291 QPtrList<Todo> todoList = calendar()->todos();
1292 mTodoMap.clear(); 1292 mTodoMap.clear();
1293 mTodoListView->clear(); 1293 mTodoListView->clear();
1294 Todo *todo; 1294 Todo *todo;
1295 for(todo = todoList.first(); todo; todo = todoList.next()) { 1295 for(todo = todoList.first(); todo; todo = todoList.next()) {
1296 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 1296 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
1297 mTodoMap.insert(todo,todoItem); 1297 mTodoMap.insert(todo,todoItem);
1298 } 1298 }
1299 mTodoListView->setFocus(); 1299 mTodoListView->setFocus();
1300 processSelectionChange(); 1300 processSelectionChange();
1301} 1301}
1302 1302
1303void KOTodoView::setAllFlat() 1303void KOTodoView::setAllFlat()
1304{ 1304{
1305 if ( isFlatDisplay ) { 1305 if ( isFlatDisplay ) {
1306 isFlatDisplay = false; 1306 isFlatDisplay = false;
1307 mPopupMenu->setItemChecked( 8,false ); 1307 mPopupMenu->setItemChecked( 8,false );
1308 updateView(); 1308 updateView();
1309 return; 1309 return;
1310 } 1310 }
1311 storeCurrentItem(); 1311 storeCurrentItem();
1312 displayAllFlat(); 1312 displayAllFlat();
1313 resetCurrentItem(); 1313 resetCurrentItem();
1314} 1314}
1315 1315
1316void KOTodoView::purgeCompleted() 1316void KOTodoView::purgeCompleted()
1317{ 1317{
1318 emit purgeCompletedSignal(); 1318 emit purgeCompletedSignal();
1319 1319
1320} 1320}
1321void KOTodoView::toggleQuickTodo() 1321void KOTodoView::toggleQuickTodo()
1322{ 1322{
1323 if ( mQuickAdd->isVisible() ) { 1323 if ( mQuickAdd->isVisible() ) {
1324 mQuickAdd->hide(); 1324 mQuickAdd->hide();
1325 KOPrefs::instance()->mEnableQuickTodo = false; 1325 KOPrefs::instance()->mEnableQuickTodo = false;
1326 } 1326 }
1327 else { 1327 else {
1328 mQuickAdd->show(); 1328 mQuickAdd->show();
1329 KOPrefs::instance()->mEnableQuickTodo = true; 1329 KOPrefs::instance()->mEnableQuickTodo = true;
1330 } 1330 }
1331 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); 1331 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo);
1332 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); 1332 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo );
1333} 1333}
1334 1334
1335void KOTodoView::toggleRunning() 1335void KOTodoView::toggleRunning()
1336{ 1336{
1337 KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; 1337 KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos;
1338 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); 1338 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos);
1339 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); 1339 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos );
1340 updateView(); 1340 updateView();
1341} 1341}
1342 1342
1343void KOTodoView::toggleCompleted() 1343void KOTodoView::toggleCompleted()
1344{ 1344{
1345 KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; 1345 KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo;
1346 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); 1346 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo );
1347 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); 1347 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo );
1348 updateView(); 1348 updateView();
1349} 1349}
1350 1350
1351void KOTodoView::addQuickTodo() 1351void KOTodoView::addQuickTodo()
1352{ 1352{
1353 Todo *todo = new Todo(); 1353 Todo *todo = new Todo();
1354 todo->setSummary(mQuickAdd->text()); 1354 todo->setSummary(mQuickAdd->text());
1355 todo->setOrganizer(KOPrefs::instance()->email()); 1355 todo->setOrganizer(KOPrefs::instance()->email());
1356 CalFilter * cf = mCalendar->filter(); 1356 CalFilter * cf = mCalendar->filter();
1357 if ( cf ) { 1357 if ( cf ) {
1358 if ( cf->isEnabled()&& cf->showCategories()) { 1358 if ( cf->isEnabled()&& cf->showCategories()) {
1359 todo->setCategories(cf->categoryList()); 1359 todo->setCategories(cf->categoryList());
1360 } 1360 }
1361 if ( cf->isEnabled() ) 1361 if ( cf->isEnabled() )
1362 todo->setSecrecy( cf->getSecrecy()); 1362 todo->setSecrecy( cf->getSecrecy());
1363 } 1363 }
1364 mCalendar->addTodo(todo); 1364 mCalendar->addTodo(todo);
1365 mQuickAdd->setText(""); 1365 mQuickAdd->setText("");
1366 todoModified (todo, KOGlobals::EVENTADDED ); 1366 todoModified (todo, KOGlobals::EVENTADDED );
1367 updateView(); 1367 updateView();
1368} 1368}
1369 1369
1370void KOTodoView::keyPressEvent ( QKeyEvent * e ) 1370void KOTodoView::keyPressEvent ( QKeyEvent * e )
1371{ 1371{
1372 // e->ignore(); 1372 // e->ignore();
1373 //return; 1373 //return;
1374 //qDebug("KOTodoView::keyPressEvent "); 1374 //qDebug("KOTodoView::keyPressEvent ");
1375 switch ( e->key() ) { 1375 switch ( e->key() ) {
1376 case Qt::Key_Down: 1376 case Qt::Key_Down:
1377 case Qt::Key_Up: 1377 case Qt::Key_Up:
1378 QWidget::keyPressEvent ( e ); 1378 QWidget::keyPressEvent ( e );
1379 break; 1379 break;
1380 1380
1381 case Qt::Key_Q: 1381 case Qt::Key_Q:
1382 toggleQuickTodo(); 1382 toggleQuickTodo();
1383 break; 1383 break;
1384 case Qt::Key_U: 1384 case Qt::Key_U:
1385 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { 1385 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) {
1386 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1386 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1387 unparentTodo(); 1387 unparentTodo();
1388 e->accept(); 1388 e->accept();
1389 } else 1389 } else
1390 e->ignore(); 1390 e->ignore();
1391 break; 1391 break;
1392 case Qt::Key_S: 1392 case Qt::Key_S:
1393 if ( e->state() == Qt::ControlButton ) { 1393 if ( e->state() == Qt::ControlButton ) {
1394 e->ignore(); 1394 e->ignore();
1395 break; 1395 break;
1396 } 1396 }
1397 if ( e->state() == Qt::ShiftButton ) { 1397 if ( e->state() == Qt::ShiftButton ) {
1398 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1398 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1399 reparentTodo(); 1399 reparentTodo();
1400 e->accept(); 1400 e->accept();
1401 } else 1401 } else
1402 e->ignore(); 1402 e->ignore();
1403 break; 1403 break;
1404 case Qt::Key_P: 1404 case Qt::Key_P:
1405 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { 1405 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) {
1406 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1406 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1407 if ( pendingSubtodo ) 1407 if ( pendingSubtodo )
1408 itemClicked(mActiveItem); 1408 itemClicked(mActiveItem);
1409 e->accept(); 1409 e->accept();
1410 } else 1410 } else
1411 e->ignore(); 1411 e->ignore();
1412 break; 1412 break;
1413 case Qt::Key_Escape: 1413 case Qt::Key_Escape:
1414 if ( pendingSubtodo ) { 1414 if ( pendingSubtodo ) {
1415 itemClicked(0); 1415 itemClicked(0);
1416 e->accept(); 1416 e->accept();
1417 } else 1417 } else
1418 e->ignore(); 1418 e->ignore();
1419 break; 1419 break;
1420 default: 1420 default:
1421 e->ignore(); 1421 e->ignore();
1422 } 1422 }
1423 1423
1424 if ( true ) { 1424 if ( true ) {
1425 if ( e->key() == Qt::Key_I ) { 1425 if ( e->key() == Qt::Key_I ) {
1426 KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); 1426 KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem();
1427 if ( cn ) { 1427 if ( cn ) {
1428 mActiveItem = cn; 1428 mActiveItem = cn;
1429 KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); 1429 KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
1430 if ( ci ){ 1430 if ( ci ){
1431 showTodo(); 1431 showTodo();
1432 cn = (KOTodoViewItem*)cn->itemBelow(); 1432 cn = (KOTodoViewItem*)cn->itemBelow();
1433 if ( cn ) { 1433 if ( cn ) {
1434 mTodoListView->setCurrentItem ( cn ); 1434 mTodoListView->setCurrentItem ( cn );
1435 mTodoListView->ensureItemVisible ( cn ); 1435 mTodoListView->ensureItemVisible ( cn );
1436 } 1436 }
1437 1437
1438 } 1438 }
1439 } 1439 }
1440 e->accept(); 1440 e->accept();
1441 1441
1442 } 1442 }
1443 1443
1444 } 1444 }
1445 1445
1446} 1446}
1447void KOTodoView::updateTodo( Todo * t, int type ) 1447void KOTodoView::updateTodo( Todo * t, int type )
1448{ 1448{
1449 if ( mBlockUpdate) 1449 if ( mBlockUpdate)
1450 return; 1450 return;
1451 1451
1452 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 1452 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
1453 itemIterator = mTodoMap.find(t); 1453 itemIterator = mTodoMap.find(t);
1454 if (itemIterator != mTodoMap.end()) { 1454 if (itemIterator != mTodoMap.end()) {
1455 (*itemIterator)->construct(); 1455 (*itemIterator)->construct();
1456 } else { 1456 } else {
1457 if ( type == KOGlobals::EVENTADDED ) { 1457 if ( type == KOGlobals::EVENTADDED ) {
1458 insertTodoItem( t ); 1458 insertTodoItem( t );
1459 } 1459 }
1460 } 1460 }
1461 1461
1462} 1462}
1463 1463
1464void KOTodoView::todoModified(Todo * t , int p ) 1464void KOTodoView::todoModified(Todo * t , int p )
1465{ 1465{
1466 mBlockUpdate = true; 1466 mBlockUpdate = true;
1467 emit todoModifiedSignal ( t, p ); 1467 emit todoModifiedSignal ( t, p );
1468 mBlockUpdate = false; 1468 mBlockUpdate = false;
1469} 1469}
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 406cd48..ed39ddb 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -1,467 +1,475 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 1998 Preston Brown 3 Copyright (c) 1998 Preston Brown
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library 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 GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22#include <stdlib.h> 22#include <stdlib.h>
23#include <time.h> 23#include <time.h>
24 24
25#include <kdebug.h> 25#include <kdebug.h>
26#include <kglobal.h> 26#include <kglobal.h>
27#include <klocale.h> 27#include <klocale.h>
28 28
29#include "exceptions.h" 29#include "exceptions.h"
30#include "calfilter.h" 30#include "calfilter.h"
31 31
32#include "calendar.h" 32#include "calendar.h"
33#include "syncdefines.h" 33#include "syncdefines.h"
34 34
35using namespace KCal; 35using namespace KCal;
36 36
37Calendar::Calendar() 37Calendar::Calendar()
38{ 38{
39 39
40 init(); 40 init();
41 setTimeZoneId( " 00:00 Europe/London(UTC)" ); 41 setTimeZoneId( " 00:00 Europe/London(UTC)" );
42} 42}
43 43
44Calendar::Calendar( const QString &timeZoneId ) 44Calendar::Calendar( const QString &timeZoneId )
45{ 45{
46 46
47 init(); 47 init();
48 setTimeZoneId(timeZoneId); 48 setTimeZoneId(timeZoneId);
49} 49}
50 50
51void Calendar::init() 51void Calendar::init()
52{ 52{
53 mObserver = 0; 53 mObserver = 0;
54 mNewObserver = false; 54 mNewObserver = false;
55 mUndoIncidence = 0; 55 mUndoIncidence = 0;
56 mModified = false; 56 mModified = false;
57 57
58 // Setup default filter, which does nothing 58 // Setup default filter, which does nothing
59 mDefaultFilter = new CalFilter; 59 mDefaultFilter = new CalFilter;
60 mFilter = mDefaultFilter; 60 mFilter = mDefaultFilter;
61 mFilter->setEnabled(false); 61 mFilter->setEnabled(false);
62 62
63 // initialize random numbers. This is a hack, and not 63 // initialize random numbers. This is a hack, and not
64 // even that good of one at that. 64 // even that good of one at that.
65// srandom(time(0)); 65// srandom(time(0));
66 66
67 // user information... 67 // user information...
68 setOwner(i18n("Unknown Name")); 68 setOwner(i18n("Unknown Name"));
69 setEmail(i18n("unknown@nowhere")); 69 setEmail(i18n("unknown@nowhere"));
70 70
71#if 0 71#if 0
72 tmpStr = KOPrefs::instance()->mTimeZone; 72 tmpStr = KOPrefs::instance()->mTimeZone;
73// kdDebug(5800) << "Calendar::Calendar(): TimeZone: " << tmpStr << endl; 73// kdDebug(5800) << "Calendar::Calendar(): TimeZone: " << tmpStr << endl;
74 int dstSetting = KOPrefs::instance()->mDaylightSavings; 74 int dstSetting = KOPrefs::instance()->mDaylightSavings;
75 extern long int timezone; 75 extern long int timezone;
76 struct tm *now; 76 struct tm *now;
77 time_t curtime; 77 time_t curtime;
78 curtime = time(0); 78 curtime = time(0);
79 now = localtime(&curtime); 79 now = localtime(&curtime);
80 int hourOff = - ((timezone / 60) / 60); 80 int hourOff = - ((timezone / 60) / 60);
81 if (now->tm_isdst) 81 if (now->tm_isdst)
82 hourOff += 1; 82 hourOff += 1;
83 QString tzStr; 83 QString tzStr;
84 tzStr.sprintf("%.2d%.2d", 84 tzStr.sprintf("%.2d%.2d",
85 hourOff, 85 hourOff,
86 abs((timezone / 60) % 60)); 86 abs((timezone / 60) % 60));
87 87
88 // if no time zone was in the config file, write what we just discovered. 88 // if no time zone was in the config file, write what we just discovered.
89 if (tmpStr.isEmpty()) { 89 if (tmpStr.isEmpty()) {
90// KOPrefs::instance()->mTimeZone = tzStr; 90// KOPrefs::instance()->mTimeZone = tzStr;
91 } else { 91 } else {
92 tzStr = tmpStr; 92 tzStr = tmpStr;
93 } 93 }
94 94
95 // if daylight savings has changed since last load time, we need 95 // if daylight savings has changed since last load time, we need
96 // to rewrite these settings to the config file. 96 // to rewrite these settings to the config file.
97 if ((now->tm_isdst && !dstSetting) || 97 if ((now->tm_isdst && !dstSetting) ||
98 (!now->tm_isdst && dstSetting)) { 98 (!now->tm_isdst && dstSetting)) {
99 KOPrefs::instance()->mTimeZone = tzStr; 99 KOPrefs::instance()->mTimeZone = tzStr;
100 KOPrefs::instance()->mDaylightSavings = now->tm_isdst; 100 KOPrefs::instance()->mDaylightSavings = now->tm_isdst;
101 } 101 }
102 102
103 setTimeZone(tzStr); 103 setTimeZone(tzStr);
104#endif 104#endif
105 105
106// KOPrefs::instance()->writeConfig(); 106// KOPrefs::instance()->writeConfig();
107} 107}
108 108
109Calendar::~Calendar() 109Calendar::~Calendar()
110{ 110{
111 delete mDefaultFilter; 111 delete mDefaultFilter;
112 if ( mUndoIncidence ) 112 if ( mUndoIncidence )
113 delete mUndoIncidence; 113 delete mUndoIncidence;
114} 114}
115 115
116const QString &Calendar::getOwner() const 116const QString &Calendar::getOwner() const
117{ 117{
118 return mOwner; 118 return mOwner;
119} 119}
120 120
121bool Calendar::undoDeleteIncidence() 121bool Calendar::undoDeleteIncidence()
122{ 122{
123 if (!mUndoIncidence) 123 if (!mUndoIncidence)
124 return false; 124 return false;
125 addIncidence(mUndoIncidence); 125 addIncidence(mUndoIncidence);
126 mUndoIncidence = 0; 126 mUndoIncidence = 0;
127 return true; 127 return true;
128} 128}
129void Calendar::setOwner(const QString &os) 129void Calendar::setOwner(const QString &os)
130{ 130{
131 int i; 131 int i;
132 mOwner = os; 132 mOwner = os;
133 i = mOwner.find(','); 133 i = mOwner.find(',');
134 if (i != -1) 134 if (i != -1)
135 mOwner = mOwner.left(i); 135 mOwner = mOwner.left(i);
136 136
137 setModified( true ); 137 setModified( true );
138} 138}
139 139
140void Calendar::setTimeZone(const QString & tz) 140void Calendar::setTimeZone(const QString & tz)
141{ 141{
142 bool neg = FALSE; 142 bool neg = FALSE;
143 int hours, minutes; 143 int hours, minutes;
144 QString tmpStr(tz); 144 QString tmpStr(tz);
145 145
146 if (tmpStr.left(1) == "-") 146 if (tmpStr.left(1) == "-")
147 neg = TRUE; 147 neg = TRUE;
148 if (tmpStr.left(1) == "-" || tmpStr.left(1) == "+") 148 if (tmpStr.left(1) == "-" || tmpStr.left(1) == "+")
149 tmpStr.remove(0, 1); 149 tmpStr.remove(0, 1);
150 hours = tmpStr.left(2).toInt(); 150 hours = tmpStr.left(2).toInt();
151 if (tmpStr.length() > 2) 151 if (tmpStr.length() > 2)
152 minutes = tmpStr.right(2).toInt(); 152 minutes = tmpStr.right(2).toInt();
153 else 153 else
154 minutes = 0; 154 minutes = 0;
155 mTimeZone = (60*hours+minutes); 155 mTimeZone = (60*hours+minutes);
156 if (neg) 156 if (neg)
157 mTimeZone = -mTimeZone; 157 mTimeZone = -mTimeZone;
158 mLocalTime = false; 158 mLocalTime = false;
159 159
160 setModified( true ); 160 setModified( true );
161} 161}
162 162
163QString Calendar::getTimeZoneStr() const 163QString Calendar::getTimeZoneStr() const
164{ 164{
165 if (mLocalTime) 165 if (mLocalTime)
166 return ""; 166 return "";
167 QString tmpStr; 167 QString tmpStr;
168 int hours = abs(mTimeZone / 60); 168 int hours = abs(mTimeZone / 60);
169 int minutes = abs(mTimeZone % 60); 169 int minutes = abs(mTimeZone % 60);
170 bool neg = mTimeZone < 0; 170 bool neg = mTimeZone < 0;
171 171
172 tmpStr.sprintf("%c%.2d%.2d", 172 tmpStr.sprintf("%c%.2d%.2d",
173 (neg ? '-' : '+'), 173 (neg ? '-' : '+'),
174 hours, minutes); 174 hours, minutes);
175 return tmpStr; 175 return tmpStr;
176} 176}
177 177
178void Calendar::setTimeZone(int tz) 178void Calendar::setTimeZone(int tz)
179{ 179{
180 mTimeZone = tz; 180 mTimeZone = tz;
181 mLocalTime = false; 181 mLocalTime = false;
182 182
183 setModified( true ); 183 setModified( true );
184} 184}
185 185
186int Calendar::getTimeZone() const 186int Calendar::getTimeZone() const
187{ 187{
188 return mTimeZone; 188 return mTimeZone;
189} 189}
190 190
191void Calendar::setTimeZoneId(const QString &id) 191void Calendar::setTimeZoneId(const QString &id)
192{ 192{
193 mTimeZoneId = id; 193 mTimeZoneId = id;
194 mLocalTime = false; 194 mLocalTime = false;
195 mTimeZone = KGlobal::locale()->timezoneOffset(mTimeZoneId); 195 mTimeZone = KGlobal::locale()->timezoneOffset(mTimeZoneId);
196 if ( mTimeZone > 1000) 196 if ( mTimeZone > 1000)
197 setLocalTime(); 197 setLocalTime();
198 //qDebug("Calendar::setTimeZoneOffset %s %d ",mTimeZoneId.latin1(), mTimeZone); 198 //qDebug("Calendar::setTimeZoneOffset %s %d ",mTimeZoneId.latin1(), mTimeZone);
199 setModified( true ); 199 setModified( true );
200} 200}
201 201
202QString Calendar::timeZoneId() const 202QString Calendar::timeZoneId() const
203{ 203{
204 return mTimeZoneId; 204 return mTimeZoneId;
205} 205}
206 206
207void Calendar::setLocalTime() 207void Calendar::setLocalTime()
208{ 208{
209 //qDebug("Calendar::setLocalTime() "); 209 //qDebug("Calendar::setLocalTime() ");
210 mLocalTime = true; 210 mLocalTime = true;
211 mTimeZone = 0; 211 mTimeZone = 0;
212 mTimeZoneId = ""; 212 mTimeZoneId = "";
213 213
214 setModified( true ); 214 setModified( true );
215} 215}
216 216
217bool Calendar::isLocalTime() const 217bool Calendar::isLocalTime() const
218{ 218{
219 return mLocalTime; 219 return mLocalTime;
220} 220}
221 221
222const QString &Calendar::getEmail() 222const QString &Calendar::getEmail()
223{ 223{
224 return mOwnerEmail; 224 return mOwnerEmail;
225} 225}
226 226
227void Calendar::setEmail(const QString &e) 227void Calendar::setEmail(const QString &e)
228{ 228{
229 mOwnerEmail = e; 229 mOwnerEmail = e;
230 230
231 setModified( true ); 231 setModified( true );
232} 232}
233 233
234void Calendar::setFilter(CalFilter *filter) 234void Calendar::setFilter(CalFilter *filter)
235{ 235{
236 mFilter = filter; 236 mFilter = filter;
237} 237}
238 238
239CalFilter *Calendar::filter() 239CalFilter *Calendar::filter()
240{ 240{
241 return mFilter; 241 return mFilter;
242} 242}
243 243
244QPtrList<Incidence> Calendar::incidences() 244QPtrList<Incidence> Calendar::incidences()
245{ 245{
246 QPtrList<Incidence> incidences; 246 QPtrList<Incidence> incidences;
247 247
248 Incidence *i; 248 Incidence *i;
249 249
250 QPtrList<Event> e = events(); 250 QPtrList<Event> e = events();
251 for( i = e.first(); i; i = e.next() ) incidences.append( i ); 251 for( i = e.first(); i; i = e.next() ) incidences.append( i );
252 252
253 QPtrList<Todo> t = todos(); 253 QPtrList<Todo> t = todos();
254 for( i = t.first(); i; i = t.next() ) incidences.append( i ); 254 for( i = t.first(); i; i = t.next() ) incidences.append( i );
255 255
256 QPtrList<Journal> j = journals(); 256 QPtrList<Journal> j = journals();
257 for( i = j.first(); i; i = j.next() ) incidences.append( i ); 257 for( i = j.first(); i; i = j.next() ) incidences.append( i );
258 258
259 return incidences; 259 return incidences;
260} 260}
261 261
262void Calendar::resetPilotStat(int id ) 262void Calendar::resetPilotStat(int id )
263{ 263{
264 QPtrList<Incidence> incidences; 264 QPtrList<Incidence> incidences;
265 265
266 Incidence *i; 266 Incidence *i;
267 267
268 QPtrList<Event> e = rawEvents(); 268 QPtrList<Event> e = rawEvents();
269 for( i = e.first(); i; i = e.next() ) i->setPilotId( id ); 269 for( i = e.first(); i; i = e.next() ) i->setPilotId( id );
270 270
271 QPtrList<Todo> t = rawTodos(); 271 QPtrList<Todo> t = rawTodos();
272 for( i = t.first(); i; i = t.next() ) i->setPilotId( id ); 272 for( i = t.first(); i; i = t.next() ) i->setPilotId( id );
273 273
274 QPtrList<Journal> j = journals(); 274 QPtrList<Journal> j = journals();
275 for( i = j.first(); i; i = j.next() ) i->setPilotId( id ); 275 for( i = j.first(); i; i = j.next() ) i->setPilotId( id );
276} 276}
277void Calendar::resetTempSyncStat() 277void Calendar::resetTempSyncStat()
278{ 278{
279 QPtrList<Incidence> incidences; 279 QPtrList<Incidence> incidences;
280 280
281 Incidence *i; 281 Incidence *i;
282 282
283 QPtrList<Event> e = rawEvents(); 283 QPtrList<Event> e = rawEvents();
284 for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 284 for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
285 285
286 QPtrList<Todo> t = rawTodos(); 286 QPtrList<Todo> t = rawTodos();
287 for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 287 for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
288 288
289 QPtrList<Journal> j = journals(); 289 QPtrList<Journal> j = journals();
290 for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 290 for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
291} 291}
292QPtrList<Incidence> Calendar::rawIncidences() 292QPtrList<Incidence> Calendar::rawIncidences()
293{ 293{
294 QPtrList<Incidence> incidences; 294 QPtrList<Incidence> incidences;
295 295
296 Incidence *i; 296 Incidence *i;
297 297
298 QPtrList<Event> e = rawEvents(); 298 QPtrList<Event> e = rawEvents();
299 for( i = e.first(); i; i = e.next() ) incidences.append( i ); 299 for( i = e.first(); i; i = e.next() ) incidences.append( i );
300 300
301 QPtrList<Todo> t = rawTodos(); 301 QPtrList<Todo> t = rawTodos();
302 for( i = t.first(); i; i = t.next() ) incidences.append( i ); 302 for( i = t.first(); i; i = t.next() ) incidences.append( i );
303 303
304 QPtrList<Journal> j = journals(); 304 QPtrList<Journal> j = journals();
305 for( i = j.first(); i; i = j.next() ) incidences.append( i ); 305 for( i = j.first(); i; i = j.next() ) incidences.append( i );
306 306
307 return incidences; 307 return incidences;
308} 308}
309 309
310QPtrList<Event> Calendar::events( const QDate &date, bool sorted ) 310QPtrList<Event> Calendar::events( const QDate &date, bool sorted )
311{ 311{
312 QPtrList<Event> el = rawEventsForDate(date,sorted); 312 QPtrList<Event> el = rawEventsForDate(date,sorted);
313 mFilter->apply(&el); 313 mFilter->apply(&el);
314 return el; 314 return el;
315} 315}
316 316
317QPtrList<Event> Calendar::events( const QDateTime &qdt ) 317QPtrList<Event> Calendar::events( const QDateTime &qdt )
318{ 318{
319 QPtrList<Event> el = rawEventsForDate(qdt); 319 QPtrList<Event> el = rawEventsForDate(qdt);
320 mFilter->apply(&el); 320 mFilter->apply(&el);
321 return el; 321 return el;
322} 322}
323 323
324QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, 324QPtrList<Event> Calendar::events( const QDate &start, const QDate &end,
325 bool inclusive) 325 bool inclusive)
326{ 326{
327 QPtrList<Event> el = rawEvents(start,end,inclusive); 327 QPtrList<Event> el = rawEvents(start,end,inclusive);
328 mFilter->apply(&el); 328 mFilter->apply(&el);
329 return el; 329 return el;
330} 330}
331 331
332QPtrList<Event> Calendar::events() 332QPtrList<Event> Calendar::events()
333{ 333{
334 QPtrList<Event> el = rawEvents(); 334 QPtrList<Event> el = rawEvents();
335 mFilter->apply(&el); 335 mFilter->apply(&el);
336 return el; 336 return el;
337} 337}
338 338void Calendar::addIncidenceBranch(Incidence *i)
339{
340 addIncidence( i );
341 Incidence * inc;
342 QPtrList<Incidence> Relations = i->relations();
343 for (inc=Relations.first();inc;inc=Relations.next()) {
344 addIncidenceBranch( inc );
345 }
346}
339 347
340bool Calendar::addIncidence(Incidence *i) 348bool Calendar::addIncidence(Incidence *i)
341{ 349{
342 Incidence::AddVisitor<Calendar> v(this); 350 Incidence::AddVisitor<Calendar> v(this);
343 351
344 return i->accept(v); 352 return i->accept(v);
345} 353}
346void Calendar::deleteIncidence(Incidence *in) 354void Calendar::deleteIncidence(Incidence *in)
347{ 355{
348 if ( in->type() == "Event" ) 356 if ( in->type() == "Event" )
349 deleteEvent( (Event*) in ); 357 deleteEvent( (Event*) in );
350 else if ( in->type() =="Todo" ) 358 else if ( in->type() =="Todo" )
351 deleteTodo( (Todo*) in); 359 deleteTodo( (Todo*) in);
352 else if ( in->type() =="Journal" ) 360 else if ( in->type() =="Journal" )
353 deleteJournal( (Journal*) in ); 361 deleteJournal( (Journal*) in );
354} 362}
355 363
356Incidence* Calendar::incidence( const QString& uid ) 364Incidence* Calendar::incidence( const QString& uid )
357{ 365{
358 Incidence* i; 366 Incidence* i;
359 367
360 if( (i = todo( uid )) != 0 ) 368 if( (i = todo( uid )) != 0 )
361 return i; 369 return i;
362 if( (i = event( uid )) != 0 ) 370 if( (i = event( uid )) != 0 )
363 return i; 371 return i;
364 if( (i = journal( uid )) != 0 ) 372 if( (i = journal( uid )) != 0 )
365 return i; 373 return i;
366 374
367 return 0; 375 return 0;
368} 376}
369 377
370QPtrList<Todo> Calendar::todos() 378QPtrList<Todo> Calendar::todos()
371{ 379{
372 QPtrList<Todo> tl = rawTodos(); 380 QPtrList<Todo> tl = rawTodos();
373 mFilter->apply( &tl ); 381 mFilter->apply( &tl );
374 return tl; 382 return tl;
375} 383}
376 384
377// When this is called, the todo have already been added to the calendar. 385// When this is called, the todo have already been added to the calendar.
378// This method is only about linking related todos 386// This method is only about linking related todos
379void Calendar::setupRelations( Incidence *incidence ) 387void Calendar::setupRelations( Incidence *incidence )
380{ 388{
381 QString uid = incidence->uid(); 389 QString uid = incidence->uid();
382 //qDebug("Calendar::setupRelations "); 390 //qDebug("Calendar::setupRelations ");
383 // First, go over the list of orphans and see if this is their parent 391 // First, go over the list of orphans and see if this is their parent
384 while( Incidence* i = mOrphans[ uid ] ) { 392 while( Incidence* i = mOrphans[ uid ] ) {
385 mOrphans.remove( uid ); 393 mOrphans.remove( uid );
386 i->setRelatedTo( incidence ); 394 i->setRelatedTo( incidence );
387 incidence->addRelation( i ); 395 incidence->addRelation( i );
388 mOrphanUids.remove( i->uid() ); 396 mOrphanUids.remove( i->uid() );
389 } 397 }
390 398
391 // Now see about this incidences parent 399 // Now see about this incidences parent
392 if( !incidence->relatedTo() && !incidence->relatedToUid().isEmpty() ) { 400 if( !incidence->relatedTo() && !incidence->relatedToUid().isEmpty() ) {
393 // This incidence has a uid it is related to, but is not registered to it yet 401 // This incidence has a uid it is related to, but is not registered to it yet
394 // Try to find it 402 // Try to find it
395 Incidence* parent = this->incidence( incidence->relatedToUid() ); 403 Incidence* parent = this->incidence( incidence->relatedToUid() );
396 if( parent ) { 404 if( parent ) {
397 // Found it 405 // Found it
398 incidence->setRelatedTo( parent ); 406 incidence->setRelatedTo( parent );
399 parent->addRelation( incidence ); 407 parent->addRelation( incidence );
400 } else { 408 } else {
401 // Not found, put this in the mOrphans list 409 // Not found, put this in the mOrphans list
402 mOrphans.insert( incidence->relatedToUid(), incidence ); 410 mOrphans.insert( incidence->relatedToUid(), incidence );
403 mOrphanUids.insert( incidence->uid(), incidence ); 411 mOrphanUids.insert( incidence->uid(), incidence );
404 } 412 }
405 } 413 }
406} 414}
407 415
408// If a task with subtasks is deleted, move it's subtasks to the orphans list 416// If a task with subtasks is deleted, move it's subtasks to the orphans list
409void Calendar::removeRelations( Incidence *incidence ) 417void Calendar::removeRelations( Incidence *incidence )
410{ 418{
411 // qDebug("Calendar::removeRelations "); 419 // qDebug("Calendar::removeRelations ");
412 QString uid = incidence->uid(); 420 QString uid = incidence->uid();
413 421
414 QPtrList<Incidence> relations = incidence->relations(); 422 QPtrList<Incidence> relations = incidence->relations();
415 for( Incidence* i = relations.first(); i; i = relations.next() ) 423 for( Incidence* i = relations.first(); i; i = relations.next() )
416 if( !mOrphanUids.find( i->uid() ) ) { 424 if( !mOrphanUids.find( i->uid() ) ) {
417 mOrphans.insert( uid, i ); 425 mOrphans.insert( uid, i );
418 mOrphanUids.insert( i->uid(), i ); 426 mOrphanUids.insert( i->uid(), i );
419 i->setRelatedTo( 0 ); 427 i->setRelatedTo( 0 );
420 i->setRelatedToUid( uid ); 428 i->setRelatedToUid( uid );
421 } 429 }
422 430
423 // If this incidence is related to something else, tell that about it 431 // If this incidence is related to something else, tell that about it
424 if( incidence->relatedTo() ) 432 if( incidence->relatedTo() )
425 incidence->relatedTo()->removeRelation( incidence ); 433 incidence->relatedTo()->removeRelation( incidence );
426 434
427 // Remove this one from the orphans list 435 // Remove this one from the orphans list
428 if( mOrphanUids.remove( uid ) ) 436 if( mOrphanUids.remove( uid ) )
429 // This incidence is located in the orphans list - it should be removed 437 // This incidence is located in the orphans list - it should be removed
430 if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) { 438 if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) {
431 // Removing wasn't that easy 439 // Removing wasn't that easy
432 for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) { 440 for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
433 if( it.current()->uid() == uid ) { 441 if( it.current()->uid() == uid ) {
434 mOrphans.remove( it.currentKey() ); 442 mOrphans.remove( it.currentKey() );
435 break; 443 break;
436 } 444 }
437 } 445 }
438 } 446 }
439} 447}
440 448
441void Calendar::registerObserver( Observer *observer ) 449void Calendar::registerObserver( Observer *observer )
442{ 450{
443 mObserver = observer; 451 mObserver = observer;
444 mNewObserver = true; 452 mNewObserver = true;
445} 453}
446 454
447void Calendar::setModified( bool modified ) 455void Calendar::setModified( bool modified )
448{ 456{
449 if ( mObserver ) mObserver->calendarModified( modified, this ); 457 if ( mObserver ) mObserver->calendarModified( modified, this );
450 if ( modified != mModified || mNewObserver ) { 458 if ( modified != mModified || mNewObserver ) {
451 mNewObserver = false; 459 mNewObserver = false;
452 // if ( mObserver ) mObserver->calendarModified( modified, this ); 460 // if ( mObserver ) mObserver->calendarModified( modified, this );
453 mModified = modified; 461 mModified = modified;
454 } 462 }
455} 463}
456 464
457void Calendar::setLoadedProductId( const QString &id ) 465void Calendar::setLoadedProductId( const QString &id )
458{ 466{
459 mLoadedProductId = id; 467 mLoadedProductId = id;
460} 468}
461 469
462QString Calendar::loadedProductId() 470QString Calendar::loadedProductId()
463{ 471{
464 return mLoadedProductId; 472 return mLoadedProductId;
465} 473}
466 474
467//#include "calendar.moc" 475//#include "calendar.moc"
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 2f2c3aa..ab40970 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -1,356 +1,359 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 1998 Preston Brown 3 Copyright (c) 1998 Preston Brown
4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library 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 GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22#ifndef CALENDAR_H 22#ifndef CALENDAR_H
23#define CALENDAR_H 23#define CALENDAR_H
24 24
25#include <qobject.h> 25#include <qobject.h>
26#include <qstring.h> 26#include <qstring.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qptrlist.h> 28#include <qptrlist.h>
29#include <qdict.h> 29#include <qdict.h>
30 30
31#include "customproperties.h" 31#include "customproperties.h"
32#include "event.h" 32#include "event.h"
33#include "todo.h" 33#include "todo.h"
34#include "journal.h" 34#include "journal.h"
35#include "calfilter.h" 35#include "calfilter.h"
36 36
37//#define _TIME_ZONE "-0500" /* hardcoded, overridden in config file. */ 37//#define _TIME_ZONE "-0500" /* hardcoded, overridden in config file. */
38 38
39class KConfig; 39class KConfig;
40 40
41namespace KCal { 41namespace KCal {
42 42
43 43
44/** 44/**
45 This is the main "calendar" object class for KOrganizer. It holds 45 This is the main "calendar" object class for KOrganizer. It holds
46 information like all appointments/events, user information, etc. etc. 46 information like all appointments/events, user information, etc. etc.
47 one calendar is associated with each CalendarView (@see calendarview.h). 47 one calendar is associated with each CalendarView (@see calendarview.h).
48 This is an abstract base class defining the interface to a calendar. It is 48 This is an abstract base class defining the interface to a calendar. It is
49 implemented by subclasses like @see CalendarLocal, which use different 49 implemented by subclasses like @see CalendarLocal, which use different
50 methods to store and access the data. 50 methods to store and access the data.
51 51
52 Ownership of events etc. is handled by the following policy: As soon as an 52 Ownership of events etc. is handled by the following policy: As soon as an
53 event (or any other subclass of IncidenceBase) object is added to the 53 event (or any other subclass of IncidenceBase) object is added to the
54 Calendar by addEvent() it is owned by the Calendar object. The Calendar takes 54 Calendar by addEvent() it is owned by the Calendar object. The Calendar takes
55 care of deleting it. All Events returned by the query functions are returned 55 care of deleting it. All Events returned by the query functions are returned
56 as pointers, that means all changes to the returned events are immediately 56 as pointers, that means all changes to the returned events are immediately
57 visible in the Calendar. You shouldn't delete any Event object you get from 57 visible in the Calendar. You shouldn't delete any Event object you get from
58 Calendar. 58 Calendar.
59*/ 59*/
60class Calendar : public QObject, public CustomProperties, 60class Calendar : public QObject, public CustomProperties,
61 public IncidenceBase::Observer 61 public IncidenceBase::Observer
62{ 62{
63 Q_OBJECT 63 Q_OBJECT
64public: 64public:
65 Calendar(); 65 Calendar();
66 Calendar(const QString &timeZoneId); 66 Calendar(const QString &timeZoneId);
67 virtual ~Calendar(); 67 virtual ~Calendar();
68 Incidence * undoIncidence() { return mUndoIncidence; }; 68 Incidence * undoIncidence() { return mUndoIncidence; };
69 bool undoDeleteIncidence(); 69 bool undoDeleteIncidence();
70 void deleteIncidence(Incidence *in); 70 void deleteIncidence(Incidence *in);
71 void resetTempSyncStat(); 71 void resetTempSyncStat();
72 void resetPilotStat(int id); 72 void resetPilotStat(int id);
73 /** 73 /**
74 Clears out the current calendar, freeing all used memory etc. 74 Clears out the current calendar, freeing all used memory etc.
75 */ 75 */
76 virtual void close() = 0; 76 virtual void close() = 0;
77 77
78 /** 78 /**
79 Sync changes in memory to persistant storage. 79 Sync changes in memory to persistant storage.
80 */ 80 */
81 virtual void save() = 0; 81 virtual void save() = 0;
82 virtual QPtrList<Event> getExternLastSyncEvents() = 0; 82 virtual QPtrList<Event> getExternLastSyncEvents() = 0;
83 virtual void removeSyncInfo( QString syncProfile) = 0; 83 virtual void removeSyncInfo( QString syncProfile) = 0;
84 virtual bool isSaving() { return false; } 84 virtual bool isSaving() { return false; }
85 85
86 /** 86 /**
87 Return the owner of the calendar's full name. 87 Return the owner of the calendar's full name.
88 */ 88 */
89 const QString &getOwner() const; 89 const QString &getOwner() const;
90 /** 90 /**
91 Set the owner of the calendar. Should be owner's full name. 91 Set the owner of the calendar. Should be owner's full name.
92 */ 92 */
93 void setOwner( const QString &os ); 93 void setOwner( const QString &os );
94 /** 94 /**
95 Return the email address of the calendar owner. 95 Return the email address of the calendar owner.
96 */ 96 */
97 const QString &getEmail(); 97 const QString &getEmail();
98 /** 98 /**
99 Set the email address of the calendar owner. 99 Set the email address of the calendar owner.
100 */ 100 */
101 void setEmail( const QString & ); 101 void setEmail( const QString & );
102 102
103 /** 103 /**
104 Set time zone from a timezone string (e.g. -2:00) 104 Set time zone from a timezone string (e.g. -2:00)
105 */ 105 */
106 void setTimeZone( const QString &tz ); 106 void setTimeZone( const QString &tz );
107 /** 107 /**
108 Set time zone from a minutes value (e.g. -60) 108 Set time zone from a minutes value (e.g. -60)
109 */ 109 */
110 void setTimeZone( int tz ); 110 void setTimeZone( int tz );
111 /** 111 /**
112 Return time zone as offest in minutes. 112 Return time zone as offest in minutes.
113 */ 113 */
114 int getTimeZone() const; 114 int getTimeZone() const;
115 /** 115 /**
116 Compute an ISO 8601 format string from the time zone. 116 Compute an ISO 8601 format string from the time zone.
117 */ 117 */
118 QString getTimeZoneStr() const; 118 QString getTimeZoneStr() const;
119 /** 119 /**
120 Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal 120 Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal
121 values). 121 values).
122 */ 122 */
123 void setTimeZoneId( const QString & ); 123 void setTimeZoneId( const QString & );
124 /** 124 /**
125 Return time zone id. 125 Return time zone id.
126 */ 126 */
127 QString timeZoneId() const; 127 QString timeZoneId() const;
128 /** 128 /**
129 Use local time, not UTC or a time zone. 129 Use local time, not UTC or a time zone.
130 */ 130 */
131 void setLocalTime(); 131 void setLocalTime();
132 /** 132 /**
133 Return whether local time is being used. 133 Return whether local time is being used.
134 */ 134 */
135 bool isLocalTime() const; 135 bool isLocalTime() const;
136 136
137 /** 137 /**
138 Add an incidence to calendar. 138 Add an incidence to calendar.
139 139
140 @return true on success, false on error. 140 @return true on success, false on error.
141 */ 141 */
142 virtual bool addIncidence( Incidence * ); 142 virtual bool addIncidence( Incidence * );
143
144 // Adds an incidence and all relatedto incidences to the cal
145 void addIncidenceBranch( Incidence * );
143 /** 146 /**
144 Return filtered list of all incidences of this calendar. 147 Return filtered list of all incidences of this calendar.
145 */ 148 */
146 virtual QPtrList<Incidence> incidences(); 149 virtual QPtrList<Incidence> incidences();
147 150
148 /** 151 /**
149 Return unfiltered list of all incidences of this calendar. 152 Return unfiltered list of all incidences of this calendar.
150 */ 153 */
151 virtual QPtrList<Incidence> rawIncidences(); 154 virtual QPtrList<Incidence> rawIncidences();
152 155
153 /** 156 /**
154 Adds a Event to this calendar object. 157 Adds a Event to this calendar object.
155 @param anEvent a pointer to the event to add 158 @param anEvent a pointer to the event to add
156 159
157 @return true on success, false on error. 160 @return true on success, false on error.
158 */ 161 */
159 virtual bool addEventNoDup( Event *event ) = 0; 162 virtual bool addEventNoDup( Event *event ) = 0;
160 virtual bool addAnniversaryNoDup( Event *event ) = 0; 163 virtual bool addAnniversaryNoDup( Event *event ) = 0;
161 virtual bool addEvent( Event *anEvent ) = 0; 164 virtual bool addEvent( Event *anEvent ) = 0;
162 /** 165 /**
163 Delete event from calendar. 166 Delete event from calendar.
164 */ 167 */
165 virtual void deleteEvent( Event * ) = 0; 168 virtual void deleteEvent( Event * ) = 0;
166 /** 169 /**
167 Retrieves an event on the basis of the unique string ID. 170 Retrieves an event on the basis of the unique string ID.
168 */ 171 */
169 virtual Event *event( const QString &UniqueStr ) = 0; 172 virtual Event *event( const QString &UniqueStr ) = 0;
170 virtual Event *event( QString, QString ) = 0; 173 virtual Event *event( QString, QString ) = 0;
171 /** 174 /**
172 Builds and then returns a list of all events that match for the 175 Builds and then returns a list of all events that match for the
173 date specified. useful for dayView, etc. etc. 176 date specified. useful for dayView, etc. etc.
174 The calendar filter is applied. 177 The calendar filter is applied.
175 */ 178 */
176 QPtrList<Event> events( const QDate &date, bool sorted = false); 179 QPtrList<Event> events( const QDate &date, bool sorted = false);
177 /** 180 /**
178 Get events, which occur on the given date. 181 Get events, which occur on the given date.
179 The calendar filter is applied. 182 The calendar filter is applied.
180 */ 183 */
181 QPtrList<Event> events( const QDateTime &qdt ); 184 QPtrList<Event> events( const QDateTime &qdt );
182 /** 185 /**
183 Get events in a range of dates. If inclusive is set to true, only events 186 Get events in a range of dates. If inclusive is set to true, only events
184 are returned, which are completely included in the range. 187 are returned, which are completely included in the range.
185 The calendar filter is applied. 188 The calendar filter is applied.
186 */ 189 */
187 QPtrList<Event> events( const QDate &start, const QDate &end, 190 QPtrList<Event> events( const QDate &start, const QDate &end,
188 bool inclusive = false); 191 bool inclusive = false);
189 /** 192 /**
190 Return filtered list of all events in calendar. 193 Return filtered list of all events in calendar.
191 */ 194 */
192 virtual QPtrList<Event> events(); 195 virtual QPtrList<Event> events();
193 /** 196 /**
194 Return unfiltered list of all events in calendar. 197 Return unfiltered list of all events in calendar.
195 */ 198 */
196 virtual QPtrList<Event> rawEvents() = 0; 199 virtual QPtrList<Event> rawEvents() = 0;
197 200
198 /** 201 /**
199 Add a todo to the todolist. 202 Add a todo to the todolist.
200 203
201 @return true on success, false on error. 204 @return true on success, false on error.
202 */ 205 */
203 virtual bool addTodo( Todo *todo ) = 0; 206 virtual bool addTodo( Todo *todo ) = 0;
204 virtual bool addTodoNoDup( Todo *todo ) = 0; 207 virtual bool addTodoNoDup( Todo *todo ) = 0;
205 /** 208 /**
206 Remove a todo from the todolist. 209 Remove a todo from the todolist.
207 */ 210 */
208 virtual void deleteTodo( Todo * ) = 0; 211 virtual void deleteTodo( Todo * ) = 0;
209 virtual void deleteJournal( Journal * ) = 0; 212 virtual void deleteJournal( Journal * ) = 0;
210 /** 213 /**
211 Return filterd list of todos. 214 Return filterd list of todos.
212 */ 215 */
213 virtual QPtrList<Todo> todos(); 216 virtual QPtrList<Todo> todos();
214 /** 217 /**
215 Searches todolist for an event with this unique string identifier, 218 Searches todolist for an event with this unique string identifier,
216 returns a pointer or null. 219 returns a pointer or null.
217 */ 220 */
218 virtual Todo *todo( const QString &uid ) = 0; 221 virtual Todo *todo( const QString &uid ) = 0;
219 virtual Todo *todo( QString, QString ) = 0; 222 virtual Todo *todo( QString, QString ) = 0;
220 /** 223 /**
221 Returns list of todos due on the specified date. 224 Returns list of todos due on the specified date.
222 */ 225 */
223 virtual QPtrList<Todo> todos( const QDate &date ) = 0; 226 virtual QPtrList<Todo> todos( const QDate &date ) = 0;
224 /** 227 /**
225 Return unfiltered list of todos. 228 Return unfiltered list of todos.
226 */ 229 */
227 virtual QPtrList<Todo> rawTodos() = 0; 230 virtual QPtrList<Todo> rawTodos() = 0;
228 231
229 /** 232 /**
230 Add a Journal entry to calendar. 233 Add a Journal entry to calendar.
231 234
232 @return true on success, false on error. 235 @return true on success, false on error.
233 */ 236 */
234 virtual bool addJournal( Journal * ) = 0; 237 virtual bool addJournal( Journal * ) = 0;
235 /** 238 /**
236 Return Journal for given date. 239 Return Journal for given date.
237 */ 240 */
238 virtual Journal *journal( const QDate & ) = 0; 241 virtual Journal *journal( const QDate & ) = 0;
239 /** 242 /**
240 Return Journal with given UID. 243 Return Journal with given UID.
241 */ 244 */
242 virtual Journal *journal( const QString &UID ) = 0; 245 virtual Journal *journal( const QString &UID ) = 0;
243 /** 246 /**
244 Return list of all Journal entries. 247 Return list of all Journal entries.
245 */ 248 */
246 virtual QPtrList<Journal> journals() = 0; 249 virtual QPtrList<Journal> journals() = 0;
247 250
248 /** 251 /**
249 Searches all incidence types for an incidence with this unique 252 Searches all incidence types for an incidence with this unique
250 string identifier, returns a pointer or null. 253 string identifier, returns a pointer or null.
251 */ 254 */
252 Incidence* incidence( const QString&UID ); 255 Incidence* incidence( const QString&UID );
253 256
254 /** 257 /**
255 Setup relations for an incidence. 258 Setup relations for an incidence.
256 */ 259 */
257 virtual void setupRelations( Incidence * ); 260 virtual void setupRelations( Incidence * );
258 /** 261 /**
259 Remove all relations to an incidence 262 Remove all relations to an incidence
260 */ 263 */
261 virtual void removeRelations( Incidence * ); 264 virtual void removeRelations( Incidence * );
262 265
263 /** 266 /**
264 Set calendar filter, which filters events for the events() functions. 267 Set calendar filter, which filters events for the events() functions.
265 The Filter object is owned by the caller. 268 The Filter object is owned by the caller.
266 */ 269 */
267 void setFilter( CalFilter * ); 270 void setFilter( CalFilter * );
268 /** 271 /**
269 Return calendar filter. 272 Return calendar filter.
270 */ 273 */
271 CalFilter *filter(); 274 CalFilter *filter();
272 virtual QDateTime nextAlarm( int daysTo ) = 0; 275 virtual QDateTime nextAlarm( int daysTo ) = 0;
273 virtual QString nextSummary( ) const = 0; 276 virtual QString nextSummary( ) const = 0;
274 virtual void reInitAlarmSettings() = 0; 277 virtual void reInitAlarmSettings() = 0;
275 virtual QDateTime nextAlarmEventDateTime() const = 0; 278 virtual QDateTime nextAlarmEventDateTime() const = 0;
276 virtual void checkAlarmForIncidence( Incidence *, bool ) = 0; 279 virtual void checkAlarmForIncidence( Incidence *, bool ) = 0;
277 /** 280 /**
278 Return all alarms, which ocur in the given time interval. 281 Return all alarms, which ocur in the given time interval.
279 */ 282 */
280 virtual Alarm::List alarms( const QDateTime &from, 283 virtual Alarm::List alarms( const QDateTime &from,
281 const QDateTime &to ) = 0; 284 const QDateTime &to ) = 0;
282 285
283 class Observer { 286 class Observer {
284 public: 287 public:
285 virtual void calendarModified( bool, Calendar * ) = 0; 288 virtual void calendarModified( bool, Calendar * ) = 0;
286 }; 289 };
287 290
288 void registerObserver( Observer * ); 291 void registerObserver( Observer * );
289 292
290 void setModified( bool ); 293 void setModified( bool );
291 294
292 /** 295 /**
293 Set product id returned by loadedProductId(). This function is only 296 Set product id returned by loadedProductId(). This function is only
294 useful for the calendar loading code. 297 useful for the calendar loading code.
295 */ 298 */
296 void setLoadedProductId( const QString & ); 299 void setLoadedProductId( const QString & );
297 /** 300 /**
298 Return product id taken from file that has been loaded. Returns 301 Return product id taken from file that has been loaded. Returns
299 QString::null, if no calendar has been loaded. 302 QString::null, if no calendar has been loaded.
300 */ 303 */
301 QString loadedProductId(); 304 QString loadedProductId();
302 305
303 signals: 306 signals:
304 void calendarChanged(); 307 void calendarChanged();
305 void calendarSaved(); 308 void calendarSaved();
306 void calendarLoaded(); 309 void calendarLoaded();
307 void addAlarm(const QDateTime &qdt, const QString &noti ); 310 void addAlarm(const QDateTime &qdt, const QString &noti );
308 void removeAlarm(const QDateTime &qdt, const QString &noti ); 311 void removeAlarm(const QDateTime &qdt, const QString &noti );
309 312
310 protected: 313 protected:
311 /** 314 /**
312 Get unfiltered events, which occur on the given date. 315 Get unfiltered events, which occur on the given date.
313 */ 316 */
314 virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; 317 virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0;
315 /** 318 /**
316 Get unfiltered events, which occur on the given date. 319 Get unfiltered events, which occur on the given date.
317 */ 320 */
318 virtual QPtrList<Event> rawEventsForDate( const QDate &date, 321 virtual QPtrList<Event> rawEventsForDate( const QDate &date,
319 bool sorted = false ) = 0; 322 bool sorted = false ) = 0;
320 /** 323 /**
321 Get events in a range of dates. If inclusive is set to true, only events 324 Get events in a range of dates. If inclusive is set to true, only events
322 are returned, which are completely included in the range. 325 are returned, which are completely included in the range.
323 */ 326 */
324 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, 327 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end,
325 bool inclusive = false ) = 0; 328 bool inclusive = false ) = 0;
326 Incidence *mNextAlarmIncidence; 329 Incidence *mNextAlarmIncidence;
327 Incidence *mUndoIncidence; 330 Incidence *mUndoIncidence;
328 331
329private: 332private:
330 void init(); 333 void init();
331 334
332 QString mOwner; // who the calendar belongs to 335 QString mOwner; // who the calendar belongs to
333 QString mOwnerEmail; // email address of the owner 336 QString mOwnerEmail; // email address of the owner
334 int mTimeZone; // timezone OFFSET from GMT (MINUTES) 337 int mTimeZone; // timezone OFFSET from GMT (MINUTES)
335 bool mLocalTime; // use local time, not UTC or a time zone 338 bool mLocalTime; // use local time, not UTC or a time zone
336 339
337 CalFilter *mFilter; 340 CalFilter *mFilter;
338 CalFilter *mDefaultFilter; 341 CalFilter *mDefaultFilter;
339 342
340 QString mTimeZoneId; 343 QString mTimeZoneId;
341 344
342 Observer *mObserver; 345 Observer *mObserver;
343 bool mNewObserver; 346 bool mNewObserver;
344 347
345 bool mModified; 348 bool mModified;
346 349
347 QString mLoadedProductId; 350 QString mLoadedProductId;
348 351
349 // This list is used to put together related todos 352 // This list is used to put together related todos
350 QDict<Incidence> mOrphans; 353 QDict<Incidence> mOrphans;
351 QDict<Incidence> mOrphanUids; 354 QDict<Incidence> mOrphanUids;
352}; 355};
353 356
354} 357}
355 358
356#endif 359#endif
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 6bca12c..78fa24f 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -1,650 +1,662 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <kglobal.h> 21#include <kglobal.h>
22#include <klocale.h> 22#include <klocale.h>
23#include <kdebug.h> 23#include <kdebug.h>
24 24
25#include "calformat.h" 25#include "calformat.h"
26 26
27#include "incidence.h" 27#include "incidence.h"
28#include "todo.h" 28#include "todo.h"
29 29
30using namespace KCal; 30using namespace KCal;
31 31
32Incidence::Incidence() : 32Incidence::Incidence() :
33 IncidenceBase(), 33 IncidenceBase(),
34 mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3) 34 mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3)
35{ 35{
36 mRecurrence = new Recurrence(this); 36 mRecurrence = new Recurrence(this);
37 mCancelled = false; 37 mCancelled = false;
38 recreate(); 38 recreate();
39 mHasStartDate = true; 39 mHasStartDate = true;
40 mAlarms.setAutoDelete(true); 40 mAlarms.setAutoDelete(true);
41 mAttachments.setAutoDelete(true); 41 mAttachments.setAutoDelete(true);
42 mHasRecurrenceID = false; 42 mHasRecurrenceID = false;
43 mHoliday = false; 43 mHoliday = false;
44 mBirthday = false; 44 mBirthday = false;
45 mAnniversary = false; 45 mAnniversary = false;
46 46
47} 47}
48 48
49Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) 49Incidence::Incidence( const Incidence &i ) : IncidenceBase( i )
50{ 50{
51// TODO: reenable attributes currently commented out. 51// TODO: reenable attributes currently commented out.
52 mRevision = i.mRevision; 52 mRevision = i.mRevision;
53 mCreated = i.mCreated; 53 mCreated = i.mCreated;
54 mDescription = i.mDescription; 54 mDescription = i.mDescription;
55 mSummary = i.mSummary; 55 mSummary = i.mSummary;
56 mCategories = i.mCategories; 56 mCategories = i.mCategories;
57// Incidence *mRelatedTo; Incidence *mRelatedTo; 57// Incidence *mRelatedTo; Incidence *mRelatedTo;
58 mRelatedTo = 0; 58 mRelatedTo = 0;
59 mRelatedToUid = i.mRelatedToUid; 59 mRelatedToUid = i.mRelatedToUid;
60// QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; 60// QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations;
61 mExDates = i.mExDates; 61 mExDates = i.mExDates;
62 mAttachments = i.mAttachments; 62 mAttachments = i.mAttachments;
63 mResources = i.mResources; 63 mResources = i.mResources;
64 mSecrecy = i.mSecrecy; 64 mSecrecy = i.mSecrecy;
65 mPriority = i.mPriority; 65 mPriority = i.mPriority;
66 mLocation = i.mLocation; 66 mLocation = i.mLocation;
67 mCancelled = i.mCancelled; 67 mCancelled = i.mCancelled;
68 mHasStartDate = i.mHasStartDate; 68 mHasStartDate = i.mHasStartDate;
69 QPtrListIterator<Alarm> it( i.mAlarms ); 69 QPtrListIterator<Alarm> it( i.mAlarms );
70 const Alarm *a; 70 const Alarm *a;
71 while( (a = it.current()) ) { 71 while( (a = it.current()) ) {
72 Alarm *b = new Alarm( *a ); 72 Alarm *b = new Alarm( *a );
73 b->setParent( this ); 73 b->setParent( this );
74 mAlarms.append( b ); 74 mAlarms.append( b );
75 75
76 ++it; 76 ++it;
77 } 77 }
78 mAlarms.setAutoDelete(true); 78 mAlarms.setAutoDelete(true);
79 mHasRecurrenceID = i.mHasRecurrenceID; 79 mHasRecurrenceID = i.mHasRecurrenceID;
80 mRecurrenceID = i.mRecurrenceID; 80 mRecurrenceID = i.mRecurrenceID;
81 mRecurrence = new Recurrence( *(i.mRecurrence), this ); 81 mRecurrence = new Recurrence( *(i.mRecurrence), this );
82 mHoliday = i.mHoliday ; 82 mHoliday = i.mHoliday ;
83 mBirthday = i.mBirthday; 83 mBirthday = i.mBirthday;
84 mAnniversary = i.mAnniversary; 84 mAnniversary = i.mAnniversary;
85} 85}
86 86
87Incidence::~Incidence() 87Incidence::~Incidence()
88{ 88{
89 89
90 Incidence *ev; 90 Incidence *ev;
91 QPtrList<Incidence> Relations = relations(); 91 QPtrList<Incidence> Relations = relations();
92 for (ev=Relations.first();ev;ev=Relations.next()) { 92 for (ev=Relations.first();ev;ev=Relations.next()) {
93 if (ev->relatedTo() == this) ev->setRelatedTo(0); 93 if (ev->relatedTo() == this) ev->setRelatedTo(0);
94 } 94 }
95 if (relatedTo()) relatedTo()->removeRelation(this); 95 if (relatedTo()) relatedTo()->removeRelation(this);
96 delete mRecurrence; 96 delete mRecurrence;
97 97
98} 98}
99 99
100bool Incidence::isHoliday() const 100bool Incidence::isHoliday() const
101{ 101{
102 return mHoliday; 102 return mHoliday;
103} 103}
104bool Incidence::isBirthday() const 104bool Incidence::isBirthday() const
105{ 105{
106 106
107 return mBirthday ; 107 return mBirthday ;
108} 108}
109bool Incidence::isAnniversary() const 109bool Incidence::isAnniversary() const
110{ 110{
111 return mAnniversary ; 111 return mAnniversary ;
112 112
113} 113}
114 114
115bool Incidence::hasRecurrenceID() const 115bool Incidence::hasRecurrenceID() const
116{ 116{
117 return mHasRecurrenceID; 117 return mHasRecurrenceID;
118} 118}
119 119
120void Incidence::setHasRecurrenceID( bool b ) 120void Incidence::setHasRecurrenceID( bool b )
121{ 121{
122 mHasRecurrenceID = b; 122 mHasRecurrenceID = b;
123} 123}
124 124
125void Incidence::setRecurrenceID(QDateTime d) 125void Incidence::setRecurrenceID(QDateTime d)
126{ 126{
127 mRecurrenceID = d; 127 mRecurrenceID = d;
128 mHasRecurrenceID = true; 128 mHasRecurrenceID = true;
129 updated(); 129 updated();
130} 130}
131QDateTime Incidence::recurrenceID () const 131QDateTime Incidence::recurrenceID () const
132{ 132{
133 return mRecurrenceID; 133 return mRecurrenceID;
134} 134}
135 135
136bool Incidence::cancelled() const 136bool Incidence::cancelled() const
137{ 137{
138 return mCancelled; 138 return mCancelled;
139} 139}
140void Incidence::setCancelled( bool b ) 140void Incidence::setCancelled( bool b )
141{ 141{
142 mCancelled = b; 142 mCancelled = b;
143 updated(); 143 updated();
144} 144}
145bool Incidence::hasStartDate() const 145bool Incidence::hasStartDate() const
146{ 146{
147 return mHasStartDate; 147 return mHasStartDate;
148} 148}
149 149
150void Incidence::setHasStartDate(bool f) 150void Incidence::setHasStartDate(bool f)
151{ 151{
152 if (mReadOnly) return; 152 if (mReadOnly) return;
153 mHasStartDate = f; 153 mHasStartDate = f;
154 updated(); 154 updated();
155} 155}
156 156
157// A string comparison that considers that null and empty are the same 157// A string comparison that considers that null and empty are the same
158static bool stringCompare( const QString& s1, const QString& s2 ) 158static bool stringCompare( const QString& s1, const QString& s2 )
159{ 159{
160 if ( s1.isEmpty() && s2.isEmpty() ) 160 if ( s1.isEmpty() && s2.isEmpty() )
161 return true; 161 return true;
162 return s1 == s2; 162 return s1 == s2;
163} 163}
164 164
165bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) 165bool KCal::operator==( const Incidence& i1, const Incidence& i2 )
166{ 166{
167 167
168 if( i1.alarms().count() != i2.alarms().count() ) { 168 if( i1.alarms().count() != i2.alarms().count() ) {
169 return false; // no need to check further 169 return false; // no need to check further
170 } 170 }
171 if ( i1.alarms().count() > 0 ) { 171 if ( i1.alarms().count() > 0 ) {
172 if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) 172 if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) )
173 { 173 {
174 qDebug("alarm not equal "); 174 qDebug("alarm not equal ");
175 return false; 175 return false;
176 } 176 }
177 } 177 }
178#if 0 178#if 0
179 QPtrListIterator<Alarm> a1( i1.alarms() ); 179 QPtrListIterator<Alarm> a1( i1.alarms() );
180 QPtrListIterator<Alarm> a2( i2.alarms() ); 180 QPtrListIterator<Alarm> a2( i2.alarms() );
181 for( ; a1.current() && a2.current(); ++a1, ++a2 ) { 181 for( ; a1.current() && a2.current(); ++a1, ++a2 ) {
182 if( *a1.current() == *a2.current() ) { 182 if( *a1.current() == *a2.current() ) {
183 continue; 183 continue;
184 } 184 }
185 else { 185 else {
186 return false; 186 return false;
187 } 187 }
188 } 188 }
189#endif 189#endif
190 190
191 if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { 191 if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) {
192 if ( i1.hasRecurrenceID() ) { 192 if ( i1.hasRecurrenceID() ) {
193 if ( i1.recurrenceID() != i2.recurrenceID() ) 193 if ( i1.recurrenceID() != i2.recurrenceID() )
194 return false; 194 return false;
195 } 195 }
196 196
197 } else { 197 } else {
198 return false; 198 return false;
199 } 199 }
200 200
201 if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) 201 if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) )
202 return false; 202 return false;
203 if ( i1.hasStartDate() == i2.hasStartDate() ) { 203 if ( i1.hasStartDate() == i2.hasStartDate() ) {
204 if ( i1.hasStartDate() ) { 204 if ( i1.hasStartDate() ) {
205 if ( i1.dtStart() != i2.dtStart() ) 205 if ( i1.dtStart() != i2.dtStart() )
206 return false; 206 return false;
207 } 207 }
208 } else { 208 } else {
209 return false; 209 return false;
210 } 210 }
211 if (!( *i1.recurrence() == *i2.recurrence()) ) { 211 if (!( *i1.recurrence() == *i2.recurrence()) ) {
212 qDebug("recurrence is NOT equal "); 212 qDebug("recurrence is NOT equal ");
213 return false; 213 return false;
214 } 214 }
215 return 215 return
216 // i1.created() == i2.created() && 216 // i1.created() == i2.created() &&
217 stringCompare( i1.description(), i2.description() ) && 217 stringCompare( i1.description(), i2.description() ) &&
218 stringCompare( i1.summary(), i2.summary() ) && 218 stringCompare( i1.summary(), i2.summary() ) &&
219 i1.categories() == i2.categories() && 219 i1.categories() == i2.categories() &&
220 // no need to compare mRelatedTo 220 // no need to compare mRelatedTo
221 stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && 221 stringCompare( i1.relatedToUid(), i2.relatedToUid() ) &&
222 // i1.relations() == i2.relations() && 222 // i1.relations() == i2.relations() &&
223 i1.exDates() == i2.exDates() && 223 i1.exDates() == i2.exDates() &&
224 i1.attachments() == i2.attachments() && 224 i1.attachments() == i2.attachments() &&
225 i1.resources() == i2.resources() && 225 i1.resources() == i2.resources() &&
226 i1.secrecy() == i2.secrecy() && 226 i1.secrecy() == i2.secrecy() &&
227 i1.priority() == i2.priority() && 227 i1.priority() == i2.priority() &&
228 i1.cancelled() == i2.cancelled() && 228 i1.cancelled() == i2.cancelled() &&
229 stringCompare( i1.location(), i2.location() ); 229 stringCompare( i1.location(), i2.location() );
230} 230}
231 231
232Incidence* Incidence::recreateCloneException( QDate d ) 232Incidence* Incidence::recreateCloneException( QDate d )
233{ 233{
234 Incidence* newInc = clone(); 234 Incidence* newInc = clone();
235 newInc->recreate(); 235 newInc->recreate();
236 if ( doesRecur() ) { 236 if ( doesRecur() ) {
237 addExDate( d ); 237 addExDate( d );
238 newInc->recurrence()->unsetRecurs(); 238 newInc->recurrence()->unsetRecurs();
239 if ( type() == "Event") { 239 if ( type() == "Event") {
240 int len = dtStart().secsTo( ((Event*)this)->dtEnd()); 240 int len = dtStart().secsTo( ((Event*)this)->dtEnd());
241 QTime tim = dtStart().time(); 241 QTime tim = dtStart().time();
242 newInc->setDtStart( QDateTime(d, tim) ); 242 newInc->setDtStart( QDateTime(d, tim) );
243 ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); 243 ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) );
244 } else { 244 } else {
245 int len = dtStart().secsTo( ((Todo*)this)->dtDue()); 245 int len = dtStart().secsTo( ((Todo*)this)->dtDue());
246 QTime tim = ((Todo*)this)->dtDue().time(); 246 QTime tim = ((Todo*)this)->dtDue().time();
247 ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); 247 ((Todo*)newInc)->setDtDue( QDateTime(d, tim) );
248 ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); 248 ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) );
249 ((Todo*)this)->setRecurDates(); 249 ((Todo*)this)->setRecurDates();
250 } 250 }
251 newInc->setExDates( DateList () ); 251 newInc->setExDates( DateList () );
252 } 252 }
253 return newInc; 253 return newInc;
254} 254}
255 255
256void Incidence::recreate() 256void Incidence::recreate()
257{ 257{
258 setCreated(QDateTime::currentDateTime()); 258 setCreated(QDateTime::currentDateTime());
259 259
260 setUid(CalFormat::createUniqueId()); 260 setUid(CalFormat::createUniqueId());
261 261
262 setRevision(0); 262 setRevision(0);
263 setIDStr( ":" ); 263 setIDStr( ":" );
264 setLastModified(QDateTime::currentDateTime()); 264 setLastModified(QDateTime::currentDateTime());
265} 265}
266 266void Incidence::cloneRelations( Incidence * newInc )
267{
268 // newInc is already a clone of this incidence
269 Incidence * inc;
270 Incidence * cloneInc;
271 QPtrList<Incidence> Relations = relations();
272 for (inc=Relations.first();inc;inc=Relations.next()) {
273 cloneInc = inc->clone();
274 cloneInc->recreate();
275 cloneInc->setRelatedTo( newInc );
276 inc->cloneRelations( cloneInc );
277 }
278}
267void Incidence::setReadOnly( bool readOnly ) 279void Incidence::setReadOnly( bool readOnly )
268{ 280{
269 IncidenceBase::setReadOnly( readOnly ); 281 IncidenceBase::setReadOnly( readOnly );
270 recurrence()->setRecurReadOnly( readOnly); 282 recurrence()->setRecurReadOnly( readOnly);
271} 283}
272 284
273void Incidence::setCreated(QDateTime created) 285void Incidence::setCreated(QDateTime created)
274{ 286{
275 if (mReadOnly) return; 287 if (mReadOnly) return;
276 mCreated = getEvenTime(created); 288 mCreated = getEvenTime(created);
277} 289}
278 290
279QDateTime Incidence::created() const 291QDateTime Incidence::created() const
280{ 292{
281 return mCreated; 293 return mCreated;
282} 294}
283 295
284void Incidence::setRevision(int rev) 296void Incidence::setRevision(int rev)
285{ 297{
286 if (mReadOnly) return; 298 if (mReadOnly) return;
287 mRevision = rev; 299 mRevision = rev;
288 300
289 updated(); 301 updated();
290} 302}
291 303
292int Incidence::revision() const 304int Incidence::revision() const
293{ 305{
294 return mRevision; 306 return mRevision;
295} 307}
296 308
297void Incidence::setDtStart(const QDateTime &dtStart) 309void Incidence::setDtStart(const QDateTime &dtStart)
298{ 310{
299 311
300 QDateTime dt = getEvenTime(dtStart); 312 QDateTime dt = getEvenTime(dtStart);
301 recurrence()->setRecurStart( dt); 313 recurrence()->setRecurStart( dt);
302 IncidenceBase::setDtStart( dt ); 314 IncidenceBase::setDtStart( dt );
303} 315}
304 316
305void Incidence::setDescription(const QString &description) 317void Incidence::setDescription(const QString &description)
306{ 318{
307 if (mReadOnly) return; 319 if (mReadOnly) return;
308 mDescription = description; 320 mDescription = description;
309 updated(); 321 updated();
310} 322}
311 323
312QString Incidence::description() const 324QString Incidence::description() const
313{ 325{
314 return mDescription; 326 return mDescription;
315} 327}
316 328
317 329
318void Incidence::setSummary(const QString &summary) 330void Incidence::setSummary(const QString &summary)
319{ 331{
320 if (mReadOnly) return; 332 if (mReadOnly) return;
321 mSummary = summary; 333 mSummary = summary;
322 updated(); 334 updated();
323} 335}
324 336
325QString Incidence::summary() const 337QString Incidence::summary() const
326{ 338{
327 return mSummary; 339 return mSummary;
328} 340}
329void Incidence::checkCategories() 341void Incidence::checkCategories()
330{ 342{
331 mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday")); 343 mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday"));
332 mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday")); 344 mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday"));
333 mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary")); 345 mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary"));
334} 346}
335 347
336void Incidence::setCategories(const QStringList &categories) 348void Incidence::setCategories(const QStringList &categories)
337{ 349{
338 if (mReadOnly) return; 350 if (mReadOnly) return;
339 mCategories = categories; 351 mCategories = categories;
340 checkCategories(); 352 checkCategories();
341 updated(); 353 updated();
342} 354}
343 355
344// TODO: remove setCategories(QString) function 356// TODO: remove setCategories(QString) function
345void Incidence::setCategories(const QString &catStr) 357void Incidence::setCategories(const QString &catStr)
346{ 358{
347 if (mReadOnly) return; 359 if (mReadOnly) return;
348 mCategories.clear(); 360 mCategories.clear();
349 361
350 if (catStr.isEmpty()) return; 362 if (catStr.isEmpty()) return;
351 363
352 mCategories = QStringList::split(",",catStr); 364 mCategories = QStringList::split(",",catStr);
353 365
354 QStringList::Iterator it; 366 QStringList::Iterator it;
355 for(it = mCategories.begin();it != mCategories.end(); ++it) { 367 for(it = mCategories.begin();it != mCategories.end(); ++it) {
356 *it = (*it).stripWhiteSpace(); 368 *it = (*it).stripWhiteSpace();
357 } 369 }
358 checkCategories(); 370 checkCategories();
359 updated(); 371 updated();
360} 372}
361 373
362QStringList Incidence::categories() const 374QStringList Incidence::categories() const
363{ 375{
364 return mCategories; 376 return mCategories;
365} 377}
366 378
367QString Incidence::categoriesStr() 379QString Incidence::categoriesStr()
368{ 380{
369 return mCategories.join(","); 381 return mCategories.join(",");
370} 382}
371 383
372void Incidence::setRelatedToUid(const QString &relatedToUid) 384void Incidence::setRelatedToUid(const QString &relatedToUid)
373{ 385{
374 if (mReadOnly) return; 386 if (mReadOnly) return;
375 mRelatedToUid = relatedToUid; 387 mRelatedToUid = relatedToUid;
376} 388}
377 389
378QString Incidence::relatedToUid() const 390QString Incidence::relatedToUid() const
379{ 391{
380 return mRelatedToUid; 392 return mRelatedToUid;
381} 393}
382 394
383void Incidence::setRelatedTo(Incidence *relatedTo) 395void Incidence::setRelatedTo(Incidence *relatedTo)
384{ 396{
385 //qDebug("Incidence::setRelatedTo %d ", relatedTo); 397 //qDebug("Incidence::setRelatedTo %d ", relatedTo);
386 //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); 398 //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() );
387 if (mReadOnly || mRelatedTo == relatedTo) return; 399 if (mReadOnly || mRelatedTo == relatedTo) return;
388 if(mRelatedTo) { 400 if(mRelatedTo) {
389 // updated(); 401 // updated();
390 mRelatedTo->removeRelation(this); 402 mRelatedTo->removeRelation(this);
391 } 403 }
392 mRelatedTo = relatedTo; 404 mRelatedTo = relatedTo;
393 if (mRelatedTo) { 405 if (mRelatedTo) {
394 mRelatedTo->addRelation(this); 406 mRelatedTo->addRelation(this);
395 mRelatedToUid = mRelatedTo->uid(); 407 mRelatedToUid = mRelatedTo->uid();
396 } else { 408 } else {
397 mRelatedToUid = ""; 409 mRelatedToUid = "";
398 } 410 }
399} 411}
400 412
401Incidence *Incidence::relatedTo() const 413Incidence *Incidence::relatedTo() const
402{ 414{
403 return mRelatedTo; 415 return mRelatedTo;
404} 416}
405 417
406QPtrList<Incidence> Incidence::relations() const 418QPtrList<Incidence> Incidence::relations() const
407{ 419{
408 return mRelations; 420 return mRelations;
409} 421}
410 422
411void Incidence::addRelation(Incidence *event) 423void Incidence::addRelation(Incidence *event)
412{ 424{
413 if( mRelations.findRef( event ) == -1 ) { 425 if( mRelations.findRef( event ) == -1 ) {
414 mRelations.append(event); 426 mRelations.append(event);
415 //updated(); 427 //updated();
416 } 428 }
417} 429}
418 430
419void Incidence::removeRelation(Incidence *event) 431void Incidence::removeRelation(Incidence *event)
420{ 432{
421 433
422 mRelations.removeRef(event); 434 mRelations.removeRef(event);
423 435
424// if (event->getRelatedTo() == this) event->setRelatedTo(0); 436// if (event->getRelatedTo() == this) event->setRelatedTo(0);
425} 437}
426 438
427bool Incidence::recursOn(const QDate &qd) const 439bool Incidence::recursOn(const QDate &qd) const
428{ 440{
429 if (recurrence()->recursOnPure(qd) && !isException(qd)) return true; 441 if (recurrence()->recursOnPure(qd) && !isException(qd)) return true;
430 else return false; 442 else return false;
431} 443}
432 444
433void Incidence::setExDates(const DateList &exDates) 445void Incidence::setExDates(const DateList &exDates)
434{ 446{
435 if (mReadOnly) return; 447 if (mReadOnly) return;
436 mExDates = exDates; 448 mExDates = exDates;
437 449
438 recurrence()->setRecurExDatesCount(mExDates.count()); 450 recurrence()->setRecurExDatesCount(mExDates.count());
439 451
440 updated(); 452 updated();
441} 453}
442 454
443void Incidence::addExDate(const QDate &date) 455void Incidence::addExDate(const QDate &date)
444{ 456{
445 if (mReadOnly) return; 457 if (mReadOnly) return;
446 mExDates.append(date); 458 mExDates.append(date);
447 459
448 recurrence()->setRecurExDatesCount(mExDates.count()); 460 recurrence()->setRecurExDatesCount(mExDates.count());
449 461
450 updated(); 462 updated();
451} 463}
452 464
453DateList Incidence::exDates() const 465DateList Incidence::exDates() const
454{ 466{
455 return mExDates; 467 return mExDates;
456} 468}
457 469
458bool Incidence::isException(const QDate &date) const 470bool Incidence::isException(const QDate &date) const
459{ 471{
460 DateList::ConstIterator it; 472 DateList::ConstIterator it;
461 for( it = mExDates.begin(); it != mExDates.end(); ++it ) { 473 for( it = mExDates.begin(); it != mExDates.end(); ++it ) {
462 if ( (*it) == date ) { 474 if ( (*it) == date ) {
463 return true; 475 return true;
464 } 476 }
465 } 477 }
466 478
467 return false; 479 return false;
468} 480}
469 481
470void Incidence::addAttachment(Attachment *attachment) 482void Incidence::addAttachment(Attachment *attachment)
471{ 483{
472 if (mReadOnly || !attachment) return; 484 if (mReadOnly || !attachment) return;
473 mAttachments.append(attachment); 485 mAttachments.append(attachment);
474 updated(); 486 updated();
475} 487}
476 488
477void Incidence::deleteAttachment(Attachment *attachment) 489void Incidence::deleteAttachment(Attachment *attachment)
478{ 490{
479 mAttachments.removeRef(attachment); 491 mAttachments.removeRef(attachment);
480} 492}
481 493
482void Incidence::deleteAttachments(const QString& mime) 494void Incidence::deleteAttachments(const QString& mime)
483{ 495{
484 Attachment *at = mAttachments.first(); 496 Attachment *at = mAttachments.first();
485 while (at) { 497 while (at) {
486 if (at->mimeType() == mime) 498 if (at->mimeType() == mime)
487 mAttachments.remove(); 499 mAttachments.remove();
488 else 500 else
489 at = mAttachments.next(); 501 at = mAttachments.next();
490 } 502 }
491} 503}
492 504
493QPtrList<Attachment> Incidence::attachments() const 505QPtrList<Attachment> Incidence::attachments() const
494{ 506{
495 return mAttachments; 507 return mAttachments;
496} 508}
497 509
498QPtrList<Attachment> Incidence::attachments(const QString& mime) const 510QPtrList<Attachment> Incidence::attachments(const QString& mime) const
499{ 511{
500 QPtrList<Attachment> attachments; 512 QPtrList<Attachment> attachments;
501 QPtrListIterator<Attachment> it( mAttachments ); 513 QPtrListIterator<Attachment> it( mAttachments );
502 Attachment *at; 514 Attachment *at;
503 while ( (at = it.current()) ) { 515 while ( (at = it.current()) ) {
504 if (at->mimeType() == mime) 516 if (at->mimeType() == mime)
505 attachments.append(at); 517 attachments.append(at);
506 ++it; 518 ++it;
507 } 519 }
508 520
509 return attachments; 521 return attachments;
510} 522}
511 523
512void Incidence::setResources(const QStringList &resources) 524void Incidence::setResources(const QStringList &resources)
513{ 525{
514 if (mReadOnly) return; 526 if (mReadOnly) return;
515 mResources = resources; 527 mResources = resources;
516 updated(); 528 updated();
517} 529}
518 530
519QStringList Incidence::resources() const 531QStringList Incidence::resources() const
520{ 532{
521 return mResources; 533 return mResources;
522} 534}
523 535
524 536
525void Incidence::setPriority(int priority) 537void Incidence::setPriority(int priority)
526{ 538{
527 if (mReadOnly) return; 539 if (mReadOnly) return;
528 mPriority = priority; 540 mPriority = priority;
529 updated(); 541 updated();
530} 542}
531 543
532int Incidence::priority() const 544int Incidence::priority() const
533{ 545{
534 return mPriority; 546 return mPriority;
535} 547}
536 548
537void Incidence::setSecrecy(int sec) 549void Incidence::setSecrecy(int sec)
538{ 550{
539 if (mReadOnly) return; 551 if (mReadOnly) return;
540 mSecrecy = sec; 552 mSecrecy = sec;
541 updated(); 553 updated();
542} 554}
543 555
544int Incidence::secrecy() const 556int Incidence::secrecy() const
545{ 557{
546 return mSecrecy; 558 return mSecrecy;
547} 559}
548 560
549QString Incidence::secrecyStr() const 561QString Incidence::secrecyStr() const
550{ 562{
551 return secrecyName(mSecrecy); 563 return secrecyName(mSecrecy);
552} 564}
553 565
554QString Incidence::secrecyName(int secrecy) 566QString Incidence::secrecyName(int secrecy)
555{ 567{
556 switch (secrecy) { 568 switch (secrecy) {
557 case SecrecyPublic: 569 case SecrecyPublic:
558 return i18n("Public"); 570 return i18n("Public");
559 break; 571 break;
560 case SecrecyPrivate: 572 case SecrecyPrivate:
561 return i18n("Private"); 573 return i18n("Private");
562 break; 574 break;
563 case SecrecyConfidential: 575 case SecrecyConfidential:
564 return i18n("Confidential"); 576 return i18n("Confidential");
565 break; 577 break;
566 default: 578 default:
567 return i18n("Undefined"); 579 return i18n("Undefined");
568 break; 580 break;
569 } 581 }
570} 582}
571 583
572QStringList Incidence::secrecyList() 584QStringList Incidence::secrecyList()
573{ 585{
574 QStringList list; 586 QStringList list;
575 list << secrecyName(SecrecyPublic); 587 list << secrecyName(SecrecyPublic);
576 list << secrecyName(SecrecyPrivate); 588 list << secrecyName(SecrecyPrivate);
577 list << secrecyName(SecrecyConfidential); 589 list << secrecyName(SecrecyConfidential);
578 590
579 return list; 591 return list;
580} 592}
581 593
582 594
583QPtrList<Alarm> Incidence::alarms() const 595QPtrList<Alarm> Incidence::alarms() const
584{ 596{
585 return mAlarms; 597 return mAlarms;
586} 598}
587 599
588Alarm* Incidence::newAlarm() 600Alarm* Incidence::newAlarm()
589{ 601{
590 Alarm* alarm = new Alarm(this); 602 Alarm* alarm = new Alarm(this);
591 mAlarms.append(alarm); 603 mAlarms.append(alarm);
592// updated(); 604// updated();
593 return alarm; 605 return alarm;
594} 606}
595 607
596void Incidence::addAlarm(Alarm *alarm) 608void Incidence::addAlarm(Alarm *alarm)
597{ 609{
598 mAlarms.append(alarm); 610 mAlarms.append(alarm);
599 updated(); 611 updated();
600} 612}
601 613
602void Incidence::removeAlarm(Alarm *alarm) 614void Incidence::removeAlarm(Alarm *alarm)
603{ 615{
604 mAlarms.removeRef(alarm); 616 mAlarms.removeRef(alarm);
605 updated(); 617 updated();
606} 618}
607 619
608void Incidence::clearAlarms() 620void Incidence::clearAlarms()
609{ 621{
610 mAlarms.clear(); 622 mAlarms.clear();
611 updated(); 623 updated();
612} 624}
613 625
614bool Incidence::isAlarmEnabled() const 626bool Incidence::isAlarmEnabled() const
615{ 627{
616 Alarm* alarm; 628 Alarm* alarm;
617 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 629 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
618 if (alarm->enabled()) 630 if (alarm->enabled())
619 return true; 631 return true;
620 } 632 }
621 return false; 633 return false;
622} 634}
623 635
624Recurrence *Incidence::recurrence() const 636Recurrence *Incidence::recurrence() const
625{ 637{
626 return mRecurrence; 638 return mRecurrence;
627} 639}
628void Incidence::setRecurrence( Recurrence * r) 640void Incidence::setRecurrence( Recurrence * r)
629{ 641{
630 delete mRecurrence; 642 delete mRecurrence;
631 mRecurrence = r; 643 mRecurrence = r;
632} 644}
633 645
634void Incidence::setLocation(const QString &location) 646void Incidence::setLocation(const QString &location)
635{ 647{
636 if (mReadOnly) return; 648 if (mReadOnly) return;
637 mLocation = location; 649 mLocation = location;
638 updated(); 650 updated();
639} 651}
640 652
641QString Incidence::location() const 653QString Incidence::location() const
642{ 654{
643 return mLocation; 655 return mLocation;
644} 656}
645 657
646ushort Incidence::doesRecur() const 658ushort Incidence::doesRecur() const
647{ 659{
648 if ( mRecurrence ) return mRecurrence->doesRecur(); 660 if ( mRecurrence ) return mRecurrence->doesRecur();
649 else return Recurrence::rNone; 661 else return Recurrence::rNone;
650} 662}
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index f8da342..60070a2 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -1,314 +1,315 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20#ifndef INCIDENCE_H 20#ifndef INCIDENCE_H
21#define INCIDENCE_H 21#define INCIDENCE_H
22// 22//
23// Incidence - base class of calendaring components 23// Incidence - base class of calendaring components
24// 24//
25 25
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qstringlist.h> 27#include <qstringlist.h>
28#include <qvaluelist.h> 28#include <qvaluelist.h>
29 29
30#include "recurrence.h" 30#include "recurrence.h"
31#include "alarm.h" 31#include "alarm.h"
32#include "attachment.h" 32#include "attachment.h"
33#include "listbase.h" 33#include "listbase.h"
34#include "incidencebase.h" 34#include "incidencebase.h"
35 35
36namespace KCal { 36namespace KCal {
37 37
38class Event; 38class Event;
39class Todo; 39class Todo;
40class Journal; 40class Journal;
41 41
42/** 42/**
43 This class provides the base class common to all calendar components. 43 This class provides the base class common to all calendar components.
44*/ 44*/
45class Incidence : public IncidenceBase 45class Incidence : public IncidenceBase
46{ 46{
47 public: 47 public:
48 /** 48 /**
49 This class provides the interface for a visitor of calendar components. It 49 This class provides the interface for a visitor of calendar components. It
50 serves as base class for concrete visitors, which implement certain actions on 50 serves as base class for concrete visitors, which implement certain actions on
51 calendar components. It allows to add functions, which operate on the concrete 51 calendar components. It allows to add functions, which operate on the concrete
52 types of calendar components, without changing the calendar component classes. 52 types of calendar components, without changing the calendar component classes.
53 */ 53 */
54 class Visitor 54 class Visitor
55 { 55 {
56 public: 56 public:
57 /** Destruct Incidence::Visitor */ 57 /** Destruct Incidence::Visitor */
58 virtual ~Visitor() {} 58 virtual ~Visitor() {}
59 59
60 /** 60 /**
61 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions 61 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions
62 on an Event object. 62 on an Event object.
63 */ 63 */
64 virtual bool visit(Event *) { return false; } 64 virtual bool visit(Event *) { return false; }
65 /** 65 /**
66 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions 66 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions
67 on an Todo object. 67 on an Todo object.
68 */ 68 */
69 virtual bool visit(Todo *) { return false; } 69 virtual bool visit(Todo *) { return false; }
70 /** 70 /**
71 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions 71 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions
72 on an Journal object. 72 on an Journal object.
73 */ 73 */
74 virtual bool visit(Journal *) { return false; } 74 virtual bool visit(Journal *) { return false; }
75 75
76 protected: 76 protected:
77 /** Constructor is protected to prevent direct creation of visitor base class. */ 77 /** Constructor is protected to prevent direct creation of visitor base class. */
78 Visitor() {} 78 Visitor() {}
79 }; 79 };
80 80
81 /** 81 /**
82 This class implements a visitor for adding an Incidence to a resource 82 This class implements a visitor for adding an Incidence to a resource
83 supporting addEvent(), addTodo() and addJournal() calls. 83 supporting addEvent(), addTodo() and addJournal() calls.
84 */ 84 */
85 template<class T> 85 template<class T>
86 class AddVisitor : public Visitor 86 class AddVisitor : public Visitor
87 { 87 {
88 public: 88 public:
89 AddVisitor( T *r ) : mResource( r ) {} 89 AddVisitor( T *r ) : mResource( r ) {}
90 bool visit( Event *e ) { return mResource->addEvent( e ); } 90 bool visit( Event *e ) { return mResource->addEvent( e ); }
91 bool visit( Todo *t ) { return mResource->addTodo( t ); } 91 bool visit( Todo *t ) { return mResource->addTodo( t ); }
92 bool visit( Journal *j ) { return mResource->addJournal( j ); } 92 bool visit( Journal *j ) { return mResource->addJournal( j ); }
93 93
94 private: 94 private:
95 T *mResource; 95 T *mResource;
96 }; 96 };
97 97
98 /** enumeration for describing an event's secrecy. */ 98 /** enumeration for describing an event's secrecy. */
99 enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }; 99 enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 };
100 typedef ListBase<Incidence> List; 100 typedef ListBase<Incidence> List;
101 Incidence(); 101 Incidence();
102 Incidence(const Incidence &); 102 Incidence(const Incidence &);
103 ~Incidence(); 103 ~Incidence();
104 104
105 /** 105 /**
106 Accept IncidenceVisitor. A class taking part in the visitor mechanism has to 106 Accept IncidenceVisitor. A class taking part in the visitor mechanism has to
107 provide this implementation: 107 provide this implementation:
108 <pre> 108 <pre>
109 bool accept(Visitor &v) { return v.visit(this); } 109 bool accept(Visitor &v) { return v.visit(this); }
110 </pre> 110 </pre>
111 */ 111 */
112 virtual bool accept(Visitor &) { return false; } 112 virtual bool accept(Visitor &) { return false; }
113 113
114 virtual Incidence *clone() = 0; 114 virtual Incidence *clone() = 0;
115 virtual void cloneRelations( Incidence * );
115 116
116 virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; 117 virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0;
117 void setReadOnly( bool ); 118 void setReadOnly( bool );
118 119
119 /** 120 /**
120 Recreate event. The event is made a new unique event, but already stored 121 Recreate event. The event is made a new unique event, but already stored
121 event information is preserved. Sets uniquie id, creation date, last 122 event information is preserved. Sets uniquie id, creation date, last
122 modification date and revision number. 123 modification date and revision number.
123 */ 124 */
124 void recreate(); 125 void recreate();
125 Incidence* recreateCloneException(QDate); 126 Incidence* recreateCloneException(QDate);
126 127
127 /** set creation date */ 128 /** set creation date */
128 void setCreated(QDateTime); 129 void setCreated(QDateTime);
129 /** return time and date of creation. */ 130 /** return time and date of creation. */
130 QDateTime created() const; 131 QDateTime created() const;
131 132
132 /** set the number of revisions this event has seen */ 133 /** set the number of revisions this event has seen */
133 void setRevision(int rev); 134 void setRevision(int rev);
134 /** return the number of revisions this event has seen */ 135 /** return the number of revisions this event has seen */
135 int revision() const; 136 int revision() const;
136 137
137 /** Set starting date/time. */ 138 /** Set starting date/time. */
138 virtual void setDtStart(const QDateTime &dtStart); 139 virtual void setDtStart(const QDateTime &dtStart);
139 /** Return the incidence's ending date/time as a QDateTime. */ 140 /** Return the incidence's ending date/time as a QDateTime. */
140 virtual QDateTime dtEnd() const { return QDateTime(); } 141 virtual QDateTime dtEnd() const { return QDateTime(); }
141 142
142 /** sets the event's lengthy description. */ 143 /** sets the event's lengthy description. */
143 void setDescription(const QString &description); 144 void setDescription(const QString &description);
144 /** returns a reference to the event's description. */ 145 /** returns a reference to the event's description. */
145 QString description() const; 146 QString description() const;
146 147
147 /** sets the event's short summary. */ 148 /** sets the event's short summary. */
148 void setSummary(const QString &summary); 149 void setSummary(const QString &summary);
149 /** returns a reference to the event's summary. */ 150 /** returns a reference to the event's summary. */
150 QString summary() const; 151 QString summary() const;
151 152
152 /** set event's applicable categories */ 153 /** set event's applicable categories */
153 void setCategories(const QStringList &categories); 154 void setCategories(const QStringList &categories);
154 /** set event's categories based on a comma delimited string */ 155 /** set event's categories based on a comma delimited string */
155 void setCategories(const QString &catStr); 156 void setCategories(const QString &catStr);
156 /** return categories in a list */ 157 /** return categories in a list */
157 QStringList categories() const; 158 QStringList categories() const;
158 /** return categories as a comma separated string */ 159 /** return categories as a comma separated string */
159 QString categoriesStr(); 160 QString categoriesStr();
160 161
161 /** point at some other event to which the event relates. This function should 162 /** point at some other event to which the event relates. This function should
162 * only be used when constructing a calendar before the related Event 163 * only be used when constructing a calendar before the related Event
163 * exists. */ 164 * exists. */
164 void setRelatedToUid(const QString &); 165 void setRelatedToUid(const QString &);
165 /** what event does this one relate to? This function should 166 /** what event does this one relate to? This function should
166 * only be used when constructing a calendar before the related Event 167 * only be used when constructing a calendar before the related Event
167 * exists. */ 168 * exists. */
168 QString relatedToUid() const; 169 QString relatedToUid() const;
169 /** point at some other event to which the event relates */ 170 /** point at some other event to which the event relates */
170 void setRelatedTo(Incidence *relatedTo); 171 void setRelatedTo(Incidence *relatedTo);
171 /** what event does this one relate to? */ 172 /** what event does this one relate to? */
172 Incidence *relatedTo() const; 173 Incidence *relatedTo() const;
173 /** All events that are related to this event */ 174 /** All events that are related to this event */
174 QPtrList<Incidence> relations() const; 175 QPtrList<Incidence> relations() const;
175 /** Add an event which is related to this event */ 176 /** Add an event which is related to this event */
176 void addRelation(Incidence *); 177 void addRelation(Incidence *);
177 /** Remove event that is related to this event */ 178 /** Remove event that is related to this event */
178 void removeRelation(Incidence *); 179 void removeRelation(Incidence *);
179 180
180 /** returns the list of dates which are exceptions to the recurrence rule */ 181 /** returns the list of dates which are exceptions to the recurrence rule */
181 DateList exDates() const; 182 DateList exDates() const;
182 /** sets the list of dates which are exceptions to the recurrence rule */ 183 /** sets the list of dates which are exceptions to the recurrence rule */
183 void setExDates(const DateList &_exDates); 184 void setExDates(const DateList &_exDates);
184 void setExDates(const char *dates); 185 void setExDates(const char *dates);
185 /** Add a date to the list of exceptions of the recurrence rule. */ 186 /** Add a date to the list of exceptions of the recurrence rule. */
186 void addExDate(const QDate &date); 187 void addExDate(const QDate &date);
187 188
188 /** returns true if there is an exception for this date in the recurrence 189 /** returns true if there is an exception for this date in the recurrence
189 rule set, or false otherwise. */ 190 rule set, or false otherwise. */
190 bool isException(const QDate &qd) const; 191 bool isException(const QDate &qd) const;
191 192
192 /** add attachment to this event */ 193 /** add attachment to this event */
193 void addAttachment(Attachment *attachment); 194 void addAttachment(Attachment *attachment);
194 /** remove and delete a specific attachment */ 195 /** remove and delete a specific attachment */
195 void deleteAttachment(Attachment *attachment); 196 void deleteAttachment(Attachment *attachment);
196 /** remove and delete all attachments with this mime type */ 197 /** remove and delete all attachments with this mime type */
197 void deleteAttachments(const QString& mime); 198 void deleteAttachments(const QString& mime);
198 /** return list of all associated attachments */ 199 /** return list of all associated attachments */
199 QPtrList<Attachment> attachments() const; 200 QPtrList<Attachment> attachments() const;
200 /** find a list of attachments with this mime type */ 201 /** find a list of attachments with this mime type */
201 QPtrList<Attachment> attachments(const QString& mime) const; 202 QPtrList<Attachment> attachments(const QString& mime) const;
202 203
203 /** sets the event's status the value specified. See the enumeration 204 /** sets the event's status the value specified. See the enumeration
204 * above for possible values. */ 205 * above for possible values. */
205 void setSecrecy(int); 206 void setSecrecy(int);
206 /** return the event's secrecy. */ 207 /** return the event's secrecy. */
207 int secrecy() const; 208 int secrecy() const;
208 /** return the event's secrecy in string format. */ 209 /** return the event's secrecy in string format. */
209 QString secrecyStr() const; 210 QString secrecyStr() const;
210 /** return list of all availbale secrecy classes */ 211 /** return list of all availbale secrecy classes */
211 static QStringList secrecyList(); 212 static QStringList secrecyList();
212 /** return human-readable name of secrecy class */ 213 /** return human-readable name of secrecy class */
213 static QString secrecyName(int); 214 static QString secrecyName(int);
214 215
215 /** returns TRUE if the date specified is one on which the event will 216 /** returns TRUE if the date specified is one on which the event will
216 * recur. */ 217 * recur. */
217 bool recursOn(const QDate &qd) const; 218 bool recursOn(const QDate &qd) const;
218 219
219 // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): 220 // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?):
220 221
221 /** set resources used, such as Office, Car, etc. */ 222 /** set resources used, such as Office, Car, etc. */
222 void setResources(const QStringList &resources); 223 void setResources(const QStringList &resources);
223 /** return list of current resources */ 224 /** return list of current resources */
224 QStringList resources() const; 225 QStringList resources() const;
225 226
226 /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ 227 /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */
227 void setPriority(int priority); 228 void setPriority(int priority);
228 /** get the event's priority */ 229 /** get the event's priority */
229 int priority() const; 230 int priority() const;
230 231
231 /** All alarms that are associated with this incidence */ 232 /** All alarms that are associated with this incidence */
232 QPtrList<Alarm> alarms() const; 233 QPtrList<Alarm> alarms() const;
233 /** Create a new alarm which is associated with this incidence */ 234 /** Create a new alarm which is associated with this incidence */
234 Alarm* newAlarm(); 235 Alarm* newAlarm();
235 /** Add an alarm which is associated with this incidence */ 236 /** Add an alarm which is associated with this incidence */
236 void addAlarm(Alarm*); 237 void addAlarm(Alarm*);
237 /** Remove an alarm that is associated with this incidence */ 238 /** Remove an alarm that is associated with this incidence */
238 void removeAlarm(Alarm*); 239 void removeAlarm(Alarm*);
239 /** Remove all alarms that are associated with this incidence */ 240 /** Remove all alarms that are associated with this incidence */
240 void clearAlarms(); 241 void clearAlarms();
241 /** return whether any alarm associated with this incidence is enabled */ 242 /** return whether any alarm associated with this incidence is enabled */
242 bool isAlarmEnabled() const; 243 bool isAlarmEnabled() const;
243 244
244 /** 245 /**
245 Return the recurrence rule associated with this incidence. If there is 246 Return the recurrence rule associated with this incidence. If there is
246 none, returns an appropriate (non-0) object. 247 none, returns an appropriate (non-0) object.
247 */ 248 */
248 Recurrence *recurrence() const; 249 Recurrence *recurrence() const;
249 void setRecurrence(Recurrence * r); 250 void setRecurrence(Recurrence * r);
250 /** 251 /**
251 Forward to Recurrence::doesRecur(). 252 Forward to Recurrence::doesRecur().
252 */ 253 */
253 ushort doesRecur() const; 254 ushort doesRecur() const;
254 255
255 /** set the event's/todo's location. Do _not_ use it with journal */ 256 /** set the event's/todo's location. Do _not_ use it with journal */
256 void setLocation(const QString &location); 257 void setLocation(const QString &location);
257 /** return the event's/todo's location. Do _not_ use it with journal */ 258 /** return the event's/todo's location. Do _not_ use it with journal */
258 QString location() const; 259 QString location() const;
259 /** returns TRUE or FALSE depending on whether the todo has a start date */ 260 /** returns TRUE or FALSE depending on whether the todo has a start date */
260 bool hasStartDate() const; 261 bool hasStartDate() const;
261 /** sets the event's hasStartDate value. */ 262 /** sets the event's hasStartDate value. */
262 void setHasStartDate(bool f); 263 void setHasStartDate(bool f);
263 QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; 264 QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const;
264 bool cancelled() const; 265 bool cancelled() const;
265 void setCancelled( bool b ); 266 void setCancelled( bool b );
266 267
267 bool hasRecurrenceID() const; 268 bool hasRecurrenceID() const;
268 void setHasRecurrenceID( bool b ); 269 void setHasRecurrenceID( bool b );
269 270
270 void setRecurrenceID(QDateTime); 271 void setRecurrenceID(QDateTime);
271 QDateTime recurrenceID () const; 272 QDateTime recurrenceID () const;
272 QDateTime dtStart() const; 273 QDateTime dtStart() const;
273 bool isHoliday() const; 274 bool isHoliday() const;
274 bool isBirthday() const; 275 bool isBirthday() const;
275 bool isAnniversary() const; 276 bool isAnniversary() const;
276 277
277 278
278protected: 279protected:
279 QPtrList<Alarm> mAlarms; 280 QPtrList<Alarm> mAlarms;
280 QPtrList<Incidence> mRelations; 281 QPtrList<Incidence> mRelations;
281 QDateTime mRecurrenceID; 282 QDateTime mRecurrenceID;
282 bool mHasRecurrenceID; 283 bool mHasRecurrenceID;
283 private: 284 private:
284 void checkCategories(); 285 void checkCategories();
285 bool mHoliday, mBirthday, mAnniversary; 286 bool mHoliday, mBirthday, mAnniversary;
286 int mRevision; 287 int mRevision;
287 bool mCancelled; 288 bool mCancelled;
288 289
289 // base components of jounal, event and todo 290 // base components of jounal, event and todo
290 QDateTime mCreated; 291 QDateTime mCreated;
291 QString mDescription; 292 QString mDescription;
292 QString mSummary; 293 QString mSummary;
293 QStringList mCategories; 294 QStringList mCategories;
294 Incidence *mRelatedTo; 295 Incidence *mRelatedTo;
295 QString mRelatedToUid; 296 QString mRelatedToUid;
296 DateList mExDates; 297 DateList mExDates;
297 QPtrList<Attachment> mAttachments; 298 QPtrList<Attachment> mAttachments;
298 QStringList mResources; 299 QStringList mResources;
299 bool mHasStartDate; // if todo has associated start date 300 bool mHasStartDate; // if todo has associated start date
300 301
301 int mSecrecy; 302 int mSecrecy;
302 int mPriority; // 1 = highest, 2 = less, etc. 303 int mPriority; // 1 = highest, 2 = less, etc.
303 304
304 //QPtrList<Alarm> mAlarms; 305 //QPtrList<Alarm> mAlarms;
305 Recurrence *mRecurrence; 306 Recurrence *mRecurrence;
306 307
307 QString mLocation; 308 QString mLocation;
308}; 309};
309 310
310bool operator==( const Incidence&, const Incidence& ); 311bool operator==( const Incidence&, const Incidence& );
311 312
312} 313}
313 314
314#endif 315#endif