summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/koagendaview.cpp16
-rw-r--r--korganizer/koeventviewer.cpp5
-rw-r--r--korganizer/koeventviewerdialog.cpp1
-rw-r--r--libkcal/kincidenceformatter.cpp16
-rw-r--r--libkcal/todo.cpp7
6 files changed, 37 insertions, 10 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 0538511..eec0b38 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -694,519 +694,519 @@
694{ "Profile:","Profil:" }, 694{ "Profile:","Profil:" },
695{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, 695{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" },
696{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 696{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
697{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 697{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
698{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 698{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
699{ "Write back file","Schreibe Datei zurück" }, 699{ "Write back file","Schreibe Datei zurück" },
700{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 700{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
701{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 701{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
702{ "Local device name:","Name dieses Gerätes:" }, 702{ "Local device name:","Name dieses Gerätes:" },
703{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 703{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
704{ "Sync preferences","Synchronisations Einstellungen" }, 704{ "Sync preferences","Synchronisations Einstellungen" },
705{ "Profile kind","Profil Art" }, 705{ "Profile kind","Profil Art" },
706{ "Local file","Lokale Datei" }, 706{ "Local file","Lokale Datei" },
707{ "Local file:","Lokale Datei:" }, 707{ "Local file:","Lokale Datei:" },
708{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 708{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
709{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 709{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
710{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 710{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
711{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 711{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
712{ "Device","Gerät:" }, 712{ "Device","Gerät:" },
713{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 713{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
714{ "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" }, 714{ "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" },
715{ "Synchronization successful","Synchronisation erfolgreich" }, 715{ "Synchronization successful","Synchronisation erfolgreich" },
716{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 716{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
717{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 717{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
718{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 718{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
719{ "Enter password","Passwort eingeben" }, 719{ "Enter password","Passwort eingeben" },
720{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 720{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
721{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 721{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
722{ "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" }, 722{ "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" },
723{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 723{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
724{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 724{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
725{ "Edit Calendar Filters","Editiere Kalendar Filter" }, 725{ "Edit Calendar Filters","Editiere Kalendar Filter" },
726{ "Enter filter name:","Neuer Filter Name:" }, 726{ "Enter filter name:","Neuer Filter Name:" },
727{ "Add Filter","Filter hinzufügen" }, 727{ "Add Filter","Filter hinzufügen" },
728{ "Question","Frage" }, 728{ "Question","Frage" },
729{ "Filter position: ","Filter Position: " }, 729{ "Filter position: ","Filter Position: " },
730{ "Month View","Monatsansicht" }, 730{ "Month View","Monatsansicht" },
731{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, 731{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" },
732{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 732{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
733{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 733{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
734{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, 734{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" },
735{ "Access: ","Zugriff: " }, 735{ "Access: ","Zugriff: " },
736{ "Needs Action","Aktion notwendig" }, 736{ "Needs Action","Aktion notwendig" },
737{ "Accepted","Akzeptiert" }, 737{ "Accepted","Akzeptiert" },
738{ "Declined","Abgelehnt" }, 738{ "Declined","Abgelehnt" },
739{ "Tentative","Vorläufig" }, 739{ "Tentative","Vorläufig" },
740{ "Delegated","Beauftragt" }, 740{ "Delegated","Beauftragt" },
741{ "Completed","Vollständig" }, 741{ "Completed","Vollständig" },
742{ "In Process","In Bearbeitung" }, 742{ "In Process","In Bearbeitung" },
743{ "Participant","Teilnehmer" }, 743{ "Participant","Teilnehmer" },
744{ "Optional Participant","Möglicher Teilnehmer" }, 744{ "Optional Participant","Möglicher Teilnehmer" },
745{ "Observer","Beobachter" }, 745{ "Observer","Beobachter" },
746{ "Chair","Vorsitzender" }, 746{ "Chair","Vorsitzender" },
747{ "Not supported \non desktop!\n","" }, 747{ "Not supported \non desktop!\n","" },
748{ "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 verticale Auswahl zum Drucken zu bestimmen,\nbitte einen verticalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen. " }, 748{ "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 verticale Auswahl zum Drucken zu bestimmen,\nbitte einen verticalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen. " },
749{ "Date range: ","Datums Zeitspanne: " }, 749{ "Date range: ","Datums Zeitspanne: " },
750{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, 750{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " },
751{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, 751{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." },
752{ "Add / remove events","Add./entferne Termine" }, 752{ "Add / remove events","Add./entferne Termine" },
753{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, 753{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." },
754{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, 754{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." },
755{ "\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" }, 755{ "\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" },
756{ "Overwrite","Überschreiben" }, 756{ "Overwrite","Überschreiben" },
757{ "Sync+save","Syncen+speichern" }, 757{ "Sync+save","Syncen+speichern" },
758{ "Default","Standard" }, 758{ "Default","Standard" },
759{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 759{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " },
760{ " %d items?"," %d Einträge?" }, 760{ " %d items?"," %d Einträge?" },
761{ "\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?" }, 761{ "\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?" },
762{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, 762{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" },
763{ "Current","Aktuelle" }, 763{ "Current","Aktuelle" },
764{ "\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" }, 764{ "\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" },
765{ "All","Alle" }, 765{ "All","Alle" },
766{ "Data Loss Warning","Datenverlust Warnung" }, 766{ "Data Loss Warning","Datenverlust Warnung" },
767{ "Proceed","Weitermachen" }, 767{ "Proceed","Weitermachen" },
768{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, 768{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" },
769{ "Filter disabled ","Filter abgeschaltet" }, 769{ "Filter disabled ","Filter abgeschaltet" },
770{ "Filter selected: ","Gewählter Filter: " }, 770{ "Filter selected: ","Gewählter Filter: " },
771{ "Toggle Cancel","Gecancelt ändern" }, 771{ "Toggle Cancel","Gecancelt ändern" },
772{ "&Toggle Cancel","Gecancel&t ändern" }, 772{ "&Toggle Cancel","Gecancel&t ändern" },
773{ "Configure Toolbar","Konfiguriere Toolbar" }, 773{ "Configure Toolbar","Konfiguriere Toolbar" },
774{ "Stretched TB","Gedehnte TB" }, 774{ "Stretched TB","Gedehnte TB" },
775{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, 775{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" },
776{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, 776{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" },
777{ "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" }, 777{ "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" },
778{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, 778{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" },
779{ "Imported file successfully","Datei erfolgreich importiert" }, 779{ "Imported file successfully","Datei erfolgreich importiert" },
780{ "Error importing file","Fehler beim Importieren der Datei" }, 780{ "Error importing file","Fehler beim Importieren der Datei" },
781{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, 781{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
782{ "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" }, 782{ "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" },
783{ "Overwrite!","Überschreiben!" }, 783{ "Overwrite!","Überschreiben!" },
784{ "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" }, 784{ "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" },
785{ "Load backup filename","Lade Backup Dateiname" }, 785{ "Load backup filename","Lade Backup Dateiname" },
786{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, 786{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
787{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, 787{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
788{ "Save backup filename","Speichere Backup Dateiname" }, 788{ "Save backup filename","Speichere Backup Dateiname" },
789{ "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" }, 789{ "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" },
790{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 790{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
791{ "Details of attendee","Teilnehmerdetails" }, 791{ "Details of attendee","Teilnehmerdetails" },
792{ "Work phone:\n","Telefon Arbeit:\n" }, 792{ "Work phone:\n","Telefon Arbeit:\n" },
793{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, 793{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
794{ "Home phone:\n","Telefon privat:\n" }, 794{ "Home phone:\n","Telefon privat:\n" },
795{ "Mobile home phone:\n","Mobiltelefon privat:\n" }, 795{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
796{ "Email:\n","Email:\n" }, 796{ "Email:\n","Email:\n" },
797{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, 797{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
798{ "Audio Al.: ","Audio Al.: " }, 798{ "Audio Al.: ","Audio Al.: " },
799{ "Proc.Al.: ","Proz.Al.: " }, 799{ "Proc.Al.: ","Proz.Al.: " },
800{ "No sound set","Kein Sound definiert" }, 800{ "No sound set","Kein Sound definiert" },
801{ "*.wav|Wav Files","*.wav|Wav Dateien" }, 801{ "*.wav|Wav Files","*.wav|Wav Dateien" },
802{ "No program set","Kein Programm definiert" }, 802{ "No program set","Kein Programm definiert" },
803{ "Running '%1'","Ausführen '%1'" }, 803{ "Running '%1'","Ausführen '%1'" },
804{ "Playing '%1'","Abspielen '%1'" }, 804{ "Playing '%1'","Abspielen '%1'" },
805{ "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, 805{ "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" },
806{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, 806{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
807{ "Load!","Laden!" }, 807{ "Load!","Laden!" },
808{ "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" }, 808{ "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" },
809{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, 809{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
810{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, 810{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
811{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, 811{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
812{ "Features + hints...","Eigenschaften + Tipps..." }, 812{ "Features + hints...","Eigenschaften + Tipps..." },
813{ "User translation...","Benutzer Übersetzung..." }, 813{ "User translation...","Benutzer Übersetzung..." },
814{ "Sync HowTo...","Synchronisation HowTo..." }, 814{ "Sync HowTo...","Synchronisation HowTo..." },
815{ "Print calendar...","Drucke Kalender..." }, 815{ "Print calendar...","Drucke Kalender..." },
816{ "Anniversary","Jahrestag" }, 816{ "Anniversary","Jahrestag" },
817{ "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" }, 817{ "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" },
818{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, 818{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
819{ "Next recurrence is on: ","Nächste Wiederholung ist am:" }, 819{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
820{ "<b>Alarm on: </b>","<b>Alarm am: </b>" }, 820{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
821{ "<b>Access: </b>","<b>Zugriff: </b>" }, 821{ "<b>Access: </b>","<b>Zugriff: </b>" },
822{ "(%1 min before)","(%1 min vorher)" }, 822{ "(%1 min before)","(%1 min vorher)" },
823{ "<b>Categories: </b>","<b>Kategorien: </b>" }, 823{ "<b>Categories: </b>","<b>Kategorien: </b>" },
824{ "Save Journal/Description...","Speichere Journal/Details..." }, 824{ "Save Journal/Description...","Speichere Journal/Details..." },
825{ "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." }, 825{ "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." },
826{ "Continue","Weitermachen" }, 826{ "Continue","Weitermachen" },
827{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, 827{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" },
828{ "Attendee:","Teilnehmer:" }, 828{ "Attendee:","Teilnehmer:" },
829{ "Click OK to search ->","Klicke zum Suchen auf OK ->" }, 829{ "Click OK to search ->","Klicke zum Suchen auf OK ->" },
830{ "On day ","Am Tag " }, 830{ "On day ","Am Tag " },
831{ "%1 of ","%1 des Monats" }, 831{ "%1 of ","%1 des Monats" },
832{ "%1 of the year","%1 des Jahres" }, 832{ "%1 of the year","%1 des Jahres" },
833{ "Anonymous","Anonymo" }, 833{ "Anonymous","Anonymo" },
834{ "nobody@nowhere","niemand@nirgendwo" }, 834{ "nobody@nowhere","niemand@nirgendwo" },
835{ "calendar.html","calendar.html" }, 835{ "calendar.html","calendar.html" },
836{ " Local Time"," Locale Zeit" }, 836{ " Local Time"," Locale Zeit" },
837{ "Unknown Name","Unbekannter Name" }, 837{ "Unknown Name","Unbekannter Name" },
838{ "unknown@nowhere","unbekannt@nirgendwo" }, 838{ "unknown@nowhere","unbekannt@nirgendwo" },
839{ "Beam via IR!","Beam via IR!" }, 839{ "Beam via IR!","Beam via IR!" },
840{ "Next Month","Nächster Monat" }, 840{ "Next Month","Nächster Monat" },
841{ "Prio","Prio" }, 841{ "Prio","Prio" },
842{ "Reparent Todo","Mache Sub-Todo" }, 842{ "Reparent Todo","Mache Sub-Todo" },
843{ "tomorrow","morgen" }, 843{ "tomorrow","morgen" },
844{ "today","heute" }, 844{ "today","heute" },
845{ "yesterday","gestern" }, 845{ "yesterday","gestern" },
846{ "Ok","Ok" }, 846{ "Ok","Ok" },
847{ "Ok+Agenda","Ok+Agenda" }, 847{ "Ok+Agenda","Ok+Agenda" },
848{ "Email","Email" }, 848{ "Email","Email" },
849{ "RSVP","RSVP" }, 849{ "RSVP","RSVP" },
850{ "Email:","Email:" }, 850{ "Email:","Email:" },
851{ "Appointment Time ","Termin Zeit " }, 851{ "Appointment Time ","Termin Zeit " },
852{ "2","2" }, 852{ "2","2" },
853{ "3","3" }, 853{ "3","3" },
854{ "4","4" }, 854{ "4","4" },
855{ " 0 %"," 0 %" }, 855{ " 0 %"," 0 %" },
856{ " 20 %"," 20 %" }, 856{ " 20 %"," 20 %" },
857{ " 40 %"," 40 %" }, 857{ " 40 %"," 40 %" },
858{ " 60 %"," 60 %" }, 858{ " 60 %"," 60 %" },
859{ " 80 %"," 80 %" }, 859{ " 80 %"," 80 %" },
860{ "100 %","100 %" }, 860{ "100 %","100 %" },
861{ "Filter","Filter" }, 861{ "Filter","Filter" },
862{ "Configure","Konfiguriere" }, 862{ "Configure","Konfiguriere" },
863{ "What's Next","What's Next" }, 863{ "What's Next","What's Next" },
864{ "Complete calendar...","Kompletten Kalender..." }, 864{ "Complete calendar...","Kompletten Kalender..." },
865{ "Filtered calendar...","Gefilterten Kalender..." }, 865{ "Filtered calendar...","Gefilterten Kalender..." },
866{ "Export to phone","Exportiere zum Handy" }, 866{ "Export to phone","Exportiere zum Handy" },
867{ "Beam receive enabled","Beam Empfang an" }, 867{ "Beam receive enabled","Beam Empfang an" },
868{ "What's new?","Was ist neu?" }, 868{ "What's new?","Was ist neu?" },
869{ "FAQ...","FAQ..." }, 869{ "FAQ...","FAQ..." },
870{ "Licence...","Licence..." }, 870{ "Licence...","Licence..." },
871{ "What's This?","What's This?" }, 871{ "What's This?","What's This?" },
872{ "&Edit...","&Editiere..." }, 872{ "&Edit...","&Editiere..." },
873{ "Oktober","Oktober" }, 873{ "Oktober","Oktober" },
874{ "Title","Titel" }, 874{ "Title","Titel" },
875{ "%1 %","%1 %" }, 875{ "%1 %","%1 %" },
876{ "Enable Pi-Sync","Schalte Pi-Sync an" }, 876{ "Enable Pi-Sync","Schalte Pi-Sync an" },
877{ "Import!","Importiere!" }, 877{ "Import!","Importiere!" },
878{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, 878{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" },
879{ "Export to phone options","Export ans Handy Optionen" }, 879{ "Export to phone options","Export ans Handy Optionen" },
880{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 880{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
881{ "I/O device: ","I/O device: " }, 881{ "I/O device: ","I/O device: " },
882{ "Connection: ","Connection: " }, 882{ "Connection: ","Connection: " },
883{ "Model(opt.): ","Model(opt.): " }, 883{ "Model(opt.): ","Model(opt.): " },
884{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, 884{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" },
885{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, 885{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " },
886{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, 886{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" },
887{ "Export to mobile phone!","Exportiere auf das Handy!" }, 887{ "Export to mobile phone!","Exportiere auf das Handy!" },
888{ "Export complete calendar","Exportiere kompletten Kalender" }, 888{ "Export complete calendar","Exportiere kompletten Kalender" },
889{ "Writing to phone...","Sende Daten ans Handy..." }, 889{ "Writing to phone...","Sende Daten ans Handy..." },
890{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 890{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
891{ "Retry","Nochmal versuchen" }, 891{ "Retry","Nochmal versuchen" },
892{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 892{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
893{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 893{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
894{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 894{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
895{ "Export filtered calendar","Exportiere gefilterten Kalender" }, 895{ "Export filtered calendar","Exportiere gefilterten Kalender" },
896{ "Preferences","Vorlieben" }, 896{ "Preferences","Vorlieben" },
897{ "Global","Global" }, 897{ "Global","Global" },
898{ "Phone","Phone" }, 898{ "Phone","Phone" },
899{ "SMS","SMS" }, 899{ "SMS","SMS" },
900{ "Fax","Fax" }, 900{ "Fax","Fax" },
901{ "Pager","Pager" }, 901{ "Pager","Pager" },
902{ "SIP","SIP" }, 902{ "SIP","SIP" },
903{ "Italian","Italienisch" }, 903{ "Italian","Italienisch" },
904{ "24:00","24:00" }, 904{ "24:00","24:00" },
905{ "12:00am","12:00am" }, 905{ "12:00am","12:00am" },
906{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 906{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
907{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 907{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
908{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 908{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
909{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 909{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
910{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 910{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
911{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 911{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
912{ "Used Mail Client","Benutzter Mail Client" }, 912{ "Used Mail Client","Benutzter Mail Client" },
913{ "Channel:","Channel:" }, 913{ "Channel:","Channel:" },
914{ "Message:","Message:" }, 914{ "Message:","Message:" },
915{ "Parameters:","Parameter:" }, 915{ "Parameters:","Parameter:" },
916{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 916{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
917{ "extra Message:","extra Message:" }, 917{ "extra Message:","extra Message:" },
918{ "extra Parameters:","extra Parameter:" }, 918{ "extra Parameters:","extra Parameter:" },
919{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 919{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
920{ "External Apps.","Externe Appl." }, 920{ "External Apps.","Externe Appl." },
921{ "24 hours","24 Std." }, 921{ "24 hours","24 Std." },
922{ "3 hours","3 Std." }, 922{ "3 hours","3 Std." },
923{ "1 hour","1 Std." }, 923{ "1 hour","1 Std." },
924{ "15 minutes","15 Min." }, 924{ "15 minutes","15 Min." },
925{ "5 minutes","5 Min." }, 925{ "5 minutes","5 Min." },
926{ "1 minute","1 Min." }, 926{ "1 minute","1 Min." },
927{ "23","23" }, 927{ "23","23" },
928{ "Mon 15","Mon 15" }, 928{ "Mon 15","Mon 15" },
929{ "Configure KO","Konfiguriere KO" }, 929{ "Configure KO","Konfiguriere KO" },
930{ "Event text","Termin Text" }, 930{ "Event text","Termin Text" },
931{ "ToDo","ToDo" }, 931{ "ToDo","ToDo" },
932{ "Today","Heute" }, 932{ "Today","Heute" },
933{ "What's Next View","What's Next Ansicht" }, 933{ "What's Next View","What's Next Ansicht" },
934{ "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, 934{ "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" },
935{ "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, 935{ "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" },
936{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, 936{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
937{ "Alarm","Alarm" }, 937{ "Alarm","Alarm" },
938{ "Used %1 Client","Benutzter %1 Client" }, 938{ "Used %1 Client","Benutzter %1 Client" },
939{ "No email client installed","Kein Email Klient installiert" }, 939{ "No email client installed","Kein Email Klient installiert" },
940{ "Userdefined email client","Benutzerdef. Email Klient" }, 940{ "Userdefined email client","Benutzerdef. Email Klient" },
941{ "OM/Pi email client","OM/Pi Email Klient" }, 941{ "OM/Pi email client","OM/Pi Email Klient" },
942{ "Include in multiple ","Beziehe in multiple " }, 942{ "Include in multiple ","Beziehe in multiple " },
943{ "calendar ","Kalender " }, 943{ "calendar ","Kalender " },
944{ "addressbook ","Adressbuch " }, 944{ "addressbook ","Adressbuch " },
945{ "pwmanager","PWmanager" }, 945{ "pwmanager","PWmanager" },
946{ " sync"," Sync ein" }, 946{ " sync"," Sync ein" },
947{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 947{ "Write back synced data","Schreibe gesyncte Daten zurück" },
948{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 948{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
949{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 949{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
950{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 950{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
951{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 951{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
952{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 952{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
953{ "Help...","Hilfe..." }, 953{ "Help...","Hilfe..." },
954{ "Local file Cal:","Lokale Datei Kal:" }, 954{ "Local file Cal:","Lokale Datei Kal:" },
955{ "Local file ABook:","Lokale Datei ABuch:" }, 955{ "Local file ABook:","Lokale Datei ABuch:" },
956{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 956{ "Local file PWMgr:","Lokale Datei PWMgr:" },
957{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 957{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
958{ "Calendar:","Kalender:" }, 958{ "Calendar:","Kalender:" },
959{ "AddressBook:","AdressBuch:" }, 959{ "AddressBook:","AdressBuch:" },
960{ "PWManager:","PWManager:" }, 960{ "PWManager:","PWManager:" },
961{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 961{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
962{ "ssh/scp","ssh/scp" }, 962{ "ssh/scp","ssh/scp" },
963{ "ftp","ftp" }, 963{ "ftp","ftp" },
964{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 964{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
965{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 965{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
966{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 966{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
967{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 967{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
968{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 968{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
969{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 969{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
970{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 970{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
971{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 971{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
972{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 972{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
973{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 973{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
974{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 974{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
975{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 975{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
976{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 976{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
977{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 977{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
978{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 978{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
979{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, 979{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
980{ "KDE-Pim Sync","KDE-Pim Sync" }, 980{ "KDE-Pim Sync","KDE-Pim Sync" },
981{ "Multiple profiles","Multi-Sync Profile" }, 981{ "Multiple profiles","Multi-Sync Profile" },
982{ "Device: ","Gerät: " }, 982{ "Device: ","Gerät: " },
983{ "Multiple sync started.","Multi-Sync gestartet." }, 983{ "Multiple sync started.","Multi-Sync gestartet." },
984{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 984{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
985{ "Turn filter on","Schalte Filter an" }, 985{ "Turn filter on","Schalte Filter an" },
986{ "Turn filter off","Schalte Filter aus" }, 986{ "Turn filter off","Schalte Filter aus" },
987{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 987{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
988{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 988{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
989{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 989{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
990{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, 990{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" },
991{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, 991{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" },
992{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, 992{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" },
993{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, 993{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" },
994{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, 994{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" },
995{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, 995{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" },
996{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 996{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
997{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 997{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
998{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 998{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
999{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 999{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
1000{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 1000{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
1001{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, 1001{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" },
1002{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, 1002{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" },
1003{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 1003{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
1004{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, 1004{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" },
1005{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 1005{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
1006{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, 1006{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" },
1007{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 1007{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
1008{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, 1008{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" },
1009{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, 1009{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" },
1010{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 1010{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
1011{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, 1011{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" },
1012{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, 1012{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" },
1013{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, 1013{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" },
1014{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1014{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1015{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1015{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1016{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1016{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1017{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1017{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1018{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1018{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1019{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, 1019{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" },
1020{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, 1020{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" },
1021{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1021{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1022{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1022{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1023{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, 1023{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" },
1024{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datenavigator</p>\n" }, 1024{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datenavigator</p>\n" },
1025{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, 1025{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" },
1026{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, 1026{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" },
1027{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" }, 1027{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" },
1028{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" }, 1028{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" },
1029{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, 1029{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" },
1030{ "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " }, 1030{ "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " },
1031{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, 1031{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" },
1032{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, 1032{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" },
1033{ "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, 1033{ "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" },
1034{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, 1034{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" },
1035{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, 1035{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" },
1036{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, 1036{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" },
1037{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1037{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1038{ "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, 1038{ "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" },
1039{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1039{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1040{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1040{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1041{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1041{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1042{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, 1042{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" },
1043{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, 1043{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" },
1044{ "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, 1044{ "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" },
1045{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1045{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1046{ "KO/Pi FAQ","KO/Pi FAQ" }, 1046{ "KO/Pi FAQ","KO/Pi FAQ" },
1047{ "(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n","(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi basiert auf KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.korganizer.org\nwww.pi-sync.net\n" }, 1047{ "(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n","(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi basiert auf KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.korganizer.org\nwww.pi-sync.net\n" },
1048{ "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n","PDA-Edition\nfür: Zaurus 5x00 / 7x0 / 8x0\n" }, 1048{ "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n","PDA-Edition\nfür: Zaurus 5x00 / 7x0 / 8x0\n" },
1049{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1049{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1050{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1050{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1051{ "From: ","Von: " }, 1051{ "From: ","Von: " },
1052{ "Remove sync info","Entferne Sync Info" }, 1052{ "Remove sync info","Entferne Sync Info" },
1053{ "For all profiles","Für alle Profile" }, 1053{ "For all profiles","Für alle Profile" },
1054{ "Hide not Running","Verstecke nicht Laufende" }, 1054{ "Hide not Running","Verstecke nicht Laufende" },
1055{ "ME","ME" }, 1055{ "ME","ME" },
1056{ "Toolbar","Toolbar" }, 1056{ "Toolbar","Toolbar" },
1057{ "Undo Delete...","Löschen rückgängig machen..." }, 1057{ "Undo Delete...","Löschen rückgängig machen..." },
1058{ "Undo Delete","Löschen rückgängig machen" }, 1058{ "Undo Delete","Löschen rückgängig machen" },
1059{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1059{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1060{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1060{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1061{ "Januar","Januar" }, 1061{ "Januar","Januar" },
1062{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1062{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1063{ "No Filter","Kein Filter" }, 1063{ "No Filter","Kein Filter" },
1064{ "Multiple Sync options","Multi Sync Optionen" }, 1064{ "Multiple Sync options","Multi Sync Optionen" },
1065{ "Sync algo options","Sync Ablauf Optionen" }, 1065{ "Sync algo options","Sync Ablauf Optionen" },
1066{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1066{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1067{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1067{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1068{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1068{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1069{ "Write back options","Optionen zum Zurückschreiben" }, 1069{ "Write back options","Optionen zum Zurückschreiben" },
1070{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1070{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1071{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1071{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1072{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1072{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1073{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1073{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1074{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1074{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1075{ "Time period","Zeitspanne" }, 1075{ "Time period","Zeitspanne" },
1076{ "From ","Von " }, 1076{ "From ","Von " },
1077{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1077{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1078{ " weeks in the future "," Wochen in der Zukunft " }, 1078{ " weeks in the future "," Wochen in der Zukunft " },
1079{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1079{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1080{ "Local temp file:","Lokale temp Datei:" }, 1080{ "Local temp file:","Lokale temp Datei:" },
1081{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1081{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1082{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1082{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1083{ "Language","Sprache" }, 1083{ "Language","Sprache" },
1084{ "Time Format","Zeit Format" }, 1084{ "Time Format","Zeit Format" },
1085{ "Time Zone","Zeit Zone" }, 1085{ "Time Zone","Zeit Zone" },
1086{ "%1 groups subscribed","%1 Guppen abboniert" }, 1086{ "%1 groups subscribed","%1 Guppen abboniert" },
1087{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 1087{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
1088{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1088{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1089{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1089{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1090{ "Save settings","Speichere Einstellungen" }, 1090{ "Save settings","Speichere Einstellungen" },
1091{ "Save standard","Speichere Standard" }, 1091{ "Save standard","Speichere Standard" },
1092{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1092{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1093{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1093{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1094{ "Data storage path","Daten Speicherpfad" }, 1094{ "Data storage path","Daten Speicherpfad" },
1095{ "Language","Sprache" }, 1095{ "Language","Sprache" },
1096{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1096{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1097{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1097{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1098{ "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, 1098{ "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" },
1099{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1099{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1100{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1100{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1101{ "KO/Pi","KO/Pi" }, 1101{ "KO/Pi","KO/Pi" },
1102{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1102{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1103{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1103{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1104{ "Sound.Al.: ","Sound.Al.: " }, 1104{ "Sound.Al.: ","Sound.Al.: " },
1105{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1105{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1106{ "Restore","Wiederherstellen" }, 1106{ "Restore","Wiederherstellen" },
1107{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1107{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1108{ "% completed","% komplett" }, 1108{ "% completed","% komplett" },
1109{ "%d item(s) found.","%d Item(s) gefunden." }, 1109{ "%d item(s) found.","%d Item(s) gefunden." },
1110{ "Set complete","Setze auf erledigt" }, 1110{ "Set complete","Setze auf erledigt" },
1111{ "(cancelled)","(gecancelt)" }, 1111{ "(cancelled)","(gecancelt)" },
1112{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1112{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1113{ " Local time "," Locale Zeit " }, 1113{ " Local time "," Locale Zeit " },
1114{ "Form2","Form2" }, 1114{ "Form2","Form2" },
1115{ "Filter enabled","Filter angeschaltet" }, 1115{ "Filter enabled","Filter angeschaltet" },
1116{ "Edit Filters","Ändere Filter" }, 1116{ "Edit Filters","Ändere Filter" },
1117{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1117{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1118{ "Agenda","Agenda" }, 1118{ "Agenda","Agenda" },
1119{ " ("," (" }, 1119{ " ("," (" },
1120{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1120{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1121{ "Print","Print" }, 1121{ "Print","Print" },
1122{ "&Setup Printer...","Drucker &Setup..." }, 1122{ "&Setup Printer...","Drucker &Setup..." },
1123{ "View Type","Zeige Typ" }, 1123{ "View Type","Zeige Typ" },
1124{ "Page &orientation:","Seiten Ausrichtung:" }, 1124{ "Page &orientation:","Seiten Ausrichtung:" },
1125{ "Use Default of Selected Style","Default des selektierten Stils" }, 1125{ "Use Default of Selected Style","Default des selektierten Stils" },
1126{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1126{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1127{ "Portrait","Portrait" }, 1127{ "Portrait","Portrait" },
1128{ "Landscape","Landschaft" }, 1128{ "Landscape","Landschaft" },
1129{ "Print day","Drucke Tag" }, 1129{ "Print day","Drucke Tag" },
1130{ "CalPrintDay_Base","CalPrintDay_Base" }, 1130{ "CalPrintDay_Base","CalPrintDay_Base" },
1131{ "Date && Time Range","Datum && Zeitspanne" }, 1131{ "Date && Time Range","Datum && Zeitspanne" },
1132{ "&End date:","&Enddatum:" }, 1132{ "&End date:","&Enddatum:" },
1133{ "&Start date:","&Startdatum:" }, 1133{ "&Start date:","&Startdatum:" },
1134{ "Start &time:","Startzeit:" }, 1134{ "Start &time:","Startzeit:" },
1135{ "End ti&me:","Endzeit:" }, 1135{ "End ti&me:","Endzeit:" },
1136{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1136{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1137{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1137{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1138{ "Alt+D","Alt+D" }, 1138{ "Alt+D","Alt+D" },
1139{ "&Use colors","Nutze Farben" }, 1139{ "&Use colors","Nutze Farben" },
1140{ "Alt+U","Alt+U" }, 1140{ "Alt+U","Alt+U" },
1141{ "Print week","Drucke Woche" }, 1141{ "Print week","Drucke Woche" },
1142{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1142{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1143{ "Use &colors","Nutze Farben" }, 1143{ "Use &colors","Nutze Farben" },
1144{ "Type of View","Typ der Ansicht" }, 1144{ "Type of View","Typ der Ansicht" },
1145{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1145{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1146{ "Alt+F","Alt+F" }, 1146{ "Alt+F","Alt+F" },
1147{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1147{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1148{ "Alt+T","Alt+T" }, 1148{ "Alt+T","Alt+T" },
1149{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1149{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1150{ "Print month","Drucke Monat" }, 1150{ "Print month","Drucke Monat" },
1151{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1151{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1152{ "&Start month:","&Startmonat:" }, 1152{ "&Start month:","&Startmonat:" },
1153{ "&End month:","&Endmonat:" }, 1153{ "&End month:","&Endmonat:" },
1154{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1154{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1155{ "Print todos","Drucke Todos" }, 1155{ "Print todos","Drucke Todos" },
1156{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1156{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1157{ "Include &description of the item","Inclusive Itembeschreibung" }, 1157{ "Include &description of the item","Inclusive Itembeschreibung" },
1158{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1158{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1159{ "Include &priority of the item","Inclusive Priorität des Items" }, 1159{ "Include &priority of the item","Inclusive Priorität des Items" },
1160{ "Items to Print","Zu druckende Items" }, 1160{ "Items to Print","Zu druckende Items" },
1161{ "&From:","Von:" }, 1161{ "&From:","Von:" },
1162{ "&To:","Bis:" }, 1162{ "&To:","Bis:" },
1163{ "Print &all todo items","Drucke alle Todo Items" }, 1163{ "Print &all todo items","Drucke alle Todo Items" },
1164{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1164{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1165{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1165{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1166{ "Todo List","Todo Liste" }, 1166{ "Todo List","Todo Liste" },
1167{ "&Title:","&Titel:" }, 1167{ "&Title:","&Titel:" },
1168{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, 1168{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
1169{ "Todo list","Todo Liste" }, 1169{ "Todo list","Todo Liste" },
1170{ "&Print...","Drucke..." }, 1170{ "&Print...","Drucke..." },
1171{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1171{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1172{ "[Unconfigured]","[Unkonfiguriert]" }, 1172{ "[Unconfigured]","[Unkonfiguriert]" },
1173{ "OK","OK" }, 1173{ "OK","OK" },
1174{ "FilterEditor","FilterEditor" }, 1174{ "FilterEditor","FilterEditor" },
1175{ "Include","Inclusive" }, 1175{ "Include","Inclusive" },
1176{ "Exclude","Exclusive" }, 1176{ "Exclude","Exclusive" },
1177{ "Edit Selection...","Editiere Auswahl" }, 1177{ "Edit Selection...","Editiere Auswahl" },
1178{ "recurring events","wiederholende Termine" }, 1178{ "recurring events","wiederholende Termine" },
1179{ "recurr. events","wiederh.Termine" }, 1179{ "recurr. events","wiederh.Termine" },
1180{ "completed to-dos","erledigte Todos" }, 1180{ "completed to-dos","erledigte Todos" },
1181{ "events","Termine" }, 1181{ "events","Termine" },
1182{ "todos","Todos" }, 1182{ "todos","Todos" },
1183{ "journals","Journale" }, 1183{ "journals","Journale" },
1184{ "public","öffentl." }, 1184{ "public","öffentl." },
1185{ "private","privat" }, 1185{ "private","privat" },
1186{ "confidential","vertraul." }, 1186{ "confidential","vertraul." },
1187{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1187{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
1188{ "Yesterday","Gestern" }, 1188{ "Yesterday","Gestern" },
1189{ "Day after tomorrow","Übermorgen" }, 1189{ "Day after tomorrow","Übermorgen" },
1190{ "Tomorrow","Morgen" }, 1190{ "Tomorrow","Morgen" },
1191{ "Day before yesterday","Vorgestern" }, 1191{ "Day before yesterday","Vorgestern" },
1192{ "Size %1","Größe %1" }, 1192{ "Size %1","Größe %1" },
1193{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1193{ "New Agendasize: %1","Neue Agendagröße: %1" },
1194{ " (%1 y.)"," (%1 J.)" }, 1194{ " (%1 y.)"," (%1 J.)" },
1195{ "Allday:","Ganztägig:" }, 1195{ "Allday:","Ganztägig:" },
1196{ "compl.todos","erled.Todos" }, 1196{ "compl.todos","erled.Todos" },
1197{ "Day view","Tagesansicht" }, 1197{ "Day view","Tagesansicht" },
1198{ "Next days","Nächste Tage" }, 1198{ "Next days","Nächste Tage" },
1199{ "Next week","Nächste Woche" }, 1199{ "Next week","Nächste Woche" },
1200{ "Next two weeks","Nächste zwei Wochen" }, 1200{ "Next two weeks","Nächste zwei Wochen" },
1201{ "Next month","Nächster Monat" }, 1201{ "Next month","Nächster Monat" },
1202{ "Journal view","Journal" }, 1202{ "Journal view","Journal" },
1203{ "Display all opened","Zeige alle geöffnet" }, 1203{ "Display all opened","Zeige alle geöffnet" },
1204{ "Display all closed","Zeige alle geschlossen" }, 1204{ "Display all closed","Zeige alle geschlossen" },
1205{ "Display all flat","Zeige alle flach" }, 1205{ "Display all flat","Zeige alle flach" },
1206{ "","" }, 1206{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1207{ "","" }, 1207{ "","" },
1208{ "","" }, 1208{ "","" },
1209{ "","" }, 1209{ "","" },
1210{ "","" }, 1210{ "","" },
1211{ "","" }, 1211{ "","" },
1212{ "","" }, 1212{ "","" },
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index e0a1a21..1864e22 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -640,894 +640,900 @@ void KOAgendaView::createDayLabels()
640 //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); 640 //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid );
641 //if ( needWid > maxWid ) 641 //if ( needWid > maxWid )
642 // qDebug("DAYLABELS TOOOOOOO BIG "); 642 // qDebug("DAYLABELS TOOOOOOO BIG ");
643 while ( needWid > maxWid ) { 643 while ( needWid > maxWid ) {
644 dayTest = dayTest.left( dayTest.length() - 1 ); 644 dayTest = dayTest.left( dayTest.length() - 1 );
645 wid = fm.width( dayTest ); 645 wid = fm.width( dayTest );
646 needWid = wid * selCount; 646 needWid = wid * selCount;
647 } 647 }
648 int maxLen = dayTest.length(); 648 int maxLen = dayTest.length();
649 int fontPoint = dlf.pointSize(); 649 int fontPoint = dlf.pointSize();
650 if ( maxLen < 2 ) { 650 if ( maxLen < 2 ) {
651 int fontPoint = dlf.pointSize(); 651 int fontPoint = dlf.pointSize();
652 while ( fontPoint > 4 ) { 652 while ( fontPoint > 4 ) {
653 --fontPoint; 653 --fontPoint;
654 dlf.setPointSize( fontPoint ); 654 dlf.setPointSize( fontPoint );
655 QFontMetrics f( dlf ); 655 QFontMetrics f( dlf );
656 wid = f.width( "20" ); 656 wid = f.width( "20" );
657 needWid = wid * selCount; 657 needWid = wid * selCount;
658 if ( needWid < maxWid ) 658 if ( needWid < maxWid )
659 break; 659 break;
660 } 660 }
661 maxLen = 2; 661 maxLen = 2;
662 } 662 }
663 //qDebug("Max len %d ", dayTest.length() ); 663 //qDebug("Max len %d ", dayTest.length() );
664 664
665 QFontMetrics tempF( dlf ); 665 QFontMetrics tempF( dlf );
666 newHight = tempF.height(); 666 newHight = tempF.height();
667 mDayLabels->setFont( dlf ); 667 mDayLabels->setFont( dlf );
668 // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; 668 // mLayoutDayLabels = new QHBoxLayout(mDayLabels);;
669 // mLayoutDayLabels->addSpacing(mTimeLabels->width()); 669 // mLayoutDayLabels->addSpacing(mTimeLabels->width());
670 //mLayoutDayLabels->addSpacing( 2 ); 670 //mLayoutDayLabels->addSpacing( 2 );
671 // QFont lFont = dlf; 671 // QFont lFont = dlf;
672 bool appendLabels = false; 672 bool appendLabels = false;
673 QLabel *dayLabel; 673 QLabel *dayLabel;
674 dayLabel = mDayLabelsList.first(); 674 dayLabel = mDayLabelsList.first();
675 if ( !dayLabel ) { 675 if ( !dayLabel ) {
676 appendLabels = true; 676 appendLabels = true;
677 dayLabel = new QLabel(mDayLabels); 677 dayLabel = new QLabel(mDayLabels);
678 mDayLabelsList.append( dayLabel ); 678 mDayLabelsList.append( dayLabel );
679 mLayoutDayLabels->addWidget(dayLabel); 679 mLayoutDayLabels->addWidget(dayLabel);
680 } 680 }
681 dayLabel->setFixedWidth( mTimeLabels->width()+2 ); 681 dayLabel->setFixedWidth( mTimeLabels->width()+2 );
682 dayLabel->setFont( dlf ); 682 dayLabel->setFont( dlf );
683 dayLabel->setAlignment(QLabel::AlignHCenter); 683 dayLabel->setAlignment(QLabel::AlignHCenter);
684 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); 684 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) );
685 dayLabel->show(); 685 dayLabel->show();
686 DateList::ConstIterator dit; 686 DateList::ConstIterator dit;
687 bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); 687 bool oneday = (mSelectedDates.first() == mSelectedDates.last() );
688 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { 688 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
689 QDate date = *dit; 689 QDate date = *dit;
690 // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); 690 // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels);
691 if ( ! appendLabels ) { 691 if ( ! appendLabels ) {
692 dayLabel = mDayLabelsList.next(); 692 dayLabel = mDayLabelsList.next();
693 if ( !dayLabel ) 693 if ( !dayLabel )
694 appendLabels = true; 694 appendLabels = true;
695 } 695 }
696 if ( appendLabels ) { 696 if ( appendLabels ) {
697 dayLabel = new QLabel(mDayLabels); 697 dayLabel = new QLabel(mDayLabels);
698 mDayLabelsList.append( dayLabel ); 698 mDayLabelsList.append( dayLabel );
699 mLayoutDayLabels->addWidget(dayLabel); 699 mLayoutDayLabels->addWidget(dayLabel);
700 } 700 }
701 dayLabel->setMinimumWidth( 1 ); 701 dayLabel->setMinimumWidth( 1 );
702 dayLabel->setMaximumWidth( 2048 ); 702 dayLabel->setMaximumWidth( 2048 );
703 dayLabel->setFont( dlf ); 703 dayLabel->setFont( dlf );
704 dayLabel->show(); 704 dayLabel->show();
705 QString str; 705 QString str;
706 int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); 706 int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date);
707 QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); 707 QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true );
708 switch ( maxLen ) { 708 switch ( maxLen ) {
709 case 2: 709 case 2:
710 str = QString::number( date.day() ); 710 str = QString::number( date.day() );
711 break; 711 break;
712 712
713 case 3: 713 case 3:
714 str = dayName.left( 1 ) +QString::number( date.day()); 714 str = dayName.left( 1 ) +QString::number( date.day());
715 715
716 break; 716 break;
717 case 4: 717 case 4:
718 str = dayName.left( 1 ) + " " +QString::number( date.day()); 718 str = dayName.left( 1 ) + " " +QString::number( date.day());
719 719
720 break; 720 break;
721 case 5: 721 case 5:
722 str = dayName.left( 2 ) + " " +QString::number( date.day()); 722 str = dayName.left( 2 ) + " " +QString::number( date.day());
723 723
724 break; 724 break;
725 case 6: 725 case 6:
726 str = dayName.left( 3 ) + " " +QString::number( date.day()); 726 str = dayName.left( 3 ) + " " +QString::number( date.day());
727 break; 727 break;
728 728
729 default: 729 default:
730 break; 730 break;
731 } 731 }
732 if ( oneday ) { 732 if ( oneday ) {
733 QString addString; 733 QString addString;
734 if ( mSelectedDates.first() == QDateTime::currentDateTime().date() ) 734 if ( mSelectedDates.first() == QDateTime::currentDateTime().date() )
735 addString = i18n("Today"); 735 addString = i18n("Today");
736 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) 736 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
737 addString = i18n("Tomorrow"); 737 addString = i18n("Tomorrow");
738 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) 738 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
739 addString = i18n("Yesterday"); 739 addString = i18n("Yesterday");
740 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) 740 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
741 addString = i18n("Day before yesterday"); 741 addString = i18n("Day before yesterday");
742 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) 742 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
743 addString = i18n("Day after tomorrow"); 743 addString = i18n("Day after tomorrow");
744 if ( !addString.isEmpty() ) { 744 if ( !addString.isEmpty() ) {
745 str = addString+", " + str; 745 str = addString+", " + str;
746 } 746 }
747 } 747 }
748 dayLabel->setText(str); 748 dayLabel->setText(str);
749 dayLabel->setAlignment(QLabel::AlignHCenter); 749 dayLabel->setAlignment(QLabel::AlignHCenter);
750 if (date == QDate::currentDate()) { 750 if (date == QDate::currentDate()) {
751 QFont bFont = dlf; 751 QFont bFont = dlf;
752 bFont.setBold( true ); 752 bFont.setBold( true );
753 dayLabel->setFont(bFont); 753 dayLabel->setFont(bFont);
754 } 754 }
755 //dayLayout->addWidget(dayLabel); 755 //dayLayout->addWidget(dayLabel);
756 756
757#ifndef KORG_NOPLUGINS 757#ifndef KORG_NOPLUGINS
758 CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); 758 CalendarDecoration::List cds = KOCore::self()->calendarDecorations();
759 CalendarDecoration *it; 759 CalendarDecoration *it;
760 for(it = cds.first(); it; it = cds.next()) { 760 for(it = cds.first(); it; it = cds.next()) {
761 QString text = it->shortText( date ); 761 QString text = it->shortText( date );
762 if ( !text.isEmpty() ) { 762 if ( !text.isEmpty() ) {
763 QLabel *label = new QLabel(text,mDayLabels); 763 QLabel *label = new QLabel(text,mDayLabels);
764 label->setAlignment(AlignCenter); 764 label->setAlignment(AlignCenter);
765 dayLayout->addWidget(label); 765 dayLayout->addWidget(label);
766 } 766 }
767 } 767 }
768 768
769 for(it = cds.first(); it; it = cds.next()) { 769 for(it = cds.first(); it; it = cds.next()) {
770 QWidget *wid = it->smallWidget(mDayLabels,date); 770 QWidget *wid = it->smallWidget(mDayLabels,date);
771 if ( wid ) { 771 if ( wid ) {
772 // wid->setHeight(20); 772 // wid->setHeight(20);
773 dayLayout->addWidget(wid); 773 dayLayout->addWidget(wid);
774 } 774 }
775 } 775 }
776#endif 776#endif
777 } 777 }
778 if ( ! appendLabels ) { 778 if ( ! appendLabels ) {
779 dayLabel = mDayLabelsList.next(); 779 dayLabel = mDayLabelsList.next();
780 if ( !dayLabel ) 780 if ( !dayLabel )
781 appendLabels = true; 781 appendLabels = true;
782 } 782 }
783 if ( appendLabels ) { 783 if ( appendLabels ) {
784 dayLabel = new QLabel(mDayLabels); 784 dayLabel = new QLabel(mDayLabels);
785 mDayLabelsList.append( dayLabel ); 785 mDayLabelsList.append( dayLabel );
786 mLayoutDayLabels->addWidget(dayLabel); 786 mLayoutDayLabels->addWidget(dayLabel);
787 } 787 }
788 //dayLabel->hide();//test only 788 //dayLabel->hide();//test only
789 789
790 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ; 790 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ;
791 if ( offset < 0 ) offset = 0; 791 if ( offset < 0 ) offset = 0;
792 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); 792 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 );
793 dayLabel->setText("");//QString::number ( mSelectedDates.first().month() ) ); 793 dayLabel->setText("");//QString::number ( mSelectedDates.first().month() ) );
794 dayLabel->show(); 794 dayLabel->show();
795 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset ); 795 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset );
796 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2); 796 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2);
797 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); 797 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2);
798 if ( !appendLabels ) { 798 if ( !appendLabels ) {
799 dayLabel = mDayLabelsList.next(); 799 dayLabel = mDayLabelsList.next();
800 while ( dayLabel ) { 800 while ( dayLabel ) {
801 //qDebug("!dayLabel %d",dayLabel ); 801 //qDebug("!dayLabel %d",dayLabel );
802 dayLabel->hide(); 802 dayLabel->hide();
803 dayLabel = mDayLabelsList.next(); 803 dayLabel = mDayLabelsList.next();
804 } 804 }
805 } 805 }
806 //mDayLabelsFrame->show(); 806 //mDayLabelsFrame->show();
807 //mDayLabels->show(); 807 //mDayLabels->show();
808 //qDebug("heigt %d %d %d ",mDayLabelsFrame->height(), mDayLabelsFrame->sizeHint().height(), newHight); 808 //qDebug("heigt %d %d %d ",mDayLabelsFrame->height(), mDayLabelsFrame->sizeHint().height(), newHight);
809 //mDayLabelsFrame->resize( mAgenda->visibleWidth(), newHight ); 809 //mDayLabelsFrame->resize( mAgenda->visibleWidth(), newHight );
810 mDayLabelsFrame->setFixedHeight( newHight ); 810 mDayLabelsFrame->setFixedHeight( newHight );
811} 811}
812 812
813int KOAgendaView::maxDatesHint() 813int KOAgendaView::maxDatesHint()
814{ 814{
815 // Not sure about the max number of events, so return 0 for now. 815 // Not sure about the max number of events, so return 0 for now.
816 return 0; 816 return 0;
817} 817}
818 818
819int KOAgendaView::currentDateCount() 819int KOAgendaView::currentDateCount()
820{ 820{
821 return mSelectedDates.count(); 821 return mSelectedDates.count();
822} 822}
823 823
824QPtrList<Incidence> KOAgendaView::selectedIncidences() 824QPtrList<Incidence> KOAgendaView::selectedIncidences()
825{ 825{
826 QPtrList<Incidence> selected; 826 QPtrList<Incidence> selected;
827 Incidence *incidence; 827 Incidence *incidence;
828 828
829 incidence = mAgenda->selectedIncidence(); 829 incidence = mAgenda->selectedIncidence();
830 if (incidence) selected.append(incidence); 830 if (incidence) selected.append(incidence);
831 831
832 incidence = mAllDayAgenda->selectedIncidence(); 832 incidence = mAllDayAgenda->selectedIncidence();
833 if (incidence) selected.append(incidence); 833 if (incidence) selected.append(incidence);
834 834
835 return selected; 835 return selected;
836} 836}
837 837
838DateList KOAgendaView::selectedDates() 838DateList KOAgendaView::selectedDates()
839{ 839{
840 DateList selected; 840 DateList selected;
841 QDate qd; 841 QDate qd;
842 842
843 qd = mAgenda->selectedIncidenceDate(); 843 qd = mAgenda->selectedIncidenceDate();
844 if (qd.isValid()) selected.append(qd); 844 if (qd.isValid()) selected.append(qd);
845 845
846 qd = mAllDayAgenda->selectedIncidenceDate(); 846 qd = mAllDayAgenda->selectedIncidenceDate();
847 if (qd.isValid()) selected.append(qd); 847 if (qd.isValid()) selected.append(qd);
848 848
849 return selected; 849 return selected;
850} 850}
851 851
852 852
853void KOAgendaView::updateView() 853void KOAgendaView::updateView()
854{ 854{
855 if ( mBlockUpdating ) 855 if ( mBlockUpdating )
856 return; 856 return;
857 // kdDebug() << "KOAgendaView::updateView()" << endl; 857 // kdDebug() << "KOAgendaView::updateView()" << endl;
858 fillAgenda(); 858 fillAgenda();
859 859
860} 860}
861 861
862 862
863/* 863/*
864 Update configuration settings for the agenda view. This method is not 864 Update configuration settings for the agenda view. This method is not
865 complete. 865 complete.
866*/ 866*/
867void KOAgendaView::updateConfig() 867void KOAgendaView::updateConfig()
868{ 868{
869 if ( mBlockUpdating ) 869 if ( mBlockUpdating )
870 return; 870 return;
871 // kdDebug() << "KOAgendaView::updateConfig()" << endl; 871 // kdDebug() << "KOAgendaView::updateConfig()" << endl;
872 872
873 // update config for children 873 // update config for children
874 mTimeLabels->updateConfig(); 874 mTimeLabels->updateConfig();
875 mAgenda->storePosition(); 875 mAgenda->storePosition();
876 mAgenda->updateConfig(); 876 mAgenda->updateConfig();
877 mAllDayAgenda->updateConfig(); 877 mAllDayAgenda->updateConfig();
878 // widget synchronization 878 // widget synchronization
879 //TODO: find a better way, maybe signal/slot 879 //TODO: find a better way, maybe signal/slot
880 mTimeLabels->positionChanged(); 880 mTimeLabels->positionChanged();
881 881
882 // for some reason, this needs to be called explicitly 882 // for some reason, this needs to be called explicitly
883 mTimeLabels->repaint(); 883 mTimeLabels->repaint();
884 884
885 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); 885 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
886 886
887 // ToolTips displaying summary of events 887 // ToolTips displaying summary of events
888 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() 888 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
889 ->mEnableToolTips); 889 ->mEnableToolTips);
890 890
891 //setHolidayMasks(); 891 //setHolidayMasks();
892 892
893 //createDayLabels(); called by via updateView(); 893 //createDayLabels(); called by via updateView();
894 mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth()); 894 mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth());
895 updateView(); 895 updateView();
896 mAgenda->restorePosition(); 896 mAgenda->restorePosition();
897} 897}
898 898
899 899
900void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) 900void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
901{ 901{
902 // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl; 902 // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl;
903 //qDebug("KOAgendaView::updateEventDates "); 903 //qDebug("KOAgendaView::updateEventDates ");
904 QDateTime startDt,endDt; 904 QDateTime startDt,endDt;
905 QDate startDate; 905 QDate startDate;
906 int lenInSecs; 906 int lenInSecs;
907 // if ( type == KOAgenda::RESIZETOP ) 907 // if ( type == KOAgenda::RESIZETOP )
908 // qDebug("RESIZETOP "); 908 // qDebug("RESIZETOP ");
909 // if ( type == KOAgenda::RESIZEBOTTOM ) 909 // if ( type == KOAgenda::RESIZEBOTTOM )
910 // qDebug("RESIZEBOTTOM "); 910 // qDebug("RESIZEBOTTOM ");
911 // if ( type == KOAgenda::MOVE ) 911 // if ( type == KOAgenda::MOVE )
912 // qDebug("MOVE "); 912 // qDebug("MOVE ");
913 if ( item->incidence()->type() == "Event" ) { 913 if ( item->incidence()->type() == "Event" ) {
914 startDt =item->incidence()->dtStart(); 914 startDt =item->incidence()->dtStart();
915 endDt = item->incidence()->dtEnd(); 915 endDt = item->incidence()->dtEnd();
916 lenInSecs = startDt.secsTo( endDt ); 916 lenInSecs = startDt.secsTo( endDt );
917 } 917 }
918 918
919 // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); 919 // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED );
920 920
921 if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { 921 if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) {
922 startDate = mSelectedDates[item->mLastMoveXPos]; 922 startDate = mSelectedDates[item->mLastMoveXPos];
923 } else { 923 } else {
924 if (item->cellX() < 0) { 924 if (item->cellX() < 0) {
925 startDate = (mSelectedDates.first()).addDays(item->cellX()); 925 startDate = (mSelectedDates.first()).addDays(item->cellX());
926 } else { 926 } else {
927 startDate = mSelectedDates[item->cellX()]; 927 startDate = mSelectedDates[item->cellX()];
928 } 928 }
929 } 929 }
930 startDt.setDate(startDate); 930 startDt.setDate(startDate);
931 931
932 if (item->incidence()->doesFloat()) { 932 if (item->incidence()->doesFloat()) {
933 endDt.setDate(startDate.addDays(item->cellWidth() - 1)); 933 endDt.setDate(startDate.addDays(item->cellWidth() - 1));
934 } else { 934 } else {
935 if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) 935 if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE )
936 startDt.setTime(mAgenda->gyToTime(item->cellYTop())); 936 startDt.setTime(mAgenda->gyToTime(item->cellYTop()));
937 if ( item->incidence()->type() == "Event" ) { 937 if ( item->incidence()->type() == "Event" ) {
938 if ( type == KOAgenda::MOVE ) { 938 if ( type == KOAgenda::MOVE ) {
939 endDt = startDt.addSecs(lenInSecs); 939 endDt = startDt.addSecs(lenInSecs);
940 940
941 } else if ( type == KOAgenda::RESIZEBOTTOM ) { 941 } else if ( type == KOAgenda::RESIZEBOTTOM ) {
942 if (item->lastMultiItem()) { 942 if (item->lastMultiItem()) {
943 endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); 943 endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1));
944 endDt.setDate(startDate. 944 endDt.setDate(startDate.
945 addDays(item->lastMultiItem()->cellX() - item->cellX())); 945 addDays(item->lastMultiItem()->cellX() - item->cellX()));
946 } else { 946 } else {
947 endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); 947 endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1));
948 endDt.setDate(startDate); 948 endDt.setDate(startDate);
949 } 949 }
950 } 950 }
951 } else { 951 } else {
952 // todo 952 // todo
953 if (item->lastMultiItem()) { 953 if (item->lastMultiItem()) {
954 endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); 954 endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1));
955 endDt.setDate(startDate. 955 endDt.setDate(startDate.
956 addDays(item->lastMultiItem()->cellX() - item->cellX())); 956 addDays(item->lastMultiItem()->cellX() - item->cellX()));
957 } else { 957 } else {
958 //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); 958 //qDebug("tem->cellYBottom() %d",item->cellYBottom() );
959 if ( item->cellYBottom() > 0 ) 959 if ( item->cellYBottom() > 0 )
960 endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); 960 endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1));
961 else 961 else
962 endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); 962 endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time());
963 endDt.setDate(startDate); 963 endDt.setDate(startDate);
964 } 964 }
965 } 965 }
966 } 966 }
967 967
968 968
969 if ( item->incidence()->type() == "Event" ) { 969 if ( item->incidence()->type() == "Event" ) {
970 item->incidence()->setDtStart(startDt); 970 item->incidence()->setDtStart(startDt);
971 (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); 971 (static_cast<Event*>(item->incidence()))->setDtEnd(endDt);
972 } else if ( item->incidence()->type() == "Todo" ) { 972 } else if ( item->incidence()->type() == "Todo" ) {
973 (static_cast<Todo*>(item->incidence()))->setDtDue(endDt); 973 (static_cast<Todo*>(item->incidence()))->setDtDue(endDt);
974 } 974 }
975 //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); 975 //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() );
976 item->incidence()->setRevision(item->incidence()->revision()+1); 976 item->incidence()->setRevision(item->incidence()->revision()+1);
977 item->setItemDate(startDt.date()); 977 item->setItemDate(startDt.date());
978 //item->updateItem(); 978 //item->updateItem();
979 if ( item->incidence()->type() == "Todo" ) { 979 if ( item->incidence()->type() == "Todo" ) {
980 emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); 980 emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED );
981 981
982 } 982 }
983 else 983 else
984 emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); 984 emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED);
985 item->updateItem(); 985 item->updateItem();
986} 986}
987 987
988void KOAgendaView::showDates( const QDate &start, const QDate &end ) 988void KOAgendaView::showDates( const QDate &start, const QDate &end )
989{ 989{
990 // kdDebug() << "KOAgendaView::selectDates" << endl; 990 // kdDebug() << "KOAgendaView::selectDates" << endl;
991 991
992 mSelectedDates.clear(); 992 mSelectedDates.clear();
993 // qDebug("KOAgendaView::showDates "); 993 // qDebug("KOAgendaView::showDates ");
994 QDate d = start; 994 QDate d = start;
995 while (d <= end) { 995 while (d <= end) {
996 mSelectedDates.append(d); 996 mSelectedDates.append(d);
997 d = d.addDays( 1 ); 997 d = d.addDays( 1 );
998 } 998 }
999 999
1000 // and update the view 1000 // and update the view
1001 fillAgenda(); 1001 fillAgenda();
1002} 1002}
1003 1003
1004 1004
1005void KOAgendaView::showEvents(QPtrList<Event>) 1005void KOAgendaView::showEvents(QPtrList<Event>)
1006{ 1006{
1007 kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; 1007 kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl;
1008} 1008}
1009 1009
1010void KOAgendaView::changeEventDisplay(Event *, int) 1010void KOAgendaView::changeEventDisplay(Event *, int)
1011{ 1011{
1012 // qDebug("KOAgendaView::changeEventDisplay "); 1012 // qDebug("KOAgendaView::changeEventDisplay ");
1013 // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; 1013 // kdDebug() << "KOAgendaView::changeEventDisplay" << endl;
1014 // this should be re-written to be MUCH smarter. Right now we 1014 // this should be re-written to be MUCH smarter. Right now we
1015 // are just playing dumb. 1015 // are just playing dumb.
1016 fillAgenda(); 1016 fillAgenda();
1017} 1017}
1018 1018
1019void KOAgendaView::fillAgenda(const QDate &) 1019void KOAgendaView::fillAgenda(const QDate &)
1020{ 1020{
1021 // qDebug("KOAgendaView::fillAgenda "); 1021 // qDebug("KOAgendaView::fillAgenda ");
1022 fillAgenda(); 1022 fillAgenda();
1023} 1023}
1024 1024
1025void KOAgendaView::fillAgenda() 1025void KOAgendaView::fillAgenda()
1026{ 1026{
1027 if ( globalFlagBlockStartup ) 1027 if ( globalFlagBlockStartup )
1028 return; 1028 return;
1029 if ( globalFlagBlockAgenda == 1 ) 1029 if ( globalFlagBlockAgenda == 1 )
1030 return; 1030 return;
1031 //if ( globalFlagBlockAgenda == 2 ) 1031 //if ( globalFlagBlockAgenda == 2 )
1032 //globalFlagBlockAgenda = 0; 1032 //globalFlagBlockAgenda = 0;
1033 // globalFlagBlockPainting = false; 1033 // globalFlagBlockPainting = false;
1034 if ( globalFlagBlockAgenda == 0 ) 1034 if ( globalFlagBlockAgenda == 0 )
1035 globalFlagBlockAgenda = 1; 1035 globalFlagBlockAgenda = 1;
1036 // clearView(); 1036 // clearView();
1037 //qDebug("fillAgenda()++++ "); 1037 //qDebug("fillAgenda()++++ ");
1038 globalFlagBlockAgendaItemPaint = 1; 1038 globalFlagBlockAgendaItemPaint = 1;
1039 mAllDayAgenda->changeColumns(mSelectedDates.count()); 1039 mAllDayAgenda->changeColumns(mSelectedDates.count());
1040 mAgenda->changeColumns(mSelectedDates.count()); 1040 mAgenda->changeColumns(mSelectedDates.count());
1041 qApp->processEvents(); 1041 qApp->processEvents();
1042 mEventIndicatorTop->changeColumns(mSelectedDates.count()); 1042 mEventIndicatorTop->changeColumns(mSelectedDates.count());
1043 mEventIndicatorBottom->changeColumns(mSelectedDates.count()); 1043 mEventIndicatorBottom->changeColumns(mSelectedDates.count());
1044 setHolidayMasks(); 1044 setHolidayMasks();
1045 1045
1046 //mAgenda->hideUnused(); 1046 //mAgenda->hideUnused();
1047 //mAllDayAgenda->hideUnused(); 1047 //mAllDayAgenda->hideUnused();
1048 1048
1049 // mAgenda->blockNextRepaint( false ); 1049 // mAgenda->blockNextRepaint( false );
1050 // mAgenda->viewport()->repaint(); 1050 // mAgenda->viewport()->repaint();
1051 // mAgenda->blockNextRepaint( true ); 1051 // mAgenda->blockNextRepaint( true );
1052 mMinY.resize(mSelectedDates.count()); 1052 mMinY.resize(mSelectedDates.count());
1053 mMaxY.resize(mSelectedDates.count()); 1053 mMaxY.resize(mSelectedDates.count());
1054 1054
1055 QPtrList<Event> dayEvents; 1055 QPtrList<Event> dayEvents;
1056 1056
1057 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1057 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
1058 // Therefore, get all of them. 1058 // Therefore, get all of them.
1059 QPtrList<Todo> todos = calendar()->todos(); 1059 QPtrList<Todo> todos = calendar()->todos();
1060 1060
1061 mAgenda->setDateList(mSelectedDates); 1061 mAgenda->setDateList(mSelectedDates);
1062 1062
1063 QDate today = QDate::currentDate(); 1063 QDate today = QDate::currentDate();
1064 1064
1065 DateList::ConstIterator dit; 1065 DateList::ConstIterator dit;
1066 int curCol = 0; 1066 int curCol = 0;
1067 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { 1067 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
1068 QDate currentDate = *dit; 1068 QDate currentDate = *dit;
1069 // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() 1069 // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString()
1070 // << endl; 1070 // << endl;
1071 1071
1072 dayEvents = calendar()->events(currentDate,true); 1072 dayEvents = calendar()->events(currentDate,true);
1073 1073
1074 // Default values, which can never be reached 1074 // Default values, which can never be reached
1075 mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; 1075 mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1;
1076 mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; 1076 mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1;
1077 1077
1078 unsigned int numEvent; 1078 unsigned int numEvent;
1079 for(numEvent=0;numEvent<dayEvents.count();++numEvent) { 1079 for(numEvent=0;numEvent<dayEvents.count();++numEvent) {
1080 Event *event = dayEvents.at(numEvent); 1080 Event *event = dayEvents.at(numEvent);
1081 if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) 1081 if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") )
1082 if ( event->uid().left(15) == QString("last-syncEvent-") ) 1082 if ( event->uid().left(15) == QString("last-syncEvent-") )
1083 continue; 1083 continue;
1084 // kdDebug() << " Event: " << event->summary() << endl; 1084 // kdDebug() << " Event: " << event->summary() << endl;
1085 1085
1086 int beginX = currentDate.daysTo(event->dtStart().date()) + curCol; 1086 int beginX = currentDate.daysTo(event->dtStart().date()) + curCol;
1087 int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; 1087 int endX = currentDate.daysTo(event->dtEnd().date()) + curCol;
1088 1088
1089 // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; 1089 // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl;
1090 1090
1091 if (event->doesFloat()) { 1091 if (event->doesFloat()) {
1092 if (event->recurrence()->doesRecur()) { 1092 if (event->recurrence()->doesRecur()) {
1093 mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); 1093 mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
1094 } else { 1094 } else {
1095 if (beginX <= 0 && curCol == 0) { 1095 if (beginX <= 0 && curCol == 0) {
1096 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); 1096 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1097 } else if (beginX == curCol) { 1097 } else if (beginX == curCol) {
1098 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); 1098 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1099 } 1099 }
1100 } 1100 }
1101 } else if (event->isMultiDay()) { 1101 } else if (event->isMultiDay()) {
1102 if ( event->doesRecur () ) { 1102 if ( event->doesRecur () ) {
1103 QDate dateit = currentDate; 1103 QDate dateit = currentDate;
1104 int count = 0; 1104 int count = 0;
1105 int max = event->dtStart().daysTo( event->dtEnd() ) +2; 1105 int max = event->dtStart().daysTo( event->dtEnd() ) +2;
1106 while (! event->recursOn( dateit ) && count <= max ) { 1106 while (! event->recursOn( dateit ) && count <= max ) {
1107 ++count; 1107 ++count;
1108 dateit = dateit.addDays( -1 ); 1108 dateit = dateit.addDays( -1 );
1109 } 1109 }
1110 bool ok; 1110 bool ok;
1111 QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok ); 1111 QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok );
1112 if ( ok ) 1112 if ( ok )
1113 { 1113 {
1114 int secs = event->dtStart().secsTo( event->dtEnd() ); 1114 int secs = event->dtStart().secsTo( event->dtEnd() );
1115 QDateTime nextOcend =nextOcstart.addSecs( secs ); ; 1115 QDateTime nextOcend =nextOcstart.addSecs( secs ); ;
1116 beginX = currentDate.daysTo(nextOcstart.date()) + curCol; 1116 beginX = currentDate.daysTo(nextOcstart.date()) + curCol;
1117 endX = currentDate.daysTo(nextOcend.date()) + curCol; 1117 endX = currentDate.daysTo(nextOcend.date()) + curCol;
1118 1118
1119 } 1119 }
1120 } 1120 }
1121 int startY = mAgenda->timeToY(event->dtStart().time()); 1121 int startY = mAgenda->timeToY(event->dtStart().time());
1122 int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; 1122 int endY = mAgenda->timeToY(event->dtEnd().time()) - 1;
1123 //qDebug("insert %d %d %d %d %d ",beginX,endX,startY,endY , curCol ); 1123 //qDebug("insert %d %d %d %d %d ",beginX,endX,startY,endY , curCol );
1124 if ((beginX <= 0 && curCol == 0) || beginX == curCol) { 1124 if ((beginX <= 0 && curCol == 0) || beginX == curCol) {
1125 //qDebug("insert!!! "); 1125 //qDebug("insert!!! ");
1126 mAgenda->insertMultiItem(event,currentDate,beginX,endX,startY,endY); 1126 mAgenda->insertMultiItem(event,currentDate,beginX,endX,startY,endY);
1127 } 1127 }
1128 if (beginX == curCol) { 1128 if (beginX == curCol) {
1129 mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); 1129 mMaxY[curCol] = mAgenda->timeToY(QTime(23,59));
1130 if (startY < mMinY[curCol]) mMinY[curCol] = startY; 1130 if (startY < mMinY[curCol]) mMinY[curCol] = startY;
1131 } else if (endX == curCol) { 1131 } else if (endX == curCol) {
1132 mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); 1132 mMinY[curCol] = mAgenda->timeToY(QTime(0,0));
1133 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; 1133 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY;
1134 } else { 1134 } else {
1135 mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); 1135 mMinY[curCol] = mAgenda->timeToY(QTime(0,0));
1136 mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); 1136 mMaxY[curCol] = mAgenda->timeToY(QTime(23,59));
1137 } 1137 }
1138 } else { 1138 } else {
1139 int startY = mAgenda->timeToY(event->dtStart().time()); 1139 int startY = mAgenda->timeToY(event->dtStart().time());
1140 int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; 1140 int endY = mAgenda->timeToY(event->dtEnd().time()) - 1;
1141 if (endY < startY) endY = startY; 1141 if (endY < startY) endY = startY;
1142 mAgenda->insertItem(event,currentDate,curCol,startY,endY); 1142 mAgenda->insertItem(event,currentDate,curCol,startY,endY);
1143 if (startY < mMinY[curCol]) mMinY[curCol] = startY; 1143 if (startY < mMinY[curCol]) mMinY[curCol] = startY;
1144 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; 1144 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY;
1145 } 1145 }
1146 } 1146 }
1147 // ---------- [display Todos -------------- 1147 // ---------- [display Todos --------------
1148 unsigned int numTodo; 1148 unsigned int numTodo;
1149 for (numTodo = 0; numTodo < todos.count(); ++numTodo) { 1149 for (numTodo = 0; numTodo < todos.count(); ++numTodo) {
1150 Todo *todo = todos.at(numTodo); 1150 Todo *todo = todos.at(numTodo);
1151 1151
1152 if ( ! todo->hasDueDate() ) continue; // todo shall not be displayed if it has no date 1152 if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date
1153 1153
1154 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1154 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
1155 // Already completed items can be displayed on their original due date 1155 // Already completed items can be displayed on their original due date
1156 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda 1156 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda
1157 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; 1157 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda;
1158 1158
1159 if ( ((todo->dtDue().date() == currentDate) && !overdue) || 1159 if ( ((todo->dtDue().date() == currentDate) && !overdue) || ( todo->hasCompletedDate() && todo->completed().date() == currentDate )||
1160 ((currentDate == today) && overdue) ) { 1160 ((currentDate == today) && overdue) ) {
1161 if ( todo->doesFloat() || overdue ) { // Todo has no due-time set or is already overdue 1161 if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue
1162 if ( KOPrefs::instance()->mShowTodoInAgenda ) 1162 if ( KOPrefs::instance()->mShowTodoInAgenda )
1163 mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); 1163 mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol);
1164 } 1164 }
1165 else { 1165 else {
1166 1166 QDateTime dt;
1167 int endY = mAgenda->timeToY(todo->dtDue().time()) - 1; 1167 if ( todo->hasCompletedDate() )
1168 dt = todo->completed();
1169 else
1170 dt = todo->dtDue();;
1171
1172
1173 int endY = mAgenda->timeToY(dt.time()) - 1;
1168 int hi = (18/KOPrefs::instance()->mHourSize); 1174 int hi = (18/KOPrefs::instance()->mHourSize);
1169 //qDebug("hei %d ",KOPrefs::instance()->mHourSize); 1175 //qDebug("hei %d ",KOPrefs::instance()->mHourSize);
1170 int startY = endY -hi; 1176 int startY = endY -hi;
1171 1177
1172 mAgenda->insertItem(todo,currentDate,curCol,startY,endY); 1178 mAgenda->insertItem(todo,currentDate,curCol,startY,endY);
1173 1179
1174 if (startY < mMinY[curCol]) mMinY[curCol] = startY; 1180 if (startY < mMinY[curCol]) mMinY[curCol] = startY;
1175 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; 1181 if (endY > mMaxY[curCol]) mMaxY[curCol] = endY;
1176 } 1182 }
1177 } 1183 }
1178 } 1184 }
1179 // ---------- display Todos] -------------- 1185 // ---------- display Todos] --------------
1180 1186
1181 ++curCol; 1187 ++curCol;
1182 } 1188 }
1183 mAgenda->hideUnused(); 1189 mAgenda->hideUnused();
1184 mAllDayAgenda->hideUnused(); 1190 mAllDayAgenda->hideUnused();
1185 mAgenda->checkScrollBoundaries(); 1191 mAgenda->checkScrollBoundaries();
1186 1192
1187 deleteSelectedDateTime(); 1193 deleteSelectedDateTime();
1188 1194
1189 createDayLabels(); 1195 createDayLabels();
1190 emit incidenceSelected( 0 ); 1196 emit incidenceSelected( 0 );
1191 1197
1192 if ( globalFlagBlockAgenda == 2 ) { 1198 if ( globalFlagBlockAgenda == 2 ) {
1193 if ( KOPrefs::instance()->mSetTimeToDayStartAt ) 1199 if ( KOPrefs::instance()->mSetTimeToDayStartAt )
1194 setStartHour( KOPrefs::instance()->mDayBegins ); 1200 setStartHour( KOPrefs::instance()->mDayBegins );
1195 else if ( KOPrefs::instance()->mCenterOnCurrentTime ) 1201 else if ( KOPrefs::instance()->mCenterOnCurrentTime )
1196 setStartHour( QTime::currentTime ().hour() ); 1202 setStartHour( QTime::currentTime ().hour() );
1197 // qApp->processEvents(); 1203 // qApp->processEvents();
1198 } 1204 }
1199 qApp->processEvents(); 1205 qApp->processEvents();
1200 //qDebug("qApp->processEvents(); END "); 1206 //qDebug("qApp->processEvents(); END ");
1201 globalFlagBlockAgenda = 0; 1207 globalFlagBlockAgenda = 0;
1202 1208
1203 // mAgenda->hideUnused(); 1209 // mAgenda->hideUnused();
1204 //mAllDayAgenda->hideUnused(); 1210 //mAllDayAgenda->hideUnused();
1205 mAllDayAgenda->drawContentsToPainter(); 1211 mAllDayAgenda->drawContentsToPainter();
1206 mAgenda->drawContentsToPainter(); 1212 mAgenda->drawContentsToPainter();
1207 repaintAgenda(); 1213 repaintAgenda();
1208 // mAgenda->finishUpdate(); 1214 // mAgenda->finishUpdate();
1209 //mAllDayAgenda->finishUpdate(); 1215 //mAllDayAgenda->finishUpdate();
1210 1216
1211 // repaintAgenda(); 1217 // repaintAgenda();
1212 //qApp->processEvents(); 1218 //qApp->processEvents();
1213 // globalFlagBlockAgenda = 0; 1219 // globalFlagBlockAgenda = 0;
1214} 1220}
1215void KOAgendaView::repaintAgenda() 1221void KOAgendaView::repaintAgenda()
1216{ 1222{
1217 // mAllDayAgenda->drawContentsToPainter(); 1223 // mAllDayAgenda->drawContentsToPainter();
1218// mAllDayAgenda->viewport()->repaint( false ); 1224// mAllDayAgenda->viewport()->repaint( false );
1219// mAgenda->drawContentsToPainter(); 1225// mAgenda->drawContentsToPainter();
1220// mAgenda->viewport()->repaint( false ); 1226// mAgenda->viewport()->repaint( false );
1221// qApp->processEvents(); 1227// qApp->processEvents();
1222 1228
1223 //qDebug("KOAgendaView::repaintAgenda() "); 1229 //qDebug("KOAgendaView::repaintAgenda() ");
1224 //qApp->processEvents(); 1230 //qApp->processEvents();
1225 mAgenda->viewport()->repaint( false ); 1231 mAgenda->viewport()->repaint( false );
1226 mAllDayAgenda->viewport()->repaint( false ); 1232 mAllDayAgenda->viewport()->repaint( false );
1227 mAgenda->finishUpdate(); 1233 mAgenda->finishUpdate();
1228 mAllDayAgenda->finishUpdate(); 1234 mAllDayAgenda->finishUpdate();
1229} 1235}
1230 1236
1231 1237
1232void KOAgendaView::clearView() 1238void KOAgendaView::clearView()
1233{ 1239{
1234 // kdDebug() << "ClearView" << endl; 1240 // kdDebug() << "ClearView" << endl;
1235 mAllDayAgenda->clear(); 1241 mAllDayAgenda->clear();
1236 mAgenda->clear(); 1242 mAgenda->clear();
1237} 1243}
1238 1244
1239void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd, 1245void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1240 const QDate &td) 1246 const QDate &td)
1241{ 1247{
1242#ifndef KORG_NOPRINTER 1248#ifndef KORG_NOPRINTER
1243 if (fd == td) 1249 if (fd == td)
1244 calPrinter->preview(CalPrinter::Day, fd, td); 1250 calPrinter->preview(CalPrinter::Day, fd, td);
1245 else 1251 else
1246 calPrinter->preview(CalPrinter::Week, fd, td); 1252 calPrinter->preview(CalPrinter::Week, fd, td);
1247#endif 1253#endif
1248} 1254}
1249 1255
1250// void KOAgendaView::updateMovedTodo() 1256// void KOAgendaView::updateMovedTodo()
1251// { 1257// {
1252// // updateConfig(); 1258// // updateConfig();
1253// // emit updateTodoViews(); 1259// // emit updateTodoViews();
1254// } 1260// }
1255 1261
1256void KOAgendaView::newEvent(int gx, int gy) 1262void KOAgendaView::newEvent(int gx, int gy)
1257{ 1263{
1258 if (!mSelectedDates.count()) return; 1264 if (!mSelectedDates.count()) return;
1259 1265
1260 QDate day = mSelectedDates[gx]; 1266 QDate day = mSelectedDates[gx];
1261 1267
1262 QTime time = mAgenda->gyToTime(gy); 1268 QTime time = mAgenda->gyToTime(gy);
1263 QDateTime dt(day,time); 1269 QDateTime dt(day,time);
1264 // if ( dt < QDateTime::currentDateTime () ) 1270 // if ( dt < QDateTime::currentDateTime () )
1265 // dt = QDateTime::currentDateTime ().addSecs( 3600 ); 1271 // dt = QDateTime::currentDateTime ().addSecs( 3600 );
1266 emit newEventSignal(dt); 1272 emit newEventSignal(dt);
1267} 1273}
1268 1274
1269void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd) 1275void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd)
1270{ 1276{
1271 if (!mSelectedDates.count()) return; 1277 if (!mSelectedDates.count()) return;
1272 1278
1273 QDate dayStart = mSelectedDates[gxStart]; 1279 QDate dayStart = mSelectedDates[gxStart];
1274 QDate dayEnd = mSelectedDates[gxEnd]; 1280 QDate dayEnd = mSelectedDates[gxEnd];
1275 1281
1276 QTime timeStart = mAgenda->gyToTime(gyStart); 1282 QTime timeStart = mAgenda->gyToTime(gyStart);
1277 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); 1283 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 );
1278 1284
1279 QDateTime dtStart(dayStart,timeStart); 1285 QDateTime dtStart(dayStart,timeStart);
1280 QDateTime dtEnd(dayEnd,timeEnd); 1286 QDateTime dtEnd(dayEnd,timeEnd);
1281 1287
1282 emit newEventSignal(dtStart,dtEnd); 1288 emit newEventSignal(dtStart,dtEnd);
1283} 1289}
1284 1290
1285void KOAgendaView::newEventAllDay(int gx, int ) 1291void KOAgendaView::newEventAllDay(int gx, int )
1286{ 1292{
1287 if (!mSelectedDates.count()) return; 1293 if (!mSelectedDates.count()) return;
1288 1294
1289 QDate day = mSelectedDates[gx]; 1295 QDate day = mSelectedDates[gx];
1290 1296
1291 emit newEventSignal(day); 1297 emit newEventSignal(day);
1292} 1298}
1293void KOAgendaView::newTodoAllDay(int gx, int ) 1299void KOAgendaView::newTodoAllDay(int gx, int )
1294{ 1300{
1295 if (!mSelectedDates.count()) return; 1301 if (!mSelectedDates.count()) return;
1296 1302
1297 QDateTime day (mSelectedDates[gx] ); 1303 QDateTime day (mSelectedDates[gx] );
1298 emit newTodoSignal(day, true); 1304 emit newTodoSignal(day, true);
1299} 1305}
1300void KOAgendaView::newTodo(int gx, int gy ) 1306void KOAgendaView::newTodo(int gx, int gy )
1301{ 1307{
1302 if (!mSelectedDates.count()) return; 1308 if (!mSelectedDates.count()) return;
1303 QDate dayStart = mSelectedDates[gx]; 1309 QDate dayStart = mSelectedDates[gx];
1304 QTime timeStart = mAgenda->gyToTime(gy); 1310 QTime timeStart = mAgenda->gyToTime(gy);
1305 QDateTime dt (dayStart,timeStart); 1311 QDateTime dt (dayStart,timeStart);
1306 emit newTodoSignal( dt, false ); 1312 emit newTodoSignal( dt, false );
1307} 1313}
1308 1314
1309void KOAgendaView::updateEventIndicatorTop(int newY) 1315void KOAgendaView::updateEventIndicatorTop(int newY)
1310{ 1316{
1311 uint i; 1317 uint i;
1312 for(i=0;i<mMinY.size();++i) { 1318 for(i=0;i<mMinY.size();++i) {
1313 if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true); 1319 if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true);
1314 else mEventIndicatorTop->enableColumn(i,false); 1320 else mEventIndicatorTop->enableColumn(i,false);
1315 } 1321 }
1316 1322
1317 mEventIndicatorTop->update(); 1323 mEventIndicatorTop->update();
1318} 1324}
1319 1325
1320void KOAgendaView::updateEventIndicatorBottom(int newY) 1326void KOAgendaView::updateEventIndicatorBottom(int newY)
1321{ 1327{
1322 uint i; 1328 uint i;
1323 for(i=0;i<mMaxY.size();++i) { 1329 for(i=0;i<mMaxY.size();++i) {
1324 if (newY <= mMaxY.at(i)) mEventIndicatorBottom->enableColumn(i,true); 1330 if (newY <= mMaxY.at(i)) mEventIndicatorBottom->enableColumn(i,true);
1325 else mEventIndicatorBottom->enableColumn(i,false); 1331 else mEventIndicatorBottom->enableColumn(i,false);
1326 } 1332 }
1327 1333
1328 mEventIndicatorBottom->update(); 1334 mEventIndicatorBottom->update();
1329} 1335}
1330 1336
1331void KOAgendaView::startDrag(Event *event) 1337void KOAgendaView::startDrag(Event *event)
1332{ 1338{
1333#ifndef KORG_NODND 1339#ifndef KORG_NODND
1334 DndFactory factory( calendar() ); 1340 DndFactory factory( calendar() );
1335 ICalDrag *vd = factory.createDrag(event,this); 1341 ICalDrag *vd = factory.createDrag(event,this);
1336 if (vd->drag()) { 1342 if (vd->drag()) {
1337 kdDebug() << "KOAgendaView::startDrag(): Delete drag source" << endl; 1343 kdDebug() << "KOAgendaView::startDrag(): Delete drag source" << endl;
1338 } 1344 }
1339#endif 1345#endif
1340} 1346}
1341 1347
1342void KOAgendaView::readSettings() 1348void KOAgendaView::readSettings()
1343{ 1349{
1344 readSettings(KOGlobals::config()); 1350 readSettings(KOGlobals::config());
1345} 1351}
1346 1352
1347void KOAgendaView::readSettings(KConfig *config) 1353void KOAgendaView::readSettings(KConfig *config)
1348{ 1354{
1349 // kdDebug() << "KOAgendaView::readSettings()" << endl; 1355 // kdDebug() << "KOAgendaView::readSettings()" << endl;
1350 1356
1351 config->setGroup("Views"); 1357 config->setGroup("Views");
1352 1358
1353 //#ifndef KORG_NOSPLITTER 1359 //#ifndef KORG_NOSPLITTER
1354 QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); 1360 QValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
1355 if (sizes.count() == 2) { 1361 if (sizes.count() == 2) {
1356 if ( sizes[0] < 20 ) { 1362 if ( sizes[0] < 20 ) {
1357 sizes[1] = sizes[1] +20 - sizes[0]; 1363 sizes[1] = sizes[1] +20 - sizes[0];
1358 sizes[0] = 20; 1364 sizes[0] = 20;
1359 } 1365 }
1360 mSplitterAgenda->setSizes(sizes); 1366 mSplitterAgenda->setSizes(sizes);
1361 // qDebug("read %d %d ",sizes[0],sizes[1] ); 1367 // qDebug("read %d %d ",sizes[0],sizes[1] );
1362 } 1368 }
1363 //#endif 1369 //#endif
1364 1370
1365 // updateConfig(); 1371 // updateConfig();
1366} 1372}
1367 1373
1368void KOAgendaView::writeSettings(KConfig *config) 1374void KOAgendaView::writeSettings(KConfig *config)
1369{ 1375{
1370 // kdDebug() << "KOAgendaView::writeSettings()" << endl; 1376 // kdDebug() << "KOAgendaView::writeSettings()" << endl;
1371 1377
1372 config->setGroup("Views"); 1378 config->setGroup("Views");
1373 1379
1374 //#ifndef KORG_NOSPLITTER 1380 //#ifndef KORG_NOSPLITTER
1375 QValueList<int> list = mSplitterAgenda->sizes(); 1381 QValueList<int> list = mSplitterAgenda->sizes();
1376 config->writeEntry("Separator AgendaView",list); 1382 config->writeEntry("Separator AgendaView",list);
1377 //qDebug("write %d %d ", list[0],list[1] ); 1383 //qDebug("write %d %d ", list[0],list[1] );
1378 //#endif 1384 //#endif
1379} 1385}
1380 1386
1381void KOAgendaView::setHolidayMasks() 1387void KOAgendaView::setHolidayMasks()
1382{ 1388{
1383 mHolidayMask.resize(mSelectedDates.count()); 1389 mHolidayMask.resize(mSelectedDates.count());
1384 1390
1385 uint i; 1391 uint i;
1386 for(i=0;i<mSelectedDates.count();++i) { 1392 for(i=0;i<mSelectedDates.count();++i) {
1387 QDate date = mSelectedDates[i]; 1393 QDate date = mSelectedDates[i];
1388 bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); 1394 bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6);
1389 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); 1395 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7);
1390 bool showHoliday = false; 1396 bool showHoliday = false;
1391 if ( KOPrefs::instance()->mExcludeHolidays ) { 1397 if ( KOPrefs::instance()->mExcludeHolidays ) {
1392 QPtrList<Event> events = calendar()->events( date, true ); 1398 QPtrList<Event> events = calendar()->events( date, true );
1393 Event *event; 1399 Event *event;
1394 for( event = events.first(); event; event = events.next() ) { 1400 for( event = events.first(); event; event = events.next() ) {
1395 if ( event->categories().contains("Holiday") || 1401 if ( event->categories().contains("Holiday") ||
1396 event->categories().contains(i18n("Holiday"))) { 1402 event->categories().contains(i18n("Holiday"))) {
1397 showHoliday = true; 1403 showHoliday = true;
1398 break; 1404 break;
1399 } 1405 }
1400 } 1406 }
1401 1407
1402 } 1408 }
1403 1409
1404#ifndef KORG_NOPLUGINS 1410#ifndef KORG_NOPLUGINS
1405 bool showHoliday = KOPrefs::instance()->mExcludeHolidays && 1411 bool showHoliday = KOPrefs::instance()->mExcludeHolidays &&
1406 !KOCore::self()->holiday(date).isEmpty(); 1412 !KOCore::self()->holiday(date).isEmpty();
1407#endif 1413#endif
1408 bool showDay = showSaturday || showSunday || showHoliday; 1414 bool showDay = showSaturday || showSunday || showHoliday;
1409 1415
1410 if (showDay) { 1416 if (showDay) {
1411 mHolidayMask.at(i) = true; 1417 mHolidayMask.at(i) = true;
1412 } else { 1418 } else {
1413 mHolidayMask.at(i) = false; 1419 mHolidayMask.at(i) = false;
1414 } 1420 }
1415 } 1421 }
1416 1422
1417 mAgenda->setHolidayMask(&mHolidayMask); 1423 mAgenda->setHolidayMask(&mHolidayMask);
1418 mAllDayAgenda->setHolidayMask(&mHolidayMask); 1424 mAllDayAgenda->setHolidayMask(&mHolidayMask);
1419} 1425}
1420 1426
1421void KOAgendaView::setContentsPos(int y) 1427void KOAgendaView::setContentsPos(int y)
1422{ 1428{
1423 mAgenda->setContentsPos(0,y); 1429 mAgenda->setContentsPos(0,y);
1424} 1430}
1425 1431
1426void KOAgendaView::setExpandedButton( bool expanded ) 1432void KOAgendaView::setExpandedButton( bool expanded )
1427{ 1433{
1428 if ( expanded ) { 1434 if ( expanded ) {
1429 mExpandButton->setPixmap( mExpandedPixmap ); 1435 mExpandButton->setPixmap( mExpandedPixmap );
1430 } else { 1436 } else {
1431 mExpandButton->setPixmap( mNotExpandedPixmap ); 1437 mExpandButton->setPixmap( mNotExpandedPixmap );
1432 } 1438 }
1433} 1439}
1434 1440
1435void KOAgendaView::clearSelection() 1441void KOAgendaView::clearSelection()
1436{ 1442{
1437 mAgenda->deselectItem(); 1443 mAgenda->deselectItem();
1438 mAllDayAgenda->deselectItem(); 1444 mAllDayAgenda->deselectItem();
1439} 1445}
1440 1446
1441void KOAgendaView::newTimeSpanSelectedAllDay(int gxStart, int gyStart, 1447void KOAgendaView::newTimeSpanSelectedAllDay(int gxStart, int gyStart,
1442 int gxEnd, int gyEnd) 1448 int gxEnd, int gyEnd)
1443{ 1449{
1444 mTimeSpanInAllDay = true; 1450 mTimeSpanInAllDay = true;
1445 newTimeSpanSelected(gxStart,gyStart,gxEnd,gyEnd); 1451 newTimeSpanSelected(gxStart,gyStart,gxEnd,gyEnd);
1446} 1452}
1447 1453
1448 1454
1449 1455
1450 1456
1451void KOAgendaView::newTimeSpanSelected(int gxStart, int gyStart, 1457void KOAgendaView::newTimeSpanSelected(int gxStart, int gyStart,
1452 int gxEnd, int gyEnd) 1458 int gxEnd, int gyEnd)
1453{ 1459{
1454 if (!mSelectedDates.count()) return; 1460 if (!mSelectedDates.count()) return;
1455 1461
1456 QDate dayStart = mSelectedDates[gxStart]; 1462 QDate dayStart = mSelectedDates[gxStart];
1457 QDate dayEnd = mSelectedDates[gxEnd]; 1463 QDate dayEnd = mSelectedDates[gxEnd];
1458 1464
1459 QTime timeStart = mAgenda->gyToTime(gyStart); 1465 QTime timeStart = mAgenda->gyToTime(gyStart);
1460 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); 1466 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 );
1461 1467
1462 QDateTime dtStart(dayStart,timeStart); 1468 QDateTime dtStart(dayStart,timeStart);
1463 QDateTime dtEnd(dayEnd,timeEnd); 1469 QDateTime dtEnd(dayEnd,timeEnd);
1464 1470
1465 mTimeSpanBegin = dtStart; 1471 mTimeSpanBegin = dtStart;
1466 mTimeSpanEnd = dtEnd; 1472 mTimeSpanEnd = dtEnd;
1467 1473
1468} 1474}
1469 1475
1470void KOAgendaView::deleteSelectedDateTime() 1476void KOAgendaView::deleteSelectedDateTime()
1471{ 1477{
1472 mTimeSpanBegin.setDate(QDate()); 1478 mTimeSpanBegin.setDate(QDate());
1473 mTimeSpanEnd.setDate(QDate()); 1479 mTimeSpanEnd.setDate(QDate());
1474 mTimeSpanInAllDay = false; 1480 mTimeSpanInAllDay = false;
1475} 1481}
1476 1482
1477void KOAgendaView::keyPressEvent ( QKeyEvent * e ) 1483void KOAgendaView::keyPressEvent ( QKeyEvent * e )
1478{ 1484{
1479 e->ignore(); 1485 e->ignore();
1480} 1486}
1481 1487
1482void KOAgendaView::scrollOneHourUp() 1488void KOAgendaView::scrollOneHourUp()
1483{ 1489{
1484 1490
1485 mAgenda->scrollBy ( 0, -mAgenda->contentsHeight () / 24 ); 1491 mAgenda->scrollBy ( 0, -mAgenda->contentsHeight () / 24 );
1486} 1492}
1487void KOAgendaView::scrollOneHourDown() 1493void KOAgendaView::scrollOneHourDown()
1488{ 1494{
1489 mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 ); 1495 mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 );
1490} 1496}
1491 1497
1492void KOAgendaView::setStartHour( int h ) 1498void KOAgendaView::setStartHour( int h )
1493{ 1499{
1494 mAgenda->setStartHour( h ); 1500 mAgenda->setStartHour( h );
1495 1501
1496} 1502}
1497 1503
1498void KOAgendaView::updateTodo( Todo * t, int ) 1504void KOAgendaView::updateTodo( Todo * t, int )
1499{ 1505{
1500 1506
1501 bool remove = false; 1507 bool remove = false;
1502 bool removeAD = false; 1508 bool removeAD = false;
1503 if ( ! t->hasDueDate() ) { 1509 if ( ! t->hasDueDate() ) {
1504 remove = true; 1510 remove = true;
1505 removeAD = true; 1511 removeAD = true;
1506 } 1512 }
1507 else { 1513 else {
1508 bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ; 1514 bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
1509 if ( overdue && 1515 if ( overdue &&
1510 QDate::currentDate() >= mSelectedDates.first() && 1516 QDate::currentDate() >= mSelectedDates.first() &&
1511 QDate::currentDate() <= mSelectedDates.last()) { 1517 QDate::currentDate() <= mSelectedDates.last()) {
1512 removeAD = false; 1518 removeAD = false;
1513 remove = true; 1519 remove = true;
1514 } 1520 }
1515 else { 1521 else {
1516 if ( t->dtDue().date() < mSelectedDates.first() || 1522 if ( t->dtDue().date() < mSelectedDates.first() ||
1517 t->dtDue().date() > mSelectedDates.last() ) { 1523 t->dtDue().date() > mSelectedDates.last() ) {
1518 remove = true; 1524 remove = true;
1519 removeAD = true; 1525 removeAD = true;
1520 } else { 1526 } else {
1521 remove = t->doesFloat(); 1527 remove = t->doesFloat();
1522 removeAD = !remove; 1528 removeAD = !remove;
1523 } 1529 }
1524 } 1530 }
1525 } 1531 }
1526 int days = mSelectedDates.first().daysTo( t->dtDue().date() ); 1532 int days = mSelectedDates.first().daysTo( t->dtDue().date() );
1527 // qDebug("daysto %d ", days ); 1533 // qDebug("daysto %d ", days );
1528 mAgenda->updateTodo( t , days, remove); 1534 mAgenda->updateTodo( t , days, remove);
1529 if ( KOPrefs::instance()->mShowTodoInAgenda ) 1535 if ( KOPrefs::instance()->mShowTodoInAgenda )
1530 mAllDayAgenda->updateTodo( t , days, removeAD); 1536 mAllDayAgenda->updateTodo( t , days, removeAD);
1531 //qDebug("KOAgendaView::updateTodo( Todo *, int ) "); 1537 //qDebug("KOAgendaView::updateTodo( Todo *, int ) ");
1532 1538
1533} 1539}
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 2f0fa9e..36a2947 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -1,599 +1,604 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qcstring.h> 20#include <qcstring.h>
21#include <qwhatsthis.h> 21#include <qwhatsthis.h>
22#include <qdialog.h> 22#include <qdialog.h>
23#include <qapplication.h> 23#include <qapplication.h>
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qlayout.h> 25#include <qlayout.h>
26 26
27#include <klocale.h> 27#include <klocale.h>
28#include <kapplication.h> 28#include <kapplication.h>
29#include <libkcal/event.h> 29#include <libkcal/event.h>
30#include <libkcal/todo.h> 30#include <libkcal/todo.h>
31#include <kdebug.h> 31#include <kdebug.h>
32#include <kiconloader.h> 32#include <kiconloader.h>
33#include <krun.h> 33#include <krun.h>
34#include <kglobal.h> 34#include <kglobal.h>
35#include <kprocess.h> 35#include <kprocess.h>
36#include "koprefs.h" 36#include "koprefs.h"
37 37
38#include <kabc/stdaddressbook.h> 38#include <kabc/stdaddressbook.h>
39 39
40#ifndef KORG_NODCOP 40#ifndef KORG_NODCOP
41#include <dcopclient.h> 41#include <dcopclient.h>
42#include "korganizer.h" 42#include "korganizer.h"
43#include "koprefs.h" 43#include "koprefs.h"
44#include "actionmanager.h" 44#include "actionmanager.h"
45#endif 45#endif
46 46
47#include "koeventviewer.h" 47#include "koeventviewer.h"
48//#ifndef KORG_NOKABC 48//#ifndef KORG_NOKABC
49//#include <kabc/stdaddressbook.h> 49//#include <kabc/stdaddressbook.h>
50//#define size count 50//#define size count
51//#endif 51//#endif
52 52
53#ifdef DESKTOP_VERSION 53#ifdef DESKTOP_VERSION
54#include <kabc/addresseedialog.h> 54#include <kabc/addresseedialog.h>
55#include <kabc/addresseeview.h> 55#include <kabc/addresseeview.h>
56#else //DESKTOP_VERSION 56#else //DESKTOP_VERSION
57#include <externalapphandler.h> 57#include <externalapphandler.h>
58#include <qtopia/qcopenvelope_qws.h> 58#include <qtopia/qcopenvelope_qws.h>
59#endif //DESKTOP_VERSION 59#endif //DESKTOP_VERSION
60 60
61KOEventViewer::KOEventViewer(QWidget *parent,const char *name) 61KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
62 : QTextBrowser(parent,name) 62 : QTextBrowser(parent,name)
63{ 63{
64 mSyncMode = false; 64 mSyncMode = false;
65 mColorMode = 0; 65 mColorMode = 0;
66} 66}
67 67
68KOEventViewer::~KOEventViewer() 68KOEventViewer::~KOEventViewer()
69{ 69{
70} 70}
71 71
72void KOEventViewer::setSource(const QString& n) 72void KOEventViewer::setSource(const QString& n)
73{ 73{
74 74
75 if ( n.left(3) == "uid" ) 75 if ( n.left(3) == "uid" )
76#ifdef DESKTOP_VERSION 76#ifdef DESKTOP_VERSION
77 { 77 {
78 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 78 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
79 KABC::AddressBook::Iterator it; 79 KABC::AddressBook::Iterator it;
80 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 80 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
81 // LR I do not understand, why the uid string is different on zaurus and desktop 81 // LR I do not understand, why the uid string is different on zaurus and desktop
82 QString uid = "uid://"+(*it).uid(); 82 QString uid = "uid://"+(*it).uid();
83 83
84 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); 84 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
85 if (n == uid ) { 85 if (n == uid ) {
86 //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); 86 //qDebug("found %s ",(*it).mobileHomePhone().latin1() );
87 QDialog dia( this,"dia123", true ); 87 QDialog dia( this,"dia123", true );
88 dia.setCaption( i18n("Details of attendee") ); 88 dia.setCaption( i18n("Details of attendee") );
89 QVBoxLayout lay ( &dia ); 89 QVBoxLayout lay ( &dia );
90 KABC::AddresseeView av ( &dia ); 90 KABC::AddresseeView av ( &dia );
91 av.setAddressee( (*it) ); 91 av.setAddressee( (*it) );
92 lay.addWidget( &av ); 92 lay.addWidget( &av );
93 if ( QApplication::desktop()->width() < 480 ) 93 if ( QApplication::desktop()->width() < 480 )
94 dia.resize( 220, 240); 94 dia.resize( 220, 240);
95 else { 95 else {
96 dia.resize( 400,400); 96 dia.resize( 400,400);
97 } 97 }
98 dia.exec(); 98 dia.exec();
99 break; 99 break;
100 } 100 }
101 } 101 }
102 return; 102 return;
103 } 103 }
104#else 104#else
105 { 105 {
106 if ( "uid:organizer" == n ) { 106 if ( "uid:organizer" == n ) {
107 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); 107 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
108 return; 108 return;
109 } 109 }
110 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 110 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
111 if (attendees.count()) { 111 if (attendees.count()) {
112 Attendee *a; 112 Attendee *a;
113 for(a=attendees.first();a;a=attendees.next()) { 113 for(a=attendees.first();a;a=attendees.next()) {
114 if ( "uid:"+a->uid() == n ) { 114 if ( "uid:"+a->uid() == n ) {
115 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); 115 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
116 return; 116 return;
117 } 117 }
118 } 118 }
119 } 119 }
120 return; 120 return;
121 } 121 }
122 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 122 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
123 // the result should now arrive through method insertAttendees 123 // the result should now arrive through method insertAttendees
124 //QString uid = "uid:"+(*it).uid(); 124 //QString uid = "uid:"+(*it).uid();
125#endif 125#endif
126 if ( n.left(6) == "mailto" ) { 126 if ( n.left(6) == "mailto" ) {
127 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); 127 // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1());
128#ifndef DESKTOP_VERSION 128#ifndef DESKTOP_VERSION
129 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); 129 QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" );
130 e << n.mid(7); 130 e << n.mid(7);
131#endif 131#endif
132 132
133 } 133 }
134 134
135 135
136#ifndef KORG_NODCOP 136#ifndef KORG_NODCOP
137 kdDebug() << "KOEventViewer::setSource(): " << n << endl; 137 kdDebug() << "KOEventViewer::setSource(): " << n << endl;
138 QString tmpStr; 138 QString tmpStr;
139 if (n.startsWith("mailto:")) { 139 if (n.startsWith("mailto:")) {
140 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); 140 KApplication::kApplication()->invokeMailer(n.mid(7),QString::null);
141 //emit showIncidence(n); 141 //emit showIncidence(n);
142 return; 142 return;
143 } else if (n.startsWith("uid:")) { 143 } else if (n.startsWith("uid:")) {
144 DCOPClient *client = KApplication::kApplication()->dcopClient(); 144 DCOPClient *client = KApplication::kApplication()->dcopClient();
145 const QByteArray noParamData; 145 const QByteArray noParamData;
146 const QByteArray paramData; 146 const QByteArray paramData;
147 QByteArray replyData; 147 QByteArray replyData;
148 QCString replyTypeStr; 148 QCString replyTypeStr;
149#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) 149#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
150 bool foundAbbrowser = PING_ABBROWSER; 150 bool foundAbbrowser = PING_ABBROWSER;
151 151
152 if (foundAbbrowser) { 152 if (foundAbbrowser) {
153 //KAddressbook is already running, so just DCOP to it to bring up the contact editor 153 //KAddressbook is already running, so just DCOP to it to bring up the contact editor
154 //client->send("kaddressbook","KAddressBookIface", 154 //client->send("kaddressbook","KAddressBookIface",
155 QDataStream arg(paramData, IO_WriteOnly); 155 QDataStream arg(paramData, IO_WriteOnly);
156 arg << n.mid(6); 156 arg << n.mid(6);
157 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); 157 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
158 return; 158 return;
159 } else { 159 } else {
160 /* 160 /*
161 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. 161 KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater.
162 We start it without its main interface 162 We start it without its main interface
163 */ 163 */
164 KIconLoader* iconLoader = new KIconLoader(); 164 KIconLoader* iconLoader = new KIconLoader();
165 QString iconPath = iconLoader->iconPath("go",KIcon::Small); 165 QString iconPath = iconLoader->iconPath("go",KIcon::Small);
166 ActionManager::setStartedKAddressBook(true); 166 ActionManager::setStartedKAddressBook(true);
167 tmpStr = "kaddressbook --editor-only --uid "; 167 tmpStr = "kaddressbook --editor-only --uid ";
168 tmpStr += KProcess::quote(n.mid(6)); 168 tmpStr += KProcess::quote(n.mid(6));
169 KRun::runCommand(tmpStr,"KAddressBook",iconPath); 169 KRun::runCommand(tmpStr,"KAddressBook",iconPath);
170 return; 170 return;
171 } 171 }
172 } else { 172 } else {
173 //QTextBrowser::setSource(n); 173 //QTextBrowser::setSource(n);
174 } 174 }
175#endif 175#endif
176} 176}
177 177
178void KOEventViewer::addTag(const QString & tag,const QString & text) 178void KOEventViewer::addTag(const QString & tag,const QString & text)
179{ 179{
180 int number=text.contains("\n"); 180 int number=text.contains("\n");
181 QString str = "<" + tag + ">"; 181 QString str = "<" + tag + ">";
182 QString tmpText=text; 182 QString tmpText=text;
183 QString tmpStr=str; 183 QString tmpStr=str;
184 if(number !=-1) 184 if(number !=-1)
185 { 185 {
186 if (number > 0) { 186 if (number > 0) {
187 int pos=0; 187 int pos=0;
188 QString tmp; 188 QString tmp;
189 for(int i=0;i<=number;i++) { 189 for(int i=0;i<=number;i++) {
190 pos=tmpText.find("\n"); 190 pos=tmpText.find("\n");
191 tmp=tmpText.left(pos); 191 tmp=tmpText.left(pos);
192 tmpText=tmpText.right(tmpText.length()-pos-1); 192 tmpText=tmpText.right(tmpText.length()-pos-1);
193 tmpStr+=tmp+"<br>"; 193 tmpStr+=tmp+"<br>";
194 } 194 }
195 } 195 }
196 else tmpStr += tmpText; 196 else tmpStr += tmpText;
197 tmpStr+="</" + tag + ">"; 197 tmpStr+="</" + tag + ">";
198 mText.append(tmpStr); 198 mText.append(tmpStr);
199 } 199 }
200 else 200 else
201 { 201 {
202 str += text + "</" + tag + ">"; 202 str += text + "</" + tag + ">";
203 mText.append(str); 203 mText.append(str);
204 } 204 }
205} 205}
206 206
207void KOEventViewer::setColorMode( int m ) 207void KOEventViewer::setColorMode( int m )
208{ 208{
209 mColorMode = m; 209 mColorMode = m;
210} 210}
211void KOEventViewer::appendEvent(Event *event, int mode ) 211void KOEventViewer::appendEvent(Event *event, int mode )
212{ 212{
213 mMailSubject = ""; 213 mMailSubject = "";
214 mCurrentIncidence = event; 214 mCurrentIncidence = event;
215 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 215 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
216 topLevelWidget()->setCaption(i18n("Event Viewer")); 216 topLevelWidget()->setCaption(i18n("Event Viewer"));
217 if ( mode == 0 ) { 217 if ( mode == 0 ) {
218 addTag("h2",event->summary()); 218 addTag("h2",event->summary());
219 } 219 }
220 else { 220 else {
221 if ( mColorMode == 1 ) { 221 if ( mColorMode == 1 ) {
222 mText +="<font color=\"#00A000\">"; 222 mText +="<font color=\"#00A000\">";
223 } 223 }
224 if ( mColorMode == 2 ) { 224 if ( mColorMode == 2 ) {
225 mText +="<font color=\"#C00000\">"; 225 mText +="<font color=\"#C00000\">";
226 } 226 }
227 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; 227 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
228 if ( mode == 1 ) { 228 if ( mode == 1 ) {
229 addTag("h2",i18n( "Local: " ) +event->summary()); 229 addTag("h2",i18n( "Local: " ) +event->summary());
230 } else { 230 } else {
231 addTag("h2",i18n( "Remote: " ) +event->summary()); 231 addTag("h2",i18n( "Remote: " ) +event->summary());
232 } 232 }
233 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 233 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
234 if ( mColorMode ) 234 if ( mColorMode )
235 mText += "</font>"; 235 mText += "</font>";
236 } 236 }
237 mMailSubject += i18n( "Meeting " )+ event->summary(); 237 mMailSubject += i18n( "Meeting " )+ event->summary();
238 if (event->cancelled ()) { 238 if (event->cancelled ()) {
239 mText +="<font color=\"#B00000\">"; 239 mText +="<font color=\"#B00000\">";
240 addTag("i",i18n("This event has been cancelled!")); 240 addTag("i",i18n("This event has been cancelled!"));
241 mText.append("<br>"); 241 mText.append("<br>");
242 mText += "</font>"; 242 mText += "</font>";
243 mMailSubject += i18n("(cancelled)"); 243 mMailSubject += i18n("(cancelled)");
244 } 244 }
245 if (!event->location().isEmpty()) { 245 if (!event->location().isEmpty()) {
246 addTag("b",i18n("Location: ")); 246 addTag("b",i18n("Location: "));
247 mText.append(event->location()+"<br>"); 247 mText.append(event->location()+"<br>");
248 mMailSubject += i18n(" at ") + event->location(); 248 mMailSubject += i18n(" at ") + event->location();
249 } 249 }
250 if (event->doesFloat()) { 250 if (event->doesFloat()) {
251 if (event->isMultiDay()) { 251 if (event->isMultiDay()) {
252 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") 252 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>")
253 .arg(event->dtStartDateStr(shortDate)) 253 .arg(event->dtStartDateStr(shortDate))
254 .arg(event->dtEndDateStr(shortDate))); 254 .arg(event->dtEndDateStr(shortDate)));
255 } else { 255 } else {
256 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); 256 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate )));
257 } 257 }
258 } else { 258 } else {
259 if (event->isMultiDay()) { 259 if (event->isMultiDay()) {
260 mText.append(i18n("<p><b>From:</b> %1</p> ") 260 mText.append(i18n("<p><b>From:</b> %1</p> ")
261 .arg(event->dtStartStr( shortDate))); 261 .arg(event->dtStartStr( shortDate)));
262 mText.append(i18n("<p><b>To:</b> %1</p>") 262 mText.append(i18n("<p><b>To:</b> %1</p>")
263 .arg(event->dtEndStr(shortDate))); 263 .arg(event->dtEndStr(shortDate)));
264 } else { 264 } else {
265 mText.append(i18n("<p><b>On:</b> %1</p> ") 265 mText.append(i18n("<p><b>On:</b> %1</p> ")
266 .arg(event->dtStartDateStr( shortDate ))); 266 .arg(event->dtStartDateStr( shortDate )));
267 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") 267 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>")
268 .arg(event->dtStartTimeStr()) 268 .arg(event->dtStartTimeStr())
269 .arg(event->dtEndTimeStr())); 269 .arg(event->dtEndTimeStr()));
270 } 270 }
271 } 271 }
272 272
273 if (event->recurrence()->doesRecur()) { 273 if (event->recurrence()->doesRecur()) {
274 274
275 QString recurText = event->recurrence()->recurrenceText(); 275 QString recurText = event->recurrence()->recurrenceText();
276 addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); 276 addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>");
277 bool last; 277 bool last;
278 QDate start = QDate::currentDate(); 278 QDate start = QDate::currentDate();
279 QDate next; 279 QDate next;
280 next = event->recurrence()->getPreviousDate( start , &last ); 280 next = event->recurrence()->getPreviousDate( start , &last );
281 if ( !last ) { 281 if ( !last ) {
282 next = event->recurrence()->getNextDate( start.addDays( - 1 ) ); 282 next = event->recurrence()->getNextDate( start.addDays( - 1 ) );
283 addTag("p",i18n("<b>Next recurrence is on:</b>") ); 283 addTag("p",i18n("<b>Next recurrence is on:</b>") );
284 addTag("p", KGlobal::locale()->formatDate( next, shortDate )); 284 addTag("p", KGlobal::locale()->formatDate( next, shortDate ));
285 QDateTime nextdt = QDateTime( next, event->dtStart().time()); 285 QDateTime nextdt = QDateTime( next, event->dtStart().time());
286 mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( nextdt, true ); 286 mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( nextdt, true );
287 287
288 } else { 288 } else {
289 addTag("p",i18n("<b>Last recurrence was on:</b>") ); 289 addTag("p",i18n("<b>Last recurrence was on:</b>") );
290 addTag("p", KGlobal::locale()->formatDate( next, shortDate )); 290 addTag("p", KGlobal::locale()->formatDate( next, shortDate ));
291 } 291 }
292 } else { 292 } else {
293 mMailSubject += i18n(" - " )+event->dtStartStr( true ); 293 mMailSubject += i18n(" - " )+event->dtStartStr( true );
294 294
295 } 295 }
296 296
297 297
298 if (event->isAlarmEnabled()) { 298 if (event->isAlarmEnabled()) {
299 Alarm *alarm =event->alarms().first() ; 299 Alarm *alarm =event->alarms().first() ;
300 QDateTime t = alarm->time(); 300 QDateTime t = alarm->time();
301 int min = t.secsTo( event->dtStart() )/60; 301 int min = t.secsTo( event->dtStart() )/60;
302 QString s =i18n("( %1 min before )").arg( min ); 302 QString s =i18n("( %1 min before )").arg( min );
303 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 303 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
304 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 304 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
305 //addTag("p",s); 305 //addTag("p",s);
306 } 306 }
307 307
308 addTag("b",i18n("Access: ")); 308 addTag("b",i18n("Access: "));
309 mText.append(event->secrecyStr()+"<br>"); 309 mText.append(event->secrecyStr()+"<br>");
310 if (!event->description().isEmpty()) { 310 if (!event->description().isEmpty()) {
311 addTag("p",i18n("<b>Details: </b>")); 311 addTag("p",i18n("<b>Details: </b>"));
312 addTag("p",event->description()); 312 addTag("p",event->description());
313 } 313 }
314 314
315 formatCategories(event); 315 formatCategories(event);
316 316
317 formatReadOnly(event); 317 formatReadOnly(event);
318 formatAttendees(event); 318 formatAttendees(event);
319 319
320 setText(mText); 320 setText(mText);
321 //QWhatsThis::add(this,mText); 321 //QWhatsThis::add(this,mText);
322 322
323} 323}
324 324
325void KOEventViewer::appendTodo(Todo *event, int mode ) 325void KOEventViewer::appendTodo(Todo *event, int mode )
326{ 326{
327 mMailSubject = ""; 327 mMailSubject = "";
328 mCurrentIncidence = event; 328 mCurrentIncidence = event;
329 topLevelWidget()->setCaption(i18n("Todo Viewer")); 329 topLevelWidget()->setCaption(i18n("Todo Viewer"));
330 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 330 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
331 if (mode == 0 ) 331 if (mode == 0 )
332 addTag("h2",event->summary()); 332 addTag("h2",event->summary());
333 else { 333 else {
334 if ( mColorMode == 1 ) { 334 if ( mColorMode == 1 ) {
335 mText +="<font color=\"#00A000\">"; 335 mText +="<font color=\"#00A000\">";
336 } 336 }
337 if ( mColorMode == 2 ) { 337 if ( mColorMode == 2 ) {
338 mText +="<font color=\"#B00000\">"; 338 mText +="<font color=\"#B00000\">";
339 } 339 }
340 if ( mode == 1 ) { 340 if ( mode == 1 ) {
341 addTag("h2",i18n( "Local: " ) +event->summary()); 341 addTag("h2",i18n( "Local: " ) +event->summary());
342 } else { 342 } else {
343 addTag("h2",i18n( "Remote: " ) +event->summary()); 343 addTag("h2",i18n( "Remote: " ) +event->summary());
344 } 344 }
345 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 345 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
346 if ( mColorMode ) 346 if ( mColorMode )
347 mText += "</font>"; 347 mText += "</font>";
348 } 348 }
349 mMailSubject += i18n( "Todo " )+ event->summary(); 349 mMailSubject += i18n( "Todo " )+ event->summary();
350 if (event->cancelled ()) { 350 if (event->cancelled ()) {
351 mText +="<font color=\"#B00000\">"; 351 mText +="<font color=\"#B00000\">";
352 addTag("i",i18n("This todo has been cancelled!")); 352 addTag("i",i18n("This todo has been cancelled!"));
353 mText.append("<br>"); 353 mText.append("<br>");
354 mText += "</font>"; 354 mText += "</font>";
355 mMailSubject += i18n("(cancelled)"); 355 mMailSubject += i18n("(cancelled)");
356 } 356 }
357 357
358 if (!event->location().isEmpty()) { 358 if (!event->location().isEmpty()) {
359 addTag("b",i18n("Location: ")); 359 addTag("b",i18n("Location: "));
360 mText.append(event->location()+"<br>"); 360 mText.append(event->location()+"<br>");
361 mMailSubject += i18n(" at ") + event->location(); 361 mMailSubject += i18n(" at ") + event->location();
362 } 362 }
363 if (event->hasStartDate()) { 363 if (event->hasStartDate()) {
364 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); 364 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer)));
365 } 365 }
366 if (event->hasDueDate()) { 366 if (event->hasDueDate()) {
367 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); 367 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer)));
368 mMailSubject += i18n(" - " )+event->dtDueStr( true ); 368 mMailSubject += i18n(" - " )+event->dtDueStr( true );
369 } 369 }
370 addTag("b",i18n("Access: ")); 370 addTag("b",i18n("Access: "));
371 mText.append(event->secrecyStr()+"<br>"); 371 mText.append(event->secrecyStr()+"<br>");
372 if (!event->description().isEmpty()) { 372 if (!event->description().isEmpty()) {
373 addTag("p",i18n("<b>Details: </b>")); 373 addTag("p",i18n("<b>Details: </b>"));
374 addTag("p",event->description()); 374 addTag("p",event->description());
375 } 375 }
376 376
377 formatCategories(event); 377 formatCategories(event);
378 378
379 mText.append(i18n("<p><b>Priority:</b> %2</p>") 379 mText.append(i18n("<p><b>Priority:</b> %2</p>")
380 .arg(QString::number(event->priority()))); 380 .arg(QString::number(event->priority())));
381 381
382 if ( event->percentComplete() == 100 && event->hasCompletedDate() ) {
383 mText.append(i18n("<p><i>Completed on %1</i></p>")
384 .arg( event->completedStr() ));
385 } else {
382 mText.append(i18n("<p><i>%1 % completed</i></p>") 386 mText.append(i18n("<p><i>%1 % completed</i></p>")
383 .arg(event->percentComplete())); 387 .arg(event->percentComplete()));
388 }
384 389
385 formatReadOnly(event); 390 formatReadOnly(event);
386 formatAttendees(event); 391 formatAttendees(event);
387 if ( event->relatedTo() ) { 392 if ( event->relatedTo() ) {
388 addTag("b",i18n("Parent todo: ")); 393 addTag("b",i18n("Parent todo: "));
389 mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); 394 mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>");
390 } 395 }
391 QPtrList<Incidence> Relations = event->relations(); 396 QPtrList<Incidence> Relations = event->relations();
392 Incidence *to; 397 Incidence *to;
393 if ( Relations.first() ) 398 if ( Relations.first() )
394 addTag("b",i18n("Sub todos:<br>")); 399 addTag("b",i18n("Sub todos:<br>"));
395 for (to=Relations.first();to;to=Relations.next()) { 400 for (to=Relations.first();to;to=Relations.next()) {
396 mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); 401 mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>");
397 402
398 } 403 }
399 setText(mText); 404 setText(mText);
400} 405}
401 406
402void KOEventViewer::formatCategories(Incidence *event) 407void KOEventViewer::formatCategories(Incidence *event)
403{ 408{
404 if (!event->categoriesStr().isEmpty()) { 409 if (!event->categoriesStr().isEmpty()) {
405 if (event->categories().count() == 1) { 410 if (event->categories().count() == 1) {
406 addTag("h3",i18n("Category")); 411 addTag("h3",i18n("Category"));
407 } else { 412 } else {
408 addTag("h3",i18n("Categories")); 413 addTag("h3",i18n("Categories"));
409 } 414 }
410 addTag("p",event->categoriesStr()); 415 addTag("p",event->categoriesStr());
411 } 416 }
412} 417}
413void KOEventViewer::formatAttendees(Incidence *event) 418void KOEventViewer::formatAttendees(Incidence *event)
414{ 419{
415 QPtrList<Attendee> attendees = event->attendees(); 420 QPtrList<Attendee> attendees = event->attendees();
416 if (attendees.count()) { 421 if (attendees.count()) {
417 422
418 423
419 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); 424 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
420 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); 425 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
421 addTag("h3",i18n("Organizer")); 426 addTag("h3",i18n("Organizer"));
422 mText.append("<ul><li>"); 427 mText.append("<ul><li>");
423#ifndef KORG_NOKABC 428#ifndef KORG_NOKABC
424 429
425#ifdef DESKTOP_VERSION 430#ifdef DESKTOP_VERSION
426 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 431 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
427 KABC::Addressee::List addressList; 432 KABC::Addressee::List addressList;
428 addressList = add_book->findByEmail(event->organizer()); 433 addressList = add_book->findByEmail(event->organizer());
429 KABC::Addressee o = addressList.first(); 434 KABC::Addressee o = addressList.first();
430 if (!o.isEmpty() && addressList.size()<2) { 435 if (!o.isEmpty() && addressList.size()<2) {
431 mText += "<a href=\"uid:" + o.uid() + "\">"; 436 mText += "<a href=\"uid:" + o.uid() + "\">";
432 mText += o.formattedName(); 437 mText += o.formattedName();
433 mText += "</a>\n"; 438 mText += "</a>\n";
434 } else { 439 } else {
435 mText.append(event->organizer()); 440 mText.append(event->organizer());
436 } 441 }
437#else //DESKTOP_VERSION 442#else //DESKTOP_VERSION
438 mText += "<a href=\"uid:organizer\">"; 443 mText += "<a href=\"uid:organizer\">";
439 mText += event->organizer(); 444 mText += event->organizer();
440 mText += "</a>\n"; 445 mText += "</a>\n";
441#endif //DESKTOP_VERSION 446#endif //DESKTOP_VERSION
442 447
443 448
444#else 449#else
445 mText.append(event->organizer()); 450 mText.append(event->organizer());
446#endif 451#endif
447 452
448 if (iconPath) { 453 if (iconPath) {
449 mText += " <a href=\"mailto:" + event->organizer() + "\">"; 454 mText += " <a href=\"mailto:" + event->organizer() + "\">";
450 mText += "<IMG src=\"" + iconPath + "\">"; 455 mText += "<IMG src=\"" + iconPath + "\">";
451 mText += "</a>\n"; 456 mText += "</a>\n";
452 } 457 }
453 mText.append("</li></ul>"); 458 mText.append("</li></ul>");
454 459
455 addTag("h3",i18n("Attendees")); 460 addTag("h3",i18n("Attendees"));
456 Attendee *a; 461 Attendee *a;
457 mText.append("<ul>"); 462 mText.append("<ul>");
458 for(a=attendees.first();a;a=attendees.next()) { 463 for(a=attendees.first();a;a=attendees.next()) {
459#ifndef KORG_NOKABC 464#ifndef KORG_NOKABC
460#ifdef DESKTOP_VERSION 465#ifdef DESKTOP_VERSION
461 if (a->name().isEmpty()) { 466 if (a->name().isEmpty()) {
462 addressList = add_book->findByEmail(a->email()); 467 addressList = add_book->findByEmail(a->email());
463 KABC::Addressee o = addressList.first(); 468 KABC::Addressee o = addressList.first();
464 if (!o.isEmpty() && addressList.size()<2) { 469 if (!o.isEmpty() && addressList.size()<2) {
465 mText += "<a href=\"uid:" + o.uid() + "\">"; 470 mText += "<a href=\"uid:" + o.uid() + "\">";
466 mText += o.formattedName(); 471 mText += o.formattedName();
467 mText += "</a>\n"; 472 mText += "</a>\n";
468 } else { 473 } else {
469 mText += "<li>"; 474 mText += "<li>";
470 mText.append(a->email()); 475 mText.append(a->email());
471 mText += "\n"; 476 mText += "\n";
472 } 477 }
473 } else { 478 } else {
474 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 479 mText += "<li><a href=\"uid:" + a->uid() + "\">";
475 if (!a->name().isEmpty()) mText += a->name(); 480 if (!a->name().isEmpty()) mText += a->name();
476 else mText += a->email(); 481 else mText += a->email();
477 mText += "</a>\n"; 482 mText += "</a>\n";
478 } 483 }
479#else //DESKTOP_VERSION 484#else //DESKTOP_VERSION
480 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 485 mText += "<li><a href=\"uid:" + a->uid() + "\">";
481 if (!a->name().isEmpty()) mText += a->name(); 486 if (!a->name().isEmpty()) mText += a->name();
482 else mText += a->email(); 487 else mText += a->email();
483 mText += "</a>\n"; 488 mText += "</a>\n";
484#endif //DESKTOP_VERSION 489#endif //DESKTOP_VERSION
485#else 490#else
486 //qDebug("nokabc "); 491 //qDebug("nokabc ");
487 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 492 mText += "<li><a href=\"uid:" + a->uid() + "\">";
488 if (!a->name().isEmpty()) mText += a->name(); 493 if (!a->name().isEmpty()) mText += a->name();
489 else mText += a->email(); 494 else mText += a->email();
490 mText += "</a>\n"; 495 mText += "</a>\n";
491#endif 496#endif
492 497
493 498
494 if (!a->email().isEmpty()) { 499 if (!a->email().isEmpty()) {
495 if (iconPath) { 500 if (iconPath) {
496 mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; 501 mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">";
497 if ( a->RSVP() ) 502 if ( a->RSVP() )
498 mText += "<IMG src=\"" + iconPath + "\">"; 503 mText += "<IMG src=\"" + iconPath + "\">";
499 else 504 else
500 mText += "<IMG src=\"" + NOiconPath + "\">"; 505 mText += "<IMG src=\"" + NOiconPath + "\">";
501 mText += "</a>\n"; 506 mText += "</a>\n";
502 } 507 }
503 } 508 }
504 if (a->status() != Attendee::NeedsAction ) 509 if (a->status() != Attendee::NeedsAction )
505 mText +="[" + a->statusStr() + "] "; 510 mText +="[" + a->statusStr() + "] ";
506 if (a->role() == Attendee::Chair ) 511 if (a->role() == Attendee::Chair )
507 mText +="(" + a->roleStr().left(1) + ".)"; 512 mText +="(" + a->roleStr().left(1) + ".)";
508 } 513 }
509 mText.append("</li></ul>"); 514 mText.append("</li></ul>");
510 } 515 }
511 516
512} 517}
513void KOEventViewer::appendJournal(Journal *jour, int mode ) 518void KOEventViewer::appendJournal(Journal *jour, int mode )
514{ 519{
515 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 520 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
516 if (mode == 0 ) { 521 if (mode == 0 ) {
517 addTag("h2",i18n("Journal from: ")); 522 addTag("h2",i18n("Journal from: "));
518 } 523 }
519 else { 524 else {
520 if ( mode == 1 ) { 525 if ( mode == 1 ) {
521 addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); 526 addTag("h2",i18n( "Local: " ) +i18n("Journal from: "));
522 } else { 527 } else {
523 addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); 528 addTag("h2",i18n( "Remote: " ) +i18n("Journal from: "));
524 } 529 }
525 } 530 }
526 topLevelWidget()->setCaption("Journal Viewer"); 531 topLevelWidget()->setCaption("Journal Viewer");
527 mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); 532 mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer)));
528 addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); 533 addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) );
529 if (!jour->description().isEmpty()) { 534 if (!jour->description().isEmpty()) {
530 addTag("p",jour->description()); 535 addTag("p",jour->description());
531 } 536 }
532 setText(mText); 537 setText(mText);
533} 538}
534 539
535void KOEventViewer::formatReadOnly(Incidence *event) 540void KOEventViewer::formatReadOnly(Incidence *event)
536{ 541{
537 if (event->isReadOnly()) { 542 if (event->isReadOnly()) {
538 addTag("p","<em>(" + i18n("read-only") + ")</em>"); 543 addTag("p","<em>(" + i18n("read-only") + ")</em>");
539 } 544 }
540} 545}
541void KOEventViewer::setSyncMode( bool b ) 546void KOEventViewer::setSyncMode( bool b )
542{ 547{
543 mSyncMode = b; 548 mSyncMode = b;
544} 549}
545 550
546 551
547void KOEventViewer::setTodo(Todo *event, bool clearV ) 552void KOEventViewer::setTodo(Todo *event, bool clearV )
548{ 553{
549 if ( clearV ) 554 if ( clearV )
550 clearEvents(); 555 clearEvents();
551 if ( mSyncMode ) { 556 if ( mSyncMode ) {
552 if ( clearV ) 557 if ( clearV )
553 appendTodo(event,1 ); 558 appendTodo(event,1 );
554 else 559 else
555 appendTodo(event,2); 560 appendTodo(event,2);
556 } else 561 } else
557 appendTodo(event); 562 appendTodo(event);
558} 563}
559void KOEventViewer::setJournal(Journal *event, bool clearV ) 564void KOEventViewer::setJournal(Journal *event, bool clearV )
560{ 565{
561 if ( clearV ) 566 if ( clearV )
562 clearEvents(); 567 clearEvents();
563 if ( mSyncMode ) { 568 if ( mSyncMode ) {
564 if ( clearV ) 569 if ( clearV )
565 appendJournal(event, 1); 570 appendJournal(event, 1);
566 else 571 else
567 appendJournal(event, 2); 572 appendJournal(event, 2);
568 } else 573 } else
569 appendJournal(event); 574 appendJournal(event);
570} 575}
571 576
572void KOEventViewer::setEvent(Event *event) 577void KOEventViewer::setEvent(Event *event)
573{ 578{
574 clearEvents(); 579 clearEvents();
575 if ( mSyncMode ) 580 if ( mSyncMode )
576 appendEvent(event, 1); 581 appendEvent(event, 1);
577 else 582 else
578 appendEvent(event); 583 appendEvent(event);
579} 584}
580 585
581void KOEventViewer::addEvent(Event *event) 586void KOEventViewer::addEvent(Event *event)
582{ 587{
583 if ( mSyncMode ) 588 if ( mSyncMode )
584 appendEvent(event, 2); 589 appendEvent(event, 2);
585 else 590 else
586 appendEvent(event); 591 appendEvent(event);
587} 592}
588 593
589void KOEventViewer::clearEvents(bool now) 594void KOEventViewer::clearEvents(bool now)
590{ 595{
591 mText = ""; 596 mText = "";
592 if (now) setText(mText); 597 if (now) setText(mText);
593} 598}
594 599
595void KOEventViewer::addText(QString text) 600void KOEventViewer::addText(QString text)
596{ 601{
597 mText.append(text); 602 mText.append(text);
598 setText(mText); 603 setText(mText);
599} 604}
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 3979ed2..f6f7258 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -1,259 +1,260 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <klocale.h> 20#include <klocale.h>
21 21
22#include <libkcal/event.h> 22#include <libkcal/event.h>
23#include <qpushbutton.h> 23#include <qpushbutton.h>
24 24
25#include "koeventviewer.h" 25#include "koeventviewer.h"
26#include "koprefs.h" 26#include "koprefs.h"
27#include <libkcal/todo.h> 27#include <libkcal/todo.h>
28#include "qapp.h" 28#include "qapp.h"
29 29
30#include "koeventviewerdialog.h" 30#include "koeventviewerdialog.h"
31extern int globalFlagBlockAgenda; 31extern int globalFlagBlockAgenda;
32 32
33KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) 33KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
34 : KDialogBase(parent,name, 34 : KDialogBase(parent,name,
35#ifndef DESKTOP_VERSION 35#ifndef DESKTOP_VERSION
36 true , 36 true ,
37#else 37#else
38 false, 38 false,
39#endif 39#endif
40 i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) 40 i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda"))
41{ 41{
42 42
43 mEventViewer = new KOEventViewer(this); 43 mEventViewer = new KOEventViewer(this);
44 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); 44 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont );
45 setMainWidget(mEventViewer); 45 setMainWidget(mEventViewer);
46 setButtonText(Ok, i18n("Edit") ); 46 setButtonText(Ok, i18n("Edit") );
47 47
48 QObject::connect(findButton( Ok ),SIGNAL(clicked()), 48 QObject::connect(findButton( Ok ),SIGNAL(clicked()),
49 SLOT(editIncidence())); 49 SLOT(editIncidence()));
50 QObject::connect(this,SIGNAL(user1Clicked()), 50 QObject::connect(this,SIGNAL(user1Clicked()),
51 SLOT(showIncidence())); 51 SLOT(showIncidence()));
52 mIncidence = 0; 52 mIncidence = 0;
53 // TODO: Set a sensible size (based on the content?). 53 // TODO: Set a sensible size (based on the content?).
54 //showMaximized(); 54 //showMaximized();
55 //qDebug("++++++++++++KOEventViewerDialog() "); 55 //qDebug("++++++++++++KOEventViewerDialog() ");
56 // if ( KOPrefs::instance()->mCompactDialogs ) { 56 // if ( KOPrefs::instance()->mCompactDialogs ) {
57// setFixedSize( 240,284 ); 57// setFixedSize( 240,284 );
58// move( 0, 15 ); 58// move( 0, 15 );
59// } else { 59// } else {
60// setMinimumSize(300,200); 60// setMinimumSize(300,200);
61// resize(320,300); 61// resize(320,300);
62// } 62// }
63 mSyncMode = false; 63 mSyncMode = false;
64 mSyncResult = 0; 64 mSyncResult = 0;
65 65
66} 66}
67 67
68KOEventViewerDialog::~KOEventViewerDialog() 68KOEventViewerDialog::~KOEventViewerDialog()
69{ 69{
70 //qDebug("-------~KOEventViewerDialog() "); 70 //qDebug("-------~KOEventViewerDialog() ");
71} 71}
72void KOEventViewerDialog::showMe() 72void KOEventViewerDialog::showMe()
73{ 73{
74 74
75#ifdef DESKTOP_VERSION 75#ifdef DESKTOP_VERSION
76 show(); 76 show();
77#else 77#else
78 showMaximized(); 78 showMaximized();
79#endif 79#endif
80 setFocus(); 80 setFocus();
81 setActiveWindow(); 81 setActiveWindow();
82 82
83} 83}
84void KOEventViewerDialog::setSyncMode( bool b ) 84void KOEventViewerDialog::setSyncMode( bool b )
85{ 85{
86 mSyncMode = b; 86 mSyncMode = b;
87 //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); 87 //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode );
88 if ( mSyncMode ) { 88 if ( mSyncMode ) {
89 findButton( Close )->setText( i18n("Cancel Sync")); 89 findButton( Close )->setText( i18n("Cancel Sync"));
90 findButton( Ok )->setText( i18n("Remote")); 90 findButton( Ok )->setText( i18n("Remote"));
91 findButton( User1 )->setText( i18n("Local")); 91 findButton( User1 )->setText( i18n("Local"));
92 } else { 92 } else {
93 findButton( Close )->setText( i18n("Close")); 93 findButton( Close )->setText( i18n("Close"));
94 findButton( Ok )->setText( i18n("Edit")); 94 findButton( Ok )->setText( i18n("Edit"));
95 findButton( User1 )->setText( i18n("Agenda")); 95 findButton( User1 )->setText( i18n("Agenda"));
96 } 96 }
97 mEventViewer->setSyncMode( b ); 97 mEventViewer->setSyncMode( b );
98} 98}
99void KOEventViewerDialog::setColorMode( int m ) 99void KOEventViewerDialog::setColorMode( int m )
100{ 100{
101 mEventViewer->setColorMode( m ); 101 mEventViewer->setColorMode( m );
102} 102}
103int KOEventViewerDialog::executeS( bool local ) 103int KOEventViewerDialog::executeS( bool local )
104{ 104{
105 mSyncResult = 3; 105 mSyncResult = 3;
106 if ( local ) 106 if ( local )
107 findButton( User1 )->setFocus(); 107 findButton( User1 )->setFocus();
108 else 108 else
109 findButton( Ok )->setFocus(); 109 findButton( Ok )->setFocus();
110 exec(); 110 exec();
111 return mSyncResult; 111 return mSyncResult;
112} 112}
113 113
114void KOEventViewerDialog::updateConfig() 114void KOEventViewerDialog::updateConfig()
115{ 115{
116 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); 116 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont );
117 117
118} 118}
119void KOEventViewerDialog::setEvent(Event *event) 119void KOEventViewerDialog::setEvent(Event *event)
120{ 120{
121 mEventViewer->setEvent(event); 121 mEventViewer->setEvent(event);
122 mIncidence = event; 122 mIncidence = event;
123 findButton( Close )->setFocus(); 123 findButton( Close )->setFocus();
124 if ( !mSyncMode ) { 124 if ( !mSyncMode ) {
125 findButton( User1 )->setText( i18n("Agenda")); 125 findButton( User1 )->setText( i18n("Agenda"));
126 } 126 }
127} 127}
128void KOEventViewerDialog::setIncidence(Incidence *in ) 128void KOEventViewerDialog::setIncidence(Incidence *in )
129{ 129{
130 if ( in->type() == "Event" ) 130 if ( in->type() == "Event" )
131 setEvent( (Event*) in ); 131 setEvent( (Event*) in );
132 else if ( in->type() =="Todo" ) 132 else if ( in->type() =="Todo" )
133 setTodo( (Todo*) in ); 133 setTodo( (Todo*) in );
134 else if ( in->type() =="Journal" ) 134 else if ( in->type() =="Journal" )
135 setJournal( (Journal*) in ); 135 setJournal( (Journal*) in );
136} 136}
137void KOEventViewerDialog::addIncidence(Incidence *in) 137void KOEventViewerDialog::addIncidence(Incidence *in)
138{ 138{
139 if ( in->type() == "Event" ) 139 if ( in->type() == "Event" )
140 addEvent( (Event*) in ); 140 addEvent( (Event*) in );
141 else if ( in->type() =="Todo" ) 141 else if ( in->type() =="Todo" )
142 mEventViewer->setTodo( (Todo*) in, false ); 142 mEventViewer->setTodo( (Todo*) in, false );
143 else if ( in->type() =="Journal" ) 143 else if ( in->type() =="Journal" )
144 mEventViewer->setJournal( (Journal*) in, false ); 144 mEventViewer->setJournal( (Journal*) in, false );
145 if ( mSyncMode ) { 145 if ( mSyncMode ) {
146 findButton( User1 )->setFocus(); 146 findButton( User1 )->setFocus();
147 setCaption(i18n("Conflict! Please choose entry")); 147 setCaption(i18n("Conflict! Please choose entry"));
148 } 148 }
149} 149}
150 150
151void KOEventViewerDialog::addEvent(Event *event) 151void KOEventViewerDialog::addEvent(Event *event)
152{ 152{
153 mEventViewer->addEvent(event); 153 mEventViewer->addEvent(event);
154 mIncidence = event; 154 mIncidence = event;
155 findButton( Close )->setFocus(); 155 findButton( Close )->setFocus();
156 if ( !mSyncMode ) { 156 if ( !mSyncMode ) {
157 findButton( User1 )->setText( i18n("Agenda")); 157 findButton( User1 )->setText( i18n("Agenda"));
158 } 158 }
159} 159}
160 160
161void KOEventViewerDialog::setTodo(Todo *event) 161void KOEventViewerDialog::setTodo(Todo *event)
162{ 162{
163 mEventViewer->setTodo(event); 163 mEventViewer->setTodo(event);
164 mIncidence = (Incidence*)event; 164 mIncidence = (Incidence*)event;
165 findButton( Close )->setFocus(); 165 findButton( Close )->setFocus();
166 if ( !mSyncMode ) { 166 if ( !mSyncMode ) {
167 findButton( User1 )->setText( i18n("Set complete")); 167 findButton( User1 )->setText( i18n("Set complete"));
168 } 168 }
169} 169}
170void KOEventViewerDialog::setJournal(Journal *j) 170void KOEventViewerDialog::setJournal(Journal *j)
171{ 171{
172 mEventViewer->setJournal(j); 172 mEventViewer->setJournal(j);
173 mIncidence = (Incidence*)j; 173 mIncidence = (Incidence*)j;
174 findButton( Close )->setFocus(); 174 findButton( Close )->setFocus();
175 if ( !mSyncMode ) { 175 if ( !mSyncMode ) {
176 findButton( User1 )->setText( i18n("Agenda")); 176 findButton( User1 )->setText( i18n("Agenda"));
177 } 177 }
178} 178}
179 179
180void KOEventViewerDialog::addText(QString text) 180void KOEventViewerDialog::addText(QString text)
181{ 181{
182 mEventViewer->addText(text); 182 mEventViewer->addText(text);
183 findButton( Close )->setFocus(); 183 findButton( Close )->setFocus();
184} 184}
185void KOEventViewerDialog::editIncidence() 185void KOEventViewerDialog::editIncidence()
186{ 186{
187 if ( mSyncMode ) { 187 if ( mSyncMode ) {
188 mSyncResult = 2; 188 mSyncResult = 2;
189 accept(); 189 accept();
190 return; 190 return;
191 } 191 }
192 if ( mIncidence ){ 192 if ( mIncidence ){
193#ifndef DESKTOP_VERSION 193#ifndef DESKTOP_VERSION
194 hide(); 194 hide();
195#endif 195#endif
196 emit editIncidence( mIncidence ); 196 emit editIncidence( mIncidence );
197 } 197 }
198} 198}
199void KOEventViewerDialog::showIncidence() 199void KOEventViewerDialog::showIncidence()
200{ 200{
201 201
202 if ( mSyncMode ) { 202 if ( mSyncMode ) {
203 mSyncResult = 1; 203 mSyncResult = 1;
204 accept(); 204 accept();
205 return; 205 return;
206 } 206 }
207 207
208 if ( mIncidence ){ 208 if ( mIncidence ){
209#ifndef DESKTOP_VERSION 209#ifndef DESKTOP_VERSION
210 hide(); 210 hide();
211#endif 211#endif
212 QDate date; 212 QDate date;
213 if ( mIncidence->type() == "Todo" ) { 213 if ( mIncidence->type() == "Todo" ) {
214 /* 214 /*
215 if ( ((Todo*)mIncidence)->hasDueDate() ) 215 if ( ((Todo*)mIncidence)->hasDueDate() )
216 date = ((Todo*)mIncidence)->dtDue().date(); 216 date = ((Todo*)mIncidence)->dtDue().date();
217 else { 217 else {
218 globalFlagBlockAgenda = 2; 218 globalFlagBlockAgenda = 2;
219 emit showAgendaView( false ); 219 emit showAgendaView( false );
220 return; 220 return;
221 } 221 }
222 */ 222 */
223 ((Todo*)mIncidence)->setCompleted( true ); 223 ((Todo*)mIncidence)->setCompleted( true );
224 ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() );
224 hide(); 225 hide();
225 emit todoCompleted(((Todo*)mIncidence)); 226 emit todoCompleted(((Todo*)mIncidence));
226 return; 227 return;
227 228
228 } else 229 } else
229 date = mIncidence->dtStart().date(); 230 date = mIncidence->dtStart().date();
230 globalFlagBlockAgenda = 1; 231 globalFlagBlockAgenda = 1;
231 emit showAgendaView( false ); 232 emit showAgendaView( false );
232 globalFlagBlockAgenda = 2; 233 globalFlagBlockAgenda = 2;
233 emit jumpToTime( date ); 234 emit jumpToTime( date );
234 } 235 }
235} 236}
236void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) 237void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
237{ 238{
238 switch ( e->key() ) { 239 switch ( e->key() ) {
239 240
240 case Qt::Key_A : 241 case Qt::Key_A :
241 case Qt::Key_L : 242 case Qt::Key_L :
242 showIncidence(); 243 showIncidence();
243 break; 244 break;
244 case Qt::Key_E : 245 case Qt::Key_E :
245 case Qt::Key_R : 246 case Qt::Key_R :
246 editIncidence(); 247 editIncidence();
247 break; 248 break;
248 case Qt::Key_C: 249 case Qt::Key_C:
249 case Qt::Key_Escape: 250 case Qt::Key_Escape:
250 close(); 251 close();
251 break; 252 break;
252 case Qt::Key_I: 253 case Qt::Key_I:
253 accept(); 254 accept();
254 break; 255 break;
255 default: 256 default:
256 break; 257 break;
257 } 258 }
258 259
259} 260}
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 2c45f21..c52f2b3 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -1,328 +1,338 @@
1#include "kincidenceformatter.h" 1#include "kincidenceformatter.h"
2#include <kstaticdeleter.h> 2#include <kstaticdeleter.h>
3#include <kglobal.h> 3#include <kglobal.h>
4#include <klocale.h> 4#include <klocale.h>
5#ifdef DEKTOP_VERSION 5#ifdef DEKTOP_VERSION
6#include <kabc/stdaddressbook.h> 6#include <kabc/stdaddressbook.h>
7#define size count 7#define size count
8#endif 8#endif
9 9
10KIncidenceFormatter* KIncidenceFormatter::mInstance = 0; 10KIncidenceFormatter* KIncidenceFormatter::mInstance = 0;
11static KStaticDeleter<KIncidenceFormatter> insd; 11static KStaticDeleter<KIncidenceFormatter> insd;
12 12
13QString KIncidenceFormatter::getFormattedText( Incidence * inc ) 13QString KIncidenceFormatter::getFormattedText( Incidence * inc )
14{ 14{
15// #ifndef QT_NO_INPUTDIALOG 15// #ifndef QT_NO_INPUTDIALOG
16// return QInputDialog::getItem( caption, label, items, current, editable ); 16// return QInputDialog::getItem( caption, label, items, current, editable );
17// #else 17// #else
18// return QString::null; 18// return QString::null;
19// #endif 19// #endif
20 mText = ""; 20 mText = "";
21 if ( inc->type() == "Event" ) 21 if ( inc->type() == "Event" )
22 setEvent((Event *) inc ); 22 setEvent((Event *) inc );
23 else if ( inc->type() == "Todo" ) 23 else if ( inc->type() == "Todo" )
24 setTodo((Todo *) inc ); 24 setTodo((Todo *) inc );
25 return mText; 25 return mText;
26} 26}
27 27
28KIncidenceFormatter* KIncidenceFormatter::instance() 28KIncidenceFormatter* KIncidenceFormatter::instance()
29{ 29{
30 if (!mInstance) { 30 if (!mInstance) {
31 mInstance = insd.setObject(new KIncidenceFormatter()); 31 mInstance = insd.setObject(new KIncidenceFormatter());
32 } 32 }
33 return mInstance; 33 return mInstance;
34} 34}
35KIncidenceFormatter::~KIncidenceFormatter() 35KIncidenceFormatter::~KIncidenceFormatter()
36{ 36{
37 if (mInstance == this) 37 if (mInstance == this)
38 mInstance = insd.setObject(0); 38 mInstance = insd.setObject(0);
39 //qDebug("KIncidenceFormatter::~KIncidenceFormatter "); 39 //qDebug("KIncidenceFormatter::~KIncidenceFormatter ");
40} 40}
41KIncidenceFormatter::KIncidenceFormatter() 41KIncidenceFormatter::KIncidenceFormatter()
42{ 42{
43 mColorMode = 0; 43 mColorMode = 0;
44} 44}
45void KIncidenceFormatter::setEvent(Event *event) 45void KIncidenceFormatter::setEvent(Event *event)
46{ 46{
47 int mode = 0; 47 int mode = 0;
48 mCurrentIncidence = event; 48 mCurrentIncidence = event;
49 bool shortDate = true; 49 bool shortDate = true;
50 if ( mode == 0 ) { 50 if ( mode == 0 ) {
51 addTag("h3",event->summary()); 51 addTag("h3",event->summary());
52 } 52 }
53 else { 53 else {
54 if ( mColorMode == 1 ) { 54 if ( mColorMode == 1 ) {
55 mText +="<font color=\"#00A000\">"; 55 mText +="<font color=\"#00A000\">";
56 } 56 }
57 if ( mColorMode == 2 ) { 57 if ( mColorMode == 2 ) {
58 mText +="<font color=\"#C00000\">"; 58 mText +="<font color=\"#C00000\">";
59 } 59 }
60 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; 60 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
61 if ( mode == 1 ) { 61 if ( mode == 1 ) {
62 addTag("h2",i18n( "Local: " ) +event->summary()); 62 addTag("h2",i18n( "Local: " ) +event->summary());
63 } else { 63 } else {
64 addTag("h2",i18n( "Remote: " ) +event->summary()); 64 addTag("h2",i18n( "Remote: " ) +event->summary());
65 } 65 }
66 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 66 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
67 if ( mColorMode ) 67 if ( mColorMode )
68 mText += "</font>"; 68 mText += "</font>";
69 } 69 }
70 if (event->cancelled ()) { 70 if (event->cancelled ()) {
71 mText +="<font color=\"#B00000\">"; 71 mText +="<font color=\"#B00000\">";
72 addTag("i",i18n("This event has been cancelled!")); 72 addTag("i",i18n("This event has been cancelled!"));
73 mText.append("<br>"); 73 mText.append("<br>");
74 mText += "</font>"; 74 mText += "</font>";
75 } 75 }
76 if (!event->location().isEmpty()) { 76 if (!event->location().isEmpty()) {
77 addTag("b",i18n("Location: ")); 77 addTag("b",i18n("Location: "));
78 mText.append(event->location()+"<br>"); 78 mText.append(event->location()+"<br>");
79 } 79 }
80 if (event->doesFloat()) { 80 if (event->doesFloat()) {
81 if (event->isMultiDay()) { 81 if (event->isMultiDay()) {
82 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") 82 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>")
83 .arg(event->dtStartDateStr(shortDate)) 83 .arg(event->dtStartDateStr(shortDate))
84 .arg(event->dtEndDateStr(shortDate))); 84 .arg(event->dtEndDateStr(shortDate)));
85 } else { 85 } else {
86 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); 86 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate )));
87 } 87 }
88 } else { 88 } else {
89 if (event->isMultiDay()) { 89 if (event->isMultiDay()) {
90 mText.append(i18n("<p><b>From:</b> %1</p> ") 90 mText.append(i18n("<p><b>From:</b> %1</p> ")
91 .arg(event->dtStartStr( shortDate))); 91 .arg(event->dtStartStr( shortDate)));
92 mText.append(i18n("<p><b>To:</b> %1</p>") 92 mText.append(i18n("<p><b>To:</b> %1</p>")
93 .arg(event->dtEndStr(shortDate))); 93 .arg(event->dtEndStr(shortDate)));
94 } else { 94 } else {
95 mText.append(i18n("<p><b>On:</b> %1</p> ") 95 mText.append(i18n("<p><b>On:</b> %1</p> ")
96 .arg(event->dtStartDateStr( shortDate ))); 96 .arg(event->dtStartDateStr( shortDate )));
97 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") 97 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>")
98 .arg(event->dtStartTimeStr()) 98 .arg(event->dtStartTimeStr())
99 .arg(event->dtEndTimeStr())); 99 .arg(event->dtEndTimeStr()));
100 } 100 }
101 } 101 }
102 102
103 if (event->recurrence()->doesRecur()) { 103 if (event->recurrence()->doesRecur()) {
104 104
105 QString recurText = event->recurrence()->recurrenceText(); 105 QString recurText = event->recurrence()->recurrenceText();
106 addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); 106 addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>");
107 bool last; 107 bool last;
108 QDate start = QDate::currentDate(); 108 QDate start = QDate::currentDate();
109 QDate next; 109 QDate next;
110 next = event->recurrence()->getPreviousDate( start , &last ); 110 next = event->recurrence()->getPreviousDate( start , &last );
111 if ( !last ) { 111 if ( !last ) {
112 next = event->recurrence()->getNextDate( start.addDays( - 1 ) ); 112 next = event->recurrence()->getNextDate( start.addDays( - 1 ) );
113 addTag("p",i18n("Next recurrence is on: ")+ KGlobal::locale()->formatDate( next, shortDate ) ); 113 addTag("p",i18n("Next recurrence is on: ")+ KGlobal::locale()->formatDate( next, shortDate ) );
114 //addTag("p", KGlobal::locale()->formatDate( next, shortDate )); 114 //addTag("p", KGlobal::locale()->formatDate( next, shortDate ));
115 } else { 115 } else {
116 addTag("p",i18n("<b>Last recurrence was on:</b>") ); 116 addTag("p",i18n("<b>Last recurrence was on:</b>") );
117 addTag("p", KGlobal::locale()->formatDate( next, shortDate )); 117 addTag("p", KGlobal::locale()->formatDate( next, shortDate ));
118 } 118 }
119 } 119 }
120 120
121 121
122 if (event->isAlarmEnabled()) { 122 if (event->isAlarmEnabled()) {
123 Alarm *alarm =event->alarms().first() ; 123 Alarm *alarm =event->alarms().first() ;
124 QDateTime t = alarm->time(); 124 QDateTime t = alarm->time();
125 int min = t.secsTo( event->dtStart() )/60; 125 int min = t.secsTo( event->dtStart() )/60;
126 QString s =i18n("(%1 min before)").arg( min ); 126 QString s =i18n("(%1 min before)").arg( min );
127 addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate )); 127 addTag("p",i18n("<b>Alarm on: </b>") + s + ": "+KGlobal::locale()->formatDateTime( t, shortDate ));
128 //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 128 //addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
129 //addTag("p",s); 129 //addTag("p",s);
130 } 130 }
131 131
132 addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); 132 addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() );
133 // mText.append(event->secrecyStr()+"<br>"); 133 // mText.append(event->secrecyStr()+"<br>");
134 formatCategories(event); 134 formatCategories(event);
135 if (!event->description().isEmpty()) { 135 if (!event->description().isEmpty()) {
136 addTag("p",i18n("<b>Details: </b>")); 136 addTag("p",i18n("<b>Details: </b>"));
137 addTag("p",event->description()); 137 addTag("p",event->description());
138 } 138 }
139 139
140 140
141 formatReadOnly(event); 141 formatReadOnly(event);
142 formatAttendees(event); 142 formatAttendees(event);
143 143
144 144
145} 145}
146 146
147void KIncidenceFormatter::setTodo(Todo *event ) 147void KIncidenceFormatter::setTodo(Todo *event )
148{ 148{
149 int mode = 0; 149 int mode = 0;
150 mCurrentIncidence = event; 150 mCurrentIncidence = event;
151 bool shortDate = true; 151 bool shortDate = true;
152 if (mode == 0 ) 152 if (mode == 0 )
153 addTag("h3",event->summary()); 153 addTag("h3",event->summary());
154 else { 154 else {
155 if ( mColorMode == 1 ) { 155 if ( mColorMode == 1 ) {
156 mText +="<font color=\"#00A000\">"; 156 mText +="<font color=\"#00A000\">";
157 } 157 }
158 if ( mColorMode == 2 ) { 158 if ( mColorMode == 2 ) {
159 mText +="<font color=\"#B00000\">"; 159 mText +="<font color=\"#B00000\">";
160 } 160 }
161 if ( mode == 1 ) { 161 if ( mode == 1 ) {
162 addTag("h2",i18n( "Local: " ) +event->summary()); 162 addTag("h2",i18n( "Local: " ) +event->summary());
163 } else { 163 } else {
164 addTag("h2",i18n( "Remote: " ) +event->summary()); 164 addTag("h2",i18n( "Remote: " ) +event->summary());
165 } 165 }
166 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 166 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
167 if ( mColorMode ) 167 if ( mColorMode )
168 mText += "</font>"; 168 mText += "</font>";
169 } 169 }
170 if (event->cancelled ()) { 170 if (event->cancelled ()) {
171 mText +="<font color=\"#B00000\">"; 171 mText +="<font color=\"#B00000\">";
172 addTag("i",i18n("This todo has been cancelled!")); 172 addTag("i",i18n("This todo has been cancelled!"));
173 mText.append("<br>"); 173 mText.append("<br>");
174 mText += "</font>"; 174 mText += "</font>";
175 } 175 }
176 176
177 if (!event->location().isEmpty()) { 177 if (!event->location().isEmpty()) {
178 addTag("b",i18n("Location: ")); 178 addTag("b",i18n("Location: "));
179 mText.append(event->location()+"<br>"); 179 mText.append(event->location()+"<br>");
180 } 180 }
181 if (event->hasDueDate()) { 181 if (event->hasDueDate()) {
182 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate))); 182 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate)));
183 } 183 }
184 mText.append(i18n("<p><b>Priority:</b> %2</p>") 184 mText.append(i18n("<p><b>Priority:</b> %2</p>")
185 .arg(QString::number(event->priority()))); 185 .arg(QString::number(event->priority())));
186 186
187 if ( event->percentComplete() == 100 && event->hasCompletedDate() ) {
188 mText.append(i18n("<p><i>Completed on %1</i></p>")
189 .arg( event->completedStr() ));
190 } else {
187 mText.append(i18n("<p><i>%1 % completed</i></p>") 191 mText.append(i18n("<p><i>%1 % completed</i></p>")
188 .arg(event->percentComplete())); 192 .arg(event->percentComplete()));
193 }
194
189 addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); 195 addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() );
190 formatCategories(event); 196 formatCategories(event);
191 if (!event->description().isEmpty()) { 197 if (!event->description().isEmpty()) {
192 addTag("p",i18n("<b>Details: </b>")); 198 addTag("p",i18n("<b>Details: </b>"));
193 addTag("p",event->description()); 199 addTag("p",event->description());
194 } 200 }
195 201
196 202
197 203
198 formatReadOnly(event); 204 formatReadOnly(event);
199 formatAttendees(event); 205 formatAttendees(event);
200 206
201} 207}
202 208
203void KIncidenceFormatter::setJournal(Journal* ) 209void KIncidenceFormatter::setJournal(Journal* )
204{ 210{
205 211
206} 212}
207 213
208void KIncidenceFormatter::formatCategories(Incidence *event) 214void KIncidenceFormatter::formatCategories(Incidence *event)
209{ 215{
210 if (!event->categoriesStr().isEmpty()) { 216 if (!event->categoriesStr().isEmpty()) {
211 addTag("p",i18n("<b>Categories: </b>")+event->categoriesStr() ); 217 addTag("p",i18n("<b>Categories: </b>")+event->categoriesStr() );
212 //mText.append(event->categoriesStr()); 218 //mText.append(event->categoriesStr());
213 } 219 }
214} 220}
215void KIncidenceFormatter::addTag(const QString & tag,const QString & text) 221void KIncidenceFormatter::addTag(const QString & tag,const QString & text)
216{ 222{
217 int number=text.contains("\n"); 223 int number=text.contains("\n");
218 QString str = "<" + tag + ">"; 224 QString str = "<" + tag + ">";
219 QString tmpText=text; 225 QString tmpText=text;
220 QString tmpStr=str; 226 QString tmpStr=str;
221 if(number !=-1) 227 if(number !=-1)
222 { 228 {
223 if (number > 0) { 229 if (number > 0) {
224 int pos=0; 230 int pos=0;
225 QString tmp; 231 QString tmp;
226 for(int i=0;i<=number;i++) { 232 for(int i=0;i<=number;i++) {
227 pos=tmpText.find("\n"); 233 pos=tmpText.find("\n");
228 tmp=tmpText.left(pos); 234 tmp=tmpText.left(pos);
229 tmpText=tmpText.right(tmpText.length()-pos-1); 235 tmpText=tmpText.right(tmpText.length()-pos-1);
230 tmpStr+=tmp+"<br>"; 236 tmpStr+=tmp+"<br>";
231 } 237 }
232 } 238 }
233 else tmpStr += tmpText; 239 else tmpStr += tmpText;
234 tmpStr+="</" + tag + ">"; 240 tmpStr+="</" + tag + ">";
235 mText.append(tmpStr); 241 mText.append(tmpStr);
236 } 242 }
237 else 243 else
238 { 244 {
239 str += text + "</" + tag + ">"; 245 str += text + "</" + tag + ">";
240 mText.append(str); 246 mText.append(str);
241 } 247 }
242} 248}
243 249
244void KIncidenceFormatter::formatAttendees(Incidence *event) 250void KIncidenceFormatter::formatAttendees(Incidence *event)
245{ 251{
246 QPtrList<Attendee> attendees = event->attendees(); 252 QPtrList<Attendee> attendees = event->attendees();
247 if (attendees.count()) { 253 if (attendees.count()) {
248 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); 254 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
255 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
249 addTag("h3",i18n("Organizer")); 256 addTag("h3",i18n("Organizer"));
250 mText.append("<ul><li>"); 257 mText.append("<ul><li>");
251#if 0 258#if 0
252 //ndef KORG_NOKABC 259 //ndef KORG_NOKABC
253 260
254 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 261 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
255 KABC::Addressee::List addressList; 262 KABC::Addressee::List addressList;
256 addressList = add_book->findByEmail(event->organizer()); 263 addressList = add_book->findByEmail(event->organizer());
257 KABC::Addressee o = addressList.first(); 264 KABC::Addressee o = addressList.first();
258 if (!o.isEmpty() && addressList.size()<2) { 265 if (!o.isEmpty() && addressList.size()<2) {
259 mText += "<a href=\"uid:" + o.uid() + "\">"; 266 mText += "<a href=\"uid:" + o.uid() + "\">";
260 mText += o.formattedName(); 267 mText += o.formattedName();
261 mText += "</a>\n"; 268 mText += "</a>\n";
262 } else { 269 } else {
263 mText.append(event->organizer()); 270 mText.append(event->organizer());
264 } 271 }
265#else 272#else
266 mText.append(event->organizer()); 273 mText.append(event->organizer());
267#endif 274#endif
268 if (iconPath) { 275 if (iconPath) {
269 mText += " <a href=\"mailto:" + event->organizer() + "\">"; 276 mText += " <a href=\"mailto:" + event->organizer() + "\">";
270 mText += "<IMG src=\"" + iconPath + "\">"; 277 mText += "<IMG src=\"" + iconPath + "\">";
271 mText += "</a>\n"; 278 mText += "</a>\n";
272 } 279 }
273 mText.append("</li></ul>"); 280 mText.append("</li></ul>");
274 281
275 addTag("h3",i18n("Attendees")); 282 addTag("h3",i18n("Attendees"));
276 Attendee *a; 283 Attendee *a;
277 mText.append("<ul>"); 284 mText.append("<ul>");
278 for(a=attendees.first();a;a=attendees.next()) { 285 for(a=attendees.first();a;a=attendees.next()) {
279#if 0 286#if 0
280//ndef KORG_NOKABC 287//ndef KORG_NOKABC
281 if (a->name().isEmpty()) { 288 if (a->name().isEmpty()) {
282 addressList = add_book->findByEmail(a->email()); 289 addressList = add_book->findByEmail(a->email());
283 KABC::Addressee o = addressList.first(); 290 KABC::Addressee o = addressList.first();
284 if (!o.isEmpty() && addressList.size()<2) { 291 if (!o.isEmpty() && addressList.size()<2) {
285 mText += "<a href=\"uid:" + o.uid() + "\">"; 292 mText += "<a href=\"uid:" + o.uid() + "\">";
286 mText += o.formattedName(); 293 mText += o.formattedName();
287 mText += "</a>\n"; 294 mText += "</a>\n";
288 } else { 295 } else {
289 mText += "<li>"; 296 mText += "<li>";
290 mText.append(a->email()); 297 mText.append(a->email());
291 mText += "\n"; 298 mText += "\n";
292 } 299 }
293 } else { 300 } else {
294 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 301 mText += "<li><a href=\"uid:" + a->uid() + "\">";
295 if (!a->name().isEmpty()) mText += a->name(); 302 if (!a->name().isEmpty()) mText += a->name();
296 else mText += a->email(); 303 else mText += a->email();
297 mText += "</a>\n"; 304 mText += "</a>\n";
298 } 305 }
299#else 306#else
300 //qDebug("nokabc "); 307 //qDebug("nokabc ");
301 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 308 mText += "<li><a href=\"uid:" + a->uid() + "\">";
302 if (!a->name().isEmpty()) mText += a->name(); 309 if (!a->name().isEmpty()) mText += a->name();
303 else mText += a->email(); 310 else mText += a->email();
304 mText += "</a>\n"; 311 mText += "</a>\n";
305#endif 312#endif
306 313
307 if (!a->email().isEmpty()) { 314 if (!a->email().isEmpty()) {
308 if (iconPath) { 315 if (iconPath) {
309 mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; 316 mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">";
310 mText += "<IMG src=\"" + iconPath + "\">"; 317 if ( a->RSVP() )
318 mText += "<IMG src=\"" + iconPath + "\">";
319 else
320 mText += "<IMG src=\"" + NOiconPath + "\">";
311 mText += "</a>\n"; 321 mText += "</a>\n";
312 } 322 }
313 } 323 }
314 if (a->status() != Attendee::NeedsAction ) 324 if (a->status() != Attendee::NeedsAction )
315 mText +="[" + a->statusStr() + "] "; 325 mText +="[" + a->statusStr() + "] ";
316 if (a->role() == Attendee::Chair ) 326 if (a->role() == Attendee::Chair )
317 mText +="(" + a->roleStr().left(1) + ".)"; 327 mText +="(" + a->roleStr().left(1) + ".)";
318 } 328 }
319 mText.append("</li></ul>"); 329 mText.append("</li></ul>");
320 } 330 }
321} 331}
322 332
323void KIncidenceFormatter::formatReadOnly(Incidence *event) 333void KIncidenceFormatter::formatReadOnly(Incidence *event)
324{ 334{
325 if (event->isReadOnly()) { 335 if (event->isReadOnly()) {
326 addTag("p","<em>(" + i18n("read-only") + ")</em>"); 336 addTag("p","<em>(" + i18n("read-only") + ")</em>");
327 } 337 }
328} 338}
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 3d2de61..7362bdf 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -1,374 +1,379 @@
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 <klocale.h> 22#include <klocale.h>
23#include <kdebug.h> 23#include <kdebug.h>
24 24
25#include "todo.h" 25#include "todo.h"
26 26
27using namespace KCal; 27using namespace KCal;
28 28
29Todo::Todo(): Incidence() 29Todo::Todo(): Incidence()
30{ 30{
31// mStatus = TENTATIVE; 31// mStatus = TENTATIVE;
32 32
33 mHasDueDate = false; 33 mHasDueDate = false;
34 setHasStartDate( false ); 34 setHasStartDate( false );
35 mCompleted = getEvenTime(QDateTime::currentDateTime()); 35 mCompleted = getEvenTime(QDateTime::currentDateTime());
36 mHasCompletedDate = false; 36 mHasCompletedDate = false;
37 mPercentComplete = 0; 37 mPercentComplete = 0;
38} 38}
39 39
40Todo::Todo(const Todo &t) : Incidence(t) 40Todo::Todo(const Todo &t) : Incidence(t)
41{ 41{
42 mDtDue = t.mDtDue; 42 mDtDue = t.mDtDue;
43 mHasDueDate = t.mHasDueDate; 43 mHasDueDate = t.mHasDueDate;
44 mCompleted = t.mCompleted; 44 mCompleted = t.mCompleted;
45 mHasCompletedDate = t.mHasCompletedDate; 45 mHasCompletedDate = t.mHasCompletedDate;
46 mPercentComplete = t.mPercentComplete; 46 mPercentComplete = t.mPercentComplete;
47} 47}
48 48
49Todo::~Todo() 49Todo::~Todo()
50{ 50{
51 51
52} 52}
53 53
54Incidence *Todo::clone() 54Incidence *Todo::clone()
55{ 55{
56 return new Todo(*this); 56 return new Todo(*this);
57} 57}
58 58
59bool Todo::contains ( Todo* from ) 59bool Todo::contains ( Todo* from )
60{ 60{
61 61
62 if ( !from->summary().isEmpty() ) 62 if ( !from->summary().isEmpty() )
63 if ( !summary().startsWith( from->summary() )) 63 if ( !summary().startsWith( from->summary() ))
64 return false; 64 return false;
65 if ( from->hasStartDate() ) { 65 if ( from->hasStartDate() ) {
66 if ( !hasStartDate() ) 66 if ( !hasStartDate() )
67 return false; 67 return false;
68 if ( from->dtStart() != dtStart()) 68 if ( from->dtStart() != dtStart())
69 return false; 69 return false;
70 } 70 }
71 if ( from->hasDueDate() ){ 71 if ( from->hasDueDate() ){
72 if ( !hasDueDate() ) 72 if ( !hasDueDate() )
73 return false; 73 return false;
74 if ( from->dtDue() != dtDue()) 74 if ( from->dtDue() != dtDue())
75 return false; 75 return false;
76 } 76 }
77 if ( !from->location().isEmpty() ) 77 if ( !from->location().isEmpty() )
78 if ( !location().startsWith( from->location() ) ) 78 if ( !location().startsWith( from->location() ) )
79 return false; 79 return false;
80 if ( !from->description().isEmpty() ) 80 if ( !from->description().isEmpty() )
81 if ( !description().startsWith( from->description() )) 81 if ( !description().startsWith( from->description() ))
82 return false; 82 return false;
83 if ( from->alarms().count() ) { 83 if ( from->alarms().count() ) {
84 Alarm *a = from->alarms().first(); 84 Alarm *a = from->alarms().first();
85 if ( a->enabled() ){ 85 if ( a->enabled() ){
86 if ( !alarms().count() ) 86 if ( !alarms().count() )
87 return false; 87 return false;
88 Alarm *b = alarms().first(); 88 Alarm *b = alarms().first();
89 if( ! b->enabled() ) 89 if( ! b->enabled() )
90 return false; 90 return false;
91 if ( ! (a->offset() == b->offset() )) 91 if ( ! (a->offset() == b->offset() ))
92 return false; 92 return false;
93 } 93 }
94 } 94 }
95 95
96 QStringList cat = categories(); 96 QStringList cat = categories();
97 QStringList catFrom = from->categories(); 97 QStringList catFrom = from->categories();
98 QString nCat; 98 QString nCat;
99 int iii; 99 int iii;
100 for ( iii = 0; iii < catFrom.count();++iii ) { 100 for ( iii = 0; iii < catFrom.count();++iii ) {
101 nCat = catFrom[iii]; 101 nCat = catFrom[iii];
102 if ( !nCat.isEmpty() ) 102 if ( !nCat.isEmpty() )
103 if ( !cat.contains( nCat )) { 103 if ( !cat.contains( nCat )) {
104 return false; 104 return false;
105 } 105 }
106 } 106 }
107 if ( from->isCompleted() ) { 107 if ( from->isCompleted() ) {
108 if ( !isCompleted() ) 108 if ( !isCompleted() )
109 return false; 109 return false;
110 } 110 }
111 if( priority() != from->priority() ) 111 if( priority() != from->priority() )
112 return false; 112 return false;
113 113
114 114
115 return true; 115 return true;
116 116
117} 117}
118bool KCal::operator==( const Todo& t1, const Todo& t2 ) 118bool KCal::operator==( const Todo& t1, const Todo& t2 )
119{ 119{
120 120
121 bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); 121 bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 );
122 if ( ! ret ) 122 if ( ! ret )
123 return false; 123 return false;
124 if ( t1.hasDueDate() == t2.hasDueDate() ) { 124 if ( t1.hasDueDate() == t2.hasDueDate() ) {
125 if ( t1.hasDueDate() ) { 125 if ( t1.hasDueDate() ) {
126 if ( t1.doesFloat() == t2.doesFloat() ) { 126 if ( t1.doesFloat() == t2.doesFloat() ) {
127 if ( t1.doesFloat() ) { 127 if ( t1.doesFloat() ) {
128 if ( t1.dtDue().date() != t2.dtDue().date() ) 128 if ( t1.dtDue().date() != t2.dtDue().date() )
129 return false; 129 return false;
130 } else 130 } else
131 if ( t1.dtDue() != t2.dtDue() ) 131 if ( t1.dtDue() != t2.dtDue() )
132 return false; 132 return false;
133 } else 133 } else
134 return false;// float != 134 return false;// float !=
135 } 135 }
136 136
137 } else 137 } else
138 return false; 138 return false;
139 if ( t1.percentComplete() != t2.percentComplete() ) 139 if ( t1.percentComplete() != t2.percentComplete() )
140 return false; 140 return false;
141 if ( t1.isCompleted() ) { 141 if ( t1.isCompleted() ) {
142 if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) { 142 if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) {
143 if ( t1.hasCompletedDate() ) { 143 if ( t1.hasCompletedDate() ) {
144 if ( t1.completed() != t2.completed() ) 144 if ( t1.completed() != t2.completed() )
145 return false; 145 return false;
146 } 146 }
147 147
148 } else 148 } else
149 return false; 149 return false;
150 } 150 }
151 return true; 151 return true;
152 152
153} 153}
154 154
155void Todo::setDtDue(const QDateTime &dtDue) 155void Todo::setDtDue(const QDateTime &dtDue)
156{ 156{
157 //int diffsecs = mDtDue.secsTo(dtDue); 157 //int diffsecs = mDtDue.secsTo(dtDue);
158 158
159 /*if (mReadOnly) return; 159 /*if (mReadOnly) return;
160 const QPtrList<Alarm>& alarms = alarms(); 160 const QPtrList<Alarm>& alarms = alarms();
161 for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) { 161 for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) {
162 if (alarm->enabled()) { 162 if (alarm->enabled()) {
163 alarm->setTime(alarm->time().addSecs(diffsecs)); 163 alarm->setTime(alarm->time().addSecs(diffsecs));
164 } 164 }
165 }*/ 165 }*/
166 mDtDue = getEvenTime(dtDue); 166 mDtDue = getEvenTime(dtDue);
167 167
168 //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl; 168 //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl;
169 169
170 /*const QPtrList<Alarm>& alarms = alarms(); 170 /*const QPtrList<Alarm>& alarms = alarms();
171 for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) 171 for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next())
172 alarm->setAlarmStart(mDtDue);*/ 172 alarm->setAlarmStart(mDtDue);*/
173 173
174 updated(); 174 updated();
175} 175}
176 176
177QDateTime Todo::dtDue() const 177QDateTime Todo::dtDue() const
178{ 178{
179 return mDtDue; 179 return mDtDue;
180} 180}
181 181
182QString Todo::dtDueTimeStr() const 182QString Todo::dtDueTimeStr() const
183{ 183{
184 return KGlobal::locale()->formatTime(mDtDue.time()); 184 return KGlobal::locale()->formatTime(mDtDue.time());
185} 185}
186 186
187QString Todo::dtDueDateStr(bool shortfmt) const 187QString Todo::dtDueDateStr(bool shortfmt) const
188{ 188{
189 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); 189 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt);
190} 190}
191 191
192QString Todo::dtDueStr(bool shortfmt) const 192QString Todo::dtDueStr(bool shortfmt) const
193{ 193{
194 return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); 194 return KGlobal::locale()->formatDateTime(mDtDue, shortfmt);
195} 195}
196 196
197bool Todo::hasDueDate() const 197bool Todo::hasDueDate() const
198{ 198{
199 return mHasDueDate; 199 return mHasDueDate;
200} 200}
201 201
202void Todo::setHasDueDate(bool f) 202void Todo::setHasDueDate(bool f)
203{ 203{
204 if (mReadOnly) return; 204 if (mReadOnly) return;
205 mHasDueDate = f; 205 mHasDueDate = f;
206 updated(); 206 updated();
207} 207}
208 208
209 209
210#if 0 210#if 0
211void Todo::setStatus(const QString &statStr) 211void Todo::setStatus(const QString &statStr)
212{ 212{
213 if (mReadOnly) return; 213 if (mReadOnly) return;
214 QString ss(statStr.upper()); 214 QString ss(statStr.upper());
215 215
216 if (ss == "X-ACTION") 216 if (ss == "X-ACTION")
217 mStatus = NEEDS_ACTION; 217 mStatus = NEEDS_ACTION;
218 else if (ss == "NEEDS ACTION") 218 else if (ss == "NEEDS ACTION")
219 mStatus = NEEDS_ACTION; 219 mStatus = NEEDS_ACTION;
220 else if (ss == "ACCEPTED") 220 else if (ss == "ACCEPTED")
221 mStatus = ACCEPTED; 221 mStatus = ACCEPTED;
222 else if (ss == "SENT") 222 else if (ss == "SENT")
223 mStatus = SENT; 223 mStatus = SENT;
224 else if (ss == "TENTATIVE") 224 else if (ss == "TENTATIVE")
225 mStatus = TENTATIVE; 225 mStatus = TENTATIVE;
226 else if (ss == "CONFIRMED") 226 else if (ss == "CONFIRMED")
227 mStatus = CONFIRMED; 227 mStatus = CONFIRMED;
228 else if (ss == "DECLINED") 228 else if (ss == "DECLINED")
229 mStatus = DECLINED; 229 mStatus = DECLINED;
230 else if (ss == "COMPLETED") 230 else if (ss == "COMPLETED")
231 mStatus = COMPLETED; 231 mStatus = COMPLETED;
232 else if (ss == "DELEGATED") 232 else if (ss == "DELEGATED")
233 mStatus = DELEGATED; 233 mStatus = DELEGATED;
234 234
235 updated(); 235 updated();
236} 236}
237 237
238void Todo::setStatus(int status) 238void Todo::setStatus(int status)
239{ 239{
240 if (mReadOnly) return; 240 if (mReadOnly) return;
241 mStatus = status; 241 mStatus = status;
242 updated(); 242 updated();
243} 243}
244 244
245int Todo::status() const 245int Todo::status() const
246{ 246{
247 return mStatus; 247 return mStatus;
248} 248}
249 249
250QString Todo::statusStr() const 250QString Todo::statusStr() const
251{ 251{
252 switch(mStatus) { 252 switch(mStatus) {
253 case NEEDS_ACTION: 253 case NEEDS_ACTION:
254 return QString("NEEDS ACTION"); 254 return QString("NEEDS ACTION");
255 break; 255 break;
256 case ACCEPTED: 256 case ACCEPTED:
257 return QString("ACCEPTED"); 257 return QString("ACCEPTED");
258 break; 258 break;
259 case SENT: 259 case SENT:
260 return QString("SENT"); 260 return QString("SENT");
261 break; 261 break;
262 case TENTATIVE: 262 case TENTATIVE:
263 return QString("TENTATIVE"); 263 return QString("TENTATIVE");
264 break; 264 break;
265 case CONFIRMED: 265 case CONFIRMED:
266 return QString("CONFIRMED"); 266 return QString("CONFIRMED");
267 break; 267 break;
268 case DECLINED: 268 case DECLINED:
269 return QString("DECLINED"); 269 return QString("DECLINED");
270 break; 270 break;
271 case COMPLETED: 271 case COMPLETED:
272 return QString("COMPLETED"); 272 return QString("COMPLETED");
273 break; 273 break;
274 case DELEGATED: 274 case DELEGATED:
275 return QString("DELEGATED"); 275 return QString("DELEGATED");
276 break; 276 break;
277 } 277 }
278 return QString(""); 278 return QString("");
279} 279}
280#endif 280#endif
281 281
282bool Todo::isCompleted() const 282bool Todo::isCompleted() const
283{ 283{
284 if (mPercentComplete == 100) return true; 284 if (mPercentComplete == 100) return true;
285 else return false; 285 else return false;
286} 286}
287 287
288void Todo::setCompleted(bool completed) 288void Todo::setCompleted(bool completed)
289{ 289{
290 if (completed) mPercentComplete = 100; 290 if (completed) mPercentComplete = 100;
291 else mPercentComplete = 0; 291 else {
292 mPercentComplete = 0;
293 mHasCompletedDate = false;
294 }
292 updated(); 295 updated();
293} 296}
294 297
295QDateTime Todo::completed() const 298QDateTime Todo::completed() const
296{ 299{
297 return mCompleted; 300 return mCompleted;
298} 301}
299 302
300QString Todo::completedStr() const 303QString Todo::completedStr() const
301{ 304{
302 return KGlobal::locale()->formatDateTime(mCompleted); 305 return KGlobal::locale()->formatDateTime(mCompleted);
303} 306}
304 307
305void Todo::setCompleted(const QDateTime &completed) 308void Todo::setCompleted(const QDateTime &completed)
306{ 309{
307 mHasCompletedDate = true; 310 mHasCompletedDate = true;
308 mPercentComplete = 100; 311 mPercentComplete = 100;
309 mCompleted = getEvenTime(completed); 312 mCompleted = getEvenTime(completed);
310 updated(); 313 updated();
311} 314}
312 315
313bool Todo::hasCompletedDate() const 316bool Todo::hasCompletedDate() const
314{ 317{
315 return mHasCompletedDate; 318 return mHasCompletedDate;
316} 319}
317 320
318int Todo::percentComplete() const 321int Todo::percentComplete() const
319{ 322{
320 return mPercentComplete; 323 return mPercentComplete;
321} 324}
322 325
323void Todo::setPercentComplete(int v) 326void Todo::setPercentComplete(int v)
324{ 327{
325 mPercentComplete = v; 328 mPercentComplete = v;
329 if ( v != 100 )
330 mHasCompletedDate = false;
326 updated(); 331 updated();
327} 332}
328QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const 333QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const
329{ 334{
330 if ( isCompleted() || ! hasDueDate() || cancelled() ) { 335 if ( isCompleted() || ! hasDueDate() || cancelled() ) {
331 *ok = false; 336 *ok = false;
332 return QDateTime (); 337 return QDateTime ();
333 } 338 }
334 QDateTime incidenceStart; 339 QDateTime incidenceStart;
335 incidenceStart = dtDue(); 340 incidenceStart = dtDue();
336 bool enabled = false; 341 bool enabled = false;
337 Alarm* alarm; 342 Alarm* alarm;
338 int off; 343 int off;
339 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; 344 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );;
340 // if ( QDateTime::currentDateTime() > incidenceStart ){ 345 // if ( QDateTime::currentDateTime() > incidenceStart ){
341// *ok = false; 346// *ok = false;
342// return incidenceStart; 347// return incidenceStart;
343// } 348// }
344 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 349 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
345 if (alarm->enabled()) { 350 if (alarm->enabled()) {
346 if ( alarm->hasTime () ) { 351 if ( alarm->hasTime () ) {
347 if ( alarm->time() < alarmStart ) { 352 if ( alarm->time() < alarmStart ) {
348 alarmStart = alarm->time(); 353 alarmStart = alarm->time();
349 enabled = true; 354 enabled = true;
350 off = alarmStart.secsTo( incidenceStart ); 355 off = alarmStart.secsTo( incidenceStart );
351 } 356 }
352 357
353 } else { 358 } else {
354 int secs = alarm->startOffset().asSeconds(); 359 int secs = alarm->startOffset().asSeconds();
355 if ( incidenceStart.addSecs( secs ) < alarmStart ) { 360 if ( incidenceStart.addSecs( secs ) < alarmStart ) {
356 alarmStart = incidenceStart.addSecs( secs ); 361 alarmStart = incidenceStart.addSecs( secs );
357 enabled = true; 362 enabled = true;
358 off = -secs; 363 off = -secs;
359 } 364 }
360 } 365 }
361 } 366 }
362 } 367 }
363 if ( enabled ) { 368 if ( enabled ) {
364 if ( alarmStart > QDateTime::currentDateTime() ) { 369 if ( alarmStart > QDateTime::currentDateTime() ) {
365 *ok = true; 370 *ok = true;
366 * offset = off; 371 * offset = off;
367 return alarmStart; 372 return alarmStart;
368 } 373 }
369 } 374 }
370 *ok = false; 375 *ok = false;
371 return QDateTime (); 376 return QDateTime ();
372 377
373} 378}
374 379