-rw-r--r-- | bin/kdepim/WhatsNew.txt | 13 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 9 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 25 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 6 | ||||
-rw-r--r-- | libkcal/calendar.cpp | 10 | ||||
-rw-r--r-- | libkcal/calendar.h | 5 | ||||
-rw-r--r-- | libkcal/incidence.cpp | 14 | ||||
-rw-r--r-- | libkcal/incidence.h | 1 |
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,34 +1,47 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.27 ************ | ||
4 | |||
5 | More bugfixes. | ||
6 | Added possibility to clone in KO/Pi a todo with all its subtodos. | ||
7 | Added a timetracker funtionality in KO/Pi for todos in the todo view. | ||
8 | If a todo is set to started and then to stopped it is saving information about the runtime in | ||
9 | <yourhome>/kdepim/apps/timetrackerdir. | ||
10 | To read, display, print this information an external program is needed which will be developed. | ||
11 | It will display the data in a Gantt timetable view with one row for each todo. | ||
12 | It will have many possibilities sorting the data after category, parent todos, attendees, ... and for creating/printing status reports/summaries. | ||
13 | Merging of data from different computers/users will be quite easy because every run is stored in a single file. | ||
14 | The 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 | ||
5 | Added two more fields to the KA/Pi view config: | 18 | Added two more fields to the KA/Pi view config: |
6 | A "Mobile (home)" and a "Mobile (work)" field. | 19 | A "Mobile (home)" and a "Mobile (work)" field. |
7 | Fixed utf8 import (e.g. for Japaneese text) in KA/Pi. | 20 | Fixed utf8 import (e.g. for Japaneese text) in KA/Pi. |
8 | 21 | ||
9 | Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes. | 22 | Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes. |
10 | And again fixed some more small bugs. | 23 | And again fixed some more small bugs. |
11 | 24 | ||
12 | ********** VERSION 2.0.25 ************ | 25 | ********** VERSION 2.0.25 ************ |
13 | 26 | ||
14 | And again fixed some bugs. | 27 | And again fixed some bugs. |
15 | 28 | ||
16 | ********** VERSION 2.0.24 ************ | 29 | ********** VERSION 2.0.24 ************ |
17 | 30 | ||
18 | Fixed again a lot of small bugs. | 31 | Fixed again a lot of small bugs. |
19 | Some performance optimizations in date navigator. | 32 | Some performance optimizations in date navigator. |
20 | Month 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. | 33 | Month 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 | ||
24 | Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation. | 37 | Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation. |
25 | Fixed the (agenda) layout of KO/Pi on 5500er. | 38 | Fixed the (agenda) layout of KO/Pi on 5500er. |
26 | Some usebility enhancements (e.g. reselection the current item of the todo view after some changes). | 39 | Some 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 | ||
30 | KO/Pi: | 43 | KO/Pi: |
31 | Fix for creating events/todos via the abgenda context menu. | 44 | Fix for creating events/todos via the abgenda context menu. |
32 | Added option to split toolbar to 3 toolbars. | 45 | Added 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). |
34 | Added option to show one small filter-view-toolbar. | 47 | Added option to show one small filter-view-toolbar. |
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 | |||
@@ -1129,84 +1129,84 @@ | |||
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" }, |
@@ -1314,39 +1314,44 @@ | |||
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 | |||
@@ -2675,69 +2675,90 @@ void CalendarView::moveIncidence() | |||
2675 | } | 2675 | } |
2676 | void CalendarView::beamIncidence() | 2676 | void 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 | } |
2684 | void CalendarView::toggleCancelIncidence() | 2684 | void 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 | ||
2694 | void CalendarView::cancelIncidence(Incidence * inc ) | 2694 | void 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 | } |
2700 | void CalendarView::cloneIncidence(Incidence * orgInc ) | 2700 | void 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 | ||
2730 | void CalendarView::newEvent() | 2751 | void 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 | } |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 7ee1eef..9b5d4ce 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1090,77 +1090,77 @@ void KOTodoView::changedCategories(int index) | |||
1090 | } | 1090 | } |
1091 | } | 1091 | } |
1092 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 1092 | void 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 | } |
1120 | void KOTodoView::toggleRunningItem() | 1120 | void 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 | ||
1141 | void KOTodoView::itemClicked(QListViewItem *item) | 1141 | void 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 { |
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 406cd48..ed39ddb 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp | |||
@@ -306,65 +306,73 @@ QPtrList<Incidence> Calendar::rawIncidences() | |||
306 | 306 | ||
307 | return incidences; | 307 | return incidences; |
308 | } | 308 | } |
309 | 309 | ||
310 | QPtrList<Event> Calendar::events( const QDate &date, bool sorted ) | 310 | QPtrList<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 | ||
317 | QPtrList<Event> Calendar::events( const QDateTime &qdt ) | 317 | QPtrList<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 | ||
324 | QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, | 324 | QPtrList<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 | ||
332 | QPtrList<Event> Calendar::events() | 332 | QPtrList<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 | 338 | void 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 | ||
340 | bool Calendar::addIncidence(Incidence *i) | 348 | bool 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 | } |
346 | void Calendar::deleteIncidence(Incidence *in) | 354 | void 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 | ||
356 | Incidence* Calendar::incidence( const QString& uid ) | 364 | Incidence* 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 | ||
370 | QPtrList<Todo> Calendar::todos() | 378 | QPtrList<Todo> Calendar::todos() |
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 2f2c3aa..ab40970 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -110,65 +110,68 @@ public: | |||
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. |
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 6bca12c..78fa24f 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -234,65 +234,77 @@ Incidence* Incidence::recreateCloneException( QDate d ) | |||
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 | ||
256 | void Incidence::recreate() | 256 | void 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 | 266 | void 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 | } | ||
267 | void Incidence::setReadOnly( bool readOnly ) | 279 | void 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 | ||
273 | void Incidence::setCreated(QDateTime created) | 285 | void 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 | ||
279 | QDateTime Incidence::created() const | 291 | QDateTime Incidence::created() const |
280 | { | 292 | { |
281 | return mCreated; | 293 | return mCreated; |
282 | } | 294 | } |
283 | 295 | ||
284 | void Incidence::setRevision(int rev) | 296 | void 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 | ||
292 | int Incidence::revision() const | 304 | int Incidence::revision() const |
293 | { | 305 | { |
294 | return mRevision; | 306 | return mRevision; |
295 | } | 307 | } |
296 | 308 | ||
297 | void Incidence::setDtStart(const QDateTime &dtStart) | 309 | void Incidence::setDtStart(const QDateTime &dtStart) |
298 | { | 310 | { |
diff --git a/libkcal/incidence.h b/libkcal/incidence.h index f8da342..60070a2 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h | |||
@@ -83,64 +83,65 @@ class Incidence : public IncidenceBase | |||
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 | ||