summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-03 15:58:48 (UTC)
committer zautrix <zautrix>2005-07-03 15:58:48 (UTC)
commit9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e (patch) (unidiff)
tree4e5e6a4e6eac36df79891d61ed1d1cd76ed6105d
parent0c632bafd2d058504118dc8957fc4808a784f548 (diff)
downloadkdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.zip
kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.gz
kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/koeventviewer.cpp26
-rw-r--r--korganizer/koeventviewer.h1
-rw-r--r--korganizer/koeventviewerdialog.cpp1
-rw-r--r--korganizer/koeventviewerdialog.h1
-rw-r--r--korganizer/kotodoview.cpp53
-rw-r--r--korganizer/kotodoview.h6
9 files changed, 80 insertions, 18 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 30bb856..71d7208 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,193 +1,198 @@
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.1.13 ************
4
5Fixed a problem in KA/Pi search.
6
7
3********** VERSION 2.1.12 ************ 8********** VERSION 2.1.12 ************
4 9
5KO/Pi: 10KO/Pi:
6Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. 11Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus.
7Fixed a problem with the month view when file was saved but KO/Pi was not the active window. 12Fixed a problem with the month view when file was saved but KO/Pi was not the active window.
8Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). 13Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only).
9Fixed some other small problems. 14Fixed some other small problems.
10 15
11********** VERSION 2.1.11 ************ 16********** VERSION 2.1.11 ************
12 17
13KO/Pi: 18KO/Pi:
14Because we can have many calendars now in KO/Pi we can have more than one journal entry per day. 19Because we can have many calendars now in KO/Pi we can have more than one journal entry per day.
15Added features to handle (and add ) more than one journal entry per day. 20Added features to handle (and add ) more than one journal entry per day.
16Added option for a journal title. 21Added option for a journal title.
17 22
18Added info about the calendar, the item belongs to, to the event/todo/journal viewer. 23Added info about the calendar, the item belongs to, to the event/todo/journal viewer.
19Fixed a problem of the alarm of completed recurring todos. 24Fixed a problem of the alarm of completed recurring todos.
20Added to the event/todo editor to set quickly the category of an item. 25Added to the event/todo editor to set quickly the category of an item.
21 26
22 27
23Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet. 28Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet.
24 29
25Added KA/Pi multi sync to the multi sync called from the alarm applet. 30Added KA/Pi multi sync to the multi sync called from the alarm applet.
26 31
27********** VERSION 2.1.10 ************ 32********** VERSION 2.1.10 ************
28 33
29KO/Pi: 34KO/Pi:
30Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. 35Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
31When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. 36When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
32Fixed a bug in searching for a small timerange, i.e. one day. 37Fixed a bug in searching for a small timerange, i.e. one day.
33 38
34KA/Pi: 39KA/Pi:
35Fixed two problems in csv export. 40Fixed two problems in csv export.
36Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. 41Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
37 42
38********** VERSION 2.1.9 ************ 43********** VERSION 2.1.9 ************
39 44
40KO/Pi: 45KO/Pi:
41Fixed some problems of the new search options in the search dialog. 46Fixed some problems of the new search options in the search dialog.
42Fixed some problems in the new resource config options. 47Fixed some problems in the new resource config options.
43Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. 48Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
44Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 49Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
45Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. 50Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
46 51
47Fixed a problem in recurrence range in syncing with DTM. 52Fixed a problem in recurrence range in syncing with DTM.
48 53
49KA/Pi: 54KA/Pi:
50Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) 55Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
51 56
52PwM/Pi: 57PwM/Pi:
53Added "sec" to the timeout config settings to make it clear the timeout values are seconds. 58Added "sec" to the timeout config settings to make it clear the timeout values are seconds.
54 59
55********** VERSION 2.1.8 ************ 60********** VERSION 2.1.8 ************
56 61
57KO/Pi: 62KO/Pi:
58Added info about the completion state of a todo in the ListView/Searchdialog. 63Added info about the completion state of a todo in the ListView/Searchdialog.
59If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well. 64If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
60Fixed some updating problems when changing the filter. 65Fixed some updating problems when changing the filter.
61 66
62KA/Pi: 67KA/Pi:
63In the addressee selection dialog now the formatted name is shown, if not empty. 68In the addressee selection dialog now the formatted name is shown, if not empty.
64Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category. 69Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
65Now in the addressee selection dialog a selected contact is remove with a single click from the selected list. 70Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
66 71
67Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored. 72Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
68Fixed the sorting for size in the file selector on the Z. 73Fixed the sorting for size in the file selector on the Z.
69 74
70Changed the color selection dialog on the Zaurus to a more user friendly version. 75Changed the color selection dialog on the Zaurus to a more user friendly version.
71 76
72********** VERSION 2.1.7 ************ 77********** VERSION 2.1.7 ************
73 78
74KO/Pi: 79KO/Pi:
75Fixed several problems in the new Resource handling. 80Fixed several problems in the new Resource handling.
76Added more options to the search dialog. 81Added more options to the search dialog.
77Fixed a problem in the Month view. 82Fixed a problem in the Month view.
78Added more options to the dialog when setting a todo to stopped. 83Added more options to the dialog when setting a todo to stopped.
79 84
80Fixed two small problems in KO/Pi Alarm applet. 85Fixed two small problems in KO/Pi Alarm applet.
81 86
82********** VERSION 2.1.6 ************ 87********** VERSION 2.1.6 ************
83 88
84This release is for testing only. 89This release is for testing only.
85 90
86KO/Pi: 91KO/Pi:
87Added to the list view (the list view is used in search dialog as well) the possibility to print it. 92Added to the list view (the list view is used in search dialog as well) the possibility to print it.
88Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 93Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
89Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 94Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
90Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 95Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
91Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 96Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
92Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 97Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
93 98
94Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 99Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
95In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later. 100In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
96Now on every sync the set of calendars is synced which are enabled in the resource view. 101Now on every sync the set of calendars is synced which are enabled in the resource view.
97 102
98A calendar is enabled in the resource view if the "eye" column is checked. 103A calendar is enabled in the resource view if the "eye" column is checked.
99You can set a calendar to be the default for new items( "+" column ). 104You can set a calendar to be the default for new items( "+" column ).
100You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly. 105You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
101To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ... 106To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
102 107
103 108
104********** VERSION 2.1.5 ************ 109********** VERSION 2.1.5 ************
105 110
106This is the new stable version. 111This is the new stable version.
107Bugfix: 112Bugfix:
108Fixed a problem with agenda popup on the desktop in KO/Pi. 113Fixed a problem with agenda popup on the desktop in KO/Pi.
109Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 114Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
110Added config option to not display completed todos in agenda view. 115Added config option to not display completed todos in agenda view.
111Addressee view is now using the formatted name, if defined. 116Addressee view is now using the formatted name, if defined.
112That makes it possible to display "lastname, firstname" in that view now. 117That makes it possible to display "lastname, firstname" in that view now.
113To set the formatted name for all contacts, please use menu: 118To set the formatted name for all contacts, please use menu:
114Edit->Change->Set formatted name. 119Edit->Change->Set formatted name.
115Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 120Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
116 121
117********** VERSION 2.1.4 ************ 122********** VERSION 2.1.4 ************
118 123
119Fixed two more bugs in the KA/Pi CSV import dialog: 124Fixed two more bugs in the KA/Pi CSV import dialog:
120Made it possible to read multi-line fields and import it to the "Note" field. 125Made it possible to read multi-line fields and import it to the "Note" field.
121Fixed a problem in mapping custom fields, whatever a custem field is... 126Fixed a problem in mapping custom fields, whatever a custem field is...
122 127
123********** VERSION 2.1.3 ************ 128********** VERSION 2.1.3 ************
124 129
125Changed the menu structure of the alarm applet: 130Changed the menu structure of the alarm applet:
126Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 131Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
127 132
128Fixed several problems in the KA/Pi CSV import dialog: 133Fixed several problems in the KA/Pi CSV import dialog:
129Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 134Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
130 135
131 136
132********** VERSION 2.1.2 ************ 137********** VERSION 2.1.2 ************
133 138
134Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 139Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
135 140
136Fixed a problem when importing data from Outlook with mutiple categories set. 141Fixed a problem when importing data from Outlook with mutiple categories set.
137 142
138Changed display of days in datenavigator: 143Changed display of days in datenavigator:
139Birthdays are now blue, not dark green. 144Birthdays are now blue, not dark green.
140When todo view is shown, no birtdays are shown and days with due todos are shown blue. 145When todo view is shown, no birtdays are shown and days with due todos are shown blue.
141When journal view is shown, only holidays are shown and days with journals are blue. 146When journal view is shown, only holidays are shown and days with journals are blue.
142 147
143Added Backup options to global config: 148Added Backup options to global config:
144You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). 149You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
145It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. 150It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
146The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. 151The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
147 152
148********** VERSION 2.1.1 ************ 153********** VERSION 2.1.1 ************
149 154
150Stable release 2.1.1! 155Stable release 2.1.1!
151 156
152KO/Pi: 157KO/Pi:
153Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 158Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
154 159
155********** VERSION 2.1.0 ************ 160********** VERSION 2.1.0 ************
156 161
157Stable release 2.1.0! 162Stable release 2.1.0!
158 163
159Summary of changes/fixes compared to version 2.0.6: 164Summary of changes/fixes compared to version 2.0.6:
160 165
161Many bugs of version 2.0.6 fixed. 166Many bugs of version 2.0.6 fixed.
162Most of them were small bugs, but some of them were important. 167Most of them were small bugs, but some of them were important.
163It is recommended to use version 2.1.0 and not version 2.0.6. 168It is recommended to use version 2.1.0 and not version 2.0.6.
164 169
165Important changes: 170Important changes:
166 171
167Added recurring todos to KO/Pi. 172Added recurring todos to KO/Pi.
168 173
169Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 174Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
170 175
171Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 176Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
172 177
173Datenavigator can now display many months. Very useful on the desktop. 178Datenavigator can now display many months. Very useful on the desktop.
174 179
175KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 180KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
176 181
177Made alarm sound working on Linux desktop. 182Made alarm sound working on Linux desktop.
178 183
179Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. 184Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
180 185
181Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. 186Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
182 187
183Many other usebility enhancements. 188Many other usebility enhancements.
184Special thanks to Ben for his suggestions! 189Special thanks to Ben for his suggestions!
185 190
186You can find the complete changelog 191You can find the complete changelog
187from version 1.7.7 to 2.1.0 192from version 1.7.7 to 2.1.0
188in the source package or on 193in the source package or on
189 194
190http://www.pi-sync.net/html/changelog.html 195http://www.pi-sync.net/html/changelog.html
191 196
192 197
193 198
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index d7954c6..bc5cbb7 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -955,514 +955,514 @@
955{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 955{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
956{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 956{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
957{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 957{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
958{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 958{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
959{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 959{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
960{ "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" }, 960{ "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" },
961{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 961{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
962{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 962{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
963{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 963{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
964{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 964{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
965{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 965{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
966{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 966{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
967{ "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!" }, 967{ "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!" },
968{ "KDE-Pim Sync","KDE-Pim Sync" }, 968{ "KDE-Pim Sync","KDE-Pim Sync" },
969{ "Multiple profiles","Multi-Sync Profile" }, 969{ "Multiple profiles","Multi-Sync Profile" },
970{ "Device: ","Gerät: " }, 970{ "Device: ","Gerät: " },
971{ "Multiple sync started.","Multi-Sync gestartet." }, 971{ "Multiple sync started.","Multi-Sync gestartet." },
972{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 972{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
973{ "Turn filter on","Schalte Filter an" }, 973{ "Turn filter on","Schalte Filter an" },
974{ "Turn filter off","Schalte Filter aus" }, 974{ "Turn filter off","Schalte Filter aus" },
975{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 975{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
976{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 976{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
977{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 977{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
978{ "<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" }, 978{ "<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" },
979{ "<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" }, 979{ "<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" },
980{ "<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" }, 980{ "<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" },
981{ "<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" }, 981{ "<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" },
982{ "<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" }, 982{ "<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" },
983{ "<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" }, 983{ "<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" },
984{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 984{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
985{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 985{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
986{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 986{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
987{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 987{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
988{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 988{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
989{ "<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" }, 989{ "<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" },
990{ "<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" }, 990{ "<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" },
991{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 991{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
992{ "<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" }, 992{ "<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" },
993{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 993{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
994{ "<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" }, 994{ "<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" },
995{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 995{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
996{ "<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" }, 996{ "<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" },
997{ "<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" }, 997{ "<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" },
998{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 998{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
999{ "<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" }, 999{ "<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" },
1000{ "<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" }, 1000{ "<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" },
1001{ "<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" }, 1001{ "<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" },
1002{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1002{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1003{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1003{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1004{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1004{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1005{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1005{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1006{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1006{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1007{ "<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" }, 1007{ "<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" },
1008{ "<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" }, 1008{ "<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" },
1009{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1009{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1010{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1010{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1011{ "<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" }, 1011{ "<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" },
1012{ "<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" }, 1012{ "<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" },
1013{ "<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" }, 1013{ "<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" },
1014{ "<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" }, 1014{ "<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" },
1015{ "<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" }, 1015{ "<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" },
1016{ "<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" }, 1016{ "<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" },
1017{ "<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" }, 1017{ "<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" },
1018{ "<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 " }, 1018{ "<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 " },
1019{ "<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" }, 1019{ "<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" },
1020{ "<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" }, 1020{ "<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" },
1021{ "<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" }, 1021{ "<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" },
1022{ "<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" }, 1022{ "<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" },
1023{ "<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" }, 1023{ "<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" },
1024{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1024{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1025{ "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" }, 1025{ "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" },
1026{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1026{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1027{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1027{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1028{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1028{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1029{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, 1029{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" },
1030{ "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" }, 1030{ "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" },
1031{ "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" }, 1031{ "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" },
1032{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1032{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1033{ "KO/Pi FAQ","KO/Pi FAQ" }, 1033{ "KO/Pi FAQ","KO/Pi FAQ" },
1034{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, 1034{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" },
1035{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1035{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1036{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1036{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1037{ "From: ","Von: " }, 1037{ "From: ","Von: " },
1038{ "Remove sync info","Entferne Sync Info" }, 1038{ "Remove sync info","Entferne Sync Info" },
1039{ "For all profiles","Für alle Profile" }, 1039{ "For all profiles","Für alle Profile" },
1040{ "Hide not Running","Verstecke nicht Laufende" }, 1040{ "Hide not Running","Verstecke nicht Laufende" },
1041{ "ME","ME" }, 1041{ "ME","ME" },
1042{ "Toolbar","Toolbar" }, 1042{ "Toolbar","Toolbar" },
1043{ "Undo Delete...","UNDO Löschen..." }, 1043{ "Undo Delete...","UNDO Löschen..." },
1044{ "Undo Delete","Löschen rückgängig machen" }, 1044{ "Undo Delete","Löschen rückgängig machen" },
1045{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1045{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1046{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1046{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1047{ "Januar","Januar" }, 1047{ "Januar","Januar" },
1048{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1048{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1049{ "No Filter","Kein Filter" }, 1049{ "No Filter","Kein Filter" },
1050{ "Multiple Sync options","Multi Sync Optionen" }, 1050{ "Multiple Sync options","Multi Sync Optionen" },
1051{ "Sync algo options","Sync Ablauf Optionen" }, 1051{ "Sync algo options","Sync Ablauf Optionen" },
1052{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1052{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1053{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1053{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1054{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1054{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1055{ "Write back options","Optionen zum Zurückschreiben" }, 1055{ "Write back options","Optionen zum Zurückschreiben" },
1056{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1056{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1057{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1057{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1058{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1058{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1059{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1059{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1060{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1060{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1061{ "Time period","Zeitspanne" }, 1061{ "Time period","Zeitspanne" },
1062{ "From ","Von " }, 1062{ "From ","Von " },
1063{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1063{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1064{ " weeks in the future "," Wochen in der Zukunft " }, 1064{ " weeks in the future "," Wochen in der Zukunft " },
1065{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1065{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1066{ "Local temp file:","Lokale temp Datei:" }, 1066{ "Local temp file:","Lokale temp Datei:" },
1067{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1067{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1068{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1068{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1069{ "Language","Sprache" }, 1069{ "Language","Sprache" },
1070{ "Time Format","Zeit Format" }, 1070{ "Time Format","Zeit Format" },
1071{ "Time Zone","Zeit Zone" }, 1071{ "Time Zone","Zeit Zone" },
1072{ "%1 groups subscribed","%1 Guppen abboniert" }, 1072{ "%1 groups subscribed","%1 Guppen abboniert" },
1073{ "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" }, 1073{ "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" },
1074{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1074{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1075{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1075{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1076{ "Save settings","Speichere Einstellungen" }, 1076{ "Save settings","Speichere Einstellungen" },
1077{ "Save standard","Speichere Standard" }, 1077{ "Save standard","Speichere Standard" },
1078{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1078{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1079{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1079{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1080{ "Data storage path","Daten Speicherpfad" }, 1080{ "Data storage path","Daten Speicherpfad" },
1081{ "Language","Sprache" }, 1081{ "Language","Sprache" },
1082{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1082{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1083{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1083{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1084{ "Show events that are done","Zeige abgelaufene Termine" }, 1084{ "Show events that are done","Zeige abgelaufene Termine" },
1085{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1085{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1086{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1086{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1087{ "KO/Pi","KO/Pi" }, 1087{ "KO/Pi","KO/Pi" },
1088{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1088{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1089{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1089{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1090{ "Sound.Al.: ","Sound.Al.: " }, 1090{ "Sound.Al.: ","Sound.Al.: " },
1091{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1091{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1092{ "Restore","Wiederherstellen" }, 1092{ "Restore","Wiederherstellen" },
1093{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklich\nwiederherstellen?" }, 1093{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklich\nwiederherstellen?" },
1094{ "% completed","% erledigt" }, 1094{ "% completed","% erledigt" },
1095{ "%d item(s) found.","%d Item(s) gefunden." }, 1095{ "%d item(s) found.","%d Item(s) gefunden." },
1096{ "Set complete","Setze auf erledigt" }, 1096{ "Set complete","Setze auf erledigt" },
1097{ "(cancelled)","(gecancelt)" }, 1097{ "(cancelled)","(gecancelt)" },
1098{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1098{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1099{ " Local time "," Lokale Zeit " }, 1099{ " Local time "," Lokale Zeit " },
1100{ "Form2","Form2" }, 1100{ "Form2","Form2" },
1101{ "Filter enabled","Filter angeschaltet" }, 1101{ "Filter enabled","Filter angeschaltet" },
1102{ "Edit Filters","Ändere Filter" }, 1102{ "Edit Filters","Ändere Filter" },
1103{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1103{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1104{ "Agenda","Agenda" }, 1104{ "Agenda","Agenda" },
1105{ " ("," (" }, 1105{ " ("," (" },
1106{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1106{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1107{ "Print","Print" }, 1107{ "Print","Print" },
1108{ "&Setup Printer...","Drucker &Setup..." }, 1108{ "&Setup Printer...","Drucker &Setup..." },
1109{ "View Type","Zeige Typ" }, 1109{ "View Type","Zeige Typ" },
1110{ "Page &orientation:","Seiten Ausrichtung:" }, 1110{ "Page &orientation:","Seiten Ausrichtung:" },
1111{ "Use Default of Selected Style","Default des selektierten Stils" }, 1111{ "Use Default of Selected Style","Default des selektierten Stils" },
1112{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1112{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1113{ "Portrait","Portrait" }, 1113{ "Portrait","Portrait" },
1114{ "Landscape","Landschaft" }, 1114{ "Landscape","Landschaft" },
1115{ "Print day","Drucke Tag" }, 1115{ "Print day","Drucke Tag" },
1116{ "CalPrintDay_Base","CalPrintDay_Base" }, 1116{ "CalPrintDay_Base","CalPrintDay_Base" },
1117{ "Date && Time Range","Datum && Zeitspanne" }, 1117{ "Date && Time Range","Datum && Zeitspanne" },
1118{ "&End date:","&Enddatum:" }, 1118{ "&End date:","&Enddatum:" },
1119{ "&Start date:","&Startdatum:" }, 1119{ "&Start date:","&Startdatum:" },
1120{ "Start &time:","Startzeit:" }, 1120{ "Start &time:","Startzeit:" },
1121{ "End ti&me:","Endzeit:" }, 1121{ "End ti&me:","Endzeit:" },
1122{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1122{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1123{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1123{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1124{ "Alt+D","Alt+D" }, 1124{ "Alt+D","Alt+D" },
1125{ "&Use colors","Nutze Farben" }, 1125{ "&Use colors","Nutze Farben" },
1126{ "Alt+U","Alt+U" }, 1126{ "Alt+U","Alt+U" },
1127{ "Print week","Drucke Woche" }, 1127{ "Print week","Drucke Woche" },
1128{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1128{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1129{ "Use &colors","Nutze Farben" }, 1129{ "Use &colors","Nutze Farben" },
1130{ "Type of View","Typ der Ansicht" }, 1130{ "Type of View","Typ der Ansicht" },
1131{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1131{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1132{ "Alt+F","Alt+F" }, 1132{ "Alt+F","Alt+F" },
1133{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1133{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1134{ "Alt+T","Alt+T" }, 1134{ "Alt+T","Alt+T" },
1135{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1135{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1136{ "Print month","Drucke Monat" }, 1136{ "Print month","Drucke Monat" },
1137{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1137{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1138{ "&Start month:","&Startmonat:" }, 1138{ "&Start month:","&Startmonat:" },
1139{ "&End month:","&Endmonat:" }, 1139{ "&End month:","&Endmonat:" },
1140{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1140{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1141{ "Print todos","Drucke Todos" }, 1141{ "Print todos","Drucke Todos" },
1142{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1142{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1143{ "Include &description of the item","Inclusive Itembeschreibung" }, 1143{ "Include &description of the item","Inclusive Itembeschreibung" },
1144{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1144{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1145{ "Include &priority of the item","Inclusive Priorität des Items" }, 1145{ "Include &priority of the item","Inclusive Priorität des Items" },
1146{ "Items to Print","Zu druckende Items" }, 1146{ "Items to Print","Zu druckende Items" },
1147{ "&From:","Von:" }, 1147{ "&From:","Von:" },
1148{ "&To:","Bis:" }, 1148{ "&To:","Bis:" },
1149{ "Print &all todo items","Drucke alle Todo Items" }, 1149{ "Print &all todo items","Drucke alle Todo Items" },
1150{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1150{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1151{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1151{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1152{ "Todo List","Todo Liste" }, 1152{ "Todo List","Todo Liste" },
1153{ "&Title:","&Titel:" }, 1153{ "&Title:","&Titel:" },
1154{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, 1154{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" },
1155{ "Todo list","Todo Liste" }, 1155{ "Todo list","Todo Liste" },
1156{ "&Print...","Drucke..." }, 1156{ "&Print...","Drucke..." },
1157{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1157{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1158{ "[Unconfigured]","[Unkonfiguriert]" }, 1158{ "[Unconfigured]","[Unkonfiguriert]" },
1159{ "OK","OK" }, 1159{ "OK","OK" },
1160{ "FilterEditor","FilterEditor" }, 1160{ "FilterEditor","FilterEditor" },
1161{ "Include","Inclusive" }, 1161{ "Include","Inclusive" },
1162{ "Exclude","Exclusive" }, 1162{ "Exclude","Exclusive" },
1163{ "Edit Selection...","Editiere Auswahl" }, 1163{ "Edit Selection...","Editiere Auswahl" },
1164{ "recurring events","wiederholende Termine" }, 1164{ "recurring events","wiederholende Termine" },
1165{ "recurr. events","wiederh.Termine" }, 1165{ "recurr. events","wiederh.Termine" },
1166{ "completed to-dos","erledigte Todos" }, 1166{ "completed to-dos","erledigte Todos" },
1167{ "events","Termine" }, 1167{ "events","Termine" },
1168{ "todos","Todos" }, 1168{ "todos","Todos" },
1169{ "journals","Journale" }, 1169{ "journals","Journale" },
1170{ "public","öffentl." }, 1170{ "public","öffentl." },
1171{ "private","privat" }, 1171{ "private","privat" },
1172{ "confidential","vertraul." }, 1172{ "confidential","vertraul." },
1173{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, 1173{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
1174{ "Yesterday","Gestern" }, 1174{ "Yesterday","Gestern" },
1175{ "Day after tomorrow","Übermorgen" }, 1175{ "Day after tomorrow","Übermorgen" },
1176{ "Tomorrow","Morgen" }, 1176{ "Tomorrow","Morgen" },
1177{ "Day before yesterday","Vorgestern" }, 1177{ "Day before yesterday","Vorgestern" },
1178{ "Size %1","Größe %1" }, 1178{ "Size %1","Größe %1" },
1179{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1179{ "New Agendasize: %1","Neue Agendagröße: %1" },
1180{ " (%1 y.)"," (%1 J.)" }, 1180{ " (%1 y.)"," (%1 J.)" },
1181{ "Allday:","Ganztägig:" }, 1181{ "Allday:","Ganztägig:" },
1182{ "compl.todos","erled.Todos" }, 1182{ "compl.todos","erled.Todos" },
1183{ "Day view","Tagesansicht" }, 1183{ "Day view","Tagesansicht" },
1184{ "Next days","Nächste Tage" }, 1184{ "Next days","Nächste Tage" },
1185{ "Next week","Nächste Woche" }, 1185{ "Next week","Nächste Woche" },
1186{ "Next two weeks","Nächste zwei Wochen" }, 1186{ "Next two weeks","Nächste zwei Wochen" },
1187{ "This month","Dieser Monat" }, 1187{ "This month","Dieser Monat" },
1188{ "Journal view","Journal" }, 1188{ "Journal view","Journal" },
1189{ "Display all opened","Zeige alle geöffnet" }, 1189{ "Display all opened","Zeige alle geöffnet" },
1190{ "Display all closed","Zeige alle geschlossen" }, 1190{ "Display all closed","Zeige alle geschlossen" },
1191{ "Display all flat","Zeige alle flach" }, 1191{ "Display all flat","Zeige alle flach" },
1192{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1192{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1193{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1193{ "Default todo done color:","Standard Todo erledigt Farbe" },
1194{ "Select week %1-%2","Wähle Woche %1-%2" }, 1194{ "Select week %1-%2","Wähle Woche %1-%2" },
1195{ "Select Week","Wähle Woche" }, 1195{ "Select Week","Wähle Woche" },
1196{ "Set alarm...","Setze Alarm..." }, 1196{ "Set alarm...","Setze Alarm..." },
1197{ "Set Alarm!","Setze Alarm!" }, 1197{ "Set Alarm!","Setze Alarm!" },
1198{ "Changed alarm for %1 items","Alarm für %1 Items geändert" }, 1198{ "Changed alarm for %1 items","Alarm für %1 Items geändert" },
1199{ " and "," und " }, 1199{ " and "," und " },
1200{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1200{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1201{ "Mail to selected","Mail an Ausgewählte" }, 1201{ "Mail to selected","Mail an Ausgewählte" },
1202{ "Mail to all","Mail an Alle" }, 1202{ "Mail to all","Mail an Alle" },
1203{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1203{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1204{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1204{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1205{ " on"," am" }, 1205{ " on"," am" },
1206{ " completed on "," erledigt am " }, 1206{ " completed on "," erledigt am " },
1207{ "Save as Event template","Speichere als Vorlage" }, 1207{ "Save as Event template","Speichere als Vorlage" },
1208{ "Load Event template","Lade Termin Vorlage" }, 1208{ "Load Event template","Lade Termin Vorlage" },
1209{ "Save as Journal template","Speichere als Journal Vorlage" }, 1209{ "Save as Journal template","Speichere als Journal Vorlage" },
1210{ "Insert Journal template","Füge Journal Vorlage ein" }, 1210{ "Insert Journal template","Füge Journal Vorlage ein" },
1211{ "Sub todos:<br>","Unter Todos:<br>" }, 1211{ "Sub todos:<br>","Unter-Todos:<br>" },
1212{ "Parent todo:<br>","Über Todo:<br>" }, 1212{ "Parent todo:<br>","Über-Todo:<br>" },
1213{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1213{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1214{ " completed"," erledigt" }, 1214{ " completed"," erledigt" },
1215{ "(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!" }, 1215{ "(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!" },
1216{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1216{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1217{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1217{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1218{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1218{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1219{ "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?" }, 1219{ "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?" },
1220{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1220{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1221{ "Error","Fehler" }, 1221{ "Error","Fehler" },
1222{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1222{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1223{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1223{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1224{ "Warning","Warnung" }, 1224{ "Warning","Warnung" },
1225{ "Select week number","Wähle Wochen Nummer" }, 1225{ "Select week number","Wähle Wochen Nummer" },
1226{ "Februar","Februar" }, 1226{ "Februar","Februar" },
1227{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1227{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1228{ "W","W" }, 1228{ "W","W" },
1229{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1229{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1230{ "T: %1","T: %1" }, 1230{ "T: %1","T: %1" },
1231{ "Start: ","Start: " }, 1231{ "Start: ","Start: " },
1232{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1232{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1233{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1233{ "Password for remote access:","Passwort für fernen Zugriff:" },
1234{ "Remote IP address:","Ferne IP Adresse:" }, 1234{ "Remote IP address:","Ferne IP Adresse:" },
1235{ "Remote port number:","Ferne Port Nummer:" }, 1235{ "Remote port number:","Ferne Port Nummer:" },
1236{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1236{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1237{ "Remote from: ","Fern von: " }, 1237{ "Remote from: ","Fern von: " },
1238{ "Local from: ","Lokal von: " }, 1238{ "Local from: ","Lokal von: " },
1239{ "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" }, 1239{ "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" },
1240{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1240{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1241{ "Write back","Schreibe zurück" }, 1241{ "Write back","Schreibe zurück" },
1242{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1242{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1243{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1243{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1244{ "Received sync request","Sync Anfrage erhalten" }, 1244{ "Received sync request","Sync Anfrage erhalten" },
1245{ "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." }, 1245{ "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." },
1246{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1246{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1247{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1247{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1248{ "Sending file...","Sende Datei..." }, 1248{ "Sending file...","Sende Datei..." },
1249{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1249{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1250{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1250{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1251{ "Received %1 bytes","%1 Bytes erhalten" }, 1251{ "Received %1 bytes","%1 Bytes erhalten" },
1252{ "Writing file to disk...","Speichere Datei..." }, 1252{ "Writing file to disk...","Speichere Datei..." },
1253{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1253{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1254{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1254{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1255{ "Synchronize!","Synchronisiere!" }, 1255{ "Synchronize!","Synchronisiere!" },
1256{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1256{ "High clock skew!","Großer Uhrzeitunterschied!" },
1257{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1257{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1258{ "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!" }, 1258{ "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!" },
1259{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1259{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1260{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1260{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1261{ "List week view","Listenwochenansicht" }, 1261{ "List week view","Listenwochenansicht" },
1262{ "List week","Listenwochenansicht" }, 1262{ "List week","Listenwochenansicht" },
1263{ "Next Week","Nächste Woche" }, 1263{ "Next Week","Nächste Woche" },
1264{ "Previous Week","Vorherige Woche" }, 1264{ "Previous Week","Vorherige Woche" },
1265{ "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." }, 1265{ "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." },
1266{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1266{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1267{ "Details","Details" }, 1267{ "Details","Details" },
1268{ "Created time","Erstellt Zeit" }, 1268{ "Created time","Erstellt Zeit" },
1269{ "Last modified time","Geändert Zeit" }, 1269{ "Last modified time","Geändert Zeit" },
1270{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1270{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1271{ "View Options","Anzeige Optionen" }, 1271{ "View Options","Anzeige Optionen" },
1272{ "<b>Created: ","<b>Erstellt am: " }, 1272{ "<b>Created: ","<b>Erstellt am: " },
1273{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1273{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1274{ "Journal: ","Journal: " }, 1274{ "Journal: ","Journal: " },
1275{ "yearly","jährlich" }, 1275{ "yearly","jährlich" },
1276{ "(%1) ","%1-" }, 1276{ "(%1) ","%1-" },
1277{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1277{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1278{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1278{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1279{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1279{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1280{ "Summary/Loc.","Titel/Ort" }, 1280{ "Summary/Loc.","Titel/Ort" },
1281{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1281{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1282{ "Week Number","Wochennummer" }, 1282{ "Week Number","Wochennummer" },
1283{ "Import","Importiere" }, 1283{ "Import","Importiere" },
1284{ "Export","Exportiere" }, 1284{ "Export","Exportiere" },
1285{ "Beam","Beame" }, 1285{ "Beam","Beame" },
1286{ "Export","Exportiere" }, 1286{ "Export","Exportiere" },
1287{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1287{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1288{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1288{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1289{ "Journal/Details...","Journale/Details..." }, 1289{ "Journal/Details...","Journale/Details..." },
1290{ "Agenda View","Agenda Ansicht" }, 1290{ "Agenda View","Agenda Ansicht" },
1291{ "Show current time","Zeige aktuelle Zeit" }, 1291{ "Show current time","Zeige aktuelle Zeit" },
1292{ "Edit new item","Bearbeite neuen Eintrag" }, 1292{ "Edit new item","Bearbeite neuen Eintrag" },
1293{ "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" }, 1293{ "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" },
1294{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1294{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1295{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1295{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1296{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1296{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1297{ "%1 days\n","%1 Tagen\n" }, 1297{ "%1 days\n","%1 Tagen\n" },
1298{ "1 day\n","1 Tag\n" }, 1298{ "1 day\n","1 Tag\n" },
1299{ "%1 hours\n","%1 Stunden\n" }, 1299{ "%1 hours\n","%1 Stunden\n" },
1300{ "1 hour\n","1 Stunde\n" }, 1300{ "1 hour\n","1 Stunde\n" },
1301{ "%1 minutes\n","%1 Minuten\n" }, 1301{ "%1 minutes\n","%1 Minuten\n" },
1302{ "1 minute\n","1 Minute\n" }, 1302{ "1 minute\n","1 Minute\n" },
1303{ "Only one toolbar","Nur eine Toolbar" }, 1303{ "Only one toolbar","Nur eine Toolbar" },
1304{ "Print","Drucke" }, 1304{ "Print","Drucke" },
1305{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1305{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1306{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1306{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1307{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1307{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1308{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1308{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1309{ "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" }, 1309{ "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" },
1310{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1310{ "KO/Pi Printout","KO/Pi Ausdruck" },
1311{ "Print unscaled","Drucke unskaliert" }, 1311{ "Print unscaled","Drucke unskaliert" },
1312{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1312{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1313{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1313{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1314{ "Printout Mode","Druck Modus" }, 1314{ "Printout Mode","Druck Modus" },
1315{ "Filter menu icon","Filtermenu Icon" }, 1315{ "Filter menu icon","Filtermenu Icon" },
1316{ "<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" }, 1316{ "<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" },
1317{ "<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" }, 1317{ "<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" },
1318{ "%1d","%1t" }, 1318{ "%1d","%1t" },
1319{ "%1h","%1std" }, 1319{ "%1h","%1std" },
1320{ "%1min","%1min" }, 1320{ "%1min","%1min" },
1321{ "( %1 before )","( %1 vorher )" }, 1321{ "( %1 before )","( %1 vorher )" },
1322{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1322{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1323{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1323{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1324{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1324{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1325{ "Show Sync Events","Zeige Sync-Ereignisse" }, 1325{ "Show Sync Events","Zeige Sync-Ereignisse" },
1326{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1326{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1327{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1327{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1328{ " on "," am " }, 1328{ " on "," am " },
1329{ "On: ","Am: " }, 1329{ "On: ","Am: " },
1330{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1330{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1331{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1331{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1332{ "Color for running todos:","Farbe für laufende Todos:" }, 1332{ "Color for running todos:","Farbe für laufende Todos:" },
1333{ "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?" }, 1333{ "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?" },
1334{ "Todo is started","Todo ist gestartet" }, 1334{ "Todo is started","Todo ist gestartet" },
1335{ "Stop todo","Stoppe Todo" }, 1335{ "Stop todo","Stoppe Todo" },
1336{ "Todo is stopped","Todo ist gestoppt" }, 1336{ "Todo is stopped","Todo ist gestoppt" },
1337{ "Start todo","Starte Todo" }, 1337{ "Start todo","Starte Todo" },
1338{ "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?" }, 1338{ "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?" },
1339{ "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 alle\nUntertodos auch klonen?" }, 1339{ "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 alle\nUntertodos auch klonen?" },
1340{ "Todo has subtodos","Todo hat Untertodos" }, 1340{ "Todo has subtodos","Todo hat Untertodos" },
1341{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, 1341{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
1342{ "Colors","Farben" }, 1342{ "Colors","Farben" },
1343{ "Click on new parent item","Klicke auf neues Übertodo" }, 1343{ "Click on new parent item","Klicke auf neues Übertodo" },
1344{ "Reparenting aborted!","Übertodo setzen abgebrochen" }, 1344{ "Reparenting aborted!","Übertodo setzen abgebrochen" },
1345{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, 1345{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" },
1346{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, 1346{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
1347{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, 1347{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
1348{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 1348{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
1349{ "times","Zeiten" }, 1349{ "times","Zeiten" },
1350{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, 1350{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" },
1351{ "Backup enabled","Backup angeschaltet" }, 1351{ "Backup enabled","Backup angeschaltet" },
1352{ "Use standard backup dir","Standard Backupverzeichnis" }, 1352{ "Use standard backup dir","Standard Backupverzeichnis" },
1353{ "Number of Backups:","Anzahl der Backups" }, 1353{ "Number of Backups:","Anzahl der Backups" },
1354{ "Make backup every ","Mache ein Backup alle " }, 1354{ "Make backup every ","Mache ein Backup alle " },
1355{ " days"," Tage" }, 1355{ " days"," Tage" },
1356{ "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, 1356{ "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." },
1357{ "Backup Failed!","Backup Problem!" }, 1357{ "Backup Failed!","Backup Problem!" },
1358{ "Try again now","Versuche jetzt nochmal" }, 1358{ "Try again now","Versuche jetzt nochmal" },
1359{ "Try again later","Versuche später nochmal" }, 1359{ "Try again later","Versuche später nochmal" },
1360{ "Try again tomorrow","Versuche morgen nochmal" }, 1360{ "Try again tomorrow","Versuche morgen nochmal" },
1361{ "Disable backup","Schalte Backup ab" }, 1361{ "Disable backup","Schalte Backup ab" },
1362{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 1362{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
1363{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 1363{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
1364{ "Choose action","Wähle Aktion" }, 1364{ "Choose action","Wähle Aktion" },
1365{ "Comment for todo:","Kommentar zum Todo:" }, 1365{ "Comment for todo:","Kommentar zum Todo:" },
1366{ "Stop+note","Stop+Notiz" }, 1366{ "Stop+note","Stop+Notiz" },
1367{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, 1367{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
1368{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, 1368{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
1369{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, 1369{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
1370{ "Print complete list...","Drucke komplette Liste..." }, 1370{ "Print complete list...","Drucke komplette Liste..." },
1371{ "Hide all selected","Verstecke Ausgewählte" }, 1371{ "Hide all selected","Verstecke Ausgewählte" },
1372{ "Add items","hinzufügen" }, 1372{ "Add items","hinzufügen" },
1373{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, 1373{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" },
1374{ "Print List View...","Drucke Listenansicht..." }, 1374{ "Print List View...","Drucke Listenansicht..." },
1375{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, 1375{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." },
1376{ "Configure KO/Pi...","Konfiguriere KO/Pi..." }, 1376{ "Configure KO/Pi...","Konfiguriere KO/Pi..." },
1377{ "Global Settings...","Globale Einstellungen..." }, 1377{ "Global Settings...","Globale Einstellungen..." },
1378{ "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, 1378{ "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" },
1379{ "(disabled)","(abgeschaltet)" }, 1379{ "(disabled)","(abgeschaltet)" },
1380{ "New Calendar","Neuer Kalender" }, 1380{ "New Calendar","Neuer Kalender" },
1381{ "Calendar","Kalender" }, 1381{ "Calendar","Kalender" },
1382{ "Filter selector","Filterauswahl" }, 1382{ "Filter selector","Filterauswahl" },
1383{ "Filtermenu","Filtermenu" }, 1383{ "Filtermenu","Filtermenu" },
1384{ "Toggle Fullscreen","Vollbild umschalten" }, 1384{ "Toggle Fullscreen","Vollbild umschalten" },
1385{ "Toggle Resource View","Resourcenansicht umschalten" }, 1385{ "Toggle Resource View","Resourcenansicht umschalten" },
1386{ "Storage HowTo...","Speicherort HowTo..." }, 1386{ "Storage HowTo...","Speicherort HowTo..." },
1387{ "Timetracking HowTo...","Timetracking HowTo..." }, 1387{ "Timetracking HowTo...","Timetracking HowTo..." },
1388{ "Juni","Juni" }, 1388{ "Juni","Juni" },
1389{ "Juli","Juli" }, 1389{ "Juli","Juli" },
1390{ "ToDo:","ToDo:" }, 1390{ "ToDo:","ToDo:" },
1391{ "Set Calendar","Setze Kalender" }, 1391{ "Set Calendar","Setze Kalender" },
1392{ "Todo: %1","Todo: %1" }, 1392{ "Todo: %1","Todo: %1" },
1393{ ": (Prio ",": (Prio " }, 1393{ ": (Prio ",": (Prio " },
1394{ "Todos","Todos" }, 1394{ "Todos","Todos" },
1395{ "Todo Viewer","Todo Anzeige" }, 1395{ "Todo Viewer","Todo Anzeige" },
1396{ "Todo ","Todo " }, 1396{ "Todo ","Todo " },
1397{ " Calendar \n Resource "," Kalender \n Resource " }, 1397{ " Calendar \n Resource "," Kalender \n Resource " },
1398{ " Color "," Farbe " }, 1398{ " Color "," Farbe " },
1399{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, 1399{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" },
1400{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, 1400{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" },
1401{ "Add new Calendar","Füge Kalender hinzu" }, 1401{ "Add new Calendar","Füge Kalender hinzu" },
1402{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, 1402{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" },
1403{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, 1403{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" },
1404{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, 1404{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" },
1405{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, 1405{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" },
1406{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, 1406{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." },
1407{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, 1407{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" },
1408{ "Global application font for all apps:","Globale Schriftart:" }, 1408{ "Global application font for all apps:","Globale Schriftart:" },
1409{ "Application Font","Applikationsschriftart" }, 1409{ "Application Font","Applikationsschriftart" },
1410{ "Kx/Pi","Kx/Pi" }, 1410{ "Kx/Pi","Kx/Pi" },
1411{ "Backup","Backup" }, 1411{ "Backup","Backup" },
1412{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, 1412{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" },
1413{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, 1413{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" },
1414{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, 1414{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" },
1415{ "Choose Color","Wähle Farbe" }, 1415{ "Choose Color","Wähle Farbe" },
1416{ " OK "," OK " }, 1416{ " OK "," OK " },
1417{ " Cancel "," Abbrechen " }, 1417{ " Cancel "," Abbrechen " },
1418{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, 1418{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" },
1419{ "Matching items will be removed from list","Passende werden von der Liste entfernt" }, 1419{ "Matching items will be removed from list","Passende werden von der Liste entfernt" },
1420{ "Search on displayed list only","Suche auf der dargestellten Liste" }, 1420{ "Search on displayed list only","Suche auf der dargestellten Liste" },
1421{ "List will be cleared before search","Liste wird vor der Suche gelöscht" }, 1421{ "List will be cleared before search","Liste wird vor der Suche gelöscht" },
1422{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, 1422{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" },
1423{ "%1\nis running!","%1\nist am Laufen!" }, 1423{ "%1\nis running!","%1\nist am Laufen!" },
1424{ "Additional Comment:","Zusätzlicher Kommentar:" }, 1424{ "Additional Comment:","Zusätzlicher Kommentar:" },
1425{ "Stop and save","Stopp und Speichern" }, 1425{ "Stop and save","Stopp und Speichern" },
1426{ "Continue running","Weiter laufen lassen" }, 1426{ "Continue running","Weiter laufen lassen" },
1427{ "Stop - do not save","Stopp - nicht Speichern" }, 1427{ "Stop - do not save","Stopp - nicht Speichern" },
1428{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, 1428{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" },
1429{ "Time mismatch!","Zeiten stimmen nicht!" }, 1429{ "Time mismatch!","Zeiten stimmen nicht!" },
1430{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, 1430{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" },
1431{ "Yes, stop todo","Ja, stoppe Todo" }, 1431{ "Yes, stop todo","Ja, stoppe Todo" },
1432{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, 1432{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" },
1433{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, 1433{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" },
1434{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, 1434{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." },
1435{ "Spouse","Ehegatte" }, 1435{ "Spouse","Ehegatte" },
1436{ "Notes","Notizen" }, 1436{ "Notes","Notizen" },
1437{ "Messanger","Messanger" }, 1437{ "Messanger","Messanger" },
1438{ "Assistant","Assistent" }, 1438{ "Assistant","Assistent" },
1439{ "Manager","Manager" }, 1439{ "Manager","Manager" },
1440{ "Secrecy","Sichtbar" }, 1440{ "Secrecy","Sichtbar" },
1441{ "male","männlich" }, 1441{ "male","männlich" },
1442{ "female","weiblich" }, 1442{ "female","weiblich" },
1443{ "Hide!","Verbergen!" }, 1443{ "Hide!","Verbergen!" },
1444{ "Show!","Anzeigen!" }, 1444{ "Show!","Anzeigen!" },
1445{ "Details","Details" }, 1445{ "Details","Details" },
1446{ "Profession","Beruf" }, 1446{ "Profession","Beruf" },
1447{ "Children","Kinder" }, 1447{ "Children","Kinder" },
1448{ "Department","Abteilung" }, 1448{ "Department","Abteilung" },
1449{ "Backup cancelled","Backup abgebrochen" }, 1449{ "Backup cancelled","Backup abgebrochen" },
1450{ "Backup globally disabled","Backup global abgeschaltet" }, 1450{ "Backup globally disabled","Backup global abgeschaltet" },
1451{ "Backup succesfully finished","Backup erfolgreich beendet" }, 1451{ "Backup succesfully finished","Backup erfolgreich beendet" },
1452{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, 1452{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" },
1453{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, 1453{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" },
1454{ "Birthdays","Geburtstage" }, 1454{ "Birthdays","Geburtstage" },
1455{ "KO/Pi import information!","KO/Pi Import Information!" }, 1455{ "KO/Pi import information!","KO/Pi Import Information!" },
1456{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, 1456{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" },
1457{ "Cancel - do not start"," Abbrechen - Todo nicht starten" }, 1457{ "Cancel - do not start"," Abbrechen - Todo nicht starten" },
1458{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, 1458{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" },
1459{ "Reload","Neu laden" }, 1459{ "Reload","Neu laden" },
1460{ "Timezone settings","Zeitzoneneinstellung" }, 1460{ "Timezone settings","Zeitzoneneinstellung" },
1461{ "Title: ","Titel: " }, 1461{ "Title: ","Titel: " },
1462{ "Journal from: ","Journal vom: " }, 1462{ "Journal from: ","Journal vom: " },
1463{ "Journal: %1 from ","Journal: %1 vom " }, 1463{ "Journal: %1 from ","Journal: %1 vom " },
1464{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, 1464{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" },
1465{ "Selected Item","Ausgewähltes Item" }, 1465{ "Selected Item","Ausgewähltes Item" },
1466{ "Select Date...","Wähle Datum..." }, 1466{ "Select Date...","Wähle Datum..." },
1467{ "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, 1467{ "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" },
1468{ "Change category list now!","Ändere Kategorieliste jetzt!" }, 1468{ "Change category list now!","Ändere Kategorieliste jetzt!" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 72221fd..1785b8a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3096,512 +3096,513 @@ void CalendarView::moveIncidence()
3096 if ( incidence ) { 3096 if ( incidence ) {
3097 moveIncidence(incidence); 3097 moveIncidence(incidence);
3098 } 3098 }
3099} 3099}
3100void CalendarView::beamIncidence() 3100void CalendarView::beamIncidence()
3101{ 3101{
3102 Incidence *incidence = currentSelection(); 3102 Incidence *incidence = currentSelection();
3103 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3103 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3104 if ( incidence ) { 3104 if ( incidence ) {
3105 beamIncidence(incidence); 3105 beamIncidence(incidence);
3106 } 3106 }
3107} 3107}
3108void CalendarView::toggleCancelIncidence() 3108void CalendarView::toggleCancelIncidence()
3109{ 3109{
3110 Incidence *incidence = currentSelection(); 3110 Incidence *incidence = currentSelection();
3111 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3111 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3112 if ( incidence ) { 3112 if ( incidence ) {
3113 cancelIncidence(incidence); 3113 cancelIncidence(incidence);
3114 } 3114 }
3115} 3115}
3116 3116
3117 3117
3118void CalendarView::cancelIncidence(Incidence * inc ) 3118void CalendarView::cancelIncidence(Incidence * inc )
3119{ 3119{
3120 inc->setCancelled( ! inc->cancelled() ); 3120 inc->setCancelled( ! inc->cancelled() );
3121 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); 3121 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
3122 updateView(); 3122 updateView();
3123} 3123}
3124void CalendarView::cloneIncidence(Incidence * orgInc ) 3124void CalendarView::cloneIncidence(Incidence * orgInc )
3125{ 3125{
3126 Incidence * newInc = orgInc->clone(); 3126 Incidence * newInc = orgInc->clone();
3127 newInc->recreate(); 3127 newInc->recreate();
3128 3128
3129 if ( newInc->typeID() == todoID ) { 3129 if ( newInc->typeID() == todoID ) {
3130 Todo* t = (Todo*) newInc; 3130 Todo* t = (Todo*) newInc;
3131 bool cloneSub = false; 3131 bool cloneSub = false;
3132 if ( orgInc->relations().count() ) { 3132 if ( orgInc->relations().count() ) {
3133 int result = KMessageBox::warningYesNoCancel(this, 3133 int result = KMessageBox::warningYesNoCancel(this,
3134 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 ) ), 3134 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 ) ),
3135 i18n("Todo has subtodos"), 3135 i18n("Todo has subtodos"),
3136 i18n("Yes"), 3136 i18n("Yes"),
3137 i18n("No")); 3137 i18n("No"));
3138 3138
3139 if ( result == KMessageBox::Cancel ) { 3139 if ( result == KMessageBox::Cancel ) {
3140 delete t; 3140 delete t;
3141 return; 3141 return;
3142 } 3142 }
3143 if (result == KMessageBox::Yes) cloneSub = true; 3143 if (result == KMessageBox::Yes) cloneSub = true;
3144 } 3144 }
3145 showTodoEditor(); 3145 showTodoEditor();
3146 mTodoEditor->editTodo( t ); 3146 mTodoEditor->editTodo( t );
3147 if ( mTodoEditor->exec() ) { 3147 if ( mTodoEditor->exec() ) {
3148 if ( cloneSub ) { 3148 if ( cloneSub ) {
3149 orgInc->cloneRelations( t ); 3149 orgInc->cloneRelations( t );
3150 mCalendar->addIncidenceBranch( t ); 3150 mCalendar->addIncidenceBranch( t );
3151 updateView(); 3151 updateView();
3152 3152
3153 } else { 3153 } else {
3154 mCalendar->addTodo( t ); 3154 mCalendar->addTodo( t );
3155 updateView(); 3155 updateView();
3156 } 3156 }
3157 } else { 3157 } else {
3158 delete t; 3158 delete t;
3159 } 3159 }
3160 } 3160 }
3161 else { 3161 else {
3162 Event* e = (Event*) newInc; 3162 Event* e = (Event*) newInc;
3163 showEventEditor(); 3163 showEventEditor();
3164 mEventEditor->editEvent( e ); 3164 mEventEditor->editEvent( e );
3165 if ( mEventEditor->exec() ) { 3165 if ( mEventEditor->exec() ) {
3166 mCalendar->addEvent( e ); 3166 mCalendar->addEvent( e );
3167 updateView(); 3167 updateView();
3168 } else { 3168 } else {
3169 delete e; 3169 delete e;
3170 } 3170 }
3171 } 3171 }
3172 setActiveWindow(); 3172 setActiveWindow();
3173} 3173}
3174 3174
3175void CalendarView::newEvent() 3175void CalendarView::newEvent()
3176{ 3176{
3177 // TODO: Replace this code by a common eventDurationHint of KOBaseView. 3177 // TODO: Replace this code by a common eventDurationHint of KOBaseView.
3178 KOAgendaView *aView = mViewManager->agendaView(); 3178 KOAgendaView *aView = mViewManager->agendaView();
3179 if (aView) { 3179 if (aView) {
3180 if (aView->selectionStart().isValid()) { 3180 if (aView->selectionStart().isValid()) {
3181 if (aView->selectedIsAllDay()) { 3181 if (aView->selectedIsAllDay()) {
3182 newEvent(aView->selectionStart(),aView->selectionEnd(),true); 3182 newEvent(aView->selectionStart(),aView->selectionEnd(),true);
3183 } else { 3183 } else {
3184 newEvent(aView->selectionStart(),aView->selectionEnd()); 3184 newEvent(aView->selectionStart(),aView->selectionEnd());
3185 } 3185 }
3186 return; 3186 return;
3187 } 3187 }
3188 } 3188 }
3189 3189
3190 QDate date = mNavigator->selectedDates().first(); 3190 QDate date = mNavigator->selectedDates().first();
3191 QDateTime current = QDateTime::currentDateTime(); 3191 QDateTime current = QDateTime::currentDateTime();
3192 if ( date <= current.date() ) { 3192 if ( date <= current.date() ) {
3193 int hour = current.time().hour() +1; 3193 int hour = current.time().hour() +1;
3194 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), 3194 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ),
3195 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 3195 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
3196 } else 3196 } else
3197 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), 3197 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ),
3198 QDateTime( date, QTime( KOPrefs::instance()->mStartTime + 3198 QDateTime( date, QTime( KOPrefs::instance()->mStartTime +
3199 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 3199 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
3200} 3200}
3201 3201
3202void CalendarView::newEvent(QDateTime fh) 3202void CalendarView::newEvent(QDateTime fh)
3203{ 3203{
3204 newEvent(fh, 3204 newEvent(fh,
3205 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); 3205 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration)));
3206} 3206}
3207 3207
3208void CalendarView::newEvent(QDate dt) 3208void CalendarView::newEvent(QDate dt)
3209{ 3209{
3210 newEvent(QDateTime(dt, QTime(0,0,0)), 3210 newEvent(QDateTime(dt, QTime(0,0,0)),
3211 QDateTime(dt, QTime(0,0,0)), true); 3211 QDateTime(dt, QTime(0,0,0)), true);
3212} 3212}
3213void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) 3213void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint)
3214{ 3214{
3215 newEvent(fromHint, toHint, false); 3215 newEvent(fromHint, toHint, false);
3216} 3216}
3217void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) 3217void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
3218{ 3218{
3219 3219
3220 showEventEditor(); 3220 showEventEditor();
3221 mEventEditor->newEvent(fromHint,toHint,allDay); 3221 mEventEditor->newEvent(fromHint,toHint,allDay);
3222 if ( mFilterView->filtersEnabled() ) { 3222 if ( mFilterView->filtersEnabled() ) {
3223 CalFilter *filter = mFilterView->selectedFilter(); 3223 CalFilter *filter = mFilterView->selectedFilter();
3224 if (filter && filter->showCategories()) { 3224 if (filter && filter->showCategories()) {
3225 mEventEditor->setCategories(filter->categoryList().join(",") ); 3225 mEventEditor->setCategories(filter->categoryList().join(",") );
3226 } 3226 }
3227 if ( filter ) 3227 if ( filter )
3228 mEventEditor->setSecrecy( filter->getSecrecy() ); 3228 mEventEditor->setSecrecy( filter->getSecrecy() );
3229 } 3229 }
3230 mEventEditor->exec(); 3230 mEventEditor->exec();
3231 setActiveWindow(); 3231 setActiveWindow();
3232} 3232}
3233void CalendarView::todoAdded(Todo * t) 3233void CalendarView::todoAdded(Todo * t)
3234{ 3234{
3235 3235
3236 changeTodoDisplay ( t ,KOGlobals::EVENTADDED); 3236 changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
3237 updateTodoViews(); 3237 updateTodoViews();
3238} 3238}
3239void CalendarView::todoChanged(Todo * t) 3239void CalendarView::todoChanged(Todo * t)
3240{ 3240{
3241 emit todoModified( t, 4 ); 3241 emit todoModified( t, 4 );
3242 // updateTodoViews(); 3242 // updateTodoViews();
3243} 3243}
3244void CalendarView::todoToBeDeleted(Todo *) 3244void CalendarView::todoToBeDeleted(Todo *)
3245{ 3245{
3246 //qDebug("todoToBeDeleted(Todo *) "); 3246 //qDebug("todoToBeDeleted(Todo *) ");
3247 updateTodoViews(); 3247 updateTodoViews();
3248} 3248}
3249void CalendarView::todoDeleted() 3249void CalendarView::todoDeleted()
3250{ 3250{
3251 //qDebug(" todoDeleted()"); 3251 //qDebug(" todoDeleted()");
3252 updateTodoViews(); 3252 updateTodoViews();
3253} 3253}
3254 3254
3255 3255
3256void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) 3256void CalendarView::newTodoDateTime( QDateTime dt, bool allday )
3257{ 3257{
3258 showTodoEditor(); 3258 showTodoEditor();
3259 mTodoEditor->newTodo(dt,0,allday); 3259 mTodoEditor->newTodo(dt,0,allday);
3260 if ( mFilterView->filtersEnabled() ) { 3260 if ( mFilterView->filtersEnabled() ) {
3261 CalFilter *filter = mFilterView->selectedFilter(); 3261 CalFilter *filter = mFilterView->selectedFilter();
3262 if (filter && filter->showCategories()) { 3262 if (filter && filter->showCategories()) {
3263 mTodoEditor->setCategories(filter->categoryList().join(",") ); 3263 mTodoEditor->setCategories(filter->categoryList().join(",") );
3264 } 3264 }
3265 if ( filter ) 3265 if ( filter )
3266 mTodoEditor->setSecrecy( filter->getSecrecy() ); 3266 mTodoEditor->setSecrecy( filter->getSecrecy() );
3267 } 3267 }
3268 mTodoEditor->exec(); 3268 mTodoEditor->exec();
3269 setActiveWindow(); 3269 setActiveWindow();
3270} 3270}
3271 3271
3272void CalendarView::newTodo() 3272void CalendarView::newTodo()
3273{ 3273{
3274 newTodoDateTime( QDateTime(),true ); 3274 newTodoDateTime( QDateTime(),true );
3275} 3275}
3276 3276
3277void CalendarView::newSubTodo() 3277void CalendarView::newSubTodo()
3278{ 3278{
3279 Todo *todo = selectedTodo(); 3279 Todo *todo = selectedTodo();
3280 if ( todo ) newSubTodo( todo ); 3280 if ( todo ) newSubTodo( todo );
3281} 3281}
3282 3282
3283void CalendarView::newSubTodo(Todo *parentEvent) 3283void CalendarView::newSubTodo(Todo *parentEvent)
3284{ 3284{
3285 3285
3286 showTodoEditor(); 3286 showTodoEditor();
3287 mTodoEditor->newTodo(QDateTime(),parentEvent,true); 3287 mTodoEditor->newTodo(QDateTime(),parentEvent,true);
3288 mTodoEditor->exec(); 3288 mTodoEditor->exec();
3289 setActiveWindow(); 3289 setActiveWindow();
3290} 3290}
3291 3291
3292void CalendarView::newFloatingEvent() 3292void CalendarView::newFloatingEvent()
3293{ 3293{
3294 DateList tmpList = mNavigator->selectedDates(); 3294 DateList tmpList = mNavigator->selectedDates();
3295 QDate date = tmpList.first(); 3295 QDate date = tmpList.first();
3296 3296
3297 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), 3297 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
3298 QDateTime( date, QTime( 12, 0, 0 ) ), true ); 3298 QDateTime( date, QTime( 12, 0, 0 ) ), true );
3299} 3299}
3300 3300
3301 3301
3302void CalendarView::editEvent( Event *event ) 3302void CalendarView::editEvent( Event *event )
3303{ 3303{
3304 3304
3305 if ( !event ) return; 3305 if ( !event ) return;
3306 if ( event->isReadOnly() ) { 3306 if ( event->isReadOnly() ) {
3307 showEvent( event ); 3307 showEvent( event );
3308 return; 3308 return;
3309 } 3309 }
3310 showEventEditor(); 3310 showEventEditor();
3311 mEventEditor->editEvent( event , mFlagEditDescription); 3311 mEventEditor->editEvent( event , mFlagEditDescription);
3312 mEventEditor->exec(); 3312 mEventEditor->exec();
3313 setActiveWindow(); 3313 setActiveWindow();
3314 3314
3315} 3315}
3316void CalendarView::editJournal( Journal *jour ) 3316void CalendarView::editJournal( Journal *jour )
3317{ 3317{
3318 if ( !jour ) return; 3318 if ( !jour ) return;
3319 mDialogManager->hideSearchDialog(); 3319 mDialogManager->hideSearchDialog();
3320 mViewManager->showJournalView(); 3320 mViewManager->showJournalView();
3321 mNavigator->slotDaySelect( jour->dtStart().date() ); 3321 mNavigator->slotDaySelect( jour->dtStart().date() );
3322} 3322}
3323void CalendarView::editTodo( Todo *todo ) 3323void CalendarView::editTodo( Todo *todo )
3324{ 3324{
3325 if ( !todo ) return; 3325 if ( !todo ) return;
3326 3326
3327 if ( todo->isReadOnly() ) { 3327 if ( todo->isReadOnly() ) {
3328 showTodo( todo ); 3328 showTodo( todo );
3329 return; 3329 return;
3330 } 3330 }
3331 showTodoEditor(); 3331 showTodoEditor();
3332 mTodoEditor->editTodo( todo ,mFlagEditDescription); 3332 mTodoEditor->editTodo( todo ,mFlagEditDescription);
3333 mTodoEditor->exec(); 3333 mTodoEditor->exec();
3334 setActiveWindow(); 3334 setActiveWindow();
3335 3335
3336} 3336}
3337 3337
3338KOEventViewerDialog* CalendarView::getEventViewerDialog() 3338KOEventViewerDialog* CalendarView::getEventViewerDialog()
3339{ 3339{
3340 if ( !mEventViewerDialog ) { 3340 if ( !mEventViewerDialog ) {
3341 mEventViewerDialog = new KOEventViewerDialog(0); 3341 mEventViewerDialog = new KOEventViewerDialog(0);
3342 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 3342 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
3343 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 3343 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
3344 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 3344 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
3345 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 3345 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
3346 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 3346 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
3347 viewManager(), SLOT( showAgendaView( bool ) ) ); 3347 viewManager(), SLOT( showAgendaView( bool ) ) );
3348 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), 3348 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()),
3349 this, SLOT( slotViewerClosed() ) ); 3349 this, SLOT( slotViewerClosed() ) );
3350 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), 3350 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
3351 this, SLOT( todoChanged(Todo *) ) ); 3351 this, SLOT( todoChanged(Todo *) ) );
3352 connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
3352 mEventViewerDialog->resize( 640, 480 ); 3353 mEventViewerDialog->resize( 640, 480 );
3353 3354
3354 } 3355 }
3355 return mEventViewerDialog; 3356 return mEventViewerDialog;
3356} 3357}
3357void CalendarView::showEvent(Event *event) 3358void CalendarView::showEvent(Event *event)
3358{ 3359{
3359 getEventViewerDialog()->setEvent(event); 3360 getEventViewerDialog()->setEvent(event);
3360 getEventViewerDialog()->showMe(); 3361 getEventViewerDialog()->showMe();
3361} 3362}
3362 3363
3363void CalendarView::showTodo(Todo *event) 3364void CalendarView::showTodo(Todo *event)
3364{ 3365{
3365 getEventViewerDialog()->setTodo(event); 3366 getEventViewerDialog()->setTodo(event);
3366 getEventViewerDialog()->showMe(); 3367 getEventViewerDialog()->showMe();
3367} 3368}
3368void CalendarView::showJournal( Journal *jour ) 3369void CalendarView::showJournal( Journal *jour )
3369{ 3370{
3370 getEventViewerDialog()->setJournal(jour); 3371 getEventViewerDialog()->setJournal(jour);
3371 getEventViewerDialog()->showMe(); 3372 getEventViewerDialog()->showMe();
3372 3373
3373} 3374}
3374// void CalendarView::todoModified (Todo *event, int changed) 3375// void CalendarView::todoModified (Todo *event, int changed)
3375// { 3376// {
3376// // if (mDialogList.find (event) != mDialogList.end ()) { 3377// // if (mDialogList.find (event) != mDialogList.end ()) {
3377// // kdDebug() << "Todo modified and open" << endl; 3378// // kdDebug() << "Todo modified and open" << endl;
3378// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; 3379// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event];
3379// // temp->modified (changed); 3380// // temp->modified (changed);
3380 3381
3381// // } 3382// // }
3382 3383
3383// mViewManager->updateView(); 3384// mViewManager->updateView();
3384// } 3385// }
3385 3386
3386void CalendarView::appointment_show() 3387void CalendarView::appointment_show()
3387{ 3388{
3388 Event *anEvent = 0; 3389 Event *anEvent = 0;
3389 3390
3390 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 3391 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
3391 3392
3392 if (mViewManager->currentView()->isEventView()) { 3393 if (mViewManager->currentView()->isEventView()) {
3393 if ( incidence && incidence->typeID() == eventID ) { 3394 if ( incidence && incidence->typeID() == eventID ) {
3394 anEvent = static_cast<Event *>(incidence); 3395 anEvent = static_cast<Event *>(incidence);
3395 } 3396 }
3396 } 3397 }
3397 3398
3398 if (!anEvent) { 3399 if (!anEvent) {
3399 KNotifyClient::beep(); 3400 KNotifyClient::beep();
3400 return; 3401 return;
3401 } 3402 }
3402 3403
3403 showEvent(anEvent); 3404 showEvent(anEvent);
3404} 3405}
3405 3406
3406void CalendarView::appointment_edit() 3407void CalendarView::appointment_edit()
3407{ 3408{
3408 Event *anEvent = 0; 3409 Event *anEvent = 0;
3409 3410
3410 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 3411 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
3411 3412
3412 if (mViewManager->currentView()->isEventView()) { 3413 if (mViewManager->currentView()->isEventView()) {
3413 if ( incidence && incidence->typeID() == eventID ) { 3414 if ( incidence && incidence->typeID() == eventID ) {
3414 anEvent = static_cast<Event *>(incidence); 3415 anEvent = static_cast<Event *>(incidence);
3415 } 3416 }
3416 } 3417 }
3417 3418
3418 if (!anEvent) { 3419 if (!anEvent) {
3419 KNotifyClient::beep(); 3420 KNotifyClient::beep();
3420 return; 3421 return;
3421 } 3422 }
3422 3423
3423 editEvent(anEvent); 3424 editEvent(anEvent);
3424} 3425}
3425 3426
3426void CalendarView::appointment_delete() 3427void CalendarView::appointment_delete()
3427{ 3428{
3428 Event *anEvent = 0; 3429 Event *anEvent = 0;
3429 3430
3430 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 3431 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
3431 3432
3432 if (mViewManager->currentView()->isEventView()) { 3433 if (mViewManager->currentView()->isEventView()) {
3433 if ( incidence && incidence->typeID() == eventID ) { 3434 if ( incidence && incidence->typeID() == eventID ) {
3434 anEvent = static_cast<Event *>(incidence); 3435 anEvent = static_cast<Event *>(incidence);
3435 } 3436 }
3436 } 3437 }
3437 3438
3438 if (!anEvent) { 3439 if (!anEvent) {
3439 KNotifyClient::beep(); 3440 KNotifyClient::beep();
3440 return; 3441 return;
3441 } 3442 }
3442 3443
3443 deleteEvent(anEvent); 3444 deleteEvent(anEvent);
3444} 3445}
3445 3446
3446void CalendarView::todo_resub( Todo * parent, Todo * sub ) 3447void CalendarView::todo_resub( Todo * parent, Todo * sub )
3447{ 3448{
3448 if (!sub) return; 3449 if (!sub) return;
3449 if ( sub->relatedTo() == parent ) 3450 if ( sub->relatedTo() == parent )
3450 return; 3451 return;
3451 sub->setRelatedTo(parent); 3452 sub->setRelatedTo(parent);
3452 sub->updated(); 3453 sub->updated();
3453 setModified(true); 3454 setModified(true);
3454 updateView(); 3455 updateView();
3455} 3456}
3456void CalendarView::todo_unsub(Todo *anTodo ) 3457void CalendarView::todo_unsub(Todo *anTodo )
3457{ 3458{
3458 todo_resub( 0, anTodo ); 3459 todo_resub( 0, anTodo );
3459} 3460}
3460 3461
3461void CalendarView::deleteTodo(Todo *todo) 3462void CalendarView::deleteTodo(Todo *todo)
3462{ 3463{
3463 if (!todo) { 3464 if (!todo) {
3464 KNotifyClient::beep(); 3465 KNotifyClient::beep();
3465 return; 3466 return;
3466 } 3467 }
3467 if (KOPrefs::instance()->mConfirm) { 3468 if (KOPrefs::instance()->mConfirm) {
3468 QString text = todo->summary().left(20); 3469 QString text = todo->summary().left(20);
3469 if (!todo->relations().isEmpty()) { 3470 if (!todo->relations().isEmpty()) {
3470 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); 3471 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!");
3471 3472
3472 } 3473 }
3473 switch (msgItemDelete(text)) { 3474 switch (msgItemDelete(text)) {
3474 case KMessageBox::Continue: // OK 3475 case KMessageBox::Continue: // OK
3475 bool deleteT = false; 3476 bool deleteT = false;
3476 if (!todo->relations().isEmpty()) { 3477 if (!todo->relations().isEmpty()) {
3477 deleteT = removeCompletedSubTodos( todo ); 3478 deleteT = removeCompletedSubTodos( todo );
3478 } 3479 }
3479 // deleteT == true: todo already deleted in removeCompletedSubTodos 3480 // deleteT == true: todo already deleted in removeCompletedSubTodos
3480 if ( !deleteT ) { 3481 if ( !deleteT ) {
3481 checkExternalId( todo ); 3482 checkExternalId( todo );
3482 calendar()->deleteTodo(todo); 3483 calendar()->deleteTodo(todo);
3483 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 3484 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
3484 updateView(); 3485 updateView();
3485 } 3486 }
3486 break; 3487 break;
3487 } // switch 3488 } // switch
3488 } else { 3489 } else {
3489 checkExternalId( todo ); 3490 checkExternalId( todo );
3490 mCalendar->deleteTodo(todo); 3491 mCalendar->deleteTodo(todo);
3491 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 3492 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
3492 updateView(); 3493 updateView();
3493 } 3494 }
3494 3495
3495 emit updateSearchDialog(); 3496 emit updateSearchDialog();
3496} 3497}
3497void CalendarView::deleteJournal(Journal *jour) 3498void CalendarView::deleteJournal(Journal *jour)
3498{ 3499{
3499 if (!jour) { 3500 if (!jour) {
3500 KNotifyClient::beep(); 3501 KNotifyClient::beep();
3501 return; 3502 return;
3502 } 3503 }
3503 if (KOPrefs::instance()->mConfirm) { 3504 if (KOPrefs::instance()->mConfirm) {
3504 switch (msgItemDelete( jour->description().left(20))) { 3505 switch (msgItemDelete( jour->description().left(20))) {
3505 case KMessageBox::Continue: // OK 3506 case KMessageBox::Continue: // OK
3506 calendar()->deleteJournal(jour); 3507 calendar()->deleteJournal(jour);
3507 updateView(); 3508 updateView();
3508 break; 3509 break;
3509 } // switch 3510 } // switch
3510 } else { 3511 } else {
3511 calendar()->deleteJournal(jour);; 3512 calendar()->deleteJournal(jour);;
3512 updateView(); 3513 updateView();
3513 } 3514 }
3514 emit updateSearchDialog(); 3515 emit updateSearchDialog();
3515} 3516}
3516 3517
3517void CalendarView::deleteEvent(Event *anEvent) 3518void CalendarView::deleteEvent(Event *anEvent)
3518{ 3519{
3519 if (!anEvent) { 3520 if (!anEvent) {
3520 KNotifyClient::beep(); 3521 KNotifyClient::beep();
3521 return; 3522 return;
3522 } 3523 }
3523 3524
3524 if (anEvent->recurrence()->doesRecur()) { 3525 if (anEvent->recurrence()->doesRecur()) {
3525 QDate itemDate = mViewManager->currentSelectionDate(); 3526 QDate itemDate = mViewManager->currentSelectionDate();
3526 int km; 3527 int km;
3527 if (!itemDate.isValid()) { 3528 if (!itemDate.isValid()) {
3528 //kdDebug() << "Date Not Valid" << endl; 3529 //kdDebug() << "Date Not Valid" << endl;
3529 if (KOPrefs::instance()->mConfirm) { 3530 if (KOPrefs::instance()->mConfirm) {
3530 km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + 3531 km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) +
3531 i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), 3532 i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"),
3532 i18n("KO/Pi Confirmation"),i18n("Delete All")); 3533 i18n("KO/Pi Confirmation"),i18n("Delete All"));
3533 if ( km == KMessageBox::Continue ) 3534 if ( km == KMessageBox::Continue )
3534 km = KMessageBox::No; // No = all below 3535 km = KMessageBox::No; // No = all below
3535 } else 3536 } else
3536 km = KMessageBox::No; 3537 km = KMessageBox::No;
3537 } else { 3538 } else {
3538 km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + 3539 km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) +
3539 i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ 3540 i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+
3540 KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), 3541 KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"),
3541 i18n("KO/Pi Confirmation"),i18n("Current"), 3542 i18n("KO/Pi Confirmation"),i18n("Current"),
3542 i18n("All")); 3543 i18n("All"));
3543 } 3544 }
3544 switch(km) { 3545 switch(km) {
3545 3546
3546 case KMessageBox::No: // Continue // all 3547 case KMessageBox::No: // Continue // all
3547 //qDebug("KMessageBox::No "); 3548 //qDebug("KMessageBox::No ");
3548 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 3549 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
3549 schedule(Scheduler::Cancel,anEvent); 3550 schedule(Scheduler::Cancel,anEvent);
3550 3551
3551 checkExternalId( anEvent); 3552 checkExternalId( anEvent);
3552 mCalendar->deleteEvent(anEvent); 3553 mCalendar->deleteEvent(anEvent);
3553 changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); 3554 changeEventDisplay(anEvent,KOGlobals::EVENTDELETED);
3554 break; 3555 break;
3555 3556
3556 // Disabled because it does not work 3557 // Disabled because it does not work
3557 //#if 0 3558 //#if 0
3558 case KMessageBox::Yes: // just this one 3559 case KMessageBox::Yes: // just this one
3559 //QDate qd = mNavigator->selectedDates().first(); 3560 //QDate qd = mNavigator->selectedDates().first();
3560 //if (!qd.isValid()) { 3561 //if (!qd.isValid()) {
3561 // kdDebug() << "no date selected, or invalid date" << endl; 3562 // kdDebug() << "no date selected, or invalid date" << endl;
3562 // KNotifyClient::beep(); 3563 // KNotifyClient::beep();
3563 // return; 3564 // return;
3564 //} 3565 //}
3565 //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); 3566 //while (!anEvent->recursOn(qd)) qd = qd.addDays(1);
3566 if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { 3567 if (itemDate!=QDate(1,1,1) || itemDate.isValid()) {
3567 anEvent->addExDate(itemDate); 3568 anEvent->addExDate(itemDate);
3568 int duration = anEvent->recurrence()->duration(); 3569 int duration = anEvent->recurrence()->duration();
3569 if ( duration > 0 ) { 3570 if ( duration > 0 ) {
3570 anEvent->recurrence()->setDuration( duration - 1 ); 3571 anEvent->recurrence()->setDuration( duration - 1 );
3571 } 3572 }
3572 changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); 3573 changeEventDisplay(anEvent, KOGlobals::EVENTEDITED);
3573 } 3574 }
3574 break; 3575 break;
3575 //#endif 3576 //#endif
3576 } // switch 3577 } // switch
3577 } else { 3578 } else {
3578 if (KOPrefs::instance()->mConfirm) { 3579 if (KOPrefs::instance()->mConfirm) {
3579 switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + 3580 switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) +
3580 i18n("\nAre you sure you want\nto delete this event?"), 3581 i18n("\nAre you sure you want\nto delete this event?"),
3581 i18n("KO/Pi Confirmation"),i18n("Delete"))) { 3582 i18n("KO/Pi Confirmation"),i18n("Delete"))) {
3582 case KMessageBox::Continue: // OK 3583 case KMessageBox::Continue: // OK
3583 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 3584 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
3584 schedule(Scheduler::Cancel,anEvent); 3585 schedule(Scheduler::Cancel,anEvent);
3585 checkExternalId( anEvent); 3586 checkExternalId( anEvent);
3586 mCalendar->deleteEvent(anEvent); 3587 mCalendar->deleteEvent(anEvent);
3587 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 3588 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
3588 break; 3589 break;
3589 } // switch 3590 } // switch
3590 } else { 3591 } else {
3591 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 3592 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
3592 schedule(Scheduler::Cancel,anEvent); 3593 schedule(Scheduler::Cancel,anEvent);
3593 checkExternalId( anEvent); 3594 checkExternalId( anEvent);
3594 mCalendar->deleteEvent(anEvent); 3595 mCalendar->deleteEvent(anEvent);
3595 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 3596 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
3596 } 3597 }
3597 } // if-else 3598 } // if-else
3598 emit updateSearchDialog(); 3599 emit updateSearchDialog();
3599} 3600}
3600 3601
3601bool CalendarView::deleteEvent(const QString &uid) 3602bool CalendarView::deleteEvent(const QString &uid)
3602{ 3603{
3603 Event *ev = mCalendar->event(uid); 3604 Event *ev = mCalendar->event(uid);
3604 if (ev) { 3605 if (ev) {
3605 deleteEvent(ev); 3606 deleteEvent(ev);
3606 return true; 3607 return true;
3607 } else { 3608 } else {
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index f6c252b..2d0bfff 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -1,796 +1,818 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qcstring.h> 20#include <qcstring.h>
21#include <qwhatsthis.h> 21#include <qwhatsthis.h>
22#include <qdialog.h> 22#include <qdialog.h>
23#include <qapplication.h> 23#include <qapplication.h>
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qlayout.h> 25#include <qlayout.h>
26 26
27#include <klocale.h> 27#include <klocale.h>
28#include <kapplication.h> 28#include <kapplication.h>
29#include <libkcal/event.h> 29#include <libkcal/event.h>
30#include <libkcal/todo.h> 30#include <libkcal/todo.h>
31#include <kdebug.h> 31#include <kdebug.h>
32#include <kiconloader.h> 32#include <kiconloader.h>
33#include <krun.h> 33#include <krun.h>
34#include <kglobal.h> 34#include <kglobal.h>
35#include <kprocess.h> 35#include <kprocess.h>
36#include "koprefs.h" 36#include "koprefs.h"
37 37
38#include <kabc/stdaddressbook.h> 38#include <kabc/stdaddressbook.h>
39 39
40#ifndef KORG_NODCOP 40#ifndef KORG_NODCOP
41#include <dcopclient.h> 41#include <dcopclient.h>
42#include "korganizer.h" 42#include "korganizer.h"
43#include "koprefs.h" 43#include "koprefs.h"
44#include "actionmanager.h" 44#include "actionmanager.h"
45#endif 45#endif
46 46
47#include "koeventviewer.h" 47#include "koeventviewer.h"
48//#ifndef KORG_NOKABC 48//#ifndef KORG_NOKABC
49//#include <kabc/stdaddressbook.h> 49//#include <kabc/stdaddressbook.h>
50//#define size count 50//#define size count
51//#endif 51//#endif
52 52
53#ifdef DESKTOP_VERSION 53#ifdef DESKTOP_VERSION
54#include <kabc/addresseedialog.h> 54#include <kabc/addresseedialog.h>
55#include <kabc/addresseeview.h> 55#include <kabc/addresseeview.h>
56#include <qprinter.h> 56#include <qprinter.h>
57#include <qpainter.h> 57#include <qpainter.h>
58#include <qpaintdevicemetrics.h> 58#include <qpaintdevicemetrics.h>
59#else //DESKTOP_VERSION 59#else //DESKTOP_VERSION
60#include <externalapphandler.h> 60#include <externalapphandler.h>
61#include <qtopia/qcopenvelope_qws.h> 61#include <qtopia/qcopenvelope_qws.h>
62#endif //DESKTOP_VERSION 62#endif //DESKTOP_VERSION
63 63
64KOEventViewer::KOEventViewer(QWidget *parent,const char *name) 64KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
65 : QTextBrowser(parent,name) 65 : QTextBrowser(parent,name)
66{ 66{
67 mSyncMode = false; 67 mSyncMode = false;
68 mColorMode = 0; 68 mColorMode = 0;
69} 69}
70 70
71KOEventViewer::~KOEventViewer() 71KOEventViewer::~KOEventViewer()
72{ 72{
73} 73}
74 74
75void KOEventViewer::printMe() 75void KOEventViewer::printMe()
76{ 76{
77#ifdef DESKTOP_VERSION 77#ifdef DESKTOP_VERSION
78 78
79 KOPrintPrefs pp ( this ); 79 KOPrintPrefs pp ( this );
80 if (!pp.exec() ) 80 if (!pp.exec() )
81 return; 81 return;
82 int scaleval = pp.printMode() ; 82 int scaleval = pp.printMode() ;
83 83
84 QPrinter printer; 84 QPrinter printer;
85 if (!printer.setup() ) 85 if (!printer.setup() )
86 return; 86 return;
87 QPainter p; 87 QPainter p;
88 p.begin ( &printer ); 88 p.begin ( &printer );
89 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 89 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
90 float dx, dy; 90 float dx, dy;
91 int wid = (m.width() * 9)/10; 91 int wid = (m.width() * 9)/10;
92 dx = (float) wid/(float)contentsWidth (); 92 dx = (float) wid/(float)contentsWidth ();
93 dy = (float)(m.height()) / (float)contentsHeight (); 93 dy = (float)(m.height()) / (float)contentsHeight ();
94 float scale; 94 float scale;
95 // scale to fit the width or height of the paper 95 // scale to fit the width or height of the paper
96 if ( dx < dy ) 96 if ( dx < dy )
97 scale = dx; 97 scale = dx;
98 else 98 else
99 scale = dy; 99 scale = dy;
100 100
101 p.translate( m.width()/10,0 ); 101 p.translate( m.width()/10,0 );
102 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { 102 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
103 p.scale( scale, scale ); 103 p.scale( scale, scale );
104 } 104 }
105 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); 105 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
106 p.end(); 106 p.end();
107#endif 107#endif
108 108
109} 109}
110void KOEventViewer::setSource(const QString& n) 110void KOEventViewer::setSource(const QString& n)
111{ 111{
112 112
113 if ( n.left(8) == "todo_uid" ) {
114 int midstr = 9;
115#ifdef DESKTOP_VERSION
116 midstr = 11;
117#endif
118 qDebug("-%s- ", n.mid(midstr).latin1());
119 emit showIncidence( n.mid(midstr) );
120 return;
121 }
122
113 if ( n.left(3) == "uid" ) 123 if ( n.left(3) == "uid" )
114#ifdef DESKTOP_VERSION 124#ifdef DESKTOP_VERSION
115 { 125 {
116 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 126 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
117 KABC::AddressBook::Iterator it; 127 KABC::AddressBook::Iterator it;
118 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 128 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
119 // LR I do not understand, why the uid string is different on zaurus and desktop 129 // LR I do not understand, why the uid string is different on zaurus and desktop
120 QString uid = "uid://"+(*it).uid(); 130 QString uid = "uid://"+(*it).uid();
121 131
122 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); 132 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
123 if (n == uid ) { 133 if (n == uid ) {
124 //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); 134 //qDebug("found %s ",(*it).mobileHomePhone().latin1() );
125 QDialog dia( this,"dia123", true ); 135 QDialog dia( this,"dia123", true );
126 dia.setCaption( i18n("Details of attendee") ); 136 dia.setCaption( i18n("Details of attendee") );
127 QVBoxLayout lay ( &dia ); 137 QVBoxLayout lay ( &dia );
128 KABC::AddresseeView av ( &dia ); 138 KABC::AddresseeView av ( &dia );
129 av.setAddressee( (*it) ); 139 av.setAddressee( (*it) );
130 lay.addWidget( &av ); 140 lay.addWidget( &av );
131 if ( QApplication::desktop()->width() < 480 ) 141 if ( QApplication::desktop()->width() < 480 )
132 dia.resize( 220, 240); 142 dia.resize( 220, 240);
133 else { 143 else {
134 dia.resize( 400,400); 144 dia.resize( 400,400);
135 } 145 }
136 dia.exec(); 146 dia.exec();
137 break; 147 break;
138 } 148 }
139 } 149 }
140 return; 150 return;
141 } 151 }
142#else 152#else
143 { 153 {
144 if ( "uid:organizer" == n ) { 154 if ( "uid:organizer" == n ) {
145 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); 155 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
146 return; 156 return;
147 } 157 }
148 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 158 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
149 if (attendees.count()) { 159 if (attendees.count()) {
150 Attendee *a; 160 Attendee *a;
151 for(a=attendees.first();a;a=attendees.next()) { 161 for(a=attendees.first();a;a=attendees.next()) {
152 if ( "uid:"+a->uid() == n ) { 162 if ( "uid:"+a->uid() == n ) {
153 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); 163 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
154 return; 164 return;
155 } 165 }
156 } 166 }
157 } 167 }
158 return; 168 return;
159 } 169 }
160 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 170 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
161 // the result should now arrive through method insertAttendees 171 // the result should now arrive through method insertAttendees
162 //QString uid = "uid:"+(*it).uid(); 172 //QString uid = "uid:"+(*it).uid();
163#endif 173#endif
164 if ( n.left(6) == "mailto" ) { 174 if ( n.left(6) == "mailto" ) {
165 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); 175 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
166#ifndef DESKTOP_VERSION 176#ifndef DESKTOP_VERSION
167 if ( n.mid(7,3) == "ALL" ) { 177 if ( n.mid(7,3) == "ALL" ) {
168 mailToAttendees( true ); 178 mailToAttendees( true );
169 } else if ( n.mid(7,4) == "RSVP" ) { 179 } else if ( n.mid(7,4) == "RSVP" ) {
170 mailToAttendees( false ); 180 mailToAttendees( false );
171 } else { 181 } else {
172 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); 182 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
173 e << n.mid(7); 183 e << n.mid(7);
174 } 184 }
175#endif 185#endif
176 186
177 } 187 }
178 188
179 189
180#ifndef KORG_NODCOP 190#ifndef KORG_NODCOP
181 kdDebug() << "KOEventViewer::setSource(): " << n << endl; 191 kdDebug() << "KOEventViewer::setSource(): " << n << endl;
182 QString tmpStr; 192 QString tmpStr;
183 if (n.startsWith("mailto:")) { 193 if (n.startsWith("mailto:")) {
184 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); 194 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null);
185 //emit showIncidence(n); 195 //emit showIncidence(n);
186 return; 196 return;
187 } else if (n.startsWith("uid:")) { 197 } else if (n.startsWith("uid:")) {
188 DCOPClient *client = KApplication::kApplication()->dcopClient(); 198 DCOPClient *client = KApplication::kApplication()->dcopClient();
189 const QByteArray noParamData; 199 const QByteArray noParamData;
190 const QByteArray paramData; 200 const QByteArray paramData;
191 QByteArray replyData; 201 QByteArray replyData;
192 QCString replyTypeStr; 202 QCString replyTypeStr;
193#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) 203#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
194 bool foundAbbrowser = PING_ABBROWSER; 204 bool foundAbbrowser = PING_ABBROWSER;
195 205
196 if (foundAbbrowser) { 206 if (foundAbbrowser) {
197 //KAddressbook is already running, so just DCOP to it to bring up the contact editor 207 //KAddressbook is already running, so just DCOP to it to bring up the contact editor
198 //client->send("kaddressbook","KAddressBookIface", 208 //client->send("kaddressbook","KAddressBookIface",
199 QDataStream arg(paramData, IO_WriteOnly); 209 QDataStream arg(paramData, IO_WriteOnly);
200 arg << n.mid(6); 210 arg << n.mid(6);
201 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); 211 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
202 return; 212 return;
203 } else { 213 } else {
204 /* 214 /*
205 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. 215 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater.
206 We start it without its main interface 216 We start it without its main interface
207 */ 217 */
208 KIconLoader* iconLoader = new KIconLoader(); 218 KIconLoader* iconLoader = new KIconLoader();
209 QString iconPath = iconLoader->iconPath("go",KIcon::Small); 219 QString iconPath = iconLoader->iconPath("go",KIcon::Small);
210 ActionManager::setStartedKAddressBook(true); 220 ActionManager::setStartedKAddressBook(true);
211 tmpStr = "kaddressbook --editor-only --uid "; 221 tmpStr = "kaddressbook --editor-only --uid ";
212 tmpStr += KProcess::quote(n.mid(6)); 222 tmpStr += KProcess::quote(n.mid(6));
213 KRun::runCommand(tmpStr,"KAddressBook",iconPath); 223 KRun::runCommand(tmpStr,"KAddressBook",iconPath);
214 return; 224 return;
215 } 225 }
216 } else { 226 } else {
217 //QTextBrowser::setSource(n); 227 //QTextBrowser::setSource(n);
218 } 228 }
219#endif 229#endif
220} 230}
221void KOEventViewer::mailToAttendees( bool all ) 231void KOEventViewer::mailToAttendees( bool all )
222{ 232{
223 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 233 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
224 if (attendees.count() == 0) return; 234 if (attendees.count() == 0) return;
225 QStringList nameList; 235 QStringList nameList;
226 QStringList emailList; 236 QStringList emailList;
227 QStringList uidList; 237 QStringList uidList;
228 Attendee* a; 238 Attendee* a;
229 for(a=attendees.first();a;a=attendees.next()) { 239 for(a=attendees.first();a;a=attendees.next()) {
230 if ( !all && !a->RSVP() ) continue; 240 if ( !all && !a->RSVP() ) continue;
231 if (!a->email().isEmpty()) { 241 if (!a->email().isEmpty()) {
232 nameList.append (a->name() ); 242 nameList.append (a->name() );
233 emailList.append (a->email() ); 243 emailList.append (a->email() );
234 uidList.append (a->uid() ); 244 uidList.append (a->uid() );
235 } 245 }
236 } 246 }
237 QString uid = "ComposeMailUIpick2"+mMailSubject; 247 QString uid = "ComposeMailUIpick2"+mMailSubject;
238#ifndef DESKTOP_VERSION 248#ifndef DESKTOP_VERSION
239 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); 249 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
240#endif 250#endif
241 251
242} 252}
243void KOEventViewer::addTag(const QString & tag,const QString & text) 253void KOEventViewer::addTag(const QString & tag,const QString & text)
244{ 254{
245 int number=text.contains("\n"); 255 int number=text.contains("\n");
246 QString str = "<" + tag + ">"; 256 QString str = "<" + tag + ">";
247 QString tmpText=text; 257 QString tmpText=text;
248 QString tmpStr=str; 258 QString tmpStr=str;
249 if(number !=-1) 259 if(number !=-1)
250 { 260 {
251 if (number > 0) { 261 if (number > 0) {
252 int pos=0; 262 int pos=0;
253 QString tmp; 263 QString tmp;
254 for(int i=0;i<=number;i++) { 264 for(int i=0;i<=number;i++) {
255 pos=tmpText.find("\n"); 265 pos=tmpText.find("\n");
256 tmp=tmpText.left(pos); 266 tmp=tmpText.left(pos);
257 tmpText=tmpText.right(tmpText.length()-pos-1); 267 tmpText=tmpText.right(tmpText.length()-pos-1);
258 tmpStr+=tmp+"<br>"; 268 tmpStr+=tmp+"<br>";
259 } 269 }
260 } 270 }
261 else tmpStr += tmpText; 271 else tmpStr += tmpText;
262 tmpStr+="</" + tag + ">"; 272 tmpStr+="</" + tag + ">";
263 mText.append(tmpStr); 273 mText.append(tmpStr);
264 } 274 }
265 else 275 else
266 { 276 {
267 str += text + "</" + tag + ">"; 277 str += text + "</" + tag + ">";
268 mText.append(str); 278 mText.append(str);
269 } 279 }
270} 280}
271 281
272void KOEventViewer::setColorMode( int m ) 282void KOEventViewer::setColorMode( int m )
273{ 283{
274 mColorMode = m; 284 mColorMode = m;
275} 285}
276void KOEventViewer::appendEvent(Event *event, int mode ) 286void KOEventViewer::appendEvent(Event *event, int mode )
277{ 287{
278 mMailSubject = ""; 288 mMailSubject = "";
279 mCurrentIncidence = event; 289 mCurrentIncidence = event;
280 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 290 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
281 bool wideScreen = ( QApplication::desktop()->width() >= 640 ); 291 bool wideScreen = ( QApplication::desktop()->width() >= 640 );
282 topLevelWidget()->setCaption(i18n("Event Viewer")); 292 topLevelWidget()->setCaption(i18n("Event Viewer"));
283 if ( mode == 0 ) { 293 if ( mode == 0 ) {
284 addTag("h2",deTag(event->summary())); 294 addTag("h2",deTag(event->summary()));
285 formatReadOnly(event); 295 formatReadOnly(event);
286 } 296 }
287 else { 297 else {
288 if ( mColorMode == 1 ) { 298 if ( mColorMode == 1 ) {
289 mText +="<font color=\"#00A000\">"; 299 mText +="<font color=\"#00A000\">";
290 } 300 }
291 if ( mColorMode == 2 ) { 301 if ( mColorMode == 2 ) {
292 mText +="<font color=\"#C00000\">"; 302 mText +="<font color=\"#C00000\">";
293 } 303 }
294 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; 304 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
295 if ( mode == 1 ) { 305 if ( mode == 1 ) {
296 addTag("h2",i18n( "Local: " ) +deTag(event->summary())); 306 addTag("h2",i18n( "Local: " ) +deTag(event->summary()));
297 } else { 307 } else {
298 addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); 308 addTag("h2",i18n( "Remote: " ) +deTag(event->summary()));
299 } 309 }
300 formatReadOnly(event); 310 formatReadOnly(event);
301 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 311 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
302 if ( mColorMode ) 312 if ( mColorMode )
303 mText += "</font>"; 313 mText += "</font>";
304 } 314 }
305 mMailSubject += i18n( "Meeting " )+ event->summary(); 315 mMailSubject += i18n( "Meeting " )+ event->summary();
306 if (event->cancelled ()) { 316 if (event->cancelled ()) {
307 mText +="<font color=\"#B00000\">"; 317 mText +="<font color=\"#B00000\">";
308 addTag("i",i18n("This event has been cancelled!")); 318 addTag("i",i18n("This event has been cancelled!"));
309 mText.append("<br>"); 319 mText.append("<br>");
310 mText += "</font>"; 320 mText += "</font>";
311 mMailSubject += i18n("(cancelled)"); 321 mMailSubject += i18n("(cancelled)");
312 } 322 }
313 323
314 if (event->doesFloat()) { 324 if (event->doesFloat()) {
315 if (event->isMultiDay()) { 325 if (event->isMultiDay()) {
316 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") 326 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>")
317 .arg(event->dtStartDateStr(shortDate)) 327 .arg(event->dtStartDateStr(shortDate))
318 .arg(event->dtEndDateStr(shortDate))); 328 .arg(event->dtEndDateStr(shortDate)));
319 } else { 329 } else {
320 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); 330 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate )));
321 } 331 }
322 } else { 332 } else {
323 if (event->isMultiDay()) { 333 if (event->isMultiDay()) {
324 mText.append(i18n("<p><b>From:</b> %1</p> ") 334 mText.append(i18n("<p><b>From:</b> %1</p> ")
325 .arg(event->dtStartStr( shortDate))); 335 .arg(event->dtStartStr( shortDate)));
326 mText.append(i18n("<p><b>To:</b> %1</p>") 336 mText.append(i18n("<p><b>To:</b> %1</p>")
327 .arg(event->dtEndStr(shortDate))); 337 .arg(event->dtEndStr(shortDate)));
328 } else { 338 } else {
329 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") 339 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>")
330 .arg(event->dtStartTimeStr()) 340 .arg(event->dtStartTimeStr())
331 .arg(event->dtEndTimeStr())); 341 .arg(event->dtEndTimeStr()));
332 mText.append(i18n("<p><b>On:</b> %1</p> ") 342 mText.append(i18n("<p><b>On:</b> %1</p> ")
333 .arg(event->dtStartDateStr( shortDate ))); 343 .arg(event->dtStartDateStr( shortDate )));
334 } 344 }
335 } 345 }
336 if (!event->location().isEmpty()) { 346 if (!event->location().isEmpty()) {
337 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); 347 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) );
338 mMailSubject += i18n(" at ") + event->location(); 348 mMailSubject += i18n(" at ") + event->location();
339 } 349 }
340 if (event->recurrence()->doesRecur()) { 350 if (event->recurrence()->doesRecur()) {
341 351
342 QString recurText = event->recurrence()->recurrenceText(); 352 QString recurText = event->recurrence()->recurrenceText();
343 addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); 353 addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>");
344 bool ok; 354 bool ok;
345 QDate start = QDate::currentDate(); 355 QDate start = QDate::currentDate();
346 QDateTime next; 356 QDateTime next;
347 next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); 357 next = event->getNextOccurence( QDateTime::currentDateTime() , &ok );
348 if ( ok ) { 358 if ( ok ) {
349 if ( wideScreen ){ 359 if ( wideScreen ){
350 addTag("p",i18n("<b>Next recurrence is on:</b>") +" " + KGlobal::locale()->formatDate( next.date(), shortDate ) ); 360 addTag("p",i18n("<b>Next recurrence is on:</b>") +" " + KGlobal::locale()->formatDate( next.date(), shortDate ) );
351 } else { 361 } else {
352 addTag("p",i18n("<b>Next recurrence is on:</b>") ); 362 addTag("p",i18n("<b>Next recurrence is on:</b>") );
353 addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); 363 addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate ));
354 } 364 }
355 mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); 365 mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true );
356 366
357 } else { 367 } else {
358 bool last; 368 bool last;
359 QDate nextd; 369 QDate nextd;
360 nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); 370 nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last );
361 if ( last ) { 371 if ( last ) {
362 if ( wideScreen ){ 372 if ( wideScreen ){
363 addTag("p",i18n("<b>Last recurrence was on:</b>") +" " + KGlobal::locale()->formatDate( nextd, shortDate )); 373 addTag("p",i18n("<b>Last recurrence was on:</b>") +" " + KGlobal::locale()->formatDate( nextd, shortDate ));
364 } else{ 374 } else{
365 addTag("p",i18n("<b>Last recurrence was on:</b>") ); 375 addTag("p",i18n("<b>Last recurrence was on:</b>") );
366 addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); 376 addTag("p", KGlobal::locale()->formatDate( nextd, shortDate ));
367 } 377 }
368 } 378 }
369 } 379 }
370 } else { 380 } else {
371 mMailSubject += i18n(" - " )+event->dtStartStr( true ); 381 mMailSubject += i18n(" - " )+event->dtStartStr( true );
372 382
373 } 383 }
374 384
375 385
376 if (event->isAlarmEnabled()) { 386 if (event->isAlarmEnabled()) {
377 Alarm *alarm =event->alarms().first() ; 387 Alarm *alarm =event->alarms().first() ;
378 QDateTime t = alarm->time(); 388 QDateTime t = alarm->time();
379 QString s =i18n("( %1 before )").arg( alarm->offsetText() ); 389 QString s =i18n("( %1 before )").arg( alarm->offsetText() );
380 if(wideScreen ){ 390 if(wideScreen ){
381 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); 391 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate ));
382 }else{ 392 }else{
383 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 393 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
384 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 394 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
385 } 395 }
386 //addTag("p",s); 396 //addTag("p",s);
387 } 397 }
388 398
389 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); 399 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
390 400
391 formatCategories(event); 401 formatCategories(event);
392 402
393 formatAttendees(event); 403 formatAttendees(event);
394 404
395 if ( KOPrefs::instance()->mEVshowCreated ) { 405 if ( KOPrefs::instance()->mEVshowCreated ) {
396 if(wideScreen ){ 406 if(wideScreen ){
397 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); 407 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
398 }else{ 408 }else{
399 addTag("p",i18n("<b>Created: ") +" </b>"); 409 addTag("p",i18n("<b>Created: ") +" </b>");
400 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); 410 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
401 } 411 }
402 412
403 413
404 } 414 }
405 if ( KOPrefs::instance()->mEVshowChanged ) { 415 if ( KOPrefs::instance()->mEVshowChanged ) {
406 if(wideScreen ){ 416 if(wideScreen ){
407 addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); 417 addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
408 }else{ 418 }else{
409 addTag("p",i18n("<b>Last modified: ") +" </b>"); 419 addTag("p",i18n("<b>Last modified: ") +" </b>");
410 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); 420 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
411 } 421 }
412 422
413 } 423 }
414 if ( KOPrefs::instance()->mEVshowDetails ) { 424 if ( KOPrefs::instance()->mEVshowDetails ) {
415 if (!event->description().isEmpty()) { 425 if (!event->description().isEmpty()) {
416 addTag("p",i18n("<b>Details: </b>")); 426 addTag("p",i18n("<b>Details: </b>"));
417 addTag("p",deTag(event->description())); 427 addTag("p",deTag(event->description()));
418 } 428 }
419 } 429 }
420 setText(mText); 430 setText(mText);
421 //QWhatsThis::add(this,mText); 431 //QWhatsThis::add(this,mText);
422 432
423} 433}
424 434
425void KOEventViewer::appendTodo(Todo *event, int mode ) 435void KOEventViewer::appendTodo(Todo *event, int mode )
426{ 436{
427 mMailSubject = ""; 437 mMailSubject = "";
428 mCurrentIncidence = event; 438 mCurrentIncidence = event;
429 topLevelWidget()->setCaption(i18n("Todo Viewer")); 439 topLevelWidget()->setCaption(i18n("Todo Viewer"));
430 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 440 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
431 bool wideScreen = ( QApplication::desktop()->width() >= 640 ); 441 bool wideScreen = ( QApplication::desktop()->width() >= 640 );
432 if (mode == 0 ) { 442 if (mode == 0 ) {
433 addTag("h2",deTag(event->summary())); 443 addTag("h2",deTag(event->summary()));
434 formatReadOnly(event); 444 formatReadOnly(event);
435 } 445 }
436 else { 446 else {
437 if ( mColorMode == 1 ) { 447 if ( mColorMode == 1 ) {
438 mText +="<font color=\"#00A000\">"; 448 mText +="<font color=\"#00A000\">";
439 } 449 }
440 if ( mColorMode == 2 ) { 450 if ( mColorMode == 2 ) {
441 mText +="<font color=\"#B00000\">"; 451 mText +="<font color=\"#B00000\">";
442 } 452 }
443 if ( mode == 1 ) { 453 if ( mode == 1 ) {
444 addTag("h2",i18n( "Local: " ) +deTag(event->summary())); 454 addTag("h2",i18n( "Local: " ) +deTag(event->summary()));
445 } else { 455 } else {
446 addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); 456 addTag("h2",i18n( "Remote: " ) +deTag(event->summary()));
447 } 457 }
448 formatReadOnly(event); 458 formatReadOnly(event);
449 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 459 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
450 if ( mColorMode ) 460 if ( mColorMode )
451 mText += "</font>"; 461 mText += "</font>";
452 } 462 }
453 mMailSubject += i18n( "Todo " )+ event->summary(); 463 mMailSubject += i18n( "Todo " )+ event->summary();
454 464
455 if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { 465 if ( event->percentComplete() == 100 && event->hasCompletedDate() ) {
456 mText +="<font color=\"#B00000\">"; 466 mText +="<font color=\"#B00000\">";
457 addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); 467 addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) );
458 mText += "</font>"; 468 mText += "</font>";
459 } else { 469 } else {
460 mText.append(i18n("<p><i>%1 % completed</i></p>") 470 mText.append(i18n("<p><i>%1 % completed</i></p>")
461 .arg(event->percentComplete())); 471 .arg(event->percentComplete()));
462 } 472 }
463 473
464 if (event->cancelled ()) { 474 if (event->cancelled ()) {
465 mText +="<font color=\"#B00000\">"; 475 mText +="<font color=\"#B00000\">";
466 addTag("i",i18n("This todo has been cancelled!")); 476 addTag("i",i18n("This todo has been cancelled!"));
467 mText.append("<br>"); 477 mText.append("<br>");
468 mText += "</font>"; 478 mText += "</font>";
469 mMailSubject += i18n("(cancelled)"); 479 mMailSubject += i18n("(cancelled)");
470 } 480 }
471 481
472 482
473 483
474 if (event->recurrence()->doesRecur()) { 484 if (event->recurrence()->doesRecur()) {
475 485
476 QString recurText = event->recurrence()->recurrenceText(); 486 QString recurText = event->recurrence()->recurrenceText();
477 addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); 487 addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>");
478 488
479 } 489 }
480 if (event->hasStartDate()) { 490 if (event->hasStartDate()) {
481 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); 491 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer)));
482 } 492 }
483 if (event->hasDueDate()) { 493 if (event->hasDueDate()) {
484 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); 494 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer)));
485 mMailSubject += i18n(" - " )+event->dtDueStr( true ); 495 mMailSubject += i18n(" - " )+event->dtDueStr( true );
486 } 496 }
487 if (!event->location().isEmpty()) { 497 if (!event->location().isEmpty()) {
488 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); 498 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) );
489 mMailSubject += i18n(" at ") + event->location(); 499 mMailSubject += i18n(" at ") + event->location();
490 } 500 }
491 mText.append(i18n("<p><b>Priority:</b> %2</p>") 501 mText.append(i18n("<p><b>Priority:</b> %2</p>")
492 .arg(QString::number(event->priority()))); 502 .arg(QString::number(event->priority())));
493 503
494 if (event->isAlarmEnabled()) { 504 if (event->isAlarmEnabled()) {
495 Alarm *alarm =event->alarms().first() ; 505 Alarm *alarm =event->alarms().first() ;
496 QDateTime t = alarm->time(); 506 QDateTime t = alarm->time();
497 QString s =i18n("( %1 before )").arg( alarm->offsetText() ); 507 QString s =i18n("( %1 before )").arg( alarm->offsetText() );
498 if ( wideScreen ) { 508 if ( wideScreen ) {
499 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); 509 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate ));
500 } else { 510 } else {
501 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 511 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
502 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 512 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
503 } 513 }
504 } 514 }
505 515
506 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); 516 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
507 517
508 formatCategories(event); 518 formatCategories(event);
509 519
510 formatAttendees(event); 520 formatAttendees(event);
511 521
512 if ( KOPrefs::instance()->mEVshowCreated ) { 522 if ( KOPrefs::instance()->mEVshowCreated ) {
513 if(wideScreen ){ 523 if(wideScreen ){
514 524
515 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); 525 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
516 526
517 } else { 527 } else {
518 addTag("p",i18n("<b>Created: ") +" </b>"); 528 addTag("p",i18n("<b>Created: ") +" </b>");
519 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); 529 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
520 } 530 }
521 } 531 }
522 if ( KOPrefs::instance()->mEVshowChanged ) { 532 if ( KOPrefs::instance()->mEVshowChanged ) {
523 if(wideScreen ){ 533 if(wideScreen ){
524 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); 534 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
525 535
526 } else { 536 } else {
527 addTag("p",i18n("<b>Last modified: ") +" </b>"); 537 addTag("p",i18n("<b>Last modified: ") +" </b>");
528 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); 538 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
529 } 539 }
530 } 540 }
531 if ( event->relatedTo() ) { 541 if ( event->relatedTo() ) {
532 addTag("b",i18n("Parent todo:<br>")); 542 addTag("b",i18n("Parent todo:<br>"));
533 mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); 543
544 QString t_name = "[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] ";// +event->relatedTo()->summary());
545
546 mText += t_name;
547 mText += "<a href=\"todo_uid:" + event->relatedTo()->uid() + "\">";
548 mText += deTag(event->relatedTo()->summary());
549 mText += "</a><br>";
550
551 // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>");
534 } 552 }
535 QPtrList<Incidence> Relations = event->relations(); 553 QPtrList<Incidence> Relations = event->relations();
536 Incidence *to; 554 Incidence *to;
537 if ( Relations.first() ) 555 if ( Relations.first() )
538 addTag("b",i18n("Sub todos:<br>")); 556 addTag("b",i18n("Sub todos:<br>"));
539 for (to=Relations.first();to;to=Relations.next()) { 557 for (to=Relations.first();to;to=Relations.next()) {
540 mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); 558 QString t_name = "[" +QString::number(((Todo*)to)->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%] ";// +to->relatedTo()->summary());
559 mText += t_name;
560 mText += "<a href=\"todo_uid:" + to->uid() + "\">";
561 mText += deTag(to->summary());
562 mText += "</a><br>";
541 563
542 } 564 }
543 565
544 if ( KOPrefs::instance()->mEVshowDetails ) { 566 if ( KOPrefs::instance()->mEVshowDetails ) {
545 if (!event->description().isEmpty()) { 567 if (!event->description().isEmpty()) {
546 addTag("p",i18n("<b>Details: </b>")); 568 addTag("p",i18n("<b>Details: </b>"));
547 addTag("p",deTag(event->description())); 569 addTag("p",deTag(event->description()));
548 } 570 }
549 } 571 }
550 setText(mText); 572 setText(mText);
551} 573}
552 574
553void KOEventViewer::formatCategories(Incidence *event) 575void KOEventViewer::formatCategories(Incidence *event)
554{ 576{
555 if (!event->categoriesStr().isEmpty()) { 577 if (!event->categoriesStr().isEmpty()) {
556 if (event->categories().count() == 1) { 578 if (event->categories().count() == 1) {
557 addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace()); 579 addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace());
558 } else { 580 } else {
559 addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ; 581 addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ;
560 } 582 }
561 } 583 }
562} 584}
563void KOEventViewer::formatAttendees(Incidence *event) 585void KOEventViewer::formatAttendees(Incidence *event)
564{ 586{
565 QPtrList<Attendee> attendees = event->attendees(); 587 QPtrList<Attendee> attendees = event->attendees();
566 if (attendees.count()) { 588 if (attendees.count()) {
567 589
568 590
569 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); 591 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
570 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); 592 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
571 addTag("h3",i18n("Organizer")); 593 addTag("h3",i18n("Organizer"));
572 mText.append("<ul><li>"); 594 mText.append("<ul><li>");
573#ifndef KORG_NOKABC 595#ifndef KORG_NOKABC
574 596
575#ifdef DESKTOP_VERSION 597#ifdef DESKTOP_VERSION
576 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 598 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
577 KABC::Addressee::List addressList; 599 KABC::Addressee::List addressList;
578 addressList = add_book->findByEmail(event->organizer()); 600 addressList = add_book->findByEmail(event->organizer());
579 KABC::Addressee o = addressList.first(); 601 KABC::Addressee o = addressList.first();
580 if (!o.isEmpty() && addressList.size()<2) { 602 if (!o.isEmpty() && addressList.size()<2) {
581 mText += "<a href=\"uid:" + o.uid() + "\">"; 603 mText += "<a href=\"uid:" + o.uid() + "\">";
582 mText += o.formattedName(); 604 mText += o.formattedName();
583 mText += "</a>\n"; 605 mText += "</a>\n";
584 } else { 606 } else {
585 mText.append(event->organizer()); 607 mText.append(event->organizer());
586 } 608 }
587#else //DESKTOP_VERSION 609#else //DESKTOP_VERSION
588 mText += "<a href=\"uid:organizer\">"; 610 mText += "<a href=\"uid:organizer\">";
589 mText += event->organizer(); 611 mText += event->organizer();
590 mText += "</a>\n"; 612 mText += "</a>\n";
591#endif //DESKTOP_VERSION 613#endif //DESKTOP_VERSION
592 614
593 615
594#else 616#else
595 mText.append(event->organizer()); 617 mText.append(event->organizer());
596#endif 618#endif
597 619
598 if (iconPath) { 620 if (iconPath) {
599 mText += " <a href=\"mailto:" + event->organizer() + "\">"; 621 mText += " <a href=\"mailto:" + event->organizer() + "\">";
600 mText += "<IMG src=\"" + iconPath + "\">"; 622 mText += "<IMG src=\"" + iconPath + "\">";
601 mText += "</a>\n"; 623 mText += "</a>\n";
602 } 624 }
603 mText.append("</li></ul>"); 625 mText.append("</li></ul>");
604 626
605 addTag("h3",i18n("Attendees")); 627 addTag("h3",i18n("Attendees"));
606 Attendee *a; 628 Attendee *a;
607 mText.append("<ul>"); 629 mText.append("<ul>");
608 int a_count = 0; 630 int a_count = 0;
609 int a_count_nr = 0; 631 int a_count_nr = 0;
610 632
611 for(a=attendees.first();a;a=attendees.next()) { 633 for(a=attendees.first();a;a=attendees.next()) {
612#ifndef KORG_NOKABC 634#ifndef KORG_NOKABC
613#ifdef DESKTOP_VERSION 635#ifdef DESKTOP_VERSION
614 if (a->name().isEmpty()) { 636 if (a->name().isEmpty()) {
615 addressList = add_book->findByEmail(a->email()); 637 addressList = add_book->findByEmail(a->email());
616 KABC::Addressee o = addressList.first(); 638 KABC::Addressee o = addressList.first();
617 if (!o.isEmpty() && addressList.size()<2) { 639 if (!o.isEmpty() && addressList.size()<2) {
618 mText += "<a href=\"uid:" + o.uid() + "\">"; 640 mText += "<a href=\"uid:" + o.uid() + "\">";
619 mText += o.formattedName(); 641 mText += o.formattedName();
620 mText += "</a>\n"; 642 mText += "</a>\n";
621 } else { 643 } else {
622 mText += "<li>"; 644 mText += "<li>";
623 mText.append(a->email()); 645 mText.append(a->email());
624 mText += "\n"; 646 mText += "\n";
625 } 647 }
626 } else { 648 } else {
627 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 649 mText += "<li><a href=\"uid:" + a->uid() + "\">";
628 if (!a->name().isEmpty()) mText += a->name(); 650 if (!a->name().isEmpty()) mText += a->name();
629 else mText += a->email(); 651 else mText += a->email();
630 mText += "</a>\n"; 652 mText += "</a>\n";
631 } 653 }
632#else //DESKTOP_VERSION 654#else //DESKTOP_VERSION
633 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 655 mText += "<li><a href=\"uid:" + a->uid() + "\">";
634 if (!a->name().isEmpty()) mText += a->name(); 656 if (!a->name().isEmpty()) mText += a->name();
635 else mText += a->email(); 657 else mText += a->email();
636 mText += "</a>\n"; 658 mText += "</a>\n";
637#endif //DESKTOP_VERSION 659#endif //DESKTOP_VERSION
638#else 660#else
639 //qDebug("nokabc "); 661 //qDebug("nokabc ");
640 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 662 mText += "<li><a href=\"uid:" + a->uid() + "\">";
641 if (!a->name().isEmpty()) mText += a->name(); 663 if (!a->name().isEmpty()) mText += a->name();
642 else mText += a->email(); 664 else mText += a->email();
643 mText += "</a>\n"; 665 mText += "</a>\n";
644#endif 666#endif
645 667
646 668
647 if (!a->email().isEmpty()) { 669 if (!a->email().isEmpty()) {
648 if (iconPath) { 670 if (iconPath) {
649 mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; 671 mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">";
650 if ( a->RSVP() ) { 672 if ( a->RSVP() ) {
651 ++a_count_nr; 673 ++a_count_nr;
652 mText += "<IMG src=\"" + iconPath + "\">"; 674 mText += "<IMG src=\"" + iconPath + "\">";
653 } 675 }
654 else { 676 else {
655 ++a_count; 677 ++a_count;
656 mText += "<IMG src=\"" + NOiconPath + "\">"; 678 mText += "<IMG src=\"" + NOiconPath + "\">";
657 } 679 }
658 mText += "</a>\n"; 680 mText += "</a>\n";
659 } 681 }
660 } 682 }
661 if (a->status() != Attendee::NeedsAction ) 683 if (a->status() != Attendee::NeedsAction )
662 mText +="[" + a->statusStr() + "] "; 684 mText +="[" + a->statusStr() + "] ";
663 if (a->role() == Attendee::Chair ) 685 if (a->role() == Attendee::Chair )
664 mText +="(" + a->roleStr().left(1) + ".)"; 686 mText +="(" + a->roleStr().left(1) + ".)";
665 } 687 }
666 mText.append("</li></ul>"); 688 mText.append("</li></ul>");
667 if ( (a_count+a_count_nr) > 1 ) { 689 if ( (a_count+a_count_nr) > 1 ) {
668 mText += "<a href=\"mailto:ALL\">"; 690 mText += "<a href=\"mailto:ALL\">";
669 mText += i18n( "Mail to all" ); 691 mText += i18n( "Mail to all" );
670 mText += "</a> ( "; 692 mText += "</a> ( ";
671 mText += "<IMG src=\"" + iconPath + "\">"; 693 mText += "<IMG src=\"" + iconPath + "\">";
672 mText += i18n( " and " ); 694 mText += i18n( " and " );
673 mText += "<IMG src=\"" + NOiconPath + "\"> )"; 695 mText += "<IMG src=\"" + NOiconPath + "\"> )";
674 mText += "<br>\n"; 696 mText += "<br>\n";
675 697
676 698
677 } 699 }
678 if ( a_count_nr > 1 ) { 700 if ( a_count_nr > 1 ) {
679 mText += "<a href=\"mailto:RSVP\">"; 701 mText += "<a href=\"mailto:RSVP\">";
680 mText += i18n( "Mail to selected" ); 702 mText += i18n( "Mail to selected" );
681 mText += "</a> ( "; 703 mText += "</a> ( ";
682 mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath ); 704 mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath );
683 mText += "<br>\n"; 705 mText += "<br>\n";
684 } 706 }
685 } 707 }
686 708
687} 709}
688void KOEventViewer::appendJournal(Journal *jour, int mode ) 710void KOEventViewer::appendJournal(Journal *jour, int mode )
689{ 711{
690 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 712 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
691 QString text_d = i18n("Journal from: "); 713 QString text_d = i18n("Journal from: ");
692 if ( !jour->summary().isEmpty() ) 714 if ( !jour->summary().isEmpty() )
693 text_d = jour->summary(); 715 text_d = jour->summary();
694 if (mode == 0 ) { 716 if (mode == 0 ) {
695 addTag("h2", text_d ); 717 addTag("h2", text_d );
696 } 718 }
697 else { 719 else {
698 if ( mode == 1 ) { 720 if ( mode == 1 ) {
699 addTag("h3",i18n( "Local: " ) + text_d ); 721 addTag("h3",i18n( "Local: " ) + text_d );
700 } else { 722 } else {
701 addTag("h3",i18n( "Remote: " ) + text_d ); 723 addTag("h3",i18n( "Remote: " ) + text_d );
702 } 724 }
703 } 725 }
704 topLevelWidget()->setCaption(i18n("Journal viewer")); 726 topLevelWidget()->setCaption(i18n("Journal viewer"));
705 mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); 727 mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer)));
706 formatReadOnly(jour); 728 formatReadOnly(jour);
707 addTag("p","<b>"+i18n( "Last modified: " ) + "</b>"+KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); 729 addTag("p","<b>"+i18n( "Last modified: " ) + "</b>"+KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) );
708 730
709 if (!jour->description().isEmpty()) { 731 if (!jour->description().isEmpty()) {
710 addTag("p",deTag(jour->description())); 732 addTag("p",deTag(jour->description()));
711 } 733 }
712 setText(mText); 734 setText(mText);
713} 735}
714 736
715void KOEventViewer::formatReadOnly(Incidence *event) 737void KOEventViewer::formatReadOnly(Incidence *event)
716{ 738{
717 int id = event->calID(); 739 int id = event->calID();
718 if ( id > 1 ) { 740 if ( id > 1 ) {
719 addTag("p", "<em>("+i18n("Calendar:")+" " + KOPrefs::instance()->getCalendar( id )->mName + ")</em>"); 741 addTag("p", "<em>("+i18n("Calendar:")+" " + KOPrefs::instance()->getCalendar( id )->mName + ")</em>");
720 } 742 }
721 if (event->isReadOnly()) { 743 if (event->isReadOnly()) {
722 addTag("p","<em>(" + i18n("read-only") + ")</em>"); 744 addTag("p","<em>(" + i18n("read-only") + ")</em>");
723 } 745 }
724} 746}
725void KOEventViewer::setSyncMode( bool b ) 747void KOEventViewer::setSyncMode( bool b )
726{ 748{
727 mSyncMode = b; 749 mSyncMode = b;
728} 750}
729 751
730void KOEventViewer::setTodo(Todo *event, bool clearV ) 752void KOEventViewer::setTodo(Todo *event, bool clearV )
731{ 753{
732 if ( clearV ) 754 if ( clearV )
733 clearEvents(); 755 clearEvents();
734 if ( mSyncMode ) { 756 if ( mSyncMode ) {
735 if ( clearV ) 757 if ( clearV )
736 appendTodo(event,1 ); 758 appendTodo(event,1 );
737 else 759 else
738 appendTodo(event,2); 760 appendTodo(event,2);
739 } else 761 } else
740 appendTodo(event); 762 appendTodo(event);
741} 763}
742void KOEventViewer::setJournal(Journal *event, bool clearV ) 764void KOEventViewer::setJournal(Journal *event, bool clearV )
743{ 765{
744 if ( clearV ) 766 if ( clearV )
745 clearEvents(); 767 clearEvents();
746 if ( mSyncMode ) { 768 if ( mSyncMode ) {
747 if ( clearV ) 769 if ( clearV )
748 appendJournal(event, 1); 770 appendJournal(event, 1);
749 else 771 else
750 appendJournal(event, 2); 772 appendJournal(event, 2);
751 } else 773 } else
752 appendJournal(event); 774 appendJournal(event);
753} 775}
754 776
755void KOEventViewer::setEvent(Event *event) 777void KOEventViewer::setEvent(Event *event)
756{ 778{
757 clearEvents(); 779 clearEvents();
758 if ( mSyncMode ) 780 if ( mSyncMode )
759 appendEvent(event, 1); 781 appendEvent(event, 1);
760 else 782 else
761 appendEvent(event); 783 appendEvent(event);
762} 784}
763 785
764void KOEventViewer::addEvent(Event *event) 786void KOEventViewer::addEvent(Event *event)
765{ 787{
766 if ( mSyncMode ) 788 if ( mSyncMode )
767 appendEvent(event, 2); 789 appendEvent(event, 2);
768 else 790 else
769 appendEvent(event); 791 appendEvent(event);
770} 792}
771 793
772void KOEventViewer::clearEvents(bool now) 794void KOEventViewer::clearEvents(bool now)
773{ 795{
774 mText = ""; 796 mText = "";
775 if (now) setText(mText); 797 if (now) setText(mText);
776} 798}
777 799
778void KOEventViewer::addText(QString text) 800void KOEventViewer::addText(QString text)
779{ 801{
780 mText.append(text); 802 mText.append(text);
781 setText(mText); 803 setText(mText);
782} 804}
783QString KOEventViewer::deTag(QString text) 805QString KOEventViewer::deTag(QString text)
784{ 806{
785#if QT_VERSION >= 0x030000 807#if QT_VERSION >= 0x030000
786 text.replace( '<' , "&lt;" ); 808 text.replace( '<' , "&lt;" );
787 text.replace( '>' , "&gt;" ); 809 text.replace( '>' , "&gt;" );
788#else 810#else
789 if ( text.find ('<') >= 0 ) { 811 if ( text.find ('<') >= 0 ) {
790 text.replace( QRegExp("<") , "&lt;" ); 812 text.replace( QRegExp("<") , "&lt;" );
791 } 813 }
792 if ( text.find ('>') >= 0 ) { 814 if ( text.find ('>') >= 0 ) {
793 text.replace( QRegExp(">") , "&gt;" ); 815 text.replace( QRegExp(">") , "&gt;" );
794 } 816 }
795#endif 817#endif
796 return text; 818 return text;
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 1eeb8d1..64eb4ff 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -1,131 +1,132 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19#ifndef KOEVENTVIEWER_H 19#ifndef KOEVENTVIEWER_H
20#define KOEVENTVIEWER_H 20#define KOEVENTVIEWER_H
21// 21//
22// Viewer widget for events. 22// Viewer widget for events.
23// 23//
24 24
25#include <qtextbrowser.h> 25#include <qtextbrowser.h>
26 26
27#include <libkcal/event.h> 27#include <libkcal/event.h>
28#include <libkcal/journal.h> 28#include <libkcal/journal.h>
29 29
30 30
31using namespace KCal; 31using namespace KCal;
32 32
33#ifdef DESKTOP_VERSION 33#ifdef DESKTOP_VERSION
34 34
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qpushbutton.h> 36#include <qpushbutton.h>
37#include <qlayout.h> 37#include <qlayout.h>
38#include <qdialog.h> 38#include <qdialog.h>
39#include <qlabel.h> 39#include <qlabel.h>
40#include <qbuttongroup.h> 40#include <qbuttongroup.h>
41#include <kglobal.h> 41#include <kglobal.h>
42 42
43class KOPrintPrefs : public QDialog 43class KOPrintPrefs : public QDialog
44{ 44{
45 public: 45 public:
46 KOPrintPrefs( QWidget *parent=0, const char *name=0 ) : 46 KOPrintPrefs( QWidget *parent=0, const char *name=0 ) :
47 QDialog( parent, name, true ) 47 QDialog( parent, name, true )
48 { 48 {
49 setCaption( i18n("KO/Pi Printout") ); 49 setCaption( i18n("KO/Pi Printout") );
50 QVBoxLayout* lay = new QVBoxLayout( this ); 50 QVBoxLayout* lay = new QVBoxLayout( this );
51 lay->setSpacing( 9 ); 51 lay->setSpacing( 9 );
52 lay->setMargin( 9 ); 52 lay->setMargin( 9 );
53 QLabel * lab = new QLabel( i18n("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"), this ); 53 QLabel * lab = new QLabel( i18n("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"), this );
54 lay->addWidget( lab ); 54 lay->addWidget( lab );
55 lab->setAlignment( AlignCenter ); 55 lab->setAlignment( AlignCenter );
56 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this ); 56 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this );
57 lay->addWidget( format ); 57 lay->addWidget( format );
58 format->setExclusive ( true ) ; 58 format->setExclusive ( true ) ;
59 pmNo = new QRadioButton(i18n("Print unscaled"), format ); 59 pmNo = new QRadioButton(i18n("Print unscaled"), format );
60 pmScaledDown = new QRadioButton(i18n("Print scaled down to fit one page"), format ); 60 pmScaledDown = new QRadioButton(i18n("Print scaled down to fit one page"), format );
61 new QRadioButton(i18n("Print scaled up/down to fit one page"), format ); 61 new QRadioButton(i18n("Print scaled up/down to fit one page"), format );
62 pmScaledDown->setChecked( true ); 62 pmScaledDown->setChecked( true );
63 QPushButton * ok = new QPushButton( i18n("OK"), this ); 63 QPushButton * ok = new QPushButton( i18n("OK"), this );
64 lay->addWidget( ok ); 64 lay->addWidget( ok );
65 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 65 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
66 lay->addWidget( cancel ); 66 lay->addWidget( cancel );
67 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 67 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
68 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 68 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
69 } 69 }
70 70
71 int printMode() 71 int printMode()
72 { 72 {
73 if ( pmNo->isChecked() ) 73 if ( pmNo->isChecked() )
74 return 0; 74 return 0;
75 if ( pmScaledDown->isChecked() ) 75 if ( pmScaledDown->isChecked() )
76 return 1; 76 return 1;
77 return 2; 77 return 2;
78 } 78 }
79private: 79private:
80 QRadioButton* pmNo; 80 QRadioButton* pmNo;
81 QRadioButton* pmScaledDown; 81 QRadioButton* pmScaledDown;
82}; 82};
83 83
84#endif 84#endif
85 85
86class KOEventViewer : public QTextBrowser { 86class KOEventViewer : public QTextBrowser {
87 Q_OBJECT 87 Q_OBJECT
88 public: 88 public:
89 KOEventViewer(QWidget *parent=0,const char *name=0); 89 KOEventViewer(QWidget *parent=0,const char *name=0);
90 virtual ~KOEventViewer(); 90 virtual ~KOEventViewer();
91 91
92 void setSource(const QString &); 92 void setSource(const QString &);
93 void setEvent(Event *event); 93 void setEvent(Event *event);
94 void addEvent(Event *event); 94 void addEvent(Event *event);
95 void setTodo(Todo *event, bool clearV = true ); 95 void setTodo(Todo *event, bool clearV = true );
96 void setJournal(Journal *jour, bool clearV = true ); 96 void setJournal(Journal *jour, bool clearV = true );
97 97
98 void appendEvent(Event *event, int mode = 0 ); 98 void appendEvent(Event *event, int mode = 0 );
99 void appendTodo(Todo *event, int mode = 0 ); 99 void appendTodo(Todo *event, int mode = 0 );
100 void appendJournal(Journal *jour, int mode = 0 ); 100 void appendJournal(Journal *jour, int mode = 0 );
101 101
102 void clearEvents(bool now=false); 102 void clearEvents(bool now=false);
103 103
104 void addText(QString text); 104 void addText(QString text);
105 void setSyncMode( bool ); 105 void setSyncMode( bool );
106 void setColorMode( int ); 106 void setColorMode( int );
107 void mailToAttendees( bool all ); 107 void mailToAttendees( bool all );
108 void printMe(); 108 void printMe();
109 109
110 protected: 110 protected:
111 int mColorMode; 111 int mColorMode;
112 void addTag(const QString & tag,const QString & text); 112 void addTag(const QString & tag,const QString & text);
113 113
114 void formatCategories(Incidence *event); 114 void formatCategories(Incidence *event);
115 void formatAttendees(Incidence *event); 115 void formatAttendees(Incidence *event);
116 void formatReadOnly(Incidence *event); 116 void formatReadOnly(Incidence *event);
117 void keyPressEvent ( QKeyEvent * e ); 117 void keyPressEvent ( QKeyEvent * e );
118 118
119 private: 119 private:
120 QTextBrowser *mEventTextView; 120 QTextBrowser *mEventTextView;
121 bool mSyncMode; 121 bool mSyncMode;
122 QString deTag(QString text); 122 QString deTag(QString text);
123 123
124 QString mText; 124 QString mText;
125 QString mMailSubject; 125 QString mMailSubject;
126 Incidence* mCurrentIncidence; 126 Incidence* mCurrentIncidence;
127 signals: 127 signals:
128 void launchaddressbook(QString uid); 128 void launchaddressbook(QString uid);
129 void showIncidence(QString uid);
129}; 130};
130 131
131#endif 132#endif
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 02f13c7..0763825 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -1,307 +1,308 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <klocale.h> 20#include <klocale.h>
21 21
22#include <libkcal/event.h> 22#include <libkcal/event.h>
23#include <qtimer.h> 23#include <qtimer.h>
24#include <qpushbutton.h> 24#include <qpushbutton.h>
25 25
26#include "koeventviewer.h" 26#include "koeventviewer.h"
27#include <kmessagebox.h> 27#include <kmessagebox.h>
28#include "koprefs.h" 28#include "koprefs.h"
29#include <libkcal/todo.h> 29#include <libkcal/todo.h>
30#include "qapp.h" 30#include "qapp.h"
31 31
32#include "koeventviewerdialog.h" 32#include "koeventviewerdialog.h"
33extern int globalFlagBlockAgenda; 33extern int globalFlagBlockAgenda;
34 34
35KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) 35KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
36 : KDialogBase(parent,name, 36 : KDialogBase(parent,name,
37#ifndef DESKTOP_VERSION 37#ifndef DESKTOP_VERSION
38 true , 38 true ,
39#else 39#else
40 false, 40 false,
41#endif 41#endif
42 i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) 42 i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda"))
43{ 43{
44 sendSignalViewerClosed = true; 44 sendSignalViewerClosed = true;
45 mEventViewer = new KOEventViewer(this); 45 mEventViewer = new KOEventViewer(this);
46 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); 46 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont );
47 setMainWidget(mEventViewer); 47 setMainWidget(mEventViewer);
48 setButtonText(Ok, i18n("Edit") ); 48 setButtonText(Ok, i18n("Edit") );
49 49
50 QObject::connect(findButton( Ok ),SIGNAL(clicked()), 50 QObject::connect(findButton( Ok ),SIGNAL(clicked()),
51 SLOT(editIncidence())); 51 SLOT(editIncidence()));
52 QObject::connect(this,SIGNAL(user1Clicked()), 52 QObject::connect(this,SIGNAL(user1Clicked()),
53 SLOT(showIncidence())); 53 SLOT(showIncidence()));
54 connect( mEventViewer, SIGNAL( showIncidence( QString ) ),SIGNAL( showIncidence( QString ) ));
54 mIncidence = 0; 55 mIncidence = 0;
55 // TODO: Set a sensible size (based on the content?). 56 // TODO: Set a sensible size (based on the content?).
56 //showMaximized(); 57 //showMaximized();
57 //qDebug("++++++++++++KOEventViewerDialog() "); 58 //qDebug("++++++++++++KOEventViewerDialog() ");
58 // if ( KOPrefs::instance()->mCompactDialogs ) { 59 // if ( KOPrefs::instance()->mCompactDialogs ) {
59// setFixedSize( 240,284 ); 60// setFixedSize( 240,284 );
60// move( 0, 15 ); 61// move( 0, 15 );
61// } else { 62// } else {
62// setMinimumSize(300,200); 63// setMinimumSize(300,200);
63// resize(320,300); 64// resize(320,300);
64// } 65// }
65 mSyncMode = false; 66 mSyncMode = false;
66 mSyncResult = 0; 67 mSyncResult = 0;
67 68
68} 69}
69 70
70KOEventViewerDialog::~KOEventViewerDialog() 71KOEventViewerDialog::~KOEventViewerDialog()
71{ 72{
72 //qDebug("-------~KOEventViewerDialog() "); 73 //qDebug("-------~KOEventViewerDialog() ");
73} 74}
74void KOEventViewerDialog::showMe() 75void KOEventViewerDialog::showMe()
75{ 76{
76 77
77#ifdef DESKTOP_VERSION 78#ifdef DESKTOP_VERSION
78 int x,y,w,h; 79 int x,y,w,h;
79 x = geometry().x(); 80 x = geometry().x();
80 y = geometry().y(); 81 y = geometry().y();
81 w = width(); 82 w = width();
82 h = height(); 83 h = height();
83 show(); 84 show();
84 setGeometry(x,y,w,h); 85 setGeometry(x,y,w,h);
85 raise(); 86 raise();
86#else 87#else
87 showMaximized(); 88 showMaximized();
88#endif 89#endif
89 QTimer::singleShot( 1, this, SLOT ( setMyFocus() ) ); 90 QTimer::singleShot( 1, this, SLOT ( setMyFocus() ) );
90 91
91} 92}
92void KOEventViewerDialog::setMyFocus() 93void KOEventViewerDialog::setMyFocus()
93{ 94{
94 95
95 setActiveWindow(); 96 setActiveWindow();
96 mEventViewer->setFocus(); 97 mEventViewer->setFocus();
97 98
98} 99}
99void KOEventViewerDialog::print() 100void KOEventViewerDialog::print()
100{ 101{
101 mEventViewer->printMe(); 102 mEventViewer->printMe();
102 103
103} 104}
104void KOEventViewerDialog::setSyncMode( bool b ) 105void KOEventViewerDialog::setSyncMode( bool b )
105{ 106{
106 mSyncMode = b; 107 mSyncMode = b;
107 //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); 108 //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode );
108 if ( mSyncMode ) { 109 if ( mSyncMode ) {
109 findButton( Close )->setText( i18n("Cancel Sync")); 110 findButton( Close )->setText( i18n("Cancel Sync"));
110 findButton( Ok )->setText( i18n("Remote")); 111 findButton( Ok )->setText( i18n("Remote"));
111 findButton( User1 )->setText( i18n("Local")); 112 findButton( User1 )->setText( i18n("Local"));
112 } else { 113 } else {
113 findButton( Close )->setText( i18n("Close")); 114 findButton( Close )->setText( i18n("Close"));
114 findButton( Ok )->setText( i18n("Edit")); 115 findButton( Ok )->setText( i18n("Edit"));
115 findButton( User1 )->setText( i18n("Agenda")); 116 findButton( User1 )->setText( i18n("Agenda"));
116 } 117 }
117 mEventViewer->setSyncMode( b ); 118 mEventViewer->setSyncMode( b );
118} 119}
119void KOEventViewerDialog::setColorMode( int m ) 120void KOEventViewerDialog::setColorMode( int m )
120{ 121{
121 mEventViewer->setColorMode( m ); 122 mEventViewer->setColorMode( m );
122} 123}
123int KOEventViewerDialog::executeS( bool local ) 124int KOEventViewerDialog::executeS( bool local )
124{ 125{
125 mSyncResult = 3; 126 mSyncResult = 3;
126 if ( local ) 127 if ( local )
127 findButton( User1 )->setFocus(); 128 findButton( User1 )->setFocus();
128 else 129 else
129 findButton( Ok )->setFocus(); 130 findButton( Ok )->setFocus();
130 exec(); 131 exec();
131 return mSyncResult; 132 return mSyncResult;
132} 133}
133 134
134void KOEventViewerDialog::updateConfig() 135void KOEventViewerDialog::updateConfig()
135{ 136{
136 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); 137 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont );
137 138
138} 139}
139void KOEventViewerDialog::setEvent(Event *event) 140void KOEventViewerDialog::setEvent(Event *event)
140{ 141{
141 mEventViewer->setEvent(event); 142 mEventViewer->setEvent(event);
142 mIncidence = event; 143 mIncidence = event;
143 mEventViewer->setFocus(); 144 mEventViewer->setFocus();
144 //findButton( Close )->setFocus(); 145 //findButton( Close )->setFocus();
145 if ( !mSyncMode ) { 146 if ( !mSyncMode ) {
146 findButton( User1 )->setText( i18n("Agenda")); 147 findButton( User1 )->setText( i18n("Agenda"));
147 } 148 }
148} 149}
149void KOEventViewerDialog::setIncidence(Incidence *in ) 150void KOEventViewerDialog::setIncidence(Incidence *in )
150{ 151{
151 if ( in->typeID() == eventID ) 152 if ( in->typeID() == eventID )
152 setEvent( (Event*) in ); 153 setEvent( (Event*) in );
153 else if ( in->typeID() == todoID ) 154 else if ( in->typeID() == todoID )
154 setTodo( (Todo*) in ); 155 setTodo( (Todo*) in );
155 else if ( in->typeID() == journalID ) 156 else if ( in->typeID() == journalID )
156 setJournal( (Journal*) in ); 157 setJournal( (Journal*) in );
157} 158}
158void KOEventViewerDialog::addIncidence(Incidence *in) 159void KOEventViewerDialog::addIncidence(Incidence *in)
159{ 160{
160 if ( in->typeID() == eventID ) 161 if ( in->typeID() == eventID )
161 addEvent( (Event*) in ); 162 addEvent( (Event*) in );
162 else if ( in->typeID() == todoID ) 163 else if ( in->typeID() == todoID )
163 mEventViewer->setTodo( (Todo*) in, false ); 164 mEventViewer->setTodo( (Todo*) in, false );
164 else if ( in->typeID() == journalID ) 165 else if ( in->typeID() == journalID )
165 mEventViewer->setJournal( (Journal*) in, false ); 166 mEventViewer->setJournal( (Journal*) in, false );
166 if ( mSyncMode ) { 167 if ( mSyncMode ) {
167 findButton( User1 )->setFocus(); 168 findButton( User1 )->setFocus();
168 setCaption(i18n("Conflict! Please choose entry")); 169 setCaption(i18n("Conflict! Please choose entry"));
169 } 170 }
170} 171}
171 172
172void KOEventViewerDialog::addEvent(Event *event) 173void KOEventViewerDialog::addEvent(Event *event)
173{ 174{
174 mEventViewer->addEvent(event); 175 mEventViewer->addEvent(event);
175 mIncidence = event; 176 mIncidence = event;
176 mEventViewer->setFocus(); 177 mEventViewer->setFocus();
177 //findButton( Close )->setFocus(); 178 //findButton( Close )->setFocus();
178 if ( !mSyncMode ) { 179 if ( !mSyncMode ) {
179 findButton( User1 )->setText( i18n("Agenda")); 180 findButton( User1 )->setText( i18n("Agenda"));
180 } 181 }
181} 182}
182 183
183void KOEventViewerDialog::setTodo(Todo *event) 184void KOEventViewerDialog::setTodo(Todo *event)
184{ 185{
185 mEventViewer->setTodo(event); 186 mEventViewer->setTodo(event);
186 mIncidence = (Incidence*)event; 187 mIncidence = (Incidence*)event;
187 mEventViewer->setFocus(); 188 mEventViewer->setFocus();
188 //findButton( Close )->setFocus(); 189 //findButton( Close )->setFocus();
189 if ( !mSyncMode ) { 190 if ( !mSyncMode ) {
190 findButton( User1 )->setText( i18n("Set complete")); 191 findButton( User1 )->setText( i18n("Set complete"));
191 } 192 }
192} 193}
193void KOEventViewerDialog::setJournal(Journal *j) 194void KOEventViewerDialog::setJournal(Journal *j)
194{ 195{
195 mEventViewer->setJournal(j); 196 mEventViewer->setJournal(j);
196 mIncidence = (Incidence*)j; 197 mIncidence = (Incidence*)j;
197 mEventViewer->setFocus(); 198 mEventViewer->setFocus();
198 //findButton( Close )->setFocus(); 199 //findButton( Close )->setFocus();
199 if ( !mSyncMode ) { 200 if ( !mSyncMode ) {
200 findButton( User1 )->setText( i18n("Agenda")); 201 findButton( User1 )->setText( i18n("Agenda"));
201 } 202 }
202} 203}
203 204
204void KOEventViewerDialog::addText(QString text) 205void KOEventViewerDialog::addText(QString text)
205{ 206{
206 mEventViewer->addText(text); 207 mEventViewer->addText(text);
207 mEventViewer->setFocus(); 208 mEventViewer->setFocus();
208 //findButton( Close )->setFocus(); 209 //findButton( Close )->setFocus();
209} 210}
210void KOEventViewerDialog::editIncidence() 211void KOEventViewerDialog::editIncidence()
211{ 212{
212 sendSignalViewerClosed = false; 213 sendSignalViewerClosed = false;
213 if ( mSyncMode ) { 214 if ( mSyncMode ) {
214 mSyncResult = 2; 215 mSyncResult = 2;
215 accept(); 216 accept();
216 return; 217 return;
217 } 218 }
218 if ( mIncidence ){ 219 if ( mIncidence ){
219 close(); 220 close();
220 emit editIncidence( mIncidence ); 221 emit editIncidence( mIncidence );
221 } 222 }
222} 223}
223void KOEventViewerDialog::showIncidence() 224void KOEventViewerDialog::showIncidence()
224{ 225{
225 sendSignalViewerClosed = false; 226 sendSignalViewerClosed = false;
226 if ( mSyncMode ) { 227 if ( mSyncMode ) {
227 mSyncResult = 1; 228 mSyncResult = 1;
228 accept(); 229 accept();
229 return; 230 return;
230 } 231 }
231 232
232 if ( mIncidence ){ 233 if ( mIncidence ){
233 QDate date; 234 QDate date;
234 if ( mIncidence->type() == "Todo" ) { 235 if ( mIncidence->type() == "Todo" ) {
235 /* 236 /*
236 if ( ((Todo*)mIncidence)->hasDueDate() ) 237 if ( ((Todo*)mIncidence)->hasDueDate() )
237 date = ((Todo*)mIncidence)->dtDue().date(); 238 date = ((Todo*)mIncidence)->dtDue().date();
238 else { 239 else {
239 globalFlagBlockAgenda = 2; 240 globalFlagBlockAgenda = 2;
240 emit showAgendaView( false ); 241 emit showAgendaView( false );
241 return; 242 return;
242 } 243 }
243 */ 244 */
244 ((Todo*)mIncidence)->setCompleted( true ); 245 ((Todo*)mIncidence)->setCompleted( true );
245 ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); 246 ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() );
246 emit todoCompleted(((Todo*)mIncidence)); 247 emit todoCompleted(((Todo*)mIncidence));
247 } else { 248 } else {
248 date = mIncidence->dtStart().date(); 249 date = mIncidence->dtStart().date();
249 globalFlagBlockAgenda = 1; 250 globalFlagBlockAgenda = 1;
250 emit showAgendaView( false ); 251 emit showAgendaView( false );
251 globalFlagBlockAgenda = 2; 252 globalFlagBlockAgenda = 2;
252 emit jumpToTime( date ); 253 emit jumpToTime( date );
253 } 254 }
254 close(); 255 close();
255 } 256 }
256} 257}
257void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) 258void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
258{ 259{
259 switch ( e->key() ) { 260 switch ( e->key() ) {
260 261
261 case Qt::Key_A : 262 case Qt::Key_A :
262 case Qt::Key_L : 263 case Qt::Key_L :
263 showIncidence(); 264 showIncidence();
264 break; 265 break;
265 case Qt::Key_E : 266 case Qt::Key_E :
266 case Qt::Key_R : 267 case Qt::Key_R :
267 editIncidence(); 268 editIncidence();
268 break; 269 break;
269 case Qt::Key_C: 270 case Qt::Key_C:
270 case Qt::Key_Escape: 271 case Qt::Key_Escape:
271 sendSignalViewerClosed = true; 272 sendSignalViewerClosed = true;
272 close(); 273 close();
273 break; 274 break;
274 case Qt::Key_I: 275 case Qt::Key_I:
275#ifndef DESKTOP_VERSION 276#ifndef DESKTOP_VERSION
276 sendSignalViewerClosed = true; 277 sendSignalViewerClosed = true;
277 close(); 278 close();
278#else 279#else
279 sendSignalViewerClosed = true; 280 sendSignalViewerClosed = true;
280 slotViewerClosed(); 281 slotViewerClosed();
281 //accept(); 282 //accept();
282#endif 283#endif
283 break; 284 break;
284 default: 285 default:
285 KDialogBase::keyPressEvent ( e ); 286 KDialogBase::keyPressEvent ( e );
286 break; 287 break;
287 } 288 }
288 289
289} 290}
290void KOEventViewerDialog::hideEvent ( QHideEvent * e ) 291void KOEventViewerDialog::hideEvent ( QHideEvent * e )
291{ 292{
292 KDialogBase::hideEvent ( e ); 293 KDialogBase::hideEvent ( e );
293 QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) ); 294 QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) );
294} 295}
295 296
296void KOEventViewerDialog::slotViewerClosed() 297void KOEventViewerDialog::slotViewerClosed()
297{ 298{
298 if ( mSyncMode ) 299 if ( mSyncMode )
299 return; 300 return;
300 301
301 if ( sendSignalViewerClosed ) { 302 if ( sendSignalViewerClosed ) {
302 //qDebug("KOEventViewerDialog::hideEvent "); 303 //qDebug("KOEventViewerDialog::hideEvent ");
303 emit signalViewerClosed(); 304 emit signalViewerClosed();
304 } 305 }
305 sendSignalViewerClosed = true; 306 sendSignalViewerClosed = true;
306} 307}
307 308
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 29fee49..71696f4 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -1,77 +1,78 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19#ifndef KOEVENTVIEWERDIALOG_H 19#ifndef KOEVENTVIEWERDIALOG_H
20#define KOEVENTVIEWERDIALOG_H 20#define KOEVENTVIEWERDIALOG_H
21// 21//
22// Viewer dialog for events. 22// Viewer dialog for events.
23// 23//
24 24
25#include <qtextview.h> 25#include <qtextview.h>
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28 28
29#include <libkcal/event.h> 29#include <libkcal/event.h>
30 30
31using namespace KCal; 31using namespace KCal;
32 32
33class KOEventViewer; 33class KOEventViewer;
34 34
35class KOEventViewerDialog : public KDialogBase { 35class KOEventViewerDialog : public KDialogBase {
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 KOEventViewerDialog(QWidget *parent=0,const char *name=0); 38 KOEventViewerDialog(QWidget *parent=0,const char *name=0);
39 virtual ~KOEventViewerDialog(); 39 virtual ~KOEventViewerDialog();
40 40
41 void setEvent(Event *event); 41 void setEvent(Event *event);
42 void addEvent(Event *event); 42 void addEvent(Event *event);
43 void setTodo(Todo *event); 43 void setTodo(Todo *event);
44 void setJournal(Journal *journal); 44 void setJournal(Journal *journal);
45 void setIncidence(Incidence *inc); 45 void setIncidence(Incidence *inc);
46 void addIncidence(Incidence *inc); 46 void addIncidence(Incidence *inc);
47 void addText(QString text); 47 void addText(QString text);
48 void showMe(); 48 void showMe();
49 void setSyncMode( bool ); 49 void setSyncMode( bool );
50 void setColorMode( int m ); 50 void setColorMode( int m );
51 int executeS( bool ); 51 int executeS( bool );
52 public slots: 52 public slots:
53 void updateConfig(); 53 void updateConfig();
54 void print(); 54 void print();
55 void setMyFocus(); 55 void setMyFocus();
56 signals: 56 signals:
57 void showIncidence( QString );
57 void editIncidence( Incidence* ); 58 void editIncidence( Incidence* );
58 void jumpToTime( const QDate &); 59 void jumpToTime( const QDate &);
59 void showAgendaView( bool ); 60 void showAgendaView( bool );
60 void todoCompleted(Todo*); 61 void todoCompleted(Todo*);
61 void signalViewerClosed(); 62 void signalViewerClosed();
62private slots: 63private slots:
63 void slotViewerClosed(); 64 void slotViewerClosed();
64 void editIncidence(); 65 void editIncidence();
65 void showIncidence(); 66 void showIncidence();
66 protected: 67 protected:
67 void hideEvent ( QHideEvent * e ); 68 void hideEvent ( QHideEvent * e );
68 private: 69 private:
69 bool sendSignalViewerClosed; 70 bool sendSignalViewerClosed;
70 bool mSyncMode; 71 bool mSyncMode;
71 int mSyncResult; 72 int mSyncResult;
72 KOEventViewer *mEventViewer; 73 KOEventViewer *mEventViewer;
73 Incidence* mIncidence; 74 Incidence* mIncidence;
74 void keyPressEvent ( QKeyEvent * e ); 75 void keyPressEvent ( QKeyEvent * e );
75}; 76};
76 77
77#endif 78#endif
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index e2966f8..4f42c83 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -314,1128 +314,1157 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
314} 314}
315void KOTodoListView::wheelEvent (QWheelEvent *e) 315void KOTodoListView::wheelEvent (QWheelEvent *e)
316{ 316{
317 QListView::wheelEvent (e); 317 QListView::wheelEvent (e);
318} 318}
319 319
320void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) 320void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
321{ 321{
322 322
323 QPoint p(contentsToViewport(e->pos())); 323 QPoint p(contentsToViewport(e->pos()));
324 QListViewItem *i = itemAt(p); 324 QListViewItem *i = itemAt(p);
325 bool rootClicked = true; 325 bool rootClicked = true;
326 if (i) { 326 if (i) {
327 // if the user clicked into the root decoration of the item, don't 327 // if the user clicked into the root decoration of the item, don't
328 // try to start a drag! 328 // try to start a drag!
329 int X = p.x(); 329 int X = p.x();
330 //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); 330 //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() );
331 if (X > header()->sectionPos(0) + 331 if (X > header()->sectionPos(0) +
332 treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + 332 treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) +
333 itemMargin() +i->height()|| 333 itemMargin() +i->height()||
334 X < header()->sectionPos(0)) { 334 X < header()->sectionPos(0)) {
335 rootClicked = false; 335 rootClicked = false;
336 } 336 }
337 } else { 337 } else {
338 rootClicked = false; 338 rootClicked = false;
339 } 339 }
340#ifndef KORG_NODND 340#ifndef KORG_NODND
341 mMousePressed = false; 341 mMousePressed = false;
342 if (! rootClicked && !( e->button() == RightButton) ) { 342 if (! rootClicked && !( e->button() == RightButton) ) {
343 mPressPos = e->pos(); 343 mPressPos = e->pos();
344 mMousePressed = true; 344 mMousePressed = true;
345 } else { 345 } else {
346 mMousePressed = false; 346 mMousePressed = false;
347 } 347 }
348#endif 348#endif
349 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); 349 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked);
350#ifndef DESKTOP_VERSION 350#ifndef DESKTOP_VERSION
351 if (!( e->button() == RightButton && rootClicked) ) 351 if (!( e->button() == RightButton && rootClicked) )
352 QListView::contentsMousePressEvent(e); 352 QListView::contentsMousePressEvent(e);
353#else 353#else
354 QListView::contentsMousePressEvent(e); 354 QListView::contentsMousePressEvent(e);
355#endif 355#endif
356} 356}
357void KOTodoListView::paintEvent(QPaintEvent* e) 357void KOTodoListView::paintEvent(QPaintEvent* e)
358{ 358{
359 emit paintNeeded(); 359 emit paintNeeded();
360 QListView::paintEvent( e); 360 QListView::paintEvent( e);
361} 361}
362void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) 362void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
363{ 363{
364 364
365#ifndef KORG_NODND 365#ifndef KORG_NODND
366 //QListView::contentsMouseMoveEvent(e); 366 //QListView::contentsMouseMoveEvent(e);
367 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > 367 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() >
368 QApplication::startDragDistance()*3) { 368 QApplication::startDragDistance()*3) {
369 mMousePressed = false; 369 mMousePressed = false;
370 QListViewItem *item = itemAt(contentsToViewport(mPressPos)); 370 QListViewItem *item = itemAt(contentsToViewport(mPressPos));
371 if (item) { 371 if (item) {
372 DndFactory factory( mCalendar ); 372 DndFactory factory( mCalendar );
373 ICalDrag *vd = factory.createDrag( 373 ICalDrag *vd = factory.createDrag(
374 ((KOTodoViewItem *)item)->todo(),viewport()); 374 ((KOTodoViewItem *)item)->todo(),viewport());
375 internalDrop = false; 375 internalDrop = false;
376 // we cannot do any senseful here, because the DnD is still broken in Qt 376 // we cannot do any senseful here, because the DnD is still broken in Qt
377 if (vd->drag()) { 377 if (vd->drag()) {
378 if ( !internalDrop ) { 378 if ( !internalDrop ) {
379 //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); 379 //emit deleteTodo( ((KOTodoViewItem *)item)->todo() );
380 qDebug("Dnd: External move: Delete drag source "); 380 qDebug("Dnd: External move: Delete drag source ");
381 } else 381 } else
382 qDebug("Dnd: Internal move "); 382 qDebug("Dnd: Internal move ");
383 383
384 } else { 384 } else {
385 if ( !internalDrop ) { 385 if ( !internalDrop ) {
386 qDebug("Dnd: External Copy"); 386 qDebug("Dnd: External Copy");
387 } else 387 } else
388 qDebug("DnD: Internal copy: Copy pending"); 388 qDebug("DnD: Internal copy: Copy pending");
389 } 389 }
390 } 390 }
391 } 391 }
392#endif 392#endif
393} 393}
394void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) 394void KOTodoListView::keyReleaseEvent ( QKeyEvent *e )
395{ 395{
396 if ( !e->isAutoRepeat() ) { 396 if ( !e->isAutoRepeat() ) {
397 mFlagKeyPressed = false; 397 mFlagKeyPressed = false;
398 } 398 }
399} 399}
400 400
401 401
402void KOTodoListView::keyPressEvent ( QKeyEvent * e ) 402void KOTodoListView::keyPressEvent ( QKeyEvent * e )
403{ 403{
404 qApp->processEvents(); 404 qApp->processEvents();
405 if ( e->isAutoRepeat() && !mFlagKeyPressed ) { 405 if ( e->isAutoRepeat() && !mFlagKeyPressed ) {
406 e->ignore(); 406 e->ignore();
407 // qDebug(" ignore %d",e->isAutoRepeat() ); 407 // qDebug(" ignore %d",e->isAutoRepeat() );
408 return; 408 return;
409 } 409 }
410 if (! e->isAutoRepeat() ) 410 if (! e->isAutoRepeat() )
411 mFlagKeyPressed = true; 411 mFlagKeyPressed = true;
412 QListViewItem* cn; 412 QListViewItem* cn;
413 if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { 413 if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) {
414 cn = currentItem(); 414 cn = currentItem();
415 if ( cn ) { 415 if ( cn ) {
416 KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); 416 KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
417 if ( ci ){ 417 if ( ci ){
418 if ( e->state() == ShiftButton ) 418 if ( e->state() == ShiftButton )
419 ci->setOn( false ); 419 ci->setOn( false );
420 else 420 else
421 ci->setOn( true ); 421 ci->setOn( true );
422 cn = cn->itemBelow(); 422 cn = cn->itemBelow();
423 if ( cn ) { 423 if ( cn ) {
424 setCurrentItem ( cn ); 424 setCurrentItem ( cn );
425 ensureItemVisible ( cn ); 425 ensureItemVisible ( cn );
426 } 426 }
427 427
428 } 428 }
429 } 429 }
430 430
431 return; 431 return;
432 } 432 }
433 433
434 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { 434 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) {
435 switch ( e->key() ) { 435 switch ( e->key() ) {
436 case Qt::Key_Down: 436 case Qt::Key_Down:
437 case Qt::Key_Up: 437 case Qt::Key_Up:
438 QListView::keyPressEvent ( e ); 438 QListView::keyPressEvent ( e );
439 break; 439 break;
440 case Qt::Key_Left: 440 case Qt::Key_Left:
441 case Qt::Key_Right: 441 case Qt::Key_Right:
442 QListView::keyPressEvent ( e ); 442 QListView::keyPressEvent ( e );
443 e->accept(); 443 e->accept();
444 return; 444 return;
445 break; 445 break;
446 default: 446 default:
447 e->ignore(); 447 e->ignore();
448 break; 448 break;
449 } 449 }
450 return; 450 return;
451 } 451 }
452 e->ignore(); 452 e->ignore();
453} 453}
454void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) 454void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e)
455{ 455{
456 QListView::contentsMouseReleaseEvent(e); 456 QListView::contentsMouseReleaseEvent(e);
457 mMousePressed = false; 457 mMousePressed = false;
458} 458}
459 459
460void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) 460void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
461{ 461{
462 if (!e) return; 462 if (!e) return;
463 463
464 QPoint vp = contentsToViewport(e->pos()); 464 QPoint vp = contentsToViewport(e->pos());
465 465
466 QListViewItem *item = itemAt(vp); 466 QListViewItem *item = itemAt(vp);
467 467
468 emit double_Clicked(item); 468 emit double_Clicked(item);
469 if (!item) return; 469 if (!item) return;
470 470
471 emit doubleClicked(item,vp,0); 471 emit doubleClicked(item,vp,0);
472} 472}
473 473
474///////////////////////////////////////////////////////////////////////////// 474/////////////////////////////////////////////////////////////////////////////
475 475
476KOQuickTodo::KOQuickTodo(QWidget *parent) : 476KOQuickTodo::KOQuickTodo(QWidget *parent) :
477 QLineEdit(parent) 477 QLineEdit(parent)
478{ 478{
479 setText(i18n("Click to add a new Todo")); 479 setText(i18n("Click to add a new Todo"));
480} 480}
481 481
482void KOQuickTodo::focusInEvent(QFocusEvent *ev) 482void KOQuickTodo::focusInEvent(QFocusEvent *ev)
483{ 483{
484 if ( text()==i18n("Click to add a new Todo") ) 484 if ( text()==i18n("Click to add a new Todo") )
485 setText(""); 485 setText("");
486 QLineEdit::focusInEvent(ev); 486 QLineEdit::focusInEvent(ev);
487} 487}
488 488
489void KOQuickTodo::focusOutEvent(QFocusEvent *ev) 489void KOQuickTodo::focusOutEvent(QFocusEvent *ev)
490{ 490{
491 setText(i18n("Click to add a new Todo")); 491 setText(i18n("Click to add a new Todo"));
492 QLineEdit::focusOutEvent(ev); 492 QLineEdit::focusOutEvent(ev);
493} 493}
494 494
495///////////////////////////////////////////////////////////////////////////// 495/////////////////////////////////////////////////////////////////////////////
496 496
497KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : 497KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
498 KOrg::BaseView(calendar,parent,name) 498 KOrg::BaseView(calendar,parent,name)
499{ 499{
500 mCategoryPopupMenu = 0; 500 mCategoryPopupMenu = 0;
501 mPendingUpdateBeforeRepaint = false; 501 mPendingUpdateBeforeRepaint = false;
502 isFlatDisplay = false; 502 isFlatDisplay = false;
503 mNavigator = 0; 503 mNavigator = 0;
504 QBoxLayout *topLayout = new QVBoxLayout(this); 504 QBoxLayout *topLayout = new QVBoxLayout(this);
505 mName = QString ( name ); 505 mName = QString ( name );
506 mBlockUpdate = false; 506 mBlockUpdate = false;
507 mQuickAdd = new KOQuickTodo(this); 507 mQuickAdd = new KOQuickTodo(this);
508 topLayout->addWidget(mQuickAdd); 508 topLayout->addWidget(mQuickAdd);
509 509
510 if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); 510 if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide();
511 511
512 mTodoListView = new KOTodoListView(calendar,this, name ); 512 mTodoListView = new KOTodoListView(calendar,this, name );
513 topLayout->addWidget(mTodoListView); 513 topLayout->addWidget(mTodoListView);
514 //mTodoListView->header()->setMaximumHeight(30); 514 //mTodoListView->header()->setMaximumHeight(30);
515 mTodoListView->setRootIsDecorated(true); 515 mTodoListView->setRootIsDecorated(true);
516 mTodoListView->setAllColumnsShowFocus(true); 516 mTodoListView->setAllColumnsShowFocus(true);
517 517
518 mTodoListView->setShowSortIndicator(true); 518 mTodoListView->setShowSortIndicator(true);
519 519
520 mTodoListView->addColumn(i18n("Todo")); 520 mTodoListView->addColumn(i18n("Todo"));
521 mTodoListView->addColumn(i18n("Prio")); 521 mTodoListView->addColumn(i18n("Prio"));
522 mTodoListView->setColumnAlignment(1,AlignHCenter); 522 mTodoListView->setColumnAlignment(1,AlignHCenter);
523 mTodoListView->addColumn(i18n("Complete")); 523 mTodoListView->addColumn(i18n("Complete"));
524 mTodoListView->setColumnAlignment(2,AlignCenter); 524 mTodoListView->setColumnAlignment(2,AlignCenter);
525 525
526 mTodoListView->addColumn(i18n("Due Date")); 526 mTodoListView->addColumn(i18n("Due Date"));
527 mTodoListView->setColumnAlignment(3,AlignLeft); 527 mTodoListView->setColumnAlignment(3,AlignLeft);
528 mTodoListView->addColumn(i18n("Due Time")); 528 mTodoListView->addColumn(i18n("Due Time"));
529 mTodoListView->setColumnAlignment(4,AlignHCenter); 529 mTodoListView->setColumnAlignment(4,AlignHCenter);
530 530
531 mTodoListView->addColumn(i18n("Start Date")); 531 mTodoListView->addColumn(i18n("Start Date"));
532 mTodoListView->setColumnAlignment(5,AlignLeft); 532 mTodoListView->setColumnAlignment(5,AlignLeft);
533 mTodoListView->addColumn(i18n("Start Time")); 533 mTodoListView->addColumn(i18n("Start Time"));
534 mTodoListView->setColumnAlignment(6,AlignHCenter); 534 mTodoListView->setColumnAlignment(6,AlignHCenter);
535 535
536 mTodoListView->addColumn(i18n("Cancelled")); 536 mTodoListView->addColumn(i18n("Cancelled"));
537 mTodoListView->addColumn(i18n("Categories")); 537 mTodoListView->addColumn(i18n("Categories"));
538 mTodoListView->addColumn(i18n("Calendar")); 538 mTodoListView->addColumn(i18n("Calendar"));
539#if 0 539#if 0
540 mTodoListView->addColumn(i18n("Sort Id")); 540 mTodoListView->addColumn(i18n("Sort Id"));
541 mTodoListView->setColumnAlignment(4,AlignHCenter); 541 mTodoListView->setColumnAlignment(4,AlignHCenter);
542#endif 542#endif
543 543
544 mTodoListView->setMinimumHeight( 60 ); 544 mTodoListView->setMinimumHeight( 60 );
545 mTodoListView->setItemsRenameable( true ); 545 mTodoListView->setItemsRenameable( true );
546 mTodoListView->setRenameable( 0 ); 546 mTodoListView->setRenameable( 0 );
547 mTodoListView->setColumnWidth( 0, 120 ); 547 mTodoListView->setColumnWidth( 0, 120 );
548 int iii = 0; 548 int iii = 0;
549 for ( iii = 0; iii< 10 ; ++iii ) 549 for ( iii = 0; iii< 10 ; ++iii )
550 mTodoListView->setColumnWidthMode( iii, QListView::Manual ); 550 mTodoListView->setColumnWidthMode( iii, QListView::Manual );
551 551
552 552
553 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); 553 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
554 554
555 mPriorityPopupMenu = new QPopupMenu(this); 555 mPriorityPopupMenu = new QPopupMenu(this);
556 for (int i = 1; i <= 5; i++) { 556 for (int i = 1; i <= 5; i++) {
557 QString label = QString ("%1").arg (i); 557 QString label = QString ("%1").arg (i);
558 mPriority[mPriorityPopupMenu->insertItem (label)] = i; 558 mPriority[mPriorityPopupMenu->insertItem (label)] = i;
559 } 559 }
560 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); 560 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
561 561
562 mPercentageCompletedPopupMenu = new QPopupMenu(this); 562 mPercentageCompletedPopupMenu = new QPopupMenu(this);
563 for (int i = 0; i <= 100; i+=20) { 563 for (int i = 0; i <= 100; i+=20) {
564 QString label = QString ("%1 %").arg (i); 564 QString label = QString ("%1 %").arg (i);
565 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; 565 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
566 } 566 }
567 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); 567 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
568 568
569 569
570 mCategoryPopupMenu = new QPopupMenu (this);
571 mCategoryPopupMenu->setCheckable (true);
572 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
573 connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ()));
574
575 mCalPopupMenu = new QPopupMenu (this);
576 mCalPopupMenu->setCheckable (true);
577 connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int)));
578 connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ()));
579
580
581
570 582
571 mItemPopupMenu = new QPopupMenu(this); 583 mItemPopupMenu = new QPopupMenu(this);
572 mItemPopupMenu->insertItem(i18n("Show..."), this, 584 mItemPopupMenu->insertItem(i18n("Show"), this,
573 SLOT (showTodo())); 585 SLOT (showTodo()));
574 mItemPopupMenu->insertItem(i18n("Edit..."), this, 586 mItemPopupMenu->insertItem(i18n("Edit..."), this,
575 SLOT (editTodo())); 587 SLOT (editTodo()));
576 mItemPopupMenu->insertItem( i18n("Delete"), this, 588 mItemPopupMenu->insertItem( i18n("Delete"), this,
577 SLOT (deleteTodo())); 589 SLOT (deleteTodo()));
578 mItemPopupMenu->insertItem( i18n("Clone..."), this, 590 mItemPopupMenu->insertItem( i18n("Clone..."), this,
579 SLOT (cloneTodo())); 591 SLOT (cloneTodo()));
580 mItemPopupMenu->insertItem( i18n("Move..."), this, 592 mItemPopupMenu->insertItem( i18n("Move..."), this,
581 SLOT (moveTodo())); 593 SLOT (moveTodo()));
582#ifndef DESKTOP_VERSION 594#ifndef DESKTOP_VERSION
583 mItemPopupMenu->insertItem( i18n("Beam..."), this, 595 mItemPopupMenu->insertItem( i18n("Beam..."), this,
584 SLOT (beamTodo())); 596 SLOT (beamTodo()));
585#endif 597#endif
586 mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, 598 mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this,
587 SLOT (cancelTodo())); 599 SLOT (cancelTodo()));
600 mItemPopupMenu->insertItem( i18n("Categories"), mCategoryPopupMenu);
601 mItemPopupMenu->insertItem( i18n("Calendar"), mCalPopupMenu);
588 mItemPopupMenu->insertSeparator(); 602 mItemPopupMenu->insertSeparator();
589 mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, 603 mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this,
590 SLOT (toggleRunningItem())); 604 SLOT (toggleRunningItem()));
591 mItemPopupMenu->insertSeparator(); 605 mItemPopupMenu->insertSeparator();
592 /* 606 /*
593 mItemPopupMenu->insertItem( i18n("New Todo..."), this, 607 mItemPopupMenu->insertItem( i18n("New Todo..."), this,
594 SLOT (newTodo())); 608 SLOT (newTodo()));
595 */ 609 */
596 mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, 610 mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this,
597 SLOT (newSubTodo())); 611 SLOT (newSubTodo()));
598 mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, 612 mItemPopupMenu->insertItem(i18n("Unparent Todo"), this,
599 SLOT (unparentTodo()),0,21); 613 SLOT (unparentTodo()),0,21);
600 mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, 614 mItemPopupMenu->insertItem(i18n("Reparent Todo"), this,
601 SLOT (reparentTodo()),0,22); 615 SLOT (reparentTodo()),0,22);
602 mItemPopupMenu->insertSeparator(); 616 mItemPopupMenu->insertSeparator();
603#if 0 617#if 0
604 mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed..."), 618 mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed..."),
605 this, SLOT( purgeCompleted() ) ); 619 this, SLOT( purgeCompleted() ) );
606 mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), 620 mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"),
607 this, SLOT( toggleCompleted() ),0, 33 ); 621 this, SLOT( toggleCompleted() ),0, 33 );
608 mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), 622 mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
609 this, SLOT( toggleQuickTodo() ),0, 34 ); 623 this, SLOT( toggleQuickTodo() ),0, 34 );
610 mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), 624 mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
611 this, SLOT( toggleRunning() ),0, 35 ); 625 this, SLOT( toggleRunning() ),0, 35 );
612 626
613#endif 627#endif
614 mPopupMenu = new QPopupMenu(this); 628 mPopupMenu = new QPopupMenu(this);
615 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, 629 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this,
616 SLOT (newTodo()),0,1); 630 SLOT (newTodo()),0,1);
617 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."), 631 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."),
618 this, SLOT(purgeCompleted()),0,2); 632 this, SLOT(purgeCompleted()),0,2);
619 mPopupMenu->insertItem(i18n("Show Completed"), 633 mPopupMenu->insertItem(i18n("Show Completed"),
620 this, SLOT( toggleCompleted() ),0,3 ); 634 this, SLOT( toggleCompleted() ),0,3 );
621 mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), 635 mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
622 this, SLOT( toggleRunning() ),0,5 ); 636 this, SLOT( toggleRunning() ),0,5 );
623 mPopupMenu->insertItem(i18n(" set all open","Display all opened"), 637 mPopupMenu->insertItem(i18n(" set all open","Display all opened"),
624 this, SLOT( setAllOpen() ),0,6 ); 638 this, SLOT( setAllOpen() ),0,6 );
625 mPopupMenu->insertItem(i18n(" set all close","Display all closed"), 639 mPopupMenu->insertItem(i18n(" set all close","Display all closed"),
626 this, SLOT( setAllClose() ),0,7 ); 640 this, SLOT( setAllClose() ),0,7 );
627 mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), 641 mPopupMenu->insertItem(i18n(" set all flat","Display all flat"),
628 this, SLOT( setAllFlat() ),0,8 ); 642 this, SLOT( setAllFlat() ),0,8 );
629 mPopupMenu->insertSeparator(); 643 mPopupMenu->insertSeparator();
630 mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), 644 mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
631 this, SLOT( toggleQuickTodo() ),0,4 ); 645 this, SLOT( toggleQuickTodo() ),0,4 );
632 mDocPrefs = new DocPrefs( name ); 646 mDocPrefs = new DocPrefs( name );
633 647
634 mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); 648 mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu );
635 mPopupMenu->setCheckable( true ); 649 mPopupMenu->setCheckable( true );
636 mItemPopupMenu->setCheckable( true ); 650 mItemPopupMenu->setCheckable( true );
637 651
638 652
639 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); 653 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo );
640 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); 654 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo );
641 655
642 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); 656 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo);
643 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); 657 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo );
644 658
645 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); 659 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos);
646 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); 660 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos );
647 661
648 662
649 // Double clicking conflicts with opening/closing the subtree 663 // Double clicking conflicts with opening/closing the subtree
650 connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), 664 connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ),
651 SLOT( editItem( QListViewItem *) ) ); 665 SLOT( editItem( QListViewItem *) ) );
652 /* 666 /*
653 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, 667 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *,
654 const QPoint &,int ) ), 668 const QPoint &,int ) ),
655 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 669 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
656 */ 670 */
657 connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, 671 connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *,
658 const QPoint &,int ) ), 672 const QPoint &,int ) ),
659 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 673 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
660 connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), 674 connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ),
661 SLOT( itemClicked( QListViewItem * ) ) ); 675 SLOT( itemClicked( QListViewItem * ) ) );
662 connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), 676 connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ),
663 SLOT( itemDoubleClicked( QListViewItem * ) ) ); 677 SLOT( itemDoubleClicked( QListViewItem * ) ) );
664 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 678 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
665 SLOT( updateView() ) ); 679 SLOT( updateView() ) );
666 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 680 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
667 SLOT( todoModified(Todo *, int) ) ); 681 SLOT( todoModified(Todo *, int) ) );
668 connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), 682 connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ),
669 SLOT( itemStateChanged( QListViewItem * ) ) ); 683 SLOT( itemStateChanged( QListViewItem * ) ) );
670 connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), 684 connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ),
671 SLOT( itemStateChanged( QListViewItem * ) ) ); 685 SLOT( itemStateChanged( QListViewItem * ) ) );
672 connect( mTodoListView, SIGNAL( paintNeeded() ), 686 connect( mTodoListView, SIGNAL( paintNeeded() ),
673 SLOT( paintNeeded()) ); 687 SLOT( paintNeeded()) );
674 688
675#if 0 689#if 0
676 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), 690 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)),
677 SLOT(selectionChanged(QListViewItem *))); 691 SLOT(selectionChanged(QListViewItem *)));
678 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), 692 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)),
679 SLOT(selectionChanged(QListViewItem *))); 693 SLOT(selectionChanged(QListViewItem *)));
680 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), 694 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)),
681 SLOT(selectionChanged(QListViewItem *))); 695 SLOT(selectionChanged(QListViewItem *)));
682#endif 696#endif
683 697
684 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); 698 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) ));
685 connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); 699 connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) ));
686 connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); 700 connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) ));
687 701
688 connect( mTodoListView, SIGNAL(selectionChanged() ), 702 connect( mTodoListView, SIGNAL(selectionChanged() ),
689 SLOT( processSelectionChange() ) ); 703 SLOT( processSelectionChange() ) );
690 connect( mQuickAdd, SIGNAL( returnPressed () ), 704 connect( mQuickAdd, SIGNAL( returnPressed () ),
691 SLOT( addQuickTodo() ) ); 705 SLOT( addQuickTodo() ) );
692 706
693} 707}
694 708
695KOTodoView::~KOTodoView() 709KOTodoView::~KOTodoView()
696{ 710{
697 711
698#if QT_VERSION >= 0x030000 712#if QT_VERSION >= 0x030000
699 713
700#else 714#else
701 delete mKOTodoViewWhatsThis; 715 delete mKOTodoViewWhatsThis;
702#endif 716#endif
703 717
704 delete mDocPrefs; 718 delete mDocPrefs;
705} 719}
706QString KOTodoView::getWhatsThisText(QPoint p) 720QString KOTodoView::getWhatsThisText(QPoint p)
707{ 721{
708 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); 722 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
709 if ( item ) 723 if ( item )
710 return KIncidenceFormatter::instance()->getFormattedText( item->todo(), 724 return KIncidenceFormatter::instance()->getFormattedText( item->todo(),
711 KOPrefs::instance()->mWTshowDetails, 725 KOPrefs::instance()->mWTshowDetails,
712 KOPrefs::instance()->mWTshowCreated, 726 KOPrefs::instance()->mWTshowCreated,
713 KOPrefs::instance()->mWTshowChanged); 727 KOPrefs::instance()->mWTshowChanged);
714 return i18n("That is the todo view" ); 728 return i18n("That is the todo view" );
715 729
716} 730}
717 731
718void KOTodoView::jumpToDate () 732void KOTodoView::jumpToDate ()
719{ 733{
720 // if (mActiveItem) { 734 // if (mActiveItem) {
721// mActiveItem->todo()); 735// mActiveItem->todo());
722// if ( mActiveItem->todo()->hasDueDate() ) 736// if ( mActiveItem->todo()->hasDueDate() )
723// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); 737// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() );
724} 738}
725void KOTodoView::paintNeeded() 739void KOTodoView::paintNeeded()
726{ 740{
727 if ( mPendingUpdateBeforeRepaint ) { 741 if ( mPendingUpdateBeforeRepaint ) {
728 updateView(); 742 updateView();
729 mPendingUpdateBeforeRepaint = false; 743 mPendingUpdateBeforeRepaint = false;
730 } 744 }
731} 745}
732void KOTodoView::paintEvent(QPaintEvent * pevent) 746void KOTodoView::paintEvent(QPaintEvent * pevent)
733{ 747{
734 if ( mPendingUpdateBeforeRepaint ) { 748 if ( mPendingUpdateBeforeRepaint ) {
735 updateView(); 749 updateView();
736 mPendingUpdateBeforeRepaint = false; 750 mPendingUpdateBeforeRepaint = false;
737 } 751 }
738 KOrg::BaseView::paintEvent( pevent); 752 KOrg::BaseView::paintEvent( pevent);
739} 753}
740 754
741void KOTodoView::updateView() 755void KOTodoView::updateView()
742{ 756{
743 pendingSubtodo = 0; 757 pendingSubtodo = 0;
744 if ( mBlockUpdate ) { 758 if ( mBlockUpdate ) {
745 return; 759 return;
746 } 760 }
747 if ( !isVisible() ) { 761 if ( !isVisible() ) {
748 mPendingUpdateBeforeRepaint = true; 762 mPendingUpdateBeforeRepaint = true;
749 return; 763 return;
750 } 764 }
751 //qDebug("KOTodoView::updateView() %x", this); 765 //qDebug("KOTodoView::updateView() %x", this);
752 if ( isFlatDisplay ) { 766 if ( isFlatDisplay ) {
753 displayAllFlat(); 767 displayAllFlat();
754 return; 768 return;
755 } 769 }
756 storeCurrentItem(); 770 storeCurrentItem();
757 //qDebug("update "); 771 //qDebug("update ");
758// kdDebug() << "KOTodoView::updateView()" << endl; 772// kdDebug() << "KOTodoView::updateView()" << endl;
759 QFont fo = KOPrefs::instance()->mTodoViewFont; 773 QFont fo = KOPrefs::instance()->mTodoViewFont;
760 774
761 775
762 mTodoListView->clear(); 776 mTodoListView->clear();
763 if ( mName == "todolistsmall" ) { 777 if ( mName == "todolistsmall" ) {
764 if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { 778 if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) {
765 int ps = fo.pointSize() -2; 779 int ps = fo.pointSize() -2;
766 if ( ps > 12 ) 780 if ( ps > 12 )
767 ps -= 2; 781 ps -= 2;
768 fo.setPointSize( ps ); 782 fo.setPointSize( ps );
769 } 783 }
770 } 784 }
771 785
772 mTodoListView->setFont( fo ); 786 mTodoListView->setFont( fo );
773 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); 787 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont );
774 //mTodoListView->header()->setMaximumHeight(fm.height()); 788 //mTodoListView->header()->setMaximumHeight(fm.height());
775 QPtrList<Todo> todoList = calendar()->todos(); 789 QPtrList<Todo> todoList = calendar()->todos();
776 790
777/* 791/*
778 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; 792 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl;
779 Event *t; 793 Event *t;
780 for(t = todoList.first(); t; t = todoList.next()) { 794 for(t = todoList.first(); t; t = todoList.next()) {
781 kdDebug() << " " << t->getSummary() << endl; 795 kdDebug() << " " << t->getSummary() << endl;
782 796
783 if (t->getRelatedTo()) { 797 if (t->getRelatedTo()) {
784 kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; 798 kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl;
785 } 799 }
786 800
787 QPtrList<Event> l = t->getRelations(); 801 QPtrList<Event> l = t->getRelations();
788 Event *c; 802 Event *c;
789 for(c=l.first();c;c=l.next()) { 803 for(c=l.first();c;c=l.next()) {
790 kdDebug() << " - relation: " << c->getSummary() << endl; 804 kdDebug() << " - relation: " << c->getSummary() << endl;
791 } 805 }
792 } 806 }
793*/ 807*/
794 808
795 // Put for each Event a KOTodoViewItem in the list view. Don't rely on a 809 // Put for each Event a KOTodoViewItem in the list view. Don't rely on a
796 // specific order of events. That means that we have to generate parent items 810 // specific order of events. That means that we have to generate parent items
797 // recursively for proper hierarchical display of Todos. 811 // recursively for proper hierarchical display of Todos.
798 mTodoMap.clear(); 812 mTodoMap.clear();
799 Todo *todo; 813 Todo *todo;
800 todo = todoList.first();// todo; todo = todoList.next()) { 814 todo = todoList.first();// todo; todo = todoList.next()) {
801 while ( todo ) { 815 while ( todo ) {
802 bool next = true; 816 bool next = true;
803 // qDebug("todo %s ", todo->summary().latin1()); 817 // qDebug("todo %s ", todo->summary().latin1());
804 Incidence *incidence = todo->relatedTo(); 818 Incidence *incidence = todo->relatedTo();
805 while ( incidence ) { 819 while ( incidence ) {
806 if ( incidence->typeID() == todoID ) { 820 if ( incidence->typeID() == todoID ) {
807 //qDebug("related %s ",incidence->summary().latin1() ); 821 //qDebug("related %s ",incidence->summary().latin1() );
808 if ( !(todoList.contains ( ((Todo* )incidence ) ) ) && incidence->calEnabled() ) { 822 if ( !(todoList.contains ( ((Todo* )incidence ) ) ) && incidence->calEnabled() ) {
809 //qDebug("related not found "); 823 //qDebug("related not found ");
810 todoList.remove( ); 824 todoList.remove( );
811 todo = todoList.current(); 825 todo = todoList.current();
812 next = false; 826 next = false;
813 incidence = 0; 827 incidence = 0;
814 828
815 } else { 829 } else {
816 //qDebug("related found "); 830 //qDebug("related found ");
817 incidence = incidence->relatedTo(); 831 incidence = incidence->relatedTo();
818 } 832 }
819 } else 833 } else
820 incidence = 0; 834 incidence = 0;
821 } 835 }
822 if ( next ) 836 if ( next )
823 todo = todoList.next(); 837 todo = todoList.next();
824 } 838 }
825 839
826 for(todo = todoList.first(); todo; todo = todoList.next()) { 840 for(todo = todoList.first(); todo; todo = todoList.next()) {
827 if (!mTodoMap.contains(todo) && checkTodo( todo ) ) 841 if (!mTodoMap.contains(todo) && checkTodo( todo ) )
828 { 842 {
829 insertTodoItem(todo); 843 insertTodoItem(todo);
830 } 844 }
831 } 845 }
832 // Restore opened/closed state 846 // Restore opened/closed state
833 mTodoListView->blockSignals( true ); 847 mTodoListView->blockSignals( true );
834 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); 848 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() );
835 mTodoListView->blockSignals( false ); 849 mTodoListView->blockSignals( false );
836 resetCurrentItem(); 850 resetCurrentItem();
837} 851}
838 852
839void KOTodoView::storeCurrentItem() 853void KOTodoView::storeCurrentItem()
840{ 854{
841 mCurItem = 0; 855 mCurItem = 0;
842 mCurItemRootParent = 0; 856 mCurItemRootParent = 0;
843 mCurItemParent = 0; 857 mCurItemParent = 0;
844 mCurItemAbove = 0; 858 mCurItemAbove = 0;
845 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 859 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
846 if (mActiveItem) { 860 if (mActiveItem) {
847 mCurItem = mActiveItem->todo(); 861 mCurItem = mActiveItem->todo();
848 KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); 862 KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove ();
849 if ( activeItemAbove ) 863 if ( activeItemAbove )
850 mCurItemAbove = activeItemAbove->todo(); 864 mCurItemAbove = activeItemAbove->todo();
851 mCurItemRootParent = mCurItem; 865 mCurItemRootParent = mCurItem;
852 mCurItemParent = mCurItemRootParent->relatedTo(); 866 mCurItemParent = mCurItemRootParent->relatedTo();
853 while ( mCurItemRootParent->relatedTo() != 0 ) 867 while ( mCurItemRootParent->relatedTo() != 0 )
854 mCurItemRootParent = mCurItemRootParent->relatedTo(); 868 mCurItemRootParent = mCurItemRootParent->relatedTo();
855 } 869 }
856 mActiveItem = 0; 870 mActiveItem = 0;
857} 871}
858 872
859void KOTodoView::resetCurrentItem() 873void KOTodoView::resetCurrentItem()
860{ 874{
861 //mTodoListView->setFocus(); 875 //mTodoListView->setFocus();
862 KOTodoViewItem* foundItem = 0; 876 KOTodoViewItem* foundItem = 0;
863 KOTodoViewItem* foundItemRoot = 0; 877 KOTodoViewItem* foundItemRoot = 0;
864 KOTodoViewItem* foundItemParent = 0; 878 KOTodoViewItem* foundItemParent = 0;
865 KOTodoViewItem* foundItemAbove = 0; 879 KOTodoViewItem* foundItemAbove = 0;
866 if ( mTodoListView->firstChild () ) { 880 if ( mTodoListView->firstChild () ) {
867 if ( mCurItem ) { 881 if ( mCurItem ) {
868 KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); 882 KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild ();
869 while ( item ) { 883 while ( item ) {
870 if ( item->todo() == mCurItem ) { 884 if ( item->todo() == mCurItem ) {
871 foundItem = item; 885 foundItem = item;
872 break; 886 break;
873 } else if ( item->todo() == mCurItemAbove ) { 887 } else if ( item->todo() == mCurItemAbove ) {
874 foundItemAbove = item; 888 foundItemAbove = item;
875 889
876 } 890 }
877 if ( item->todo() == mCurItemRootParent ) { 891 if ( item->todo() == mCurItemRootParent ) {
878 foundItemRoot = item; 892 foundItemRoot = item;
879 } 893 }
880 if ( item->todo() == mCurItemParent ) { 894 if ( item->todo() == mCurItemParent ) {
881 foundItemParent = item; 895 foundItemParent = item;
882 } 896 }
883 item = (KOTodoViewItem*)item->itemBelow(); 897 item = (KOTodoViewItem*)item->itemBelow();
884 } 898 }
885 if ( ! foundItem ) { 899 if ( ! foundItem ) {
886 if ( foundItemParent ) { 900 if ( foundItemParent ) {
887 foundItem = foundItemParent; 901 foundItem = foundItemParent;
888 } else { 902 } else {
889 if ( foundItemRoot ) 903 if ( foundItemRoot )
890 foundItem = foundItemRoot; 904 foundItem = foundItemRoot;
891 else 905 else
892 foundItem = foundItemAbove; 906 foundItem = foundItemAbove;
893 } 907 }
894 } 908 }
895 } 909 }
896 if ( foundItem ) { 910 if ( foundItem ) {
897 mTodoListView->setSelected ( foundItem, true ); 911 mTodoListView->setSelected ( foundItem, true );
898 mTodoListView->setCurrentItem( foundItem ); 912 mTodoListView->setCurrentItem( foundItem );
899 mTodoListView->ensureItemVisible( foundItem ); 913 mTodoListView->ensureItemVisible( foundItem );
900 } else { 914 } else {
901 if ( mTodoListView->firstChild () ) { 915 if ( mTodoListView->firstChild () ) {
902 mTodoListView->setSelected ( mTodoListView->firstChild (), true ); 916 mTodoListView->setSelected ( mTodoListView->firstChild (), true );
903 mTodoListView->setCurrentItem( mTodoListView->firstChild () ); 917 mTodoListView->setCurrentItem( mTodoListView->firstChild () );
904 } 918 }
905 } 919 }
906 } 920 }
907 processSelectionChange(); 921 processSelectionChange();
908 QTimer::singleShot( 100, this, SLOT ( resetFocusToList() )); 922 QTimer::singleShot( 100, this, SLOT ( resetFocusToList() ));
909} 923}
910void KOTodoView::resetFocusToList() 924void KOTodoView::resetFocusToList()
911{ 925{
912 topLevelWidget()->setActiveWindow(); 926 topLevelWidget()->setActiveWindow();
913 mTodoListView->setFocus(); 927 mTodoListView->setFocus();
914} 928}
915//Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; 929//Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove;
916bool KOTodoView::checkTodo( Todo * todo ) 930bool KOTodoView::checkTodo( Todo * todo )
917{ 931{
918 932
919 if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) 933 if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() )
920 return false; 934 return false;
921 if ( !todo->isCompleted() ) { 935 if ( !todo->isCompleted() ) {
922 if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) 936 if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() )
923 return true; 937 return true;
924 } 938 }
925 if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { 939 if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) {
926 if ( todo->hasStartDate() ) 940 if ( todo->hasStartDate() )
927 if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) 941 if ( mNavigator->selectedDates().last() < todo->dtStart().date() )
928 return false; 942 return false;
929 if ( todo->hasDueDate() ) 943 if ( todo->hasDueDate() )
930 if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) 944 if ( mNavigator->selectedDates().first() > todo->dtDue().date() )
931 return false; 945 return false;
932 } 946 }
933 return true; 947 return true;
934} 948}
935 949
936void KOTodoView::restoreItemState( QListViewItem *item ) 950void KOTodoView::restoreItemState( QListViewItem *item )
937{ 951{
938 pendingSubtodo = 0; 952 pendingSubtodo = 0;
939 while( item ) { 953 while( item ) {
940 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 954 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
941 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); 955 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) );
942 if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); 956 if( item->childCount() > 0 ) restoreItemState( item->firstChild() );
943 item = item->nextSibling(); 957 item = item->nextSibling();
944 } 958 }
945} 959}
946 960
947 961
948QMap<Todo *,KOTodoViewItem *>::ConstIterator 962QMap<Todo *,KOTodoViewItem *>::ConstIterator
949KOTodoView::insertTodoItem(Todo *todo) 963KOTodoView::insertTodoItem(Todo *todo)
950{ 964{
951 965
952 // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; 966 // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
953 // TODO: Check, if dynmaic cast is necessary 967 // TODO: Check, if dynmaic cast is necessary
954 968
955 pendingSubtodo = 0; 969 pendingSubtodo = 0;
956 Incidence *incidence = todo->relatedTo(); 970 Incidence *incidence = todo->relatedTo();
957 while ( incidence && !incidence->calEnabled() ) 971 while ( incidence && !incidence->calEnabled() )
958 incidence = incidence->relatedTo(); 972 incidence = incidence->relatedTo();
959 if (incidence && incidence->typeID() == todoID ) { 973 if (incidence && incidence->typeID() == todoID ) {
960 Todo *relatedTodo = static_cast<Todo *>(incidence); 974 Todo *relatedTodo = static_cast<Todo *>(incidence);
961 975
962 // kdDebug() << " has Related" << endl; 976 // kdDebug() << " has Related" << endl;
963 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 977 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
964 itemIterator = mTodoMap.find(relatedTodo); 978 itemIterator = mTodoMap.find(relatedTodo);
965 if (itemIterator == mTodoMap.end()) { 979 if (itemIterator == mTodoMap.end()) {
966 // kdDebug() << " related not yet in list" << endl; 980 // kdDebug() << " related not yet in list" << endl;
967 itemIterator = insertTodoItem (relatedTodo); 981 itemIterator = insertTodoItem (relatedTodo);
968 } 982 }
969 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem 983 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem
970 // and one into the map. Sure finding is more easy but why? -zecke 984 // and one into the map. Sure finding is more easy but why? -zecke
971 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); 985 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
972 return mTodoMap.insert(todo,todoItem); 986 return mTodoMap.insert(todo,todoItem);
973 } else { 987 } else {
974 // kdDebug() << " no Related" << endl; 988 // kdDebug() << " no Related" << endl;
975 // see above -zecke 989 // see above -zecke
976 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 990 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
977 return mTodoMap.insert(todo,todoItem); 991 return mTodoMap.insert(todo,todoItem);
978 } 992 }
979} 993}
980 994
981 995
982void KOTodoView::updateConfig() 996void KOTodoView::updateConfig()
983{ 997{
984 updateView(); 998 updateView();
985 mTodoListView->repaintContents(); 999 mTodoListView->repaintContents();
986} 1000}
987 1001
988QPtrList<Incidence> KOTodoView::selectedIncidences() 1002QPtrList<Incidence> KOTodoView::selectedIncidences()
989{ 1003{
990 QPtrList<Incidence> selected; 1004 QPtrList<Incidence> selected;
991 1005
992 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 1006 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
993// if (!item) item = mActiveItem; 1007// if (!item) item = mActiveItem;
994 if (item) selected.append(item->todo()); 1008 if (item) selected.append(item->todo());
995 1009
996 return selected; 1010 return selected;
997} 1011}
998 1012
999QPtrList<Todo> KOTodoView::selectedTodos() 1013QPtrList<Todo> KOTodoView::selectedTodos()
1000{ 1014{
1001 QPtrList<Todo> selected; 1015 QPtrList<Todo> selected;
1002 1016
1003 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 1017 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
1004// if (!item) item = mActiveItem; 1018// if (!item) item = mActiveItem;
1005 if (item) selected.append(item->todo()); 1019 if (item) selected.append(item->todo());
1006 1020
1007 return selected; 1021 return selected;
1008} 1022}
1009 1023
1010void KOTodoView::changeEventDisplay(Event *, int) 1024void KOTodoView::changeEventDisplay(Event *, int)
1011{ 1025{
1012 updateView(); 1026 updateView();
1013} 1027}
1014 1028
1015void KOTodoView::showDates(const QDate &, const QDate &) 1029void KOTodoView::showDates(const QDate &, const QDate &)
1016{ 1030{
1017} 1031}
1018 1032
1019void KOTodoView::showEvents(QPtrList<Event>) 1033void KOTodoView::showEvents(QPtrList<Event>)
1020{ 1034{
1021 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; 1035 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl;
1022} 1036}
1023 1037
1024void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, 1038void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1025 const QDate &td) 1039 const QDate &td)
1026{ 1040{
1027#ifndef KORG_NOPRINTER 1041#ifndef KORG_NOPRINTER
1028 calPrinter->preview(CalPrinter::Todolist, fd, td); 1042 calPrinter->preview(CalPrinter::Todolist, fd, td);
1029#endif 1043#endif
1030} 1044}
1031 1045
1032void KOTodoView::editItem(QListViewItem *item ) 1046void KOTodoView::editItem(QListViewItem *item )
1033{ 1047{
1034 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 1048 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
1035} 1049}
1036 1050
1037void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 1051void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
1038{ 1052{
1039 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 1053 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
1040} 1054}
1041 1055
1042void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) 1056void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
1043{ 1057{
1044 pendingSubtodo = 0; 1058 pendingSubtodo = 0;
1045 mActiveItem = (KOTodoViewItem *)item; 1059 mActiveItem = (KOTodoViewItem *)item;
1046 if (item) { 1060 if (item) {
1047 switch (column){ 1061 switch (column){
1048 case 1: 1062 case 1:
1049 mPriorityPopupMenu->popup(QCursor::pos ()); break; 1063 mPriorityPopupMenu->popup(QCursor::pos ()); break;
1050 case 2: 1064 case 2:
1051 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; 1065 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break;
1052 case 3: 1066 case 3:
1053 moveTodo(); 1067 moveTodo();
1054 break; 1068 break;
1055 case 8: 1069 case 8:
1056 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; 1070 mCategoryPopupMenu->popup(QCursor::pos ()); break;
1071 case 9:
1072 mCalPopupMenu->popup(QCursor::pos ()); break;
1057 default: 1073 default:
1058 mItemPopupMenu->popup(QCursor::pos()); 1074 mItemPopupMenu->popup(QCursor::pos());
1059 } 1075 }
1060 } else mPopupMenu->popup(QCursor::pos()); 1076 } else mPopupMenu->popup(QCursor::pos());
1061} 1077}
1062void KOTodoView::newTodo() 1078void KOTodoView::newTodo()
1063{ 1079{
1064 emit newTodoSignal(); 1080 emit newTodoSignal();
1065} 1081}
1066 1082
1067void KOTodoView::newSubTodo() 1083void KOTodoView::newSubTodo()
1068{ 1084{
1069 if (mActiveItem) { 1085 if (mActiveItem) {
1070 emit newSubTodoSignal(mActiveItem->todo()); 1086 emit newSubTodoSignal(mActiveItem->todo());
1071 } 1087 }
1072} 1088}
1073void KOTodoView::unparentTodo() 1089void KOTodoView::unparentTodo()
1074{ 1090{
1075 if (mActiveItem) { 1091 if (mActiveItem) {
1076 emit unparentTodoSignal(mActiveItem->todo()); 1092 emit unparentTodoSignal(mActiveItem->todo());
1077 } 1093 }
1078} 1094}
1079 1095
1080void KOTodoView::reparentTodo() 1096void KOTodoView::reparentTodo()
1081{ 1097{
1082 if (mActiveItem) { 1098 if (mActiveItem) {
1083 topLevelWidget()->setCaption(i18n("Click on new parent item")); 1099 topLevelWidget()->setCaption(i18n("Click on new parent item"));
1084 pendingSubtodo = mActiveItem; 1100 pendingSubtodo = mActiveItem;
1085 } 1101 }
1086} 1102}
1087void KOTodoView::editTodo() 1103void KOTodoView::editTodo()
1088{ 1104{
1089 if (mActiveItem) { 1105 if (mActiveItem) {
1090 emit editTodoSignal(mActiveItem->todo()); 1106 emit editTodoSignal(mActiveItem->todo());
1091 } 1107 }
1092} 1108}
1093void KOTodoView::cloneTodo() 1109void KOTodoView::cloneTodo()
1094{ 1110{
1095 if (mActiveItem) { 1111 if (mActiveItem) {
1096 emit cloneTodoSignal((Incidence*)mActiveItem->todo()); 1112 emit cloneTodoSignal((Incidence*)mActiveItem->todo());
1097 } 1113 }
1098} 1114}
1099void KOTodoView::cancelTodo() 1115void KOTodoView::cancelTodo()
1100{ 1116{
1101 if (mActiveItem) { 1117 if (mActiveItem) {
1102 emit cancelTodoSignal((Incidence*)mActiveItem->todo()); 1118 emit cancelTodoSignal((Incidence*)mActiveItem->todo());
1103 } 1119 }
1104} 1120}
1105void KOTodoView::moveTodo() 1121void KOTodoView::moveTodo()
1106{ 1122{
1107 if (mActiveItem) { 1123 if (mActiveItem) {
1108 emit moveTodoSignal((Incidence*)mActiveItem->todo()); 1124 emit moveTodoSignal((Incidence*)mActiveItem->todo());
1109 } 1125 }
1110} 1126}
1111void KOTodoView::beamTodo() 1127void KOTodoView::beamTodo()
1112{ 1128{
1113 if (mActiveItem) { 1129 if (mActiveItem) {
1114 emit beamTodoSignal((Incidence*)mActiveItem->todo()); 1130 emit beamTodoSignal((Incidence*)mActiveItem->todo());
1115 } 1131 }
1116} 1132}
1117 1133
1118 1134
1119void KOTodoView::showTodo() 1135void KOTodoView::showTodo()
1120{ 1136{
1121 if (mActiveItem) { 1137 if (mActiveItem) {
1122 emit showTodoSignal(mActiveItem->todo()); 1138 emit showTodoSignal(mActiveItem->todo());
1123 } 1139 }
1124} 1140}
1125 1141
1126void KOTodoView::deleteTodo() 1142void KOTodoView::deleteTodo()
1127{ 1143{
1128 if (mActiveItem) { 1144 if (mActiveItem) {
1129 emit deleteTodoSignal(mActiveItem->todo()); 1145 emit deleteTodoSignal(mActiveItem->todo());
1130 } 1146 }
1131} 1147}
1132 1148
1133void KOTodoView::setNewPriority(int index) 1149void KOTodoView::setNewPriority(int index)
1134{ 1150{
1135 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1151 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1136 mActiveItem->todo()->setPriority(mPriority[index]); 1152 mActiveItem->todo()->setPriority(mPriority[index]);
1137 mActiveItem->construct(); 1153 mActiveItem->construct();
1138 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); 1154 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
1139 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1155 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1140 } 1156 }
1141} 1157}
1142 1158
1143void KOTodoView::setNewPercentage(int index) 1159void KOTodoView::setNewPercentage(int index)
1144{ 1160{
1145 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1161 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1146 1162
1147 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { 1163 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
1148 mActiveItem->setOn( true ); 1164 mActiveItem->setOn( true );
1149 return; 1165 return;
1150 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { 1166 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
1151 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); 1167 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
1152 if ( par && par->isOn() ) 1168 if ( par && par->isOn() )
1153 par->setOn( false ); 1169 par->setOn( false );
1154 } 1170 }
1155 if (mPercentage[index] == 100) { 1171 if (mPercentage[index] == 100) {
1156 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 1172 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
1157 } else { 1173 } else {
1158 mActiveItem->todo()->setCompleted(false); 1174 mActiveItem->todo()->setCompleted(false);
1159 } 1175 }
1160 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 1176 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
1161 mActiveItem->construct(); 1177 mActiveItem->construct();
1162 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 1178 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
1163 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1179 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1164 } 1180 }
1165} 1181}
1166 1182
1167 1183void KOTodoView::fillCategories ()
1168QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
1169{ 1184{
1170 if ( !mCategoryPopupMenu ) {
1171 mCategoryPopupMenu = new QPopupMenu (this);
1172 mCategoryPopupMenu->setCheckable (true);
1173 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
1174 }
1175 mCategoryPopupMenu->clear(); 1185 mCategoryPopupMenu->clear();
1176 QStringList checkedCategories = todoItem->todo()->categories (); 1186 if ( ! mActiveItem ) return;
1177 1187 QStringList checkedCategories = mActiveItem->todo()->categories ();
1178 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 1188 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
1179 it != KOPrefs::instance()->mCustomCategories.end (); 1189 it != KOPrefs::instance()->mCustomCategories.end ();
1180 ++it) { 1190 ++it) {
1181 int index = mCategoryPopupMenu->insertItem (*it); 1191 int index = mCategoryPopupMenu->insertItem (*it);
1182 mCategory[index] = *it; 1192 mCategory[index] = *it;
1183 if (checkedCategories.find (*it) != checkedCategories.end ()) mCategoryPopupMenu->setItemChecked (index, true); 1193 if (checkedCategories.find (*it) != checkedCategories.end ()) mCategoryPopupMenu->setItemChecked (index, true);
1184 } 1194 }
1185 return mCategoryPopupMenu; 1195}
1196void KOTodoView::fillCal ()
1197{
1198 mCalPopupMenu->clear();
1199 if (!mActiveItem) return;
1200 bool readO = mActiveItem->todo()->isReadOnly();
1201 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
1202 while ( kkf ) {
1203 int index = mCalPopupMenu->insertItem( kkf->mName, kkf->mCalNumber);
1204 if ( kkf->mErrorOnLoad || kkf->isReadOnly || readO )
1205 mCalPopupMenu->setItemEnabled( index, false );
1206 mCalPopupMenu->setItemChecked (index, kkf->mCalNumber == mActiveItem->todo()->calID());
1207 kkf = KOPrefs::instance()->mCalendars.next();
1208 }
1209}
1210void KOTodoView::changedCal (int index )
1211{
1212 if (!mActiveItem) return;
1213 mActiveItem->todo()->setCalID( index );
1214 mActiveItem->construct();
1186} 1215}
1187void KOTodoView::changedCategories(int index) 1216void KOTodoView::changedCategories(int index)
1188{ 1217{
1189 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1218 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1190 QStringList categories = mActiveItem->todo()->categories (); 1219 QStringList categories = mActiveItem->todo()->categories ();
1191 QString colcat = categories.first(); 1220 QString colcat = categories.first();
1192 if (categories.find (mCategory[index]) != categories.end ()) 1221 if (categories.find (mCategory[index]) != categories.end ())
1193 categories.remove (mCategory[index]); 1222 categories.remove (mCategory[index]);
1194 else 1223 else
1195 categories.insert (categories.end(), mCategory[index]); 1224 categories.insert (categories.end(), mCategory[index]);
1196 categories.sort (); 1225 categories.sort ();
1197 if ( !colcat.isEmpty() ) { 1226 if ( !colcat.isEmpty() ) {
1198 if ( categories.find ( colcat ) != categories.end () ) { 1227 if ( categories.find ( colcat ) != categories.end () ) {
1199 categories.remove( colcat ); 1228 categories.remove( colcat );
1200 categories.prepend( colcat ); 1229 categories.prepend( colcat );
1201 } 1230 }
1202 } 1231 }
1203 mActiveItem->todo()->setCategories (categories); 1232 mActiveItem->todo()->setCategories (categories);
1204 mActiveItem->construct(); 1233 mActiveItem->construct();
1205 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1234 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1206 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); 1235 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
1207 } 1236 }
1208} 1237}
1209void KOTodoView::itemDoubleClicked(QListViewItem *item) 1238void KOTodoView::itemDoubleClicked(QListViewItem *item)
1210{ 1239{
1211 if ( pendingSubtodo != 0 ) { 1240 if ( pendingSubtodo != 0 ) {
1212 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1241 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1213 } 1242 }
1214 pendingSubtodo = 0; 1243 pendingSubtodo = 0;
1215 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1244 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1216 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); 1245 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() );
1217 //qDebug("ROW %d ", row); 1246 //qDebug("ROW %d ", row);
1218 if (!item) { 1247 if (!item) {
1219 newTodo(); 1248 newTodo();
1220 return; 1249 return;
1221 } else { 1250 } else {
1222 if ( row == 1 ) { 1251 if ( row == 1 ) {
1223 mActiveItem = (KOTodoViewItem *) item; 1252 mActiveItem = (KOTodoViewItem *) item;
1224 newSubTodo(); 1253 newSubTodo();
1225 return; 1254 return;
1226 } 1255 }
1227 if ( row == 5 || row == 6 || row == 2) { 1256 if ( row == 5 || row == 6 || row == 2) {
1228 mActiveItem = (KOTodoViewItem *) item; 1257 mActiveItem = (KOTodoViewItem *) item;
1229 Todo * t = mActiveItem->todo(); 1258 Todo * t = mActiveItem->todo();
1230 if ( t->isRunning() ) { 1259 if ( t->isRunning() ) {
1231 if ( t->runTime() < 15) { 1260 if ( t->runTime() < 15) {
1232 t->stopRunning(); 1261 t->stopRunning();
1233 mActiveItem->construct(); 1262 mActiveItem->construct();
1234 topLevelWidget()->setCaption(i18n("Todo stopped - no data saved because runtime was < 15 sec!")); 1263 topLevelWidget()->setCaption(i18n("Todo stopped - no data saved because runtime was < 15 sec!"));
1235 return; 1264 return;
1236 } 1265 }
1237 else 1266 else
1238 toggleRunningItem(); 1267 toggleRunningItem();
1239 return; 1268 return;
1240 } else { 1269 } else {
1241 t->setRunning( true ); 1270 t->setRunning( true );
1242 mActiveItem->construct(); 1271 mActiveItem->construct();
1243 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!")); 1272 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!"));
1244 return; 1273 return;
1245 } 1274 }
1246 } 1275 }
1247 } 1276 }
1248 if ( KOPrefs::instance()->mEditOnDoubleClick ) 1277 if ( KOPrefs::instance()->mEditOnDoubleClick )
1249 editItem( item ); 1278 editItem( item );
1250 else 1279 else
1251 showItem( item , QPoint(), 0 ); 1280 showItem( item , QPoint(), 0 );
1252} 1281}
1253void KOTodoView::toggleRunningItem() 1282void KOTodoView::toggleRunningItem()
1254{ 1283{
1255 // qDebug("KOTodoView::toggleRunning() "); 1284 // qDebug("KOTodoView::toggleRunning() ");
1256 if ( ! mActiveItem ) 1285 if ( ! mActiveItem )
1257 return; 1286 return;
1258 Todo * t = mActiveItem->todo(); 1287 Todo * t = mActiveItem->todo();
1259 if ( t->isRunning() ) { 1288 if ( t->isRunning() ) {
1260 KOStopTodoPrefs tp ( t, this ); 1289 KOStopTodoPrefs tp ( t, this );
1261 if (QApplication::desktop()->width() <= 800 ){ 1290 if (QApplication::desktop()->width() <= 800 ){
1262 int wid = tp.width(); 1291 int wid = tp.width();
1263 int hei = tp.height(); 1292 int hei = tp.height();
1264 int xx = (QApplication::desktop()->width()-wid)/2; 1293 int xx = (QApplication::desktop()->width()-wid)/2;
1265 int yy = (QApplication::desktop()->height()-hei)/2; 1294 int yy = (QApplication::desktop()->height()-hei)/2;
1266 tp.setGeometry( xx,yy,wid,hei ); 1295 tp.setGeometry( xx,yy,wid,hei );
1267 } 1296 }
1268 tp.exec(); 1297 tp.exec();
1269 mActiveItem->construct(); 1298 mActiveItem->construct();
1270 } else { 1299 } else {
1271 KOStartTodoPrefs tp ( t->summary(), this ); 1300 KOStartTodoPrefs tp ( t->summary(), this );
1272 if (QApplication::desktop()->width() <= 800 ){ 1301 if (QApplication::desktop()->width() <= 800 ){
1273 int wid = tp.width(); 1302 int wid = tp.width();
1274 int hei = tp.height(); 1303 int hei = tp.height();
1275 int xx = (QApplication::desktop()->width()-wid)/2; 1304 int xx = (QApplication::desktop()->width()-wid)/2;
1276 int yy = (QApplication::desktop()->height()-hei)/2; 1305 int yy = (QApplication::desktop()->height()-hei)/2;
1277 tp.setGeometry( xx,yy,wid,hei ); 1306 tp.setGeometry( xx,yy,wid,hei );
1278 } 1307 }
1279 if ( !tp.exec() ) return; 1308 if ( !tp.exec() ) return;
1280 if ( tp.stopAll() ) { 1309 if ( tp.stopAll() ) {
1281 mCalendar->stopAllTodos(); 1310 mCalendar->stopAllTodos();
1282 t->setRunning( true ); 1311 t->setRunning( true );
1283 updateView(); 1312 updateView();
1284 } else { 1313 } else {
1285 t->setRunning( true ); 1314 t->setRunning( true );
1286 mActiveItem->construct(); 1315 mActiveItem->construct();
1287 } 1316 }
1288 } 1317 }
1289} 1318}
1290 1319
1291void KOTodoView::itemClicked(QListViewItem *item) 1320void KOTodoView::itemClicked(QListViewItem *item)
1292{ 1321{
1293 //qDebug("KOTodoView::itemClicked %d", item); 1322 //qDebug("KOTodoView::itemClicked %d", item);
1294 if (!item) { 1323 if (!item) {
1295 if ( pendingSubtodo != 0 ) { 1324 if ( pendingSubtodo != 0 ) {
1296 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1325 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1297 } 1326 }
1298 pendingSubtodo = 0; 1327 pendingSubtodo = 0;
1299 return; 1328 return;
1300 } 1329 }
1301 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1330 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1302 if ( pendingSubtodo != 0 ) { 1331 if ( pendingSubtodo != 0 ) {
1303 bool allowReparent = true; 1332 bool allowReparent = true;
1304 QListViewItem *par = item; 1333 QListViewItem *par = item;
1305 while ( par ) { 1334 while ( par ) {
1306 if ( par == pendingSubtodo ) { 1335 if ( par == pendingSubtodo ) {
1307 allowReparent = false; 1336 allowReparent = false;
1308 break; 1337 break;
1309 } 1338 }
1310 par = par->parent(); 1339 par = par->parent();
1311 } 1340 }
1312 if ( !allowReparent ) { 1341 if ( !allowReparent ) {
1313 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); 1342 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
1314 pendingSubtodo = 0; 1343 pendingSubtodo = 0;
1315 } else { 1344 } else {
1316 Todo* newParent = todoItem->todo(); 1345 Todo* newParent = todoItem->todo();
1317 Todo* newSub = pendingSubtodo->todo(); 1346 Todo* newSub = pendingSubtodo->todo();
1318 pendingSubtodo = 0; 1347 pendingSubtodo = 0;
1319 emit reparentTodoSignal( newParent,newSub ); 1348 emit reparentTodoSignal( newParent,newSub );
1320 return; 1349 return;
1321 } 1350 }
1322 } 1351 }
1323 1352
1324} 1353}
1325 1354
1326void KOTodoView::setDocumentId( const QString &id ) 1355void KOTodoView::setDocumentId( const QString &id )
1327{ 1356{
1328 1357
1329 mDocPrefs->setDoc( id ); 1358 mDocPrefs->setDoc( id );
1330} 1359}
1331 1360
1332void KOTodoView::itemStateChanged( QListViewItem *item ) 1361void KOTodoView::itemStateChanged( QListViewItem *item )
1333{ 1362{
1334 if (!item) return; 1363 if (!item) return;
1335 1364
1336 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1365 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1337 1366
1338// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; 1367// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl;
1339 1368
1340 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); 1369 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() );
1341} 1370}
1342 1371
1343void KOTodoView::saveLayout(KConfig *config, const QString &group) const 1372void KOTodoView::saveLayout(KConfig *config, const QString &group) const
1344{ 1373{
1345 mTodoListView->saveLayout(config,group); 1374 mTodoListView->saveLayout(config,group);
1346} 1375}
1347 1376
1348void KOTodoView::restoreLayout(KConfig *config, const QString &group) 1377void KOTodoView::restoreLayout(KConfig *config, const QString &group)
1349{ 1378{
1350 mTodoListView->restoreLayout(config,group); 1379 mTodoListView->restoreLayout(config,group);
1351} 1380}
1352 1381
1353void KOTodoView::processSelectionChange() 1382void KOTodoView::processSelectionChange()
1354{ 1383{
1355// kdDebug() << "KOTodoView::processSelectionChange()" << endl; 1384// kdDebug() << "KOTodoView::processSelectionChange()" << endl;
1356 1385
1357 KOTodoViewItem *item = 1386 KOTodoViewItem *item =
1358 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); 1387 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() );
1359 1388
1360 if ( !item ) { 1389 if ( !item ) {
1361 emit incidenceSelected( 0 ); 1390 emit incidenceSelected( 0 );
1362 } else { 1391 } else {
1363 emit incidenceSelected( item->todo() ); 1392 emit incidenceSelected( item->todo() );
1364 } 1393 }
1365} 1394}
1366 1395
1367void KOTodoView::modified(bool b) 1396void KOTodoView::modified(bool b)
1368{ 1397{
1369 emit isModified(b); 1398 emit isModified(b);
1370} 1399}
1371void KOTodoView::setTodoModified( Todo* todo ) 1400void KOTodoView::setTodoModified( Todo* todo )
1372{ 1401{
1373 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); 1402 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED );
1374} 1403}
1375void KOTodoView::clearSelection() 1404void KOTodoView::clearSelection()
1376{ 1405{
1377 mTodoListView->selectAll( false ); 1406 mTodoListView->selectAll( false );
1378} 1407}
1379void KOTodoView::setAllOpen() 1408void KOTodoView::setAllOpen()
1380{ 1409{
1381 if ( isFlatDisplay ) { 1410 if ( isFlatDisplay ) {
1382 isFlatDisplay = false; 1411 isFlatDisplay = false;
1383 mPopupMenu->setItemChecked( 8,false ); 1412 mPopupMenu->setItemChecked( 8,false );
1384 updateView(); 1413 updateView();
1385 } else { 1414 } else {
1386 storeCurrentItem(); 1415 storeCurrentItem();
1387 } 1416 }
1388 setOpen(mTodoListView->firstChild(), true); 1417 setOpen(mTodoListView->firstChild(), true);
1389 resetCurrentItem(); 1418 resetCurrentItem();
1390} 1419}
1391void KOTodoView::setAllClose() 1420void KOTodoView::setAllClose()
1392{ 1421{
1393 if ( isFlatDisplay ) { 1422 if ( isFlatDisplay ) {
1394 isFlatDisplay = false; 1423 isFlatDisplay = false;
1395 mPopupMenu->setItemChecked( 8,false ); 1424 mPopupMenu->setItemChecked( 8,false );
1396 updateView(); 1425 updateView();
1397 } else { 1426 } else {
1398 storeCurrentItem(); 1427 storeCurrentItem();
1399 } 1428 }
1400 setOpen(mTodoListView->firstChild(), false); 1429 setOpen(mTodoListView->firstChild(), false);
1401 resetCurrentItem(); 1430 resetCurrentItem();
1402} 1431}
1403void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1432void KOTodoView::setOpen( QListViewItem* item, bool setOpenI)
1404{ 1433{
1405 1434
1406 while ( item ) { 1435 while ( item ) {
1407 setOpen( item->firstChild(), setOpenI ); 1436 setOpen( item->firstChild(), setOpenI );
1408 item->setOpen( setOpenI ); 1437 item->setOpen( setOpenI );
1409 item = item->nextSibling(); 1438 item = item->nextSibling();
1410 } 1439 }
1411} 1440}
1412 1441
1413void KOTodoView::displayAllFlat() 1442void KOTodoView::displayAllFlat()
1414{ 1443{
1415 storeCurrentItem(); 1444 storeCurrentItem();
1416 pendingSubtodo = 0; 1445 pendingSubtodo = 0;
1417 if ( mBlockUpdate ) { 1446 if ( mBlockUpdate ) {
1418 return; 1447 return;
1419 } 1448 }
1420 mPopupMenu->setItemChecked( 8,true ); 1449 mPopupMenu->setItemChecked( 8,true );
1421 isFlatDisplay = true; 1450 isFlatDisplay = true;
1422 QPtrList<Todo> todoList = calendar()->todos(); 1451 QPtrList<Todo> todoList = calendar()->todos();
1423 mTodoMap.clear(); 1452 mTodoMap.clear();
1424 mTodoListView->clear(); 1453 mTodoListView->clear();
1425 Todo *todo; 1454 Todo *todo;
1426 for(todo = todoList.first(); todo; todo = todoList.next()) { 1455 for(todo = todoList.first(); todo; todo = todoList.next()) {
1427 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 1456 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
1428 mTodoMap.insert(todo,todoItem); 1457 mTodoMap.insert(todo,todoItem);
1429 } 1458 }
1430 resetCurrentItem(); 1459 resetCurrentItem();
1431} 1460}
1432 1461
1433void KOTodoView::setAllFlat() 1462void KOTodoView::setAllFlat()
1434{ 1463{
1435 if ( isFlatDisplay ) { 1464 if ( isFlatDisplay ) {
1436 isFlatDisplay = false; 1465 isFlatDisplay = false;
1437 mPopupMenu->setItemChecked( 8,false ); 1466 mPopupMenu->setItemChecked( 8,false );
1438 updateView(); 1467 updateView();
1439 return; 1468 return;
1440 } 1469 }
1441 displayAllFlat(); 1470 displayAllFlat();
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 9ae7f53..79cc756 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -1,303 +1,305 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOTODOVIEW_H 23#ifndef KOTODOVIEW_H
24#define KOTODOVIEW_H 24#define KOTODOVIEW_H
25 25
26#include <qfont.h> 26#include <qfont.h>
27#include <qfontmetrics.h> 27#include <qfontmetrics.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qptrlist.h> 29#include <qptrlist.h>
30#include <qstrlist.h> 30#include <qstrlist.h>
31#include <qlistbox.h> 31#include <qlistbox.h>
32#include <qpopupmenu.h> 32#include <qpopupmenu.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qmap.h> 34#include <qmap.h>
35#include <qdialog.h> 35#include <qdialog.h>
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qlistview.h> 37#include <qlistview.h>
38#include <klistview.h> 38#include <klistview.h>
39 39
40#include <libkcal/calendar.h> 40#include <libkcal/calendar.h>
41#include <libkcal/todo.h> 41#include <libkcal/todo.h>
42 42
43#include <korganizer/baseview.h> 43#include <korganizer/baseview.h>
44 44
45#include "kotodoviewitem.h" 45#include "kotodoviewitem.h"
46#include "koprefs.h" 46#include "koprefs.h"
47#include "koglobals.h" 47#include "koglobals.h"
48#include "datenavigator.h" 48#include "datenavigator.h"
49 49
50class QDragEnterEvent; 50class QDragEnterEvent;
51class QDragMoveEvent; 51class QDragMoveEvent;
52class QDragLeaveEvent; 52class QDragLeaveEvent;
53class QDropEvent; 53class QDropEvent;
54class KOTodoViewWhatsThis; 54class KOTodoViewWhatsThis;
55class KDateEdit; 55class KDateEdit;
56class KOTimeEdit; 56class KOTimeEdit;
57 57
58class DocPrefs; 58class DocPrefs;
59 59
60 60
61class KOStopTodoPrefs : public QDialog 61class KOStopTodoPrefs : public QDialog
62{ 62{
63 Q_OBJECT 63 Q_OBJECT
64 public: 64 public:
65 KOStopTodoPrefs( Todo* todo, QWidget *parent=0, const char *name=0 ) ; 65 KOStopTodoPrefs( Todo* todo, QWidget *parent=0, const char *name=0 ) ;
66 66
67 67
68private slots: 68private slots:
69 void doNotSave(); 69 void doNotSave();
70 void accept(); 70 void accept();
71private: 71private:
72 Todo* mTodo; 72 Todo* mTodo;
73 QLineEdit* mComment; 73 QLineEdit* mComment;
74 KDateEdit *sde, *ede; 74 KDateEdit *sde, *ede;
75 KOTimeEdit *ste, *ete; 75 KOTimeEdit *ste, *ete;
76 76
77}; 77};
78 78
79class KOStartTodoPrefs : public QDialog 79class KOStartTodoPrefs : public QDialog
80{ 80{
81 Q_OBJECT 81 Q_OBJECT
82 public: 82 public:
83 KOStartTodoPrefs( QString sum, QWidget *parent=0, const char *name=0 ) ; 83 KOStartTodoPrefs( QString sum, QWidget *parent=0, const char *name=0 ) ;
84 84
85 bool stopAll() { return mStopAll; } 85 bool stopAll() { return mStopAll; }
86private slots: 86private slots:
87 void doStop(); 87 void doStop();
88private: 88private:
89 bool mStopAll; 89 bool mStopAll;
90 90
91}; 91};
92 92
93class KOTodoListView : public KListView 93class KOTodoListView : public KListView
94{ 94{
95 Q_OBJECT 95 Q_OBJECT
96 public: 96 public:
97 KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); 97 KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0);
98 virtual ~KOTodoListView() {} 98 virtual ~KOTodoListView() {}
99 99
100 signals: 100 signals:
101 void paintNeeded(); 101 void paintNeeded();
102 void todoDropped(Todo *, int); 102 void todoDropped(Todo *, int);
103 void double_Clicked(QListViewItem *item); 103 void double_Clicked(QListViewItem *item);
104 void reparentTodoSignal( Todo *,Todo * ); 104 void reparentTodoSignal( Todo *,Todo * );
105 void unparentTodoSignal(Todo *); 105 void unparentTodoSignal(Todo *);
106 void deleteTodo( Todo * ); 106 void deleteTodo( Todo * );
107 protected: 107 protected:
108 void wheelEvent (QWheelEvent *e); 108 void wheelEvent (QWheelEvent *e);
109 void contentsDragEnterEvent(QDragEnterEvent *); 109 void contentsDragEnterEvent(QDragEnterEvent *);
110 void contentsDragMoveEvent(QDragMoveEvent *); 110 void contentsDragMoveEvent(QDragMoveEvent *);
111 void contentsDragLeaveEvent(QDragLeaveEvent *); 111 void contentsDragLeaveEvent(QDragLeaveEvent *);
112 void contentsDropEvent(QDropEvent *); 112 void contentsDropEvent(QDropEvent *);
113 113
114 void contentsMousePressEvent(QMouseEvent *); 114 void contentsMousePressEvent(QMouseEvent *);
115 void contentsMouseMoveEvent(QMouseEvent *); 115 void contentsMouseMoveEvent(QMouseEvent *);
116 void contentsMouseReleaseEvent(QMouseEvent *); 116 void contentsMouseReleaseEvent(QMouseEvent *);
117 void contentsMouseDoubleClickEvent(QMouseEvent *); 117 void contentsMouseDoubleClickEvent(QMouseEvent *);
118 118
119 private: 119 private:
120 void paintEvent(QPaintEvent * pevent); 120 void paintEvent(QPaintEvent * pevent);
121 bool internalDrop; 121 bool internalDrop;
122 QString mName; 122 QString mName;
123 Calendar *mCalendar; 123 Calendar *mCalendar;
124 QPoint mPressPos; 124 QPoint mPressPos;
125 bool mMousePressed; 125 bool mMousePressed;
126 QListViewItem *mOldCurrent; 126 QListViewItem *mOldCurrent;
127 bool mFlagKeyPressed; 127 bool mFlagKeyPressed;
128 void keyPressEvent ( QKeyEvent * ) ; 128 void keyPressEvent ( QKeyEvent * ) ;
129 void keyReleaseEvent ( QKeyEvent * ) ; 129 void keyReleaseEvent ( QKeyEvent * ) ;
130}; 130};
131 131
132 132
133/** 133/**
134 This is the line-edit on top of the todoview for fast addition of new todos 134 This is the line-edit on top of the todoview for fast addition of new todos
135*/ 135*/
136class KOQuickTodo : public QLineEdit 136class KOQuickTodo : public QLineEdit
137{ 137{
138 public: 138 public:
139 KOQuickTodo(QWidget *parent=0); 139 KOQuickTodo(QWidget *parent=0);
140 protected: 140 protected:
141 void focusInEvent(QFocusEvent *ev); 141 void focusInEvent(QFocusEvent *ev);
142 void focusOutEvent(QFocusEvent *ev); 142 void focusOutEvent(QFocusEvent *ev);
143}; 143};
144 144
145 145
146/** 146/**
147 This class provides a multi-column list view of todo events. 147 This class provides a multi-column list view of todo events.
148 148
149 @short multi-column list view of todo events. 149 @short multi-column list view of todo events.
150 @author Cornelius Schumacher <schumacher@kde.org> 150 @author Cornelius Schumacher <schumacher@kde.org>
151*/ 151*/
152class KOTodoView : public KOrg::BaseView 152class KOTodoView : public KOrg::BaseView
153{ 153{
154 Q_OBJECT 154 Q_OBJECT
155 public: 155 public:
156 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); 156 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 );
157 ~KOTodoView(); 157 ~KOTodoView();
158 158
159 QPtrList<Incidence> selectedIncidences(); 159 QPtrList<Incidence> selectedIncidences();
160 QPtrList<Todo> selectedTodos(); 160 QPtrList<Todo> selectedTodos();
161 161
162 DateList selectedDates() 162 DateList selectedDates()
163 {DateList q; 163 {DateList q;
164 return q;} 164 return q;}
165 165
166 /** Return number of shown dates. TodoView does not show dates, */ 166 /** Return number of shown dates. TodoView does not show dates, */
167 int currentDateCount() { return 0; } 167 int currentDateCount() { return 0; }
168 168
169 void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); 169 void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td);
170 170
171 void setDocumentId( const QString & ); 171 void setDocumentId( const QString & );
172 172
173 void saveLayout(KConfig *config, const QString &group) const; 173 void saveLayout(KConfig *config, const QString &group) const;
174 void restoreLayout(KConfig *config, const QString &group); 174 void restoreLayout(KConfig *config, const QString &group);
175 /** Create a popup menu to set categories */
176 QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem);
177 void setNavigator( DateNavigator* nav ) {mNavigator = nav;} 175 void setNavigator( DateNavigator* nav ) {mNavigator = nav;}
178 QString getWhatsThisText(QPoint p); 176 QString getWhatsThisText(QPoint p);
179 void clearList() {mTodoListView->clear(); } 177 void clearList() {mTodoListView->clear(); }
180 178
181 public slots: 179 public slots:
182 void updateView(); 180 void updateView();
183 void updateConfig(); 181 void updateConfig();
184 182
185 void changeEventDisplay(Event *, int); 183 void changeEventDisplay(Event *, int);
186 184
187 void showDates(const QDate &start, const QDate &end); 185 void showDates(const QDate &start, const QDate &end);
188 void showEvents(QPtrList<Event> eventList); 186 void showEvents(QPtrList<Event> eventList);
189 187
190 void clearSelection(); 188 void clearSelection();
191 void jumpToDate (); 189 void jumpToDate ();
192 190
193 void editItem(QListViewItem *item); 191 void editItem(QListViewItem *item);
194 void showItem(QListViewItem *item,const QPoint &,int); 192 void showItem(QListViewItem *item,const QPoint &,int);
195 void popupMenu(QListViewItem *item,const QPoint &,int); 193 void popupMenu(QListViewItem *item,const QPoint &,int);
196 void newTodo(); 194 void newTodo();
197 void newSubTodo(); 195 void newSubTodo();
198 void unparentTodo(); 196 void unparentTodo();
199 void reparentTodo(); 197 void reparentTodo();
200 void showTodo(); 198 void showTodo();
201 void editTodo(); 199 void editTodo();
202 void cloneTodo(); 200 void cloneTodo();
203 void cancelTodo(); 201 void cancelTodo();
204 void moveTodo(); 202 void moveTodo();
205 void beamTodo(); 203 void beamTodo();
206 void deleteTodo(); 204 void deleteTodo();
207 205
208 void setNewPriority(int); 206 void setNewPriority(int);
209 void setNewPercentage(int); 207 void setNewPercentage(int);
210 void changedCategories(int); 208 void changedCategories(int);
211 209
212 void setAllOpen(); 210 void setAllOpen();
213 void setAllClose(); 211 void setAllClose();
214 void setAllFlat(); 212 void setAllFlat();
215 void displayAllFlat(); 213 void displayAllFlat();
216 214
217 void purgeCompleted(); 215 void purgeCompleted();
218 void toggleCompleted(); 216 void toggleCompleted();
219 void toggleRunning(); 217 void toggleRunning();
220 void toggleQuickTodo(); 218 void toggleQuickTodo();
221 void updateTodo( Todo *, int ); 219 void updateTodo( Todo *, int );
222 220
223 void itemClicked(QListViewItem *); 221 void itemClicked(QListViewItem *);
224 void itemStateChanged(QListViewItem *); 222 void itemStateChanged(QListViewItem *);
225 void modified(bool); 223 void modified(bool);
226 void itemDoubleClicked(QListViewItem *item); 224 void itemDoubleClicked(QListViewItem *item);
227 void resetFocusToList(); 225 void resetFocusToList();
226 void fillCategories ();
227 void fillCal ();
228 void changedCal (int);
228 229
229 signals: 230 signals:
230 void newTodoSignal(); 231 void newTodoSignal();
231 void newSubTodoSignal(Todo *); 232 void newSubTodoSignal(Todo *);
232 void unparentTodoSignal(Todo *); 233 void unparentTodoSignal(Todo *);
233 void reparentTodoSignal( Todo *,Todo * ); 234 void reparentTodoSignal( Todo *,Todo * );
234 void showTodoSignal(Todo *); 235 void showTodoSignal(Todo *);
235 236
236 void editTodoSignal(Todo *); 237 void editTodoSignal(Todo *);
237 void deleteTodoSignal(Todo *); 238 void deleteTodoSignal(Todo *);
238 void todoModifiedSignal (Todo *, int); 239 void todoModifiedSignal (Todo *, int);
239 240
240 void isModified(bool); 241 void isModified(bool);
241 void cloneTodoSignal( Incidence * ); 242 void cloneTodoSignal( Incidence * );
242 void cancelTodoSignal( Incidence * ); 243 void cancelTodoSignal( Incidence * );
243 void moveTodoSignal( Incidence * ); 244 void moveTodoSignal( Incidence * );
244 void beamTodoSignal( Incidence * ); 245 void beamTodoSignal( Incidence * );
245 void purgeCompletedSignal(); 246 void purgeCompletedSignal();
246 247
247 protected slots: 248 protected slots:
248 void toggleRunningItem(); 249 void toggleRunningItem();
249 void paintNeeded(); 250 void paintNeeded();
250 void processSelectionChange(); 251 void processSelectionChange();
251 void addQuickTodo(); 252 void addQuickTodo();
252 void setTodoModified( Todo* ); 253 void setTodoModified( Todo* );
253 void todoModified(Todo *, int ); 254 void todoModified(Todo *, int );
254 255
255 private: 256 private:
256 /* 257 /*
257 * the TodoEditor approach is rather unscaling in the long 258 * the TodoEditor approach is rather unscaling in the long
258 * run. 259 * run.
259 * Korganizer keeps it in memory and we need to update 260 * Korganizer keeps it in memory and we need to update
260 * 1. make KOTodoViewItem a QObject again? 261 * 1. make KOTodoViewItem a QObject again?
261 * 2. add a public method for setting one todo modified? 262 * 2. add a public method for setting one todo modified?
262 * 3. add a private method for setting a todo modified + friend here? 263 * 3. add a private method for setting a todo modified + friend here?
263 * -- zecke 2002-07-08 264 * -- zecke 2002-07-08
264 */ 265 */
265 KOTodoViewWhatsThis* mKOTodoViewWhatsThis; 266 KOTodoViewWhatsThis* mKOTodoViewWhatsThis;
266 friend class KOTodoListView; 267 friend class KOTodoListView;
267 void paintEvent(QPaintEvent * pevent); 268 void paintEvent(QPaintEvent * pevent);
268 bool mPendingUpdateBeforeRepaint; 269 bool mPendingUpdateBeforeRepaint;
269 friend class KOTodoViewItem; 270 friend class KOTodoViewItem;
270 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); 271 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
271 void restoreItemState( QListViewItem * ); 272 void restoreItemState( QListViewItem * );
272 273
273 bool checkTodo( Todo * ); 274 bool checkTodo( Todo * );
274 bool isFlatDisplay; 275 bool isFlatDisplay;
275 void setOpen( QListViewItem*, bool setOpen); 276 void setOpen( QListViewItem*, bool setOpen);
276 KOTodoListView *mTodoListView; 277 KOTodoListView *mTodoListView;
277 QPopupMenu *mItemPopupMenu; 278 QPopupMenu *mItemPopupMenu;
278 QPopupMenu *mPopupMenu; 279 QPopupMenu *mPopupMenu;
279 QPopupMenu *mPriorityPopupMenu; 280 QPopupMenu *mPriorityPopupMenu;
280 QPopupMenu *mPercentageCompletedPopupMenu; 281 QPopupMenu *mPercentageCompletedPopupMenu;
281 QPopupMenu *mCategoryPopupMenu; 282 QPopupMenu *mCategoryPopupMenu;
283 QPopupMenu *mCalPopupMenu;
282 284
283 QMap<int, int> mPercentage; 285 QMap<int, int> mPercentage;
284 QMap<int, int> mPriority; 286 QMap<int, int> mPriority;
285 QMap<int, QString> mCategory; 287 QMap<int, QString> mCategory;
286 KOTodoViewItem *mActiveItem; 288 KOTodoViewItem *mActiveItem;
287 289
288 QMap<Todo *,KOTodoViewItem *> mTodoMap; 290 QMap<Todo *,KOTodoViewItem *> mTodoMap;
289 QString mName; 291 QString mName;
290 292
291 DocPrefs *mDocPrefs; 293 DocPrefs *mDocPrefs;
292 QString mCurrentDoc; 294 QString mCurrentDoc;
293 KOQuickTodo *mQuickAdd; 295 KOQuickTodo *mQuickAdd;
294 bool mBlockUpdate; 296 bool mBlockUpdate;
295 void keyPressEvent ( QKeyEvent * ) ; 297 void keyPressEvent ( QKeyEvent * ) ;
296 KOTodoViewItem * pendingSubtodo; 298 KOTodoViewItem * pendingSubtodo;
297 DateNavigator* mNavigator; 299 DateNavigator* mNavigator;
298 void storeCurrentItem(); 300 void storeCurrentItem();
299 void resetCurrentItem(); 301 void resetCurrentItem();
300 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove; 302 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove;
301}; 303};
302 304
303#endif 305#endif