author | zautrix <zautrix> | 2005-01-30 01:41:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-30 01:41:12 (UTC) |
commit | 949c6e28c83668176fd9c29e12668322c6ae627f (patch) (unidiff) | |
tree | f5b21c9fe6d9f1906a7bca6899b44bcf359f2cc6 | |
parent | a8fae20ad7bcb59df9a603c88accf3a10401c2f9 (diff) | |
download | kdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.zip kdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.tar.gz kdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.tar.bz2 |
bugs
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 16 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 5 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 1 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.cpp | 16 | ||||
-rw-r--r-- | libkcal/todo.cpp | 7 |
6 files changed, 37 insertions, 10 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 0538511..eec0b38 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -950,263 +950,263 @@ | |||
950 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 950 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
951 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 951 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
952 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 952 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
953 | { "Help...","Hilfe..." }, | 953 | { "Help...","Hilfe..." }, |
954 | { "Local file Cal:","Lokale Datei Kal:" }, | 954 | { "Local file Cal:","Lokale Datei Kal:" }, |
955 | { "Local file ABook:","Lokale Datei ABuch:" }, | 955 | { "Local file ABook:","Lokale Datei ABuch:" }, |
956 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 956 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
957 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 957 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
958 | { "Calendar:","Kalender:" }, | 958 | { "Calendar:","Kalender:" }, |
959 | { "AddressBook:","AdressBuch:" }, | 959 | { "AddressBook:","AdressBuch:" }, |
960 | { "PWManager:","PWManager:" }, | 960 | { "PWManager:","PWManager:" }, |
961 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 961 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
962 | { "ssh/scp","ssh/scp" }, | 962 | { "ssh/scp","ssh/scp" }, |
963 | { "ftp","ftp" }, | 963 | { "ftp","ftp" }, |
964 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 964 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
965 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 965 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
966 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 966 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
967 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 967 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
968 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 968 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
969 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 969 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
970 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 970 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
971 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 971 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
972 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 972 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
973 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | 973 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, |
974 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 974 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
975 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 975 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
976 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 976 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
977 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 977 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
978 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 978 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
979 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, | 979 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
980 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 980 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
981 | { "Multiple profiles","Multi-Sync Profile" }, | 981 | { "Multiple profiles","Multi-Sync Profile" }, |
982 | { "Device: ","Gerät: " }, | 982 | { "Device: ","Gerät: " }, |
983 | { "Multiple sync started.","Multi-Sync gestartet." }, | 983 | { "Multiple sync started.","Multi-Sync gestartet." }, |
984 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 984 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
985 | { "Turn filter on","Schalte Filter an" }, | 985 | { "Turn filter on","Schalte Filter an" }, |
986 | { "Turn filter off","Schalte Filter aus" }, | 986 | { "Turn filter off","Schalte Filter aus" }, |
987 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 987 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
988 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 988 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
989 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 989 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
990 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 990 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
991 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 991 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
992 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 992 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
993 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 993 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
994 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 994 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
995 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 995 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
996 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 996 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
997 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 997 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
998 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 998 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
999 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 999 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
1000 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 1000 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
1001 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, | 1001 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
1002 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, | 1002 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
1003 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 1003 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
1004 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, | 1004 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
1005 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 1005 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
1006 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, | 1006 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
1007 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 1007 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1008 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, | 1008 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
1009 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 1009 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
1010 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1010 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1011 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, | 1011 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
1012 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, | 1012 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
1013 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, | 1013 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1014 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1014 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1015 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1015 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1016 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1016 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1017 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1017 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1018 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1018 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1019 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, | 1019 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1020 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, | 1020 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1021 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1021 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1022 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1022 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1023 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, | 1023 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1024 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datenavigator</p>\n" }, | 1024 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datenavigator</p>\n" }, |
1025 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, | 1025 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1026 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1026 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1027 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" }, | 1027 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" }, |
1028 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" }, | 1028 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" }, |
1029 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1029 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " }, | 1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " }, |
1031 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1031 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1032 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1032 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1034 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1034 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1035 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1035 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1036 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1036 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1038 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1038 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, | 1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, |
1043 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1043 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1044 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1044 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1047 | { "(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n","(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi basiert auf KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.korganizer.org\nwww.pi-sync.net\n" }, | 1047 | { "(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n","(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi basiert auf KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.korganizer.org\nwww.pi-sync.net\n" }, |
1048 | { "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n","PDA-Edition\nfür: Zaurus 5x00 / 7x0 / 8x0\n" }, | 1048 | { "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n","PDA-Edition\nfür: Zaurus 5x00 / 7x0 / 8x0\n" }, |
1049 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1049 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1050 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1050 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1051 | { "From: ","Von: " }, | 1051 | { "From: ","Von: " }, |
1052 | { "Remove sync info","Entferne Sync Info" }, | 1052 | { "Remove sync info","Entferne Sync Info" }, |
1053 | { "For all profiles","Für alle Profile" }, | 1053 | { "For all profiles","Für alle Profile" }, |
1054 | { "Hide not Running","Verstecke nicht Laufende" }, | 1054 | { "Hide not Running","Verstecke nicht Laufende" }, |
1055 | { "ME","ME" }, | 1055 | { "ME","ME" }, |
1056 | { "Toolbar","Toolbar" }, | 1056 | { "Toolbar","Toolbar" }, |
1057 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1057 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1058 | { "Undo Delete","Löschen rückgängig machen" }, | 1058 | { "Undo Delete","Löschen rückgängig machen" }, |
1059 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1059 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1060 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1060 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1061 | { "Januar","Januar" }, | 1061 | { "Januar","Januar" }, |
1062 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1062 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1063 | { "No Filter","Kein Filter" }, | 1063 | { "No Filter","Kein Filter" }, |
1064 | { "Multiple Sync options","Multi Sync Optionen" }, | 1064 | { "Multiple Sync options","Multi Sync Optionen" }, |
1065 | { "Sync algo options","Sync Ablauf Optionen" }, | 1065 | { "Sync algo options","Sync Ablauf Optionen" }, |
1066 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1066 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1067 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1067 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1068 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1068 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1069 | { "Write back options","Optionen zum Zurückschreiben" }, | 1069 | { "Write back options","Optionen zum Zurückschreiben" }, |
1070 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1070 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1071 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1071 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1072 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1072 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1073 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1073 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1074 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1074 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1075 | { "Time period","Zeitspanne" }, | 1075 | { "Time period","Zeitspanne" }, |
1076 | { "From ","Von " }, | 1076 | { "From ","Von " }, |
1077 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1077 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1078 | { " weeks in the future "," Wochen in der Zukunft " }, | 1078 | { " weeks in the future "," Wochen in der Zukunft " }, |
1079 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1079 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1080 | { "Local temp file:","Lokale temp Datei:" }, | 1080 | { "Local temp file:","Lokale temp Datei:" }, |
1081 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1081 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1082 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1082 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1083 | { "Language","Sprache" }, | 1083 | { "Language","Sprache" }, |
1084 | { "Time Format","Zeit Format" }, | 1084 | { "Time Format","Zeit Format" }, |
1085 | { "Time Zone","Zeit Zone" }, | 1085 | { "Time Zone","Zeit Zone" }, |
1086 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1086 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1087 | { "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" }, | 1087 | { "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" }, |
1088 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1088 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1089 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1089 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1090 | { "Save settings","Speichere Einstellungen" }, | 1090 | { "Save settings","Speichere Einstellungen" }, |
1091 | { "Save standard","Speichere Standard" }, | 1091 | { "Save standard","Speichere Standard" }, |
1092 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1092 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1093 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1093 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1094 | { "Data storage path","Daten Speicherpfad" }, | 1094 | { "Data storage path","Daten Speicherpfad" }, |
1095 | { "Language","Sprache" }, | 1095 | { "Language","Sprache" }, |
1096 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1096 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1097 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1097 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1098 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, | 1098 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, |
1099 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1099 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1100 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1100 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1101 | { "KO/Pi","KO/Pi" }, | 1101 | { "KO/Pi","KO/Pi" }, |
1102 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1102 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1103 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1103 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1104 | { "Sound.Al.: ","Sound.Al.: " }, | 1104 | { "Sound.Al.: ","Sound.Al.: " }, |
1105 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1105 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1106 | { "Restore","Wiederherstellen" }, | 1106 | { "Restore","Wiederherstellen" }, |
1107 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1107 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1108 | { "% completed","% komplett" }, | 1108 | { "% completed","% komplett" }, |
1109 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1109 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1110 | { "Set complete","Setze auf erledigt" }, | 1110 | { "Set complete","Setze auf erledigt" }, |
1111 | { "(cancelled)","(gecancelt)" }, | 1111 | { "(cancelled)","(gecancelt)" }, |
1112 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1112 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1113 | { " Local time "," Locale Zeit " }, | 1113 | { " Local time "," Locale Zeit " }, |
1114 | { "Form2","Form2" }, | 1114 | { "Form2","Form2" }, |
1115 | { "Filter enabled","Filter angeschaltet" }, | 1115 | { "Filter enabled","Filter angeschaltet" }, |
1116 | { "Edit Filters","Ändere Filter" }, | 1116 | { "Edit Filters","Ändere Filter" }, |
1117 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1117 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1118 | { "Agenda","Agenda" }, | 1118 | { "Agenda","Agenda" }, |
1119 | { " ("," (" }, | 1119 | { " ("," (" }, |
1120 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1120 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1121 | { "Print","Print" }, | 1121 | { "Print","Print" }, |
1122 | { "&Setup Printer...","Drucker &Setup..." }, | 1122 | { "&Setup Printer...","Drucker &Setup..." }, |
1123 | { "View Type","Zeige Typ" }, | 1123 | { "View Type","Zeige Typ" }, |
1124 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1124 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1125 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1125 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1126 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1126 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1127 | { "Portrait","Portrait" }, | 1127 | { "Portrait","Portrait" }, |
1128 | { "Landscape","Landschaft" }, | 1128 | { "Landscape","Landschaft" }, |
1129 | { "Print day","Drucke Tag" }, | 1129 | { "Print day","Drucke Tag" }, |
1130 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1130 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1131 | { "Date && Time Range","Datum && Zeitspanne" }, | 1131 | { "Date && Time Range","Datum && Zeitspanne" }, |
1132 | { "&End date:","&Enddatum:" }, | 1132 | { "&End date:","&Enddatum:" }, |
1133 | { "&Start date:","&Startdatum:" }, | 1133 | { "&Start date:","&Startdatum:" }, |
1134 | { "Start &time:","Startzeit:" }, | 1134 | { "Start &time:","Startzeit:" }, |
1135 | { "End ti&me:","Endzeit:" }, | 1135 | { "End ti&me:","Endzeit:" }, |
1136 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1136 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1137 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1137 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1138 | { "Alt+D","Alt+D" }, | 1138 | { "Alt+D","Alt+D" }, |
1139 | { "&Use colors","Nutze Farben" }, | 1139 | { "&Use colors","Nutze Farben" }, |
1140 | { "Alt+U","Alt+U" }, | 1140 | { "Alt+U","Alt+U" }, |
1141 | { "Print week","Drucke Woche" }, | 1141 | { "Print week","Drucke Woche" }, |
1142 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1142 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1143 | { "Use &colors","Nutze Farben" }, | 1143 | { "Use &colors","Nutze Farben" }, |
1144 | { "Type of View","Typ der Ansicht" }, | 1144 | { "Type of View","Typ der Ansicht" }, |
1145 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1145 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1146 | { "Alt+F","Alt+F" }, | 1146 | { "Alt+F","Alt+F" }, |
1147 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1147 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1148 | { "Alt+T","Alt+T" }, | 1148 | { "Alt+T","Alt+T" }, |
1149 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1149 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1150 | { "Print month","Drucke Monat" }, | 1150 | { "Print month","Drucke Monat" }, |
1151 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1151 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1152 | { "&Start month:","&Startmonat:" }, | 1152 | { "&Start month:","&Startmonat:" }, |
1153 | { "&End month:","&Endmonat:" }, | 1153 | { "&End month:","&Endmonat:" }, |
1154 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1154 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1155 | { "Print todos","Drucke Todos" }, | 1155 | { "Print todos","Drucke Todos" }, |
1156 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1156 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1157 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1157 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1158 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1158 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1159 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1159 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1160 | { "Items to Print","Zu druckende Items" }, | 1160 | { "Items to Print","Zu druckende Items" }, |
1161 | { "&From:","Von:" }, | 1161 | { "&From:","Von:" }, |
1162 | { "&To:","Bis:" }, | 1162 | { "&To:","Bis:" }, |
1163 | { "Print &all todo items","Drucke alle Todo Items" }, | 1163 | { "Print &all todo items","Drucke alle Todo Items" }, |
1164 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1164 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1165 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1165 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1166 | { "Todo List","Todo Liste" }, | 1166 | { "Todo List","Todo Liste" }, |
1167 | { "&Title:","&Titel:" }, | 1167 | { "&Title:","&Titel:" }, |
1168 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, | 1168 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, |
1169 | { "Todo list","Todo Liste" }, | 1169 | { "Todo list","Todo Liste" }, |
1170 | { "&Print...","Drucke..." }, | 1170 | { "&Print...","Drucke..." }, |
1171 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1171 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1172 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1172 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1173 | { "OK","OK" }, | 1173 | { "OK","OK" }, |
1174 | { "FilterEditor","FilterEditor" }, | 1174 | { "FilterEditor","FilterEditor" }, |
1175 | { "Include","Inclusive" }, | 1175 | { "Include","Inclusive" }, |
1176 | { "Exclude","Exclusive" }, | 1176 | { "Exclude","Exclusive" }, |
1177 | { "Edit Selection...","Editiere Auswahl" }, | 1177 | { "Edit Selection...","Editiere Auswahl" }, |
1178 | { "recurring events","wiederholende Termine" }, | 1178 | { "recurring events","wiederholende Termine" }, |
1179 | { "recurr. events","wiederh.Termine" }, | 1179 | { "recurr. events","wiederh.Termine" }, |
1180 | { "completed to-dos","erledigte Todos" }, | 1180 | { "completed to-dos","erledigte Todos" }, |
1181 | { "events","Termine" }, | 1181 | { "events","Termine" }, |
1182 | { "todos","Todos" }, | 1182 | { "todos","Todos" }, |
1183 | { "journals","Journale" }, | 1183 | { "journals","Journale" }, |
1184 | { "public","öffentl." }, | 1184 | { "public","öffentl." }, |
1185 | { "private","privat" }, | 1185 | { "private","privat" }, |
1186 | { "confidential","vertraul." }, | 1186 | { "confidential","vertraul." }, |
1187 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1187 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1188 | { "Yesterday","Gestern" }, | 1188 | { "Yesterday","Gestern" }, |
1189 | { "Day after tomorrow","Übermorgen" }, | 1189 | { "Day after tomorrow","Übermorgen" }, |
1190 | { "Tomorrow","Morgen" }, | 1190 | { "Tomorrow","Morgen" }, |
1191 | { "Day before yesterday","Vorgestern" }, | 1191 | { "Day before yesterday","Vorgestern" }, |
1192 | { "Size %1","Größe %1" }, | 1192 | { "Size %1","Größe %1" }, |
1193 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1193 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1194 | { " (%1 y.)"," (%1 J.)" }, | 1194 | { " (%1 y.)"," (%1 J.)" }, |
1195 | { "Allday:","Ganztägig:" }, | 1195 | { "Allday:","Ganztägig:" }, |
1196 | { "compl.todos","erled.Todos" }, | 1196 | { "compl.todos","erled.Todos" }, |
1197 | { "Day view","Tagesansicht" }, | 1197 | { "Day view","Tagesansicht" }, |
1198 | { "Next days","Nächste Tage" }, | 1198 | { "Next days","Nächste Tage" }, |
1199 | { "Next week","Nächste Woche" }, | 1199 | { "Next week","Nächste Woche" }, |
1200 | { "Next two weeks","Nächste zwei Wochen" }, | 1200 | { "Next two weeks","Nächste zwei Wochen" }, |
1201 | { "Next month","Nächster Monat" }, | 1201 | { "Next month","Nächster Monat" }, |
1202 | { "Journal view","Journal" }, | 1202 | { "Journal view","Journal" }, |
1203 | { "Display all opened","Zeige alle geöffnet" }, | 1203 | { "Display all opened","Zeige alle geöffnet" }, |
1204 | { "Display all closed","Zeige alle geschlossen" }, | 1204 | { "Display all closed","Zeige alle geschlossen" }, |
1205 | { "Display all flat","Zeige alle flach" }, | 1205 | { "Display all flat","Zeige alle flach" }, |
1206 | { "","" }, | 1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1207 | { "","" }, | 1207 | { "","" }, |
1208 | { "","" }, | 1208 | { "","" }, |
1209 | { "","" }, | 1209 | { "","" }, |
1210 | { "","" }, | 1210 | { "","" }, |
1211 | { "","" }, | 1211 | { "","" }, |
1212 | { "","" }, | 1212 | { "","" }, |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index e0a1a21..1864e22 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -896,528 +896,534 @@ void KOAgendaView::updateConfig() | |||
896 | mAgenda->restorePosition(); | 896 | mAgenda->restorePosition(); |
897 | } | 897 | } |
898 | 898 | ||
899 | 899 | ||
900 | void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) | 900 | void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) |
901 | { | 901 | { |
902 | // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl; | 902 | // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl; |
903 | //qDebug("KOAgendaView::updateEventDates "); | 903 | //qDebug("KOAgendaView::updateEventDates "); |
904 | QDateTime startDt,endDt; | 904 | QDateTime startDt,endDt; |
905 | QDate startDate; | 905 | QDate startDate; |
906 | int lenInSecs; | 906 | int lenInSecs; |
907 | // if ( type == KOAgenda::RESIZETOP ) | 907 | // if ( type == KOAgenda::RESIZETOP ) |
908 | // qDebug("RESIZETOP "); | 908 | // qDebug("RESIZETOP "); |
909 | // if ( type == KOAgenda::RESIZEBOTTOM ) | 909 | // if ( type == KOAgenda::RESIZEBOTTOM ) |
910 | // qDebug("RESIZEBOTTOM "); | 910 | // qDebug("RESIZEBOTTOM "); |
911 | // if ( type == KOAgenda::MOVE ) | 911 | // if ( type == KOAgenda::MOVE ) |
912 | // qDebug("MOVE "); | 912 | // qDebug("MOVE "); |
913 | if ( item->incidence()->type() == "Event" ) { | 913 | if ( item->incidence()->type() == "Event" ) { |
914 | startDt =item->incidence()->dtStart(); | 914 | startDt =item->incidence()->dtStart(); |
915 | endDt = item->incidence()->dtEnd(); | 915 | endDt = item->incidence()->dtEnd(); |
916 | lenInSecs = startDt.secsTo( endDt ); | 916 | lenInSecs = startDt.secsTo( endDt ); |
917 | } | 917 | } |
918 | 918 | ||
919 | // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); | 919 | // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); |
920 | 920 | ||
921 | if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { | 921 | if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { |
922 | startDate = mSelectedDates[item->mLastMoveXPos]; | 922 | startDate = mSelectedDates[item->mLastMoveXPos]; |
923 | } else { | 923 | } else { |
924 | if (item->cellX() < 0) { | 924 | if (item->cellX() < 0) { |
925 | startDate = (mSelectedDates.first()).addDays(item->cellX()); | 925 | startDate = (mSelectedDates.first()).addDays(item->cellX()); |
926 | } else { | 926 | } else { |
927 | startDate = mSelectedDates[item->cellX()]; | 927 | startDate = mSelectedDates[item->cellX()]; |
928 | } | 928 | } |
929 | } | 929 | } |
930 | startDt.setDate(startDate); | 930 | startDt.setDate(startDate); |
931 | 931 | ||
932 | if (item->incidence()->doesFloat()) { | 932 | if (item->incidence()->doesFloat()) { |
933 | endDt.setDate(startDate.addDays(item->cellWidth() - 1)); | 933 | endDt.setDate(startDate.addDays(item->cellWidth() - 1)); |
934 | } else { | 934 | } else { |
935 | if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) | 935 | if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) |
936 | startDt.setTime(mAgenda->gyToTime(item->cellYTop())); | 936 | startDt.setTime(mAgenda->gyToTime(item->cellYTop())); |
937 | if ( item->incidence()->type() == "Event" ) { | 937 | if ( item->incidence()->type() == "Event" ) { |
938 | if ( type == KOAgenda::MOVE ) { | 938 | if ( type == KOAgenda::MOVE ) { |
939 | endDt = startDt.addSecs(lenInSecs); | 939 | endDt = startDt.addSecs(lenInSecs); |
940 | 940 | ||
941 | } else if ( type == KOAgenda::RESIZEBOTTOM ) { | 941 | } else if ( type == KOAgenda::RESIZEBOTTOM ) { |
942 | if (item->lastMultiItem()) { | 942 | if (item->lastMultiItem()) { |
943 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 943 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
944 | endDt.setDate(startDate. | 944 | endDt.setDate(startDate. |
945 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 945 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
946 | } else { | 946 | } else { |
947 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 947 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
948 | endDt.setDate(startDate); | 948 | endDt.setDate(startDate); |
949 | } | 949 | } |
950 | } | 950 | } |
951 | } else { | 951 | } else { |
952 | // todo | 952 | // todo |
953 | if (item->lastMultiItem()) { | 953 | if (item->lastMultiItem()) { |
954 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 954 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
955 | endDt.setDate(startDate. | 955 | endDt.setDate(startDate. |
956 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 956 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
957 | } else { | 957 | } else { |
958 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); | 958 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); |
959 | if ( item->cellYBottom() > 0 ) | 959 | if ( item->cellYBottom() > 0 ) |
960 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 960 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
961 | else | 961 | else |
962 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); | 962 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); |
963 | endDt.setDate(startDate); | 963 | endDt.setDate(startDate); |
964 | } | 964 | } |
965 | } | 965 | } |
966 | } | 966 | } |
967 | 967 | ||
968 | 968 | ||
969 | if ( item->incidence()->type() == "Event" ) { | 969 | if ( item->incidence()->type() == "Event" ) { |
970 | item->incidence()->setDtStart(startDt); | 970 | item->incidence()->setDtStart(startDt); |
971 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); | 971 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); |
972 | } else if ( item->incidence()->type() == "Todo" ) { | 972 | } else if ( item->incidence()->type() == "Todo" ) { |
973 | (static_cast<Todo*>(item->incidence()))->setDtDue(endDt); | 973 | (static_cast<Todo*>(item->incidence()))->setDtDue(endDt); |
974 | } | 974 | } |
975 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); | 975 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); |
976 | item->incidence()->setRevision(item->incidence()->revision()+1); | 976 | item->incidence()->setRevision(item->incidence()->revision()+1); |
977 | item->setItemDate(startDt.date()); | 977 | item->setItemDate(startDt.date()); |
978 | //item->updateItem(); | 978 | //item->updateItem(); |
979 | if ( item->incidence()->type() == "Todo" ) { | 979 | if ( item->incidence()->type() == "Todo" ) { |
980 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); | 980 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); |
981 | 981 | ||
982 | } | 982 | } |
983 | else | 983 | else |
984 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); | 984 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); |
985 | item->updateItem(); | 985 | item->updateItem(); |
986 | } | 986 | } |
987 | 987 | ||
988 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) | 988 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) |
989 | { | 989 | { |
990 | // kdDebug() << "KOAgendaView::selectDates" << endl; | 990 | // kdDebug() << "KOAgendaView::selectDates" << endl; |
991 | 991 | ||
992 | mSelectedDates.clear(); | 992 | mSelectedDates.clear(); |
993 | // qDebug("KOAgendaView::showDates "); | 993 | // qDebug("KOAgendaView::showDates "); |
994 | QDate d = start; | 994 | QDate d = start; |
995 | while (d <= end) { | 995 | while (d <= end) { |
996 | mSelectedDates.append(d); | 996 | mSelectedDates.append(d); |
997 | d = d.addDays( 1 ); | 997 | d = d.addDays( 1 ); |
998 | } | 998 | } |
999 | 999 | ||
1000 | // and update the view | 1000 | // and update the view |
1001 | fillAgenda(); | 1001 | fillAgenda(); |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | 1004 | ||
1005 | void KOAgendaView::showEvents(QPtrList<Event>) | 1005 | void KOAgendaView::showEvents(QPtrList<Event>) |
1006 | { | 1006 | { |
1007 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; | 1007 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | void KOAgendaView::changeEventDisplay(Event *, int) | 1010 | void KOAgendaView::changeEventDisplay(Event *, int) |
1011 | { | 1011 | { |
1012 | // qDebug("KOAgendaView::changeEventDisplay "); | 1012 | // qDebug("KOAgendaView::changeEventDisplay "); |
1013 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; | 1013 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; |
1014 | // this should be re-written to be MUCH smarter. Right now we | 1014 | // this should be re-written to be MUCH smarter. Right now we |
1015 | // are just playing dumb. | 1015 | // are just playing dumb. |
1016 | fillAgenda(); | 1016 | fillAgenda(); |
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | void KOAgendaView::fillAgenda(const QDate &) | 1019 | void KOAgendaView::fillAgenda(const QDate &) |
1020 | { | 1020 | { |
1021 | // qDebug("KOAgendaView::fillAgenda "); | 1021 | // qDebug("KOAgendaView::fillAgenda "); |
1022 | fillAgenda(); | 1022 | fillAgenda(); |
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | void KOAgendaView::fillAgenda() | 1025 | void KOAgendaView::fillAgenda() |
1026 | { | 1026 | { |
1027 | if ( globalFlagBlockStartup ) | 1027 | if ( globalFlagBlockStartup ) |
1028 | return; | 1028 | return; |
1029 | if ( globalFlagBlockAgenda == 1 ) | 1029 | if ( globalFlagBlockAgenda == 1 ) |
1030 | return; | 1030 | return; |
1031 | //if ( globalFlagBlockAgenda == 2 ) | 1031 | //if ( globalFlagBlockAgenda == 2 ) |
1032 | //globalFlagBlockAgenda = 0; | 1032 | //globalFlagBlockAgenda = 0; |
1033 | // globalFlagBlockPainting = false; | 1033 | // globalFlagBlockPainting = false; |
1034 | if ( globalFlagBlockAgenda == 0 ) | 1034 | if ( globalFlagBlockAgenda == 0 ) |
1035 | globalFlagBlockAgenda = 1; | 1035 | globalFlagBlockAgenda = 1; |
1036 | // clearView(); | 1036 | // clearView(); |
1037 | //qDebug("fillAgenda()++++ "); | 1037 | //qDebug("fillAgenda()++++ "); |
1038 | globalFlagBlockAgendaItemPaint = 1; | 1038 | globalFlagBlockAgendaItemPaint = 1; |
1039 | mAllDayAgenda->changeColumns(mSelectedDates.count()); | 1039 | mAllDayAgenda->changeColumns(mSelectedDates.count()); |
1040 | mAgenda->changeColumns(mSelectedDates.count()); | 1040 | mAgenda->changeColumns(mSelectedDates.count()); |
1041 | qApp->processEvents(); | 1041 | qApp->processEvents(); |
1042 | mEventIndicatorTop->changeColumns(mSelectedDates.count()); | 1042 | mEventIndicatorTop->changeColumns(mSelectedDates.count()); |
1043 | mEventIndicatorBottom->changeColumns(mSelectedDates.count()); | 1043 | mEventIndicatorBottom->changeColumns(mSelectedDates.count()); |
1044 | setHolidayMasks(); | 1044 | setHolidayMasks(); |
1045 | 1045 | ||
1046 | //mAgenda->hideUnused(); | 1046 | //mAgenda->hideUnused(); |
1047 | //mAllDayAgenda->hideUnused(); | 1047 | //mAllDayAgenda->hideUnused(); |
1048 | 1048 | ||
1049 | // mAgenda->blockNextRepaint( false ); | 1049 | // mAgenda->blockNextRepaint( false ); |
1050 | // mAgenda->viewport()->repaint(); | 1050 | // mAgenda->viewport()->repaint(); |
1051 | // mAgenda->blockNextRepaint( true ); | 1051 | // mAgenda->blockNextRepaint( true ); |
1052 | mMinY.resize(mSelectedDates.count()); | 1052 | mMinY.resize(mSelectedDates.count()); |
1053 | mMaxY.resize(mSelectedDates.count()); | 1053 | mMaxY.resize(mSelectedDates.count()); |
1054 | 1054 | ||
1055 | QPtrList<Event> dayEvents; | 1055 | QPtrList<Event> dayEvents; |
1056 | 1056 | ||
1057 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. | 1057 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. |
1058 | // Therefore, get all of them. | 1058 | // Therefore, get all of them. |
1059 | QPtrList<Todo> todos = calendar()->todos(); | 1059 | QPtrList<Todo> todos = calendar()->todos(); |
1060 | 1060 | ||
1061 | mAgenda->setDateList(mSelectedDates); | 1061 | mAgenda->setDateList(mSelectedDates); |
1062 | 1062 | ||
1063 | QDate today = QDate::currentDate(); | 1063 | QDate today = QDate::currentDate(); |
1064 | 1064 | ||
1065 | DateList::ConstIterator dit; | 1065 | DateList::ConstIterator dit; |
1066 | int curCol = 0; | 1066 | int curCol = 0; |
1067 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { | 1067 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { |
1068 | QDate currentDate = *dit; | 1068 | QDate currentDate = *dit; |
1069 | // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() | 1069 | // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() |
1070 | // << endl; | 1070 | // << endl; |
1071 | 1071 | ||
1072 | dayEvents = calendar()->events(currentDate,true); | 1072 | dayEvents = calendar()->events(currentDate,true); |
1073 | 1073 | ||
1074 | // Default values, which can never be reached | 1074 | // Default values, which can never be reached |
1075 | mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; | 1075 | mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; |
1076 | mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; | 1076 | mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; |
1077 | 1077 | ||
1078 | unsigned int numEvent; | 1078 | unsigned int numEvent; |
1079 | for(numEvent=0;numEvent<dayEvents.count();++numEvent) { | 1079 | for(numEvent=0;numEvent<dayEvents.count();++numEvent) { |
1080 | Event *event = dayEvents.at(numEvent); | 1080 | Event *event = dayEvents.at(numEvent); |
1081 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) | 1081 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) |
1082 | if ( event->uid().left(15) == QString("last-syncEvent-") ) | 1082 | if ( event->uid().left(15) == QString("last-syncEvent-") ) |
1083 | continue; | 1083 | continue; |
1084 | // kdDebug() << " Event: " << event->summary() << endl; | 1084 | // kdDebug() << " Event: " << event->summary() << endl; |
1085 | 1085 | ||
1086 | int beginX = currentDate.daysTo(event->dtStart().date()) + curCol; | 1086 | int beginX = currentDate.daysTo(event->dtStart().date()) + curCol; |
1087 | int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; | 1087 | int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; |
1088 | 1088 | ||
1089 | // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; | 1089 | // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; |
1090 | 1090 | ||
1091 | if (event->doesFloat()) { | 1091 | if (event->doesFloat()) { |
1092 | if (event->recurrence()->doesRecur()) { | 1092 | if (event->recurrence()->doesRecur()) { |
1093 | mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); | 1093 | mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); |
1094 | } else { | 1094 | } else { |
1095 | if (beginX <= 0 && curCol == 0) { | 1095 | if (beginX <= 0 && curCol == 0) { |
1096 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1096 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1097 | } else if (beginX == curCol) { | 1097 | } else if (beginX == curCol) { |
1098 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1098 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1099 | } | 1099 | } |
1100 | } | 1100 | } |
1101 | } else if (event->isMultiDay()) { | 1101 | } else if (event->isMultiDay()) { |
1102 | if ( event->doesRecur () ) { | 1102 | if ( event->doesRecur () ) { |
1103 | QDate dateit = currentDate; | 1103 | QDate dateit = currentDate; |
1104 | int count = 0; | 1104 | int count = 0; |
1105 | int max = event->dtStart().daysTo( event->dtEnd() ) +2; | 1105 | int max = event->dtStart().daysTo( event->dtEnd() ) +2; |
1106 | while (! event->recursOn( dateit ) && count <= max ) { | 1106 | while (! event->recursOn( dateit ) && count <= max ) { |
1107 | ++count; | 1107 | ++count; |
1108 | dateit = dateit.addDays( -1 ); | 1108 | dateit = dateit.addDays( -1 ); |
1109 | } | 1109 | } |
1110 | bool ok; | 1110 | bool ok; |
1111 | QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok ); | 1111 | QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok ); |
1112 | if ( ok ) | 1112 | if ( ok ) |
1113 | { | 1113 | { |
1114 | int secs = event->dtStart().secsTo( event->dtEnd() ); | 1114 | int secs = event->dtStart().secsTo( event->dtEnd() ); |
1115 | QDateTime nextOcend =nextOcstart.addSecs( secs ); ; | 1115 | QDateTime nextOcend =nextOcstart.addSecs( secs ); ; |
1116 | beginX = currentDate.daysTo(nextOcstart.date()) + curCol; | 1116 | beginX = currentDate.daysTo(nextOcstart.date()) + curCol; |
1117 | endX = currentDate.daysTo(nextOcend.date()) + curCol; | 1117 | endX = currentDate.daysTo(nextOcend.date()) + curCol; |
1118 | 1118 | ||
1119 | } | 1119 | } |
1120 | } | 1120 | } |
1121 | int startY = mAgenda->timeToY(event->dtStart().time()); | 1121 | int startY = mAgenda->timeToY(event->dtStart().time()); |
1122 | int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; | 1122 | int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; |
1123 | //qDebug("insert %d %d %d %d %d ",beginX,endX,startY,endY , curCol ); | 1123 | //qDebug("insert %d %d %d %d %d ",beginX,endX,startY,endY , curCol ); |
1124 | if ((beginX <= 0 && curCol == 0) || beginX == curCol) { | 1124 | if ((beginX <= 0 && curCol == 0) || beginX == curCol) { |
1125 | //qDebug("insert!!! "); | 1125 | //qDebug("insert!!! "); |
1126 | mAgenda->insertMultiItem(event,currentDate,beginX,endX,startY,endY); | 1126 | mAgenda->insertMultiItem(event,currentDate,beginX,endX,startY,endY); |
1127 | } | 1127 | } |
1128 | if (beginX == curCol) { | 1128 | if (beginX == curCol) { |
1129 | mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); | 1129 | mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); |
1130 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; | 1130 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; |
1131 | } else if (endX == curCol) { | 1131 | } else if (endX == curCol) { |
1132 | mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); | 1132 | mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); |
1133 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; | 1133 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; |
1134 | } else { | 1134 | } else { |
1135 | mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); | 1135 | mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); |
1136 | mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); | 1136 | mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); |
1137 | } | 1137 | } |
1138 | } else { | 1138 | } else { |
1139 | int startY = mAgenda->timeToY(event->dtStart().time()); | 1139 | int startY = mAgenda->timeToY(event->dtStart().time()); |
1140 | int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; | 1140 | int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; |
1141 | if (endY < startY) endY = startY; | 1141 | if (endY < startY) endY = startY; |
1142 | mAgenda->insertItem(event,currentDate,curCol,startY,endY); | 1142 | mAgenda->insertItem(event,currentDate,curCol,startY,endY); |
1143 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; | 1143 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; |
1144 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; | 1144 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; |
1145 | } | 1145 | } |
1146 | } | 1146 | } |
1147 | // ---------- [display Todos -------------- | 1147 | // ---------- [display Todos -------------- |
1148 | unsigned int numTodo; | 1148 | unsigned int numTodo; |
1149 | for (numTodo = 0; numTodo < todos.count(); ++numTodo) { | 1149 | for (numTodo = 0; numTodo < todos.count(); ++numTodo) { |
1150 | Todo *todo = todos.at(numTodo); | 1150 | Todo *todo = todos.at(numTodo); |
1151 | 1151 | ||
1152 | if ( ! todo->hasDueDate() ) continue; // todo shall not be displayed if it has no date | 1152 | if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date |
1153 | 1153 | ||
1154 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. | 1154 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. |
1155 | // Already completed items can be displayed on their original due date | 1155 | // Already completed items can be displayed on their original due date |
1156 | //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda | 1156 | //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda |
1157 | bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; | 1157 | bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; |
1158 | 1158 | ||
1159 | if ( ((todo->dtDue().date() == currentDate) && !overdue) || | 1159 | if ( ((todo->dtDue().date() == currentDate) && !overdue) || ( todo->hasCompletedDate() && todo->completed().date() == currentDate )|| |
1160 | ((currentDate == today) && overdue) ) { | 1160 | ((currentDate == today) && overdue) ) { |
1161 | if ( todo->doesFloat() || overdue ) { // Todo has no due-time set or is already overdue | 1161 | if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue |
1162 | if ( KOPrefs::instance()->mShowTodoInAgenda ) | 1162 | if ( KOPrefs::instance()->mShowTodoInAgenda ) |
1163 | mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); | 1163 | mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); |
1164 | } | 1164 | } |
1165 | else { | 1165 | else { |
1166 | 1166 | QDateTime dt; | |
1167 | int endY = mAgenda->timeToY(todo->dtDue().time()) - 1; | 1167 | if ( todo->hasCompletedDate() ) |
1168 | dt = todo->completed(); | ||
1169 | else | ||
1170 | dt = todo->dtDue();; | ||
1171 | |||
1172 | |||
1173 | int endY = mAgenda->timeToY(dt.time()) - 1; | ||
1168 | int hi = (18/KOPrefs::instance()->mHourSize); | 1174 | int hi = (18/KOPrefs::instance()->mHourSize); |
1169 | //qDebug("hei %d ",KOPrefs::instance()->mHourSize); | 1175 | //qDebug("hei %d ",KOPrefs::instance()->mHourSize); |
1170 | int startY = endY -hi; | 1176 | int startY = endY -hi; |
1171 | 1177 | ||
1172 | mAgenda->insertItem(todo,currentDate,curCol,startY,endY); | 1178 | mAgenda->insertItem(todo,currentDate,curCol,startY,endY); |
1173 | 1179 | ||
1174 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; | 1180 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; |
1175 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; | 1181 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; |
1176 | } | 1182 | } |
1177 | } | 1183 | } |
1178 | } | 1184 | } |
1179 | // ---------- display Todos] -------------- | 1185 | // ---------- display Todos] -------------- |
1180 | 1186 | ||
1181 | ++curCol; | 1187 | ++curCol; |
1182 | } | 1188 | } |
1183 | mAgenda->hideUnused(); | 1189 | mAgenda->hideUnused(); |
1184 | mAllDayAgenda->hideUnused(); | 1190 | mAllDayAgenda->hideUnused(); |
1185 | mAgenda->checkScrollBoundaries(); | 1191 | mAgenda->checkScrollBoundaries(); |
1186 | 1192 | ||
1187 | deleteSelectedDateTime(); | 1193 | deleteSelectedDateTime(); |
1188 | 1194 | ||
1189 | createDayLabels(); | 1195 | createDayLabels(); |
1190 | emit incidenceSelected( 0 ); | 1196 | emit incidenceSelected( 0 ); |
1191 | 1197 | ||
1192 | if ( globalFlagBlockAgenda == 2 ) { | 1198 | if ( globalFlagBlockAgenda == 2 ) { |
1193 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) | 1199 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) |
1194 | setStartHour( KOPrefs::instance()->mDayBegins ); | 1200 | setStartHour( KOPrefs::instance()->mDayBegins ); |
1195 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 1201 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
1196 | setStartHour( QTime::currentTime ().hour() ); | 1202 | setStartHour( QTime::currentTime ().hour() ); |
1197 | // qApp->processEvents(); | 1203 | // qApp->processEvents(); |
1198 | } | 1204 | } |
1199 | qApp->processEvents(); | 1205 | qApp->processEvents(); |
1200 | //qDebug("qApp->processEvents(); END "); | 1206 | //qDebug("qApp->processEvents(); END "); |
1201 | globalFlagBlockAgenda = 0; | 1207 | globalFlagBlockAgenda = 0; |
1202 | 1208 | ||
1203 | // mAgenda->hideUnused(); | 1209 | // mAgenda->hideUnused(); |
1204 | //mAllDayAgenda->hideUnused(); | 1210 | //mAllDayAgenda->hideUnused(); |
1205 | mAllDayAgenda->drawContentsToPainter(); | 1211 | mAllDayAgenda->drawContentsToPainter(); |
1206 | mAgenda->drawContentsToPainter(); | 1212 | mAgenda->drawContentsToPainter(); |
1207 | repaintAgenda(); | 1213 | repaintAgenda(); |
1208 | // mAgenda->finishUpdate(); | 1214 | // mAgenda->finishUpdate(); |
1209 | //mAllDayAgenda->finishUpdate(); | 1215 | //mAllDayAgenda->finishUpdate(); |
1210 | 1216 | ||
1211 | // repaintAgenda(); | 1217 | // repaintAgenda(); |
1212 | //qApp->processEvents(); | 1218 | //qApp->processEvents(); |
1213 | // globalFlagBlockAgenda = 0; | 1219 | // globalFlagBlockAgenda = 0; |
1214 | } | 1220 | } |
1215 | void KOAgendaView::repaintAgenda() | 1221 | void KOAgendaView::repaintAgenda() |
1216 | { | 1222 | { |
1217 | // mAllDayAgenda->drawContentsToPainter(); | 1223 | // mAllDayAgenda->drawContentsToPainter(); |
1218 | // mAllDayAgenda->viewport()->repaint( false ); | 1224 | // mAllDayAgenda->viewport()->repaint( false ); |
1219 | // mAgenda->drawContentsToPainter(); | 1225 | // mAgenda->drawContentsToPainter(); |
1220 | // mAgenda->viewport()->repaint( false ); | 1226 | // mAgenda->viewport()->repaint( false ); |
1221 | // qApp->processEvents(); | 1227 | // qApp->processEvents(); |
1222 | 1228 | ||
1223 | //qDebug("KOAgendaView::repaintAgenda() "); | 1229 | //qDebug("KOAgendaView::repaintAgenda() "); |
1224 | //qApp->processEvents(); | 1230 | //qApp->processEvents(); |
1225 | mAgenda->viewport()->repaint( false ); | 1231 | mAgenda->viewport()->repaint( false ); |
1226 | mAllDayAgenda->viewport()->repaint( false ); | 1232 | mAllDayAgenda->viewport()->repaint( false ); |
1227 | mAgenda->finishUpdate(); | 1233 | mAgenda->finishUpdate(); |
1228 | mAllDayAgenda->finishUpdate(); | 1234 | mAllDayAgenda->finishUpdate(); |
1229 | } | 1235 | } |
1230 | 1236 | ||
1231 | 1237 | ||
1232 | void KOAgendaView::clearView() | 1238 | void KOAgendaView::clearView() |
1233 | { | 1239 | { |
1234 | // kdDebug() << "ClearView" << endl; | 1240 | // kdDebug() << "ClearView" << endl; |
1235 | mAllDayAgenda->clear(); | 1241 | mAllDayAgenda->clear(); |
1236 | mAgenda->clear(); | 1242 | mAgenda->clear(); |
1237 | } | 1243 | } |
1238 | 1244 | ||
1239 | void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 1245 | void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
1240 | const QDate &td) | 1246 | const QDate &td) |
1241 | { | 1247 | { |
1242 | #ifndef KORG_NOPRINTER | 1248 | #ifndef KORG_NOPRINTER |
1243 | if (fd == td) | 1249 | if (fd == td) |
1244 | calPrinter->preview(CalPrinter::Day, fd, td); | 1250 | calPrinter->preview(CalPrinter::Day, fd, td); |
1245 | else | 1251 | else |
1246 | calPrinter->preview(CalPrinter::Week, fd, td); | 1252 | calPrinter->preview(CalPrinter::Week, fd, td); |
1247 | #endif | 1253 | #endif |
1248 | } | 1254 | } |
1249 | 1255 | ||
1250 | // void KOAgendaView::updateMovedTodo() | 1256 | // void KOAgendaView::updateMovedTodo() |
1251 | // { | 1257 | // { |
1252 | // // updateConfig(); | 1258 | // // updateConfig(); |
1253 | // // emit updateTodoViews(); | 1259 | // // emit updateTodoViews(); |
1254 | // } | 1260 | // } |
1255 | 1261 | ||
1256 | void KOAgendaView::newEvent(int gx, int gy) | 1262 | void KOAgendaView::newEvent(int gx, int gy) |
1257 | { | 1263 | { |
1258 | if (!mSelectedDates.count()) return; | 1264 | if (!mSelectedDates.count()) return; |
1259 | 1265 | ||
1260 | QDate day = mSelectedDates[gx]; | 1266 | QDate day = mSelectedDates[gx]; |
1261 | 1267 | ||
1262 | QTime time = mAgenda->gyToTime(gy); | 1268 | QTime time = mAgenda->gyToTime(gy); |
1263 | QDateTime dt(day,time); | 1269 | QDateTime dt(day,time); |
1264 | // if ( dt < QDateTime::currentDateTime () ) | 1270 | // if ( dt < QDateTime::currentDateTime () ) |
1265 | // dt = QDateTime::currentDateTime ().addSecs( 3600 ); | 1271 | // dt = QDateTime::currentDateTime ().addSecs( 3600 ); |
1266 | emit newEventSignal(dt); | 1272 | emit newEventSignal(dt); |
1267 | } | 1273 | } |
1268 | 1274 | ||
1269 | void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd) | 1275 | void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd) |
1270 | { | 1276 | { |
1271 | if (!mSelectedDates.count()) return; | 1277 | if (!mSelectedDates.count()) return; |
1272 | 1278 | ||
1273 | QDate dayStart = mSelectedDates[gxStart]; | 1279 | QDate dayStart = mSelectedDates[gxStart]; |
1274 | QDate dayEnd = mSelectedDates[gxEnd]; | 1280 | QDate dayEnd = mSelectedDates[gxEnd]; |
1275 | 1281 | ||
1276 | QTime timeStart = mAgenda->gyToTime(gyStart); | 1282 | QTime timeStart = mAgenda->gyToTime(gyStart); |
1277 | QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); | 1283 | QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); |
1278 | 1284 | ||
1279 | QDateTime dtStart(dayStart,timeStart); | 1285 | QDateTime dtStart(dayStart,timeStart); |
1280 | QDateTime dtEnd(dayEnd,timeEnd); | 1286 | QDateTime dtEnd(dayEnd,timeEnd); |
1281 | 1287 | ||
1282 | emit newEventSignal(dtStart,dtEnd); | 1288 | emit newEventSignal(dtStart,dtEnd); |
1283 | } | 1289 | } |
1284 | 1290 | ||
1285 | void KOAgendaView::newEventAllDay(int gx, int ) | 1291 | void KOAgendaView::newEventAllDay(int gx, int ) |
1286 | { | 1292 | { |
1287 | if (!mSelectedDates.count()) return; | 1293 | if (!mSelectedDates.count()) return; |
1288 | 1294 | ||
1289 | QDate day = mSelectedDates[gx]; | 1295 | QDate day = mSelectedDates[gx]; |
1290 | 1296 | ||
1291 | emit newEventSignal(day); | 1297 | emit newEventSignal(day); |
1292 | } | 1298 | } |
1293 | void KOAgendaView::newTodoAllDay(int gx, int ) | 1299 | void KOAgendaView::newTodoAllDay(int gx, int ) |
1294 | { | 1300 | { |
1295 | if (!mSelectedDates.count()) return; | 1301 | if (!mSelectedDates.count()) return; |
1296 | 1302 | ||
1297 | QDateTime day (mSelectedDates[gx] ); | 1303 | QDateTime day (mSelectedDates[gx] ); |
1298 | emit newTodoSignal(day, true); | 1304 | emit newTodoSignal(day, true); |
1299 | } | 1305 | } |
1300 | void KOAgendaView::newTodo(int gx, int gy ) | 1306 | void KOAgendaView::newTodo(int gx, int gy ) |
1301 | { | 1307 | { |
1302 | if (!mSelectedDates.count()) return; | 1308 | if (!mSelectedDates.count()) return; |
1303 | QDate dayStart = mSelectedDates[gx]; | 1309 | QDate dayStart = mSelectedDates[gx]; |
1304 | QTime timeStart = mAgenda->gyToTime(gy); | 1310 | QTime timeStart = mAgenda->gyToTime(gy); |
1305 | QDateTime dt (dayStart,timeStart); | 1311 | QDateTime dt (dayStart,timeStart); |
1306 | emit newTodoSignal( dt, false ); | 1312 | emit newTodoSignal( dt, false ); |
1307 | } | 1313 | } |
1308 | 1314 | ||
1309 | void KOAgendaView::updateEventIndicatorTop(int newY) | 1315 | void KOAgendaView::updateEventIndicatorTop(int newY) |
1310 | { | 1316 | { |
1311 | uint i; | 1317 | uint i; |
1312 | for(i=0;i<mMinY.size();++i) { | 1318 | for(i=0;i<mMinY.size();++i) { |
1313 | if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true); | 1319 | if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true); |
1314 | else mEventIndicatorTop->enableColumn(i,false); | 1320 | else mEventIndicatorTop->enableColumn(i,false); |
1315 | } | 1321 | } |
1316 | 1322 | ||
1317 | mEventIndicatorTop->update(); | 1323 | mEventIndicatorTop->update(); |
1318 | } | 1324 | } |
1319 | 1325 | ||
1320 | void KOAgendaView::updateEventIndicatorBottom(int newY) | 1326 | void KOAgendaView::updateEventIndicatorBottom(int newY) |
1321 | { | 1327 | { |
1322 | uint i; | 1328 | uint i; |
1323 | for(i=0;i<mMaxY.size();++i) { | 1329 | for(i=0;i<mMaxY.size();++i) { |
1324 | if (newY <= mMaxY.at(i)) mEventIndicatorBottom->enableColumn(i,true); | 1330 | if (newY <= mMaxY.at(i)) mEventIndicatorBottom->enableColumn(i,true); |
1325 | else mEventIndicatorBottom->enableColumn(i,false); | 1331 | else mEventIndicatorBottom->enableColumn(i,false); |
1326 | } | 1332 | } |
1327 | 1333 | ||
1328 | mEventIndicatorBottom->update(); | 1334 | mEventIndicatorBottom->update(); |
1329 | } | 1335 | } |
1330 | 1336 | ||
1331 | void KOAgendaView::startDrag(Event *event) | 1337 | void KOAgendaView::startDrag(Event *event) |
1332 | { | 1338 | { |
1333 | #ifndef KORG_NODND | 1339 | #ifndef KORG_NODND |
1334 | DndFactory factory( calendar() ); | 1340 | DndFactory factory( calendar() ); |
1335 | ICalDrag *vd = factory.createDrag(event,this); | 1341 | ICalDrag *vd = factory.createDrag(event,this); |
1336 | if (vd->drag()) { | 1342 | if (vd->drag()) { |
1337 | kdDebug() << "KOAgendaView::startDrag(): Delete drag source" << endl; | 1343 | kdDebug() << "KOAgendaView::startDrag(): Delete drag source" << endl; |
1338 | } | 1344 | } |
1339 | #endif | 1345 | #endif |
1340 | } | 1346 | } |
1341 | 1347 | ||
1342 | void KOAgendaView::readSettings() | 1348 | void KOAgendaView::readSettings() |
1343 | { | 1349 | { |
1344 | readSettings(KOGlobals::config()); | 1350 | readSettings(KOGlobals::config()); |
1345 | } | 1351 | } |
1346 | 1352 | ||
1347 | void KOAgendaView::readSettings(KConfig *config) | 1353 | void KOAgendaView::readSettings(KConfig *config) |
1348 | { | 1354 | { |
1349 | // kdDebug() << "KOAgendaView::readSettings()" << endl; | 1355 | // kdDebug() << "KOAgendaView::readSettings()" << endl; |
1350 | 1356 | ||
1351 | config->setGroup("Views"); | 1357 | config->setGroup("Views"); |
1352 | 1358 | ||
1353 | //#ifndef KORG_NOSPLITTER | 1359 | //#ifndef KORG_NOSPLITTER |
1354 | QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); | 1360 | QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); |
1355 | if (sizes.count() == 2) { | 1361 | if (sizes.count() == 2) { |
1356 | if ( sizes[0] < 20 ) { | 1362 | if ( sizes[0] < 20 ) { |
1357 | sizes[1] = sizes[1] +20 - sizes[0]; | 1363 | sizes[1] = sizes[1] +20 - sizes[0]; |
1358 | sizes[0] = 20; | 1364 | sizes[0] = 20; |
1359 | } | 1365 | } |
1360 | mSplitterAgenda->setSizes(sizes); | 1366 | mSplitterAgenda->setSizes(sizes); |
1361 | // qDebug("read %d %d ",sizes[0],sizes[1] ); | 1367 | // qDebug("read %d %d ",sizes[0],sizes[1] ); |
1362 | } | 1368 | } |
1363 | //#endif | 1369 | //#endif |
1364 | 1370 | ||
1365 | // updateConfig(); | 1371 | // updateConfig(); |
1366 | } | 1372 | } |
1367 | 1373 | ||
1368 | void KOAgendaView::writeSettings(KConfig *config) | 1374 | void KOAgendaView::writeSettings(KConfig *config) |
1369 | { | 1375 | { |
1370 | // kdDebug() << "KOAgendaView::writeSettings()" << endl; | 1376 | // kdDebug() << "KOAgendaView::writeSettings()" << endl; |
1371 | 1377 | ||
1372 | config->setGroup("Views"); | 1378 | config->setGroup("Views"); |
1373 | 1379 | ||
1374 | //#ifndef KORG_NOSPLITTER | 1380 | //#ifndef KORG_NOSPLITTER |
1375 | QValueList<int> list = mSplitterAgenda->sizes(); | 1381 | QValueList<int> list = mSplitterAgenda->sizes(); |
1376 | config->writeEntry("Separator AgendaView",list); | 1382 | config->writeEntry("Separator AgendaView",list); |
1377 | //qDebug("write %d %d ", list[0],list[1] ); | 1383 | //qDebug("write %d %d ", list[0],list[1] ); |
1378 | //#endif | 1384 | //#endif |
1379 | } | 1385 | } |
1380 | 1386 | ||
1381 | void KOAgendaView::setHolidayMasks() | 1387 | void KOAgendaView::setHolidayMasks() |
1382 | { | 1388 | { |
1383 | mHolidayMask.resize(mSelectedDates.count()); | 1389 | mHolidayMask.resize(mSelectedDates.count()); |
1384 | 1390 | ||
1385 | uint i; | 1391 | uint i; |
1386 | for(i=0;i<mSelectedDates.count();++i) { | 1392 | for(i=0;i<mSelectedDates.count();++i) { |
1387 | QDate date = mSelectedDates[i]; | 1393 | QDate date = mSelectedDates[i]; |
1388 | bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); | 1394 | bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); |
1389 | bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); | 1395 | bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); |
1390 | bool showHoliday = false; | 1396 | bool showHoliday = false; |
1391 | if ( KOPrefs::instance()->mExcludeHolidays ) { | 1397 | if ( KOPrefs::instance()->mExcludeHolidays ) { |
1392 | QPtrList<Event> events = calendar()->events( date, true ); | 1398 | QPtrList<Event> events = calendar()->events( date, true ); |
1393 | Event *event; | 1399 | Event *event; |
1394 | for( event = events.first(); event; event = events.next() ) { | 1400 | for( event = events.first(); event; event = events.next() ) { |
1395 | if ( event->categories().contains("Holiday") || | 1401 | if ( event->categories().contains("Holiday") || |
1396 | event->categories().contains(i18n("Holiday"))) { | 1402 | event->categories().contains(i18n("Holiday"))) { |
1397 | showHoliday = true; | 1403 | showHoliday = true; |
1398 | break; | 1404 | break; |
1399 | } | 1405 | } |
1400 | } | 1406 | } |
1401 | 1407 | ||
1402 | } | 1408 | } |
1403 | 1409 | ||
1404 | #ifndef KORG_NOPLUGINS | 1410 | #ifndef KORG_NOPLUGINS |
1405 | bool showHoliday = KOPrefs::instance()->mExcludeHolidays && | 1411 | bool showHoliday = KOPrefs::instance()->mExcludeHolidays && |
1406 | !KOCore::self()->holiday(date).isEmpty(); | 1412 | !KOCore::self()->holiday(date).isEmpty(); |
1407 | #endif | 1413 | #endif |
1408 | bool showDay = showSaturday || showSunday || showHoliday; | 1414 | bool showDay = showSaturday || showSunday || showHoliday; |
1409 | 1415 | ||
1410 | if (showDay) { | 1416 | if (showDay) { |
1411 | mHolidayMask.at(i) = true; | 1417 | mHolidayMask.at(i) = true; |
1412 | } else { | 1418 | } else { |
1413 | mHolidayMask.at(i) = false; | 1419 | mHolidayMask.at(i) = false; |
1414 | } | 1420 | } |
1415 | } | 1421 | } |
1416 | 1422 | ||
1417 | mAgenda->setHolidayMask(&mHolidayMask); | 1423 | mAgenda->setHolidayMask(&mHolidayMask); |
1418 | mAllDayAgenda->setHolidayMask(&mHolidayMask); | 1424 | mAllDayAgenda->setHolidayMask(&mHolidayMask); |
1419 | } | 1425 | } |
1420 | 1426 | ||
1421 | void KOAgendaView::setContentsPos(int y) | 1427 | void KOAgendaView::setContentsPos(int y) |
1422 | { | 1428 | { |
1423 | mAgenda->setContentsPos(0,y); | 1429 | mAgenda->setContentsPos(0,y); |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 2f0fa9e..36a2947 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -126,474 +126,479 @@ void KOEventViewer::setSource(const QString& n) | |||
126 | if ( n.left(6) == "mailto" ) { | 126 | if ( n.left(6) == "mailto" ) { |
127 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); | 127 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); |
128 | #ifndef DESKTOP_VERSION | 128 | #ifndef DESKTOP_VERSION |
129 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); | 129 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); |
130 | e << n.mid(7); | 130 | e << n.mid(7); |
131 | #endif | 131 | #endif |
132 | 132 | ||
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | #ifndef KORG_NODCOP | 136 | #ifndef KORG_NODCOP |
137 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; | 137 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; |
138 | QString tmpStr; | 138 | QString tmpStr; |
139 | if (n.startsWith("mailto:")) { | 139 | if (n.startsWith("mailto:")) { |
140 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); | 140 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); |
141 | //emit showIncidence(n); | 141 | //emit showIncidence(n); |
142 | return; | 142 | return; |
143 | } else if (n.startsWith("uid:")) { | 143 | } else if (n.startsWith("uid:")) { |
144 | DCOPClient *client = KApplication::kApplication()->dcopClient(); | 144 | DCOPClient *client = KApplication::kApplication()->dcopClient(); |
145 | const QByteArray noParamData; | 145 | const QByteArray noParamData; |
146 | const QByteArray paramData; | 146 | const QByteArray paramData; |
147 | QByteArray replyData; | 147 | QByteArray replyData; |
148 | QCString replyTypeStr; | 148 | QCString replyTypeStr; |
149 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) | 149 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) |
150 | bool foundAbbrowser = PING_ABBROWSER; | 150 | bool foundAbbrowser = PING_ABBROWSER; |
151 | 151 | ||
152 | if (foundAbbrowser) { | 152 | if (foundAbbrowser) { |
153 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor | 153 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor |
154 | //client->send("kaddressbook","KAddressBookIface", | 154 | //client->send("kaddressbook","KAddressBookIface", |
155 | QDataStream arg(paramData, IO_WriteOnly); | 155 | QDataStream arg(paramData, IO_WriteOnly); |
156 | arg << n.mid(6); | 156 | arg << n.mid(6); |
157 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); | 157 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); |
158 | return; | 158 | return; |
159 | } else { | 159 | } else { |
160 | /* | 160 | /* |
161 | KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. | 161 | KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. |
162 | We start it without its main interface | 162 | We start it without its main interface |
163 | */ | 163 | */ |
164 | KIconLoader* iconLoader = new KIconLoader(); | 164 | KIconLoader* iconLoader = new KIconLoader(); |
165 | QString iconPath = iconLoader->iconPath("go",KIcon::Small); | 165 | QString iconPath = iconLoader->iconPath("go",KIcon::Small); |
166 | ActionManager::setStartedKAddressBook(true); | 166 | ActionManager::setStartedKAddressBook(true); |
167 | tmpStr = "kaddressbook --editor-only --uid "; | 167 | tmpStr = "kaddressbook --editor-only --uid "; |
168 | tmpStr += KProcess::quote(n.mid(6)); | 168 | tmpStr += KProcess::quote(n.mid(6)); |
169 | KRun::runCommand(tmpStr,"KAddressBook",iconPath); | 169 | KRun::runCommand(tmpStr,"KAddressBook",iconPath); |
170 | return; | 170 | return; |
171 | } | 171 | } |
172 | } else { | 172 | } else { |
173 | //QTextBrowser::setSource(n); | 173 | //QTextBrowser::setSource(n); |
174 | } | 174 | } |
175 | #endif | 175 | #endif |
176 | } | 176 | } |
177 | 177 | ||
178 | void KOEventViewer::addTag(const QString & tag,const QString & text) | 178 | void KOEventViewer::addTag(const QString & tag,const QString & text) |
179 | { | 179 | { |
180 | int number=text.contains("\n"); | 180 | int number=text.contains("\n"); |
181 | QString str = "<" + tag + ">"; | 181 | QString str = "<" + tag + ">"; |
182 | QString tmpText=text; | 182 | QString tmpText=text; |
183 | QString tmpStr=str; | 183 | QString tmpStr=str; |
184 | if(number !=-1) | 184 | if(number !=-1) |
185 | { | 185 | { |
186 | if (number > 0) { | 186 | if (number > 0) { |
187 | int pos=0; | 187 | int pos=0; |
188 | QString tmp; | 188 | QString tmp; |
189 | for(int i=0;i<=number;i++) { | 189 | for(int i=0;i<=number;i++) { |
190 | pos=tmpText.find("\n"); | 190 | pos=tmpText.find("\n"); |
191 | tmp=tmpText.left(pos); | 191 | tmp=tmpText.left(pos); |
192 | tmpText=tmpText.right(tmpText.length()-pos-1); | 192 | tmpText=tmpText.right(tmpText.length()-pos-1); |
193 | tmpStr+=tmp+"<br>"; | 193 | tmpStr+=tmp+"<br>"; |
194 | } | 194 | } |
195 | } | 195 | } |
196 | else tmpStr += tmpText; | 196 | else tmpStr += tmpText; |
197 | tmpStr+="</" + tag + ">"; | 197 | tmpStr+="</" + tag + ">"; |
198 | mText.append(tmpStr); | 198 | mText.append(tmpStr); |
199 | } | 199 | } |
200 | else | 200 | else |
201 | { | 201 | { |
202 | str += text + "</" + tag + ">"; | 202 | str += text + "</" + tag + ">"; |
203 | mText.append(str); | 203 | mText.append(str); |
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | void KOEventViewer::setColorMode( int m ) | 207 | void KOEventViewer::setColorMode( int m ) |
208 | { | 208 | { |
209 | mColorMode = m; | 209 | mColorMode = m; |
210 | } | 210 | } |
211 | void KOEventViewer::appendEvent(Event *event, int mode ) | 211 | void KOEventViewer::appendEvent(Event *event, int mode ) |
212 | { | 212 | { |
213 | mMailSubject = ""; | 213 | mMailSubject = ""; |
214 | mCurrentIncidence = event; | 214 | mCurrentIncidence = event; |
215 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 215 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
216 | topLevelWidget()->setCaption(i18n("Event Viewer")); | 216 | topLevelWidget()->setCaption(i18n("Event Viewer")); |
217 | if ( mode == 0 ) { | 217 | if ( mode == 0 ) { |
218 | addTag("h2",event->summary()); | 218 | addTag("h2",event->summary()); |
219 | } | 219 | } |
220 | else { | 220 | else { |
221 | if ( mColorMode == 1 ) { | 221 | if ( mColorMode == 1 ) { |
222 | mText +="<font color=\"#00A000\">"; | 222 | mText +="<font color=\"#00A000\">"; |
223 | } | 223 | } |
224 | if ( mColorMode == 2 ) { | 224 | if ( mColorMode == 2 ) { |
225 | mText +="<font color=\"#C00000\">"; | 225 | mText +="<font color=\"#C00000\">"; |
226 | } | 226 | } |
227 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 227 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
228 | if ( mode == 1 ) { | 228 | if ( mode == 1 ) { |
229 | addTag("h2",i18n( "Local: " ) +event->summary()); | 229 | addTag("h2",i18n( "Local: " ) +event->summary()); |
230 | } else { | 230 | } else { |
231 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 231 | addTag("h2",i18n( "Remote: " ) +event->summary()); |
232 | } | 232 | } |
233 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 233 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
234 | if ( mColorMode ) | 234 | if ( mColorMode ) |
235 | mText += "</font>"; | 235 | mText += "</font>"; |
236 | } | 236 | } |
237 | mMailSubject += i18n( "Meeting " )+ event->summary(); | 237 | mMailSubject += i18n( "Meeting " )+ event->summary(); |
238 | if (event->cancelled ()) { | 238 | if (event->cancelled ()) { |
239 | mText +="<font color=\"#B00000\">"; | 239 | mText +="<font color=\"#B00000\">"; |
240 | addTag("i",i18n("This event has been cancelled!")); | 240 | addTag("i",i18n("This event has been cancelled!")); |
241 | mText.append("<br>"); | 241 | mText.append("<br>"); |
242 | mText += "</font>"; | 242 | mText += "</font>"; |
243 | mMailSubject += i18n("(cancelled)"); | 243 | mMailSubject += i18n("(cancelled)"); |
244 | } | 244 | } |
245 | if (!event->location().isEmpty()) { | 245 | if (!event->location().isEmpty()) { |
246 | addTag("b",i18n("Location: ")); | 246 | addTag("b",i18n("Location: ")); |
247 | mText.append(event->location()+"<br>"); | 247 | mText.append(event->location()+"<br>"); |
248 | mMailSubject += i18n(" at ") + event->location(); | 248 | mMailSubject += i18n(" at ") + event->location(); |
249 | } | 249 | } |
250 | if (event->doesFloat()) { | 250 | if (event->doesFloat()) { |
251 | if (event->isMultiDay()) { | 251 | if (event->isMultiDay()) { |
252 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") | 252 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") |
253 | .arg(event->dtStartDateStr(shortDate)) | 253 | .arg(event->dtStartDateStr(shortDate)) |
254 | .arg(event->dtEndDateStr(shortDate))); | 254 | .arg(event->dtEndDateStr(shortDate))); |
255 | } else { | 255 | } else { |
256 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); | 256 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); |
257 | } | 257 | } |
258 | } else { | 258 | } else { |
259 | if (event->isMultiDay()) { | 259 | if (event->isMultiDay()) { |
260 | mText.append(i18n("<p><b>From:</b> %1</p> ") | 260 | mText.append(i18n("<p><b>From:</b> %1</p> ") |
261 | .arg(event->dtStartStr( shortDate))); | 261 | .arg(event->dtStartStr( shortDate))); |
262 | mText.append(i18n("<p><b>To:</b> %1</p>") | 262 | mText.append(i18n("<p><b>To:</b> %1</p>") |
263 | .arg(event->dtEndStr(shortDate))); | 263 | .arg(event->dtEndStr(shortDate))); |
264 | } else { | 264 | } else { |
265 | mText.append(i18n("<p><b>On:</b> %1</p> ") | 265 | mText.append(i18n("<p><b>On:</b> %1</p> ") |
266 | .arg(event->dtStartDateStr( shortDate ))); | 266 | .arg(event->dtStartDateStr( shortDate ))); |
267 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 267 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
268 | .arg(event->dtStartTimeStr()) | 268 | .arg(event->dtStartTimeStr()) |
269 | .arg(event->dtEndTimeStr())); | 269 | .arg(event->dtEndTimeStr())); |
270 | } | 270 | } |
271 | } | 271 | } |
272 | 272 | ||
273 | if (event->recurrence()->doesRecur()) { | 273 | if (event->recurrence()->doesRecur()) { |
274 | 274 | ||
275 | QString recurText = event->recurrence()->recurrenceText(); | 275 | QString recurText = event->recurrence()->recurrenceText(); |
276 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); | 276 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); |
277 | bool last; | 277 | bool last; |
278 | QDate start = QDate::currentDate(); | 278 | QDate start = QDate::currentDate(); |
279 | QDate next; | 279 | QDate next; |
280 | next = event->recurrence()->getPreviousDate( start , &last ); | 280 | next = event->recurrence()->getPreviousDate( start , &last ); |
281 | if ( !last ) { | 281 | if ( !last ) { |
282 | next = event->recurrence()->getNextDate( start.addDays( - 1 ) ); | 282 | next = event->recurrence()->getNextDate( start.addDays( - 1 ) ); |
283 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); | 283 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); |
284 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); | 284 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); |
285 | QDateTime nextdt = QDateTime( next, event->dtStart().time()); | 285 | QDateTime nextdt = QDateTime( next, event->dtStart().time()); |
286 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( nextdt, true ); | 286 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( nextdt, true ); |
287 | 287 | ||
288 | } else { | 288 | } else { |
289 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); | 289 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); |
290 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); | 290 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); |
291 | } | 291 | } |
292 | } else { | 292 | } else { |
293 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); | 293 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); |
294 | 294 | ||
295 | } | 295 | } |
296 | 296 | ||
297 | 297 | ||
298 | if (event->isAlarmEnabled()) { | 298 | if (event->isAlarmEnabled()) { |
299 | Alarm *alarm =event->alarms().first() ; | 299 | Alarm *alarm =event->alarms().first() ; |
300 | QDateTime t = alarm->time(); | 300 | QDateTime t = alarm->time(); |
301 | int min = t.secsTo( event->dtStart() )/60; | 301 | int min = t.secsTo( event->dtStart() )/60; |
302 | QString s =i18n("( %1 min before )").arg( min ); | 302 | QString s =i18n("( %1 min before )").arg( min ); |
303 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 303 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); |
304 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 304 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
305 | //addTag("p",s); | 305 | //addTag("p",s); |
306 | } | 306 | } |
307 | 307 | ||
308 | addTag("b",i18n("Access: ")); | 308 | addTag("b",i18n("Access: ")); |
309 | mText.append(event->secrecyStr()+"<br>"); | 309 | mText.append(event->secrecyStr()+"<br>"); |
310 | if (!event->description().isEmpty()) { | 310 | if (!event->description().isEmpty()) { |
311 | addTag("p",i18n("<b>Details: </b>")); | 311 | addTag("p",i18n("<b>Details: </b>")); |
312 | addTag("p",event->description()); | 312 | addTag("p",event->description()); |
313 | } | 313 | } |
314 | 314 | ||
315 | formatCategories(event); | 315 | formatCategories(event); |
316 | 316 | ||
317 | formatReadOnly(event); | 317 | formatReadOnly(event); |
318 | formatAttendees(event); | 318 | formatAttendees(event); |
319 | 319 | ||
320 | setText(mText); | 320 | setText(mText); |
321 | //QWhatsThis::add(this,mText); | 321 | //QWhatsThis::add(this,mText); |
322 | 322 | ||
323 | } | 323 | } |
324 | 324 | ||
325 | void KOEventViewer::appendTodo(Todo *event, int mode ) | 325 | void KOEventViewer::appendTodo(Todo *event, int mode ) |
326 | { | 326 | { |
327 | mMailSubject = ""; | 327 | mMailSubject = ""; |
328 | mCurrentIncidence = event; | 328 | mCurrentIncidence = event; |
329 | topLevelWidget()->setCaption(i18n("Todo Viewer")); | 329 | topLevelWidget()->setCaption(i18n("Todo Viewer")); |
330 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 330 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
331 | if (mode == 0 ) | 331 | if (mode == 0 ) |
332 | addTag("h2",event->summary()); | 332 | addTag("h2",event->summary()); |
333 | else { | 333 | else { |
334 | if ( mColorMode == 1 ) { | 334 | if ( mColorMode == 1 ) { |
335 | mText +="<font color=\"#00A000\">"; | 335 | mText +="<font color=\"#00A000\">"; |
336 | } | 336 | } |
337 | if ( mColorMode == 2 ) { | 337 | if ( mColorMode == 2 ) { |
338 | mText +="<font color=\"#B00000\">"; | 338 | mText +="<font color=\"#B00000\">"; |
339 | } | 339 | } |
340 | if ( mode == 1 ) { | 340 | if ( mode == 1 ) { |
341 | addTag("h2",i18n( "Local: " ) +event->summary()); | 341 | addTag("h2",i18n( "Local: " ) +event->summary()); |
342 | } else { | 342 | } else { |
343 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 343 | addTag("h2",i18n( "Remote: " ) +event->summary()); |
344 | } | 344 | } |
345 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 345 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
346 | if ( mColorMode ) | 346 | if ( mColorMode ) |
347 | mText += "</font>"; | 347 | mText += "</font>"; |
348 | } | 348 | } |
349 | mMailSubject += i18n( "Todo " )+ event->summary(); | 349 | mMailSubject += i18n( "Todo " )+ event->summary(); |
350 | if (event->cancelled ()) { | 350 | if (event->cancelled ()) { |
351 | mText +="<font color=\"#B00000\">"; | 351 | mText +="<font color=\"#B00000\">"; |
352 | addTag("i",i18n("This todo has been cancelled!")); | 352 | addTag("i",i18n("This todo has been cancelled!")); |
353 | mText.append("<br>"); | 353 | mText.append("<br>"); |
354 | mText += "</font>"; | 354 | mText += "</font>"; |
355 | mMailSubject += i18n("(cancelled)"); | 355 | mMailSubject += i18n("(cancelled)"); |
356 | } | 356 | } |
357 | 357 | ||
358 | if (!event->location().isEmpty()) { | 358 | if (!event->location().isEmpty()) { |
359 | addTag("b",i18n("Location: ")); | 359 | addTag("b",i18n("Location: ")); |
360 | mText.append(event->location()+"<br>"); | 360 | mText.append(event->location()+"<br>"); |
361 | mMailSubject += i18n(" at ") + event->location(); | 361 | mMailSubject += i18n(" at ") + event->location(); |
362 | } | 362 | } |
363 | if (event->hasStartDate()) { | 363 | if (event->hasStartDate()) { |
364 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); | 364 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); |
365 | } | 365 | } |
366 | if (event->hasDueDate()) { | 366 | if (event->hasDueDate()) { |
367 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); | 367 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); |
368 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); | 368 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); |
369 | } | 369 | } |
370 | addTag("b",i18n("Access: ")); | 370 | addTag("b",i18n("Access: ")); |
371 | mText.append(event->secrecyStr()+"<br>"); | 371 | mText.append(event->secrecyStr()+"<br>"); |
372 | if (!event->description().isEmpty()) { | 372 | if (!event->description().isEmpty()) { |
373 | addTag("p",i18n("<b>Details: </b>")); | 373 | addTag("p",i18n("<b>Details: </b>")); |
374 | addTag("p",event->description()); | 374 | addTag("p",event->description()); |
375 | } | 375 | } |
376 | 376 | ||
377 | formatCategories(event); | 377 | formatCategories(event); |
378 | 378 | ||
379 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 379 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
380 | .arg(QString::number(event->priority()))); | 380 | .arg(QString::number(event->priority()))); |
381 | 381 | ||
382 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | ||
383 | mText.append(i18n("<p><i>Completed on %1</i></p>") | ||
384 | .arg( event->completedStr() )); | ||
385 | } else { | ||
382 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 386 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
383 | .arg(event->percentComplete())); | 387 | .arg(event->percentComplete())); |
388 | } | ||
384 | 389 | ||
385 | formatReadOnly(event); | 390 | formatReadOnly(event); |
386 | formatAttendees(event); | 391 | formatAttendees(event); |
387 | if ( event->relatedTo() ) { | 392 | if ( event->relatedTo() ) { |
388 | addTag("b",i18n("Parent todo: ")); | 393 | addTag("b",i18n("Parent todo: ")); |
389 | mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); | 394 | mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); |
390 | } | 395 | } |
391 | QPtrList<Incidence> Relations = event->relations(); | 396 | QPtrList<Incidence> Relations = event->relations(); |
392 | Incidence *to; | 397 | Incidence *to; |
393 | if ( Relations.first() ) | 398 | if ( Relations.first() ) |
394 | addTag("b",i18n("Sub todos:<br>")); | 399 | addTag("b",i18n("Sub todos:<br>")); |
395 | for (to=Relations.first();to;to=Relations.next()) { | 400 | for (to=Relations.first();to;to=Relations.next()) { |
396 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | 401 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); |
397 | 402 | ||
398 | } | 403 | } |
399 | setText(mText); | 404 | setText(mText); |
400 | } | 405 | } |
401 | 406 | ||
402 | void KOEventViewer::formatCategories(Incidence *event) | 407 | void KOEventViewer::formatCategories(Incidence *event) |
403 | { | 408 | { |
404 | if (!event->categoriesStr().isEmpty()) { | 409 | if (!event->categoriesStr().isEmpty()) { |
405 | if (event->categories().count() == 1) { | 410 | if (event->categories().count() == 1) { |
406 | addTag("h3",i18n("Category")); | 411 | addTag("h3",i18n("Category")); |
407 | } else { | 412 | } else { |
408 | addTag("h3",i18n("Categories")); | 413 | addTag("h3",i18n("Categories")); |
409 | } | 414 | } |
410 | addTag("p",event->categoriesStr()); | 415 | addTag("p",event->categoriesStr()); |
411 | } | 416 | } |
412 | } | 417 | } |
413 | void KOEventViewer::formatAttendees(Incidence *event) | 418 | void KOEventViewer::formatAttendees(Incidence *event) |
414 | { | 419 | { |
415 | QPtrList<Attendee> attendees = event->attendees(); | 420 | QPtrList<Attendee> attendees = event->attendees(); |
416 | if (attendees.count()) { | 421 | if (attendees.count()) { |
417 | 422 | ||
418 | 423 | ||
419 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 424 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
420 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); | 425 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); |
421 | addTag("h3",i18n("Organizer")); | 426 | addTag("h3",i18n("Organizer")); |
422 | mText.append("<ul><li>"); | 427 | mText.append("<ul><li>"); |
423 | #ifndef KORG_NOKABC | 428 | #ifndef KORG_NOKABC |
424 | 429 | ||
425 | #ifdef DESKTOP_VERSION | 430 | #ifdef DESKTOP_VERSION |
426 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 431 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
427 | KABC::Addressee::List addressList; | 432 | KABC::Addressee::List addressList; |
428 | addressList = add_book->findByEmail(event->organizer()); | 433 | addressList = add_book->findByEmail(event->organizer()); |
429 | KABC::Addressee o = addressList.first(); | 434 | KABC::Addressee o = addressList.first(); |
430 | if (!o.isEmpty() && addressList.size()<2) { | 435 | if (!o.isEmpty() && addressList.size()<2) { |
431 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 436 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
432 | mText += o.formattedName(); | 437 | mText += o.formattedName(); |
433 | mText += "</a>\n"; | 438 | mText += "</a>\n"; |
434 | } else { | 439 | } else { |
435 | mText.append(event->organizer()); | 440 | mText.append(event->organizer()); |
436 | } | 441 | } |
437 | #else //DESKTOP_VERSION | 442 | #else //DESKTOP_VERSION |
438 | mText += "<a href=\"uid:organizer\">"; | 443 | mText += "<a href=\"uid:organizer\">"; |
439 | mText += event->organizer(); | 444 | mText += event->organizer(); |
440 | mText += "</a>\n"; | 445 | mText += "</a>\n"; |
441 | #endif //DESKTOP_VERSION | 446 | #endif //DESKTOP_VERSION |
442 | 447 | ||
443 | 448 | ||
444 | #else | 449 | #else |
445 | mText.append(event->organizer()); | 450 | mText.append(event->organizer()); |
446 | #endif | 451 | #endif |
447 | 452 | ||
448 | if (iconPath) { | 453 | if (iconPath) { |
449 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; | 454 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; |
450 | mText += "<IMG src=\"" + iconPath + "\">"; | 455 | mText += "<IMG src=\"" + iconPath + "\">"; |
451 | mText += "</a>\n"; | 456 | mText += "</a>\n"; |
452 | } | 457 | } |
453 | mText.append("</li></ul>"); | 458 | mText.append("</li></ul>"); |
454 | 459 | ||
455 | addTag("h3",i18n("Attendees")); | 460 | addTag("h3",i18n("Attendees")); |
456 | Attendee *a; | 461 | Attendee *a; |
457 | mText.append("<ul>"); | 462 | mText.append("<ul>"); |
458 | for(a=attendees.first();a;a=attendees.next()) { | 463 | for(a=attendees.first();a;a=attendees.next()) { |
459 | #ifndef KORG_NOKABC | 464 | #ifndef KORG_NOKABC |
460 | #ifdef DESKTOP_VERSION | 465 | #ifdef DESKTOP_VERSION |
461 | if (a->name().isEmpty()) { | 466 | if (a->name().isEmpty()) { |
462 | addressList = add_book->findByEmail(a->email()); | 467 | addressList = add_book->findByEmail(a->email()); |
463 | KABC::Addressee o = addressList.first(); | 468 | KABC::Addressee o = addressList.first(); |
464 | if (!o.isEmpty() && addressList.size()<2) { | 469 | if (!o.isEmpty() && addressList.size()<2) { |
465 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 470 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
466 | mText += o.formattedName(); | 471 | mText += o.formattedName(); |
467 | mText += "</a>\n"; | 472 | mText += "</a>\n"; |
468 | } else { | 473 | } else { |
469 | mText += "<li>"; | 474 | mText += "<li>"; |
470 | mText.append(a->email()); | 475 | mText.append(a->email()); |
471 | mText += "\n"; | 476 | mText += "\n"; |
472 | } | 477 | } |
473 | } else { | 478 | } else { |
474 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 479 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
475 | if (!a->name().isEmpty()) mText += a->name(); | 480 | if (!a->name().isEmpty()) mText += a->name(); |
476 | else mText += a->email(); | 481 | else mText += a->email(); |
477 | mText += "</a>\n"; | 482 | mText += "</a>\n"; |
478 | } | 483 | } |
479 | #else //DESKTOP_VERSION | 484 | #else //DESKTOP_VERSION |
480 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 485 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
481 | if (!a->name().isEmpty()) mText += a->name(); | 486 | if (!a->name().isEmpty()) mText += a->name(); |
482 | else mText += a->email(); | 487 | else mText += a->email(); |
483 | mText += "</a>\n"; | 488 | mText += "</a>\n"; |
484 | #endif //DESKTOP_VERSION | 489 | #endif //DESKTOP_VERSION |
485 | #else | 490 | #else |
486 | //qDebug("nokabc "); | 491 | //qDebug("nokabc "); |
487 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 492 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
488 | if (!a->name().isEmpty()) mText += a->name(); | 493 | if (!a->name().isEmpty()) mText += a->name(); |
489 | else mText += a->email(); | 494 | else mText += a->email(); |
490 | mText += "</a>\n"; | 495 | mText += "</a>\n"; |
491 | #endif | 496 | #endif |
492 | 497 | ||
493 | 498 | ||
494 | if (!a->email().isEmpty()) { | 499 | if (!a->email().isEmpty()) { |
495 | if (iconPath) { | 500 | if (iconPath) { |
496 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; | 501 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; |
497 | if ( a->RSVP() ) | 502 | if ( a->RSVP() ) |
498 | mText += "<IMG src=\"" + iconPath + "\">"; | 503 | mText += "<IMG src=\"" + iconPath + "\">"; |
499 | else | 504 | else |
500 | mText += "<IMG src=\"" + NOiconPath + "\">"; | 505 | mText += "<IMG src=\"" + NOiconPath + "\">"; |
501 | mText += "</a>\n"; | 506 | mText += "</a>\n"; |
502 | } | 507 | } |
503 | } | 508 | } |
504 | if (a->status() != Attendee::NeedsAction ) | 509 | if (a->status() != Attendee::NeedsAction ) |
505 | mText +="[" + a->statusStr() + "] "; | 510 | mText +="[" + a->statusStr() + "] "; |
506 | if (a->role() == Attendee::Chair ) | 511 | if (a->role() == Attendee::Chair ) |
507 | mText +="(" + a->roleStr().left(1) + ".)"; | 512 | mText +="(" + a->roleStr().left(1) + ".)"; |
508 | } | 513 | } |
509 | mText.append("</li></ul>"); | 514 | mText.append("</li></ul>"); |
510 | } | 515 | } |
511 | 516 | ||
512 | } | 517 | } |
513 | void KOEventViewer::appendJournal(Journal *jour, int mode ) | 518 | void KOEventViewer::appendJournal(Journal *jour, int mode ) |
514 | { | 519 | { |
515 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 520 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
516 | if (mode == 0 ) { | 521 | if (mode == 0 ) { |
517 | addTag("h2",i18n("Journal from: ")); | 522 | addTag("h2",i18n("Journal from: ")); |
518 | } | 523 | } |
519 | else { | 524 | else { |
520 | if ( mode == 1 ) { | 525 | if ( mode == 1 ) { |
521 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); | 526 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); |
522 | } else { | 527 | } else { |
523 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); | 528 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); |
524 | } | 529 | } |
525 | } | 530 | } |
526 | topLevelWidget()->setCaption("Journal Viewer"); | 531 | topLevelWidget()->setCaption("Journal Viewer"); |
527 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); | 532 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); |
528 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | 533 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); |
529 | if (!jour->description().isEmpty()) { | 534 | if (!jour->description().isEmpty()) { |
530 | addTag("p",jour->description()); | 535 | addTag("p",jour->description()); |
531 | } | 536 | } |
532 | setText(mText); | 537 | setText(mText); |
533 | } | 538 | } |
534 | 539 | ||
535 | void KOEventViewer::formatReadOnly(Incidence *event) | 540 | void KOEventViewer::formatReadOnly(Incidence *event) |
536 | { | 541 | { |
537 | if (event->isReadOnly()) { | 542 | if (event->isReadOnly()) { |
538 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); | 543 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); |
539 | } | 544 | } |
540 | } | 545 | } |
541 | void KOEventViewer::setSyncMode( bool b ) | 546 | void KOEventViewer::setSyncMode( bool b ) |
542 | { | 547 | { |
543 | mSyncMode = b; | 548 | mSyncMode = b; |
544 | } | 549 | } |
545 | 550 | ||
546 | 551 | ||
547 | void KOEventViewer::setTodo(Todo *event, bool clearV ) | 552 | void KOEventViewer::setTodo(Todo *event, bool clearV ) |
548 | { | 553 | { |
549 | if ( clearV ) | 554 | if ( clearV ) |
550 | clearEvents(); | 555 | clearEvents(); |
551 | if ( mSyncMode ) { | 556 | if ( mSyncMode ) { |
552 | if ( clearV ) | 557 | if ( clearV ) |
553 | appendTodo(event,1 ); | 558 | appendTodo(event,1 ); |
554 | else | 559 | else |
555 | appendTodo(event,2); | 560 | appendTodo(event,2); |
556 | } else | 561 | } else |
557 | appendTodo(event); | 562 | appendTodo(event); |
558 | } | 563 | } |
559 | void KOEventViewer::setJournal(Journal *event, bool clearV ) | 564 | void KOEventViewer::setJournal(Journal *event, bool clearV ) |
560 | { | 565 | { |
561 | if ( clearV ) | 566 | if ( clearV ) |
562 | clearEvents(); | 567 | clearEvents(); |
563 | if ( mSyncMode ) { | 568 | if ( mSyncMode ) { |
564 | if ( clearV ) | 569 | if ( clearV ) |
565 | appendJournal(event, 1); | 570 | appendJournal(event, 1); |
566 | else | 571 | else |
567 | appendJournal(event, 2); | 572 | appendJournal(event, 2); |
568 | } else | 573 | } else |
569 | appendJournal(event); | 574 | appendJournal(event); |
570 | } | 575 | } |
571 | 576 | ||
572 | void KOEventViewer::setEvent(Event *event) | 577 | void KOEventViewer::setEvent(Event *event) |
573 | { | 578 | { |
574 | clearEvents(); | 579 | clearEvents(); |
575 | if ( mSyncMode ) | 580 | if ( mSyncMode ) |
576 | appendEvent(event, 1); | 581 | appendEvent(event, 1); |
577 | else | 582 | else |
578 | appendEvent(event); | 583 | appendEvent(event); |
579 | } | 584 | } |
580 | 585 | ||
581 | void KOEventViewer::addEvent(Event *event) | 586 | void KOEventViewer::addEvent(Event *event) |
582 | { | 587 | { |
583 | if ( mSyncMode ) | 588 | if ( mSyncMode ) |
584 | appendEvent(event, 2); | 589 | appendEvent(event, 2); |
585 | else | 590 | else |
586 | appendEvent(event); | 591 | appendEvent(event); |
587 | } | 592 | } |
588 | 593 | ||
589 | void KOEventViewer::clearEvents(bool now) | 594 | void KOEventViewer::clearEvents(bool now) |
590 | { | 595 | { |
591 | mText = ""; | 596 | mText = ""; |
592 | if (now) setText(mText); | 597 | if (now) setText(mText); |
593 | } | 598 | } |
594 | 599 | ||
595 | void KOEventViewer::addText(QString text) | 600 | void KOEventViewer::addText(QString text) |
596 | { | 601 | { |
597 | mText.append(text); | 602 | mText.append(text); |
598 | setText(mText); | 603 | setText(mText); |
599 | } | 604 | } |
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 3979ed2..f6f7258 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -1,259 +1,260 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <klocale.h> | 20 | #include <klocale.h> |
21 | 21 | ||
22 | #include <libkcal/event.h> | 22 | #include <libkcal/event.h> |
23 | #include <qpushbutton.h> | 23 | #include <qpushbutton.h> |
24 | 24 | ||
25 | #include "koeventviewer.h" | 25 | #include "koeventviewer.h" |
26 | #include "koprefs.h" | 26 | #include "koprefs.h" |
27 | #include <libkcal/todo.h> | 27 | #include <libkcal/todo.h> |
28 | #include "qapp.h" | 28 | #include "qapp.h" |
29 | 29 | ||
30 | #include "koeventviewerdialog.h" | 30 | #include "koeventviewerdialog.h" |
31 | extern int globalFlagBlockAgenda; | 31 | extern int globalFlagBlockAgenda; |
32 | 32 | ||
33 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) | 33 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) |
34 | : KDialogBase(parent,name, | 34 | : KDialogBase(parent,name, |
35 | #ifndef DESKTOP_VERSION | 35 | #ifndef DESKTOP_VERSION |
36 | true , | 36 | true , |
37 | #else | 37 | #else |
38 | false, | 38 | false, |
39 | #endif | 39 | #endif |
40 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) | 40 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) |
41 | { | 41 | { |
42 | 42 | ||
43 | mEventViewer = new KOEventViewer(this); | 43 | mEventViewer = new KOEventViewer(this); |
44 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 44 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
45 | setMainWidget(mEventViewer); | 45 | setMainWidget(mEventViewer); |
46 | setButtonText(Ok, i18n("Edit") ); | 46 | setButtonText(Ok, i18n("Edit") ); |
47 | 47 | ||
48 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), | 48 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), |
49 | SLOT(editIncidence())); | 49 | SLOT(editIncidence())); |
50 | QObject::connect(this,SIGNAL(user1Clicked()), | 50 | QObject::connect(this,SIGNAL(user1Clicked()), |
51 | SLOT(showIncidence())); | 51 | SLOT(showIncidence())); |
52 | mIncidence = 0; | 52 | mIncidence = 0; |
53 | // TODO: Set a sensible size (based on the content?). | 53 | // TODO: Set a sensible size (based on the content?). |
54 | //showMaximized(); | 54 | //showMaximized(); |
55 | //qDebug("++++++++++++KOEventViewerDialog() "); | 55 | //qDebug("++++++++++++KOEventViewerDialog() "); |
56 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 56 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
57 | // setFixedSize( 240,284 ); | 57 | // setFixedSize( 240,284 ); |
58 | // move( 0, 15 ); | 58 | // move( 0, 15 ); |
59 | // } else { | 59 | // } else { |
60 | // setMinimumSize(300,200); | 60 | // setMinimumSize(300,200); |
61 | // resize(320,300); | 61 | // resize(320,300); |
62 | // } | 62 | // } |
63 | mSyncMode = false; | 63 | mSyncMode = false; |
64 | mSyncResult = 0; | 64 | mSyncResult = 0; |
65 | 65 | ||
66 | } | 66 | } |
67 | 67 | ||
68 | KOEventViewerDialog::~KOEventViewerDialog() | 68 | KOEventViewerDialog::~KOEventViewerDialog() |
69 | { | 69 | { |
70 | //qDebug("-------~KOEventViewerDialog() "); | 70 | //qDebug("-------~KOEventViewerDialog() "); |
71 | } | 71 | } |
72 | void KOEventViewerDialog::showMe() | 72 | void KOEventViewerDialog::showMe() |
73 | { | 73 | { |
74 | 74 | ||
75 | #ifdef DESKTOP_VERSION | 75 | #ifdef DESKTOP_VERSION |
76 | show(); | 76 | show(); |
77 | #else | 77 | #else |
78 | showMaximized(); | 78 | showMaximized(); |
79 | #endif | 79 | #endif |
80 | setFocus(); | 80 | setFocus(); |
81 | setActiveWindow(); | 81 | setActiveWindow(); |
82 | 82 | ||
83 | } | 83 | } |
84 | void KOEventViewerDialog::setSyncMode( bool b ) | 84 | void KOEventViewerDialog::setSyncMode( bool b ) |
85 | { | 85 | { |
86 | mSyncMode = b; | 86 | mSyncMode = b; |
87 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); | 87 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); |
88 | if ( mSyncMode ) { | 88 | if ( mSyncMode ) { |
89 | findButton( Close )->setText( i18n("Cancel Sync")); | 89 | findButton( Close )->setText( i18n("Cancel Sync")); |
90 | findButton( Ok )->setText( i18n("Remote")); | 90 | findButton( Ok )->setText( i18n("Remote")); |
91 | findButton( User1 )->setText( i18n("Local")); | 91 | findButton( User1 )->setText( i18n("Local")); |
92 | } else { | 92 | } else { |
93 | findButton( Close )->setText( i18n("Close")); | 93 | findButton( Close )->setText( i18n("Close")); |
94 | findButton( Ok )->setText( i18n("Edit")); | 94 | findButton( Ok )->setText( i18n("Edit")); |
95 | findButton( User1 )->setText( i18n("Agenda")); | 95 | findButton( User1 )->setText( i18n("Agenda")); |
96 | } | 96 | } |
97 | mEventViewer->setSyncMode( b ); | 97 | mEventViewer->setSyncMode( b ); |
98 | } | 98 | } |
99 | void KOEventViewerDialog::setColorMode( int m ) | 99 | void KOEventViewerDialog::setColorMode( int m ) |
100 | { | 100 | { |
101 | mEventViewer->setColorMode( m ); | 101 | mEventViewer->setColorMode( m ); |
102 | } | 102 | } |
103 | int KOEventViewerDialog::executeS( bool local ) | 103 | int KOEventViewerDialog::executeS( bool local ) |
104 | { | 104 | { |
105 | mSyncResult = 3; | 105 | mSyncResult = 3; |
106 | if ( local ) | 106 | if ( local ) |
107 | findButton( User1 )->setFocus(); | 107 | findButton( User1 )->setFocus(); |
108 | else | 108 | else |
109 | findButton( Ok )->setFocus(); | 109 | findButton( Ok )->setFocus(); |
110 | exec(); | 110 | exec(); |
111 | return mSyncResult; | 111 | return mSyncResult; |
112 | } | 112 | } |
113 | 113 | ||
114 | void KOEventViewerDialog::updateConfig() | 114 | void KOEventViewerDialog::updateConfig() |
115 | { | 115 | { |
116 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 116 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
117 | 117 | ||
118 | } | 118 | } |
119 | void KOEventViewerDialog::setEvent(Event *event) | 119 | void KOEventViewerDialog::setEvent(Event *event) |
120 | { | 120 | { |
121 | mEventViewer->setEvent(event); | 121 | mEventViewer->setEvent(event); |
122 | mIncidence = event; | 122 | mIncidence = event; |
123 | findButton( Close )->setFocus(); | 123 | findButton( Close )->setFocus(); |
124 | if ( !mSyncMode ) { | 124 | if ( !mSyncMode ) { |
125 | findButton( User1 )->setText( i18n("Agenda")); | 125 | findButton( User1 )->setText( i18n("Agenda")); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | void KOEventViewerDialog::setIncidence(Incidence *in ) | 128 | void KOEventViewerDialog::setIncidence(Incidence *in ) |
129 | { | 129 | { |
130 | if ( in->type() == "Event" ) | 130 | if ( in->type() == "Event" ) |
131 | setEvent( (Event*) in ); | 131 | setEvent( (Event*) in ); |
132 | else if ( in->type() =="Todo" ) | 132 | else if ( in->type() =="Todo" ) |
133 | setTodo( (Todo*) in ); | 133 | setTodo( (Todo*) in ); |
134 | else if ( in->type() =="Journal" ) | 134 | else if ( in->type() =="Journal" ) |
135 | setJournal( (Journal*) in ); | 135 | setJournal( (Journal*) in ); |
136 | } | 136 | } |
137 | void KOEventViewerDialog::addIncidence(Incidence *in) | 137 | void KOEventViewerDialog::addIncidence(Incidence *in) |
138 | { | 138 | { |
139 | if ( in->type() == "Event" ) | 139 | if ( in->type() == "Event" ) |
140 | addEvent( (Event*) in ); | 140 | addEvent( (Event*) in ); |
141 | else if ( in->type() =="Todo" ) | 141 | else if ( in->type() =="Todo" ) |
142 | mEventViewer->setTodo( (Todo*) in, false ); | 142 | mEventViewer->setTodo( (Todo*) in, false ); |
143 | else if ( in->type() =="Journal" ) | 143 | else if ( in->type() =="Journal" ) |
144 | mEventViewer->setJournal( (Journal*) in, false ); | 144 | mEventViewer->setJournal( (Journal*) in, false ); |
145 | if ( mSyncMode ) { | 145 | if ( mSyncMode ) { |
146 | findButton( User1 )->setFocus(); | 146 | findButton( User1 )->setFocus(); |
147 | setCaption(i18n("Conflict! Please choose entry")); | 147 | setCaption(i18n("Conflict! Please choose entry")); |
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
151 | void KOEventViewerDialog::addEvent(Event *event) | 151 | void KOEventViewerDialog::addEvent(Event *event) |
152 | { | 152 | { |
153 | mEventViewer->addEvent(event); | 153 | mEventViewer->addEvent(event); |
154 | mIncidence = event; | 154 | mIncidence = event; |
155 | findButton( Close )->setFocus(); | 155 | findButton( Close )->setFocus(); |
156 | if ( !mSyncMode ) { | 156 | if ( !mSyncMode ) { |
157 | findButton( User1 )->setText( i18n("Agenda")); | 157 | findButton( User1 )->setText( i18n("Agenda")); |
158 | } | 158 | } |
159 | } | 159 | } |
160 | 160 | ||
161 | void KOEventViewerDialog::setTodo(Todo *event) | 161 | void KOEventViewerDialog::setTodo(Todo *event) |
162 | { | 162 | { |
163 | mEventViewer->setTodo(event); | 163 | mEventViewer->setTodo(event); |
164 | mIncidence = (Incidence*)event; | 164 | mIncidence = (Incidence*)event; |
165 | findButton( Close )->setFocus(); | 165 | findButton( Close )->setFocus(); |
166 | if ( !mSyncMode ) { | 166 | if ( !mSyncMode ) { |
167 | findButton( User1 )->setText( i18n("Set complete")); | 167 | findButton( User1 )->setText( i18n("Set complete")); |
168 | } | 168 | } |
169 | } | 169 | } |
170 | void KOEventViewerDialog::setJournal(Journal *j) | 170 | void KOEventViewerDialog::setJournal(Journal *j) |
171 | { | 171 | { |
172 | mEventViewer->setJournal(j); | 172 | mEventViewer->setJournal(j); |
173 | mIncidence = (Incidence*)j; | 173 | mIncidence = (Incidence*)j; |
174 | findButton( Close )->setFocus(); | 174 | findButton( Close )->setFocus(); |
175 | if ( !mSyncMode ) { | 175 | if ( !mSyncMode ) { |
176 | findButton( User1 )->setText( i18n("Agenda")); | 176 | findButton( User1 )->setText( i18n("Agenda")); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | 179 | ||
180 | void KOEventViewerDialog::addText(QString text) | 180 | void KOEventViewerDialog::addText(QString text) |
181 | { | 181 | { |
182 | mEventViewer->addText(text); | 182 | mEventViewer->addText(text); |
183 | findButton( Close )->setFocus(); | 183 | findButton( Close )->setFocus(); |
184 | } | 184 | } |
185 | void KOEventViewerDialog::editIncidence() | 185 | void KOEventViewerDialog::editIncidence() |
186 | { | 186 | { |
187 | if ( mSyncMode ) { | 187 | if ( mSyncMode ) { |
188 | mSyncResult = 2; | 188 | mSyncResult = 2; |
189 | accept(); | 189 | accept(); |
190 | return; | 190 | return; |
191 | } | 191 | } |
192 | if ( mIncidence ){ | 192 | if ( mIncidence ){ |
193 | #ifndef DESKTOP_VERSION | 193 | #ifndef DESKTOP_VERSION |
194 | hide(); | 194 | hide(); |
195 | #endif | 195 | #endif |
196 | emit editIncidence( mIncidence ); | 196 | emit editIncidence( mIncidence ); |
197 | } | 197 | } |
198 | } | 198 | } |
199 | void KOEventViewerDialog::showIncidence() | 199 | void KOEventViewerDialog::showIncidence() |
200 | { | 200 | { |
201 | 201 | ||
202 | if ( mSyncMode ) { | 202 | if ( mSyncMode ) { |
203 | mSyncResult = 1; | 203 | mSyncResult = 1; |
204 | accept(); | 204 | accept(); |
205 | return; | 205 | return; |
206 | } | 206 | } |
207 | 207 | ||
208 | if ( mIncidence ){ | 208 | if ( mIncidence ){ |
209 | #ifndef DESKTOP_VERSION | 209 | #ifndef DESKTOP_VERSION |
210 | hide(); | 210 | hide(); |
211 | #endif | 211 | #endif |
212 | QDate date; | 212 | QDate date; |
213 | if ( mIncidence->type() == "Todo" ) { | 213 | if ( mIncidence->type() == "Todo" ) { |
214 | /* | 214 | /* |
215 | if ( ((Todo*)mIncidence)->hasDueDate() ) | 215 | if ( ((Todo*)mIncidence)->hasDueDate() ) |
216 | date = ((Todo*)mIncidence)->dtDue().date(); | 216 | date = ((Todo*)mIncidence)->dtDue().date(); |
217 | else { | 217 | else { |
218 | globalFlagBlockAgenda = 2; | 218 | globalFlagBlockAgenda = 2; |
219 | emit showAgendaView( false ); | 219 | emit showAgendaView( false ); |
220 | return; | 220 | return; |
221 | } | 221 | } |
222 | */ | 222 | */ |
223 | ((Todo*)mIncidence)->setCompleted( true ); | 223 | ((Todo*)mIncidence)->setCompleted( true ); |
224 | ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); | ||
224 | hide(); | 225 | hide(); |
225 | emit todoCompleted(((Todo*)mIncidence)); | 226 | emit todoCompleted(((Todo*)mIncidence)); |
226 | return; | 227 | return; |
227 | 228 | ||
228 | } else | 229 | } else |
229 | date = mIncidence->dtStart().date(); | 230 | date = mIncidence->dtStart().date(); |
230 | globalFlagBlockAgenda = 1; | 231 | globalFlagBlockAgenda = 1; |
231 | emit showAgendaView( false ); | 232 | emit showAgendaView( false ); |
232 | globalFlagBlockAgenda = 2; | 233 | globalFlagBlockAgenda = 2; |
233 | emit jumpToTime( date ); | 234 | emit jumpToTime( date ); |
234 | } | 235 | } |
235 | } | 236 | } |
236 | void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) | 237 | void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) |
237 | { | 238 | { |
238 | switch ( e->key() ) { | 239 | switch ( e->key() ) { |
239 | 240 | ||
240 | case Qt::Key_A : | 241 | case Qt::Key_A : |
241 | case Qt::Key_L : | 242 | case Qt::Key_L : |
242 | showIncidence(); | 243 | showIncidence(); |
243 | break; | 244 | break; |
244 | case Qt::Key_E : | 245 | case Qt::Key_E : |
245 | case Qt::Key_R : | 246 | case Qt::Key_R : |
246 | editIncidence(); | 247 | editIncidence(); |
247 | break; | 248 | break; |
248 | case Qt::Key_C: | 249 | case Qt::Key_C: |
249 | case Qt::Key_Escape: | 250 | case Qt::Key_Escape: |
250 | close(); | 251 | close(); |
251 | break; | 252 | break; |
252 | case Qt::Key_I: | 253 | case Qt::Key_I: |
253 | accept(); | 254 | accept(); |
254 | break; | 255 | break; |
255 | default: | 256 | default: |
256 | break; | 257 | break; |
257 | } | 258 | } |
258 | 259 | ||
259 | } | 260 | } |
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index 2c45f21..c52f2b3 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp | |||
@@ -1,328 +1,338 @@ | |||
1 | #include "kincidenceformatter.h" | 1 | #include "kincidenceformatter.h" |
2 | #include <kstaticdeleter.h> | 2 | #include <kstaticdeleter.h> |
3 | #include <kglobal.h> | 3 | #include <kglobal.h> |
4 | #include <klocale.h> | 4 | #include <klocale.h> |
5 | #ifdef DEKTOP_VERSION | 5 | #ifdef DEKTOP_VERSION |
6 | #include <kabc/stdaddressbook.h> | 6 | #include <kabc/stdaddressbook.h> |
7 | #define size count | 7 | #define size count |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | KIncidenceFormatter* KIncidenceFormatter::mInstance = 0; | 10 | KIncidenceFormatter* KIncidenceFormatter::mInstance = 0; |
11 | static KStaticDeleter<KIncidenceFormatter> insd; | 11 | static KStaticDeleter<KIncidenceFormatter> insd; |
12 | 12 | ||
13 | QString KIncidenceFormatter::getFormattedText( Incidence * inc ) | 13 | QString KIncidenceFormatter::getFormattedText( Incidence * inc ) |
14 | { | 14 | { |
15 | // #ifndef QT_NO_INPUTDIALOG | 15 | // #ifndef QT_NO_INPUTDIALOG |
16 | // return QInputDialog::getItem( caption, label, items, current, editable ); | 16 | // return QInputDialog::getItem( caption, label, items, current, editable ); |
17 | // #else | 17 | // #else |
18 | // return QString::null; | 18 | // return QString::null; |
19 | // #endif | 19 | // #endif |
20 | mText = ""; | 20 | mText = ""; |
21 | if ( inc->type() == "Event" ) | 21 | if ( inc->type() == "Event" ) |
22 | setEvent((Event *) inc ); | 22 | setEvent((Event *) inc ); |
23 | else if ( inc->type() == "Todo" ) | 23 | else if ( inc->type() == "Todo" ) |
24 | setTodo((Todo *) inc ); | 24 | setTodo((Todo *) inc ); |
25 | return mText; | 25 | return mText; |
26 | } | 26 | } |
27 | 27 | ||
28 | KIncidenceFormatter* KIncidenceFormatter::instance() | 28 | KIncidenceFormatter* KIncidenceFormatter::instance() |
29 | { | 29 | { |
30 | if (!mInstance) { | 30 | if (!mInstance) { |
31 | mInstance = insd.setObject(new KIncidenceFormatter()); | 31 | mInstance = insd.setObject(new KIncidenceFormatter()); |
32 | } | 32 | } |
33 | return mInstance; | 33 | return mInstance; |
34 | } | 34 | } |
35 | KIncidenceFormatter::~KIncidenceFormatter() | 35 | KIncidenceFormatter::~KIncidenceFormatter() |
36 | { | 36 | { |
37 | if (mInstance == this) | 37 | if (mInstance == this) |
38 | mInstance = insd.setObject(0); | 38 | mInstance = insd.setObject(0); |
39 | //qDebug("KIncidenceFormatter::~KIncidenceFormatter "); | 39 | //qDebug("KIncidenceFormatter::~KIncidenceFormatter "); |
40 | } | 40 | } |
41 | KIncidenceFormatter::KIncidenceFormatter() | 41 | KIncidenceFormatter::KIncidenceFormatter() |
42 | { | 42 | { |
43 | mColorMode = 0; | 43 | mColorMode = 0; |
44 | } | 44 | } |
45 | void KIncidenceFormatter::setEvent(Event *event) | 45 | void KIncidenceFormatter::setEvent(Event *event) |
46 | { | 46 | { |
47 | int mode = 0; | 47 | int mode = 0; |
48 | mCurrentIncidence = event; | 48 | mCurrentIncidence = event; |
49 | bool shortDate = true; | 49 | bool shortDate = true; |
50 | if ( mode == 0 ) { | 50 | if ( mode == 0 ) { |
51 | addTag("h3",event->summary()); | 51 | addTag("h3",event->summary()); |
52 | } | 52 | } |
53 | else { | 53 | else { |
54 | if ( mColorMode == 1 ) { | 54 | if ( mColorMode == 1 ) { |
55 | mText +="<font color=\"#00A000\">"; | 55 | mText +="<font color=\"#00A000\">"; |
56 | } | 56 | } |
57 | if ( mColorMode == 2 ) { | 57 | if ( mColorMode == 2 ) { |
58 | mText +="<font color=\"#C00000\">"; | 58 | mText +="<font color=\"#C00000\">"; |
59 | } | 59 | } |
60 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 60 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
61 | if ( mode == 1 ) { | 61 | if ( mode == 1 ) { |
62 | addTag("h2",i18n( "Local: " ) +event->summary()); | 62 | addTag("h2",i18n( "Local: " ) +event->summary()); |
63 | } else { | 63 | } else { |
64 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 64 | addTag("h2",i18n( "Remote: " ) +event->summary()); |
65 | } | 65 | } |
66 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 66 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
67 | if ( mColorMode ) | 67 | if ( mColorMode ) |
68 | mText += "</font>"; | 68 | mText += "</font>"; |
69 | } | 69 | } |
70 | if (event->cancelled ()) { | 70 | if (event->cancelled ()) { |
71 | mText +="<font color=\"#B00000\">"; | 71 | mText +="<font color=\"#B00000\">"; |
72 | addTag("i",i18n("This event has been cancelled!")); | 72 | addTag("i",i18n("This event has been cancelled!")); |
73 | mText.append("<br>"); | 73 | mText.append("<br>"); |
74 | mText += "</font>"; | 74 | mText += "</font>"; |
75 | } | 75 | } |
76 | if (!event->location().isEmpty()) { | 76 | if (!event->location().isEmpty()) { |
77 | addTag("b",i18n("Location: ")); | 77 | addTag("b",i18n("Location: ")); |
78 | mText.append(event->location()+"<br>"); | 78 | mText.append(event->location()+"<br>"); |
79 | } | 79 | } |
80 | if (event->doesFloat()) { | 80 | if (event->doesFloat()) { |
81 | if (event->isMultiDay()) { | 81 | if (event->isMultiDay()) { |
82 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") | 82 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") |
83 | .arg(event->dtStartDateStr(shortDate)) | 83 | .arg(event->dtStartDateStr(shortDate)) |
84 | .arg(event->dtEndDateStr(shortDate))); | 84 | .arg(event->dtEndDateStr(shortDate))); |
85 | } else { | 85 | } else { |
86 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); | 86 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); |
87 | } | 87 | } |
88 | } else { | 88 | } else { |
89 | if (event->isMultiDay()) { | 89 | if (event->isMultiDay()) { |
90 | mText.append(i18n("<p><b>From:</b> %1</p> ") | 90 | mText.append(i18n("<p><b>From:</b> %1</p> ") |
91 | .arg(event->dtStartStr( shortDate))); | 91 | .arg(event->dtStartStr( shortDate))); |
92 | mText.append(i18n("<p><b>To:</b> %1</p>") | 92 | mText.append(i18n("<p><b>To:</b> %1</p>") |
93 | .arg(event->dtEndStr(shortDate))); | 93 | .arg(event->dtEndStr(shortDate))); |
94 | } else { | 94 | } else { |
95 | mText.append(i18n("<p><b>On:</b> %1</p> ") | 95 | mText.append(i18n("<p><b>On:</b> %1</p> ") |
96 | .arg(event->dtStartDateStr( shortDate ))); | 96 | .arg(event->dtStartDateStr( shortDate ))); |
97 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 97 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
98 | .arg(event->dtStartTimeStr()) | 98 | .arg(event->dtStartTimeStr()) |
99 | .arg(event->dtEndTimeStr())); | 99 | .arg(event->dtEndTimeStr())); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | if (event->recurrence()->doesRecur()) { | 103 | if (event->recurrence()->doesRecur()) { |
104 | 104 | ||
105 | QString recurText = event->recurrence()->recurrenceText(); | 105 | QString recurText = event->recurrence()->recurrenceText(); |
106 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); | 106 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); |
107 | bool last; | 107 | bool last; |
108 | QDate start = QDate::currentDate(); | 108 | QDate start = QDate::currentDate(); |
109 | QDate next; | 109 | QDate next; |
110 | next = event->recurrence()->getPreviousDate( start , &last ); | 110 | next = event->recurrence()->getPreviousDate( start , &last ); |
111 | if ( !last ) { | 111 | if ( !last ) { |
112 | next = event->recurrence()->getNextDate( start.addDays( - 1 ) ); | 112 | next = event->recurrence()->getNextDate( start.addDays( - 1 ) ); |
113 | addTag("p",i18n("Next recurrence is on: ")+ KGlobal::locale()->formatDate( next, shortDate ) ); | 113 | addTag("p",i18n("Next recurrence is on: ")+ KGlobal::locale()->formatDate( next, shortDate ) ); |
114 | //addTag("p", KGlobal::locale()->formatDate( next, shortDate )); | 114 | //addTag("p", KGlobal::locale()->formatDate( next, shortDate )); |
115 | } else { | 115 | } else { |
116 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); | 116 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); |
117 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); | 117 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); |
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | 121 | ||
122 | if (event->isAlarmEnabled()) { | 122 | if (event->isAlarmEnabled()) { |
123 | Alarm *alarm =event->alarms().first() ; | 123 | Alarm *alarm =event->alarms().first() ; |
124 | QDateTime t = alarm->time(); | 124 | QDateTime t = alarm->time(); |
125 | int min = t.secsTo( event->dtStart() )/60; | 125 | int min = t.secsTo( event->dtStart() )/60; |
126 | QString s =i18n("(%1 min before)").arg( min ); | 126 | QString s =i18n("(%1 min before)").arg( min ); |
127 | addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate )); | 127 | addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate )); |
128 | //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 128 | //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
129 | //addTag("p",s); | 129 | //addTag("p",s); |
130 | } | 130 | } |
131 | 131 | ||
132 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); | 132 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); |
133 | // mText.append(event->secrecyStr()+"<br>"); | 133 | // mText.append(event->secrecyStr()+"<br>"); |
134 | formatCategories(event); | 134 | formatCategories(event); |
135 | if (!event->description().isEmpty()) { | 135 | if (!event->description().isEmpty()) { |
136 | addTag("p",i18n("<b>Details: </b>")); | 136 | addTag("p",i18n("<b>Details: </b>")); |
137 | addTag("p",event->description()); | 137 | addTag("p",event->description()); |
138 | } | 138 | } |
139 | 139 | ||
140 | 140 | ||
141 | formatReadOnly(event); | 141 | formatReadOnly(event); |
142 | formatAttendees(event); | 142 | formatAttendees(event); |
143 | 143 | ||
144 | 144 | ||
145 | } | 145 | } |
146 | 146 | ||
147 | void KIncidenceFormatter::setTodo(Todo *event ) | 147 | void KIncidenceFormatter::setTodo(Todo *event ) |
148 | { | 148 | { |
149 | int mode = 0; | 149 | int mode = 0; |
150 | mCurrentIncidence = event; | 150 | mCurrentIncidence = event; |
151 | bool shortDate = true; | 151 | bool shortDate = true; |
152 | if (mode == 0 ) | 152 | if (mode == 0 ) |
153 | addTag("h3",event->summary()); | 153 | addTag("h3",event->summary()); |
154 | else { | 154 | else { |
155 | if ( mColorMode == 1 ) { | 155 | if ( mColorMode == 1 ) { |
156 | mText +="<font color=\"#00A000\">"; | 156 | mText +="<font color=\"#00A000\">"; |
157 | } | 157 | } |
158 | if ( mColorMode == 2 ) { | 158 | if ( mColorMode == 2 ) { |
159 | mText +="<font color=\"#B00000\">"; | 159 | mText +="<font color=\"#B00000\">"; |
160 | } | 160 | } |
161 | if ( mode == 1 ) { | 161 | if ( mode == 1 ) { |
162 | addTag("h2",i18n( "Local: " ) +event->summary()); | 162 | addTag("h2",i18n( "Local: " ) +event->summary()); |
163 | } else { | 163 | } else { |
164 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 164 | addTag("h2",i18n( "Remote: " ) +event->summary()); |
165 | } | 165 | } |
166 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 166 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
167 | if ( mColorMode ) | 167 | if ( mColorMode ) |
168 | mText += "</font>"; | 168 | mText += "</font>"; |
169 | } | 169 | } |
170 | if (event->cancelled ()) { | 170 | if (event->cancelled ()) { |
171 | mText +="<font color=\"#B00000\">"; | 171 | mText +="<font color=\"#B00000\">"; |
172 | addTag("i",i18n("This todo has been cancelled!")); | 172 | addTag("i",i18n("This todo has been cancelled!")); |
173 | mText.append("<br>"); | 173 | mText.append("<br>"); |
174 | mText += "</font>"; | 174 | mText += "</font>"; |
175 | } | 175 | } |
176 | 176 | ||
177 | if (!event->location().isEmpty()) { | 177 | if (!event->location().isEmpty()) { |
178 | addTag("b",i18n("Location: ")); | 178 | addTag("b",i18n("Location: ")); |
179 | mText.append(event->location()+"<br>"); | 179 | mText.append(event->location()+"<br>"); |
180 | } | 180 | } |
181 | if (event->hasDueDate()) { | 181 | if (event->hasDueDate()) { |
182 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); | 182 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); |
183 | } | 183 | } |
184 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 184 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
185 | .arg(QString::number(event->priority()))); | 185 | .arg(QString::number(event->priority()))); |
186 | 186 | ||
187 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | ||
188 | mText.append(i18n("<p><i>Completed on %1</i></p>") | ||
189 | .arg( event->completedStr() )); | ||
190 | } else { | ||
187 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 191 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
188 | .arg(event->percentComplete())); | 192 | .arg(event->percentComplete())); |
193 | } | ||
194 | |||
189 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); | 195 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); |
190 | formatCategories(event); | 196 | formatCategories(event); |
191 | if (!event->description().isEmpty()) { | 197 | if (!event->description().isEmpty()) { |
192 | addTag("p",i18n("<b>Details: </b>")); | 198 | addTag("p",i18n("<b>Details: </b>")); |
193 | addTag("p",event->description()); | 199 | addTag("p",event->description()); |
194 | } | 200 | } |
195 | 201 | ||
196 | 202 | ||
197 | 203 | ||
198 | formatReadOnly(event); | 204 | formatReadOnly(event); |
199 | formatAttendees(event); | 205 | formatAttendees(event); |
200 | 206 | ||
201 | } | 207 | } |
202 | 208 | ||
203 | void KIncidenceFormatter::setJournal(Journal* ) | 209 | void KIncidenceFormatter::setJournal(Journal* ) |
204 | { | 210 | { |
205 | 211 | ||
206 | } | 212 | } |
207 | 213 | ||
208 | void KIncidenceFormatter::formatCategories(Incidence *event) | 214 | void KIncidenceFormatter::formatCategories(Incidence *event) |
209 | { | 215 | { |
210 | if (!event->categoriesStr().isEmpty()) { | 216 | if (!event->categoriesStr().isEmpty()) { |
211 | addTag("p",i18n("<b>Categories: </b>")+event->categoriesStr() ); | 217 | addTag("p",i18n("<b>Categories: </b>")+event->categoriesStr() ); |
212 | //mText.append(event->categoriesStr()); | 218 | //mText.append(event->categoriesStr()); |
213 | } | 219 | } |
214 | } | 220 | } |
215 | void KIncidenceFormatter::addTag(const QString & tag,const QString & text) | 221 | void KIncidenceFormatter::addTag(const QString & tag,const QString & text) |
216 | { | 222 | { |
217 | int number=text.contains("\n"); | 223 | int number=text.contains("\n"); |
218 | QString str = "<" + tag + ">"; | 224 | QString str = "<" + tag + ">"; |
219 | QString tmpText=text; | 225 | QString tmpText=text; |
220 | QString tmpStr=str; | 226 | QString tmpStr=str; |
221 | if(number !=-1) | 227 | if(number !=-1) |
222 | { | 228 | { |
223 | if (number > 0) { | 229 | if (number > 0) { |
224 | int pos=0; | 230 | int pos=0; |
225 | QString tmp; | 231 | QString tmp; |
226 | for(int i=0;i<=number;i++) { | 232 | for(int i=0;i<=number;i++) { |
227 | pos=tmpText.find("\n"); | 233 | pos=tmpText.find("\n"); |
228 | tmp=tmpText.left(pos); | 234 | tmp=tmpText.left(pos); |
229 | tmpText=tmpText.right(tmpText.length()-pos-1); | 235 | tmpText=tmpText.right(tmpText.length()-pos-1); |
230 | tmpStr+=tmp+"<br>"; | 236 | tmpStr+=tmp+"<br>"; |
231 | } | 237 | } |
232 | } | 238 | } |
233 | else tmpStr += tmpText; | 239 | else tmpStr += tmpText; |
234 | tmpStr+="</" + tag + ">"; | 240 | tmpStr+="</" + tag + ">"; |
235 | mText.append(tmpStr); | 241 | mText.append(tmpStr); |
236 | } | 242 | } |
237 | else | 243 | else |
238 | { | 244 | { |
239 | str += text + "</" + tag + ">"; | 245 | str += text + "</" + tag + ">"; |
240 | mText.append(str); | 246 | mText.append(str); |
241 | } | 247 | } |
242 | } | 248 | } |
243 | 249 | ||
244 | void KIncidenceFormatter::formatAttendees(Incidence *event) | 250 | void KIncidenceFormatter::formatAttendees(Incidence *event) |
245 | { | 251 | { |
246 | QPtrList<Attendee> attendees = event->attendees(); | 252 | QPtrList<Attendee> attendees = event->attendees(); |
247 | if (attendees.count()) { | 253 | if (attendees.count()) { |
248 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 254 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
255 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); | ||
249 | addTag("h3",i18n("Organizer")); | 256 | addTag("h3",i18n("Organizer")); |
250 | mText.append("<ul><li>"); | 257 | mText.append("<ul><li>"); |
251 | #if 0 | 258 | #if 0 |
252 | //ndef KORG_NOKABC | 259 | //ndef KORG_NOKABC |
253 | 260 | ||
254 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 261 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
255 | KABC::Addressee::List addressList; | 262 | KABC::Addressee::List addressList; |
256 | addressList = add_book->findByEmail(event->organizer()); | 263 | addressList = add_book->findByEmail(event->organizer()); |
257 | KABC::Addressee o = addressList.first(); | 264 | KABC::Addressee o = addressList.first(); |
258 | if (!o.isEmpty() && addressList.size()<2) { | 265 | if (!o.isEmpty() && addressList.size()<2) { |
259 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 266 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
260 | mText += o.formattedName(); | 267 | mText += o.formattedName(); |
261 | mText += "</a>\n"; | 268 | mText += "</a>\n"; |
262 | } else { | 269 | } else { |
263 | mText.append(event->organizer()); | 270 | mText.append(event->organizer()); |
264 | } | 271 | } |
265 | #else | 272 | #else |
266 | mText.append(event->organizer()); | 273 | mText.append(event->organizer()); |
267 | #endif | 274 | #endif |
268 | if (iconPath) { | 275 | if (iconPath) { |
269 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; | 276 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; |
270 | mText += "<IMG src=\"" + iconPath + "\">"; | 277 | mText += "<IMG src=\"" + iconPath + "\">"; |
271 | mText += "</a>\n"; | 278 | mText += "</a>\n"; |
272 | } | 279 | } |
273 | mText.append("</li></ul>"); | 280 | mText.append("</li></ul>"); |
274 | 281 | ||
275 | addTag("h3",i18n("Attendees")); | 282 | addTag("h3",i18n("Attendees")); |
276 | Attendee *a; | 283 | Attendee *a; |
277 | mText.append("<ul>"); | 284 | mText.append("<ul>"); |
278 | for(a=attendees.first();a;a=attendees.next()) { | 285 | for(a=attendees.first();a;a=attendees.next()) { |
279 | #if 0 | 286 | #if 0 |
280 | //ndef KORG_NOKABC | 287 | //ndef KORG_NOKABC |
281 | if (a->name().isEmpty()) { | 288 | if (a->name().isEmpty()) { |
282 | addressList = add_book->findByEmail(a->email()); | 289 | addressList = add_book->findByEmail(a->email()); |
283 | KABC::Addressee o = addressList.first(); | 290 | KABC::Addressee o = addressList.first(); |
284 | if (!o.isEmpty() && addressList.size()<2) { | 291 | if (!o.isEmpty() && addressList.size()<2) { |
285 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 292 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
286 | mText += o.formattedName(); | 293 | mText += o.formattedName(); |
287 | mText += "</a>\n"; | 294 | mText += "</a>\n"; |
288 | } else { | 295 | } else { |
289 | mText += "<li>"; | 296 | mText += "<li>"; |
290 | mText.append(a->email()); | 297 | mText.append(a->email()); |
291 | mText += "\n"; | 298 | mText += "\n"; |
292 | } | 299 | } |
293 | } else { | 300 | } else { |
294 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 301 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
295 | if (!a->name().isEmpty()) mText += a->name(); | 302 | if (!a->name().isEmpty()) mText += a->name(); |
296 | else mText += a->email(); | 303 | else mText += a->email(); |
297 | mText += "</a>\n"; | 304 | mText += "</a>\n"; |
298 | } | 305 | } |
299 | #else | 306 | #else |
300 | //qDebug("nokabc "); | 307 | //qDebug("nokabc "); |
301 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 308 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
302 | if (!a->name().isEmpty()) mText += a->name(); | 309 | if (!a->name().isEmpty()) mText += a->name(); |
303 | else mText += a->email(); | 310 | else mText += a->email(); |
304 | mText += "</a>\n"; | 311 | mText += "</a>\n"; |
305 | #endif | 312 | #endif |
306 | 313 | ||
307 | if (!a->email().isEmpty()) { | 314 | if (!a->email().isEmpty()) { |
308 | if (iconPath) { | 315 | if (iconPath) { |
309 | mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; | 316 | mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; |
310 | mText += "<IMG src=\"" + iconPath + "\">"; | 317 | if ( a->RSVP() ) |
318 | mText += "<IMG src=\"" + iconPath + "\">"; | ||
319 | else | ||
320 | mText += "<IMG src=\"" + NOiconPath + "\">"; | ||
311 | mText += "</a>\n"; | 321 | mText += "</a>\n"; |
312 | } | 322 | } |
313 | } | 323 | } |
314 | if (a->status() != Attendee::NeedsAction ) | 324 | if (a->status() != Attendee::NeedsAction ) |
315 | mText +="[" + a->statusStr() + "] "; | 325 | mText +="[" + a->statusStr() + "] "; |
316 | if (a->role() == Attendee::Chair ) | 326 | if (a->role() == Attendee::Chair ) |
317 | mText +="(" + a->roleStr().left(1) + ".)"; | 327 | mText +="(" + a->roleStr().left(1) + ".)"; |
318 | } | 328 | } |
319 | mText.append("</li></ul>"); | 329 | mText.append("</li></ul>"); |
320 | } | 330 | } |
321 | } | 331 | } |
322 | 332 | ||
323 | void KIncidenceFormatter::formatReadOnly(Incidence *event) | 333 | void KIncidenceFormatter::formatReadOnly(Incidence *event) |
324 | { | 334 | { |
325 | if (event->isReadOnly()) { | 335 | if (event->isReadOnly()) { |
326 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); | 336 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); |
327 | } | 337 | } |
328 | } | 338 | } |
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 3d2de61..7362bdf 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -35,340 +35,345 @@ Todo::Todo(): Incidence() | |||
35 | mCompleted = getEvenTime(QDateTime::currentDateTime()); | 35 | mCompleted = getEvenTime(QDateTime::currentDateTime()); |
36 | mHasCompletedDate = false; | 36 | mHasCompletedDate = false; |
37 | mPercentComplete = 0; | 37 | mPercentComplete = 0; |
38 | } | 38 | } |
39 | 39 | ||
40 | Todo::Todo(const Todo &t) : Incidence(t) | 40 | Todo::Todo(const Todo &t) : Incidence(t) |
41 | { | 41 | { |
42 | mDtDue = t.mDtDue; | 42 | mDtDue = t.mDtDue; |
43 | mHasDueDate = t.mHasDueDate; | 43 | mHasDueDate = t.mHasDueDate; |
44 | mCompleted = t.mCompleted; | 44 | mCompleted = t.mCompleted; |
45 | mHasCompletedDate = t.mHasCompletedDate; | 45 | mHasCompletedDate = t.mHasCompletedDate; |
46 | mPercentComplete = t.mPercentComplete; | 46 | mPercentComplete = t.mPercentComplete; |
47 | } | 47 | } |
48 | 48 | ||
49 | Todo::~Todo() | 49 | Todo::~Todo() |
50 | { | 50 | { |
51 | 51 | ||
52 | } | 52 | } |
53 | 53 | ||
54 | Incidence *Todo::clone() | 54 | Incidence *Todo::clone() |
55 | { | 55 | { |
56 | return new Todo(*this); | 56 | return new Todo(*this); |
57 | } | 57 | } |
58 | 58 | ||
59 | bool Todo::contains ( Todo* from ) | 59 | bool Todo::contains ( Todo* from ) |
60 | { | 60 | { |
61 | 61 | ||
62 | if ( !from->summary().isEmpty() ) | 62 | if ( !from->summary().isEmpty() ) |
63 | if ( !summary().startsWith( from->summary() )) | 63 | if ( !summary().startsWith( from->summary() )) |
64 | return false; | 64 | return false; |
65 | if ( from->hasStartDate() ) { | 65 | if ( from->hasStartDate() ) { |
66 | if ( !hasStartDate() ) | 66 | if ( !hasStartDate() ) |
67 | return false; | 67 | return false; |
68 | if ( from->dtStart() != dtStart()) | 68 | if ( from->dtStart() != dtStart()) |
69 | return false; | 69 | return false; |
70 | } | 70 | } |
71 | if ( from->hasDueDate() ){ | 71 | if ( from->hasDueDate() ){ |
72 | if ( !hasDueDate() ) | 72 | if ( !hasDueDate() ) |
73 | return false; | 73 | return false; |
74 | if ( from->dtDue() != dtDue()) | 74 | if ( from->dtDue() != dtDue()) |
75 | return false; | 75 | return false; |
76 | } | 76 | } |
77 | if ( !from->location().isEmpty() ) | 77 | if ( !from->location().isEmpty() ) |
78 | if ( !location().startsWith( from->location() ) ) | 78 | if ( !location().startsWith( from->location() ) ) |
79 | return false; | 79 | return false; |
80 | if ( !from->description().isEmpty() ) | 80 | if ( !from->description().isEmpty() ) |
81 | if ( !description().startsWith( from->description() )) | 81 | if ( !description().startsWith( from->description() )) |
82 | return false; | 82 | return false; |
83 | if ( from->alarms().count() ) { | 83 | if ( from->alarms().count() ) { |
84 | Alarm *a = from->alarms().first(); | 84 | Alarm *a = from->alarms().first(); |
85 | if ( a->enabled() ){ | 85 | if ( a->enabled() ){ |
86 | if ( !alarms().count() ) | 86 | if ( !alarms().count() ) |
87 | return false; | 87 | return false; |
88 | Alarm *b = alarms().first(); | 88 | Alarm *b = alarms().first(); |
89 | if( ! b->enabled() ) | 89 | if( ! b->enabled() ) |
90 | return false; | 90 | return false; |
91 | if ( ! (a->offset() == b->offset() )) | 91 | if ( ! (a->offset() == b->offset() )) |
92 | return false; | 92 | return false; |
93 | } | 93 | } |
94 | } | 94 | } |
95 | 95 | ||
96 | QStringList cat = categories(); | 96 | QStringList cat = categories(); |
97 | QStringList catFrom = from->categories(); | 97 | QStringList catFrom = from->categories(); |
98 | QString nCat; | 98 | QString nCat; |
99 | int iii; | 99 | int iii; |
100 | for ( iii = 0; iii < catFrom.count();++iii ) { | 100 | for ( iii = 0; iii < catFrom.count();++iii ) { |
101 | nCat = catFrom[iii]; | 101 | nCat = catFrom[iii]; |
102 | if ( !nCat.isEmpty() ) | 102 | if ( !nCat.isEmpty() ) |
103 | if ( !cat.contains( nCat )) { | 103 | if ( !cat.contains( nCat )) { |
104 | return false; | 104 | return false; |
105 | } | 105 | } |
106 | } | 106 | } |
107 | if ( from->isCompleted() ) { | 107 | if ( from->isCompleted() ) { |
108 | if ( !isCompleted() ) | 108 | if ( !isCompleted() ) |
109 | return false; | 109 | return false; |
110 | } | 110 | } |
111 | if( priority() != from->priority() ) | 111 | if( priority() != from->priority() ) |
112 | return false; | 112 | return false; |
113 | 113 | ||
114 | 114 | ||
115 | return true; | 115 | return true; |
116 | 116 | ||
117 | } | 117 | } |
118 | bool KCal::operator==( const Todo& t1, const Todo& t2 ) | 118 | bool KCal::operator==( const Todo& t1, const Todo& t2 ) |
119 | { | 119 | { |
120 | 120 | ||
121 | bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); | 121 | bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); |
122 | if ( ! ret ) | 122 | if ( ! ret ) |
123 | return false; | 123 | return false; |
124 | if ( t1.hasDueDate() == t2.hasDueDate() ) { | 124 | if ( t1.hasDueDate() == t2.hasDueDate() ) { |
125 | if ( t1.hasDueDate() ) { | 125 | if ( t1.hasDueDate() ) { |
126 | if ( t1.doesFloat() == t2.doesFloat() ) { | 126 | if ( t1.doesFloat() == t2.doesFloat() ) { |
127 | if ( t1.doesFloat() ) { | 127 | if ( t1.doesFloat() ) { |
128 | if ( t1.dtDue().date() != t2.dtDue().date() ) | 128 | if ( t1.dtDue().date() != t2.dtDue().date() ) |
129 | return false; | 129 | return false; |
130 | } else | 130 | } else |
131 | if ( t1.dtDue() != t2.dtDue() ) | 131 | if ( t1.dtDue() != t2.dtDue() ) |
132 | return false; | 132 | return false; |
133 | } else | 133 | } else |
134 | return false;// float != | 134 | return false;// float != |
135 | } | 135 | } |
136 | 136 | ||
137 | } else | 137 | } else |
138 | return false; | 138 | return false; |
139 | if ( t1.percentComplete() != t2.percentComplete() ) | 139 | if ( t1.percentComplete() != t2.percentComplete() ) |
140 | return false; | 140 | return false; |
141 | if ( t1.isCompleted() ) { | 141 | if ( t1.isCompleted() ) { |
142 | if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) { | 142 | if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) { |
143 | if ( t1.hasCompletedDate() ) { | 143 | if ( t1.hasCompletedDate() ) { |
144 | if ( t1.completed() != t2.completed() ) | 144 | if ( t1.completed() != t2.completed() ) |
145 | return false; | 145 | return false; |
146 | } | 146 | } |
147 | 147 | ||
148 | } else | 148 | } else |
149 | return false; | 149 | return false; |
150 | } | 150 | } |
151 | return true; | 151 | return true; |
152 | 152 | ||
153 | } | 153 | } |
154 | 154 | ||
155 | void Todo::setDtDue(const QDateTime &dtDue) | 155 | void Todo::setDtDue(const QDateTime &dtDue) |
156 | { | 156 | { |
157 | //int diffsecs = mDtDue.secsTo(dtDue); | 157 | //int diffsecs = mDtDue.secsTo(dtDue); |
158 | 158 | ||
159 | /*if (mReadOnly) return; | 159 | /*if (mReadOnly) return; |
160 | const QPtrList<Alarm>& alarms = alarms(); | 160 | const QPtrList<Alarm>& alarms = alarms(); |
161 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) { | 161 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) { |
162 | if (alarm->enabled()) { | 162 | if (alarm->enabled()) { |
163 | alarm->setTime(alarm->time().addSecs(diffsecs)); | 163 | alarm->setTime(alarm->time().addSecs(diffsecs)); |
164 | } | 164 | } |
165 | }*/ | 165 | }*/ |
166 | mDtDue = getEvenTime(dtDue); | 166 | mDtDue = getEvenTime(dtDue); |
167 | 167 | ||
168 | //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl; | 168 | //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl; |
169 | 169 | ||
170 | /*const QPtrList<Alarm>& alarms = alarms(); | 170 | /*const QPtrList<Alarm>& alarms = alarms(); |
171 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) | 171 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) |
172 | alarm->setAlarmStart(mDtDue);*/ | 172 | alarm->setAlarmStart(mDtDue);*/ |
173 | 173 | ||
174 | updated(); | 174 | updated(); |
175 | } | 175 | } |
176 | 176 | ||
177 | QDateTime Todo::dtDue() const | 177 | QDateTime Todo::dtDue() const |
178 | { | 178 | { |
179 | return mDtDue; | 179 | return mDtDue; |
180 | } | 180 | } |
181 | 181 | ||
182 | QString Todo::dtDueTimeStr() const | 182 | QString Todo::dtDueTimeStr() const |
183 | { | 183 | { |
184 | return KGlobal::locale()->formatTime(mDtDue.time()); | 184 | return KGlobal::locale()->formatTime(mDtDue.time()); |
185 | } | 185 | } |
186 | 186 | ||
187 | QString Todo::dtDueDateStr(bool shortfmt) const | 187 | QString Todo::dtDueDateStr(bool shortfmt) const |
188 | { | 188 | { |
189 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); | 189 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); |
190 | } | 190 | } |
191 | 191 | ||
192 | QString Todo::dtDueStr(bool shortfmt) const | 192 | QString Todo::dtDueStr(bool shortfmt) const |
193 | { | 193 | { |
194 | return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); | 194 | return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); |
195 | } | 195 | } |
196 | 196 | ||
197 | bool Todo::hasDueDate() const | 197 | bool Todo::hasDueDate() const |
198 | { | 198 | { |
199 | return mHasDueDate; | 199 | return mHasDueDate; |
200 | } | 200 | } |
201 | 201 | ||
202 | void Todo::setHasDueDate(bool f) | 202 | void Todo::setHasDueDate(bool f) |
203 | { | 203 | { |
204 | if (mReadOnly) return; | 204 | if (mReadOnly) return; |
205 | mHasDueDate = f; | 205 | mHasDueDate = f; |
206 | updated(); | 206 | updated(); |
207 | } | 207 | } |
208 | 208 | ||
209 | 209 | ||
210 | #if 0 | 210 | #if 0 |
211 | void Todo::setStatus(const QString &statStr) | 211 | void Todo::setStatus(const QString &statStr) |
212 | { | 212 | { |
213 | if (mReadOnly) return; | 213 | if (mReadOnly) return; |
214 | QString ss(statStr.upper()); | 214 | QString ss(statStr.upper()); |
215 | 215 | ||
216 | if (ss == "X-ACTION") | 216 | if (ss == "X-ACTION") |
217 | mStatus = NEEDS_ACTION; | 217 | mStatus = NEEDS_ACTION; |
218 | else if (ss == "NEEDS ACTION") | 218 | else if (ss == "NEEDS ACTION") |
219 | mStatus = NEEDS_ACTION; | 219 | mStatus = NEEDS_ACTION; |
220 | else if (ss == "ACCEPTED") | 220 | else if (ss == "ACCEPTED") |
221 | mStatus = ACCEPTED; | 221 | mStatus = ACCEPTED; |
222 | else if (ss == "SENT") | 222 | else if (ss == "SENT") |
223 | mStatus = SENT; | 223 | mStatus = SENT; |
224 | else if (ss == "TENTATIVE") | 224 | else if (ss == "TENTATIVE") |
225 | mStatus = TENTATIVE; | 225 | mStatus = TENTATIVE; |
226 | else if (ss == "CONFIRMED") | 226 | else if (ss == "CONFIRMED") |
227 | mStatus = CONFIRMED; | 227 | mStatus = CONFIRMED; |
228 | else if (ss == "DECLINED") | 228 | else if (ss == "DECLINED") |
229 | mStatus = DECLINED; | 229 | mStatus = DECLINED; |
230 | else if (ss == "COMPLETED") | 230 | else if (ss == "COMPLETED") |
231 | mStatus = COMPLETED; | 231 | mStatus = COMPLETED; |
232 | else if (ss == "DELEGATED") | 232 | else if (ss == "DELEGATED") |
233 | mStatus = DELEGATED; | 233 | mStatus = DELEGATED; |
234 | 234 | ||
235 | updated(); | 235 | updated(); |
236 | } | 236 | } |
237 | 237 | ||
238 | void Todo::setStatus(int status) | 238 | void Todo::setStatus(int status) |
239 | { | 239 | { |
240 | if (mReadOnly) return; | 240 | if (mReadOnly) return; |
241 | mStatus = status; | 241 | mStatus = status; |
242 | updated(); | 242 | updated(); |
243 | } | 243 | } |
244 | 244 | ||
245 | int Todo::status() const | 245 | int Todo::status() const |
246 | { | 246 | { |
247 | return mStatus; | 247 | return mStatus; |
248 | } | 248 | } |
249 | 249 | ||
250 | QString Todo::statusStr() const | 250 | QString Todo::statusStr() const |
251 | { | 251 | { |
252 | switch(mStatus) { | 252 | switch(mStatus) { |
253 | case NEEDS_ACTION: | 253 | case NEEDS_ACTION: |
254 | return QString("NEEDS ACTION"); | 254 | return QString("NEEDS ACTION"); |
255 | break; | 255 | break; |
256 | case ACCEPTED: | 256 | case ACCEPTED: |
257 | return QString("ACCEPTED"); | 257 | return QString("ACCEPTED"); |
258 | break; | 258 | break; |
259 | case SENT: | 259 | case SENT: |
260 | return QString("SENT"); | 260 | return QString("SENT"); |
261 | break; | 261 | break; |
262 | case TENTATIVE: | 262 | case TENTATIVE: |
263 | return QString("TENTATIVE"); | 263 | return QString("TENTATIVE"); |
264 | break; | 264 | break; |
265 | case CONFIRMED: | 265 | case CONFIRMED: |
266 | return QString("CONFIRMED"); | 266 | return QString("CONFIRMED"); |
267 | break; | 267 | break; |
268 | case DECLINED: | 268 | case DECLINED: |
269 | return QString("DECLINED"); | 269 | return QString("DECLINED"); |
270 | break; | 270 | break; |
271 | case COMPLETED: | 271 | case COMPLETED: |
272 | return QString("COMPLETED"); | 272 | return QString("COMPLETED"); |
273 | break; | 273 | break; |
274 | case DELEGATED: | 274 | case DELEGATED: |
275 | return QString("DELEGATED"); | 275 | return QString("DELEGATED"); |
276 | break; | 276 | break; |
277 | } | 277 | } |
278 | return QString(""); | 278 | return QString(""); |
279 | } | 279 | } |
280 | #endif | 280 | #endif |
281 | 281 | ||
282 | bool Todo::isCompleted() const | 282 | bool Todo::isCompleted() const |
283 | { | 283 | { |
284 | if (mPercentComplete == 100) return true; | 284 | if (mPercentComplete == 100) return true; |
285 | else return false; | 285 | else return false; |
286 | } | 286 | } |
287 | 287 | ||
288 | void Todo::setCompleted(bool completed) | 288 | void Todo::setCompleted(bool completed) |
289 | { | 289 | { |
290 | if (completed) mPercentComplete = 100; | 290 | if (completed) mPercentComplete = 100; |
291 | else mPercentComplete = 0; | 291 | else { |
292 | mPercentComplete = 0; | ||
293 | mHasCompletedDate = false; | ||
294 | } | ||
292 | updated(); | 295 | updated(); |
293 | } | 296 | } |
294 | 297 | ||
295 | QDateTime Todo::completed() const | 298 | QDateTime Todo::completed() const |
296 | { | 299 | { |
297 | return mCompleted; | 300 | return mCompleted; |
298 | } | 301 | } |
299 | 302 | ||
300 | QString Todo::completedStr() const | 303 | QString Todo::completedStr() const |
301 | { | 304 | { |
302 | return KGlobal::locale()->formatDateTime(mCompleted); | 305 | return KGlobal::locale()->formatDateTime(mCompleted); |
303 | } | 306 | } |
304 | 307 | ||
305 | void Todo::setCompleted(const QDateTime &completed) | 308 | void Todo::setCompleted(const QDateTime &completed) |
306 | { | 309 | { |
307 | mHasCompletedDate = true; | 310 | mHasCompletedDate = true; |
308 | mPercentComplete = 100; | 311 | mPercentComplete = 100; |
309 | mCompleted = getEvenTime(completed); | 312 | mCompleted = getEvenTime(completed); |
310 | updated(); | 313 | updated(); |
311 | } | 314 | } |
312 | 315 | ||
313 | bool Todo::hasCompletedDate() const | 316 | bool Todo::hasCompletedDate() const |
314 | { | 317 | { |
315 | return mHasCompletedDate; | 318 | return mHasCompletedDate; |
316 | } | 319 | } |
317 | 320 | ||
318 | int Todo::percentComplete() const | 321 | int Todo::percentComplete() const |
319 | { | 322 | { |
320 | return mPercentComplete; | 323 | return mPercentComplete; |
321 | } | 324 | } |
322 | 325 | ||
323 | void Todo::setPercentComplete(int v) | 326 | void Todo::setPercentComplete(int v) |
324 | { | 327 | { |
325 | mPercentComplete = v; | 328 | mPercentComplete = v; |
329 | if ( v != 100 ) | ||
330 | mHasCompletedDate = false; | ||
326 | updated(); | 331 | updated(); |
327 | } | 332 | } |
328 | QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const | 333 | QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const |
329 | { | 334 | { |
330 | if ( isCompleted() || ! hasDueDate() || cancelled() ) { | 335 | if ( isCompleted() || ! hasDueDate() || cancelled() ) { |
331 | *ok = false; | 336 | *ok = false; |
332 | return QDateTime (); | 337 | return QDateTime (); |
333 | } | 338 | } |
334 | QDateTime incidenceStart; | 339 | QDateTime incidenceStart; |
335 | incidenceStart = dtDue(); | 340 | incidenceStart = dtDue(); |
336 | bool enabled = false; | 341 | bool enabled = false; |
337 | Alarm* alarm; | 342 | Alarm* alarm; |
338 | int off; | 343 | int off; |
339 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; | 344 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; |
340 | // if ( QDateTime::currentDateTime() > incidenceStart ){ | 345 | // if ( QDateTime::currentDateTime() > incidenceStart ){ |
341 | // *ok = false; | 346 | // *ok = false; |
342 | // return incidenceStart; | 347 | // return incidenceStart; |
343 | // } | 348 | // } |
344 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 349 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |
345 | if (alarm->enabled()) { | 350 | if (alarm->enabled()) { |
346 | if ( alarm->hasTime () ) { | 351 | if ( alarm->hasTime () ) { |
347 | if ( alarm->time() < alarmStart ) { | 352 | if ( alarm->time() < alarmStart ) { |
348 | alarmStart = alarm->time(); | 353 | alarmStart = alarm->time(); |
349 | enabled = true; | 354 | enabled = true; |
350 | off = alarmStart.secsTo( incidenceStart ); | 355 | off = alarmStart.secsTo( incidenceStart ); |
351 | } | 356 | } |
352 | 357 | ||
353 | } else { | 358 | } else { |
354 | int secs = alarm->startOffset().asSeconds(); | 359 | int secs = alarm->startOffset().asSeconds(); |
355 | if ( incidenceStart.addSecs( secs ) < alarmStart ) { | 360 | if ( incidenceStart.addSecs( secs ) < alarmStart ) { |
356 | alarmStart = incidenceStart.addSecs( secs ); | 361 | alarmStart = incidenceStart.addSecs( secs ); |
357 | enabled = true; | 362 | enabled = true; |
358 | off = -secs; | 363 | off = -secs; |
359 | } | 364 | } |
360 | } | 365 | } |
361 | } | 366 | } |
362 | } | 367 | } |
363 | if ( enabled ) { | 368 | if ( enabled ) { |
364 | if ( alarmStart > QDateTime::currentDateTime() ) { | 369 | if ( alarmStart > QDateTime::currentDateTime() ) { |
365 | *ok = true; | 370 | *ok = true; |
366 | * offset = off; | 371 | * offset = off; |
367 | return alarmStart; | 372 | return alarmStart; |
368 | } | 373 | } |
369 | } | 374 | } |
370 | *ok = false; | 375 | *ok = false; |
371 | return QDateTime (); | 376 | return QDateTime (); |
372 | 377 | ||
373 | } | 378 | } |
374 | 379 | ||