summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt13
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt9
-rw-r--r--korganizer/calendarview.cpp25
-rw-r--r--korganizer/kotodoview.cpp6
-rw-r--r--libkcal/calendar.cpp10
-rw-r--r--libkcal/calendar.h5
-rw-r--r--libkcal/incidence.cpp14
-rw-r--r--libkcal/incidence.h1
8 files changed, 73 insertions, 10 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index be0d2b2..aa6ab0a 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,98 +1,111 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.27 ************
4
5More bugfixes.
6Added possibility to clone in KO/Pi a todo with all its subtodos.
7Added a timetracker funtionality in KO/Pi for todos in the todo view.
8If a todo is set to started and then to stopped it is saving information about the runtime in
9<yourhome>/kdepim/apps/timetrackerdir.
10To read, display, print this information an external program is needed which will be developed.
11It will display the data in a Gantt timetable view with one row for each todo.
12It will have many possibilities sorting the data after category, parent todos, attendees, ... and for creating/printing status reports/summaries.
13Merging of data from different computers/users will be quite easy because every run is stored in a single file.
14The program will be only available for the desktop (Linux+Windows) and it will be not Open Source.
15
3********** VERSION 2.0.26 ************ 16********** VERSION 2.0.26 ************
4 17
5Added two more fields to the KA/Pi view config: 18Added two more fields to the KA/Pi view config:
6A "Mobile (home)" and a "Mobile (work)" field. 19A "Mobile (home)" and a "Mobile (work)" field.
7Fixed utf8 import (e.g. for Japaneese text) in KA/Pi. 20Fixed utf8 import (e.g. for Japaneese text) in KA/Pi.
8 21
9Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes. 22Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes.
10And again fixed some more small bugs. 23And again fixed some more small bugs.
11 24
12********** VERSION 2.0.25 ************ 25********** VERSION 2.0.25 ************
13 26
14And again fixed some bugs. 27And again fixed some bugs.
15 28
16********** VERSION 2.0.24 ************ 29********** VERSION 2.0.24 ************
17 30
18Fixed again a lot of small bugs. 31Fixed again a lot of small bugs.
19Some performance optimizations in date navigator. 32Some performance optimizations in date navigator.
20Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row. 33Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row.
21 34
22********** VERSION 2.0.23 ************ 35********** VERSION 2.0.23 ************
23 36
24Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation. 37Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation.
25Fixed the (agenda) layout of KO/Pi on 5500er. 38Fixed the (agenda) layout of KO/Pi on 5500er.
26Some usebility enhancements (e.g. reselection the current item of the todo view after some changes). 39Some usebility enhancements (e.g. reselection the current item of the todo view after some changes).
27 40
28********** VERSION 2.0.22 ************ 41********** VERSION 2.0.22 ************
29 42
30KO/Pi: 43KO/Pi:
31Fix for creating events/todos via the abgenda context menu. 44Fix for creating events/todos via the abgenda context menu.
32Added option to split toolbar to 3 toolbars. 45Added option to split toolbar to 3 toolbars.
33(Toolbar moving s disabled for this option due to a bug in Qt somewhere). 46(Toolbar moving s disabled for this option due to a bug in Qt somewhere).
34Added option to show one small filter-view-toolbar. 47Added option to show one small filter-view-toolbar.
35Added a print option to the desktop version: 48Added a print option to the desktop version:
36Now you can print out the view of the "Event Viewer". 49Now you can print out the view of the "Event Viewer".
37That means you can print all data of one particular event/todo. 50That means you can print all data of one particular event/todo.
38Added scaling options to printout of Event Viewer and What'sNext View. 51Added scaling options to printout of Event Viewer and What'sNext View.
39Fixed some problems in the month view in "week start sunday" mode. 52Fixed some problems in the month view in "week start sunday" mode.
40KA/Pi: 53KA/Pi:
41Added two more config options. 54Added two more config options.
42Fixed resizing problem of address request dialog when orientation was switched. 55Fixed resizing problem of address request dialog when orientation was switched.
43Cleaned up the menu structure. 56Cleaned up the menu structure.
44Fixed some more problems. 57Fixed some more problems.
45 58
46Fixed the annoying problem that scrolling continued after the key was released in KO/Pi Monthview and the KA/Pi views. 59Fixed the annoying problem that scrolling continued after the key was released in KO/Pi Monthview and the KA/Pi views.
47 60
48And, this is a really cool option (Ben did suggest it): 61And, this is a really cool option (Ben did suggest it):
49Now KO/Pi and KA/Pi can be run from a USB stick: 62Now KO/Pi and KA/Pi can be run from a USB stick:
50All data is read from and written to the stick. 63All data is read from and written to the stick.
51You can enable this in the global configure option TAB with: 64You can enable this in the global configure option TAB with:
52Save using LOCAL storage. 65Save using LOCAL storage.
53Just put KDE-Pim/Pi on a memory stick and you can access all your PIM data on every computer with Windows XP. It will work with the ME and Linux versions as well. I will put a memory stick version for teh next stable release online. 66Just put KDE-Pim/Pi on a memory stick and you can access all your PIM data on every computer with Windows XP. It will work with the ME and Linux versions as well. I will put a memory stick version for teh next stable release online.
54 67
55********** VERSION 2.0.21 ************ 68********** VERSION 2.0.21 ************
56 69
57Fixed another SMTP problem in OM/Pi. 70Fixed another SMTP problem in OM/Pi.
58Some small changed in the new datenavigator in KO/Pi. 71Some small changed in the new datenavigator in KO/Pi.
59Changed default setting for new filter in KA/Pi to "exclude categories". 72Changed default setting for new filter in KA/Pi to "exclude categories".
60Changed the default font size for 640x480 display . 73Changed the default font size for 640x480 display .
61Changed popup menu behaviour in agenda and list view. 74Changed popup menu behaviour in agenda and list view.
62Fixed some layout problems of the date label size in the month view. 75Fixed some layout problems of the date label size in the month view.
63Made month view update faster. 76Made month view update faster.
64Made first datenavigator repainting faster. 77Made first datenavigator repainting faster.
65Changed the title of the event/todo edit dialogs. 78Changed the title of the event/todo edit dialogs.
66Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). 79Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course).
67Many small usebility fixes in KO/Pi. 80Many small usebility fixes in KO/Pi.
68Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. 81Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi.
69The set of possible "next views" are the views you have toolbar buttons for. 82The set of possible "next views" are the views you have toolbar buttons for.
70 83
71Made alarm sound working on Linux. 84Made alarm sound working on Linux.
72 85
73KO/Pi alarm applet changed: 86KO/Pi alarm applet changed:
74Made buttons in alarm dialog much bigger. 87Made buttons in alarm dialog much bigger.
75Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. 88Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger.
76The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. 89The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings.
77 90
78And because this version is realeased at Easter, I added an Easter-egg: 91And because this version is realeased at Easter, I added an Easter-egg:
79With a new undocumented command you can get a message box about the next alarm. 92With a new undocumented command you can get a message box about the next alarm.
80Good luck to find it! 93Good luck to find it!
81 94
82 95
83 96
84********** VERSION 2.0.20 ************ 97********** VERSION 2.0.20 ************
85 98
86Two small fixes in OM/Pi. 99Two small fixes in OM/Pi.
87 100
88Better resizing of the new datenavigator in KO/Pi. 101Better resizing of the new datenavigator in KO/Pi.
89 102
90********** VERSION 2.0.19 ************ 103********** VERSION 2.0.19 ************
91KO/Pi: 104KO/Pi:
92Enhancements and bugfixes in the new datenavigator. 105Enhancements and bugfixes in the new datenavigator.
93Bugfix in this changelog: 106Bugfix in this changelog:
94The datenavigator was changed in version 2.0.18, not the datepicker. 107The datenavigator was changed in version 2.0.18, not the datepicker.
95 108
96********** VERSION 2.0.18 ************ 109********** VERSION 2.0.18 ************
97KO/Pi: 110KO/Pi:
98Fixed some minor problems. 111Fixed some minor problems.
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 5257bff..9476a89 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1065,288 +1065,293 @@
1065{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1065{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1066{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1066{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1067{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1067{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1068{ "Time period","Zeitspanne" }, 1068{ "Time period","Zeitspanne" },
1069{ "From ","Von " }, 1069{ "From ","Von " },
1070{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1070{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1071{ " weeks in the future "," Wochen in der Zukunft " }, 1071{ " weeks in the future "," Wochen in der Zukunft " },
1072{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1072{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1073{ "Local temp file:","Lokale temp Datei:" }, 1073{ "Local temp file:","Lokale temp Datei:" },
1074{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1074{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1075{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1075{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1076{ "Language","Sprache" }, 1076{ "Language","Sprache" },
1077{ "Time Format","Zeit Format" }, 1077{ "Time Format","Zeit Format" },
1078{ "Time Zone","Zeit Zone" }, 1078{ "Time Zone","Zeit Zone" },
1079{ "%1 groups subscribed","%1 Guppen abboniert" }, 1079{ "%1 groups subscribed","%1 Guppen abboniert" },
1080{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 1080{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
1081{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1081{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1082{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1082{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1083{ "Save settings","Speichere Einstellungen" }, 1083{ "Save settings","Speichere Einstellungen" },
1084{ "Save standard","Speichere Standard" }, 1084{ "Save standard","Speichere Standard" },
1085{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1085{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1086{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1086{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1087{ "Data storage path","Daten Speicherpfad" }, 1087{ "Data storage path","Daten Speicherpfad" },
1088{ "Language","Sprache" }, 1088{ "Language","Sprache" },
1089{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1089{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1090{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1090{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1091{ "Show events, that are done","Zeige abgelaufene Termine" }, 1091{ "Show events, that are done","Zeige abgelaufene Termine" },
1092{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1092{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1093{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1093{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1094{ "KO/Pi","KO/Pi" }, 1094{ "KO/Pi","KO/Pi" },
1095{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1095{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1096{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1096{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1097{ "Sound.Al.: ","Sound.Al.: " }, 1097{ "Sound.Al.: ","Sound.Al.: " },
1098{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1098{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1099{ "Restore","Wiederherstellen" }, 1099{ "Restore","Wiederherstellen" },
1100{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1100{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1101{ "% completed","% erledigt" }, 1101{ "% completed","% erledigt" },
1102{ "%d item(s) found.","%d Item(s) gefunden." }, 1102{ "%d item(s) found.","%d Item(s) gefunden." },
1103{ "Set complete","Setze auf erledigt" }, 1103{ "Set complete","Setze auf erledigt" },
1104{ "(cancelled)","(gecancelt)" }, 1104{ "(cancelled)","(gecancelt)" },
1105{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1105{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1106{ " Local time "," Locale Zeit " }, 1106{ " Local time "," Locale Zeit " },
1107{ "Form2","Form2" }, 1107{ "Form2","Form2" },
1108{ "Filter enabled","Filter angeschaltet" }, 1108{ "Filter enabled","Filter angeschaltet" },
1109{ "Edit Filters","Ändere Filter" }, 1109{ "Edit Filters","Ändere Filter" },
1110{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1110{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1111{ "Agenda","Agenda" }, 1111{ "Agenda","Agenda" },
1112{ " ("," (" }, 1112{ " ("," (" },
1113{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1113{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1114{ "Print","Print" }, 1114{ "Print","Print" },
1115{ "&Setup Printer...","Drucker &Setup..." }, 1115{ "&Setup Printer...","Drucker &Setup..." },
1116{ "View Type","Zeige Typ" }, 1116{ "View Type","Zeige Typ" },
1117{ "Page &orientation:","Seiten Ausrichtung:" }, 1117{ "Page &orientation:","Seiten Ausrichtung:" },
1118{ "Use Default of Selected Style","Default des selektierten Stils" }, 1118{ "Use Default of Selected Style","Default des selektierten Stils" },
1119{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1119{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1120{ "Portrait","Portrait" }, 1120{ "Portrait","Portrait" },
1121{ "Landscape","Landschaft" }, 1121{ "Landscape","Landschaft" },
1122{ "Print day","Drucke Tag" }, 1122{ "Print day","Drucke Tag" },
1123{ "CalPrintDay_Base","CalPrintDay_Base" }, 1123{ "CalPrintDay_Base","CalPrintDay_Base" },
1124{ "Date && Time Range","Datum && Zeitspanne" }, 1124{ "Date && Time Range","Datum && Zeitspanne" },
1125{ "&End date:","&Enddatum:" }, 1125{ "&End date:","&Enddatum:" },
1126{ "&Start date:","&Startdatum:" }, 1126{ "&Start date:","&Startdatum:" },
1127{ "Start &time:","Startzeit:" }, 1127{ "Start &time:","Startzeit:" },
1128{ "End ti&me:","Endzeit:" }, 1128{ "End ti&me:","Endzeit:" },
1129{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1129{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1130{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1130{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1131{ "Alt+D","Alt+D" }, 1131{ "Alt+D","Alt+D" },
1132{ "&Use colors","Nutze Farben" }, 1132{ "&Use colors","Nutze Farben" },
1133{ "Alt+U","Alt+U" }, 1133{ "Alt+U","Alt+U" },
1134{ "Print week","Drucke Woche" }, 1134{ "Print week","Drucke Woche" },
1135{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1135{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1136{ "Use &colors","Nutze Farben" }, 1136{ "Use &colors","Nutze Farben" },
1137{ "Type of View","Typ der Ansicht" }, 1137{ "Type of View","Typ der Ansicht" },
1138{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1138{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1139{ "Alt+F","Alt+F" }, 1139{ "Alt+F","Alt+F" },
1140{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1140{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1141{ "Alt+T","Alt+T" }, 1141{ "Alt+T","Alt+T" },
1142{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1142{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1143{ "Print month","Drucke Monat" }, 1143{ "Print month","Drucke Monat" },
1144{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1144{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1145{ "&Start month:","&Startmonat:" }, 1145{ "&Start month:","&Startmonat:" },
1146{ "&End month:","&Endmonat:" }, 1146{ "&End month:","&Endmonat:" },
1147{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1147{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1148{ "Print todos","Drucke Todos" }, 1148{ "Print todos","Drucke Todos" },
1149{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1149{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1150{ "Include &description of the item","Inclusive Itembeschreibung" }, 1150{ "Include &description of the item","Inclusive Itembeschreibung" },
1151{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1151{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1152{ "Include &priority of the item","Inclusive Priorität des Items" }, 1152{ "Include &priority of the item","Inclusive Priorität des Items" },
1153{ "Items to Print","Zu druckende Items" }, 1153{ "Items to Print","Zu druckende Items" },
1154{ "&From:","Von:" }, 1154{ "&From:","Von:" },
1155{ "&To:","Bis:" }, 1155{ "&To:","Bis:" },
1156{ "Print &all todo items","Drucke alle Todo Items" }, 1156{ "Print &all todo items","Drucke alle Todo Items" },
1157{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1157{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1158{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1158{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1159{ "Todo List","Todo Liste" }, 1159{ "Todo List","Todo Liste" },
1160{ "&Title:","&Titel:" }, 1160{ "&Title:","&Titel:" },
1161{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, 1161{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" },
1162{ "Todo list","Todo Liste" }, 1162{ "Todo list","Todo Liste" },
1163{ "&Print...","Drucke..." }, 1163{ "&Print...","Drucke..." },
1164{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1164{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1165{ "[Unconfigured]","[Unkonfiguriert]" }, 1165{ "[Unconfigured]","[Unkonfiguriert]" },
1166{ "OK","OK" }, 1166{ "OK","OK" },
1167{ "FilterEditor","FilterEditor" }, 1167{ "FilterEditor","FilterEditor" },
1168{ "Include","Inclusive" }, 1168{ "Include","Inclusive" },
1169{ "Exclude","Exclusive" }, 1169{ "Exclude","Exclusive" },
1170{ "Edit Selection...","Editiere Auswahl" }, 1170{ "Edit Selection...","Editiere Auswahl" },
1171{ "recurring events","wiederholende Termine" }, 1171{ "recurring events","wiederholende Termine" },
1172{ "recurr. events","wiederh.Termine" }, 1172{ "recurr. events","wiederh.Termine" },
1173{ "completed to-dos","erledigte Todos" }, 1173{ "completed to-dos","erledigte Todos" },
1174{ "events","Termine" }, 1174{ "events","Termine" },
1175{ "todos","Todos" }, 1175{ "todos","Todos" },
1176{ "journals","Journale" }, 1176{ "journals","Journale" },
1177{ "public","öffentl." }, 1177{ "public","öffentl." },
1178{ "private","privat" }, 1178{ "private","privat" },
1179{ "confidential","vertraul." }, 1179{ "confidential","vertraul." },
1180{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1180{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
1181{ "Yesterday","Gestern" }, 1181{ "Yesterday","Gestern" },
1182{ "Day after tomorrow","Übermorgen" }, 1182{ "Day after tomorrow","Übermorgen" },
1183{ "Tomorrow","Morgen" }, 1183{ "Tomorrow","Morgen" },
1184{ "Day before yesterday","Vorgestern" }, 1184{ "Day before yesterday","Vorgestern" },
1185{ "Size %1","Größe %1" }, 1185{ "Size %1","Größe %1" },
1186{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1186{ "New Agendasize: %1","Neue Agendagröße: %1" },
1187{ " (%1 y.)"," (%1 J.)" }, 1187{ " (%1 y.)"," (%1 J.)" },
1188{ "Allday:","Ganztägig:" }, 1188{ "Allday:","Ganztägig:" },
1189{ "compl.todos","erled.Todos" }, 1189{ "compl.todos","erled.Todos" },
1190{ "Day view","Tagesansicht" }, 1190{ "Day view","Tagesansicht" },
1191{ "Next days","Nächste Tage" }, 1191{ "Next days","Nächste Tage" },
1192{ "Next week","Nächste Woche" }, 1192{ "Next week","Nächste Woche" },
1193{ "Next two weeks","Nächste zwei Wochen" }, 1193{ "Next two weeks","Nächste zwei Wochen" },
1194{ "This month","Dieser Monat" }, 1194{ "This month","Dieser Monat" },
1195{ "Journal view","Journal" }, 1195{ "Journal view","Journal" },
1196{ "Display all opened","Zeige alle geöffnet" }, 1196{ "Display all opened","Zeige alle geöffnet" },
1197{ "Display all closed","Zeige alle geschlossen" }, 1197{ "Display all closed","Zeige alle geschlossen" },
1198{ "Display all flat","Zeige alle flach" }, 1198{ "Display all flat","Zeige alle flach" },
1199{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1199{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1200{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1200{ "Default todo done color:","Standard Todo erledigt Farbe" },
1201{ "Select week %1-%2","Wähle Woche %1-%2" }, 1201{ "Select week %1-%2","Wähle Woche %1-%2" },
1202{ "Select Week","Wähle Woche" }, 1202{ "Select Week","Wähle Woche" },
1203{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1203{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1204{ "Set Alarm!","Setze Alarm!" }, 1204{ "Set Alarm!","Setze Alarm!" },
1205{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1205{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1206{ " and "," und " }, 1206{ " and "," und " },
1207{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1207{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1208{ "Mail to selected","Mail an Ausgewählte" }, 1208{ "Mail to selected","Mail an Ausgewählte" },
1209{ "Mail to all","Mail an Alle" }, 1209{ "Mail to all","Mail an Alle" },
1210{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1210{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1211{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1211{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1212{ " on"," am" }, 1212{ " on"," am" },
1213{ " completed on "," erledigt am " }, 1213{ " completed on "," erledigt am " },
1214{ "Save as Event template","Speichere als Vorlage" }, 1214{ "Save as Event template","Speichere als Vorlage" },
1215{ "Load Event template","Lade Termin Vorlage" }, 1215{ "Load Event template","Lade Termin Vorlage" },
1216{ "Save as Journal template","Speichere als Journal Vorlage" }, 1216{ "Save as Journal template","Speichere als Journal Vorlage" },
1217{ "Insert Journal template","Füge Journal Vorlage ein" }, 1217{ "Insert Journal template","Füge Journal Vorlage ein" },
1218{ "Sub todos:<br>","Unter Todos:<br>" }, 1218{ "Sub todos:<br>","Unter Todos:<br>" },
1219{ "Parent todo:<br>","Über Todo:<br>" }, 1219{ "Parent todo:<br>","Über Todo:<br>" },
1220{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1220{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1221{ " completed"," erledigt" }, 1221{ " completed"," erledigt" },
1222{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1222{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1223{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1223{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1224{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1224{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1225{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1225{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1226{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, 1226{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
1227{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1227{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1228{ "Error","Fehler" }, 1228{ "Error","Fehler" },
1229{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1229{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1230{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1230{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1231{ "Warning","Warnung" }, 1231{ "Warning","Warnung" },
1232{ "Select week number","Wähle Wochen Nummer" }, 1232{ "Select week number","Wähle Wochen Nummer" },
1233{ "Februar","Februar" }, 1233{ "Februar","Februar" },
1234{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1234{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1235{ "W","W" }, 1235{ "W","W" },
1236{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1236{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1237{ "T: %1","T: %1" }, 1237{ "T: %1","T: %1" },
1238{ "Start: ","Start: " }, 1238{ "Start: ","Start: " },
1239{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1239{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1240{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1240{ "Password for remote access:","Passwort für fernen Zugriff:" },
1241{ "Remote IP address:","Ferne IP Adresse:" }, 1241{ "Remote IP address:","Ferne IP Adresse:" },
1242{ "Remote port number:","Ferne Port Nummer:" }, 1242{ "Remote port number:","Ferne Port Nummer:" },
1243{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1243{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1244{ "Remote from: ","Fern von: " }, 1244{ "Remote from: ","Fern von: " },
1245{ "Local from: ","Lokal von: " }, 1245{ "Local from: ","Lokal von: " },
1246{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, 1246{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
1247{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1247{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1248{ "Write back","Schreibe zurück" }, 1248{ "Write back","Schreibe zurück" },
1249{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1249{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1250{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1250{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1251{ "Received sync request","Sync Anfrage erhalten" }, 1251{ "Received sync request","Sync Anfrage erhalten" },
1252{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, 1252{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
1253{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1253{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1254{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1254{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1255{ "Sending file...","Sende Datei..." }, 1255{ "Sending file...","Sende Datei..." },
1256{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1256{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1257{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1257{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1258{ "Received %1 bytes","%1 Bytes erhalten" }, 1258{ "Received %1 bytes","%1 Bytes erhalten" },
1259{ "Writing file to disk...","Speichere Datei..." }, 1259{ "Writing file to disk...","Speichere Datei..." },
1260{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1260{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1261{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1261{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1262{ "Synchronize!","Synchronisiere!" }, 1262{ "Synchronize!","Synchronisiere!" },
1263{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1263{ "High clock skew!","Großer Uhrzeitunterschied!" },
1264{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1264{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1265{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, 1265{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
1266{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1266{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1267{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1267{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1268{ "List week view","Listenwochenansicht" }, 1268{ "List week view","Listenwochenansicht" },
1269{ "List week","Listenwochenansicht" }, 1269{ "List week","Listenwochenansicht" },
1270{ "Next Week","Nächste Woche" }, 1270{ "Next Week","Nächste Woche" },
1271{ "Previous Week","Vorherige Woche" }, 1271{ "Previous Week","Vorherige Woche" },
1272{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, 1272{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." },
1273{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1273{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1274{ "Details","Details" }, 1274{ "Details","Details" },
1275{ "Created time","Erstellt Zeit" }, 1275{ "Created time","Erstellt Zeit" },
1276{ "Last modified time","Geändert Zeit" }, 1276{ "Last modified time","Geändert Zeit" },
1277{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1277{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1278{ "View Options","Anzeige Optionen" }, 1278{ "View Options","Anzeige Optionen" },
1279{ "<b>Created: ","<b>Erstellt am: " }, 1279{ "<b>Created: ","<b>Erstellt am: " },
1280{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1280{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1281{ "Journal: ","Journal: " }, 1281{ "Journal: ","Journal: " },
1282{ "yearly","jährlich" }, 1282{ "yearly","jährlich" },
1283{ "(%1) ","%1-" }, 1283{ "(%1) ","%1-" },
1284{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1284{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1285{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1285{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1286{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1286{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1287{ "Summary/Loc.","Titel/Ort" }, 1287{ "Summary/Loc.","Titel/Ort" },
1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1289{ "Week Number","Wochennummer" }, 1289{ "Week Number","Wochennummer" },
1290{ "Import","Importiere" }, 1290{ "Import","Importiere" },
1291{ "Export","Exportiere" }, 1291{ "Export","Exportiere" },
1292{ "Beam","Beame" }, 1292{ "Beam","Beame" },
1293{ "Export selected","Exportiere Selektierte" }, 1293{ "Export selected","Exportiere Selektierte" },
1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1296{ "Journal/Details...","Journale/Details..." }, 1296{ "Journal/Details...","Journale/Details..." },
1297{ "Agenda View","Agenda Ansicht" }, 1297{ "Agenda View","Agenda Ansicht" },
1298{ "Show current time","Zeige aktuelle Zeit" }, 1298{ "Show current time","Zeige aktuelle Zeit" },
1299{ "Edit new item","Bearbeite neuen Eintrag" }, 1299{ "Edit new item","Bearbeite neuen Eintrag" },
1300{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, 1300{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" },
1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1304{ "%1 days\n","%1 Tagen\n" }, 1304{ "%1 days\n","%1 Tagen\n" },
1305{ "1 day\n","1 Tag\n" }, 1305{ "1 day\n","1 Tag\n" },
1306{ "%1 hours\n","%1 Stunden\n" }, 1306{ "%1 hours\n","%1 Stunden\n" },
1307{ "1 hour\n","1 Stunde\n" }, 1307{ "1 hour\n","1 Stunde\n" },
1308{ "%1 minutes\n","%1 Minuten\n" }, 1308{ "%1 minutes\n","%1 Minuten\n" },
1309{ "1 minute\n","1 Minute\n" }, 1309{ "1 minute\n","1 Minute\n" },
1310{ "Only one toolbar","Nur eine Toolbar" }, 1310{ "Only one toolbar","Nur eine Toolbar" },
1311{ "Print","Drucke" }, 1311{ "Print","Drucke" },
1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1313{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1313{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1316{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, 1316{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" },
1317{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1317{ "KO/Pi Printout","KO/Pi Ausdruck" },
1318{ "Print unscaled","Drucke unskaliert" }, 1318{ "Print unscaled","Drucke unskaliert" },
1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1321{ "Printout Mode","Druck Modus" }, 1321{ "Printout Mode","Druck Modus" },
1322{ "Filter menu icon","Filtermenu Icon" }, 1322{ "Filter menu icon","Filtermenu Icon" },
1323{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, 1323{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" },
1324{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, 1324{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" },
1325{ "%1d","%1t" }, 1325{ "%1d","%1t" },
1326{ "%1h","%1std" }, 1326{ "%1h","%1std" },
1327{ "%1min","%1min" }, 1327{ "%1min","%1min" },
1328{ "( %1 before )","( %1 vorher )" }, 1328{ "( %1 before )","( %1 vorher )" },
1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" }, 1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" },
1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1335{ " on "," am " }, 1335{ " on "," am " },
1336{ "On: ","Am: " }, 1336{ "On: ","Am: " },
1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1338{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1338{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1339{ "Color for running todos:","Farbe für laufende Todos:" }, 1339{ "Color for running todos:","Farbe für laufende Todos:" },
1340{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, 1340{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" },
1341{ "Todo is started","Todo is gestarted" }, 1341{ "Todo is started","Todo is gestarted" },
1342{ "Stop todo","Stoppe Todo" }, 1342{ "Stop todo","Stoppe Todo" },
1343{ "Todo is stopped","Todo ist gestoppt" }, 1343{ "Todo is stopped","Todo ist gestoppt" },
1344{ "Start todo","Starte Todo" }, 1344{ "Start todo","Starte Todo" },
1345{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, 1345{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
1346{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie\nalle Untertodos auch klonen?" },
1347{ "Todo has subtodos","Todo hat Untertodos" },
1348{ "","" },
1349{ "","" },
1350{ "","" },
1346{ "","" }, 1351{ "","" },
1347{ "","" }, 1352{ "","" },
1348{ "","" }, 1353{ "","" },
1349{ "","" }, 1354{ "","" },
1350{ "","" }, 1355{ "","" },
1351{ "","" }, 1356{ "","" },
1352{ "","" }, 1357{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index c530037..bd7376a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2611,197 +2611,218 @@ void CalendarView::showDatePicker( )
2611 mDatePickerMode = 1; 2611 mDatePickerMode = 1;
2612 mDatePicker->setDate( mNavigator->selectedDates().first() ); 2612 mDatePicker->setDate( mNavigator->selectedDates().first() );
2613} 2613}
2614 2614
2615void CalendarView::showEventEditor() 2615void CalendarView::showEventEditor()
2616{ 2616{
2617#ifdef DESKTOP_VERSION 2617#ifdef DESKTOP_VERSION
2618 int x,y,w,h; 2618 int x,y,w,h;
2619 x = mEventEditor->geometry().x(); 2619 x = mEventEditor->geometry().x();
2620 y = mEventEditor->geometry().y(); 2620 y = mEventEditor->geometry().y();
2621 w = mEventEditor->width(); 2621 w = mEventEditor->width();
2622 h = mEventEditor->height(); 2622 h = mEventEditor->height();
2623 mEventEditor->show(); 2623 mEventEditor->show();
2624 mEventEditor->setGeometry(x,y,w,h); 2624 mEventEditor->setGeometry(x,y,w,h);
2625#else 2625#else
2626 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { 2626 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
2627 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2627 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2628 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); 2628 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
2629 qApp->processEvents(); 2629 qApp->processEvents();
2630 delete mEventEditor; 2630 delete mEventEditor;
2631 mEventEditor = mDialogManager->getEventEditor(); 2631 mEventEditor = mDialogManager->getEventEditor();
2632 topLevelWidget()->setCaption( i18n("") ); 2632 topLevelWidget()->setCaption( i18n("") );
2633 } 2633 }
2634 mEventEditor->showMaximized(); 2634 mEventEditor->showMaximized();
2635#endif 2635#endif
2636} 2636}
2637void CalendarView::showTodoEditor() 2637void CalendarView::showTodoEditor()
2638{ 2638{
2639#ifdef DESKTOP_VERSION 2639#ifdef DESKTOP_VERSION
2640 int x,y,w,h; 2640 int x,y,w,h;
2641 x = mTodoEditor->geometry().x(); 2641 x = mTodoEditor->geometry().x();
2642 y = mTodoEditor->geometry().y(); 2642 y = mTodoEditor->geometry().y();
2643 w = mTodoEditor->width(); 2643 w = mTodoEditor->width();
2644 h = mTodoEditor->height(); 2644 h = mTodoEditor->height();
2645 mTodoEditor->show(); 2645 mTodoEditor->show();
2646 mTodoEditor->setGeometry(x,y,w,h); 2646 mTodoEditor->setGeometry(x,y,w,h);
2647#else 2647#else
2648 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { 2648 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
2649 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2649 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2650 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); 2650 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
2651 qApp->processEvents(); 2651 qApp->processEvents();
2652 delete mTodoEditor; 2652 delete mTodoEditor;
2653 mTodoEditor = mDialogManager->getTodoEditor(); 2653 mTodoEditor = mDialogManager->getTodoEditor();
2654 topLevelWidget()->setCaption( i18n("") ); 2654 topLevelWidget()->setCaption( i18n("") );
2655 } 2655 }
2656 mTodoEditor->showMaximized(); 2656 mTodoEditor->showMaximized();
2657#endif 2657#endif
2658} 2658}
2659 2659
2660void CalendarView::cloneIncidence() 2660void CalendarView::cloneIncidence()
2661{ 2661{
2662 Incidence *incidence = currentSelection(); 2662 Incidence *incidence = currentSelection();
2663 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2663 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2664 if ( incidence ) { 2664 if ( incidence ) {
2665 cloneIncidence(incidence); 2665 cloneIncidence(incidence);
2666 } 2666 }
2667} 2667}
2668void CalendarView::moveIncidence() 2668void CalendarView::moveIncidence()
2669{ 2669{
2670 Incidence *incidence = currentSelection(); 2670 Incidence *incidence = currentSelection();
2671 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2671 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2672 if ( incidence ) { 2672 if ( incidence ) {
2673 moveIncidence(incidence); 2673 moveIncidence(incidence);
2674 } 2674 }
2675} 2675}
2676void CalendarView::beamIncidence() 2676void CalendarView::beamIncidence()
2677{ 2677{
2678 Incidence *incidence = currentSelection(); 2678 Incidence *incidence = currentSelection();
2679 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2679 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2680 if ( incidence ) { 2680 if ( incidence ) {
2681 beamIncidence(incidence); 2681 beamIncidence(incidence);
2682 } 2682 }
2683} 2683}
2684void CalendarView::toggleCancelIncidence() 2684void CalendarView::toggleCancelIncidence()
2685{ 2685{
2686 Incidence *incidence = currentSelection(); 2686 Incidence *incidence = currentSelection();
2687 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2687 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2688 if ( incidence ) { 2688 if ( incidence ) {
2689 cancelIncidence(incidence); 2689 cancelIncidence(incidence);
2690 } 2690 }
2691} 2691}
2692 2692
2693 2693
2694void CalendarView::cancelIncidence(Incidence * inc ) 2694void CalendarView::cancelIncidence(Incidence * inc )
2695{ 2695{
2696 inc->setCancelled( ! inc->cancelled() ); 2696 inc->setCancelled( ! inc->cancelled() );
2697 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); 2697 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
2698 updateView(); 2698 updateView();
2699} 2699}
2700void CalendarView::cloneIncidence(Incidence * orgInc ) 2700void CalendarView::cloneIncidence(Incidence * orgInc )
2701{ 2701{
2702 Incidence * newInc = orgInc->clone(); 2702 Incidence * newInc = orgInc->clone();
2703 newInc->recreate(); 2703 newInc->recreate();
2704 2704
2705 if ( newInc->type() == "Todo" ) { 2705 if ( newInc->type() == "Todo" ) {
2706 Todo* t = (Todo*) newInc; 2706 Todo* t = (Todo*) newInc;
2707 bool cloneSub = false;
2708 if ( orgInc->relations().count() ) {
2709 int result = KMessageBox::warningYesNoCancel(this,
2710 i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ),
2711 i18n("Todo has subtodos"),
2712 i18n("Yes"),
2713 i18n("No"));
2714
2715 if ( result == KMessageBox::Cancel ) {
2716 delete t;
2717 return;
2718 }
2719 if (result == KMessageBox::Yes) cloneSub = true;
2720 }
2707 showTodoEditor(); 2721 showTodoEditor();
2708 mTodoEditor->editTodo( t ); 2722 mTodoEditor->editTodo( t );
2709 if ( mTodoEditor->exec() ) { 2723 if ( mTodoEditor->exec() ) {
2710 mCalendar->addTodo( t ); 2724 if ( cloneSub ) {
2711 updateView(); 2725 orgInc->cloneRelations( t );
2726 mCalendar->addIncidenceBranch( t );
2727 updateView();
2728
2729 } else {
2730 mCalendar->addTodo( t );
2731 updateView();
2732 }
2712 } else { 2733 } else {
2713 delete t; 2734 delete t;
2714 } 2735 }
2715 } 2736 }
2716 else { 2737 else {
2717 Event* e = (Event*) newInc; 2738 Event* e = (Event*) newInc;
2718 showEventEditor(); 2739 showEventEditor();
2719 mEventEditor->editEvent( e ); 2740 mEventEditor->editEvent( e );
2720 if ( mEventEditor->exec() ) { 2741 if ( mEventEditor->exec() ) {
2721 mCalendar->addEvent( e ); 2742 mCalendar->addEvent( e );
2722 updateView(); 2743 updateView();
2723 } else { 2744 } else {
2724 delete e; 2745 delete e;
2725 } 2746 }
2726 } 2747 }
2727 setActiveWindow(); 2748 setActiveWindow();
2728} 2749}
2729 2750
2730void CalendarView::newEvent() 2751void CalendarView::newEvent()
2731{ 2752{
2732 // TODO: Replace this code by a common eventDurationHint of KOBaseView. 2753 // TODO: Replace this code by a common eventDurationHint of KOBaseView.
2733 KOAgendaView *aView = mViewManager->agendaView(); 2754 KOAgendaView *aView = mViewManager->agendaView();
2734 if (aView) { 2755 if (aView) {
2735 if (aView->selectionStart().isValid()) { 2756 if (aView->selectionStart().isValid()) {
2736 if (aView->selectedIsAllDay()) { 2757 if (aView->selectedIsAllDay()) {
2737 newEvent(aView->selectionStart(),aView->selectionEnd(),true); 2758 newEvent(aView->selectionStart(),aView->selectionEnd(),true);
2738 } else { 2759 } else {
2739 newEvent(aView->selectionStart(),aView->selectionEnd()); 2760 newEvent(aView->selectionStart(),aView->selectionEnd());
2740 } 2761 }
2741 return; 2762 return;
2742 } 2763 }
2743 } 2764 }
2744 2765
2745 QDate date = mNavigator->selectedDates().first(); 2766 QDate date = mNavigator->selectedDates().first();
2746 QDateTime current = QDateTime::currentDateTime(); 2767 QDateTime current = QDateTime::currentDateTime();
2747 if ( date <= current.date() ) { 2768 if ( date <= current.date() ) {
2748 int hour = current.time().hour() +1; 2769 int hour = current.time().hour() +1;
2749 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), 2770 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ),
2750 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 2771 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
2751 } else 2772 } else
2752 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), 2773 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ),
2753 QDateTime( date, QTime( KOPrefs::instance()->mStartTime + 2774 QDateTime( date, QTime( KOPrefs::instance()->mStartTime +
2754 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 2775 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
2755} 2776}
2756 2777
2757void CalendarView::newEvent(QDateTime fh) 2778void CalendarView::newEvent(QDateTime fh)
2758{ 2779{
2759 newEvent(fh, 2780 newEvent(fh,
2760 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); 2781 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration)));
2761} 2782}
2762 2783
2763void CalendarView::newEvent(QDate dt) 2784void CalendarView::newEvent(QDate dt)
2764{ 2785{
2765 newEvent(QDateTime(dt, QTime(0,0,0)), 2786 newEvent(QDateTime(dt, QTime(0,0,0)),
2766 QDateTime(dt, QTime(0,0,0)), true); 2787 QDateTime(dt, QTime(0,0,0)), true);
2767} 2788}
2768void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) 2789void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint)
2769{ 2790{
2770 newEvent(fromHint, toHint, false); 2791 newEvent(fromHint, toHint, false);
2771} 2792}
2772void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) 2793void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
2773{ 2794{
2774 2795
2775 showEventEditor(); 2796 showEventEditor();
2776 mEventEditor->newEvent(fromHint,toHint,allDay); 2797 mEventEditor->newEvent(fromHint,toHint,allDay);
2777 if ( mFilterView->filtersEnabled() ) { 2798 if ( mFilterView->filtersEnabled() ) {
2778 CalFilter *filter = mFilterView->selectedFilter(); 2799 CalFilter *filter = mFilterView->selectedFilter();
2779 if (filter && filter->showCategories()) { 2800 if (filter && filter->showCategories()) {
2780 mEventEditor->setCategories(filter->categoryList().join(",") ); 2801 mEventEditor->setCategories(filter->categoryList().join(",") );
2781 } 2802 }
2782 if ( filter ) 2803 if ( filter )
2783 mEventEditor->setSecrecy( filter->getSecrecy() ); 2804 mEventEditor->setSecrecy( filter->getSecrecy() );
2784 } 2805 }
2785 mEventEditor->exec(); 2806 mEventEditor->exec();
2786 setActiveWindow(); 2807 setActiveWindow();
2787} 2808}
2788void CalendarView::todoAdded(Todo * t) 2809void CalendarView::todoAdded(Todo * t)
2789{ 2810{
2790 2811
2791 changeTodoDisplay ( t ,KOGlobals::EVENTADDED); 2812 changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
2792 updateTodoViews(); 2813 updateTodoViews();
2793} 2814}
2794void CalendarView::todoChanged(Todo * t) 2815void CalendarView::todoChanged(Todo * t)
2795{ 2816{
2796 emit todoModified( t, 4 ); 2817 emit todoModified( t, 4 );
2797 // updateTodoViews(); 2818 // updateTodoViews();
2798} 2819}
2799void CalendarView::todoToBeDeleted(Todo *) 2820void CalendarView::todoToBeDeleted(Todo *)
2800{ 2821{
2801 //qDebug("todoToBeDeleted(Todo *) "); 2822 //qDebug("todoToBeDeleted(Todo *) ");
2802 updateTodoViews(); 2823 updateTodoViews();
2803} 2824}
2804void CalendarView::todoDeleted() 2825void CalendarView::todoDeleted()
2805{ 2826{
2806 //qDebug(" todoDeleted()"); 2827 //qDebug(" todoDeleted()");
2807 updateTodoViews(); 2828 updateTodoViews();
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 7ee1eef..9b5d4ce 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1026,205 +1026,205 @@ void KOTodoView::setNewPriority(int index)
1026void KOTodoView::setNewPercentage(int index) 1026void KOTodoView::setNewPercentage(int index)
1027{ 1027{
1028 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1028 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1029 1029
1030 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { 1030 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
1031 mActiveItem->setOn( true ); 1031 mActiveItem->setOn( true );
1032 return; 1032 return;
1033 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { 1033 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
1034 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); 1034 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
1035 if ( par && par->isOn() ) 1035 if ( par && par->isOn() )
1036 par->setOn( false ); 1036 par->setOn( false );
1037 } 1037 }
1038 if (mPercentage[index] == 100) { 1038 if (mPercentage[index] == 100) {
1039 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 1039 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
1040 } else { 1040 } else {
1041 mActiveItem->todo()->setCompleted(false); 1041 mActiveItem->todo()->setCompleted(false);
1042 } 1042 }
1043 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 1043 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
1044 mActiveItem->construct(); 1044 mActiveItem->construct();
1045 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 1045 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
1046 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1046 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1047 } 1047 }
1048} 1048}
1049 1049
1050 1050
1051QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) 1051QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
1052{ 1052{
1053 QPopupMenu* tempMenu = new QPopupMenu (this); 1053 QPopupMenu* tempMenu = new QPopupMenu (this);
1054 QStringList checkedCategories = todoItem->todo()->categories (); 1054 QStringList checkedCategories = todoItem->todo()->categories ();
1055 1055
1056 tempMenu->setCheckable (true); 1056 tempMenu->setCheckable (true);
1057 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 1057 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
1058 it != KOPrefs::instance()->mCustomCategories.end (); 1058 it != KOPrefs::instance()->mCustomCategories.end ();
1059 ++it) { 1059 ++it) {
1060 int index = tempMenu->insertItem (*it); 1060 int index = tempMenu->insertItem (*it);
1061 mCategory[index] = *it; 1061 mCategory[index] = *it;
1062 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); 1062 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true);
1063 } 1063 }
1064 1064
1065 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); 1065 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
1066 return tempMenu; 1066 return tempMenu;
1067 1067
1068 1068
1069} 1069}
1070void KOTodoView::changedCategories(int index) 1070void KOTodoView::changedCategories(int index)
1071{ 1071{
1072 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1072 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1073 QStringList categories = mActiveItem->todo()->categories (); 1073 QStringList categories = mActiveItem->todo()->categories ();
1074 QString colcat = categories.first(); 1074 QString colcat = categories.first();
1075 if (categories.find (mCategory[index]) != categories.end ()) 1075 if (categories.find (mCategory[index]) != categories.end ())
1076 categories.remove (mCategory[index]); 1076 categories.remove (mCategory[index]);
1077 else 1077 else
1078 categories.insert (categories.end(), mCategory[index]); 1078 categories.insert (categories.end(), mCategory[index]);
1079 categories.sort (); 1079 categories.sort ();
1080 if ( !colcat.isEmpty() ) { 1080 if ( !colcat.isEmpty() ) {
1081 if ( categories.find ( colcat ) != categories.end () ) { 1081 if ( categories.find ( colcat ) != categories.end () ) {
1082 categories.remove( colcat ); 1082 categories.remove( colcat );
1083 categories.prepend( colcat ); 1083 categories.prepend( colcat );
1084 } 1084 }
1085 } 1085 }
1086 mActiveItem->todo()->setCategories (categories); 1086 mActiveItem->todo()->setCategories (categories);
1087 mActiveItem->construct(); 1087 mActiveItem->construct();
1088 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1088 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1089 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); 1089 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
1090 } 1090 }
1091} 1091}
1092void KOTodoView::itemDoubleClicked(QListViewItem *item) 1092void KOTodoView::itemDoubleClicked(QListViewItem *item)
1093{ 1093{
1094 if ( pendingSubtodo != 0 ) { 1094 if ( pendingSubtodo != 0 ) {
1095 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1095 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1096 } 1096 }
1097 pendingSubtodo = 0; 1097 pendingSubtodo = 0;
1098 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1098 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1099 //qDebug("ROW %d ", row); 1099 //qDebug("ROW %d ", row);
1100 if (!item) { 1100 if (!item) {
1101 newTodo(); 1101 newTodo();
1102 return; 1102 return;
1103 } else { 1103 } else {
1104 if ( row == 2 ) { 1104 if ( row == 2 ) {
1105 mActiveItem = (KOTodoViewItem *) item; 1105 mActiveItem = (KOTodoViewItem *) item;
1106 newSubTodo(); 1106 newSubTodo();
1107 return; 1107 return;
1108 } 1108 }
1109 if ( row == 1 ) { 1109 if ( row == 1 ) {
1110 mActiveItem = (KOTodoViewItem *) item; 1110 mActiveItem = (KOTodoViewItem *) item;
1111 toggleRunningItem(); 1111 toggleRunningItem();
1112 return; 1112 return;
1113 } 1113 }
1114 } 1114 }
1115 if ( KOPrefs::instance()->mEditOnDoubleClick ) 1115 if ( KOPrefs::instance()->mEditOnDoubleClick )
1116 editItem( item ); 1116 editItem( item );
1117 else 1117 else
1118 showItem( item , QPoint(), 0 ); 1118 showItem( item , QPoint(), 0 );
1119} 1119}
1120void KOTodoView::toggleRunningItem() 1120void KOTodoView::toggleRunningItem()
1121{ 1121{
1122 qDebug("KOTodoView::toggleRunning() "); 1122 // qDebug("KOTodoView::toggleRunning() ");
1123 if ( ! mActiveItem ) 1123 if ( ! mActiveItem )
1124 return; 1124 return;
1125 Todo * t = mActiveItem->todo(); 1125 Todo * t = mActiveItem->todo();
1126 if ( t->isRunning() ) { 1126 if ( t->isRunning() ) {
1127 int result = KMessageBox::warningContinueCancel(this, 1127 int result = KMessageBox::warningContinueCancel(this,
1128 i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 20 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); 1128 i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true);
1129 if (result != KMessageBox::Continue) return; 1129 if (result != KMessageBox::Continue) return;
1130 t->setRunning( false ); 1130 t->setRunning( false );
1131 mActiveItem->construct(); 1131 mActiveItem->construct();
1132 } else { 1132 } else {
1133 int result = KMessageBox::warningContinueCancel(this, 1133 int result = KMessageBox::warningContinueCancel(this,
1134 i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 20 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); 1134 i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true);
1135 if (result != KMessageBox::Continue) return; 1135 if (result != KMessageBox::Continue) return;
1136 t->setRunning( true ); 1136 t->setRunning( true );
1137 mActiveItem->construct(); 1137 mActiveItem->construct();
1138 } 1138 }
1139} 1139}
1140 1140
1141void KOTodoView::itemClicked(QListViewItem *item) 1141void KOTodoView::itemClicked(QListViewItem *item)
1142{ 1142{
1143 //qDebug("KOTodoView::itemClicked %d", item); 1143 //qDebug("KOTodoView::itemClicked %d", item);
1144 if (!item) { 1144 if (!item) {
1145 if ( pendingSubtodo != 0 ) { 1145 if ( pendingSubtodo != 0 ) {
1146 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1146 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1147 } 1147 }
1148 pendingSubtodo = 0; 1148 pendingSubtodo = 0;
1149 return; 1149 return;
1150 } 1150 }
1151 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1151 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1152 if ( pendingSubtodo != 0 ) { 1152 if ( pendingSubtodo != 0 ) {
1153 bool allowReparent = true; 1153 bool allowReparent = true;
1154 QListViewItem *par = item; 1154 QListViewItem *par = item;
1155 while ( par ) { 1155 while ( par ) {
1156 if ( par == pendingSubtodo ) { 1156 if ( par == pendingSubtodo ) {
1157 allowReparent = false; 1157 allowReparent = false;
1158 break; 1158 break;
1159 } 1159 }
1160 par = par->parent(); 1160 par = par->parent();
1161 } 1161 }
1162 if ( !allowReparent ) { 1162 if ( !allowReparent ) {
1163 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); 1163 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
1164 qDebug("Recursive reparenting not possible "); 1164 qDebug("Recursive reparenting not possible ");
1165 pendingSubtodo = 0; 1165 pendingSubtodo = 0;
1166 } else { 1166 } else {
1167 Todo* newParent = todoItem->todo(); 1167 Todo* newParent = todoItem->todo();
1168 Todo* newSub = pendingSubtodo->todo(); 1168 Todo* newSub = pendingSubtodo->todo();
1169 pendingSubtodo = 0; 1169 pendingSubtodo = 0;
1170 emit reparentTodoSignal( newParent,newSub ); 1170 emit reparentTodoSignal( newParent,newSub );
1171 return; 1171 return;
1172 } 1172 }
1173 } 1173 }
1174#if 0 1174#if 0
1175 // handled by the item itself 1175 // handled by the item itself
1176 bool completed = todoItem->todo()->isCompleted(); // Completed or not? 1176 bool completed = todoItem->todo()->isCompleted(); // Completed or not?
1177 qDebug("com %d ",completed ); 1177 qDebug("com %d ",completed );
1178 qDebug("itemclicked "); 1178 qDebug("itemclicked ");
1179 if (todoItem->isOn()) { 1179 if (todoItem->isOn()) {
1180 qDebug("on "); 1180 qDebug("on ");
1181 if (!completed) { 1181 if (!completed) {
1182 qDebug("set true "); 1182 qDebug("set true ");
1183 todoItem->todo()->setCompleted(QDateTime::currentDateTime()); 1183 todoItem->todo()->setCompleted(QDateTime::currentDateTime());
1184 } 1184 }
1185 } else { 1185 } else {
1186 qDebug("not on "); 1186 qDebug("not on ");
1187 if (completed) { 1187 if (completed) {
1188 qDebug("set false "); 1188 qDebug("set false ");
1189 todoItem->todo()->setCompleted(false); 1189 todoItem->todo()->setCompleted(false);
1190 } 1190 }
1191 } 1191 }
1192#endif 1192#endif
1193} 1193}
1194 1194
1195void KOTodoView::setDocumentId( const QString &id ) 1195void KOTodoView::setDocumentId( const QString &id )
1196{ 1196{
1197 kdDebug() << "KOTodoView::setDocumentId()" << endl; 1197 kdDebug() << "KOTodoView::setDocumentId()" << endl;
1198 1198
1199 mDocPrefs->setDoc( id ); 1199 mDocPrefs->setDoc( id );
1200} 1200}
1201 1201
1202void KOTodoView::itemStateChanged( QListViewItem *item ) 1202void KOTodoView::itemStateChanged( QListViewItem *item )
1203{ 1203{
1204 if (!item) return; 1204 if (!item) return;
1205 1205
1206 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1206 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1207 1207
1208// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; 1208// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl;
1209 1209
1210 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); 1210 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() );
1211} 1211}
1212 1212
1213void KOTodoView::saveLayout(KConfig *config, const QString &group) const 1213void KOTodoView::saveLayout(KConfig *config, const QString &group) const
1214{ 1214{
1215 mTodoListView->saveLayout(config,group); 1215 mTodoListView->saveLayout(config,group);
1216} 1216}
1217 1217
1218void KOTodoView::restoreLayout(KConfig *config, const QString &group) 1218void KOTodoView::restoreLayout(KConfig *config, const QString &group)
1219{ 1219{
1220 mTodoListView->restoreLayout(config,group); 1220 mTodoListView->restoreLayout(config,group);
1221} 1221}
1222 1222
1223void KOTodoView::processSelectionChange() 1223void KOTodoView::processSelectionChange()
1224{ 1224{
1225// kdDebug() << "KOTodoView::processSelectionChange()" << endl; 1225// kdDebug() << "KOTodoView::processSelectionChange()" << endl;
1226 1226
1227 KOTodoViewItem *item = 1227 KOTodoViewItem *item =
1228 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); 1228 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() );
1229 1229
1230 if ( !item ) { 1230 if ( !item ) {
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 406cd48..ed39ddb 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -242,193 +242,201 @@ CalFilter *Calendar::filter()
242} 242}
243 243
244QPtrList<Incidence> Calendar::incidences() 244QPtrList<Incidence> Calendar::incidences()
245{ 245{
246 QPtrList<Incidence> incidences; 246 QPtrList<Incidence> incidences;
247 247
248 Incidence *i; 248 Incidence *i;
249 249
250 QPtrList<Event> e = events(); 250 QPtrList<Event> e = events();
251 for( i = e.first(); i; i = e.next() ) incidences.append( i ); 251 for( i = e.first(); i; i = e.next() ) incidences.append( i );
252 252
253 QPtrList<Todo> t = todos(); 253 QPtrList<Todo> t = todos();
254 for( i = t.first(); i; i = t.next() ) incidences.append( i ); 254 for( i = t.first(); i; i = t.next() ) incidences.append( i );
255 255
256 QPtrList<Journal> j = journals(); 256 QPtrList<Journal> j = journals();
257 for( i = j.first(); i; i = j.next() ) incidences.append( i ); 257 for( i = j.first(); i; i = j.next() ) incidences.append( i );
258 258
259 return incidences; 259 return incidences;
260} 260}
261 261
262void Calendar::resetPilotStat(int id ) 262void Calendar::resetPilotStat(int id )
263{ 263{
264 QPtrList<Incidence> incidences; 264 QPtrList<Incidence> incidences;
265 265
266 Incidence *i; 266 Incidence *i;
267 267
268 QPtrList<Event> e = rawEvents(); 268 QPtrList<Event> e = rawEvents();
269 for( i = e.first(); i; i = e.next() ) i->setPilotId( id ); 269 for( i = e.first(); i; i = e.next() ) i->setPilotId( id );
270 270
271 QPtrList<Todo> t = rawTodos(); 271 QPtrList<Todo> t = rawTodos();
272 for( i = t.first(); i; i = t.next() ) i->setPilotId( id ); 272 for( i = t.first(); i; i = t.next() ) i->setPilotId( id );
273 273
274 QPtrList<Journal> j = journals(); 274 QPtrList<Journal> j = journals();
275 for( i = j.first(); i; i = j.next() ) i->setPilotId( id ); 275 for( i = j.first(); i; i = j.next() ) i->setPilotId( id );
276} 276}
277void Calendar::resetTempSyncStat() 277void Calendar::resetTempSyncStat()
278{ 278{
279 QPtrList<Incidence> incidences; 279 QPtrList<Incidence> incidences;
280 280
281 Incidence *i; 281 Incidence *i;
282 282
283 QPtrList<Event> e = rawEvents(); 283 QPtrList<Event> e = rawEvents();
284 for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 284 for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
285 285
286 QPtrList<Todo> t = rawTodos(); 286 QPtrList<Todo> t = rawTodos();
287 for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 287 for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
288 288
289 QPtrList<Journal> j = journals(); 289 QPtrList<Journal> j = journals();
290 for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 290 for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
291} 291}
292QPtrList<Incidence> Calendar::rawIncidences() 292QPtrList<Incidence> Calendar::rawIncidences()
293{ 293{
294 QPtrList<Incidence> incidences; 294 QPtrList<Incidence> incidences;
295 295
296 Incidence *i; 296 Incidence *i;
297 297
298 QPtrList<Event> e = rawEvents(); 298 QPtrList<Event> e = rawEvents();
299 for( i = e.first(); i; i = e.next() ) incidences.append( i ); 299 for( i = e.first(); i; i = e.next() ) incidences.append( i );
300 300
301 QPtrList<Todo> t = rawTodos(); 301 QPtrList<Todo> t = rawTodos();
302 for( i = t.first(); i; i = t.next() ) incidences.append( i ); 302 for( i = t.first(); i; i = t.next() ) incidences.append( i );
303 303
304 QPtrList<Journal> j = journals(); 304 QPtrList<Journal> j = journals();
305 for( i = j.first(); i; i = j.next() ) incidences.append( i ); 305 for( i = j.first(); i; i = j.next() ) incidences.append( i );
306 306
307 return incidences; 307 return incidences;
308} 308}
309 309
310QPtrList<Event> Calendar::events( const QDate &date, bool sorted ) 310QPtrList<Event> Calendar::events( const QDate &date, bool sorted )
311{ 311{
312 QPtrList<Event> el = rawEventsForDate(date,sorted); 312 QPtrList<Event> el = rawEventsForDate(date,sorted);
313 mFilter->apply(&el); 313 mFilter->apply(&el);
314 return el; 314 return el;
315} 315}
316 316
317QPtrList<Event> Calendar::events( const QDateTime &qdt ) 317QPtrList<Event> Calendar::events( const QDateTime &qdt )
318{ 318{
319 QPtrList<Event> el = rawEventsForDate(qdt); 319 QPtrList<Event> el = rawEventsForDate(qdt);
320 mFilter->apply(&el); 320 mFilter->apply(&el);
321 return el; 321 return el;
322} 322}
323 323
324QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, 324QPtrList<Event> Calendar::events( const QDate &start, const QDate &end,
325 bool inclusive) 325 bool inclusive)
326{ 326{
327 QPtrList<Event> el = rawEvents(start,end,inclusive); 327 QPtrList<Event> el = rawEvents(start,end,inclusive);
328 mFilter->apply(&el); 328 mFilter->apply(&el);
329 return el; 329 return el;
330} 330}
331 331
332QPtrList<Event> Calendar::events() 332QPtrList<Event> Calendar::events()
333{ 333{
334 QPtrList<Event> el = rawEvents(); 334 QPtrList<Event> el = rawEvents();
335 mFilter->apply(&el); 335 mFilter->apply(&el);
336 return el; 336 return el;
337} 337}
338 338void Calendar::addIncidenceBranch(Incidence *i)
339{
340 addIncidence( i );
341 Incidence * inc;
342 QPtrList<Incidence> Relations = i->relations();
343 for (inc=Relations.first();inc;inc=Relations.next()) {
344 addIncidenceBranch( inc );
345 }
346}
339 347
340bool Calendar::addIncidence(Incidence *i) 348bool Calendar::addIncidence(Incidence *i)
341{ 349{
342 Incidence::AddVisitor<Calendar> v(this); 350 Incidence::AddVisitor<Calendar> v(this);
343 351
344 return i->accept(v); 352 return i->accept(v);
345} 353}
346void Calendar::deleteIncidence(Incidence *in) 354void Calendar::deleteIncidence(Incidence *in)
347{ 355{
348 if ( in->type() == "Event" ) 356 if ( in->type() == "Event" )
349 deleteEvent( (Event*) in ); 357 deleteEvent( (Event*) in );
350 else if ( in->type() =="Todo" ) 358 else if ( in->type() =="Todo" )
351 deleteTodo( (Todo*) in); 359 deleteTodo( (Todo*) in);
352 else if ( in->type() =="Journal" ) 360 else if ( in->type() =="Journal" )
353 deleteJournal( (Journal*) in ); 361 deleteJournal( (Journal*) in );
354} 362}
355 363
356Incidence* Calendar::incidence( const QString& uid ) 364Incidence* Calendar::incidence( const QString& uid )
357{ 365{
358 Incidence* i; 366 Incidence* i;
359 367
360 if( (i = todo( uid )) != 0 ) 368 if( (i = todo( uid )) != 0 )
361 return i; 369 return i;
362 if( (i = event( uid )) != 0 ) 370 if( (i = event( uid )) != 0 )
363 return i; 371 return i;
364 if( (i = journal( uid )) != 0 ) 372 if( (i = journal( uid )) != 0 )
365 return i; 373 return i;
366 374
367 return 0; 375 return 0;
368} 376}
369 377
370QPtrList<Todo> Calendar::todos() 378QPtrList<Todo> Calendar::todos()
371{ 379{
372 QPtrList<Todo> tl = rawTodos(); 380 QPtrList<Todo> tl = rawTodos();
373 mFilter->apply( &tl ); 381 mFilter->apply( &tl );
374 return tl; 382 return tl;
375} 383}
376 384
377// When this is called, the todo have already been added to the calendar. 385// When this is called, the todo have already been added to the calendar.
378// This method is only about linking related todos 386// This method is only about linking related todos
379void Calendar::setupRelations( Incidence *incidence ) 387void Calendar::setupRelations( Incidence *incidence )
380{ 388{
381 QString uid = incidence->uid(); 389 QString uid = incidence->uid();
382 //qDebug("Calendar::setupRelations "); 390 //qDebug("Calendar::setupRelations ");
383 // First, go over the list of orphans and see if this is their parent 391 // First, go over the list of orphans and see if this is their parent
384 while( Incidence* i = mOrphans[ uid ] ) { 392 while( Incidence* i = mOrphans[ uid ] ) {
385 mOrphans.remove( uid ); 393 mOrphans.remove( uid );
386 i->setRelatedTo( incidence ); 394 i->setRelatedTo( incidence );
387 incidence->addRelation( i ); 395 incidence->addRelation( i );
388 mOrphanUids.remove( i->uid() ); 396 mOrphanUids.remove( i->uid() );
389 } 397 }
390 398
391 // Now see about this incidences parent 399 // Now see about this incidences parent
392 if( !incidence->relatedTo() && !incidence->relatedToUid().isEmpty() ) { 400 if( !incidence->relatedTo() && !incidence->relatedToUid().isEmpty() ) {
393 // This incidence has a uid it is related to, but is not registered to it yet 401 // This incidence has a uid it is related to, but is not registered to it yet
394 // Try to find it 402 // Try to find it
395 Incidence* parent = this->incidence( incidence->relatedToUid() ); 403 Incidence* parent = this->incidence( incidence->relatedToUid() );
396 if( parent ) { 404 if( parent ) {
397 // Found it 405 // Found it
398 incidence->setRelatedTo( parent ); 406 incidence->setRelatedTo( parent );
399 parent->addRelation( incidence ); 407 parent->addRelation( incidence );
400 } else { 408 } else {
401 // Not found, put this in the mOrphans list 409 // Not found, put this in the mOrphans list
402 mOrphans.insert( incidence->relatedToUid(), incidence ); 410 mOrphans.insert( incidence->relatedToUid(), incidence );
403 mOrphanUids.insert( incidence->uid(), incidence ); 411 mOrphanUids.insert( incidence->uid(), incidence );
404 } 412 }
405 } 413 }
406} 414}
407 415
408// If a task with subtasks is deleted, move it's subtasks to the orphans list 416// If a task with subtasks is deleted, move it's subtasks to the orphans list
409void Calendar::removeRelations( Incidence *incidence ) 417void Calendar::removeRelations( Incidence *incidence )
410{ 418{
411 // qDebug("Calendar::removeRelations "); 419 // qDebug("Calendar::removeRelations ");
412 QString uid = incidence->uid(); 420 QString uid = incidence->uid();
413 421
414 QPtrList<Incidence> relations = incidence->relations(); 422 QPtrList<Incidence> relations = incidence->relations();
415 for( Incidence* i = relations.first(); i; i = relations.next() ) 423 for( Incidence* i = relations.first(); i; i = relations.next() )
416 if( !mOrphanUids.find( i->uid() ) ) { 424 if( !mOrphanUids.find( i->uid() ) ) {
417 mOrphans.insert( uid, i ); 425 mOrphans.insert( uid, i );
418 mOrphanUids.insert( i->uid(), i ); 426 mOrphanUids.insert( i->uid(), i );
419 i->setRelatedTo( 0 ); 427 i->setRelatedTo( 0 );
420 i->setRelatedToUid( uid ); 428 i->setRelatedToUid( uid );
421 } 429 }
422 430
423 // If this incidence is related to something else, tell that about it 431 // If this incidence is related to something else, tell that about it
424 if( incidence->relatedTo() ) 432 if( incidence->relatedTo() )
425 incidence->relatedTo()->removeRelation( incidence ); 433 incidence->relatedTo()->removeRelation( incidence );
426 434
427 // Remove this one from the orphans list 435 // Remove this one from the orphans list
428 if( mOrphanUids.remove( uid ) ) 436 if( mOrphanUids.remove( uid ) )
429 // This incidence is located in the orphans list - it should be removed 437 // This incidence is located in the orphans list - it should be removed
430 if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) { 438 if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) {
431 // Removing wasn't that easy 439 // Removing wasn't that easy
432 for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) { 440 for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
433 if( it.current()->uid() == uid ) { 441 if( it.current()->uid() == uid ) {
434 mOrphans.remove( it.currentKey() ); 442 mOrphans.remove( it.currentKey() );
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 2f2c3aa..ab40970 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -46,193 +46,196 @@ namespace KCal {
46 information like all appointments/events, user information, etc. etc. 46 information like all appointments/events, user information, etc. etc.
47 one calendar is associated with each CalendarView (@see calendarview.h). 47 one calendar is associated with each CalendarView (@see calendarview.h).
48 This is an abstract base class defining the interface to a calendar. It is 48 This is an abstract base class defining the interface to a calendar. It is
49 implemented by subclasses like @see CalendarLocal, which use different 49 implemented by subclasses like @see CalendarLocal, which use different
50 methods to store and access the data. 50 methods to store and access the data.
51 51
52 Ownership of events etc. is handled by the following policy: As soon as an 52 Ownership of events etc. is handled by the following policy: As soon as an
53 event (or any other subclass of IncidenceBase) object is added to the 53 event (or any other subclass of IncidenceBase) object is added to the
54 Calendar by addEvent() it is owned by the Calendar object. The Calendar takes 54 Calendar by addEvent() it is owned by the Calendar object. The Calendar takes
55 care of deleting it. All Events returned by the query functions are returned 55 care of deleting it. All Events returned by the query functions are returned
56 as pointers, that means all changes to the returned events are immediately 56 as pointers, that means all changes to the returned events are immediately
57 visible in the Calendar. You shouldn't delete any Event object you get from 57 visible in the Calendar. You shouldn't delete any Event object you get from
58 Calendar. 58 Calendar.
59*/ 59*/
60class Calendar : public QObject, public CustomProperties, 60class Calendar : public QObject, public CustomProperties,
61 public IncidenceBase::Observer 61 public IncidenceBase::Observer
62{ 62{
63 Q_OBJECT 63 Q_OBJECT
64public: 64public:
65 Calendar(); 65 Calendar();
66 Calendar(const QString &timeZoneId); 66 Calendar(const QString &timeZoneId);
67 virtual ~Calendar(); 67 virtual ~Calendar();
68 Incidence * undoIncidence() { return mUndoIncidence; }; 68 Incidence * undoIncidence() { return mUndoIncidence; };
69 bool undoDeleteIncidence(); 69 bool undoDeleteIncidence();
70 void deleteIncidence(Incidence *in); 70 void deleteIncidence(Incidence *in);
71 void resetTempSyncStat(); 71 void resetTempSyncStat();
72 void resetPilotStat(int id); 72 void resetPilotStat(int id);
73 /** 73 /**
74 Clears out the current calendar, freeing all used memory etc. 74 Clears out the current calendar, freeing all used memory etc.
75 */ 75 */
76 virtual void close() = 0; 76 virtual void close() = 0;
77 77
78 /** 78 /**
79 Sync changes in memory to persistant storage. 79 Sync changes in memory to persistant storage.
80 */ 80 */
81 virtual void save() = 0; 81 virtual void save() = 0;
82 virtual QPtrList<Event> getExternLastSyncEvents() = 0; 82 virtual QPtrList<Event> getExternLastSyncEvents() = 0;
83 virtual void removeSyncInfo( QString syncProfile) = 0; 83 virtual void removeSyncInfo( QString syncProfile) = 0;
84 virtual bool isSaving() { return false; } 84 virtual bool isSaving() { return false; }
85 85
86 /** 86 /**
87 Return the owner of the calendar's full name. 87 Return the owner of the calendar's full name.
88 */ 88 */
89 const QString &getOwner() const; 89 const QString &getOwner() const;
90 /** 90 /**
91 Set the owner of the calendar. Should be owner's full name. 91 Set the owner of the calendar. Should be owner's full name.
92 */ 92 */
93 void setOwner( const QString &os ); 93 void setOwner( const QString &os );
94 /** 94 /**
95 Return the email address of the calendar owner. 95 Return the email address of the calendar owner.
96 */ 96 */
97 const QString &getEmail(); 97 const QString &getEmail();
98 /** 98 /**
99 Set the email address of the calendar owner. 99 Set the email address of the calendar owner.
100 */ 100 */
101 void setEmail( const QString & ); 101 void setEmail( const QString & );
102 102
103 /** 103 /**
104 Set time zone from a timezone string (e.g. -2:00) 104 Set time zone from a timezone string (e.g. -2:00)
105 */ 105 */
106 void setTimeZone( const QString &tz ); 106 void setTimeZone( const QString &tz );
107 /** 107 /**
108 Set time zone from a minutes value (e.g. -60) 108 Set time zone from a minutes value (e.g. -60)
109 */ 109 */
110 void setTimeZone( int tz ); 110 void setTimeZone( int tz );
111 /** 111 /**
112 Return time zone as offest in minutes. 112 Return time zone as offest in minutes.
113 */ 113 */
114 int getTimeZone() const; 114 int getTimeZone() const;
115 /** 115 /**
116 Compute an ISO 8601 format string from the time zone. 116 Compute an ISO 8601 format string from the time zone.
117 */ 117 */
118 QString getTimeZoneStr() const; 118 QString getTimeZoneStr() const;
119 /** 119 /**
120 Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal 120 Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal
121 values). 121 values).
122 */ 122 */
123 void setTimeZoneId( const QString & ); 123 void setTimeZoneId( const QString & );
124 /** 124 /**
125 Return time zone id. 125 Return time zone id.
126 */ 126 */
127 QString timeZoneId() const; 127 QString timeZoneId() const;
128 /** 128 /**
129 Use local time, not UTC or a time zone. 129 Use local time, not UTC or a time zone.
130 */ 130 */
131 void setLocalTime(); 131 void setLocalTime();
132 /** 132 /**
133 Return whether local time is being used. 133 Return whether local time is being used.
134 */ 134 */
135 bool isLocalTime() const; 135 bool isLocalTime() const;
136 136
137 /** 137 /**
138 Add an incidence to calendar. 138 Add an incidence to calendar.
139 139
140 @return true on success, false on error. 140 @return true on success, false on error.
141 */ 141 */
142 virtual bool addIncidence( Incidence * ); 142 virtual bool addIncidence( Incidence * );
143
144 // Adds an incidence and all relatedto incidences to the cal
145 void addIncidenceBranch( Incidence * );
143 /** 146 /**
144 Return filtered list of all incidences of this calendar. 147 Return filtered list of all incidences of this calendar.
145 */ 148 */
146 virtual QPtrList<Incidence> incidences(); 149 virtual QPtrList<Incidence> incidences();
147 150
148 /** 151 /**
149 Return unfiltered list of all incidences of this calendar. 152 Return unfiltered list of all incidences of this calendar.
150 */ 153 */
151 virtual QPtrList<Incidence> rawIncidences(); 154 virtual QPtrList<Incidence> rawIncidences();
152 155
153 /** 156 /**
154 Adds a Event to this calendar object. 157 Adds a Event to this calendar object.
155 @param anEvent a pointer to the event to add 158 @param anEvent a pointer to the event to add
156 159
157 @return true on success, false on error. 160 @return true on success, false on error.
158 */ 161 */
159 virtual bool addEventNoDup( Event *event ) = 0; 162 virtual bool addEventNoDup( Event *event ) = 0;
160 virtual bool addAnniversaryNoDup( Event *event ) = 0; 163 virtual bool addAnniversaryNoDup( Event *event ) = 0;
161 virtual bool addEvent( Event *anEvent ) = 0; 164 virtual bool addEvent( Event *anEvent ) = 0;
162 /** 165 /**
163 Delete event from calendar. 166 Delete event from calendar.
164 */ 167 */
165 virtual void deleteEvent( Event * ) = 0; 168 virtual void deleteEvent( Event * ) = 0;
166 /** 169 /**
167 Retrieves an event on the basis of the unique string ID. 170 Retrieves an event on the basis of the unique string ID.
168 */ 171 */
169 virtual Event *event( const QString &UniqueStr ) = 0; 172 virtual Event *event( const QString &UniqueStr ) = 0;
170 virtual Event *event( QString, QString ) = 0; 173 virtual Event *event( QString, QString ) = 0;
171 /** 174 /**
172 Builds and then returns a list of all events that match for the 175 Builds and then returns a list of all events that match for the
173 date specified. useful for dayView, etc. etc. 176 date specified. useful for dayView, etc. etc.
174 The calendar filter is applied. 177 The calendar filter is applied.
175 */ 178 */
176 QPtrList<Event> events( const QDate &date, bool sorted = false); 179 QPtrList<Event> events( const QDate &date, bool sorted = false);
177 /** 180 /**
178 Get events, which occur on the given date. 181 Get events, which occur on the given date.
179 The calendar filter is applied. 182 The calendar filter is applied.
180 */ 183 */
181 QPtrList<Event> events( const QDateTime &qdt ); 184 QPtrList<Event> events( const QDateTime &qdt );
182 /** 185 /**
183 Get events in a range of dates. If inclusive is set to true, only events 186 Get events in a range of dates. If inclusive is set to true, only events
184 are returned, which are completely included in the range. 187 are returned, which are completely included in the range.
185 The calendar filter is applied. 188 The calendar filter is applied.
186 */ 189 */
187 QPtrList<Event> events( const QDate &start, const QDate &end, 190 QPtrList<Event> events( const QDate &start, const QDate &end,
188 bool inclusive = false); 191 bool inclusive = false);
189 /** 192 /**
190 Return filtered list of all events in calendar. 193 Return filtered list of all events in calendar.
191 */ 194 */
192 virtual QPtrList<Event> events(); 195 virtual QPtrList<Event> events();
193 /** 196 /**
194 Return unfiltered list of all events in calendar. 197 Return unfiltered list of all events in calendar.
195 */ 198 */
196 virtual QPtrList<Event> rawEvents() = 0; 199 virtual QPtrList<Event> rawEvents() = 0;
197 200
198 /** 201 /**
199 Add a todo to the todolist. 202 Add a todo to the todolist.
200 203
201 @return true on success, false on error. 204 @return true on success, false on error.
202 */ 205 */
203 virtual bool addTodo( Todo *todo ) = 0; 206 virtual bool addTodo( Todo *todo ) = 0;
204 virtual bool addTodoNoDup( Todo *todo ) = 0; 207 virtual bool addTodoNoDup( Todo *todo ) = 0;
205 /** 208 /**
206 Remove a todo from the todolist. 209 Remove a todo from the todolist.
207 */ 210 */
208 virtual void deleteTodo( Todo * ) = 0; 211 virtual void deleteTodo( Todo * ) = 0;
209 virtual void deleteJournal( Journal * ) = 0; 212 virtual void deleteJournal( Journal * ) = 0;
210 /** 213 /**
211 Return filterd list of todos. 214 Return filterd list of todos.
212 */ 215 */
213 virtual QPtrList<Todo> todos(); 216 virtual QPtrList<Todo> todos();
214 /** 217 /**
215 Searches todolist for an event with this unique string identifier, 218 Searches todolist for an event with this unique string identifier,
216 returns a pointer or null. 219 returns a pointer or null.
217 */ 220 */
218 virtual Todo *todo( const QString &uid ) = 0; 221 virtual Todo *todo( const QString &uid ) = 0;
219 virtual Todo *todo( QString, QString ) = 0; 222 virtual Todo *todo( QString, QString ) = 0;
220 /** 223 /**
221 Returns list of todos due on the specified date. 224 Returns list of todos due on the specified date.
222 */ 225 */
223 virtual QPtrList<Todo> todos( const QDate &date ) = 0; 226 virtual QPtrList<Todo> todos( const QDate &date ) = 0;
224 /** 227 /**
225 Return unfiltered list of todos. 228 Return unfiltered list of todos.
226 */ 229 */
227 virtual QPtrList<Todo> rawTodos() = 0; 230 virtual QPtrList<Todo> rawTodos() = 0;
228 231
229 /** 232 /**
230 Add a Journal entry to calendar. 233 Add a Journal entry to calendar.
231 234
232 @return true on success, false on error. 235 @return true on success, false on error.
233 */ 236 */
234 virtual bool addJournal( Journal * ) = 0; 237 virtual bool addJournal( Journal * ) = 0;
235 /** 238 /**
236 Return Journal for given date. 239 Return Journal for given date.
237 */ 240 */
238 virtual Journal *journal( const QDate & ) = 0; 241 virtual Journal *journal( const QDate & ) = 0;
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 6bca12c..78fa24f 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -170,193 +170,205 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 )
170 } 170 }
171 if ( i1.alarms().count() > 0 ) { 171 if ( i1.alarms().count() > 0 ) {
172 if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) 172 if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) )
173 { 173 {
174 qDebug("alarm not equal "); 174 qDebug("alarm not equal ");
175 return false; 175 return false;
176 } 176 }
177 } 177 }
178#if 0 178#if 0
179 QPtrListIterator<Alarm> a1( i1.alarms() ); 179 QPtrListIterator<Alarm> a1( i1.alarms() );
180 QPtrListIterator<Alarm> a2( i2.alarms() ); 180 QPtrListIterator<Alarm> a2( i2.alarms() );
181 for( ; a1.current() && a2.current(); ++a1, ++a2 ) { 181 for( ; a1.current() && a2.current(); ++a1, ++a2 ) {
182 if( *a1.current() == *a2.current() ) { 182 if( *a1.current() == *a2.current() ) {
183 continue; 183 continue;
184 } 184 }
185 else { 185 else {
186 return false; 186 return false;
187 } 187 }
188 } 188 }
189#endif 189#endif
190 190
191 if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { 191 if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) {
192 if ( i1.hasRecurrenceID() ) { 192 if ( i1.hasRecurrenceID() ) {
193 if ( i1.recurrenceID() != i2.recurrenceID() ) 193 if ( i1.recurrenceID() != i2.recurrenceID() )
194 return false; 194 return false;
195 } 195 }
196 196
197 } else { 197 } else {
198 return false; 198 return false;
199 } 199 }
200 200
201 if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) 201 if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) )
202 return false; 202 return false;
203 if ( i1.hasStartDate() == i2.hasStartDate() ) { 203 if ( i1.hasStartDate() == i2.hasStartDate() ) {
204 if ( i1.hasStartDate() ) { 204 if ( i1.hasStartDate() ) {
205 if ( i1.dtStart() != i2.dtStart() ) 205 if ( i1.dtStart() != i2.dtStart() )
206 return false; 206 return false;
207 } 207 }
208 } else { 208 } else {
209 return false; 209 return false;
210 } 210 }
211 if (!( *i1.recurrence() == *i2.recurrence()) ) { 211 if (!( *i1.recurrence() == *i2.recurrence()) ) {
212 qDebug("recurrence is NOT equal "); 212 qDebug("recurrence is NOT equal ");
213 return false; 213 return false;
214 } 214 }
215 return 215 return
216 // i1.created() == i2.created() && 216 // i1.created() == i2.created() &&
217 stringCompare( i1.description(), i2.description() ) && 217 stringCompare( i1.description(), i2.description() ) &&
218 stringCompare( i1.summary(), i2.summary() ) && 218 stringCompare( i1.summary(), i2.summary() ) &&
219 i1.categories() == i2.categories() && 219 i1.categories() == i2.categories() &&
220 // no need to compare mRelatedTo 220 // no need to compare mRelatedTo
221 stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && 221 stringCompare( i1.relatedToUid(), i2.relatedToUid() ) &&
222 // i1.relations() == i2.relations() && 222 // i1.relations() == i2.relations() &&
223 i1.exDates() == i2.exDates() && 223 i1.exDates() == i2.exDates() &&
224 i1.attachments() == i2.attachments() && 224 i1.attachments() == i2.attachments() &&
225 i1.resources() == i2.resources() && 225 i1.resources() == i2.resources() &&
226 i1.secrecy() == i2.secrecy() && 226 i1.secrecy() == i2.secrecy() &&
227 i1.priority() == i2.priority() && 227 i1.priority() == i2.priority() &&
228 i1.cancelled() == i2.cancelled() && 228 i1.cancelled() == i2.cancelled() &&
229 stringCompare( i1.location(), i2.location() ); 229 stringCompare( i1.location(), i2.location() );
230} 230}
231 231
232Incidence* Incidence::recreateCloneException( QDate d ) 232Incidence* Incidence::recreateCloneException( QDate d )
233{ 233{
234 Incidence* newInc = clone(); 234 Incidence* newInc = clone();
235 newInc->recreate(); 235 newInc->recreate();
236 if ( doesRecur() ) { 236 if ( doesRecur() ) {
237 addExDate( d ); 237 addExDate( d );
238 newInc->recurrence()->unsetRecurs(); 238 newInc->recurrence()->unsetRecurs();
239 if ( type() == "Event") { 239 if ( type() == "Event") {
240 int len = dtStart().secsTo( ((Event*)this)->dtEnd()); 240 int len = dtStart().secsTo( ((Event*)this)->dtEnd());
241 QTime tim = dtStart().time(); 241 QTime tim = dtStart().time();
242 newInc->setDtStart( QDateTime(d, tim) ); 242 newInc->setDtStart( QDateTime(d, tim) );
243 ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); 243 ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) );
244 } else { 244 } else {
245 int len = dtStart().secsTo( ((Todo*)this)->dtDue()); 245 int len = dtStart().secsTo( ((Todo*)this)->dtDue());
246 QTime tim = ((Todo*)this)->dtDue().time(); 246 QTime tim = ((Todo*)this)->dtDue().time();
247 ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); 247 ((Todo*)newInc)->setDtDue( QDateTime(d, tim) );
248 ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); 248 ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) );
249 ((Todo*)this)->setRecurDates(); 249 ((Todo*)this)->setRecurDates();
250 } 250 }
251 newInc->setExDates( DateList () ); 251 newInc->setExDates( DateList () );
252 } 252 }
253 return newInc; 253 return newInc;
254} 254}
255 255
256void Incidence::recreate() 256void Incidence::recreate()
257{ 257{
258 setCreated(QDateTime::currentDateTime()); 258 setCreated(QDateTime::currentDateTime());
259 259
260 setUid(CalFormat::createUniqueId()); 260 setUid(CalFormat::createUniqueId());
261 261
262 setRevision(0); 262 setRevision(0);
263 setIDStr( ":" ); 263 setIDStr( ":" );
264 setLastModified(QDateTime::currentDateTime()); 264 setLastModified(QDateTime::currentDateTime());
265} 265}
266 266void Incidence::cloneRelations( Incidence * newInc )
267{
268 // newInc is already a clone of this incidence
269 Incidence * inc;
270 Incidence * cloneInc;
271 QPtrList<Incidence> Relations = relations();
272 for (inc=Relations.first();inc;inc=Relations.next()) {
273 cloneInc = inc->clone();
274 cloneInc->recreate();
275 cloneInc->setRelatedTo( newInc );
276 inc->cloneRelations( cloneInc );
277 }
278}
267void Incidence::setReadOnly( bool readOnly ) 279void Incidence::setReadOnly( bool readOnly )
268{ 280{
269 IncidenceBase::setReadOnly( readOnly ); 281 IncidenceBase::setReadOnly( readOnly );
270 recurrence()->setRecurReadOnly( readOnly); 282 recurrence()->setRecurReadOnly( readOnly);
271} 283}
272 284
273void Incidence::setCreated(QDateTime created) 285void Incidence::setCreated(QDateTime created)
274{ 286{
275 if (mReadOnly) return; 287 if (mReadOnly) return;
276 mCreated = getEvenTime(created); 288 mCreated = getEvenTime(created);
277} 289}
278 290
279QDateTime Incidence::created() const 291QDateTime Incidence::created() const
280{ 292{
281 return mCreated; 293 return mCreated;
282} 294}
283 295
284void Incidence::setRevision(int rev) 296void Incidence::setRevision(int rev)
285{ 297{
286 if (mReadOnly) return; 298 if (mReadOnly) return;
287 mRevision = rev; 299 mRevision = rev;
288 300
289 updated(); 301 updated();
290} 302}
291 303
292int Incidence::revision() const 304int Incidence::revision() const
293{ 305{
294 return mRevision; 306 return mRevision;
295} 307}
296 308
297void Incidence::setDtStart(const QDateTime &dtStart) 309void Incidence::setDtStart(const QDateTime &dtStart)
298{ 310{
299 311
300 QDateTime dt = getEvenTime(dtStart); 312 QDateTime dt = getEvenTime(dtStart);
301 recurrence()->setRecurStart( dt); 313 recurrence()->setRecurStart( dt);
302 IncidenceBase::setDtStart( dt ); 314 IncidenceBase::setDtStart( dt );
303} 315}
304 316
305void Incidence::setDescription(const QString &description) 317void Incidence::setDescription(const QString &description)
306{ 318{
307 if (mReadOnly) return; 319 if (mReadOnly) return;
308 mDescription = description; 320 mDescription = description;
309 updated(); 321 updated();
310} 322}
311 323
312QString Incidence::description() const 324QString Incidence::description() const
313{ 325{
314 return mDescription; 326 return mDescription;
315} 327}
316 328
317 329
318void Incidence::setSummary(const QString &summary) 330void Incidence::setSummary(const QString &summary)
319{ 331{
320 if (mReadOnly) return; 332 if (mReadOnly) return;
321 mSummary = summary; 333 mSummary = summary;
322 updated(); 334 updated();
323} 335}
324 336
325QString Incidence::summary() const 337QString Incidence::summary() const
326{ 338{
327 return mSummary; 339 return mSummary;
328} 340}
329void Incidence::checkCategories() 341void Incidence::checkCategories()
330{ 342{
331 mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday")); 343 mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday"));
332 mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday")); 344 mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday"));
333 mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary")); 345 mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary"));
334} 346}
335 347
336void Incidence::setCategories(const QStringList &categories) 348void Incidence::setCategories(const QStringList &categories)
337{ 349{
338 if (mReadOnly) return; 350 if (mReadOnly) return;
339 mCategories = categories; 351 mCategories = categories;
340 checkCategories(); 352 checkCategories();
341 updated(); 353 updated();
342} 354}
343 355
344// TODO: remove setCategories(QString) function 356// TODO: remove setCategories(QString) function
345void Incidence::setCategories(const QString &catStr) 357void Incidence::setCategories(const QString &catStr)
346{ 358{
347 if (mReadOnly) return; 359 if (mReadOnly) return;
348 mCategories.clear(); 360 mCategories.clear();
349 361
350 if (catStr.isEmpty()) return; 362 if (catStr.isEmpty()) return;
351 363
352 mCategories = QStringList::split(",",catStr); 364 mCategories = QStringList::split(",",catStr);
353 365
354 QStringList::Iterator it; 366 QStringList::Iterator it;
355 for(it = mCategories.begin();it != mCategories.end(); ++it) { 367 for(it = mCategories.begin();it != mCategories.end(); ++it) {
356 *it = (*it).stripWhiteSpace(); 368 *it = (*it).stripWhiteSpace();
357 } 369 }
358 checkCategories(); 370 checkCategories();
359 updated(); 371 updated();
360} 372}
361 373
362QStringList Incidence::categories() const 374QStringList Incidence::categories() const
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index f8da342..60070a2 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -19,192 +19,193 @@
19*/ 19*/
20#ifndef INCIDENCE_H 20#ifndef INCIDENCE_H
21#define INCIDENCE_H 21#define INCIDENCE_H
22// 22//
23// Incidence - base class of calendaring components 23// Incidence - base class of calendaring components
24// 24//
25 25
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qstringlist.h> 27#include <qstringlist.h>
28#include <qvaluelist.h> 28#include <qvaluelist.h>
29 29
30#include "recurrence.h" 30#include "recurrence.h"
31#include "alarm.h" 31#include "alarm.h"
32#include "attachment.h" 32#include "attachment.h"
33#include "listbase.h" 33#include "listbase.h"
34#include "incidencebase.h" 34#include "incidencebase.h"
35 35
36namespace KCal { 36namespace KCal {
37 37
38class Event; 38class Event;
39class Todo; 39class Todo;
40class Journal; 40class Journal;
41 41
42/** 42/**
43 This class provides the base class common to all calendar components. 43 This class provides the base class common to all calendar components.
44*/ 44*/
45class Incidence : public IncidenceBase 45class Incidence : public IncidenceBase
46{ 46{
47 public: 47 public:
48 /** 48 /**
49 This class provides the interface for a visitor of calendar components. It 49 This class provides the interface for a visitor of calendar components. It
50 serves as base class for concrete visitors, which implement certain actions on 50 serves as base class for concrete visitors, which implement certain actions on
51 calendar components. It allows to add functions, which operate on the concrete 51 calendar components. It allows to add functions, which operate on the concrete
52 types of calendar components, without changing the calendar component classes. 52 types of calendar components, without changing the calendar component classes.
53 */ 53 */
54 class Visitor 54 class Visitor
55 { 55 {
56 public: 56 public:
57 /** Destruct Incidence::Visitor */ 57 /** Destruct Incidence::Visitor */
58 virtual ~Visitor() {} 58 virtual ~Visitor() {}
59 59
60 /** 60 /**
61 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions 61 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions
62 on an Event object. 62 on an Event object.
63 */ 63 */
64 virtual bool visit(Event *) { return false; } 64 virtual bool visit(Event *) { return false; }
65 /** 65 /**
66 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions 66 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions
67 on an Todo object. 67 on an Todo object.
68 */ 68 */
69 virtual bool visit(Todo *) { return false; } 69 virtual bool visit(Todo *) { return false; }
70 /** 70 /**
71 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions 71 Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions
72 on an Journal object. 72 on an Journal object.
73 */ 73 */
74 virtual bool visit(Journal *) { return false; } 74 virtual bool visit(Journal *) { return false; }
75 75
76 protected: 76 protected:
77 /** Constructor is protected to prevent direct creation of visitor base class. */ 77 /** Constructor is protected to prevent direct creation of visitor base class. */
78 Visitor() {} 78 Visitor() {}
79 }; 79 };
80 80
81 /** 81 /**
82 This class implements a visitor for adding an Incidence to a resource 82 This class implements a visitor for adding an Incidence to a resource
83 supporting addEvent(), addTodo() and addJournal() calls. 83 supporting addEvent(), addTodo() and addJournal() calls.
84 */ 84 */
85 template<class T> 85 template<class T>
86 class AddVisitor : public Visitor 86 class AddVisitor : public Visitor
87 { 87 {
88 public: 88 public:
89 AddVisitor( T *r ) : mResource( r ) {} 89 AddVisitor( T *r ) : mResource( r ) {}
90 bool visit( Event *e ) { return mResource->addEvent( e ); } 90 bool visit( Event *e ) { return mResource->addEvent( e ); }
91 bool visit( Todo *t ) { return mResource->addTodo( t ); } 91 bool visit( Todo *t ) { return mResource->addTodo( t ); }
92 bool visit( Journal *j ) { return mResource->addJournal( j ); } 92 bool visit( Journal *j ) { return mResource->addJournal( j ); }
93 93
94 private: 94 private:
95 T *mResource; 95 T *mResource;
96 }; 96 };
97 97
98 /** enumeration for describing an event's secrecy. */ 98 /** enumeration for describing an event's secrecy. */
99 enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }; 99 enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 };
100 typedef ListBase<Incidence> List; 100 typedef ListBase<Incidence> List;
101 Incidence(); 101 Incidence();
102 Incidence(const Incidence &); 102 Incidence(const Incidence &);
103 ~Incidence(); 103 ~Incidence();
104 104
105 /** 105 /**
106 Accept IncidenceVisitor. A class taking part in the visitor mechanism has to 106 Accept IncidenceVisitor. A class taking part in the visitor mechanism has to
107 provide this implementation: 107 provide this implementation:
108 <pre> 108 <pre>
109 bool accept(Visitor &v) { return v.visit(this); } 109 bool accept(Visitor &v) { return v.visit(this); }
110 </pre> 110 </pre>
111 */ 111 */
112 virtual bool accept(Visitor &) { return false; } 112 virtual bool accept(Visitor &) { return false; }
113 113
114 virtual Incidence *clone() = 0; 114 virtual Incidence *clone() = 0;
115 virtual void cloneRelations( Incidence * );
115 116
116 virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; 117 virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0;
117 void setReadOnly( bool ); 118 void setReadOnly( bool );
118 119
119 /** 120 /**
120 Recreate event. The event is made a new unique event, but already stored 121 Recreate event. The event is made a new unique event, but already stored
121 event information is preserved. Sets uniquie id, creation date, last 122 event information is preserved. Sets uniquie id, creation date, last
122 modification date and revision number. 123 modification date and revision number.
123 */ 124 */
124 void recreate(); 125 void recreate();
125 Incidence* recreateCloneException(QDate); 126 Incidence* recreateCloneException(QDate);
126 127
127 /** set creation date */ 128 /** set creation date */
128 void setCreated(QDateTime); 129 void setCreated(QDateTime);
129 /** return time and date of creation. */ 130 /** return time and date of creation. */
130 QDateTime created() const; 131 QDateTime created() const;
131 132
132 /** set the number of revisions this event has seen */ 133 /** set the number of revisions this event has seen */
133 void setRevision(int rev); 134 void setRevision(int rev);
134 /** return the number of revisions this event has seen */ 135 /** return the number of revisions this event has seen */
135 int revision() const; 136 int revision() const;
136 137
137 /** Set starting date/time. */ 138 /** Set starting date/time. */
138 virtual void setDtStart(const QDateTime &dtStart); 139 virtual void setDtStart(const QDateTime &dtStart);
139 /** Return the incidence's ending date/time as a QDateTime. */ 140 /** Return the incidence's ending date/time as a QDateTime. */
140 virtual QDateTime dtEnd() const { return QDateTime(); } 141 virtual QDateTime dtEnd() const { return QDateTime(); }
141 142
142 /** sets the event's lengthy description. */ 143 /** sets the event's lengthy description. */
143 void setDescription(const QString &description); 144 void setDescription(const QString &description);
144 /** returns a reference to the event's description. */ 145 /** returns a reference to the event's description. */
145 QString description() const; 146 QString description() const;
146 147
147 /** sets the event's short summary. */ 148 /** sets the event's short summary. */
148 void setSummary(const QString &summary); 149 void setSummary(const QString &summary);
149 /** returns a reference to the event's summary. */ 150 /** returns a reference to the event's summary. */
150 QString summary() const; 151 QString summary() const;
151 152
152 /** set event's applicable categories */ 153 /** set event's applicable categories */
153 void setCategories(const QStringList &categories); 154 void setCategories(const QStringList &categories);
154 /** set event's categories based on a comma delimited string */ 155 /** set event's categories based on a comma delimited string */
155 void setCategories(const QString &catStr); 156 void setCategories(const QString &catStr);
156 /** return categories in a list */ 157 /** return categories in a list */
157 QStringList categories() const; 158 QStringList categories() const;
158 /** return categories as a comma separated string */ 159 /** return categories as a comma separated string */
159 QString categoriesStr(); 160 QString categoriesStr();
160 161
161 /** point at some other event to which the event relates. This function should 162 /** point at some other event to which the event relates. This function should
162 * only be used when constructing a calendar before the related Event 163 * only be used when constructing a calendar before the related Event
163 * exists. */ 164 * exists. */
164 void setRelatedToUid(const QString &); 165 void setRelatedToUid(const QString &);
165 /** what event does this one relate to? This function should 166 /** what event does this one relate to? This function should
166 * only be used when constructing a calendar before the related Event 167 * only be used when constructing a calendar before the related Event
167 * exists. */ 168 * exists. */
168 QString relatedToUid() const; 169 QString relatedToUid() const;
169 /** point at some other event to which the event relates */ 170 /** point at some other event to which the event relates */
170 void setRelatedTo(Incidence *relatedTo); 171 void setRelatedTo(Incidence *relatedTo);
171 /** what event does this one relate to? */ 172 /** what event does this one relate to? */
172 Incidence *relatedTo() const; 173 Incidence *relatedTo() const;
173 /** All events that are related to this event */ 174 /** All events that are related to this event */
174 QPtrList<Incidence> relations() const; 175 QPtrList<Incidence> relations() const;
175 /** Add an event which is related to this event */ 176 /** Add an event which is related to this event */
176 void addRelation(Incidence *); 177 void addRelation(Incidence *);
177 /** Remove event that is related to this event */ 178 /** Remove event that is related to this event */
178 void removeRelation(Incidence *); 179 void removeRelation(Incidence *);
179 180
180 /** returns the list of dates which are exceptions to the recurrence rule */ 181 /** returns the list of dates which are exceptions to the recurrence rule */
181 DateList exDates() const; 182 DateList exDates() const;
182 /** sets the list of dates which are exceptions to the recurrence rule */ 183 /** sets the list of dates which are exceptions to the recurrence rule */
183 void setExDates(const DateList &_exDates); 184 void setExDates(const DateList &_exDates);
184 void setExDates(const char *dates); 185 void setExDates(const char *dates);
185 /** Add a date to the list of exceptions of the recurrence rule. */ 186 /** Add a date to the list of exceptions of the recurrence rule. */
186 void addExDate(const QDate &date); 187 void addExDate(const QDate &date);
187 188
188 /** returns true if there is an exception for this date in the recurrence 189 /** returns true if there is an exception for this date in the recurrence
189 rule set, or false otherwise. */ 190 rule set, or false otherwise. */
190 bool isException(const QDate &qd) const; 191 bool isException(const QDate &qd) const;
191 192
192 /** add attachment to this event */ 193 /** add attachment to this event */
193 void addAttachment(Attachment *attachment); 194 void addAttachment(Attachment *attachment);
194 /** remove and delete a specific attachment */ 195 /** remove and delete a specific attachment */
195 void deleteAttachment(Attachment *attachment); 196 void deleteAttachment(Attachment *attachment);
196 /** remove and delete all attachments with this mime type */ 197 /** remove and delete all attachments with this mime type */
197 void deleteAttachments(const QString& mime); 198 void deleteAttachments(const QString& mime);
198 /** return list of all associated attachments */ 199 /** return list of all associated attachments */
199 QPtrList<Attachment> attachments() const; 200 QPtrList<Attachment> attachments() const;
200 /** find a list of attachments with this mime type */ 201 /** find a list of attachments with this mime type */
201 QPtrList<Attachment> attachments(const QString& mime) const; 202 QPtrList<Attachment> attachments(const QString& mime) const;
202 203
203 /** sets the event's status the value specified. See the enumeration 204 /** sets the event's status the value specified. See the enumeration
204 * above for possible values. */ 205 * above for possible values. */
205 void setSecrecy(int); 206 void setSecrecy(int);
206 /** return the event's secrecy. */ 207 /** return the event's secrecy. */
207 int secrecy() const; 208 int secrecy() const;
208 /** return the event's secrecy in string format. */ 209 /** return the event's secrecy in string format. */
209 QString secrecyStr() const; 210 QString secrecyStr() const;
210 /** return list of all availbale secrecy classes */ 211 /** return list of all availbale secrecy classes */