summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-28 10:38:58 (UTC)
committer zautrix <zautrix>2005-07-28 10:38:58 (UTC)
commitfee4c893fe8fd01af1b55c1ccd40213fc18a36b4 (patch) (unidiff)
tree83a3018d54d60e880d441a6f91ef8fe54254aaff
parent27ffa2e08ebb38e71f613af3a214750442418e2c (diff)
downloadkdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.zip
kdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.tar.gz
kdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.tar.bz2
fixxxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt10
-rw-r--r--korganizer/koeditorgeneraltodo.cpp21
-rw-r--r--korganizer/kolistview.cpp71
-rw-r--r--korganizer/mainwindow.cpp5
-rw-r--r--libkcal/alarm.cpp2
-rw-r--r--libkcal/event.cpp8
-rw-r--r--libkcal/event.h1
-rw-r--r--libkcal/incidence.cpp29
-rw-r--r--libkcal/incidence.h3
-rw-r--r--libkcal/todo.cpp10
-rw-r--r--libkcal/todo.h1
11 files changed, 105 insertions, 56 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index f3f5333..ab8339f 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -66,195 +66,195 @@
66{"Ask for every entry on conflict","Frage bei Konflikten nach"}, 66{"Ask for every entry on conflict","Frage bei Konflikten nach"},
67{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, 67{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" },
68{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, 68{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" },
69{ "Attendees","Teilnehmer" }, 69{ "Attendees","Teilnehmer" },
70{ "Aug","Aug" }, 70{ "Aug","Aug" },
71{ "August","August" }, 71{ "August","August" },
72{ "Auto-Save","Automatisches Abspeichern" }, 72{ "Auto-Save","Automatisches Abspeichern" },
73{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, 73{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" },
74{ "Auto saving...","Automatische Sicherung..." }, 74{ "Auto saving...","Automatische Sicherung..." },
75{ "Begin on:","Starte mit:" }, 75{ "Begin on:","Starte mit:" },
76{ "Begins on: %1","Starte mit: %1" }, 76{ "Begins on: %1","Starte mit: %1" },
77{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, 77{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" },
78{ "<b>On:</b> %1","<b>Am:</b> %1" }, 78{ "<b>On:</b> %1","<b>Am:</b> %1" },
79{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, 79{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" },
80{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, 80{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" },
81{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, 81{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" },
82{ "Busy","Belegt" }, 82{ "Busy","Belegt" },
83{ "&Cancel","Abbre&chen" }, 83{ "&Cancel","Abbre&chen" },
84{ "Cancel","Abbrechen" }, 84{ "Cancel","Abbrechen" },
85{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, 85{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" },
86{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, 86{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." },
87{ "Categories...","Kategorien..." }, 87{ "Categories...","Kategorien..." },
88{ "Categories","Kategorien" }, 88{ "Categories","Kategorien" },
89{ "Category","Kategorie" }, 89{ "Category","Kategorie" },
90{ "Center View","Zentriere Ansicht" }, 90{ "Center View","Zentriere Ansicht" },
91{ "Change","Ändere" }, 91{ "Change","Ändere" },
92{ "Cinema","Kino" }, 92{ "Cinema","Kino" },
93{ "Clone Item","Klone Eintrag" }, 93{ "Clone Item","Klone Eintrag" },
94{ "&Close","S&chließen" }, 94{ "&Close","S&chließen" },
95{ "Close","Schließen" }, 95{ "Close","Schließen" },
96{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, 96{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" },
97{ "Colors","Farben" }, 97{ "Colors","Farben" },
98{ "completed","erledigt" }, 98{ "completed","erledigt" },
99{ "completed on %1","erledigt am %1" }, 99{ "completed on %1","erledigt am %1" },
100{ "Complete","Erledigt" }, 100{ "Complete","Erledigt" },
101{ "Confidential","Vertraulich" }, 101{ "Confidential","Vertraulich" },
102{ "Configure...","Einstellungen..." }, 102{ "Configure...","Einstellungen..." },
103{ "Confirm &deletes","Löschvogang bestätigen" }, 103{ "Confirm &deletes","Löschvogang bestätigen" },
104{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, 104{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." },
105{ "Counter-event Viewer","Terminzähler Ansicht" }, 105{ "Counter-event Viewer","Terminzähler Ansicht" },
106{ "Daily ending hour:","Feierabend:" }, 106{ "Daily ending hour:","Feierabend:" },
107{ "Daily starting hour:","Anfangszeit:" }, 107{ "Daily starting hour:","Anfangszeit:" },
108{ "Daily","Täglich" }, 108{ "Daily","Täglich" },
109{ "Date Format","Datums Format" }, 109{ "Date Format","Datums Format" },
110{ "Date Format:","Datums Format:" }, 110{ "Date Format:","Datums Format:" },
111{ "DateNavigator:(nr)","Datums Navigator" }, 111{ "DateNavigator:(nr)","Datums Navigator" },
112{ "Dates: ","Datum: " }, 112{ "Dates: ","Datum: " },
113{ "Date && Time","Datum && Zeit" }, 113{ "Date && Time","Datum && Zeit" },
114{ "Day begins at:","Der Tag beginnt um:" }, 114{ "Day begins at:","Der Tag beginnt um:" },
115{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, 115{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" },
116{ "Days in What's Next:","Tage in What's Next:" }, 116{ "Days in What's Next:","Tage in What's Next:" },
117{ "day(s)","Tag(e)" }, 117{ "day(s)","Tag(e)" },
118{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, 118{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" },
119{ "day","Tag" }, 119{ "day","Tag" },
120{ "Dec","Dez" }, 120{ "Dec","Dez" },
121{ "December","Dezember" }, 121{ "December","Dezember" },
122{ "Default alarm time:","Standard Alarmzeit:" }, 122{ "Default alarm time:","Standard Alarmzeit:" },
123{ "Default appointment time:","Standard Termin Startzeit:" }, 123{ "Default appointment time:","Standard Termin Startzeit:" },
124{ "Default event color:","Standard Terminfarbe:" }, 124{ "Default event color:","Standard Terminfarbe:" },
125{ "Default","Standard" }, 125{ "Default","Standard" },
126{ "Def. duration of new app.:","Standard Termin Länge:" }, 126{ "Def. duration of new app.:","Standard Termin Länge:" },
127{ "Delete All","Lösche alles" }, 127{ "Delete All","Lösche alles" },
128{ "Delete all selected","Lösche alle Selektierten" }, 128{ "Delete all selected","Lösche alle Selektierten" },
129{ "Delete Current","Aktuellen löschen" }, 129{ "Delete Current","Aktuellen löschen" },
130{ "Delete Event...","Lösche Termin..." }, 130{ "Delete Event...","Lösche Termin..." },
131{ "Delete Event","Lösche Termin" }, 131{ "Delete Event","Lösche Termin" },
132{ "&Delete...","Lösche..." }, 132{ "&Delete...","Lösche..." },
133{ "Delete...","Lösche..." }, 133{ "Delete...","Lösche..." },
134{ "Delete","Lösche" }, 134{ "Delete","Lösche" },
135{ "Delete Todo...","Lösche Todo..." }, 135{ "Delete Todo...","Lösche Todo..." },
136{ "Delete To-Do","Lösche Todo" }, 136{ "Delete To-Do","Lösche Todo" },
137{ "Deleting item %d ...","Lösche Eintrag %d..." }, 137{ "Deleting item %d ...","Lösche Eintrag %d..." },
138{ "Descriptions","Beschreibungen" }, 138{ "Descriptions","Beschreibungen" },
139{ "Deselect all","Deselektiere Alle" }, 139{ "Deselect all","Deselektiere Alle" },
140{ "Details","Details" }, 140{ "Details","Details" },
141{ "Dinner","Abendessen" }, 141{ "Dinner","Abendessen" },
142{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, 142{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" },
143{ "Due Date","Fällig am" }, 143{ "Due Date","Fällig am" },
144{ "Due: ","Fällig: "}, 144{ "Due: ","Fällig: "},
145{ "Due Time","Fällig um" }, 145{ "Due Time","Fällig um" },
146{ "Due:","Fällig:"}, 146{ "Due:","Fällig:"},
147{ "Duration: ","Dauer: " }, 147{ "Duration: ","Dauer: " },
148{ "Edit...","Bearbeite..." }, 148{ "Edit...","Bearbeite..." },
149{ "Edit Event...","Bearbeite Termin..." }, 149{ "Edit Event...","Bearbeite Termin..." },
150{ "Edit Event","Bearbeite Termin" }, 150{ "Edit Event","Bearbeite Termin" },
151{ "Edit exceptions","Bearbeite Ausnahmen" }, 151{ "Edit exceptions","Bearbeite Ausnahmen" },
152{ "EditorBox:","Editor Fenster:" }, 152{ "EditorBox:","Editor Fenster:" },
153{ "Edit Recurrence Range","Bearbeite Wiederholung" }, 153{ "Edit Recurrence Range","Bearbeite Wiederholung" },
154{ "Edit Todo...","Berabeite Todo..." }, 154{ "Edit Todo...","Berabeite Todo..." },
155{ "Edit To-Do","Todo bearbeiten" }, 155{ "Edit To-Do","Todo bearbeiten" },
156{ "E&mail address:","E&mail Adresse:" }, 156{ "E&mail address:","E&mail Adresse:" },
157{ "(EmptyEmail)","(KeineEmail)" }, 157{ "(EmptyEmail)","(KeineEmail)" },
158{ "(EmptyName)","(KeinName)" }, 158{ "(EmptyName)","(KeinName)" },
159{ "Enable Recurrence","Wiederholung anschalten" }, 159{ "Enable Recurrence","Wiederholung anschalten" },
160{ "End after","Endet nach"}, 160{ "End after","Endet nach"},
161{ "End by:","Endet am"}, 161{ "End by:","Endet am"},
162{ "End Date","End Datum" }, 162{ "End/Due Date","Ende/Fällig am" },
163{ "End:","Ende:" }, 163{ "End:","Ende:" },
164{ "End Time","End Zeit" }, 164{ "End/Due Time","Ende/Fällig um" },
165{ "English","Englisch" }, 165{ "English","Englisch" },
166{ "Event","Termin" }, 166{ "Event","Termin" },
167{ "Event list","Termin Liste" }, 167{ "Event list","Termin Liste" },
168{ "Events","Termine" }, 168{ "Events","Termine" },
169{ "Event Viewer:","Termin Übersicht:" }, 169{ "Event Viewer:","Termin Übersicht:" },
170{ "every","jede" }, 170{ "every","jede" },
171{ "Exceptions...","Ausnahmen..." }, 171{ "Exceptions...","Ausnahmen..." },
172{ "Exceptions","Ausnahmen" }, 172{ "Exceptions","Ausnahmen" },
173{ "Exclude holidays","Ohne freie Tage" }, 173{ "Exclude holidays","Ohne freie Tage" },
174{ "Exclude Saturdays","Ohne Samstage" }, 174{ "Exclude Saturdays","Ohne Samstage" },
175{ "Feb","Feb" }, 175{ "Feb","Feb" },
176{ "February","Februar" }, 176{ "February","Februar" },
177{ "&Find","Suche!" }, 177{ "&Find","Suche!" },
178{ "Fonts","Schriftart" }, 178{ "Fonts","Schriftart" },
179{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, 179{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" },
180{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, 180{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"},
181{ "Free","Frei" }, 181{ "Free","Frei" },
182{ "Friday","Freitag" }, 182{ "Friday","Freitag" },
183{ "Fri","Fr" }, 183{ "Fri","Fr" },
184{ "From:","Vom:" }, 184{ "From:","Vom:" },
185{ "Full &name:","Vor- und &Nachname:" }, 185{ "Full &name:","Vor- und &Nachname:" },
186{ "General","Allgemein" }, 186{ "General","Allgemein" },
187{ "German","Deutsch" }, 187{ "German","Deutsch" },
188{ "Gifts","Geschenke" }, 188{ "Gifts","Geschenke" },
189{ "Go to Today","Heute anzeigen" }, 189{ "Go to Today","Heute anzeigen" },
190{ "Help","Hilfe" }, 190{ "Help","Hilfe" },
191{ "Hide Dates","Daten ausblenden" }, 191{ "Hide Dates","Daten ausblenden" },
192{ "Highlight color:","Markierungen:" }, 192{ "Highlight color:","Markierungen:" },
193{ "Holiday color:","Freie Tage:" }, 193{ "Holiday color:","Freie Tage:" },
194{ "hour(s)","Stunde(n)" }, 194{ "hour(s)","Stunde(n)" },
195{ "In %1 days: ","In %1 Tagen: " }, 195{ "In %1 days: ","In %1 Tagen: " },
196{ "Incomplete Todo:","Unerledigte Aufgaben:" }, 196{ "Incomplete Todo:","Unerledigte Aufgaben:" },
197{ "Information","Information" }, 197{ "Information","Information" },
198{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, 198{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" },
199{ "Jan","Jan" }, 199{ "Jan","Jan" },
200{ "January","Januar" }, 200{ "January","Januar" },
201{ "JournalView:","Journal Ansicht:" }, 201{ "JournalView:","Journal Ansicht:" },
202{ "Journals","Journale" }, 202{ "Journals","Journale" },
203{ "Jul","Jul" }, 203{ "Jul","Jul" },
204{ "July","Juli" }, 204{ "July","Juli" },
205{ "Jump to date","Springe zum Datum" }, 205{ "Jump to date","Springe zum Datum" },
206{ "June","Juni" }, 206{ "June","Juni" },
207{ "Jun","Jun" }, 207{ "Jun","Jun" },
208{ "Key Bindings...","Tastenzuordnung..." }, 208{ "Key Bindings...","Tastenzuordnung..." },
209{ "Kids","Kinder" }, 209{ "Kids","Kinder" },
210{ "Known Problems...","Bekannte Probleme..." }, 210{ "Known Problems...","Bekannte Probleme..." },
211{ "KO/Pi Find ","KO/Pi Suchdialog " }, 211{ "KO/Pi Find ","KO/Pi Suchdialog " },
212{ "KO/Pi Find: ","KO/Pi Suchen: " }, 212{ "KO/Pi Find: ","KO/Pi Suchen: " },
213{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, 213{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." },
214{ "Language:(needs restart)","Sprache (Neustart!)" }, 214{ "Language:(needs restart)","Sprache (Neustart!)" },
215{ "Language:","Sprache" }, 215{ "Language:","Sprache" },
216{ "Large","Etwas mehr" }, 216{ "Large","Etwas mehr" },
217{ "List View:","Listenansicht:" }, 217{ "List View:","Listenansicht:" },
218{ "List View","Listenansicht" }, 218{ "List View","Listenansicht" },
219{ "Load/Save","Laden/Speichern" }, 219{ "Load/Save","Laden/Speichern" },
220{ "Load Template","Lade Vorlage" }, 220{ "Load Template","Lade Vorlage" },
221{ "Locale","Lokalisation" }, 221{ "Locale","Lokalisation" },
222{ "Local temp file:","Lokale temp. Datei:" }, 222{ "Local temp file:","Lokale temp. Datei:" },
223{ "Location: ","Ort: " }, 223{ "Location: ","Ort: " },
224{ "Location:","Ort:" }, 224{ "Location:","Ort:" },
225{ "Mail client","Mail Programm" }, 225{ "Mail client","Mail Programm" },
226{ "Mail Client","Mail Programm" }, 226{ "Mail Client","Mail Programm" },
227{ "March","März" }, 227{ "March","März" },
228{ "Mar","Mär" }, 228{ "Mar","Mär" },
229{ "May","Mai" }, 229{ "May","Mai" },
230{ "M. Bains line:","M. Bains Linie:" }, 230{ "M. Bains line:","M. Bains Linie:" },
231{ "Medium","Medium" }, 231{ "Medium","Medium" },
232{ "Method","Methode" }, 232{ "Method","Methode" },
233{ "minute(s)","Minute(n)" }, 233{ "minute(s)","Minute(n)" },
234{ "Monday","Montag" }, 234{ "Monday","Montag" },
235{ "Mon","Mo" }, 235{ "Mon","Mo" },
236{ "Monthly","Monatlich" }, 236{ "Monthly","Monatlich" },
237{ "Month not long enough","Monat ist nicht lang genug" }, 237{ "Month not long enough","Monat ist nicht lang genug" },
238{ "month(s)","Monat(e)" }, 238{ "month(s)","Monat(e)" },
239{ "Month view:","Monatsansicht:" }, 239{ "Month view:","Monatsansicht:" },
240{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, 240{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" },
241{ "Todo view uses category colors","Todo Ansicht zeigt Kategorie Farben" }, 241{ "Todo view uses category colors","Todo Ansicht zeigt Kategorie Farben" },
242{ "Move &Down","Nach unten verschieben" }, 242{ "Move &Down","Nach unten verschieben" },
243{ "Move &Up","Nach oben verschieben" }, 243{ "Move &Up","Nach oben verschieben" },
244{ "Name:","Name:" }, 244{ "Name:","Name:" },
245{ "Name","Name" }, 245{ "Name","Name" },
246{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, 246{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" },
247{ "%n Days","%n Tage" }, 247{ "%n Days","%n Tage" },
248{ "Never","Nie" }, 248{ "Never","Nie" },
249{ "New event...","Neuer Termin..." }, 249{ "New event...","Neuer Termin..." },
250{ "New event","Neuer Termin" }, 250{ "New event","Neuer Termin" },
251{ "New Event...","Neuer Termin..." }, 251{ "New Event...","Neuer Termin..." },
252{ "New Events/Todos should","Neue Termine/Todos sollten" }, 252{ "New Events/Todos should","Neue Termine/Todos sollten" },
253{ "&New","&Neu" }, 253{ "&New","&Neu" },
254{ "New","Neu", }, 254{ "New","Neu", },
255{ "New Sub-Todo...","Neues Sub-Todo..." }, 255{ "New Sub-Todo...","Neues Sub-Todo..." },
256{ "New Todo...","Neues Todo..." }, 256{ "New Todo...","Neues Todo..." },
257{ "Next Alarm: ","Nächster Alarm: ", }, 257{ "Next Alarm: ","Nächster Alarm: ", },
258{ "&Next Day","&Nächster Tag", }, 258{ "&Next Day","&Nächster Tag", },
259{ "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, 259{ "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" },
260{ "Next month","Nächster Monat" }, 260{ "Next month","Nächster Monat" },
@@ -271,195 +271,195 @@
271{ "[No selection]","Keine Selektion", }, 271{ "[No selection]","Keine Selektion", },
272{ "No sound set","Kein Sound ausgewählt", }, 272{ "No sound set","Kein Sound ausgewählt", },
273{ "no time ","keine Zeit ", }, 273{ "no time ","keine Zeit ", },
274{ "no time","keine Zeit", }, 274{ "no time","keine Zeit", },
275{ "No Time","Keine Zeit" }, 275{ "No Time","Keine Zeit" },
276{ "November","November" }, 276{ "November","November" },
277{ "Nov","Nov", }, 277{ "Nov","Nov", },
278{ "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, 278{ "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" },
279{ "occurrence(s)","Vorkommen" }, 279{ "occurrence(s)","Vorkommen" },
280{ "October","Oktober" }, 280{ "October","Oktober" },
281{ "Oct","Okt", }, 281{ "Oct","Okt", },
282{ "O-due!","Ü-fällig! " }, 282{ "O-due!","Ü-fällig! " },
283{ "&OK","&OK" }, 283{ "&OK","&OK" },
284{ "Ok+Show!","Ok+Anzeigen" }, 284{ "Ok+Show!","Ok+Anzeigen" },
285{ "Organizer: %1","Organisator %1" }, 285{ "Organizer: %1","Organisator %1" },
286{ "Organizer","Organisator" }, 286{ "Organizer","Organisator" },
287{ "Owner: ","Besitzer: " }, 287{ "Owner: ","Besitzer: " },
288{ "Owner:","Besitzer:" }, 288{ "Owner:","Besitzer:" },
289{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 289{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
290{ "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, 290{ "Pick a date to display","Wähle einen Tag zum anzeigen aus" },
291{ "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, 291{ "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."},
292{ "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, 292{ "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." },
293{ "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, 293{ "Please specify a valid start date.","Bitte gültiges Startdatum angeben." },
294{ "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, 294{ "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." },
295{ "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, 295{ "Please specify a valid start time.","Bitte gültige Startzeit angeben."},
296{ "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, 296{ "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." },
297{ "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, 297{ "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" },
298{ "&Previous Day","Vorheriger Tag" }, 298{ "&Previous Day","Vorheriger Tag" },
299{ "Previous month","Vorheriger Monat" }, 299{ "Previous month","Vorheriger Monat" },
300{ "Previous Month","Vorheriger Monat" }, 300{ "Previous Month","Vorheriger Monat" },
301{ "&Previous Week","Vorherige Woche" }, 301{ "&Previous Week","Vorherige Woche" },
302{ "Previous year","Vorheriges Jahr" }, 302{ "Previous year","Vorheriges Jahr" },
303{ "Previous Year","Vorheriges Jahr" }, 303{ "Previous Year","Vorheriges Jahr" },
304{ "Printing","Drucken" }, 304{ "Printing","Drucken" },
305{ "Priority:","Priorität:" }, 305{ "Priority:","Priorität:" },
306{ "Private","Privat" }, 306{ "Private","Privat" },
307{ "Proceed","Weiter" }, 307{ "Proceed","Weiter" },
308{ "Public","Öffentlich" }, 308{ "Public","Öffentlich" },
309{ "Purge","Entferne" }, 309{ "Purge","Entferne" },
310{ "Purge Completed...","Entferne erledigte Todos..." }, 310{ "Purge Completed...","Entferne erledigte Todos..." },
311{ "Purge Todos","Todos bereinigen" }, 311{ "Purge Todos","Todos bereinigen" },
312{ "read-only","schreibgeschützt" }, 312{ "read-only","schreibgeschützt" },
313{ "Recur every","Wiederh. alle" }, 313{ "Recur every","Wiederh. alle" },
314{ "Recur in the month of","Wiederh. im Monat" }, 314{ "Recur in the month of","Wiederh. im Monat" },
315{ "Recur on the","Wiederh. am" }, 315{ "Recur on the","Wiederh. am" },
316{ "Recur on this day","Wiederh. am diesen Tag" }, 316{ "Recur on this day","Wiederh. am diesen Tag" },
317{ "Recurrence Range...","Wiederholungs Zeitraum..." }, 317{ "Recurrence Range...","Wiederholungs Zeitraum..." },
318{ "Recurrence Range","Wiederholungs Zeitraum" }, 318{ "Recurrence Range","Wiederholungs Zeitraum" },
319{ "Recurrence Rule","Wiederholungs Regel" }, 319{ "Recurrence Rule","Wiederholungs Regel" },
320{ "Recurrence","Wiederholung" }, 320{ "Recurrence","Wiederholung" },
321{ "Recurs","Wiederholung" }, 321{ "Recurs","Wiederholung" },
322{"&Reject","Abweisen"}, 322{"&Reject","Abweisen"},
323{ "Reminder:","Alarm:" }, 323{ "Reminder:","Alarm:" },
324{ "Rem.:","Alarm:" }, 324{ "Rem.:","Alarm:" },
325{ "Rem.","Alarm:" }, 325{ "Rem.","Alarm:" },
326{ "Remote file:","Remote Datei:"}, 326{ "Remote file:","Remote Datei:"},
327{ "Remote IP:","Remote (ferne) IP:" }, 327{ "Remote IP:","Remote (ferne) IP:" },
328{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, 328{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " },
329{ "Remote user:","Remote Benutzer"}, 329{ "Remote user:","Remote Benutzer"},
330{ "&Remove","Entfe&rnen" }, 330{ "&Remove","Entfe&rnen" },
331{ "Remove","Entfernen" }, 331{ "Remove","Entfernen" },
332{ "Request response","Bemerkung anfordern" }, 332{ "Request response","Bemerkung anfordern" },
333{ "Role:","Rolle:" }, 333{ "Role:","Rolle:" },
334{ "Role","Rolle" }, 334{ "Role","Rolle" },
335{ "Sat","Sa" }, 335{ "Sat","Sa" },
336{ "Saturday","Samstag" }, 336{ "Saturday","Samstag" },
337{ "Search for:","Suche nach:" }, 337{ "Search for:","Suche nach:" },
338{ "Search In","Suche in" }, 338{ "Search In","Suche in" },
339{ "Search...","Suche..." }, 339{ "Search...","Suche..." },
340{ "Search","Suche" }, 340{ "Search","Suche" },
341{ "Select Addresses","Wähle Adressen" }, 341{ "Select Addresses","Wähle Adressen" },
342{ "Select all","Selektiere Alle" }, 342{ "Select all","Selektiere Alle" },
343{ "Select a month","Wähle Monat" }, 343{ "Select a month","Wähle Monat" },
344{ "Select a week","Wähle Woche" }, 344{ "Select a week","Wähle Woche" },
345{ "Select a year","Wähle Jahr" }, 345{ "Select a year","Wähle Jahr" },
346{ "Send directly","Sende direkt" }, 346{ "Send directly","Sende direkt" },
347{ "&Send Messages","&Sende Nachrichten", }, 347{ "&Send Messages","&Sende Nachrichten", },
348{ "Sep","Sep" }, 348{ "Sep","Sep" },
349{ "September","September" }, 349{ "September","September" },
350{ "Shopping","Einkaufen" }, 350{ "Shopping","Einkaufen" },
351{ "Show Dates","Zeige Daten" }, 351{ "Show Dates","Zeige Daten" },
352{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, 352{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." },
353{ "Show Event","Termin anzeigen" }, 353{ "Show Event","Termin anzeigen" },
354{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, 354{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." },
355{ "Show Marcus Bains line","Zeige Marcus Bains Linie" }, 355{ "Show Marcus Bains line","Zeige Marcus Bains Linie" },
356{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, 356{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." },
357{ "Show time as:","Zeige Zeit als" }, 357{ "Show time as:","Zeige Zeit als" },
358{ "Show Todo","Todo anzeigen" }, 358{ "Show Todo","Todo anzeigen" },
359{ "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, 359{ "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" },
360{ "&Show","Anzeigen" }, 360{ "&Show","Anzeigen" },
361{ "Show...","Anzeigen..." }, 361{ "Show...","Anzeigen..." },
362{ "Show","Anzeigen" }, 362{ "Show","Anzeigen" },
363{ "Small","Klein" }, 363{ "Small","Klein" },
364{ "Sorry","Tut mir leid" }, 364{ "Sorry","Tut mir leid" },
365{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, 365{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"},
366{ "Start:","Start:" }, 366{ "Start:","Start:" },
367{ "Start Date","Start Datum" }, 367{ "Start Date","Start am" },
368{ "Start date: %1","Start Datum: %1" }, 368{ "Start date: %1","Start Datum: %1" },
369{ "Start Time","Start Zeit" }, 369{ "Start Time","Start um" },
370{ "Status:","Status:" }, 370{ "Status:","Status:" },
371{ "Status","Status:" }, 371{ "Status","Status:" },
372{ "Summaries","Titel" }, 372{ "Summaries","Titel" },
373{ "Summary:","Titel:" }, 373{ "Summary:","Titel:" },
374{ "Summary","Titel" }, 374{ "Summary","Titel" },
375{ "Sunday","Sonntag" }, 375{ "Sunday","Sonntag" },
376{ "Sun","So" }, 376{ "Sun","So" },
377{ "Sync preferences:","Sync Einstellungen" }, 377{ "Sync preferences:","Sync Einstellungen" },
378{ "Sync Prefs","Sync Einstellungen" }, 378{ "Sync Prefs","Sync Einstellungen" },
379{ "Syncronize","Daten abgleich" }, 379{ "Syncronize","Daten abgleich" },
380{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 380{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
381{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 381{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
382{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, 382{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
383{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges Todo" }, 383{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges Todo" },
384{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, 384{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" },
385{ "Template...","Vorlage..." }, 385{ "Template...","Vorlage..." },
386{ "This day","Dieser Tag" }, 386{ "This day","Dieser Tag" },
387{ "This is an experimental feature. ","Dieses Feature ist experimentel" }, 387{ "This is an experimental feature. ","Dieses Feature ist experimentel" },
388{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, 388{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." },
389{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, 389{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." },
390{ "Thu","Do" }, 390{ "Thu","Do" },
391{ "Thursday","Donnerstag" }, 391{ "Thursday","Donnerstag" },
392{ "Time associated","Mit Zeit" }, 392{ "Time associated","Mit Zeit" },
393{ "Time bar:","Uhrzeit Zeile:" }, 393{ "Time bar:","Uhrzeit Zeile:" },
394{ "Time && Date","Zeit und Datum" }, 394{ "Time && Date","Zeit und Datum" },
395{ "Time Format","Zeit Format" }, 395{ "Time Format","Zeit Format" },
396{ "Time Format(nr):","Zeit Format(Neustart!)" }, 396{ "Time Format(nr):","Zeit Format(Neustart!)" },
397{ "Date Labels:","Datumsleiste:" }, 397{ "Date Labels:","Datumsleiste:" },
398{ "Time: ","Zeit: " }, 398{ "Time: ","Zeit: " },
399{ "Timezone:","Zeitzone:" }, 399{ "Timezone:","Zeitzone:" },
400{ "To: ","Bis: " }, 400{ "To: ","Bis: " },
401{ "To:","Bis:" }, 401{ "To:","Bis:" },
402{ "Today: ","Heute: " }, 402{ "Today: ","Heute: " },
403{ "Todo due today color:","Heute fällige Todos" }, 403{ "Todo due today color:","Heute fällige Todos" },
404{ "To-do items:","To-Do items:" }, 404{ "To-do items:","To-Do items:" },
405{ "Todo overdue color:","Überfällige Todos" }, 405{ "Todo overdue color:","Überfällige Todos" },
406{ "Todo","Todo" }, 406{ "Todo","Todo" },
407{ "To-do view shows completed Todos","Todo Ansicht zeigt erledigte Todos" }, 407{ "To-do view shows completed Todos","Todo Ansicht zeigt erledigte Todos" },
408{ "ToDoView:","Todo Ansicht:" }, 408{ "ToDoView:","Todo Ansicht:" },
409{ "Toggle Alarm","Wechsle Alarm" }, 409{ "Toggle Alarm","Wechsle Alarm" },
410{ "Toggle Allday","Umschalten Ganztag" }, 410{ "Toggle Allday","Umschalten Ganztag" },
411{ "Tomorrow: ","Morgen: " }, 411{ "Tomorrow: ","Morgen: " },
412{ "Tue","Di" }, 412{ "Tue","Di" },
413{ "Tuesday","Dienstag" }, 413{ "Tuesday","Dienstag" },
414{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, 414{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" },
415{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, 415{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." },
416{ "Unknown","Unbekannt" }, 416{ "Unknown","Unbekannt" },
417{ "Up","Hinauf" }, 417{ "Up","Hinauf" },
418{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, 418{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" },
419{ "User defined","Benutzerdefiniert" }, 419{ "User defined","Benutzerdefiniert" },
420{ "User long date:","Format langes Datum:" }, 420{ "User long date:","Format langes Datum:" },
421{ "User short date:","Forma kurzes Datum:" }, 421{ "User short date:","Forma kurzes Datum:" },
422{ "View","Ansicht" }, 422{ "View","Ansicht" },
423{ "View Fonts","Schriftarten Ansichten" }, 423{ "View Fonts","Schriftarten Ansichten" },
424{ "Views","Ansichten" }, 424{ "Views","Ansichten" },
425{ "Wed","Mi" }, 425{ "Wed","Mi" },
426{ "Wednesday","Mittwoch" }, 426{ "Wednesday","Mittwoch" },
427{ "Week %1","Woche %1" }, 427{ "Week %1","Woche %1" },
428{ "Weekly","Wöchentlich" }, 428{ "Weekly","Wöchentlich" },
429{ "Week starts on Sunday","Woche beginnt Sonntags" }, 429{ "Week starts on Sunday","Woche beginnt Sonntags" },
430{ "What's Next View:","What's Next Anz." }, 430{ "What's Next View:","What's Next Anz." },
431{ "What's next ?","Was kommt als nächstes?(What's Next)" }, 431{ "What's next ?","Was kommt als nächstes?(What's Next)" },
432{ "Working Hours","Tägliche Arbeitszeit" }, 432{ "Working Hours","Tägliche Arbeitszeit" },
433{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, 433{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" },
434{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, 434{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" },
435{ "Write back synced file","Syncronisierte Datei zurückschreiben" }, 435{ "Write back synced file","Syncronisierte Datei zurückschreiben" },
436{ "Yearly","Jährlich" }, 436{ "Yearly","Jährlich" },
437{ "year(s)","Jahr(e)" }, 437{ "year(s)","Jahr(e)" },
438{ "Yes","Ja" }, 438{ "Yes","Ja" },
439{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, 439{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" },
440{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, 440{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." },
441{ "week(s) on:","Woche(n) am: " }, 441{ "week(s) on:","Woche(n) am: " },
442{ "Full menu bar(nr)","Volle Menuleiste(bn)" }, 442{ "Full menu bar(nr)","Volle Menuleiste(bn)" },
443{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 443{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
444{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 444{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
445{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 445{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
446{ "Daylight start:","Sommerzeit Start:" }, 446{ "Daylight start:","Sommerzeit Start:" },
447{ "Daylight end:","Sommerzeit Ende:" }, 447{ "Daylight end:","Sommerzeit Ende:" },
448{ "Time Zone","Zeitzone" }, 448{ "Time Zone","Zeitzone" },
449{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, 449{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" },
450{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, 450{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" },
451{ "minutely","minütlich" }, 451{ "minutely","minütlich" },
452{ "hourly","stündlich" }, 452{ "hourly","stündlich" },
453{ "daily","täglich" }, 453{ "daily","täglich" },
454{ "weekly","wöchentlich" }, 454{ "weekly","wöchentlich" },
455{ "monthly","monatlich" }, 455{ "monthly","monatlich" },
456{ "day-monthly","tag-monatlich" }, 456{ "day-monthly","tag-monatlich" },
457{ "month-yearly","monat-jährlich" }, 457{ "month-yearly","monat-jährlich" },
458{ "day-yearly","tag-jährlich" }, 458{ "day-yearly","tag-jährlich" },
459{ "position-yearly","pos-jährlich" }, 459{ "position-yearly","pos-jährlich" },
460{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, 460{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" },
461{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, 461{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" },
462{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, 462{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" },
463{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, 463{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" },
464{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, 464{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" },
465{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, 465{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." },
@@ -1438,106 +1438,108 @@
1438{ "Secrecy","Sichtbar" }, 1438{ "Secrecy","Sichtbar" },
1439{ "male","männlich" }, 1439{ "male","männlich" },
1440{ "female","weiblich" }, 1440{ "female","weiblich" },
1441{ "Hide!","Verbergen!" }, 1441{ "Hide!","Verbergen!" },
1442{ "Show!","Anzeigen!" }, 1442{ "Show!","Anzeigen!" },
1443{ "Details","Details" }, 1443{ "Details","Details" },
1444{ "Profession","Beruf" }, 1444{ "Profession","Beruf" },
1445{ "Children","Kinder" }, 1445{ "Children","Kinder" },
1446{ "Department","Abteilung" }, 1446{ "Department","Abteilung" },
1447{ "Backup cancelled","Backup abgebrochen" }, 1447{ "Backup cancelled","Backup abgebrochen" },
1448{ "Backup globally disabled","Backup global abgeschaltet" }, 1448{ "Backup globally disabled","Backup global abgeschaltet" },
1449{ "Backup succesfully finished","Backup erfolgreich beendet" }, 1449{ "Backup succesfully finished","Backup erfolgreich beendet" },
1450{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, 1450{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" },
1451{ "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" }, 1451{ "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" },
1452{ "Birthdays","Geburtstage" }, 1452{ "Birthdays","Geburtstage" },
1453{ "KO/Pi import information!","KO/Pi Import Information!" }, 1453{ "KO/Pi import information!","KO/Pi Import Information!" },
1454{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, 1454{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" },
1455{ "Cancel - do not start"," Abbrechen - Todo nicht starten" }, 1455{ "Cancel - do not start"," Abbrechen - Todo nicht starten" },
1456{ "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?"" }, 1456{ "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?"" },
1457{ "Reload","Neu laden" }, 1457{ "Reload","Neu laden" },
1458{ "Timezone settings","Zeitzoneneinstellung" }, 1458{ "Timezone settings","Zeitzoneneinstellung" },
1459{ "Title: ","Titel: " }, 1459{ "Title: ","Titel: " },
1460{ "Journal from: ","Journal vom: " }, 1460{ "Journal from: ","Journal vom: " },
1461{ "Journal: %1 from ","Journal: %1 vom " }, 1461{ "Journal: %1 from ","Journal: %1 vom " },
1462{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, 1462{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" },
1463{ "Selected Item","Ausgewähltes Item" }, 1463{ "Selected Item","Ausgewähltes Item" },
1464{ "Select Date...","Wähle Datum..." }, 1464{ "Select Date...","Wähle Datum..." },
1465{ "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:" }, 1465{ "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:" },
1466{ "Change category list now!","Ändere Kategorieliste jetzt!" }, 1466{ "Change category list now!","Ändere Kategorieliste jetzt!" },
1467{ "Edit category list...","Ändere Kategorieliste..." }, 1467{ "Edit category list...","Ändere Kategorieliste..." },
1468{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, 1468{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" },
1469{ "Filepath: ","Dateipfad: " }, 1469{ "Filepath: ","Dateipfad: " },
1470{ "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, 1470{ "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" },
1471{ "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, 1471{ "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" },
1472{ "Pending Suspend Alarm","Laufender Suspend Alarm" }, 1472{ "Pending Suspend Alarm","Laufender Suspend Alarm" },
1473{ "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, 1473{ "Error loading calendar %1","Fehler beim Laden von Kalender %1" },
1474{ "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, 1474{ "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" },
1475{ "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, 1475{ "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" },
1476{ "Alarm Options","Alarm Einstellungen" }, 1476{ "Alarm Options","Alarm Einstellungen" },
1477{ "Delete selected...","Lösche Ausgewählte..." }, 1477{ "Delete selected...","Lösche Ausgewählte..." },
1478{ "None","Nichts" }, 1478{ "None","Nichts" },
1479{ "Selection","Auswahl" }, 1479{ "Selection","Auswahl" },
1480{ "Set categories","Setze Kategorien" }, 1480{ "Set categories","Setze Kategorien" },
1481{ "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, 1481{ "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" },
1482{ "Reset","Neu setzen" }, 1482{ "Reset","Neu setzen" },
1483{ "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, 1483{ "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" },
1484{ "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, 1484{ "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" },
1485{ "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, 1485{ "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" },
1486{ "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, 1486{ "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" },
1487{ "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, 1487{ "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" },
1488{ "Edit","Edit" }, 1488{ "Edit","Edit" },
1489{ "Last Modified","Zuletzt geändert" }, 1489{ "Last Modified","Zuletzt geändert" },
1490{ "Journal viewer","Journal Anzeige" }, 1490{ "Journal viewer","Journal Anzeige" },
1491{ "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, 1491{ "Configure Calendar Files...","Konfiguriere Kalenderdateien..." },
1492{ "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, 1492{ "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." },
1493{ "Hide Completed","Verstecke erledigte Todos" }, 1493{ "Hide Completed","Verstecke erledigte Todos" },
1494{ "Show not Running","Zeige nicht Laufende" }, 1494{ "Show not Running","Zeige nicht Laufende" },
1495{ "Click to add new Todo","Klick für neues Todo!" }, 1495{ "Click to add new Todo","Klick für neues Todo!" },
1496{ "Show next conflict for","Zeige nächsten Konflikt für" }, 1496{ "Show next conflict for","Zeige nächsten Konflikt für" },
1497{ "All events","Alle Termine" }, 1497{ "All events","Alle Termine" },
1498{ "Allday events","Ganztagestermine" }, 1498{ "Allday events","Ganztagestermine" },
1499{ "Events with time","Termine mit Zeit" }, 1499{ "Events with time","Termine mit Zeit" },
1500{ "No conflict found","Kein Konflikt gefunden" }, 1500{ "No conflict found","Kein Konflikt gefunden" },
1501{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, 1501{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" },
1502{ "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, 1502{ "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " },
1503{ "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, 1503{ "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" },
1504{ "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, 1504{ "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" },
1505{ "KO/Pi Conflict delected","KO/Pi Konflikt erkannt" }, 1505{ "KO/Pi Conflict delected","KO/Pi Konflikt erkannt" },
1506{ "Show date","Zeige Datum" }, 1506{ "Show date","Zeige Datum" },
1507{ "No problem!","Null Problemo!" }, 1507{ "No problem!","Null Problemo!" },
1508{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, 1508{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" },
1509{ "Pi-Sync Port Error","Pi-Sync Port Fehler" }, 1509{ "Pi-Sync Port Error","Pi-Sync Port Fehler" },
1510{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, 1510{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" },
1511{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, 1511{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" },
1512{ "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, 1512{ "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" },
1513{ "Pi-Sync Error","Pi-Sync Fehler" }, 1513{ "Pi-Sync Error","Pi-Sync Fehler" },
1514{ "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, 1514{ "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" },
1515{ "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, 1515{ "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" },
1516{ "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, 1516{ "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." },
1517{ "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, 1517{ "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" },
1518{ "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, 1518{ "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" },
1519{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, 1519{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" },
1520{ "Receiving file from remote...","Empfange entfernte Datei..." }, 1520{ "Receiving file from remote...","Empfange entfernte Datei..." },
1521{ "Sending back synced file...","Sende synchronisierte Datei zurück..." }, 1521{ "Sending back synced file...","Sende synchronisierte Datei zurück..." },
1522{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, 1522{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" },
1523{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, 1523{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" },
1524{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, 1524{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." },
1525{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, 1525{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" },
1526{ "Writing back file ...","Schreibe Datei zurück..." }, 1526{ "Writing back file ...","Schreibe Datei zurück..." },
1527{ "Sending back file ...","Sende Datei zurück..." }, 1527{ "Sending back file ...","Sende Datei zurück..." },
1528{ "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, 1528{ "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" },
1529{ "Created","Angelegt" }, 1529{ "Created","Angelegt" },
1530{ "Last Modified Sub","Zuletzt geändertes Sub" }, 1530{ "Last Modified Sub","Zuletzt geändertes Sub" },
1531{ "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, 1531{ "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" },
1532{ "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, 1532{ "Show times on two lines","Zeige Zeiten auf zwei Zeilen" },
1533{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, 1533{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
1534{ "Duration","Dauer" },
1535{ " day"," Tag" },
1534{ "","" }, 1536{ "","" },
1535{ "","" }, 1537{ "","" },
1536{ "","" }, 1538{ "","" },
1537{ "","" }, 1539{ "","" },
1538{ "","" }, 1540{ "","" },
1539{ "","" }, 1541{ "","" },
1540{ "","" }, 1542{ "","" },
1541{ "","" }, 1543{ "","" },
1542{ "","" }, 1544{ "","" },
1543{ "","" }, 1545{ "","" },
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 965cf47..10d9a8c 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -4,216 +4,215 @@
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qfiledialog.h> 25#include <qfiledialog.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <qvbox.h>
28#include <qbuttongroup.h> 28#include <qbuttongroup.h>
29#include <qvgroupbox.h> 29#include <qvgroupbox.h>
30#include <qwidgetstack.h> 30#include <qwidgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qapplication.h> 32#include <qapplication.h>
33 33
34#include <kglobal.h> 34#include <kglobal.h>
35#include <klocale.h> 35#include <klocale.h>
36#include <kiconloader.h> 36#include <kiconloader.h>
37#include <kmessagebox.h> 37#include <kmessagebox.h>
38#include <kdebug.h> 38#include <kdebug.h>
39#include <krestrictedline.h> 39#include <krestrictedline.h>
40#include <kstandarddirs.h> 40#include <kstandarddirs.h>
41#include <kfiledialog.h> 41#include <kfiledialog.h>
42#include <kdialog.h> 42#include <kdialog.h>
43 43
44#include <libkcal/todo.h> 44#include <libkcal/todo.h>
45 45
46#include <libkdepim/kdateedit.h> 46#include <libkdepim/kdateedit.h>
47 47
48#include "koprefs.h" 48#include "koprefs.h"
49#include "ktimeedit.h" 49#include "ktimeedit.h"
50 50
51#include "koeditorgeneraltodo.h" 51#include "koeditorgeneraltodo.h"
52#include "kolocationbox.h" 52#include "kolocationbox.h"
53 53
54KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, 54KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent,
55 const char* name) 55 const char* name)
56 : KOEditorGeneral( parent, name) 56 : KOEditorGeneral( parent, name)
57{ 57{
58} 58}
59 59
60KOEditorGeneralTodo::~KOEditorGeneralTodo() 60KOEditorGeneralTodo::~KOEditorGeneralTodo()
61{ 61{
62} 62}
63 63
64void KOEditorGeneralTodo::finishSetup() 64void KOEditorGeneralTodo::finishSetup()
65{ 65{
66 66
67// QWidget::setTabOrder(mSummaryEdit, mLocationEdit); 67// QWidget::setTabOrder(mSummaryEdit, mLocationEdit);
68// QWidget::setTabOrder(mLocationEdit, mDueCheck); 68// QWidget::setTabOrder(mLocationEdit, mDueCheck);
69// QWidget::setTabOrder(mDueCheck, mDueDateEdit); 69// QWidget::setTabOrder(mDueCheck, mDueDateEdit);
70// QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); 70// QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit);
71// QWidget::setTabOrder(mDueTimeEdit, mStartCheck); 71// QWidget::setTabOrder(mDueTimeEdit, mStartCheck);
72// QWidget::setTabOrder(mStartCheck, mStartDateEdit); 72// QWidget::setTabOrder(mStartCheck, mStartDateEdit);
73// QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); 73// QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit);
74// QWidget::setTabOrder(mStartTimeEdit, mTimeButton); 74// QWidget::setTabOrder(mStartTimeEdit, mTimeButton);
75// QWidget::setTabOrder(mTimeButton, mCompletedCombo); 75// QWidget::setTabOrder(mTimeButton, mCompletedCombo);
76// QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); 76// QWidget::setTabOrder(mCompletedCombo, mPriorityCombo);
77// QWidget::setTabOrder(mPriorityCombo, mAlarmButton); 77// QWidget::setTabOrder(mPriorityCombo, mAlarmButton);
78// QWidget::setTabOrder(mAlarmButton, mCategoriesButton); 78// QWidget::setTabOrder(mAlarmButton, mCategoriesButton);
79// QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); 79// QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo);
80// QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); 80// QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit);
81 mSummaryEdit->load(KOLocationBox::SUMMARYTODO); 81 mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
82 mSummaryEdit->setFocus(); 82 mSummaryEdit->setFocus();
83} 83}
84 84
85void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) 85void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
86{ 86{
87 QBoxLayout *timeLayout = new QVBoxLayout(topLayout); 87 QBoxLayout *timeLayout = new QVBoxLayout(topLayout);
88 88
89 QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, 89 QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
90 i18n("Date && Time"),parent); 90 i18n("Date && Time"),parent);
91 timeLayout->addWidget(timeGroupBox); 91 timeLayout->addWidget(timeGroupBox);
92 timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 ); 92 timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 );
93 timeGroupBox->layout()->setMargin( KDialog::marginHint() ); 93 timeGroupBox->layout()->setMargin( KDialog::marginHint() );
94 QFrame *timeBoxFrame = new QFrame(timeGroupBox); 94 QFrame *timeBoxFrame = new QFrame(timeGroupBox);
95 95
96 QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); 96 QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3);
97 layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); 97 layoutTimeBox->setSpacing(KDialog::spacingHintSmall());
98 layoutTimeBox->setColStretch( 1, 1 ); 98 layoutTimeBox->setColStretch( 1, 1 );
99 99
100 mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame);
101 layoutTimeBox->addWidget(mStartCheck,0,0);
102 connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool)));
103
104 mStartDateEdit = new KDateEdit(timeBoxFrame);
105 layoutTimeBox->addWidget(mStartDateEdit,0,1);
106
107 mStartTimeEdit = new KOTimeEdit(timeBoxFrame);
108 layoutTimeBox->addWidget(mStartTimeEdit,0,2);
109
100 mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); 110 mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame);
101 layoutTimeBox->addWidget(mDueCheck,1,0); 111 layoutTimeBox->addWidget(mDueCheck,1,0);
102 connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); 112 connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool)));
103 connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); 113 connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm()));
104 114
105 115
106 mDueDateEdit = new KDateEdit(timeBoxFrame); 116 mDueDateEdit = new KDateEdit(timeBoxFrame);
107 layoutTimeBox->addWidget(mDueDateEdit,1,1); 117 layoutTimeBox->addWidget(mDueDateEdit,1,1);
108 118
109 mDueTimeEdit = new KOTimeEdit(timeBoxFrame); 119 mDueTimeEdit = new KOTimeEdit(timeBoxFrame);
110 layoutTimeBox->addWidget(mDueTimeEdit,1,2); 120 layoutTimeBox->addWidget(mDueTimeEdit,1,2);
111 121
112 122
113 mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame);
114 layoutTimeBox->addWidget(mStartCheck,0,0);
115 connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool)));
116
117 mStartDateEdit = new KDateEdit(timeBoxFrame);
118 layoutTimeBox->addWidget(mStartDateEdit,0,1);
119
120 mStartTimeEdit = new KOTimeEdit(timeBoxFrame);
121 layoutTimeBox->addWidget(mStartTimeEdit,0,2);
122
123
124 mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); 123 mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame);
125 layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); 124 layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1);
126 125
127 connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); 126 connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool)));
128 connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); 127 connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime)));
129 connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); 128 connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime)));
130 connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), 129 connect(mStartDateEdit, SIGNAL(dateChanged(QDate)),
131 this, SLOT(startDateChanged(QDate))); 130 this, SLOT(startDateChanged(QDate)));
132 // some more layouting 131 // some more layouting
133 //layoutTimeBox->setColStretch(3,1); 132 //layoutTimeBox->setColStretch(3,1);
134} 133}
135 134
136 135
137void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) 136void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
138{ 137{
139 mCompletedCombo = new QComboBox(parent); 138 mCompletedCombo = new QComboBox(parent);
140 // xgettext:no-c-format 139 // xgettext:no-c-format
141 mCompletedCombo->insertItem(i18n(" 0 %")); 140 mCompletedCombo->insertItem(i18n(" 0 %"));
142 // xgettext:no-c-format 141 // xgettext:no-c-format
143 mCompletedCombo->insertItem(i18n(" 20 %")); 142 mCompletedCombo->insertItem(i18n(" 20 %"));
144 // xgettext:no-c-format 143 // xgettext:no-c-format
145 mCompletedCombo->insertItem(i18n(" 40 %")); 144 mCompletedCombo->insertItem(i18n(" 40 %"));
146 // xgettext:no-c-format 145 // xgettext:no-c-format
147 mCompletedCombo->insertItem(i18n(" 60 %")); 146 mCompletedCombo->insertItem(i18n(" 60 %"));
148 // xgettext:no-c-format 147 // xgettext:no-c-format
149 mCompletedCombo->insertItem(i18n(" 80 %")); 148 mCompletedCombo->insertItem(i18n(" 80 %"));
150 // xgettext:no-c-format 149 // xgettext:no-c-format
151 mCompletedCombo->insertItem(i18n("100 %")); 150 mCompletedCombo->insertItem(i18n("100 %"));
152 connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); 151 connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int)));
153 topLayout->addWidget(mCompletedCombo); 152 topLayout->addWidget(mCompletedCombo);
154 153
155 mCompletedLabel = new QLabel(i18n("completed"),parent); 154 mCompletedLabel = new QLabel(i18n("completed"),parent);
156 topLayout->addWidget(mCompletedLabel); 155 topLayout->addWidget(mCompletedLabel);
157 156
158 mCompleteDateEdit = new KDateEdit(parent); 157 mCompleteDateEdit = new KDateEdit(parent);
159 topLayout->addWidget(mCompleteDateEdit ); 158 topLayout->addWidget(mCompleteDateEdit );
160 159
161 mCompleteTimeEdit = new KOTimeEdit(parent); 160 mCompleteTimeEdit = new KOTimeEdit(parent);
162 topLayout->addWidget( mCompleteTimeEdit); 161 topLayout->addWidget( mCompleteTimeEdit);
163 162
164 mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); 163 mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) );
165 mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); 164 mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) );
166 connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime))); 165 connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime)));
167 166
168 if ( QApplication::desktop()->width() <= 480 ) { 167 if ( QApplication::desktop()->width() <= 480 ) {
169 if ( QApplication::desktop()->width() < 320 ) 168 if ( QApplication::desktop()->width() < 320 )
170 mCompleteDateEdit->setMaximumWidth( 85 ); 169 mCompleteDateEdit->setMaximumWidth( 85 );
171 else 170 else
172 mCompleteDateEdit->setMaximumWidth( 140 ); 171 mCompleteDateEdit->setMaximumWidth( 140 );
173 topLayout->setSpacing( 0 ); 172 topLayout->setSpacing( 0 );
174 } 173 }
175} 174}
176 175
177void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) 176void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
178{ 177{
179 178
180 QHBox* h = new QHBox ( parent ); 179 QHBox* h = new QHBox ( parent );
181 topLayout->addWidget( h ); 180 topLayout->addWidget( h );
182 QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); 181 QLabel *priorityLabel = new QLabel(i18n("Priority:"), h);
183 // topLayout->addWidget(priorityLabel); 182 // topLayout->addWidget(priorityLabel);
184 mPriorityCombo = new QComboBox( h ); 183 mPriorityCombo = new QComboBox( h );
185 mPriorityCombo->insertItem(i18n("1 (high)")); 184 mPriorityCombo->insertItem(i18n("1 (high)"));
186 mPriorityCombo->insertItem(i18n("2")); 185 mPriorityCombo->insertItem(i18n("2"));
187 mPriorityCombo->insertItem(i18n("3")); 186 mPriorityCombo->insertItem(i18n("3"));
188 mPriorityCombo->insertItem(i18n("4")); 187 mPriorityCombo->insertItem(i18n("4"));
189 mPriorityCombo->insertItem(i18n("5 (low)")); 188 mPriorityCombo->insertItem(i18n("5 (low)"));
190 //topLayout->addWidget(mPriorityCombo); 189 //topLayout->addWidget(mPriorityCombo);
191} 190}
192 191
193void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) 192void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout)
194{ 193{
195 QBoxLayout *statusLayout = new QHBoxLayout(topLayout); 194 QBoxLayout *statusLayout = new QHBoxLayout(topLayout);
196 195
197 initCompletion( parent, statusLayout ); 196 initCompletion( parent, statusLayout );
198 197
199 statusLayout->addStretch( 1 ); 198 statusLayout->addStretch( 1 );
200 199
201 initPriority( parent, statusLayout ); 200 initPriority( parent, statusLayout );
202} 201}
203 202
204void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) 203void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay)
205{ 204{
206 205
207 mSummaryEdit->load(KOLocationBox::SUMMARYTODO); 206 mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
208 mLocationEdit->load(KOLocationBox::LOCATION); 207 mLocationEdit->load(KOLocationBox::LOCATION);
209 KOEditorGeneral::setDefaults(allDay); 208 KOEditorGeneral::setDefaults(allDay);
210 209
211 mTimeButton->setChecked( !allDay ); 210 mTimeButton->setChecked( !allDay );
212 if(mTimeButton->isChecked()) { 211 if(mTimeButton->isChecked()) {
213 mTimeButton->setEnabled(true); 212 mTimeButton->setEnabled(true);
214 } 213 }
215 else { 214 else {
216 mTimeButton->setEnabled(false); 215 mTimeButton->setEnabled(false);
217 } 216 }
218 217
219 enableTimeEdits( !allDay ); 218 enableTimeEdits( !allDay );
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index e7a5e0e..e560ce4 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -35,366 +35,361 @@
35#include <qwhatsthis.h> 35#include <qwhatsthis.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qpainter.h> 37#include <qpainter.h>
38#include <qpaintdevicemetrics.h> 38#include <qpaintdevicemetrics.h>
39 39
40#include <klocale.h> 40#include <klocale.h>
41#include <kdebug.h> 41#include <kdebug.h>
42#include <kiconloader.h> 42#include <kiconloader.h>
43#include <kglobal.h> 43#include <kglobal.h>
44 44
45#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
46#include <libkcal/calendar.h> 46#include <libkcal/calendar.h>
47#include <libkcal/calendarlocal.h> 47#include <libkcal/calendarlocal.h>
48#include <libkcal/icalformat.h> 48#include <libkcal/icalformat.h>
49#include <libkcal/vcalformat.h> 49#include <libkcal/vcalformat.h>
50#include <libkcal/recurrence.h> 50#include <libkcal/recurrence.h>
51#include <libkcal/filestorage.h> 51#include <libkcal/filestorage.h>
52#include <libkdepim/categoryselectdialog.h> 52#include <libkdepim/categoryselectdialog.h>
53#include <libkcal/kincidenceformatter.h> 53#include <libkcal/kincidenceformatter.h>
54#ifndef DESKTOP_VERSION 54#ifndef DESKTOP_VERSION
55#include <qpe/qpeapplication.h> 55#include <qpe/qpeapplication.h>
56#else 56#else
57#include <qapplication.h> 57#include <qapplication.h>
58#endif 58#endif
59 59
60#ifndef KORG_NOPRINTER 60#ifndef KORG_NOPRINTER
61#include "calprinter.h" 61#include "calprinter.h"
62#endif 62#endif
63#include "koglobals.h" 63#include "koglobals.h"
64#include "koprefs.h" 64#include "koprefs.h"
65#include "kfiledialog.h" 65#include "kfiledialog.h"
66 66
67#include "kolistview.h" 67#include "kolistview.h"
68#include "koeventviewer.h" 68#include "koeventviewer.h"
69 69
70extern QPixmap* sgListViewCompletedPix[6]; 70extern QPixmap* sgListViewCompletedPix[6];
71extern QPixmap* sgListViewJournalPix; 71extern QPixmap* sgListViewJournalPix;
72 72
73class KOListViewWhatsThis :public QWhatsThis 73class KOListViewWhatsThis :public QWhatsThis
74{ 74{
75public: 75public:
76 KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 76 KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
77 77
78protected: 78protected:
79 virtual QString text( const QPoint& p) 79 virtual QString text( const QPoint& p)
80 { 80 {
81 return _view->getWhatsThisText(p) ; 81 return _view->getWhatsThisText(p) ;
82 } 82 }
83private: 83private:
84 QWidget* _wid; 84 QWidget* _wid;
85 KOListView * _view; 85 KOListView * _view;
86}; 86};
87 87
88 88
89ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) 89ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date )
90{ 90{
91 mItem = item; 91 mItem = item;
92 mDate = date; 92 mDate = date;
93} 93}
94 94
95ListItemVisitor::~ListItemVisitor() 95ListItemVisitor::~ListItemVisitor()
96{ 96{
97} 97}
98 98
99bool ListItemVisitor::visit(Event *e) 99bool ListItemVisitor::visit(Event *e)
100{ 100{
101 bool ok = false; 101 bool ok = false;
102 QString start, end; 102 QString start, end;
103 QDate ds, de; 103 QDate ds, de;
104 if ( e->doesRecur() ) { 104 if ( e->doesRecur() ) {
105 ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); 105 ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date();
106 if ( ok ) { 106 if ( ok ) {
107 int days = e->dtStart().date().daysTo(e->dtEnd().date() ); 107 int days = e->dtStart().date().daysTo(e->dtEnd().date() );
108 start = KGlobal::locale()->formatDate(ds,true); 108 start = KGlobal::locale()->formatDate(ds,true);
109 de = ds.addDays( days); 109 de = ds.addDays( days);
110 end = KGlobal::locale()->formatDate(de,true); 110 end = KGlobal::locale()->formatDate(de,true);
111 } 111 }
112 112
113 } 113 }
114 if ( ! ok ) { 114 if ( ! ok ) {
115 start =e->dtStartDateStr(); 115 start =e->dtStartDateStr();
116 end = e->dtEndDateStr(); 116 end = e->dtEndDateStr();
117 ds = e->dtStart().date(); 117 ds = e->dtStart().date();
118 de = e->dtEnd().date(); 118 de = e->dtEnd().date();
119 } 119 }
120 mItem->setText(0,e->summary()); 120 mItem->setText(0,e->summary());
121 mItem->setText(1,start); 121 mItem->setText(1,start);
122 if ( e->doesFloat() ) 122 if ( e->doesFloat() )
123 mItem->setText(2,"---"); 123 mItem->setText(2,"---");
124 else 124 else
125 mItem->setText(2,e->dtStartTimeStr()); 125 mItem->setText(2,e->dtStartTimeStr());
126 mItem->setText(3,end); 126 mItem->setText(3,end);
127 if ( e->doesFloat() ) 127 if ( e->doesFloat() )
128 mItem->setText(4,"---"); 128 mItem->setText(4,"---");
129 else 129 else
130 mItem->setText(4,e->dtEndTimeStr()); 130 mItem->setText(4,e->dtEndTimeStr());
131 mItem->setText(5, e->durationText());
131 if ( e->isAlarmEnabled() ) { 132 if ( e->isAlarmEnabled() ) {
132 mItem->setText(5,e->alarms().first()->offsetText() ); 133 mItem->setText(6,e->alarms().first()->offsetText() );
133 } else { 134 } else {
134 mItem->setText(5, i18n("No")); 135 mItem->setText(6, i18n("No"));
135 } 136 }
136 mItem->setText(6, e->recurrenceText()); 137 mItem->setText(7, e->recurrenceText());
137 if( ! e->doesRecur() ) 138 if( ! e->doesRecur() )
138 mItem->setSortKey( 6, "-" ); 139 mItem->setSortKey( 7, "-" );
139 mItem->setText(7,"---"); 140 mItem->setText(8, e->cancelled() ? i18n("Yes") : i18n("No"));
140 mItem->setText(8,"---"); 141 mItem->setText(9,e->categoriesStr());
141 mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); 142 mItem->setText(10, KOPrefs::instance()->calName( e->calID() ));
142 mItem->setText(10,e->categoriesStr()); 143 mItem->setText(11, KGlobal::locale()->formatDateTime( e->lastModified(), true, true ));
143 mItem->setText(11, KOPrefs::instance()->calName( e->calID() ));
144 mItem->setText(12, KGlobal::locale()->formatDateTime( e->lastModified(), true, true ));
145 144
146 QString key; 145 QString key;
147 QDate d = e->lastModified().date(); 146 QDate d = e->lastModified().date();
148 QTime t = e->lastModified().time(); 147 QTime t = e->lastModified().time();
149 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); 148 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() );
150 mItem->setSortKey(12,key); 149 mItem->setSortKey(12,key);
151 t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); 150 t = e->doesFloat() ? QTime(0,0) : e->dtStart().time();
152 key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); 151 key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute());
153 mItem->setSortKey(1,key); 152 mItem->setSortKey(1,key);
154 153
155 t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); 154 t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time();
156 key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); 155 key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute());
157 mItem->setSortKey(3,key); 156 mItem->setSortKey(3,key);
158 return true; 157 return true;
159} 158}
160 159
161bool ListItemVisitor::visit(Todo *t) 160bool ListItemVisitor::visit(Todo *t)
162{ 161{
163 mItem->setText(0,t->summary()); 162 mItem->setText(0,t->summary());
164 if ( t->isCompleted() ) { 163 if ( t->isCompleted() ) {
165 mItem->setSortKey(0,"99"+ t->summary().left(10)); 164 mItem->setSortKey(0,"99"+ t->summary().left(10));
166 } else 165 } else
167 mItem->setSortKey(0,QString::number( t->percentComplete()+1 )+ t->summary().left(10)); 166 mItem->setSortKey(0,QString::number( t->percentComplete()+1 )+ t->summary().left(10));
168 mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); 167 mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20]));
169 if (t->hasStartDate()) { 168 if (t->hasStartDate()) {
170 mItem->setText(1,t->dtStartDateStr()); 169 mItem->setText(1,t->dtStartDateStr());
171 if (t->doesFloat()) { 170 if (t->doesFloat()) {
172 mItem->setText(2,"---"); 171 mItem->setText(2,"---");
173 } else { 172 } else {
174 mItem->setText(2,t->dtStartTimeStr()); 173 mItem->setText(2,t->dtStartTimeStr());
175 } 174 }
176 } else { 175 } else {
177 mItem->setText(1,"---"); 176 mItem->setText(1,"---");
178 mItem->setText(2,"---"); 177 mItem->setText(2,"---");
179 } 178 }
180 mItem->setText(3,"---");
181 mItem->setText(4,"---");
182 if ( t->isAlarmEnabled() ) { 179 if ( t->isAlarmEnabled() ) {
183 mItem->setText(5,t->alarms().first()->offsetText() ); 180 mItem->setText(6,t->alarms().first()->offsetText() );
184 } else { 181 } else {
185 mItem->setText(5, i18n("No")); 182 mItem->setText(6, i18n("No"));
186 } 183 }
187 mItem->setText(6, t->recurrenceText()); 184 mItem->setText(7, t->recurrenceText());
188 if( ! t->doesRecur() ) 185 if( ! t->doesRecur() )
189 mItem->setSortKey( 6, "-" ); 186 mItem->setSortKey( 7, "-" );
190 if (t->hasDueDate()) { 187 if (t->hasDueDate()) {
191 mItem->setText(7,t->dtDueDateStr()); 188 mItem->setText(3,t->dtDueDateStr());
192 if (t->doesFloat()) { 189 if (t->doesFloat()) {
193 mItem->setText(8,"---"); 190 mItem->setText(4,"---");
194 } else { 191 } else {
195 mItem->setText(8,t->dtDueTimeStr()); 192 mItem->setText(4,t->dtDueTimeStr());
196 } 193 }
197 } else { 194 } else {
198 mItem->setText(7,"---"); 195 mItem->setText(3,"---");
199 mItem->setText(8,"---"); 196 mItem->setText(4,"---");
200 } 197 }
201 mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); 198 mItem->setText(5, t->durationText());
202 mItem->setText(10,t->categoriesStr()); 199 mItem->setText(8, t->cancelled() ? i18n("Yes") : i18n("No"));
203 mItem->setText(11, KOPrefs::instance()->calName( t->calID() )); 200 mItem->setText(9,t->categoriesStr());
204 mItem->setText(12, KGlobal::locale()->formatDateTime( t->lastModified(), true, true )); 201 mItem->setText(10, KOPrefs::instance()->calName( t->calID() ));
202 mItem->setText(11, KGlobal::locale()->formatDateTime( t->lastModified(), true, true ));
205 QString key; 203 QString key;
206 QDate d = t->lastModified().date(); 204 QDate d = t->lastModified().date();
207 QTime tm = t->lastModified().time(); 205 QTime tm = t->lastModified().time();
208 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); 206 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() );
209 mItem->setSortKey(12,key); 207 mItem->setSortKey(11,key);
210 if (t->hasDueDate()) { 208 if (t->hasDueDate()) {
211 d = t->dtDue().date(); 209 d = t->dtDue().date();
212 tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); 210 tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time();
213 key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); 211 key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute());
214 mItem->setSortKey(7,key); 212 mItem->setSortKey(3,key);
215 } 213 }
216 if ( t->hasStartDate() ) { 214 if ( t->hasStartDate() ) {
217 d = t->dtStart().date(); 215 d = t->dtStart().date();
218 tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); 216 tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time();
219 key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); 217 key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute());
220 mItem->setSortKey(1,key); 218 mItem->setSortKey(1,key);
221 } 219 }
222 return true; 220 return true;
223} 221}
224 222
225bool ListItemVisitor::visit(Journal * j) 223bool ListItemVisitor::visit(Journal * j)
226{ 224{
227 225
228 QString des; 226 QString des;
229 mItem->setPixmap( 0, *sgListViewJournalPix); 227 mItem->setPixmap( 0, *sgListViewJournalPix);
230 if ( !j->summary().isEmpty() ) { 228 if ( !j->summary().isEmpty() ) {
231 des = j->summary(); 229 des = j->summary();
232 } else { 230 } else {
233 des = j->description().left(30); 231 des = j->description().left(30);
234 des = des.simplifyWhiteSpace (); 232 des = des.simplifyWhiteSpace ();
235 des.replace (QRegExp ("\\n"),"" ); 233 des.replace (QRegExp ("\\n"),"" );
236 des.replace (QRegExp ("\\r"),"" ); 234 des.replace (QRegExp ("\\r"),"" );
237 } 235 }
238 mItem->setText(0,des.left(25)); 236 mItem->setText(0,des.left(25));
239 mItem->setSortKey(0,"0"+ des.left(25)); 237 mItem->setSortKey(0,"0"+ des.left(25));
240 mItem->setText(1,j->dtStartDateStr()); 238 mItem->setText(1,j->dtStartDateStr());
241 mItem->setText(2,"---"); 239 mItem->setText(2,"---");
242 mItem->setText(3,"---"); 240 mItem->setText(3,"---");
243 mItem->setText(4,"---"); 241 mItem->setText(4,"---");
244 mItem->setText(5,"---"); 242 mItem->setText(5,"---");
245 mItem->setText(6,"---"); 243 mItem->setText(6,"---");
246 mItem->setText(7,j->dtStartDateStr()); 244 mItem->setText(7,"---");
247 mItem->setText(8,"---"); 245 mItem->setText(8,"---");
248 mItem->setText(9,"---"); 246 mItem->setText(9,j->categoriesStr());
249 mItem->setText(10,j->categoriesStr()); 247 mItem->setText(10, KOPrefs::instance()->calName( j->calID() ));
250 mItem->setText(11, KOPrefs::instance()->calName( j->calID() )); 248 mItem->setText(11, KGlobal::locale()->formatDateTime( j->lastModified(), true, true ));
251 mItem->setText(12, KGlobal::locale()->formatDateTime( j->lastModified(), true, true ));
252 249
253 QString key; 250 QString key;
254 QDate d = j->lastModified().date(); 251 QDate d = j->lastModified().date();
255 QTime tm = j->lastModified().time(); 252 QTime tm = j->lastModified().time();
256 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); 253 key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() );
257 mItem->setSortKey(12,key); 254 mItem->setSortKey(12,key);
258 d = j->dtStart().date(); 255 d = j->dtStart().date();
259 key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); 256 key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
260 mItem->setSortKey(1,key); 257 mItem->setSortKey(1,key);
261 mItem->setSortKey(7,key); 258 mItem->setSortKey(7,key);
262 259
263 return true; 260 return true;
264} 261}
265 262
266KOListView::KOListView(Calendar *calendar, QWidget *parent, 263KOListView::KOListView(Calendar *calendar, QWidget *parent,
267 const char *name) 264 const char *name)
268 : KOEventView(calendar, parent, name) 265 : KOEventView(calendar, parent, name)
269{ 266{
270 267
271 mActiveItem = 0; 268 mActiveItem = 0;
272 mForceShowCompletedTodos = false; 269 mForceShowCompletedTodos = false;
273 mListView = new KOListViewListView(this); 270 mListView = new KOListViewListView(this);
274 mListView->addColumn(i18n("Summary")); 271 mListView->addColumn(i18n("Summary"));
275 mListView->addColumn(i18n("Start Date")); 272 mListView->addColumn(i18n("Start Date"));
276 mListView->addColumn(i18n("Start Time")); 273 mListView->addColumn(i18n("Start Time"));
277 mListView->addColumn(i18n("End Date")); 274 mListView->addColumn(i18n("End/Due Date"));
278 mListView->addColumn(i18n("End Time")); 275 mListView->addColumn(i18n("End/Due Time"));
276 mListView->addColumn(i18n("Duration"));
279 mListView->addColumn(i18n("Alarm")); // alarm set? 277 mListView->addColumn(i18n("Alarm")); // alarm set?
280 mListView->addColumn(i18n("Recurs")); // recurs? 278 mListView->addColumn(i18n("Recurs")); // recurs?
281 mListView->addColumn(i18n("Due Date"));
282 mListView->addColumn(i18n("Due Time"));
283 mListView->addColumn(i18n("Cancelled")); 279 mListView->addColumn(i18n("Cancelled"));
284 mListView->addColumn(i18n("Categories")); 280 mListView->addColumn(i18n("Categories"));
285 mListView->addColumn(i18n("Calendar")); 281 mListView->addColumn(i18n("Calendar"));
286 mListView->addColumn(i18n("Last Modified")); 282 mListView->addColumn(i18n("Last Modified"));
287 283
288 mListView->setColumnAlignment(0,AlignLeft); 284 mListView->setColumnAlignment(0,AlignLeft);
289 mListView->setColumnAlignment(1,AlignLeft); 285 mListView->setColumnAlignment(1,AlignLeft);
290 mListView->setColumnAlignment(2,AlignHCenter); 286 mListView->setColumnAlignment(2,AlignHCenter);
291 mListView->setColumnAlignment(3,AlignLeft); 287 mListView->setColumnAlignment(3,AlignLeft);
292 mListView->setColumnAlignment(4,AlignHCenter); 288 mListView->setColumnAlignment(4,AlignHCenter);
293 mListView->setColumnAlignment(5,AlignLeft); 289 mListView->setColumnAlignment(5,AlignLeft);
294 mListView->setColumnAlignment(6,AlignLeft); 290 mListView->setColumnAlignment(6,AlignLeft);
295 mListView->setColumnAlignment(7,AlignLeft); 291 mListView->setColumnAlignment(7,AlignLeft);
296 mListView->setColumnAlignment(8,AlignLeft); 292 mListView->setColumnAlignment(8,AlignLeft);
297 mListView->setColumnAlignment(9,AlignLeft); 293 mListView->setColumnAlignment(9,AlignLeft);
298 mListView->setColumnAlignment(10,AlignLeft); 294 mListView->setColumnAlignment(10,AlignLeft);
299 mListView->setColumnAlignment(11,AlignLeft); 295 mListView->setColumnAlignment(11,AlignLeft);
300 mListView->setColumnAlignment(12,AlignLeft);
301 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); 296 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this);
302 297
303 int iii = 0; 298 int iii = 0;
304 for ( iii = 0; iii< 13 ; ++iii ) 299 for ( iii = 0; iii< 12 ; ++iii )
305 mListView->setColumnWidthMode( iii, QListView::Manual ); 300 mListView->setColumnWidthMode( iii, QListView::Manual );
306 301
307 QBoxLayout *layoutTop = new QVBoxLayout(this); 302 QBoxLayout *layoutTop = new QVBoxLayout(this);
308 layoutTop->addWidget(mListView); 303 layoutTop->addWidget(mListView);
309 mListView->setFont ( KOPrefs::instance()->mListViewFont ); 304 mListView->setFont ( KOPrefs::instance()->mListViewFont );
310 mPopupMenu = eventPopup(); 305 mPopupMenu = eventPopup();
311 QPopupMenu* selPopup = new QPopupMenu ( this ); 306 QPopupMenu* selPopup = new QPopupMenu ( this );
312 mPopupMenu->insertSeparator(); 307 mPopupMenu->insertSeparator();
313 308
314 selPopup->insertItem(i18n("All"),this, 309 selPopup->insertItem(i18n("All"),this,
315 SLOT(allSelection())); 310 SLOT(allSelection()));
316 selPopup->insertItem(i18n("None"),this, 311 selPopup->insertItem(i18n("None"),this,
317 SLOT(clearSelection())); 312 SLOT(clearSelection()));
318 selPopup->insertItem(i18n("Delete selected..."),this, 313 selPopup->insertItem(i18n("Delete selected..."),this,
319 SLOT(deleteAll())); 314 SLOT(deleteAll()));
320 mPopupMenu->insertItem(i18n("Selection"), selPopup ); 315 mPopupMenu->insertItem(i18n("Selection"), selPopup );
321 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 316 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
322 i18n("Hide all selected"),this, 317 i18n("Hide all selected"),this,
323 SLOT(hideAll()),true); 318 SLOT(hideAll()),true);
324 319
325 selPopup->insertSeparator(); 320 selPopup->insertSeparator();
326 QPopupMenu * exportPO = new QPopupMenu ( this ); 321 QPopupMenu * exportPO = new QPopupMenu ( this );
327 selPopup->insertItem( i18n("Export"), exportPO ); 322 selPopup->insertItem( i18n("Export"), exportPO );
328#ifdef DESKTOP_VERSION 323#ifdef DESKTOP_VERSION
329 mPopupMenu->insertSeparator(); 324 mPopupMenu->insertSeparator();
330 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 325 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
331 i18n("Print complete list..."),this, 326 i18n("Print complete list..."),this,
332 SLOT(printList()),true); 327 SLOT(printList()),true);
333#endif 328#endif
334 mCalPopup = new QPopupMenu ( this ); 329 mCalPopup = new QPopupMenu ( this );
335 selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); 330 selPopup->insertItem( i18n("Set Calendar"), mCalPopup );
336 331
337 selPopup->insertItem(i18n("Set categories")+"...",this, 332 selPopup->insertItem(i18n("Set categories")+"...",this,
338 SLOT(setCat()) ); 333 SLOT(setCat()) );
339 selPopup->insertItem( i18n("Set alarm..."),this, 334 selPopup->insertItem( i18n("Set alarm..."),this,
340 SLOT(setAlarm())); 335 SLOT(setAlarm()));
341#if 0 336#if 0
342 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 337 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
343 i18n("Set categories")+"...",this, 338 i18n("Set categories")+"...",this,
344 SLOT(setCat()),true); 339 SLOT(setCat()),true);
345 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 340 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
346 i18n("Set alarm..."),this, 341 i18n("Set alarm..."),this,
347 SLOT(setAlarm()),true); 342 SLOT(setAlarm()),true);
348#endif 343#endif
349 QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, 344 QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this,
350 SLOT( populateCalPopup() )); 345 SLOT( populateCalPopup() ));
351 QObject::connect(mCalPopup,SIGNAL(activated( int )),this, 346 QObject::connect(mCalPopup,SIGNAL(activated( int )),this,
352 SLOT( setCalendar( int ) )); 347 SLOT( setCalendar( int ) ));
353 QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, 348 QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this,
354 SLOT( catChanged( Incidence * ) )); 349 SLOT( catChanged( Incidence * ) ));
355 exportPO->insertItem( i18n("As iCal (ics) file..."),this, 350 exportPO->insertItem( i18n("As iCal (ics) file..."),this,
356 SLOT(saveToFile())); 351 SLOT(saveToFile()));
357 exportPO->insertItem( i18n("As vCal (vcs) file..."),this, 352 exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
358 SLOT(saveToFileVCS())); 353 SLOT(saveToFileVCS()));
359 exportPO->insertItem( i18n("Journal/Details..."),this, 354 exportPO->insertItem( i18n("Journal/Details..."),this,
360 SLOT(saveDescriptionToFile())); 355 SLOT(saveDescriptionToFile()));
361 // mPopupMenu->insertSeparator(); 356 // mPopupMenu->insertSeparator();
362 // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 357 // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
363 // i18n("Add Categ. to selected..."),this, 358 // i18n("Add Categ. to selected..."),this,
364 // SLOT(addCat()),true); 359 // SLOT(addCat()),true);
365 //mPopupMenu->insertSeparator(); 360 //mPopupMenu->insertSeparator();
366#ifndef DESKTOP_VERSION 361#ifndef DESKTOP_VERSION
367 selPopup->insertSeparator(); 362 selPopup->insertSeparator();
368 selPopup->insertItem( i18n("Beam via IR..."),this, 363 selPopup->insertItem( i18n("Beam via IR..."),this,
369 SLOT(beamSelected())); 364 SLOT(beamSelected()));
370#if 0 365#if 0
371 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 366 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
372 i18n("Beam via IR"),this, 367 i18n("Beam via IR"),this,
373 SLOT(beamSelected()),true); 368 SLOT(beamSelected()),true);
374#endif 369#endif
375#endif 370#endif
376 /* 371 /*
377 mPopupMenu = new QPopupMenu; 372 mPopupMenu = new QPopupMenu;
378 mPopupMenu->insertItem(i18n("Edit Event"), this, 373 mPopupMenu->insertItem(i18n("Edit Event"), this,
379 SLOT (editEvent())); 374 SLOT (editEvent()));
380 mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, 375 mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this,
381 SLOT (deleteEvent())); 376 SLOT (deleteEvent()));
382 mPopupMenu->insertSeparator(); 377 mPopupMenu->insertSeparator();
383 mPopupMenu->insertItem(i18n("Show Dates"), this, 378 mPopupMenu->insertItem(i18n("Show Dates"), this,
384 SLOT(showDates())); 379 SLOT(showDates()));
385 mPopupMenu->insertItem(i18n("Hide Dates"), this, 380 mPopupMenu->insertItem(i18n("Hide Dates"), this,
386 SLOT(hideDates())); 381 SLOT(hideDates()));
387 */ 382 */
388 QObject::connect(mListView,SIGNAL( newEvent()), 383 QObject::connect(mListView,SIGNAL( newEvent()),
389 this,SIGNAL(signalNewEvent())); 384 this,SIGNAL(signalNewEvent()));
390 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), 385 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)),
391 this,SLOT(defaultItemAction(QListViewItem *))); 386 this,SLOT(defaultItemAction(QListViewItem *)));
392 QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, 387 QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *,
393 const QPoint &, int )), 388 const QPoint &, int )),
394 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); 389 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int)));
395 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), 390 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)),
396 SLOT(processSelectionChange(QListViewItem *))); 391 SLOT(processSelectionChange(QListViewItem *)));
397 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), 392 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
398 SIGNAL(showIncidenceSignal(Incidence *)) ); 393 SIGNAL(showIncidenceSignal(Incidence *)) );
399 394
400 readSettings(KOGlobals::config(),"KOListView Layout"); 395 readSettings(KOGlobals::config(),"KOListView Layout");
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 77d0ac8..98a820d 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -132,193 +132,196 @@ QPixmap* sgListViewCompletedPix[6];
132QPixmap* sgListViewJournalPix; 132QPixmap* sgListViewJournalPix;
133 133
134 134
135int globalFlagBlockStartup; 135int globalFlagBlockStartup;
136MainWindow::MainWindow( QWidget *parent, const char *name ) : 136MainWindow::MainWindow( QWidget *parent, const char *name ) :
137 QMainWindow( parent, name ) 137 QMainWindow( parent, name )
138{ 138{
139 sgListViewCompletedPix[5] = &listviewPix; 139 sgListViewCompletedPix[5] = &listviewPix;
140 sgListViewCompletedPix[0] = &listviewPix0; 140 sgListViewCompletedPix[0] = &listviewPix0;
141 sgListViewCompletedPix[1] = &listviewPix20; 141 sgListViewCompletedPix[1] = &listviewPix20;
142 sgListViewCompletedPix[2] = &listviewPix40; 142 sgListViewCompletedPix[2] = &listviewPix40;
143 sgListViewCompletedPix[3] = &listviewPix60; 143 sgListViewCompletedPix[3] = &listviewPix60;
144 sgListViewCompletedPix[4] = &listviewPix80; 144 sgListViewCompletedPix[4] = &listviewPix80;
145 //int size = 12; 145 //int size = 12;
146 { 146 {
147 sgListViewCompletedPix[5]->resize( 11, 11 ); 147 sgListViewCompletedPix[5]->resize( 11, 11 );
148 sgListViewCompletedPix[5]->fill( Qt::white ); 148 sgListViewCompletedPix[5]->fill( Qt::white );
149 QPainter p ( sgListViewCompletedPix[5] ); 149 QPainter p ( sgListViewCompletedPix[5] );
150 p.drawRect( 0,0,11,11); 150 p.drawRect( 0,0,11,11);
151 p.drawLine ( 2, 5, 4 , 7 ) ; 151 p.drawLine ( 2, 5, 4 , 7 ) ;
152 p.drawLine ( 4 , 7 , 8, 3) ; 152 p.drawLine ( 4 , 7 , 8, 3) ;
153 int iii = 0; 153 int iii = 0;
154 for ( iii = 0; iii < 5; ++iii ) { 154 for ( iii = 0; iii < 5; ++iii ) {
155 sgListViewCompletedPix[iii]->resize( 11, 11 ); 155 sgListViewCompletedPix[iii]->resize( 11, 11 );
156 sgListViewCompletedPix[iii]->fill( Qt::white ); 156 sgListViewCompletedPix[iii]->fill( Qt::white );
157 QPainter p ( sgListViewCompletedPix[iii] ); 157 QPainter p ( sgListViewCompletedPix[iii] );
158 p.drawRect( 0,0,11,11); 158 p.drawRect( 0,0,11,11);
159 if ( iii ) 159 if ( iii )
160 p.fillRect( 1,1,iii*2,9,Qt::gray ); 160 p.fillRect( 1,1,iii*2,9,Qt::gray );
161 } 161 }
162 sgListViewJournalPix = &journalPix; 162 sgListViewJournalPix = &journalPix;
163 sgListViewJournalPix->resize( 11, 11 ); 163 sgListViewJournalPix->resize( 11, 11 );
164 sgListViewJournalPix->fill( Qt::white ); 164 sgListViewJournalPix->fill( Qt::white );
165 { 165 {
166 QPainter p ( sgListViewJournalPix ); 166 QPainter p ( sgListViewJournalPix );
167 p.drawRect( 0,0,11,11); 167 p.drawRect( 0,0,11,11);
168 p.drawLine( 2,3,5,3); 168 p.drawLine( 2,3,5,3);
169 p.drawLine( 2,5,8,5); 169 p.drawLine( 2,5,8,5);
170 p.drawLine( 2,7,6,7); 170 p.drawLine( 2,7,6,7);
171 } 171 }
172 } 172 }
173 mClosed = false; 173 mClosed = false;
174 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 174 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
175 QString confFile = locateLocal("config","korganizerrc"); 175 QString confFile = locateLocal("config","korganizerrc");
176 QFileInfo finf ( confFile ); 176 QFileInfo finf ( confFile );
177 bool showWarning = !finf.exists(); 177 bool showWarning = !finf.exists();
178 setIcon(SmallIcon( "ko24" ) ); 178 setIcon(SmallIcon( "ko24" ) );
179 mBlockAtStartup = true; 179 mBlockAtStartup = true;
180 mFlagKeyPressed = false; 180 mFlagKeyPressed = false;
181 setCaption("KO/Pi"); 181 setCaption("KO/Pi");
182 KOPrefs *p = KOPrefs::instance(); 182 KOPrefs *p = KOPrefs::instance();
183 //KPimGlobalPrefs::instance()->setGlobalConfig(); 183 //KPimGlobalPrefs::instance()->setGlobalConfig();
184 p->mCurrentDisplayedView = 0; 184 p->mCurrentDisplayedView = 0;
185 if ( p->mHourSize > 22 ) 185 if ( p->mHourSize > 22 )
186 p->mHourSize = 22; 186 p->mHourSize = 22;
187 QMainWindow::ToolBarDock tbd; 187 QMainWindow::ToolBarDock tbd;
188 if ( p->mToolBarHor ) { 188 if ( p->mToolBarHor ) {
189 if ( p->mToolBarUp ) 189 if ( p->mToolBarUp )
190 tbd = Bottom; 190 tbd = Bottom;
191 else 191 else
192 tbd = Top; 192 tbd = Top;
193 } 193 }
194 else { 194 else {
195 if ( p->mToolBarUp ) 195 if ( p->mToolBarUp )
196 tbd = Right; 196 tbd = Right;
197 else 197 else
198 tbd = Left; 198 tbd = Left;
199 } 199 }
200 if ( KOPrefs::instance()->mUseAppColors ) 200 if ( KOPrefs::instance()->mUseAppColors )
201 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 201 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
202 globalFlagBlockStartup = 1; 202 globalFlagBlockStartup = 1;
203 iconToolBar = new QPEToolBar( this ); 203 iconToolBar = new QPEToolBar( this );
204 addToolBar (iconToolBar , tbd ); 204 addToolBar (iconToolBar , tbd );
205 205
206#ifdef DESKTOP_VERSION 206#ifdef DESKTOP_VERSION
207 if ( KOPrefs::instance()->mShowIconFilter ) 207 if ( KOPrefs::instance()->mShowIconFilter )
208#else 208#else
209 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) 209 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar )
210#endif 210#endif
211 211
212{ 212{
213 if ( p->mToolBarHorF ) { 213 if ( p->mToolBarHorF ) {
214 if ( p->mToolBarUpF ) 214 if ( p->mToolBarUpF )
215 tbd = Bottom; 215 tbd = Bottom;
216 else 216 else
217 tbd = Top; 217 tbd = Top;
218 } 218 }
219 else { 219 else {
220 if ( p->mToolBarUpF ) 220 if ( p->mToolBarUpF )
221 tbd = Right; 221 tbd = Right;
222 else 222 else
223 tbd = Left; 223 tbd = Left;
224 } 224 }
225 filterToolBar = new QPEToolBar ( this ); 225 filterToolBar = new QPEToolBar ( this );
226 filterMenubar = new KMenuBar( 0 ); 226 filterMenubar = new KMenuBar( 0 );
227 QFontMetrics fm ( filterMenubar->font() ); 227 QFontMetrics fm ( filterMenubar->font() );
228 228#ifndef DESKTOP_VERSION
229 filterToolBar->setFocusPolicy( NoFocus );
230 filterMenubar->setFocusPolicy( NoFocus );
231#endif
229 filterPopupMenu = new QPopupMenu( this ); 232 filterPopupMenu = new QPopupMenu( this );
230 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); 233 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
231 QString addTest = "A"; 234 QString addTest = "A";
232 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); 235 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
233#ifdef DESKTOP_VERSION 236#ifdef DESKTOP_VERSION
234 addTest = "AAABBBCCCx"; 237 addTest = "AAABBBCCCx";
235#else 238#else
236 addTest = "AAx"; 239 addTest = "AAx";
237#endif 240#endif
238 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); 241 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) );
239 addToolBar (filterToolBar , tbd ); 242 addToolBar (filterToolBar , tbd );
240 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); 243 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) );
241 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); 244 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) );
242 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) 245 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar )
243 filterToolBar->hide(); 246 filterToolBar->hide();
244 } else { 247 } else {
245 filterToolBar = 0; 248 filterToolBar = 0;
246 filterMenubar = 0; 249 filterMenubar = 0;
247 filterPopupMenu = 0; 250 filterPopupMenu = 0;
248 } 251 }
249 if ( p->mShowIconOnetoolbar ) { 252 if ( p->mShowIconOnetoolbar ) {
250 viewToolBar = iconToolBar ; 253 viewToolBar = iconToolBar ;
251 navigatorToolBar = iconToolBar ; 254 navigatorToolBar = iconToolBar ;
252 } else { 255 } else {
253#ifndef DESKTOP_VERSION 256#ifndef DESKTOP_VERSION
254 setToolBarsMovable( false ); 257 setToolBarsMovable( false );
255#endif 258#endif
256 if ( p->mToolBarHorV ) { 259 if ( p->mToolBarHorV ) {
257 if ( p->mToolBarUpV ) 260 if ( p->mToolBarUpV )
258 tbd = Bottom; 261 tbd = Bottom;
259 else 262 else
260 tbd = Top; 263 tbd = Top;
261 } 264 }
262 else { 265 else {
263 if ( p->mToolBarUpV ) 266 if ( p->mToolBarUpV )
264 tbd = Right; 267 tbd = Right;
265 else 268 else
266 tbd = Left; 269 tbd = Left;
267 } 270 }
268 viewToolBar = new QPEToolBar( this ); 271 viewToolBar = new QPEToolBar( this );
269 addToolBar (viewToolBar , tbd ); 272 addToolBar (viewToolBar , tbd );
270 if ( p->mToolBarHorN ) { 273 if ( p->mToolBarHorN ) {
271 if ( p->mToolBarUpN ) 274 if ( p->mToolBarUpN )
272 tbd = Bottom; 275 tbd = Bottom;
273 else 276 else
274 tbd = Top; 277 tbd = Top;
275 } 278 }
276 else { 279 else {
277 if ( p->mToolBarUpN ) 280 if ( p->mToolBarUpN )
278 tbd = Right; 281 tbd = Right;
279 else 282 else
280 tbd = Left; 283 tbd = Left;
281 } 284 }
282 navigatorToolBar = new QPEToolBar( this ); 285 navigatorToolBar = new QPEToolBar( this );
283 addToolBar (navigatorToolBar , tbd ); 286 addToolBar (navigatorToolBar , tbd );
284 } 287 }
285 288
286 289
287 290
288 mCalendarModifiedFlag = false; 291 mCalendarModifiedFlag = false;
289 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); 292 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
290 splash->setAlignment ( AlignCenter ); 293 splash->setAlignment ( AlignCenter );
291 setCentralWidget( splash ); 294 setCentralWidget( splash );
292#ifndef DESKTOP_VERSION 295#ifndef DESKTOP_VERSION
293 showMaximized(); 296 showMaximized();
294#endif 297#endif
295 298
296 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); 299 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ());
297 setDefaultPreferences(); 300 setDefaultPreferences();
298 mCalendar = new CalendarLocal(); 301 mCalendar = new CalendarLocal();
299 mView = new CalendarView( mCalendar, this,"mCalendar " ); 302 mView = new CalendarView( mCalendar, this,"mCalendar " );
300 mView->hide(); 303 mView->hide();
301 //mView->resize(splash->size() ); 304 //mView->resize(splash->size() );
302 initActions(); 305 initActions();
303 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); 306 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu);
304 mSyncManager->setBlockSave(false); 307 mSyncManager->setBlockSave(false);
305 mView->setSyncManager(mSyncManager); 308 mView->setSyncManager(mSyncManager);
306#ifndef DESKTOP_VERSION 309#ifndef DESKTOP_VERSION
307 iconToolBar->show(); 310 iconToolBar->show();
308 qApp->processEvents(); 311 qApp->processEvents();
309#endif 312#endif
310 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); 313 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ());
311 int vh = height() ; 314 int vh = height() ;
312 int vw = width(); 315 int vw = width();
313 //qDebug("Toolbar hei %d ",iconToolBar->height() ); 316 //qDebug("Toolbar hei %d ",iconToolBar->height() );
314 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 317 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
315 vh -= iconToolBar->height(); 318 vh -= iconToolBar->height();
316 } else { 319 } else {
317 vw -= iconToolBar->height(); 320 vw -= iconToolBar->height();
318 } 321 }
319 //mView->setMaximumSize( splash->size() ); 322 //mView->setMaximumSize( splash->size() );
320 //mView->resize( splash->size() ); 323 //mView->resize( splash->size() );
321 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 324 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
322 mView->readSettings(); 325 mView->readSettings();
323 bool newFile = false; 326 bool newFile = false;
324 if( !QFile::exists( defaultFileName() ) ) { 327 if( !QFile::exists( defaultFileName() ) ) {
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp
index 79e0464..3157214 100644
--- a/libkcal/alarm.cpp
+++ b/libkcal/alarm.cpp
@@ -257,193 +257,193 @@ void Alarm::setMailSubject(const QString &mailAlarmSubject)
257 if (mType == Email) { 257 if (mType == Email) {
258 mMailSubject = mailAlarmSubject; 258 mMailSubject = mailAlarmSubject;
259 mParent->updated(); 259 mParent->updated();
260 } 260 }
261} 261}
262 262
263QString Alarm::mailSubject() const 263QString Alarm::mailSubject() const
264{ 264{
265 return (mType == Email) ? mMailSubject : QString::null; 265 return (mType == Email) ? mMailSubject : QString::null;
266} 266}
267 267
268void Alarm::setMailAttachment(const QString &mailAttachFile) 268void Alarm::setMailAttachment(const QString &mailAttachFile)
269{ 269{
270 if (mType == Email) { 270 if (mType == Email) {
271 mMailAttachFiles.clear(); 271 mMailAttachFiles.clear();
272 mMailAttachFiles += mailAttachFile; 272 mMailAttachFiles += mailAttachFile;
273 mParent->updated(); 273 mParent->updated();
274 } 274 }
275} 275}
276 276
277void Alarm::setMailAttachments(const QStringList &mailAttachFiles) 277void Alarm::setMailAttachments(const QStringList &mailAttachFiles)
278{ 278{
279 if (mType == Email) { 279 if (mType == Email) {
280 mMailAttachFiles = mailAttachFiles; 280 mMailAttachFiles = mailAttachFiles;
281 mParent->updated(); 281 mParent->updated();
282 } 282 }
283} 283}
284 284
285void Alarm::addMailAttachment(const QString &mailAttachFile) 285void Alarm::addMailAttachment(const QString &mailAttachFile)
286{ 286{
287 if (mType == Email) { 287 if (mType == Email) {
288 mMailAttachFiles += mailAttachFile; 288 mMailAttachFiles += mailAttachFile;
289 mParent->updated(); 289 mParent->updated();
290 } 290 }
291} 291}
292 292
293QStringList Alarm::mailAttachments() const 293QStringList Alarm::mailAttachments() const
294{ 294{
295 return (mType == Email) ? mMailAttachFiles : QStringList(); 295 return (mType == Email) ? mMailAttachFiles : QStringList();
296} 296}
297 297
298void Alarm::setMailText(const QString &text) 298void Alarm::setMailText(const QString &text)
299{ 299{
300 if (mType == Email) { 300 if (mType == Email) {
301 mDescription = text; 301 mDescription = text;
302 mParent->updated(); 302 mParent->updated();
303 } 303 }
304} 304}
305 305
306QString Alarm::mailText() const 306QString Alarm::mailText() const
307{ 307{
308 return (mType == Email) ? mDescription : QString::null; 308 return (mType == Email) ? mDescription : QString::null;
309} 309}
310 310
311void Alarm::setDisplayAlarm(const QString &text) 311void Alarm::setDisplayAlarm(const QString &text)
312{ 312{
313 mType = Display; 313 mType = Display;
314 mDescription = text; 314 mDescription = text;
315 mParent->updated(); 315 mParent->updated();
316} 316}
317 317
318void Alarm::setText(const QString &text) 318void Alarm::setText(const QString &text)
319{ 319{
320 if (mType == Display) { 320 if (mType == Display) {
321 mDescription = text; 321 mDescription = text;
322 mParent->updated(); 322 mParent->updated();
323 } 323 }
324} 324}
325 325
326QString Alarm::text() const 326QString Alarm::text() const
327{ 327{
328 return (mType == Display) ? mDescription : QString::null; 328 return (mType == Display) ? mDescription : QString::null;
329} 329}
330 330
331void Alarm::setTime(const QDateTime &alarmTime) 331void Alarm::setTime(const QDateTime &alarmTime)
332{ 332{
333 mAlarmTime = alarmTime; 333 mAlarmTime = alarmTime;
334 mHasTime = true; 334 mHasTime = true;
335 335
336 mParent->updated(); 336 mParent->updated();
337} 337}
338int Alarm::offset() 338int Alarm::offset()
339{ 339{
340 if ( hasTime() ) { 340 if ( hasTime() ) {
341 if (mParent->typeID() == todoID ) { 341 if (mParent->typeID() == todoID ) {
342 Todo *t = static_cast<Todo*>(mParent); 342 Todo *t = static_cast<Todo*>(mParent);
343 return t->dtDue().secsTo( mAlarmTime ) ; 343 return t->dtDue().secsTo( mAlarmTime ) ;
344 } else 344 } else
345 return mParent->dtStart().secsTo( mAlarmTime ) ; 345 return mParent->dtStart().secsTo( mAlarmTime ) ;
346 } 346 }
347 else 347 else
348 { 348 {
349 return mOffset.asSeconds(); 349 return mOffset.asSeconds();
350 } 350 }
351 351
352} 352}
353QString Alarm::offsetText() 353QString Alarm::offsetText()
354{ 354{
355 int min = -offset()/60; 355 int min = -offset()/60;
356 int hours = min /60; 356 int hours = min /60;
357 min = min % 60; 357 min = min % 60;
358 int days = hours /24; 358 int days = hours /24;
359 hours = hours % 24; 359 hours = hours % 24;
360 QString message; 360 QString message;
361 //qDebug("%d %d %d ", days, hours, min ); 361 //qDebug("%d %d %d ", days, hours, min );
362 if ( days > 0 ) 362 if ( days > 0 )
363 message += i18n("%1d").arg( days ); 363 message += i18n("%1d").arg( days );
364 if ( hours > 0 ) { 364 if ( hours > 0 ) {
365 if ( !message.isEmpty() ) message += "/"; 365 if ( !message.isEmpty() ) message += "/";
366 message += i18n("%1h").arg( hours ); 366 message += i18n("%1h").arg( hours );
367 } 367 }
368 if ( min > 0 ) { 368 if ( min > 0 ) {
369 if ( !message.isEmpty() ) message += "/"; 369 if ( !message.isEmpty() ) message += "/";
370 message += i18n("%1min").arg( min ); 370 message += i18n("%1min").arg( min );
371 } 371 }
372 if ( message.isEmpty() ) 372 if ( message.isEmpty() )
373 message = i18n("%1min").arg( 0 ); 373 message = i18n("%1min").arg( 0 );
374 if ( !mParent->alarmEnabled() ) 374 if ( !mParent->alarmEnabled() )
375 return "!"+message + i18n("(disabled)"); 375 return "!"+message + i18n("(disabled)");
376 return message; 376 return message;
377} 377}
378 378
379 379
380QDateTime Alarm::time() const 380QDateTime Alarm::time() const
381{ 381{
382 if ( hasTime() ) 382 if ( hasTime() )
383 return mAlarmTime; 383 return mAlarmTime;
384 else 384 else
385 { 385 {
386 if (mParent->typeID() == todoID ) { 386 if (mParent->typeID() == todoID ) {
387 Todo *t = static_cast<Todo*>(mParent); 387 Todo *t = static_cast<Todo*>(mParent);
388 return mOffset.end( t->dtDue() ); 388 return mOffset.end( t->dtDue() );
389 } else if (mEndOffset) { 389 } else if (mEndOffset) {
390 return mOffset.end( mParent->dtEnd() ); 390 return mOffset.end( mParent->dtEnd() );
391 } else { 391 } else {
392 return mOffset.end( mParent->dtStart() ); 392 return mOffset.end( mParent->dtStart() );
393 } 393 }
394 } 394 }
395} 395}
396 396
397bool Alarm::hasTime() const 397bool Alarm::hasTime() const
398{ 398{
399 return mHasTime; 399 return mHasTime;
400} 400}
401 401
402void Alarm::setSnoozeTime(int alarmSnoozeTime) 402void Alarm::setSnoozeTime(int alarmSnoozeTime)
403{ 403{
404 mAlarmSnoozeTime = alarmSnoozeTime; 404 mAlarmSnoozeTime = alarmSnoozeTime;
405 mParent->updated(); 405 mParent->updated();
406} 406}
407 407
408int Alarm::snoozeTime() const 408int Alarm::snoozeTime() const
409{ 409{
410 return mAlarmSnoozeTime; 410 return mAlarmSnoozeTime;
411} 411}
412 412
413void Alarm::setRepeatCount(int alarmRepeatCount) 413void Alarm::setRepeatCount(int alarmRepeatCount)
414{ 414{
415 kdDebug(5800) << "Alarm::setRepeatCount(): " << alarmRepeatCount << endl; 415 kdDebug(5800) << "Alarm::setRepeatCount(): " << alarmRepeatCount << endl;
416 416
417 mAlarmRepeatCount = alarmRepeatCount; 417 mAlarmRepeatCount = alarmRepeatCount;
418 mParent->updated(); 418 mParent->updated();
419} 419}
420 420
421int Alarm::repeatCount() const 421int Alarm::repeatCount() const
422{ 422{
423 kdDebug(5800) << "Alarm::repeatCount(): " << mAlarmRepeatCount << endl; 423 kdDebug(5800) << "Alarm::repeatCount(): " << mAlarmRepeatCount << endl;
424 return mAlarmRepeatCount; 424 return mAlarmRepeatCount;
425} 425}
426 426
427void Alarm::toggleAlarm() 427void Alarm::toggleAlarm()
428{ 428{
429 mAlarmEnabled = !mAlarmEnabled; 429 mAlarmEnabled = !mAlarmEnabled;
430 mParent->updated(); 430 mParent->updated();
431} 431}
432 432
433void Alarm::setEnabled(bool enable) 433void Alarm::setEnabled(bool enable)
434{ 434{
435 mAlarmEnabled = enable; 435 mAlarmEnabled = enable;
436 mParent->updated(); 436 mParent->updated();
437} 437}
438 438
439bool Alarm::enabled() const 439bool Alarm::enabled() const
440{ 440{
441 return mAlarmEnabled; 441 return mAlarmEnabled;
442} 442}
443 443
444void Alarm::setStartOffset( const Duration &offset ) 444void Alarm::setStartOffset( const Duration &offset )
445{ 445{
446 mOffset = offset; 446 mOffset = offset;
447 mEndOffset = false; 447 mEndOffset = false;
448 mHasTime = false; 448 mHasTime = false;
449 mParent->updated(); 449 mParent->updated();
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index 0766fd9..fdf5657 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -321,96 +321,104 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, QDateTime*
321 incidenceStart = incidenceStart.addSecs( -300 ); 321 incidenceStart = incidenceStart.addSecs( -300 );
322 else 322 else
323 testincidenceStart = testincidenceStart.addSecs( -300 ); 323 testincidenceStart = testincidenceStart.addSecs( -300 );
324 int count = 0; 324 int count = 0;
325 ok = true; 325 ok = true;
326 int countbreak = 2000; 326 int countbreak = 2000;
327 QDateTime stopSearch; 327 QDateTime stopSearch;
328 bool testStop = false; 328 bool testStop = false;
329 if ( startDT ) { 329 if ( startDT ) {
330 stopSearch = startDT->addDays( 365*3 ); 330 stopSearch = startDT->addDays( 365*3 );
331 testStop = true; 331 testStop = true;
332 } 332 }
333 while ( ok ) { 333 while ( ok ) {
334 ++count; 334 ++count;
335 if ( count > countbreak ) break; 335 if ( count > countbreak ) break;
336 if ( computeThis ) { 336 if ( computeThis ) {
337 if ( testStop ) 337 if ( testStop )
338 if ( testincidenceStart > stopSearch ) 338 if ( testincidenceStart > stopSearch )
339 break; 339 break;
340 incidenceStart = getNextOccurence( incidenceStart.addSecs( 60 ), &ok ); 340 incidenceStart = getNextOccurence( incidenceStart.addSecs( 60 ), &ok );
341 } 341 }
342 else { 342 else {
343 if ( testStop ) 343 if ( testStop )
344 if ( incidenceStart > stopSearch ) 344 if ( incidenceStart > stopSearch )
345 break; 345 break;
346 testincidenceStart = testEvent->getNextOccurence( testincidenceStart.addSecs( 60 ), &ok ); 346 testincidenceStart = testEvent->getNextOccurence( testincidenceStart.addSecs( 60 ), &ok );
347 } 347 }
348 if ( ok ) { 348 if ( ok ) {
349 if ( incidenceStart < testincidenceStart.addSecs( testduration ) && testincidenceStart < incidenceStart.addSecs( duration ) ) { 349 if ( incidenceStart < testincidenceStart.addSecs( testduration ) && testincidenceStart < incidenceStart.addSecs( duration ) ) {
350 if ( incidenceStart < testincidenceStart ) 350 if ( incidenceStart < testincidenceStart )
351 *overlapDT = testincidenceStart; 351 *overlapDT = testincidenceStart;
352 else 352 else
353 *overlapDT = incidenceStart; 353 *overlapDT = incidenceStart;
354 if ( startDT ) { 354 if ( startDT ) {
355 if ( *overlapDT >= *startDT ) 355 if ( *overlapDT >= *startDT )
356 return true; 356 return true;
357 } else 357 } else
358 return true; 358 return true;
359 } 359 }
360 computeThis = ( incidenceStart < testincidenceStart ); 360 computeThis = ( incidenceStart < testincidenceStart );
361 } 361 }
362 362
363 } 363 }
364 //qDebug("%d rec counter stopped at %d - %s %s", ok ,count, summary().latin1(),testEvent->summary().latin1() ); 364 //qDebug("%d rec counter stopped at %d - %s %s", ok ,count, summary().latin1(),testEvent->summary().latin1() );
365 return false; 365 return false;
366} 366}
367QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const 367QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const
368{ 368{
369 *ok = false; 369 *ok = false;
370 if ( !alarmEnabled() ) 370 if ( !alarmEnabled() )
371 return QDateTime (); 371 return QDateTime ();
372 bool yes; 372 bool yes;
373 QDateTime incidenceStart = getNextOccurence( start_dt, &yes ); 373 QDateTime incidenceStart = getNextOccurence( start_dt, &yes );
374 if ( ! yes || cancelled() ) { 374 if ( ! yes || cancelled() ) {
375 *ok = false; 375 *ok = false;
376 return QDateTime (); 376 return QDateTime ();
377 } 377 }
378 378
379 bool enabled = false; 379 bool enabled = false;
380 Alarm* alarm; 380 Alarm* alarm;
381 int off = 0; 381 int off = 0;
382 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; 382 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );;
383 // if ( QDateTime::currentDateTime() > incidenceStart ){ 383 // if ( QDateTime::currentDateTime() > incidenceStart ){
384// *ok = false; 384// *ok = false;
385// return incidenceStart; 385// return incidenceStart;
386// } 386// }
387 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 387 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
388 if (alarm->enabled()) { 388 if (alarm->enabled()) {
389 if ( alarm->hasTime () ) { 389 if ( alarm->hasTime () ) {
390 if ( alarm->time() < alarmStart ) { 390 if ( alarm->time() < alarmStart ) {
391 alarmStart = alarm->time(); 391 alarmStart = alarm->time();
392 enabled = true; 392 enabled = true;
393 off = alarmStart.secsTo( incidenceStart ); 393 off = alarmStart.secsTo( incidenceStart );
394 } 394 }
395 395
396 } else { 396 } else {
397 int secs = alarm->startOffset().asSeconds(); 397 int secs = alarm->startOffset().asSeconds();
398 if ( incidenceStart.addSecs( secs ) < alarmStart ) { 398 if ( incidenceStart.addSecs( secs ) < alarmStart ) {
399 alarmStart = incidenceStart.addSecs( secs ); 399 alarmStart = incidenceStart.addSecs( secs );
400 enabled = true; 400 enabled = true;
401 off = -secs; 401 off = -secs;
402 } 402 }
403 } 403 }
404 } 404 }
405 } 405 }
406 if ( enabled ) { 406 if ( enabled ) {
407 if ( alarmStart > start_dt ) { 407 if ( alarmStart > start_dt ) {
408 *ok = true; 408 *ok = true;
409 * offset = off; 409 * offset = off;
410 return alarmStart; 410 return alarmStart;
411 } 411 }
412 } 412 }
413 *ok = false; 413 *ok = false;
414 return QDateTime (); 414 return QDateTime ();
415 415
416} 416}
417
418QString Event::durationText()
419{
420 int sec = mDtStart.secsTo( mDtEnd );
421 if ( doesFloat() )
422 sec += 86400;
423 return durationText4Time( sec );
424}
diff --git a/libkcal/event.h b/libkcal/event.h
index 2da9770..6a58618 100644
--- a/libkcal/event.h
+++ b/libkcal/event.h
@@ -1,94 +1,95 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#ifndef EVENT_H 21#ifndef EVENT_H
22#define EVENT_H 22#define EVENT_H
23// 23//
24// Event component, representing a VEVENT object 24// Event component, representing a VEVENT object
25// 25//
26 26
27#include "incidence.h" 27#include "incidence.h"
28namespace KCal { 28namespace KCal {
29 29
30/** 30/**
31 This class provides an Event in the sense of RFC2445. 31 This class provides an Event in the sense of RFC2445.
32*/ 32*/
33class Event : public Incidence 33class Event : public Incidence
34{ 34{
35 public: 35 public:
36 enum Transparency { Opaque, Transparent }; 36 enum Transparency { Opaque, Transparent };
37 typedef ListBase<Event> List; 37 typedef ListBase<Event> List;
38 Event(); 38 Event();
39 Event(const Event &); 39 Event(const Event &);
40 ~Event(); 40 ~Event();
41 bool matchTime(QDateTime*startDT, QDateTime* endDT); 41 bool matchTime(QDateTime*startDT, QDateTime* endDT);
42 42
43 QCString type() const { return "Event"; } 43 QCString type() const { return "Event"; }
44 IncTypeID typeID() const { return eventID; } 44 IncTypeID typeID() const { return eventID; }
45 45
46 Incidence *clone(); 46 Incidence *clone();
47 QDateTime getNextAlarmDateTime( bool * ok, int * offset ,QDateTime start_dt ) const; 47 QDateTime getNextAlarmDateTime( bool * ok, int * offset ,QDateTime start_dt ) const;
48 48
49 /** for setting an event's ending date/time with a QDateTime. */ 49 /** for setting an event's ending date/time with a QDateTime. */
50 void setDtEnd(const QDateTime &dtEnd); 50 void setDtEnd(const QDateTime &dtEnd);
51 /** Return the event's ending date/time as a QDateTime. */ 51 /** Return the event's ending date/time as a QDateTime. */
52 virtual QDateTime dtEnd() const; 52 virtual QDateTime dtEnd() const;
53 /** returns an event's end time as a string formatted according to the 53 /** returns an event's end time as a string formatted according to the
54 users locale settings */ 54 users locale settings */
55 QString dtEndTimeStr() const; 55 QString dtEndTimeStr() const;
56 /** returns an event's end date as a string formatted according to the 56 /** returns an event's end date as a string formatted according to the
57 users locale settings */ 57 users locale settings */
58 QString dtEndDateStr(bool shortfmt=true) const; 58 QString dtEndDateStr(bool shortfmt=true) const;
59 /** returns an event's end date and time as a string formatted according 59 /** returns an event's end date and time as a string formatted according
60 to the users locale settings */ 60 to the users locale settings */
61 QString dtEndStr(bool shortfmt=true) const; 61 QString dtEndStr(bool shortfmt=true) const;
62 void setHasEndDate(bool); 62 void setHasEndDate(bool);
63 /** Return whether the event has an end date/time. */ 63 /** Return whether the event has an end date/time. */
64 bool hasEndDate() const; 64 bool hasEndDate() const;
65 65
66 /** Return true if the event spans multiple days, otherwise return false. */ 66 /** Return true if the event spans multiple days, otherwise return false. */
67 bool isMultiDay() const; 67 bool isMultiDay() const;
68 68
69 /** set the event's time transparency level. */ 69 /** set the event's time transparency level. */
70 void setTransparency(Transparency transparency); 70 void setTransparency(Transparency transparency);
71 /** get the event's time transparency level. */ 71 /** get the event's time transparency level. */
72 Transparency transparency() const; 72 Transparency transparency() const;
73 73
74 void setDuration(int seconds); 74 void setDuration(int seconds);
75 75
76 bool contains ( Event*); 76 bool contains ( Event*);
77 77
78 bool isOverlapping ( Event*, QDateTime*, QDateTime* ); 78 bool isOverlapping ( Event*, QDateTime*, QDateTime* );
79 QString durationText();
79 80
80 private: 81 private:
81 bool accept(Visitor &v) { return v.visit(this); } 82 bool accept(Visitor &v) { return v.visit(this); }
82 83
83 QDateTime mDtEnd; 84 QDateTime mDtEnd;
84 bool mHasEndDate; 85 bool mHasEndDate;
85 Transparency mTransparency; 86 Transparency mTransparency;
86}; 87};
87 88
88bool operator==( const Event&, const Event& ); 89bool operator==( const Event&, const Event& );
89 90
90 91
91} 92}
92 93
93 94
94#endif 95#endif
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 4643a3a..201f593 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -7,193 +7,222 @@
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <kglobal.h> 21#include <kglobal.h>
22#include <klocale.h> 22#include <klocale.h>
23#include <kdebug.h> 23#include <kdebug.h>
24 24
25#include "calformat.h" 25#include "calformat.h"
26 26
27#include "incidence.h" 27#include "incidence.h"
28#include "todo.h" 28#include "todo.h"
29 29
30using namespace KCal; 30using namespace KCal;
31 31
32Incidence::Incidence() : 32Incidence::Incidence() :
33 IncidenceBase(), 33 IncidenceBase(),
34 mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3) 34 mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3)
35{ 35{
36 mRecurrence = 0;//new Recurrence(this); 36 mRecurrence = 0;//new Recurrence(this);
37 mCancelled = false; 37 mCancelled = false;
38 recreate(); 38 recreate();
39 mHasStartDate = true; 39 mHasStartDate = true;
40 mAlarms.setAutoDelete(true); 40 mAlarms.setAutoDelete(true);
41 mAttachments.setAutoDelete(true); 41 mAttachments.setAutoDelete(true);
42 mHasRecurrenceID = false; 42 mHasRecurrenceID = false;
43 mHoliday = false; 43 mHoliday = false;
44 mBirthday = false; 44 mBirthday = false;
45 mAnniversary = false; 45 mAnniversary = false;
46 46
47} 47}
48 48
49Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) 49Incidence::Incidence( const Incidence &i ) : IncidenceBase( i )
50{ 50{
51// TODO: reenable attributes currently commented out. 51// TODO: reenable attributes currently commented out.
52 mRevision = i.mRevision; 52 mRevision = i.mRevision;
53 mCreated = i.mCreated; 53 mCreated = i.mCreated;
54 mDescription = i.mDescription; 54 mDescription = i.mDescription;
55 mSummary = i.mSummary; 55 mSummary = i.mSummary;
56 mCategories = i.mCategories; 56 mCategories = i.mCategories;
57// Incidence *mRelatedTo; Incidence *mRelatedTo; 57// Incidence *mRelatedTo; Incidence *mRelatedTo;
58 mRelatedTo = 0; 58 mRelatedTo = 0;
59 mRelatedToUid = i.mRelatedToUid; 59 mRelatedToUid = i.mRelatedToUid;
60// QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; 60// QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations;
61 mExDates = i.mExDates; 61 mExDates = i.mExDates;
62 mAttachments = i.mAttachments; 62 mAttachments = i.mAttachments;
63 mResources = i.mResources; 63 mResources = i.mResources;
64 mSecrecy = i.mSecrecy; 64 mSecrecy = i.mSecrecy;
65 mPriority = i.mPriority; 65 mPriority = i.mPriority;
66 mLocation = i.mLocation; 66 mLocation = i.mLocation;
67 mCancelled = i.mCancelled; 67 mCancelled = i.mCancelled;
68 mHasStartDate = i.mHasStartDate; 68 mHasStartDate = i.mHasStartDate;
69 QPtrListIterator<Alarm> it( i.mAlarms ); 69 QPtrListIterator<Alarm> it( i.mAlarms );
70 const Alarm *a; 70 const Alarm *a;
71 while( (a = it.current()) ) { 71 while( (a = it.current()) ) {
72 Alarm *b = new Alarm( *a ); 72 Alarm *b = new Alarm( *a );
73 b->setParent( this ); 73 b->setParent( this );
74 mAlarms.append( b ); 74 mAlarms.append( b );
75 75
76 ++it; 76 ++it;
77 } 77 }
78 mAlarms.setAutoDelete(true); 78 mAlarms.setAutoDelete(true);
79 mHasRecurrenceID = i.mHasRecurrenceID; 79 mHasRecurrenceID = i.mHasRecurrenceID;
80 mRecurrenceID = i.mRecurrenceID; 80 mRecurrenceID = i.mRecurrenceID;
81 if ( i.mRecurrence ) 81 if ( i.mRecurrence )
82 mRecurrence = new Recurrence( *(i.mRecurrence), this ); 82 mRecurrence = new Recurrence( *(i.mRecurrence), this );
83 else 83 else
84 mRecurrence = 0; 84 mRecurrence = 0;
85 mHoliday = i.mHoliday ; 85 mHoliday = i.mHoliday ;
86 mBirthday = i.mBirthday; 86 mBirthday = i.mBirthday;
87 mAnniversary = i.mAnniversary; 87 mAnniversary = i.mAnniversary;
88} 88}
89 89
90Incidence::~Incidence() 90Incidence::~Incidence()
91{ 91{
92 92
93 Incidence *ev; 93 Incidence *ev;
94 QPtrList<Incidence> Relations = relations(); 94 QPtrList<Incidence> Relations = relations();
95 for (ev=Relations.first();ev;ev=Relations.next()) { 95 for (ev=Relations.first();ev;ev=Relations.next()) {
96 if (ev->relatedTo() == this) ev->setRelatedTo(0); 96 if (ev->relatedTo() == this) ev->setRelatedTo(0);
97 } 97 }
98 if (relatedTo()) relatedTo()->removeRelation(this); 98 if (relatedTo()) relatedTo()->removeRelation(this);
99 if ( mRecurrence ) 99 if ( mRecurrence )
100 delete mRecurrence; 100 delete mRecurrence;
101 101
102} 102}
103QString Incidence::durationText()
104{
105 return "---";
106}
107QString Incidence::durationText4Time( int offset )
108{
109 int min = offset/60;
110 int hours = min /60;
111 min = min % 60;
112 int days = hours /24;
113 hours = hours % 24;
114
115 if ( doesFloat() || ( min == 0 && hours == 0 ) ) {
116 if ( days == 1 )
117 return "1" + i18n(" day");
118 else
119 return QString::number( days )+ i18n(" days");
103 120
121 }
122 QString message = QString::number ( hours ) +":";
123 if ( min < 10 ) message += "0";
124 message += QString::number ( min );
125 if ( days > 0 ) {
126 if ( days == 1 )
127 message = "1" + i18n(" day") + " "+message;
128 else
129 message = QString::number( days )+ i18n(" days") + " "+message;
130 }
131 return message;
132}
104bool Incidence::isHoliday() const 133bool Incidence::isHoliday() const
105{ 134{
106 return mHoliday; 135 return mHoliday;
107} 136}
108bool Incidence::isBirthday() const 137bool Incidence::isBirthday() const
109{ 138{
110 139
111 return mBirthday ; 140 return mBirthday ;
112} 141}
113bool Incidence::isAnniversary() const 142bool Incidence::isAnniversary() const
114{ 143{
115 return mAnniversary ; 144 return mAnniversary ;
116 145
117} 146}
118 147
119bool Incidence::hasRecurrenceID() const 148bool Incidence::hasRecurrenceID() const
120{ 149{
121 return mHasRecurrenceID; 150 return mHasRecurrenceID;
122} 151}
123 152
124void Incidence::setHasRecurrenceID( bool b ) 153void Incidence::setHasRecurrenceID( bool b )
125{ 154{
126 mHasRecurrenceID = b; 155 mHasRecurrenceID = b;
127} 156}
128 157
129void Incidence::setRecurrenceID(QDateTime d) 158void Incidence::setRecurrenceID(QDateTime d)
130{ 159{
131 mRecurrenceID = d; 160 mRecurrenceID = d;
132 mHasRecurrenceID = true; 161 mHasRecurrenceID = true;
133 updated(); 162 updated();
134} 163}
135QDateTime Incidence::recurrenceID () const 164QDateTime Incidence::recurrenceID () const
136{ 165{
137 return mRecurrenceID; 166 return mRecurrenceID;
138} 167}
139 168
140bool Incidence::cancelled() const 169bool Incidence::cancelled() const
141{ 170{
142 return mCancelled; 171 return mCancelled;
143} 172}
144void Incidence::setCancelled( bool b ) 173void Incidence::setCancelled( bool b )
145{ 174{
146 mCancelled = b; 175 mCancelled = b;
147 updated(); 176 updated();
148} 177}
149bool Incidence::hasStartDate() const 178bool Incidence::hasStartDate() const
150{ 179{
151 return mHasStartDate; 180 return mHasStartDate;
152} 181}
153 182
154void Incidence::setHasStartDate(bool f) 183void Incidence::setHasStartDate(bool f)
155{ 184{
156 if (mReadOnly) return; 185 if (mReadOnly) return;
157 mHasStartDate = f; 186 mHasStartDate = f;
158 updated(); 187 updated();
159} 188}
160 189
161// A string comparison that considers that null and empty are the same 190// A string comparison that considers that null and empty are the same
162static bool stringCompare( const QString& s1, const QString& s2 ) 191static bool stringCompare( const QString& s1, const QString& s2 )
163{ 192{
164 if ( s1.isEmpty() && s2.isEmpty() ) 193 if ( s1.isEmpty() && s2.isEmpty() )
165 return true; 194 return true;
166 return s1 == s2; 195 return s1 == s2;
167} 196}
168 197
169bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) 198bool KCal::operator==( const Incidence& i1, const Incidence& i2 )
170{ 199{
171 200
172 if( i1.alarms().count() != i2.alarms().count() ) { 201 if( i1.alarms().count() != i2.alarms().count() ) {
173 return false; // no need to check further 202 return false; // no need to check further
174 } 203 }
175 if ( i1.alarms().count() > 0 ) { 204 if ( i1.alarms().count() > 0 ) {
176 if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) 205 if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) )
177 { 206 {
178 qDebug("alarm not equal "); 207 qDebug("alarm not equal ");
179 return false; 208 return false;
180 } 209 }
181 } 210 }
182#if 0 211#if 0
183 QPtrListIterator<Alarm> a1( i1.alarms() ); 212 QPtrListIterator<Alarm> a1( i1.alarms() );
184 QPtrListIterator<Alarm> a2( i2.alarms() ); 213 QPtrListIterator<Alarm> a2( i2.alarms() );
185 for( ; a1.current() && a2.current(); ++a1, ++a2 ) { 214 for( ; a1.current() && a2.current(); ++a1, ++a2 ) {
186 if( *a1.current() == *a2.current() ) { 215 if( *a1.current() == *a2.current() ) {
187 continue; 216 continue;
188 } 217 }
189 else { 218 else {
190 return false; 219 return false;
191 } 220 }
192 } 221 }
193#endif 222#endif
194 223
195 if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { 224 if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) {
196 if ( i1.hasRecurrenceID() ) { 225 if ( i1.hasRecurrenceID() ) {
197 if ( i1.recurrenceID() != i2.recurrenceID() ) 226 if ( i1.recurrenceID() != i2.recurrenceID() )
198 return false; 227 return false;
199 } 228 }
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index 8519f01..88df217 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -188,135 +188,136 @@ class Incidence : public IncidenceBase
188 void setExDates(const char *dates); 188 void setExDates(const char *dates);
189 /** Add a date to the list of exceptions of the recurrence rule. */ 189 /** Add a date to the list of exceptions of the recurrence rule. */
190 void addExDate(const QDate &date); 190 void addExDate(const QDate &date);
191 191
192 /** returns true if there is an exception for this date in the recurrence 192 /** returns true if there is an exception for this date in the recurrence
193 rule set, or false otherwise. */ 193 rule set, or false otherwise. */
194 bool isException(const QDate &qd) const; 194 bool isException(const QDate &qd) const;
195 195
196 /** add attachment to this event */ 196 /** add attachment to this event */
197 void addAttachment(Attachment *attachment); 197 void addAttachment(Attachment *attachment);
198 /** remove and delete a specific attachment */ 198 /** remove and delete a specific attachment */
199 void deleteAttachment(Attachment *attachment); 199 void deleteAttachment(Attachment *attachment);
200 /** remove and delete all attachments with this mime type */ 200 /** remove and delete all attachments with this mime type */
201 void deleteAttachments(const QString& mime); 201 void deleteAttachments(const QString& mime);
202 /** return list of all associated attachments */ 202 /** return list of all associated attachments */
203 QPtrList<Attachment> attachments() const; 203 QPtrList<Attachment> attachments() const;
204 /** find a list of attachments with this mime type */ 204 /** find a list of attachments with this mime type */
205 QPtrList<Attachment> attachments(const QString& mime) const; 205 QPtrList<Attachment> attachments(const QString& mime) const;
206 206
207 /** sets the event's status the value specified. See the enumeration 207 /** sets the event's status the value specified. See the enumeration
208 * above for possible values. */ 208 * above for possible values. */
209 void setSecrecy(int); 209 void setSecrecy(int);
210 /** return the event's secrecy. */ 210 /** return the event's secrecy. */
211 int secrecy() const; 211 int secrecy() const;
212 /** return the event's secrecy in string format. */ 212 /** return the event's secrecy in string format. */
213 QString secrecyStr() const; 213 QString secrecyStr() const;
214 /** return list of all availbale secrecy classes */ 214 /** return list of all availbale secrecy classes */
215 static QStringList secrecyList(); 215 static QStringList secrecyList();
216 /** return human-readable name of secrecy class */ 216 /** return human-readable name of secrecy class */
217 static QString secrecyName(int); 217 static QString secrecyName(int);
218 218
219 /** returns TRUE if the date specified is one on which the event will 219 /** returns TRUE if the date specified is one on which the event will
220 * recur. */ 220 * recur. */
221 bool recursOn(const QDate &qd) const; 221 bool recursOn(const QDate &qd) const;
222 222
223 // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): 223 // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?):
224 224
225 /** set resources used, such as Office, Car, etc. */ 225 /** set resources used, such as Office, Car, etc. */
226 void setResources(const QStringList &resources); 226 void setResources(const QStringList &resources);
227 /** return list of current resources */ 227 /** return list of current resources */
228 QStringList resources() const; 228 QStringList resources() const;
229 229
230 /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ 230 /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */
231 void setPriority(int priority); 231 void setPriority(int priority);
232 /** get the event's priority */ 232 /** get the event's priority */
233 int priority() const; 233 int priority() const;
234 234
235 /** All alarms that are associated with this incidence */ 235 /** All alarms that are associated with this incidence */
236 QPtrList<Alarm> alarms() const; 236 QPtrList<Alarm> alarms() const;
237 /** Create a new alarm which is associated with this incidence */ 237 /** Create a new alarm which is associated with this incidence */
238 Alarm* newAlarm(); 238 Alarm* newAlarm();
239 /** Add an alarm which is associated with this incidence */ 239 /** Add an alarm which is associated with this incidence */
240 void addAlarm(Alarm*); 240 void addAlarm(Alarm*);
241 /** Remove an alarm that is associated with this incidence */ 241 /** Remove an alarm that is associated with this incidence */
242 void removeAlarm(Alarm*); 242 void removeAlarm(Alarm*);
243 /** Remove all alarms that are associated with this incidence */ 243 /** Remove all alarms that are associated with this incidence */
244 void clearAlarms(); 244 void clearAlarms();
245 /** return whether any alarm associated with this incidence is enabled */ 245 /** return whether any alarm associated with this incidence is enabled */
246 bool isAlarmEnabled() const; 246 bool isAlarmEnabled() const;
247 247
248 /** 248 /**
249 Return the recurrence rule associated with this incidence. If there is 249 Return the recurrence rule associated with this incidence. If there is
250 none, returns an appropriate (non-0) object. 250 none, returns an appropriate (non-0) object.
251 */ 251 */
252 Recurrence *recurrence(); 252 Recurrence *recurrence();
253 void setRecurrence(Recurrence * r); 253 void setRecurrence(Recurrence * r);
254 /** 254 /**
255 Forward to Recurrence::doesRecur(). 255 Forward to Recurrence::doesRecur().
256 */ 256 */
257 ushort doesRecur() const; 257 ushort doesRecur() const;
258 258
259 /** set the event's/todo's location. Do _not_ use it with journal */ 259 /** set the event's/todo's location. Do _not_ use it with journal */
260 void setLocation(const QString &location); 260 void setLocation(const QString &location);
261 /** return the event's/todo's location. Do _not_ use it with journal */ 261 /** return the event's/todo's location. Do _not_ use it with journal */
262 QString location() const; 262 QString location() const;
263 /** returns TRUE or FALSE depending on whether the todo has a start date */ 263 /** returns TRUE or FALSE depending on whether the todo has a start date */
264 bool hasStartDate() const; 264 bool hasStartDate() const;
265 /** sets the event's hasStartDate value. */ 265 /** sets the event's hasStartDate value. */
266 void setHasStartDate(bool f); 266 void setHasStartDate(bool f);
267 QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; 267 QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const;
268 bool cancelled() const; 268 bool cancelled() const;
269 void setCancelled( bool b ); 269 void setCancelled( bool b );
270 270
271 bool hasRecurrenceID() const; 271 bool hasRecurrenceID() const;
272 void setHasRecurrenceID( bool b ); 272 void setHasRecurrenceID( bool b );
273 273
274 void setRecurrenceID(QDateTime); 274 void setRecurrenceID(QDateTime);
275 QDateTime recurrenceID () const; 275 QDateTime recurrenceID () const;
276 QDateTime dtStart() const; 276 QDateTime dtStart() const;
277 bool isHoliday() const; 277 bool isHoliday() const;
278 bool isBirthday() const; 278 bool isBirthday() const;
279 bool isAnniversary() const; 279 bool isAnniversary() const;
280 QDateTime lastModifiedSub(); 280 QDateTime lastModifiedSub();
281 QString recurrenceText() const; 281 QString recurrenceText() const;
282 void setLastModifiedSubInvalid(); 282 void setLastModifiedSubInvalid();
283 283
284 284 virtual QString durationText();
285 QString durationText4Time( int secs );
285 Recurrence *mRecurrence; 286 Recurrence *mRecurrence;
286protected: 287protected:
287 QPtrList<Alarm> mAlarms; 288 QPtrList<Alarm> mAlarms;
288 QPtrList<Incidence> mRelations; 289 QPtrList<Incidence> mRelations;
289 QDateTime mRecurrenceID; 290 QDateTime mRecurrenceID;
290 bool mHasRecurrenceID; 291 bool mHasRecurrenceID;
291 private: 292 private:
292 void checkCategories(); 293 void checkCategories();
293 bool mHoliday, mBirthday, mAnniversary; 294 bool mHoliday, mBirthday, mAnniversary;
294 int mRevision; 295 int mRevision;
295 bool mCancelled; 296 bool mCancelled;
296 297
297 // base components of jounal, event and todo 298 // base components of jounal, event and todo
298 QDateTime mCreated; 299 QDateTime mCreated;
299 QDateTime mLastModifiedSub; 300 QDateTime mLastModifiedSub;
300 QString mDescription; 301 QString mDescription;
301 QString mSummary; 302 QString mSummary;
302 QStringList mCategories; 303 QStringList mCategories;
303 Incidence *mRelatedTo; 304 Incidence *mRelatedTo;
304 QString mRelatedToUid; 305 QString mRelatedToUid;
305 DateList mExDates; 306 DateList mExDates;
306 QPtrList<Attachment> mAttachments; 307 QPtrList<Attachment> mAttachments;
307 QStringList mResources; 308 QStringList mResources;
308 bool mHasStartDate; // if todo has associated start date 309 bool mHasStartDate; // if todo has associated start date
309 310
310 int mSecrecy; 311 int mSecrecy;
311 int mPriority; // 1 = highest, 2 = less, etc. 312 int mPriority; // 1 = highest, 2 = less, etc.
312 313
313 //QPtrList<Alarm> mAlarms; 314 //QPtrList<Alarm> mAlarms;
314 315
315 QString mLocation; 316 QString mLocation;
316}; 317};
317 318
318bool operator==( const Incidence&, const Incidence& ); 319bool operator==( const Incidence&, const Incidence& );
319 320
320} 321}
321 322
322#endif 323#endif
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 7bf756a..e4508a0 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -521,96 +521,106 @@ bool Todo::setRecurDates()
521 return false; 521 return false;
522 } else { 522 } else {
523 setHasRecurrenceID( false ); 523 setHasRecurrenceID( false );
524 recurrence()->unsetRecurs(); 524 recurrence()->unsetRecurs();
525 } 525 }
526 return true; 526 return true;
527} 527}
528void Todo::setPercentComplete(int v) 528void Todo::setPercentComplete(int v)
529{ 529{
530 if ( mHasRecurrenceID && v == 100 && mPercentComplete != 100 ) { 530 if ( mHasRecurrenceID && v == 100 && mPercentComplete != 100 ) {
531 if ( !setRecurDates() ) 531 if ( !setRecurDates() )
532 v = 0; 532 v = 0;
533 } 533 }
534 mPercentComplete = v; 534 mPercentComplete = v;
535 if ( v != 100 ) 535 if ( v != 100 )
536 mHasCompletedDate = false; 536 mHasCompletedDate = false;
537 updated(); 537 updated();
538} 538}
539QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const 539QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const
540{ 540{
541 *ok = false; 541 *ok = false;
542 if ( ! hasDueDate() || cancelled() || !alarmEnabled() ) { 542 if ( ! hasDueDate() || cancelled() || !alarmEnabled() ) {
543 return QDateTime (); 543 return QDateTime ();
544 } 544 }
545 // if the recurring todo is set to complete and requested time < start time of todo 545 // if the recurring todo is set to complete and requested time < start time of todo
546 // we want to get the alarm. 546 // we want to get the alarm.
547 bool iscompleted = isCompleted(); 547 bool iscompleted = isCompleted();
548 if ( iscompleted && doesRecur() ) { 548 if ( iscompleted && doesRecur() ) {
549 Todo * to = (Todo*) this; 549 Todo * to = (Todo*) this;
550 to->checkSetCompletedFalse(); 550 to->checkSetCompletedFalse();
551 iscompleted = isCompleted(); 551 iscompleted = isCompleted();
552 if ( hasStartDate() && start_dt < dtStart() ){ 552 if ( hasStartDate() && start_dt < dtStart() ){
553 iscompleted = false; 553 iscompleted = false;
554 } 554 }
555 } 555 }
556 if ( iscompleted ) { 556 if ( iscompleted ) {
557 return QDateTime (); 557 return QDateTime ();
558 } 558 }
559 QDateTime incidenceStart; 559 QDateTime incidenceStart;
560 incidenceStart = dtDue(); 560 incidenceStart = dtDue();
561 bool enabled = false; 561 bool enabled = false;
562 Alarm* alarm; 562 Alarm* alarm;
563 int off = 0; 563 int off = 0;
564 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; 564 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );;
565 // if ( QDateTime::currentDateTime() > incidenceStart ){ 565 // if ( QDateTime::currentDateTime() > incidenceStart ){
566// *ok = false; 566// *ok = false;
567// return incidenceStart; 567// return incidenceStart;
568// } 568// }
569 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 569 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
570 if (alarm->enabled()) { 570 if (alarm->enabled()) {
571 if ( alarm->hasTime () ) { 571 if ( alarm->hasTime () ) {
572 if ( alarm->time() < alarmStart ) { 572 if ( alarm->time() < alarmStart ) {
573 alarmStart = alarm->time(); 573 alarmStart = alarm->time();
574 enabled = true; 574 enabled = true;
575 off = alarmStart.secsTo( incidenceStart ); 575 off = alarmStart.secsTo( incidenceStart );
576 } 576 }
577 577
578 } else { 578 } else {
579 int secs = alarm->startOffset().asSeconds(); 579 int secs = alarm->startOffset().asSeconds();
580 if ( incidenceStart.addSecs( secs ) < alarmStart ) { 580 if ( incidenceStart.addSecs( secs ) < alarmStart ) {
581 alarmStart = incidenceStart.addSecs( secs ); 581 alarmStart = incidenceStart.addSecs( secs );
582 enabled = true; 582 enabled = true;
583 off = -secs; 583 off = -secs;
584 } 584 }
585 } 585 }
586 } 586 }
587 } 587 }
588 if ( enabled ) { 588 if ( enabled ) {
589 if ( alarmStart > start_dt ) { 589 if ( alarmStart > start_dt ) {
590 *ok = true; 590 *ok = true;
591 * offset = off; 591 * offset = off;
592 return alarmStart; 592 return alarmStart;
593 } 593 }
594 } 594 }
595 *ok = false; 595 *ok = false;
596 return QDateTime (); 596 return QDateTime ();
597 597
598} 598}
599 599
600void Todo::checkSetCompletedFalse() 600void Todo::checkSetCompletedFalse()
601{ 601{
602 if ( !mHasRecurrenceID ) { 602 if ( !mHasRecurrenceID ) {
603 qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); 603 qDebug("ERROR 1 in Todo::checkSetCompletedFalse");
604 return; 604 return;
605 } 605 }
606 // qDebug("Todo::checkSetCompletedFalse()"); 606 // qDebug("Todo::checkSetCompletedFalse()");
607 //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); 607 //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() );
608 if ( mPercentComplete == 100 ) { 608 if ( mPercentComplete == 100 ) {
609 QDateTime dt = QDateTime::currentDateTime(); 609 QDateTime dt = QDateTime::currentDateTime();
610 if ( dt > mDtStart && dt > mRecurrenceID ) { 610 if ( dt > mDtStart && dt > mRecurrenceID ) {
611 qDebug("start: %s --due: %s --recID: %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); 611 qDebug("start: %s --due: %s --recID: %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() );
612 setCompleted( false ); 612 setCompleted( false );
613 qDebug("Todo::checkSetCompletedFalse "); 613 qDebug("Todo::checkSetCompletedFalse ");
614 } 614 }
615 } 615 }
616} 616}
617QString Todo::durationText()
618{
619 if ( mHasDueDate && hasStartDate() ) {
620 int sec = dtStart().secsTo( dtDue() );
621 if ( doesFloat() )
622 sec += 86400;
623 return durationText4Time( sec );
624 }
625 return "---";
626}
diff --git a/libkcal/todo.h b/libkcal/todo.h
index 425dfad..7feb32e 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -37,119 +37,120 @@ namespace KCal {
37 Q_OBJECT 37 Q_OBJECT
38 public: 38 public:
39 Todo(); 39 Todo();
40 Todo(const Todo &); 40 Todo(const Todo &);
41 ~Todo(); 41 ~Todo();
42 typedef ListBase<Todo> List; 42 typedef ListBase<Todo> List;
43 QCString type() const { return "Todo"; } 43 QCString type() const { return "Todo"; }
44 IncTypeID typeID() const { return todoID; } 44 IncTypeID typeID() const { return todoID; }
45 45
46 /** Return an exact copy of this todo. */ 46 /** Return an exact copy of this todo. */
47 Incidence *clone(); 47 Incidence *clone();
48 QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const; 48 QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const;
49 49
50 /** for setting the todo's due date/time with a QDateTime. */ 50 /** for setting the todo's due date/time with a QDateTime. */
51 void setDtDue(const QDateTime &dtDue); 51 void setDtDue(const QDateTime &dtDue);
52 /** returns an event's Due date/time as a QDateTime. */ 52 /** returns an event's Due date/time as a QDateTime. */
53 QDateTime dtDue() const; 53 QDateTime dtDue() const;
54 /** returns an event's due time as a string formatted according to the 54 /** returns an event's due time as a string formatted according to the
55 users locale settings */ 55 users locale settings */
56 QString dtDueTimeStr() const; 56 QString dtDueTimeStr() const;
57 /** returns an event's due date as a string formatted according to the 57 /** returns an event's due date as a string formatted according to the
58 users locale settings */ 58 users locale settings */
59 QString dtDueDateStr(bool shortfmt=true) const; 59 QString dtDueDateStr(bool shortfmt=true) const;
60 /** returns an event's due date and time as a string formatted according 60 /** returns an event's due date and time as a string formatted according
61 to the users locale settings */ 61 to the users locale settings */
62 QString dtDueStr(bool shortfmt=true) const; 62 QString dtDueStr(bool shortfmt=true) const;
63 63
64 /** returns TRUE or FALSE depending on whether the todo has a due date */ 64 /** returns TRUE or FALSE depending on whether the todo has a due date */
65 bool hasDueDate() const; 65 bool hasDueDate() const;
66 /** sets the event's hasDueDate value. */ 66 /** sets the event's hasDueDate value. */
67 void setHasDueDate(bool f); 67 void setHasDueDate(bool f);
68 68
69 /* 69 /*
70 Looks for a subtodo (including itself ) which is not complete and is 70 Looks for a subtodo (including itself ) which is not complete and is
71 - overdue, or 71 - overdue, or
72 - due today. 72 - due today.
73 It returns 0 for nothing found, 73 It returns 0 for nothing found,
74 1 for found a todo which is due today and no overdue found 74 1 for found a todo which is due today and no overdue found
75 2 for found a overdue todo 75 2 for found a overdue todo
76 */ 76 */
77 int hasDueSubTodo( bool checkSubtodos = true ); 77 int hasDueSubTodo( bool checkSubtodos = true );
78 /* same as above, but a specific date can be specified*/ 78 /* same as above, but a specific date can be specified*/
79 int hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ); 79 int hasDueSubTodoForDate( const QDate & date, bool checkSubtodos );
80 80
81 81
82 /** sets the event's status to the string specified. The string 82 /** sets the event's status to the string specified. The string
83 * must be a recognized value for the status field, i.e. a string 83 * must be a recognized value for the status field, i.e. a string
84 * equivalent of the possible status enumerations previously described. */ 84 * equivalent of the possible status enumerations previously described. */
85// void setStatus(const QString &statStr); 85// void setStatus(const QString &statStr);
86 /** sets the event's status to the value specified. See the enumeration 86 /** sets the event's status to the value specified. See the enumeration
87 * above for possible values. */ 87 * above for possible values. */
88// void setStatus(int); 88// void setStatus(int);
89 /** return the event's status. */ 89 /** return the event's status. */
90// int status() const; 90// int status() const;
91 /** return the event's status in string format. */ 91 /** return the event's status in string format. */
92// QString statusStr() const; 92// QString statusStr() const;
93 93
94 /** return, if this todo is completed */ 94 /** return, if this todo is completed */
95 bool isCompleted() const; 95 bool isCompleted() const;
96 /** set completed state of this todo */ 96 /** set completed state of this todo */
97 void setCompleted(bool); 97 void setCompleted(bool);
98 98
99 /** 99 /**
100 Return how many percent of the task are completed. Returns a value 100 Return how many percent of the task are completed. Returns a value
101 between 0 and 100. 101 between 0 and 100.
102 */ 102 */
103 int percentComplete() const; 103 int percentComplete() const;
104 /** 104 /**
105 Set how many percent of the task are completed. Valid values are in the 105 Set how many percent of the task are completed. Valid values are in the
106 range from 0 to 100. 106 range from 0 to 100.
107 */ 107 */
108 void setPercentComplete(int); 108 void setPercentComplete(int);
109 109
110 /** return date and time when todo was completed */ 110 /** return date and time when todo was completed */
111 QDateTime completed() const; 111 QDateTime completed() const;
112 QString completedStr(bool shortF = true) const; 112 QString completedStr(bool shortF = true) const;
113 /** set date and time of completion */ 113 /** set date and time of completion */
114 void setCompleted(const QDateTime &completed); 114 void setCompleted(const QDateTime &completed);
115 115
116 /** Return true, if todo has a date associated with completion */ 116 /** Return true, if todo has a date associated with completion */
117 bool hasCompletedDate() const; 117 bool hasCompletedDate() const;
118 bool contains ( Todo*); 118 bool contains ( Todo*);
119 void checkSetCompletedFalse(); 119 void checkSetCompletedFalse();
120 bool setRecurDates(); 120 bool setRecurDates();
121 bool isRunning() {return mRunning;} 121 bool isRunning() {return mRunning;}
122 bool hasRunningSub(); 122 bool hasRunningSub();
123 void setRunning( bool ); 123 void setRunning( bool );
124 void setRunningFalse( QString ); 124 void setRunningFalse( QString );
125 void stopRunning(); 125 void stopRunning();
126 int runTime(); 126 int runTime();
127 QDateTime runStart () const { return mRunStart;} 127 QDateTime runStart () const { return mRunStart;}
128 void saveRunningInfo( QString comment, QDateTime start, QDateTime end ); 128 void saveRunningInfo( QString comment, QDateTime start, QDateTime end );
129 public slots: 129 public slots:
130 void saveRunningInfoToFile( QString st ); 130 void saveRunningInfoToFile( QString st );
131 void saveRunningInfoToFile( ); 131 void saveRunningInfoToFile( );
132 void saveParents(); 132 void saveParents();
133 QString durationText();
133 private: 134 private:
134 bool mRunning; 135 bool mRunning;
135 QTimer * mRunSaveTimer; 136 QTimer * mRunSaveTimer;
136 QDateTime mRunStart; 137 QDateTime mRunStart;
137 QDateTime mRunEnd; 138 QDateTime mRunEnd;
138 bool accept(Visitor &v) { return v.visit(this); } 139 bool accept(Visitor &v) { return v.visit(this); }
139 140
140 QDateTime mDtDue; // due date of todo 141 QDateTime mDtDue; // due date of todo
141 142
142 bool mHasDueDate; // if todo has associated due date 143 bool mHasDueDate; // if todo has associated due date
143 144
144// int mStatus; // confirmed/delegated/tentative/etc 145// int mStatus; // confirmed/delegated/tentative/etc
145 146
146 QDateTime mCompleted; 147 QDateTime mCompleted;
147 bool mHasCompletedDate; 148 bool mHasCompletedDate;
148 149
149 int mPercentComplete; 150 int mPercentComplete;
150}; 151};
151 152
152 bool operator==( const Todo&, const Todo& ); 153 bool operator==( const Todo&, const Todo& );
153} 154}
154 155
155#endif 156#endif