author | zautrix <zautrix> | 2005-06-27 04:48:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-27 04:48:41 (UTC) |
commit | 9b2bf31715226dfa8210f31843616a04f810f012 (patch) (unidiff) | |
tree | b502c4a379b26f74621ba8fabb59fcb53f5a5679 | |
parent | 2e566a307bb50ac595fe729ebed0f5336f2af5a8 (diff) | |
download | kdepimpi-9b2bf31715226dfa8210f31843616a04f810f012.zip kdepimpi-9b2bf31715226dfa8210f31843616a04f810f012.tar.gz kdepimpi-9b2bf31715226dfa8210f31843616a04f810f012.tar.bz2 |
strat stop tod fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 3 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 60 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 14 | ||||
-rw-r--r-- | libkcal/calendar.h | 1 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 6 | ||||
-rw-r--r-- | libkcal/calendarlocal.h | 1 | ||||
-rw-r--r-- | libkcal/todo.cpp | 4 |
7 files changed, 78 insertions, 11 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 01c707e..6ac79ad 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -692,773 +692,776 @@ | |||
692 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, | 692 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, |
693 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, | 693 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, |
694 | { "Write back file","Schreibe Datei zurück" }, | 694 | { "Write back file","Schreibe Datei zurück" }, |
695 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, | 695 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, |
696 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, | 696 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, |
697 | { "Local device name:","Name dieses Gerätes:" }, | 697 | { "Local device name:","Name dieses Gerätes:" }, |
698 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, | 698 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, |
699 | { "Sync preferences","Synchronisations Einstellungen" }, | 699 | { "Sync preferences","Synchronisations Einstellungen" }, |
700 | { "Profile kind","Profil Art" }, | 700 | { "Profile kind","Profil Art" }, |
701 | { "Local file","Lokale Datei" }, | 701 | { "Local file","Lokale Datei" }, |
702 | { "Local file:","Lokale Datei:" }, | 702 | { "Local file:","Lokale Datei:" }, |
703 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, | 703 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, |
704 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, | 704 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, |
705 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, | 705 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, |
706 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, | 706 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, |
707 | { "Device","Gerät:" }, | 707 | { "Device","Gerät:" }, |
708 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, | 708 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, |
709 | { "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","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, | 709 | { "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","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, |
710 | { "Synchronization successful","Synchronisation erfolgreich" }, | 710 | { "Synchronization successful","Synchronisation erfolgreich" }, |
711 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, | 711 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, |
712 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, | 712 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, |
713 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, | 713 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, |
714 | { "Enter password","Passwort eingeben" }, | 714 | { "Enter password","Passwort eingeben" }, |
715 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, | 715 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, |
716 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, | 716 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, |
717 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, | 717 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, |
718 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, | 718 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, |
719 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, | 719 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, |
720 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, | 720 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, |
721 | { "Enter filter name:","Neuer Filter Name:" }, | 721 | { "Enter filter name:","Neuer Filter Name:" }, |
722 | { "Add Filter","Filter hinzufügen" }, | 722 | { "Add Filter","Filter hinzufügen" }, |
723 | { "Question","Frage" }, | 723 | { "Question","Frage" }, |
724 | { "Filter position: ","Filter Position: " }, | 724 | { "Filter position: ","Filter Position: " }, |
725 | { "Month View","Monatsansicht" }, | 725 | { "Month View","Monatsansicht" }, |
726 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, | 726 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, |
727 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, | 727 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, |
728 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, | 728 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, |
729 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, | 729 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, |
730 | { "Access: ","Zugriff: " }, | 730 | { "Access: ","Zugriff: " }, |
731 | { "Needs Action","Aktion notwendig" }, | 731 | { "Needs Action","Aktion notwendig" }, |
732 | { "Accepted","Akzeptiert" }, | 732 | { "Accepted","Akzeptiert" }, |
733 | { "Declined","Abgelehnt" }, | 733 | { "Declined","Abgelehnt" }, |
734 | { "Tentative","Vorläufig" }, | 734 | { "Tentative","Vorläufig" }, |
735 | { "Delegated","Beauftragt" }, | 735 | { "Delegated","Beauftragt" }, |
736 | { "Completed","Vollständig" }, | 736 | { "Completed","Vollständig" }, |
737 | { "In Process","In Bearbeitung" }, | 737 | { "In Process","In Bearbeitung" }, |
738 | { "Participant","Teilnehmer" }, | 738 | { "Participant","Teilnehmer" }, |
739 | { "Optional Participant","Möglicher Teilnehmer" }, | 739 | { "Optional Participant","Möglicher Teilnehmer" }, |
740 | { "Observer","Beobachter" }, | 740 | { "Observer","Beobachter" }, |
741 | { "Chair","Vorsitzender" }, | 741 | { "Chair","Vorsitzender" }, |
742 | { "Not supported \non desktop!\n","" }, | 742 | { "Not supported \non desktop!\n","" }, |
743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, | 743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, |
744 | { "Date range: ","Datums Zeitspanne: " }, | 744 | { "Date range: ","Datums Zeitspanne: " }, |
745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
747 | { "Add / remove events","Add./entferne Termine" }, | 747 | { "Add / remove events","Add./entferne Termine" }, |
748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
751 | { "Overwrite","Überschreiben" }, | 751 | { "Overwrite","Überschreiben" }, |
752 | { "Sync+save","Syncen+speichern" }, | 752 | { "Sync+save","Syncen+speichern" }, |
753 | { "Default","Standard" }, | 753 | { "Default","Standard" }, |
754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
755 | { " %d items?"," %d Einträge?" }, | 755 | { " %d items?"," %d Einträge?" }, |
756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, | 756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, |
757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
758 | { "Current","Aktuelle" }, | 758 | { "Current","Aktuelle" }, |
759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, | 759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, |
760 | { "All","Alle" }, | 760 | { "All","Alle" }, |
761 | { "Data Loss Warning","Datenverlust Warnung" }, | 761 | { "Data Loss Warning","Datenverlust Warnung" }, |
762 | { "Proceed","Weitermachen" }, | 762 | { "Proceed","Weitermachen" }, |
763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
764 | { "Filter disabled ","Filter abgeschaltet" }, | 764 | { "Filter disabled ","Filter abgeschaltet" }, |
765 | { "Filter selected: ","Gewählter Filter: " }, | 765 | { "Filter selected: ","Gewählter Filter: " }, |
766 | { "Toggle Cancel","Gecancelt ändern" }, | 766 | { "Toggle Cancel","Gecancelt ändern" }, |
767 | { "&Toggle Cancel","Gecancel&t ändern" }, | 767 | { "&Toggle Cancel","Gecancel&t ändern" }, |
768 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 768 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
769 | { "Stretched TB","Gedehnte TB" }, | 769 | { "Stretched TB","Gedehnte TB" }, |
770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, | 772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, |
773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
774 | { "Imported file successfully","Datei erfolgreich importiert" }, | 774 | { "Imported file successfully","Datei erfolgreich importiert" }, |
775 | { "Error importing file","Fehler beim Importieren der Datei" }, | 775 | { "Error importing file","Fehler beim Importieren der Datei" }, |
776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, | 777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, |
778 | { "Overwrite!","Überschreiben!" }, | 778 | { "Overwrite!","Überschreiben!" }, |
779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, | 779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, |
780 | { "Load backup filename","Lade Backup Dateiname" }, | 780 | { "Load backup filename","Lade Backup Dateiname" }, |
781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
783 | { "Save backup filename","Speichere Backup Dateiname" }, | 783 | { "Save backup filename","Speichere Backup Dateiname" }, |
784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, | 784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, |
785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
786 | { "Details of attendee","Teilnehmerdetails" }, | 786 | { "Details of attendee","Teilnehmerdetails" }, |
787 | { "Work phone:\n","Telefon Arbeit:\n" }, | 787 | { "Work phone:\n","Telefon Arbeit:\n" }, |
788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
789 | { "Home phone:\n","Telefon privat:\n" }, | 789 | { "Home phone:\n","Telefon privat:\n" }, |
790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
791 | { "Email:\n","Email:\n" }, | 791 | { "Email:\n","Email:\n" }, |
792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
793 | { "Audio Al.: ","Audio Al.: " }, | 793 | { "Audio Al.: ","Audio Al.: " }, |
794 | { "Proc.Al.: ","Proz.Al.: " }, | 794 | { "Proc.Al.: ","Proz.Al.: " }, |
795 | { "No sound set","Kein Sound definiert" }, | 795 | { "No sound set","Kein Sound definiert" }, |
796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
797 | { "No program set","Kein Programm definiert" }, | 797 | { "No program set","Kein Programm definiert" }, |
798 | { "Running '%1'","Ausführen '%1'" }, | 798 | { "Running '%1'","Ausführen '%1'" }, |
799 | { "Playing '%1'","Abspielen '%1'" }, | 799 | { "Playing '%1'","Abspielen '%1'" }, |
800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
801 | { "Load!","Laden!" }, | 801 | { "Load!","Laden!" }, |
802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, | 802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, |
803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
806 | { "Features + hints...","Eigenschaften + Tipps..." }, | 806 | { "Features + hints...","Eigenschaften + Tipps..." }, |
807 | { "User translation...","Benutzer Übersetzung..." }, | 807 | { "User translation...","Benutzer Übersetzung..." }, |
808 | { "Sync HowTo...","Synchronisation HowTo..." }, | 808 | { "Sync HowTo...","Synchronisation HowTo..." }, |
809 | { "Print calendar...","Drucke Kalender..." }, | 809 | { "Print calendar...","Drucke Kalender..." }, |
810 | { "Anniversary","Jahrestag" }, | 810 | { "Anniversary","Jahrestag" }, |
811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, | 811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, |
812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
816 | { "(%1 min before)","(%1 min vorher)" }, | 816 | { "(%1 min before)","(%1 min vorher)" }, |
817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
818 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 818 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, | 819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, |
820 | { "Continue","Weitermachen" }, | 820 | { "Continue","Weitermachen" }, |
821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
822 | { "Attendee:","Teilnehmer:" }, | 822 | { "Attendee:","Teilnehmer:" }, |
823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
824 | { "On day ","Am Tag " }, | 824 | { "On day ","Am Tag " }, |
825 | { "%1 of ","%1 des Monats" }, | 825 | { "%1 of ","%1 des Monats" }, |
826 | { "%1 of the year","%1 des Jahres" }, | 826 | { "%1 of the year","%1 des Jahres" }, |
827 | { "Anonymous","Anonymo" }, | 827 | { "Anonymous","Anonymo" }, |
828 | { "nobody@nowhere","niemand@nirgendwo" }, | 828 | { "nobody@nowhere","niemand@nirgendwo" }, |
829 | { "calendar.html","calendar.html" }, | 829 | { "calendar.html","calendar.html" }, |
830 | { " Local Time"," Locale Zeit" }, | 830 | { " Local Time"," Locale Zeit" }, |
831 | { "Unknown Name","Unbekannter Name" }, | 831 | { "Unknown Name","Unbekannter Name" }, |
832 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 832 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
833 | { "Beam via IR!","Beam via IR!" }, | 833 | { "Beam via IR!","Beam via IR!" }, |
834 | { "Next Month","Nächster Monat" }, | 834 | { "Next Month","Nächster Monat" }, |
835 | { "Prio","Prio" }, | 835 | { "Prio","Prio" }, |
836 | { "Reparent Todo","Mache Sub-Todo" }, | 836 | { "Reparent Todo","Mache Sub-Todo" }, |
837 | { "tomorrow","morgen" }, | 837 | { "tomorrow","morgen" }, |
838 | { "today","heute" }, | 838 | { "today","heute" }, |
839 | { "yesterday","gestern" }, | 839 | { "yesterday","gestern" }, |
840 | { "Ok","Ok" }, | 840 | { "Ok","Ok" }, |
841 | { "Ok+Agenda","Ok+Agenda" }, | 841 | { "Ok+Agenda","Ok+Agenda" }, |
842 | { "Email","Email" }, | 842 | { "Email","Email" }, |
843 | { "RSVP","RSVP" }, | 843 | { "RSVP","RSVP" }, |
844 | { "Email:","Email:" }, | 844 | { "Email:","Email:" }, |
845 | { "Appointment Time ","Termin Zeit " }, | 845 | { "Appointment Time ","Termin Zeit " }, |
846 | { "2","2" }, | 846 | { "2","2" }, |
847 | { "3","3" }, | 847 | { "3","3" }, |
848 | { "4","4" }, | 848 | { "4","4" }, |
849 | { " 0 %"," 0 %" }, | 849 | { " 0 %"," 0 %" }, |
850 | { " 20 %"," 20 %" }, | 850 | { " 20 %"," 20 %" }, |
851 | { " 40 %"," 40 %" }, | 851 | { " 40 %"," 40 %" }, |
852 | { " 60 %"," 60 %" }, | 852 | { " 60 %"," 60 %" }, |
853 | { " 80 %"," 80 %" }, | 853 | { " 80 %"," 80 %" }, |
854 | { "100 %","100 %" }, | 854 | { "100 %","100 %" }, |
855 | { "Filter","Filter" }, | 855 | { "Filter","Filter" }, |
856 | { "Configure","Konfiguriere" }, | 856 | { "Configure","Konfiguriere" }, |
857 | { "What's Next","What's Next" }, | 857 | { "What's Next","What's Next" }, |
858 | { "Complete calendar...","Kompletten Kalender..." }, | 858 | { "Complete calendar...","Kompletten Kalender..." }, |
859 | { "Filtered calendar...","Gefilterten Kalender..." }, | 859 | { "Filtered calendar...","Gefilterten Kalender..." }, |
860 | { "Export to phone","Exportiere zum Handy" }, | 860 | { "Export to phone","Exportiere zum Handy" }, |
861 | { "Beam receive enabled","Beam Empfang an" }, | 861 | { "Beam receive enabled","Beam Empfang an" }, |
862 | { "What's new?","Was ist neu?" }, | 862 | { "What's new?","Was ist neu?" }, |
863 | { "FAQ...","FAQ..." }, | 863 | { "FAQ...","FAQ..." }, |
864 | { "Licence...","Licence..." }, | 864 | { "Licence...","Licence..." }, |
865 | { "What's This?","What's This?" }, | 865 | { "What's This?","What's This?" }, |
866 | { "&Edit...","&Editiere..." }, | 866 | { "&Edit...","&Editiere..." }, |
867 | { "Oktober","Oktober" }, | 867 | { "Oktober","Oktober" }, |
868 | { "Title","Titel" }, | 868 | { "Title","Titel" }, |
869 | { "%1 %","%1 %" }, | 869 | { "%1 %","%1 %" }, |
870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
871 | { "Import!","Importiere!" }, | 871 | { "Import!","Importiere!" }, |
872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
873 | { "Export to phone options","Export ans Handy Optionen" }, | 873 | { "Export to phone options","Export ans Handy Optionen" }, |
874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
875 | { "I/O device: ","I/O device: " }, | 875 | { "I/O device: ","I/O device: " }, |
876 | { "Connection: ","Connection: " }, | 876 | { "Connection: ","Connection: " }, |
877 | { "Model(opt.): ","Model(opt.): " }, | 877 | { "Model(opt.): ","Model(opt.): " }, |
878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, | 880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, |
881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
882 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 882 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
883 | { "Writing to phone...","Sende Daten ans Handy..." }, | 883 | { "Writing to phone...","Sende Daten ans Handy..." }, |
884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
885 | { "Retry","Nochmal versuchen" }, | 885 | { "Retry","Nochmal versuchen" }, |
886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
890 | { "Preferences","Vorlieben" }, | 890 | { "Preferences","Vorlieben" }, |
891 | { "Global","Global" }, | 891 | { "Global","Global" }, |
892 | { "Phone","Phone" }, | 892 | { "Phone","Phone" }, |
893 | { "SMS","SMS" }, | 893 | { "SMS","SMS" }, |
894 | { "Fax","Fax" }, | 894 | { "Fax","Fax" }, |
895 | { "Pager","Pager" }, | 895 | { "Pager","Pager" }, |
896 | { "SIP","SIP" }, | 896 | { "SIP","SIP" }, |
897 | { "Italian","Italienisch" }, | 897 | { "Italian","Italienisch" }, |
898 | { "24:00","24:00" }, | 898 | { "24:00","24:00" }, |
899 | { "12:00am","12:00am" }, | 899 | { "12:00am","12:00am" }, |
900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
906 | { "Used Mail Client","Benutzter Mail Client" }, | 906 | { "Used Mail Client","Benutzter Mail Client" }, |
907 | { "Channel:","Channel:" }, | 907 | { "Channel:","Channel:" }, |
908 | { "Message:","Message:" }, | 908 | { "Message:","Message:" }, |
909 | { "Parameters:","Parameter:" }, | 909 | { "Parameters:","Parameter:" }, |
910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
911 | { "extra Message:","extra Message:" }, | 911 | { "extra Message:","extra Message:" }, |
912 | { "extra Parameters:","extra Parameter:" }, | 912 | { "extra Parameters:","extra Parameter:" }, |
913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
914 | { "External Apps.","Externe Appl." }, | 914 | { "External Apps.","Externe Appl." }, |
915 | { "24 hours","24 Std." }, | 915 | { "24 hours","24 Std." }, |
916 | { "3 hours","3 Std." }, | 916 | { "3 hours","3 Std." }, |
917 | { "1 hour","1 Std." }, | 917 | { "1 hour","1 Std." }, |
918 | { "15 minutes","15 Min." }, | 918 | { "15 minutes","15 Min." }, |
919 | { "5 minutes","5 Min." }, | 919 | { "5 minutes","5 Min." }, |
920 | { "1 minute","1 Min." }, | 920 | { "1 minute","1 Min." }, |
921 | { "23","23" }, | 921 | { "23","23" }, |
922 | { "Mon 15","Mon 15" }, | 922 | { "Mon 15","Mon 15" }, |
923 | { "Configure KO","Konfiguriere KO" }, | 923 | { "Configure KO","Konfiguriere KO" }, |
924 | { "Event text","Termin Text" }, | 924 | { "Event text","Termin Text" }, |
925 | { "ToDo","Todo" }, | 925 | { "ToDo","Todo" }, |
926 | { "Today","Heute" }, | 926 | { "Today","Heute" }, |
927 | { "What's Next View","What's Next Ansicht" }, | 927 | { "What's Next View","What's Next Ansicht" }, |
928 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 928 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
929 | { "Alarm","Alarm" }, | 929 | { "Alarm","Alarm" }, |
930 | { "Used %1 Client","Benutzter %1 Client" }, | 930 | { "Used %1 Client","Benutzter %1 Client" }, |
931 | { "No email client installed","Kein Email Klient installiert" }, | 931 | { "No email client installed","Kein Email Klient installiert" }, |
932 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 932 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
933 | { "OM/Pi email client","OM/Pi Email Klient" }, | 933 | { "OM/Pi email client","OM/Pi Email Klient" }, |
934 | { "Include in multiple ","Beziehe in multiple " }, | 934 | { "Include in multiple ","Beziehe in multiple " }, |
935 | { "calendar ","Kalender " }, | 935 | { "calendar ","Kalender " }, |
936 | { "addressbook ","Adressbuch " }, | 936 | { "addressbook ","Adressbuch " }, |
937 | { "pwmanager","PWmanager" }, | 937 | { "pwmanager","PWmanager" }, |
938 | { " sync"," Sync ein" }, | 938 | { " sync"," Sync ein" }, |
939 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 939 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
940 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 940 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
941 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 941 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
942 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 942 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
943 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 943 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
944 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 944 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
945 | { "Help...","Hilfe..." }, | 945 | { "Help...","Hilfe..." }, |
946 | { "Local file Cal:","Lokale Datei Kal:" }, | 946 | { "Local file Cal:","Lokale Datei Kal:" }, |
947 | { "Local file ABook:","Lokale Datei ABuch:" }, | 947 | { "Local file ABook:","Lokale Datei ABuch:" }, |
948 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 948 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
949 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 949 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
950 | { "Calendar:","Kalender:" }, | 950 | { "Calendar:","Kalender:" }, |
951 | { "AddressBook:","AdressBuch:" }, | 951 | { "AddressBook:","AdressBuch:" }, |
952 | { "PWManager:","PWManager:" }, | 952 | { "PWManager:","PWManager:" }, |
953 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 953 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
954 | { "ssh/scp","ssh/scp" }, | 954 | { "ssh/scp","ssh/scp" }, |
955 | { "ftp","ftp" }, | 955 | { "ftp","ftp" }, |
956 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 956 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
957 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 957 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
958 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 958 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
959 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 959 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
960 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 960 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
961 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 961 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
962 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 962 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
963 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 963 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
964 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 964 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
965 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | 965 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, |
966 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 966 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
967 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 967 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
968 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 968 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
969 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 969 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
970 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 970 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
971 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, | 971 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
972 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 972 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
973 | { "Multiple profiles","Multi-Sync Profile" }, | 973 | { "Multiple profiles","Multi-Sync Profile" }, |
974 | { "Device: ","Gerät: " }, | 974 | { "Device: ","Gerät: " }, |
975 | { "Multiple sync started.","Multi-Sync gestartet." }, | 975 | { "Multiple sync started.","Multi-Sync gestartet." }, |
976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
977 | { "Turn filter on","Schalte Filter an" }, | 977 | { "Turn filter on","Schalte Filter an" }, |
978 | { "Turn filter off","Schalte Filter aus" }, | 978 | { "Turn filter off","Schalte Filter aus" }, |
979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></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" }, | 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>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1025 | { "<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>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1026 | { "<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>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" }, | 1027 | { "<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><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1028 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1029 | { "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" }, | 1029 | { "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 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1030 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1031 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1031 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1032 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1032 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1033 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1033 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1034 | { "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" }, | 1034 | { "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 | { "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" }, | 1035 | { "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 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1036 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1037 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1037 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1038 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1038 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1039 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1039 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1040 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1040 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1041 | { "From: ","Von: " }, | 1041 | { "From: ","Von: " }, |
1042 | { "Remove sync info","Entferne Sync Info" }, | 1042 | { "Remove sync info","Entferne Sync Info" }, |
1043 | { "For all profiles","Für alle Profile" }, | 1043 | { "For all profiles","Für alle Profile" }, |
1044 | { "Hide not Running","Verstecke nicht Laufende" }, | 1044 | { "Hide not Running","Verstecke nicht Laufende" }, |
1045 | { "ME","ME" }, | 1045 | { "ME","ME" }, |
1046 | { "Toolbar","Toolbar" }, | 1046 | { "Toolbar","Toolbar" }, |
1047 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1047 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1048 | { "Undo Delete","Löschen rückgängig machen" }, | 1048 | { "Undo Delete","Löschen rückgängig machen" }, |
1049 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1049 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1050 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1050 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1051 | { "Januar","Januar" }, | 1051 | { "Januar","Januar" }, |
1052 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1052 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1053 | { "No Filter","Kein Filter" }, | 1053 | { "No Filter","Kein Filter" }, |
1054 | { "Multiple Sync options","Multi Sync Optionen" }, | 1054 | { "Multiple Sync options","Multi Sync Optionen" }, |
1055 | { "Sync algo options","Sync Ablauf Optionen" }, | 1055 | { "Sync algo options","Sync Ablauf Optionen" }, |
1056 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1056 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1057 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1057 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1058 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1058 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1059 | { "Write back options","Optionen zum Zurückschreiben" }, | 1059 | { "Write back options","Optionen zum Zurückschreiben" }, |
1060 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1060 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1061 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1061 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1062 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1062 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1063 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1063 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1064 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1064 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1065 | { "Time period","Zeitspanne" }, | 1065 | { "Time period","Zeitspanne" }, |
1066 | { "From ","Von " }, | 1066 | { "From ","Von " }, |
1067 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1067 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1068 | { " weeks in the future "," Wochen in der Zukunft " }, | 1068 | { " weeks in the future "," Wochen in der Zukunft " }, |
1069 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1069 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1070 | { "Local temp file:","Lokale temp Datei:" }, | 1070 | { "Local temp file:","Lokale temp Datei:" }, |
1071 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1071 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1072 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1072 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1073 | { "Language","Sprache" }, | 1073 | { "Language","Sprache" }, |
1074 | { "Time Format","Zeit Format" }, | 1074 | { "Time Format","Zeit Format" }, |
1075 | { "Time Zone","Zeit Zone" }, | 1075 | { "Time Zone","Zeit Zone" }, |
1076 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1076 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1077 | { "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" }, | 1077 | { "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 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1078 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1079 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1079 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1080 | { "Save settings","Speichere Einstellungen" }, | 1080 | { "Save settings","Speichere Einstellungen" }, |
1081 | { "Save standard","Speichere Standard" }, | 1081 | { "Save standard","Speichere Standard" }, |
1082 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1082 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1083 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1083 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1084 | { "Data storage path","Daten Speicherpfad" }, | 1084 | { "Data storage path","Daten Speicherpfad" }, |
1085 | { "Language","Sprache" }, | 1085 | { "Language","Sprache" }, |
1086 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1086 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1087 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1087 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1088 | { "Show events that are done","Zeige abgelaufene Termine" }, | 1088 | { "Show events that are done","Zeige abgelaufene Termine" }, |
1089 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1089 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1090 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1090 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1091 | { "KO/Pi","KO/Pi" }, | 1091 | { "KO/Pi","KO/Pi" }, |
1092 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1092 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1093 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1093 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1094 | { "Sound.Al.: ","Sound.Al.: " }, | 1094 | { "Sound.Al.: ","Sound.Al.: " }, |
1095 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1095 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1096 | { "Restore","Wiederherstellen" }, | 1096 | { "Restore","Wiederherstellen" }, |
1097 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1097 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1098 | { "% completed","% erledigt" }, | 1098 | { "% completed","% erledigt" }, |
1099 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1099 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1100 | { "Set complete","Setze auf erledigt" }, | 1100 | { "Set complete","Setze auf erledigt" }, |
1101 | { "(cancelled)","(gecancelt)" }, | 1101 | { "(cancelled)","(gecancelt)" }, |
1102 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1102 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1103 | { " Local time "," Locale Zeit " }, | 1103 | { " Local time "," Locale Zeit " }, |
1104 | { "Form2","Form2" }, | 1104 | { "Form2","Form2" }, |
1105 | { "Filter enabled","Filter angeschaltet" }, | 1105 | { "Filter enabled","Filter angeschaltet" }, |
1106 | { "Edit Filters","Ändere Filter" }, | 1106 | { "Edit Filters","Ändere Filter" }, |
1107 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1107 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1108 | { "Agenda","Agenda" }, | 1108 | { "Agenda","Agenda" }, |
1109 | { " ("," (" }, | 1109 | { " ("," (" }, |
1110 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1110 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1111 | { "Print","Print" }, | 1111 | { "Print","Print" }, |
1112 | { "&Setup Printer...","Drucker &Setup..." }, | 1112 | { "&Setup Printer...","Drucker &Setup..." }, |
1113 | { "View Type","Zeige Typ" }, | 1113 | { "View Type","Zeige Typ" }, |
1114 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1114 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1115 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1115 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1116 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1116 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1117 | { "Portrait","Portrait" }, | 1117 | { "Portrait","Portrait" }, |
1118 | { "Landscape","Landschaft" }, | 1118 | { "Landscape","Landschaft" }, |
1119 | { "Print day","Drucke Tag" }, | 1119 | { "Print day","Drucke Tag" }, |
1120 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1120 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1121 | { "Date && Time Range","Datum && Zeitspanne" }, | 1121 | { "Date && Time Range","Datum && Zeitspanne" }, |
1122 | { "&End date:","&Enddatum:" }, | 1122 | { "&End date:","&Enddatum:" }, |
1123 | { "&Start date:","&Startdatum:" }, | 1123 | { "&Start date:","&Startdatum:" }, |
1124 | { "Start &time:","Startzeit:" }, | 1124 | { "Start &time:","Startzeit:" }, |
1125 | { "End ti&me:","Endzeit:" }, | 1125 | { "End ti&me:","Endzeit:" }, |
1126 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1126 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1127 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1127 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1128 | { "Alt+D","Alt+D" }, | 1128 | { "Alt+D","Alt+D" }, |
1129 | { "&Use colors","Nutze Farben" }, | 1129 | { "&Use colors","Nutze Farben" }, |
1130 | { "Alt+U","Alt+U" }, | 1130 | { "Alt+U","Alt+U" }, |
1131 | { "Print week","Drucke Woche" }, | 1131 | { "Print week","Drucke Woche" }, |
1132 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1132 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1133 | { "Use &colors","Nutze Farben" }, | 1133 | { "Use &colors","Nutze Farben" }, |
1134 | { "Type of View","Typ der Ansicht" }, | 1134 | { "Type of View","Typ der Ansicht" }, |
1135 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1135 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1136 | { "Alt+F","Alt+F" }, | 1136 | { "Alt+F","Alt+F" }, |
1137 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1137 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1138 | { "Alt+T","Alt+T" }, | 1138 | { "Alt+T","Alt+T" }, |
1139 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1139 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1140 | { "Print month","Drucke Monat" }, | 1140 | { "Print month","Drucke Monat" }, |
1141 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1141 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1142 | { "&Start month:","&Startmonat:" }, | 1142 | { "&Start month:","&Startmonat:" }, |
1143 | { "&End month:","&Endmonat:" }, | 1143 | { "&End month:","&Endmonat:" }, |
1144 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1144 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1145 | { "Print todos","Drucke Todos" }, | 1145 | { "Print todos","Drucke Todos" }, |
1146 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1146 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1147 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1147 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1148 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1148 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1149 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1149 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1150 | { "Items to Print","Zu druckende Items" }, | 1150 | { "Items to Print","Zu druckende Items" }, |
1151 | { "&From:","Von:" }, | 1151 | { "&From:","Von:" }, |
1152 | { "&To:","Bis:" }, | 1152 | { "&To:","Bis:" }, |
1153 | { "Print &all todo items","Drucke alle Todo Items" }, | 1153 | { "Print &all todo items","Drucke alle Todo Items" }, |
1154 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1154 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1155 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1155 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1156 | { "Todo List","Todo Liste" }, | 1156 | { "Todo List","Todo Liste" }, |
1157 | { "&Title:","&Titel:" }, | 1157 | { "&Title:","&Titel:" }, |
1158 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, | 1158 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, |
1159 | { "Todo list","Todo Liste" }, | 1159 | { "Todo list","Todo Liste" }, |
1160 | { "&Print...","Drucke..." }, | 1160 | { "&Print...","Drucke..." }, |
1161 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1161 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1162 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1162 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1163 | { "OK","OK" }, | 1163 | { "OK","OK" }, |
1164 | { "FilterEditor","FilterEditor" }, | 1164 | { "FilterEditor","FilterEditor" }, |
1165 | { "Include","Inclusive" }, | 1165 | { "Include","Inclusive" }, |
1166 | { "Exclude","Exclusive" }, | 1166 | { "Exclude","Exclusive" }, |
1167 | { "Edit Selection...","Editiere Auswahl" }, | 1167 | { "Edit Selection...","Editiere Auswahl" }, |
1168 | { "recurring events","wiederholende Termine" }, | 1168 | { "recurring events","wiederholende Termine" }, |
1169 | { "recurr. events","wiederh.Termine" }, | 1169 | { "recurr. events","wiederh.Termine" }, |
1170 | { "completed to-dos","erledigte Todos" }, | 1170 | { "completed to-dos","erledigte Todos" }, |
1171 | { "events","Termine" }, | 1171 | { "events","Termine" }, |
1172 | { "todos","Todos" }, | 1172 | { "todos","Todos" }, |
1173 | { "journals","Journale" }, | 1173 | { "journals","Journale" }, |
1174 | { "public","öffentl." }, | 1174 | { "public","öffentl." }, |
1175 | { "private","privat" }, | 1175 | { "private","privat" }, |
1176 | { "confidential","vertraul." }, | 1176 | { "confidential","vertraul." }, |
1177 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, | 1177 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, |
1178 | { "Yesterday","Gestern" }, | 1178 | { "Yesterday","Gestern" }, |
1179 | { "Day after tomorrow","Übermorgen" }, | 1179 | { "Day after tomorrow","Übermorgen" }, |
1180 | { "Tomorrow","Morgen" }, | 1180 | { "Tomorrow","Morgen" }, |
1181 | { "Day before yesterday","Vorgestern" }, | 1181 | { "Day before yesterday","Vorgestern" }, |
1182 | { "Size %1","Größe %1" }, | 1182 | { "Size %1","Größe %1" }, |
1183 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1183 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1184 | { " (%1 y.)"," (%1 J.)" }, | 1184 | { " (%1 y.)"," (%1 J.)" }, |
1185 | { "Allday:","Ganztägig:" }, | 1185 | { "Allday:","Ganztägig:" }, |
1186 | { "compl.todos","erled.Todos" }, | 1186 | { "compl.todos","erled.Todos" }, |
1187 | { "Day view","Tagesansicht" }, | 1187 | { "Day view","Tagesansicht" }, |
1188 | { "Next days","Nächste Tage" }, | 1188 | { "Next days","Nächste Tage" }, |
1189 | { "Next week","Nächste Woche" }, | 1189 | { "Next week","Nächste Woche" }, |
1190 | { "Next two weeks","Nächste zwei Wochen" }, | 1190 | { "Next two weeks","Nächste zwei Wochen" }, |
1191 | { "This month","Dieser Monat" }, | 1191 | { "This month","Dieser Monat" }, |
1192 | { "Journal view","Journal" }, | 1192 | { "Journal view","Journal" }, |
1193 | { "Display all opened","Zeige alle geöffnet" }, | 1193 | { "Display all opened","Zeige alle geöffnet" }, |
1194 | { "Display all closed","Zeige alle geschlossen" }, | 1194 | { "Display all closed","Zeige alle geschlossen" }, |
1195 | { "Display all flat","Zeige alle flach" }, | 1195 | { "Display all flat","Zeige alle flach" }, |
1196 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1196 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1197 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1197 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1198 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1198 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1199 | { "Select Week","Wähle Woche" }, | 1199 | { "Select Week","Wähle Woche" }, |
1200 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1200 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1201 | { "Set Alarm!","Setze Alarm!" }, | 1201 | { "Set Alarm!","Setze Alarm!" }, |
1202 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, | 1202 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, |
1203 | { " and "," und " }, | 1203 | { " and "," und " }, |
1204 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1204 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1205 | { "Mail to selected","Mail an Ausgewählte" }, | 1205 | { "Mail to selected","Mail an Ausgewählte" }, |
1206 | { "Mail to all","Mail an Alle" }, | 1206 | { "Mail to all","Mail an Alle" }, |
1207 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1207 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1208 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1208 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1209 | { " on"," am" }, | 1209 | { " on"," am" }, |
1210 | { " completed on "," erledigt am " }, | 1210 | { " completed on "," erledigt am " }, |
1211 | { "Save as Event template","Speichere als Vorlage" }, | 1211 | { "Save as Event template","Speichere als Vorlage" }, |
1212 | { "Load Event template","Lade Termin Vorlage" }, | 1212 | { "Load Event template","Lade Termin Vorlage" }, |
1213 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1213 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1214 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1214 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1215 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1215 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1216 | { "Parent todo:<br>","Über Todo:<br>" }, | 1216 | { "Parent todo:<br>","Über Todo:<br>" }, |
1217 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1217 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1218 | { " completed"," erledigt" }, | 1218 | { " completed"," erledigt" }, |
1219 | { "(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!" }, | 1219 | { "(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 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1220 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1221 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1221 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1222 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1222 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1223 | { "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?" }, | 1223 | { "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 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1224 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1225 | { "Error","Fehler" }, | 1225 | { "Error","Fehler" }, |
1226 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1226 | { ""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 Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1227 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1228 | { "Warning","Warnung" }, | 1228 | { "Warning","Warnung" }, |
1229 | { "Select week number","Wähle Wochen Nummer" }, | 1229 | { "Select week number","Wähle Wochen Nummer" }, |
1230 | { "Februar","Februar" }, | 1230 | { "Februar","Februar" }, |
1231 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1231 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1232 | { "W","W" }, | 1232 | { "W","W" }, |
1233 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1233 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1234 | { "T: %1","T: %1" }, | 1234 | { "T: %1","T: %1" }, |
1235 | { "Start: ","Start: " }, | 1235 | { "Start: ","Start: " }, |
1236 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1236 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1237 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1237 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1238 | { "Remote IP address:","Ferne IP Adresse:" }, | 1238 | { "Remote IP address:","Ferne IP Adresse:" }, |
1239 | { "Remote port number:","Ferne Port Nummer:" }, | 1239 | { "Remote port number:","Ferne Port Nummer:" }, |
1240 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1240 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1241 | { "Remote from: ","Fern von: " }, | 1241 | { "Remote from: ","Fern von: " }, |
1242 | { "Local from: ","Lokal von: " }, | 1242 | { "Local from: ","Lokal von: " }, |
1243 | { "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" }, | 1243 | { "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 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1244 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1245 | { "Write back","Schreibe zurück" }, | 1245 | { "Write back","Schreibe zurück" }, |
1246 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1246 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1247 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1247 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1248 | { "Received sync request","Sync Anfrage erhalten" }, | 1248 | { "Received sync request","Sync Anfrage erhalten" }, |
1249 | { "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." }, | 1249 | { "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 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1250 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1251 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1251 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1252 | { "Sending file...","Sende Datei..." }, | 1252 | { "Sending file...","Sende Datei..." }, |
1253 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1253 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1254 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1254 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1255 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1255 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1256 | { "Writing file to disk...","Speichere Datei..." }, | 1256 | { "Writing file to disk...","Speichere Datei..." }, |
1257 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1257 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1258 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1258 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1259 | { "Synchronize!","Synchronisiere!" }, | 1259 | { "Synchronize!","Synchronisiere!" }, |
1260 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1260 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1261 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1261 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1262 | { "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!" }, | 1262 | { "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 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1263 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1264 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1264 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1265 | { "List week view","Listenwochenansicht" }, | 1265 | { "List week view","Listenwochenansicht" }, |
1266 | { "List week","Listenwochenansicht" }, | 1266 | { "List week","Listenwochenansicht" }, |
1267 | { "Next Week","Nächste Woche" }, | 1267 | { "Next Week","Nächste Woche" }, |
1268 | { "Previous Week","Vorherige Woche" }, | 1268 | { "Previous Week","Vorherige Woche" }, |
1269 | { "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." }, | 1269 | { "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 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1270 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1271 | { "Details","Details" }, | 1271 | { "Details","Details" }, |
1272 | { "Created time","Erstellt Zeit" }, | 1272 | { "Created time","Erstellt Zeit" }, |
1273 | { "Last modified time","Geändert Zeit" }, | 1273 | { "Last modified time","Geändert Zeit" }, |
1274 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1274 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1275 | { "View Options","Anzeige Optionen" }, | 1275 | { "View Options","Anzeige Optionen" }, |
1276 | { "<b>Created: ","<b>Erstellt am: " }, | 1276 | { "<b>Created: ","<b>Erstellt am: " }, |
1277 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1277 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1278 | { "Journal: ","Journal: " }, | 1278 | { "Journal: ","Journal: " }, |
1279 | { "yearly","jährlich" }, | 1279 | { "yearly","jährlich" }, |
1280 | { "(%1) ","%1-" }, | 1280 | { "(%1) ","%1-" }, |
1281 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1281 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1282 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1282 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1283 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1283 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1284 | { "Summary/Loc.","Titel/Ort" }, | 1284 | { "Summary/Loc.","Titel/Ort" }, |
1285 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1285 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1286 | { "Week Number","Wochennummer" }, | 1286 | { "Week Number","Wochennummer" }, |
1287 | { "Import","Importiere" }, | 1287 | { "Import","Importiere" }, |
1288 | { "Export","Exportiere" }, | 1288 | { "Export","Exportiere" }, |
1289 | { "Beam","Beame" }, | 1289 | { "Beam","Beame" }, |
1290 | { "Export selected","Exportiere Selektierte" }, | 1290 | { "Export selected","Exportiere Selektierte" }, |
1291 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1291 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1292 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1292 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1293 | { "Journal/Details...","Journale/Details..." }, | 1293 | { "Journal/Details...","Journale/Details..." }, |
1294 | { "Agenda View","Agenda Ansicht" }, | 1294 | { "Agenda View","Agenda Ansicht" }, |
1295 | { "Show current time","Zeige aktuelle Zeit" }, | 1295 | { "Show current time","Zeige aktuelle Zeit" }, |
1296 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1296 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1297 | { "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" }, | 1297 | { "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 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1298 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1299 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1299 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1300 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1300 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1301 | { "%1 days\n","%1 Tagen\n" }, | 1301 | { "%1 days\n","%1 Tagen\n" }, |
1302 | { "1 day\n","1 Tag\n" }, | 1302 | { "1 day\n","1 Tag\n" }, |
1303 | { "%1 hours\n","%1 Stunden\n" }, | 1303 | { "%1 hours\n","%1 Stunden\n" }, |
1304 | { "1 hour\n","1 Stunde\n" }, | 1304 | { "1 hour\n","1 Stunde\n" }, |
1305 | { "%1 minutes\n","%1 Minuten\n" }, | 1305 | { "%1 minutes\n","%1 Minuten\n" }, |
1306 | { "1 minute\n","1 Minute\n" }, | 1306 | { "1 minute\n","1 Minute\n" }, |
1307 | { "Only one toolbar","Nur eine Toolbar" }, | 1307 | { "Only one toolbar","Nur eine Toolbar" }, |
1308 | { "Print","Drucke" }, | 1308 | { "Print","Drucke" }, |
1309 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1309 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1310 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1310 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1311 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1311 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1312 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1312 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1313 | { "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" }, | 1313 | { "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 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1314 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1315 | { "Print unscaled","Drucke unskaliert" }, | 1315 | { "Print unscaled","Drucke unskaliert" }, |
1316 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1316 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1317 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1317 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1318 | { "Printout Mode","Druck Modus" }, | 1318 | { "Printout Mode","Druck Modus" }, |
1319 | { "Filter menu icon","Filtermenu Icon" }, | 1319 | { "Filter menu icon","Filtermenu Icon" }, |
1320 | { "<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" }, | 1320 | { "<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>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" }, | 1321 | { "<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 | { "%1d","%1t" }, | 1322 | { "%1d","%1t" }, |
1323 | { "%1h","%1std" }, | 1323 | { "%1h","%1std" }, |
1324 | { "%1min","%1min" }, | 1324 | { "%1min","%1min" }, |
1325 | { "( %1 before )","( %1 vorher )" }, | 1325 | { "( %1 before )","( %1 vorher )" }, |
1326 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1326 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1327 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1327 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1328 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1328 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1329 | { "Show Sync Events","Zeige Sync-Ereignisse" }, | 1329 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1330 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1330 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1331 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1331 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1332 | { " on "," am " }, | 1332 | { " on "," am " }, |
1333 | { "On: ","Am: " }, | 1333 | { "On: ","Am: " }, |
1334 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1334 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1335 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1335 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1336 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1336 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1337 | { "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?" }, | 1337 | { "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 | { "Todo is started","Todo ist gestartet" }, | 1338 | { "Todo is started","Todo ist gestartet" }, |
1339 | { "Stop todo","Stoppe Todo" }, | 1339 | { "Stop todo","Stoppe Todo" }, |
1340 | { "Todo is stopped","Todo ist gestoppt" }, | 1340 | { "Todo is stopped","Todo ist gestoppt" }, |
1341 | { "Start todo","Starte Todo" }, | 1341 | { "Start todo","Starte Todo" }, |
1342 | { "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?" }, | 1342 | { "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\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?" }, | 1343 | { "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 | { "Todo has subtodos","Todo hat Untertodos" }, | 1344 | { "Todo has subtodos","Todo hat Untertodos" }, |
1345 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1345 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1346 | { "Colors","Farben" }, | 1346 | { "Colors","Farben" }, |
1347 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1347 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1348 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1348 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1349 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1349 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1350 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1350 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1351 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1351 | { "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 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1352 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1353 | { "times","Zeiten" }, | 1353 | { "times","Zeiten" }, |
1354 | { "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?" }, | 1354 | { "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 | { "Backup enabled","Backup angeschaltet" }, | 1355 | { "Backup enabled","Backup angeschaltet" }, |
1356 | { "Use standard backup dir","Standard Backupverzeichnis" }, | 1356 | { "Use standard backup dir","Standard Backupverzeichnis" }, |
1357 | { "Number of Backups:","Anzahl der Backups" }, | 1357 | { "Number of Backups:","Anzahl der Backups" }, |
1358 | { "Make backup every ","Mache ein Backup alle " }, | 1358 | { "Make backup every ","Mache ein Backup alle " }, |
1359 | { " days"," Tage" }, | 1359 | { " days"," Tage" }, |
1360 | { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, | 1360 | { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, |
1361 | { "Backup Failed!","Backup Problem!" }, | 1361 | { "Backup Failed!","Backup Problem!" }, |
1362 | { "Try again now","Versuche jetzt nochmal" }, | 1362 | { "Try again now","Versuche jetzt nochmal" }, |
1363 | { "Try again later","Versuche später nochmal" }, | 1363 | { "Try again later","Versuche später nochmal" }, |
1364 | { "Try again tomorrow","Versuche morgen nochmal" }, | 1364 | { "Try again tomorrow","Versuche morgen nochmal" }, |
1365 | { "Disable backup","Schalte Backup ab" }, | 1365 | { "Disable backup","Schalte Backup ab" }, |
1366 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, | 1366 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, |
1367 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, | 1367 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, |
1368 | { "Choose action","Wähle Aktion" }, | 1368 | { "Choose action","Wähle Aktion" }, |
1369 | { "Comment for todo:","Kommentar zum Todo:" }, | 1369 | { "Comment for todo:","Kommentar zum Todo:" }, |
1370 | { "Stop+note","Stop+Notiz" }, | 1370 | { "Stop+note","Stop+Notiz" }, |
1371 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, | 1371 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, |
1372 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, | 1372 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, |
1373 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, | 1373 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, |
1374 | { "Print complete list","Drucke komplette Liste" }, | 1374 | { "Print complete list","Drucke komplette Liste" }, |
1375 | { "Hide all selected","Verstecke Selektierte" }, | 1375 | { "Hide all selected","Verstecke Selektierte" }, |
1376 | { "Add items","hinzufügen" }, | 1376 | { "Add items","hinzufügen" }, |
1377 | { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, | 1377 | { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, |
1378 | { "Print List View...","Drucke Listenansicht..." }, | 1378 | { "Print List View...","Drucke Listenansicht..." }, |
1379 | { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, | 1379 | { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, |
1380 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, | 1380 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, |
1381 | { "Global Settings...","Globale Einstellungen..." }, | 1381 | { "Global Settings...","Globale Einstellungen..." }, |
1382 | { "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, | 1382 | { "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, |
1383 | { "(disabled)","(abgeschaltet)" }, | 1383 | { "(disabled)","(abgeschaltet)" }, |
1384 | { "New Calendar","Neuer Kalender" }, | 1384 | { "New Calendar","Neuer Kalender" }, |
1385 | { "Calendar","Kalender" }, | 1385 | { "Calendar","Kalender" }, |
1386 | { "Filter selector","Filterauswahl" }, | 1386 | { "Filter selector","Filterauswahl" }, |
1387 | { "Filtermenu","Filtermenu" }, | 1387 | { "Filtermenu","Filtermenu" }, |
1388 | { "Toggle Fullscreen","Vollbild umschalten" }, | 1388 | { "Toggle Fullscreen","Vollbild umschalten" }, |
1389 | { "Toggle Resource View","Resourcenansicht umschalten" }, | 1389 | { "Toggle Resource View","Resourcenansicht umschalten" }, |
1390 | { "Storage HowTo...","Speicherort HowTo..." }, | 1390 | { "Storage HowTo...","Speicherort HowTo..." }, |
1391 | { "Timetracking HowTo...","Timetracking HowTo..." }, | 1391 | { "Timetracking HowTo...","Timetracking HowTo..." }, |
1392 | { "Juni","Juni" }, | 1392 | { "Juni","Juni" }, |
1393 | { "Juli","Juli" }, | 1393 | { "Juli","Juli" }, |
1394 | { "ToDo:","ToDo:" }, | 1394 | { "ToDo:","ToDo:" }, |
1395 | { "Set Calendar","Setze Kalender" }, | 1395 | { "Set Calendar","Setze Kalender" }, |
1396 | { "Todo: %1","Todo: %1" }, | 1396 | { "Todo: %1","Todo: %1" }, |
1397 | { ": (Prio ",": (Prio " }, | 1397 | { ": (Prio ",": (Prio " }, |
1398 | { "Todos","Todos" }, | 1398 | { "Todos","Todos" }, |
1399 | { "Todo Viewer","Todo Viewer" }, | 1399 | { "Todo Viewer","Todo Viewer" }, |
1400 | { "Todo ","Todo " }, | 1400 | { "Todo ","Todo " }, |
1401 | { " Calendar \n Resource "," Kalender \n Resource " }, | 1401 | { " Calendar \n Resource "," Kalender \n Resource " }, |
1402 | { " Color "," Farbe " }, | 1402 | { " Color "," Farbe " }, |
1403 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, | 1403 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, |
1404 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, | 1404 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, |
1405 | { "Add new Calendar","Füge Kalender hinzu" }, | 1405 | { "Add new Calendar","Füge Kalender hinzu" }, |
1406 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, | 1406 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, |
1407 | { "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, | 1407 | { "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, |
1408 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, | 1408 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, |
1409 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, | 1409 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, |
1410 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, | 1410 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, |
1411 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, | 1411 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, |
1412 | { "Global application font for all apps:","Globale Schriftart:" }, | 1412 | { "Global application font for all apps:","Globale Schriftart:" }, |
1413 | { "Application Font","Applikationsschriftart" }, | 1413 | { "Application Font","Applikationsschriftart" }, |
1414 | { "Kx/Pi","Kx/Pi" }, | 1414 | { "Kx/Pi","Kx/Pi" }, |
1415 | { "Backup","Backup" }, | 1415 | { "Backup","Backup" }, |
1416 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, | 1416 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, |
1417 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, | 1417 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, |
1418 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, | 1418 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, |
1419 | { "Choose Color","Wähle Farbe" }, | 1419 | { "Choose Color","Wähle Farbe" }, |
1420 | { " OK "," OK " }, | 1420 | { " OK "," OK " }, |
1421 | { " Cancel "," Abbrechen " }, | 1421 | { " Cancel "," Abbrechen " }, |
1422 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, | 1422 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, |
1423 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, | 1423 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, |
1424 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, | 1424 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, |
1425 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, | 1425 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, |
1426 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, | 1426 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, |
1427 | { "%1\nis running!","%1\nist am Laufen!" }, | 1427 | { "%1\nis running!","%1\nist am Laufen!" }, |
1428 | { "Additional Comment:","Zusätzlicher Kommentar:" }, | 1428 | { "Additional Comment:","Zusätzlicher Kommentar:" }, |
1429 | { "Stop and save","Stopp und Speichern" }, | 1429 | { "Stop and save","Stopp und Speichern" }, |
1430 | { "Continue running","Weiter laufen lassen" }, | 1430 | { "Continue running","Weiter laufen lassen" }, |
1431 | { "Stop - do not save","Stopp - nicht Speichern" }, | 1431 | { "Stop - do not save","Stopp - nicht Speichern" }, |
1432 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, | 1432 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, |
1433 | { "Time mismatch!","Zeiten stimmen nicht!" }, | 1433 | { "Time mismatch!","Zeiten stimmen nicht!" }, |
1434 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, | 1434 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, |
1435 | { "Yes, stop todo","Ja, stoppe Todo" }, | 1435 | { "Yes, stop todo","Ja, stoppe Todo" }, |
1436 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, | 1436 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, |
1437 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, | 1437 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, |
1438 | { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, | 1438 | { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, |
1439 | { "Spouse","Ehegatte" }, | 1439 | { "Spouse","Ehegatte" }, |
1440 | { "Notes","Notizen" }, | 1440 | { "Notes","Notizen" }, |
1441 | { "Messanger","Messanger" }, | 1441 | { "Messanger","Messanger" }, |
1442 | { "Assistant","Assistent" }, | 1442 | { "Assistant","Assistent" }, |
1443 | { "Manager","Manager" }, | 1443 | { "Manager","Manager" }, |
1444 | { "Secrecy","Sichtbar" }, | 1444 | { "Secrecy","Sichtbar" }, |
1445 | { "male","männlich" }, | 1445 | { "male","männlich" }, |
1446 | { "female","weiblich" }, | 1446 | { "female","weiblich" }, |
1447 | { "Hide!","Verbergen!" }, | 1447 | { "Hide!","Verbergen!" }, |
1448 | { "Show!","Anzeigen!" }, | 1448 | { "Show!","Anzeigen!" }, |
1449 | { "Details","Details" }, | 1449 | { "Details","Details" }, |
1450 | { "Profession","Beruf" }, | 1450 | { "Profession","Beruf" }, |
1451 | { "Children","Kinder" }, | 1451 | { "Children","Kinder" }, |
1452 | { "Department","Abteilung" }, | 1452 | { "Department","Abteilung" }, |
1453 | { "Backup cancelled","Backup abgebrochen" }, | 1453 | { "Backup cancelled","Backup abgebrochen" }, |
1454 | { "Backup globally disabled","Backup global abgeschaltet" }, | 1454 | { "Backup globally disabled","Backup global abgeschaltet" }, |
1455 | { "Backup succesfully finished","Backup erfolgreich beendet" }, | 1455 | { "Backup succesfully finished","Backup erfolgreich beendet" }, |
1456 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, | 1456 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, |
1457 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, | 1457 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, |
1458 | { "Birthdays","Geburtstage" }, | 1458 | { "Birthdays","Geburtstage" }, |
1459 | { "KO/Pi import information!","KO/Pi Import Information!" }, | 1459 | { "KO/Pi import information!","KO/Pi Import Information!" }, |
1460 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, | ||
1461 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, | ||
1462 | { "","" }, | ||
1460 | { "","" }, | 1463 | { "","" }, |
1461 | { "","" }, | 1464 | { "","" }, |
1462 | { "","" }, | 1465 | { "","" }, |
1463 | { "","" }, | 1466 | { "","" }, |
1464 | { "","" }, \ No newline at end of file | 1467 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 7349d20..1bfdef9 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1,1548 +1,1590 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qheader.h> | 25 | #include <qheader.h> |
26 | #include <qcursor.h> | 26 | #include <qcursor.h> |
27 | #include <qwhatsthis.h> | 27 | #include <qwhatsthis.h> |
28 | #include <qdialog.h> | 28 | #include <qdialog.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | 31 | ||
32 | #include <qinputdialog.h> | 32 | #include <qinputdialog.h> |
33 | 33 | ||
34 | #include <qvbox.h> | 34 | #include <qvbox.h> |
35 | #include <kdebug.h> | 35 | #include <kdebug.h> |
36 | #include "koprefs.h" | 36 | #include "koprefs.h" |
37 | #include <klocale.h> | 37 | #include <klocale.h> |
38 | #include <kglobal.h> | 38 | #include <kglobal.h> |
39 | #include <kdateedit.h> | 39 | #include <kdateedit.h> |
40 | #include "ktimeedit.h" | 40 | #include "ktimeedit.h" |
41 | #include <kiconloader.h> | 41 | #include <kiconloader.h> |
42 | #include <kmessagebox.h> | 42 | #include <kmessagebox.h> |
43 | 43 | ||
44 | #include <libkcal/icaldrag.h> | 44 | #include <libkcal/icaldrag.h> |
45 | #include <libkcal/vcaldrag.h> | 45 | #include <libkcal/vcaldrag.h> |
46 | #include <libkcal/calfilter.h> | 46 | #include <libkcal/calfilter.h> |
47 | #include <libkcal/dndfactory.h> | 47 | #include <libkcal/dndfactory.h> |
48 | #include <libkcal/calendarresources.h> | 48 | #include <libkcal/calendarresources.h> |
49 | #include <libkcal/resourcecalendar.h> | 49 | #include <libkcal/resourcecalendar.h> |
50 | #include <kresources/resourceselectdialog.h> | 50 | #include <kresources/resourceselectdialog.h> |
51 | #include <libkcal/kincidenceformatter.h> | 51 | #include <libkcal/kincidenceformatter.h> |
52 | #ifndef DESKTOP_VERSION | 52 | #ifndef DESKTOP_VERSION |
53 | #include <qpe/qpeapplication.h> | 53 | #include <qpe/qpeapplication.h> |
54 | #else | 54 | #else |
55 | #include <qapplication.h> | 55 | #include <qapplication.h> |
56 | #endif | 56 | #endif |
57 | #ifndef KORG_NOPRINTER | 57 | #ifndef KORG_NOPRINTER |
58 | #include "calprinter.h" | 58 | #include "calprinter.h" |
59 | #endif | 59 | #endif |
60 | #include "docprefs.h" | 60 | #include "docprefs.h" |
61 | 61 | ||
62 | #include "kotodoview.h" | 62 | #include "kotodoview.h" |
63 | using namespace KOrg; | 63 | using namespace KOrg; |
64 | 64 | ||
65 | 65 | ||
66 | KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *name ) : | ||
67 | QDialog( parent, name, true ) | ||
68 | { | ||
69 | mStopAll = true; | ||
70 | setCaption( i18n("Start todo") ); | ||
71 | QVBoxLayout* lay = new QVBoxLayout( this ); | ||
72 | lay->setSpacing( 3 ); | ||
73 | lay->setMargin( 3 ); | ||
74 | QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this ); | ||
75 | lay->addWidget( lab ); | ||
76 | lab->setAlignment( AlignCenter ); | ||
77 | |||
78 | QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this ); | ||
79 | lay->addWidget( ok ); | ||
80 | ok->setDefault( true ); | ||
81 | QPushButton * start = new QPushButton( i18n("Start todo"), this ); | ||
82 | lay->addWidget( start ); | ||
83 | QPushButton * cancel = new QPushButton( i18n("Cancel - do not start"), this ); | ||
84 | lay->addWidget( cancel ); | ||
85 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | ||
86 | connect ( start,SIGNAL(clicked() ),this , SLOT ( doStop() ) ); | ||
87 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | ||
88 | resize( sizeHint() ); | ||
89 | |||
90 | } | ||
91 | void KOStartTodoPrefs::doStop() | ||
92 | { | ||
93 | mStopAll = false; | ||
94 | accept(); | ||
95 | } | ||
66 | KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name ) : | 96 | KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name ) : |
67 | QDialog( parent, name, true ) | 97 | QDialog( parent, name, true ) |
68 | { | 98 | { |
69 | mTodo = todo; | 99 | mTodo = todo; |
70 | setCaption( i18n("Stop todo") ); | 100 | setCaption( i18n("Stop todo") ); |
71 | QVBoxLayout* lay = new QVBoxLayout( this ); | 101 | QVBoxLayout* lay = new QVBoxLayout( this ); |
72 | lay->setSpacing( 3 ); | 102 | lay->setSpacing( 3 ); |
73 | lay->setMargin( 3 ); | 103 | lay->setMargin( 3 ); |
74 | QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); | 104 | QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); |
75 | lay->addWidget( lab ); | 105 | lay->addWidget( lab ); |
76 | lab->setAlignment( AlignHCenter ); | 106 | lab->setAlignment( AlignHCenter ); |
77 | lab = new QLabel( i18n("Additional Comment:"), this ); | 107 | lab = new QLabel( i18n("Additional Comment:"), this ); |
78 | lay->addWidget( lab ); | 108 | lay->addWidget( lab ); |
79 | mComment = new QLineEdit( this ); | 109 | mComment = new QLineEdit( this ); |
80 | lay->addWidget( mComment ); | 110 | lay->addWidget( mComment ); |
81 | QHBox * start = new QHBox ( this ); | 111 | QHBox * start = new QHBox ( this ); |
82 | lay->addWidget( start ); | 112 | lay->addWidget( start ); |
83 | lab = new QLabel( i18n("Start:"), start ); | 113 | lab = new QLabel( i18n("Start:"), start ); |
84 | QHBox * end = new QHBox ( this ); | 114 | QHBox * end = new QHBox ( this ); |
85 | lay->addWidget( end ); | 115 | lay->addWidget( end ); |
86 | lab = new QLabel( i18n("End:"), end ); | 116 | lab = new QLabel( i18n("End:"), end ); |
87 | sde = new KDateEdit( start ); | 117 | sde = new KDateEdit( start ); |
88 | ste = new KOTimeEdit( start ); | 118 | ste = new KOTimeEdit( start ); |
89 | connect ( sde,SIGNAL(setTimeTo( QTime ) ),ste , SLOT ( setTime(QTime ) ) ); | 119 | connect ( sde,SIGNAL(setTimeTo( QTime ) ),ste , SLOT ( setTime(QTime ) ) ); |
90 | ede = new KDateEdit( end ); | 120 | ede = new KDateEdit( end ); |
91 | ete = new KOTimeEdit(end ); | 121 | ete = new KOTimeEdit(end ); |
92 | connect ( ede,SIGNAL(setTimeTo( QTime ) ),ete , SLOT ( setTime(QTime ) ) ); | 122 | connect ( ede,SIGNAL(setTimeTo( QTime ) ),ete , SLOT ( setTime(QTime ) ) ); |
93 | sde->setDate( mTodo->runStart().date() ); | 123 | sde->setDate( mTodo->runStart().date() ); |
94 | ste->setTime( mTodo->runStart().time() ); | 124 | ste->setTime( mTodo->runStart().time() ); |
95 | ede->setDate( QDate::currentDate()); | 125 | ede->setDate( QDate::currentDate()); |
96 | ete->setTime( QTime::currentTime() ); | 126 | ete->setTime( QTime::currentTime() ); |
97 | QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); | 127 | QPushButton * ok = new QPushButton( i18n("Stop and save"), this ); |
98 | lay->addWidget( ok ); | 128 | lay->addWidget( ok ); |
99 | ok->setDefault( true ); | 129 | ok->setDefault( true ); |
100 | QPushButton * cancel = new QPushButton( i18n("Continue running"), this ); | 130 | QPushButton * cancel = new QPushButton( i18n("Continue running"), this ); |
101 | lay->addWidget( cancel ); | 131 | lay->addWidget( cancel ); |
102 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 132 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
103 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 133 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
104 | ok = new QPushButton( i18n("Stop - do not save"), this ); | 134 | ok = new QPushButton( i18n("Stop - do not save"), this ); |
105 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( doNotSave() ) ); | 135 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( doNotSave() ) ); |
106 | lay->addWidget( ok ); | 136 | lay->addWidget( ok ); |
107 | if (QApplication::desktop()->width() < 320 ) | 137 | if (QApplication::desktop()->width() < 320 ) |
108 | resize( 240, sizeHint().height() ); | 138 | resize( 240, sizeHint().height() ); |
109 | else | 139 | else |
110 | resize( 320, sizeHint().height() ); | 140 | resize( 320, sizeHint().height() ); |
111 | 141 | ||
112 | } | 142 | } |
113 | 143 | ||
114 | void KOStopTodoPrefs::accept() | 144 | void KOStopTodoPrefs::accept() |
115 | { | 145 | { |
116 | QDateTime start = QDateTime( sde->date(), ste->getTime() ); | 146 | QDateTime start = QDateTime( sde->date(), ste->getTime() ); |
117 | QDateTime stop = QDateTime( ede->date(), ete->getTime() ); | 147 | QDateTime stop = QDateTime( ede->date(), ete->getTime() ); |
118 | if ( start > stop ) { | 148 | if ( start > stop ) { |
119 | KMessageBox::sorry(this, | 149 | KMessageBox::sorry(this, |
120 | i18n("The start time is\nafter the end time!"), | 150 | i18n("The start time is\nafter the end time!"), |
121 | i18n("Time mismatch!")); | 151 | i18n("Time mismatch!")); |
122 | return; | 152 | return; |
123 | } | 153 | } |
124 | mTodo->saveRunningInfo( mComment->text(), start, stop ); | 154 | mTodo->saveRunningInfo( mComment->text(), start, stop ); |
125 | QDialog::accept(); | 155 | QDialog::accept(); |
126 | } | 156 | } |
127 | void KOStopTodoPrefs::doNotSave() | 157 | void KOStopTodoPrefs::doNotSave() |
128 | { | 158 | { |
129 | int result = KMessageBox::warningContinueCancel(this, | 159 | int result = KMessageBox::warningContinueCancel(this, |
130 | i18n("Do you really want to set\nthe state to stopped\nwithout saving the data?"),mTodo->summary(),i18n("Yes, stop todo") ); | 160 | i18n("Do you really want to set\nthe state to stopped\nwithout saving the data?"),mTodo->summary(),i18n("Yes, stop todo") ); |
131 | if (result != KMessageBox::Continue) return; | 161 | if (result != KMessageBox::Continue) return; |
132 | mTodo->stopRunning(); | 162 | mTodo->stopRunning(); |
133 | QDialog::accept(); | 163 | QDialog::accept(); |
134 | } | 164 | } |
135 | 165 | ||
136 | 166 | ||
137 | class KOTodoViewWhatsThis :public QWhatsThis | 167 | class KOTodoViewWhatsThis :public QWhatsThis |
138 | { | 168 | { |
139 | public: | 169 | public: |
140 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 170 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; |
141 | 171 | ||
142 | protected: | 172 | protected: |
143 | virtual QString text( const QPoint& p) | 173 | virtual QString text( const QPoint& p) |
144 | { | 174 | { |
145 | return _view->getWhatsThisText(p) ; | 175 | return _view->getWhatsThisText(p) ; |
146 | } | 176 | } |
147 | private: | 177 | private: |
148 | QWidget* _wid; | 178 | QWidget* _wid; |
149 | KOTodoView * _view; | 179 | KOTodoView * _view; |
150 | }; | 180 | }; |
151 | 181 | ||
152 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, | 182 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, |
153 | const char *name) : | 183 | const char *name) : |
154 | KListView(parent,name) | 184 | KListView(parent,name) |
155 | { | 185 | { |
156 | mName = QString ( name ); | 186 | mName = QString ( name ); |
157 | mCalendar = calendar; | 187 | mCalendar = calendar; |
158 | #ifndef DESKTOP_VERSION | 188 | #ifndef DESKTOP_VERSION |
159 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 189 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
160 | #endif | 190 | #endif |
161 | mOldCurrent = 0; | 191 | mOldCurrent = 0; |
162 | mMousePressed = false; | 192 | mMousePressed = false; |
163 | 193 | ||
164 | setAcceptDrops(true); | 194 | setAcceptDrops(true); |
165 | viewport()->setAcceptDrops(true); | 195 | viewport()->setAcceptDrops(true); |
166 | int size = 16; | 196 | int size = 16; |
167 | if (qApp->desktop()->width() < 300 ) | 197 | if (qApp->desktop()->width() < 300 ) |
168 | size = 12; | 198 | size = 12; |
169 | setTreeStepSize( size + 6 ); | 199 | setTreeStepSize( size + 6 ); |
170 | 200 | ||
171 | } | 201 | } |
172 | 202 | ||
173 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) | 203 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) |
174 | { | 204 | { |
175 | #ifndef KORG_NODND | 205 | #ifndef KORG_NODND |
176 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; | 206 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; |
177 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 207 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
178 | !QTextDrag::canDecode( e ) ) { | 208 | !QTextDrag::canDecode( e ) ) { |
179 | e->ignore(); | 209 | e->ignore(); |
180 | return; | 210 | return; |
181 | } | 211 | } |
182 | 212 | ||
183 | mOldCurrent = currentItem(); | 213 | mOldCurrent = currentItem(); |
184 | #endif | 214 | #endif |
185 | } | 215 | } |
186 | 216 | ||
187 | 217 | ||
188 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) | 218 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) |
189 | { | 219 | { |
190 | #ifndef KORG_NODND | 220 | #ifndef KORG_NODND |
191 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; | 221 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; |
192 | 222 | ||
193 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 223 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
194 | !QTextDrag::canDecode( e ) ) { | 224 | !QTextDrag::canDecode( e ) ) { |
195 | e->ignore(); | 225 | e->ignore(); |
196 | return; | 226 | return; |
197 | } | 227 | } |
198 | 228 | ||
199 | e->accept(); | 229 | e->accept(); |
200 | #endif | 230 | #endif |
201 | } | 231 | } |
202 | 232 | ||
203 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) | 233 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) |
204 | { | 234 | { |
205 | #ifndef KORG_NODND | 235 | #ifndef KORG_NODND |
206 | // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; | 236 | // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; |
207 | 237 | ||
208 | setCurrentItem(mOldCurrent); | 238 | setCurrentItem(mOldCurrent); |
209 | setSelected(mOldCurrent,true); | 239 | setSelected(mOldCurrent,true); |
210 | #endif | 240 | #endif |
211 | } | 241 | } |
212 | 242 | ||
213 | void KOTodoListView::contentsDropEvent(QDropEvent *e) | 243 | void KOTodoListView::contentsDropEvent(QDropEvent *e) |
214 | { | 244 | { |
215 | #ifndef KORG_NODND | 245 | #ifndef KORG_NODND |
216 | // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; | 246 | // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; |
217 | 247 | ||
218 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 248 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
219 | !QTextDrag::canDecode( e ) ) { | 249 | !QTextDrag::canDecode( e ) ) { |
220 | e->ignore(); | 250 | e->ignore(); |
221 | return; | 251 | return; |
222 | } | 252 | } |
223 | 253 | ||
224 | DndFactory factory( mCalendar ); | 254 | DndFactory factory( mCalendar ); |
225 | Todo *todo = factory.createDropTodo(e); | 255 | Todo *todo = factory.createDropTodo(e); |
226 | 256 | ||
227 | if (todo) { | 257 | if (todo) { |
228 | e->acceptAction(); | 258 | e->acceptAction(); |
229 | 259 | ||
230 | KOTodoViewItem *destination = | 260 | KOTodoViewItem *destination = |
231 | (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); | 261 | (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); |
232 | Todo *destinationEvent = 0; | 262 | Todo *destinationEvent = 0; |
233 | if (destination) destinationEvent = destination->todo(); | 263 | if (destination) destinationEvent = destination->todo(); |
234 | 264 | ||
235 | Todo *existingTodo = mCalendar->todo(todo->uid()); | 265 | Todo *existingTodo = mCalendar->todo(todo->uid()); |
236 | 266 | ||
237 | if(existingTodo) { | 267 | if(existingTodo) { |
238 | Incidence *to = destinationEvent; | 268 | Incidence *to = destinationEvent; |
239 | while(to) { | 269 | while(to) { |
240 | if (to->uid() == todo->uid()) { | 270 | if (to->uid() == todo->uid()) { |
241 | KMessageBox::sorry(this, | 271 | KMessageBox::sorry(this, |
242 | i18n("Cannot move Todo to itself\nor a child of itself"), | 272 | i18n("Cannot move Todo to itself\nor a child of itself"), |
243 | i18n("Drop Todo")); | 273 | i18n("Drop Todo")); |
244 | delete todo; | 274 | delete todo; |
245 | return; | 275 | return; |
246 | } | 276 | } |
247 | to = to->relatedTo(); | 277 | to = to->relatedTo(); |
248 | } | 278 | } |
249 | internalDrop = true; | 279 | internalDrop = true; |
250 | if ( destinationEvent ) | 280 | if ( destinationEvent ) |
251 | reparentTodoSignal( destinationEvent, existingTodo ); | 281 | reparentTodoSignal( destinationEvent, existingTodo ); |
252 | else | 282 | else |
253 | unparentTodoSignal(existingTodo); | 283 | unparentTodoSignal(existingTodo); |
254 | delete todo; | 284 | delete todo; |
255 | } else { | 285 | } else { |
256 | mCalendar->addTodo(todo); | 286 | mCalendar->addTodo(todo); |
257 | emit todoDropped(todo, KOGlobals::EVENTADDED); | 287 | emit todoDropped(todo, KOGlobals::EVENTADDED); |
258 | if ( destinationEvent ) | 288 | if ( destinationEvent ) |
259 | reparentTodoSignal( destinationEvent, todo ); | 289 | reparentTodoSignal( destinationEvent, todo ); |
260 | } | 290 | } |
261 | } | 291 | } |
262 | else { | 292 | else { |
263 | QString text; | 293 | QString text; |
264 | if (QTextDrag::decode(e,text)) { | 294 | if (QTextDrag::decode(e,text)) { |
265 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); | 295 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); |
266 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); | 296 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); |
267 | qDebug("Dropped : " + text); | 297 | qDebug("Dropped : " + text); |
268 | QStringList emails = QStringList::split(",",text); | 298 | QStringList emails = QStringList::split(",",text); |
269 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { | 299 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { |
270 | int pos = (*it).find("<"); | 300 | int pos = (*it).find("<"); |
271 | QString name = (*it).left(pos); | 301 | QString name = (*it).left(pos); |
272 | QString email = (*it).mid(pos); | 302 | QString email = (*it).mid(pos); |
273 | if (!email.isEmpty() && todoi) { | 303 | if (!email.isEmpty() && todoi) { |
274 | todoi->todo()->addAttendee(new Attendee(name,email)); | 304 | todoi->todo()->addAttendee(new Attendee(name,email)); |
275 | } | 305 | } |
276 | } | 306 | } |
277 | } | 307 | } |
278 | else { | 308 | else { |
279 | qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); | 309 | qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); |
280 | e->ignore(); | 310 | e->ignore(); |
281 | } | 311 | } |
282 | } | 312 | } |
283 | #endif | 313 | #endif |
284 | } | 314 | } |
285 | void KOTodoListView::wheelEvent (QWheelEvent *e) | 315 | void KOTodoListView::wheelEvent (QWheelEvent *e) |
286 | { | 316 | { |
287 | QListView::wheelEvent (e); | 317 | QListView::wheelEvent (e); |
288 | } | 318 | } |
289 | 319 | ||
290 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | 320 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) |
291 | { | 321 | { |
292 | 322 | ||
293 | QPoint p(contentsToViewport(e->pos())); | 323 | QPoint p(contentsToViewport(e->pos())); |
294 | QListViewItem *i = itemAt(p); | 324 | QListViewItem *i = itemAt(p); |
295 | bool rootClicked = true; | 325 | bool rootClicked = true; |
296 | if (i) { | 326 | if (i) { |
297 | // if the user clicked into the root decoration of the item, don't | 327 | // if the user clicked into the root decoration of the item, don't |
298 | // try to start a drag! | 328 | // try to start a drag! |
299 | int X = p.x(); | 329 | int X = p.x(); |
300 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); | 330 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); |
301 | if (X > header()->sectionPos(0) + | 331 | if (X > header()->sectionPos(0) + |
302 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + | 332 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + |
303 | itemMargin() +i->height()|| | 333 | itemMargin() +i->height()|| |
304 | X < header()->sectionPos(0)) { | 334 | X < header()->sectionPos(0)) { |
305 | rootClicked = false; | 335 | rootClicked = false; |
306 | } | 336 | } |
307 | } else { | 337 | } else { |
308 | rootClicked = false; | 338 | rootClicked = false; |
309 | } | 339 | } |
310 | #ifndef KORG_NODND | 340 | #ifndef KORG_NODND |
311 | mMousePressed = false; | 341 | mMousePressed = false; |
312 | if (! rootClicked && !( e->button() == RightButton) ) { | 342 | if (! rootClicked && !( e->button() == RightButton) ) { |
313 | mPressPos = e->pos(); | 343 | mPressPos = e->pos(); |
314 | mMousePressed = true; | 344 | mMousePressed = true; |
315 | } else { | 345 | } else { |
316 | mMousePressed = false; | 346 | mMousePressed = false; |
317 | } | 347 | } |
318 | #endif | 348 | #endif |
319 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); | 349 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); |
320 | #ifndef DESKTOP_VERSION | 350 | #ifndef DESKTOP_VERSION |
321 | if (!( e->button() == RightButton && rootClicked) ) | 351 | if (!( e->button() == RightButton && rootClicked) ) |
322 | QListView::contentsMousePressEvent(e); | 352 | QListView::contentsMousePressEvent(e); |
323 | #else | 353 | #else |
324 | QListView::contentsMousePressEvent(e); | 354 | QListView::contentsMousePressEvent(e); |
325 | #endif | 355 | #endif |
326 | } | 356 | } |
327 | void KOTodoListView::paintEvent(QPaintEvent* e) | 357 | void KOTodoListView::paintEvent(QPaintEvent* e) |
328 | { | 358 | { |
329 | emit paintNeeded(); | 359 | emit paintNeeded(); |
330 | QListView::paintEvent( e); | 360 | QListView::paintEvent( e); |
331 | } | 361 | } |
332 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | 362 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) |
333 | { | 363 | { |
334 | 364 | ||
335 | #ifndef KORG_NODND | 365 | #ifndef KORG_NODND |
336 | //QListView::contentsMouseMoveEvent(e); | 366 | //QListView::contentsMouseMoveEvent(e); |
337 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > | 367 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > |
338 | QApplication::startDragDistance()*3) { | 368 | QApplication::startDragDistance()*3) { |
339 | mMousePressed = false; | 369 | mMousePressed = false; |
340 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); | 370 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); |
341 | if (item) { | 371 | if (item) { |
342 | DndFactory factory( mCalendar ); | 372 | DndFactory factory( mCalendar ); |
343 | ICalDrag *vd = factory.createDrag( | 373 | ICalDrag *vd = factory.createDrag( |
344 | ((KOTodoViewItem *)item)->todo(),viewport()); | 374 | ((KOTodoViewItem *)item)->todo(),viewport()); |
345 | internalDrop = false; | 375 | internalDrop = false; |
346 | // we cannot do any senseful here, because the DnD is still broken in Qt | 376 | // we cannot do any senseful here, because the DnD is still broken in Qt |
347 | if (vd->drag()) { | 377 | if (vd->drag()) { |
348 | if ( !internalDrop ) { | 378 | if ( !internalDrop ) { |
349 | //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); | 379 | //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); |
350 | qDebug("Dnd: External move: Delete drag source "); | 380 | qDebug("Dnd: External move: Delete drag source "); |
351 | } else | 381 | } else |
352 | qDebug("Dnd: Internal move "); | 382 | qDebug("Dnd: Internal move "); |
353 | 383 | ||
354 | } else { | 384 | } else { |
355 | if ( !internalDrop ) { | 385 | if ( !internalDrop ) { |
356 | qDebug("Dnd: External Copy"); | 386 | qDebug("Dnd: External Copy"); |
357 | } else | 387 | } else |
358 | qDebug("DnD: Internal copy: Copy pending"); | 388 | qDebug("DnD: Internal copy: Copy pending"); |
359 | } | 389 | } |
360 | } | 390 | } |
361 | } | 391 | } |
362 | #endif | 392 | #endif |
363 | } | 393 | } |
364 | void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) | 394 | void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) |
365 | { | 395 | { |
366 | if ( !e->isAutoRepeat() ) { | 396 | if ( !e->isAutoRepeat() ) { |
367 | mFlagKeyPressed = false; | 397 | mFlagKeyPressed = false; |
368 | } | 398 | } |
369 | } | 399 | } |
370 | 400 | ||
371 | 401 | ||
372 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | 402 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) |
373 | { | 403 | { |
374 | qApp->processEvents(); | 404 | qApp->processEvents(); |
375 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 405 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
376 | e->ignore(); | 406 | e->ignore(); |
377 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 407 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
378 | return; | 408 | return; |
379 | } | 409 | } |
380 | if (! e->isAutoRepeat() ) | 410 | if (! e->isAutoRepeat() ) |
381 | mFlagKeyPressed = true; | 411 | mFlagKeyPressed = true; |
382 | QListViewItem* cn; | 412 | QListViewItem* cn; |
383 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { | 413 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { |
384 | cn = currentItem(); | 414 | cn = currentItem(); |
385 | if ( cn ) { | 415 | if ( cn ) { |
386 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 416 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
387 | if ( ci ){ | 417 | if ( ci ){ |
388 | if ( e->state() == ShiftButton ) | 418 | if ( e->state() == ShiftButton ) |
389 | ci->setOn( false ); | 419 | ci->setOn( false ); |
390 | else | 420 | else |
391 | ci->setOn( true ); | 421 | ci->setOn( true ); |
392 | cn = cn->itemBelow(); | 422 | cn = cn->itemBelow(); |
393 | if ( cn ) { | 423 | if ( cn ) { |
394 | setCurrentItem ( cn ); | 424 | setCurrentItem ( cn ); |
395 | ensureItemVisible ( cn ); | 425 | ensureItemVisible ( cn ); |
396 | } | 426 | } |
397 | 427 | ||
398 | } | 428 | } |
399 | } | 429 | } |
400 | 430 | ||
401 | return; | 431 | return; |
402 | } | 432 | } |
403 | 433 | ||
404 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { | 434 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { |
405 | switch ( e->key() ) { | 435 | switch ( e->key() ) { |
406 | case Qt::Key_Down: | 436 | case Qt::Key_Down: |
407 | case Qt::Key_Up: | 437 | case Qt::Key_Up: |
408 | QListView::keyPressEvent ( e ); | 438 | QListView::keyPressEvent ( e ); |
409 | break; | 439 | break; |
410 | case Qt::Key_Left: | 440 | case Qt::Key_Left: |
411 | case Qt::Key_Right: | 441 | case Qt::Key_Right: |
412 | QListView::keyPressEvent ( e ); | 442 | QListView::keyPressEvent ( e ); |
413 | e->accept(); | 443 | e->accept(); |
414 | return; | 444 | return; |
415 | break; | 445 | break; |
416 | default: | 446 | default: |
417 | e->ignore(); | 447 | e->ignore(); |
418 | break; | 448 | break; |
419 | } | 449 | } |
420 | return; | 450 | return; |
421 | } | 451 | } |
422 | e->ignore(); | 452 | e->ignore(); |
423 | } | 453 | } |
424 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) | 454 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) |
425 | { | 455 | { |
426 | QListView::contentsMouseReleaseEvent(e); | 456 | QListView::contentsMouseReleaseEvent(e); |
427 | mMousePressed = false; | 457 | mMousePressed = false; |
428 | } | 458 | } |
429 | 459 | ||
430 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 460 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
431 | { | 461 | { |
432 | if (!e) return; | 462 | if (!e) return; |
433 | 463 | ||
434 | QPoint vp = contentsToViewport(e->pos()); | 464 | QPoint vp = contentsToViewport(e->pos()); |
435 | 465 | ||
436 | QListViewItem *item = itemAt(vp); | 466 | QListViewItem *item = itemAt(vp); |
437 | 467 | ||
438 | emit double_Clicked(item); | 468 | emit double_Clicked(item); |
439 | if (!item) return; | 469 | if (!item) return; |
440 | 470 | ||
441 | emit doubleClicked(item,vp,0); | 471 | emit doubleClicked(item,vp,0); |
442 | } | 472 | } |
443 | 473 | ||
444 | ///////////////////////////////////////////////////////////////////////////// | 474 | ///////////////////////////////////////////////////////////////////////////// |
445 | 475 | ||
446 | KOQuickTodo::KOQuickTodo(QWidget *parent) : | 476 | KOQuickTodo::KOQuickTodo(QWidget *parent) : |
447 | QLineEdit(parent) | 477 | QLineEdit(parent) |
448 | { | 478 | { |
449 | setText(i18n("Click to add a new Todo")); | 479 | setText(i18n("Click to add a new Todo")); |
450 | } | 480 | } |
451 | 481 | ||
452 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) | 482 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) |
453 | { | 483 | { |
454 | if ( text()==i18n("Click to add a new Todo") ) | 484 | if ( text()==i18n("Click to add a new Todo") ) |
455 | setText(""); | 485 | setText(""); |
456 | QLineEdit::focusInEvent(ev); | 486 | QLineEdit::focusInEvent(ev); |
457 | } | 487 | } |
458 | 488 | ||
459 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | 489 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) |
460 | { | 490 | { |
461 | setText(i18n("Click to add a new Todo")); | 491 | setText(i18n("Click to add a new Todo")); |
462 | QLineEdit::focusOutEvent(ev); | 492 | QLineEdit::focusOutEvent(ev); |
463 | } | 493 | } |
464 | 494 | ||
465 | ///////////////////////////////////////////////////////////////////////////// | 495 | ///////////////////////////////////////////////////////////////////////////// |
466 | 496 | ||
467 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 497 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
468 | KOrg::BaseView(calendar,parent,name) | 498 | KOrg::BaseView(calendar,parent,name) |
469 | { | 499 | { |
470 | mPendingUpdateBeforeRepaint = false; | 500 | mPendingUpdateBeforeRepaint = false; |
471 | isFlatDisplay = false; | 501 | isFlatDisplay = false; |
472 | mNavigator = 0; | 502 | mNavigator = 0; |
473 | QBoxLayout *topLayout = new QVBoxLayout(this); | 503 | QBoxLayout *topLayout = new QVBoxLayout(this); |
474 | mName = QString ( name ); | 504 | mName = QString ( name ); |
475 | mBlockUpdate = false; | 505 | mBlockUpdate = false; |
476 | mQuickAdd = new KOQuickTodo(this); | 506 | mQuickAdd = new KOQuickTodo(this); |
477 | topLayout->addWidget(mQuickAdd); | 507 | topLayout->addWidget(mQuickAdd); |
478 | 508 | ||
479 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); | 509 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); |
480 | 510 | ||
481 | mTodoListView = new KOTodoListView(calendar,this, name ); | 511 | mTodoListView = new KOTodoListView(calendar,this, name ); |
482 | topLayout->addWidget(mTodoListView); | 512 | topLayout->addWidget(mTodoListView); |
483 | //mTodoListView->header()->setMaximumHeight(30); | 513 | //mTodoListView->header()->setMaximumHeight(30); |
484 | mTodoListView->setRootIsDecorated(true); | 514 | mTodoListView->setRootIsDecorated(true); |
485 | mTodoListView->setAllColumnsShowFocus(true); | 515 | mTodoListView->setAllColumnsShowFocus(true); |
486 | 516 | ||
487 | mTodoListView->setShowSortIndicator(true); | 517 | mTodoListView->setShowSortIndicator(true); |
488 | 518 | ||
489 | mTodoListView->addColumn(i18n("Todo")); | 519 | mTodoListView->addColumn(i18n("Todo")); |
490 | mTodoListView->addColumn(i18n("Prio")); | 520 | mTodoListView->addColumn(i18n("Prio")); |
491 | mTodoListView->setColumnAlignment(1,AlignHCenter); | 521 | mTodoListView->setColumnAlignment(1,AlignHCenter); |
492 | mTodoListView->addColumn(i18n("Complete")); | 522 | mTodoListView->addColumn(i18n("Complete")); |
493 | mTodoListView->setColumnAlignment(2,AlignCenter); | 523 | mTodoListView->setColumnAlignment(2,AlignCenter); |
494 | 524 | ||
495 | mTodoListView->addColumn(i18n("Due Date")); | 525 | mTodoListView->addColumn(i18n("Due Date")); |
496 | mTodoListView->setColumnAlignment(3,AlignLeft); | 526 | mTodoListView->setColumnAlignment(3,AlignLeft); |
497 | mTodoListView->addColumn(i18n("Due Time")); | 527 | mTodoListView->addColumn(i18n("Due Time")); |
498 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 528 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
499 | 529 | ||
500 | mTodoListView->addColumn(i18n("Start Date")); | 530 | mTodoListView->addColumn(i18n("Start Date")); |
501 | mTodoListView->setColumnAlignment(5,AlignLeft); | 531 | mTodoListView->setColumnAlignment(5,AlignLeft); |
502 | mTodoListView->addColumn(i18n("Start Time")); | 532 | mTodoListView->addColumn(i18n("Start Time")); |
503 | mTodoListView->setColumnAlignment(6,AlignHCenter); | 533 | mTodoListView->setColumnAlignment(6,AlignHCenter); |
504 | 534 | ||
505 | mTodoListView->addColumn(i18n("Cancelled")); | 535 | mTodoListView->addColumn(i18n("Cancelled")); |
506 | mTodoListView->addColumn(i18n("Categories")); | 536 | mTodoListView->addColumn(i18n("Categories")); |
507 | mTodoListView->addColumn(i18n("Calendar")); | 537 | mTodoListView->addColumn(i18n("Calendar")); |
508 | #if 0 | 538 | #if 0 |
509 | mTodoListView->addColumn(i18n("Sort Id")); | 539 | mTodoListView->addColumn(i18n("Sort Id")); |
510 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 540 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
511 | #endif | 541 | #endif |
512 | 542 | ||
513 | mTodoListView->setMinimumHeight( 60 ); | 543 | mTodoListView->setMinimumHeight( 60 ); |
514 | mTodoListView->setItemsRenameable( true ); | 544 | mTodoListView->setItemsRenameable( true ); |
515 | mTodoListView->setRenameable( 0 ); | 545 | mTodoListView->setRenameable( 0 ); |
516 | mTodoListView->setColumnWidth( 0, 120 ); | 546 | mTodoListView->setColumnWidth( 0, 120 ); |
517 | int iii = 0; | 547 | int iii = 0; |
518 | for ( iii = 0; iii< 10 ; ++iii ) | 548 | for ( iii = 0; iii< 10 ; ++iii ) |
519 | mTodoListView->setColumnWidthMode( iii, QListView::Manual ); | 549 | mTodoListView->setColumnWidthMode( iii, QListView::Manual ); |
520 | 550 | ||
521 | 551 | ||
522 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); | 552 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); |
523 | 553 | ||
524 | mPriorityPopupMenu = new QPopupMenu(this); | 554 | mPriorityPopupMenu = new QPopupMenu(this); |
525 | for (int i = 1; i <= 5; i++) { | 555 | for (int i = 1; i <= 5; i++) { |
526 | QString label = QString ("%1").arg (i); | 556 | QString label = QString ("%1").arg (i); |
527 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; | 557 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; |
528 | } | 558 | } |
529 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); | 559 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); |
530 | 560 | ||
531 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 561 | mPercentageCompletedPopupMenu = new QPopupMenu(this); |
532 | for (int i = 0; i <= 100; i+=20) { | 562 | for (int i = 0; i <= 100; i+=20) { |
533 | QString label = QString ("%1 %").arg (i); | 563 | QString label = QString ("%1 %").arg (i); |
534 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; | 564 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; |
535 | } | 565 | } |
536 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); | 566 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); |
537 | 567 | ||
538 | 568 | ||
539 | 569 | ||
540 | mItemPopupMenu = new QPopupMenu(this); | 570 | mItemPopupMenu = new QPopupMenu(this); |
541 | mItemPopupMenu->insertItem(i18n("Show..."), this, | 571 | mItemPopupMenu->insertItem(i18n("Show..."), this, |
542 | SLOT (showTodo())); | 572 | SLOT (showTodo())); |
543 | mItemPopupMenu->insertItem(i18n("Edit..."), this, | 573 | mItemPopupMenu->insertItem(i18n("Edit..."), this, |
544 | SLOT (editTodo())); | 574 | SLOT (editTodo())); |
545 | mItemPopupMenu->insertItem( i18n("Delete"), this, | 575 | mItemPopupMenu->insertItem( i18n("Delete"), this, |
546 | SLOT (deleteTodo())); | 576 | SLOT (deleteTodo())); |
547 | mItemPopupMenu->insertItem( i18n("Clone..."), this, | 577 | mItemPopupMenu->insertItem( i18n("Clone..."), this, |
548 | SLOT (cloneTodo())); | 578 | SLOT (cloneTodo())); |
549 | mItemPopupMenu->insertItem( i18n("Move..."), this, | 579 | mItemPopupMenu->insertItem( i18n("Move..."), this, |
550 | SLOT (moveTodo())); | 580 | SLOT (moveTodo())); |
551 | #ifndef DESKTOP_VERSION | 581 | #ifndef DESKTOP_VERSION |
552 | mItemPopupMenu->insertItem( i18n("Beam..."), this, | 582 | mItemPopupMenu->insertItem( i18n("Beam..."), this, |
553 | SLOT (beamTodo())); | 583 | SLOT (beamTodo())); |
554 | #endif | 584 | #endif |
555 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, | 585 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, |
556 | SLOT (cancelTodo())); | 586 | SLOT (cancelTodo())); |
557 | mItemPopupMenu->insertSeparator(); | 587 | mItemPopupMenu->insertSeparator(); |
558 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, | 588 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, |
559 | SLOT (toggleRunningItem())); | 589 | SLOT (toggleRunningItem())); |
560 | mItemPopupMenu->insertSeparator(); | 590 | mItemPopupMenu->insertSeparator(); |
561 | /* | 591 | /* |
562 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, | 592 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, |
563 | SLOT (newTodo())); | 593 | SLOT (newTodo())); |
564 | */ | 594 | */ |
565 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, | 595 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, |
566 | SLOT (newSubTodo())); | 596 | SLOT (newSubTodo())); |
567 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, | 597 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, |
568 | SLOT (unparentTodo()),0,21); | 598 | SLOT (unparentTodo()),0,21); |
569 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, | 599 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, |
570 | SLOT (reparentTodo()),0,22); | 600 | SLOT (reparentTodo()),0,22); |
571 | mItemPopupMenu->insertSeparator(); | 601 | mItemPopupMenu->insertSeparator(); |
572 | #if 0 | 602 | #if 0 |
573 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), | 603 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), |
574 | this, SLOT( purgeCompleted() ) ); | 604 | this, SLOT( purgeCompleted() ) ); |
575 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), | 605 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), |
576 | this, SLOT( toggleCompleted() ),0, 33 ); | 606 | this, SLOT( toggleCompleted() ),0, 33 ); |
577 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 607 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
578 | this, SLOT( toggleQuickTodo() ),0, 34 ); | 608 | this, SLOT( toggleQuickTodo() ),0, 34 ); |
579 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 609 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
580 | this, SLOT( toggleRunning() ),0, 35 ); | 610 | this, SLOT( toggleRunning() ),0, 35 ); |
581 | 611 | ||
582 | #endif | 612 | #endif |
583 | mPopupMenu = new QPopupMenu(this); | 613 | mPopupMenu = new QPopupMenu(this); |
584 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, | 614 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, |
585 | SLOT (newTodo()),0,1); | 615 | SLOT (newTodo()),0,1); |
586 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), | 616 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), |
587 | this, SLOT(purgeCompleted()),0,2); | 617 | this, SLOT(purgeCompleted()),0,2); |
588 | mPopupMenu->insertItem(i18n("Show Completed"), | 618 | mPopupMenu->insertItem(i18n("Show Completed"), |
589 | this, SLOT( toggleCompleted() ),0,3 ); | 619 | this, SLOT( toggleCompleted() ),0,3 ); |
590 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 620 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
591 | this, SLOT( toggleRunning() ),0,5 ); | 621 | this, SLOT( toggleRunning() ),0,5 ); |
592 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), | 622 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), |
593 | this, SLOT( setAllOpen() ),0,6 ); | 623 | this, SLOT( setAllOpen() ),0,6 ); |
594 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), | 624 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), |
595 | this, SLOT( setAllClose() ),0,7 ); | 625 | this, SLOT( setAllClose() ),0,7 ); |
596 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), | 626 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), |
597 | this, SLOT( setAllFlat() ),0,8 ); | 627 | this, SLOT( setAllFlat() ),0,8 ); |
598 | mPopupMenu->insertSeparator(); | 628 | mPopupMenu->insertSeparator(); |
599 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 629 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
600 | this, SLOT( toggleQuickTodo() ),0,4 ); | 630 | this, SLOT( toggleQuickTodo() ),0,4 ); |
601 | mDocPrefs = new DocPrefs( name ); | 631 | mDocPrefs = new DocPrefs( name ); |
602 | 632 | ||
603 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); | 633 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); |
604 | mPopupMenu->setCheckable( true ); | 634 | mPopupMenu->setCheckable( true ); |
605 | mItemPopupMenu->setCheckable( true ); | 635 | mItemPopupMenu->setCheckable( true ); |
606 | 636 | ||
607 | 637 | ||
608 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 638 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
609 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 639 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
610 | 640 | ||
611 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 641 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
612 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 642 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
613 | 643 | ||
614 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 644 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
615 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 645 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
616 | 646 | ||
617 | 647 | ||
618 | // Double clicking conflicts with opening/closing the subtree | 648 | // Double clicking conflicts with opening/closing the subtree |
619 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), | 649 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), |
620 | SLOT( editItem( QListViewItem *) ) ); | 650 | SLOT( editItem( QListViewItem *) ) ); |
621 | /* | 651 | /* |
622 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, | 652 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, |
623 | const QPoint &,int ) ), | 653 | const QPoint &,int ) ), |
624 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 654 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
625 | */ | 655 | */ |
626 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, | 656 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, |
627 | const QPoint &,int ) ), | 657 | const QPoint &,int ) ), |
628 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 658 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
629 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), | 659 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), |
630 | SLOT( itemClicked( QListViewItem * ) ) ); | 660 | SLOT( itemClicked( QListViewItem * ) ) ); |
631 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), | 661 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), |
632 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); | 662 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); |
633 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 663 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
634 | SLOT( updateView() ) ); | 664 | SLOT( updateView() ) ); |
635 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 665 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
636 | SLOT( todoModified(Todo *, int) ) ); | 666 | SLOT( todoModified(Todo *, int) ) ); |
637 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), | 667 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), |
638 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 668 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
639 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), | 669 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), |
640 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 670 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
641 | connect( mTodoListView, SIGNAL( paintNeeded() ), | 671 | connect( mTodoListView, SIGNAL( paintNeeded() ), |
642 | SLOT( paintNeeded()) ); | 672 | SLOT( paintNeeded()) ); |
643 | 673 | ||
644 | #if 0 | 674 | #if 0 |
645 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), | 675 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), |
646 | SLOT(selectionChanged(QListViewItem *))); | 676 | SLOT(selectionChanged(QListViewItem *))); |
647 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), | 677 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), |
648 | SLOT(selectionChanged(QListViewItem *))); | 678 | SLOT(selectionChanged(QListViewItem *))); |
649 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), | 679 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), |
650 | SLOT(selectionChanged(QListViewItem *))); | 680 | SLOT(selectionChanged(QListViewItem *))); |
651 | #endif | 681 | #endif |
652 | 682 | ||
653 | connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); | 683 | connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); |
654 | connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); | 684 | connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); |
655 | connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); | 685 | connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); |
656 | 686 | ||
657 | connect( mTodoListView, SIGNAL(selectionChanged() ), | 687 | connect( mTodoListView, SIGNAL(selectionChanged() ), |
658 | SLOT( processSelectionChange() ) ); | 688 | SLOT( processSelectionChange() ) ); |
659 | connect( mQuickAdd, SIGNAL( returnPressed () ), | 689 | connect( mQuickAdd, SIGNAL( returnPressed () ), |
660 | SLOT( addQuickTodo() ) ); | 690 | SLOT( addQuickTodo() ) ); |
661 | 691 | ||
662 | } | 692 | } |
663 | 693 | ||
664 | KOTodoView::~KOTodoView() | 694 | KOTodoView::~KOTodoView() |
665 | { | 695 | { |
666 | 696 | ||
667 | #if QT_VERSION >= 0x030000 | 697 | #if QT_VERSION >= 0x030000 |
668 | 698 | ||
669 | #else | 699 | #else |
670 | delete mKOTodoViewWhatsThis; | 700 | delete mKOTodoViewWhatsThis; |
671 | #endif | 701 | #endif |
672 | 702 | ||
673 | delete mDocPrefs; | 703 | delete mDocPrefs; |
674 | } | 704 | } |
675 | QString KOTodoView::getWhatsThisText(QPoint p) | 705 | QString KOTodoView::getWhatsThisText(QPoint p) |
676 | { | 706 | { |
677 | KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); | 707 | KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); |
678 | if ( item ) | 708 | if ( item ) |
679 | return KIncidenceFormatter::instance()->getFormattedText( item->todo(), | 709 | return KIncidenceFormatter::instance()->getFormattedText( item->todo(), |
680 | KOPrefs::instance()->mWTshowDetails, | 710 | KOPrefs::instance()->mWTshowDetails, |
681 | KOPrefs::instance()->mWTshowCreated, | 711 | KOPrefs::instance()->mWTshowCreated, |
682 | KOPrefs::instance()->mWTshowChanged); | 712 | KOPrefs::instance()->mWTshowChanged); |
683 | return i18n("That is the todo view" ); | 713 | return i18n("That is the todo view" ); |
684 | 714 | ||
685 | } | 715 | } |
686 | 716 | ||
687 | void KOTodoView::jumpToDate () | 717 | void KOTodoView::jumpToDate () |
688 | { | 718 | { |
689 | // if (mActiveItem) { | 719 | // if (mActiveItem) { |
690 | // mActiveItem->todo()); | 720 | // mActiveItem->todo()); |
691 | // if ( mActiveItem->todo()->hasDueDate() ) | 721 | // if ( mActiveItem->todo()->hasDueDate() ) |
692 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); | 722 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); |
693 | } | 723 | } |
694 | void KOTodoView::paintNeeded() | 724 | void KOTodoView::paintNeeded() |
695 | { | 725 | { |
696 | if ( mPendingUpdateBeforeRepaint ) { | 726 | if ( mPendingUpdateBeforeRepaint ) { |
697 | updateView(); | 727 | updateView(); |
698 | mPendingUpdateBeforeRepaint = false; | 728 | mPendingUpdateBeforeRepaint = false; |
699 | } | 729 | } |
700 | } | 730 | } |
701 | void KOTodoView::paintEvent(QPaintEvent * pevent) | 731 | void KOTodoView::paintEvent(QPaintEvent * pevent) |
702 | { | 732 | { |
703 | if ( mPendingUpdateBeforeRepaint ) { | 733 | if ( mPendingUpdateBeforeRepaint ) { |
704 | updateView(); | 734 | updateView(); |
705 | mPendingUpdateBeforeRepaint = false; | 735 | mPendingUpdateBeforeRepaint = false; |
706 | } | 736 | } |
707 | KOrg::BaseView::paintEvent( pevent); | 737 | KOrg::BaseView::paintEvent( pevent); |
708 | } | 738 | } |
709 | 739 | ||
710 | void KOTodoView::updateView() | 740 | void KOTodoView::updateView() |
711 | { | 741 | { |
712 | pendingSubtodo = 0; | 742 | pendingSubtodo = 0; |
713 | if ( mBlockUpdate ) { | 743 | if ( mBlockUpdate ) { |
714 | return; | 744 | return; |
715 | } | 745 | } |
716 | if ( !isVisible() ) { | 746 | if ( !isVisible() ) { |
717 | mPendingUpdateBeforeRepaint = true; | 747 | mPendingUpdateBeforeRepaint = true; |
718 | return; | 748 | return; |
719 | } | 749 | } |
720 | storeCurrentItem(); | 750 | storeCurrentItem(); |
721 | //qDebug("KOTodoView::updateView() %x", this); | 751 | //qDebug("KOTodoView::updateView() %x", this); |
722 | if ( isFlatDisplay ) { | 752 | if ( isFlatDisplay ) { |
723 | displayAllFlat(); | 753 | displayAllFlat(); |
724 | resetCurrentItem(); | 754 | resetCurrentItem(); |
725 | return; | 755 | return; |
726 | } | 756 | } |
727 | //qDebug("update "); | 757 | //qDebug("update "); |
728 | // kdDebug() << "KOTodoView::updateView()" << endl; | 758 | // kdDebug() << "KOTodoView::updateView()" << endl; |
729 | QFont fo = KOPrefs::instance()->mTodoViewFont; | 759 | QFont fo = KOPrefs::instance()->mTodoViewFont; |
730 | 760 | ||
731 | 761 | ||
732 | mTodoListView->clear(); | 762 | mTodoListView->clear(); |
733 | if ( mName == "todolistsmall" ) { | 763 | if ( mName == "todolistsmall" ) { |
734 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { | 764 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { |
735 | int ps = fo.pointSize() -2; | 765 | int ps = fo.pointSize() -2; |
736 | if ( ps > 12 ) | 766 | if ( ps > 12 ) |
737 | ps -= 2; | 767 | ps -= 2; |
738 | fo.setPointSize( ps ); | 768 | fo.setPointSize( ps ); |
739 | } | 769 | } |
740 | } | 770 | } |
741 | 771 | ||
742 | mTodoListView->setFont( fo ); | 772 | mTodoListView->setFont( fo ); |
743 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); | 773 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); |
744 | //mTodoListView->header()->setMaximumHeight(fm.height()); | 774 | //mTodoListView->header()->setMaximumHeight(fm.height()); |
745 | QPtrList<Todo> todoList = calendar()->todos(); | 775 | QPtrList<Todo> todoList = calendar()->todos(); |
746 | 776 | ||
747 | /* | 777 | /* |
748 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; | 778 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; |
749 | Event *t; | 779 | Event *t; |
750 | for(t = todoList.first(); t; t = todoList.next()) { | 780 | for(t = todoList.first(); t; t = todoList.next()) { |
751 | kdDebug() << " " << t->getSummary() << endl; | 781 | kdDebug() << " " << t->getSummary() << endl; |
752 | 782 | ||
753 | if (t->getRelatedTo()) { | 783 | if (t->getRelatedTo()) { |
754 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; | 784 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; |
755 | } | 785 | } |
756 | 786 | ||
757 | QPtrList<Event> l = t->getRelations(); | 787 | QPtrList<Event> l = t->getRelations(); |
758 | Event *c; | 788 | Event *c; |
759 | for(c=l.first();c;c=l.next()) { | 789 | for(c=l.first();c;c=l.next()) { |
760 | kdDebug() << " - relation: " << c->getSummary() << endl; | 790 | kdDebug() << " - relation: " << c->getSummary() << endl; |
761 | } | 791 | } |
762 | } | 792 | } |
763 | */ | 793 | */ |
764 | 794 | ||
765 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a | 795 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a |
766 | // specific order of events. That means that we have to generate parent items | 796 | // specific order of events. That means that we have to generate parent items |
767 | // recursively for proper hierarchical display of Todos. | 797 | // recursively for proper hierarchical display of Todos. |
768 | mTodoMap.clear(); | 798 | mTodoMap.clear(); |
769 | Todo *todo; | 799 | Todo *todo; |
770 | todo = todoList.first();// todo; todo = todoList.next()) { | 800 | todo = todoList.first();// todo; todo = todoList.next()) { |
771 | while ( todo ) { | 801 | while ( todo ) { |
772 | bool next = true; | 802 | bool next = true; |
773 | // qDebug("todo %s ", todo->summary().latin1()); | 803 | // qDebug("todo %s ", todo->summary().latin1()); |
774 | Incidence *incidence = todo->relatedTo(); | 804 | Incidence *incidence = todo->relatedTo(); |
775 | while ( incidence ) { | 805 | while ( incidence ) { |
776 | if ( incidence->typeID() == todoID ) { | 806 | if ( incidence->typeID() == todoID ) { |
777 | //qDebug("related %s ",incidence->summary().latin1() ); | 807 | //qDebug("related %s ",incidence->summary().latin1() ); |
778 | if ( !(todoList.contains ( ((Todo* )incidence ) ) ) && incidence->calEnabled() ) { | 808 | if ( !(todoList.contains ( ((Todo* )incidence ) ) ) && incidence->calEnabled() ) { |
779 | //qDebug("related not found "); | 809 | //qDebug("related not found "); |
780 | todoList.remove( ); | 810 | todoList.remove( ); |
781 | todo = todoList.current(); | 811 | todo = todoList.current(); |
782 | next = false; | 812 | next = false; |
783 | incidence = 0; | 813 | incidence = 0; |
784 | 814 | ||
785 | } else { | 815 | } else { |
786 | //qDebug("related found "); | 816 | //qDebug("related found "); |
787 | incidence = incidence->relatedTo(); | 817 | incidence = incidence->relatedTo(); |
788 | } | 818 | } |
789 | } else | 819 | } else |
790 | incidence = 0; | 820 | incidence = 0; |
791 | } | 821 | } |
792 | if ( next ) | 822 | if ( next ) |
793 | todo = todoList.next(); | 823 | todo = todoList.next(); |
794 | } | 824 | } |
795 | 825 | ||
796 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 826 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
797 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) | 827 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) |
798 | { | 828 | { |
799 | insertTodoItem(todo); | 829 | insertTodoItem(todo); |
800 | } | 830 | } |
801 | } | 831 | } |
802 | // Restore opened/closed state | 832 | // Restore opened/closed state |
803 | mTodoListView->blockSignals( true ); | 833 | mTodoListView->blockSignals( true ); |
804 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); | 834 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); |
805 | mTodoListView->blockSignals( false ); | 835 | mTodoListView->blockSignals( false ); |
806 | resetCurrentItem(); | 836 | resetCurrentItem(); |
807 | processSelectionChange(); | 837 | processSelectionChange(); |
808 | } | 838 | } |
809 | 839 | ||
810 | void KOTodoView::storeCurrentItem() | 840 | void KOTodoView::storeCurrentItem() |
811 | { | 841 | { |
812 | mCurItem = 0; | 842 | mCurItem = 0; |
813 | mCurItemRootParent = 0; | 843 | mCurItemRootParent = 0; |
814 | mCurItemParent = 0; | 844 | mCurItemParent = 0; |
815 | mCurItemAbove = 0; | 845 | mCurItemAbove = 0; |
816 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 846 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
817 | if (mActiveItem) { | 847 | if (mActiveItem) { |
818 | mCurItem = mActiveItem->todo(); | 848 | mCurItem = mActiveItem->todo(); |
819 | KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); | 849 | KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); |
820 | if ( activeItemAbove ) | 850 | if ( activeItemAbove ) |
821 | mCurItemAbove = activeItemAbove->todo(); | 851 | mCurItemAbove = activeItemAbove->todo(); |
822 | mCurItemRootParent = mCurItem; | 852 | mCurItemRootParent = mCurItem; |
823 | mCurItemParent = mCurItemRootParent->relatedTo(); | 853 | mCurItemParent = mCurItemRootParent->relatedTo(); |
824 | while ( mCurItemRootParent->relatedTo() != 0 ) | 854 | while ( mCurItemRootParent->relatedTo() != 0 ) |
825 | mCurItemRootParent = mCurItemRootParent->relatedTo(); | 855 | mCurItemRootParent = mCurItemRootParent->relatedTo(); |
826 | } | 856 | } |
827 | mActiveItem = 0; | 857 | mActiveItem = 0; |
828 | } | 858 | } |
829 | 859 | ||
830 | void KOTodoView::resetCurrentItem() | 860 | void KOTodoView::resetCurrentItem() |
831 | { | 861 | { |
832 | mTodoListView->setFocus(); | 862 | mTodoListView->setFocus(); |
833 | KOTodoViewItem* foundItem = 0; | 863 | KOTodoViewItem* foundItem = 0; |
834 | KOTodoViewItem* foundItemRoot = 0; | 864 | KOTodoViewItem* foundItemRoot = 0; |
835 | KOTodoViewItem* foundItemParent = 0; | 865 | KOTodoViewItem* foundItemParent = 0; |
836 | KOTodoViewItem* foundItemAbove = 0; | 866 | KOTodoViewItem* foundItemAbove = 0; |
837 | if ( mTodoListView->firstChild () ) { | 867 | if ( mTodoListView->firstChild () ) { |
838 | if ( mCurItem ) { | 868 | if ( mCurItem ) { |
839 | KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); | 869 | KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); |
840 | while ( item ) { | 870 | while ( item ) { |
841 | if ( item->todo() == mCurItem ) { | 871 | if ( item->todo() == mCurItem ) { |
842 | foundItem = item; | 872 | foundItem = item; |
843 | break; | 873 | break; |
844 | } else if ( item->todo() == mCurItemAbove ) { | 874 | } else if ( item->todo() == mCurItemAbove ) { |
845 | foundItemAbove = item; | 875 | foundItemAbove = item; |
846 | 876 | ||
847 | } | 877 | } |
848 | if ( item->todo() == mCurItemRootParent ) { | 878 | if ( item->todo() == mCurItemRootParent ) { |
849 | foundItemRoot = item; | 879 | foundItemRoot = item; |
850 | } | 880 | } |
851 | if ( item->todo() == mCurItemParent ) { | 881 | if ( item->todo() == mCurItemParent ) { |
852 | foundItemParent = item; | 882 | foundItemParent = item; |
853 | } | 883 | } |
854 | item = (KOTodoViewItem*)item->itemBelow(); | 884 | item = (KOTodoViewItem*)item->itemBelow(); |
855 | } | 885 | } |
856 | if ( ! foundItem ) { | 886 | if ( ! foundItem ) { |
857 | if ( foundItemParent ) { | 887 | if ( foundItemParent ) { |
858 | foundItem = foundItemParent; | 888 | foundItem = foundItemParent; |
859 | } else { | 889 | } else { |
860 | if ( foundItemRoot ) | 890 | if ( foundItemRoot ) |
861 | foundItem = foundItemRoot; | 891 | foundItem = foundItemRoot; |
862 | else | 892 | else |
863 | foundItem = foundItemAbove; | 893 | foundItem = foundItemAbove; |
864 | } | 894 | } |
865 | } | 895 | } |
866 | } | 896 | } |
867 | if ( foundItem ) { | 897 | if ( foundItem ) { |
868 | mTodoListView->setCurrentItem( foundItem ); | 898 | mTodoListView->setCurrentItem( foundItem ); |
869 | mTodoListView->ensureItemVisible( foundItem ); | 899 | mTodoListView->ensureItemVisible( foundItem ); |
870 | } else { | 900 | } else { |
871 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); | 901 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); |
872 | } | 902 | } |
873 | } | 903 | } |
874 | mTodoListView->setFocus(); | 904 | mTodoListView->setFocus(); |
875 | } | 905 | } |
876 | //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; | 906 | //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; |
877 | bool KOTodoView::checkTodo( Todo * todo ) | 907 | bool KOTodoView::checkTodo( Todo * todo ) |
878 | { | 908 | { |
879 | 909 | ||
880 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) | 910 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) |
881 | return false; | 911 | return false; |
882 | if ( !todo->isCompleted() ) { | 912 | if ( !todo->isCompleted() ) { |
883 | if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) | 913 | if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) |
884 | return true; | 914 | return true; |
885 | } | 915 | } |
886 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { | 916 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { |
887 | if ( todo->hasStartDate() ) | 917 | if ( todo->hasStartDate() ) |
888 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) | 918 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) |
889 | return false; | 919 | return false; |
890 | if ( todo->hasDueDate() ) | 920 | if ( todo->hasDueDate() ) |
891 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) | 921 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) |
892 | return false; | 922 | return false; |
893 | } | 923 | } |
894 | return true; | 924 | return true; |
895 | } | 925 | } |
896 | 926 | ||
897 | void KOTodoView::restoreItemState( QListViewItem *item ) | 927 | void KOTodoView::restoreItemState( QListViewItem *item ) |
898 | { | 928 | { |
899 | pendingSubtodo = 0; | 929 | pendingSubtodo = 0; |
900 | while( item ) { | 930 | while( item ) { |
901 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 931 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
902 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); | 932 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); |
903 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); | 933 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); |
904 | item = item->nextSibling(); | 934 | item = item->nextSibling(); |
905 | } | 935 | } |
906 | } | 936 | } |
907 | 937 | ||
908 | 938 | ||
909 | QMap<Todo *,KOTodoViewItem *>::ConstIterator | 939 | QMap<Todo *,KOTodoViewItem *>::ConstIterator |
910 | KOTodoView::insertTodoItem(Todo *todo) | 940 | KOTodoView::insertTodoItem(Todo *todo) |
911 | { | 941 | { |
912 | 942 | ||
913 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; | 943 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; |
914 | // TODO: Check, if dynmaic cast is necessary | 944 | // TODO: Check, if dynmaic cast is necessary |
915 | 945 | ||
916 | pendingSubtodo = 0; | 946 | pendingSubtodo = 0; |
917 | Incidence *incidence = todo->relatedTo(); | 947 | Incidence *incidence = todo->relatedTo(); |
918 | while ( incidence && !incidence->calEnabled() ) | 948 | while ( incidence && !incidence->calEnabled() ) |
919 | incidence = incidence->relatedTo(); | 949 | incidence = incidence->relatedTo(); |
920 | if (incidence && incidence->typeID() == todoID ) { | 950 | if (incidence && incidence->typeID() == todoID ) { |
921 | Todo *relatedTodo = static_cast<Todo *>(incidence); | 951 | Todo *relatedTodo = static_cast<Todo *>(incidence); |
922 | 952 | ||
923 | // kdDebug() << " has Related" << endl; | 953 | // kdDebug() << " has Related" << endl; |
924 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 954 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
925 | itemIterator = mTodoMap.find(relatedTodo); | 955 | itemIterator = mTodoMap.find(relatedTodo); |
926 | if (itemIterator == mTodoMap.end()) { | 956 | if (itemIterator == mTodoMap.end()) { |
927 | // kdDebug() << " related not yet in list" << endl; | 957 | // kdDebug() << " related not yet in list" << endl; |
928 | itemIterator = insertTodoItem (relatedTodo); | 958 | itemIterator = insertTodoItem (relatedTodo); |
929 | } | 959 | } |
930 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem | 960 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem |
931 | // and one into the map. Sure finding is more easy but why? -zecke | 961 | // and one into the map. Sure finding is more easy but why? -zecke |
932 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); | 962 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); |
933 | return mTodoMap.insert(todo,todoItem); | 963 | return mTodoMap.insert(todo,todoItem); |
934 | } else { | 964 | } else { |
935 | // kdDebug() << " no Related" << endl; | 965 | // kdDebug() << " no Related" << endl; |
936 | // see above -zecke | 966 | // see above -zecke |
937 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 967 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
938 | return mTodoMap.insert(todo,todoItem); | 968 | return mTodoMap.insert(todo,todoItem); |
939 | } | 969 | } |
940 | } | 970 | } |
941 | 971 | ||
942 | 972 | ||
943 | void KOTodoView::updateConfig() | 973 | void KOTodoView::updateConfig() |
944 | { | 974 | { |
945 | updateView(); | 975 | updateView(); |
946 | mTodoListView->repaintContents(); | 976 | mTodoListView->repaintContents(); |
947 | } | 977 | } |
948 | 978 | ||
949 | QPtrList<Incidence> KOTodoView::selectedIncidences() | 979 | QPtrList<Incidence> KOTodoView::selectedIncidences() |
950 | { | 980 | { |
951 | QPtrList<Incidence> selected; | 981 | QPtrList<Incidence> selected; |
952 | 982 | ||
953 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 983 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
954 | // if (!item) item = mActiveItem; | 984 | // if (!item) item = mActiveItem; |
955 | if (item) selected.append(item->todo()); | 985 | if (item) selected.append(item->todo()); |
956 | 986 | ||
957 | return selected; | 987 | return selected; |
958 | } | 988 | } |
959 | 989 | ||
960 | QPtrList<Todo> KOTodoView::selectedTodos() | 990 | QPtrList<Todo> KOTodoView::selectedTodos() |
961 | { | 991 | { |
962 | QPtrList<Todo> selected; | 992 | QPtrList<Todo> selected; |
963 | 993 | ||
964 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 994 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
965 | // if (!item) item = mActiveItem; | 995 | // if (!item) item = mActiveItem; |
966 | if (item) selected.append(item->todo()); | 996 | if (item) selected.append(item->todo()); |
967 | 997 | ||
968 | return selected; | 998 | return selected; |
969 | } | 999 | } |
970 | 1000 | ||
971 | void KOTodoView::changeEventDisplay(Event *, int) | 1001 | void KOTodoView::changeEventDisplay(Event *, int) |
972 | { | 1002 | { |
973 | updateView(); | 1003 | updateView(); |
974 | } | 1004 | } |
975 | 1005 | ||
976 | void KOTodoView::showDates(const QDate &, const QDate &) | 1006 | void KOTodoView::showDates(const QDate &, const QDate &) |
977 | { | 1007 | { |
978 | } | 1008 | } |
979 | 1009 | ||
980 | void KOTodoView::showEvents(QPtrList<Event>) | 1010 | void KOTodoView::showEvents(QPtrList<Event>) |
981 | { | 1011 | { |
982 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; | 1012 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; |
983 | } | 1013 | } |
984 | 1014 | ||
985 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 1015 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
986 | const QDate &td) | 1016 | const QDate &td) |
987 | { | 1017 | { |
988 | #ifndef KORG_NOPRINTER | 1018 | #ifndef KORG_NOPRINTER |
989 | calPrinter->preview(CalPrinter::Todolist, fd, td); | 1019 | calPrinter->preview(CalPrinter::Todolist, fd, td); |
990 | #endif | 1020 | #endif |
991 | } | 1021 | } |
992 | 1022 | ||
993 | void KOTodoView::editItem(QListViewItem *item ) | 1023 | void KOTodoView::editItem(QListViewItem *item ) |
994 | { | 1024 | { |
995 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); | 1025 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); |
996 | } | 1026 | } |
997 | 1027 | ||
998 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) | 1028 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) |
999 | { | 1029 | { |
1000 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); | 1030 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); |
1001 | } | 1031 | } |
1002 | 1032 | ||
1003 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) | 1033 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) |
1004 | { | 1034 | { |
1005 | pendingSubtodo = 0; | 1035 | pendingSubtodo = 0; |
1006 | mActiveItem = (KOTodoViewItem *)item; | 1036 | mActiveItem = (KOTodoViewItem *)item; |
1007 | if (item) { | 1037 | if (item) { |
1008 | switch (column){ | 1038 | switch (column){ |
1009 | case 1: | 1039 | case 1: |
1010 | mPriorityPopupMenu->popup(QCursor::pos ()); break; | 1040 | mPriorityPopupMenu->popup(QCursor::pos ()); break; |
1011 | case 2: | 1041 | case 2: |
1012 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; | 1042 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; |
1013 | case 3: | 1043 | case 3: |
1014 | moveTodo(); | 1044 | moveTodo(); |
1015 | break; | 1045 | break; |
1016 | case 8: | 1046 | case 8: |
1017 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; | 1047 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; |
1018 | default: | 1048 | default: |
1019 | mItemPopupMenu->popup(QCursor::pos()); | 1049 | mItemPopupMenu->popup(QCursor::pos()); |
1020 | } | 1050 | } |
1021 | } else mPopupMenu->popup(QCursor::pos()); | 1051 | } else mPopupMenu->popup(QCursor::pos()); |
1022 | } | 1052 | } |
1023 | void KOTodoView::newTodo() | 1053 | void KOTodoView::newTodo() |
1024 | { | 1054 | { |
1025 | emit newTodoSignal(); | 1055 | emit newTodoSignal(); |
1026 | } | 1056 | } |
1027 | 1057 | ||
1028 | void KOTodoView::newSubTodo() | 1058 | void KOTodoView::newSubTodo() |
1029 | { | 1059 | { |
1030 | if (mActiveItem) { | 1060 | if (mActiveItem) { |
1031 | emit newSubTodoSignal(mActiveItem->todo()); | 1061 | emit newSubTodoSignal(mActiveItem->todo()); |
1032 | } | 1062 | } |
1033 | } | 1063 | } |
1034 | void KOTodoView::unparentTodo() | 1064 | void KOTodoView::unparentTodo() |
1035 | { | 1065 | { |
1036 | if (mActiveItem) { | 1066 | if (mActiveItem) { |
1037 | emit unparentTodoSignal(mActiveItem->todo()); | 1067 | emit unparentTodoSignal(mActiveItem->todo()); |
1038 | } | 1068 | } |
1039 | } | 1069 | } |
1040 | 1070 | ||
1041 | void KOTodoView::reparentTodo() | 1071 | void KOTodoView::reparentTodo() |
1042 | { | 1072 | { |
1043 | if (mActiveItem) { | 1073 | if (mActiveItem) { |
1044 | topLevelWidget()->setCaption(i18n("Click on new parent item")); | 1074 | topLevelWidget()->setCaption(i18n("Click on new parent item")); |
1045 | pendingSubtodo = mActiveItem; | 1075 | pendingSubtodo = mActiveItem; |
1046 | } | 1076 | } |
1047 | } | 1077 | } |
1048 | void KOTodoView::editTodo() | 1078 | void KOTodoView::editTodo() |
1049 | { | 1079 | { |
1050 | if (mActiveItem) { | 1080 | if (mActiveItem) { |
1051 | emit editTodoSignal(mActiveItem->todo()); | 1081 | emit editTodoSignal(mActiveItem->todo()); |
1052 | } | 1082 | } |
1053 | } | 1083 | } |
1054 | void KOTodoView::cloneTodo() | 1084 | void KOTodoView::cloneTodo() |
1055 | { | 1085 | { |
1056 | if (mActiveItem) { | 1086 | if (mActiveItem) { |
1057 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); | 1087 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); |
1058 | } | 1088 | } |
1059 | } | 1089 | } |
1060 | void KOTodoView::cancelTodo() | 1090 | void KOTodoView::cancelTodo() |
1061 | { | 1091 | { |
1062 | if (mActiveItem) { | 1092 | if (mActiveItem) { |
1063 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); | 1093 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); |
1064 | } | 1094 | } |
1065 | } | 1095 | } |
1066 | void KOTodoView::moveTodo() | 1096 | void KOTodoView::moveTodo() |
1067 | { | 1097 | { |
1068 | if (mActiveItem) { | 1098 | if (mActiveItem) { |
1069 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); | 1099 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); |
1070 | } | 1100 | } |
1071 | } | 1101 | } |
1072 | void KOTodoView::beamTodo() | 1102 | void KOTodoView::beamTodo() |
1073 | { | 1103 | { |
1074 | if (mActiveItem) { | 1104 | if (mActiveItem) { |
1075 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); | 1105 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); |
1076 | } | 1106 | } |
1077 | } | 1107 | } |
1078 | 1108 | ||
1079 | 1109 | ||
1080 | void KOTodoView::showTodo() | 1110 | void KOTodoView::showTodo() |
1081 | { | 1111 | { |
1082 | if (mActiveItem) { | 1112 | if (mActiveItem) { |
1083 | emit showTodoSignal(mActiveItem->todo()); | 1113 | emit showTodoSignal(mActiveItem->todo()); |
1084 | } | 1114 | } |
1085 | } | 1115 | } |
1086 | 1116 | ||
1087 | void KOTodoView::deleteTodo() | 1117 | void KOTodoView::deleteTodo() |
1088 | { | 1118 | { |
1089 | if (mActiveItem) { | 1119 | if (mActiveItem) { |
1090 | emit deleteTodoSignal(mActiveItem->todo()); | 1120 | emit deleteTodoSignal(mActiveItem->todo()); |
1091 | } | 1121 | } |
1092 | } | 1122 | } |
1093 | 1123 | ||
1094 | void KOTodoView::setNewPriority(int index) | 1124 | void KOTodoView::setNewPriority(int index) |
1095 | { | 1125 | { |
1096 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1126 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1097 | mActiveItem->todo()->setPriority(mPriority[index]); | 1127 | mActiveItem->todo()->setPriority(mPriority[index]); |
1098 | mActiveItem->construct(); | 1128 | mActiveItem->construct(); |
1099 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); | 1129 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); |
1100 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1130 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1101 | } | 1131 | } |
1102 | } | 1132 | } |
1103 | 1133 | ||
1104 | void KOTodoView::setNewPercentage(int index) | 1134 | void KOTodoView::setNewPercentage(int index) |
1105 | { | 1135 | { |
1106 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1136 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1107 | 1137 | ||
1108 | if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { | 1138 | if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { |
1109 | mActiveItem->setOn( true ); | 1139 | mActiveItem->setOn( true ); |
1110 | return; | 1140 | return; |
1111 | } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { | 1141 | } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { |
1112 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); | 1142 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); |
1113 | if ( par && par->isOn() ) | 1143 | if ( par && par->isOn() ) |
1114 | par->setOn( false ); | 1144 | par->setOn( false ); |
1115 | } | 1145 | } |
1116 | if (mPercentage[index] == 100) { | 1146 | if (mPercentage[index] == 100) { |
1117 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); | 1147 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); |
1118 | } else { | 1148 | } else { |
1119 | mActiveItem->todo()->setCompleted(false); | 1149 | mActiveItem->todo()->setCompleted(false); |
1120 | } | 1150 | } |
1121 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); | 1151 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); |
1122 | mActiveItem->construct(); | 1152 | mActiveItem->construct(); |
1123 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); | 1153 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); |
1124 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1154 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1125 | } | 1155 | } |
1126 | } | 1156 | } |
1127 | 1157 | ||
1128 | 1158 | ||
1129 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) | 1159 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) |
1130 | { | 1160 | { |
1131 | QPopupMenu* tempMenu = new QPopupMenu (this); | 1161 | QPopupMenu* tempMenu = new QPopupMenu (this); |
1132 | QStringList checkedCategories = todoItem->todo()->categories (); | 1162 | QStringList checkedCategories = todoItem->todo()->categories (); |
1133 | 1163 | ||
1134 | tempMenu->setCheckable (true); | 1164 | tempMenu->setCheckable (true); |
1135 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 1165 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
1136 | it != KOPrefs::instance()->mCustomCategories.end (); | 1166 | it != KOPrefs::instance()->mCustomCategories.end (); |
1137 | ++it) { | 1167 | ++it) { |
1138 | int index = tempMenu->insertItem (*it); | 1168 | int index = tempMenu->insertItem (*it); |
1139 | mCategory[index] = *it; | 1169 | mCategory[index] = *it; |
1140 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); | 1170 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); |
1141 | } | 1171 | } |
1142 | 1172 | ||
1143 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 1173 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
1144 | return tempMenu; | 1174 | return tempMenu; |
1145 | 1175 | ||
1146 | 1176 | ||
1147 | } | 1177 | } |
1148 | void KOTodoView::changedCategories(int index) | 1178 | void KOTodoView::changedCategories(int index) |
1149 | { | 1179 | { |
1150 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1180 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1151 | QStringList categories = mActiveItem->todo()->categories (); | 1181 | QStringList categories = mActiveItem->todo()->categories (); |
1152 | QString colcat = categories.first(); | 1182 | QString colcat = categories.first(); |
1153 | if (categories.find (mCategory[index]) != categories.end ()) | 1183 | if (categories.find (mCategory[index]) != categories.end ()) |
1154 | categories.remove (mCategory[index]); | 1184 | categories.remove (mCategory[index]); |
1155 | else | 1185 | else |
1156 | categories.insert (categories.end(), mCategory[index]); | 1186 | categories.insert (categories.end(), mCategory[index]); |
1157 | categories.sort (); | 1187 | categories.sort (); |
1158 | if ( !colcat.isEmpty() ) { | 1188 | if ( !colcat.isEmpty() ) { |
1159 | if ( categories.find ( colcat ) != categories.end () ) { | 1189 | if ( categories.find ( colcat ) != categories.end () ) { |
1160 | categories.remove( colcat ); | 1190 | categories.remove( colcat ); |
1161 | categories.prepend( colcat ); | 1191 | categories.prepend( colcat ); |
1162 | } | 1192 | } |
1163 | } | 1193 | } |
1164 | mActiveItem->todo()->setCategories (categories); | 1194 | mActiveItem->todo()->setCategories (categories); |
1165 | mActiveItem->construct(); | 1195 | mActiveItem->construct(); |
1166 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1196 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1167 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); | 1197 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); |
1168 | } | 1198 | } |
1169 | } | 1199 | } |
1170 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 1200 | void KOTodoView::itemDoubleClicked(QListViewItem *item) |
1171 | { | 1201 | { |
1172 | if ( pendingSubtodo != 0 ) { | 1202 | if ( pendingSubtodo != 0 ) { |
1173 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1203 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1174 | } | 1204 | } |
1175 | pendingSubtodo = 0; | 1205 | pendingSubtodo = 0; |
1176 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); | 1206 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); |
1177 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); | 1207 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); |
1178 | //qDebug("ROW %d ", row); | 1208 | //qDebug("ROW %d ", row); |
1179 | if (!item) { | 1209 | if (!item) { |
1180 | newTodo(); | 1210 | newTodo(); |
1181 | return; | 1211 | return; |
1182 | } else { | 1212 | } else { |
1183 | if ( row == 1 ) { | 1213 | if ( row == 1 ) { |
1184 | mActiveItem = (KOTodoViewItem *) item; | 1214 | mActiveItem = (KOTodoViewItem *) item; |
1185 | newSubTodo(); | 1215 | newSubTodo(); |
1186 | return; | 1216 | return; |
1187 | } | 1217 | } |
1188 | if ( row == 5 || row == 6 || row == 2) { | 1218 | if ( row == 5 || row == 6 || row == 2) { |
1189 | mActiveItem = (KOTodoViewItem *) item; | 1219 | mActiveItem = (KOTodoViewItem *) item; |
1190 | Todo * t = mActiveItem->todo(); | 1220 | Todo * t = mActiveItem->todo(); |
1191 | if ( t->isRunning() ) { | 1221 | if ( t->isRunning() ) { |
1192 | if ( t->runTime() < 15) { | 1222 | if ( t->runTime() < 15) { |
1193 | t->stopRunning(); | 1223 | t->stopRunning(); |
1194 | mActiveItem->construct(); | 1224 | mActiveItem->construct(); |
1195 | topLevelWidget()->setCaption(i18n("Todo stopped - no data saved because runtime was < 15 sec!")); | 1225 | topLevelWidget()->setCaption(i18n("Todo stopped - no data saved because runtime was < 15 sec!")); |
1196 | return; | 1226 | return; |
1197 | } | 1227 | } |
1198 | else | 1228 | else |
1199 | toggleRunningItem(); | 1229 | toggleRunningItem(); |
1200 | return; | 1230 | return; |
1201 | } else { | 1231 | } else { |
1202 | t->setRunning( true ); | 1232 | t->setRunning( true ); |
1203 | mActiveItem->construct(); | 1233 | mActiveItem->construct(); |
1204 | topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!")); | 1234 | topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!")); |
1205 | return; | 1235 | return; |
1206 | } | 1236 | } |
1207 | } | 1237 | } |
1208 | } | 1238 | } |
1209 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 1239 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
1210 | editItem( item ); | 1240 | editItem( item ); |
1211 | else | 1241 | else |
1212 | showItem( item , QPoint(), 0 ); | 1242 | showItem( item , QPoint(), 0 ); |
1213 | } | 1243 | } |
1214 | void KOTodoView::toggleRunningItem() | 1244 | void KOTodoView::toggleRunningItem() |
1215 | { | 1245 | { |
1216 | // qDebug("KOTodoView::toggleRunning() "); | 1246 | // qDebug("KOTodoView::toggleRunning() "); |
1217 | if ( ! mActiveItem ) | 1247 | if ( ! mActiveItem ) |
1218 | return; | 1248 | return; |
1219 | Todo * t = mActiveItem->todo(); | 1249 | Todo * t = mActiveItem->todo(); |
1220 | if ( t->isRunning() ) { | 1250 | if ( t->isRunning() ) { |
1221 | KOStopTodoPrefs tp ( t, this ); | 1251 | KOStopTodoPrefs tp ( t, this ); |
1222 | if (QApplication::desktop()->width() < 800 ){ | 1252 | if (QApplication::desktop()->width() <= 800 ){ |
1223 | int wid = tp.width(); | 1253 | int wid = tp.width(); |
1224 | int hei = tp.height(); | 1254 | int hei = tp.height(); |
1225 | int xx = (QApplication::desktop()->width()-wid)/2; | 1255 | int xx = (QApplication::desktop()->width()-wid)/2; |
1226 | int yy = (QApplication::desktop()->height()-hei)/2; | 1256 | int yy = (QApplication::desktop()->height()-hei)/2; |
1227 | tp.setGeometry( xx,yy,wid,hei ); | 1257 | tp.setGeometry( xx,yy,wid,hei ); |
1228 | } | 1258 | } |
1229 | tp.exec(); | 1259 | tp.exec(); |
1230 | mActiveItem->construct(); | 1260 | mActiveItem->construct(); |
1231 | } else { | 1261 | } else { |
1232 | int result = KMessageBox::warningContinueCancel(this, | 1262 | KOStartTodoPrefs tp ( t->summary(), this ); |
1233 | i18n("<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>").arg(mActiveItem->text(0).left( 25 ) ),i18n("Start todo"),i18n("Start todo"),i18n("Cancel"), true); | 1263 | if (QApplication::desktop()->width() <= 800 ){ |
1234 | if (result != KMessageBox::Continue) return; | 1264 | int wid = tp.width(); |
1235 | t->setRunning( true ); | 1265 | int hei = tp.height(); |
1236 | mActiveItem->construct(); | 1266 | int xx = (QApplication::desktop()->width()-wid)/2; |
1267 | int yy = (QApplication::desktop()->height()-hei)/2; | ||
1268 | tp.setGeometry( xx,yy,wid,hei ); | ||
1269 | } | ||
1270 | if ( !tp.exec() ) return; | ||
1271 | if ( tp.stopAll() ) { | ||
1272 | mCalendar->stopAllTodos(); | ||
1273 | t->setRunning( true ); | ||
1274 | updateView(); | ||
1275 | } else { | ||
1276 | t->setRunning( true ); | ||
1277 | mActiveItem->construct(); | ||
1278 | } | ||
1237 | } | 1279 | } |
1238 | } | 1280 | } |
1239 | 1281 | ||
1240 | void KOTodoView::itemClicked(QListViewItem *item) | 1282 | void KOTodoView::itemClicked(QListViewItem *item) |
1241 | { | 1283 | { |
1242 | //qDebug("KOTodoView::itemClicked %d", item); | 1284 | //qDebug("KOTodoView::itemClicked %d", item); |
1243 | if (!item) { | 1285 | if (!item) { |
1244 | if ( pendingSubtodo != 0 ) { | 1286 | if ( pendingSubtodo != 0 ) { |
1245 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1287 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1246 | } | 1288 | } |
1247 | pendingSubtodo = 0; | 1289 | pendingSubtodo = 0; |
1248 | return; | 1290 | return; |
1249 | } | 1291 | } |
1250 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1292 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1251 | if ( pendingSubtodo != 0 ) { | 1293 | if ( pendingSubtodo != 0 ) { |
1252 | bool allowReparent = true; | 1294 | bool allowReparent = true; |
1253 | QListViewItem *par = item; | 1295 | QListViewItem *par = item; |
1254 | while ( par ) { | 1296 | while ( par ) { |
1255 | if ( par == pendingSubtodo ) { | 1297 | if ( par == pendingSubtodo ) { |
1256 | allowReparent = false; | 1298 | allowReparent = false; |
1257 | break; | 1299 | break; |
1258 | } | 1300 | } |
1259 | par = par->parent(); | 1301 | par = par->parent(); |
1260 | } | 1302 | } |
1261 | if ( !allowReparent ) { | 1303 | if ( !allowReparent ) { |
1262 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); | 1304 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); |
1263 | pendingSubtodo = 0; | 1305 | pendingSubtodo = 0; |
1264 | } else { | 1306 | } else { |
1265 | Todo* newParent = todoItem->todo(); | 1307 | Todo* newParent = todoItem->todo(); |
1266 | Todo* newSub = pendingSubtodo->todo(); | 1308 | Todo* newSub = pendingSubtodo->todo(); |
1267 | pendingSubtodo = 0; | 1309 | pendingSubtodo = 0; |
1268 | emit reparentTodoSignal( newParent,newSub ); | 1310 | emit reparentTodoSignal( newParent,newSub ); |
1269 | return; | 1311 | return; |
1270 | } | 1312 | } |
1271 | } | 1313 | } |
1272 | 1314 | ||
1273 | } | 1315 | } |
1274 | 1316 | ||
1275 | void KOTodoView::setDocumentId( const QString &id ) | 1317 | void KOTodoView::setDocumentId( const QString &id ) |
1276 | { | 1318 | { |
1277 | 1319 | ||
1278 | mDocPrefs->setDoc( id ); | 1320 | mDocPrefs->setDoc( id ); |
1279 | } | 1321 | } |
1280 | 1322 | ||
1281 | void KOTodoView::itemStateChanged( QListViewItem *item ) | 1323 | void KOTodoView::itemStateChanged( QListViewItem *item ) |
1282 | { | 1324 | { |
1283 | if (!item) return; | 1325 | if (!item) return; |
1284 | 1326 | ||
1285 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1327 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1286 | 1328 | ||
1287 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; | 1329 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; |
1288 | 1330 | ||
1289 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); | 1331 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); |
1290 | } | 1332 | } |
1291 | 1333 | ||
1292 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const | 1334 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const |
1293 | { | 1335 | { |
1294 | mTodoListView->saveLayout(config,group); | 1336 | mTodoListView->saveLayout(config,group); |
1295 | } | 1337 | } |
1296 | 1338 | ||
1297 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) | 1339 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) |
1298 | { | 1340 | { |
1299 | mTodoListView->restoreLayout(config,group); | 1341 | mTodoListView->restoreLayout(config,group); |
1300 | } | 1342 | } |
1301 | 1343 | ||
1302 | void KOTodoView::processSelectionChange() | 1344 | void KOTodoView::processSelectionChange() |
1303 | { | 1345 | { |
1304 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; | 1346 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; |
1305 | 1347 | ||
1306 | KOTodoViewItem *item = | 1348 | KOTodoViewItem *item = |
1307 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); | 1349 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); |
1308 | 1350 | ||
1309 | if ( !item ) { | 1351 | if ( !item ) { |
1310 | emit incidenceSelected( 0 ); | 1352 | emit incidenceSelected( 0 ); |
1311 | } else { | 1353 | } else { |
1312 | emit incidenceSelected( item->todo() ); | 1354 | emit incidenceSelected( item->todo() ); |
1313 | } | 1355 | } |
1314 | } | 1356 | } |
1315 | 1357 | ||
1316 | void KOTodoView::modified(bool b) | 1358 | void KOTodoView::modified(bool b) |
1317 | { | 1359 | { |
1318 | emit isModified(b); | 1360 | emit isModified(b); |
1319 | } | 1361 | } |
1320 | void KOTodoView::setTodoModified( Todo* todo ) | 1362 | void KOTodoView::setTodoModified( Todo* todo ) |
1321 | { | 1363 | { |
1322 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); | 1364 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); |
1323 | } | 1365 | } |
1324 | void KOTodoView::clearSelection() | 1366 | void KOTodoView::clearSelection() |
1325 | { | 1367 | { |
1326 | mTodoListView->selectAll( false ); | 1368 | mTodoListView->selectAll( false ); |
1327 | } | 1369 | } |
1328 | void KOTodoView::setAllOpen() | 1370 | void KOTodoView::setAllOpen() |
1329 | { | 1371 | { |
1330 | if ( isFlatDisplay ) { | 1372 | if ( isFlatDisplay ) { |
1331 | isFlatDisplay = false; | 1373 | isFlatDisplay = false; |
1332 | mPopupMenu->setItemChecked( 8,false ); | 1374 | mPopupMenu->setItemChecked( 8,false ); |
1333 | updateView(); | 1375 | updateView(); |
1334 | } else { | 1376 | } else { |
1335 | storeCurrentItem(); | 1377 | storeCurrentItem(); |
1336 | } | 1378 | } |
1337 | setOpen(mTodoListView->firstChild(), true); | 1379 | setOpen(mTodoListView->firstChild(), true); |
1338 | resetCurrentItem(); | 1380 | resetCurrentItem(); |
1339 | } | 1381 | } |
1340 | void KOTodoView::setAllClose() | 1382 | void KOTodoView::setAllClose() |
1341 | { | 1383 | { |
1342 | if ( isFlatDisplay ) { | 1384 | if ( isFlatDisplay ) { |
1343 | isFlatDisplay = false; | 1385 | isFlatDisplay = false; |
1344 | mPopupMenu->setItemChecked( 8,false ); | 1386 | mPopupMenu->setItemChecked( 8,false ); |
1345 | updateView(); | 1387 | updateView(); |
1346 | } else { | 1388 | } else { |
1347 | storeCurrentItem(); | 1389 | storeCurrentItem(); |
1348 | } | 1390 | } |
1349 | setOpen(mTodoListView->firstChild(), false); | 1391 | setOpen(mTodoListView->firstChild(), false); |
1350 | resetCurrentItem(); | 1392 | resetCurrentItem(); |
1351 | } | 1393 | } |
1352 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) | 1394 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) |
1353 | { | 1395 | { |
1354 | 1396 | ||
1355 | while ( item ) { | 1397 | while ( item ) { |
1356 | setOpen( item->firstChild(), setOpenI ); | 1398 | setOpen( item->firstChild(), setOpenI ); |
1357 | item->setOpen( setOpenI ); | 1399 | item->setOpen( setOpenI ); |
1358 | item = item->nextSibling(); | 1400 | item = item->nextSibling(); |
1359 | } | 1401 | } |
1360 | } | 1402 | } |
1361 | 1403 | ||
1362 | void KOTodoView::displayAllFlat() | 1404 | void KOTodoView::displayAllFlat() |
1363 | { | 1405 | { |
1364 | pendingSubtodo = 0; | 1406 | pendingSubtodo = 0; |
1365 | if ( mBlockUpdate ) { | 1407 | if ( mBlockUpdate ) { |
1366 | return; | 1408 | return; |
1367 | } | 1409 | } |
1368 | mPopupMenu->setItemChecked( 8,true ); | 1410 | mPopupMenu->setItemChecked( 8,true ); |
1369 | isFlatDisplay = true; | 1411 | isFlatDisplay = true; |
1370 | QPtrList<Todo> todoList = calendar()->todos(); | 1412 | QPtrList<Todo> todoList = calendar()->todos(); |
1371 | mTodoMap.clear(); | 1413 | mTodoMap.clear(); |
1372 | mTodoListView->clear(); | 1414 | mTodoListView->clear(); |
1373 | Todo *todo; | 1415 | Todo *todo; |
1374 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 1416 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
1375 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 1417 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
1376 | mTodoMap.insert(todo,todoItem); | 1418 | mTodoMap.insert(todo,todoItem); |
1377 | } | 1419 | } |
1378 | mTodoListView->setFocus(); | 1420 | mTodoListView->setFocus(); |
1379 | processSelectionChange(); | 1421 | processSelectionChange(); |
1380 | } | 1422 | } |
1381 | 1423 | ||
1382 | void KOTodoView::setAllFlat() | 1424 | void KOTodoView::setAllFlat() |
1383 | { | 1425 | { |
1384 | if ( isFlatDisplay ) { | 1426 | if ( isFlatDisplay ) { |
1385 | isFlatDisplay = false; | 1427 | isFlatDisplay = false; |
1386 | mPopupMenu->setItemChecked( 8,false ); | 1428 | mPopupMenu->setItemChecked( 8,false ); |
1387 | updateView(); | 1429 | updateView(); |
1388 | return; | 1430 | return; |
1389 | } | 1431 | } |
1390 | storeCurrentItem(); | 1432 | storeCurrentItem(); |
1391 | displayAllFlat(); | 1433 | displayAllFlat(); |
1392 | resetCurrentItem(); | 1434 | resetCurrentItem(); |
1393 | } | 1435 | } |
1394 | 1436 | ||
1395 | void KOTodoView::purgeCompleted() | 1437 | void KOTodoView::purgeCompleted() |
1396 | { | 1438 | { |
1397 | emit purgeCompletedSignal(); | 1439 | emit purgeCompletedSignal(); |
1398 | 1440 | ||
1399 | } | 1441 | } |
1400 | void KOTodoView::toggleQuickTodo() | 1442 | void KOTodoView::toggleQuickTodo() |
1401 | { | 1443 | { |
1402 | if ( mQuickAdd->isVisible() ) { | 1444 | if ( mQuickAdd->isVisible() ) { |
1403 | mQuickAdd->hide(); | 1445 | mQuickAdd->hide(); |
1404 | KOPrefs::instance()->mEnableQuickTodo = false; | 1446 | KOPrefs::instance()->mEnableQuickTodo = false; |
1405 | } | 1447 | } |
1406 | else { | 1448 | else { |
1407 | mQuickAdd->show(); | 1449 | mQuickAdd->show(); |
1408 | KOPrefs::instance()->mEnableQuickTodo = true; | 1450 | KOPrefs::instance()->mEnableQuickTodo = true; |
1409 | } | 1451 | } |
1410 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 1452 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
1411 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 1453 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
1412 | } | 1454 | } |
1413 | 1455 | ||
1414 | void KOTodoView::toggleRunning() | 1456 | void KOTodoView::toggleRunning() |
1415 | { | 1457 | { |
1416 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; | 1458 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; |
1417 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 1459 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
1418 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 1460 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
1419 | updateView(); | 1461 | updateView(); |
1420 | } | 1462 | } |
1421 | 1463 | ||
1422 | void KOTodoView::toggleCompleted() | 1464 | void KOTodoView::toggleCompleted() |
1423 | { | 1465 | { |
1424 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; | 1466 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; |
1425 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 1467 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
1426 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 1468 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
1427 | updateView(); | 1469 | updateView(); |
1428 | } | 1470 | } |
1429 | 1471 | ||
1430 | void KOTodoView::addQuickTodo() | 1472 | void KOTodoView::addQuickTodo() |
1431 | { | 1473 | { |
1432 | Todo *todo = new Todo(); | 1474 | Todo *todo = new Todo(); |
1433 | todo->setSummary(mQuickAdd->text()); | 1475 | todo->setSummary(mQuickAdd->text()); |
1434 | todo->setOrganizer(KOPrefs::instance()->email()); | 1476 | todo->setOrganizer(KOPrefs::instance()->email()); |
1435 | CalFilter * cf = mCalendar->filter(); | 1477 | CalFilter * cf = mCalendar->filter(); |
1436 | if ( cf ) { | 1478 | if ( cf ) { |
1437 | if ( cf->isEnabled()&& cf->showCategories()) { | 1479 | if ( cf->isEnabled()&& cf->showCategories()) { |
1438 | todo->setCategories(cf->categoryList()); | 1480 | todo->setCategories(cf->categoryList()); |
1439 | } | 1481 | } |
1440 | if ( cf->isEnabled() ) | 1482 | if ( cf->isEnabled() ) |
1441 | todo->setSecrecy( cf->getSecrecy()); | 1483 | todo->setSecrecy( cf->getSecrecy()); |
1442 | } | 1484 | } |
1443 | mCalendar->addTodo(todo); | 1485 | mCalendar->addTodo(todo); |
1444 | mQuickAdd->setText(""); | 1486 | mQuickAdd->setText(""); |
1445 | todoModified (todo, KOGlobals::EVENTADDED ); | 1487 | todoModified (todo, KOGlobals::EVENTADDED ); |
1446 | updateView(); | 1488 | updateView(); |
1447 | } | 1489 | } |
1448 | 1490 | ||
1449 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) | 1491 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) |
1450 | { | 1492 | { |
1451 | // e->ignore(); | 1493 | // e->ignore(); |
1452 | //return; | 1494 | //return; |
1453 | //qDebug("KOTodoView::keyPressEvent "); | 1495 | //qDebug("KOTodoView::keyPressEvent "); |
1454 | switch ( e->key() ) { | 1496 | switch ( e->key() ) { |
1455 | case Qt::Key_Down: | 1497 | case Qt::Key_Down: |
1456 | case Qt::Key_Up: | 1498 | case Qt::Key_Up: |
1457 | QWidget::keyPressEvent ( e ); | 1499 | QWidget::keyPressEvent ( e ); |
1458 | break; | 1500 | break; |
1459 | 1501 | ||
1460 | case Qt::Key_Q: | 1502 | case Qt::Key_Q: |
1461 | toggleQuickTodo(); | 1503 | toggleQuickTodo(); |
1462 | break; | 1504 | break; |
1463 | case Qt::Key_U: | 1505 | case Qt::Key_U: |
1464 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1506 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1465 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1507 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1466 | unparentTodo(); | 1508 | unparentTodo(); |
1467 | e->accept(); | 1509 | e->accept(); |
1468 | } else | 1510 | } else |
1469 | e->ignore(); | 1511 | e->ignore(); |
1470 | break; | 1512 | break; |
1471 | case Qt::Key_S: | 1513 | case Qt::Key_S: |
1472 | if ( e->state() == Qt::ControlButton ) { | 1514 | if ( e->state() == Qt::ControlButton ) { |
1473 | e->ignore(); | 1515 | e->ignore(); |
1474 | break; | 1516 | break; |
1475 | } | 1517 | } |
1476 | if ( e->state() == Qt::ShiftButton ) { | 1518 | if ( e->state() == Qt::ShiftButton ) { |
1477 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1519 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1478 | reparentTodo(); | 1520 | reparentTodo(); |
1479 | e->accept(); | 1521 | e->accept(); |
1480 | } else | 1522 | } else |
1481 | e->ignore(); | 1523 | e->ignore(); |
1482 | break; | 1524 | break; |
1483 | case Qt::Key_P: | 1525 | case Qt::Key_P: |
1484 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1526 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1485 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1527 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1486 | if ( pendingSubtodo ) | 1528 | if ( pendingSubtodo ) |
1487 | itemClicked(mActiveItem); | 1529 | itemClicked(mActiveItem); |
1488 | e->accept(); | 1530 | e->accept(); |
1489 | } else | 1531 | } else |
1490 | e->ignore(); | 1532 | e->ignore(); |
1491 | break; | 1533 | break; |
1492 | case Qt::Key_Escape: | 1534 | case Qt::Key_Escape: |
1493 | if ( pendingSubtodo ) { | 1535 | if ( pendingSubtodo ) { |
1494 | itemClicked(0); | 1536 | itemClicked(0); |
1495 | e->accept(); | 1537 | e->accept(); |
1496 | } else | 1538 | } else |
1497 | e->ignore(); | 1539 | e->ignore(); |
1498 | break; | 1540 | break; |
1499 | default: | 1541 | default: |
1500 | e->ignore(); | 1542 | e->ignore(); |
1501 | } | 1543 | } |
1502 | 1544 | ||
1503 | if ( true ) { | 1545 | if ( true ) { |
1504 | if ( e->key() == Qt::Key_I ) { | 1546 | if ( e->key() == Qt::Key_I ) { |
1505 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); | 1547 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); |
1506 | if ( cn ) { | 1548 | if ( cn ) { |
1507 | mActiveItem = cn; | 1549 | mActiveItem = cn; |
1508 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 1550 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
1509 | if ( ci ){ | 1551 | if ( ci ){ |
1510 | showTodo(); | 1552 | showTodo(); |
1511 | cn = (KOTodoViewItem*)cn->itemBelow(); | 1553 | cn = (KOTodoViewItem*)cn->itemBelow(); |
1512 | if ( cn ) { | 1554 | if ( cn ) { |
1513 | mTodoListView->setCurrentItem ( cn ); | 1555 | mTodoListView->setCurrentItem ( cn ); |
1514 | mTodoListView->ensureItemVisible ( cn ); | 1556 | mTodoListView->ensureItemVisible ( cn ); |
1515 | } | 1557 | } |
1516 | 1558 | ||
1517 | } | 1559 | } |
1518 | } | 1560 | } |
1519 | e->accept(); | 1561 | e->accept(); |
1520 | 1562 | ||
1521 | } | 1563 | } |
1522 | 1564 | ||
1523 | } | 1565 | } |
1524 | 1566 | ||
1525 | } | 1567 | } |
1526 | void KOTodoView::updateTodo( Todo * t, int type ) | 1568 | void KOTodoView::updateTodo( Todo * t, int type ) |
1527 | { | 1569 | { |
1528 | if ( mBlockUpdate) | 1570 | if ( mBlockUpdate) |
1529 | return; | 1571 | return; |
1530 | 1572 | ||
1531 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 1573 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
1532 | itemIterator = mTodoMap.find(t); | 1574 | itemIterator = mTodoMap.find(t); |
1533 | if (itemIterator != mTodoMap.end()) { | 1575 | if (itemIterator != mTodoMap.end()) { |
1534 | (*itemIterator)->construct(); | 1576 | (*itemIterator)->construct(); |
1535 | } else { | 1577 | } else { |
1536 | if ( type == KOGlobals::EVENTADDED ) { | 1578 | if ( type == KOGlobals::EVENTADDED ) { |
1537 | insertTodoItem( t ); | 1579 | insertTodoItem( t ); |
1538 | } | 1580 | } |
1539 | } | 1581 | } |
1540 | 1582 | ||
1541 | } | 1583 | } |
1542 | 1584 | ||
1543 | void KOTodoView::todoModified(Todo * t , int p ) | 1585 | void KOTodoView::todoModified(Todo * t , int p ) |
1544 | { | 1586 | { |
1545 | mBlockUpdate = true; | 1587 | mBlockUpdate = true; |
1546 | emit todoModifiedSignal ( t, p ); | 1588 | emit todoModifiedSignal ( t, p ); |
1547 | mBlockUpdate = false; | 1589 | mBlockUpdate = false; |
1548 | } | 1590 | } |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 8f0c99e..1b31d0d 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -1,288 +1,302 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef KOTODOVIEW_H | 23 | #ifndef KOTODOVIEW_H |
24 | #define KOTODOVIEW_H | 24 | #define KOTODOVIEW_H |
25 | 25 | ||
26 | #include <qfont.h> | 26 | #include <qfont.h> |
27 | #include <qfontmetrics.h> | 27 | #include <qfontmetrics.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qptrlist.h> | 29 | #include <qptrlist.h> |
30 | #include <qstrlist.h> | 30 | #include <qstrlist.h> |
31 | #include <qlistbox.h> | 31 | #include <qlistbox.h> |
32 | #include <qpopupmenu.h> | 32 | #include <qpopupmenu.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qmap.h> | 34 | #include <qmap.h> |
35 | #include <qdialog.h> | 35 | #include <qdialog.h> |
36 | #include <qlabel.h> | 36 | #include <qlabel.h> |
37 | #include <qlistview.h> | 37 | #include <qlistview.h> |
38 | #include <klistview.h> | 38 | #include <klistview.h> |
39 | 39 | ||
40 | #include <libkcal/calendar.h> | 40 | #include <libkcal/calendar.h> |
41 | #include <libkcal/todo.h> | 41 | #include <libkcal/todo.h> |
42 | 42 | ||
43 | #include <korganizer/baseview.h> | 43 | #include <korganizer/baseview.h> |
44 | 44 | ||
45 | #include "kotodoviewitem.h" | 45 | #include "kotodoviewitem.h" |
46 | #include "koprefs.h" | 46 | #include "koprefs.h" |
47 | #include "koglobals.h" | 47 | #include "koglobals.h" |
48 | #include "datenavigator.h" | 48 | #include "datenavigator.h" |
49 | 49 | ||
50 | class QDragEnterEvent; | 50 | class QDragEnterEvent; |
51 | class QDragMoveEvent; | 51 | class QDragMoveEvent; |
52 | class QDragLeaveEvent; | 52 | class QDragLeaveEvent; |
53 | class QDropEvent; | 53 | class QDropEvent; |
54 | class KOTodoViewWhatsThis; | 54 | class KOTodoViewWhatsThis; |
55 | class KDateEdit; | 55 | class KDateEdit; |
56 | class KOTimeEdit; | 56 | class KOTimeEdit; |
57 | 57 | ||
58 | class DocPrefs; | 58 | class DocPrefs; |
59 | 59 | ||
60 | 60 | ||
61 | class KOStopTodoPrefs : public QDialog | 61 | class KOStopTodoPrefs : public QDialog |
62 | { | 62 | { |
63 | Q_OBJECT | 63 | Q_OBJECT |
64 | public: | 64 | public: |
65 | KOStopTodoPrefs( Todo* todo, QWidget *parent=0, const char *name=0 ) ; | 65 | KOStopTodoPrefs( Todo* todo, QWidget *parent=0, const char *name=0 ) ; |
66 | 66 | ||
67 | 67 | ||
68 | private slots: | 68 | private slots: |
69 | void doNotSave(); | 69 | void doNotSave(); |
70 | void accept(); | 70 | void accept(); |
71 | private: | 71 | private: |
72 | Todo* mTodo; | 72 | Todo* mTodo; |
73 | QLineEdit* mComment; | 73 | QLineEdit* mComment; |
74 | KDateEdit *sde, *ede; | 74 | KDateEdit *sde, *ede; |
75 | KOTimeEdit *ste, *ete; | 75 | KOTimeEdit *ste, *ete; |
76 | 76 | ||
77 | }; | 77 | }; |
78 | 78 | ||
79 | class KOStartTodoPrefs : public QDialog | ||
80 | { | ||
81 | Q_OBJECT | ||
82 | public: | ||
83 | KOStartTodoPrefs( QString sum, QWidget *parent=0, const char *name=0 ) ; | ||
84 | |||
85 | bool stopAll() { return mStopAll; } | ||
86 | private slots: | ||
87 | void doStop(); | ||
88 | private: | ||
89 | bool mStopAll; | ||
90 | |||
91 | }; | ||
92 | |||
79 | class KOTodoListView : public KListView | 93 | class KOTodoListView : public KListView |
80 | { | 94 | { |
81 | Q_OBJECT | 95 | Q_OBJECT |
82 | public: | 96 | public: |
83 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); | 97 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); |
84 | virtual ~KOTodoListView() {} | 98 | virtual ~KOTodoListView() {} |
85 | 99 | ||
86 | signals: | 100 | signals: |
87 | void paintNeeded(); | 101 | void paintNeeded(); |
88 | void todoDropped(Todo *, int); | 102 | void todoDropped(Todo *, int); |
89 | void double_Clicked(QListViewItem *item); | 103 | void double_Clicked(QListViewItem *item); |
90 | void reparentTodoSignal( Todo *,Todo * ); | 104 | void reparentTodoSignal( Todo *,Todo * ); |
91 | void unparentTodoSignal(Todo *); | 105 | void unparentTodoSignal(Todo *); |
92 | void deleteTodo( Todo * ); | 106 | void deleteTodo( Todo * ); |
93 | protected: | 107 | protected: |
94 | void wheelEvent (QWheelEvent *e); | 108 | void wheelEvent (QWheelEvent *e); |
95 | void contentsDragEnterEvent(QDragEnterEvent *); | 109 | void contentsDragEnterEvent(QDragEnterEvent *); |
96 | void contentsDragMoveEvent(QDragMoveEvent *); | 110 | void contentsDragMoveEvent(QDragMoveEvent *); |
97 | void contentsDragLeaveEvent(QDragLeaveEvent *); | 111 | void contentsDragLeaveEvent(QDragLeaveEvent *); |
98 | void contentsDropEvent(QDropEvent *); | 112 | void contentsDropEvent(QDropEvent *); |
99 | 113 | ||
100 | void contentsMousePressEvent(QMouseEvent *); | 114 | void contentsMousePressEvent(QMouseEvent *); |
101 | void contentsMouseMoveEvent(QMouseEvent *); | 115 | void contentsMouseMoveEvent(QMouseEvent *); |
102 | void contentsMouseReleaseEvent(QMouseEvent *); | 116 | void contentsMouseReleaseEvent(QMouseEvent *); |
103 | void contentsMouseDoubleClickEvent(QMouseEvent *); | 117 | void contentsMouseDoubleClickEvent(QMouseEvent *); |
104 | 118 | ||
105 | private: | 119 | private: |
106 | void paintEvent(QPaintEvent * pevent); | 120 | void paintEvent(QPaintEvent * pevent); |
107 | bool internalDrop; | 121 | bool internalDrop; |
108 | QString mName; | 122 | QString mName; |
109 | Calendar *mCalendar; | 123 | Calendar *mCalendar; |
110 | QPoint mPressPos; | 124 | QPoint mPressPos; |
111 | bool mMousePressed; | 125 | bool mMousePressed; |
112 | QListViewItem *mOldCurrent; | 126 | QListViewItem *mOldCurrent; |
113 | bool mFlagKeyPressed; | 127 | bool mFlagKeyPressed; |
114 | void keyPressEvent ( QKeyEvent * ) ; | 128 | void keyPressEvent ( QKeyEvent * ) ; |
115 | void keyReleaseEvent ( QKeyEvent * ) ; | 129 | void keyReleaseEvent ( QKeyEvent * ) ; |
116 | }; | 130 | }; |
117 | 131 | ||
118 | 132 | ||
119 | /** | 133 | /** |
120 | This is the line-edit on top of the todoview for fast addition of new todos | 134 | This is the line-edit on top of the todoview for fast addition of new todos |
121 | */ | 135 | */ |
122 | class KOQuickTodo : public QLineEdit | 136 | class KOQuickTodo : public QLineEdit |
123 | { | 137 | { |
124 | public: | 138 | public: |
125 | KOQuickTodo(QWidget *parent=0); | 139 | KOQuickTodo(QWidget *parent=0); |
126 | protected: | 140 | protected: |
127 | void focusInEvent(QFocusEvent *ev); | 141 | void focusInEvent(QFocusEvent *ev); |
128 | void focusOutEvent(QFocusEvent *ev); | 142 | void focusOutEvent(QFocusEvent *ev); |
129 | }; | 143 | }; |
130 | 144 | ||
131 | 145 | ||
132 | /** | 146 | /** |
133 | This class provides a multi-column list view of todo events. | 147 | This class provides a multi-column list view of todo events. |
134 | 148 | ||
135 | @short multi-column list view of todo events. | 149 | @short multi-column list view of todo events. |
136 | @author Cornelius Schumacher <schumacher@kde.org> | 150 | @author Cornelius Schumacher <schumacher@kde.org> |
137 | */ | 151 | */ |
138 | class KOTodoView : public KOrg::BaseView | 152 | class KOTodoView : public KOrg::BaseView |
139 | { | 153 | { |
140 | Q_OBJECT | 154 | Q_OBJECT |
141 | public: | 155 | public: |
142 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); | 156 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); |
143 | ~KOTodoView(); | 157 | ~KOTodoView(); |
144 | 158 | ||
145 | QPtrList<Incidence> selectedIncidences(); | 159 | QPtrList<Incidence> selectedIncidences(); |
146 | QPtrList<Todo> selectedTodos(); | 160 | QPtrList<Todo> selectedTodos(); |
147 | 161 | ||
148 | DateList selectedDates() | 162 | DateList selectedDates() |
149 | {DateList q; | 163 | {DateList q; |
150 | return q;} | 164 | return q;} |
151 | 165 | ||
152 | /** Return number of shown dates. TodoView does not show dates, */ | 166 | /** Return number of shown dates. TodoView does not show dates, */ |
153 | int currentDateCount() { return 0; } | 167 | int currentDateCount() { return 0; } |
154 | 168 | ||
155 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); | 169 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); |
156 | 170 | ||
157 | void setDocumentId( const QString & ); | 171 | void setDocumentId( const QString & ); |
158 | 172 | ||
159 | void saveLayout(KConfig *config, const QString &group) const; | 173 | void saveLayout(KConfig *config, const QString &group) const; |
160 | void restoreLayout(KConfig *config, const QString &group); | 174 | void restoreLayout(KConfig *config, const QString &group); |
161 | /** Create a popup menu to set categories */ | 175 | /** Create a popup menu to set categories */ |
162 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); | 176 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); |
163 | void setNavigator( DateNavigator* nav ) {mNavigator = nav;} | 177 | void setNavigator( DateNavigator* nav ) {mNavigator = nav;} |
164 | QString getWhatsThisText(QPoint p); | 178 | QString getWhatsThisText(QPoint p); |
165 | void clearList() {mTodoListView->clear(); } | 179 | void clearList() {mTodoListView->clear(); } |
166 | 180 | ||
167 | public slots: | 181 | public slots: |
168 | void updateView(); | 182 | void updateView(); |
169 | void updateConfig(); | 183 | void updateConfig(); |
170 | 184 | ||
171 | void changeEventDisplay(Event *, int); | 185 | void changeEventDisplay(Event *, int); |
172 | 186 | ||
173 | void showDates(const QDate &start, const QDate &end); | 187 | void showDates(const QDate &start, const QDate &end); |
174 | void showEvents(QPtrList<Event> eventList); | 188 | void showEvents(QPtrList<Event> eventList); |
175 | 189 | ||
176 | void clearSelection(); | 190 | void clearSelection(); |
177 | void jumpToDate (); | 191 | void jumpToDate (); |
178 | 192 | ||
179 | void editItem(QListViewItem *item); | 193 | void editItem(QListViewItem *item); |
180 | void showItem(QListViewItem *item,const QPoint &,int); | 194 | void showItem(QListViewItem *item,const QPoint &,int); |
181 | void popupMenu(QListViewItem *item,const QPoint &,int); | 195 | void popupMenu(QListViewItem *item,const QPoint &,int); |
182 | void newTodo(); | 196 | void newTodo(); |
183 | void newSubTodo(); | 197 | void newSubTodo(); |
184 | void unparentTodo(); | 198 | void unparentTodo(); |
185 | void reparentTodo(); | 199 | void reparentTodo(); |
186 | void showTodo(); | 200 | void showTodo(); |
187 | void editTodo(); | 201 | void editTodo(); |
188 | void cloneTodo(); | 202 | void cloneTodo(); |
189 | void cancelTodo(); | 203 | void cancelTodo(); |
190 | void moveTodo(); | 204 | void moveTodo(); |
191 | void beamTodo(); | 205 | void beamTodo(); |
192 | void deleteTodo(); | 206 | void deleteTodo(); |
193 | 207 | ||
194 | void setNewPriority(int); | 208 | void setNewPriority(int); |
195 | void setNewPercentage(int); | 209 | void setNewPercentage(int); |
196 | void changedCategories(int); | 210 | void changedCategories(int); |
197 | 211 | ||
198 | void setAllOpen(); | 212 | void setAllOpen(); |
199 | void setAllClose(); | 213 | void setAllClose(); |
200 | void setAllFlat(); | 214 | void setAllFlat(); |
201 | void displayAllFlat(); | 215 | void displayAllFlat(); |
202 | 216 | ||
203 | void purgeCompleted(); | 217 | void purgeCompleted(); |
204 | void toggleCompleted(); | 218 | void toggleCompleted(); |
205 | void toggleRunning(); | 219 | void toggleRunning(); |
206 | void toggleQuickTodo(); | 220 | void toggleQuickTodo(); |
207 | void updateTodo( Todo *, int ); | 221 | void updateTodo( Todo *, int ); |
208 | 222 | ||
209 | void itemClicked(QListViewItem *); | 223 | void itemClicked(QListViewItem *); |
210 | void itemStateChanged(QListViewItem *); | 224 | void itemStateChanged(QListViewItem *); |
211 | void modified(bool); | 225 | void modified(bool); |
212 | void itemDoubleClicked(QListViewItem *item); | 226 | void itemDoubleClicked(QListViewItem *item); |
213 | 227 | ||
214 | signals: | 228 | signals: |
215 | void newTodoSignal(); | 229 | void newTodoSignal(); |
216 | void newSubTodoSignal(Todo *); | 230 | void newSubTodoSignal(Todo *); |
217 | void unparentTodoSignal(Todo *); | 231 | void unparentTodoSignal(Todo *); |
218 | void reparentTodoSignal( Todo *,Todo * ); | 232 | void reparentTodoSignal( Todo *,Todo * ); |
219 | void showTodoSignal(Todo *); | 233 | void showTodoSignal(Todo *); |
220 | 234 | ||
221 | void editTodoSignal(Todo *); | 235 | void editTodoSignal(Todo *); |
222 | void deleteTodoSignal(Todo *); | 236 | void deleteTodoSignal(Todo *); |
223 | void todoModifiedSignal (Todo *, int); | 237 | void todoModifiedSignal (Todo *, int); |
224 | 238 | ||
225 | void isModified(bool); | 239 | void isModified(bool); |
226 | void cloneTodoSignal( Incidence * ); | 240 | void cloneTodoSignal( Incidence * ); |
227 | void cancelTodoSignal( Incidence * ); | 241 | void cancelTodoSignal( Incidence * ); |
228 | void moveTodoSignal( Incidence * ); | 242 | void moveTodoSignal( Incidence * ); |
229 | void beamTodoSignal( Incidence * ); | 243 | void beamTodoSignal( Incidence * ); |
230 | void purgeCompletedSignal(); | 244 | void purgeCompletedSignal(); |
231 | 245 | ||
232 | protected slots: | 246 | protected slots: |
233 | void toggleRunningItem(); | 247 | void toggleRunningItem(); |
234 | void paintNeeded(); | 248 | void paintNeeded(); |
235 | void processSelectionChange(); | 249 | void processSelectionChange(); |
236 | void addQuickTodo(); | 250 | void addQuickTodo(); |
237 | void setTodoModified( Todo* ); | 251 | void setTodoModified( Todo* ); |
238 | void todoModified(Todo *, int ); | 252 | void todoModified(Todo *, int ); |
239 | 253 | ||
240 | private: | 254 | private: |
241 | /* | 255 | /* |
242 | * the TodoEditor approach is rather unscaling in the long | 256 | * the TodoEditor approach is rather unscaling in the long |
243 | * run. | 257 | * run. |
244 | * Korganizer keeps it in memory and we need to update | 258 | * Korganizer keeps it in memory and we need to update |
245 | * 1. make KOTodoViewItem a QObject again? | 259 | * 1. make KOTodoViewItem a QObject again? |
246 | * 2. add a public method for setting one todo modified? | 260 | * 2. add a public method for setting one todo modified? |
247 | * 3. add a private method for setting a todo modified + friend here? | 261 | * 3. add a private method for setting a todo modified + friend here? |
248 | * -- zecke 2002-07-08 | 262 | * -- zecke 2002-07-08 |
249 | */ | 263 | */ |
250 | KOTodoViewWhatsThis* mKOTodoViewWhatsThis; | 264 | KOTodoViewWhatsThis* mKOTodoViewWhatsThis; |
251 | friend class KOTodoListView; | 265 | friend class KOTodoListView; |
252 | void paintEvent(QPaintEvent * pevent); | 266 | void paintEvent(QPaintEvent * pevent); |
253 | bool mPendingUpdateBeforeRepaint; | 267 | bool mPendingUpdateBeforeRepaint; |
254 | friend class KOTodoViewItem; | 268 | friend class KOTodoViewItem; |
255 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); | 269 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); |
256 | void restoreItemState( QListViewItem * ); | 270 | void restoreItemState( QListViewItem * ); |
257 | 271 | ||
258 | bool checkTodo( Todo * ); | 272 | bool checkTodo( Todo * ); |
259 | bool isFlatDisplay; | 273 | bool isFlatDisplay; |
260 | void setOpen( QListViewItem*, bool setOpen); | 274 | void setOpen( QListViewItem*, bool setOpen); |
261 | KOTodoListView *mTodoListView; | 275 | KOTodoListView *mTodoListView; |
262 | QPopupMenu *mItemPopupMenu; | 276 | QPopupMenu *mItemPopupMenu; |
263 | QPopupMenu *mPopupMenu; | 277 | QPopupMenu *mPopupMenu; |
264 | QPopupMenu *mPriorityPopupMenu; | 278 | QPopupMenu *mPriorityPopupMenu; |
265 | QPopupMenu *mPercentageCompletedPopupMenu; | 279 | QPopupMenu *mPercentageCompletedPopupMenu; |
266 | QPopupMenu *mCategoryPopupMenu; | 280 | QPopupMenu *mCategoryPopupMenu; |
267 | 281 | ||
268 | QMap<int, int> mPercentage; | 282 | QMap<int, int> mPercentage; |
269 | QMap<int, int> mPriority; | 283 | QMap<int, int> mPriority; |
270 | QMap<int, QString> mCategory; | 284 | QMap<int, QString> mCategory; |
271 | KOTodoViewItem *mActiveItem; | 285 | KOTodoViewItem *mActiveItem; |
272 | 286 | ||
273 | QMap<Todo *,KOTodoViewItem *> mTodoMap; | 287 | QMap<Todo *,KOTodoViewItem *> mTodoMap; |
274 | QString mName; | 288 | QString mName; |
275 | 289 | ||
276 | DocPrefs *mDocPrefs; | 290 | DocPrefs *mDocPrefs; |
277 | QString mCurrentDoc; | 291 | QString mCurrentDoc; |
278 | KOQuickTodo *mQuickAdd; | 292 | KOQuickTodo *mQuickAdd; |
279 | bool mBlockUpdate; | 293 | bool mBlockUpdate; |
280 | void keyPressEvent ( QKeyEvent * ) ; | 294 | void keyPressEvent ( QKeyEvent * ) ; |
281 | KOTodoViewItem * pendingSubtodo; | 295 | KOTodoViewItem * pendingSubtodo; |
282 | DateNavigator* mNavigator; | 296 | DateNavigator* mNavigator; |
283 | void storeCurrentItem(); | 297 | void storeCurrentItem(); |
284 | void resetCurrentItem(); | 298 | void resetCurrentItem(); |
285 | Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove; | 299 | Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove; |
286 | }; | 300 | }; |
287 | 301 | ||
288 | #endif | 302 | #endif |
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 3b7b183..2efa355 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -1,375 +1,376 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | Copyright (c) 1998 Preston Brown | 3 | Copyright (c) 1998 Preston Brown |
4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This library is free software; you can redistribute it and/or | 6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Library General Public | 7 | modify it under the terms of the GNU Library General Public |
8 | License as published by the Free Software Foundation; either | 8 | License as published by the Free Software Foundation; either |
9 | version 2 of the License, or (at your option) any later version. | 9 | version 2 of the License, or (at your option) any later version. |
10 | 10 | ||
11 | This library is distributed in the hope that it will be useful, | 11 | This library 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 GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | Library General Public License for more details. | 14 | Library General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU Library General Public License | 16 | You should have received a copy of the GNU Library General Public License |
17 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. | 19 | Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef CALENDAR_H | 22 | #ifndef CALENDAR_H |
23 | #define CALENDAR_H | 23 | #define CALENDAR_H |
24 | 24 | ||
25 | #include <qobject.h> | 25 | #include <qobject.h> |
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qptrlist.h> | 28 | #include <qptrlist.h> |
29 | #include <qdict.h> | 29 | #include <qdict.h> |
30 | 30 | ||
31 | #include "customproperties.h" | 31 | #include "customproperties.h" |
32 | #include "event.h" | 32 | #include "event.h" |
33 | #include "todo.h" | 33 | #include "todo.h" |
34 | #include "journal.h" | 34 | #include "journal.h" |
35 | #include "calfilter.h" | 35 | #include "calfilter.h" |
36 | 36 | ||
37 | //#define _TIME_ZONE "-0500" /* hardcoded, overridden in config file. */ | 37 | //#define _TIME_ZONE "-0500" /* hardcoded, overridden in config file. */ |
38 | 38 | ||
39 | class KConfig; | 39 | class KConfig; |
40 | 40 | ||
41 | namespace KCal { | 41 | namespace KCal { |
42 | 42 | ||
43 | 43 | ||
44 | /** | 44 | /** |
45 | This is the main "calendar" object class for KOrganizer. It holds | 45 | This is the main "calendar" object class for KOrganizer. It holds |
46 | information like all appointments/events, user information, etc. etc. | 46 | information like all appointments/events, user information, etc. etc. |
47 | one calendar is associated with each CalendarView (@see calendarview.h). | 47 | one calendar is associated with each CalendarView (@see calendarview.h). |
48 | This is an abstract base class defining the interface to a calendar. It is | 48 | This is an abstract base class defining the interface to a calendar. It is |
49 | implemented by subclasses like @see CalendarLocal, which use different | 49 | implemented by subclasses like @see CalendarLocal, which use different |
50 | methods to store and access the data. | 50 | methods to store and access the data. |
51 | 51 | ||
52 | Ownership of events etc. is handled by the following policy: As soon as an | 52 | Ownership of events etc. is handled by the following policy: As soon as an |
53 | event (or any other subclass of IncidenceBase) object is added to the | 53 | event (or any other subclass of IncidenceBase) object is added to the |
54 | Calendar by addEvent() it is owned by the Calendar object. The Calendar takes | 54 | Calendar by addEvent() it is owned by the Calendar object. The Calendar takes |
55 | care of deleting it. All Events returned by the query functions are returned | 55 | care of deleting it. All Events returned by the query functions are returned |
56 | as pointers, that means all changes to the returned events are immediately | 56 | as pointers, that means all changes to the returned events are immediately |
57 | visible in the Calendar. You shouldn't delete any Event object you get from | 57 | visible in the Calendar. You shouldn't delete any Event object you get from |
58 | Calendar. | 58 | Calendar. |
59 | */ | 59 | */ |
60 | class Calendar : public QObject, public CustomProperties, | 60 | class Calendar : public QObject, public CustomProperties, |
61 | public IncidenceBase::Observer | 61 | public IncidenceBase::Observer |
62 | { | 62 | { |
63 | Q_OBJECT | 63 | Q_OBJECT |
64 | public: | 64 | public: |
65 | Calendar(); | 65 | Calendar(); |
66 | Calendar(const QString &timeZoneId); | 66 | Calendar(const QString &timeZoneId); |
67 | virtual ~Calendar(); | 67 | virtual ~Calendar(); |
68 | Incidence * undoIncidence() { return mUndoIncidence; }; | 68 | Incidence * undoIncidence() { return mUndoIncidence; }; |
69 | bool undoDeleteIncidence(); | 69 | bool undoDeleteIncidence(); |
70 | void deleteIncidence(Incidence *in); | 70 | void deleteIncidence(Incidence *in); |
71 | void resetTempSyncStat(); | 71 | void resetTempSyncStat(); |
72 | void resetPilotStat(int id); | 72 | void resetPilotStat(int id); |
73 | /** | 73 | /** |
74 | Clears out the current calendar, freeing all used memory etc. | 74 | Clears out the current calendar, freeing all used memory etc. |
75 | */ | 75 | */ |
76 | virtual void close() = 0; | 76 | virtual void close() = 0; |
77 | virtual void addCalendar( Calendar* ) = 0; | 77 | virtual void addCalendar( Calendar* ) = 0; |
78 | virtual bool addCalendarFile( QString name, int id ) = 0; | 78 | virtual bool addCalendarFile( QString name, int id ) = 0; |
79 | virtual void setSyncEventsReadOnly() = 0; | 79 | virtual void setSyncEventsReadOnly() = 0; |
80 | virtual void stopAllTodos() = 0; | ||
80 | 81 | ||
81 | /** | 82 | /** |
82 | Sync changes in memory to persistant storage. | 83 | Sync changes in memory to persistant storage. |
83 | */ | 84 | */ |
84 | virtual void save() = 0; | 85 | virtual void save() = 0; |
85 | virtual QPtrList<Event> getExternLastSyncEvents() = 0; | 86 | virtual QPtrList<Event> getExternLastSyncEvents() = 0; |
86 | virtual void removeSyncInfo( QString syncProfile) = 0; | 87 | virtual void removeSyncInfo( QString syncProfile) = 0; |
87 | virtual bool isSaving() { return false; } | 88 | virtual bool isSaving() { return false; } |
88 | 89 | ||
89 | /** | 90 | /** |
90 | Return the owner of the calendar's full name. | 91 | Return the owner of the calendar's full name. |
91 | */ | 92 | */ |
92 | const QString &getOwner() const; | 93 | const QString &getOwner() const; |
93 | /** | 94 | /** |
94 | Set the owner of the calendar. Should be owner's full name. | 95 | Set the owner of the calendar. Should be owner's full name. |
95 | */ | 96 | */ |
96 | void setOwner( const QString &os ); | 97 | void setOwner( const QString &os ); |
97 | /** | 98 | /** |
98 | Return the email address of the calendar owner. | 99 | Return the email address of the calendar owner. |
99 | */ | 100 | */ |
100 | const QString &getEmail(); | 101 | const QString &getEmail(); |
101 | /** | 102 | /** |
102 | Set the email address of the calendar owner. | 103 | Set the email address of the calendar owner. |
103 | */ | 104 | */ |
104 | void setEmail( const QString & ); | 105 | void setEmail( const QString & ); |
105 | 106 | ||
106 | /** | 107 | /** |
107 | Set time zone from a timezone string (e.g. -2:00) | 108 | Set time zone from a timezone string (e.g. -2:00) |
108 | */ | 109 | */ |
109 | void setTimeZone( const QString &tz ); | 110 | void setTimeZone( const QString &tz ); |
110 | /** | 111 | /** |
111 | Set time zone from a minutes value (e.g. -60) | 112 | Set time zone from a minutes value (e.g. -60) |
112 | */ | 113 | */ |
113 | void setTimeZone( int tz ); | 114 | void setTimeZone( int tz ); |
114 | /** | 115 | /** |
115 | Return time zone as offest in minutes. | 116 | Return time zone as offest in minutes. |
116 | */ | 117 | */ |
117 | int getTimeZone() const; | 118 | int getTimeZone() const; |
118 | /** | 119 | /** |
119 | Compute an ISO 8601 format string from the time zone. | 120 | Compute an ISO 8601 format string from the time zone. |
120 | */ | 121 | */ |
121 | QString getTimeZoneStr() const; | 122 | QString getTimeZoneStr() const; |
122 | /** | 123 | /** |
123 | Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal | 124 | Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal |
124 | values). | 125 | values). |
125 | */ | 126 | */ |
126 | void setTimeZoneId( const QString & ); | 127 | void setTimeZoneId( const QString & ); |
127 | /** | 128 | /** |
128 | Return time zone id. | 129 | Return time zone id. |
129 | */ | 130 | */ |
130 | QString timeZoneId() const; | 131 | QString timeZoneId() const; |
131 | /** | 132 | /** |
132 | Use local time, not UTC or a time zone. | 133 | Use local time, not UTC or a time zone. |
133 | */ | 134 | */ |
134 | void setLocalTime(); | 135 | void setLocalTime(); |
135 | /** | 136 | /** |
136 | Return whether local time is being used. | 137 | Return whether local time is being used. |
137 | */ | 138 | */ |
138 | bool isLocalTime() const; | 139 | bool isLocalTime() const; |
139 | 140 | ||
140 | /** | 141 | /** |
141 | Add an incidence to calendar. | 142 | Add an incidence to calendar. |
142 | 143 | ||
143 | @return true on success, false on error. | 144 | @return true on success, false on error. |
144 | */ | 145 | */ |
145 | virtual bool addIncidence( Incidence * ); | 146 | virtual bool addIncidence( Incidence * ); |
146 | 147 | ||
147 | // Adds an incidence and all relatedto incidences to the cal | 148 | // Adds an incidence and all relatedto incidences to the cal |
148 | void addIncidenceBranch( Incidence * ); | 149 | void addIncidenceBranch( Incidence * ); |
149 | /** | 150 | /** |
150 | Return filtered list of all incidences of this calendar. | 151 | Return filtered list of all incidences of this calendar. |
151 | */ | 152 | */ |
152 | virtual QPtrList<Incidence> incidences(); | 153 | virtual QPtrList<Incidence> incidences(); |
153 | 154 | ||
154 | /** | 155 | /** |
155 | Return unfiltered list of all incidences of this calendar. | 156 | Return unfiltered list of all incidences of this calendar. |
156 | */ | 157 | */ |
157 | virtual QPtrList<Incidence> rawIncidences(); | 158 | virtual QPtrList<Incidence> rawIncidences(); |
158 | 159 | ||
159 | /** | 160 | /** |
160 | Adds a Event to this calendar object. | 161 | Adds a Event to this calendar object. |
161 | @param anEvent a pointer to the event to add | 162 | @param anEvent a pointer to the event to add |
162 | 163 | ||
163 | @return true on success, false on error. | 164 | @return true on success, false on error. |
164 | */ | 165 | */ |
165 | virtual bool addEventNoDup( Event *event ) = 0; | 166 | virtual bool addEventNoDup( Event *event ) = 0; |
166 | virtual bool addAnniversaryNoDup( Event *event ) = 0; | 167 | virtual bool addAnniversaryNoDup( Event *event ) = 0; |
167 | virtual bool addEvent( Event *anEvent ) = 0; | 168 | virtual bool addEvent( Event *anEvent ) = 0; |
168 | /** | 169 | /** |
169 | Delete event from calendar. | 170 | Delete event from calendar. |
170 | */ | 171 | */ |
171 | virtual void deleteEvent( Event * ) = 0; | 172 | virtual void deleteEvent( Event * ) = 0; |
172 | /** | 173 | /** |
173 | Retrieves an event on the basis of the unique string ID. | 174 | Retrieves an event on the basis of the unique string ID. |
174 | */ | 175 | */ |
175 | virtual Event *event( const QString &UniqueStr ) = 0; | 176 | virtual Event *event( const QString &UniqueStr ) = 0; |
176 | virtual Event *event( QString, QString ) = 0; | 177 | virtual Event *event( QString, QString ) = 0; |
177 | /** | 178 | /** |
178 | Builds and then returns a list of all events that match for the | 179 | Builds and then returns a list of all events that match for the |
179 | date specified. useful for dayView, etc. etc. | 180 | date specified. useful for dayView, etc. etc. |
180 | The calendar filter is applied. | 181 | The calendar filter is applied. |
181 | */ | 182 | */ |
182 | QPtrList<Event> events( const QDate &date, bool sorted = false); | 183 | QPtrList<Event> events( const QDate &date, bool sorted = false); |
183 | /** | 184 | /** |
184 | Get events, which occur on the given date. | 185 | Get events, which occur on the given date. |
185 | The calendar filter is applied. | 186 | The calendar filter is applied. |
186 | */ | 187 | */ |
187 | QPtrList<Event> events( const QDateTime &qdt ); | 188 | QPtrList<Event> events( const QDateTime &qdt ); |
188 | /** | 189 | /** |
189 | Get events in a range of dates. If inclusive is set to true, only events | 190 | Get events in a range of dates. If inclusive is set to true, only events |
190 | are returned, which are completely included in the range. | 191 | are returned, which are completely included in the range. |
191 | The calendar filter is applied. | 192 | The calendar filter is applied. |
192 | */ | 193 | */ |
193 | QPtrList<Event> events( const QDate &start, const QDate &end, | 194 | QPtrList<Event> events( const QDate &start, const QDate &end, |
194 | bool inclusive = false); | 195 | bool inclusive = false); |
195 | /** | 196 | /** |
196 | Return filtered list of all events in calendar. | 197 | Return filtered list of all events in calendar. |
197 | */ | 198 | */ |
198 | virtual QPtrList<Event> events(); | 199 | virtual QPtrList<Event> events(); |
199 | /** | 200 | /** |
200 | Return unfiltered list of all events in calendar. | 201 | Return unfiltered list of all events in calendar. |
201 | */ | 202 | */ |
202 | virtual QPtrList<Event> rawEvents() = 0; | 203 | virtual QPtrList<Event> rawEvents() = 0; |
203 | 204 | ||
204 | /** | 205 | /** |
205 | Add a todo to the todolist. | 206 | Add a todo to the todolist. |
206 | 207 | ||
207 | @return true on success, false on error. | 208 | @return true on success, false on error. |
208 | */ | 209 | */ |
209 | virtual bool addTodo( Todo *todo ) = 0; | 210 | virtual bool addTodo( Todo *todo ) = 0; |
210 | virtual bool addTodoNoDup( Todo *todo ) = 0; | 211 | virtual bool addTodoNoDup( Todo *todo ) = 0; |
211 | /** | 212 | /** |
212 | Remove a todo from the todolist. | 213 | Remove a todo from the todolist. |
213 | */ | 214 | */ |
214 | virtual void deleteTodo( Todo * ) = 0; | 215 | virtual void deleteTodo( Todo * ) = 0; |
215 | virtual void deleteJournal( Journal * ) = 0; | 216 | virtual void deleteJournal( Journal * ) = 0; |
216 | /** | 217 | /** |
217 | Return filterd list of todos. | 218 | Return filterd list of todos. |
218 | */ | 219 | */ |
219 | virtual QPtrList<Todo> todos(); | 220 | virtual QPtrList<Todo> todos(); |
220 | /** | 221 | /** |
221 | Searches todolist for an event with this unique string identifier, | 222 | Searches todolist for an event with this unique string identifier, |
222 | returns a pointer or null. | 223 | returns a pointer or null. |
223 | */ | 224 | */ |
224 | virtual Todo *todo( const QString &uid ) = 0; | 225 | virtual Todo *todo( const QString &uid ) = 0; |
225 | virtual Todo *todo( QString, QString ) = 0; | 226 | virtual Todo *todo( QString, QString ) = 0; |
226 | /** | 227 | /** |
227 | Returns list of todos due on the specified date. | 228 | Returns list of todos due on the specified date. |
228 | */ | 229 | */ |
229 | virtual QPtrList<Todo> todos( const QDate &date ) = 0; | 230 | virtual QPtrList<Todo> todos( const QDate &date ) = 0; |
230 | /** | 231 | /** |
231 | Return unfiltered list of todos. | 232 | Return unfiltered list of todos. |
232 | */ | 233 | */ |
233 | virtual QPtrList<Todo> rawTodos() = 0; | 234 | virtual QPtrList<Todo> rawTodos() = 0; |
234 | 235 | ||
235 | /** | 236 | /** |
236 | Add a Journal entry to calendar. | 237 | Add a Journal entry to calendar. |
237 | 238 | ||
238 | @return true on success, false on error. | 239 | @return true on success, false on error. |
239 | */ | 240 | */ |
240 | virtual bool addJournal( Journal * ) = 0; | 241 | virtual bool addJournal( Journal * ) = 0; |
241 | /** | 242 | /** |
242 | Return Journal for given date. | 243 | Return Journal for given date. |
243 | */ | 244 | */ |
244 | virtual Journal *journal( const QDate & ) = 0; | 245 | virtual Journal *journal( const QDate & ) = 0; |
245 | /** | 246 | /** |
246 | Return Journal with given UID. | 247 | Return Journal with given UID. |
247 | */ | 248 | */ |
248 | virtual Journal *journal( const QString &UID ) = 0; | 249 | virtual Journal *journal( const QString &UID ) = 0; |
249 | /** | 250 | /** |
250 | Return list of all Journal entries. | 251 | Return list of all Journal entries. |
251 | */ | 252 | */ |
252 | virtual QPtrList<Journal> journals() = 0; | 253 | virtual QPtrList<Journal> journals() = 0; |
253 | 254 | ||
254 | /** | 255 | /** |
255 | Searches all incidence types for an incidence with this unique | 256 | Searches all incidence types for an incidence with this unique |
256 | string identifier, returns a pointer or null. | 257 | string identifier, returns a pointer or null. |
257 | */ | 258 | */ |
258 | Incidence* incidence( const QString&UID ); | 259 | Incidence* incidence( const QString&UID ); |
259 | 260 | ||
260 | /** | 261 | /** |
261 | Setup relations for an incidence. | 262 | Setup relations for an incidence. |
262 | */ | 263 | */ |
263 | virtual void setupRelations( Incidence * ); | 264 | virtual void setupRelations( Incidence * ); |
264 | /** | 265 | /** |
265 | Remove all relations to an incidence | 266 | Remove all relations to an incidence |
266 | */ | 267 | */ |
267 | virtual void removeRelations( Incidence * ); | 268 | virtual void removeRelations( Incidence * ); |
268 | 269 | ||
269 | /** | 270 | /** |
270 | Set calendar filter, which filters events for the events() functions. | 271 | Set calendar filter, which filters events for the events() functions. |
271 | The Filter object is owned by the caller. | 272 | The Filter object is owned by the caller. |
272 | */ | 273 | */ |
273 | void setFilter( CalFilter * ); | 274 | void setFilter( CalFilter * ); |
274 | /** | 275 | /** |
275 | Return calendar filter. | 276 | Return calendar filter. |
276 | */ | 277 | */ |
277 | CalFilter *filter(); | 278 | CalFilter *filter(); |
278 | virtual QDateTime nextAlarm( int daysTo ) = 0; | 279 | virtual QDateTime nextAlarm( int daysTo ) = 0; |
279 | virtual QString nextSummary( ) const = 0; | 280 | virtual QString nextSummary( ) const = 0; |
280 | virtual void reInitAlarmSettings() = 0; | 281 | virtual void reInitAlarmSettings() = 0; |
281 | virtual QDateTime nextAlarmEventDateTime() const = 0; | 282 | virtual QDateTime nextAlarmEventDateTime() const = 0; |
282 | virtual void checkAlarmForIncidence( Incidence *, bool ) = 0; | 283 | virtual void checkAlarmForIncidence( Incidence *, bool ) = 0; |
283 | /** | 284 | /** |
284 | Return all alarms, which ocur in the given time interval. | 285 | Return all alarms, which ocur in the given time interval. |
285 | */ | 286 | */ |
286 | virtual Alarm::List alarms( const QDateTime &from, | 287 | virtual Alarm::List alarms( const QDateTime &from, |
287 | const QDateTime &to ) = 0; | 288 | const QDateTime &to ) = 0; |
288 | 289 | ||
289 | class Observer { | 290 | class Observer { |
290 | public: | 291 | public: |
291 | virtual void calendarModified( bool, Calendar * ) = 0; | 292 | virtual void calendarModified( bool, Calendar * ) = 0; |
292 | }; | 293 | }; |
293 | 294 | ||
294 | void registerObserver( Observer * ); | 295 | void registerObserver( Observer * ); |
295 | 296 | ||
296 | void setModified( bool ); | 297 | void setModified( bool ); |
297 | 298 | ||
298 | /** | 299 | /** |
299 | Set product id returned by loadedProductId(). This function is only | 300 | Set product id returned by loadedProductId(). This function is only |
300 | useful for the calendar loading code. | 301 | useful for the calendar loading code. |
301 | */ | 302 | */ |
302 | void setLoadedProductId( const QString & ); | 303 | void setLoadedProductId( const QString & ); |
303 | /** | 304 | /** |
304 | Return product id taken from file that has been loaded. Returns | 305 | Return product id taken from file that has been loaded. Returns |
305 | QString::null, if no calendar has been loaded. | 306 | QString::null, if no calendar has been loaded. |
306 | */ | 307 | */ |
307 | QString loadedProductId(); | 308 | QString loadedProductId(); |
308 | int defaultCalendar(); | 309 | int defaultCalendar(); |
309 | void setDontDeleteIncidencesOnClose (); | 310 | void setDontDeleteIncidencesOnClose (); |
310 | public slots: | 311 | public slots: |
311 | void setDefaultCalendar( int ); | 312 | void setDefaultCalendar( int ); |
312 | virtual void setCalendarEnabled( int id, bool enable ) = 0; | 313 | virtual void setCalendarEnabled( int id, bool enable ) = 0; |
313 | virtual void setAlarmEnabled( int id, bool enable ) = 0; | 314 | virtual void setAlarmEnabled( int id, bool enable ) = 0; |
314 | virtual void setReadOnly( int id, bool enable ) = 0; | 315 | virtual void setReadOnly( int id, bool enable ) = 0; |
315 | virtual void setDefaultCalendarEnabledOnly() = 0; | 316 | virtual void setDefaultCalendarEnabledOnly() = 0; |
316 | virtual void setCalendarRemove( int id ) = 0; | 317 | virtual void setCalendarRemove( int id ) = 0; |
317 | signals: | 318 | signals: |
318 | void calendarChanged(); | 319 | void calendarChanged(); |
319 | void calendarSaved(); | 320 | void calendarSaved(); |
320 | void calendarLoaded(); | 321 | void calendarLoaded(); |
321 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 322 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
322 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 323 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
323 | 324 | ||
324 | protected: | 325 | protected: |
325 | /** | 326 | /** |
326 | Get unfiltered events, which occur on the given date. | 327 | Get unfiltered events, which occur on the given date. |
327 | */ | 328 | */ |
328 | virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; | 329 | virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; |
329 | /** | 330 | /** |
330 | Get unfiltered events, which occur on the given date. | 331 | Get unfiltered events, which occur on the given date. |
331 | */ | 332 | */ |
332 | virtual QPtrList<Event> rawEventsForDate( const QDate &date, | 333 | virtual QPtrList<Event> rawEventsForDate( const QDate &date, |
333 | bool sorted = false ) = 0; | 334 | bool sorted = false ) = 0; |
334 | /** | 335 | /** |
335 | Get events in a range of dates. If inclusive is set to true, only events | 336 | Get events in a range of dates. If inclusive is set to true, only events |
336 | are returned, which are completely included in the range. | 337 | are returned, which are completely included in the range. |
337 | */ | 338 | */ |
338 | virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, | 339 | virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, |
339 | bool inclusive = false ) = 0; | 340 | bool inclusive = false ) = 0; |
340 | 341 | ||
341 | Incidence *mNextAlarmIncidence; | 342 | Incidence *mNextAlarmIncidence; |
342 | Incidence *mUndoIncidence; | 343 | Incidence *mUndoIncidence; |
343 | int mDefaultCalendar; | 344 | int mDefaultCalendar; |
344 | bool mDeleteIncidencesOnClose; | 345 | bool mDeleteIncidencesOnClose; |
345 | 346 | ||
346 | private: | 347 | private: |
347 | void init(); | 348 | void init(); |
348 | 349 | ||
349 | QString mOwner; // who the calendar belongs to | 350 | QString mOwner; // who the calendar belongs to |
350 | QString mOwnerEmail; // email address of the owner | 351 | QString mOwnerEmail; // email address of the owner |
351 | int mTimeZone; // timezone OFFSET from GMT (MINUTES) | 352 | int mTimeZone; // timezone OFFSET from GMT (MINUTES) |
352 | bool mLocalTime; // use local time, not UTC or a time zone | 353 | bool mLocalTime; // use local time, not UTC or a time zone |
353 | 354 | ||
354 | 355 | ||
355 | CalFilter *mFilter; | 356 | CalFilter *mFilter; |
356 | CalFilter *mDefaultFilter; | 357 | CalFilter *mDefaultFilter; |
357 | 358 | ||
358 | 359 | ||
359 | QString mTimeZoneId; | 360 | QString mTimeZoneId; |
360 | 361 | ||
361 | Observer *mObserver; | 362 | Observer *mObserver; |
362 | bool mNewObserver; | 363 | bool mNewObserver; |
363 | 364 | ||
364 | bool mModified; | 365 | bool mModified; |
365 | 366 | ||
366 | QString mLoadedProductId; | 367 | QString mLoadedProductId; |
367 | 368 | ||
368 | // This list is used to put together related todos | 369 | // This list is used to put together related todos |
369 | QDict<Incidence> mOrphans; | 370 | QDict<Incidence> mOrphans; |
370 | QDict<Incidence> mOrphanUids; | 371 | QDict<Incidence> mOrphanUids; |
371 | }; | 372 | }; |
372 | 373 | ||
373 | } | 374 | } |
374 | 375 | ||
375 | #endif | 376 | #endif |
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 8c4dde1..18f1af8 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -1,917 +1,923 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | 3 | ||
4 | Copyright (c) 1998 Preston Brown | 4 | Copyright (c) 1998 Preston Brown |
5 | Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> | 5 | Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> |
6 | 6 | ||
7 | This library is free software; you can redistribute it and/or | 7 | This library is free software; you can redistribute it and/or |
8 | modify it under the terms of the GNU Library General Public | 8 | modify it under the terms of the GNU Library General Public |
9 | License as published by the Free Software Foundation; either | 9 | License as published by the Free Software Foundation; either |
10 | version 2 of the License, or (at your option) any later version. | 10 | version 2 of the License, or (at your option) any later version. |
11 | 11 | ||
12 | This library is distributed in the hope that it will be useful, | 12 | This library is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | Library General Public License for more details. | 15 | Library General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU Library General Public License | 17 | You should have received a copy of the GNU Library General Public License |
18 | along with this library; see the file COPYING.LIB. If not, write to | 18 | along with this library; see the file COPYING.LIB. If not, write to |
19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. | 20 | Boston, MA 02111-1307, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <qdatetime.h> | 23 | #include <qdatetime.h> |
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qptrlist.h> | 25 | #include <qptrlist.h> |
26 | 26 | ||
27 | #include <kdebug.h> | 27 | #include <kdebug.h> |
28 | #include <kconfig.h> | 28 | #include <kconfig.h> |
29 | #include <kglobal.h> | 29 | #include <kglobal.h> |
30 | #include <klocale.h> | 30 | #include <klocale.h> |
31 | 31 | ||
32 | #include "vcaldrag.h" | 32 | #include "vcaldrag.h" |
33 | #include "vcalformat.h" | 33 | #include "vcalformat.h" |
34 | #include "icalformat.h" | 34 | #include "icalformat.h" |
35 | #include "exceptions.h" | 35 | #include "exceptions.h" |
36 | #include "incidence.h" | 36 | #include "incidence.h" |
37 | #include "journal.h" | 37 | #include "journal.h" |
38 | #include "filestorage.h" | 38 | #include "filestorage.h" |
39 | #include "calfilter.h" | 39 | #include "calfilter.h" |
40 | 40 | ||
41 | #include "calendarlocal.h" | 41 | #include "calendarlocal.h" |
42 | 42 | ||
43 | // #ifndef DESKTOP_VERSION | 43 | // #ifndef DESKTOP_VERSION |
44 | // #include <qtopia/alarmserver.h> | 44 | // #include <qtopia/alarmserver.h> |
45 | // #endif | 45 | // #endif |
46 | using namespace KCal; | 46 | using namespace KCal; |
47 | 47 | ||
48 | CalendarLocal::CalendarLocal() | 48 | CalendarLocal::CalendarLocal() |
49 | : Calendar() | 49 | : Calendar() |
50 | { | 50 | { |
51 | init(); | 51 | init(); |
52 | } | 52 | } |
53 | 53 | ||
54 | CalendarLocal::CalendarLocal(const QString &timeZoneId) | 54 | CalendarLocal::CalendarLocal(const QString &timeZoneId) |
55 | : Calendar(timeZoneId) | 55 | : Calendar(timeZoneId) |
56 | { | 56 | { |
57 | init(); | 57 | init(); |
58 | } | 58 | } |
59 | 59 | ||
60 | void CalendarLocal::init() | 60 | void CalendarLocal::init() |
61 | { | 61 | { |
62 | mNextAlarmIncidence = 0; | 62 | mNextAlarmIncidence = 0; |
63 | } | 63 | } |
64 | 64 | ||
65 | 65 | ||
66 | CalendarLocal::~CalendarLocal() | 66 | CalendarLocal::~CalendarLocal() |
67 | { | 67 | { |
68 | if ( mDeleteIncidencesOnClose ) | 68 | if ( mDeleteIncidencesOnClose ) |
69 | close(); | 69 | close(); |
70 | } | 70 | } |
71 | bool CalendarLocal::addCalendarFile( QString name, int id ) | 71 | bool CalendarLocal::addCalendarFile( QString name, int id ) |
72 | { | 72 | { |
73 | CalendarLocal calendar( timeZoneId() ); | 73 | CalendarLocal calendar( timeZoneId() ); |
74 | calendar.setDefaultCalendar( id ); | 74 | calendar.setDefaultCalendar( id ); |
75 | if ( calendar.load( name ) ) { | 75 | if ( calendar.load( name ) ) { |
76 | addCalendar( &calendar ); | 76 | addCalendar( &calendar ); |
77 | return true; | 77 | return true; |
78 | } | 78 | } |
79 | return false; | 79 | return false; |
80 | } | 80 | } |
81 | void CalendarLocal::setSyncEventsReadOnly() | 81 | void CalendarLocal::setSyncEventsReadOnly() |
82 | { | 82 | { |
83 | Event * ev; | 83 | Event * ev; |
84 | ev = mEventList.first(); | 84 | ev = mEventList.first(); |
85 | while ( ev ) { | 85 | while ( ev ) { |
86 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) | 86 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) |
87 | ev->setReadOnly( true ); | 87 | ev->setReadOnly( true ); |
88 | ev = mEventList.next(); | 88 | ev = mEventList.next(); |
89 | } | 89 | } |
90 | } | 90 | } |
91 | void CalendarLocal::addCalendar( Calendar* cal ) | 91 | void CalendarLocal::addCalendar( Calendar* cal ) |
92 | { | 92 | { |
93 | cal->setDontDeleteIncidencesOnClose(); | 93 | cal->setDontDeleteIncidencesOnClose(); |
94 | { | 94 | { |
95 | QPtrList<Event> EventList = cal->rawEvents(); | 95 | QPtrList<Event> EventList = cal->rawEvents(); |
96 | Event * ev = EventList.first(); | 96 | Event * ev = EventList.first(); |
97 | while ( ev ) { | 97 | while ( ev ) { |
98 | ev->unRegisterObserver( cal ); | 98 | ev->unRegisterObserver( cal ); |
99 | ev->registerObserver( this ); | 99 | ev->registerObserver( this ); |
100 | mEventList.append( ev ); | 100 | mEventList.append( ev ); |
101 | ev = EventList.next(); | 101 | ev = EventList.next(); |
102 | } | 102 | } |
103 | } | 103 | } |
104 | { | 104 | { |
105 | 105 | ||
106 | QPtrList<Todo> TodoList = cal->rawTodos(); | 106 | QPtrList<Todo> TodoList = cal->rawTodos(); |
107 | Todo * ev = TodoList.first(); | 107 | Todo * ev = TodoList.first(); |
108 | while ( ev ) { | 108 | while ( ev ) { |
109 | QString rel = ev->relatedToUid(); | 109 | QString rel = ev->relatedToUid(); |
110 | if ( !rel.isEmpty() ){ | 110 | if ( !rel.isEmpty() ){ |
111 | ev->setRelatedTo ( 0 ); | 111 | ev->setRelatedTo ( 0 ); |
112 | ev->setRelatedToUid( rel ); | 112 | ev->setRelatedToUid( rel ); |
113 | } | 113 | } |
114 | ev = TodoList.next(); | 114 | ev = TodoList.next(); |
115 | } | 115 | } |
116 | //TodoList = cal->rawTodos(); | 116 | //TodoList = cal->rawTodos(); |
117 | ev = TodoList.first(); | 117 | ev = TodoList.first(); |
118 | while ( ev ) { | 118 | while ( ev ) { |
119 | ev->unRegisterObserver( cal ); | 119 | ev->unRegisterObserver( cal ); |
120 | ev->registerObserver( this ); | 120 | ev->registerObserver( this ); |
121 | mTodoList.append( ev ); | 121 | mTodoList.append( ev ); |
122 | setupRelations( ev ); | 122 | setupRelations( ev ); |
123 | ev = TodoList.next(); | 123 | ev = TodoList.next(); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | { | 126 | { |
127 | QPtrList<Journal> JournalList = cal->journals(); | 127 | QPtrList<Journal> JournalList = cal->journals(); |
128 | Journal * ev = JournalList.first(); | 128 | Journal * ev = JournalList.first(); |
129 | while ( ev ) { | 129 | while ( ev ) { |
130 | ev->unRegisterObserver( cal ); | 130 | ev->unRegisterObserver( cal ); |
131 | ev->registerObserver( this ); | 131 | ev->registerObserver( this ); |
132 | mJournalList.append( ev ); | 132 | mJournalList.append( ev ); |
133 | ev = JournalList.next(); | 133 | ev = JournalList.next(); |
134 | } | 134 | } |
135 | } | 135 | } |
136 | setModified( true ); | 136 | setModified( true ); |
137 | } | 137 | } |
138 | bool CalendarLocal::load( const QString &fileName ) | 138 | bool CalendarLocal::load( const QString &fileName ) |
139 | { | 139 | { |
140 | FileStorage storage( this, fileName ); | 140 | FileStorage storage( this, fileName ); |
141 | return storage.load(); | 141 | return storage.load(); |
142 | } | 142 | } |
143 | 143 | ||
144 | bool CalendarLocal::save( const QString &fileName, CalFormat *format ) | 144 | bool CalendarLocal::save( const QString &fileName, CalFormat *format ) |
145 | { | 145 | { |
146 | FileStorage storage( this, fileName, format ); | 146 | FileStorage storage( this, fileName, format ); |
147 | return storage.save(); | 147 | return storage.save(); |
148 | } | 148 | } |
149 | 149 | ||
150 | void CalendarLocal::stopAllTodos() | ||
151 | { | ||
152 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | ||
153 | it->setRunning( false ); | ||
154 | |||
155 | } | ||
150 | void CalendarLocal::close() | 156 | void CalendarLocal::close() |
151 | { | 157 | { |
152 | 158 | ||
153 | Todo * i; | 159 | Todo * i; |
154 | for( i = mTodoList.first(); i; i = mTodoList.next() ) i->setRunning(false); | 160 | for( i = mTodoList.first(); i; i = mTodoList.next() ) i->setRunning(false); |
155 | 161 | ||
156 | mEventList.setAutoDelete( true ); | 162 | mEventList.setAutoDelete( true ); |
157 | mTodoList.setAutoDelete( true ); | 163 | mTodoList.setAutoDelete( true ); |
158 | mJournalList.setAutoDelete( false ); | 164 | mJournalList.setAutoDelete( false ); |
159 | 165 | ||
160 | mEventList.clear(); | 166 | mEventList.clear(); |
161 | mTodoList.clear(); | 167 | mTodoList.clear(); |
162 | mJournalList.clear(); | 168 | mJournalList.clear(); |
163 | 169 | ||
164 | mEventList.setAutoDelete( false ); | 170 | mEventList.setAutoDelete( false ); |
165 | mTodoList.setAutoDelete( false ); | 171 | mTodoList.setAutoDelete( false ); |
166 | mJournalList.setAutoDelete( false ); | 172 | mJournalList.setAutoDelete( false ); |
167 | 173 | ||
168 | setModified( false ); | 174 | setModified( false ); |
169 | } | 175 | } |
170 | 176 | ||
171 | bool CalendarLocal::addAnniversaryNoDup( Event *event ) | 177 | bool CalendarLocal::addAnniversaryNoDup( Event *event ) |
172 | { | 178 | { |
173 | QString cat; | 179 | QString cat; |
174 | bool isBirthday = true; | 180 | bool isBirthday = true; |
175 | if( event->categoriesStr() == i18n( "Anniversary" ) ) { | 181 | if( event->categoriesStr() == i18n( "Anniversary" ) ) { |
176 | isBirthday = false; | 182 | isBirthday = false; |
177 | cat = i18n( "Anniversary" ); | 183 | cat = i18n( "Anniversary" ); |
178 | } else if( event->categoriesStr() == i18n( "Birthday" ) ) { | 184 | } else if( event->categoriesStr() == i18n( "Birthday" ) ) { |
179 | isBirthday = true; | 185 | isBirthday = true; |
180 | cat = i18n( "Birthday" ); | 186 | cat = i18n( "Birthday" ); |
181 | } else { | 187 | } else { |
182 | qDebug("addAnniversaryNoDup called without fitting category! "); | 188 | qDebug("addAnniversaryNoDup called without fitting category! "); |
183 | return false; | 189 | return false; |
184 | } | 190 | } |
185 | Event * eve; | 191 | Event * eve; |
186 | for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { | 192 | for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { |
187 | if ( !(eve->categories().contains( cat ) )) | 193 | if ( !(eve->categories().contains( cat ) )) |
188 | continue; | 194 | continue; |
189 | // now we have an event with fitting category | 195 | // now we have an event with fitting category |
190 | if ( eve->dtStart().date() != event->dtStart().date() ) | 196 | if ( eve->dtStart().date() != event->dtStart().date() ) |
191 | continue; | 197 | continue; |
192 | // now we have an event with fitting category+date | 198 | // now we have an event with fitting category+date |
193 | if ( eve->summary() != event->summary() ) | 199 | if ( eve->summary() != event->summary() ) |
194 | continue; | 200 | continue; |
195 | // now we have an event with fitting category+date+summary | 201 | // now we have an event with fitting category+date+summary |
196 | return false; | 202 | return false; |
197 | } | 203 | } |
198 | return addEvent( event ); | 204 | return addEvent( event ); |
199 | 205 | ||
200 | } | 206 | } |
201 | bool CalendarLocal::addEventNoDup( Event *event ) | 207 | bool CalendarLocal::addEventNoDup( Event *event ) |
202 | { | 208 | { |
203 | Event * eve; | 209 | Event * eve; |
204 | for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { | 210 | for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { |
205 | if ( *eve == *event ) { | 211 | if ( *eve == *event ) { |
206 | //qDebug("CalendarLocal::Duplicate event found! Not inserted! "); | 212 | //qDebug("CalendarLocal::Duplicate event found! Not inserted! "); |
207 | return false; | 213 | return false; |
208 | } | 214 | } |
209 | } | 215 | } |
210 | return addEvent( event ); | 216 | return addEvent( event ); |
211 | } | 217 | } |
212 | 218 | ||
213 | bool CalendarLocal::addEvent( Event *event ) | 219 | bool CalendarLocal::addEvent( Event *event ) |
214 | { | 220 | { |
215 | insertEvent( event ); | 221 | insertEvent( event ); |
216 | 222 | ||
217 | event->registerObserver( this ); | 223 | event->registerObserver( this ); |
218 | 224 | ||
219 | setModified( true ); | 225 | setModified( true ); |
220 | event->setCalID( mDefaultCalendar ); | 226 | event->setCalID( mDefaultCalendar ); |
221 | event->setCalEnabled( true ); | 227 | event->setCalEnabled( true ); |
222 | 228 | ||
223 | return true; | 229 | return true; |
224 | } | 230 | } |
225 | 231 | ||
226 | void CalendarLocal::deleteEvent( Event *event ) | 232 | void CalendarLocal::deleteEvent( Event *event ) |
227 | { | 233 | { |
228 | if ( mUndoIncidence ) delete mUndoIncidence; | 234 | if ( mUndoIncidence ) delete mUndoIncidence; |
229 | mUndoIncidence = event->clone(); | 235 | mUndoIncidence = event->clone(); |
230 | if ( mEventList.removeRef( event ) ) { | 236 | if ( mEventList.removeRef( event ) ) { |
231 | setModified( true ); | 237 | setModified( true ); |
232 | } | 238 | } |
233 | } | 239 | } |
234 | 240 | ||
235 | 241 | ||
236 | Event *CalendarLocal::event( const QString &uid ) | 242 | Event *CalendarLocal::event( const QString &uid ) |
237 | { | 243 | { |
238 | Event *event; | 244 | Event *event; |
239 | Event *retVal = 0; | 245 | Event *retVal = 0; |
240 | for ( event = mEventList.first(); event; event = mEventList.next() ) { | 246 | for ( event = mEventList.first(); event; event = mEventList.next() ) { |
241 | if ( event->calEnabled() && event->uid() == uid ) { | 247 | if ( event->calEnabled() && event->uid() == uid ) { |
242 | if ( retVal ) { | 248 | if ( retVal ) { |
243 | if ( retVal->calID() > event->calID() ) { | 249 | if ( retVal->calID() > event->calID() ) { |
244 | retVal = event; | 250 | retVal = event; |
245 | } | 251 | } |
246 | } else { | 252 | } else { |
247 | retVal = event; | 253 | retVal = event; |
248 | } | 254 | } |
249 | } | 255 | } |
250 | } | 256 | } |
251 | return retVal; | 257 | return retVal; |
252 | } | 258 | } |
253 | bool CalendarLocal::addTodoNoDup( Todo *todo ) | 259 | bool CalendarLocal::addTodoNoDup( Todo *todo ) |
254 | { | 260 | { |
255 | Todo * eve; | 261 | Todo * eve; |
256 | for ( eve = mTodoList.first(); eve ; eve = mTodoList.next() ) { | 262 | for ( eve = mTodoList.first(); eve ; eve = mTodoList.next() ) { |
257 | if ( *eve == *todo ) { | 263 | if ( *eve == *todo ) { |
258 | //qDebug("duplicate todo found! not inserted! "); | 264 | //qDebug("duplicate todo found! not inserted! "); |
259 | return false; | 265 | return false; |
260 | } | 266 | } |
261 | } | 267 | } |
262 | return addTodo( todo ); | 268 | return addTodo( todo ); |
263 | } | 269 | } |
264 | bool CalendarLocal::addTodo( Todo *todo ) | 270 | bool CalendarLocal::addTodo( Todo *todo ) |
265 | { | 271 | { |
266 | mTodoList.append( todo ); | 272 | mTodoList.append( todo ); |
267 | 273 | ||
268 | todo->registerObserver( this ); | 274 | todo->registerObserver( this ); |
269 | 275 | ||
270 | // Set up subtask relations | 276 | // Set up subtask relations |
271 | setupRelations( todo ); | 277 | setupRelations( todo ); |
272 | 278 | ||
273 | setModified( true ); | 279 | setModified( true ); |
274 | todo->setCalID( mDefaultCalendar ); | 280 | todo->setCalID( mDefaultCalendar ); |
275 | todo->setCalEnabled( true ); | 281 | todo->setCalEnabled( true ); |
276 | return true; | 282 | return true; |
277 | } | 283 | } |
278 | 284 | ||
279 | void CalendarLocal::deleteTodo( Todo *todo ) | 285 | void CalendarLocal::deleteTodo( Todo *todo ) |
280 | { | 286 | { |
281 | // Handle orphaned children | 287 | // Handle orphaned children |
282 | if ( mUndoIncidence ) delete mUndoIncidence; | 288 | if ( mUndoIncidence ) delete mUndoIncidence; |
283 | removeRelations( todo ); | 289 | removeRelations( todo ); |
284 | mUndoIncidence = todo->clone(); | 290 | mUndoIncidence = todo->clone(); |
285 | 291 | ||
286 | if ( mTodoList.removeRef( todo ) ) { | 292 | if ( mTodoList.removeRef( todo ) ) { |
287 | setModified( true ); | 293 | setModified( true ); |
288 | } | 294 | } |
289 | } | 295 | } |
290 | 296 | ||
291 | QPtrList<Todo> CalendarLocal::rawTodos() | 297 | QPtrList<Todo> CalendarLocal::rawTodos() |
292 | { | 298 | { |
293 | QPtrList<Todo> el; | 299 | QPtrList<Todo> el; |
294 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 300 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
295 | if ( it->calEnabled() ) el.append( it ); | 301 | if ( it->calEnabled() ) el.append( it ); |
296 | return el; | 302 | return el; |
297 | } | 303 | } |
298 | Todo *CalendarLocal::todo( QString syncProf, QString id ) | 304 | Todo *CalendarLocal::todo( QString syncProf, QString id ) |
299 | { | 305 | { |
300 | Todo *todo; | 306 | Todo *todo; |
301 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | 307 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { |
302 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; | 308 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; |
303 | } | 309 | } |
304 | 310 | ||
305 | return 0; | 311 | return 0; |
306 | } | 312 | } |
307 | void CalendarLocal::removeSyncInfo( QString syncProfile) | 313 | void CalendarLocal::removeSyncInfo( QString syncProfile) |
308 | { | 314 | { |
309 | QPtrList<Incidence> all = rawIncidences() ; | 315 | QPtrList<Incidence> all = rawIncidences() ; |
310 | Incidence *inc; | 316 | Incidence *inc; |
311 | for ( inc = all.first(); inc; inc = all.next() ) { | 317 | for ( inc = all.first(); inc; inc = all.next() ) { |
312 | inc->removeID( syncProfile ); | 318 | inc->removeID( syncProfile ); |
313 | } | 319 | } |
314 | if ( syncProfile.isEmpty() ) { | 320 | if ( syncProfile.isEmpty() ) { |
315 | QPtrList<Event> el; | 321 | QPtrList<Event> el; |
316 | Event *todo; | 322 | Event *todo; |
317 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | 323 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { |
318 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) | 324 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) |
319 | el.append( todo ); | 325 | el.append( todo ); |
320 | } | 326 | } |
321 | for ( todo = el.first(); todo; todo = el.next() ) { | 327 | for ( todo = el.first(); todo; todo = el.next() ) { |
322 | deleteIncidence ( todo ); | 328 | deleteIncidence ( todo ); |
323 | } | 329 | } |
324 | } else { | 330 | } else { |
325 | Event *lse = event( "last-syncEvent-"+ syncProfile); | 331 | Event *lse = event( "last-syncEvent-"+ syncProfile); |
326 | if ( lse ) | 332 | if ( lse ) |
327 | deleteIncidence ( lse ); | 333 | deleteIncidence ( lse ); |
328 | } | 334 | } |
329 | } | 335 | } |
330 | QPtrList<Event> CalendarLocal::getExternLastSyncEvents() | 336 | QPtrList<Event> CalendarLocal::getExternLastSyncEvents() |
331 | { | 337 | { |
332 | QPtrList<Event> el; | 338 | QPtrList<Event> el; |
333 | Event *todo; | 339 | Event *todo; |
334 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | 340 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { |
335 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) | 341 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) |
336 | if ( todo->summary().left(3) == "E: " ) | 342 | if ( todo->summary().left(3) == "E: " ) |
337 | el.append( todo ); | 343 | el.append( todo ); |
338 | } | 344 | } |
339 | 345 | ||
340 | return el; | 346 | return el; |
341 | 347 | ||
342 | } | 348 | } |
343 | Event *CalendarLocal::event( QString syncProf, QString id ) | 349 | Event *CalendarLocal::event( QString syncProf, QString id ) |
344 | { | 350 | { |
345 | Event *todo; | 351 | Event *todo; |
346 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | 352 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { |
347 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; | 353 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; |
348 | } | 354 | } |
349 | 355 | ||
350 | return 0; | 356 | return 0; |
351 | } | 357 | } |
352 | Todo *CalendarLocal::todo( const QString &uid ) | 358 | Todo *CalendarLocal::todo( const QString &uid ) |
353 | { | 359 | { |
354 | Todo *todo;; | 360 | Todo *todo;; |
355 | Todo *retVal = 0; | 361 | Todo *retVal = 0; |
356 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | 362 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { |
357 | if ( todo->calEnabled() && todo->uid() == uid ) { | 363 | if ( todo->calEnabled() && todo->uid() == uid ) { |
358 | if ( retVal ) { | 364 | if ( retVal ) { |
359 | if ( retVal->calID() > todo->calID() ) { | 365 | if ( retVal->calID() > todo->calID() ) { |
360 | retVal = todo; | 366 | retVal = todo; |
361 | } | 367 | } |
362 | } else { | 368 | } else { |
363 | retVal = todo; | 369 | retVal = todo; |
364 | } | 370 | } |
365 | } | 371 | } |
366 | } | 372 | } |
367 | return retVal; | 373 | return retVal; |
368 | } | 374 | } |
369 | QString CalendarLocal::nextSummary() const | 375 | QString CalendarLocal::nextSummary() const |
370 | { | 376 | { |
371 | return mNextSummary; | 377 | return mNextSummary; |
372 | } | 378 | } |
373 | QDateTime CalendarLocal::nextAlarmEventDateTime() const | 379 | QDateTime CalendarLocal::nextAlarmEventDateTime() const |
374 | { | 380 | { |
375 | return mNextAlarmEventDateTime; | 381 | return mNextAlarmEventDateTime; |
376 | } | 382 | } |
377 | void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted) | 383 | void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted) |
378 | { | 384 | { |
379 | //mNextAlarmIncidence | 385 | //mNextAlarmIncidence |
380 | //mNextAlarmDateTime | 386 | //mNextAlarmDateTime |
381 | //return mNextSummary; | 387 | //return mNextSummary; |
382 | //return mNextAlarmEventDateTime; | 388 | //return mNextAlarmEventDateTime; |
383 | bool newNextAlarm = false; | 389 | bool newNextAlarm = false; |
384 | bool computeNextAlarm = false; | 390 | bool computeNextAlarm = false; |
385 | bool ok; | 391 | bool ok; |
386 | int offset; | 392 | int offset; |
387 | QDateTime nextA; | 393 | QDateTime nextA; |
388 | // QString nextSum; | 394 | // QString nextSum; |
389 | //QDateTime nextEvent; | 395 | //QDateTime nextEvent; |
390 | if ( mNextAlarmIncidence == 0 || incidence == 0 ) { | 396 | if ( mNextAlarmIncidence == 0 || incidence == 0 ) { |
391 | computeNextAlarm = true; | 397 | computeNextAlarm = true; |
392 | } else { | 398 | } else { |
393 | if ( ! deleted ) { | 399 | if ( ! deleted ) { |
394 | nextA = incidence->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; | 400 | nextA = incidence->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; |
395 | if ( ok ) { | 401 | if ( ok ) { |
396 | if ( nextA < mNextAlarmDateTime ) { | 402 | if ( nextA < mNextAlarmDateTime ) { |
397 | deRegisterAlarm(); | 403 | deRegisterAlarm(); |
398 | mNextAlarmDateTime = nextA; | 404 | mNextAlarmDateTime = nextA; |
399 | mNextSummary = incidence->summary(); | 405 | mNextSummary = incidence->summary(); |
400 | mNextAlarmEventDateTime = nextA.addSecs(offset ) ; | 406 | mNextAlarmEventDateTime = nextA.addSecs(offset ) ; |
401 | mNextAlarmEventDateTimeString = KGlobal::locale()->formatDateTime(mNextAlarmEventDateTime); | 407 | mNextAlarmEventDateTimeString = KGlobal::locale()->formatDateTime(mNextAlarmEventDateTime); |
402 | newNextAlarm = true; | 408 | newNextAlarm = true; |
403 | mNextAlarmIncidence = incidence; | 409 | mNextAlarmIncidence = incidence; |
404 | } else { | 410 | } else { |
405 | if ( incidence == mNextAlarmIncidence ) { | 411 | if ( incidence == mNextAlarmIncidence ) { |
406 | computeNextAlarm = true; | 412 | computeNextAlarm = true; |
407 | } | 413 | } |
408 | } | 414 | } |
409 | } else { | 415 | } else { |
410 | if ( mNextAlarmIncidence == incidence ) { | 416 | if ( mNextAlarmIncidence == incidence ) { |
411 | computeNextAlarm = true; | 417 | computeNextAlarm = true; |
412 | } | 418 | } |
413 | } | 419 | } |
414 | } else { // deleted | 420 | } else { // deleted |
415 | if ( incidence == mNextAlarmIncidence ) { | 421 | if ( incidence == mNextAlarmIncidence ) { |
416 | computeNextAlarm = true; | 422 | computeNextAlarm = true; |
417 | } | 423 | } |
418 | } | 424 | } |
419 | } | 425 | } |
420 | if ( computeNextAlarm ) { | 426 | if ( computeNextAlarm ) { |
421 | deRegisterAlarm(); | 427 | deRegisterAlarm(); |
422 | nextA = nextAlarm( 1000 ); | 428 | nextA = nextAlarm( 1000 ); |
423 | if (! mNextAlarmIncidence ) { | 429 | if (! mNextAlarmIncidence ) { |
424 | return; | 430 | return; |
425 | } | 431 | } |
426 | newNextAlarm = true; | 432 | newNextAlarm = true; |
427 | } | 433 | } |
428 | if ( newNextAlarm ) | 434 | if ( newNextAlarm ) |
429 | registerAlarm(); | 435 | registerAlarm(); |
430 | } | 436 | } |
431 | QString CalendarLocal:: getAlarmNotification() | 437 | QString CalendarLocal:: getAlarmNotification() |
432 | { | 438 | { |
433 | QString ret; | 439 | QString ret; |
434 | // this should not happen | 440 | // this should not happen |
435 | if (! mNextAlarmIncidence ) | 441 | if (! mNextAlarmIncidence ) |
436 | return "cal_alarm"+ mNextSummary.left( 25 )+"\n"+mNextAlarmEventDateTimeString; | 442 | return "cal_alarm"+ mNextSummary.left( 25 )+"\n"+mNextAlarmEventDateTimeString; |
437 | Alarm* alarm = mNextAlarmIncidence->alarms().first(); | 443 | Alarm* alarm = mNextAlarmIncidence->alarms().first(); |
438 | if ( alarm->type() == Alarm::Procedure ) { | 444 | if ( alarm->type() == Alarm::Procedure ) { |
439 | ret = "proc_alarm" + alarm->programFile()+"+++"; | 445 | ret = "proc_alarm" + alarm->programFile()+"+++"; |
440 | } else { | 446 | } else { |
441 | ret = "audio_alarm" +alarm->audioFile() +"+++"; | 447 | ret = "audio_alarm" +alarm->audioFile() +"+++"; |
442 | } | 448 | } |
443 | ret += "cal_alarm"+ mNextSummary.left( 25 ); | 449 | ret += "cal_alarm"+ mNextSummary.left( 25 ); |
444 | if ( mNextSummary.length() > 25 ) | 450 | if ( mNextSummary.length() > 25 ) |
445 | ret += "\n" + mNextSummary.mid(25, 25 ); | 451 | ret += "\n" + mNextSummary.mid(25, 25 ); |
446 | ret+= "\n"+mNextAlarmEventDateTimeString; | 452 | ret+= "\n"+mNextAlarmEventDateTimeString; |
447 | return ret; | 453 | return ret; |
448 | } | 454 | } |
449 | void CalendarLocal::registerAlarm() | 455 | void CalendarLocal::registerAlarm() |
450 | { | 456 | { |
451 | mLastAlarmNotificationString = getAlarmNotification(); | 457 | mLastAlarmNotificationString = getAlarmNotification(); |
452 | // qDebug("++ register Alarm %s %s",mNextAlarmDateTime.toString().latin1(), mLastAlarmNotificationString.latin1() ); | 458 | // qDebug("++ register Alarm %s %s",mNextAlarmDateTime.toString().latin1(), mLastAlarmNotificationString.latin1() ); |
453 | emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); | 459 | emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); |
454 | // #ifndef DESKTOP_VERSION | 460 | // #ifndef DESKTOP_VERSION |
455 | // AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() ); | 461 | // AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() ); |
456 | // #endif | 462 | // #endif |
457 | } | 463 | } |
458 | void CalendarLocal::deRegisterAlarm() | 464 | void CalendarLocal::deRegisterAlarm() |
459 | { | 465 | { |
460 | if ( mLastAlarmNotificationString.isNull() ) | 466 | if ( mLastAlarmNotificationString.isNull() ) |
461 | return; | 467 | return; |
462 | //qDebug("-- deregister Alarm %s ", mLastAlarmNotificationString.latin1() ); | 468 | //qDebug("-- deregister Alarm %s ", mLastAlarmNotificationString.latin1() ); |
463 | 469 | ||
464 | emit removeAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); | 470 | emit removeAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); |
465 | mNextAlarmEventDateTime = QDateTime(); | 471 | mNextAlarmEventDateTime = QDateTime(); |
466 | // #ifndef DESKTOP_VERSION | 472 | // #ifndef DESKTOP_VERSION |
467 | // AlarmServer::deleteAlarm (mNextAlarmDateTime ,"koalarm" ,mLastAlarmNotificationString.latin1() ); | 473 | // AlarmServer::deleteAlarm (mNextAlarmDateTime ,"koalarm" ,mLastAlarmNotificationString.latin1() ); |
468 | // #endif | 474 | // #endif |
469 | } | 475 | } |
470 | 476 | ||
471 | QPtrList<Todo> CalendarLocal::todos( const QDate &date ) | 477 | QPtrList<Todo> CalendarLocal::todos( const QDate &date ) |
472 | { | 478 | { |
473 | QPtrList<Todo> todos; | 479 | QPtrList<Todo> todos; |
474 | 480 | ||
475 | Todo *todo; | 481 | Todo *todo; |
476 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | 482 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { |
477 | if ( !todo->calEnabled() ) continue; | 483 | if ( !todo->calEnabled() ) continue; |
478 | if ( todo->hasDueDate() && todo->dtDue().date() == date ) { | 484 | if ( todo->hasDueDate() && todo->dtDue().date() == date ) { |
479 | todos.append( todo ); | 485 | todos.append( todo ); |
480 | } | 486 | } |
481 | } | 487 | } |
482 | 488 | ||
483 | filter()->apply( &todos ); | 489 | filter()->apply( &todos ); |
484 | return todos; | 490 | return todos; |
485 | } | 491 | } |
486 | void CalendarLocal::reInitAlarmSettings() | 492 | void CalendarLocal::reInitAlarmSettings() |
487 | { | 493 | { |
488 | if ( !mNextAlarmIncidence ) { | 494 | if ( !mNextAlarmIncidence ) { |
489 | nextAlarm( 1000 ); | 495 | nextAlarm( 1000 ); |
490 | } | 496 | } |
491 | deRegisterAlarm(); | 497 | deRegisterAlarm(); |
492 | mNextAlarmIncidence = 0; | 498 | mNextAlarmIncidence = 0; |
493 | checkAlarmForIncidence( 0, false ); | 499 | checkAlarmForIncidence( 0, false ); |
494 | 500 | ||
495 | } | 501 | } |
496 | 502 | ||
497 | 503 | ||
498 | 504 | ||
499 | QDateTime CalendarLocal::nextAlarm( int daysTo ) | 505 | QDateTime CalendarLocal::nextAlarm( int daysTo ) |
500 | { | 506 | { |
501 | QDateTime nextA = QDateTime::currentDateTime().addDays( daysTo ); | 507 | QDateTime nextA = QDateTime::currentDateTime().addDays( daysTo ); |
502 | QDateTime start = QDateTime::currentDateTime().addSecs( 30 ); | 508 | QDateTime start = QDateTime::currentDateTime().addSecs( 30 ); |
503 | QDateTime next; | 509 | QDateTime next; |
504 | Event *e; | 510 | Event *e; |
505 | bool ok; | 511 | bool ok; |
506 | bool found = false; | 512 | bool found = false; |
507 | int offset; | 513 | int offset; |
508 | mNextAlarmIncidence = 0; | 514 | mNextAlarmIncidence = 0; |
509 | for( e = mEventList.first(); e; e = mEventList.next() ) { | 515 | for( e = mEventList.first(); e; e = mEventList.next() ) { |
510 | if ( !e->calEnabled() ) continue; | 516 | if ( !e->calEnabled() ) continue; |
511 | next = e->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; | 517 | next = e->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; |
512 | if ( ok ) { | 518 | if ( ok ) { |
513 | if ( next < nextA ) { | 519 | if ( next < nextA ) { |
514 | nextA = next; | 520 | nextA = next; |
515 | found = true; | 521 | found = true; |
516 | mNextSummary = e->summary(); | 522 | mNextSummary = e->summary(); |
517 | mNextAlarmEventDateTime = next.addSecs(offset ) ; | 523 | mNextAlarmEventDateTime = next.addSecs(offset ) ; |
518 | mNextAlarmIncidence = (Incidence *) e; | 524 | mNextAlarmIncidence = (Incidence *) e; |
519 | } | 525 | } |
520 | } | 526 | } |
521 | } | 527 | } |
522 | Todo *t; | 528 | Todo *t; |
523 | for( t = mTodoList.first(); t; t = mTodoList.next() ) { | 529 | for( t = mTodoList.first(); t; t = mTodoList.next() ) { |
524 | if ( !t->calEnabled() ) continue; | 530 | if ( !t->calEnabled() ) continue; |
525 | next = t->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; | 531 | next = t->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; |
526 | if ( ok ) { | 532 | if ( ok ) { |
527 | if ( next < nextA ) { | 533 | if ( next < nextA ) { |
528 | nextA = next; | 534 | nextA = next; |
529 | found = true; | 535 | found = true; |
530 | mNextSummary = t->summary(); | 536 | mNextSummary = t->summary(); |
531 | mNextAlarmEventDateTime = next.addSecs(offset ); | 537 | mNextAlarmEventDateTime = next.addSecs(offset ); |
532 | mNextAlarmIncidence = (Incidence *) t; | 538 | mNextAlarmIncidence = (Incidence *) t; |
533 | } | 539 | } |
534 | } | 540 | } |
535 | } | 541 | } |
536 | if ( mNextAlarmIncidence ) { | 542 | if ( mNextAlarmIncidence ) { |
537 | mNextAlarmEventDateTimeString = KGlobal::locale()->formatDateTime(mNextAlarmEventDateTime); | 543 | mNextAlarmEventDateTimeString = KGlobal::locale()->formatDateTime(mNextAlarmEventDateTime); |
538 | mNextAlarmDateTime = nextA; | 544 | mNextAlarmDateTime = nextA; |
539 | } | 545 | } |
540 | return nextA; | 546 | return nextA; |
541 | } | 547 | } |
542 | Alarm::List CalendarLocal::alarmsTo( const QDateTime &to ) | 548 | Alarm::List CalendarLocal::alarmsTo( const QDateTime &to ) |
543 | { | 549 | { |
544 | return alarms( QDateTime( QDate( 1900, 1, 1 ) ), to ); | 550 | return alarms( QDateTime( QDate( 1900, 1, 1 ) ), to ); |
545 | } | 551 | } |
546 | 552 | ||
547 | Alarm::List CalendarLocal::alarms( const QDateTime &from, const QDateTime &to ) | 553 | Alarm::List CalendarLocal::alarms( const QDateTime &from, const QDateTime &to ) |
548 | { | 554 | { |
549 | 555 | ||
550 | Alarm::List alarms; | 556 | Alarm::List alarms; |
551 | 557 | ||
552 | Event *e; | 558 | Event *e; |
553 | 559 | ||
554 | for( e = mEventList.first(); e; e = mEventList.next() ) { | 560 | for( e = mEventList.first(); e; e = mEventList.next() ) { |
555 | if ( !e->calEnabled() ) continue; | 561 | if ( !e->calEnabled() ) continue; |
556 | if ( e->doesRecur() ) appendRecurringAlarms( alarms, e, from, to ); | 562 | if ( e->doesRecur() ) appendRecurringAlarms( alarms, e, from, to ); |
557 | else appendAlarms( alarms, e, from, to ); | 563 | else appendAlarms( alarms, e, from, to ); |
558 | } | 564 | } |
559 | 565 | ||
560 | Todo *t; | 566 | Todo *t; |
561 | for( t = mTodoList.first(); t; t = mTodoList.next() ) { | 567 | for( t = mTodoList.first(); t; t = mTodoList.next() ) { |
562 | if ( !t->calEnabled() ) continue; | 568 | if ( !t->calEnabled() ) continue; |
563 | appendAlarms( alarms, t, from, to ); | 569 | appendAlarms( alarms, t, from, to ); |
564 | } | 570 | } |
565 | 571 | ||
566 | return alarms; | 572 | return alarms; |
567 | } | 573 | } |
568 | 574 | ||
569 | void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence, | 575 | void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence, |
570 | const QDateTime &from, const QDateTime &to ) | 576 | const QDateTime &from, const QDateTime &to ) |
571 | { | 577 | { |
572 | QPtrList<Alarm> alarmList = incidence->alarms(); | 578 | QPtrList<Alarm> alarmList = incidence->alarms(); |
573 | Alarm *alarm; | 579 | Alarm *alarm; |
574 | for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { | 580 | for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { |
575 | // kdDebug(5800) << "CalendarLocal::appendAlarms() '" << alarm->text() | 581 | // kdDebug(5800) << "CalendarLocal::appendAlarms() '" << alarm->text() |
576 | // << "': " << alarm->time().toString() << " - " << alarm->enabled() << endl; | 582 | // << "': " << alarm->time().toString() << " - " << alarm->enabled() << endl; |
577 | if ( alarm->enabled() ) { | 583 | if ( alarm->enabled() ) { |
578 | if ( alarm->time() >= from && alarm->time() <= to ) { | 584 | if ( alarm->time() >= from && alarm->time() <= to ) { |
579 | alarms.append( alarm ); | 585 | alarms.append( alarm ); |
580 | } | 586 | } |
581 | } | 587 | } |
582 | } | 588 | } |
583 | } | 589 | } |
584 | 590 | ||
585 | void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms, | 591 | void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms, |
586 | Incidence *incidence, | 592 | Incidence *incidence, |
587 | const QDateTime &from, | 593 | const QDateTime &from, |
588 | const QDateTime &to ) | 594 | const QDateTime &to ) |
589 | { | 595 | { |
590 | 596 | ||
591 | QPtrList<Alarm> alarmList = incidence->alarms(); | 597 | QPtrList<Alarm> alarmList = incidence->alarms(); |
592 | Alarm *alarm; | 598 | Alarm *alarm; |
593 | QDateTime qdt; | 599 | QDateTime qdt; |
594 | for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { | 600 | for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { |
595 | if (incidence->recursOn(from.date())) { | 601 | if (incidence->recursOn(from.date())) { |
596 | qdt.setTime(alarm->time().time()); | 602 | qdt.setTime(alarm->time().time()); |
597 | qdt.setDate(from.date()); | 603 | qdt.setDate(from.date()); |
598 | } | 604 | } |
599 | else qdt = alarm->time(); | 605 | else qdt = alarm->time(); |
600 | // qDebug("1 %s %s %s", qdt.toString().latin1(), from.toString().latin1(), to.toString().latin1()); | 606 | // qDebug("1 %s %s %s", qdt.toString().latin1(), from.toString().latin1(), to.toString().latin1()); |
601 | if ( alarm->enabled() ) { | 607 | if ( alarm->enabled() ) { |
602 | if ( qdt >= from && qdt <= to ) { | 608 | if ( qdt >= from && qdt <= to ) { |
603 | alarms.append( alarm ); | 609 | alarms.append( alarm ); |
604 | } | 610 | } |
605 | } | 611 | } |
606 | } | 612 | } |
607 | } | 613 | } |
608 | 614 | ||
609 | 615 | ||
610 | /****************************** PROTECTED METHODS ****************************/ | 616 | /****************************** PROTECTED METHODS ****************************/ |
611 | 617 | ||
612 | // after changes are made to an event, this should be called. | 618 | // after changes are made to an event, this should be called. |
613 | void CalendarLocal::update( IncidenceBase *incidence ) | 619 | void CalendarLocal::update( IncidenceBase *incidence ) |
614 | { | 620 | { |
615 | incidence->setSyncStatus( Event::SYNCMOD ); | 621 | incidence->setSyncStatus( Event::SYNCMOD ); |
616 | incidence->setLastModified( QDateTime::currentDateTime() ); | 622 | incidence->setLastModified( QDateTime::currentDateTime() ); |
617 | // we should probably update the revision number here, | 623 | // we should probably update the revision number here, |
618 | // or internally in the Event itself when certain things change. | 624 | // or internally in the Event itself when certain things change. |
619 | // need to verify with ical documentation. | 625 | // need to verify with ical documentation. |
620 | 626 | ||
621 | setModified( true ); | 627 | setModified( true ); |
622 | } | 628 | } |
623 | 629 | ||
624 | void CalendarLocal::insertEvent( Event *event ) | 630 | void CalendarLocal::insertEvent( Event *event ) |
625 | { | 631 | { |
626 | if ( mEventList.findRef( event ) < 0 ) mEventList.append( event ); | 632 | if ( mEventList.findRef( event ) < 0 ) mEventList.append( event ); |
627 | } | 633 | } |
628 | 634 | ||
629 | 635 | ||
630 | QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) | 636 | QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) |
631 | { | 637 | { |
632 | QPtrList<Event> eventList; | 638 | QPtrList<Event> eventList; |
633 | 639 | ||
634 | Event *event; | 640 | Event *event; |
635 | for( event = mEventList.first(); event; event = mEventList.next() ) { | 641 | for( event = mEventList.first(); event; event = mEventList.next() ) { |
636 | if ( !event->calEnabled() ) continue; | 642 | if ( !event->calEnabled() ) continue; |
637 | if ( event->doesRecur() ) { | 643 | if ( event->doesRecur() ) { |
638 | if ( event->isMultiDay() ) { | 644 | if ( event->isMultiDay() ) { |
639 | int extraDays = event->dtStart().date().daysTo( event->dtEnd().date() ); | 645 | int extraDays = event->dtStart().date().daysTo( event->dtEnd().date() ); |
640 | int i; | 646 | int i; |
641 | for ( i = 0; i <= extraDays; i++ ) { | 647 | for ( i = 0; i <= extraDays; i++ ) { |
642 | if ( event->recursOn( qd.addDays( -i ) ) ) { | 648 | if ( event->recursOn( qd.addDays( -i ) ) ) { |
643 | eventList.append( event ); | 649 | eventList.append( event ); |
644 | break; | 650 | break; |
645 | } | 651 | } |
646 | } | 652 | } |
647 | } else { | 653 | } else { |
648 | if ( event->recursOn( qd ) ) | 654 | if ( event->recursOn( qd ) ) |
649 | eventList.append( event ); | 655 | eventList.append( event ); |
650 | } | 656 | } |
651 | } else { | 657 | } else { |
652 | if ( event->dtStart().date() <= qd && event->dtEnd().date() >= qd ) { | 658 | if ( event->dtStart().date() <= qd && event->dtEnd().date() >= qd ) { |
653 | eventList.append( event ); | 659 | eventList.append( event ); |
654 | } | 660 | } |
655 | } | 661 | } |
656 | } | 662 | } |
657 | 663 | ||
658 | if ( !sorted ) { | 664 | if ( !sorted ) { |
659 | return eventList; | 665 | return eventList; |
660 | } | 666 | } |
661 | 667 | ||
662 | // kdDebug(5800) << "Sorting events for date\n" << endl; | 668 | // kdDebug(5800) << "Sorting events for date\n" << endl; |
663 | // now, we have to sort it based on dtStart.time() | 669 | // now, we have to sort it based on dtStart.time() |
664 | QPtrList<Event> eventListSorted; | 670 | QPtrList<Event> eventListSorted; |
665 | Event *sortEvent; | 671 | Event *sortEvent; |
666 | for ( event = eventList.first(); event; event = eventList.next() ) { | 672 | for ( event = eventList.first(); event; event = eventList.next() ) { |
667 | sortEvent = eventListSorted.first(); | 673 | sortEvent = eventListSorted.first(); |
668 | int i = 0; | 674 | int i = 0; |
669 | while ( sortEvent && event->dtStart().time()>=sortEvent->dtStart().time() ) | 675 | while ( sortEvent && event->dtStart().time()>=sortEvent->dtStart().time() ) |
670 | { | 676 | { |
671 | i++; | 677 | i++; |
672 | sortEvent = eventListSorted.next(); | 678 | sortEvent = eventListSorted.next(); |
673 | } | 679 | } |
674 | eventListSorted.insert( i, event ); | 680 | eventListSorted.insert( i, event ); |
675 | } | 681 | } |
676 | return eventListSorted; | 682 | return eventListSorted; |
677 | } | 683 | } |
678 | 684 | ||
679 | 685 | ||
680 | QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, | 686 | QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, |
681 | bool inclusive ) | 687 | bool inclusive ) |
682 | { | 688 | { |
683 | Event *event = 0; | 689 | Event *event = 0; |
684 | 690 | ||
685 | QPtrList<Event> eventList; | 691 | QPtrList<Event> eventList; |
686 | 692 | ||
687 | // Get non-recurring events | 693 | // Get non-recurring events |
688 | for( event = mEventList.first(); event; event = mEventList.next() ) { | 694 | for( event = mEventList.first(); event; event = mEventList.next() ) { |
689 | if ( !event->calEnabled() ) continue; | 695 | if ( !event->calEnabled() ) continue; |
690 | if ( event->doesRecur() ) { | 696 | if ( event->doesRecur() ) { |
691 | QDate rStart = event->dtStart().date(); | 697 | QDate rStart = event->dtStart().date(); |
692 | bool found = false; | 698 | bool found = false; |
693 | if ( inclusive ) { | 699 | if ( inclusive ) { |
694 | if ( rStart >= start && rStart <= end ) { | 700 | if ( rStart >= start && rStart <= end ) { |
695 | // Start date of event is in range. Now check for end date. | 701 | // Start date of event is in range. Now check for end date. |
696 | // if duration is negative, event recurs forever, so do not include it. | 702 | // if duration is negative, event recurs forever, so do not include it. |
697 | if ( event->recurrence()->duration() == 0 ) { // End date set | 703 | if ( event->recurrence()->duration() == 0 ) { // End date set |
698 | QDate rEnd = event->recurrence()->endDate(); | 704 | QDate rEnd = event->recurrence()->endDate(); |
699 | if ( rEnd >= start && rEnd <= end ) { // End date within range | 705 | if ( rEnd >= start && rEnd <= end ) { // End date within range |
700 | found = true; | 706 | found = true; |
701 | } | 707 | } |
702 | } else if ( event->recurrence()->duration() > 0 ) { // Duration set | 708 | } else if ( event->recurrence()->duration() > 0 ) { // Duration set |
703 | // TODO: Calculate end date from duration. Should be done in Event | 709 | // TODO: Calculate end date from duration. Should be done in Event |
704 | // For now exclude all events with a duration. | 710 | // For now exclude all events with a duration. |
705 | } | 711 | } |
706 | } | 712 | } |
707 | } else { | 713 | } else { |
708 | bool founOne; | 714 | bool founOne; |
709 | QDate next = event->getNextOccurence( start, &founOne ).date(); | 715 | QDate next = event->getNextOccurence( start, &founOne ).date(); |
710 | if ( founOne ) { | 716 | if ( founOne ) { |
711 | if ( next <= end ) { | 717 | if ( next <= end ) { |
712 | found = true; | 718 | found = true; |
713 | } | 719 | } |
714 | } | 720 | } |
715 | 721 | ||
716 | /* | 722 | /* |
717 | // crap !!! | 723 | // crap !!! |
718 | if ( rStart <= end ) { // Start date not after range | 724 | if ( rStart <= end ) { // Start date not after range |
719 | if ( rStart >= start ) { // Start date within range | 725 | if ( rStart >= start ) { // Start date within range |
720 | found = true; | 726 | found = true; |
721 | } else if ( event->recurrence()->duration() == -1 ) { // Recurs forever | 727 | } else if ( event->recurrence()->duration() == -1 ) { // Recurs forever |
722 | found = true; | 728 | found = true; |
723 | } else if ( event->recurrence()->duration() == 0 ) { // End date set | 729 | } else if ( event->recurrence()->duration() == 0 ) { // End date set |
724 | QDate rEnd = event->recurrence()->endDate(); | 730 | QDate rEnd = event->recurrence()->endDate(); |
725 | if ( rEnd >= start && rEnd <= end ) { // End date within range | 731 | if ( rEnd >= start && rEnd <= end ) { // End date within range |
726 | found = true; | 732 | found = true; |
727 | } | 733 | } |
728 | } else { // Duration set | 734 | } else { // Duration set |
729 | // TODO: Calculate end date from duration. Should be done in Event | 735 | // TODO: Calculate end date from duration. Should be done in Event |
730 | // For now include all events with a duration. | 736 | // For now include all events with a duration. |
731 | found = true; | 737 | found = true; |
732 | } | 738 | } |
733 | } | 739 | } |
734 | */ | 740 | */ |
735 | 741 | ||
736 | } | 742 | } |
737 | 743 | ||
738 | if ( found ) eventList.append( event ); | 744 | if ( found ) eventList.append( event ); |
739 | } else { | 745 | } else { |
740 | QDate s = event->dtStart().date(); | 746 | QDate s = event->dtStart().date(); |
741 | QDate e = event->dtEnd().date(); | 747 | QDate e = event->dtEnd().date(); |
742 | 748 | ||
743 | if ( inclusive ) { | 749 | if ( inclusive ) { |
744 | if ( s >= start && e <= end ) { | 750 | if ( s >= start && e <= end ) { |
745 | eventList.append( event ); | 751 | eventList.append( event ); |
746 | } | 752 | } |
747 | } else { | 753 | } else { |
748 | if ( ( s >= start && s <= end ) || ( e >= start && e <= end ) ) { | 754 | if ( ( s >= start && s <= end ) || ( e >= start && e <= end ) ) { |
749 | eventList.append( event ); | 755 | eventList.append( event ); |
750 | } | 756 | } |
751 | } | 757 | } |
752 | } | 758 | } |
753 | } | 759 | } |
754 | 760 | ||
755 | return eventList; | 761 | return eventList; |
756 | } | 762 | } |
757 | 763 | ||
758 | QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) | 764 | QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) |
759 | { | 765 | { |
760 | return rawEventsForDate( qdt.date() ); | 766 | return rawEventsForDate( qdt.date() ); |
761 | } | 767 | } |
762 | 768 | ||
763 | QPtrList<Event> CalendarLocal::rawEvents() | 769 | QPtrList<Event> CalendarLocal::rawEvents() |
764 | { | 770 | { |
765 | QPtrList<Event> el; | 771 | QPtrList<Event> el; |
766 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 772 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
767 | if ( it->calEnabled() ) el.append( it ); | 773 | if ( it->calEnabled() ) el.append( it ); |
768 | return el; | 774 | return el; |
769 | } | 775 | } |
770 | 776 | ||
771 | bool CalendarLocal::addJournal(Journal *journal) | 777 | bool CalendarLocal::addJournal(Journal *journal) |
772 | { | 778 | { |
773 | if ( journal->dtStart().isValid()) | 779 | if ( journal->dtStart().isValid()) |
774 | kdDebug(5800) << "Adding Journal on " << journal->dtStart().toString() << endl; | 780 | kdDebug(5800) << "Adding Journal on " << journal->dtStart().toString() << endl; |
775 | else | 781 | else |
776 | kdDebug(5800) << "Adding Journal without a DTSTART" << endl; | 782 | kdDebug(5800) << "Adding Journal without a DTSTART" << endl; |
777 | 783 | ||
778 | mJournalList.append(journal); | 784 | mJournalList.append(journal); |
779 | 785 | ||
780 | journal->registerObserver( this ); | 786 | journal->registerObserver( this ); |
781 | 787 | ||
782 | setModified( true ); | 788 | setModified( true ); |
783 | journal->setCalID( mDefaultCalendar ); | 789 | journal->setCalID( mDefaultCalendar ); |
784 | journal->setCalEnabled( true ); | 790 | journal->setCalEnabled( true ); |
785 | return true; | 791 | return true; |
786 | } | 792 | } |
787 | 793 | ||
788 | void CalendarLocal::deleteJournal( Journal *journal ) | 794 | void CalendarLocal::deleteJournal( Journal *journal ) |
789 | { | 795 | { |
790 | if ( mUndoIncidence ) delete mUndoIncidence; | 796 | if ( mUndoIncidence ) delete mUndoIncidence; |
791 | mUndoIncidence = journal->clone(); | 797 | mUndoIncidence = journal->clone(); |
792 | mUndoIncidence->setSummary( mUndoIncidence->description().left(25)); | 798 | mUndoIncidence->setSummary( mUndoIncidence->description().left(25)); |
793 | if ( mJournalList.removeRef(journal) ) { | 799 | if ( mJournalList.removeRef(journal) ) { |
794 | setModified( true ); | 800 | setModified( true ); |
795 | } | 801 | } |
796 | } | 802 | } |
797 | 803 | ||
798 | Journal *CalendarLocal::journal( const QDate &date ) | 804 | Journal *CalendarLocal::journal( const QDate &date ) |
799 | { | 805 | { |
800 | // kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl; | 806 | // kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl; |
801 | 807 | ||
802 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 808 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
803 | if ( it->calEnabled() && it->dtStart().date() == date ) | 809 | if ( it->calEnabled() && it->dtStart().date() == date ) |
804 | return it; | 810 | return it; |
805 | 811 | ||
806 | return 0; | 812 | return 0; |
807 | } | 813 | } |
808 | 814 | ||
809 | Journal *CalendarLocal::journal( const QString &uid ) | 815 | Journal *CalendarLocal::journal( const QString &uid ) |
810 | { | 816 | { |
811 | Journal * retVal = 0; | 817 | Journal * retVal = 0; |
812 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 818 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
813 | if ( it->calEnabled() && it->uid() == uid ) { | 819 | if ( it->calEnabled() && it->uid() == uid ) { |
814 | if ( retVal ) { | 820 | if ( retVal ) { |
815 | if ( retVal->calID() > it->calID() ) { | 821 | if ( retVal->calID() > it->calID() ) { |
816 | retVal = it; | 822 | retVal = it; |
817 | } | 823 | } |
818 | } else { | 824 | } else { |
819 | retVal = it; | 825 | retVal = it; |
820 | } | 826 | } |
821 | } | 827 | } |
822 | return retVal; | 828 | return retVal; |
823 | } | 829 | } |
824 | 830 | ||
825 | QPtrList<Journal> CalendarLocal::journals() | 831 | QPtrList<Journal> CalendarLocal::journals() |
826 | { | 832 | { |
827 | QPtrList<Journal> el; | 833 | QPtrList<Journal> el; |
828 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 834 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
829 | if ( it->calEnabled() ) el.append( it ); | 835 | if ( it->calEnabled() ) el.append( it ); |
830 | return el; | 836 | return el; |
831 | } | 837 | } |
832 | void CalendarLocal::setCalendarRemove( int id ) | 838 | void CalendarLocal::setCalendarRemove( int id ) |
833 | { | 839 | { |
834 | 840 | ||
835 | { | 841 | { |
836 | QPtrList<Event> EventList = mEventList; | 842 | QPtrList<Event> EventList = mEventList; |
837 | Event * ev = EventList.first(); | 843 | Event * ev = EventList.first(); |
838 | while ( ev ) { | 844 | while ( ev ) { |
839 | if ( ev->calID() == id ) | 845 | if ( ev->calID() == id ) |
840 | deleteEvent( ev ); | 846 | deleteEvent( ev ); |
841 | ev = EventList.next(); | 847 | ev = EventList.next(); |
842 | } | 848 | } |
843 | } | 849 | } |
844 | { | 850 | { |
845 | 851 | ||
846 | QPtrList<Todo> TodoList = mTodoList; | 852 | QPtrList<Todo> TodoList = mTodoList; |
847 | Todo * ev = TodoList.first(); | 853 | Todo * ev = TodoList.first(); |
848 | while ( ev ) { | 854 | while ( ev ) { |
849 | if ( ev->calID() == id ) | 855 | if ( ev->calID() == id ) |
850 | deleteTodo( ev ); | 856 | deleteTodo( ev ); |
851 | ev = TodoList.next(); | 857 | ev = TodoList.next(); |
852 | } | 858 | } |
853 | } | 859 | } |
854 | { | 860 | { |
855 | QPtrList<Journal> JournalList = mJournalList; | 861 | QPtrList<Journal> JournalList = mJournalList; |
856 | Journal * ev = JournalList.first(); | 862 | Journal * ev = JournalList.first(); |
857 | while ( ev ) { | 863 | while ( ev ) { |
858 | if ( ev->calID() == id ) | 864 | if ( ev->calID() == id ) |
859 | deleteJournal( ev ); | 865 | deleteJournal( ev ); |
860 | ev = JournalList.next(); | 866 | ev = JournalList.next(); |
861 | } | 867 | } |
862 | } | 868 | } |
863 | 869 | ||
864 | if ( mUndoIncidence ) delete mUndoIncidence; | 870 | if ( mUndoIncidence ) delete mUndoIncidence; |
865 | mUndoIncidence = 0; | 871 | mUndoIncidence = 0; |
866 | 872 | ||
867 | } | 873 | } |
868 | 874 | ||
869 | void CalendarLocal::setCalendarEnabled( int id, bool enable ) | 875 | void CalendarLocal::setCalendarEnabled( int id, bool enable ) |
870 | { | 876 | { |
871 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 877 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
872 | if ( it->calID() == id ) it->setCalEnabled( enable ); | 878 | if ( it->calID() == id ) it->setCalEnabled( enable ); |
873 | 879 | ||
874 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 880 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
875 | if ( it->calID() == id ) it->setCalEnabled( enable ); | 881 | if ( it->calID() == id ) it->setCalEnabled( enable ); |
876 | 882 | ||
877 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 883 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
878 | if ( it->calID() == id ) it->setCalEnabled( enable ); | 884 | if ( it->calID() == id ) it->setCalEnabled( enable ); |
879 | 885 | ||
880 | } | 886 | } |
881 | 887 | ||
882 | void CalendarLocal::setReadOnly( int id, bool enable ) | 888 | void CalendarLocal::setReadOnly( int id, bool enable ) |
883 | { | 889 | { |
884 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 890 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
885 | if ( it->calID() == id ) it->setReadOnly( enable ); | 891 | if ( it->calID() == id ) it->setReadOnly( enable ); |
886 | 892 | ||
887 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 893 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
888 | if ( it->calID() == id ) it->setReadOnly( enable ); | 894 | if ( it->calID() == id ) it->setReadOnly( enable ); |
889 | 895 | ||
890 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 896 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
891 | if ( it->calID() == id ) it->setReadOnly( enable ); | 897 | if ( it->calID() == id ) it->setReadOnly( enable ); |
892 | 898 | ||
893 | } | 899 | } |
894 | 900 | ||
895 | void CalendarLocal::setAlarmEnabled( int id, bool enable ) | 901 | void CalendarLocal::setAlarmEnabled( int id, bool enable ) |
896 | { | 902 | { |
897 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 903 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
898 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); | 904 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); |
899 | 905 | ||
900 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 906 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
901 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); | 907 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); |
902 | 908 | ||
903 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 909 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
904 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); | 910 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); |
905 | reInitAlarmSettings(); | 911 | reInitAlarmSettings(); |
906 | 912 | ||
907 | } | 913 | } |
908 | void CalendarLocal::setDefaultCalendarEnabledOnly() | 914 | void CalendarLocal::setDefaultCalendarEnabledOnly() |
909 | { | 915 | { |
910 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 916 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
911 | it->setCalEnabled( it->calID() == mDefaultCalendar ); | 917 | it->setCalEnabled( it->calID() == mDefaultCalendar ); |
912 | 918 | ||
913 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 919 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
914 | it->setCalEnabled( it->calID() == mDefaultCalendar); | 920 | it->setCalEnabled( it->calID() == mDefaultCalendar); |
915 | 921 | ||
916 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 922 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
917 | it->setCalEnabled( it->calID() == mDefaultCalendar); | 923 | it->setCalEnabled( it->calID() == mDefaultCalendar); |
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index 0286b48..d32597f 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h | |||
@@ -1,225 +1,226 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | 3 | ||
4 | Copyright (c) 1998 Preston Brown | 4 | Copyright (c) 1998 Preston Brown |
5 | Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> | 5 | Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> |
6 | 6 | ||
7 | This library is free software; you can redistribute it and/or | 7 | This library is free software; you can redistribute it and/or |
8 | modify it under the terms of the GNU Library General Public | 8 | modify it under the terms of the GNU Library General Public |
9 | License as published by the Free Software Foundation; either | 9 | License as published by the Free Software Foundation; either |
10 | version 2 of the License, or (at your option) any later version. | 10 | version 2 of the License, or (at your option) any later version. |
11 | 11 | ||
12 | This library is distributed in the hope that it will be useful, | 12 | This library is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | Library General Public License for more details. | 15 | Library General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU Library General Public License | 17 | You should have received a copy of the GNU Library General Public License |
18 | along with this library; see the file COPYING.LIB. If not, write to | 18 | along with this library; see the file COPYING.LIB. If not, write to |
19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. | 20 | Boston, MA 02111-1307, USA. |
21 | */ | 21 | */ |
22 | #ifndef KCAL_CALENDARLOCAL_H | 22 | #ifndef KCAL_CALENDARLOCAL_H |
23 | #define KCAL_CALENDARLOCAL_H | 23 | #define KCAL_CALENDARLOCAL_H |
24 | 24 | ||
25 | #include "calendar.h" | 25 | #include "calendar.h" |
26 | 26 | ||
27 | namespace KCal { | 27 | namespace KCal { |
28 | 28 | ||
29 | class CalFormat; | 29 | class CalFormat; |
30 | 30 | ||
31 | /** | 31 | /** |
32 | This class provides a calendar stored as a local file. | 32 | This class provides a calendar stored as a local file. |
33 | */ | 33 | */ |
34 | class CalendarLocal : public Calendar | 34 | class CalendarLocal : public Calendar |
35 | { | 35 | { |
36 | public: | 36 | public: |
37 | /** | 37 | /** |
38 | Constructs a new calendar, with variables initialized to sane values. | 38 | Constructs a new calendar, with variables initialized to sane values. |
39 | */ | 39 | */ |
40 | CalendarLocal(); | 40 | CalendarLocal(); |
41 | /** | 41 | /** |
42 | Constructs a new calendar, with variables initialized to sane values. | 42 | Constructs a new calendar, with variables initialized to sane values. |
43 | */ | 43 | */ |
44 | CalendarLocal( const QString &timeZoneId ); | 44 | CalendarLocal( const QString &timeZoneId ); |
45 | ~CalendarLocal(); | 45 | ~CalendarLocal(); |
46 | void addCalendar( Calendar* ); | 46 | void addCalendar( Calendar* ); |
47 | bool addCalendarFile( QString name, int id ); | 47 | bool addCalendarFile( QString name, int id ); |
48 | void setSyncEventsReadOnly(); | 48 | void setSyncEventsReadOnly(); |
49 | void stopAllTodos(); | ||
49 | /** | 50 | /** |
50 | Loads a calendar on disk in vCalendar or iCalendar format into the current | 51 | Loads a calendar on disk in vCalendar or iCalendar format into the current |
51 | calendar. Any information already present is lost. | 52 | calendar. Any information already present is lost. |
52 | @return true, if successfull, false on error. | 53 | @return true, if successfull, false on error. |
53 | @param fileName the name of the calendar on disk. | 54 | @param fileName the name of the calendar on disk. |
54 | */ | 55 | */ |
55 | bool load( const QString &fileName ); | 56 | bool load( const QString &fileName ); |
56 | /** | 57 | /** |
57 | Writes out the calendar to disk in the specified \a format. | 58 | Writes out the calendar to disk in the specified \a format. |
58 | CalendarLocal takes ownership of the CalFormat object. | 59 | CalendarLocal takes ownership of the CalFormat object. |
59 | @return true, if successfull, false on error. | 60 | @return true, if successfull, false on error. |
60 | @param fileName the name of the file | 61 | @param fileName the name of the file |
61 | */ | 62 | */ |
62 | bool save( const QString &fileName, CalFormat *format = 0 ); | 63 | bool save( const QString &fileName, CalFormat *format = 0 ); |
63 | 64 | ||
64 | /** | 65 | /** |
65 | Clears out the current calendar, freeing all used memory etc. etc. | 66 | Clears out the current calendar, freeing all used memory etc. etc. |
66 | */ | 67 | */ |
67 | void close(); | 68 | void close(); |
68 | 69 | ||
69 | void save() {} | 70 | void save() {} |
70 | 71 | ||
71 | /** | 72 | /** |
72 | Add Event to calendar. | 73 | Add Event to calendar. |
73 | */ | 74 | */ |
74 | void removeSyncInfo( QString syncProfile); | 75 | void removeSyncInfo( QString syncProfile); |
75 | bool addAnniversaryNoDup( Event *event ); | 76 | bool addAnniversaryNoDup( Event *event ); |
76 | bool addEventNoDup( Event *event ); | 77 | bool addEventNoDup( Event *event ); |
77 | bool addEvent( Event *event ); | 78 | bool addEvent( Event *event ); |
78 | /** | 79 | /** |
79 | Deletes an event from this calendar. | 80 | Deletes an event from this calendar. |
80 | */ | 81 | */ |
81 | void deleteEvent( Event *event ); | 82 | void deleteEvent( Event *event ); |
82 | 83 | ||
83 | /** | 84 | /** |
84 | Retrieves an event on the basis of the unique string ID. | 85 | Retrieves an event on the basis of the unique string ID. |
85 | */ | 86 | */ |
86 | Event *event( const QString &uid ); | 87 | Event *event( const QString &uid ); |
87 | /** | 88 | /** |
88 | Return unfiltered list of all events in calendar. | 89 | Return unfiltered list of all events in calendar. |
89 | */ | 90 | */ |
90 | QPtrList<Event> rawEvents(); | 91 | QPtrList<Event> rawEvents(); |
91 | QPtrList<Event> getExternLastSyncEvents(); | 92 | QPtrList<Event> getExternLastSyncEvents(); |
92 | /** | 93 | /** |
93 | Add a todo to the todolist. | 94 | Add a todo to the todolist. |
94 | */ | 95 | */ |
95 | bool addTodo( Todo *todo ); | 96 | bool addTodo( Todo *todo ); |
96 | bool addTodoNoDup( Todo *todo ); | 97 | bool addTodoNoDup( Todo *todo ); |
97 | /** | 98 | /** |
98 | Remove a todo from the todolist. | 99 | Remove a todo from the todolist. |
99 | */ | 100 | */ |
100 | void deleteTodo( Todo * ); | 101 | void deleteTodo( Todo * ); |
101 | /** | 102 | /** |
102 | Searches todolist for an event with this unique string identifier, | 103 | Searches todolist for an event with this unique string identifier, |
103 | returns a pointer or null. | 104 | returns a pointer or null. |
104 | */ | 105 | */ |
105 | Todo *todo( const QString &uid ); | 106 | Todo *todo( const QString &uid ); |
106 | /** | 107 | /** |
107 | Return list of all todos. | 108 | Return list of all todos. |
108 | */ | 109 | */ |
109 | QPtrList<Todo> rawTodos(); | 110 | QPtrList<Todo> rawTodos(); |
110 | /** | 111 | /** |
111 | Returns list of todos due on the specified date. | 112 | Returns list of todos due on the specified date. |
112 | */ | 113 | */ |
113 | QPtrList<Todo> todos( const QDate &date ); | 114 | QPtrList<Todo> todos( const QDate &date ); |
114 | /** | 115 | /** |
115 | Return list of all todos. | 116 | Return list of all todos. |
116 | 117 | ||
117 | Workaround because compiler does not recognize function of base class. | 118 | Workaround because compiler does not recognize function of base class. |
118 | */ | 119 | */ |
119 | QPtrList<Todo> todos() { return Calendar::todos(); } | 120 | QPtrList<Todo> todos() { return Calendar::todos(); } |
120 | 121 | ||
121 | /** | 122 | /** |
122 | Add a Journal entry to calendar. | 123 | Add a Journal entry to calendar. |
123 | */ | 124 | */ |
124 | bool addJournal( Journal * ); | 125 | bool addJournal( Journal * ); |
125 | /** | 126 | /** |
126 | Remove a Journal from the calendar. | 127 | Remove a Journal from the calendar. |
127 | */ | 128 | */ |
128 | void deleteJournal( Journal * ); | 129 | void deleteJournal( Journal * ); |
129 | /** | 130 | /** |
130 | Return Journal for given date. | 131 | Return Journal for given date. |
131 | */ | 132 | */ |
132 | Journal *journal( const QDate & ); | 133 | Journal *journal( const QDate & ); |
133 | /** | 134 | /** |
134 | Return Journal with given UID. | 135 | Return Journal with given UID. |
135 | */ | 136 | */ |
136 | Journal *journal( const QString &uid ); | 137 | Journal *journal( const QString &uid ); |
137 | /** | 138 | /** |
138 | Return list of all Journals stored in calendar. | 139 | Return list of all Journals stored in calendar. |
139 | */ | 140 | */ |
140 | QPtrList<Journal> journals(); | 141 | QPtrList<Journal> journals(); |
141 | 142 | ||
142 | /** | 143 | /** |
143 | Return all alarms, which ocur in the given time interval. | 144 | Return all alarms, which ocur in the given time interval. |
144 | */ | 145 | */ |
145 | Alarm::List alarms( const QDateTime &from, const QDateTime &to ); | 146 | Alarm::List alarms( const QDateTime &from, const QDateTime &to ); |
146 | 147 | ||
147 | /** | 148 | /** |
148 | Return all alarms, which ocur before given date. | 149 | Return all alarms, which ocur before given date. |
149 | */ | 150 | */ |
150 | Alarm::List alarmsTo( const QDateTime &to ); | 151 | Alarm::List alarmsTo( const QDateTime &to ); |
151 | 152 | ||
152 | QDateTime nextAlarm( int daysTo ) ; | 153 | QDateTime nextAlarm( int daysTo ) ; |
153 | QDateTime nextAlarmEventDateTime() const; | 154 | QDateTime nextAlarmEventDateTime() const; |
154 | void checkAlarmForIncidence( Incidence *, bool deleted ) ; | 155 | void checkAlarmForIncidence( Incidence *, bool deleted ) ; |
155 | void registerAlarm(); | 156 | void registerAlarm(); |
156 | void deRegisterAlarm(); | 157 | void deRegisterAlarm(); |
157 | QString getAlarmNotification(); | 158 | QString getAlarmNotification(); |
158 | QString nextSummary() const ; | 159 | QString nextSummary() const ; |
159 | /** | 160 | /** |
160 | This method should be called whenever a Event is modified directly | 161 | This method should be called whenever a Event is modified directly |
161 | via it's pointer. It makes sure that the calendar is internally | 162 | via it's pointer. It makes sure that the calendar is internally |
162 | consistent. | 163 | consistent. |
163 | */ | 164 | */ |
164 | void update( IncidenceBase *incidence ); | 165 | void update( IncidenceBase *incidence ); |
165 | 166 | ||
166 | /** | 167 | /** |
167 | Builds and then returns a list of all events that match for the | 168 | Builds and then returns a list of all events that match for the |
168 | date specified. useful for dayView, etc. etc. | 169 | date specified. useful for dayView, etc. etc. |
169 | */ | 170 | */ |
170 | QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); | 171 | QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); |
171 | /** | 172 | /** |
172 | Get unfiltered events for date \a qdt. | 173 | Get unfiltered events for date \a qdt. |
173 | */ | 174 | */ |
174 | QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); | 175 | QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); |
175 | /** | 176 | /** |
176 | Get unfiltered events in a range of dates. If inclusive is set to true, | 177 | Get unfiltered events in a range of dates. If inclusive is set to true, |
177 | only events are returned, which are completely included in the range. | 178 | only events are returned, which are completely included in the range. |
178 | */ | 179 | */ |
179 | QPtrList<Event> rawEvents( const QDate &start, const QDate &end, | 180 | QPtrList<Event> rawEvents( const QDate &start, const QDate &end, |
180 | bool inclusive = false ); | 181 | bool inclusive = false ); |
181 | Todo *todo( QString, QString ); | 182 | Todo *todo( QString, QString ); |
182 | Event *event( QString, QString ); | 183 | Event *event( QString, QString ); |
183 | 184 | ||
184 | public slots: | 185 | public slots: |
185 | void setCalendarEnabled( int id, bool enable ); | 186 | void setCalendarEnabled( int id, bool enable ); |
186 | void setAlarmEnabled( int id, bool enable ); | 187 | void setAlarmEnabled( int id, bool enable ); |
187 | void setReadOnly( int id, bool enable ); | 188 | void setReadOnly( int id, bool enable ); |
188 | void setDefaultCalendarEnabledOnly(); | 189 | void setDefaultCalendarEnabledOnly(); |
189 | void setCalendarRemove( int id ); | 190 | void setCalendarRemove( int id ); |
190 | 191 | ||
191 | protected: | 192 | protected: |
192 | 193 | ||
193 | // Event* mNextAlarmEvent; | 194 | // Event* mNextAlarmEvent; |
194 | QString mNextSummary; | 195 | QString mNextSummary; |
195 | QString mNextAlarmEventDateTimeString; | 196 | QString mNextAlarmEventDateTimeString; |
196 | QString mLastAlarmNotificationString; | 197 | QString mLastAlarmNotificationString; |
197 | QDateTime mNextAlarmEventDateTime; | 198 | QDateTime mNextAlarmEventDateTime; |
198 | QDateTime mNextAlarmDateTime; | 199 | QDateTime mNextAlarmDateTime; |
199 | void reInitAlarmSettings(); | 200 | void reInitAlarmSettings(); |
200 | 201 | ||
201 | /** Notification function of IncidenceBase::Observer. */ | 202 | /** Notification function of IncidenceBase::Observer. */ |
202 | void incidenceUpdated( IncidenceBase *i ) { update( i ); } | 203 | void incidenceUpdated( IncidenceBase *i ) { update( i ); } |
203 | 204 | ||
204 | /** inserts an event into its "proper place" in the calendar. */ | 205 | /** inserts an event into its "proper place" in the calendar. */ |
205 | void insertEvent( Event *event ); | 206 | void insertEvent( Event *event ); |
206 | 207 | ||
207 | /** Append alarms of incidence in interval to list of alarms. */ | 208 | /** Append alarms of incidence in interval to list of alarms. */ |
208 | void appendAlarms( Alarm::List &alarms, Incidence *incidence, | 209 | void appendAlarms( Alarm::List &alarms, Incidence *incidence, |
209 | const QDateTime &from, const QDateTime &to ); | 210 | const QDateTime &from, const QDateTime &to ); |
210 | 211 | ||
211 | /** Append alarms of recurring events in interval to list of alarms. */ | 212 | /** Append alarms of recurring events in interval to list of alarms. */ |
212 | void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence, | 213 | void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence, |
213 | const QDateTime &from, const QDateTime &to ); | 214 | const QDateTime &from, const QDateTime &to ); |
214 | 215 | ||
215 | private: | 216 | private: |
216 | void init(); | 217 | void init(); |
217 | 218 | ||
218 | QPtrList<Event> mEventList; | 219 | QPtrList<Event> mEventList; |
219 | QPtrList<Todo> mTodoList; | 220 | QPtrList<Todo> mTodoList; |
220 | QPtrList<Journal> mJournalList; | 221 | QPtrList<Journal> mJournalList; |
221 | }; | 222 | }; |
222 | 223 | ||
223 | } | 224 | } |
224 | 225 | ||
225 | #endif | 226 | #endif |
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 9a8b6e4..5260051 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -1,601 +1,601 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <kglobal.h> | 21 | #include <kglobal.h> |
22 | #include <kglobalsettings.h> | 22 | #include <kglobalsettings.h> |
23 | #include <klocale.h> | 23 | #include <klocale.h> |
24 | #include <kdebug.h> | 24 | #include <kdebug.h> |
25 | #include <qregexp.h> | 25 | #include <qregexp.h> |
26 | #include <qfileinfo.h> | 26 | #include <qfileinfo.h> |
27 | 27 | ||
28 | #include "calendarlocal.h" | 28 | #include "calendarlocal.h" |
29 | #include "icalformat.h" | 29 | #include "icalformat.h" |
30 | #include "todo.h" | 30 | #include "todo.h" |
31 | 31 | ||
32 | using namespace KCal; | 32 | using namespace KCal; |
33 | 33 | ||
34 | Todo::Todo(): QObject(), Incidence() | 34 | Todo::Todo(): QObject(), Incidence() |
35 | { | 35 | { |
36 | // mStatus = TENTATIVE; | 36 | // mStatus = TENTATIVE; |
37 | 37 | ||
38 | mHasDueDate = false; | 38 | mHasDueDate = false; |
39 | setHasStartDate( false ); | 39 | setHasStartDate( false ); |
40 | mCompleted = getEvenTime(QDateTime::currentDateTime()); | 40 | mCompleted = getEvenTime(QDateTime::currentDateTime()); |
41 | mHasCompletedDate = false; | 41 | mHasCompletedDate = false; |
42 | mPercentComplete = 0; | 42 | mPercentComplete = 0; |
43 | mRunning = false; | 43 | mRunning = false; |
44 | mRunSaveTimer = 0; | 44 | mRunSaveTimer = 0; |
45 | } | 45 | } |
46 | 46 | ||
47 | Todo::Todo(const Todo &t) : QObject(),Incidence(t) | 47 | Todo::Todo(const Todo &t) : QObject(),Incidence(t) |
48 | { | 48 | { |
49 | mDtDue = t.mDtDue; | 49 | mDtDue = t.mDtDue; |
50 | mHasDueDate = t.mHasDueDate; | 50 | mHasDueDate = t.mHasDueDate; |
51 | mCompleted = t.mCompleted; | 51 | mCompleted = t.mCompleted; |
52 | mHasCompletedDate = t.mHasCompletedDate; | 52 | mHasCompletedDate = t.mHasCompletedDate; |
53 | mPercentComplete = t.mPercentComplete; | 53 | mPercentComplete = t.mPercentComplete; |
54 | mRunning = false; | 54 | mRunning = false; |
55 | mRunSaveTimer = 0; | 55 | mRunSaveTimer = 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | Todo::~Todo() | 58 | Todo::~Todo() |
59 | { | 59 | { |
60 | setRunning( false ); | 60 | setRunning( false ); |
61 | //qDebug("Todo::~Todo() "); | 61 | //qDebug("Todo::~Todo() "); |
62 | } | 62 | } |
63 | 63 | ||
64 | void Todo::setRunningFalse( QString s ) | 64 | void Todo::setRunningFalse( QString s ) |
65 | { | 65 | { |
66 | if ( ! mRunning ) | 66 | if ( ! mRunning ) |
67 | return; | 67 | return; |
68 | mRunning = false; | 68 | mRunning = false; |
69 | mRunSaveTimer->stop(); | 69 | mRunSaveTimer->stop(); |
70 | saveRunningInfoToFile( s ); | 70 | saveRunningInfoToFile( s ); |
71 | } | 71 | } |
72 | void Todo::stopRunning() | 72 | void Todo::stopRunning() |
73 | { | 73 | { |
74 | if ( !mRunning ) | 74 | if ( !mRunning ) |
75 | return; | 75 | return; |
76 | if ( mRunSaveTimer ) | 76 | if ( mRunSaveTimer ) |
77 | mRunSaveTimer->stop(); | 77 | mRunSaveTimer->stop(); |
78 | mRunning = false; | 78 | mRunning = false; |
79 | } | 79 | } |
80 | void Todo::setRunning( bool run ) | 80 | void Todo::setRunning( bool run ) |
81 | { | 81 | { |
82 | if ( run == mRunning ) | 82 | if ( run == mRunning ) |
83 | return; | 83 | return; |
84 | //qDebug("Todo::setRunning %d ", run); | 84 | //qDebug("Todo::setRunning %d ", run); |
85 | if ( !mRunSaveTimer ) { | 85 | if ( !mRunSaveTimer ) { |
86 | mRunSaveTimer = new QTimer ( this ); | 86 | mRunSaveTimer = new QTimer ( this ); |
87 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); | 87 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); |
88 | } | 88 | } |
89 | mRunning = run; | 89 | mRunning = run; |
90 | if ( mRunning ) { | 90 | if ( mRunning ) { |
91 | mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min | 91 | mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min |
92 | mRunStart = QDateTime::currentDateTime(); | 92 | mRunStart = QDateTime::currentDateTime(); |
93 | } else { | 93 | } else { |
94 | mRunSaveTimer->stop(); | 94 | mRunSaveTimer->stop(); |
95 | saveRunningInfoToFile(); | 95 | saveRunningInfoToFile(); |
96 | } | 96 | } |
97 | } | 97 | } |
98 | void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) | 98 | void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) |
99 | { | 99 | { |
100 | if ( !mRunning) return; | 100 | if ( !mRunning) return; |
101 | mRunning = false; | 101 | mRunning = false; |
102 | mRunStart = start; | 102 | mRunStart = start; |
103 | mRunEnd = end; | 103 | mRunEnd = end; |
104 | saveRunningInfoToFile( comment ); | 104 | saveRunningInfoToFile( comment ); |
105 | } | 105 | } |
106 | void Todo::saveRunningInfoToFile() | 106 | void Todo::saveRunningInfoToFile() |
107 | { | 107 | { |
108 | mRunEnd = QDateTime::currentDateTime(); | 108 | mRunEnd = QDateTime::currentDateTime(); |
109 | saveRunningInfoToFile( QString::null ); | 109 | saveRunningInfoToFile( QString::null ); |
110 | } | 110 | } |
111 | void Todo::saveRunningInfoToFile( QString comment ) | 111 | void Todo::saveRunningInfoToFile( QString comment ) |
112 | { | 112 | { |
113 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); | 113 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); |
114 | if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 10 ) { | 114 | if ( mRunStart.secsTo ( mRunEnd) < 15 ) { |
115 | qDebug("Running time < 30 seconds. Skipped. "); | 115 | qDebug("Running time < 15 seconds. Skipped. "); |
116 | return; | 116 | return; |
117 | } | 117 | } |
118 | QString dir = KGlobalSettings::timeTrackerDir(); | 118 | QString dir = KGlobalSettings::timeTrackerDir(); |
119 | //qDebug("%s ", dir.latin1()); | 119 | //qDebug("%s ", dir.latin1()); |
120 | QString file = "%1%2%3-%4%5%6-"; | 120 | QString file = "%1%2%3-%4%5%6-"; |
121 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); | 121 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); |
122 | file.replace ( QRegExp (" "), "0" ); | 122 | file.replace ( QRegExp (" "), "0" ); |
123 | file += uid(); | 123 | file += uid(); |
124 | //qDebug("File %s ",file.latin1() ); | 124 | //qDebug("File %s ",file.latin1() ); |
125 | CalendarLocal cal; | 125 | CalendarLocal cal; |
126 | cal.setLocalTime(); | 126 | cal.setLocalTime(); |
127 | Todo * to = (Todo*) clone(); | 127 | Todo * to = (Todo*) clone(); |
128 | to->setFloats( false ); | 128 | to->setFloats( false ); |
129 | to->setDtStart( mRunStart ); | 129 | to->setDtStart( mRunStart ); |
130 | to->setHasStartDate( true ); | 130 | to->setHasStartDate( true ); |
131 | to->setDtDue( mRunEnd ); | 131 | to->setDtDue( mRunEnd ); |
132 | to->setHasDueDate( true ); | 132 | to->setHasDueDate( true ); |
133 | to->setUid( file ); | 133 | to->setUid( file ); |
134 | if ( !comment.isEmpty() ) { | 134 | if ( !comment.isEmpty() ) { |
135 | QString des = to->description(); | 135 | QString des = to->description(); |
136 | if ( des.isEmpty () ) | 136 | if ( des.isEmpty () ) |
137 | to->setDescription( "TT-Note: " + comment ); | 137 | to->setDescription( "TT-Note: " + comment ); |
138 | else | 138 | else |
139 | to->setDescription( "TT-Note: " + comment +"\n" + des ); | 139 | to->setDescription( "TT-Note: " + comment +"\n" + des ); |
140 | } | 140 | } |
141 | cal.addIncidence( to ); | 141 | cal.addIncidence( to ); |
142 | ICalFormat format; | 142 | ICalFormat format; |
143 | file = dir +"/" +file +".ics"; | 143 | file = dir +"/" +file +".ics"; |
144 | format.save( &cal, file ); | 144 | format.save( &cal, file ); |
145 | saveParents(); | 145 | saveParents(); |
146 | 146 | ||
147 | } | 147 | } |
148 | void Todo::saveParents() | 148 | void Todo::saveParents() |
149 | { | 149 | { |
150 | if (!relatedTo() ) | 150 | if (!relatedTo() ) |
151 | return; | 151 | return; |
152 | Incidence * inc = relatedTo(); | 152 | Incidence * inc = relatedTo(); |
153 | if ( inc->typeID() != todoID ) | 153 | if ( inc->typeID() != todoID ) |
154 | return; | 154 | return; |
155 | Todo* to = (Todo*)inc; | 155 | Todo* to = (Todo*)inc; |
156 | bool saveTodo = false; | 156 | bool saveTodo = false; |
157 | QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; | 157 | QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; |
158 | QFileInfo fi ( file ); | 158 | QFileInfo fi ( file ); |
159 | if ( fi.exists() ) { | 159 | if ( fi.exists() ) { |
160 | if ( fi.lastModified () < to->lastModified ()) | 160 | if ( fi.lastModified () < to->lastModified ()) |
161 | saveTodo = true; | 161 | saveTodo = true; |
162 | } else { | 162 | } else { |
163 | saveTodo = true; | 163 | saveTodo = true; |
164 | } | 164 | } |
165 | if ( saveTodo ) { | 165 | if ( saveTodo ) { |
166 | CalendarLocal cal; | 166 | CalendarLocal cal; |
167 | cal.setLocalTime(); | 167 | cal.setLocalTime(); |
168 | Todo * par = (Todo *) to->clone(); | 168 | Todo * par = (Todo *) to->clone(); |
169 | cal.addIncidence( par ); | 169 | cal.addIncidence( par ); |
170 | ICalFormat format; | 170 | ICalFormat format; |
171 | format.save( &cal, file ); | 171 | format.save( &cal, file ); |
172 | } | 172 | } |
173 | to->saveParents(); | 173 | to->saveParents(); |
174 | } | 174 | } |
175 | 175 | ||
176 | int Todo::runTime() | 176 | int Todo::runTime() |
177 | { | 177 | { |
178 | if ( !mRunning ) | 178 | if ( !mRunning ) |
179 | return 0; | 179 | return 0; |
180 | return mRunStart.secsTo( QDateTime::currentDateTime() ); | 180 | return mRunStart.secsTo( QDateTime::currentDateTime() ); |
181 | } | 181 | } |
182 | bool Todo::hasRunningSub() | 182 | bool Todo::hasRunningSub() |
183 | { | 183 | { |
184 | if ( mRunning ) | 184 | if ( mRunning ) |
185 | return true; | 185 | return true; |
186 | Incidence *aTodo; | 186 | Incidence *aTodo; |
187 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { | 187 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { |
188 | if ( ((Todo*)aTodo)->hasRunningSub() ) | 188 | if ( ((Todo*)aTodo)->hasRunningSub() ) |
189 | return true; | 189 | return true; |
190 | } | 190 | } |
191 | return false; | 191 | return false; |
192 | } | 192 | } |
193 | Incidence *Todo::clone() | 193 | Incidence *Todo::clone() |
194 | { | 194 | { |
195 | return new Todo(*this); | 195 | return new Todo(*this); |
196 | } | 196 | } |
197 | 197 | ||
198 | bool Todo::contains ( Todo* from ) | 198 | bool Todo::contains ( Todo* from ) |
199 | { | 199 | { |
200 | 200 | ||
201 | if ( !from->summary().isEmpty() ) | 201 | if ( !from->summary().isEmpty() ) |
202 | if ( !summary().startsWith( from->summary() )) | 202 | if ( !summary().startsWith( from->summary() )) |
203 | return false; | 203 | return false; |
204 | if ( from->hasStartDate() ) { | 204 | if ( from->hasStartDate() ) { |
205 | if ( !hasStartDate() ) | 205 | if ( !hasStartDate() ) |
206 | return false; | 206 | return false; |
207 | if ( from->dtStart() != dtStart()) | 207 | if ( from->dtStart() != dtStart()) |
208 | return false; | 208 | return false; |
209 | } | 209 | } |
210 | if ( from->hasDueDate() ){ | 210 | if ( from->hasDueDate() ){ |
211 | if ( !hasDueDate() ) | 211 | if ( !hasDueDate() ) |
212 | return false; | 212 | return false; |
213 | if ( from->dtDue() != dtDue()) | 213 | if ( from->dtDue() != dtDue()) |
214 | return false; | 214 | return false; |
215 | } | 215 | } |
216 | if ( !from->location().isEmpty() ) | 216 | if ( !from->location().isEmpty() ) |
217 | if ( !location().startsWith( from->location() ) ) | 217 | if ( !location().startsWith( from->location() ) ) |
218 | return false; | 218 | return false; |
219 | if ( !from->description().isEmpty() ) | 219 | if ( !from->description().isEmpty() ) |
220 | if ( !description().startsWith( from->description() )) | 220 | if ( !description().startsWith( from->description() )) |
221 | return false; | 221 | return false; |
222 | if ( from->alarms().count() ) { | 222 | if ( from->alarms().count() ) { |
223 | Alarm *a = from->alarms().first(); | 223 | Alarm *a = from->alarms().first(); |
224 | if ( a->enabled() ){ | 224 | if ( a->enabled() ){ |
225 | if ( !alarms().count() ) | 225 | if ( !alarms().count() ) |
226 | return false; | 226 | return false; |
227 | Alarm *b = alarms().first(); | 227 | Alarm *b = alarms().first(); |
228 | if( ! b->enabled() ) | 228 | if( ! b->enabled() ) |
229 | return false; | 229 | return false; |
230 | if ( ! (a->offset() == b->offset() )) | 230 | if ( ! (a->offset() == b->offset() )) |
231 | return false; | 231 | return false; |
232 | } | 232 | } |
233 | } | 233 | } |
234 | 234 | ||
235 | QStringList cat = categories(); | 235 | QStringList cat = categories(); |
236 | QStringList catFrom = from->categories(); | 236 | QStringList catFrom = from->categories(); |
237 | QString nCat; | 237 | QString nCat; |
238 | unsigned int iii; | 238 | unsigned int iii; |
239 | for ( iii = 0; iii < catFrom.count();++iii ) { | 239 | for ( iii = 0; iii < catFrom.count();++iii ) { |
240 | nCat = catFrom[iii]; | 240 | nCat = catFrom[iii]; |
241 | if ( !nCat.isEmpty() ) | 241 | if ( !nCat.isEmpty() ) |
242 | if ( !cat.contains( nCat )) { | 242 | if ( !cat.contains( nCat )) { |
243 | return false; | 243 | return false; |
244 | } | 244 | } |
245 | } | 245 | } |
246 | if ( from->isCompleted() ) { | 246 | if ( from->isCompleted() ) { |
247 | if ( !isCompleted() ) | 247 | if ( !isCompleted() ) |
248 | return false; | 248 | return false; |
249 | } | 249 | } |
250 | if( priority() != from->priority() ) | 250 | if( priority() != from->priority() ) |
251 | return false; | 251 | return false; |
252 | 252 | ||
253 | 253 | ||
254 | return true; | 254 | return true; |
255 | 255 | ||
256 | } | 256 | } |
257 | bool KCal::operator==( const Todo& t1, const Todo& t2 ) | 257 | bool KCal::operator==( const Todo& t1, const Todo& t2 ) |
258 | { | 258 | { |
259 | 259 | ||
260 | bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); | 260 | bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); |
261 | if ( ! ret ) | 261 | if ( ! ret ) |
262 | return false; | 262 | return false; |
263 | if ( t1.hasDueDate() == t2.hasDueDate() ) { | 263 | if ( t1.hasDueDate() == t2.hasDueDate() ) { |
264 | if ( t1.hasDueDate() ) { | 264 | if ( t1.hasDueDate() ) { |
265 | if ( t1.doesFloat() == t2.doesFloat() ) { | 265 | if ( t1.doesFloat() == t2.doesFloat() ) { |
266 | if ( t1.doesFloat() ) { | 266 | if ( t1.doesFloat() ) { |
267 | if ( t1.dtDue().date() != t2.dtDue().date() ) | 267 | if ( t1.dtDue().date() != t2.dtDue().date() ) |
268 | return false; | 268 | return false; |
269 | } else | 269 | } else |
270 | if ( t1.dtDue() != t2.dtDue() ) | 270 | if ( t1.dtDue() != t2.dtDue() ) |
271 | return false; | 271 | return false; |
272 | } else | 272 | } else |
273 | return false;// float != | 273 | return false;// float != |
274 | } | 274 | } |
275 | 275 | ||
276 | } else | 276 | } else |
277 | return false; | 277 | return false; |
278 | if ( t1.percentComplete() != t2.percentComplete() ) | 278 | if ( t1.percentComplete() != t2.percentComplete() ) |
279 | return false; | 279 | return false; |
280 | if ( t1.isCompleted() ) { | 280 | if ( t1.isCompleted() ) { |
281 | if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) { | 281 | if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) { |
282 | if ( t1.hasCompletedDate() ) { | 282 | if ( t1.hasCompletedDate() ) { |
283 | if ( t1.completed() != t2.completed() ) | 283 | if ( t1.completed() != t2.completed() ) |
284 | return false; | 284 | return false; |
285 | } | 285 | } |
286 | 286 | ||
287 | } else | 287 | } else |
288 | return false; | 288 | return false; |
289 | } | 289 | } |
290 | return true; | 290 | return true; |
291 | 291 | ||
292 | } | 292 | } |
293 | 293 | ||
294 | void Todo::setDtDue(const QDateTime &dtDue) | 294 | void Todo::setDtDue(const QDateTime &dtDue) |
295 | { | 295 | { |
296 | //int diffsecs = mDtDue.secsTo(dtDue); | 296 | //int diffsecs = mDtDue.secsTo(dtDue); |
297 | 297 | ||
298 | /*if (mReadOnly) return; | 298 | /*if (mReadOnly) return; |
299 | const QPtrList<Alarm>& alarms = alarms(); | 299 | const QPtrList<Alarm>& alarms = alarms(); |
300 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) { | 300 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) { |
301 | if (alarm->enabled()) { | 301 | if (alarm->enabled()) { |
302 | alarm->setTime(alarm->time().addSecs(diffsecs)); | 302 | alarm->setTime(alarm->time().addSecs(diffsecs)); |
303 | } | 303 | } |
304 | }*/ | 304 | }*/ |
305 | mDtDue = getEvenTime(dtDue); | 305 | mDtDue = getEvenTime(dtDue); |
306 | 306 | ||
307 | //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl; | 307 | //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl; |
308 | 308 | ||
309 | /*const QPtrList<Alarm>& alarms = alarms(); | 309 | /*const QPtrList<Alarm>& alarms = alarms(); |
310 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) | 310 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) |
311 | alarm->setAlarmStart(mDtDue);*/ | 311 | alarm->setAlarmStart(mDtDue);*/ |
312 | updated(); | 312 | updated(); |
313 | } | 313 | } |
314 | 314 | ||
315 | QDateTime Todo::dtDue() const | 315 | QDateTime Todo::dtDue() const |
316 | { | 316 | { |
317 | return mDtDue; | 317 | return mDtDue; |
318 | } | 318 | } |
319 | 319 | ||
320 | QString Todo::dtDueTimeStr() const | 320 | QString Todo::dtDueTimeStr() const |
321 | { | 321 | { |
322 | return KGlobal::locale()->formatTime(mDtDue.time()); | 322 | return KGlobal::locale()->formatTime(mDtDue.time()); |
323 | } | 323 | } |
324 | 324 | ||
325 | QString Todo::dtDueDateStr(bool shortfmt) const | 325 | QString Todo::dtDueDateStr(bool shortfmt) const |
326 | { | 326 | { |
327 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); | 327 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); |
328 | } | 328 | } |
329 | 329 | ||
330 | QString Todo::dtDueStr(bool shortfmt) const | 330 | QString Todo::dtDueStr(bool shortfmt) const |
331 | { | 331 | { |
332 | if ( doesFloat() ) | 332 | if ( doesFloat() ) |
333 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); | 333 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); |
334 | return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); | 334 | return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); |
335 | } | 335 | } |
336 | // retval 0 : no found | 336 | // retval 0 : no found |
337 | // 1 : due for date found | 337 | // 1 : due for date found |
338 | // 2 : overdue for date found | 338 | // 2 : overdue for date found |
339 | int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ) | 339 | int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ) |
340 | { | 340 | { |
341 | int retval = 0; | 341 | int retval = 0; |
342 | if ( isCompleted() ) | 342 | if ( isCompleted() ) |
343 | return 0; | 343 | return 0; |
344 | if ( hasDueDate() ) { | 344 | if ( hasDueDate() ) { |
345 | if ( dtDue().date() < date ) | 345 | if ( dtDue().date() < date ) |
346 | return 2; | 346 | return 2; |
347 | // we do not return, because we may find an overdue sub todo | 347 | // we do not return, because we may find an overdue sub todo |
348 | if ( dtDue().date() == date ) | 348 | if ( dtDue().date() == date ) |
349 | retval = 1; | 349 | retval = 1; |
350 | } | 350 | } |
351 | if ( checkSubtodos ) { | 351 | if ( checkSubtodos ) { |
352 | Incidence *aTodo; | 352 | Incidence *aTodo; |
353 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { | 353 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { |
354 | int ret = ((Todo*)aTodo)->hasDueSubTodoForDate( date ,checkSubtodos ); | 354 | int ret = ((Todo*)aTodo)->hasDueSubTodoForDate( date ,checkSubtodos ); |
355 | if ( ret == 2 ) | 355 | if ( ret == 2 ) |
356 | return 2; | 356 | return 2; |
357 | if ( ret == 1) | 357 | if ( ret == 1) |
358 | retval = 1; | 358 | retval = 1; |
359 | } | 359 | } |
360 | } | 360 | } |
361 | return retval; | 361 | return retval; |
362 | } | 362 | } |
363 | int Todo::hasDueSubTodo( bool checkSubtodos ) //= true | 363 | int Todo::hasDueSubTodo( bool checkSubtodos ) //= true |
364 | { | 364 | { |
365 | return hasDueSubTodoForDate(QDate::currentDate(), checkSubtodos ); | 365 | return hasDueSubTodoForDate(QDate::currentDate(), checkSubtodos ); |
366 | } | 366 | } |
367 | bool Todo::hasDueDate() const | 367 | bool Todo::hasDueDate() const |
368 | { | 368 | { |
369 | return mHasDueDate; | 369 | return mHasDueDate; |
370 | } | 370 | } |
371 | 371 | ||
372 | void Todo::setHasDueDate(bool f) | 372 | void Todo::setHasDueDate(bool f) |
373 | { | 373 | { |
374 | if (mReadOnly) return; | 374 | if (mReadOnly) return; |
375 | mHasDueDate = f; | 375 | mHasDueDate = f; |
376 | updated(); | 376 | updated(); |
377 | } | 377 | } |
378 | 378 | ||
379 | 379 | ||
380 | #if 0 | 380 | #if 0 |
381 | void Todo::setStatus(const QString &statStr) | 381 | void Todo::setStatus(const QString &statStr) |
382 | { | 382 | { |
383 | if (mReadOnly) return; | 383 | if (mReadOnly) return; |
384 | QString ss(statStr.upper()); | 384 | QString ss(statStr.upper()); |
385 | 385 | ||
386 | if (ss == "X-ACTION") | 386 | if (ss == "X-ACTION") |
387 | mStatus = NEEDS_ACTION; | 387 | mStatus = NEEDS_ACTION; |
388 | else if (ss == "NEEDS ACTION") | 388 | else if (ss == "NEEDS ACTION") |
389 | mStatus = NEEDS_ACTION; | 389 | mStatus = NEEDS_ACTION; |
390 | else if (ss == "ACCEPTED") | 390 | else if (ss == "ACCEPTED") |
391 | mStatus = ACCEPTED; | 391 | mStatus = ACCEPTED; |
392 | else if (ss == "SENT") | 392 | else if (ss == "SENT") |
393 | mStatus = SENT; | 393 | mStatus = SENT; |
394 | else if (ss == "TENTATIVE") | 394 | else if (ss == "TENTATIVE") |
395 | mStatus = TENTATIVE; | 395 | mStatus = TENTATIVE; |
396 | else if (ss == "CONFIRMED") | 396 | else if (ss == "CONFIRMED") |
397 | mStatus = CONFIRMED; | 397 | mStatus = CONFIRMED; |
398 | else if (ss == "DECLINED") | 398 | else if (ss == "DECLINED") |
399 | mStatus = DECLINED; | 399 | mStatus = DECLINED; |
400 | else if (ss == "COMPLETED") | 400 | else if (ss == "COMPLETED") |
401 | mStatus = COMPLETED; | 401 | mStatus = COMPLETED; |
402 | else if (ss == "DELEGATED") | 402 | else if (ss == "DELEGATED") |
403 | mStatus = DELEGATED; | 403 | mStatus = DELEGATED; |
404 | 404 | ||
405 | updated(); | 405 | updated(); |
406 | } | 406 | } |
407 | 407 | ||
408 | void Todo::setStatus(int status) | 408 | void Todo::setStatus(int status) |
409 | { | 409 | { |
410 | if (mReadOnly) return; | 410 | if (mReadOnly) return; |
411 | mStatus = status; | 411 | mStatus = status; |
412 | updated(); | 412 | updated(); |
413 | } | 413 | } |
414 | 414 | ||
415 | int Todo::status() const | 415 | int Todo::status() const |
416 | { | 416 | { |
417 | return mStatus; | 417 | return mStatus; |
418 | } | 418 | } |
419 | 419 | ||
420 | QString Todo::statusStr() const | 420 | QString Todo::statusStr() const |
421 | { | 421 | { |
422 | switch(mStatus) { | 422 | switch(mStatus) { |
423 | case NEEDS_ACTION: | 423 | case NEEDS_ACTION: |
424 | return QString("NEEDS ACTION"); | 424 | return QString("NEEDS ACTION"); |
425 | break; | 425 | break; |
426 | case ACCEPTED: | 426 | case ACCEPTED: |
427 | return QString("ACCEPTED"); | 427 | return QString("ACCEPTED"); |
428 | break; | 428 | break; |
429 | case SENT: | 429 | case SENT: |
430 | return QString("SENT"); | 430 | return QString("SENT"); |
431 | break; | 431 | break; |
432 | case TENTATIVE: | 432 | case TENTATIVE: |
433 | return QString("TENTATIVE"); | 433 | return QString("TENTATIVE"); |
434 | break; | 434 | break; |
435 | case CONFIRMED: | 435 | case CONFIRMED: |
436 | return QString("CONFIRMED"); | 436 | return QString("CONFIRMED"); |
437 | break; | 437 | break; |
438 | case DECLINED: | 438 | case DECLINED: |
439 | return QString("DECLINED"); | 439 | return QString("DECLINED"); |
440 | break; | 440 | break; |
441 | case COMPLETED: | 441 | case COMPLETED: |
442 | return QString("COMPLETED"); | 442 | return QString("COMPLETED"); |
443 | break; | 443 | break; |
444 | case DELEGATED: | 444 | case DELEGATED: |
445 | return QString("DELEGATED"); | 445 | return QString("DELEGATED"); |
446 | break; | 446 | break; |
447 | } | 447 | } |
448 | return QString(""); | 448 | return QString(""); |
449 | } | 449 | } |
450 | #endif | 450 | #endif |
451 | 451 | ||
452 | bool Todo::isCompleted() const | 452 | bool Todo::isCompleted() const |
453 | { | 453 | { |
454 | if (mPercentComplete == 100) { | 454 | if (mPercentComplete == 100) { |
455 | return true; | 455 | return true; |
456 | } | 456 | } |
457 | else return false; | 457 | else return false; |
458 | } | 458 | } |
459 | 459 | ||
460 | void Todo::setCompleted(bool completed) | 460 | void Todo::setCompleted(bool completed) |
461 | { | 461 | { |
462 | if ( mHasRecurrenceID && completed && mPercentComplete != 100 ) { | 462 | if ( mHasRecurrenceID && completed && mPercentComplete != 100 ) { |
463 | if ( !setRecurDates() ) | 463 | if ( !setRecurDates() ) |
464 | completed = false; | 464 | completed = false; |
465 | } | 465 | } |
466 | if (completed) mPercentComplete = 100; | 466 | if (completed) mPercentComplete = 100; |
467 | else { | 467 | else { |
468 | mPercentComplete = 0; | 468 | mPercentComplete = 0; |
469 | mHasCompletedDate = false; | 469 | mHasCompletedDate = false; |
470 | } | 470 | } |
471 | updated(); | 471 | updated(); |
472 | } | 472 | } |
473 | 473 | ||
474 | QDateTime Todo::completed() const | 474 | QDateTime Todo::completed() const |
475 | { | 475 | { |
476 | return mCompleted; | 476 | return mCompleted; |
477 | } | 477 | } |
478 | 478 | ||
479 | QString Todo::completedStr( bool shortF ) const | 479 | QString Todo::completedStr( bool shortF ) const |
480 | { | 480 | { |
481 | return KGlobal::locale()->formatDateTime(mCompleted, shortF); | 481 | return KGlobal::locale()->formatDateTime(mCompleted, shortF); |
482 | } | 482 | } |
483 | 483 | ||
484 | void Todo::setCompleted(const QDateTime &completed) | 484 | void Todo::setCompleted(const QDateTime &completed) |
485 | { | 485 | { |
486 | //qDebug("Todo::setCompleted "); | 486 | //qDebug("Todo::setCompleted "); |
487 | if ( mHasCompletedDate ) { | 487 | if ( mHasCompletedDate ) { |
488 | // qDebug("has completed data - return "); | 488 | // qDebug("has completed data - return "); |
489 | return; | 489 | return; |
490 | } | 490 | } |
491 | mHasCompletedDate = true; | 491 | mHasCompletedDate = true; |
492 | mPercentComplete = 100; | 492 | mPercentComplete = 100; |
493 | mCompleted = getEvenTime(completed); | 493 | mCompleted = getEvenTime(completed); |
494 | updated(); | 494 | updated(); |
495 | } | 495 | } |
496 | 496 | ||
497 | bool Todo::hasCompletedDate() const | 497 | bool Todo::hasCompletedDate() const |
498 | { | 498 | { |
499 | return mHasCompletedDate; | 499 | return mHasCompletedDate; |
500 | } | 500 | } |
501 | 501 | ||
502 | int Todo::percentComplete() const | 502 | int Todo::percentComplete() const |
503 | { | 503 | { |
504 | return mPercentComplete; | 504 | return mPercentComplete; |
505 | } | 505 | } |
506 | bool Todo::setRecurDates() | 506 | bool Todo::setRecurDates() |
507 | { | 507 | { |
508 | if ( !mHasRecurrenceID ) | 508 | if ( !mHasRecurrenceID ) |
509 | return true; | 509 | return true; |
510 | int secs = mDtStart.secsTo( dtDue() ); | 510 | int secs = mDtStart.secsTo( dtDue() ); |
511 | bool ok; | 511 | bool ok; |
512 | qDebug("T:setRecurDates() "); | 512 | qDebug("T:setRecurDates() "); |
513 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 513 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
514 | QDateTime next = getNextOccurence( mRecurrenceID, &ok ); | 514 | QDateTime next = getNextOccurence( mRecurrenceID, &ok ); |
515 | if ( ok ) { | 515 | if ( ok ) { |
516 | mRecurrenceID = next; | 516 | mRecurrenceID = next; |
517 | mDtStart = next; | 517 | mDtStart = next; |
518 | setDtDue( next.addSecs( secs ) ); | 518 | setDtDue( next.addSecs( secs ) ); |
519 | if ( QDateTime::currentDateTime() > next) | 519 | if ( QDateTime::currentDateTime() > next) |
520 | return false; | 520 | return false; |
521 | } else { | 521 | } else { |
522 | setHasRecurrenceID( false ); | 522 | setHasRecurrenceID( false ); |
523 | recurrence()->unsetRecurs(); | 523 | recurrence()->unsetRecurs(); |
524 | } | 524 | } |
525 | return true; | 525 | return true; |
526 | } | 526 | } |
527 | void Todo::setPercentComplete(int v) | 527 | void Todo::setPercentComplete(int v) |
528 | { | 528 | { |
529 | if ( mHasRecurrenceID && v == 100 && mPercentComplete != 100 ) { | 529 | if ( mHasRecurrenceID && v == 100 && mPercentComplete != 100 ) { |
530 | if ( !setRecurDates() ) | 530 | if ( !setRecurDates() ) |
531 | v = 0; | 531 | v = 0; |
532 | } | 532 | } |
533 | mPercentComplete = v; | 533 | mPercentComplete = v; |
534 | if ( v != 100 ) | 534 | if ( v != 100 ) |
535 | mHasCompletedDate = false; | 535 | mHasCompletedDate = false; |
536 | updated(); | 536 | updated(); |
537 | } | 537 | } |
538 | QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const | 538 | QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const |
539 | { | 539 | { |
540 | if ( isCompleted() || ! hasDueDate() || cancelled() || !alarmEnabled() ) { | 540 | if ( isCompleted() || ! hasDueDate() || cancelled() || !alarmEnabled() ) { |
541 | *ok = false; | 541 | *ok = false; |
542 | return QDateTime (); | 542 | return QDateTime (); |
543 | } | 543 | } |
544 | QDateTime incidenceStart; | 544 | QDateTime incidenceStart; |
545 | incidenceStart = dtDue(); | 545 | incidenceStart = dtDue(); |
546 | bool enabled = false; | 546 | bool enabled = false; |
547 | Alarm* alarm; | 547 | Alarm* alarm; |
548 | int off = 0; | 548 | int off = 0; |
549 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; | 549 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; |
550 | // if ( QDateTime::currentDateTime() > incidenceStart ){ | 550 | // if ( QDateTime::currentDateTime() > incidenceStart ){ |
551 | // *ok = false; | 551 | // *ok = false; |
552 | // return incidenceStart; | 552 | // return incidenceStart; |
553 | // } | 553 | // } |
554 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 554 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |
555 | if (alarm->enabled()) { | 555 | if (alarm->enabled()) { |
556 | if ( alarm->hasTime () ) { | 556 | if ( alarm->hasTime () ) { |
557 | if ( alarm->time() < alarmStart ) { | 557 | if ( alarm->time() < alarmStart ) { |
558 | alarmStart = alarm->time(); | 558 | alarmStart = alarm->time(); |
559 | enabled = true; | 559 | enabled = true; |
560 | off = alarmStart.secsTo( incidenceStart ); | 560 | off = alarmStart.secsTo( incidenceStart ); |
561 | } | 561 | } |
562 | 562 | ||
563 | } else { | 563 | } else { |
564 | int secs = alarm->startOffset().asSeconds(); | 564 | int secs = alarm->startOffset().asSeconds(); |
565 | if ( incidenceStart.addSecs( secs ) < alarmStart ) { | 565 | if ( incidenceStart.addSecs( secs ) < alarmStart ) { |
566 | alarmStart = incidenceStart.addSecs( secs ); | 566 | alarmStart = incidenceStart.addSecs( secs ); |
567 | enabled = true; | 567 | enabled = true; |
568 | off = -secs; | 568 | off = -secs; |
569 | } | 569 | } |
570 | } | 570 | } |
571 | } | 571 | } |
572 | } | 572 | } |
573 | if ( enabled ) { | 573 | if ( enabled ) { |
574 | if ( alarmStart > start_dt ) { | 574 | if ( alarmStart > start_dt ) { |
575 | *ok = true; | 575 | *ok = true; |
576 | * offset = off; | 576 | * offset = off; |
577 | return alarmStart; | 577 | return alarmStart; |
578 | } | 578 | } |
579 | } | 579 | } |
580 | *ok = false; | 580 | *ok = false; |
581 | return QDateTime (); | 581 | return QDateTime (); |
582 | 582 | ||
583 | } | 583 | } |
584 | 584 | ||
585 | void Todo::checkSetCompletedFalse() | 585 | void Todo::checkSetCompletedFalse() |
586 | { | 586 | { |
587 | if ( !mHasRecurrenceID ) { | 587 | if ( !mHasRecurrenceID ) { |
588 | qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); | 588 | qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); |
589 | return; | 589 | return; |
590 | } | 590 | } |
591 | // qDebug("Todo::checkSetCompletedFalse()"); | 591 | // qDebug("Todo::checkSetCompletedFalse()"); |
592 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 592 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
593 | if ( mPercentComplete == 100 ) { | 593 | if ( mPercentComplete == 100 ) { |
594 | QDateTime dt = QDateTime::currentDateTime(); | 594 | QDateTime dt = QDateTime::currentDateTime(); |
595 | if ( dt > mDtStart && dt > mRecurrenceID ) { | 595 | if ( dt > mDtStart && dt > mRecurrenceID ) { |
596 | qDebug("start: %s --due: %s --recID: %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 596 | qDebug("start: %s --due: %s --recID: %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
597 | setCompleted( false ); | 597 | setCompleted( false ); |
598 | qDebug("Todo::checkSetCompletedFalse "); | 598 | qDebug("Todo::checkSetCompletedFalse "); |
599 | } | 599 | } |
600 | } | 600 | } |
601 | } | 601 | } |