author | zautrix <zautrix> | 2005-06-08 12:35:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-08 12:35:38 (UTC) |
commit | d9e240cf1a88f4213c9169e9168d01b669613312 (patch) (unidiff) | |
tree | ed22cb872cc0f38625afe0f01036a48eb9b3edfa | |
parent | 2448916479b456ca7c880427a80e8e32e95b2fba (diff) | |
download | kdepimpi-d9e240cf1a88f4213c9169e9168d01b669613312.zip kdepimpi-d9e240cf1a88f4213c9169e9168d01b669613312.tar.gz kdepimpi-d9e240cf1a88f4213c9169e9168d01b669613312.tar.bz2 |
better export
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 35 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 25 | ||||
-rw-r--r-- | korganizer/searchdialog.h | 1 | ||||
-rw-r--r-- | libkcal/incidence.cpp | 11 | ||||
-rw-r--r-- | libkcal/incidence.h | 2 |
6 files changed, 61 insertions, 15 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 8f28234..7fa63f4 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -993,389 +993,389 @@ | |||
993 | { "<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" }, | 993 | { "<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" }, |
994 | { "<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" }, | 994 | { "<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" }, |
995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
996 | { "<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" }, | 996 | { "<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" }, |
997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
998 | { "<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" }, | 998 | { "<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" }, |
999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1000 | { "<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" }, | 1000 | { "<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" }, |
1001 | { "<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" }, | 1001 | { "<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" }, |
1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1003 | { "<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" }, | 1003 | { "<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" }, |
1004 | { "<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" }, | 1004 | { "<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" }, |
1005 | { "<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" }, | 1005 | { "<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" }, |
1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1011 | { "<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" }, | 1011 | { "<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" }, |
1012 | { "<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" }, | 1012 | { "<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" }, |
1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1015 | { "<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" }, | 1015 | { "<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" }, |
1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1017 | { "<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" }, | 1017 | { "<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" }, |
1018 | { "<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" }, | 1018 | { "<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" }, |
1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, | 1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, | 1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, |
1021 | { "<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" }, | 1021 | { "<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" }, |
1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1023 | { "<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" }, | 1023 | { "<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" }, |
1024 | { "<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" }, | 1024 | { "<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" }, |
1025 | { "<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" }, | 1025 | { "<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" }, |
1026 | { "<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" }, | 1026 | { "<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" }, |
1027 | { "<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" }, | 1027 | { "<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" }, |
1028 | { "<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" }, | 1028 | { "<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" }, |
1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1030 | { "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" }, | 1030 | { "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" }, |
1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1035 | { "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" }, | 1035 | { "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" }, |
1036 | { "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" }, | 1036 | { "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" }, |
1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1042 | { "From: ","Von: " }, | 1042 | { "From: ","Von: " }, |
1043 | { "Remove sync info","Entferne Sync Info" }, | 1043 | { "Remove sync info","Entferne Sync Info" }, |
1044 | { "For all profiles","Für alle Profile" }, | 1044 | { "For all profiles","Für alle Profile" }, |
1045 | { "Hide not Running","Verstecke nicht Laufende" }, | 1045 | { "Hide not Running","Verstecke nicht Laufende" }, |
1046 | { "ME","ME" }, | 1046 | { "ME","ME" }, |
1047 | { "Toolbar","Toolbar" }, | 1047 | { "Toolbar","Toolbar" }, |
1048 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1048 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1049 | { "Undo Delete","Löschen rückgängig machen" }, | 1049 | { "Undo Delete","Löschen rückgängig machen" }, |
1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1052 | { "Januar","Januar" }, | 1052 | { "Januar","Januar" }, |
1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1054 | { "No Filter","Kein Filter" }, | 1054 | { "No Filter","Kein Filter" }, |
1055 | { "Multiple Sync options","Multi Sync Optionen" }, | 1055 | { "Multiple Sync options","Multi Sync Optionen" }, |
1056 | { "Sync algo options","Sync Ablauf Optionen" }, | 1056 | { "Sync algo options","Sync Ablauf Optionen" }, |
1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1060 | { "Write back options","Optionen zum Zurückschreiben" }, | 1060 | { "Write back options","Optionen zum Zurückschreiben" }, |
1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1066 | { "Time period","Zeitspanne" }, | 1066 | { "Time period","Zeitspanne" }, |
1067 | { "From ","Von " }, | 1067 | { "From ","Von " }, |
1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1069 | { " weeks in the future "," Wochen in der Zukunft " }, | 1069 | { " weeks in the future "," Wochen in der Zukunft " }, |
1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1071 | { "Local temp file:","Lokale temp Datei:" }, | 1071 | { "Local temp file:","Lokale temp Datei:" }, |
1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1074 | { "Language","Sprache" }, | 1074 | { "Language","Sprache" }, |
1075 | { "Time Format","Zeit Format" }, | 1075 | { "Time Format","Zeit Format" }, |
1076 | { "Time Zone","Zeit Zone" }, | 1076 | { "Time Zone","Zeit Zone" }, |
1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1078 | { "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" }, | 1078 | { "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" }, |
1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1081 | { "Save settings","Speichere Einstellungen" }, | 1081 | { "Save settings","Speichere Einstellungen" }, |
1082 | { "Save standard","Speichere Standard" }, | 1082 | { "Save standard","Speichere Standard" }, |
1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1085 | { "Data storage path","Daten Speicherpfad" }, | 1085 | { "Data storage path","Daten Speicherpfad" }, |
1086 | { "Language","Sprache" }, | 1086 | { "Language","Sprache" }, |
1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1089 | { "Show events that are done","Zeige abgelaufene Termine" }, | 1089 | { "Show events that are done","Zeige abgelaufene Termine" }, |
1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1092 | { "KO/Pi","KO/Pi" }, | 1092 | { "KO/Pi","KO/Pi" }, |
1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1095 | { "Sound.Al.: ","Sound.Al.: " }, | 1095 | { "Sound.Al.: ","Sound.Al.: " }, |
1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1097 | { "Restore","Wiederherstellen" }, | 1097 | { "Restore","Wiederherstellen" }, |
1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1099 | { "% completed","% erledigt" }, | 1099 | { "% completed","% erledigt" }, |
1100 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1100 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1101 | { "Set complete","Setze auf erledigt" }, | 1101 | { "Set complete","Setze auf erledigt" }, |
1102 | { "(cancelled)","(gecancelt)" }, | 1102 | { "(cancelled)","(gecancelt)" }, |
1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1104 | { " Local time "," Locale Zeit " }, | 1104 | { " Local time "," Locale Zeit " }, |
1105 | { "Form2","Form2" }, | 1105 | { "Form2","Form2" }, |
1106 | { "Filter enabled","Filter angeschaltet" }, | 1106 | { "Filter enabled","Filter angeschaltet" }, |
1107 | { "Edit Filters","Ändere Filter" }, | 1107 | { "Edit Filters","Ändere Filter" }, |
1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1109 | { "Agenda","Agenda" }, | 1109 | { "Agenda","Agenda" }, |
1110 | { " ("," (" }, | 1110 | { " ("," (" }, |
1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1112 | { "Print","Print" }, | 1112 | { "Print","Print" }, |
1113 | { "&Setup Printer...","Drucker &Setup..." }, | 1113 | { "&Setup Printer...","Drucker &Setup..." }, |
1114 | { "View Type","Zeige Typ" }, | 1114 | { "View Type","Zeige Typ" }, |
1115 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1115 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1118 | { "Portrait","Portrait" }, | 1118 | { "Portrait","Portrait" }, |
1119 | { "Landscape","Landschaft" }, | 1119 | { "Landscape","Landschaft" }, |
1120 | { "Print day","Drucke Tag" }, | 1120 | { "Print day","Drucke Tag" }, |
1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1122 | { "Date && Time Range","Datum && Zeitspanne" }, | 1122 | { "Date && Time Range","Datum && Zeitspanne" }, |
1123 | { "&End date:","&Enddatum:" }, | 1123 | { "&End date:","&Enddatum:" }, |
1124 | { "&Start date:","&Startdatum:" }, | 1124 | { "&Start date:","&Startdatum:" }, |
1125 | { "Start &time:","Startzeit:" }, | 1125 | { "Start &time:","Startzeit:" }, |
1126 | { "End ti&me:","Endzeit:" }, | 1126 | { "End ti&me:","Endzeit:" }, |
1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1129 | { "Alt+D","Alt+D" }, | 1129 | { "Alt+D","Alt+D" }, |
1130 | { "&Use colors","Nutze Farben" }, | 1130 | { "&Use colors","Nutze Farben" }, |
1131 | { "Alt+U","Alt+U" }, | 1131 | { "Alt+U","Alt+U" }, |
1132 | { "Print week","Drucke Woche" }, | 1132 | { "Print week","Drucke Woche" }, |
1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1134 | { "Use &colors","Nutze Farben" }, | 1134 | { "Use &colors","Nutze Farben" }, |
1135 | { "Type of View","Typ der Ansicht" }, | 1135 | { "Type of View","Typ der Ansicht" }, |
1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1137 | { "Alt+F","Alt+F" }, | 1137 | { "Alt+F","Alt+F" }, |
1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1139 | { "Alt+T","Alt+T" }, | 1139 | { "Alt+T","Alt+T" }, |
1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1141 | { "Print month","Drucke Monat" }, | 1141 | { "Print month","Drucke Monat" }, |
1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1143 | { "&Start month:","&Startmonat:" }, | 1143 | { "&Start month:","&Startmonat:" }, |
1144 | { "&End month:","&Endmonat:" }, | 1144 | { "&End month:","&Endmonat:" }, |
1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1146 | { "Print todos","Drucke Todos" }, | 1146 | { "Print todos","Drucke Todos" }, |
1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1151 | { "Items to Print","Zu druckende Items" }, | 1151 | { "Items to Print","Zu druckende Items" }, |
1152 | { "&From:","Von:" }, | 1152 | { "&From:","Von:" }, |
1153 | { "&To:","Bis:" }, | 1153 | { "&To:","Bis:" }, |
1154 | { "Print &all todo items","Drucke alle Todo Items" }, | 1154 | { "Print &all todo items","Drucke alle Todo Items" }, |
1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1157 | { "Todo List","Todo Liste" }, | 1157 | { "Todo List","Todo Liste" }, |
1158 | { "&Title:","&Titel:" }, | 1158 | { "&Title:","&Titel:" }, |
1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, | 1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, |
1160 | { "Todo list","Todo Liste" }, | 1160 | { "Todo list","Todo Liste" }, |
1161 | { "&Print...","Drucke..." }, | 1161 | { "&Print...","Drucke..." }, |
1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1163 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1163 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1164 | { "OK","OK" }, | 1164 | { "OK","OK" }, |
1165 | { "FilterEditor","FilterEditor" }, | 1165 | { "FilterEditor","FilterEditor" }, |
1166 | { "Include","Inclusive" }, | 1166 | { "Include","Inclusive" }, |
1167 | { "Exclude","Exclusive" }, | 1167 | { "Exclude","Exclusive" }, |
1168 | { "Edit Selection...","Editiere Auswahl" }, | 1168 | { "Edit Selection...","Editiere Auswahl" }, |
1169 | { "recurring events","wiederholende Termine" }, | 1169 | { "recurring events","wiederholende Termine" }, |
1170 | { "recurr. events","wiederh.Termine" }, | 1170 | { "recurr. events","wiederh.Termine" }, |
1171 | { "completed to-dos","erledigte Todos" }, | 1171 | { "completed to-dos","erledigte Todos" }, |
1172 | { "events","Termine" }, | 1172 | { "events","Termine" }, |
1173 | { "todos","Todos" }, | 1173 | { "todos","Todos" }, |
1174 | { "journals","Journale" }, | 1174 | { "journals","Journale" }, |
1175 | { "public","öffentl." }, | 1175 | { "public","öffentl." }, |
1176 | { "private","privat" }, | 1176 | { "private","privat" }, |
1177 | { "confidential","vertraul." }, | 1177 | { "confidential","vertraul." }, |
1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, | 1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, |
1179 | { "Yesterday","Gestern" }, | 1179 | { "Yesterday","Gestern" }, |
1180 | { "Day after tomorrow","Übermorgen" }, | 1180 | { "Day after tomorrow","Übermorgen" }, |
1181 | { "Tomorrow","Morgen" }, | 1181 | { "Tomorrow","Morgen" }, |
1182 | { "Day before yesterday","Vorgestern" }, | 1182 | { "Day before yesterday","Vorgestern" }, |
1183 | { "Size %1","Größe %1" }, | 1183 | { "Size %1","Größe %1" }, |
1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1185 | { " (%1 y.)"," (%1 J.)" }, | 1185 | { " (%1 y.)"," (%1 J.)" }, |
1186 | { "Allday:","Ganztägig:" }, | 1186 | { "Allday:","Ganztägig:" }, |
1187 | { "compl.todos","erled.Todos" }, | 1187 | { "compl.todos","erled.Todos" }, |
1188 | { "Day view","Tagesansicht" }, | 1188 | { "Day view","Tagesansicht" }, |
1189 | { "Next days","Nächste Tage" }, | 1189 | { "Next days","Nächste Tage" }, |
1190 | { "Next week","Nächste Woche" }, | 1190 | { "Next week","Nächste Woche" }, |
1191 | { "Next two weeks","Nächste zwei Wochen" }, | 1191 | { "Next two weeks","Nächste zwei Wochen" }, |
1192 | { "This month","Dieser Monat" }, | 1192 | { "This month","Dieser Monat" }, |
1193 | { "Journal view","Journal" }, | 1193 | { "Journal view","Journal" }, |
1194 | { "Display all opened","Zeige alle geöffnet" }, | 1194 | { "Display all opened","Zeige alle geöffnet" }, |
1195 | { "Display all closed","Zeige alle geschlossen" }, | 1195 | { "Display all closed","Zeige alle geschlossen" }, |
1196 | { "Display all flat","Zeige alle flach" }, | 1196 | { "Display all flat","Zeige alle flach" }, |
1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1200 | { "Select Week","Wähle Woche" }, | 1200 | { "Select Week","Wähle Woche" }, |
1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1202 | { "Set Alarm!","Setze Alarm!" }, | 1202 | { "Set Alarm!","Setze Alarm!" }, |
1203 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, | 1203 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, |
1204 | { " and "," und " }, | 1204 | { " and "," und " }, |
1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1206 | { "Mail to selected","Mail an Ausgewählte" }, | 1206 | { "Mail to selected","Mail an Ausgewählte" }, |
1207 | { "Mail to all","Mail an Alle" }, | 1207 | { "Mail to all","Mail an Alle" }, |
1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1210 | { " on"," am" }, | 1210 | { " on"," am" }, |
1211 | { " completed on "," erledigt am " }, | 1211 | { " completed on "," erledigt am " }, |
1212 | { "Save as Event template","Speichere als Vorlage" }, | 1212 | { "Save as Event template","Speichere als Vorlage" }, |
1213 | { "Load Event template","Lade Termin Vorlage" }, | 1213 | { "Load Event template","Lade Termin Vorlage" }, |
1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1216 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1216 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1217 | { "Parent todo:<br>","Über Todo:<br>" }, | 1217 | { "Parent todo:<br>","Über Todo:<br>" }, |
1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1219 | { " completed"," erledigt" }, | 1219 | { " completed"," erledigt" }, |
1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, | 1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, |
1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1226 | { "Error","Fehler" }, | 1226 | { "Error","Fehler" }, |
1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1229 | { "Warning","Warnung" }, | 1229 | { "Warning","Warnung" }, |
1230 | { "Select week number","Wähle Wochen Nummer" }, | 1230 | { "Select week number","Wähle Wochen Nummer" }, |
1231 | { "Februar","Februar" }, | 1231 | { "Februar","Februar" }, |
1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1233 | { "W","W" }, | 1233 | { "W","W" }, |
1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1235 | { "T: %1","T: %1" }, | 1235 | { "T: %1","T: %1" }, |
1236 | { "Start: ","Start: " }, | 1236 | { "Start: ","Start: " }, |
1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1239 | { "Remote IP address:","Ferne IP Adresse:" }, | 1239 | { "Remote IP address:","Ferne IP Adresse:" }, |
1240 | { "Remote port number:","Ferne Port Nummer:" }, | 1240 | { "Remote port number:","Ferne Port Nummer:" }, |
1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1242 | { "Remote from: ","Fern von: " }, | 1242 | { "Remote from: ","Fern von: " }, |
1243 | { "Local from: ","Lokal von: " }, | 1243 | { "Local from: ","Lokal von: " }, |
1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1246 | { "Write back","Schreibe zurück" }, | 1246 | { "Write back","Schreibe zurück" }, |
1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1249 | { "Received sync request","Sync Anfrage erhalten" }, | 1249 | { "Received sync request","Sync Anfrage erhalten" }, |
1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1253 | { "Sending file...","Sende Datei..." }, | 1253 | { "Sending file...","Sende Datei..." }, |
1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1256 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1256 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1257 | { "Writing file to disk...","Speichere Datei..." }, | 1257 | { "Writing file to disk...","Speichere Datei..." }, |
1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1260 | { "Synchronize!","Synchronisiere!" }, | 1260 | { "Synchronize!","Synchronisiere!" }, |
1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1266 | { "List week view","Listenwochenansicht" }, | 1266 | { "List week view","Listenwochenansicht" }, |
1267 | { "List week","Listenwochenansicht" }, | 1267 | { "List week","Listenwochenansicht" }, |
1268 | { "Next Week","Nächste Woche" }, | 1268 | { "Next Week","Nächste Woche" }, |
1269 | { "Previous Week","Vorherige Woche" }, | 1269 | { "Previous Week","Vorherige Woche" }, |
1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1272 | { "Details","Details" }, | 1272 | { "Details","Details" }, |
1273 | { "Created time","Erstellt Zeit" }, | 1273 | { "Created time","Erstellt Zeit" }, |
1274 | { "Last modified time","Geändert Zeit" }, | 1274 | { "Last modified time","Geändert Zeit" }, |
1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1276 | { "View Options","Anzeige Optionen" }, | 1276 | { "View Options","Anzeige Optionen" }, |
1277 | { "<b>Created: ","<b>Erstellt am: " }, | 1277 | { "<b>Created: ","<b>Erstellt am: " }, |
1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1279 | { "Journal: ","Journal: " }, | 1279 | { "Journal: ","Journal: " }, |
1280 | { "yearly","jährlich" }, | 1280 | { "yearly","jährlich" }, |
1281 | { "(%1) ","%1-" }, | 1281 | { "(%1) ","%1-" }, |
1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1285 | { "Summary/Loc.","Titel/Ort" }, | 1285 | { "Summary/Loc.","Titel/Ort" }, |
1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1287 | { "Week Number","Wochennummer" }, | 1287 | { "Week Number","Wochennummer" }, |
1288 | { "Import","Importiere" }, | 1288 | { "Import","Importiere" }, |
1289 | { "Export","Exportiere" }, | 1289 | { "Export","Exportiere" }, |
1290 | { "Beam","Beame" }, | 1290 | { "Beam","Beame" }, |
1291 | { "Export selected","Exportiere Selektierte" }, | 1291 | { "Export selected","Exportiere Selektierte" }, |
1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1294 | { "Journal/Details...","Journale/Details..." }, | 1294 | { "Journal/Details...","Journale/Details..." }, |
1295 | { "Agenda View","Agenda Ansicht" }, | 1295 | { "Agenda View","Agenda Ansicht" }, |
1296 | { "Show current time","Zeige aktuelle Zeit" }, | 1296 | { "Show current time","Zeige aktuelle Zeit" }, |
1297 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1297 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, | 1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, |
1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1302 | { "%1 days\n","%1 Tagen\n" }, | 1302 | { "%1 days\n","%1 Tagen\n" }, |
1303 | { "1 day\n","1 Tag\n" }, | 1303 | { "1 day\n","1 Tag\n" }, |
1304 | { "%1 hours\n","%1 Stunden\n" }, | 1304 | { "%1 hours\n","%1 Stunden\n" }, |
1305 | { "1 hour\n","1 Stunde\n" }, | 1305 | { "1 hour\n","1 Stunde\n" }, |
1306 | { "%1 minutes\n","%1 Minuten\n" }, | 1306 | { "%1 minutes\n","%1 Minuten\n" }, |
1307 | { "1 minute\n","1 Minute\n" }, | 1307 | { "1 minute\n","1 Minute\n" }, |
1308 | { "Only one toolbar","Nur eine Toolbar" }, | 1308 | { "Only one toolbar","Nur eine Toolbar" }, |
1309 | { "Print","Drucke" }, | 1309 | { "Print","Drucke" }, |
1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, | 1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, |
1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1316 | { "Print unscaled","Drucke unskaliert" }, | 1316 | { "Print unscaled","Drucke unskaliert" }, |
1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1319 | { "Printout Mode","Druck Modus" }, | 1319 | { "Printout Mode","Druck Modus" }, |
1320 | { "Filter menu icon","Filtermenu Icon" }, | 1320 | { "Filter menu icon","Filtermenu Icon" }, |
1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, | 1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, |
1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, | 1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, |
1323 | { "%1d","%1t" }, | 1323 | { "%1d","%1t" }, |
1324 | { "%1h","%1std" }, | 1324 | { "%1h","%1std" }, |
1325 | { "%1min","%1min" }, | 1325 | { "%1min","%1min" }, |
1326 | { "( %1 before )","( %1 vorher )" }, | 1326 | { "( %1 before )","( %1 vorher )" }, |
1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, | 1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1333 | { " on "," am " }, | 1333 | { " on "," am " }, |
1334 | { "On: ","Am: " }, | 1334 | { "On: ","Am: " }, |
1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1337 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1337 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, | 1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, |
1339 | { "Todo is started","Todo ist gestartet" }, | 1339 | { "Todo is started","Todo ist gestartet" }, |
1340 | { "Stop todo","Stoppe Todo" }, | 1340 | { "Stop todo","Stoppe Todo" }, |
1341 | { "Todo is stopped","Todo ist gestoppt" }, | 1341 | { "Todo is stopped","Todo ist gestoppt" }, |
1342 | { "Start todo","Starte Todo" }, | 1342 | { "Start todo","Starte Todo" }, |
1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, | 1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, | 1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, |
1345 | { "Todo has subtodos","Todo hat Untertodos" }, | 1345 | { "Todo has subtodos","Todo hat Untertodos" }, |
1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1347 | { "Colors","Farben" }, | 1347 | { "Colors","Farben" }, |
1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1354 | { "times","Zeiten" }, | 1354 | { "times","Zeiten" }, |
1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, | 1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, |
1356 | { "Backup enabled","Backup angeschaltet" }, | 1356 | { "Backup enabled","Backup angeschaltet" }, |
1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, | 1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, |
1358 | { "Number of Backups:","Anzahl der Backups" }, | 1358 | { "Number of Backups:","Anzahl der Backups" }, |
1359 | { "Make backup every ","Mache ein Backup alle " }, | 1359 | { "Make backup every ","Mache ein Backup alle " }, |
1360 | { " days"," Tage" }, | 1360 | { " days"," Tage" }, |
1361 | { "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, | 1361 | { "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, |
1362 | { "Backup Failed!","Backup Problem!" }, | 1362 | { "Backup Failed!","Backup Problem!" }, |
1363 | { "Try again now","Versuche jetzt nochmal" }, | 1363 | { "Try again now","Versuche jetzt nochmal" }, |
1364 | { "Try again later","Versuche später nochmal" }, | 1364 | { "Try again later","Versuche später nochmal" }, |
1365 | { "Try again tomorrow","Versuche morgen nochmal" }, | 1365 | { "Try again tomorrow","Versuche morgen nochmal" }, |
1366 | { "Disable backup","Schalte Backup ab" }, | 1366 | { "Disable backup","Schalte Backup ab" }, |
1367 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, | 1367 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, |
1368 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, | 1368 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, |
1369 | { "Choose action","Wähle Aktion" }, | 1369 | { "Choose action","Wähle Aktion" }, |
1370 | { "Comment for todo:","Kommentar zum Todo:" }, | 1370 | { "Comment for todo:","Kommentar zum Todo:" }, |
1371 | { "Stop+note","Stop+Notiz" }, | 1371 | { "Stop+note","Stop+Notiz" }, |
1372 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, | 1372 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, |
1373 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, | 1373 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, |
1374 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, | 1374 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, |
1375 | { "Print complete list","Drucke komplette Liste" }, | 1375 | { "Print complete list","Drucke komplette Liste" }, |
1376 | { "Hide all selected","Verstecke Selektierte" }, | 1376 | { "Hide all selected","Verstecke Selektierte" }, |
1377 | { "","" }, | 1377 | { "Add items","hinzufügen" }, |
1378 | { "","" }, | 1378 | { "","" }, |
1379 | { "","" }, | 1379 | { "","" }, |
1380 | { "","" }, | 1380 | { "","" }, |
1381 | { "","" }, \ No newline at end of file | 1381 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index be51694..5797d1b 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -1,1061 +1,1088 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1999 Preston Brown | 3 | Copyright (c) 1999 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qlistview.h> | 25 | #include <qlistview.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qfileinfo.h> | 30 | #include <qfileinfo.h> |
31 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qwhatsthis.h> | 35 | #include <qwhatsthis.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qpainter.h> | 37 | #include <qpainter.h> |
38 | #include <qpaintdevicemetrics.h> | 38 | #include <qpaintdevicemetrics.h> |
39 | 39 | ||
40 | #include <klocale.h> | 40 | #include <klocale.h> |
41 | #include <kdebug.h> | 41 | #include <kdebug.h> |
42 | #include <kiconloader.h> | 42 | #include <kiconloader.h> |
43 | #include <kglobal.h> | 43 | #include <kglobal.h> |
44 | 44 | ||
45 | #include <libkdepim/kpimglobalprefs.h> | 45 | #include <libkdepim/kpimglobalprefs.h> |
46 | #include <libkcal/calendar.h> | 46 | #include <libkcal/calendar.h> |
47 | #include <libkcal/calendarlocal.h> | 47 | #include <libkcal/calendarlocal.h> |
48 | #include <libkcal/icalformat.h> | 48 | #include <libkcal/icalformat.h> |
49 | #include <libkcal/vcalformat.h> | 49 | #include <libkcal/vcalformat.h> |
50 | #include <libkcal/recurrence.h> | 50 | #include <libkcal/recurrence.h> |
51 | #include <libkcal/filestorage.h> | 51 | #include <libkcal/filestorage.h> |
52 | #include <libkdepim/categoryselectdialog.h> | 52 | #include <libkdepim/categoryselectdialog.h> |
53 | #include <libkcal/kincidenceformatter.h> | 53 | #include <libkcal/kincidenceformatter.h> |
54 | #ifndef DESKTOP_VERSION | 54 | #ifndef DESKTOP_VERSION |
55 | #include <qpe/qpeapplication.h> | 55 | #include <qpe/qpeapplication.h> |
56 | #else | 56 | #else |
57 | #include <qapplication.h> | 57 | #include <qapplication.h> |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #ifndef KORG_NOPRINTER | 60 | #ifndef KORG_NOPRINTER |
61 | #include "calprinter.h" | 61 | #include "calprinter.h" |
62 | #endif | 62 | #endif |
63 | #include "koglobals.h" | 63 | #include "koglobals.h" |
64 | #include "koprefs.h" | 64 | #include "koprefs.h" |
65 | #include "kfiledialog.h" | 65 | #include "kfiledialog.h" |
66 | 66 | ||
67 | #include "kolistview.h" | 67 | #include "kolistview.h" |
68 | #include "koeventviewer.h" | 68 | #include "koeventviewer.h" |
69 | 69 | ||
70 | 70 | ||
71 | 71 | ||
72 | 72 | ||
73 | class KOListViewWhatsThis :public QWhatsThis | 73 | class KOListViewWhatsThis :public QWhatsThis |
74 | { | 74 | { |
75 | public: | 75 | public: |
76 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 76 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; |
77 | 77 | ||
78 | protected: | 78 | protected: |
79 | virtual QString text( const QPoint& p) | 79 | virtual QString text( const QPoint& p) |
80 | { | 80 | { |
81 | return _view->getWhatsThisText(p) ; | 81 | return _view->getWhatsThisText(p) ; |
82 | } | 82 | } |
83 | private: | 83 | private: |
84 | QWidget* _wid; | 84 | QWidget* _wid; |
85 | KOListView * _view; | 85 | KOListView * _view; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | 88 | ||
89 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) | 89 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) |
90 | { | 90 | { |
91 | mItem = item; | 91 | mItem = item; |
92 | mDate = date; | 92 | mDate = date; |
93 | } | 93 | } |
94 | 94 | ||
95 | ListItemVisitor::~ListItemVisitor() | 95 | ListItemVisitor::~ListItemVisitor() |
96 | { | 96 | { |
97 | } | 97 | } |
98 | 98 | ||
99 | bool ListItemVisitor::visit(Event *e) | 99 | bool ListItemVisitor::visit(Event *e) |
100 | { | 100 | { |
101 | bool ok = false; | 101 | bool ok = false; |
102 | QString start, end; | 102 | QString start, end; |
103 | QDate ds, de; | 103 | QDate ds, de; |
104 | if ( e->doesRecur() ) { | 104 | if ( e->doesRecur() ) { |
105 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); | 105 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); |
106 | if ( ok ) { | 106 | if ( ok ) { |
107 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); | 107 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); |
108 | start = KGlobal::locale()->formatDate(ds,true); | 108 | start = KGlobal::locale()->formatDate(ds,true); |
109 | de = ds.addDays( days); | 109 | de = ds.addDays( days); |
110 | end = KGlobal::locale()->formatDate(de,true); | 110 | end = KGlobal::locale()->formatDate(de,true); |
111 | } | 111 | } |
112 | 112 | ||
113 | } | 113 | } |
114 | if ( ! ok ) { | 114 | if ( ! ok ) { |
115 | start =e->dtStartDateStr(); | 115 | start =e->dtStartDateStr(); |
116 | end = e->dtEndDateStr(); | 116 | end = e->dtEndDateStr(); |
117 | ds = e->dtStart().date(); | 117 | ds = e->dtStart().date(); |
118 | de = e->dtEnd().date(); | 118 | de = e->dtEnd().date(); |
119 | } | 119 | } |
120 | mItem->setText(0,e->summary()); | 120 | mItem->setText(0,e->summary()); |
121 | mItem->setText(1,start); | 121 | mItem->setText(1,start); |
122 | if ( e->doesFloat() ) | 122 | if ( e->doesFloat() ) |
123 | mItem->setText(2,"---"); | 123 | mItem->setText(2,"---"); |
124 | else | 124 | else |
125 | mItem->setText(2,e->dtStartTimeStr()); | 125 | mItem->setText(2,e->dtStartTimeStr()); |
126 | mItem->setText(3,end); | 126 | mItem->setText(3,end); |
127 | if ( e->doesFloat() ) | 127 | if ( e->doesFloat() ) |
128 | mItem->setText(4,"---"); | 128 | mItem->setText(4,"---"); |
129 | else | 129 | else |
130 | mItem->setText(4,e->dtEndTimeStr()); | 130 | mItem->setText(4,e->dtEndTimeStr()); |
131 | if ( e->isAlarmEnabled() ) { | 131 | if ( e->isAlarmEnabled() ) { |
132 | mItem->setText(5,e->alarms().first()->offsetText() ); | 132 | mItem->setText(5,e->alarms().first()->offsetText() ); |
133 | } else { | 133 | } else { |
134 | mItem->setText(5, i18n("No")); | 134 | mItem->setText(5, i18n("No")); |
135 | } | 135 | } |
136 | mItem->setText(6, e->recurrence()->recurrenceText()); | 136 | mItem->setText(6, e->recurrence()->recurrenceText()); |
137 | if( ! e->doesRecur() ) | 137 | if( ! e->doesRecur() ) |
138 | mItem->setSortKey( 6, "-" ); | 138 | mItem->setSortKey( 6, "-" ); |
139 | mItem->setText(7,"---"); | 139 | mItem->setText(7,"---"); |
140 | mItem->setText(8,"---"); | 140 | mItem->setText(8,"---"); |
141 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); | 141 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); |
142 | mItem->setText(10,e->categoriesStr()); | 142 | mItem->setText(10,e->categoriesStr()); |
143 | 143 | ||
144 | QString key; | 144 | QString key; |
145 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); | 145 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); |
146 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); | 146 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); |
147 | mItem->setSortKey(1,key); | 147 | mItem->setSortKey(1,key); |
148 | 148 | ||
149 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); | 149 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); |
150 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); | 150 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); |
151 | mItem->setSortKey(3,key); | 151 | mItem->setSortKey(3,key); |
152 | return true; | 152 | return true; |
153 | } | 153 | } |
154 | 154 | ||
155 | bool ListItemVisitor::visit(Todo *t) | 155 | bool ListItemVisitor::visit(Todo *t) |
156 | { | 156 | { |
157 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); | 157 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); |
158 | if (t->hasStartDate()) { | 158 | if (t->hasStartDate()) { |
159 | mItem->setText(1,t->dtStartDateStr()); | 159 | mItem->setText(1,t->dtStartDateStr()); |
160 | if (t->doesFloat()) { | 160 | if (t->doesFloat()) { |
161 | mItem->setText(2,"---"); | 161 | mItem->setText(2,"---"); |
162 | } else { | 162 | } else { |
163 | mItem->setText(2,t->dtStartTimeStr()); | 163 | mItem->setText(2,t->dtStartTimeStr()); |
164 | } | 164 | } |
165 | } else { | 165 | } else { |
166 | mItem->setText(1,"---"); | 166 | mItem->setText(1,"---"); |
167 | mItem->setText(2,"---"); | 167 | mItem->setText(2,"---"); |
168 | } | 168 | } |
169 | mItem->setText(3,"---"); | 169 | mItem->setText(3,"---"); |
170 | mItem->setText(4,"---"); | 170 | mItem->setText(4,"---"); |
171 | if ( t->isAlarmEnabled() ) { | 171 | if ( t->isAlarmEnabled() ) { |
172 | mItem->setText(5,t->alarms().first()->offsetText() ); | 172 | mItem->setText(5,t->alarms().first()->offsetText() ); |
173 | } else { | 173 | } else { |
174 | mItem->setText(5, i18n("No")); | 174 | mItem->setText(5, i18n("No")); |
175 | } | 175 | } |
176 | mItem->setText(6, t->recurrence()->recurrenceText()); | 176 | mItem->setText(6, t->recurrence()->recurrenceText()); |
177 | if( ! t->doesRecur() ) | 177 | if( ! t->doesRecur() ) |
178 | mItem->setSortKey( 6, "-" ); | 178 | mItem->setSortKey( 6, "-" ); |
179 | if (t->hasDueDate()) { | 179 | if (t->hasDueDate()) { |
180 | mItem->setText(7,t->dtDueDateStr()); | 180 | mItem->setText(7,t->dtDueDateStr()); |
181 | if (t->doesFloat()) { | 181 | if (t->doesFloat()) { |
182 | mItem->setText(8,"---"); | 182 | mItem->setText(8,"---"); |
183 | } else { | 183 | } else { |
184 | mItem->setText(8,t->dtDueTimeStr()); | 184 | mItem->setText(8,t->dtDueTimeStr()); |
185 | } | 185 | } |
186 | } else { | 186 | } else { |
187 | mItem->setText(7,"---"); | 187 | mItem->setText(7,"---"); |
188 | mItem->setText(8,"---"); | 188 | mItem->setText(8,"---"); |
189 | } | 189 | } |
190 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); | 190 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); |
191 | mItem->setText(10,t->categoriesStr()); | 191 | mItem->setText(10,t->categoriesStr()); |
192 | 192 | ||
193 | QString key; | 193 | QString key; |
194 | QDate d; | 194 | QDate d; |
195 | if (t->hasDueDate()) { | 195 | if (t->hasDueDate()) { |
196 | d = t->dtDue().date(); | 196 | d = t->dtDue().date(); |
197 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); | 197 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); |
198 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 198 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
199 | mItem->setSortKey(7,key); | 199 | mItem->setSortKey(7,key); |
200 | } | 200 | } |
201 | if ( t->hasStartDate() ) { | 201 | if ( t->hasStartDate() ) { |
202 | d = t->dtStart().date(); | 202 | d = t->dtStart().date(); |
203 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); | 203 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); |
204 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 204 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
205 | mItem->setSortKey(1,key); | 205 | mItem->setSortKey(1,key); |
206 | } | 206 | } |
207 | return true; | 207 | return true; |
208 | } | 208 | } |
209 | 209 | ||
210 | bool ListItemVisitor::visit(Journal * j) | 210 | bool ListItemVisitor::visit(Journal * j) |
211 | { | 211 | { |
212 | QString des = j->description().left(30); | 212 | QString des = j->description().left(30); |
213 | des = des.simplifyWhiteSpace (); | 213 | des = des.simplifyWhiteSpace (); |
214 | des.replace (QRegExp ("\\n"),"" ); | 214 | des.replace (QRegExp ("\\n"),"" ); |
215 | des.replace (QRegExp ("\\r"),"" ); | 215 | des.replace (QRegExp ("\\r"),"" ); |
216 | mItem->setText(0,i18n("Journal: ")+des.left(25)); | 216 | mItem->setText(0,i18n("Journal: ")+des.left(25)); |
217 | mItem->setText(1,j->dtStartDateStr()); | 217 | mItem->setText(1,j->dtStartDateStr()); |
218 | mItem->setText(2,"---"); | 218 | mItem->setText(2,"---"); |
219 | mItem->setText(3,"---"); | 219 | mItem->setText(3,"---"); |
220 | mItem->setText(4,"---"); | 220 | mItem->setText(4,"---"); |
221 | mItem->setText(5,"---"); | 221 | mItem->setText(5,"---"); |
222 | mItem->setText(6,"---"); | 222 | mItem->setText(6,"---"); |
223 | mItem->setText(7,j->dtStartDateStr()); | 223 | mItem->setText(7,j->dtStartDateStr()); |
224 | mItem->setText(8,"---"); | 224 | mItem->setText(8,"---"); |
225 | mItem->setText(9,"---"); | 225 | mItem->setText(9,"---"); |
226 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | 226 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); |
227 | 227 | ||
228 | QString key; | 228 | QString key; |
229 | QDate d = j->dtStart().date(); | 229 | QDate d = j->dtStart().date(); |
230 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 230 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
231 | mItem->setSortKey(1,key); | 231 | mItem->setSortKey(1,key); |
232 | mItem->setSortKey(7,key); | 232 | mItem->setSortKey(7,key); |
233 | 233 | ||
234 | return true; | 234 | return true; |
235 | } | 235 | } |
236 | 236 | ||
237 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 237 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
238 | const char *name) | 238 | const char *name) |
239 | : KOEventView(calendar, parent, name) | 239 | : KOEventView(calendar, parent, name) |
240 | { | 240 | { |
241 | mActiveItem = 0; | 241 | mActiveItem = 0; |
242 | mListView = new KOListViewListView(this); | 242 | mListView = new KOListViewListView(this); |
243 | mListView->addColumn(i18n("Summary")); | 243 | mListView->addColumn(i18n("Summary")); |
244 | mListView->addColumn(i18n("Start Date")); | 244 | mListView->addColumn(i18n("Start Date")); |
245 | mListView->addColumn(i18n("Start Time")); | 245 | mListView->addColumn(i18n("Start Time")); |
246 | mListView->addColumn(i18n("End Date")); | 246 | mListView->addColumn(i18n("End Date")); |
247 | mListView->addColumn(i18n("End Time")); | 247 | mListView->addColumn(i18n("End Time")); |
248 | mListView->addColumn(i18n("Alarm")); // alarm set? | 248 | mListView->addColumn(i18n("Alarm")); // alarm set? |
249 | mListView->addColumn(i18n("Recurs")); // recurs? | 249 | mListView->addColumn(i18n("Recurs")); // recurs? |
250 | mListView->addColumn(i18n("Due Date")); | 250 | mListView->addColumn(i18n("Due Date")); |
251 | mListView->addColumn(i18n("Due Time")); | 251 | mListView->addColumn(i18n("Due Time")); |
252 | mListView->addColumn(i18n("Cancelled")); | 252 | mListView->addColumn(i18n("Cancelled")); |
253 | mListView->addColumn(i18n("Categories")); | 253 | mListView->addColumn(i18n("Categories")); |
254 | 254 | ||
255 | mListView->setColumnAlignment(0,AlignLeft); | 255 | mListView->setColumnAlignment(0,AlignLeft); |
256 | mListView->setColumnAlignment(1,AlignLeft); | 256 | mListView->setColumnAlignment(1,AlignLeft); |
257 | mListView->setColumnAlignment(2,AlignHCenter); | 257 | mListView->setColumnAlignment(2,AlignHCenter); |
258 | mListView->setColumnAlignment(3,AlignLeft); | 258 | mListView->setColumnAlignment(3,AlignLeft); |
259 | mListView->setColumnAlignment(4,AlignHCenter); | 259 | mListView->setColumnAlignment(4,AlignHCenter); |
260 | mListView->setColumnAlignment(5,AlignLeft); | 260 | mListView->setColumnAlignment(5,AlignLeft); |
261 | mListView->setColumnAlignment(6,AlignLeft); | 261 | mListView->setColumnAlignment(6,AlignLeft); |
262 | mListView->setColumnAlignment(7,AlignLeft); | 262 | mListView->setColumnAlignment(7,AlignLeft); |
263 | mListView->setColumnAlignment(8,AlignLeft); | 263 | mListView->setColumnAlignment(8,AlignLeft); |
264 | mListView->setColumnAlignment(9,AlignLeft); | 264 | mListView->setColumnAlignment(9,AlignLeft); |
265 | mListView->setColumnAlignment(10,AlignLeft); | 265 | mListView->setColumnAlignment(10,AlignLeft); |
266 | mListView->setColumnWidthMode(10, QListView::Manual); | 266 | mListView->setColumnWidthMode(10, QListView::Manual); |
267 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); | 267 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); |
268 | 268 | ||
269 | int iii = 0; | 269 | int iii = 0; |
270 | for ( iii = 0; iii< 10 ; ++iii ) | 270 | for ( iii = 0; iii< 10 ; ++iii ) |
271 | mListView->setColumnWidthMode( iii, QListView::Manual ); | 271 | mListView->setColumnWidthMode( iii, QListView::Manual ); |
272 | 272 | ||
273 | QBoxLayout *layoutTop = new QVBoxLayout(this); | 273 | QBoxLayout *layoutTop = new QVBoxLayout(this); |
274 | layoutTop->addWidget(mListView); | 274 | layoutTop->addWidget(mListView); |
275 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 275 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
276 | mPopupMenu = eventPopup(); | 276 | mPopupMenu = eventPopup(); |
277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
278 | i18n("Select all"),this, | 278 | i18n("Select all"),this, |
279 | SLOT(allSelection()),true); | 279 | SLOT(allSelection()),true); |
280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
281 | i18n("Deselect all"),this, | 281 | i18n("Deselect all"),this, |
282 | SLOT(clearSelection()),true); | 282 | SLOT(clearSelection()),true); |
283 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 283 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
284 | i18n("Delete all selected"),this, | 284 | i18n("Delete all selected"),this, |
285 | SLOT(deleteAll()),true); | 285 | SLOT(deleteAll()),true); |
286 | #ifdef DESKTOP_VERSION | 286 | |
287 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 287 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
288 | i18n("Hide all selected"),this, | 288 | i18n("Hide all selected"),this, |
289 | SLOT(hideAll()),true); | 289 | SLOT(hideAll()),true); |
290 | #endif | 290 | |
291 | mPopupMenu->insertSeparator(); | 291 | mPopupMenu->insertSeparator(); |
292 | #ifdef DESKTOP_VERSION | 292 | #ifdef DESKTOP_VERSION |
293 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 293 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
294 | i18n("Print complete list"),this, | 294 | i18n("Print complete list"),this, |
295 | SLOT(printList()),true); | 295 | SLOT(printList()),true); |
296 | mPopupMenu->insertSeparator(); | 296 | mPopupMenu->insertSeparator(); |
297 | #endif | 297 | #endif |
298 | QPopupMenu * exportPO = new QPopupMenu ( this ); | 298 | QPopupMenu * exportPO = new QPopupMenu ( this ); |
299 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); | 299 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); |
300 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, | 300 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, |
301 | SLOT(saveToFile())); | 301 | SLOT(saveToFile())); |
302 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, | 302 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, |
303 | SLOT(saveToFileVCS())); | 303 | SLOT(saveToFileVCS())); |
304 | exportPO->insertItem( i18n("Journal/Details..."),this, | 304 | exportPO->insertItem( i18n("Journal/Details..."),this, |
305 | SLOT(saveDescriptionToFile())); | 305 | SLOT(saveDescriptionToFile())); |
306 | // mPopupMenu->insertSeparator(); | 306 | // mPopupMenu->insertSeparator(); |
307 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 307 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
308 | i18n("Add Categ. to selected..."),this, | 308 | i18n("Add Categ. to selected..."),this, |
309 | SLOT(addCat()),true); | 309 | SLOT(addCat()),true); |
310 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 310 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
311 | i18n("Set Categ. for selected..."),this, | 311 | i18n("Set Categ. for selected..."),this, |
312 | SLOT(setCat()),true); | 312 | SLOT(setCat()),true); |
313 | //mPopupMenu->insertSeparator(); | 313 | //mPopupMenu->insertSeparator(); |
314 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 314 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
315 | i18n("Set alarm for selected..."),this, | 315 | i18n("Set alarm for selected..."),this, |
316 | SLOT(setAlarm()),true); | 316 | SLOT(setAlarm()),true); |
317 | 317 | ||
318 | 318 | ||
319 | #ifndef DESKTOP_VERSION | 319 | #ifndef DESKTOP_VERSION |
320 | mPopupMenu->insertSeparator(); | 320 | mPopupMenu->insertSeparator(); |
321 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 321 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
322 | i18n("Beam selected via IR"),this, | 322 | i18n("Beam selected via IR"),this, |
323 | SLOT(beamSelected()),true); | 323 | SLOT(beamSelected()),true); |
324 | #endif | 324 | #endif |
325 | /* | 325 | /* |
326 | mPopupMenu = new QPopupMenu; | 326 | mPopupMenu = new QPopupMenu; |
327 | mPopupMenu->insertItem(i18n("Edit Event"), this, | 327 | mPopupMenu->insertItem(i18n("Edit Event"), this, |
328 | SLOT (editEvent())); | 328 | SLOT (editEvent())); |
329 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, | 329 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, |
330 | SLOT (deleteEvent())); | 330 | SLOT (deleteEvent())); |
331 | mPopupMenu->insertSeparator(); | 331 | mPopupMenu->insertSeparator(); |
332 | mPopupMenu->insertItem(i18n("Show Dates"), this, | 332 | mPopupMenu->insertItem(i18n("Show Dates"), this, |
333 | SLOT(showDates())); | 333 | SLOT(showDates())); |
334 | mPopupMenu->insertItem(i18n("Hide Dates"), this, | 334 | mPopupMenu->insertItem(i18n("Hide Dates"), this, |
335 | SLOT(hideDates())); | 335 | SLOT(hideDates())); |
336 | */ | 336 | */ |
337 | QObject::connect(mListView,SIGNAL( newEvent()), | 337 | QObject::connect(mListView,SIGNAL( newEvent()), |
338 | this,SIGNAL(signalNewEvent())); | 338 | this,SIGNAL(signalNewEvent())); |
339 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), | 339 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), |
340 | this,SLOT(defaultItemAction(QListViewItem *))); | 340 | this,SLOT(defaultItemAction(QListViewItem *))); |
341 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, | 341 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, |
342 | const QPoint &, int )), | 342 | const QPoint &, int )), |
343 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); | 343 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); |
344 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), | 344 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), |
345 | SLOT(processSelectionChange(QListViewItem *))); | 345 | SLOT(processSelectionChange(QListViewItem *))); |
346 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), | 346 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), |
347 | SIGNAL(showIncidenceSignal(Incidence *)) ); | 347 | SIGNAL(showIncidenceSignal(Incidence *)) ); |
348 | 348 | ||
349 | readSettings(KOGlobals::config(),"KOListView Layout"); | 349 | readSettings(KOGlobals::config(),"KOListView Layout"); |
350 | } | 350 | } |
351 | 351 | ||
352 | KOListView::~KOListView() | 352 | KOListView::~KOListView() |
353 | { | 353 | { |
354 | delete mPopupMenu; | 354 | delete mPopupMenu; |
355 | #if QT_VERSION >= 0x030000 | 355 | #if QT_VERSION >= 0x030000 |
356 | 356 | ||
357 | #else | 357 | #else |
358 | delete mKOListViewWhatsThis; | 358 | delete mKOListViewWhatsThis; |
359 | #endif | 359 | #endif |
360 | } | 360 | } |
361 | 361 | ||
362 | QString KOListView::getWhatsThisText(QPoint p) | 362 | QString KOListView::getWhatsThisText(QPoint p) |
363 | { | 363 | { |
364 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | 364 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); |
365 | if ( item ) | 365 | if ( item ) |
366 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), | 366 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), |
367 | KOPrefs::instance()->mWTshowDetails, | 367 | KOPrefs::instance()->mWTshowDetails, |
368 | KOPrefs::instance()->mWTshowCreated, | 368 | KOPrefs::instance()->mWTshowCreated, |
369 | KOPrefs::instance()->mWTshowChanged); | 369 | KOPrefs::instance()->mWTshowChanged); |
370 | return i18n("That is the list view" ); | 370 | return i18n("That is the list view" ); |
371 | 371 | ||
372 | } | 372 | } |
373 | 373 | ||
374 | void KOListView::updateList() | 374 | void KOListView::updateList() |
375 | { | 375 | { |
376 | // qDebug(" KOListView::updateList() "); | 376 | // qDebug(" KOListView::updateList() "); |
377 | 377 | ||
378 | } | 378 | } |
379 | 379 | ||
380 | void KOListView::clearList() | 380 | void KOListView::clearList() |
381 | { | 381 | { |
382 | clear (); | 382 | clear (); |
383 | } | 383 | } |
384 | void KOListView::addCat( ) | 384 | void KOListView::addCat( ) |
385 | { | 385 | { |
386 | setCategories( false ); | 386 | setCategories( false ); |
387 | } | 387 | } |
388 | void KOListView::setCat() | 388 | void KOListView::setCat() |
389 | { | 389 | { |
390 | setCategories( true ); | 390 | setCategories( true ); |
391 | } | 391 | } |
392 | void KOListView::setAlarm() | 392 | void KOListView::setAlarm() |
393 | { | 393 | { |
394 | KOAlarmPrefs kap( this); | 394 | KOAlarmPrefs kap( this); |
395 | if ( !kap.exec() ) | 395 | if ( !kap.exec() ) |
396 | return; | 396 | return; |
397 | QStringList itemList; | 397 | QStringList itemList; |
398 | QPtrList<KOListViewItem> sel ; | 398 | QPtrList<KOListViewItem> sel ; |
399 | QListViewItem *qitem = mListView->firstChild (); | 399 | QListViewItem *qitem = mListView->firstChild (); |
400 | while ( qitem ) { | 400 | while ( qitem ) { |
401 | if ( qitem->isSelected() ) { | 401 | if ( qitem->isSelected() ) { |
402 | Incidence* inc = ((KOListViewItem *) qitem)->data(); | 402 | Incidence* inc = ((KOListViewItem *) qitem)->data(); |
403 | if ( inc->typeID() != journalID ) { | 403 | if ( inc->typeID() != journalID ) { |
404 | if ( inc->typeID() == todoID ) { | 404 | if ( inc->typeID() == todoID ) { |
405 | if ( ((Todo*)inc)->hasDueDate() ) | 405 | if ( ((Todo*)inc)->hasDueDate() ) |
406 | sel.append(((KOListViewItem *)qitem)); | 406 | sel.append(((KOListViewItem *)qitem)); |
407 | } else | 407 | } else |
408 | sel.append(((KOListViewItem *)qitem)); | 408 | sel.append(((KOListViewItem *)qitem)); |
409 | } | 409 | } |
410 | } | 410 | } |
411 | qitem = qitem->nextSibling(); | 411 | qitem = qitem->nextSibling(); |
412 | } | 412 | } |
413 | int count = 0; | 413 | int count = 0; |
414 | KOListViewItem * item, *temp; | 414 | KOListViewItem * item, *temp; |
415 | item = sel.first(); | 415 | item = sel.first(); |
416 | Incidence* inc; | 416 | Incidence* inc; |
417 | while ( item ) { | 417 | while ( item ) { |
418 | inc = item->data(); | 418 | inc = item->data(); |
419 | ++count; | 419 | ++count; |
420 | if (kap.mAlarmButton->isChecked()) { | 420 | if (kap.mAlarmButton->isChecked()) { |
421 | if (inc->alarms().count() == 0) | 421 | if (inc->alarms().count() == 0) |
422 | inc->newAlarm(); | 422 | inc->newAlarm(); |
423 | QPtrList<Alarm> alarms = inc->alarms(); | 423 | QPtrList<Alarm> alarms = inc->alarms(); |
424 | Alarm *alarm; | 424 | Alarm *alarm; |
425 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { | 425 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { |
426 | alarm->setEnabled(true); | 426 | alarm->setEnabled(true); |
427 | int j = kap.mAlarmTimeEdit->value()* -60; | 427 | int j = kap.mAlarmTimeEdit->value()* -60; |
428 | if (kap.mAlarmIncrCombo->currentItem() == 1) | 428 | if (kap.mAlarmIncrCombo->currentItem() == 1) |
429 | j = j * 60; | 429 | j = j * 60; |
430 | else if (kap.mAlarmIncrCombo->currentItem() == 2) | 430 | else if (kap.mAlarmIncrCombo->currentItem() == 2) |
431 | j = j * (60 * 24); | 431 | j = j * (60 * 24); |
432 | alarm->setStartOffset( j ); | 432 | alarm->setStartOffset( j ); |
433 | 433 | ||
434 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { | 434 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { |
435 | alarm->setProcedureAlarm(kap.mAlarmProgram); | 435 | alarm->setProcedureAlarm(kap.mAlarmProgram); |
436 | } | 436 | } |
437 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) | 437 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) |
438 | alarm->setAudioAlarm(kap.mAlarmSound); | 438 | alarm->setAudioAlarm(kap.mAlarmSound); |
439 | else | 439 | else |
440 | alarm->setType(Alarm::Invalid); | 440 | alarm->setType(Alarm::Invalid); |
441 | //alarm->setAudioAlarm("default"); | 441 | //alarm->setAudioAlarm("default"); |
442 | // TODO: Deal with multiple alarms | 442 | // TODO: Deal with multiple alarms |
443 | break; // For now, stop after the first alarm | 443 | break; // For now, stop after the first alarm |
444 | } | 444 | } |
445 | } else { | 445 | } else { |
446 | Alarm* alarm = inc->alarms().first(); | 446 | Alarm* alarm = inc->alarms().first(); |
447 | if ( alarm ) { | 447 | if ( alarm ) { |
448 | alarm->setEnabled(false); | 448 | alarm->setEnabled(false); |
449 | alarm->setType(Alarm::Invalid); | 449 | alarm->setType(Alarm::Invalid); |
450 | } | 450 | } |
451 | } | 451 | } |
452 | ListItemVisitor v(item, mStartDate ); | 452 | ListItemVisitor v(item, mStartDate ); |
453 | inc->accept(v); | 453 | inc->accept(v); |
454 | item = sel.next(); | 454 | item = sel.next(); |
455 | } | 455 | } |
456 | topLevelWidget()->setCaption( i18n("Changed alarm for %1 items").arg( count ) ); | 456 | topLevelWidget()->setCaption( i18n("Changed alarm for %1 items").arg( count ) ); |
457 | qDebug("KO: Set alarm for %d items", count); | 457 | qDebug("KO: Set alarm for %d items", count); |
458 | calendar()->reInitAlarmSettings(); | 458 | calendar()->reInitAlarmSettings(); |
459 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 459 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
460 | } | 460 | } |
461 | void KOListView::setCategories( bool removeOld ) | 461 | void KOListView::setCategories( bool removeOld ) |
462 | { | 462 | { |
463 | 463 | ||
464 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); | 464 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); |
465 | csd->setColorEnabled(); | 465 | csd->setColorEnabled(); |
466 | if (! csd->exec()) { | 466 | if (! csd->exec()) { |
467 | delete csd; | 467 | delete csd; |
468 | return; | 468 | return; |
469 | } | 469 | } |
470 | QStringList catList = csd->selectedCategories(); | 470 | QStringList catList = csd->selectedCategories(); |
471 | delete csd; | 471 | delete csd; |
472 | // if ( catList.count() == 0 ) | 472 | // if ( catList.count() == 0 ) |
473 | // return; | 473 | // return; |
474 | //catList.sort(); | 474 | //catList.sort(); |
475 | QString categoriesStr = catList.join(","); | 475 | QString categoriesStr = catList.join(","); |
476 | int i; | 476 | int i; |
477 | QStringList itemList; | 477 | QStringList itemList; |
478 | QPtrList<KOListViewItem> sel ; | 478 | QPtrList<KOListViewItem> sel ; |
479 | QListViewItem *qitem = mListView->firstChild (); | 479 | QListViewItem *qitem = mListView->firstChild (); |
480 | while ( qitem ) { | 480 | while ( qitem ) { |
481 | if ( qitem->isSelected() ) { | 481 | if ( qitem->isSelected() ) { |
482 | sel.append(((KOListViewItem *)qitem)); | 482 | sel.append(((KOListViewItem *)qitem)); |
483 | } | 483 | } |
484 | qitem = qitem->nextSibling(); | 484 | qitem = qitem->nextSibling(); |
485 | } | 485 | } |
486 | KOListViewItem * item, *temp; | 486 | KOListViewItem * item, *temp; |
487 | item = sel.first(); | 487 | item = sel.first(); |
488 | if( item ) { | 488 | if( item ) { |
489 | Incidence* inc = item->data() ; | 489 | Incidence* inc = item->data() ; |
490 | bool setSub = false; | 490 | bool setSub = false; |
491 | if( inc->typeID() == todoID && sel.count() == 1 && inc->relations().count() > 0 ) { | 491 | if( inc->typeID() == todoID && sel.count() == 1 && inc->relations().count() > 0 ) { |
492 | int result = KMessageBox::warningYesNoCancel(this, | 492 | int result = KMessageBox::warningYesNoCancel(this, |
493 | i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), | 493 | i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), |
494 | i18n("Todo has subtodos"), | 494 | i18n("Todo has subtodos"), |
495 | i18n("Yes"), | 495 | i18n("Yes"), |
496 | i18n("No")); | 496 | i18n("No")); |
497 | if (result == KMessageBox::Cancel) item = 0; | 497 | if (result == KMessageBox::Cancel) item = 0; |
498 | if (result == KMessageBox::Yes) setSub = true; | 498 | if (result == KMessageBox::Yes) setSub = true; |
499 | } | 499 | } |
500 | while ( item ) { | 500 | while ( item ) { |
501 | inc = item->data(); | 501 | inc = item->data(); |
502 | if ( removeOld ) { | 502 | if ( removeOld ) { |
503 | inc->setCategories( catList, setSub ); | 503 | inc->setCategories( catList, setSub ); |
504 | } else { | 504 | } else { |
505 | inc->addCategories( catList, setSub ); | 505 | inc->addCategories( catList, setSub ); |
506 | } | 506 | } |
507 | ListItemVisitor v(item, mStartDate ); | 507 | ListItemVisitor v(item, mStartDate ); |
508 | inc->accept(v); | 508 | inc->accept(v); |
509 | item = sel.next(); | 509 | item = sel.next(); |
510 | } | 510 | } |
511 | } | 511 | } |
512 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 512 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
513 | } | 513 | } |
514 | 514 | ||
515 | void KOListView::beamSelected() | 515 | void KOListView::beamSelected() |
516 | { | 516 | { |
517 | int icount = 0; | 517 | int icount = 0; |
518 | QPtrList<Incidence> delSel ; | 518 | QPtrList<Incidence> delSel ; |
519 | QListViewItem *item = mListView->firstChild (); | 519 | QListViewItem *item = mListView->firstChild (); |
520 | while ( item ) { | 520 | while ( item ) { |
521 | if ( item->isSelected() ) { | 521 | if ( item->isSelected() ) { |
522 | delSel.append(((KOListViewItem *)item)->data()); | 522 | delSel.append(((KOListViewItem *)item)->data()); |
523 | ++icount; | 523 | ++icount; |
524 | } | 524 | } |
525 | 525 | ||
526 | item = item->nextSibling(); | 526 | item = item->nextSibling(); |
527 | } | 527 | } |
528 | if ( icount ) { | 528 | if ( icount ) { |
529 | emit beamIncidenceList( delSel ); | 529 | emit beamIncidenceList( delSel ); |
530 | return; | 530 | return; |
531 | QString fn ; | 531 | QString fn ; |
532 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; | 532 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; |
533 | QString mes; | 533 | QString mes; |
534 | bool createbup = true; | 534 | bool createbup = true; |
535 | if ( createbup ) { | 535 | if ( createbup ) { |
536 | QString description = "\n"; | 536 | QString description = "\n"; |
537 | CalendarLocal* cal = new CalendarLocal(); | 537 | CalendarLocal* cal = new CalendarLocal(); |
538 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 538 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
539 | Incidence *incidence = delSel.first(); | 539 | Incidence *incidence = delSel.first(); |
540 | while ( incidence ) { | 540 | while ( incidence ) { |
541 | Incidence *in = incidence->clone(); | 541 | Incidence *in = incidence->clone(); |
542 | description += in->summary() + "\n"; | 542 | description += in->summary() + "\n"; |
543 | cal->addIncidence( in ); | 543 | cal->addIncidence( in ); |
544 | incidence = delSel.next(); | 544 | incidence = delSel.next(); |
545 | } | 545 | } |
546 | FileStorage storage( cal, fn, new VCalFormat ); | 546 | FileStorage storage( cal, fn, new VCalFormat ); |
547 | storage.save(); | 547 | storage.save(); |
548 | delete cal; | 548 | delete cal; |
549 | mes = i18n("KO/Pi: Ready for beaming"); | 549 | mes = i18n("KO/Pi: Ready for beaming"); |
550 | topLevelWidget()->setCaption(mes); | 550 | topLevelWidget()->setCaption(mes); |
551 | 551 | ||
552 | #ifndef DESKTOP_VERSION | 552 | #ifndef DESKTOP_VERSION |
553 | Ir *ir = new Ir( this ); | 553 | Ir *ir = new Ir( this ); |
554 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 554 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
555 | ir->send( fn, description, "text/x-vCalendar" ); | 555 | ir->send( fn, description, "text/x-vCalendar" ); |
556 | #endif | 556 | #endif |
557 | } | 557 | } |
558 | } | 558 | } |
559 | } | 559 | } |
560 | void KOListView::beamDone( Ir *ir ) | 560 | void KOListView::beamDone( Ir *ir ) |
561 | { | 561 | { |
562 | #ifndef DESKTOP_VERSION | 562 | #ifndef DESKTOP_VERSION |
563 | delete ir; | 563 | delete ir; |
564 | #endif | 564 | #endif |
565 | topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); | 565 | topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); |
566 | } | 566 | } |
567 | 567 | ||
568 | void KOListView::saveDescriptionToFile() | 568 | void KOListView::saveDescriptionToFile() |
569 | { | 569 | { |
570 | 570 | ||
571 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), | 571 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), |
572 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), | 572 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), |
573 | i18n("Continue"), i18n("Cancel"), 0, | 573 | i18n("Continue"), i18n("Cancel"), 0, |
574 | 0, 1 ); | 574 | 0, 1 ); |
575 | if ( result != 0 ) { | 575 | if ( result != 0 ) { |
576 | return; | 576 | return; |
577 | } | 577 | } |
578 | int icount = 0; | 578 | int icount = 0; |
579 | QPtrList<Incidence> delSel ; | 579 | QPtrList<Incidence> delSel ; |
580 | QListViewItem *item = mListView->firstChild (); | 580 | QListViewItem *item = mListView->firstChild (); |
581 | while ( item ) { | 581 | while ( item ) { |
582 | if ( item->isSelected() ) { | 582 | if ( item->isSelected() ) { |
583 | delSel.append(((KOListViewItem *)item)->data()); | 583 | delSel.append(((KOListViewItem *)item)->data()); |
584 | ++icount; | 584 | ++icount; |
585 | } | 585 | } |
586 | 586 | ||
587 | item = item->nextSibling(); | 587 | item = item->nextSibling(); |
588 | } | 588 | } |
589 | if ( icount ) { | 589 | if ( icount ) { |
590 | QString fn = KOPrefs::instance()->mLastSaveFile; | 590 | QString fn = KOPrefs::instance()->mLastSaveFile; |
591 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 591 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
592 | 592 | ||
593 | if ( fn == "" ) | 593 | if ( fn == "" ) |
594 | return; | 594 | return; |
595 | QFileInfo info; | 595 | QFileInfo info; |
596 | info.setFile( fn ); | 596 | info.setFile( fn ); |
597 | QString mes; | 597 | QString mes; |
598 | bool createbup = true; | 598 | bool createbup = true; |
599 | if ( info. exists() ) { | 599 | if ( info. exists() ) { |
600 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 600 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
601 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 601 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
602 | i18n("Overwrite!"), i18n("Cancel"), 0, | 602 | i18n("Overwrite!"), i18n("Cancel"), 0, |
603 | 0, 1 ); | 603 | 0, 1 ); |
604 | if ( result != 0 ) { | 604 | if ( result != 0 ) { |
605 | createbup = false; | 605 | createbup = false; |
606 | } | 606 | } |
607 | } | 607 | } |
608 | if ( createbup ) { | 608 | if ( createbup ) { |
609 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + | 609 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + |
610 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); | 610 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); |
611 | Incidence *incidence = delSel.first(); | 611 | Incidence *incidence = delSel.first(); |
612 | icount = 0; | 612 | icount = 0; |
613 | while ( incidence ) { | 613 | while ( incidence ) { |
614 | if ( incidence->typeID() == journalID ) { | 614 | if ( incidence->typeID() == journalID ) { |
615 | text += "\n************************************\n"; | 615 | text += "\n************************************\n"; |
616 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); | 616 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); |
617 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 617 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
618 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); | 618 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); |
619 | ++icount; | 619 | ++icount; |
620 | 620 | ||
621 | } else { | 621 | } else { |
622 | if ( !incidence->description().isEmpty() ) { | 622 | if ( !incidence->description().isEmpty() ) { |
623 | text += "\n************************************\n"; | 623 | text += "\n************************************\n"; |
624 | if ( incidence->typeID() == todoID ) | 624 | if ( incidence->typeID() == todoID ) |
625 | text += i18n("To-Do: "); | 625 | text += i18n("To-Do: "); |
626 | text += incidence->summary(); | 626 | text += incidence->summary(); |
627 | if ( incidence->hasStartDate() ) | 627 | if ( incidence->hasStartDate() ) |
628 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); | 628 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); |
629 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 629 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
630 | if ( !incidence->location().isEmpty() ) | 630 | if ( !incidence->location().isEmpty() ) |
631 | text += "\n" +i18n("Location: ") + incidence->location(); | 631 | text += "\n" +i18n("Location: ") + incidence->location(); |
632 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); | 632 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); |
633 | ++icount; | 633 | ++icount; |
634 | 634 | ||
635 | } | 635 | } |
636 | } | 636 | } |
637 | incidence = delSel.next(); | 637 | incidence = delSel.next(); |
638 | } | 638 | } |
639 | QFile file( fn ); | 639 | QFile file( fn ); |
640 | if (!file.open( IO_WriteOnly ) ) { | 640 | if (!file.open( IO_WriteOnly ) ) { |
641 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); | 641 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); |
642 | return; | 642 | return; |
643 | } | 643 | } |
644 | QTextStream ts( &file ); | 644 | QTextStream ts( &file ); |
645 | ts << text; | 645 | ts << text; |
646 | file.close(); | 646 | file.close(); |
647 | //qDebug("%s ", text.latin1()); | 647 | //qDebug("%s ", text.latin1()); |
648 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); | 648 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); |
649 | KOPrefs::instance()->mLastSaveFile = fn; | 649 | KOPrefs::instance()->mLastSaveFile = fn; |
650 | topLevelWidget()->setCaption(mes); | 650 | topLevelWidget()->setCaption(mes); |
651 | } | 651 | } |
652 | } | 652 | } |
653 | } | 653 | } |
654 | void KOListView::saveToFileVCS() | 654 | void KOListView::saveToFileVCS() |
655 | { | 655 | { |
656 | writeToFile( false ); | 656 | writeToFile( false ); |
657 | } | 657 | } |
658 | void KOListView::saveToFile() | 658 | void KOListView::saveToFile() |
659 | { | 659 | { |
660 | writeToFile( true ); | 660 | writeToFile( true ); |
661 | } | 661 | } |
662 | void KOListView::writeToFile( bool iCal ) | 662 | void KOListView::writeToFile( bool iCal ) |
663 | { | 663 | { |
664 | 664 | ||
665 | int icount = 0; | 665 | int icount = 0; |
666 | QPtrList<Incidence> delSel ; | 666 | QPtrList<Incidence> delSel ; |
667 | QListViewItem *item = mListView->firstChild (); | 667 | QListViewItem *item = mListView->firstChild (); |
668 | bool journal = iCal; // warn only for vCal | 668 | bool journal = iCal; // warn only for vCal |
669 | bool addSubTodos = false; | ||
670 | bool askSubTodos = true; | ||
669 | while ( item ) { | 671 | while ( item ) { |
670 | if ( item->isSelected() ) { | 672 | if ( item->isSelected() ) { |
671 | if ( !journal ) | 673 | if ( !journal ) |
672 | if ( ((KOListViewItem *)item)->data()->typeID() == journalID ) | 674 | if ( ((KOListViewItem *)item)->data()->typeID() == journalID ) |
673 | journal = true; | 675 | journal = true; |
674 | delSel.append(((KOListViewItem *)item)->data()); | 676 | Incidence* inc = ((KOListViewItem *)item)->data(); |
677 | if ( addSubTodos ) { | ||
678 | if ( delSel.findRef( inc ) == -1 ) | ||
679 | delSel.append( inc ); | ||
680 | } else | ||
681 | delSel.append(inc); | ||
682 | if ( inc->typeID() == todoID ) { | ||
683 | Todo * todo = (Todo*) inc; | ||
684 | if ( todo->relations().count() ) { | ||
685 | if ( askSubTodos ) { | ||
686 | int result = KMessageBox::warningYesNoCancel(this, | ||
687 | i18n("A selected todo has subtodos!\nDo you want to export\nall subtodos of all\nselected todos as well?"), | ||
688 | i18n("Todo has subtodos"), | ||
689 | i18n("Yes"), | ||
690 | i18n("No")); | ||
691 | if ( result == KMessageBox::Cancel ) { | ||
692 | return; | ||
693 | } | ||
694 | if (result == KMessageBox::Yes) | ||
695 | addSubTodos = true; | ||
696 | askSubTodos = false; | ||
697 | } | ||
698 | if ( addSubTodos ) { | ||
699 | inc->addRelationsToList( &delSel ); | ||
700 | } | ||
701 | } | ||
702 | } | ||
675 | ++icount; | 703 | ++icount; |
676 | } | 704 | } |
677 | |||
678 | item = item->nextSibling(); | 705 | item = item->nextSibling(); |
679 | } | 706 | } |
680 | if ( !iCal && journal ) { | 707 | if ( !iCal && journal ) { |
681 | int result = KMessageBox::warningContinueCancel(this, | 708 | int result = KMessageBox::warningContinueCancel(this, |
682 | i18n("The journal entries can not be\nexported to a vCalendar file."), | 709 | i18n("The journal entries can not be\nexported to a vCalendar file."), |
683 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), | 710 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), |
684 | true); | 711 | true); |
685 | if (result != KMessageBox::Continue) return; | 712 | if (result != KMessageBox::Continue) return; |
686 | } | 713 | } |
687 | if ( icount ) { | 714 | if ( icount ) { |
688 | QString fn = KOPrefs::instance()->mLastSaveFile; | 715 | QString fn = KOPrefs::instance()->mLastSaveFile; |
689 | QString extension; | 716 | QString extension; |
690 | if ( iCal ) { | 717 | if ( iCal ) { |
691 | if ( fn.right( 4 ).lower() == ".vcs" ) { | 718 | if ( fn.right( 4 ).lower() == ".vcs" ) { |
692 | fn = fn.left( fn.length() -3) + "ics"; | 719 | fn = fn.left( fn.length() -3) + "ics"; |
693 | } | 720 | } |
694 | } else { | 721 | } else { |
695 | if ( fn.right( 4 ).lower() == ".ics" ) { | 722 | if ( fn.right( 4 ).lower() == ".ics" ) { |
696 | fn = fn.left( fn.length() -3) + "vcs"; | 723 | fn = fn.left( fn.length() -3) + "vcs"; |
697 | } | 724 | } |
698 | } | 725 | } |
699 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 726 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
700 | 727 | ||
701 | if ( fn == "" ) | 728 | if ( fn == "" ) |
702 | return; | 729 | return; |
703 | QFileInfo info; | 730 | QFileInfo info; |
704 | info.setFile( fn ); | 731 | info.setFile( fn ); |
705 | QString mes; | 732 | QString mes; |
706 | bool createbup = true; | 733 | bool createbup = true; |
707 | if ( info. exists() ) { | 734 | if ( info. exists() ) { |
708 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 735 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
709 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 736 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
710 | i18n("Overwrite!"), i18n("Cancel"), 0, | 737 | i18n("Overwrite!"), i18n("Cancel"), 0, |
711 | 0, 1 ); | 738 | 0, 1 ); |
712 | if ( result != 0 ) { | 739 | if ( result != 0 ) { |
713 | createbup = false; | 740 | createbup = false; |
714 | } | 741 | } |
715 | } | 742 | } |
716 | if ( createbup ) { | 743 | if ( createbup ) { |
717 | CalendarLocal cal; | 744 | CalendarLocal cal; |
718 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 745 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
719 | Incidence *incidence = delSel.first(); | 746 | Incidence *incidence = delSel.first(); |
720 | while ( incidence ) { | 747 | while ( incidence ) { |
721 | cal.addIncidence( incidence->clone() ); | 748 | cal.addIncidence( incidence->clone() ); |
722 | incidence = delSel.next(); | 749 | incidence = delSel.next(); |
723 | } | 750 | } |
724 | if ( iCal ) { | 751 | if ( iCal ) { |
725 | ICalFormat format; | 752 | ICalFormat format; |
726 | format.save( &cal, fn ); | 753 | format.save( &cal, fn ); |
727 | } else { | 754 | } else { |
728 | 755 | ||
729 | VCalFormat format; | 756 | VCalFormat format; |
730 | format.save( &cal, fn ); | 757 | format.save( &cal, fn ); |
731 | } | 758 | } |
732 | mes = i18n("KO/Pi:Saved %1").arg(fn ); | 759 | mes = i18n("KO/Pi:Saved %1").arg(fn ); |
733 | KOPrefs::instance()->mLastSaveFile = fn; | 760 | KOPrefs::instance()->mLastSaveFile = fn; |
734 | topLevelWidget()->setCaption(mes); | 761 | topLevelWidget()->setCaption(mes); |
735 | } | 762 | } |
736 | } | 763 | } |
737 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 764 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
738 | } | 765 | } |
739 | void KOListView::hideAll() | 766 | void KOListView::hideAll() |
740 | { | 767 | { |
741 | QPtrList<QListViewItem> delSel ; | 768 | QPtrList<QListViewItem> delSel ; |
742 | QListViewItem *item = mListView->firstChild (); | 769 | QListViewItem *item = mListView->firstChild (); |
743 | while ( item ) { | 770 | while ( item ) { |
744 | if ( item->isSelected() ) { | 771 | if ( item->isSelected() ) { |
745 | delSel.append(item); | 772 | delSel.append(item); |
746 | } | 773 | } |
747 | item = item->nextSibling(); | 774 | item = item->nextSibling(); |
748 | } | 775 | } |
749 | item = delSel.first() ; | 776 | item = delSel.first() ; |
750 | while ( item ) { | 777 | while ( item ) { |
751 | QListViewItem * del = item; | 778 | QListViewItem * del = item; |
752 | item = delSel.next(); | 779 | item = delSel.next(); |
753 | delete del; | 780 | delete del; |
754 | } | 781 | } |
755 | } | 782 | } |
756 | void KOListView::printList() | 783 | void KOListView::printList() |
757 | { | 784 | { |
758 | mListView->printList(); | 785 | mListView->printList(); |
759 | } | 786 | } |
760 | void KOListView::deleteAll() | 787 | void KOListView::deleteAll() |
761 | { | 788 | { |
762 | int icount = 0; | 789 | int icount = 0; |
763 | QPtrList<Incidence> delSel ; | 790 | QPtrList<Incidence> delSel ; |
764 | QListViewItem *item = mListView->firstChild (); | 791 | QListViewItem *item = mListView->firstChild (); |
765 | while ( item ) { | 792 | while ( item ) { |
766 | if ( item->isSelected() ) { | 793 | if ( item->isSelected() ) { |
767 | delSel.append(((KOListViewItem *)item)->data()); | 794 | delSel.append(((KOListViewItem *)item)->data()); |
768 | ++icount; | 795 | ++icount; |
769 | } | 796 | } |
770 | 797 | ||
771 | item = item->nextSibling(); | 798 | item = item->nextSibling(); |
772 | } | 799 | } |
773 | if ( icount ) { | 800 | if ( icount ) { |
774 | Incidence *incidence = delSel.first(); | 801 | Incidence *incidence = delSel.first(); |
775 | Incidence *toDelete; | 802 | Incidence *toDelete; |
776 | KOPrefs *p = KOPrefs::instance(); | 803 | KOPrefs *p = KOPrefs::instance(); |
777 | bool confirm = p->mConfirm; | 804 | bool confirm = p->mConfirm; |
778 | QString mess; | 805 | QString mess; |
779 | mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); | 806 | mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); |
780 | if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { | 807 | if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { |
781 | p->mConfirm = false; | 808 | p->mConfirm = false; |
782 | int delCounter = 0; | 809 | int delCounter = 0; |
783 | QDialog dia ( this, "p-dialog", true ); | 810 | QDialog dia ( this, "p-dialog", true ); |
784 | QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); | 811 | QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); |
785 | QVBoxLayout lay( &dia ); | 812 | QVBoxLayout lay( &dia ); |
786 | lay.setMargin(7); | 813 | lay.setMargin(7); |
787 | lay.setSpacing(7); | 814 | lay.setSpacing(7); |
788 | lay.addWidget( &lab); | 815 | lay.addWidget( &lab); |
789 | QProgressBar bar( icount, &dia ); | 816 | QProgressBar bar( icount, &dia ); |
790 | lay.addWidget( &bar); | 817 | lay.addWidget( &bar); |
791 | int w = 220; | 818 | int w = 220; |
792 | int h = 50; | 819 | int h = 50; |
793 | int dw = QApplication::desktop()->width(); | 820 | int dw = QApplication::desktop()->width(); |
794 | int dh = QApplication::desktop()->height(); | 821 | int dh = QApplication::desktop()->height(); |
795 | dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 822 | dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
796 | //dia.resize( 240,50 ); | 823 | //dia.resize( 240,50 ); |
797 | dia.show(); | 824 | dia.show(); |
798 | 825 | ||
799 | while ( incidence ) { | 826 | while ( incidence ) { |
800 | bar.setProgress( delCounter ); | 827 | bar.setProgress( delCounter ); |
801 | mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); | 828 | mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); |
802 | dia.setCaption( mess ); | 829 | dia.setCaption( mess ); |
803 | qApp->processEvents(); | 830 | qApp->processEvents(); |
804 | toDelete = (incidence); | 831 | toDelete = (incidence); |
805 | incidence = delSel.next(); | 832 | incidence = delSel.next(); |
806 | emit deleteIncidenceSignal(toDelete ); | 833 | emit deleteIncidenceSignal(toDelete ); |
807 | if ( dia.result() != 0 ) | 834 | if ( dia.result() != 0 ) |
808 | break; | 835 | break; |
809 | 836 | ||
810 | } | 837 | } |
811 | mess = mess.sprintf( i18n("%d items remaining in list."), count() ); | 838 | mess = mess.sprintf( i18n("%d items remaining in list."), count() ); |
812 | topLevelWidget ()->setCaption( mess ); | 839 | topLevelWidget ()->setCaption( mess ); |
813 | p->mConfirm = confirm; | 840 | p->mConfirm = confirm; |
814 | } | 841 | } |
815 | } | 842 | } |
816 | 843 | ||
817 | 844 | ||
818 | } | 845 | } |
819 | int KOListView::maxDatesHint() | 846 | int KOListView::maxDatesHint() |
820 | { | 847 | { |
821 | return 0; | 848 | return 0; |
822 | } | 849 | } |
823 | 850 | ||
824 | int KOListView::currentDateCount() | 851 | int KOListView::currentDateCount() |
825 | { | 852 | { |
826 | return 0; | 853 | return 0; |
827 | } | 854 | } |
828 | 855 | ||
829 | QPtrList<Incidence> KOListView::selectedIncidences() | 856 | QPtrList<Incidence> KOListView::selectedIncidences() |
830 | { | 857 | { |
831 | QPtrList<Incidence> eventList; | 858 | QPtrList<Incidence> eventList; |
832 | QListViewItem *item = mListView->firstChild (); | 859 | QListViewItem *item = mListView->firstChild (); |
833 | while ( item ) { | 860 | while ( item ) { |
834 | if ( item->isSelected() ) { | 861 | if ( item->isSelected() ) { |
835 | eventList.append(((KOListViewItem *)item)->data()); | 862 | eventList.append(((KOListViewItem *)item)->data()); |
836 | } | 863 | } |
837 | 864 | ||
838 | item = item->nextSibling(); | 865 | item = item->nextSibling(); |
839 | } | 866 | } |
840 | 867 | ||
841 | // // QListViewItem *item = mListView->selectedItem(); | 868 | // // QListViewItem *item = mListView->selectedItem(); |
842 | //if (item) eventList.append(((KOListViewItem *)item)->data()); | 869 | //if (item) eventList.append(((KOListViewItem *)item)->data()); |
843 | 870 | ||
844 | return eventList; | 871 | return eventList; |
845 | } | 872 | } |
846 | 873 | ||
847 | DateList KOListView::selectedDates() | 874 | DateList KOListView::selectedDates() |
848 | { | 875 | { |
849 | DateList eventList; | 876 | DateList eventList; |
850 | return eventList; | 877 | return eventList; |
851 | } | 878 | } |
852 | 879 | ||
853 | void KOListView::showDates(bool show) | 880 | void KOListView::showDates(bool show) |
854 | { | 881 | { |
855 | // Shouldn't we set it to a value greater 0? When showDates is called with | 882 | // Shouldn't we set it to a value greater 0? When showDates is called with |
856 | // show == true at first, then the columnwidths are set to zero. | 883 | // show == true at first, then the columnwidths are set to zero. |
857 | static int oldColWidth1 = 0; | 884 | static int oldColWidth1 = 0; |
858 | static int oldColWidth3 = 0; | 885 | static int oldColWidth3 = 0; |
859 | 886 | ||
860 | if (!show) { | 887 | if (!show) { |
861 | oldColWidth1 = mListView->columnWidth(1); | 888 | oldColWidth1 = mListView->columnWidth(1); |
862 | oldColWidth3 = mListView->columnWidth(3); | 889 | oldColWidth3 = mListView->columnWidth(3); |
863 | mListView->setColumnWidth(1, 0); | 890 | mListView->setColumnWidth(1, 0); |
864 | mListView->setColumnWidth(3, 0); | 891 | mListView->setColumnWidth(3, 0); |
865 | } else { | 892 | } else { |
866 | mListView->setColumnWidth(1, oldColWidth1); | 893 | mListView->setColumnWidth(1, oldColWidth1); |
867 | mListView->setColumnWidth(3, oldColWidth3); | 894 | mListView->setColumnWidth(3, oldColWidth3); |
868 | } | 895 | } |
869 | mListView->repaint(); | 896 | mListView->repaint(); |
870 | } | 897 | } |
871 | 898 | ||
872 | void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 899 | void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
873 | const QDate &td) | 900 | const QDate &td) |
874 | { | 901 | { |
875 | #ifndef KORG_NOPRINTER | 902 | #ifndef KORG_NOPRINTER |
876 | calPrinter->preview(CalPrinter::Day, fd, td); | 903 | calPrinter->preview(CalPrinter::Day, fd, td); |
877 | #endif | 904 | #endif |
878 | } | 905 | } |
879 | 906 | ||
880 | void KOListView::showDates() | 907 | void KOListView::showDates() |
881 | { | 908 | { |
882 | showDates(true); | 909 | showDates(true); |
883 | } | 910 | } |
884 | 911 | ||
885 | void KOListView::hideDates() | 912 | void KOListView::hideDates() |
886 | { | 913 | { |
887 | showDates(false); | 914 | showDates(false); |
888 | } | 915 | } |
889 | 916 | ||
890 | void KOListView::resetFocus() | 917 | void KOListView::resetFocus() |
891 | { | 918 | { |
892 | topLevelWidget()->setActiveWindow(); | 919 | topLevelWidget()->setActiveWindow(); |
893 | topLevelWidget()->raise(); | 920 | topLevelWidget()->raise(); |
894 | mListView->setFocus(); | 921 | mListView->setFocus(); |
895 | } | 922 | } |
896 | void KOListView::updateView() | 923 | void KOListView::updateView() |
897 | { | 924 | { |
898 | mListView->setFocus(); | 925 | mListView->setFocus(); |
899 | if ( mListView->firstChild () ) | 926 | if ( mListView->firstChild () ) |
900 | mListView->setCurrentItem( mListView->firstChild () ); | 927 | mListView->setCurrentItem( mListView->firstChild () ); |
901 | } | 928 | } |
902 | void KOListView::updateConfig() | 929 | void KOListView::updateConfig() |
903 | { | 930 | { |
904 | 931 | ||
905 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 932 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
906 | updateView(); | 933 | updateView(); |
907 | 934 | ||
908 | } | 935 | } |
909 | void KOListView::setStartDate(const QDate &start) | 936 | void KOListView::setStartDate(const QDate &start) |
910 | { | 937 | { |
911 | mStartDate = start; | 938 | mStartDate = start; |
912 | } | 939 | } |
913 | 940 | ||
914 | void KOListView::showDates(const QDate &start, const QDate &end) | 941 | void KOListView::showDates(const QDate &start, const QDate &end) |
915 | { | 942 | { |
916 | clear(); | 943 | clear(); |
917 | mStartDate = start; | 944 | mStartDate = start; |
918 | QDate date = start; | 945 | QDate date = start; |
919 | QPtrList<Journal> j_list; | 946 | QPtrList<Journal> j_list; |
920 | while( date <= end ) { | 947 | while( date <= end ) { |
921 | addEvents(calendar()->events(date)); | 948 | addEvents(calendar()->events(date)); |
922 | addTodos(calendar()->todos(date)); | 949 | addTodos(calendar()->todos(date)); |
923 | Journal* jo = calendar()->journal(date); | 950 | Journal* jo = calendar()->journal(date); |
924 | if ( jo ) | 951 | if ( jo ) |
925 | j_list.append( jo ); | 952 | j_list.append( jo ); |
926 | date = date.addDays( 1 ); | 953 | date = date.addDays( 1 ); |
927 | } | 954 | } |
928 | addJournals(j_list); | 955 | addJournals(j_list); |
929 | emit incidenceSelected( 0 ); | 956 | emit incidenceSelected( 0 ); |
930 | updateView(); | 957 | updateView(); |
931 | 958 | ||
932 | } | 959 | } |
933 | 960 | ||
934 | void KOListView::addEvents(QPtrList<Event> eventList) | 961 | void KOListView::addEvents(QPtrList<Event> eventList) |
935 | { | 962 | { |
936 | 963 | ||
937 | Event *ev; | 964 | Event *ev; |
938 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 965 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
939 | addIncidence(ev); | 966 | addIncidence(ev); |
940 | } | 967 | } |
941 | if ( !mListView->currentItem() ){ | 968 | if ( !mListView->currentItem() ){ |
942 | updateView(); | 969 | updateView(); |
943 | } | 970 | } |
944 | } | 971 | } |
945 | 972 | ||
946 | void KOListView::addTodos(QPtrList<Todo> eventList) | 973 | void KOListView::addTodos(QPtrList<Todo> eventList) |
947 | { | 974 | { |
948 | Todo *ev; | 975 | Todo *ev; |
949 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 976 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
950 | addIncidence(ev); | 977 | addIncidence(ev); |
951 | } | 978 | } |
952 | if ( !mListView->currentItem() ){ | 979 | if ( !mListView->currentItem() ){ |
953 | updateView(); | 980 | updateView(); |
954 | } | 981 | } |
955 | } | 982 | } |
956 | void KOListView::addJournals(QPtrList<Journal> eventList) | 983 | void KOListView::addJournals(QPtrList<Journal> eventList) |
957 | { | 984 | { |
958 | Journal *ev; | 985 | Journal *ev; |
959 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 986 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
960 | addIncidence(ev); | 987 | addIncidence(ev); |
961 | } | 988 | } |
962 | if ( !mListView->currentItem() ){ | 989 | if ( !mListView->currentItem() ){ |
963 | updateView(); | 990 | updateView(); |
964 | } | 991 | } |
965 | } | 992 | } |
966 | 993 | ||
967 | void KOListView::addIncidence(Incidence *incidence) | 994 | void KOListView::addIncidence(Incidence *incidence) |
968 | { | 995 | { |
969 | if ( mUidDict.find( incidence->uid() ) ) return; | 996 | if ( mUidDict.find( incidence->uid() ) ) return; |
970 | 997 | ||
971 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 998 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
972 | mUidDict.insert( incidence->uid(), incidence ); | 999 | mUidDict.insert( incidence->uid(), incidence ); |
973 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); | 1000 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); |
974 | ListItemVisitor v(item, mStartDate ); | 1001 | ListItemVisitor v(item, mStartDate ); |
975 | if (incidence->accept(v)) { | 1002 | if (incidence->accept(v)) { |
976 | return; | 1003 | return; |
977 | } | 1004 | } |
978 | else delete item; | 1005 | else delete item; |
979 | } | 1006 | } |
980 | 1007 | ||
981 | void KOListView::showEvents(QPtrList<Event> eventList) | 1008 | void KOListView::showEvents(QPtrList<Event> eventList) |
982 | { | 1009 | { |
983 | clear(); | 1010 | clear(); |
984 | 1011 | ||
985 | addEvents(eventList); | 1012 | addEvents(eventList); |
986 | 1013 | ||
987 | // After new creation of list view no events are selected. | 1014 | // After new creation of list view no events are selected. |
988 | emit incidenceSelected( 0 ); | 1015 | emit incidenceSelected( 0 ); |
989 | } | 1016 | } |
990 | int KOListView::count() | 1017 | int KOListView::count() |
991 | { | 1018 | { |
992 | return mListView->childCount(); | 1019 | return mListView->childCount(); |
993 | } | 1020 | } |
994 | 1021 | ||
995 | void KOListView::changeEventDisplay(Event *event, int action) | 1022 | void KOListView::changeEventDisplay(Event *event, int action) |
996 | { | 1023 | { |
997 | KOListViewItem *item; | 1024 | KOListViewItem *item; |
998 | 1025 | ||
999 | switch(action) { | 1026 | switch(action) { |
1000 | case KOGlobals::EVENTADDED: | 1027 | case KOGlobals::EVENTADDED: |
1001 | addIncidence( event ); | 1028 | addIncidence( event ); |
1002 | break; | 1029 | break; |
1003 | case KOGlobals::EVENTEDITED: | 1030 | case KOGlobals::EVENTEDITED: |
1004 | item = getItemForEvent(event); | 1031 | item = getItemForEvent(event); |
1005 | if (item) { | 1032 | if (item) { |
1006 | mUidDict.remove( event->uid() ); | 1033 | mUidDict.remove( event->uid() ); |
1007 | delete item; | 1034 | delete item; |
1008 | addIncidence( event ); | 1035 | addIncidence( event ); |
1009 | } | 1036 | } |
1010 | break; | 1037 | break; |
1011 | case KOGlobals::EVENTDELETED: | 1038 | case KOGlobals::EVENTDELETED: |
1012 | item = getItemForEvent(event); | 1039 | item = getItemForEvent(event); |
1013 | if (item) { | 1040 | if (item) { |
1014 | mUidDict.remove( event->uid() ); | 1041 | mUidDict.remove( event->uid() ); |
1015 | delete item; | 1042 | delete item; |
1016 | } | 1043 | } |
1017 | break; | 1044 | break; |
1018 | default: | 1045 | default: |
1019 | ; | 1046 | ; |
1020 | } | 1047 | } |
1021 | } | 1048 | } |
1022 | 1049 | ||
1023 | KOListViewItem *KOListView::getItemForEvent(Event *event) | 1050 | KOListViewItem *KOListView::getItemForEvent(Event *event) |
1024 | { | 1051 | { |
1025 | KOListViewItem *item = (KOListViewItem *)mListView->firstChild(); | 1052 | KOListViewItem *item = (KOListViewItem *)mListView->firstChild(); |
1026 | while (item) { | 1053 | while (item) { |
1027 | if (item->data() == event) return item; | 1054 | if (item->data() == event) return item; |
1028 | item = (KOListViewItem *)item->nextSibling(); | 1055 | item = (KOListViewItem *)item->nextSibling(); |
1029 | } | 1056 | } |
1030 | return 0; | 1057 | return 0; |
1031 | } | 1058 | } |
1032 | 1059 | ||
1033 | void KOListView::defaultItemAction(QListViewItem *i) | 1060 | void KOListView::defaultItemAction(QListViewItem *i) |
1034 | { | 1061 | { |
1035 | KOListViewItem *item = static_cast<KOListViewItem *>( i ); | 1062 | KOListViewItem *item = static_cast<KOListViewItem *>( i ); |
1036 | if ( item ) defaultAction( item->data() ); | 1063 | if ( item ) defaultAction( item->data() ); |
1037 | 1064 | ||
1038 | } | 1065 | } |
1039 | 1066 | ||
1040 | void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) | 1067 | void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) |
1041 | { | 1068 | { |
1042 | mActiveItem = (KOListViewItem *)item; | 1069 | mActiveItem = (KOListViewItem *)item; |
1043 | if (mActiveItem) { | 1070 | if (mActiveItem) { |
1044 | Incidence *incidence = mActiveItem->data(); | 1071 | Incidence *incidence = mActiveItem->data(); |
1045 | mPopupMenu->enableDefault( !mListView->hasMultiSelection( item ) ); | 1072 | mPopupMenu->enableDefault( !mListView->hasMultiSelection( item ) ); |
1046 | mPopupMenu->showIncidencePopup(incidence); | 1073 | mPopupMenu->showIncidencePopup(incidence); |
1047 | 1074 | ||
1048 | /* | 1075 | /* |
1049 | if ( incidence && incidence->type() == "Event" ) { | 1076 | if ( incidence && incidence->type() == "Event" ) { |
1050 | Event *event = static_cast<Event *>( incidence ); | 1077 | Event *event = static_cast<Event *>( incidence ); |
1051 | mPopupMenu->showEventPopup(event); | 1078 | mPopupMenu->showEventPopup(event); |
1052 | } | 1079 | } |
1053 | */ | 1080 | */ |
1054 | } | 1081 | } |
1055 | } | 1082 | } |
1056 | 1083 | ||
1057 | void KOListView::readSettings(KConfig *config, QString setting) | 1084 | void KOListView::readSettings(KConfig *config, QString setting) |
1058 | { | 1085 | { |
1059 | // qDebug("KOListView::readSettings "); | 1086 | // qDebug("KOListView::readSettings "); |
1060 | mListView->restoreLayout(config,setting); | 1087 | mListView->restoreLayout(config,setting); |
1061 | } | 1088 | } |
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 59bf1a2..ef2fc1c 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp | |||
@@ -1,464 +1,471 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1998 Preston Brown | 3 | Copyright (c) 1998 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qcheckbox.h> | 26 | #include <qcheckbox.h> |
27 | #include <qgroupbox.h> | 27 | #include <qgroupbox.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qlistview.h> | 29 | #include <qlistview.h> |
30 | #include <qwhatsthis.h> | 30 | #include <qwhatsthis.h> |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
33 | 33 | ||
34 | #include <klocale.h> | 34 | #include <klocale.h> |
35 | #include <kmessagebox.h> | 35 | #include <kmessagebox.h> |
36 | 36 | ||
37 | #include <libkdepim/kdateedit.h> | 37 | #include <libkdepim/kdateedit.h> |
38 | 38 | ||
39 | #include "koglobals.h" | 39 | #include "koglobals.h" |
40 | #include "koprefs.h" | 40 | #include "koprefs.h" |
41 | #include "klineedit.h" | 41 | #include "klineedit.h" |
42 | 42 | ||
43 | #include "calendarview.h" | 43 | #include "calendarview.h" |
44 | #include "koviewmanager.h" | 44 | #include "koviewmanager.h" |
45 | #include "searchdialog.h" | 45 | #include "searchdialog.h" |
46 | 46 | ||
47 | SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | 47 | SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) |
48 | : QVBox( 0 ) | 48 | : QVBox( 0 ) |
49 | 49 | ||
50 | { | 50 | { |
51 | mCalendar = calendar; | 51 | mCalendar = calendar; |
52 | QFrame *topFrame = new QFrame( this ) ;//plainPage(); | 52 | QFrame *topFrame = new QFrame( this ) ;//plainPage(); |
53 | QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); | 53 | QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); |
54 | 54 | ||
55 | // Search expression | 55 | // Search expression |
56 | QHBoxLayout *subLayout = new QHBoxLayout(); | 56 | QHBoxLayout *subLayout = new QHBoxLayout(); |
57 | layout->addLayout(subLayout); | 57 | layout->addLayout(subLayout); |
58 | /* | ||
58 | searchLabel = new QLabel(topFrame); | 59 | searchLabel = new QLabel(topFrame); |
59 | searchLabel->setText(i18n("Search for:")); | 60 | searchLabel->setText(i18n("Search for:")); |
60 | subLayout->addWidget(searchLabel); | 61 | subLayout->addWidget(searchLabel); |
61 | 62 | */ | |
62 | searchEdit = new KLineEdit(topFrame); | 63 | QPushButton *OkButton = new QPushButton( i18n("Search for:"), topFrame ); |
63 | subLayout->addWidget(searchEdit); | ||
64 | QPushButton *OkButton = new QPushButton( i18n("&Find"), topFrame ); | ||
65 | //OkButton->setDefault( true ); | 64 | //OkButton->setDefault( true ); |
66 | connect(OkButton,SIGNAL(clicked()),SLOT(doSearch())); | 65 | connect(OkButton,SIGNAL(clicked()),SLOT(doSearch())); |
67 | subLayout->addWidget(OkButton); | 66 | subLayout->addWidget(OkButton); |
67 | searchEdit = new KLineEdit(topFrame); | ||
68 | subLayout->addWidget(searchEdit); | ||
69 | |||
70 | mAddItems = new QCheckBox(i18n("Add items"),topFrame); | ||
71 | subLayout->addWidget(mAddItems); | ||
72 | |||
68 | searchEdit->setText("*"); // Find all events by default | 73 | searchEdit->setText("*"); // Find all events by default |
69 | searchEdit->setFocus(); | 74 | searchEdit->setFocus(); |
70 | connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); | 75 | connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); |
71 | connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); | 76 | connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); |
72 | // Subjects to search | 77 | // Subjects to search |
73 | // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), | 78 | // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), |
74 | // topFrame); | 79 | // topFrame); |
75 | 80 | ||
76 | QHBox *incidenceGroup = new QHBox( topFrame ); | 81 | QHBox *incidenceGroup = new QHBox( topFrame ); |
77 | layout->addWidget(incidenceGroup); | 82 | layout->addWidget(incidenceGroup); |
78 | 83 | ||
79 | mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); | 84 | mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); |
80 | //mSearchEvent->setChecked(true); | 85 | //mSearchEvent->setChecked(true); |
81 | mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); | 86 | mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); |
82 | mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); | 87 | mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); |
83 | 88 | ||
84 | QHBox *subjectGroup = new QHBox( topFrame ); | 89 | QHBox *subjectGroup = new QHBox( topFrame ); |
85 | layout->addWidget(subjectGroup); | 90 | layout->addWidget(subjectGroup); |
86 | 91 | ||
87 | mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); | 92 | mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); |
88 | mSummaryCheck->setChecked(true); | 93 | mSummaryCheck->setChecked(true); |
89 | mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); | 94 | mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); |
90 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); | 95 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); |
91 | 96 | ||
92 | QHBox *attendeeGroup = new QHBox( topFrame ); | 97 | QHBox *attendeeGroup = new QHBox( topFrame ); |
93 | layout->addWidget(attendeeGroup ); | 98 | layout->addWidget(attendeeGroup ); |
94 | new QLabel( i18n("Attendee:"),attendeeGroup ); | 99 | new QLabel( i18n("Attendee:"),attendeeGroup ); |
95 | mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); | 100 | mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); |
96 | mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); | 101 | mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); |
97 | // Date range | 102 | // Date range |
98 | // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), | 103 | // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), |
99 | // topFrame); | 104 | // topFrame); |
100 | // layout->addWidget(rangeGroup); | 105 | // layout->addWidget(rangeGroup); |
101 | 106 | ||
102 | QWidget *rangeWidget = new QWidget(topFrame); | 107 | QWidget *rangeWidget = new QWidget(topFrame); |
103 | QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint()); | 108 | QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint()); |
104 | rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); | 109 | rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); |
105 | mStartDate = new KDateEdit(rangeWidget); | 110 | mStartDate = new KDateEdit(rangeWidget); |
106 | rangeLayout->addWidget(mStartDate); | 111 | rangeLayout->addWidget(mStartDate); |
107 | rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); | 112 | rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); |
108 | mEndDate = new KDateEdit(rangeWidget); | 113 | mEndDate = new KDateEdit(rangeWidget); |
109 | mEndDate->setDate(QDate::currentDate().addDays(365)); | 114 | mEndDate->setDate(QDate::currentDate().addDays(365)); |
110 | rangeLayout->addWidget(mEndDate); | 115 | rangeLayout->addWidget(mEndDate); |
111 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); | 116 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); |
112 | rangeLayout->addWidget( (QWidget*)wt ); | 117 | rangeLayout->addWidget( (QWidget*)wt ); |
113 | layout->addWidget(rangeWidget); | 118 | layout->addWidget(rangeWidget); |
114 | // Results list view | 119 | // Results list view |
115 | listView = new KOListView(mCalendar,topFrame); | 120 | listView = new KOListView(mCalendar,topFrame); |
116 | layout->addWidget(listView); | 121 | layout->addWidget(listView); |
117 | //layout->setStretchFactor( listView, 333 ); | 122 | //layout->setStretchFactor( listView, 333 ); |
118 | //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) ); | 123 | //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) ); |
119 | //listView->setMaximumHeight( 50 ); | 124 | //listView->setMaximumHeight( 50 ); |
120 | listView->readSettings(KOGlobals::config(),"SearchListView Layout"); | 125 | listView->readSettings(KOGlobals::config(),"SearchListView Layout"); |
121 | connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList())); | 126 | connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList())); |
122 | 127 | ||
123 | setCaption( i18n("KO/Pi Find: ")); | 128 | setCaption( i18n("KO/Pi Find: ")); |
124 | #ifdef DESKTOP_VERSION | 129 | #ifdef DESKTOP_VERSION |
125 | OkButton = new QPushButton( i18n("Close"), this ); | 130 | OkButton = new QPushButton( i18n("Close"), this ); |
126 | connect(OkButton,SIGNAL(clicked()),SLOT(hide())); | 131 | connect(OkButton,SIGNAL(clicked()),SLOT(hide())); |
127 | #endif | 132 | #endif |
128 | } | 133 | } |
129 | 134 | ||
130 | SearchDialog::~SearchDialog() | 135 | SearchDialog::~SearchDialog() |
131 | { | 136 | { |
132 | 137 | ||
133 | } | 138 | } |
134 | void SearchDialog::raiseAndSelect() | 139 | void SearchDialog::raiseAndSelect() |
135 | { | 140 | { |
136 | 141 | ||
137 | static int currentState = 0; | 142 | static int currentState = 0; |
138 | 143 | ||
139 | if ( !mSearchJournal->isChecked() && !mSearchTodo->isChecked() && !mSearchEvent->isChecked() ) | 144 | if ( !mSearchJournal->isChecked() && !mSearchTodo->isChecked() && !mSearchEvent->isChecked() ) |
140 | currentState = 0; | 145 | currentState = 0; |
141 | int newState = 0; | 146 | int newState = 0; |
142 | if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { | 147 | if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { |
143 | newState = VIEW_J_VIEW; | 148 | newState = VIEW_J_VIEW; |
144 | } | 149 | } |
145 | else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { | 150 | else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { |
146 | newState = VIEW_T_VIEW; | 151 | newState = VIEW_T_VIEW; |
147 | } | 152 | } |
148 | else { | 153 | else { |
149 | newState = VIEW_A_VIEW; | 154 | newState = VIEW_A_VIEW; |
150 | } | 155 | } |
151 | if ( newState != currentState ) { | 156 | if ( newState != currentState ) { |
152 | if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { | 157 | if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { |
153 | if ( ! mSearchJournal->isChecked() ) { | 158 | if ( ! mSearchJournal->isChecked() ) { |
154 | mSearchJournal->setChecked( true ); | 159 | mSearchJournal->setChecked( true ); |
155 | mSearchTodo->setChecked( false ); | 160 | mSearchTodo->setChecked( false ); |
156 | mSearchEvent->setChecked( false ); | 161 | mSearchEvent->setChecked( false ); |
157 | } | 162 | } |
158 | } | 163 | } |
159 | else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { | 164 | else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { |
160 | if ( ! mSearchTodo->isChecked() ) { | 165 | if ( ! mSearchTodo->isChecked() ) { |
161 | mSearchTodo->setChecked( true ); | 166 | mSearchTodo->setChecked( true ); |
162 | mSearchJournal->setChecked( false ); | 167 | mSearchJournal->setChecked( false ); |
163 | mSearchEvent->setChecked( false ); | 168 | mSearchEvent->setChecked( false ); |
164 | } | 169 | } |
165 | } | 170 | } |
166 | else { | 171 | else { |
167 | if ( ! mSearchEvent->isChecked() ) { | 172 | if ( ! mSearchEvent->isChecked() ) { |
168 | mSearchEvent->setChecked( true ); | 173 | mSearchEvent->setChecked( true ); |
169 | mSearchJournal->setChecked( false ); | 174 | mSearchJournal->setChecked( false ); |
170 | mSearchTodo->setChecked( false ); | 175 | mSearchTodo->setChecked( false ); |
171 | } | 176 | } |
172 | } | 177 | } |
173 | } | 178 | } |
174 | currentState = newState; | 179 | currentState = newState; |
175 | raise(); | 180 | raise(); |
176 | } | 181 | } |
177 | void SearchDialog::setFocusToList() | 182 | void SearchDialog::setFocusToList() |
178 | { | 183 | { |
179 | listView->resetFocus(); | 184 | listView->resetFocus(); |
180 | } | 185 | } |
181 | void SearchDialog::accept() | 186 | void SearchDialog::accept() |
182 | { | 187 | { |
183 | doSearch(); | 188 | doSearch(); |
184 | } | 189 | } |
185 | void SearchDialog::updateList() | 190 | void SearchDialog::updateList() |
186 | { | 191 | { |
187 | //listView->updateList(); | 192 | //listView->updateList(); |
188 | if ( isVisible() ) { | 193 | if ( isVisible() ) { |
189 | updateView(); | 194 | updateView(); |
190 | //qDebug("SearchDialog::updated "); | 195 | //qDebug("SearchDialog::updated "); |
191 | } | 196 | } |
192 | else { | 197 | else { |
193 | listView->clear(); | 198 | listView->clear(); |
194 | //qDebug("SearchDialog::cleared "); | 199 | //qDebug("SearchDialog::cleared "); |
195 | 200 | ||
196 | } | 201 | } |
197 | } | 202 | } |
198 | void SearchDialog::searchTextChanged( const QString &_text ) | 203 | void SearchDialog::searchTextChanged( const QString &_text ) |
199 | { | 204 | { |
200 | #if 0 | 205 | #if 0 |
201 | enableButton( KDialogBase::User1, !_text.isEmpty() ); | 206 | enableButton( KDialogBase::User1, !_text.isEmpty() ); |
202 | #endif | 207 | #endif |
203 | } | 208 | } |
204 | 209 | ||
205 | void SearchDialog::doSearch() | 210 | void SearchDialog::doSearch() |
206 | { | 211 | { |
207 | QRegExp re; | 212 | QRegExp re; |
208 | 213 | ||
209 | re.setWildcard(true); // most people understand these better. | 214 | re.setWildcard(true); // most people understand these better. |
210 | re.setCaseSensitive(false); | 215 | re.setCaseSensitive(false); |
211 | QString st = searchEdit->text(); | 216 | QString st = searchEdit->text(); |
212 | if ( st.right(1) != "*") | 217 | if ( st.right(1) != "*") |
213 | st += "*"; | 218 | st += "*"; |
214 | re.setPattern(st); | 219 | re.setPattern(st); |
215 | if (!mSearchEvent->isChecked() && !mSearchTodo->isChecked() && !mSearchJournal->isChecked() ) { | 220 | if (!mSearchEvent->isChecked() && !mSearchTodo->isChecked() && !mSearchJournal->isChecked() ) { |
216 | KMessageBox::sorry(this, | 221 | KMessageBox::sorry(this, |
217 | i18n("Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals")); | 222 | i18n("Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals")); |
218 | return; | 223 | return; |
219 | } | 224 | } |
220 | if (!re.isValid() ) { | 225 | if (!re.isValid() ) { |
221 | KMessageBox::sorry(this, | 226 | KMessageBox::sorry(this, |
222 | i18n("Invalid search expression,\ncannot perform " | 227 | i18n("Invalid search expression,\ncannot perform " |
223 | "the search.\nPlease enter a search expression\n" | 228 | "the search.\nPlease enter a search expression\n" |
224 | "using the wildcard characters\n '*' and '?'" | 229 | "using the wildcard characters\n '*' and '?'" |
225 | "where needed.")); | 230 | "where needed.")); |
226 | return; | 231 | return; |
227 | } | 232 | } |
228 | search(re); | 233 | search(re); |
229 | listView->setStartDate( mStartDate->date() ); | 234 | listView->setStartDate( mStartDate->date() ); |
230 | listView->showEvents(mMatchedEvents); | 235 | listView->showEvents(mMatchedEvents); |
231 | listView->addTodos(mMatchedTodos); | 236 | listView->addTodos(mMatchedTodos); |
232 | listView->addJournals(mMatchedJournals); | 237 | listView->addJournals(mMatchedJournals); |
233 | if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { | 238 | if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { |
234 | setCaption(i18n("No items found. Use '*' and '?' where needed.")); | 239 | setCaption(i18n("No items found. Use '*' and '?' where needed.")); |
235 | } else { | 240 | } else { |
236 | QString mess; | 241 | QString mess; |
237 | mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() ); | 242 | mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() ); |
238 | setCaption( i18n("KO/Pi Find: ") + mess); | 243 | setCaption( i18n("KO/Pi Find: ") + mess); |
239 | 244 | ||
240 | } | 245 | } |
241 | searchEdit->setFocus(); | 246 | searchEdit->setFocus(); |
242 | } | 247 | } |
243 | void SearchDialog::updateConfig() | 248 | void SearchDialog::updateConfig() |
244 | { | 249 | { |
245 | listView->updateConfig(); | 250 | listView->updateConfig(); |
246 | } | 251 | } |
247 | void SearchDialog::updateView() | 252 | void SearchDialog::updateView() |
248 | { | 253 | { |
249 | //qDebug("SearchDialog::updateView() %d ", isVisible()); | 254 | //qDebug("SearchDialog::updateView() %d ", isVisible()); |
250 | QRegExp re; | 255 | QRegExp re; |
251 | re.setWildcard(true); // most people understand these better. | 256 | re.setWildcard(true); // most people understand these better. |
252 | re.setCaseSensitive(false); | 257 | re.setCaseSensitive(false); |
253 | QString st = searchEdit->text(); | 258 | QString st = searchEdit->text(); |
254 | if ( st.right(1) != "*") | 259 | if ( st.right(1) != "*") |
255 | st += "*"; | 260 | st += "*"; |
256 | re.setPattern(st); | 261 | re.setPattern(st); |
257 | if (re.isValid()) { | 262 | if (re.isValid()) { |
258 | search(re); | 263 | search(re); |
259 | } else { | 264 | } else { |
260 | mMatchedEvents.clear(); | 265 | mMatchedEvents.clear(); |
261 | mMatchedTodos.clear(); | 266 | mMatchedTodos.clear(); |
262 | mMatchedJournals.clear(); | 267 | mMatchedJournals.clear(); |
263 | } | 268 | } |
264 | listView->setStartDate( mStartDate->date() ); | 269 | listView->setStartDate( mStartDate->date() ); |
265 | listView->showEvents(mMatchedEvents); | 270 | listView->showEvents(mMatchedEvents); |
266 | listView->addTodos(mMatchedTodos); | 271 | listView->addTodos(mMatchedTodos); |
267 | listView->addJournals(mMatchedJournals); | 272 | listView->addJournals(mMatchedJournals); |
268 | } | 273 | } |
269 | 274 | ||
270 | void SearchDialog::search(const QRegExp &re) | 275 | void SearchDialog::search(const QRegExp &re) |
271 | { | 276 | { |
272 | QPtrList<Event> events = mCalendar->events( mStartDate->date(), | 277 | QPtrList<Event> events = mCalendar->events( mStartDate->date(), |
273 | mEndDate->date(), | 278 | mEndDate->date(), |
274 | false /*mInclusiveCheck->isChecked()*/ ); | 279 | false /*mInclusiveCheck->isChecked()*/ ); |
275 | 280 | if ( !mAddItems->isChecked() ) | |
276 | mMatchedEvents.clear(); | 281 | mMatchedEvents.clear(); |
277 | if ( mSearchEvent->isChecked() ) { | 282 | if ( mSearchEvent->isChecked() ) { |
278 | Event *ev; | 283 | Event *ev; |
279 | for(ev=events.first();ev;ev=events.next()) { | 284 | for(ev=events.first();ev;ev=events.next()) { |
280 | if (mSummaryCheck->isChecked()) { | 285 | if (mSummaryCheck->isChecked()) { |
281 | #if QT_VERSION >= 0x030000 | 286 | #if QT_VERSION >= 0x030000 |
282 | if (re.search(ev->summary()) != -1) | 287 | if (re.search(ev->summary()) != -1) |
283 | #else | 288 | #else |
284 | if (re.match(ev->summary()) != -1) | 289 | if (re.match(ev->summary()) != -1) |
285 | #endif | 290 | #endif |
286 | { | 291 | { |
287 | mMatchedEvents.append(ev); | 292 | mMatchedEvents.append(ev); |
288 | continue; | 293 | continue; |
289 | } | 294 | } |
290 | #if QT_VERSION >= 0x030000 | 295 | #if QT_VERSION >= 0x030000 |
291 | if (re.search(ev->location()) != -1) | 296 | if (re.search(ev->location()) != -1) |
292 | #else | 297 | #else |
293 | if (re.match(ev->location()) != -1) | 298 | if (re.match(ev->location()) != -1) |
294 | #endif | 299 | #endif |
295 | { | 300 | { |
296 | mMatchedEvents.append(ev); | 301 | mMatchedEvents.append(ev); |
297 | continue; | 302 | continue; |
298 | } | 303 | } |
299 | } | 304 | } |
300 | if (mDescriptionCheck->isChecked()) { | 305 | if (mDescriptionCheck->isChecked()) { |
301 | #if QT_VERSION >= 0x030000 | 306 | #if QT_VERSION >= 0x030000 |
302 | if (re.search(ev->description()) != -1) | 307 | if (re.search(ev->description()) != -1) |
303 | #else | 308 | #else |
304 | if (re.match(ev->description()) != -1) | 309 | if (re.match(ev->description()) != -1) |
305 | #endif | 310 | #endif |
306 | { | 311 | { |
307 | mMatchedEvents.append(ev); | 312 | mMatchedEvents.append(ev); |
308 | continue; | 313 | continue; |
309 | } | 314 | } |
310 | } | 315 | } |
311 | if (mCategoryCheck->isChecked()) { | 316 | if (mCategoryCheck->isChecked()) { |
312 | #if QT_VERSION >= 0x030000 | 317 | #if QT_VERSION >= 0x030000 |
313 | if (re.search(ev->categoriesStr()) != -1) | 318 | if (re.search(ev->categoriesStr()) != -1) |
314 | #else | 319 | #else |
315 | if (re.match(ev->categoriesStr()) != -1) | 320 | if (re.match(ev->categoriesStr()) != -1) |
316 | #endif | 321 | #endif |
317 | { | 322 | { |
318 | mMatchedEvents.append(ev); | 323 | mMatchedEvents.append(ev); |
319 | continue; | 324 | continue; |
320 | } | 325 | } |
321 | } | 326 | } |
322 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { | 327 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { |
323 | QPtrList<Attendee> tmpAList = ev->attendees(); | 328 | QPtrList<Attendee> tmpAList = ev->attendees(); |
324 | Attendee *a; | 329 | Attendee *a; |
325 | for (a = tmpAList.first(); a; a = tmpAList.next()) { | 330 | for (a = tmpAList.first(); a; a = tmpAList.next()) { |
326 | if (mSearchAName->isChecked()) { | 331 | if (mSearchAName->isChecked()) { |
327 | #if QT_VERSION >= 0x030000 | 332 | #if QT_VERSION >= 0x030000 |
328 | if (re.search(a->name()) != -1) | 333 | if (re.search(a->name()) != -1) |
329 | #else | 334 | #else |
330 | if (re.match(a->name()) != -1) | 335 | if (re.match(a->name()) != -1) |
331 | #endif | 336 | #endif |
332 | { | 337 | { |
333 | mMatchedEvents.append(ev); | 338 | mMatchedEvents.append(ev); |
334 | break; | 339 | break; |
335 | } | 340 | } |
336 | } | 341 | } |
337 | if (mSearchAEmail->isChecked()) { | 342 | if (mSearchAEmail->isChecked()) { |
338 | #if QT_VERSION >= 0x030000 | 343 | #if QT_VERSION >= 0x030000 |
339 | if (re.search(a->email()) != -1) | 344 | if (re.search(a->email()) != -1) |
340 | #else | 345 | #else |
341 | if (re.match(a->email()) != -1) | 346 | if (re.match(a->email()) != -1) |
342 | #endif | 347 | #endif |
343 | { | 348 | { |
344 | mMatchedEvents.append(ev); | 349 | mMatchedEvents.append(ev); |
345 | break; | 350 | break; |
346 | } | 351 | } |
347 | } | 352 | } |
348 | } | 353 | } |
349 | } | 354 | } |
350 | } | 355 | } |
351 | } | 356 | } |
352 | QPtrList<Todo> todos = mCalendar->todos( ); | 357 | QPtrList<Todo> todos = mCalendar->todos( ); |
353 | mMatchedTodos.clear(); | 358 | if ( !mAddItems->isChecked() ) |
359 | mMatchedTodos.clear(); | ||
354 | if ( mSearchTodo->isChecked() ) { | 360 | if ( mSearchTodo->isChecked() ) { |
355 | Todo *tod; | 361 | Todo *tod; |
356 | for(tod=todos.first();tod;tod=todos.next()) { | 362 | for(tod=todos.first();tod;tod=todos.next()) { |
357 | if (mSummaryCheck->isChecked()) { | 363 | if (mSummaryCheck->isChecked()) { |
358 | #if QT_VERSION >= 0x030000 | 364 | #if QT_VERSION >= 0x030000 |
359 | if (re.search(tod->summary()) != -1) | 365 | if (re.search(tod->summary()) != -1) |
360 | #else | 366 | #else |
361 | if (re.match(tod->summary()) != -1) | 367 | if (re.match(tod->summary()) != -1) |
362 | #endif | 368 | #endif |
363 | { | 369 | { |
364 | mMatchedTodos.append(tod); | 370 | mMatchedTodos.append(tod); |
365 | continue; | 371 | continue; |
366 | } | 372 | } |
367 | } | 373 | } |
368 | if (mDescriptionCheck->isChecked()) { | 374 | if (mDescriptionCheck->isChecked()) { |
369 | #if QT_VERSION >= 0x030000 | 375 | #if QT_VERSION >= 0x030000 |
370 | if (re.search(tod->description()) != -1) | 376 | if (re.search(tod->description()) != -1) |
371 | #else | 377 | #else |
372 | if (re.match(tod->description()) != -1) | 378 | if (re.match(tod->description()) != -1) |
373 | #endif | 379 | #endif |
374 | { | 380 | { |
375 | mMatchedTodos.append(tod); | 381 | mMatchedTodos.append(tod); |
376 | continue; | 382 | continue; |
377 | } | 383 | } |
378 | } | 384 | } |
379 | if (mCategoryCheck->isChecked()) { | 385 | if (mCategoryCheck->isChecked()) { |
380 | #if QT_VERSION >= 0x030000 | 386 | #if QT_VERSION >= 0x030000 |
381 | if (re.search(tod->categoriesStr()) != -1) | 387 | if (re.search(tod->categoriesStr()) != -1) |
382 | #else | 388 | #else |
383 | if (re.match(tod->categoriesStr()) != -1) | 389 | if (re.match(tod->categoriesStr()) != -1) |
384 | #endif | 390 | #endif |
385 | { | 391 | { |
386 | mMatchedTodos.append(tod); | 392 | mMatchedTodos.append(tod); |
387 | continue; | 393 | continue; |
388 | } | 394 | } |
389 | } | 395 | } |
390 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { | 396 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { |
391 | QPtrList<Attendee> tmpAList = tod->attendees(); | 397 | QPtrList<Attendee> tmpAList = tod->attendees(); |
392 | Attendee *a; | 398 | Attendee *a; |
393 | for (a = tmpAList.first(); a; a = tmpAList.next()) { | 399 | for (a = tmpAList.first(); a; a = tmpAList.next()) { |
394 | if (mSearchAName->isChecked()) { | 400 | if (mSearchAName->isChecked()) { |
395 | #if QT_VERSION >= 0x030000 | 401 | #if QT_VERSION >= 0x030000 |
396 | if (re.search(a->name()) != -1) | 402 | if (re.search(a->name()) != -1) |
397 | #else | 403 | #else |
398 | if (re.match(a->name()) != -1) | 404 | if (re.match(a->name()) != -1) |
399 | #endif | 405 | #endif |
400 | { | 406 | { |
401 | mMatchedTodos.append(tod); | 407 | mMatchedTodos.append(tod); |
402 | break; | 408 | break; |
403 | } | 409 | } |
404 | } | 410 | } |
405 | if (mSearchAEmail->isChecked()) { | 411 | if (mSearchAEmail->isChecked()) { |
406 | #if QT_VERSION >= 0x030000 | 412 | #if QT_VERSION >= 0x030000 |
407 | if (re.search(a->email()) != -1) | 413 | if (re.search(a->email()) != -1) |
408 | #else | 414 | #else |
409 | if (re.match(a->email()) != -1) | 415 | if (re.match(a->email()) != -1) |
410 | #endif | 416 | #endif |
411 | { | 417 | { |
412 | mMatchedTodos.append(tod); | 418 | mMatchedTodos.append(tod); |
413 | break; | 419 | break; |
414 | } | 420 | } |
415 | } | 421 | } |
416 | } | 422 | } |
417 | } | 423 | } |
418 | } | 424 | } |
419 | } | 425 | } |
420 | mMatchedJournals.clear(); | 426 | if ( !mAddItems->isChecked() ) |
427 | mMatchedJournals.clear(); | ||
421 | if (mSearchJournal->isChecked() ) { | 428 | if (mSearchJournal->isChecked() ) { |
422 | QPtrList<Journal> journals = mCalendar->journals( ); | 429 | QPtrList<Journal> journals = mCalendar->journals( ); |
423 | Journal* journ; | 430 | Journal* journ; |
424 | 431 | ||
425 | for(journ=journals.first();journ;journ=journals.next()) { | 432 | for(journ=journals.first();journ;journ=journals.next()) { |
426 | if ( journ->dtStart().date() <= mEndDate->date() | 433 | if ( journ->dtStart().date() <= mEndDate->date() |
427 | &&journ->dtStart().date() >= mStartDate->date()) { | 434 | &&journ->dtStart().date() >= mStartDate->date()) { |
428 | #if QT_VERSION >= 0x030000 | 435 | #if QT_VERSION >= 0x030000 |
429 | if (re.search(journ->description()) != -1) | 436 | if (re.search(journ->description()) != -1) |
430 | #else | 437 | #else |
431 | if (re.match(journ->description()) != -1) | 438 | if (re.match(journ->description()) != -1) |
432 | #endif | 439 | #endif |
433 | { | 440 | { |
434 | mMatchedJournals.append(journ); | 441 | mMatchedJournals.append(journ); |
435 | continue; | 442 | continue; |
436 | } | 443 | } |
437 | } | 444 | } |
438 | } | 445 | } |
439 | } | 446 | } |
440 | 447 | ||
441 | } | 448 | } |
442 | 449 | ||
443 | void SearchDialog::keyPressEvent ( QKeyEvent *e) | 450 | void SearchDialog::keyPressEvent ( QKeyEvent *e) |
444 | { | 451 | { |
445 | switch ( e->key() ) { | 452 | switch ( e->key() ) { |
446 | case Qt::Key_Escape: | 453 | case Qt::Key_Escape: |
447 | close(); | 454 | close(); |
448 | break; | 455 | break; |
449 | case Qt::Key_F: | 456 | case Qt::Key_F: |
450 | if ( e->state() == Qt::ControlButton ) { | 457 | if ( e->state() == Qt::ControlButton ) { |
451 | 458 | ||
452 | } | 459 | } |
453 | break; | 460 | break; |
454 | case Qt::Key_Return: | 461 | case Qt::Key_Return: |
455 | case Qt::Key_Enter: | 462 | case Qt::Key_Enter: |
456 | doSearch(); | 463 | doSearch(); |
457 | break; | 464 | break; |
458 | 465 | ||
459 | default: | 466 | default: |
460 | e->ignore(); | 467 | e->ignore(); |
461 | } | 468 | } |
462 | } | 469 | } |
463 | 470 | ||
464 | //mMatchedJournals; | 471 | //mMatchedJournals; |
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h index 4559d20..11ad2f0 100644 --- a/korganizer/searchdialog.h +++ b/korganizer/searchdialog.h | |||
@@ -1,95 +1,96 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1998 Preston Brown | 3 | Copyright (c) 1998 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | #ifndef SEARCHDIALOG_H | 24 | #ifndef SEARCHDIALOG_H |
25 | #define SEARCHDIALOG_H | 25 | #define SEARCHDIALOG_H |
26 | 26 | ||
27 | #include <qregexp.h> | 27 | #include <qregexp.h> |
28 | 28 | ||
29 | #include <kdialogbase.h> | 29 | #include <kdialogbase.h> |
30 | #include <qvbox.h> | 30 | #include <qvbox.h> |
31 | 31 | ||
32 | #include <libkcal/calendar.h> | 32 | #include <libkcal/calendar.h> |
33 | 33 | ||
34 | #include "kolistview.h" | 34 | #include "kolistview.h" |
35 | 35 | ||
36 | class KDateEdit; | 36 | class KDateEdit; |
37 | class QCheckBox; | 37 | class QCheckBox; |
38 | class QLineEdit; | 38 | class QLineEdit; |
39 | class KLineEdit; | 39 | class KLineEdit; |
40 | class QLabel; | 40 | class QLabel; |
41 | class CalendarView; | 41 | class CalendarView; |
42 | 42 | ||
43 | using namespace KCal; | 43 | using namespace KCal; |
44 | class SearchDialog : public QVBox | 44 | class SearchDialog : public QVBox |
45 | { | 45 | { |
46 | Q_OBJECT | 46 | Q_OBJECT |
47 | public: | 47 | public: |
48 | SearchDialog(Calendar *calendar,CalendarView *parent=0); | 48 | SearchDialog(Calendar *calendar,CalendarView *parent=0); |
49 | virtual ~SearchDialog(); | 49 | virtual ~SearchDialog(); |
50 | KOListView *listview(){ return listView;} | 50 | KOListView *listview(){ return listView;} |
51 | void updateView(); | 51 | void updateView(); |
52 | void raiseAndSelect(); | 52 | void raiseAndSelect(); |
53 | 53 | ||
54 | public slots: | 54 | public slots: |
55 | void changeEventDisplay(Event *, int) { updateView(); } | 55 | void changeEventDisplay(Event *, int) { updateView(); } |
56 | void updateConfig(); | 56 | void updateConfig(); |
57 | void updateList(); | 57 | void updateList(); |
58 | protected slots: | 58 | protected slots: |
59 | void setFocusToList(); | 59 | void setFocusToList(); |
60 | void accept(); | 60 | void accept(); |
61 | void doSearch(); | 61 | void doSearch(); |
62 | void searchTextChanged( const QString &_text ); | 62 | void searchTextChanged( const QString &_text ); |
63 | 63 | ||
64 | signals: | 64 | signals: |
65 | void showEventSignal(Event *); | 65 | void showEventSignal(Event *); |
66 | void editEventSignal(Event *); | 66 | void editEventSignal(Event *); |
67 | void deleteEventSignal(Event *); | 67 | void deleteEventSignal(Event *); |
68 | 68 | ||
69 | private: | 69 | private: |
70 | void search(const QRegExp &); | 70 | void search(const QRegExp &); |
71 | 71 | ||
72 | Calendar *mCalendar; | 72 | Calendar *mCalendar; |
73 | 73 | ||
74 | QPtrList<Event> mMatchedEvents; | 74 | QPtrList<Event> mMatchedEvents; |
75 | QPtrList<Todo> mMatchedTodos; | 75 | QPtrList<Todo> mMatchedTodos; |
76 | QPtrList<Journal> mMatchedJournals; | 76 | QPtrList<Journal> mMatchedJournals; |
77 | 77 | ||
78 | QLabel *searchLabel; | 78 | QLabel *searchLabel; |
79 | KLineEdit *searchEdit; | 79 | KLineEdit *searchEdit; |
80 | KOListView *listView; | 80 | KOListView *listView; |
81 | 81 | ||
82 | KDateEdit *mStartDate; | 82 | KDateEdit *mStartDate; |
83 | KDateEdit *mEndDate; | 83 | KDateEdit *mEndDate; |
84 | QCheckBox *mSummaryCheck; | 84 | QCheckBox *mSummaryCheck; |
85 | QCheckBox *mDescriptionCheck; | 85 | QCheckBox *mDescriptionCheck; |
86 | QCheckBox *mCategoryCheck; | 86 | QCheckBox *mCategoryCheck; |
87 | QCheckBox *mSearchEvent; | 87 | QCheckBox *mSearchEvent; |
88 | QCheckBox *mSearchTodo; | 88 | QCheckBox *mSearchTodo; |
89 | QCheckBox *mSearchJournal; | 89 | QCheckBox *mSearchJournal; |
90 | QCheckBox *mSearchAName; | 90 | QCheckBox *mSearchAName; |
91 | QCheckBox *mSearchAEmail; | 91 | QCheckBox *mSearchAEmail; |
92 | QCheckBox *mAddItems; | ||
92 | void keyPressEvent ( QKeyEvent *e) ; | 93 | void keyPressEvent ( QKeyEvent *e) ; |
93 | }; | 94 | }; |
94 | 95 | ||
95 | #endif | 96 | #endif |
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index f446197..4382416 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -69,676 +69,687 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) | |||
69 | QPtrListIterator<Alarm> it( i.mAlarms ); | 69 | QPtrListIterator<Alarm> it( i.mAlarms ); |
70 | const Alarm *a; | 70 | const Alarm *a; |
71 | while( (a = it.current()) ) { | 71 | while( (a = it.current()) ) { |
72 | Alarm *b = new Alarm( *a ); | 72 | Alarm *b = new Alarm( *a ); |
73 | b->setParent( this ); | 73 | b->setParent( this ); |
74 | mAlarms.append( b ); | 74 | mAlarms.append( b ); |
75 | 75 | ||
76 | ++it; | 76 | ++it; |
77 | } | 77 | } |
78 | mAlarms.setAutoDelete(true); | 78 | mAlarms.setAutoDelete(true); |
79 | mHasRecurrenceID = i.mHasRecurrenceID; | 79 | mHasRecurrenceID = i.mHasRecurrenceID; |
80 | mRecurrenceID = i.mRecurrenceID; | 80 | mRecurrenceID = i.mRecurrenceID; |
81 | mRecurrence = new Recurrence( *(i.mRecurrence), this ); | 81 | mRecurrence = new Recurrence( *(i.mRecurrence), this ); |
82 | mHoliday = i.mHoliday ; | 82 | mHoliday = i.mHoliday ; |
83 | mBirthday = i.mBirthday; | 83 | mBirthday = i.mBirthday; |
84 | mAnniversary = i.mAnniversary; | 84 | mAnniversary = i.mAnniversary; |
85 | } | 85 | } |
86 | 86 | ||
87 | Incidence::~Incidence() | 87 | Incidence::~Incidence() |
88 | { | 88 | { |
89 | 89 | ||
90 | Incidence *ev; | 90 | Incidence *ev; |
91 | QPtrList<Incidence> Relations = relations(); | 91 | QPtrList<Incidence> Relations = relations(); |
92 | for (ev=Relations.first();ev;ev=Relations.next()) { | 92 | for (ev=Relations.first();ev;ev=Relations.next()) { |
93 | if (ev->relatedTo() == this) ev->setRelatedTo(0); | 93 | if (ev->relatedTo() == this) ev->setRelatedTo(0); |
94 | } | 94 | } |
95 | if (relatedTo()) relatedTo()->removeRelation(this); | 95 | if (relatedTo()) relatedTo()->removeRelation(this); |
96 | delete mRecurrence; | 96 | delete mRecurrence; |
97 | 97 | ||
98 | } | 98 | } |
99 | 99 | ||
100 | bool Incidence::isHoliday() const | 100 | bool Incidence::isHoliday() const |
101 | { | 101 | { |
102 | return mHoliday; | 102 | return mHoliday; |
103 | } | 103 | } |
104 | bool Incidence::isBirthday() const | 104 | bool Incidence::isBirthday() const |
105 | { | 105 | { |
106 | 106 | ||
107 | return mBirthday ; | 107 | return mBirthday ; |
108 | } | 108 | } |
109 | bool Incidence::isAnniversary() const | 109 | bool Incidence::isAnniversary() const |
110 | { | 110 | { |
111 | return mAnniversary ; | 111 | return mAnniversary ; |
112 | 112 | ||
113 | } | 113 | } |
114 | 114 | ||
115 | bool Incidence::hasRecurrenceID() const | 115 | bool Incidence::hasRecurrenceID() const |
116 | { | 116 | { |
117 | return mHasRecurrenceID; | 117 | return mHasRecurrenceID; |
118 | } | 118 | } |
119 | 119 | ||
120 | void Incidence::setHasRecurrenceID( bool b ) | 120 | void Incidence::setHasRecurrenceID( bool b ) |
121 | { | 121 | { |
122 | mHasRecurrenceID = b; | 122 | mHasRecurrenceID = b; |
123 | } | 123 | } |
124 | 124 | ||
125 | void Incidence::setRecurrenceID(QDateTime d) | 125 | void Incidence::setRecurrenceID(QDateTime d) |
126 | { | 126 | { |
127 | mRecurrenceID = d; | 127 | mRecurrenceID = d; |
128 | mHasRecurrenceID = true; | 128 | mHasRecurrenceID = true; |
129 | updated(); | 129 | updated(); |
130 | } | 130 | } |
131 | QDateTime Incidence::recurrenceID () const | 131 | QDateTime Incidence::recurrenceID () const |
132 | { | 132 | { |
133 | return mRecurrenceID; | 133 | return mRecurrenceID; |
134 | } | 134 | } |
135 | 135 | ||
136 | bool Incidence::cancelled() const | 136 | bool Incidence::cancelled() const |
137 | { | 137 | { |
138 | return mCancelled; | 138 | return mCancelled; |
139 | } | 139 | } |
140 | void Incidence::setCancelled( bool b ) | 140 | void Incidence::setCancelled( bool b ) |
141 | { | 141 | { |
142 | mCancelled = b; | 142 | mCancelled = b; |
143 | updated(); | 143 | updated(); |
144 | } | 144 | } |
145 | bool Incidence::hasStartDate() const | 145 | bool Incidence::hasStartDate() const |
146 | { | 146 | { |
147 | return mHasStartDate; | 147 | return mHasStartDate; |
148 | } | 148 | } |
149 | 149 | ||
150 | void Incidence::setHasStartDate(bool f) | 150 | void Incidence::setHasStartDate(bool f) |
151 | { | 151 | { |
152 | if (mReadOnly) return; | 152 | if (mReadOnly) return; |
153 | mHasStartDate = f; | 153 | mHasStartDate = f; |
154 | updated(); | 154 | updated(); |
155 | } | 155 | } |
156 | 156 | ||
157 | // A string comparison that considers that null and empty are the same | 157 | // A string comparison that considers that null and empty are the same |
158 | static bool stringCompare( const QString& s1, const QString& s2 ) | 158 | static bool stringCompare( const QString& s1, const QString& s2 ) |
159 | { | 159 | { |
160 | if ( s1.isEmpty() && s2.isEmpty() ) | 160 | if ( s1.isEmpty() && s2.isEmpty() ) |
161 | return true; | 161 | return true; |
162 | return s1 == s2; | 162 | return s1 == s2; |
163 | } | 163 | } |
164 | 164 | ||
165 | bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) | 165 | bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) |
166 | { | 166 | { |
167 | 167 | ||
168 | if( i1.alarms().count() != i2.alarms().count() ) { | 168 | if( i1.alarms().count() != i2.alarms().count() ) { |
169 | return false; // no need to check further | 169 | return false; // no need to check further |
170 | } | 170 | } |
171 | if ( i1.alarms().count() > 0 ) { | 171 | if ( i1.alarms().count() > 0 ) { |
172 | if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) | 172 | if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) |
173 | { | 173 | { |
174 | qDebug("alarm not equal "); | 174 | qDebug("alarm not equal "); |
175 | return false; | 175 | return false; |
176 | } | 176 | } |
177 | } | 177 | } |
178 | #if 0 | 178 | #if 0 |
179 | QPtrListIterator<Alarm> a1( i1.alarms() ); | 179 | QPtrListIterator<Alarm> a1( i1.alarms() ); |
180 | QPtrListIterator<Alarm> a2( i2.alarms() ); | 180 | QPtrListIterator<Alarm> a2( i2.alarms() ); |
181 | for( ; a1.current() && a2.current(); ++a1, ++a2 ) { | 181 | for( ; a1.current() && a2.current(); ++a1, ++a2 ) { |
182 | if( *a1.current() == *a2.current() ) { | 182 | if( *a1.current() == *a2.current() ) { |
183 | continue; | 183 | continue; |
184 | } | 184 | } |
185 | else { | 185 | else { |
186 | return false; | 186 | return false; |
187 | } | 187 | } |
188 | } | 188 | } |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { | 191 | if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { |
192 | if ( i1.hasRecurrenceID() ) { | 192 | if ( i1.hasRecurrenceID() ) { |
193 | if ( i1.recurrenceID() != i2.recurrenceID() ) | 193 | if ( i1.recurrenceID() != i2.recurrenceID() ) |
194 | return false; | 194 | return false; |
195 | } | 195 | } |
196 | 196 | ||
197 | } else { | 197 | } else { |
198 | return false; | 198 | return false; |
199 | } | 199 | } |
200 | 200 | ||
201 | if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) | 201 | if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) |
202 | return false; | 202 | return false; |
203 | if ( i1.hasStartDate() == i2.hasStartDate() ) { | 203 | if ( i1.hasStartDate() == i2.hasStartDate() ) { |
204 | if ( i1.hasStartDate() ) { | 204 | if ( i1.hasStartDate() ) { |
205 | if ( i1.dtStart() != i2.dtStart() ) | 205 | if ( i1.dtStart() != i2.dtStart() ) |
206 | return false; | 206 | return false; |
207 | } | 207 | } |
208 | } else { | 208 | } else { |
209 | return false; | 209 | return false; |
210 | } | 210 | } |
211 | if (!( *i1.recurrence() == *i2.recurrence()) ) { | 211 | if (!( *i1.recurrence() == *i2.recurrence()) ) { |
212 | qDebug("recurrence is NOT equal "); | 212 | qDebug("recurrence is NOT equal "); |
213 | return false; | 213 | return false; |
214 | } | 214 | } |
215 | return | 215 | return |
216 | // i1.created() == i2.created() && | 216 | // i1.created() == i2.created() && |
217 | stringCompare( i1.description(), i2.description() ) && | 217 | stringCompare( i1.description(), i2.description() ) && |
218 | stringCompare( i1.summary(), i2.summary() ) && | 218 | stringCompare( i1.summary(), i2.summary() ) && |
219 | i1.categories() == i2.categories() && | 219 | i1.categories() == i2.categories() && |
220 | // no need to compare mRelatedTo | 220 | // no need to compare mRelatedTo |
221 | stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && | 221 | stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && |
222 | // i1.relations() == i2.relations() && | 222 | // i1.relations() == i2.relations() && |
223 | i1.exDates() == i2.exDates() && | 223 | i1.exDates() == i2.exDates() && |
224 | i1.attachments() == i2.attachments() && | 224 | i1.attachments() == i2.attachments() && |
225 | i1.resources() == i2.resources() && | 225 | i1.resources() == i2.resources() && |
226 | i1.secrecy() == i2.secrecy() && | 226 | i1.secrecy() == i2.secrecy() && |
227 | i1.priority() == i2.priority() && | 227 | i1.priority() == i2.priority() && |
228 | i1.cancelled() == i2.cancelled() && | 228 | i1.cancelled() == i2.cancelled() && |
229 | stringCompare( i1.location(), i2.location() ); | 229 | stringCompare( i1.location(), i2.location() ); |
230 | } | 230 | } |
231 | 231 | ||
232 | Incidence* Incidence::recreateCloneException( QDate d ) | 232 | Incidence* Incidence::recreateCloneException( QDate d ) |
233 | { | 233 | { |
234 | Incidence* newInc = clone(); | 234 | Incidence* newInc = clone(); |
235 | newInc->recreate(); | 235 | newInc->recreate(); |
236 | if ( doesRecur() ) { | 236 | if ( doesRecur() ) { |
237 | addExDate( d ); | 237 | addExDate( d ); |
238 | newInc->recurrence()->unsetRecurs(); | 238 | newInc->recurrence()->unsetRecurs(); |
239 | if ( typeID() == eventID ) { | 239 | if ( typeID() == eventID ) { |
240 | int len = dtStart().secsTo( ((Event*)this)->dtEnd()); | 240 | int len = dtStart().secsTo( ((Event*)this)->dtEnd()); |
241 | QTime tim = dtStart().time(); | 241 | QTime tim = dtStart().time(); |
242 | newInc->setDtStart( QDateTime(d, tim) ); | 242 | newInc->setDtStart( QDateTime(d, tim) ); |
243 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); | 243 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); |
244 | } else { | 244 | } else { |
245 | int len = dtStart().secsTo( ((Todo*)this)->dtDue()); | 245 | int len = dtStart().secsTo( ((Todo*)this)->dtDue()); |
246 | QTime tim = ((Todo*)this)->dtDue().time(); | 246 | QTime tim = ((Todo*)this)->dtDue().time(); |
247 | ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); | 247 | ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); |
248 | ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); | 248 | ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); |
249 | ((Todo*)this)->setRecurDates(); | 249 | ((Todo*)this)->setRecurDates(); |
250 | } | 250 | } |
251 | newInc->setExDates( DateList () ); | 251 | newInc->setExDates( DateList () ); |
252 | } | 252 | } |
253 | return newInc; | 253 | return newInc; |
254 | } | 254 | } |
255 | 255 | ||
256 | void Incidence::recreate() | 256 | void Incidence::recreate() |
257 | { | 257 | { |
258 | setCreated(QDateTime::currentDateTime()); | 258 | setCreated(QDateTime::currentDateTime()); |
259 | 259 | ||
260 | setUid(CalFormat::createUniqueId()); | 260 | setUid(CalFormat::createUniqueId()); |
261 | 261 | ||
262 | setRevision(0); | 262 | setRevision(0); |
263 | setIDStr( ":" ); | 263 | setIDStr( ":" ); |
264 | setLastModified(QDateTime::currentDateTime()); | 264 | setLastModified(QDateTime::currentDateTime()); |
265 | } | 265 | } |
266 | void Incidence::cloneRelations( Incidence * newInc ) | 266 | void Incidence::cloneRelations( Incidence * newInc ) |
267 | { | 267 | { |
268 | // newInc is already a clone of this incidence | 268 | // newInc is already a clone of this incidence |
269 | Incidence * inc; | 269 | Incidence * inc; |
270 | Incidence * cloneInc; | 270 | Incidence * cloneInc; |
271 | QPtrList<Incidence> Relations = relations(); | 271 | QPtrList<Incidence> Relations = relations(); |
272 | for (inc=Relations.first();inc;inc=Relations.next()) { | 272 | for (inc=Relations.first();inc;inc=Relations.next()) { |
273 | cloneInc = inc->clone(); | 273 | cloneInc = inc->clone(); |
274 | cloneInc->recreate(); | 274 | cloneInc->recreate(); |
275 | cloneInc->setRelatedTo( newInc ); | 275 | cloneInc->setRelatedTo( newInc ); |
276 | inc->cloneRelations( cloneInc ); | 276 | inc->cloneRelations( cloneInc ); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | void Incidence::setReadOnly( bool readOnly ) | 279 | void Incidence::setReadOnly( bool readOnly ) |
280 | { | 280 | { |
281 | IncidenceBase::setReadOnly( readOnly ); | 281 | IncidenceBase::setReadOnly( readOnly ); |
282 | recurrence()->setRecurReadOnly( readOnly); | 282 | recurrence()->setRecurReadOnly( readOnly); |
283 | } | 283 | } |
284 | 284 | ||
285 | void Incidence::setCreated(QDateTime created) | 285 | void Incidence::setCreated(QDateTime created) |
286 | { | 286 | { |
287 | if (mReadOnly) return; | 287 | if (mReadOnly) return; |
288 | mCreated = getEvenTime(created); | 288 | mCreated = getEvenTime(created); |
289 | } | 289 | } |
290 | 290 | ||
291 | QDateTime Incidence::created() const | 291 | QDateTime Incidence::created() const |
292 | { | 292 | { |
293 | return mCreated; | 293 | return mCreated; |
294 | } | 294 | } |
295 | 295 | ||
296 | void Incidence::setRevision(int rev) | 296 | void Incidence::setRevision(int rev) |
297 | { | 297 | { |
298 | if (mReadOnly) return; | 298 | if (mReadOnly) return; |
299 | mRevision = rev; | 299 | mRevision = rev; |
300 | 300 | ||
301 | updated(); | 301 | updated(); |
302 | } | 302 | } |
303 | 303 | ||
304 | int Incidence::revision() const | 304 | int Incidence::revision() const |
305 | { | 305 | { |
306 | return mRevision; | 306 | return mRevision; |
307 | } | 307 | } |
308 | 308 | ||
309 | void Incidence::setDtStart(const QDateTime &dtStart) | 309 | void Incidence::setDtStart(const QDateTime &dtStart) |
310 | { | 310 | { |
311 | 311 | ||
312 | QDateTime dt = getEvenTime(dtStart); | 312 | QDateTime dt = getEvenTime(dtStart); |
313 | recurrence()->setRecurStart( dt); | 313 | recurrence()->setRecurStart( dt); |
314 | IncidenceBase::setDtStart( dt ); | 314 | IncidenceBase::setDtStart( dt ); |
315 | } | 315 | } |
316 | 316 | ||
317 | void Incidence::setDescription(const QString &description) | 317 | void Incidence::setDescription(const QString &description) |
318 | { | 318 | { |
319 | if (mReadOnly) return; | 319 | if (mReadOnly) return; |
320 | mDescription = description; | 320 | mDescription = description; |
321 | updated(); | 321 | updated(); |
322 | } | 322 | } |
323 | 323 | ||
324 | QString Incidence::description() const | 324 | QString Incidence::description() const |
325 | { | 325 | { |
326 | return mDescription; | 326 | return mDescription; |
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
330 | void Incidence::setSummary(const QString &summary) | 330 | void Incidence::setSummary(const QString &summary) |
331 | { | 331 | { |
332 | if (mReadOnly) return; | 332 | if (mReadOnly) return; |
333 | mSummary = summary; | 333 | mSummary = summary; |
334 | updated(); | 334 | updated(); |
335 | } | 335 | } |
336 | 336 | ||
337 | QString Incidence::summary() const | 337 | QString Incidence::summary() const |
338 | { | 338 | { |
339 | return mSummary; | 339 | return mSummary; |
340 | } | 340 | } |
341 | void Incidence::checkCategories() | 341 | void Incidence::checkCategories() |
342 | { | 342 | { |
343 | mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday")); | 343 | mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday")); |
344 | mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday")); | 344 | mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday")); |
345 | mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary")); | 345 | mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary")); |
346 | } | 346 | } |
347 | 347 | ||
348 | void Incidence::addCategories(const QStringList &categories, bool addToRelations ) //addToRelations = false | 348 | void Incidence::addCategories(const QStringList &categories, bool addToRelations ) //addToRelations = false |
349 | { | 349 | { |
350 | if (mReadOnly) return; | 350 | if (mReadOnly) return; |
351 | int i; | 351 | int i; |
352 | for( i = 0; i < categories.count(); ++i ) { | 352 | for( i = 0; i < categories.count(); ++i ) { |
353 | if ( !mCategories.contains (categories[i])) | 353 | if ( !mCategories.contains (categories[i])) |
354 | mCategories.append( categories[i] ); | 354 | mCategories.append( categories[i] ); |
355 | } | 355 | } |
356 | checkCategories(); | 356 | checkCategories(); |
357 | updated(); | 357 | updated(); |
358 | if ( addToRelations ) { | 358 | if ( addToRelations ) { |
359 | Incidence * inc; | 359 | Incidence * inc; |
360 | QPtrList<Incidence> Relations = relations(); | 360 | QPtrList<Incidence> Relations = relations(); |
361 | for (inc=Relations.first();inc;inc=Relations.next()) { | 361 | for (inc=Relations.first();inc;inc=Relations.next()) { |
362 | inc->addCategories( categories, true ); | 362 | inc->addCategories( categories, true ); |
363 | } | 363 | } |
364 | } | 364 | } |
365 | } | 365 | } |
366 | 366 | ||
367 | void Incidence::setCategories(const QStringList &categories, bool setForRelations ) //setForRelations = false | 367 | void Incidence::setCategories(const QStringList &categories, bool setForRelations ) //setForRelations = false |
368 | { | 368 | { |
369 | if (mReadOnly) return; | 369 | if (mReadOnly) return; |
370 | mCategories = categories; | 370 | mCategories = categories; |
371 | checkCategories(); | 371 | checkCategories(); |
372 | updated(); | 372 | updated(); |
373 | if ( setForRelations ) { | 373 | if ( setForRelations ) { |
374 | Incidence * inc; | 374 | Incidence * inc; |
375 | QPtrList<Incidence> Relations = relations(); | 375 | QPtrList<Incidence> Relations = relations(); |
376 | for (inc=Relations.first();inc;inc=Relations.next()) { | 376 | for (inc=Relations.first();inc;inc=Relations.next()) { |
377 | inc->setCategories( categories, true ); | 377 | inc->setCategories( categories, true ); |
378 | } | 378 | } |
379 | } | 379 | } |
380 | } | 380 | } |
381 | 381 | ||
382 | // TODO: remove setCategories(QString) function | 382 | // TODO: remove setCategories(QString) function |
383 | void Incidence::setCategories(const QString &catStr) | 383 | void Incidence::setCategories(const QString &catStr) |
384 | { | 384 | { |
385 | if (mReadOnly) return; | 385 | if (mReadOnly) return; |
386 | mCategories.clear(); | 386 | mCategories.clear(); |
387 | 387 | ||
388 | if (catStr.isEmpty()) return; | 388 | if (catStr.isEmpty()) return; |
389 | 389 | ||
390 | mCategories = QStringList::split(",",catStr); | 390 | mCategories = QStringList::split(",",catStr); |
391 | 391 | ||
392 | QStringList::Iterator it; | 392 | QStringList::Iterator it; |
393 | for(it = mCategories.begin();it != mCategories.end(); ++it) { | 393 | for(it = mCategories.begin();it != mCategories.end(); ++it) { |
394 | *it = (*it).stripWhiteSpace(); | 394 | *it = (*it).stripWhiteSpace(); |
395 | } | 395 | } |
396 | checkCategories(); | 396 | checkCategories(); |
397 | updated(); | 397 | updated(); |
398 | } | 398 | } |
399 | 399 | ||
400 | QStringList Incidence::categories() const | 400 | QStringList Incidence::categories() const |
401 | { | 401 | { |
402 | return mCategories; | 402 | return mCategories; |
403 | } | 403 | } |
404 | 404 | ||
405 | QString Incidence::categoriesStr() | 405 | QString Incidence::categoriesStr() |
406 | { | 406 | { |
407 | return mCategories.join(","); | 407 | return mCategories.join(","); |
408 | } | 408 | } |
409 | QString Incidence::categoriesStrWithSpace() | 409 | QString Incidence::categoriesStrWithSpace() |
410 | { | 410 | { |
411 | return mCategories.join(", "); | 411 | return mCategories.join(", "); |
412 | } | 412 | } |
413 | 413 | ||
414 | void Incidence::setRelatedToUid(const QString &relatedToUid) | 414 | void Incidence::setRelatedToUid(const QString &relatedToUid) |
415 | { | 415 | { |
416 | if (mReadOnly) return; | 416 | if (mReadOnly) return; |
417 | mRelatedToUid = relatedToUid; | 417 | mRelatedToUid = relatedToUid; |
418 | } | 418 | } |
419 | 419 | ||
420 | QString Incidence::relatedToUid() const | 420 | QString Incidence::relatedToUid() const |
421 | { | 421 | { |
422 | return mRelatedToUid; | 422 | return mRelatedToUid; |
423 | } | 423 | } |
424 | 424 | ||
425 | void Incidence::setRelatedTo(Incidence *relatedTo) | 425 | void Incidence::setRelatedTo(Incidence *relatedTo) |
426 | { | 426 | { |
427 | //qDebug("Incidence::setRelatedTo %d ", relatedTo); | 427 | //qDebug("Incidence::setRelatedTo %d ", relatedTo); |
428 | //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); | 428 | //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); |
429 | if (mReadOnly || mRelatedTo == relatedTo) return; | 429 | if (mReadOnly || mRelatedTo == relatedTo) return; |
430 | if(mRelatedTo) { | 430 | if(mRelatedTo) { |
431 | // updated(); | 431 | // updated(); |
432 | mRelatedTo->removeRelation(this); | 432 | mRelatedTo->removeRelation(this); |
433 | } | 433 | } |
434 | mRelatedTo = relatedTo; | 434 | mRelatedTo = relatedTo; |
435 | if (mRelatedTo) { | 435 | if (mRelatedTo) { |
436 | mRelatedTo->addRelation(this); | 436 | mRelatedTo->addRelation(this); |
437 | mRelatedToUid = mRelatedTo->uid(); | 437 | mRelatedToUid = mRelatedTo->uid(); |
438 | } else { | 438 | } else { |
439 | mRelatedToUid = ""; | 439 | mRelatedToUid = ""; |
440 | } | 440 | } |
441 | } | 441 | } |
442 | 442 | ||
443 | Incidence *Incidence::relatedTo() const | 443 | Incidence *Incidence::relatedTo() const |
444 | { | 444 | { |
445 | return mRelatedTo; | 445 | return mRelatedTo; |
446 | } | 446 | } |
447 | 447 | ||
448 | QPtrList<Incidence> Incidence::relations() const | 448 | QPtrList<Incidence> Incidence::relations() const |
449 | { | 449 | { |
450 | return mRelations; | 450 | return mRelations; |
451 | } | 451 | } |
452 | 452 | ||
453 | void Incidence::addRelationsToList(QPtrList<Incidence> *rel) | ||
454 | { | ||
455 | Incidence* inc; | ||
456 | QPtrList<Incidence> Relations = relations(); | ||
457 | for (inc=Relations.first();inc;inc=Relations.next()) { | ||
458 | inc->addRelationsToList( rel ); | ||
459 | } | ||
460 | if ( rel->findRef( this ) == -1 ) | ||
461 | rel->append( this ); | ||
462 | } | ||
463 | |||
453 | void Incidence::addRelation(Incidence *event) | 464 | void Incidence::addRelation(Incidence *event) |
454 | { | 465 | { |
455 | if( mRelations.findRef( event ) == -1 ) { | 466 | if( mRelations.findRef( event ) == -1 ) { |
456 | mRelations.append(event); | 467 | mRelations.append(event); |
457 | //updated(); | 468 | //updated(); |
458 | } | 469 | } |
459 | } | 470 | } |
460 | 471 | ||
461 | void Incidence::removeRelation(Incidence *event) | 472 | void Incidence::removeRelation(Incidence *event) |
462 | { | 473 | { |
463 | 474 | ||
464 | mRelations.removeRef(event); | 475 | mRelations.removeRef(event); |
465 | 476 | ||
466 | // if (event->getRelatedTo() == this) event->setRelatedTo(0); | 477 | // if (event->getRelatedTo() == this) event->setRelatedTo(0); |
467 | } | 478 | } |
468 | 479 | ||
469 | bool Incidence::recursOn(const QDate &qd) const | 480 | bool Incidence::recursOn(const QDate &qd) const |
470 | { | 481 | { |
471 | if (recurrence()->recursOnPure(qd) && !isException(qd)) return true; | 482 | if (recurrence()->recursOnPure(qd) && !isException(qd)) return true; |
472 | else return false; | 483 | else return false; |
473 | } | 484 | } |
474 | 485 | ||
475 | void Incidence::setExDates(const DateList &exDates) | 486 | void Incidence::setExDates(const DateList &exDates) |
476 | { | 487 | { |
477 | if (mReadOnly) return; | 488 | if (mReadOnly) return; |
478 | mExDates = exDates; | 489 | mExDates = exDates; |
479 | 490 | ||
480 | recurrence()->setRecurExDatesCount(mExDates.count()); | 491 | recurrence()->setRecurExDatesCount(mExDates.count()); |
481 | 492 | ||
482 | updated(); | 493 | updated(); |
483 | } | 494 | } |
484 | 495 | ||
485 | void Incidence::addExDate(const QDate &date) | 496 | void Incidence::addExDate(const QDate &date) |
486 | { | 497 | { |
487 | if (mReadOnly) return; | 498 | if (mReadOnly) return; |
488 | mExDates.append(date); | 499 | mExDates.append(date); |
489 | 500 | ||
490 | recurrence()->setRecurExDatesCount(mExDates.count()); | 501 | recurrence()->setRecurExDatesCount(mExDates.count()); |
491 | 502 | ||
492 | updated(); | 503 | updated(); |
493 | } | 504 | } |
494 | 505 | ||
495 | DateList Incidence::exDates() const | 506 | DateList Incidence::exDates() const |
496 | { | 507 | { |
497 | return mExDates; | 508 | return mExDates; |
498 | } | 509 | } |
499 | 510 | ||
500 | bool Incidence::isException(const QDate &date) const | 511 | bool Incidence::isException(const QDate &date) const |
501 | { | 512 | { |
502 | DateList::ConstIterator it; | 513 | DateList::ConstIterator it; |
503 | for( it = mExDates.begin(); it != mExDates.end(); ++it ) { | 514 | for( it = mExDates.begin(); it != mExDates.end(); ++it ) { |
504 | if ( (*it) == date ) { | 515 | if ( (*it) == date ) { |
505 | return true; | 516 | return true; |
506 | } | 517 | } |
507 | } | 518 | } |
508 | 519 | ||
509 | return false; | 520 | return false; |
510 | } | 521 | } |
511 | 522 | ||
512 | void Incidence::addAttachment(Attachment *attachment) | 523 | void Incidence::addAttachment(Attachment *attachment) |
513 | { | 524 | { |
514 | if (mReadOnly || !attachment) return; | 525 | if (mReadOnly || !attachment) return; |
515 | mAttachments.append(attachment); | 526 | mAttachments.append(attachment); |
516 | updated(); | 527 | updated(); |
517 | } | 528 | } |
518 | 529 | ||
519 | void Incidence::deleteAttachment(Attachment *attachment) | 530 | void Incidence::deleteAttachment(Attachment *attachment) |
520 | { | 531 | { |
521 | mAttachments.removeRef(attachment); | 532 | mAttachments.removeRef(attachment); |
522 | } | 533 | } |
523 | 534 | ||
524 | void Incidence::deleteAttachments(const QString& mime) | 535 | void Incidence::deleteAttachments(const QString& mime) |
525 | { | 536 | { |
526 | Attachment *at = mAttachments.first(); | 537 | Attachment *at = mAttachments.first(); |
527 | while (at) { | 538 | while (at) { |
528 | if (at->mimeType() == mime) | 539 | if (at->mimeType() == mime) |
529 | mAttachments.remove(); | 540 | mAttachments.remove(); |
530 | else | 541 | else |
531 | at = mAttachments.next(); | 542 | at = mAttachments.next(); |
532 | } | 543 | } |
533 | } | 544 | } |
534 | 545 | ||
535 | QPtrList<Attachment> Incidence::attachments() const | 546 | QPtrList<Attachment> Incidence::attachments() const |
536 | { | 547 | { |
537 | return mAttachments; | 548 | return mAttachments; |
538 | } | 549 | } |
539 | 550 | ||
540 | QPtrList<Attachment> Incidence::attachments(const QString& mime) const | 551 | QPtrList<Attachment> Incidence::attachments(const QString& mime) const |
541 | { | 552 | { |
542 | QPtrList<Attachment> attachments; | 553 | QPtrList<Attachment> attachments; |
543 | QPtrListIterator<Attachment> it( mAttachments ); | 554 | QPtrListIterator<Attachment> it( mAttachments ); |
544 | Attachment *at; | 555 | Attachment *at; |
545 | while ( (at = it.current()) ) { | 556 | while ( (at = it.current()) ) { |
546 | if (at->mimeType() == mime) | 557 | if (at->mimeType() == mime) |
547 | attachments.append(at); | 558 | attachments.append(at); |
548 | ++it; | 559 | ++it; |
549 | } | 560 | } |
550 | 561 | ||
551 | return attachments; | 562 | return attachments; |
552 | } | 563 | } |
553 | 564 | ||
554 | void Incidence::setResources(const QStringList &resources) | 565 | void Incidence::setResources(const QStringList &resources) |
555 | { | 566 | { |
556 | if (mReadOnly) return; | 567 | if (mReadOnly) return; |
557 | mResources = resources; | 568 | mResources = resources; |
558 | updated(); | 569 | updated(); |
559 | } | 570 | } |
560 | 571 | ||
561 | QStringList Incidence::resources() const | 572 | QStringList Incidence::resources() const |
562 | { | 573 | { |
563 | return mResources; | 574 | return mResources; |
564 | } | 575 | } |
565 | 576 | ||
566 | 577 | ||
567 | void Incidence::setPriority(int priority) | 578 | void Incidence::setPriority(int priority) |
568 | { | 579 | { |
569 | if (mReadOnly) return; | 580 | if (mReadOnly) return; |
570 | mPriority = priority; | 581 | mPriority = priority; |
571 | updated(); | 582 | updated(); |
572 | } | 583 | } |
573 | 584 | ||
574 | int Incidence::priority() const | 585 | int Incidence::priority() const |
575 | { | 586 | { |
576 | return mPriority; | 587 | return mPriority; |
577 | } | 588 | } |
578 | 589 | ||
579 | void Incidence::setSecrecy(int sec) | 590 | void Incidence::setSecrecy(int sec) |
580 | { | 591 | { |
581 | if (mReadOnly) return; | 592 | if (mReadOnly) return; |
582 | mSecrecy = sec; | 593 | mSecrecy = sec; |
583 | updated(); | 594 | updated(); |
584 | } | 595 | } |
585 | 596 | ||
586 | int Incidence::secrecy() const | 597 | int Incidence::secrecy() const |
587 | { | 598 | { |
588 | return mSecrecy; | 599 | return mSecrecy; |
589 | } | 600 | } |
590 | 601 | ||
591 | QString Incidence::secrecyStr() const | 602 | QString Incidence::secrecyStr() const |
592 | { | 603 | { |
593 | return secrecyName(mSecrecy); | 604 | return secrecyName(mSecrecy); |
594 | } | 605 | } |
595 | 606 | ||
596 | QString Incidence::secrecyName(int secrecy) | 607 | QString Incidence::secrecyName(int secrecy) |
597 | { | 608 | { |
598 | switch (secrecy) { | 609 | switch (secrecy) { |
599 | case SecrecyPublic: | 610 | case SecrecyPublic: |
600 | return i18n("Public"); | 611 | return i18n("Public"); |
601 | break; | 612 | break; |
602 | case SecrecyPrivate: | 613 | case SecrecyPrivate: |
603 | return i18n("Private"); | 614 | return i18n("Private"); |
604 | break; | 615 | break; |
605 | case SecrecyConfidential: | 616 | case SecrecyConfidential: |
606 | return i18n("Confidential"); | 617 | return i18n("Confidential"); |
607 | break; | 618 | break; |
608 | default: | 619 | default: |
609 | return i18n("Undefined"); | 620 | return i18n("Undefined"); |
610 | break; | 621 | break; |
611 | } | 622 | } |
612 | } | 623 | } |
613 | 624 | ||
614 | QStringList Incidence::secrecyList() | 625 | QStringList Incidence::secrecyList() |
615 | { | 626 | { |
616 | QStringList list; | 627 | QStringList list; |
617 | list << secrecyName(SecrecyPublic); | 628 | list << secrecyName(SecrecyPublic); |
618 | list << secrecyName(SecrecyPrivate); | 629 | list << secrecyName(SecrecyPrivate); |
619 | list << secrecyName(SecrecyConfidential); | 630 | list << secrecyName(SecrecyConfidential); |
620 | 631 | ||
621 | return list; | 632 | return list; |
622 | } | 633 | } |
623 | 634 | ||
624 | 635 | ||
625 | QPtrList<Alarm> Incidence::alarms() const | 636 | QPtrList<Alarm> Incidence::alarms() const |
626 | { | 637 | { |
627 | return mAlarms; | 638 | return mAlarms; |
628 | } | 639 | } |
629 | 640 | ||
630 | Alarm* Incidence::newAlarm() | 641 | Alarm* Incidence::newAlarm() |
631 | { | 642 | { |
632 | Alarm* alarm = new Alarm(this); | 643 | Alarm* alarm = new Alarm(this); |
633 | mAlarms.append(alarm); | 644 | mAlarms.append(alarm); |
634 | // updated(); | 645 | // updated(); |
635 | return alarm; | 646 | return alarm; |
636 | } | 647 | } |
637 | 648 | ||
638 | void Incidence::addAlarm(Alarm *alarm) | 649 | void Incidence::addAlarm(Alarm *alarm) |
639 | { | 650 | { |
640 | mAlarms.append(alarm); | 651 | mAlarms.append(alarm); |
641 | updated(); | 652 | updated(); |
642 | } | 653 | } |
643 | 654 | ||
644 | void Incidence::removeAlarm(Alarm *alarm) | 655 | void Incidence::removeAlarm(Alarm *alarm) |
645 | { | 656 | { |
646 | mAlarms.removeRef(alarm); | 657 | mAlarms.removeRef(alarm); |
647 | updated(); | 658 | updated(); |
648 | } | 659 | } |
649 | 660 | ||
650 | void Incidence::clearAlarms() | 661 | void Incidence::clearAlarms() |
651 | { | 662 | { |
652 | mAlarms.clear(); | 663 | mAlarms.clear(); |
653 | updated(); | 664 | updated(); |
654 | } | 665 | } |
655 | 666 | ||
656 | bool Incidence::isAlarmEnabled() const | 667 | bool Incidence::isAlarmEnabled() const |
657 | { | 668 | { |
658 | Alarm* alarm; | 669 | Alarm* alarm; |
659 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 670 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |
660 | if (alarm->enabled()) | 671 | if (alarm->enabled()) |
661 | return true; | 672 | return true; |
662 | } | 673 | } |
663 | return false; | 674 | return false; |
664 | } | 675 | } |
665 | 676 | ||
666 | Recurrence *Incidence::recurrence() const | 677 | Recurrence *Incidence::recurrence() const |
667 | { | 678 | { |
668 | return mRecurrence; | 679 | return mRecurrence; |
669 | } | 680 | } |
670 | void Incidence::setRecurrence( Recurrence * r) | 681 | void Incidence::setRecurrence( Recurrence * r) |
671 | { | 682 | { |
672 | delete mRecurrence; | 683 | delete mRecurrence; |
673 | mRecurrence = r; | 684 | mRecurrence = r; |
674 | } | 685 | } |
675 | 686 | ||
676 | void Incidence::setLocation(const QString &location) | 687 | void Incidence::setLocation(const QString &location) |
677 | { | 688 | { |
678 | if (mReadOnly) return; | 689 | if (mReadOnly) return; |
679 | mLocation = location; | 690 | mLocation = location; |
680 | updated(); | 691 | updated(); |
681 | } | 692 | } |
682 | 693 | ||
683 | QString Incidence::location() const | 694 | QString Incidence::location() const |
684 | { | 695 | { |
685 | return mLocation; | 696 | return mLocation; |
686 | } | 697 | } |
687 | 698 | ||
688 | ushort Incidence::doesRecur() const | 699 | ushort Incidence::doesRecur() const |
689 | { | 700 | { |
690 | if ( mRecurrence ) return mRecurrence->doesRecur(); | 701 | if ( mRecurrence ) return mRecurrence->doesRecur(); |
691 | else return Recurrence::rNone; | 702 | else return Recurrence::rNone; |
692 | } | 703 | } |
693 | 704 | ||
694 | QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const | 705 | QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const |
695 | { | 706 | { |
696 | QDateTime incidenceStart = dt; | 707 | QDateTime incidenceStart = dt; |
697 | *ok = false; | 708 | *ok = false; |
698 | if ( doesRecur() ) { | 709 | if ( doesRecur() ) { |
699 | bool last; | 710 | bool last; |
700 | recurrence()->getPreviousDateTime( incidenceStart , &last ); | 711 | recurrence()->getPreviousDateTime( incidenceStart , &last ); |
701 | int count = 0; | 712 | int count = 0; |
702 | if ( !last ) { | 713 | if ( !last ) { |
703 | while ( !last ) { | 714 | while ( !last ) { |
704 | ++count; | 715 | ++count; |
705 | incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last ); | 716 | incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last ); |
706 | if ( recursOn( incidenceStart.date() ) ) { | 717 | if ( recursOn( incidenceStart.date() ) ) { |
707 | last = true; // exit while llop | 718 | last = true; // exit while llop |
708 | } else { | 719 | } else { |
709 | if ( last ) { // no alarm on last recurrence | 720 | if ( last ) { // no alarm on last recurrence |
710 | return QDateTime (); | 721 | return QDateTime (); |
711 | } | 722 | } |
712 | int year = incidenceStart.date().year(); | 723 | int year = incidenceStart.date().year(); |
713 | // workaround for bug in recurrence | 724 | // workaround for bug in recurrence |
714 | if ( count == 100 || year < 1000 || year > 5000 ) { | 725 | if ( count == 100 || year < 1000 || year > 5000 ) { |
715 | return QDateTime (); | 726 | return QDateTime (); |
716 | } | 727 | } |
717 | incidenceStart = incidenceStart.addSecs( 1 ); | 728 | incidenceStart = incidenceStart.addSecs( 1 ); |
718 | } | 729 | } |
719 | } | 730 | } |
720 | } else { | 731 | } else { |
721 | return QDateTime (); | 732 | return QDateTime (); |
722 | } | 733 | } |
723 | } else { | 734 | } else { |
724 | if ( hasStartDate () ) { | 735 | if ( hasStartDate () ) { |
725 | incidenceStart = dtStart(); | 736 | incidenceStart = dtStart(); |
726 | } | 737 | } |
727 | if ( typeID() == todoID ) { | 738 | if ( typeID() == todoID ) { |
728 | if ( ((Todo*)this)->hasDueDate() ) | 739 | if ( ((Todo*)this)->hasDueDate() ) |
729 | incidenceStart = ((Todo*)this)->dtDue(); | 740 | incidenceStart = ((Todo*)this)->dtDue(); |
730 | } | 741 | } |
731 | } | 742 | } |
732 | if ( incidenceStart > dt ) | 743 | if ( incidenceStart > dt ) |
733 | *ok = true; | 744 | *ok = true; |
734 | return incidenceStart; | 745 | return incidenceStart; |
735 | } | 746 | } |
736 | QDateTime Incidence::dtStart() const | 747 | QDateTime Incidence::dtStart() const |
737 | { | 748 | { |
738 | if ( doesRecur() ) { | 749 | if ( doesRecur() ) { |
739 | if ( typeID() == todoID ) { | 750 | if ( typeID() == todoID ) { |
740 | ((Todo*)this)->checkSetCompletedFalse(); | 751 | ((Todo*)this)->checkSetCompletedFalse(); |
741 | } | 752 | } |
742 | } | 753 | } |
743 | return mDtStart; | 754 | return mDtStart; |
744 | } | 755 | } |
diff --git a/libkcal/incidence.h b/libkcal/incidence.h index aa51e84..fc97ce9 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h | |||
@@ -1,317 +1,317 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | #ifndef INCIDENCE_H | 20 | #ifndef INCIDENCE_H |
21 | #define INCIDENCE_H | 21 | #define INCIDENCE_H |
22 | // | 22 | // |
23 | // Incidence - base class of calendaring components | 23 | // Incidence - base class of calendaring components |
24 | // | 24 | // |
25 | 25 | ||
26 | #include <qdatetime.h> | 26 | #include <qdatetime.h> |
27 | #include <qstringlist.h> | 27 | #include <qstringlist.h> |
28 | #include <qvaluelist.h> | 28 | #include <qvaluelist.h> |
29 | 29 | ||
30 | #include "recurrence.h" | 30 | #include "recurrence.h" |
31 | #include "alarm.h" | 31 | #include "alarm.h" |
32 | #include "attachment.h" | 32 | #include "attachment.h" |
33 | #include "listbase.h" | 33 | #include "listbase.h" |
34 | #include "incidencebase.h" | 34 | #include "incidencebase.h" |
35 | 35 | ||
36 | namespace KCal { | 36 | namespace KCal { |
37 | 37 | ||
38 | class Event; | 38 | class Event; |
39 | class Todo; | 39 | class Todo; |
40 | class Journal; | 40 | class Journal; |
41 | 41 | ||
42 | /** | 42 | /** |
43 | This class provides the base class common to all calendar components. | 43 | This class provides the base class common to all calendar components. |
44 | */ | 44 | */ |
45 | class Incidence : public IncidenceBase | 45 | class Incidence : public IncidenceBase |
46 | { | 46 | { |
47 | public: | 47 | public: |
48 | /** | 48 | /** |
49 | This class provides the interface for a visitor of calendar components. It | 49 | This class provides the interface for a visitor of calendar components. It |
50 | serves as base class for concrete visitors, which implement certain actions on | 50 | serves as base class for concrete visitors, which implement certain actions on |
51 | calendar components. It allows to add functions, which operate on the concrete | 51 | calendar components. It allows to add functions, which operate on the concrete |
52 | types of calendar components, without changing the calendar component classes. | 52 | types of calendar components, without changing the calendar component classes. |
53 | */ | 53 | */ |
54 | class Visitor | 54 | class Visitor |
55 | { | 55 | { |
56 | public: | 56 | public: |
57 | /** Destruct Incidence::Visitor */ | 57 | /** Destruct Incidence::Visitor */ |
58 | virtual ~Visitor() {} | 58 | virtual ~Visitor() {} |
59 | 59 | ||
60 | /** | 60 | /** |
61 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 61 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
62 | on an Event object. | 62 | on an Event object. |
63 | */ | 63 | */ |
64 | virtual bool visit(Event *) { return false; } | 64 | virtual bool visit(Event *) { return false; } |
65 | /** | 65 | /** |
66 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 66 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
67 | on an Todo object. | 67 | on an Todo object. |
68 | */ | 68 | */ |
69 | virtual bool visit(Todo *) { return false; } | 69 | virtual bool visit(Todo *) { return false; } |
70 | /** | 70 | /** |
71 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 71 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
72 | on an Journal object. | 72 | on an Journal object. |
73 | */ | 73 | */ |
74 | virtual bool visit(Journal *) { return false; } | 74 | virtual bool visit(Journal *) { return false; } |
75 | 75 | ||
76 | protected: | 76 | protected: |
77 | /** Constructor is protected to prevent direct creation of visitor base class. */ | 77 | /** Constructor is protected to prevent direct creation of visitor base class. */ |
78 | Visitor() {} | 78 | Visitor() {} |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | This class implements a visitor for adding an Incidence to a resource | 82 | This class implements a visitor for adding an Incidence to a resource |
83 | supporting addEvent(), addTodo() and addJournal() calls. | 83 | supporting addEvent(), addTodo() and addJournal() calls. |
84 | */ | 84 | */ |
85 | template<class T> | 85 | template<class T> |
86 | class AddVisitor : public Visitor | 86 | class AddVisitor : public Visitor |
87 | { | 87 | { |
88 | public: | 88 | public: |
89 | AddVisitor( T *r ) : mResource( r ) {} | 89 | AddVisitor( T *r ) : mResource( r ) {} |
90 | bool visit( Event *e ) { return mResource->addEvent( e ); } | 90 | bool visit( Event *e ) { return mResource->addEvent( e ); } |
91 | bool visit( Todo *t ) { return mResource->addTodo( t ); } | 91 | bool visit( Todo *t ) { return mResource->addTodo( t ); } |
92 | bool visit( Journal *j ) { return mResource->addJournal( j ); } | 92 | bool visit( Journal *j ) { return mResource->addJournal( j ); } |
93 | 93 | ||
94 | private: | 94 | private: |
95 | T *mResource; | 95 | T *mResource; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | /** enumeration for describing an event's secrecy. */ | 98 | /** enumeration for describing an event's secrecy. */ |
99 | enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }; | 99 | enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }; |
100 | typedef ListBase<Incidence> List; | 100 | typedef ListBase<Incidence> List; |
101 | Incidence(); | 101 | Incidence(); |
102 | Incidence(const Incidence &); | 102 | Incidence(const Incidence &); |
103 | ~Incidence(); | 103 | ~Incidence(); |
104 | 104 | ||
105 | /** | 105 | /** |
106 | Accept IncidenceVisitor. A class taking part in the visitor mechanism has to | 106 | Accept IncidenceVisitor. A class taking part in the visitor mechanism has to |
107 | provide this implementation: | 107 | provide this implementation: |
108 | <pre> | 108 | <pre> |
109 | bool accept(Visitor &v) { return v.visit(this); } | 109 | bool accept(Visitor &v) { return v.visit(this); } |
110 | </pre> | 110 | </pre> |
111 | */ | 111 | */ |
112 | virtual bool accept(Visitor &) { return false; } | 112 | virtual bool accept(Visitor &) { return false; } |
113 | 113 | ||
114 | virtual Incidence *clone() = 0; | 114 | virtual Incidence *clone() = 0; |
115 | virtual void cloneRelations( Incidence * ); | 115 | virtual void cloneRelations( Incidence * ); |
116 | 116 | void addRelationsToList(QPtrList<Incidence> *rel); | |
117 | virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0; | 117 | virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0; |
118 | void setReadOnly( bool ); | 118 | void setReadOnly( bool ); |
119 | 119 | ||
120 | /** | 120 | /** |
121 | Recreate event. The event is made a new unique event, but already stored | 121 | Recreate event. The event is made a new unique event, but already stored |
122 | event information is preserved. Sets uniquie id, creation date, last | 122 | event information is preserved. Sets uniquie id, creation date, last |
123 | modification date and revision number. | 123 | modification date and revision number. |
124 | */ | 124 | */ |
125 | void recreate(); | 125 | void recreate(); |
126 | Incidence* recreateCloneException(QDate); | 126 | Incidence* recreateCloneException(QDate); |
127 | 127 | ||
128 | /** set creation date */ | 128 | /** set creation date */ |
129 | void setCreated(QDateTime); | 129 | void setCreated(QDateTime); |
130 | /** return time and date of creation. */ | 130 | /** return time and date of creation. */ |
131 | QDateTime created() const; | 131 | QDateTime created() const; |
132 | 132 | ||
133 | /** set the number of revisions this event has seen */ | 133 | /** set the number of revisions this event has seen */ |
134 | void setRevision(int rev); | 134 | void setRevision(int rev); |
135 | /** return the number of revisions this event has seen */ | 135 | /** return the number of revisions this event has seen */ |
136 | int revision() const; | 136 | int revision() const; |
137 | 137 | ||
138 | /** Set starting date/time. */ | 138 | /** Set starting date/time. */ |
139 | virtual void setDtStart(const QDateTime &dtStart); | 139 | virtual void setDtStart(const QDateTime &dtStart); |
140 | /** Return the incidence's ending date/time as a QDateTime. */ | 140 | /** Return the incidence's ending date/time as a QDateTime. */ |
141 | virtual QDateTime dtEnd() const { return QDateTime(); } | 141 | virtual QDateTime dtEnd() const { return QDateTime(); } |
142 | 142 | ||
143 | /** sets the event's lengthy description. */ | 143 | /** sets the event's lengthy description. */ |
144 | void setDescription(const QString &description); | 144 | void setDescription(const QString &description); |
145 | /** returns a reference to the event's description. */ | 145 | /** returns a reference to the event's description. */ |
146 | QString description() const; | 146 | QString description() const; |
147 | 147 | ||
148 | /** sets the event's short summary. */ | 148 | /** sets the event's short summary. */ |
149 | void setSummary(const QString &summary); | 149 | void setSummary(const QString &summary); |
150 | /** returns a reference to the event's summary. */ | 150 | /** returns a reference to the event's summary. */ |
151 | QString summary() const; | 151 | QString summary() const; |
152 | 152 | ||
153 | /** set event's applicable categories */ | 153 | /** set event's applicable categories */ |
154 | void setCategories(const QStringList &categories, bool setForRelations = false); | 154 | void setCategories(const QStringList &categories, bool setForRelations = false); |
155 | void addCategories(const QStringList &categories, bool addToRelations = false); | 155 | void addCategories(const QStringList &categories, bool addToRelations = false); |
156 | /** set event's categories based on a comma delimited string */ | 156 | /** set event's categories based on a comma delimited string */ |
157 | void setCategories(const QString &catStr); | 157 | void setCategories(const QString &catStr); |
158 | /** return categories in a list */ | 158 | /** return categories in a list */ |
159 | QStringList categories() const; | 159 | QStringList categories() const; |
160 | /** return categories as a comma separated string */ | 160 | /** return categories as a comma separated string */ |
161 | QString categoriesStr(); | 161 | QString categoriesStr(); |
162 | QString categoriesStrWithSpace(); | 162 | QString categoriesStrWithSpace(); |
163 | 163 | ||
164 | /** point at some other event to which the event relates. This function should | 164 | /** point at some other event to which the event relates. This function should |
165 | * only be used when constructing a calendar before the related Event | 165 | * only be used when constructing a calendar before the related Event |
166 | * exists. */ | 166 | * exists. */ |
167 | void setRelatedToUid(const QString &); | 167 | void setRelatedToUid(const QString &); |
168 | /** what event does this one relate to? This function should | 168 | /** what event does this one relate to? This function should |
169 | * only be used when constructing a calendar before the related Event | 169 | * only be used when constructing a calendar before the related Event |
170 | * exists. */ | 170 | * exists. */ |
171 | QString relatedToUid() const; | 171 | QString relatedToUid() const; |
172 | /** point at some other event to which the event relates */ | 172 | /** point at some other event to which the event relates */ |
173 | void setRelatedTo(Incidence *relatedTo); | 173 | void setRelatedTo(Incidence *relatedTo); |
174 | /** what event does this one relate to? */ | 174 | /** what event does this one relate to? */ |
175 | Incidence *relatedTo() const; | 175 | Incidence *relatedTo() const; |
176 | /** All events that are related to this event */ | 176 | /** All events that are related to this event */ |
177 | QPtrList<Incidence> relations() const; | 177 | QPtrList<Incidence> relations() const; |
178 | /** Add an event which is related to this event */ | 178 | /** Add an event which is related to this event */ |
179 | void addRelation(Incidence *); | 179 | void addRelation(Incidence *); |
180 | /** Remove event that is related to this event */ | 180 | /** Remove event that is related to this event */ |
181 | void removeRelation(Incidence *); | 181 | void removeRelation(Incidence *); |
182 | 182 | ||
183 | /** returns the list of dates which are exceptions to the recurrence rule */ | 183 | /** returns the list of dates which are exceptions to the recurrence rule */ |
184 | DateList exDates() const; | 184 | DateList exDates() const; |
185 | /** sets the list of dates which are exceptions to the recurrence rule */ | 185 | /** sets the list of dates which are exceptions to the recurrence rule */ |
186 | void setExDates(const DateList &_exDates); | 186 | void setExDates(const DateList &_exDates); |
187 | void setExDates(const char *dates); | 187 | void setExDates(const char *dates); |
188 | /** Add a date to the list of exceptions of the recurrence rule. */ | 188 | /** Add a date to the list of exceptions of the recurrence rule. */ |
189 | void addExDate(const QDate &date); | 189 | void addExDate(const QDate &date); |
190 | 190 | ||
191 | /** returns true if there is an exception for this date in the recurrence | 191 | /** returns true if there is an exception for this date in the recurrence |
192 | rule set, or false otherwise. */ | 192 | rule set, or false otherwise. */ |
193 | bool isException(const QDate &qd) const; | 193 | bool isException(const QDate &qd) const; |
194 | 194 | ||
195 | /** add attachment to this event */ | 195 | /** add attachment to this event */ |
196 | void addAttachment(Attachment *attachment); | 196 | void addAttachment(Attachment *attachment); |
197 | /** remove and delete a specific attachment */ | 197 | /** remove and delete a specific attachment */ |
198 | void deleteAttachment(Attachment *attachment); | 198 | void deleteAttachment(Attachment *attachment); |
199 | /** remove and delete all attachments with this mime type */ | 199 | /** remove and delete all attachments with this mime type */ |
200 | void deleteAttachments(const QString& mime); | 200 | void deleteAttachments(const QString& mime); |
201 | /** return list of all associated attachments */ | 201 | /** return list of all associated attachments */ |
202 | QPtrList<Attachment> attachments() const; | 202 | QPtrList<Attachment> attachments() const; |
203 | /** find a list of attachments with this mime type */ | 203 | /** find a list of attachments with this mime type */ |
204 | QPtrList<Attachment> attachments(const QString& mime) const; | 204 | QPtrList<Attachment> attachments(const QString& mime) const; |
205 | 205 | ||
206 | /** sets the event's status the value specified. See the enumeration | 206 | /** sets the event's status the value specified. See the enumeration |
207 | * above for possible values. */ | 207 | * above for possible values. */ |
208 | void setSecrecy(int); | 208 | void setSecrecy(int); |
209 | /** return the event's secrecy. */ | 209 | /** return the event's secrecy. */ |
210 | int secrecy() const; | 210 | int secrecy() const; |
211 | /** return the event's secrecy in string format. */ | 211 | /** return the event's secrecy in string format. */ |
212 | QString secrecyStr() const; | 212 | QString secrecyStr() const; |
213 | /** return list of all availbale secrecy classes */ | 213 | /** return list of all availbale secrecy classes */ |
214 | static QStringList secrecyList(); | 214 | static QStringList secrecyList(); |
215 | /** return human-readable name of secrecy class */ | 215 | /** return human-readable name of secrecy class */ |
216 | static QString secrecyName(int); | 216 | static QString secrecyName(int); |
217 | 217 | ||
218 | /** returns TRUE if the date specified is one on which the event will | 218 | /** returns TRUE if the date specified is one on which the event will |
219 | * recur. */ | 219 | * recur. */ |
220 | bool recursOn(const QDate &qd) const; | 220 | bool recursOn(const QDate &qd) const; |
221 | 221 | ||
222 | // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): | 222 | // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): |
223 | 223 | ||
224 | /** set resources used, such as Office, Car, etc. */ | 224 | /** set resources used, such as Office, Car, etc. */ |
225 | void setResources(const QStringList &resources); | 225 | void setResources(const QStringList &resources); |
226 | /** return list of current resources */ | 226 | /** return list of current resources */ |
227 | QStringList resources() const; | 227 | QStringList resources() const; |
228 | 228 | ||
229 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ | 229 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ |
230 | void setPriority(int priority); | 230 | void setPriority(int priority); |
231 | /** get the event's priority */ | 231 | /** get the event's priority */ |
232 | int priority() const; | 232 | int priority() const; |
233 | 233 | ||
234 | /** All alarms that are associated with this incidence */ | 234 | /** All alarms that are associated with this incidence */ |
235 | QPtrList<Alarm> alarms() const; | 235 | QPtrList<Alarm> alarms() const; |
236 | /** Create a new alarm which is associated with this incidence */ | 236 | /** Create a new alarm which is associated with this incidence */ |
237 | Alarm* newAlarm(); | 237 | Alarm* newAlarm(); |
238 | /** Add an alarm which is associated with this incidence */ | 238 | /** Add an alarm which is associated with this incidence */ |
239 | void addAlarm(Alarm*); | 239 | void addAlarm(Alarm*); |
240 | /** Remove an alarm that is associated with this incidence */ | 240 | /** Remove an alarm that is associated with this incidence */ |
241 | void removeAlarm(Alarm*); | 241 | void removeAlarm(Alarm*); |
242 | /** Remove all alarms that are associated with this incidence */ | 242 | /** Remove all alarms that are associated with this incidence */ |
243 | void clearAlarms(); | 243 | void clearAlarms(); |
244 | /** return whether any alarm associated with this incidence is enabled */ | 244 | /** return whether any alarm associated with this incidence is enabled */ |
245 | bool isAlarmEnabled() const; | 245 | bool isAlarmEnabled() const; |
246 | 246 | ||
247 | /** | 247 | /** |
248 | Return the recurrence rule associated with this incidence. If there is | 248 | Return the recurrence rule associated with this incidence. If there is |
249 | none, returns an appropriate (non-0) object. | 249 | none, returns an appropriate (non-0) object. |
250 | */ | 250 | */ |
251 | Recurrence *recurrence() const; | 251 | Recurrence *recurrence() const; |
252 | void setRecurrence(Recurrence * r); | 252 | void setRecurrence(Recurrence * r); |
253 | /** | 253 | /** |
254 | Forward to Recurrence::doesRecur(). | 254 | Forward to Recurrence::doesRecur(). |
255 | */ | 255 | */ |
256 | ushort doesRecur() const; | 256 | ushort doesRecur() const; |
257 | 257 | ||
258 | /** set the event's/todo's location. Do _not_ use it with journal */ | 258 | /** set the event's/todo's location. Do _not_ use it with journal */ |
259 | void setLocation(const QString &location); | 259 | void setLocation(const QString &location); |
260 | /** return the event's/todo's location. Do _not_ use it with journal */ | 260 | /** return the event's/todo's location. Do _not_ use it with journal */ |
261 | QString location() const; | 261 | QString location() const; |
262 | /** returns TRUE or FALSE depending on whether the todo has a start date */ | 262 | /** returns TRUE or FALSE depending on whether the todo has a start date */ |
263 | bool hasStartDate() const; | 263 | bool hasStartDate() const; |
264 | /** sets the event's hasStartDate value. */ | 264 | /** sets the event's hasStartDate value. */ |
265 | void setHasStartDate(bool f); | 265 | void setHasStartDate(bool f); |
266 | QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; | 266 | QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; |
267 | bool cancelled() const; | 267 | bool cancelled() const; |
268 | void setCancelled( bool b ); | 268 | void setCancelled( bool b ); |
269 | 269 | ||
270 | bool hasRecurrenceID() const; | 270 | bool hasRecurrenceID() const; |
271 | void setHasRecurrenceID( bool b ); | 271 | void setHasRecurrenceID( bool b ); |
272 | 272 | ||
273 | void setRecurrenceID(QDateTime); | 273 | void setRecurrenceID(QDateTime); |
274 | QDateTime recurrenceID () const; | 274 | QDateTime recurrenceID () const; |
275 | QDateTime dtStart() const; | 275 | QDateTime dtStart() const; |
276 | bool isHoliday() const; | 276 | bool isHoliday() const; |
277 | bool isBirthday() const; | 277 | bool isBirthday() const; |
278 | bool isAnniversary() const; | 278 | bool isAnniversary() const; |
279 | 279 | ||
280 | 280 | ||
281 | protected: | 281 | protected: |
282 | QPtrList<Alarm> mAlarms; | 282 | QPtrList<Alarm> mAlarms; |
283 | QPtrList<Incidence> mRelations; | 283 | QPtrList<Incidence> mRelations; |
284 | QDateTime mRecurrenceID; | 284 | QDateTime mRecurrenceID; |
285 | bool mHasRecurrenceID; | 285 | bool mHasRecurrenceID; |
286 | private: | 286 | private: |
287 | void checkCategories(); | 287 | void checkCategories(); |
288 | bool mHoliday, mBirthday, mAnniversary; | 288 | bool mHoliday, mBirthday, mAnniversary; |
289 | int mRevision; | 289 | int mRevision; |
290 | bool mCancelled; | 290 | bool mCancelled; |
291 | 291 | ||
292 | // base components of jounal, event and todo | 292 | // base components of jounal, event and todo |
293 | QDateTime mCreated; | 293 | QDateTime mCreated; |
294 | QString mDescription; | 294 | QString mDescription; |
295 | QString mSummary; | 295 | QString mSummary; |
296 | QStringList mCategories; | 296 | QStringList mCategories; |
297 | Incidence *mRelatedTo; | 297 | Incidence *mRelatedTo; |
298 | QString mRelatedToUid; | 298 | QString mRelatedToUid; |
299 | DateList mExDates; | 299 | DateList mExDates; |
300 | QPtrList<Attachment> mAttachments; | 300 | QPtrList<Attachment> mAttachments; |
301 | QStringList mResources; | 301 | QStringList mResources; |
302 | bool mHasStartDate; // if todo has associated start date | 302 | bool mHasStartDate; // if todo has associated start date |
303 | 303 | ||
304 | int mSecrecy; | 304 | int mSecrecy; |
305 | int mPriority; // 1 = highest, 2 = less, etc. | 305 | int mPriority; // 1 = highest, 2 = less, etc. |
306 | 306 | ||
307 | //QPtrList<Alarm> mAlarms; | 307 | //QPtrList<Alarm> mAlarms; |
308 | Recurrence *mRecurrence; | 308 | Recurrence *mRecurrence; |
309 | 309 | ||
310 | QString mLocation; | 310 | QString mLocation; |
311 | }; | 311 | }; |
312 | 312 | ||
313 | bool operator==( const Incidence&, const Incidence& ); | 313 | bool operator==( const Incidence&, const Incidence& ); |
314 | 314 | ||
315 | } | 315 | } |
316 | 316 | ||
317 | #endif | 317 | #endif |