author | zautrix <zautrix> | 2005-04-18 10:41:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-18 10:41:31 (UTC) |
commit | 409e329447a7d00a93a56855fcddadbb0f793163 (patch) (unidiff) | |
tree | 1c92498d2dfb4c89358c64a6944aca1300a27d11 | |
parent | 0ff0dca7ccb94ebb1381351e4e4081fe0bac500a (diff) | |
download | kdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.zip kdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.tar.gz kdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.tar.bz2 |
morefixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 20 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 53 | ||||
-rw-r--r-- | korganizer/kotodoeditor.cpp | 53 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 11 | ||||
-rw-r--r-- | libkcal/incidence.cpp | 28 | ||||
-rw-r--r-- | libkcal/incidence.h | 3 |
7 files changed, 103 insertions, 67 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 2981762..7fa92bf 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -587,774 +587,774 @@ | |||
587 | { "Office","Büro" }, | 587 | { "Office","Büro" }, |
588 | { "Libary","Bücherei" }, | 588 | { "Libary","Bücherei" }, |
589 | { "Doctor","Arzt" }, | 589 | { "Doctor","Arzt" }, |
590 | { "Beach","Strand" }, | 590 | { "Beach","Strand" }, |
591 | { "Conference room","Konferenzraum" }, | 591 | { "Conference room","Konferenzraum" }, |
592 | { "Drive Home","Heimfahrt" }, | 592 | { "Drive Home","Heimfahrt" }, |
593 | { "Watch TV","Tv gucken" }, | 593 | { "Watch TV","Tv gucken" }, |
594 | { "Phone call","Telefonanruf" }, | 594 | { "Phone call","Telefonanruf" }, |
595 | { "Pay bill","Rechnung bezahlen" }, | 595 | { "Pay bill","Rechnung bezahlen" }, |
596 | { "Read book","Buch lesen" }, | 596 | { "Read book","Buch lesen" }, |
597 | { "Watering plants","Pflanzen giessen" }, | 597 | { "Watering plants","Pflanzen giessen" }, |
598 | {"Appointment","Verabredung" }, | 598 | {"Appointment","Verabredung" }, |
599 | {"Birthday","Geburtstag" }, | 599 | {"Birthday","Geburtstag" }, |
600 | {"Business","Geschäft" }, | 600 | {"Business","Geschäft" }, |
601 | {"Business Travel","Geschäftsreise" }, | 601 | {"Business Travel","Geschäftsreise" }, |
602 | {"Cinema","Kino" }, | 602 | {"Cinema","Kino" }, |
603 | {"Customer","Kunde" }, | 603 | {"Customer","Kunde" }, |
604 | {"Break","Pause" }, | 604 | {"Break","Pause" }, |
605 | {"Breakfast","Frühstück" }, | 605 | {"Breakfast","Frühstück" }, |
606 | {"Competition","Wettkampf" }, | 606 | {"Competition","Wettkampf" }, |
607 | {"Dinner","Abendessen" }, | 607 | {"Dinner","Abendessen" }, |
608 | {"Education","Erziehung" }, | 608 | {"Education","Erziehung" }, |
609 | {"Family","Familie" }, | 609 | {"Family","Familie" }, |
610 | {"Favorites","Favoriten" }, | 610 | {"Favorites","Favoriten" }, |
611 | {"Festival","Festival" }, | 611 | {"Festival","Festival" }, |
612 | {"Fishing","Angeln" }, | 612 | {"Fishing","Angeln" }, |
613 | {"Flight","Flug" }, | 613 | {"Flight","Flug" }, |
614 | {"Gifts","Geschenk" }, | 614 | {"Gifts","Geschenk" }, |
615 | {"Holiday","Feiertag" }, | 615 | {"Holiday","Feiertag" }, |
616 | {"Holiday Cards","Ansichtskarten" }, | 616 | {"Holiday Cards","Ansichtskarten" }, |
617 | {"Hot Contacts","Heisse Kontakte" }, | 617 | {"Hot Contacts","Heisse Kontakte" }, |
618 | {"Hiking","Wandern" }, | 618 | {"Hiking","Wandern" }, |
619 | {"Hunting","Jagen" }, | 619 | {"Hunting","Jagen" }, |
620 | {"Key Customer","Wichtiger Kunde" }, | 620 | {"Key Customer","Wichtiger Kunde" }, |
621 | {"Kids","Kinder" }, | 621 | {"Kids","Kinder" }, |
622 | {"Lunch","Mittagessen" }, | 622 | {"Lunch","Mittagessen" }, |
623 | {"Meeting","Treffen" }, | 623 | {"Meeting","Treffen" }, |
624 | {"Miscellaneous","Verschiedenes" }, | 624 | {"Miscellaneous","Verschiedenes" }, |
625 | {"Partner","Partner" }, | 625 | {"Partner","Partner" }, |
626 | {"Party","Partie" }, | 626 | {"Party","Partie" }, |
627 | {"Personal","Privat" }, | 627 | {"Personal","Privat" }, |
628 | {"Personal Travel","Privatreise"}, | 628 | {"Personal Travel","Privatreise"}, |
629 | {"PHB","PHB" }, | 629 | {"PHB","PHB" }, |
630 | {"Phone Calls","Telefonanruf" }, | 630 | {"Phone Calls","Telefonanruf" }, |
631 | {"Projects","Projekt" }, | 631 | {"Projects","Projekt" }, |
632 | {"Recurring","Wiederholend" }, | 632 | {"Recurring","Wiederholend" }, |
633 | {"School","Schule" }, | 633 | {"School","Schule" }, |
634 | {"Shopping","Einkaufen" }, | 634 | {"Shopping","Einkaufen" }, |
635 | {"Speach","Rede" }, | 635 | {"Speach","Rede" }, |
636 | {"Special Occasion","Spez.Gelegenheit" }, | 636 | {"Special Occasion","Spez.Gelegenheit" }, |
637 | {"Sports","Sport" }, | 637 | {"Sports","Sport" }, |
638 | {"Talk","Vortrag" }, | 638 | {"Talk","Vortrag" }, |
639 | {"Travel","Reise" }, | 639 | {"Travel","Reise" }, |
640 | {"TV","TV" }, | 640 | {"TV","TV" }, |
641 | {"Germany","Deutschland" }, | 641 | {"Germany","Deutschland" }, |
642 | {"Sweden","Schweden" }, | 642 | {"Sweden","Schweden" }, |
643 | {"Forest","Wald" }, | 643 | {"Forest","Wald" }, |
644 | { "Desert","Wüste" }, | 644 | { "Desert","Wüste" }, |
645 | { "Kitchen","Küche" }, | 645 | { "Kitchen","Küche" }, |
646 | { "Lake","See" }, | 646 | { "Lake","See" }, |
647 | {"University","Universität"}, | 647 | {"University","Universität"}, |
648 | {"Vacation","Urlaub" }, | 648 | {"Vacation","Urlaub" }, |
649 | {"VIP","VIP" }, | 649 | {"VIP","VIP" }, |
650 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, | 650 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, |
651 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, | 651 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, |
652 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, | 652 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, |
653 | { "Cancelled","Gecancelt" }, | 653 | { "Cancelled","Gecancelt" }, |
654 | { "Multiple sync","Mehrfach Sync" }, | 654 | { "Multiple sync","Mehrfach Sync" }, |
655 | { "Local file","Lokale Datei" }, | 655 | { "Local file","Lokale Datei" }, |
656 | { "Last file","Letzte Datei" }, | 656 | { "Last file","Letzte Datei" }, |
657 | { "Keys + Colors...","Tasten + Farben..." }, | 657 | { "Keys + Colors...","Tasten + Farben..." }, |
658 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, | 658 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, |
659 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, | 659 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, |
660 | { "Choose...","Wähle..." }, | 660 | { "Choose...","Wähle..." }, |
661 | { "Use colors for application:","Setze Farben für Programm:" }, | 661 | { "Use colors for application:","Setze Farben für Programm:" }, |
662 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, | 662 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, |
663 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, | 663 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, |
664 | { "Show parent To-Do's","Zeige Ober-Todos" }, | 664 | { "Show parent To-Do's","Zeige Ober-Todos" }, |
665 | { "Show location","Zeige Orte" }, | 665 | { "Show location","Zeige Orte" }, |
666 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, | 666 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, |
667 | { "Show in every cell ","Zeige in jeder Zelle " }, | 667 | { "Show in every cell ","Zeige in jeder Zelle " }, |
668 | { "short month","kurzen Monat" }, | 668 | { "short month","kurzen Monat" }, |
669 | { "icons","Icons" }, | 669 | { "icons","Icons" }, |
670 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, | 670 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, |
671 | { "Categorie colors are applied to text","Kategorie Farben färben Text" }, | 671 | { "Categorie colors are applied to text","Kategorie Farben färben Text" }, |
672 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, | 672 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, |
673 | { "Day color odd months","Tagesfarbe ungerade Monate" }, | 673 | { "Day color odd months","Tagesfarbe ungerade Monate" }, |
674 | { "Day color even months","Tagesfarbe gerade Monate" }, | 674 | { "Day color even months","Tagesfarbe gerade Monate" }, |
675 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, | 675 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, |
676 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, | 676 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, |
677 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, | 677 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, |
678 | { "Colors are applied to text","Farben werden auf Text angewendet" }, | 678 | { "Colors are applied to text","Farben werden auf Text angewendet" }, |
679 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, | 679 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, |
680 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, | 680 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, |
681 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, | 681 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, |
682 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, | 682 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, |
683 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, | 683 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, |
684 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, | 684 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, |
685 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, | 685 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, |
686 | { "New profile","Neues Profil" }, | 686 | { "New profile","Neues Profil" }, |
687 | { "Clone profile","Klone Profil" }, | 687 | { "Clone profile","Klone Profil" }, |
688 | { "Delete profile","Lösche Profil" }, | 688 | { "Delete profile","Lösche Profil" }, |
689 | { "Profile:","Profil:" }, | 689 | { "Profile:","Profil:" }, |
690 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, | 690 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, |
691 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, | 691 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, |
692 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, | 692 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, |
693 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, | 693 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, |
694 | { "Write back file","Schreibe Datei zurück" }, | 694 | { "Write back file","Schreibe Datei zurück" }, |
695 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, | 695 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, |
696 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, | 696 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, |
697 | { "Local device name:","Name dieses Gerätes:" }, | 697 | { "Local device name:","Name dieses Gerätes:" }, |
698 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, | 698 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, |
699 | { "Sync preferences","Synchronisations Einstellungen" }, | 699 | { "Sync preferences","Synchronisations Einstellungen" }, |
700 | { "Profile kind","Profil Art" }, | 700 | { "Profile kind","Profil Art" }, |
701 | { "Local file","Lokale Datei" }, | 701 | { "Local file","Lokale Datei" }, |
702 | { "Local file:","Lokale Datei:" }, | 702 | { "Local file:","Lokale Datei:" }, |
703 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, | 703 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, |
704 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, | 704 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, |
705 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, | 705 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, |
706 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, | 706 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, |
707 | { "Device","Gerät:" }, | 707 | { "Device","Gerät:" }, |
708 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, | 708 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, |
709 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, | 709 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, |
710 | { "Synchronization successful","Synchronisation erfolgreich" }, | 710 | { "Synchronization successful","Synchronisation erfolgreich" }, |
711 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, | 711 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, |
712 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, | 712 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, |
713 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, | 713 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, |
714 | { "Enter password","Passwort eingeben" }, | 714 | { "Enter password","Passwort eingeben" }, |
715 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, | 715 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, |
716 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, | 716 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, |
717 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, | 717 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, |
718 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, | 718 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, |
719 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, | 719 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, |
720 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, | 720 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, |
721 | { "Enter filter name:","Neuer Filter Name:" }, | 721 | { "Enter filter name:","Neuer Filter Name:" }, |
722 | { "Add Filter","Filter hinzufügen" }, | 722 | { "Add Filter","Filter hinzufügen" }, |
723 | { "Question","Frage" }, | 723 | { "Question","Frage" }, |
724 | { "Filter position: ","Filter Position: " }, | 724 | { "Filter position: ","Filter Position: " }, |
725 | { "Month View","Monatsansicht" }, | 725 | { "Month View","Monatsansicht" }, |
726 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, | 726 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, |
727 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, | 727 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, |
728 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, | 728 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, |
729 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, | 729 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, |
730 | { "Access: ","Zugriff: " }, | 730 | { "Access: ","Zugriff: " }, |
731 | { "Needs Action","Aktion notwendig" }, | 731 | { "Needs Action","Aktion notwendig" }, |
732 | { "Accepted","Akzeptiert" }, | 732 | { "Accepted","Akzeptiert" }, |
733 | { "Declined","Abgelehnt" }, | 733 | { "Declined","Abgelehnt" }, |
734 | { "Tentative","Vorläufig" }, | 734 | { "Tentative","Vorläufig" }, |
735 | { "Delegated","Beauftragt" }, | 735 | { "Delegated","Beauftragt" }, |
736 | { "Completed","Vollständig" }, | 736 | { "Completed","Vollständig" }, |
737 | { "In Process","In Bearbeitung" }, | 737 | { "In Process","In Bearbeitung" }, |
738 | { "Participant","Teilnehmer" }, | 738 | { "Participant","Teilnehmer" }, |
739 | { "Optional Participant","Möglicher Teilnehmer" }, | 739 | { "Optional Participant","Möglicher Teilnehmer" }, |
740 | { "Observer","Beobachter" }, | 740 | { "Observer","Beobachter" }, |
741 | { "Chair","Vorsitzender" }, | 741 | { "Chair","Vorsitzender" }, |
742 | { "Not supported \non desktop!\n","" }, | 742 | { "Not supported \non desktop!\n","" }, |
743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, | 743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, |
744 | { "Date range: ","Datums Zeitspanne: " }, | 744 | { "Date range: ","Datums Zeitspanne: " }, |
745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
747 | { "Add / remove events","Add./entferne Termine" }, | 747 | { "Add / remove events","Add./entferne Termine" }, |
748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
751 | { "Overwrite","Überschreiben" }, | 751 | { "Overwrite","Überschreiben" }, |
752 | { "Sync+save","Syncen+speichern" }, | 752 | { "Sync+save","Syncen+speichern" }, |
753 | { "Default","Standard" }, | 753 | { "Default","Standard" }, |
754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
755 | { " %d items?"," %d Einträge?" }, | 755 | { " %d items?"," %d Einträge?" }, |
756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, | 756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, |
757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
758 | { "Current","Aktuelle" }, | 758 | { "Current","Aktuelle" }, |
759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, | 759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, |
760 | { "All","Alle" }, | 760 | { "All","Alle" }, |
761 | { "Data Loss Warning","Datenverlust Warnung" }, | 761 | { "Data Loss Warning","Datenverlust Warnung" }, |
762 | { "Proceed","Weitermachen" }, | 762 | { "Proceed","Weitermachen" }, |
763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
764 | { "Filter disabled ","Filter abgeschaltet" }, | 764 | { "Filter disabled ","Filter abgeschaltet" }, |
765 | { "Filter selected: ","Gewählter Filter: " }, | 765 | { "Filter selected: ","Gewählter Filter: " }, |
766 | { "Toggle Cancel","Gecancelt ändern" }, | 766 | { "Toggle Cancel","Gecancelt ändern" }, |
767 | { "&Toggle Cancel","Gecancel&t ändern" }, | 767 | { "&Toggle Cancel","Gecancel&t ändern" }, |
768 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 768 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
769 | { "Stretched TB","Gedehnte TB" }, | 769 | { "Stretched TB","Gedehnte TB" }, |
770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, | 772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, |
773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
774 | { "Imported file successfully","Datei erfolgreich importiert" }, | 774 | { "Imported file successfully","Datei erfolgreich importiert" }, |
775 | { "Error importing file","Fehler beim Importieren der Datei" }, | 775 | { "Error importing file","Fehler beim Importieren der Datei" }, |
776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, | 777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, |
778 | { "Overwrite!","Überschreiben!" }, | 778 | { "Overwrite!","Überschreiben!" }, |
779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, | 779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, |
780 | { "Load backup filename","Lade Backup Dateiname" }, | 780 | { "Load backup filename","Lade Backup Dateiname" }, |
781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
783 | { "Save backup filename","Speichere Backup Dateiname" }, | 783 | { "Save backup filename","Speichere Backup Dateiname" }, |
784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, | 784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, |
785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
786 | { "Details of attendee","Teilnehmerdetails" }, | 786 | { "Details of attendee","Teilnehmerdetails" }, |
787 | { "Work phone:\n","Telefon Arbeit:\n" }, | 787 | { "Work phone:\n","Telefon Arbeit:\n" }, |
788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
789 | { "Home phone:\n","Telefon privat:\n" }, | 789 | { "Home phone:\n","Telefon privat:\n" }, |
790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
791 | { "Email:\n","Email:\n" }, | 791 | { "Email:\n","Email:\n" }, |
792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
793 | { "Audio Al.: ","Audio Al.: " }, | 793 | { "Audio Al.: ","Audio Al.: " }, |
794 | { "Proc.Al.: ","Proz.Al.: " }, | 794 | { "Proc.Al.: ","Proz.Al.: " }, |
795 | { "No sound set","Kein Sound definiert" }, | 795 | { "No sound set","Kein Sound definiert" }, |
796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
797 | { "No program set","Kein Programm definiert" }, | 797 | { "No program set","Kein Programm definiert" }, |
798 | { "Running '%1'","Ausführen '%1'" }, | 798 | { "Running '%1'","Ausführen '%1'" }, |
799 | { "Playing '%1'","Abspielen '%1'" }, | 799 | { "Playing '%1'","Abspielen '%1'" }, |
800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
801 | { "Load!","Laden!" }, | 801 | { "Load!","Laden!" }, |
802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, | 802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, |
803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
806 | { "Features + hints...","Eigenschaften + Tipps..." }, | 806 | { "Features + hints...","Eigenschaften + Tipps..." }, |
807 | { "User translation...","Benutzer Übersetzung..." }, | 807 | { "User translation...","Benutzer Übersetzung..." }, |
808 | { "Sync HowTo...","Synchronisation HowTo..." }, | 808 | { "Sync HowTo...","Synchronisation HowTo..." }, |
809 | { "Print calendar...","Drucke Kalender..." }, | 809 | { "Print calendar...","Drucke Kalender..." }, |
810 | { "Anniversary","Jahrestag" }, | 810 | { "Anniversary","Jahrestag" }, |
811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, | 811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, |
812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
816 | { "(%1 min before)","(%1 min vorher)" }, | 816 | { "(%1 min before)","(%1 min vorher)" }, |
817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
818 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 818 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, | 819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, |
820 | { "Continue","Weitermachen" }, | 820 | { "Continue","Weitermachen" }, |
821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
822 | { "Attendee:","Teilnehmer:" }, | 822 | { "Attendee:","Teilnehmer:" }, |
823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
824 | { "On day ","Am Tag " }, | 824 | { "On day ","Am Tag " }, |
825 | { "%1 of ","%1 des Monats" }, | 825 | { "%1 of ","%1 des Monats" }, |
826 | { "%1 of the year","%1 des Jahres" }, | 826 | { "%1 of the year","%1 des Jahres" }, |
827 | { "Anonymous","Anonymo" }, | 827 | { "Anonymous","Anonymo" }, |
828 | { "nobody@nowhere","niemand@nirgendwo" }, | 828 | { "nobody@nowhere","niemand@nirgendwo" }, |
829 | { "calendar.html","calendar.html" }, | 829 | { "calendar.html","calendar.html" }, |
830 | { " Local Time"," Locale Zeit" }, | 830 | { " Local Time"," Locale Zeit" }, |
831 | { "Unknown Name","Unbekannter Name" }, | 831 | { "Unknown Name","Unbekannter Name" }, |
832 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 832 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
833 | { "Beam via IR!","Beam via IR!" }, | 833 | { "Beam via IR!","Beam via IR!" }, |
834 | { "Next Month","Nächster Monat" }, | 834 | { "Next Month","Nächster Monat" }, |
835 | { "Prio","Prio" }, | 835 | { "Prio","Prio" }, |
836 | { "Reparent Todo","Mache Sub-Todo" }, | 836 | { "Reparent Todo","Mache Sub-Todo" }, |
837 | { "tomorrow","morgen" }, | 837 | { "tomorrow","morgen" }, |
838 | { "today","heute" }, | 838 | { "today","heute" }, |
839 | { "yesterday","gestern" }, | 839 | { "yesterday","gestern" }, |
840 | { "Ok","Ok" }, | 840 | { "Ok","Ok" }, |
841 | { "Ok+Agenda","Ok+Agenda" }, | 841 | { "Ok+Agenda","Ok+Agenda" }, |
842 | { "Email","Email" }, | 842 | { "Email","Email" }, |
843 | { "RSVP","RSVP" }, | 843 | { "RSVP","RSVP" }, |
844 | { "Email:","Email:" }, | 844 | { "Email:","Email:" }, |
845 | { "Appointment Time ","Termin Zeit " }, | 845 | { "Appointment Time ","Termin Zeit " }, |
846 | { "2","2" }, | 846 | { "2","2" }, |
847 | { "3","3" }, | 847 | { "3","3" }, |
848 | { "4","4" }, | 848 | { "4","4" }, |
849 | { " 0 %"," 0 %" }, | 849 | { " 0 %"," 0 %" }, |
850 | { " 20 %"," 20 %" }, | 850 | { " 20 %"," 20 %" }, |
851 | { " 40 %"," 40 %" }, | 851 | { " 40 %"," 40 %" }, |
852 | { " 60 %"," 60 %" }, | 852 | { " 60 %"," 60 %" }, |
853 | { " 80 %"," 80 %" }, | 853 | { " 80 %"," 80 %" }, |
854 | { "100 %","100 %" }, | 854 | { "100 %","100 %" }, |
855 | { "Filter","Filter" }, | 855 | { "Filter","Filter" }, |
856 | { "Configure","Konfiguriere" }, | 856 | { "Configure","Konfiguriere" }, |
857 | { "What's Next","What's Next" }, | 857 | { "What's Next","What's Next" }, |
858 | { "Complete calendar...","Kompletten Kalender..." }, | 858 | { "Complete calendar...","Kompletten Kalender..." }, |
859 | { "Filtered calendar...","Gefilterten Kalender..." }, | 859 | { "Filtered calendar...","Gefilterten Kalender..." }, |
860 | { "Export to phone","Exportiere zum Handy" }, | 860 | { "Export to phone","Exportiere zum Handy" }, |
861 | { "Beam receive enabled","Beam Empfang an" }, | 861 | { "Beam receive enabled","Beam Empfang an" }, |
862 | { "What's new?","Was ist neu?" }, | 862 | { "What's new?","Was ist neu?" }, |
863 | { "FAQ...","FAQ..." }, | 863 | { "FAQ...","FAQ..." }, |
864 | { "Licence...","Licence..." }, | 864 | { "Licence...","Licence..." }, |
865 | { "What's This?","What's This?" }, | 865 | { "What's This?","What's This?" }, |
866 | { "&Edit...","&Editiere..." }, | 866 | { "&Edit...","&Editiere..." }, |
867 | { "Oktober","Oktober" }, | 867 | { "Oktober","Oktober" }, |
868 | { "Title","Titel" }, | 868 | { "Title","Titel" }, |
869 | { "%1 %","%1 %" }, | 869 | { "%1 %","%1 %" }, |
870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
871 | { "Import!","Importiere!" }, | 871 | { "Import!","Importiere!" }, |
872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
873 | { "Export to phone options","Export ans Handy Optionen" }, | 873 | { "Export to phone options","Export ans Handy Optionen" }, |
874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
875 | { "I/O device: ","I/O device: " }, | 875 | { "I/O device: ","I/O device: " }, |
876 | { "Connection: ","Connection: " }, | 876 | { "Connection: ","Connection: " }, |
877 | { "Model(opt.): ","Model(opt.): " }, | 877 | { "Model(opt.): ","Model(opt.): " }, |
878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, | 880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, |
881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
882 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 882 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
883 | { "Writing to phone...","Sende Daten ans Handy..." }, | 883 | { "Writing to phone...","Sende Daten ans Handy..." }, |
884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
885 | { "Retry","Nochmal versuchen" }, | 885 | { "Retry","Nochmal versuchen" }, |
886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
890 | { "Preferences","Vorlieben" }, | 890 | { "Preferences","Vorlieben" }, |
891 | { "Global","Global" }, | 891 | { "Global","Global" }, |
892 | { "Phone","Phone" }, | 892 | { "Phone","Phone" }, |
893 | { "SMS","SMS" }, | 893 | { "SMS","SMS" }, |
894 | { "Fax","Fax" }, | 894 | { "Fax","Fax" }, |
895 | { "Pager","Pager" }, | 895 | { "Pager","Pager" }, |
896 | { "SIP","SIP" }, | 896 | { "SIP","SIP" }, |
897 | { "Italian","Italienisch" }, | 897 | { "Italian","Italienisch" }, |
898 | { "24:00","24:00" }, | 898 | { "24:00","24:00" }, |
899 | { "12:00am","12:00am" }, | 899 | { "12:00am","12:00am" }, |
900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
906 | { "Used Mail Client","Benutzter Mail Client" }, | 906 | { "Used Mail Client","Benutzter Mail Client" }, |
907 | { "Channel:","Channel:" }, | 907 | { "Channel:","Channel:" }, |
908 | { "Message:","Message:" }, | 908 | { "Message:","Message:" }, |
909 | { "Parameters:","Parameter:" }, | 909 | { "Parameters:","Parameter:" }, |
910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
911 | { "extra Message:","extra Message:" }, | 911 | { "extra Message:","extra Message:" }, |
912 | { "extra Parameters:","extra Parameter:" }, | 912 | { "extra Parameters:","extra Parameter:" }, |
913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
914 | { "External Apps.","Externe Appl." }, | 914 | { "External Apps.","Externe Appl." }, |
915 | { "24 hours","24 Std." }, | 915 | { "24 hours","24 Std." }, |
916 | { "3 hours","3 Std." }, | 916 | { "3 hours","3 Std." }, |
917 | { "1 hour","1 Std." }, | 917 | { "1 hour","1 Std." }, |
918 | { "15 minutes","15 Min." }, | 918 | { "15 minutes","15 Min." }, |
919 | { "5 minutes","5 Min." }, | 919 | { "5 minutes","5 Min." }, |
920 | { "1 minute","1 Min." }, | 920 | { "1 minute","1 Min." }, |
921 | { "23","23" }, | 921 | { "23","23" }, |
922 | { "Mon 15","Mon 15" }, | 922 | { "Mon 15","Mon 15" }, |
923 | { "Configure KO","Konfiguriere KO" }, | 923 | { "Configure KO","Konfiguriere KO" }, |
924 | { "Event text","Termin Text" }, | 924 | { "Event text","Termin Text" }, |
925 | { "ToDo","Todo" }, | 925 | { "ToDo","Todo" }, |
926 | { "Today","Heute" }, | 926 | { "Today","Heute" }, |
927 | { "What's Next View","What's Next Ansicht" }, | 927 | { "What's Next View","What's Next Ansicht" }, |
928 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 928 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
929 | { "Alarm","Alarm" }, | 929 | { "Alarm","Alarm" }, |
930 | { "Used %1 Client","Benutzter %1 Client" }, | 930 | { "Used %1 Client","Benutzter %1 Client" }, |
931 | { "No email client installed","Kein Email Klient installiert" }, | 931 | { "No email client installed","Kein Email Klient installiert" }, |
932 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 932 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
933 | { "OM/Pi email client","OM/Pi Email Klient" }, | 933 | { "OM/Pi email client","OM/Pi Email Klient" }, |
934 | { "Include in multiple ","Beziehe in multiple " }, | 934 | { "Include in multiple ","Beziehe in multiple " }, |
935 | { "calendar ","Kalender " }, | 935 | { "calendar ","Kalender " }, |
936 | { "addressbook ","Adressbuch " }, | 936 | { "addressbook ","Adressbuch " }, |
937 | { "pwmanager","PWmanager" }, | 937 | { "pwmanager","PWmanager" }, |
938 | { " sync"," Sync ein" }, | 938 | { " sync"," Sync ein" }, |
939 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 939 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
940 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 940 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
941 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 941 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
942 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 942 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
943 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 943 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
944 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 944 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
945 | { "Help...","Hilfe..." }, | 945 | { "Help...","Hilfe..." }, |
946 | { "Local file Cal:","Lokale Datei Kal:" }, | 946 | { "Local file Cal:","Lokale Datei Kal:" }, |
947 | { "Local file ABook:","Lokale Datei ABuch:" }, | 947 | { "Local file ABook:","Lokale Datei ABuch:" }, |
948 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 948 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
949 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 949 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
950 | { "Calendar:","Kalender:" }, | 950 | { "Calendar:","Kalender:" }, |
951 | { "AddressBook:","AdressBuch:" }, | 951 | { "AddressBook:","AdressBuch:" }, |
952 | { "PWManager:","PWManager:" }, | 952 | { "PWManager:","PWManager:" }, |
953 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 953 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
954 | { "ssh/scp","ssh/scp" }, | 954 | { "ssh/scp","ssh/scp" }, |
955 | { "ftp","ftp" }, | 955 | { "ftp","ftp" }, |
956 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 956 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
957 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 957 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
958 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 958 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
959 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 959 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
960 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 960 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
961 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 961 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
962 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 962 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
963 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 963 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
964 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 964 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
965 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | 965 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, |
966 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 966 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
967 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 967 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
968 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 968 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
969 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 969 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
970 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 970 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
971 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, | 971 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
972 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 972 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
973 | { "Multiple profiles","Multi-Sync Profile" }, | 973 | { "Multiple profiles","Multi-Sync Profile" }, |
974 | { "Device: ","Gerät: " }, | 974 | { "Device: ","Gerät: " }, |
975 | { "Multiple sync started.","Multi-Sync gestartet." }, | 975 | { "Multiple sync started.","Multi-Sync gestartet." }, |
976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
977 | { "Turn filter on","Schalte Filter an" }, | 977 | { "Turn filter on","Schalte Filter an" }, |
978 | { "Turn filter off","Schalte Filter aus" }, | 978 | { "Turn filter off","Schalte Filter aus" }, |
979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
993 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, | 993 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
994 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, | 994 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
996 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, | 996 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
998 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, | 998 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1000 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, | 1000 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
1001 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 1001 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1003 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, | 1003 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
1004 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, | 1004 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
1005 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, | 1005 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1011 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, | 1011 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1012 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, | 1012 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1015 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, | 1015 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1017 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, | 1017 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1018 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1018 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, | 1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, | 1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, |
1021 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1021 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1023 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1023 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1024 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1024 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1025 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1025 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1026 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1026 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1027 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1027 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1028 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1028 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1030 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1030 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1035 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1035 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1036 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1036 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1042 | { "From: ","Von: " }, | 1042 | { "From: ","Von: " }, |
1043 | { "Remove sync info","Entferne Sync Info" }, | 1043 | { "Remove sync info","Entferne Sync Info" }, |
1044 | { "For all profiles","Für alle Profile" }, | 1044 | { "For all profiles","Für alle Profile" }, |
1045 | { "Hide not Running","Verstecke nicht Laufende" }, | 1045 | { "Hide not Running","Verstecke nicht Laufende" }, |
1046 | { "ME","ME" }, | 1046 | { "ME","ME" }, |
1047 | { "Toolbar","Toolbar" }, | 1047 | { "Toolbar","Toolbar" }, |
1048 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1048 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1049 | { "Undo Delete","Löschen rückgängig machen" }, | 1049 | { "Undo Delete","Löschen rückgängig machen" }, |
1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1052 | { "Januar","Januar" }, | 1052 | { "Januar","Januar" }, |
1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1054 | { "No Filter","Kein Filter" }, | 1054 | { "No Filter","Kein Filter" }, |
1055 | { "Multiple Sync options","Multi Sync Optionen" }, | 1055 | { "Multiple Sync options","Multi Sync Optionen" }, |
1056 | { "Sync algo options","Sync Ablauf Optionen" }, | 1056 | { "Sync algo options","Sync Ablauf Optionen" }, |
1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1060 | { "Write back options","Optionen zum Zurückschreiben" }, | 1060 | { "Write back options","Optionen zum Zurückschreiben" }, |
1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1066 | { "Time period","Zeitspanne" }, | 1066 | { "Time period","Zeitspanne" }, |
1067 | { "From ","Von " }, | 1067 | { "From ","Von " }, |
1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1069 | { " weeks in the future "," Wochen in der Zukunft " }, | 1069 | { " weeks in the future "," Wochen in der Zukunft " }, |
1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1071 | { "Local temp file:","Lokale temp Datei:" }, | 1071 | { "Local temp file:","Lokale temp Datei:" }, |
1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1074 | { "Language","Sprache" }, | 1074 | { "Language","Sprache" }, |
1075 | { "Time Format","Zeit Format" }, | 1075 | { "Time Format","Zeit Format" }, |
1076 | { "Time Zone","Zeit Zone" }, | 1076 | { "Time Zone","Zeit Zone" }, |
1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1078 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, | 1078 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1081 | { "Save settings","Speichere Einstellungen" }, | 1081 | { "Save settings","Speichere Einstellungen" }, |
1082 | { "Save standard","Speichere Standard" }, | 1082 | { "Save standard","Speichere Standard" }, |
1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1085 | { "Data storage path","Daten Speicherpfad" }, | 1085 | { "Data storage path","Daten Speicherpfad" }, |
1086 | { "Language","Sprache" }, | 1086 | { "Language","Sprache" }, |
1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1089 | { "Show events, that are done","Zeige abgelaufene Termine" }, | 1089 | { "Show events, that are done","Zeige abgelaufene Termine" }, |
1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1092 | { "KO/Pi","KO/Pi" }, | 1092 | { "KO/Pi","KO/Pi" }, |
1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1095 | { "Sound.Al.: ","Sound.Al.: " }, | 1095 | { "Sound.Al.: ","Sound.Al.: " }, |
1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1097 | { "Restore","Wiederherstellen" }, | 1097 | { "Restore","Wiederherstellen" }, |
1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1099 | { "% completed","% erledigt" }, | 1099 | { "% completed","% erledigt" }, |
1100 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1100 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1101 | { "Set complete","Setze auf erledigt" }, | 1101 | { "Set complete","Setze auf erledigt" }, |
1102 | { "(cancelled)","(gecancelt)" }, | 1102 | { "(cancelled)","(gecancelt)" }, |
1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1104 | { " Local time "," Locale Zeit " }, | 1104 | { " Local time "," Locale Zeit " }, |
1105 | { "Form2","Form2" }, | 1105 | { "Form2","Form2" }, |
1106 | { "Filter enabled","Filter angeschaltet" }, | 1106 | { "Filter enabled","Filter angeschaltet" }, |
1107 | { "Edit Filters","Ändere Filter" }, | 1107 | { "Edit Filters","Ändere Filter" }, |
1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1109 | { "Agenda","Agenda" }, | 1109 | { "Agenda","Agenda" }, |
1110 | { " ("," (" }, | 1110 | { " ("," (" }, |
1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1112 | { "Print","Print" }, | 1112 | { "Print","Print" }, |
1113 | { "&Setup Printer...","Drucker &Setup..." }, | 1113 | { "&Setup Printer...","Drucker &Setup..." }, |
1114 | { "View Type","Zeige Typ" }, | 1114 | { "View Type","Zeige Typ" }, |
1115 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1115 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1118 | { "Portrait","Portrait" }, | 1118 | { "Portrait","Portrait" }, |
1119 | { "Landscape","Landschaft" }, | 1119 | { "Landscape","Landschaft" }, |
1120 | { "Print day","Drucke Tag" }, | 1120 | { "Print day","Drucke Tag" }, |
1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1122 | { "Date && Time Range","Datum && Zeitspanne" }, | 1122 | { "Date && Time Range","Datum && Zeitspanne" }, |
1123 | { "&End date:","&Enddatum:" }, | 1123 | { "&End date:","&Enddatum:" }, |
1124 | { "&Start date:","&Startdatum:" }, | 1124 | { "&Start date:","&Startdatum:" }, |
1125 | { "Start &time:","Startzeit:" }, | 1125 | { "Start &time:","Startzeit:" }, |
1126 | { "End ti&me:","Endzeit:" }, | 1126 | { "End ti&me:","Endzeit:" }, |
1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1129 | { "Alt+D","Alt+D" }, | 1129 | { "Alt+D","Alt+D" }, |
1130 | { "&Use colors","Nutze Farben" }, | 1130 | { "&Use colors","Nutze Farben" }, |
1131 | { "Alt+U","Alt+U" }, | 1131 | { "Alt+U","Alt+U" }, |
1132 | { "Print week","Drucke Woche" }, | 1132 | { "Print week","Drucke Woche" }, |
1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1134 | { "Use &colors","Nutze Farben" }, | 1134 | { "Use &colors","Nutze Farben" }, |
1135 | { "Type of View","Typ der Ansicht" }, | 1135 | { "Type of View","Typ der Ansicht" }, |
1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1137 | { "Alt+F","Alt+F" }, | 1137 | { "Alt+F","Alt+F" }, |
1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1139 | { "Alt+T","Alt+T" }, | 1139 | { "Alt+T","Alt+T" }, |
1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1141 | { "Print month","Drucke Monat" }, | 1141 | { "Print month","Drucke Monat" }, |
1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1143 | { "&Start month:","&Startmonat:" }, | 1143 | { "&Start month:","&Startmonat:" }, |
1144 | { "&End month:","&Endmonat:" }, | 1144 | { "&End month:","&Endmonat:" }, |
1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1146 | { "Print todos","Drucke Todos" }, | 1146 | { "Print todos","Drucke Todos" }, |
1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1151 | { "Items to Print","Zu druckende Items" }, | 1151 | { "Items to Print","Zu druckende Items" }, |
1152 | { "&From:","Von:" }, | 1152 | { "&From:","Von:" }, |
1153 | { "&To:","Bis:" }, | 1153 | { "&To:","Bis:" }, |
1154 | { "Print &all todo items","Drucke alle Todo Items" }, | 1154 | { "Print &all todo items","Drucke alle Todo Items" }, |
1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1157 | { "Todo List","Todo Liste" }, | 1157 | { "Todo List","Todo Liste" }, |
1158 | { "&Title:","&Titel:" }, | 1158 | { "&Title:","&Titel:" }, |
1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, | 1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, |
1160 | { "Todo list","Todo Liste" }, | 1160 | { "Todo list","Todo Liste" }, |
1161 | { "&Print...","Drucke..." }, | 1161 | { "&Print...","Drucke..." }, |
1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1163 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1163 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1164 | { "OK","OK" }, | 1164 | { "OK","OK" }, |
1165 | { "FilterEditor","FilterEditor" }, | 1165 | { "FilterEditor","FilterEditor" }, |
1166 | { "Include","Inclusive" }, | 1166 | { "Include","Inclusive" }, |
1167 | { "Exclude","Exclusive" }, | 1167 | { "Exclude","Exclusive" }, |
1168 | { "Edit Selection...","Editiere Auswahl" }, | 1168 | { "Edit Selection...","Editiere Auswahl" }, |
1169 | { "recurring events","wiederholende Termine" }, | 1169 | { "recurring events","wiederholende Termine" }, |
1170 | { "recurr. events","wiederh.Termine" }, | 1170 | { "recurr. events","wiederh.Termine" }, |
1171 | { "completed to-dos","erledigte Todos" }, | 1171 | { "completed to-dos","erledigte Todos" }, |
1172 | { "events","Termine" }, | 1172 | { "events","Termine" }, |
1173 | { "todos","Todos" }, | 1173 | { "todos","Todos" }, |
1174 | { "journals","Journale" }, | 1174 | { "journals","Journale" }, |
1175 | { "public","öffentl." }, | 1175 | { "public","öffentl." }, |
1176 | { "private","privat" }, | 1176 | { "private","privat" }, |
1177 | { "confidential","vertraul." }, | 1177 | { "confidential","vertraul." }, |
1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, | 1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, |
1179 | { "Yesterday","Gestern" }, | 1179 | { "Yesterday","Gestern" }, |
1180 | { "Day after tomorrow","Übermorgen" }, | 1180 | { "Day after tomorrow","Übermorgen" }, |
1181 | { "Tomorrow","Morgen" }, | 1181 | { "Tomorrow","Morgen" }, |
1182 | { "Day before yesterday","Vorgestern" }, | 1182 | { "Day before yesterday","Vorgestern" }, |
1183 | { "Size %1","Größe %1" }, | 1183 | { "Size %1","Größe %1" }, |
1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1185 | { " (%1 y.)"," (%1 J.)" }, | 1185 | { " (%1 y.)"," (%1 J.)" }, |
1186 | { "Allday:","Ganztägig:" }, | 1186 | { "Allday:","Ganztägig:" }, |
1187 | { "compl.todos","erled.Todos" }, | 1187 | { "compl.todos","erled.Todos" }, |
1188 | { "Day view","Tagesansicht" }, | 1188 | { "Day view","Tagesansicht" }, |
1189 | { "Next days","Nächste Tage" }, | 1189 | { "Next days","Nächste Tage" }, |
1190 | { "Next week","Nächste Woche" }, | 1190 | { "Next week","Nächste Woche" }, |
1191 | { "Next two weeks","Nächste zwei Wochen" }, | 1191 | { "Next two weeks","Nächste zwei Wochen" }, |
1192 | { "This month","Dieser Monat" }, | 1192 | { "This month","Dieser Monat" }, |
1193 | { "Journal view","Journal" }, | 1193 | { "Journal view","Journal" }, |
1194 | { "Display all opened","Zeige alle geöffnet" }, | 1194 | { "Display all opened","Zeige alle geöffnet" }, |
1195 | { "Display all closed","Zeige alle geschlossen" }, | 1195 | { "Display all closed","Zeige alle geschlossen" }, |
1196 | { "Display all flat","Zeige alle flach" }, | 1196 | { "Display all flat","Zeige alle flach" }, |
1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1200 | { "Select Week","Wähle Woche" }, | 1200 | { "Select Week","Wähle Woche" }, |
1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1202 | { "Set Alarm!","Setze Alarm!" }, | 1202 | { "Set Alarm!","Setze Alarm!" }, |
1203 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, | 1203 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, |
1204 | { " and "," und " }, | 1204 | { " and "," und " }, |
1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1206 | { "Mail to selected","Mail an Ausgewählte" }, | 1206 | { "Mail to selected","Mail an Ausgewählte" }, |
1207 | { "Mail to all","Mail an Alle" }, | 1207 | { "Mail to all","Mail an Alle" }, |
1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1210 | { " on"," am" }, | 1210 | { " on"," am" }, |
1211 | { " completed on "," erledigt am " }, | 1211 | { " completed on "," erledigt am " }, |
1212 | { "Save as Event template","Speichere als Vorlage" }, | 1212 | { "Save as Event template","Speichere als Vorlage" }, |
1213 | { "Load Event template","Lade Termin Vorlage" }, | 1213 | { "Load Event template","Lade Termin Vorlage" }, |
1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1216 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1216 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1217 | { "Parent todo:<br>","Über Todo:<br>" }, | 1217 | { "Parent todo:<br>","Über Todo:<br>" }, |
1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1219 | { " completed"," erledigt" }, | 1219 | { " completed"," erledigt" }, |
1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, | 1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, |
1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1226 | { "Error","Fehler" }, | 1226 | { "Error","Fehler" }, |
1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1229 | { "Warning","Warnung" }, | 1229 | { "Warning","Warnung" }, |
1230 | { "Select week number","Wähle Wochen Nummer" }, | 1230 | { "Select week number","Wähle Wochen Nummer" }, |
1231 | { "Februar","Februar" }, | 1231 | { "Februar","Februar" }, |
1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1233 | { "W","W" }, | 1233 | { "W","W" }, |
1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1235 | { "T: %1","T: %1" }, | 1235 | { "T: %1","T: %1" }, |
1236 | { "Start: ","Start: " }, | 1236 | { "Start: ","Start: " }, |
1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1239 | { "Remote IP address:","Ferne IP Adresse:" }, | 1239 | { "Remote IP address:","Ferne IP Adresse:" }, |
1240 | { "Remote port number:","Ferne Port Nummer:" }, | 1240 | { "Remote port number:","Ferne Port Nummer:" }, |
1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1242 | { "Remote from: ","Fern von: " }, | 1242 | { "Remote from: ","Fern von: " }, |
1243 | { "Local from: ","Lokal von: " }, | 1243 | { "Local from: ","Lokal von: " }, |
1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1246 | { "Write back","Schreibe zurück" }, | 1246 | { "Write back","Schreibe zurück" }, |
1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1249 | { "Received sync request","Sync Anfrage erhalten" }, | 1249 | { "Received sync request","Sync Anfrage erhalten" }, |
1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1253 | { "Sending file...","Sende Datei..." }, | 1253 | { "Sending file...","Sende Datei..." }, |
1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1256 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1256 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1257 | { "Writing file to disk...","Speichere Datei..." }, | 1257 | { "Writing file to disk...","Speichere Datei..." }, |
1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1260 | { "Synchronize!","Synchronisiere!" }, | 1260 | { "Synchronize!","Synchronisiere!" }, |
1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1266 | { "List week view","Listenwochenansicht" }, | 1266 | { "List week view","Listenwochenansicht" }, |
1267 | { "List week","Listenwochenansicht" }, | 1267 | { "List week","Listenwochenansicht" }, |
1268 | { "Next Week","Nächste Woche" }, | 1268 | { "Next Week","Nächste Woche" }, |
1269 | { "Previous Week","Vorherige Woche" }, | 1269 | { "Previous Week","Vorherige Woche" }, |
1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1272 | { "Details","Details" }, | 1272 | { "Details","Details" }, |
1273 | { "Created time","Erstellt Zeit" }, | 1273 | { "Created time","Erstellt Zeit" }, |
1274 | { "Last modified time","Geändert Zeit" }, | 1274 | { "Last modified time","Geändert Zeit" }, |
1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1276 | { "View Options","Anzeige Optionen" }, | 1276 | { "View Options","Anzeige Optionen" }, |
1277 | { "<b>Created: ","<b>Erstellt am: " }, | 1277 | { "<b>Created: ","<b>Erstellt am: " }, |
1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1279 | { "Journal: ","Journal: " }, | 1279 | { "Journal: ","Journal: " }, |
1280 | { "yearly","jährlich" }, | 1280 | { "yearly","jährlich" }, |
1281 | { "(%1) ","%1-" }, | 1281 | { "(%1) ","%1-" }, |
1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1285 | { "Summary/Loc.","Titel/Ort" }, | 1285 | { "Summary/Loc.","Titel/Ort" }, |
1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1287 | { "Week Number","Wochennummer" }, | 1287 | { "Week Number","Wochennummer" }, |
1288 | { "Import","Importiere" }, | 1288 | { "Import","Importiere" }, |
1289 | { "Export","Exportiere" }, | 1289 | { "Export","Exportiere" }, |
1290 | { "Beam","Beame" }, | 1290 | { "Beam","Beame" }, |
1291 | { "Export selected","Exportiere Selektierte" }, | 1291 | { "Export selected","Exportiere Selektierte" }, |
1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1294 | { "Journal/Details...","Journale/Details..." }, | 1294 | { "Journal/Details...","Journale/Details..." }, |
1295 | { "Agenda View","Agenda Ansicht" }, | 1295 | { "Agenda View","Agenda Ansicht" }, |
1296 | { "Show current time","Zeige aktuelle Zeit" }, | 1296 | { "Show current time","Zeige aktuelle Zeit" }, |
1297 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1297 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, | 1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, |
1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1302 | { "%1 days\n","%1 Tagen\n" }, | 1302 | { "%1 days\n","%1 Tagen\n" }, |
1303 | { "1 day\n","1 Tag\n" }, | 1303 | { "1 day\n","1 Tag\n" }, |
1304 | { "%1 hours\n","%1 Stunden\n" }, | 1304 | { "%1 hours\n","%1 Stunden\n" }, |
1305 | { "1 hour\n","1 Stunde\n" }, | 1305 | { "1 hour\n","1 Stunde\n" }, |
1306 | { "%1 minutes\n","%1 Minuten\n" }, | 1306 | { "%1 minutes\n","%1 Minuten\n" }, |
1307 | { "1 minute\n","1 Minute\n" }, | 1307 | { "1 minute\n","1 Minute\n" }, |
1308 | { "Only one toolbar","Nur eine Toolbar" }, | 1308 | { "Only one toolbar","Nur eine Toolbar" }, |
1309 | { "Print","Drucke" }, | 1309 | { "Print","Drucke" }, |
1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, | 1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, |
1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1316 | { "Print unscaled","Drucke unskaliert" }, | 1316 | { "Print unscaled","Drucke unskaliert" }, |
1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1319 | { "Printout Mode","Druck Modus" }, | 1319 | { "Printout Mode","Druck Modus" }, |
1320 | { "Filter menu icon","Filtermenu Icon" }, | 1320 | { "Filter menu icon","Filtermenu Icon" }, |
1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, | 1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, |
1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, | 1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, |
1323 | { "%1d","%1t" }, | 1323 | { "%1d","%1t" }, |
1324 | { "%1h","%1std" }, | 1324 | { "%1h","%1std" }, |
1325 | { "%1min","%1min" }, | 1325 | { "%1min","%1min" }, |
1326 | { "( %1 before )","( %1 vorher )" }, | 1326 | { "( %1 before )","( %1 vorher )" }, |
1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1330 | { "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" }, | 1330 | { "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" }, |
1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1333 | { " on "," am " }, | 1333 | { " on "," am " }, |
1334 | { "On: ","Am: " }, | 1334 | { "On: ","Am: " }, |
1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1337 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1337 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, | 1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, |
1339 | { "Todo is started","Todo is gestarted" }, | 1339 | { "Todo is started","Todo is gestarted" }, |
1340 | { "Stop todo","Stoppe Todo" }, | 1340 | { "Stop todo","Stoppe Todo" }, |
1341 | { "Todo is stopped","Todo ist gestoppt" }, | 1341 | { "Todo is stopped","Todo ist gestoppt" }, |
1342 | { "Start todo","Starte Todo" }, | 1342 | { "Start todo","Starte Todo" }, |
1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, | 1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, | 1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, |
1345 | { "Todo has subtodos","Todo hat Untertodos" }, | 1345 | { "Todo has subtodos","Todo hat Untertodos" }, |
1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1347 | { "Colors","Farben" }, | 1347 | { "Colors","Farben" }, |
1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1354 | { "times","Zeiten" }, | 1354 | { "times","Zeiten" }, |
1355 | { "","" }, | 1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, |
1356 | { "","" }, | 1356 | { "","" }, |
1357 | { "","" }, | 1357 | { "","" }, |
1358 | { "","" }, | 1358 | { "","" }, |
1359 | { "","" }, | 1359 | { "","" }, |
1360 | { "","" }, | 1360 | { "","" }, |
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index 4a1576a..e86b4d0 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -1,503 +1,503 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qtooltip.h> | 24 | #include <qtooltip.h> |
25 | #include <qfiledialog.h> | 25 | #include <qfiledialog.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qvbox.h> | 27 | #include <qvbox.h> |
28 | #include <qbuttongroup.h> | 28 | #include <qbuttongroup.h> |
29 | #include <qvgroupbox.h> | 29 | #include <qvgroupbox.h> |
30 | #include <qwidgetstack.h> | 30 | #include <qwidgetstack.h> |
31 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | 33 | ||
34 | #include <kglobal.h> | 34 | #include <kglobal.h> |
35 | #include <klocale.h> | 35 | #include <klocale.h> |
36 | #include <kiconloader.h> | 36 | #include <kiconloader.h> |
37 | #include <kmessagebox.h> | 37 | #include <kmessagebox.h> |
38 | #include <kdebug.h> | 38 | #include <kdebug.h> |
39 | #include <krestrictedline.h> | 39 | #include <krestrictedline.h> |
40 | #include <kstandarddirs.h> | 40 | #include <kstandarddirs.h> |
41 | #include <kfiledialog.h> | 41 | #include <kfiledialog.h> |
42 | #include <kdialog.h> | ||
42 | 43 | ||
43 | #include <libkcal/todo.h> | 44 | #include <libkcal/todo.h> |
44 | 45 | ||
45 | #include <libkdepim/kdateedit.h> | 46 | #include <libkdepim/kdateedit.h> |
46 | 47 | ||
47 | #include "koprefs.h" | 48 | #include "koprefs.h" |
48 | #include "ktimeedit.h" | 49 | #include "ktimeedit.h" |
49 | 50 | ||
50 | #include "koeditorgeneraltodo.h" | 51 | #include "koeditorgeneraltodo.h" |
51 | #include "kolocationbox.h" | 52 | #include "kolocationbox.h" |
52 | 53 | ||
53 | KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, | 54 | KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, |
54 | const char* name) | 55 | const char* name) |
55 | : KOEditorGeneral( parent, name) | 56 | : KOEditorGeneral( parent, name) |
56 | { | 57 | { |
57 | } | 58 | } |
58 | 59 | ||
59 | KOEditorGeneralTodo::~KOEditorGeneralTodo() | 60 | KOEditorGeneralTodo::~KOEditorGeneralTodo() |
60 | { | 61 | { |
61 | } | 62 | } |
62 | 63 | ||
63 | void KOEditorGeneralTodo::finishSetup() | 64 | void KOEditorGeneralTodo::finishSetup() |
64 | { | 65 | { |
65 | 66 | ||
66 | // QWidget::setTabOrder(mSummaryEdit, mLocationEdit); | 67 | // QWidget::setTabOrder(mSummaryEdit, mLocationEdit); |
67 | // QWidget::setTabOrder(mLocationEdit, mDueCheck); | 68 | // QWidget::setTabOrder(mLocationEdit, mDueCheck); |
68 | // QWidget::setTabOrder(mDueCheck, mDueDateEdit); | 69 | // QWidget::setTabOrder(mDueCheck, mDueDateEdit); |
69 | // QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); | 70 | // QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); |
70 | // QWidget::setTabOrder(mDueTimeEdit, mStartCheck); | 71 | // QWidget::setTabOrder(mDueTimeEdit, mStartCheck); |
71 | // QWidget::setTabOrder(mStartCheck, mStartDateEdit); | 72 | // QWidget::setTabOrder(mStartCheck, mStartDateEdit); |
72 | // QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); | 73 | // QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); |
73 | // QWidget::setTabOrder(mStartTimeEdit, mTimeButton); | 74 | // QWidget::setTabOrder(mStartTimeEdit, mTimeButton); |
74 | // QWidget::setTabOrder(mTimeButton, mCompletedCombo); | 75 | // QWidget::setTabOrder(mTimeButton, mCompletedCombo); |
75 | // QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); | 76 | // QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); |
76 | // QWidget::setTabOrder(mPriorityCombo, mAlarmButton); | 77 | // QWidget::setTabOrder(mPriorityCombo, mAlarmButton); |
77 | // QWidget::setTabOrder(mAlarmButton, mCategoriesButton); | 78 | // QWidget::setTabOrder(mAlarmButton, mCategoriesButton); |
78 | // QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); | 79 | // QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); |
79 | // QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); | 80 | // QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); |
80 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); | 81 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); |
81 | mSummaryEdit->setFocus(); | 82 | mSummaryEdit->setFocus(); |
82 | } | 83 | } |
83 | 84 | ||
84 | void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) | 85 | void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) |
85 | { | 86 | { |
86 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); | 87 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); |
87 | 88 | ||
88 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, | 89 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, |
89 | i18n("Date && Time"),parent); | 90 | i18n("Date && Time"),parent); |
90 | timeLayout->addWidget(timeGroupBox); | 91 | timeLayout->addWidget(timeGroupBox); |
91 | timeGroupBox->layout()->setSpacing( 0 ); | 92 | timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() ); |
92 | timeGroupBox->layout()->setMargin( 5 ); | 93 | timeGroupBox->layout()->setMargin( KDialog::marginHint() ); |
93 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); | 94 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); |
94 | 95 | ||
95 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); | 96 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); |
96 | layoutTimeBox->setSpacing(topLayout->spacing()); | 97 | layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); |
97 | layoutTimeBox->setColStretch( 1, 1 ); | 98 | layoutTimeBox->setColStretch( 1, 1 ); |
98 | 99 | ||
99 | mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); | 100 | mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); |
100 | layoutTimeBox->addWidget(mDueCheck,0,0); | 101 | layoutTimeBox->addWidget(mDueCheck,1,0); |
101 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); | 102 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); |
102 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); | 103 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); |
103 | 104 | ||
104 | 105 | ||
105 | mDueDateEdit = new KDateEdit(timeBoxFrame); | 106 | mDueDateEdit = new KDateEdit(timeBoxFrame); |
106 | layoutTimeBox->addWidget(mDueDateEdit,0,1); | 107 | layoutTimeBox->addWidget(mDueDateEdit,1,1); |
107 | 108 | ||
108 | mDueTimeEdit = new KOTimeEdit(timeBoxFrame); | 109 | mDueTimeEdit = new KOTimeEdit(timeBoxFrame); |
109 | layoutTimeBox->addWidget(mDueTimeEdit,0,2); | 110 | layoutTimeBox->addWidget(mDueTimeEdit,1,2); |
110 | 111 | ||
111 | 112 | ||
112 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); | 113 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); |
113 | layoutTimeBox->addWidget(mStartCheck,1,0); | 114 | layoutTimeBox->addWidget(mStartCheck,0,0); |
114 | connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); | 115 | connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); |
115 | 116 | ||
116 | mStartDateEdit = new KDateEdit(timeBoxFrame); | 117 | mStartDateEdit = new KDateEdit(timeBoxFrame); |
117 | layoutTimeBox->addWidget(mStartDateEdit,1,1); | 118 | layoutTimeBox->addWidget(mStartDateEdit,0,1); |
118 | 119 | ||
119 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); | 120 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); |
120 | layoutTimeBox->addWidget(mStartTimeEdit,1,2); | 121 | layoutTimeBox->addWidget(mStartTimeEdit,0,2); |
121 | 122 | ||
122 | 123 | ||
123 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); | 124 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); |
124 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); | 125 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); |
125 | 126 | ||
126 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); | 127 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); |
127 | connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); | 128 | connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); |
128 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); | 129 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); |
129 | 130 | ||
130 | // some more layouting | 131 | // some more layouting |
131 | //layoutTimeBox->setColStretch(3,1); | 132 | //layoutTimeBox->setColStretch(3,1); |
132 | } | 133 | } |
133 | 134 | ||
134 | 135 | ||
135 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | 136 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) |
136 | { | 137 | { |
137 | mCompletedCombo = new QComboBox(parent); | 138 | mCompletedCombo = new QComboBox(parent); |
138 | // xgettext:no-c-format | 139 | // xgettext:no-c-format |
139 | mCompletedCombo->insertItem(i18n(" 0 %")); | 140 | mCompletedCombo->insertItem(i18n(" 0 %")); |
140 | // xgettext:no-c-format | 141 | // xgettext:no-c-format |
141 | mCompletedCombo->insertItem(i18n(" 20 %")); | 142 | mCompletedCombo->insertItem(i18n(" 20 %")); |
142 | // xgettext:no-c-format | 143 | // xgettext:no-c-format |
143 | mCompletedCombo->insertItem(i18n(" 40 %")); | 144 | mCompletedCombo->insertItem(i18n(" 40 %")); |
144 | // xgettext:no-c-format | 145 | // xgettext:no-c-format |
145 | mCompletedCombo->insertItem(i18n(" 60 %")); | 146 | mCompletedCombo->insertItem(i18n(" 60 %")); |
146 | // xgettext:no-c-format | 147 | // xgettext:no-c-format |
147 | mCompletedCombo->insertItem(i18n(" 80 %")); | 148 | mCompletedCombo->insertItem(i18n(" 80 %")); |
148 | // xgettext:no-c-format | 149 | // xgettext:no-c-format |
149 | mCompletedCombo->insertItem(i18n("100 %")); | 150 | mCompletedCombo->insertItem(i18n("100 %")); |
150 | connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); | 151 | connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); |
151 | topLayout->addWidget(mCompletedCombo); | 152 | topLayout->addWidget(mCompletedCombo); |
152 | 153 | ||
153 | mCompletedLabel = new QLabel(i18n("completed"),parent); | 154 | mCompletedLabel = new QLabel(i18n("completed"),parent); |
154 | topLayout->addWidget(mCompletedLabel); | 155 | topLayout->addWidget(mCompletedLabel); |
155 | 156 | ||
156 | mCompleteDateEdit = new KDateEdit(parent); | 157 | mCompleteDateEdit = new KDateEdit(parent); |
157 | topLayout->addWidget(mCompleteDateEdit ); | 158 | topLayout->addWidget(mCompleteDateEdit ); |
158 | 159 | ||
159 | mCompleteTimeEdit = new KOTimeEdit(parent); | 160 | mCompleteTimeEdit = new KOTimeEdit(parent); |
160 | topLayout->addWidget( mCompleteTimeEdit); | 161 | topLayout->addWidget( mCompleteTimeEdit); |
161 | 162 | ||
162 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); | 163 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); |
163 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); | 164 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); |
164 | connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime))); | 165 | connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime))); |
165 | 166 | ||
166 | if ( QApplication::desktop()->width() <= 480 ) { | 167 | if ( QApplication::desktop()->width() <= 480 ) { |
167 | if ( QApplication::desktop()->width() < 320 ) | 168 | if ( QApplication::desktop()->width() < 320 ) |
168 | mCompleteDateEdit->setMaximumWidth( 85 ); | 169 | mCompleteDateEdit->setMaximumWidth( 85 ); |
169 | else | 170 | else |
170 | mCompleteDateEdit->setMaximumWidth( 140 ); | 171 | mCompleteDateEdit->setMaximumWidth( 140 ); |
171 | topLayout->setSpacing( 0 ); | 172 | topLayout->setSpacing( 0 ); |
172 | } | 173 | } |
173 | } | 174 | } |
174 | 175 | ||
175 | void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) | 176 | void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) |
176 | { | 177 | { |
177 | 178 | ||
178 | QHBox* h = new QHBox ( parent ); | 179 | QHBox* h = new QHBox ( parent ); |
179 | topLayout->addWidget( h ); | 180 | topLayout->addWidget( h ); |
180 | QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); | 181 | QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); |
181 | // topLayout->addWidget(priorityLabel); | 182 | // topLayout->addWidget(priorityLabel); |
182 | mPriorityCombo = new QComboBox( h ); | 183 | mPriorityCombo = new QComboBox( h ); |
183 | mPriorityCombo->insertItem(i18n("1 (high)")); | 184 | mPriorityCombo->insertItem(i18n("1 (high)")); |
184 | mPriorityCombo->insertItem(i18n("2")); | 185 | mPriorityCombo->insertItem(i18n("2")); |
185 | mPriorityCombo->insertItem(i18n("3")); | 186 | mPriorityCombo->insertItem(i18n("3")); |
186 | mPriorityCombo->insertItem(i18n("4")); | 187 | mPriorityCombo->insertItem(i18n("4")); |
187 | mPriorityCombo->insertItem(i18n("5 (low)")); | 188 | mPriorityCombo->insertItem(i18n("5 (low)")); |
188 | //topLayout->addWidget(mPriorityCombo); | 189 | //topLayout->addWidget(mPriorityCombo); |
189 | } | 190 | } |
190 | 191 | ||
191 | void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) | 192 | void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) |
192 | { | 193 | { |
193 | QBoxLayout *statusLayout = new QHBoxLayout(topLayout); | 194 | QBoxLayout *statusLayout = new QHBoxLayout(topLayout); |
194 | 195 | ||
195 | initCompletion( parent, statusLayout ); | 196 | initCompletion( parent, statusLayout ); |
196 | 197 | ||
197 | statusLayout->addStretch( 1 ); | 198 | statusLayout->addStretch( 1 ); |
198 | 199 | ||
199 | initPriority( parent, statusLayout ); | 200 | initPriority( parent, statusLayout ); |
200 | } | 201 | } |
201 | 202 | ||
202 | void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) | 203 | void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) |
203 | { | 204 | { |
204 | 205 | ||
205 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); | 206 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); |
206 | mLocationEdit->load(KOLocationBox::LOCATION); | 207 | mLocationEdit->load(KOLocationBox::LOCATION); |
207 | KOEditorGeneral::setDefaults(allDay); | 208 | KOEditorGeneral::setDefaults(allDay); |
208 | 209 | ||
209 | mTimeButton->setChecked( !allDay ); | 210 | mTimeButton->setChecked( !allDay ); |
210 | if(mTimeButton->isChecked()) { | 211 | if(mTimeButton->isChecked()) { |
211 | mTimeButton->setEnabled(true); | 212 | mTimeButton->setEnabled(true); |
212 | } | 213 | } |
213 | else { | 214 | else { |
214 | mTimeButton->setEnabled(false); | 215 | mTimeButton->setEnabled(false); |
215 | } | 216 | } |
216 | 217 | ||
217 | enableTimeEdits( !allDay ); | 218 | enableTimeEdits( !allDay ); |
218 | if ( due.isValid() ) { | 219 | if ( due.isValid() ) { |
219 | mDueCheck->setChecked(true); | 220 | mDueCheck->setChecked(true); |
220 | enableDueEdit(true); | 221 | enableDueEdit(true); |
221 | alarmDisable(false); | 222 | alarmDisable(false); |
222 | } else { | 223 | } else { |
223 | mDueCheck->setChecked(false); | 224 | mDueCheck->setChecked(false); |
224 | enableDueEdit(false); | 225 | enableDueEdit(false); |
225 | due = QDateTime::currentDateTime().addDays(7); | 226 | due = QDateTime::currentDateTime().addDays(7); |
226 | alarmDisable(true); | 227 | alarmDisable(true); |
227 | } | 228 | } |
228 | 229 | ||
229 | 230 | ||
230 | mStartCheck->setChecked(false); | 231 | mStartCheck->setChecked(false); |
231 | enableStartEdit(false); | 232 | enableStartEdit(false); |
232 | 233 | ||
233 | mDueDateEdit->setDate(due.date()); | 234 | mDueDateEdit->setDate(due.date()); |
234 | mDueTimeEdit->setTime(due.time()); | 235 | mDueTimeEdit->setTime(due.time()); |
235 | due = due.addDays(-7); | 236 | due = due.addDays(-7); |
236 | mStartDateEdit->setDate(due.date()); | 237 | mStartDateEdit->setDate(due.date()); |
237 | mStartTimeEdit->setTime(due.time()); | 238 | mStartTimeEdit->setTime(due.time()); |
238 | 239 | ||
239 | mPriorityCombo->setCurrentItem(2); | 240 | mPriorityCombo->setCurrentItem(2); |
240 | mCompletedLabel->setText(i18n(" completed"));; | 241 | mCompletedLabel->setText(i18n(" completed"));; |
241 | mCompletedCombo->setCurrentItem(0); | 242 | mCompletedCombo->setCurrentItem(0); |
242 | mCompleteDateEdit->hide(); | 243 | mCompleteDateEdit->hide(); |
243 | mCompleteTimeEdit->hide(); | 244 | mCompleteTimeEdit->hide(); |
244 | } | 245 | } |
245 | 246 | ||
246 | void KOEditorGeneralTodo::readTodo(Todo *todo) | 247 | void KOEditorGeneralTodo::readTodo(Todo *todo) |
247 | { | 248 | { |
248 | 249 | ||
249 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); | 250 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); |
250 | mLocationEdit->load(KOLocationBox::LOCATION); | 251 | mLocationEdit->load(KOLocationBox::LOCATION); |
251 | KOEditorGeneral::readIncidence(todo); | 252 | KOEditorGeneral::readIncidence(todo); |
252 | 253 | ||
253 | QDateTime dueDT; | 254 | QDateTime dueDT; |
254 | 255 | ||
255 | if (todo->hasDueDate()) { | 256 | if (todo->hasDueDate()) { |
256 | enableAlarmEdit(true); | 257 | enableAlarmEdit(true); |
257 | dueDT = todo->dtDue(); | 258 | dueDT = todo->dtDue(); |
258 | mDueDateEdit->setDate(todo->dtDue().date()); | 259 | mDueDateEdit->setDate(todo->dtDue().date()); |
259 | mDueTimeEdit->setTime(todo->dtDue().time()); | 260 | mDueTimeEdit->setTime(todo->dtDue().time()); |
260 | mDueCheck->setChecked(true); | 261 | mDueCheck->setChecked(true); |
261 | } else { | 262 | } else { |
262 | alarmDisable(true); | 263 | alarmDisable(true); |
263 | mDueDateEdit->setEnabled(false); | 264 | mDueDateEdit->setEnabled(false); |
264 | mDueTimeEdit->setEnabled(false); | 265 | mDueTimeEdit->setEnabled(false); |
265 | mDueDateEdit->setDate(QDate::currentDate()); | 266 | mDueDateEdit->setDate(QDate::currentDate()); |
266 | mDueTimeEdit->setTime(QTime::currentTime()); | 267 | mDueTimeEdit->setTime(QTime::currentTime()); |
267 | mDueCheck->setChecked(false); | 268 | mDueCheck->setChecked(false); |
268 | } | 269 | } |
269 | 270 | ||
270 | if (todo->hasStartDate()) { | 271 | if (todo->hasStartDate()) { |
271 | mStartDateEdit->setDate(todo->dtStart().date()); | 272 | mStartDateEdit->setDate(todo->dtStart().date()); |
272 | mStartTimeEdit->setTime(todo->dtStart().time()); | 273 | mStartTimeEdit->setTime(todo->dtStart().time()); |
273 | mStartCheck->setChecked(true); | 274 | mStartCheck->setChecked(true); |
274 | } else { | 275 | } else { |
275 | mStartDateEdit->setEnabled(false); | 276 | mStartDateEdit->setEnabled(false); |
276 | mStartTimeEdit->setEnabled(false); | 277 | mStartTimeEdit->setEnabled(false); |
277 | mStartDateEdit->setDate(QDate::currentDate()); | 278 | mStartDateEdit->setDate(QDate::currentDate()); |
278 | mStartTimeEdit->setTime(QTime::currentTime()); | 279 | mStartTimeEdit->setTime(QTime::currentTime()); |
279 | mStartCheck->setChecked(false); | 280 | mStartCheck->setChecked(false); |
280 | } | 281 | } |
281 | 282 | ||
282 | mTimeButton->setChecked( !todo->doesFloat() ); | 283 | mTimeButton->setChecked( !todo->doesFloat() ); |
283 | 284 | ||
284 | mCompletedCombo->setCurrentItem(todo->percentComplete() / 20); | 285 | mCompletedCombo->setCurrentItem(todo->percentComplete() / 20); |
285 | if (todo->isCompleted() && todo->hasCompletedDate()) { | 286 | if (todo->isCompleted() && todo->hasCompletedDate()) { |
286 | mCompleted = todo->completed(); | 287 | mCompleted = todo->completed(); |
287 | } | 288 | } |
288 | setCompletedDate(); | 289 | setCompletedDate(); |
289 | 290 | ||
290 | mPriorityCombo->setCurrentItem(todo->priority()-1); | 291 | mPriorityCombo->setCurrentItem(todo->priority()-1); |
291 | } | 292 | } |
292 | 293 | ||
293 | void KOEditorGeneralTodo::writeTodo(Todo *todo) | 294 | void KOEditorGeneralTodo::writeTodo(Todo *todo) |
294 | { | 295 | { |
295 | KOEditorGeneral::writeIncidence(todo); | 296 | KOEditorGeneral::writeIncidence(todo); |
296 | 297 | ||
297 | // temp. until something better happens. | 298 | // temp. until something better happens. |
298 | QString tmpStr; | 299 | QString tmpStr; |
299 | 300 | ||
300 | todo->setHasDueDate(mDueCheck->isChecked()); | 301 | todo->setHasDueDate(mDueCheck->isChecked()); |
301 | todo->setHasStartDate(mStartCheck->isChecked()); | 302 | todo->setHasStartDate(mStartCheck->isChecked()); |
302 | 303 | ||
303 | QDate tmpDate; | 304 | QDate tmpDate; |
304 | QTime tmpTime; | 305 | QTime tmpTime; |
305 | QDateTime tmpDT; | 306 | QDateTime tmpDT; |
306 | if ( mTimeButton->isChecked() ) { | 307 | if ( mTimeButton->isChecked() ) { |
307 | todo->setFloats(false); | 308 | todo->setFloats(false); |
308 | 309 | ||
309 | // set due date/time | 310 | // set due date/time |
310 | tmpDate = mDueDateEdit->date(); | 311 | tmpDate = mDueDateEdit->date(); |
311 | tmpTime = mDueTimeEdit->getTime(); | 312 | tmpTime = mDueTimeEdit->getTime(); |
312 | tmpDT.setDate(tmpDate); | 313 | tmpDT.setDate(tmpDate); |
313 | tmpDT.setTime(tmpTime); | 314 | tmpDT.setTime(tmpTime); |
314 | todo->setDtDue(tmpDT); | 315 | todo->setDtDue(tmpDT); |
315 | 316 | ||
316 | // set start date/time | 317 | // set start date/time |
317 | tmpDate = mStartDateEdit->date(); | 318 | tmpDate = mStartDateEdit->date(); |
318 | tmpTime = mStartTimeEdit->getTime(); | 319 | tmpTime = mStartTimeEdit->getTime(); |
319 | tmpDT.setDate(tmpDate); | 320 | tmpDT.setDate(tmpDate); |
320 | tmpDT.setTime(tmpTime); | 321 | tmpDT.setTime(tmpTime); |
321 | todo->setDtStart(tmpDT); | 322 | todo->setDtStart(tmpDT); |
322 | } else { | 323 | } else { |
323 | todo->setFloats(true); | 324 | todo->setFloats(true); |
324 | 325 | ||
325 | // need to change this. | 326 | // need to change this. |
326 | tmpDate = mDueDateEdit->date(); | 327 | tmpDate = mDueDateEdit->date(); |
327 | tmpTime.setHMS(0,0,0); | 328 | tmpTime.setHMS(0,0,0); |
328 | tmpDT.setDate(tmpDate); | 329 | tmpDT.setDate(tmpDate); |
329 | tmpDT.setTime(tmpTime); | 330 | tmpDT.setTime(tmpTime); |
330 | todo->setDtDue(tmpDT); | 331 | todo->setDtDue(tmpDT); |
331 | 332 | ||
332 | tmpDate = mStartDateEdit->date(); | 333 | tmpDate = mStartDateEdit->date(); |
333 | tmpTime.setHMS(0,0,0); | 334 | tmpTime.setHMS(0,0,0); |
334 | tmpDT.setDate(tmpDate); | 335 | tmpDT.setDate(tmpDate); |
335 | tmpDT.setTime(tmpTime); | 336 | tmpDT.setTime(tmpTime); |
336 | todo->setDtStart(tmpDT); | 337 | todo->setDtStart(tmpDT); |
337 | } | 338 | } |
338 | todo->setPriority(mPriorityCombo->currentItem()+1); | 339 | todo->setPriority(mPriorityCombo->currentItem()+1); |
339 | 340 | ||
340 | // set completion state | 341 | // set completion state |
341 | if ( mCompletedCombo->currentItem() == 5 ) { | 342 | if ( mCompletedCombo->currentItem() == 5 ) { |
342 | QDateTime comp ( mCompleteDateEdit->date(), mCompleteTimeEdit->getTime() ); | 343 | QDateTime comp ( mCompleteDateEdit->date(), mCompleteTimeEdit->getTime() ); |
343 | if ( comp.isValid () ) { | 344 | if ( comp.isValid () ) { |
344 | todo->setPercentComplete(0); | ||
345 | todo->setPercentComplete(100); | 345 | todo->setPercentComplete(100); |
346 | todo->setCompleted(comp); | 346 | todo->setCompleted(comp); |
347 | } else { | 347 | } else { |
348 | todo->setPercentComplete( 100 ); | 348 | todo->setPercentComplete( 100 ); |
349 | if ( mCompleted.isValid() ) | 349 | if ( mCompleted.isValid() ) |
350 | todo->setCompleted(mCompleted); | 350 | todo->setCompleted(mCompleted); |
351 | } | 351 | } |
352 | } else { | 352 | } else { |
353 | todo->setPercentComplete(mCompletedCombo->currentItem() * 20); | 353 | todo->setPercentComplete(mCompletedCombo->currentItem() * 20); |
354 | } | 354 | } |
355 | 355 | ||
356 | mSummaryEdit->save(KOLocationBox::SUMMARYTODO); | 356 | mSummaryEdit->save(KOLocationBox::SUMMARYTODO); |
357 | } | 357 | } |
358 | 358 | ||
359 | void KOEditorGeneralTodo::enableDueEdit(bool enable) | 359 | void KOEditorGeneralTodo::enableDueEdit(bool enable) |
360 | { | 360 | { |
361 | mDueDateEdit->setEnabled( enable ); | 361 | mDueDateEdit->setEnabled( enable ); |
362 | 362 | ||
363 | if(mDueCheck->isChecked() || mStartCheck->isChecked()) { | 363 | if(mDueCheck->isChecked() || mStartCheck->isChecked()) { |
364 | mTimeButton->setEnabled(true); | 364 | mTimeButton->setEnabled(true); |
365 | } | 365 | } |
366 | else { | 366 | else { |
367 | mTimeButton->setEnabled(false); | 367 | mTimeButton->setEnabled(false); |
368 | mTimeButton->setChecked(false); | 368 | mTimeButton->setChecked(false); |
369 | } | 369 | } |
370 | 370 | ||
371 | if (enable) { | 371 | if (enable) { |
372 | mDueTimeEdit->setEnabled( mTimeButton->isChecked() ); | 372 | mDueTimeEdit->setEnabled( mTimeButton->isChecked() ); |
373 | } else { | 373 | } else { |
374 | mDueTimeEdit->setEnabled( false ); | 374 | mDueTimeEdit->setEnabled( false ); |
375 | } | 375 | } |
376 | emit datesChecked(); | 376 | emit datesChecked(); |
377 | } | 377 | } |
378 | 378 | ||
379 | void KOEditorGeneralTodo::enableStartEdit( bool enable ) | 379 | void KOEditorGeneralTodo::enableStartEdit( bool enable ) |
380 | { | 380 | { |
381 | mStartDateEdit->setEnabled( enable ); | 381 | mStartDateEdit->setEnabled( enable ); |
382 | 382 | ||
383 | if(mDueCheck->isChecked() || mStartCheck->isChecked()) { | 383 | if(mDueCheck->isChecked() || mStartCheck->isChecked()) { |
384 | mTimeButton->setEnabled(true); | 384 | mTimeButton->setEnabled(true); |
385 | } | 385 | } |
386 | else { | 386 | else { |
387 | mTimeButton->setEnabled(false); | 387 | mTimeButton->setEnabled(false); |
388 | mTimeButton->setChecked(false); | 388 | mTimeButton->setChecked(false); |
389 | } | 389 | } |
390 | 390 | ||
391 | if (enable) { | 391 | if (enable) { |
392 | mStartTimeEdit->setEnabled( mTimeButton->isChecked() ); | 392 | mStartTimeEdit->setEnabled( mTimeButton->isChecked() ); |
393 | } else { | 393 | } else { |
394 | mStartTimeEdit->setEnabled( false ); | 394 | mStartTimeEdit->setEnabled( false ); |
395 | } | 395 | } |
396 | emit datesChecked(); | 396 | emit datesChecked(); |
397 | } | 397 | } |
398 | 398 | ||
399 | void KOEditorGeneralTodo::enableTimeEdits(bool enable) | 399 | void KOEditorGeneralTodo::enableTimeEdits(bool enable) |
400 | { | 400 | { |
401 | if(mStartCheck->isChecked()) { | 401 | if(mStartCheck->isChecked()) { |
402 | mStartTimeEdit->setEnabled( enable ); | 402 | mStartTimeEdit->setEnabled( enable ); |
403 | } | 403 | } |
404 | if(mDueCheck->isChecked()) { | 404 | if(mDueCheck->isChecked()) { |
405 | mDueTimeEdit->setEnabled( enable ); | 405 | mDueTimeEdit->setEnabled( enable ); |
406 | } | 406 | } |
407 | } | 407 | } |
408 | 408 | ||
409 | void KOEditorGeneralTodo::showAlarm() | 409 | void KOEditorGeneralTodo::showAlarm() |
410 | { | 410 | { |
411 | if ( mDueCheck->isChecked() ) { | 411 | if ( mDueCheck->isChecked() ) { |
412 | alarmDisable(false); | 412 | alarmDisable(false); |
413 | } | 413 | } |
414 | else { | 414 | else { |
415 | alarmDisable(true); | 415 | alarmDisable(true); |
416 | } | 416 | } |
417 | } | 417 | } |
418 | 418 | ||
419 | bool KOEditorGeneralTodo::validateInput() | 419 | bool KOEditorGeneralTodo::validateInput() |
420 | { | 420 | { |
421 | if (mDueCheck->isChecked()) { | 421 | if (mDueCheck->isChecked()) { |
422 | if (!mDueDateEdit->inputIsValid()) { | 422 | if (!mDueDateEdit->inputIsValid()) { |
423 | KMessageBox::sorry(0,i18n("Please specify a valid due date.")); | 423 | KMessageBox::sorry(0,i18n("Please specify a valid due date.")); |
424 | return false; | 424 | return false; |
425 | } | 425 | } |
426 | } | 426 | } |
427 | 427 | ||
428 | if (mStartCheck->isChecked()) { | 428 | if (mStartCheck->isChecked()) { |
429 | if (!mStartDateEdit->inputIsValid()) { | 429 | if (!mStartDateEdit->inputIsValid()) { |
430 | KMessageBox::sorry(0,i18n("Please specify a valid start date.")); | 430 | KMessageBox::sorry(0,i18n("Please specify a valid start date.")); |
431 | return false; | 431 | return false; |
432 | } | 432 | } |
433 | } | 433 | } |
434 | 434 | ||
435 | if (mStartCheck->isChecked() && mDueCheck->isChecked()) { | 435 | if (mStartCheck->isChecked() && mDueCheck->isChecked()) { |
436 | QDateTime startDate; | 436 | QDateTime startDate; |
437 | QDateTime dueDate; | 437 | QDateTime dueDate; |
438 | startDate.setDate(mStartDateEdit->date()); | 438 | startDate.setDate(mStartDateEdit->date()); |
439 | dueDate.setDate(mDueDateEdit->date()); | 439 | dueDate.setDate(mDueDateEdit->date()); |
440 | if (mTimeButton->isChecked()) { | 440 | if (mTimeButton->isChecked()) { |
441 | startDate.setTime(mStartTimeEdit->getTime()); | 441 | startDate.setTime(mStartTimeEdit->getTime()); |
442 | dueDate.setTime(mDueTimeEdit->getTime()); | 442 | dueDate.setTime(mDueTimeEdit->getTime()); |
443 | } | 443 | } |
444 | if (startDate > dueDate) { | 444 | if (startDate > dueDate) { |
445 | KMessageBox::sorry(0, | 445 | KMessageBox::sorry(0, |
446 | i18n("The start date cannot be after the due date.")); | 446 | i18n("The start date cannot be after the due date.")); |
447 | return false; | 447 | return false; |
448 | } | 448 | } |
449 | } | 449 | } |
450 | 450 | ||
451 | return KOEditorGeneral::validateInput(); | 451 | return KOEditorGeneral::validateInput(); |
452 | } | 452 | } |
453 | 453 | ||
454 | void KOEditorGeneralTodo::completedChanged(int index) | 454 | void KOEditorGeneralTodo::completedChanged(int index) |
455 | { | 455 | { |
456 | if (index == 5) { | 456 | if (index == 5) { |
457 | //get rid of milli sec | 457 | //get rid of milli sec |
458 | mCompleted = QDateTime::currentDateTime(); | 458 | mCompleted = QDateTime::currentDateTime(); |
459 | } | 459 | } |
460 | setCompletedDate(); | 460 | setCompletedDate(); |
461 | } | 461 | } |
462 | 462 | ||
463 | void KOEditorGeneralTodo::setCompletedDate() | 463 | void KOEditorGeneralTodo::setCompletedDate() |
464 | { | 464 | { |
465 | if (mCompletedCombo->currentItem() == 5 && mCompleted.isValid()) { | 465 | if (mCompletedCombo->currentItem() == 5 && mCompleted.isValid()) { |
466 | if ( QApplication::desktop()->width() < 480 ) { | 466 | if ( QApplication::desktop()->width() < 480 ) { |
467 | mCompletedLabel->setText(i18n(" on")); | 467 | mCompletedLabel->setText(i18n(" on")); |
468 | } | 468 | } |
469 | else | 469 | else |
470 | mCompletedLabel->setText(i18n(" completed on ")); | 470 | mCompletedLabel->setText(i18n(" completed on ")); |
471 | mCompleteDateEdit->show(); | 471 | mCompleteDateEdit->show(); |
472 | mCompleteTimeEdit->show(); | 472 | mCompleteTimeEdit->show(); |
473 | mCompleteTimeEdit->setTime( mCompleted.time() ); | 473 | mCompleteTimeEdit->setTime( mCompleted.time() ); |
474 | mCompleteDateEdit->setDate( mCompleted.date() ); | 474 | mCompleteDateEdit->setDate( mCompleted.date() ); |
475 | } else { | 475 | } else { |
476 | mCompletedLabel->setText(i18n(" completed")); | 476 | mCompletedLabel->setText(i18n(" completed")); |
477 | mCompleteDateEdit->hide(); | 477 | mCompleteDateEdit->hide(); |
478 | mCompleteTimeEdit->hide(); | 478 | mCompleteTimeEdit->hide(); |
479 | } | 479 | } |
480 | } | 480 | } |
481 | 481 | ||
482 | void KOEditorGeneralTodo::modified (Todo* todo, int modification) | 482 | void KOEditorGeneralTodo::modified (Todo* todo, int modification) |
483 | { | 483 | { |
484 | switch (modification) { | 484 | switch (modification) { |
485 | case KOGlobals::PRIORITY_MODIFIED: | 485 | case KOGlobals::PRIORITY_MODIFIED: |
486 | mPriorityCombo->setCurrentItem(todo->priority()-1); | 486 | mPriorityCombo->setCurrentItem(todo->priority()-1); |
487 | break; | 487 | break; |
488 | case KOGlobals::COMPLETION_MODIFIED: | 488 | case KOGlobals::COMPLETION_MODIFIED: |
489 | mCompletedCombo->setCurrentItem(todo->percentComplete() / 20); | 489 | mCompletedCombo->setCurrentItem(todo->percentComplete() / 20); |
490 | if (todo->isCompleted() && todo->hasCompletedDate()) { | 490 | if (todo->isCompleted() && todo->hasCompletedDate()) { |
491 | mCompleted = todo->completed(); | 491 | mCompleted = todo->completed(); |
492 | } | 492 | } |
493 | setCompletedDate(); | 493 | setCompletedDate(); |
494 | break; | 494 | break; |
495 | case KOGlobals::CATEGORY_MODIFIED: | 495 | case KOGlobals::CATEGORY_MODIFIED: |
496 | setCategories (todo->categoriesStr ()); | 496 | setCategories (todo->categoriesStr ()); |
497 | break; | 497 | break; |
498 | case KOGlobals::UNKNOWN_MODIFIED: // fall through | 498 | case KOGlobals::UNKNOWN_MODIFIED: // fall through |
499 | default: | 499 | default: |
500 | readTodo( todo ); | 500 | readTodo( todo ); |
501 | break; | 501 | break; |
502 | } | 502 | } |
503 | } | 503 | } |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index bbf83d9..fd86095 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -1,1254 +1,1255 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1999 Preston Brown | 3 | Copyright (c) 1999 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qlistview.h> | 25 | #include <qlistview.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qfileinfo.h> | 30 | #include <qfileinfo.h> |
31 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qwhatsthis.h> | 35 | #include <qwhatsthis.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | 37 | ||
38 | #include <klocale.h> | 38 | #include <klocale.h> |
39 | #include <kdebug.h> | 39 | #include <kdebug.h> |
40 | #include <kiconloader.h> | 40 | #include <kiconloader.h> |
41 | #include <kglobal.h> | 41 | #include <kglobal.h> |
42 | 42 | ||
43 | #include <libkdepim/kpimglobalprefs.h> | 43 | #include <libkdepim/kpimglobalprefs.h> |
44 | #include <libkcal/calendar.h> | 44 | #include <libkcal/calendar.h> |
45 | #include <libkcal/calendarlocal.h> | 45 | #include <libkcal/calendarlocal.h> |
46 | #include <libkcal/icalformat.h> | 46 | #include <libkcal/icalformat.h> |
47 | #include <libkcal/vcalformat.h> | 47 | #include <libkcal/vcalformat.h> |
48 | #include <libkcal/recurrence.h> | 48 | #include <libkcal/recurrence.h> |
49 | #include <libkcal/filestorage.h> | 49 | #include <libkcal/filestorage.h> |
50 | #include <libkdepim/categoryselectdialog.h> | 50 | #include <libkdepim/categoryselectdialog.h> |
51 | #include <libkcal/kincidenceformatter.h> | 51 | #include <libkcal/kincidenceformatter.h> |
52 | #ifndef DESKTOP_VERSION | 52 | #ifndef DESKTOP_VERSION |
53 | #include <qpe/qpeapplication.h> | 53 | #include <qpe/qpeapplication.h> |
54 | #else | 54 | #else |
55 | #include <qapplication.h> | 55 | #include <qapplication.h> |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #ifndef KORG_NOPRINTER | 58 | #ifndef KORG_NOPRINTER |
59 | #include "calprinter.h" | 59 | #include "calprinter.h" |
60 | #endif | 60 | #endif |
61 | #include "koglobals.h" | 61 | #include "koglobals.h" |
62 | #include "koprefs.h" | 62 | #include "koprefs.h" |
63 | #include "kfiledialog.h" | 63 | #include "kfiledialog.h" |
64 | 64 | ||
65 | #include "kolistview.h" | 65 | #include "kolistview.h" |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | class KOListViewWhatsThis :public QWhatsThis | 70 | class KOListViewWhatsThis :public QWhatsThis |
71 | { | 71 | { |
72 | public: | 72 | public: |
73 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 73 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; |
74 | 74 | ||
75 | protected: | 75 | protected: |
76 | virtual QString text( const QPoint& p) | 76 | virtual QString text( const QPoint& p) |
77 | { | 77 | { |
78 | return _view->getWhatsThisText(p) ; | 78 | return _view->getWhatsThisText(p) ; |
79 | } | 79 | } |
80 | private: | 80 | private: |
81 | QWidget* _wid; | 81 | QWidget* _wid; |
82 | KOListView * _view; | 82 | KOListView * _view; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | 85 | ||
86 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) | 86 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) |
87 | { | 87 | { |
88 | mItem = item; | 88 | mItem = item; |
89 | mDate = date; | 89 | mDate = date; |
90 | } | 90 | } |
91 | 91 | ||
92 | ListItemVisitor::~ListItemVisitor() | 92 | ListItemVisitor::~ListItemVisitor() |
93 | { | 93 | { |
94 | } | 94 | } |
95 | 95 | ||
96 | bool ListItemVisitor::visit(Event *e) | 96 | bool ListItemVisitor::visit(Event *e) |
97 | { | 97 | { |
98 | bool ok = false; | 98 | bool ok = false; |
99 | QString start, end; | 99 | QString start, end; |
100 | QDate ds, de; | 100 | QDate ds, de; |
101 | if ( e->doesRecur() ) { | 101 | if ( e->doesRecur() ) { |
102 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); | 102 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); |
103 | if ( ok ) { | 103 | if ( ok ) { |
104 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); | 104 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); |
105 | start = KGlobal::locale()->formatDate(ds,true); | 105 | start = KGlobal::locale()->formatDate(ds,true); |
106 | de = ds.addDays( days); | 106 | de = ds.addDays( days); |
107 | end = KGlobal::locale()->formatDate(de,true); | 107 | end = KGlobal::locale()->formatDate(de,true); |
108 | } | 108 | } |
109 | 109 | ||
110 | } | 110 | } |
111 | if ( ! ok ) { | 111 | if ( ! ok ) { |
112 | start =e->dtStartDateStr(); | 112 | start =e->dtStartDateStr(); |
113 | end = e->dtEndDateStr(); | 113 | end = e->dtEndDateStr(); |
114 | ds = e->dtStart().date(); | 114 | ds = e->dtStart().date(); |
115 | de = e->dtEnd().date(); | 115 | de = e->dtEnd().date(); |
116 | } | 116 | } |
117 | mItem->setText(0,e->summary()); | 117 | mItem->setText(0,e->summary()); |
118 | mItem->setText(1,start); | 118 | mItem->setText(1,start); |
119 | if ( e->doesFloat() ) | 119 | if ( e->doesFloat() ) |
120 | mItem->setText(2,"---"); | 120 | mItem->setText(2,"---"); |
121 | else | 121 | else |
122 | mItem->setText(2,e->dtStartTimeStr()); | 122 | mItem->setText(2,e->dtStartTimeStr()); |
123 | mItem->setText(3,end); | 123 | mItem->setText(3,end); |
124 | if ( e->doesFloat() ) | 124 | if ( e->doesFloat() ) |
125 | mItem->setText(4,"---"); | 125 | mItem->setText(4,"---"); |
126 | else | 126 | else |
127 | mItem->setText(4,e->dtEndTimeStr()); | 127 | mItem->setText(4,e->dtEndTimeStr()); |
128 | if ( e->isAlarmEnabled() ) { | 128 | if ( e->isAlarmEnabled() ) { |
129 | mItem->setText(5,e->alarms().first()->offsetText() ); | 129 | mItem->setText(5,e->alarms().first()->offsetText() ); |
130 | } else { | 130 | } else { |
131 | mItem->setText(5, i18n("No")); | 131 | mItem->setText(5, i18n("No")); |
132 | } | 132 | } |
133 | mItem->setText(6, e->recurrence()->recurrenceText()); | 133 | mItem->setText(6, e->recurrence()->recurrenceText()); |
134 | if( ! e->doesRecur() ) | 134 | if( ! e->doesRecur() ) |
135 | mItem->setSortKey( 6, "-" ); | 135 | mItem->setSortKey( 6, "-" ); |
136 | mItem->setText(7,"---"); | 136 | mItem->setText(7,"---"); |
137 | mItem->setText(8,"---"); | 137 | mItem->setText(8,"---"); |
138 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); | 138 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); |
139 | mItem->setText(10,e->categoriesStr()); | 139 | mItem->setText(10,e->categoriesStr()); |
140 | 140 | ||
141 | QString key; | 141 | QString key; |
142 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); | 142 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); |
143 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); | 143 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); |
144 | mItem->setSortKey(1,key); | 144 | mItem->setSortKey(1,key); |
145 | 145 | ||
146 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); | 146 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); |
147 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); | 147 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); |
148 | mItem->setSortKey(3,key); | 148 | mItem->setSortKey(3,key); |
149 | return true; | 149 | return true; |
150 | } | 150 | } |
151 | 151 | ||
152 | bool ListItemVisitor::visit(Todo *t) | 152 | bool ListItemVisitor::visit(Todo *t) |
153 | { | 153 | { |
154 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); | 154 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); |
155 | if (t->hasStartDate()) { | 155 | if (t->hasStartDate()) { |
156 | mItem->setText(1,t->dtStartDateStr()); | 156 | mItem->setText(1,t->dtStartDateStr()); |
157 | if (t->doesFloat()) { | 157 | if (t->doesFloat()) { |
158 | mItem->setText(2,"---"); | 158 | mItem->setText(2,"---"); |
159 | } else { | 159 | } else { |
160 | mItem->setText(2,t->dtStartTimeStr()); | 160 | mItem->setText(2,t->dtStartTimeStr()); |
161 | } | 161 | } |
162 | } else { | 162 | } else { |
163 | mItem->setText(1,"---"); | 163 | mItem->setText(1,"---"); |
164 | mItem->setText(2,"---"); | 164 | mItem->setText(2,"---"); |
165 | } | 165 | } |
166 | mItem->setText(3,"---"); | 166 | mItem->setText(3,"---"); |
167 | mItem->setText(4,"---"); | 167 | mItem->setText(4,"---"); |
168 | if ( t->isAlarmEnabled() ) { | 168 | if ( t->isAlarmEnabled() ) { |
169 | mItem->setText(5,t->alarms().first()->offsetText() ); | 169 | mItem->setText(5,t->alarms().first()->offsetText() ); |
170 | } else { | 170 | } else { |
171 | mItem->setText(5, i18n("No")); | 171 | mItem->setText(5, i18n("No")); |
172 | } | 172 | } |
173 | mItem->setText(6, t->recurrence()->recurrenceText()); | 173 | mItem->setText(6, t->recurrence()->recurrenceText()); |
174 | if( ! t->doesRecur() ) | 174 | if( ! t->doesRecur() ) |
175 | mItem->setSortKey( 6, "-" ); | 175 | mItem->setSortKey( 6, "-" ); |
176 | if (t->hasDueDate()) { | 176 | if (t->hasDueDate()) { |
177 | mItem->setText(7,t->dtDueDateStr()); | 177 | mItem->setText(7,t->dtDueDateStr()); |
178 | if (t->doesFloat()) { | 178 | if (t->doesFloat()) { |
179 | mItem->setText(8,"---"); | 179 | mItem->setText(8,"---"); |
180 | } else { | 180 | } else { |
181 | mItem->setText(8,t->dtDueTimeStr()); | 181 | mItem->setText(8,t->dtDueTimeStr()); |
182 | } | 182 | } |
183 | } else { | 183 | } else { |
184 | mItem->setText(7,"---"); | 184 | mItem->setText(7,"---"); |
185 | mItem->setText(8,"---"); | 185 | mItem->setText(8,"---"); |
186 | } | 186 | } |
187 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); | 187 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); |
188 | mItem->setText(10,t->categoriesStr()); | 188 | mItem->setText(10,t->categoriesStr()); |
189 | 189 | ||
190 | QString key; | 190 | QString key; |
191 | QDate d; | 191 | QDate d; |
192 | if (t->hasDueDate()) { | 192 | if (t->hasDueDate()) { |
193 | d = t->dtDue().date(); | 193 | d = t->dtDue().date(); |
194 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); | 194 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); |
195 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 195 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
196 | mItem->setSortKey(7,key); | 196 | mItem->setSortKey(7,key); |
197 | } | 197 | } |
198 | if ( t->hasStartDate() ) { | 198 | if ( t->hasStartDate() ) { |
199 | d = t->dtStart().date(); | 199 | d = t->dtStart().date(); |
200 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); | 200 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); |
201 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 201 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
202 | mItem->setSortKey(1,key); | 202 | mItem->setSortKey(1,key); |
203 | } | 203 | } |
204 | return true; | 204 | return true; |
205 | } | 205 | } |
206 | 206 | ||
207 | bool ListItemVisitor::visit(Journal * j) | 207 | bool ListItemVisitor::visit(Journal * j) |
208 | { | 208 | { |
209 | QString des = j->description().left(30); | 209 | QString des = j->description().left(30); |
210 | des = des.simplifyWhiteSpace (); | 210 | des = des.simplifyWhiteSpace (); |
211 | des.replace (QRegExp ("\\n"),"" ); | 211 | des.replace (QRegExp ("\\n"),"" ); |
212 | des.replace (QRegExp ("\\r"),"" ); | 212 | des.replace (QRegExp ("\\r"),"" ); |
213 | mItem->setText(0,i18n("Journal: ")+des.left(25)); | 213 | mItem->setText(0,i18n("Journal: ")+des.left(25)); |
214 | mItem->setText(1,j->dtStartDateStr()); | 214 | mItem->setText(1,j->dtStartDateStr()); |
215 | mItem->setText(2,"---"); | 215 | mItem->setText(2,"---"); |
216 | mItem->setText(3,"---"); | 216 | mItem->setText(3,"---"); |
217 | mItem->setText(4,"---"); | 217 | mItem->setText(4,"---"); |
218 | mItem->setText(5,"---"); | 218 | mItem->setText(5,"---"); |
219 | mItem->setText(6,"---"); | 219 | mItem->setText(6,"---"); |
220 | mItem->setText(7,j->dtStartDateStr()); | 220 | mItem->setText(7,j->dtStartDateStr()); |
221 | mItem->setText(8,"---"); | 221 | mItem->setText(8,"---"); |
222 | mItem->setText(9,"---"); | 222 | mItem->setText(9,"---"); |
223 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | 223 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); |
224 | 224 | ||
225 | QString key; | 225 | QString key; |
226 | QDate d = j->dtStart().date(); | 226 | QDate d = j->dtStart().date(); |
227 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 227 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
228 | mItem->setSortKey(1,key); | 228 | mItem->setSortKey(1,key); |
229 | mItem->setSortKey(7,key); | 229 | mItem->setSortKey(7,key); |
230 | 230 | ||
231 | return true; | 231 | return true; |
232 | } | 232 | } |
233 | 233 | ||
234 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 234 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
235 | const char *name) | 235 | const char *name) |
236 | : KOEventView(calendar, parent, name) | 236 | : KOEventView(calendar, parent, name) |
237 | { | 237 | { |
238 | mActiveItem = 0; | 238 | mActiveItem = 0; |
239 | mListView = new KOListViewListView(this); | 239 | mListView = new KOListViewListView(this); |
240 | mListView->addColumn(i18n("Summary")); | 240 | mListView->addColumn(i18n("Summary")); |
241 | mListView->addColumn(i18n("Start Date")); | 241 | mListView->addColumn(i18n("Start Date")); |
242 | mListView->addColumn(i18n("Start Time")); | 242 | mListView->addColumn(i18n("Start Time")); |
243 | mListView->addColumn(i18n("End Date")); | 243 | mListView->addColumn(i18n("End Date")); |
244 | mListView->addColumn(i18n("End Time")); | 244 | mListView->addColumn(i18n("End Time")); |
245 | mListView->addColumn(i18n("Alarm")); // alarm set? | 245 | mListView->addColumn(i18n("Alarm")); // alarm set? |
246 | mListView->addColumn(i18n("Recurs")); // recurs? | 246 | mListView->addColumn(i18n("Recurs")); // recurs? |
247 | mListView->addColumn(i18n("Due Date")); | 247 | mListView->addColumn(i18n("Due Date")); |
248 | mListView->addColumn(i18n("Due Time")); | 248 | mListView->addColumn(i18n("Due Time")); |
249 | mListView->addColumn(i18n("Cancelled")); | 249 | mListView->addColumn(i18n("Cancelled")); |
250 | mListView->addColumn(i18n("Categories")); | 250 | mListView->addColumn(i18n("Categories")); |
251 | 251 | ||
252 | mListView->setColumnAlignment(0,AlignLeft); | 252 | mListView->setColumnAlignment(0,AlignLeft); |
253 | mListView->setColumnAlignment(1,AlignLeft); | 253 | mListView->setColumnAlignment(1,AlignLeft); |
254 | mListView->setColumnAlignment(2,AlignHCenter); | 254 | mListView->setColumnAlignment(2,AlignHCenter); |
255 | mListView->setColumnAlignment(3,AlignLeft); | 255 | mListView->setColumnAlignment(3,AlignLeft); |
256 | mListView->setColumnAlignment(4,AlignHCenter); | 256 | mListView->setColumnAlignment(4,AlignHCenter); |
257 | mListView->setColumnAlignment(5,AlignLeft); | 257 | mListView->setColumnAlignment(5,AlignLeft); |
258 | mListView->setColumnAlignment(6,AlignLeft); | 258 | mListView->setColumnAlignment(6,AlignLeft); |
259 | mListView->setColumnAlignment(7,AlignLeft); | 259 | mListView->setColumnAlignment(7,AlignLeft); |
260 | mListView->setColumnAlignment(8,AlignLeft); | 260 | mListView->setColumnAlignment(8,AlignLeft); |
261 | mListView->setColumnAlignment(9,AlignLeft); | 261 | mListView->setColumnAlignment(9,AlignLeft); |
262 | mListView->setColumnAlignment(10,AlignLeft); | 262 | mListView->setColumnAlignment(10,AlignLeft); |
263 | mListView->setColumnWidthMode(10, QListView::Manual); | 263 | mListView->setColumnWidthMode(10, QListView::Manual); |
264 | new KOListViewWhatsThis(mListView->viewport(),this); | 264 | new KOListViewWhatsThis(mListView->viewport(),this); |
265 | 265 | ||
266 | int iii = 0; | 266 | int iii = 0; |
267 | for ( iii = 0; iii< 10 ; ++iii ) | 267 | for ( iii = 0; iii< 10 ; ++iii ) |
268 | mListView->setColumnWidthMode( iii, QListView::Manual ); | 268 | mListView->setColumnWidthMode( iii, QListView::Manual ); |
269 | 269 | ||
270 | QBoxLayout *layoutTop = new QVBoxLayout(this); | 270 | QBoxLayout *layoutTop = new QVBoxLayout(this); |
271 | layoutTop->addWidget(mListView); | 271 | layoutTop->addWidget(mListView); |
272 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 272 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
273 | mPopupMenu = eventPopup(); | 273 | mPopupMenu = eventPopup(); |
274 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 274 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
275 | i18n("Select all"),this, | 275 | i18n("Select all"),this, |
276 | SLOT(allSelection()),true); | 276 | SLOT(allSelection()),true); |
277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
278 | i18n("Deselect all"),this, | 278 | i18n("Deselect all"),this, |
279 | SLOT(clearSelection()),true); | 279 | SLOT(clearSelection()),true); |
280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
281 | i18n("Delete all selected"),this, | 281 | i18n("Delete all selected"),this, |
282 | SLOT(deleteAll()),true); | 282 | SLOT(deleteAll()),true); |
283 | mPopupMenu->insertSeparator(); | 283 | mPopupMenu->insertSeparator(); |
284 | QPopupMenu * exportPO = new QPopupMenu ( this ); | 284 | QPopupMenu * exportPO = new QPopupMenu ( this ); |
285 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); | 285 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); |
286 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, | 286 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, |
287 | SLOT(saveToFile())); | 287 | SLOT(saveToFile())); |
288 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, | 288 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, |
289 | SLOT(saveToFileVCS())); | 289 | SLOT(saveToFileVCS())); |
290 | exportPO->insertItem( i18n("Journal/Details..."),this, | 290 | exportPO->insertItem( i18n("Journal/Details..."),this, |
291 | SLOT(saveDescriptionToFile())); | 291 | SLOT(saveDescriptionToFile())); |
292 | // mPopupMenu->insertSeparator(); | 292 | // mPopupMenu->insertSeparator(); |
293 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 293 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
294 | i18n("Add Categ. to selected..."),this, | 294 | i18n("Add Categ. to selected..."),this, |
295 | SLOT(addCat()),true); | 295 | SLOT(addCat()),true); |
296 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 296 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
297 | i18n("Set Categ. for selected..."),this, | 297 | i18n("Set Categ. for selected..."),this, |
298 | SLOT(setCat()),true); | 298 | SLOT(setCat()),true); |
299 | //mPopupMenu->insertSeparator(); | 299 | //mPopupMenu->insertSeparator(); |
300 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 300 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
301 | i18n("Set alarm for selected..."),this, | 301 | i18n("Set alarm for selected..."),this, |
302 | SLOT(setAlarm()),true); | 302 | SLOT(setAlarm()),true); |
303 | 303 | ||
304 | 304 | ||
305 | #ifndef DESKTOP_VERSION | 305 | #ifndef DESKTOP_VERSION |
306 | mPopupMenu->insertSeparator(); | 306 | mPopupMenu->insertSeparator(); |
307 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 307 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
308 | i18n("Beam selected via IR"),this, | 308 | i18n("Beam selected via IR"),this, |
309 | SLOT(beamSelected()),true); | 309 | SLOT(beamSelected()),true); |
310 | #endif | 310 | #endif |
311 | /* | 311 | /* |
312 | mPopupMenu = new QPopupMenu; | 312 | mPopupMenu = new QPopupMenu; |
313 | mPopupMenu->insertItem(i18n("Edit Event"), this, | 313 | mPopupMenu->insertItem(i18n("Edit Event"), this, |
314 | SLOT (editEvent())); | 314 | SLOT (editEvent())); |
315 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, | 315 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, |
316 | SLOT (deleteEvent())); | 316 | SLOT (deleteEvent())); |
317 | mPopupMenu->insertSeparator(); | 317 | mPopupMenu->insertSeparator(); |
318 | mPopupMenu->insertItem(i18n("Show Dates"), this, | 318 | mPopupMenu->insertItem(i18n("Show Dates"), this, |
319 | SLOT(showDates())); | 319 | SLOT(showDates())); |
320 | mPopupMenu->insertItem(i18n("Hide Dates"), this, | 320 | mPopupMenu->insertItem(i18n("Hide Dates"), this, |
321 | SLOT(hideDates())); | 321 | SLOT(hideDates())); |
322 | */ | 322 | */ |
323 | QObject::connect(mListView,SIGNAL( newEvent()), | 323 | QObject::connect(mListView,SIGNAL( newEvent()), |
324 | this,SIGNAL(signalNewEvent())); | 324 | this,SIGNAL(signalNewEvent())); |
325 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), | 325 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), |
326 | this,SLOT(defaultItemAction(QListViewItem *))); | 326 | this,SLOT(defaultItemAction(QListViewItem *))); |
327 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, | 327 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, |
328 | const QPoint &, int )), | 328 | const QPoint &, int )), |
329 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); | 329 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); |
330 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), | 330 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), |
331 | SLOT(processSelectionChange(QListViewItem *))); | 331 | SLOT(processSelectionChange(QListViewItem *))); |
332 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), | 332 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), |
333 | SIGNAL(showIncidenceSignal(Incidence *)) ); | 333 | SIGNAL(showIncidenceSignal(Incidence *)) ); |
334 | 334 | ||
335 | readSettings(KOGlobals::config(),"KOListView Layout"); | 335 | readSettings(KOGlobals::config(),"KOListView Layout"); |
336 | } | 336 | } |
337 | 337 | ||
338 | KOListView::~KOListView() | 338 | KOListView::~KOListView() |
339 | { | 339 | { |
340 | delete mPopupMenu; | 340 | delete mPopupMenu; |
341 | } | 341 | } |
342 | 342 | ||
343 | QString KOListView::getWhatsThisText(QPoint p) | 343 | QString KOListView::getWhatsThisText(QPoint p) |
344 | { | 344 | { |
345 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | 345 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); |
346 | if ( item ) | 346 | if ( item ) |
347 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), | 347 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), |
348 | KOPrefs::instance()->mWTshowDetails, | 348 | KOPrefs::instance()->mWTshowDetails, |
349 | KOPrefs::instance()->mWTshowCreated, | 349 | KOPrefs::instance()->mWTshowCreated, |
350 | KOPrefs::instance()->mWTshowChanged); | 350 | KOPrefs::instance()->mWTshowChanged); |
351 | return i18n("That is the list view" ); | 351 | return i18n("That is the list view" ); |
352 | 352 | ||
353 | } | 353 | } |
354 | 354 | ||
355 | void KOListView::updateList() | 355 | void KOListView::updateList() |
356 | { | 356 | { |
357 | // qDebug(" KOListView::updateList() "); | 357 | // qDebug(" KOListView::updateList() "); |
358 | 358 | ||
359 | } | 359 | } |
360 | 360 | ||
361 | void KOListView::addCat( ) | 361 | void KOListView::addCat( ) |
362 | { | 362 | { |
363 | setCategories( false ); | 363 | setCategories( false ); |
364 | } | 364 | } |
365 | void KOListView::setCat() | 365 | void KOListView::setCat() |
366 | { | 366 | { |
367 | setCategories( true ); | 367 | setCategories( true ); |
368 | } | 368 | } |
369 | void KOListView::setAlarm() | 369 | void KOListView::setAlarm() |
370 | { | 370 | { |
371 | KOAlarmPrefs kap( this); | 371 | KOAlarmPrefs kap( this); |
372 | if ( !kap.exec() ) | 372 | if ( !kap.exec() ) |
373 | return; | 373 | return; |
374 | |||
375 | |||
376 | QStringList itemList; | 374 | QStringList itemList; |
377 | QPtrList<KOListViewItem> sel ; | 375 | QPtrList<KOListViewItem> sel ; |
378 | QListViewItem *qitem = mListView->firstChild (); | 376 | QListViewItem *qitem = mListView->firstChild (); |
379 | while ( qitem ) { | 377 | while ( qitem ) { |
380 | if ( qitem->isSelected() ) { | 378 | if ( qitem->isSelected() ) { |
381 | Incidence* inc = ((KOListViewItem *) qitem)->data(); | 379 | Incidence* inc = ((KOListViewItem *) qitem)->data(); |
382 | if ( inc->type() != "Journal" ) { | 380 | if ( inc->type() != "Journal" ) { |
383 | if ( inc->type() == "Todo" ) { | 381 | if ( inc->type() == "Todo" ) { |
384 | if ( ((Todo*)inc)->hasDueDate() ) | 382 | if ( ((Todo*)inc)->hasDueDate() ) |
385 | sel.append(((KOListViewItem *)qitem)); | 383 | sel.append(((KOListViewItem *)qitem)); |
386 | } else | 384 | } else |
387 | sel.append(((KOListViewItem *)qitem)); | 385 | sel.append(((KOListViewItem *)qitem)); |
388 | } | 386 | } |
389 | } | 387 | } |
390 | qitem = qitem->nextSibling(); | 388 | qitem = qitem->nextSibling(); |
391 | } | 389 | } |
392 | int count = 0; | 390 | int count = 0; |
393 | KOListViewItem * item, *temp; | 391 | KOListViewItem * item, *temp; |
394 | item = sel.first(); | 392 | item = sel.first(); |
395 | Incidence* inc; | 393 | Incidence* inc; |
396 | while ( item ) { | 394 | while ( item ) { |
397 | inc = item->data(); | 395 | inc = item->data(); |
398 | ++count; | 396 | ++count; |
399 | if (kap.mAlarmButton->isChecked()) { | 397 | if (kap.mAlarmButton->isChecked()) { |
400 | if (inc->alarms().count() == 0) | 398 | if (inc->alarms().count() == 0) |
401 | inc->newAlarm(); | 399 | inc->newAlarm(); |
402 | QPtrList<Alarm> alarms = inc->alarms(); | 400 | QPtrList<Alarm> alarms = inc->alarms(); |
403 | Alarm *alarm; | 401 | Alarm *alarm; |
404 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { | 402 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { |
405 | alarm->setEnabled(true); | 403 | alarm->setEnabled(true); |
406 | int j = kap.mAlarmTimeEdit->value()* -60; | 404 | int j = kap.mAlarmTimeEdit->value()* -60; |
407 | if (kap.mAlarmIncrCombo->currentItem() == 1) | 405 | if (kap.mAlarmIncrCombo->currentItem() == 1) |
408 | j = j * 60; | 406 | j = j * 60; |
409 | else if (kap.mAlarmIncrCombo->currentItem() == 2) | 407 | else if (kap.mAlarmIncrCombo->currentItem() == 2) |
410 | j = j * (60 * 24); | 408 | j = j * (60 * 24); |
411 | alarm->setStartOffset( j ); | 409 | alarm->setStartOffset( j ); |
412 | 410 | ||
413 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { | 411 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { |
414 | alarm->setProcedureAlarm(kap.mAlarmProgram); | 412 | alarm->setProcedureAlarm(kap.mAlarmProgram); |
415 | } | 413 | } |
416 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) | 414 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) |
417 | alarm->setAudioAlarm(kap.mAlarmSound); | 415 | alarm->setAudioAlarm(kap.mAlarmSound); |
418 | else | 416 | else |
419 | alarm->setType(Alarm::Invalid); | 417 | alarm->setType(Alarm::Invalid); |
420 | //alarm->setAudioAlarm("default"); | 418 | //alarm->setAudioAlarm("default"); |
421 | // TODO: Deal with multiple alarms | 419 | // TODO: Deal with multiple alarms |
422 | break; // For now, stop after the first alarm | 420 | break; // For now, stop after the first alarm |
423 | } | 421 | } |
424 | } else { | 422 | } else { |
425 | Alarm* alarm = inc->alarms().first(); | 423 | Alarm* alarm = inc->alarms().first(); |
426 | if ( alarm ) { | 424 | if ( alarm ) { |
427 | alarm->setEnabled(false); | 425 | alarm->setEnabled(false); |
428 | alarm->setType(Alarm::Invalid); | 426 | alarm->setType(Alarm::Invalid); |
429 | } | 427 | } |
430 | } | 428 | } |
431 | temp = item; | 429 | ListItemVisitor v(item, mStartDate ); |
432 | item = sel.next(); | 430 | inc->accept(v); |
433 | mUidDict.remove( inc->uid() ); | 431 | item = sel.next(); |
434 | delete temp;; | ||
435 | addIncidence( inc ); | ||
436 | } | 432 | } |
437 | topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) ); | 433 | topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) ); |
438 | qDebug("KO: Set alarm for %d items", count); | 434 | qDebug("KO: Set alarm for %d items", count); |
439 | calendar()->reInitAlarmSettings(); | 435 | calendar()->reInitAlarmSettings(); |
440 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 436 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
441 | } | 437 | } |
442 | void KOListView::setCategories( bool removeOld ) | 438 | void KOListView::setCategories( bool removeOld ) |
443 | { | 439 | { |
444 | 440 | ||
445 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); | 441 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); |
442 | csd->setColorEnabled(); | ||
446 | if (! csd->exec()) { | 443 | if (! csd->exec()) { |
447 | delete csd; | 444 | delete csd; |
448 | return; | 445 | return; |
449 | } | 446 | } |
450 | QStringList catList = csd->selectedCategories(); | 447 | QStringList catList = csd->selectedCategories(); |
451 | delete csd; | 448 | delete csd; |
452 | // if ( catList.count() == 0 ) | 449 | // if ( catList.count() == 0 ) |
453 | // return; | 450 | // return; |
454 | catList.sort(); | 451 | //catList.sort(); |
455 | QString categoriesStr = catList.join(","); | 452 | QString categoriesStr = catList.join(","); |
456 | int i; | 453 | int i; |
457 | QStringList itemList; | 454 | QStringList itemList; |
458 | QPtrList<KOListViewItem> sel ; | 455 | QPtrList<KOListViewItem> sel ; |
459 | QListViewItem *qitem = mListView->firstChild (); | 456 | QListViewItem *qitem = mListView->firstChild (); |
460 | while ( qitem ) { | 457 | while ( qitem ) { |
461 | if ( qitem->isSelected() ) { | 458 | if ( qitem->isSelected() ) { |
462 | sel.append(((KOListViewItem *)qitem)); | 459 | sel.append(((KOListViewItem *)qitem)); |
463 | } | 460 | } |
464 | qitem = qitem->nextSibling(); | 461 | qitem = qitem->nextSibling(); |
465 | } | 462 | } |
466 | KOListViewItem * item, *temp; | 463 | KOListViewItem * item, *temp; |
467 | item = sel.first(); | 464 | item = sel.first(); |
468 | Incidence* inc; | 465 | if( item ) { |
469 | while ( item ) { | 466 | Incidence* inc = item->data() ; |
470 | inc = item->data(); | 467 | bool setSub = false; |
471 | if ( removeOld ) { | 468 | if( inc->type() == "Todo" && sel.count() == 1 && inc->relations().count() > 0 ) { |
472 | inc->setCategories( categoriesStr ); | 469 | int result = KMessageBox::warningYesNoCancel(this, |
473 | } else { | 470 | i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), |
474 | itemList = QStringList::split (",", inc->categoriesStr() ); | 471 | i18n("Todo has subtodos"), |
475 | for( i = 0; i< catList.count(); ++i ) { | 472 | i18n("Yes"), |
476 | if ( !itemList.contains (catList[i])) | 473 | i18n("No")); |
477 | itemList.append( catList[i] ); | 474 | if (result == KMessageBox::Cancel) item = 0; |
478 | } | 475 | if (result == KMessageBox::Yes) setSub = true; |
479 | itemList.sort(); | 476 | } |
480 | inc->setCategories( itemList.join(",") ); | 477 | while ( item ) { |
478 | inc = item->data(); | ||
479 | if ( removeOld ) { | ||
480 | inc->setCategories( catList, setSub ); | ||
481 | } else { | ||
482 | inc->addCategories( catList, setSub ); | ||
483 | } | ||
484 | ListItemVisitor v(item, mStartDate ); | ||
485 | inc->accept(v); | ||
486 | item = sel.next(); | ||
481 | } | 487 | } |
482 | temp = item; | ||
483 | item = sel.next(); | ||
484 | mUidDict.remove( inc->uid() ); | ||
485 | delete temp;; | ||
486 | addIncidence( inc ); | ||
487 | } | 488 | } |
488 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 489 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
489 | } | 490 | } |
490 | 491 | ||
491 | void KOListView::beamSelected() | 492 | void KOListView::beamSelected() |
492 | { | 493 | { |
493 | int icount = 0; | 494 | int icount = 0; |
494 | QPtrList<Incidence> delSel ; | 495 | QPtrList<Incidence> delSel ; |
495 | QListViewItem *item = mListView->firstChild (); | 496 | QListViewItem *item = mListView->firstChild (); |
496 | while ( item ) { | 497 | while ( item ) { |
497 | if ( item->isSelected() ) { | 498 | if ( item->isSelected() ) { |
498 | delSel.append(((KOListViewItem *)item)->data()); | 499 | delSel.append(((KOListViewItem *)item)->data()); |
499 | ++icount; | 500 | ++icount; |
500 | } | 501 | } |
501 | 502 | ||
502 | item = item->nextSibling(); | 503 | item = item->nextSibling(); |
503 | } | 504 | } |
504 | if ( icount ) { | 505 | if ( icount ) { |
505 | emit beamIncidenceList( delSel ); | 506 | emit beamIncidenceList( delSel ); |
506 | return; | 507 | return; |
507 | QString fn ; | 508 | QString fn ; |
508 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; | 509 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; |
509 | QString mes; | 510 | QString mes; |
510 | bool createbup = true; | 511 | bool createbup = true; |
511 | if ( createbup ) { | 512 | if ( createbup ) { |
512 | QString description = "\n"; | 513 | QString description = "\n"; |
513 | CalendarLocal* cal = new CalendarLocal(); | 514 | CalendarLocal* cal = new CalendarLocal(); |
514 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 515 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
515 | Incidence *incidence = delSel.first(); | 516 | Incidence *incidence = delSel.first(); |
516 | while ( incidence ) { | 517 | while ( incidence ) { |
517 | Incidence *in = incidence->clone(); | 518 | Incidence *in = incidence->clone(); |
518 | description += in->summary() + "\n"; | 519 | description += in->summary() + "\n"; |
519 | cal->addIncidence( in ); | 520 | cal->addIncidence( in ); |
520 | incidence = delSel.next(); | 521 | incidence = delSel.next(); |
521 | } | 522 | } |
522 | FileStorage storage( cal, fn, new VCalFormat ); | 523 | FileStorage storage( cal, fn, new VCalFormat ); |
523 | storage.save(); | 524 | storage.save(); |
524 | delete cal; | 525 | delete cal; |
525 | mes = i18n("KO/Pi: Ready for beaming"); | 526 | mes = i18n("KO/Pi: Ready for beaming"); |
526 | topLevelWidget()->setCaption(mes); | 527 | topLevelWidget()->setCaption(mes); |
527 | 528 | ||
528 | #ifndef DESKTOP_VERSION | 529 | #ifndef DESKTOP_VERSION |
529 | Ir *ir = new Ir( this ); | 530 | Ir *ir = new Ir( this ); |
530 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 531 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
531 | ir->send( fn, description, "text/x-vCalendar" ); | 532 | ir->send( fn, description, "text/x-vCalendar" ); |
532 | #endif | 533 | #endif |
533 | } | 534 | } |
534 | } | 535 | } |
535 | } | 536 | } |
536 | void KOListView::beamDone( Ir *ir ) | 537 | void KOListView::beamDone( Ir *ir ) |
537 | { | 538 | { |
538 | #ifndef DESKTOP_VERSION | 539 | #ifndef DESKTOP_VERSION |
539 | delete ir; | 540 | delete ir; |
540 | #endif | 541 | #endif |
541 | topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); | 542 | topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); |
542 | } | 543 | } |
543 | 544 | ||
544 | void KOListView::saveDescriptionToFile() | 545 | void KOListView::saveDescriptionToFile() |
545 | { | 546 | { |
546 | 547 | ||
547 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), | 548 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), |
548 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), | 549 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), |
549 | i18n("Continue"), i18n("Cancel"), 0, | 550 | i18n("Continue"), i18n("Cancel"), 0, |
550 | 0, 1 ); | 551 | 0, 1 ); |
551 | if ( result != 0 ) { | 552 | if ( result != 0 ) { |
552 | return; | 553 | return; |
553 | } | 554 | } |
554 | int icount = 0; | 555 | int icount = 0; |
555 | QPtrList<Incidence> delSel ; | 556 | QPtrList<Incidence> delSel ; |
556 | QListViewItem *item = mListView->firstChild (); | 557 | QListViewItem *item = mListView->firstChild (); |
557 | while ( item ) { | 558 | while ( item ) { |
558 | if ( item->isSelected() ) { | 559 | if ( item->isSelected() ) { |
559 | delSel.append(((KOListViewItem *)item)->data()); | 560 | delSel.append(((KOListViewItem *)item)->data()); |
560 | ++icount; | 561 | ++icount; |
561 | } | 562 | } |
562 | 563 | ||
563 | item = item->nextSibling(); | 564 | item = item->nextSibling(); |
564 | } | 565 | } |
565 | if ( icount ) { | 566 | if ( icount ) { |
566 | QString fn = KOPrefs::instance()->mLastSaveFile; | 567 | QString fn = KOPrefs::instance()->mLastSaveFile; |
567 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 568 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
568 | 569 | ||
569 | if ( fn == "" ) | 570 | if ( fn == "" ) |
570 | return; | 571 | return; |
571 | QFileInfo info; | 572 | QFileInfo info; |
572 | info.setFile( fn ); | 573 | info.setFile( fn ); |
573 | QString mes; | 574 | QString mes; |
574 | bool createbup = true; | 575 | bool createbup = true; |
575 | if ( info. exists() ) { | 576 | if ( info. exists() ) { |
576 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 577 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
577 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 578 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
578 | i18n("Overwrite!"), i18n("Cancel"), 0, | 579 | i18n("Overwrite!"), i18n("Cancel"), 0, |
579 | 0, 1 ); | 580 | 0, 1 ); |
580 | if ( result != 0 ) { | 581 | if ( result != 0 ) { |
581 | createbup = false; | 582 | createbup = false; |
582 | } | 583 | } |
583 | } | 584 | } |
584 | if ( createbup ) { | 585 | if ( createbup ) { |
585 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + | 586 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + |
586 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); | 587 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); |
587 | Incidence *incidence = delSel.first(); | 588 | Incidence *incidence = delSel.first(); |
588 | icount = 0; | 589 | icount = 0; |
589 | while ( incidence ) { | 590 | while ( incidence ) { |
590 | if ( incidence->type() == "Journal" ) { | 591 | if ( incidence->type() == "Journal" ) { |
591 | text += "\n************************************\n"; | 592 | text += "\n************************************\n"; |
592 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); | 593 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); |
593 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 594 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
594 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); | 595 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); |
595 | ++icount; | 596 | ++icount; |
596 | 597 | ||
597 | } else { | 598 | } else { |
598 | if ( !incidence->description().isEmpty() ) { | 599 | if ( !incidence->description().isEmpty() ) { |
599 | text += "\n************************************\n"; | 600 | text += "\n************************************\n"; |
600 | if ( incidence->type() == "Todo" ) | 601 | if ( incidence->type() == "Todo" ) |
601 | text += i18n("To-Do: "); | 602 | text += i18n("To-Do: "); |
602 | text += incidence->summary(); | 603 | text += incidence->summary(); |
603 | if ( incidence->hasStartDate() ) | 604 | if ( incidence->hasStartDate() ) |
604 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); | 605 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); |
605 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 606 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
606 | if ( !incidence->location().isEmpty() ) | 607 | if ( !incidence->location().isEmpty() ) |
607 | text += "\n" +i18n("Location: ") + incidence->location(); | 608 | text += "\n" +i18n("Location: ") + incidence->location(); |
608 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); | 609 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); |
609 | ++icount; | 610 | ++icount; |
610 | 611 | ||
611 | } | 612 | } |
612 | } | 613 | } |
613 | incidence = delSel.next(); | 614 | incidence = delSel.next(); |
614 | } | 615 | } |
615 | QFile file( fn ); | 616 | QFile file( fn ); |
616 | if (!file.open( IO_WriteOnly ) ) { | 617 | if (!file.open( IO_WriteOnly ) ) { |
617 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); | 618 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); |
618 | return; | 619 | return; |
619 | } | 620 | } |
620 | QTextStream ts( &file ); | 621 | QTextStream ts( &file ); |
621 | ts << text; | 622 | ts << text; |
622 | file.close(); | 623 | file.close(); |
623 | //qDebug("%s ", text.latin1()); | 624 | //qDebug("%s ", text.latin1()); |
624 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); | 625 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); |
625 | KOPrefs::instance()->mLastSaveFile = fn; | 626 | KOPrefs::instance()->mLastSaveFile = fn; |
626 | topLevelWidget()->setCaption(mes); | 627 | topLevelWidget()->setCaption(mes); |
627 | } | 628 | } |
628 | } | 629 | } |
629 | } | 630 | } |
630 | void KOListView::saveToFileVCS() | 631 | void KOListView::saveToFileVCS() |
631 | { | 632 | { |
632 | writeToFile( false ); | 633 | writeToFile( false ); |
633 | } | 634 | } |
634 | void KOListView::saveToFile() | 635 | void KOListView::saveToFile() |
635 | { | 636 | { |
636 | writeToFile( true ); | 637 | writeToFile( true ); |
637 | } | 638 | } |
638 | void KOListView::writeToFile( bool iCal ) | 639 | void KOListView::writeToFile( bool iCal ) |
639 | { | 640 | { |
640 | 641 | ||
641 | int icount = 0; | 642 | int icount = 0; |
642 | QPtrList<Incidence> delSel ; | 643 | QPtrList<Incidence> delSel ; |
643 | QListViewItem *item = mListView->firstChild (); | 644 | QListViewItem *item = mListView->firstChild (); |
644 | bool journal = iCal; // warn only for vCal | 645 | bool journal = iCal; // warn only for vCal |
645 | while ( item ) { | 646 | while ( item ) { |
646 | if ( item->isSelected() ) { | 647 | if ( item->isSelected() ) { |
647 | if ( !journal ) | 648 | if ( !journal ) |
648 | if ( ((KOListViewItem *)item)->data()->type() == "Journal") | 649 | if ( ((KOListViewItem *)item)->data()->type() == "Journal") |
649 | journal = true; | 650 | journal = true; |
650 | delSel.append(((KOListViewItem *)item)->data()); | 651 | delSel.append(((KOListViewItem *)item)->data()); |
651 | ++icount; | 652 | ++icount; |
652 | } | 653 | } |
653 | 654 | ||
654 | item = item->nextSibling(); | 655 | item = item->nextSibling(); |
655 | } | 656 | } |
656 | if ( !iCal && journal ) { | 657 | if ( !iCal && journal ) { |
657 | int result = KMessageBox::warningContinueCancel(this, | 658 | int result = KMessageBox::warningContinueCancel(this, |
658 | i18n("The journal entries can not be\nexported to a vCalendar file."), | 659 | i18n("The journal entries can not be\nexported to a vCalendar file."), |
659 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), | 660 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), |
660 | true); | 661 | true); |
661 | if (result != KMessageBox::Continue) return; | 662 | if (result != KMessageBox::Continue) return; |
662 | } | 663 | } |
663 | if ( icount ) { | 664 | if ( icount ) { |
664 | QString fn = KOPrefs::instance()->mLastSaveFile; | 665 | QString fn = KOPrefs::instance()->mLastSaveFile; |
665 | QString extension; | 666 | QString extension; |
666 | if ( iCal ) { | 667 | if ( iCal ) { |
667 | if ( fn.right( 4 ).lower() == ".vcs" ) { | 668 | if ( fn.right( 4 ).lower() == ".vcs" ) { |
668 | fn = fn.left( fn.length() -3) + "ics"; | 669 | fn = fn.left( fn.length() -3) + "ics"; |
669 | } | 670 | } |
670 | } else { | 671 | } else { |
671 | if ( fn.right( 4 ).lower() == ".ics" ) { | 672 | if ( fn.right( 4 ).lower() == ".ics" ) { |
672 | fn = fn.left( fn.length() -3) + "vcs"; | 673 | fn = fn.left( fn.length() -3) + "vcs"; |
673 | } | 674 | } |
674 | } | 675 | } |
675 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 676 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
676 | 677 | ||
677 | if ( fn == "" ) | 678 | if ( fn == "" ) |
678 | return; | 679 | return; |
679 | QFileInfo info; | 680 | QFileInfo info; |
680 | info.setFile( fn ); | 681 | info.setFile( fn ); |
681 | QString mes; | 682 | QString mes; |
682 | bool createbup = true; | 683 | bool createbup = true; |
683 | if ( info. exists() ) { | 684 | if ( info. exists() ) { |
684 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 685 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
685 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 686 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
686 | i18n("Overwrite!"), i18n("Cancel"), 0, | 687 | i18n("Overwrite!"), i18n("Cancel"), 0, |
687 | 0, 1 ); | 688 | 0, 1 ); |
688 | if ( result != 0 ) { | 689 | if ( result != 0 ) { |
689 | createbup = false; | 690 | createbup = false; |
690 | } | 691 | } |
691 | } | 692 | } |
692 | if ( createbup ) { | 693 | if ( createbup ) { |
693 | CalendarLocal cal; | 694 | CalendarLocal cal; |
694 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 695 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
695 | Incidence *incidence = delSel.first(); | 696 | Incidence *incidence = delSel.first(); |
696 | while ( incidence ) { | 697 | while ( incidence ) { |
697 | cal.addIncidence( incidence->clone() ); | 698 | cal.addIncidence( incidence->clone() ); |
698 | incidence = delSel.next(); | 699 | incidence = delSel.next(); |
699 | } | 700 | } |
700 | if ( iCal ) { | 701 | if ( iCal ) { |
701 | ICalFormat format; | 702 | ICalFormat format; |
702 | format.save( &cal, fn ); | 703 | format.save( &cal, fn ); |
703 | } else { | 704 | } else { |
704 | 705 | ||
705 | VCalFormat format; | 706 | VCalFormat format; |
706 | format.save( &cal, fn ); | 707 | format.save( &cal, fn ); |
707 | } | 708 | } |
708 | mes = i18n("KO/Pi:Saved %1").arg(fn ); | 709 | mes = i18n("KO/Pi:Saved %1").arg(fn ); |
709 | KOPrefs::instance()->mLastSaveFile = fn; | 710 | KOPrefs::instance()->mLastSaveFile = fn; |
710 | topLevelWidget()->setCaption(mes); | 711 | topLevelWidget()->setCaption(mes); |
711 | } | 712 | } |
712 | } | 713 | } |
713 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 714 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
714 | } | 715 | } |
715 | void KOListView::deleteAll() | 716 | void KOListView::deleteAll() |
716 | { | 717 | { |
717 | int icount = 0; | 718 | int icount = 0; |
718 | QPtrList<Incidence> delSel ; | 719 | QPtrList<Incidence> delSel ; |
719 | QListViewItem *item = mListView->firstChild (); | 720 | QListViewItem *item = mListView->firstChild (); |
720 | while ( item ) { | 721 | while ( item ) { |
721 | if ( item->isSelected() ) { | 722 | if ( item->isSelected() ) { |
722 | delSel.append(((KOListViewItem *)item)->data()); | 723 | delSel.append(((KOListViewItem *)item)->data()); |
723 | ++icount; | 724 | ++icount; |
724 | } | 725 | } |
725 | 726 | ||
726 | item = item->nextSibling(); | 727 | item = item->nextSibling(); |
727 | } | 728 | } |
728 | if ( icount ) { | 729 | if ( icount ) { |
729 | Incidence *incidence = delSel.first(); | 730 | Incidence *incidence = delSel.first(); |
730 | Incidence *toDelete; | 731 | Incidence *toDelete; |
731 | KOPrefs *p = KOPrefs::instance(); | 732 | KOPrefs *p = KOPrefs::instance(); |
732 | bool confirm = p->mConfirm; | 733 | bool confirm = p->mConfirm; |
733 | QString mess; | 734 | QString mess; |
734 | mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); | 735 | mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); |
735 | if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { | 736 | if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { |
736 | p->mConfirm = false; | 737 | p->mConfirm = false; |
737 | int delCounter = 0; | 738 | int delCounter = 0; |
738 | QDialog dia ( this, "p-dialog", true ); | 739 | QDialog dia ( this, "p-dialog", true ); |
739 | QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); | 740 | QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); |
740 | QVBoxLayout lay( &dia ); | 741 | QVBoxLayout lay( &dia ); |
741 | lay.setMargin(7); | 742 | lay.setMargin(7); |
742 | lay.setSpacing(7); | 743 | lay.setSpacing(7); |
743 | lay.addWidget( &lab); | 744 | lay.addWidget( &lab); |
744 | QProgressBar bar( icount, &dia ); | 745 | QProgressBar bar( icount, &dia ); |
745 | lay.addWidget( &bar); | 746 | lay.addWidget( &bar); |
746 | int w = 220; | 747 | int w = 220; |
747 | int h = 50; | 748 | int h = 50; |
748 | int dw = QApplication::desktop()->width(); | 749 | int dw = QApplication::desktop()->width(); |
749 | int dh = QApplication::desktop()->height(); | 750 | int dh = QApplication::desktop()->height(); |
750 | dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 751 | dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
751 | //dia.resize( 240,50 ); | 752 | //dia.resize( 240,50 ); |
752 | dia.show(); | 753 | dia.show(); |
753 | 754 | ||
754 | while ( incidence ) { | 755 | while ( incidence ) { |
755 | bar.setProgress( delCounter ); | 756 | bar.setProgress( delCounter ); |
756 | mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); | 757 | mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); |
757 | dia.setCaption( mess ); | 758 | dia.setCaption( mess ); |
758 | qApp->processEvents(); | 759 | qApp->processEvents(); |
759 | toDelete = (incidence); | 760 | toDelete = (incidence); |
760 | incidence = delSel.next(); | 761 | incidence = delSel.next(); |
761 | emit deleteIncidenceSignal(toDelete ); | 762 | emit deleteIncidenceSignal(toDelete ); |
762 | if ( dia.result() != 0 ) | 763 | if ( dia.result() != 0 ) |
763 | break; | 764 | break; |
764 | 765 | ||
765 | } | 766 | } |
766 | mess = mess.sprintf( i18n("%d items remaining in list."), count() ); | 767 | mess = mess.sprintf( i18n("%d items remaining in list."), count() ); |
767 | topLevelWidget ()->setCaption( mess ); | 768 | topLevelWidget ()->setCaption( mess ); |
768 | p->mConfirm = confirm; | 769 | p->mConfirm = confirm; |
769 | } | 770 | } |
770 | } | 771 | } |
771 | 772 | ||
772 | 773 | ||
773 | } | 774 | } |
774 | int KOListView::maxDatesHint() | 775 | int KOListView::maxDatesHint() |
775 | { | 776 | { |
776 | return 0; | 777 | return 0; |
777 | } | 778 | } |
778 | 779 | ||
779 | int KOListView::currentDateCount() | 780 | int KOListView::currentDateCount() |
780 | { | 781 | { |
781 | return 0; | 782 | return 0; |
782 | } | 783 | } |
783 | 784 | ||
784 | QPtrList<Incidence> KOListView::selectedIncidences() | 785 | QPtrList<Incidence> KOListView::selectedIncidences() |
785 | { | 786 | { |
786 | QPtrList<Incidence> eventList; | 787 | QPtrList<Incidence> eventList; |
787 | QListViewItem *item = mListView->firstChild (); | 788 | QListViewItem *item = mListView->firstChild (); |
788 | while ( item ) { | 789 | while ( item ) { |
789 | if ( item->isSelected() ) { | 790 | if ( item->isSelected() ) { |
790 | eventList.append(((KOListViewItem *)item)->data()); | 791 | eventList.append(((KOListViewItem *)item)->data()); |
791 | } | 792 | } |
792 | 793 | ||
793 | item = item->nextSibling(); | 794 | item = item->nextSibling(); |
794 | } | 795 | } |
795 | 796 | ||
796 | // // QListViewItem *item = mListView->selectedItem(); | 797 | // // QListViewItem *item = mListView->selectedItem(); |
797 | //if (item) eventList.append(((KOListViewItem *)item)->data()); | 798 | //if (item) eventList.append(((KOListViewItem *)item)->data()); |
798 | 799 | ||
799 | return eventList; | 800 | return eventList; |
800 | } | 801 | } |
801 | 802 | ||
802 | DateList KOListView::selectedDates() | 803 | DateList KOListView::selectedDates() |
803 | { | 804 | { |
804 | DateList eventList; | 805 | DateList eventList; |
805 | return eventList; | 806 | return eventList; |
806 | } | 807 | } |
807 | 808 | ||
808 | void KOListView::showDates(bool show) | 809 | void KOListView::showDates(bool show) |
809 | { | 810 | { |
810 | // Shouldn't we set it to a value greater 0? When showDates is called with | 811 | // Shouldn't we set it to a value greater 0? When showDates is called with |
811 | // show == true at first, then the columnwidths are set to zero. | 812 | // show == true at first, then the columnwidths are set to zero. |
812 | static int oldColWidth1 = 0; | 813 | static int oldColWidth1 = 0; |
813 | static int oldColWidth3 = 0; | 814 | static int oldColWidth3 = 0; |
814 | 815 | ||
815 | if (!show) { | 816 | if (!show) { |
816 | oldColWidth1 = mListView->columnWidth(1); | 817 | oldColWidth1 = mListView->columnWidth(1); |
817 | oldColWidth3 = mListView->columnWidth(3); | 818 | oldColWidth3 = mListView->columnWidth(3); |
818 | mListView->setColumnWidth(1, 0); | 819 | mListView->setColumnWidth(1, 0); |
819 | mListView->setColumnWidth(3, 0); | 820 | mListView->setColumnWidth(3, 0); |
820 | } else { | 821 | } else { |
821 | mListView->setColumnWidth(1, oldColWidth1); | 822 | mListView->setColumnWidth(1, oldColWidth1); |
822 | mListView->setColumnWidth(3, oldColWidth3); | 823 | mListView->setColumnWidth(3, oldColWidth3); |
823 | } | 824 | } |
824 | mListView->repaint(); | 825 | mListView->repaint(); |
825 | } | 826 | } |
826 | 827 | ||
827 | void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 828 | void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
828 | const QDate &td) | 829 | const QDate &td) |
829 | { | 830 | { |
830 | #ifndef KORG_NOPRINTER | 831 | #ifndef KORG_NOPRINTER |
831 | calPrinter->preview(CalPrinter::Day, fd, td); | 832 | calPrinter->preview(CalPrinter::Day, fd, td); |
832 | #endif | 833 | #endif |
833 | } | 834 | } |
834 | 835 | ||
835 | void KOListView::showDates() | 836 | void KOListView::showDates() |
836 | { | 837 | { |
837 | showDates(true); | 838 | showDates(true); |
838 | } | 839 | } |
839 | 840 | ||
840 | void KOListView::hideDates() | 841 | void KOListView::hideDates() |
841 | { | 842 | { |
842 | showDates(false); | 843 | showDates(false); |
843 | } | 844 | } |
844 | 845 | ||
845 | void KOListView::resetFocus() | 846 | void KOListView::resetFocus() |
846 | { | 847 | { |
847 | topLevelWidget()->setActiveWindow(); | 848 | topLevelWidget()->setActiveWindow(); |
848 | topLevelWidget()->raise(); | 849 | topLevelWidget()->raise(); |
849 | mListView->setFocus(); | 850 | mListView->setFocus(); |
850 | } | 851 | } |
851 | void KOListView::updateView() | 852 | void KOListView::updateView() |
852 | { | 853 | { |
853 | mListView->setFocus(); | 854 | mListView->setFocus(); |
854 | if ( mListView->firstChild () ) | 855 | if ( mListView->firstChild () ) |
855 | mListView->setCurrentItem( mListView->firstChild () ); | 856 | mListView->setCurrentItem( mListView->firstChild () ); |
856 | } | 857 | } |
857 | void KOListView::updateConfig() | 858 | void KOListView::updateConfig() |
858 | { | 859 | { |
859 | 860 | ||
860 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 861 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
861 | updateView(); | 862 | updateView(); |
862 | 863 | ||
863 | } | 864 | } |
864 | void KOListView::setStartDate(const QDate &start) | 865 | void KOListView::setStartDate(const QDate &start) |
865 | { | 866 | { |
866 | mStartDate = start; | 867 | mStartDate = start; |
867 | } | 868 | } |
868 | 869 | ||
869 | void KOListView::showDates(const QDate &start, const QDate &end) | 870 | void KOListView::showDates(const QDate &start, const QDate &end) |
870 | { | 871 | { |
871 | clear(); | 872 | clear(); |
872 | mStartDate = start; | 873 | mStartDate = start; |
873 | QDate date = start; | 874 | QDate date = start; |
874 | QPtrList<Journal> j_list; | 875 | QPtrList<Journal> j_list; |
875 | while( date <= end ) { | 876 | while( date <= end ) { |
876 | addEvents(calendar()->events(date)); | 877 | addEvents(calendar()->events(date)); |
877 | addTodos(calendar()->todos(date)); | 878 | addTodos(calendar()->todos(date)); |
878 | Journal* jo = calendar()->journal(date); | 879 | Journal* jo = calendar()->journal(date); |
879 | if ( jo ) | 880 | if ( jo ) |
880 | j_list.append( jo ); | 881 | j_list.append( jo ); |
881 | date = date.addDays( 1 ); | 882 | date = date.addDays( 1 ); |
882 | } | 883 | } |
883 | addJournals(j_list); | 884 | addJournals(j_list); |
884 | emit incidenceSelected( 0 ); | 885 | emit incidenceSelected( 0 ); |
885 | updateView(); | 886 | updateView(); |
886 | 887 | ||
887 | } | 888 | } |
888 | 889 | ||
889 | void KOListView::addEvents(QPtrList<Event> eventList) | 890 | void KOListView::addEvents(QPtrList<Event> eventList) |
890 | { | 891 | { |
891 | 892 | ||
892 | Event *ev; | 893 | Event *ev; |
893 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 894 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
894 | addIncidence(ev); | 895 | addIncidence(ev); |
895 | } | 896 | } |
896 | if ( !mListView->currentItem() ){ | 897 | if ( !mListView->currentItem() ){ |
897 | updateView(); | 898 | updateView(); |
898 | } | 899 | } |
899 | } | 900 | } |
900 | 901 | ||
901 | void KOListView::addTodos(QPtrList<Todo> eventList) | 902 | void KOListView::addTodos(QPtrList<Todo> eventList) |
902 | { | 903 | { |
903 | Todo *ev; | 904 | Todo *ev; |
904 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 905 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
905 | addIncidence(ev); | 906 | addIncidence(ev); |
906 | } | 907 | } |
907 | if ( !mListView->currentItem() ){ | 908 | if ( !mListView->currentItem() ){ |
908 | updateView(); | 909 | updateView(); |
909 | } | 910 | } |
910 | } | 911 | } |
911 | void KOListView::addJournals(QPtrList<Journal> eventList) | 912 | void KOListView::addJournals(QPtrList<Journal> eventList) |
912 | { | 913 | { |
913 | Journal *ev; | 914 | Journal *ev; |
914 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 915 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
915 | addIncidence(ev); | 916 | addIncidence(ev); |
916 | } | 917 | } |
917 | if ( !mListView->currentItem() ){ | 918 | if ( !mListView->currentItem() ){ |
918 | updateView(); | 919 | updateView(); |
919 | } | 920 | } |
920 | } | 921 | } |
921 | 922 | ||
922 | void KOListView::addIncidence(Incidence *incidence) | 923 | void KOListView::addIncidence(Incidence *incidence) |
923 | { | 924 | { |
924 | if ( mUidDict.find( incidence->uid() ) ) return; | 925 | if ( mUidDict.find( incidence->uid() ) ) return; |
925 | 926 | ||
926 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 927 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
927 | mUidDict.insert( incidence->uid(), incidence ); | 928 | mUidDict.insert( incidence->uid(), incidence ); |
928 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); | 929 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); |
929 | ListItemVisitor v(item, mStartDate ); | 930 | ListItemVisitor v(item, mStartDate ); |
930 | if (incidence->accept(v)) { | 931 | if (incidence->accept(v)) { |
931 | return; | 932 | return; |
932 | } | 933 | } |
933 | else delete item; | 934 | else delete item; |
934 | } | 935 | } |
935 | 936 | ||
936 | void KOListView::showEvents(QPtrList<Event> eventList) | 937 | void KOListView::showEvents(QPtrList<Event> eventList) |
937 | { | 938 | { |
938 | clear(); | 939 | clear(); |
939 | 940 | ||
940 | addEvents(eventList); | 941 | addEvents(eventList); |
941 | 942 | ||
942 | // After new creation of list view no events are selected. | 943 | // After new creation of list view no events are selected. |
943 | emit incidenceSelected( 0 ); | 944 | emit incidenceSelected( 0 ); |
944 | } | 945 | } |
945 | int KOListView::count() | 946 | int KOListView::count() |
946 | { | 947 | { |
947 | return mListView->childCount(); | 948 | return mListView->childCount(); |
948 | } | 949 | } |
949 | 950 | ||
950 | void KOListView::changeEventDisplay(Event *event, int action) | 951 | void KOListView::changeEventDisplay(Event *event, int action) |
951 | { | 952 | { |
952 | KOListViewItem *item; | 953 | KOListViewItem *item; |
953 | 954 | ||
954 | switch(action) { | 955 | switch(action) { |
955 | case KOGlobals::EVENTADDED: | 956 | case KOGlobals::EVENTADDED: |
956 | addIncidence( event ); | 957 | addIncidence( event ); |
957 | break; | 958 | break; |
958 | case KOGlobals::EVENTEDITED: | 959 | case KOGlobals::EVENTEDITED: |
959 | item = getItemForEvent(event); | 960 | item = getItemForEvent(event); |
960 | if (item) { | 961 | if (item) { |
961 | mUidDict.remove( event->uid() ); | 962 | mUidDict.remove( event->uid() ); |
962 | delete item; | 963 | delete item; |
963 | addIncidence( event ); | 964 | addIncidence( event ); |
964 | } | 965 | } |
965 | break; | 966 | break; |
966 | case KOGlobals::EVENTDELETED: | 967 | case KOGlobals::EVENTDELETED: |
967 | item = getItemForEvent(event); | 968 | item = getItemForEvent(event); |
968 | if (item) { | 969 | if (item) { |
969 | mUidDict.remove( event->uid() ); | 970 | mUidDict.remove( event->uid() ); |
970 | delete item; | 971 | delete item; |
971 | } | 972 | } |
972 | break; | 973 | break; |
973 | default: | 974 | default: |
974 | ; | 975 | ; |
975 | } | 976 | } |
976 | } | 977 | } |
977 | 978 | ||
978 | KOListViewItem *KOListView::getItemForEvent(Event *event) | 979 | KOListViewItem *KOListView::getItemForEvent(Event *event) |
979 | { | 980 | { |
980 | KOListViewItem *item = (KOListViewItem *)mListView->firstChild(); | 981 | KOListViewItem *item = (KOListViewItem *)mListView->firstChild(); |
981 | while (item) { | 982 | while (item) { |
982 | if (item->data() == event) return item; | 983 | if (item->data() == event) return item; |
983 | item = (KOListViewItem *)item->nextSibling(); | 984 | item = (KOListViewItem *)item->nextSibling(); |
984 | } | 985 | } |
985 | return 0; | 986 | return 0; |
986 | } | 987 | } |
987 | 988 | ||
988 | void KOListView::defaultItemAction(QListViewItem *i) | 989 | void KOListView::defaultItemAction(QListViewItem *i) |
989 | { | 990 | { |
990 | KOListViewItem *item = static_cast<KOListViewItem *>( i ); | 991 | KOListViewItem *item = static_cast<KOListViewItem *>( i ); |
991 | if ( item ) defaultAction( item->data() ); | 992 | if ( item ) defaultAction( item->data() ); |
992 | 993 | ||
993 | } | 994 | } |
994 | 995 | ||
995 | void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) | 996 | void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) |
996 | { | 997 | { |
997 | mActiveItem = (KOListViewItem *)item; | 998 | mActiveItem = (KOListViewItem *)item; |
998 | if (mActiveItem) { | 999 | if (mActiveItem) { |
999 | Incidence *incidence = mActiveItem->data(); | 1000 | Incidence *incidence = mActiveItem->data(); |
1000 | mPopupMenu->showIncidencePopup(incidence); | 1001 | mPopupMenu->showIncidencePopup(incidence); |
1001 | 1002 | ||
1002 | /* | 1003 | /* |
1003 | if ( incidence && incidence->type() == "Event" ) { | 1004 | if ( incidence && incidence->type() == "Event" ) { |
1004 | Event *event = static_cast<Event *>( incidence ); | 1005 | Event *event = static_cast<Event *>( incidence ); |
1005 | mPopupMenu->showEventPopup(event); | 1006 | mPopupMenu->showEventPopup(event); |
1006 | } | 1007 | } |
1007 | */ | 1008 | */ |
1008 | } | 1009 | } |
1009 | } | 1010 | } |
1010 | 1011 | ||
1011 | void KOListView::readSettings(KConfig *config, QString setting) | 1012 | void KOListView::readSettings(KConfig *config, QString setting) |
1012 | { | 1013 | { |
1013 | // qDebug("KOListView::readSettings "); | 1014 | // qDebug("KOListView::readSettings "); |
1014 | mListView->restoreLayout(config,setting); | 1015 | mListView->restoreLayout(config,setting); |
1015 | } | 1016 | } |
1016 | 1017 | ||
1017 | void KOListView::writeSettings(KConfig *config, QString setting) | 1018 | void KOListView::writeSettings(KConfig *config, QString setting) |
1018 | { | 1019 | { |
1019 | // qDebug("KOListView::writeSettings "); | 1020 | // qDebug("KOListView::writeSettings "); |
1020 | mListView->saveLayout(config, setting); | 1021 | mListView->saveLayout(config, setting); |
1021 | } | 1022 | } |
1022 | 1023 | ||
1023 | void KOListView::processSelectionChange(QListViewItem *) | 1024 | void KOListView::processSelectionChange(QListViewItem *) |
1024 | { | 1025 | { |
1025 | 1026 | ||
1026 | KOListViewItem *item = | 1027 | KOListViewItem *item = |
1027 | static_cast<KOListViewItem *>( mListView->currentItem() ); | 1028 | static_cast<KOListViewItem *>( mListView->currentItem() ); |
1028 | 1029 | ||
1029 | if ( !item ) { | 1030 | if ( !item ) { |
1030 | emit incidenceSelected( 0 ); | 1031 | emit incidenceSelected( 0 ); |
1031 | } else { | 1032 | } else { |
1032 | emit incidenceSelected( item->data() ); | 1033 | emit incidenceSelected( item->data() ); |
1033 | } | 1034 | } |
1034 | } | 1035 | } |
1035 | 1036 | ||
1036 | void KOListView::clearSelection() | 1037 | void KOListView::clearSelection() |
1037 | { | 1038 | { |
1038 | mListView->selectAll( false ); | 1039 | mListView->selectAll( false ); |
1039 | } | 1040 | } |
1040 | void KOListView::allSelection() | 1041 | void KOListView::allSelection() |
1041 | { | 1042 | { |
1042 | mListView->selectAll( true ); | 1043 | mListView->selectAll( true ); |
1043 | } | 1044 | } |
1044 | 1045 | ||
1045 | void KOListView::clear() | 1046 | void KOListView::clear() |
1046 | { | 1047 | { |
1047 | mListView->clear(); | 1048 | mListView->clear(); |
1048 | mUidDict.clear(); | 1049 | mUidDict.clear(); |
1049 | } | 1050 | } |
1050 | 1051 | ||
1051 | Incidence* KOListView::currentItem() | 1052 | Incidence* KOListView::currentItem() |
1052 | { | 1053 | { |
1053 | if ( mListView->currentItem() ) | 1054 | if ( mListView->currentItem() ) |
1054 | return ((KOListViewItem*) mListView->currentItem())->data(); | 1055 | return ((KOListViewItem*) mListView->currentItem())->data(); |
1055 | return 0; | 1056 | return 0; |
1056 | } | 1057 | } |
1057 | void KOListView::keyPressEvent ( QKeyEvent *e) | 1058 | void KOListView::keyPressEvent ( QKeyEvent *e) |
1058 | { | 1059 | { |
1059 | 1060 | ||
1060 | if ( e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace ) { | 1061 | if ( e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace ) { |
1061 | deleteAll(); | 1062 | deleteAll(); |
1062 | return; | 1063 | return; |
1063 | } | 1064 | } |
1064 | 1065 | ||
1065 | e->ignore(); | 1066 | e->ignore(); |
1066 | } | 1067 | } |
1067 | void KOListViewListView::keyPressEvent ( QKeyEvent *e) | 1068 | void KOListViewListView::keyPressEvent ( QKeyEvent *e) |
1068 | { | 1069 | { |
1069 | 1070 | ||
1070 | switch ( e->key() ) { | 1071 | switch ( e->key() ) { |
1071 | case Qt::Key_Down: | 1072 | case Qt::Key_Down: |
1072 | if ( e->state() == ShiftButton ) { | 1073 | if ( e->state() == ShiftButton ) { |
1073 | QListViewItem* cn = currentItem(); | 1074 | QListViewItem* cn = currentItem(); |
1074 | if ( !cn ) | 1075 | if ( !cn ) |
1075 | cn = firstChild(); | 1076 | cn = firstChild(); |
1076 | if ( !cn ) | 1077 | if ( !cn ) |
1077 | return; | 1078 | return; |
1078 | while ( cn->nextSibling() ) | 1079 | while ( cn->nextSibling() ) |
1079 | cn = cn->nextSibling(); | 1080 | cn = cn->nextSibling(); |
1080 | setCurrentItem ( cn ); | 1081 | setCurrentItem ( cn ); |
1081 | ensureItemVisible ( cn ); | 1082 | ensureItemVisible ( cn ); |
1082 | 1083 | ||
1083 | e->accept(); | 1084 | e->accept(); |
1084 | return; | 1085 | return; |
1085 | } | 1086 | } |
1086 | if ( e->state() == ControlButton ) { | 1087 | if ( e->state() == ControlButton ) { |
1087 | int count = childCount (); | 1088 | int count = childCount (); |
1088 | int jump = count / 5; | 1089 | int jump = count / 5; |
1089 | QListViewItem* cn; | 1090 | QListViewItem* cn; |
1090 | cn = currentItem(); | 1091 | cn = currentItem(); |
1091 | if ( ! cn ) | 1092 | if ( ! cn ) |
1092 | return; | 1093 | return; |
1093 | if ( jump == 0 ) | 1094 | if ( jump == 0 ) |
1094 | jump = 1; | 1095 | jump = 1; |
1095 | while ( jump && cn->nextSibling() ) { | 1096 | while ( jump && cn->nextSibling() ) { |
1096 | cn = cn->nextSibling(); | 1097 | cn = cn->nextSibling(); |
1097 | --jump; | 1098 | --jump; |
1098 | } | 1099 | } |
1099 | setCurrentItem ( cn ); | 1100 | setCurrentItem ( cn ); |
1100 | ensureItemVisible ( cn ); | 1101 | ensureItemVisible ( cn ); |
1101 | 1102 | ||
1102 | } else | 1103 | } else |
1103 | QListView::keyPressEvent ( e ) ; | 1104 | QListView::keyPressEvent ( e ) ; |
1104 | e->accept(); | 1105 | e->accept(); |
1105 | break; | 1106 | break; |
1106 | 1107 | ||
1107 | case Qt::Key_Up: | 1108 | case Qt::Key_Up: |
1108 | if ( e->state() == ShiftButton ) { | 1109 | if ( e->state() == ShiftButton ) { |
1109 | QListViewItem* cn = firstChild(); | 1110 | QListViewItem* cn = firstChild(); |
1110 | if ( cn ) { | 1111 | if ( cn ) { |
1111 | setCurrentItem ( cn ); | 1112 | setCurrentItem ( cn ); |
1112 | ensureItemVisible ( cn ); | 1113 | ensureItemVisible ( cn ); |
1113 | } | 1114 | } |
1114 | e->accept(); | 1115 | e->accept(); |
1115 | return; | 1116 | return; |
1116 | } | 1117 | } |
1117 | if ( e->state() == ControlButton ) { | 1118 | if ( e->state() == ControlButton ) { |
1118 | int count = childCount (); | 1119 | int count = childCount (); |
1119 | int jump = count / 5; | 1120 | int jump = count / 5; |
1120 | QListViewItem* cn; | 1121 | QListViewItem* cn; |
1121 | cn = currentItem(); | 1122 | cn = currentItem(); |
1122 | if ( ! cn ) | 1123 | if ( ! cn ) |
1123 | return; | 1124 | return; |
1124 | if ( jump == 0 ) | 1125 | if ( jump == 0 ) |
1125 | jump = 1; | 1126 | jump = 1; |
1126 | while ( jump && cn->itemAbove ()) { | 1127 | while ( jump && cn->itemAbove ()) { |
1127 | cn = cn->itemAbove (); | 1128 | cn = cn->itemAbove (); |
1128 | --jump; | 1129 | --jump; |
1129 | } | 1130 | } |
1130 | setCurrentItem ( cn ); | 1131 | setCurrentItem ( cn ); |
1131 | ensureItemVisible ( cn ); | 1132 | ensureItemVisible ( cn ); |
1132 | } else | 1133 | } else |
1133 | QListView::keyPressEvent ( e ) ; | 1134 | QListView::keyPressEvent ( e ) ; |
1134 | e->accept(); | 1135 | e->accept(); |
1135 | break; | 1136 | break; |
1136 | case Qt::Key_I: { | 1137 | case Qt::Key_I: { |
1137 | QListViewItem* cn; | 1138 | QListViewItem* cn; |
1138 | cn = currentItem(); | 1139 | cn = currentItem(); |
1139 | if ( cn ) { | 1140 | if ( cn ) { |
1140 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1141 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1141 | if ( ci ){ | 1142 | if ( ci ){ |
1142 | //emit showIncidence( ci->data()); | 1143 | //emit showIncidence( ci->data()); |
1143 | cn = cn->nextSibling(); | 1144 | cn = cn->nextSibling(); |
1144 | if ( cn ) { | 1145 | if ( cn ) { |
1145 | setCurrentItem ( cn ); | 1146 | setCurrentItem ( cn ); |
1146 | ensureItemVisible ( cn ); | 1147 | ensureItemVisible ( cn ); |
1147 | } | 1148 | } |
1148 | emit showIncidence( ci->data()); | 1149 | emit showIncidence( ci->data()); |
1149 | } | 1150 | } |
1150 | } | 1151 | } |
1151 | e->accept(); | 1152 | e->accept(); |
1152 | } | 1153 | } |
1153 | break; | 1154 | break; |
1154 | case Qt::Key_Return: | 1155 | case Qt::Key_Return: |
1155 | case Qt::Key_Enter: | 1156 | case Qt::Key_Enter: |
1156 | { | 1157 | { |
1157 | QListViewItem* cn; | 1158 | QListViewItem* cn; |
1158 | cn = currentItem(); | 1159 | cn = currentItem(); |
1159 | if ( cn ) { | 1160 | if ( cn ) { |
1160 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1161 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1161 | if ( ci ){ | 1162 | if ( ci ){ |
1162 | if ( e->state() == ShiftButton ) | 1163 | if ( e->state() == ShiftButton ) |
1163 | ci->setSelected( false ); | 1164 | ci->setSelected( false ); |
1164 | else | 1165 | else |
1165 | ci->setSelected( true ); | 1166 | ci->setSelected( true ); |
1166 | cn = cn->nextSibling(); | 1167 | cn = cn->nextSibling(); |
1167 | if ( cn ) { | 1168 | if ( cn ) { |
1168 | setCurrentItem ( cn ); | 1169 | setCurrentItem ( cn ); |
1169 | ensureItemVisible ( cn ); | 1170 | ensureItemVisible ( cn ); |
1170 | } | 1171 | } |
1171 | } | 1172 | } |
1172 | } | 1173 | } |
1173 | e->accept(); | 1174 | e->accept(); |
1174 | } | 1175 | } |
1175 | break; | 1176 | break; |
1176 | default: | 1177 | default: |
1177 | e->ignore(); | 1178 | e->ignore(); |
1178 | } | 1179 | } |
1179 | } | 1180 | } |
1180 | KOListViewListView::KOListViewListView(KOListView * lv ) | 1181 | KOListViewListView::KOListViewListView(KOListView * lv ) |
1181 | : KListView( lv, "kolistlistview", false ) | 1182 | : KListView( lv, "kolistlistview", false ) |
1182 | { | 1183 | { |
1183 | mPopupTimer = new QTimer(this); | 1184 | mPopupTimer = new QTimer(this); |
1184 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); | 1185 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); |
1185 | #ifndef DESKTOP_VERSION | 1186 | #ifndef DESKTOP_VERSION |
1186 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 1187 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
1187 | #endif | 1188 | #endif |
1188 | setSelectionMode( QListView::Multi ); | 1189 | setSelectionMode( QListView::Multi ); |
1189 | setMultiSelection( true); | 1190 | setMultiSelection( true); |
1190 | } | 1191 | } |
1191 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 1192 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
1192 | { | 1193 | { |
1193 | if (!e) return; | 1194 | if (!e) return; |
1194 | QPoint vp = contentsToViewport(e->pos()); | 1195 | QPoint vp = contentsToViewport(e->pos()); |
1195 | QListViewItem *item = itemAt(vp); | 1196 | QListViewItem *item = itemAt(vp); |
1196 | if (!item) { | 1197 | if (!item) { |
1197 | emit newEvent(); | 1198 | emit newEvent(); |
1198 | return; | 1199 | return; |
1199 | } | 1200 | } |
1200 | KListView::contentsMouseDoubleClickEvent(e); | 1201 | KListView::contentsMouseDoubleClickEvent(e); |
1201 | } | 1202 | } |
1202 | #if 0 | 1203 | #if 0 |
1203 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1204 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1204 | { | 1205 | { |
1205 | //qDebug("contentsMousePressEvent++++ "); | 1206 | //qDebug("contentsMousePressEvent++++ "); |
1206 | KListView::contentsMousePressEvent( e ); | 1207 | KListView::contentsMousePressEvent( e ); |
1207 | if ( e->button() == RightButton ) { | 1208 | if ( e->button() == RightButton ) { |
1208 | QListViewItem* ci = currentItem(); | 1209 | QListViewItem* ci = currentItem(); |
1209 | clearSelection () ; | 1210 | clearSelection () ; |
1210 | if ( ci ) | 1211 | if ( ci ) |
1211 | ci->setSelected( true ); | 1212 | ci->setSelected( true ); |
1212 | } | 1213 | } |
1213 | } | 1214 | } |
1214 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | 1215 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) |
1215 | { | 1216 | { |
1216 | KListView::contentsMouseReleaseEvent(e); | 1217 | KListView::contentsMouseReleaseEvent(e); |
1217 | } | 1218 | } |
1218 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | 1219 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) |
1219 | { | 1220 | { |
1220 | KListView::contentsMouseMoveEvent(e); | 1221 | KListView::contentsMouseMoveEvent(e); |
1221 | } | 1222 | } |
1222 | #endif | 1223 | #endif |
1223 | void KOListViewListView::popupMenu() | 1224 | void KOListViewListView::popupMenu() |
1224 | { | 1225 | { |
1225 | mPopupTimer->stop(); | 1226 | mPopupTimer->stop(); |
1226 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); | 1227 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); |
1227 | QApplication::postEvent( this->viewport(), e ); | 1228 | QApplication::postEvent( this->viewport(), e ); |
1228 | 1229 | ||
1229 | } | 1230 | } |
1230 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1231 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1231 | { | 1232 | { |
1232 | //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); | 1233 | //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); |
1233 | mYMousePos = mapToGlobal( (e->pos())).y(); | 1234 | mYMousePos = mapToGlobal( (e->pos())).y(); |
1234 | if ( e->button() == LeftButton ) { | 1235 | if ( e->button() == LeftButton ) { |
1235 | mPopupTimer->start( 600 ); | 1236 | mPopupTimer->start( 600 ); |
1236 | mEventPos = contentsToViewport(e->pos()); | 1237 | mEventPos = contentsToViewport(e->pos()); |
1237 | mEventGlobalPos = e->globalPos(); | 1238 | mEventGlobalPos = e->globalPos(); |
1238 | } | 1239 | } |
1239 | KListView::contentsMousePressEvent( e ); | 1240 | KListView::contentsMousePressEvent( e ); |
1240 | if ( e->button() == RightButton ) { | 1241 | if ( e->button() == RightButton ) { |
1241 | QListViewItem* ci = currentItem(); | 1242 | QListViewItem* ci = currentItem(); |
1242 | //clearSelection(); | 1243 | //clearSelection(); |
1243 | if ( ci ) | 1244 | if ( ci ) |
1244 | ci->setSelected( true ); | 1245 | ci->setSelected( true ); |
1245 | } | 1246 | } |
1246 | } | 1247 | } |
1247 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | 1248 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) |
1248 | { | 1249 | { |
1249 | mPopupTimer->stop(); | 1250 | mPopupTimer->stop(); |
1250 | KListView::contentsMouseReleaseEvent(e); | 1251 | KListView::contentsMouseReleaseEvent(e); |
1251 | } | 1252 | } |
1252 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | 1253 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) |
1253 | { | 1254 | { |
1254 | // qDebug("contentsMouseMoveEv....... "); | 1255 | // qDebug("contentsMouseMoveEv....... "); |
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index 6a05cc8..5513e8b 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp | |||
@@ -1,437 +1,444 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1997, 1998 Preston Brown | 3 | Copyright (c) 1997, 1998 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qtooltip.h> | 25 | #include <qtooltip.h> |
26 | #include <qframe.h> | 26 | #include <qframe.h> |
27 | #include <qpixmap.h> | 27 | #include <qpixmap.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qhbox.h> | 29 | #include <qhbox.h> |
30 | #include <qdir.h> | 30 | #include <qdir.h> |
31 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | #include <qtabwidget.h> | 33 | #include <qtabwidget.h> |
34 | 34 | ||
35 | #include <kiconloader.h> | 35 | #include <kiconloader.h> |
36 | #include <klocale.h> | 36 | #include <klocale.h> |
37 | #include <kfiledialog.h> | 37 | #include <kfiledialog.h> |
38 | #include <kstandarddirs.h> | 38 | #include <kstandarddirs.h> |
39 | #include <kmessagebox.h> | 39 | #include <kmessagebox.h> |
40 | 40 | ||
41 | #include <libkdepim/categoryselectdialog.h> | 41 | #include <libkdepim/categoryselectdialog.h> |
42 | #include <libkcal/calendarlocal.h> | 42 | #include <libkcal/calendarlocal.h> |
43 | #include <libkcal/calendarresources.h> | 43 | #include <libkcal/calendarresources.h> |
44 | #include <libkcal/resourcecalendar.h> | 44 | #include <libkcal/resourcecalendar.h> |
45 | #include <libkcal/icalformat.h> | 45 | #include <libkcal/icalformat.h> |
46 | #include <kresources/resourceselectdialog.h> | 46 | #include <kresources/resourceselectdialog.h> |
47 | #include <libkdepim/kdateedit.h> | 47 | #include <libkdepim/kdateedit.h> |
48 | 48 | ||
49 | #include "koprefs.h" | 49 | #include "koprefs.h" |
50 | #include "kolocationbox.h" | 50 | #include "kolocationbox.h" |
51 | 51 | ||
52 | #include "kotodoeditor.h" | 52 | #include "kotodoeditor.h" |
53 | extern int globalFlagBlockAgenda; | 53 | extern int globalFlagBlockAgenda; |
54 | 54 | ||
55 | KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) : | 55 | KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) : |
56 | KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent ) | 56 | KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent ) |
57 | { | 57 | { |
58 | mTodo = 0; | 58 | mTodo = 0; |
59 | mRelatedTodo = 0; | 59 | mRelatedTodo = 0; |
60 | findButton(User1)->hide(); | 60 | findButton(User1)->hide(); |
61 | init(); | 61 | init(); |
62 | } | 62 | } |
63 | 63 | ||
64 | KOTodoEditor::~KOTodoEditor() | 64 | KOTodoEditor::~KOTodoEditor() |
65 | { | 65 | { |
66 | emit dialogClose( mTodo ); | 66 | emit dialogClose( mTodo ); |
67 | } | 67 | } |
68 | 68 | ||
69 | void KOTodoEditor::init() | 69 | void KOTodoEditor::init() |
70 | { | 70 | { |
71 | setupGeneral(); | 71 | setupGeneral(); |
72 | setupAttendeesTab(); | 72 | setupAttendeesTab(); |
73 | setupRecurrence(); | 73 | setupRecurrence(); |
74 | connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); | 74 | connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); |
75 | mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") ); | 75 | mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") ); |
76 | } | 76 | } |
77 | void KOTodoEditor::setupRecurrence() | 77 | void KOTodoEditor::setupRecurrence() |
78 | { | 78 | { |
79 | QFrame *topFrame = addPage( i18n("Recurrence") ); | 79 | QFrame *topFrame = addPage( i18n("Recurrence") ); |
80 | QBoxLayout *topLayout = new QVBoxLayout( topFrame ); | 80 | QBoxLayout *topLayout = new QVBoxLayout( topFrame ); |
81 | 81 | ||
82 | mRecurrence = new KOEditorRecurrence( topFrame ); | 82 | mRecurrence = new KOEditorRecurrence( topFrame ); |
83 | topLayout->addWidget( mRecurrence ); | 83 | topLayout->addWidget( mRecurrence ); |
84 | } | 84 | } |
85 | 85 | ||
86 | void KOTodoEditor::setCategories( QString s ) | 86 | void KOTodoEditor::setCategories( QString s ) |
87 | { | 87 | { |
88 | mGeneral->setCategories(s); | 88 | mGeneral->setCategories(s); |
89 | } | 89 | } |
90 | void KOTodoEditor::setSecrecy( int sec ) | 90 | void KOTodoEditor::setSecrecy( int sec ) |
91 | { | 91 | { |
92 | mGeneral->setSecrecy( sec ); | 92 | mGeneral->setSecrecy( sec ); |
93 | } | 93 | } |
94 | void KOTodoEditor::reload() | 94 | void KOTodoEditor::reload() |
95 | { | 95 | { |
96 | if ( mTodo ) readTodo( mTodo ); | 96 | if ( mTodo ) readTodo( mTodo ); |
97 | } | 97 | } |
98 | 98 | ||
99 | void KOTodoEditor::setupGeneral() | 99 | void KOTodoEditor::setupGeneral() |
100 | { | 100 | { |
101 | mGeneral = new KOEditorGeneralTodo(this); | 101 | mGeneral = new KOEditorGeneralTodo(this); |
102 | connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); | 102 | connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); |
103 | 103 | ||
104 | // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); | 104 | // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); |
105 | //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)), | 105 | //connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)), |
106 | // mGeneral,SLOT(setCategories(const QString &))); | 106 | // mGeneral,SLOT(setCategories(const QString &))); |
107 | 107 | ||
108 | if (KOPrefs::instance()->mCompactDialogs) { | 108 | if (KOPrefs::instance()->mCompactDialogs) { |
109 | QFrame *topFrame = addPage(i18n("General")); | 109 | QFrame *topFrame = addPage(i18n("General")); |
110 | 110 | ||
111 | QBoxLayout *topLayout = new QVBoxLayout(topFrame); | 111 | QBoxLayout *topLayout = new QVBoxLayout(topFrame); |
112 | if ( QApplication::desktop()->width() < 480 ) { | 112 | if ( QApplication::desktop()->width() < 480 ) { |
113 | topLayout->setMargin(1); | 113 | topLayout->setMargin(marginHintSmall()); |
114 | topLayout->setSpacing(1); | 114 | topLayout->setSpacing(spacingHintSmall()); |
115 | } else { | 115 | } else { |
116 | topLayout->setMargin(marginHint()-1); | 116 | topLayout->setMargin(marginHint()); |
117 | topLayout->setSpacing(spacingHint()-1); | 117 | topLayout->setSpacing(spacingHint()); |
118 | } | 118 | } |
119 | mGeneral->initHeader(topFrame,topLayout); | 119 | mGeneral->initHeader(topFrame,topLayout); |
120 | mGeneral->initTime(topFrame,topLayout); | 120 | mGeneral->initTime(topFrame,topLayout); |
121 | mGeneral->initAlarm(topFrame,topLayout); | 121 | mGeneral->initAlarm(topFrame,topLayout); |
122 | mGeneral->enableAlarm( false ); | 122 | mGeneral->enableAlarm( false ); |
123 | 123 | ||
124 | 124 | ||
125 | QBoxLayout *priorityLayout; | 125 | QBoxLayout *priorityLayout; |
126 | if ( QApplication::desktop()->width() < 500 ) | 126 | if ( QApplication::desktop()->width() < 500 ) |
127 | priorityLayout = new QVBoxLayout( topLayout ); | 127 | priorityLayout = new QVBoxLayout( topLayout ); |
128 | else | 128 | else |
129 | priorityLayout = new QHBoxLayout( topLayout ); | 129 | priorityLayout = new QHBoxLayout( topLayout ); |
130 | QWidget* prioWidget = new QWidget (topFrame); | 130 | QWidget* prioWidget = new QWidget (topFrame); |
131 | priorityLayout->addWidget( prioWidget ); | 131 | priorityLayout->addWidget( prioWidget ); |
132 | QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget); | 132 | QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget); |
133 | 133 | ||
134 | 134 | ||
135 | QIconSet icon; | 135 | QIconSet icon; |
136 | if ( QApplication::desktop()->width() < 321 ) | 136 | if ( QApplication::desktop()->width() < 321 ) |
137 | icon = SmallIcon("fileimport16"); | 137 | icon = SmallIcon("fileimport16"); |
138 | else | 138 | else |
139 | icon = SmallIcon("fileimport"); | 139 | icon = SmallIcon("fileimport"); |
140 | QPushButton * loadTemplate = new QPushButton( prioWidget); | 140 | QPushButton * loadTemplate = new QPushButton( prioWidget); |
141 | loadTemplate->setIconSet (icon ) ; | 141 | loadTemplate->setIconSet (icon ) ; |
142 | int size = loadTemplate->sizeHint().height(); | 142 | int size = loadTemplate->sizeHint().height(); |
143 | loadTemplate->setFixedSize( size, size ); | 143 | loadTemplate->setFixedSize( size, size ); |
144 | if ( QApplication::desktop()->width() < 321 ) | 144 | if ( QApplication::desktop()->width() < 321 ) |
145 | icon = SmallIcon("fileexport16"); | 145 | icon = SmallIcon("fileexport16"); |
146 | else | 146 | else |
147 | icon = SmallIcon("fileexport"); | 147 | icon = SmallIcon("fileexport"); |
148 | QPushButton * saveTemplate = new QPushButton( prioWidget); | 148 | QPushButton * saveTemplate = new QPushButton( prioWidget); |
149 | saveTemplate->setIconSet (icon ) ; | 149 | saveTemplate->setIconSet (icon ) ; |
150 | saveTemplate->setFixedSize( size, size ); | 150 | saveTemplate->setFixedSize( size, size ); |
151 | 151 | ||
152 | priorityLayout2->addWidget(loadTemplate); | 152 | priorityLayout2->addWidget(loadTemplate); |
153 | priorityLayout2->addWidget(saveTemplate); | 153 | priorityLayout2->addWidget(saveTemplate); |
154 | mGeneral->initPriority(prioWidget,priorityLayout2); | 154 | mGeneral->initPriority(prioWidget,priorityLayout2); |
155 | mGeneral->initCategories( topFrame, priorityLayout ); | 155 | mGeneral->initCategories( topFrame, priorityLayout ); |
156 | topLayout->addStretch(1); | 156 | topLayout->addStretch(1); |
157 | 157 | ||
158 | QFrame *topFrame2 = addPage(i18n("Details")); | 158 | QFrame *topFrame2 = addPage(i18n("Details")); |
159 | 159 | ||
160 | QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); | 160 | QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); |
161 | topLayout2->setMargin(marginHint()); | 161 | topLayout2->setMargin(marginHint()); |
162 | topLayout2->setSpacing(spacingHint()); | 162 | topLayout2->setSpacing(spacingHint()); |
163 | 163 | ||
164 | QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 ); | 164 | QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 ); |
165 | mGeneral->initCompletion(topFrame2,completionLayout); | 165 | mGeneral->initCompletion(topFrame2,completionLayout); |
166 | 166 | ||
167 | 167 | ||
168 | mGeneral->initSecrecy( topFrame2, topLayout2 ); | 168 | mGeneral->initSecrecy( topFrame2, topLayout2 ); |
169 | mGeneral->initDescription(topFrame2,topLayout2); | 169 | mGeneral->initDescription(topFrame2,topLayout2); |
170 | 170 | ||
171 | // QHBox * hb = new QHBox ( topFrame2 ); | 171 | // QHBox * hb = new QHBox ( topFrame2 ); |
172 | // topLayout2->addWidget(hb); | 172 | // topLayout2->addWidget(hb); |
173 | // hb->setSpacing( 3 ); | 173 | // hb->setSpacing( 3 ); |
174 | 174 | ||
175 | connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); | 175 | connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); |
176 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); | 176 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); |
177 | 177 | ||
178 | } else { | 178 | } else { |
179 | QFrame *topFrame = addPage(i18n("General")); | 179 | QFrame *topFrame = addPage(i18n("General")); |
180 | 180 | ||
181 | QBoxLayout *topLayout = new QVBoxLayout(topFrame); | 181 | QBoxLayout *topLayout = new QVBoxLayout(topFrame); |
182 | topLayout->setSpacing(spacingHint()); | 182 | topLayout->setSpacing(spacingHint()); |
183 | 183 | ||
184 | mGeneral->initHeader(topFrame,topLayout); | 184 | mGeneral->initHeader(topFrame,topLayout); |
185 | mGeneral->initTime(topFrame,topLayout); | 185 | mGeneral->initTime(topFrame,topLayout); |
186 | mGeneral->initStatus(topFrame,topLayout); | 186 | mGeneral->initStatus(topFrame,topLayout); |
187 | QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); | 187 | QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); |
188 | mGeneral->initAlarm(topFrame,alarmLineLayout); | 188 | mGeneral->initAlarm(topFrame,alarmLineLayout); |
189 | mGeneral->initDescription(topFrame,topLayout); | 189 | mGeneral->initDescription(topFrame,topLayout); |
190 | QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); | 190 | QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); |
191 | mGeneral->initCategories( topFrame, detailsLayout ); | 191 | mGeneral->initCategories( topFrame, detailsLayout ); |
192 | mGeneral->initSecrecy( topFrame, detailsLayout ); | 192 | mGeneral->initSecrecy( topFrame, detailsLayout ); |
193 | } | 193 | } |
194 | mGeneral->finishSetup(); | 194 | mGeneral->finishSetup(); |
195 | 195 | ||
196 | } | 196 | } |
197 | 197 | ||
198 | void KOTodoEditor::editTodo(Todo *todo, bool editDescription) | 198 | void KOTodoEditor::editTodo(Todo *todo, bool editDescription) |
199 | { | 199 | { |
200 | //init(); | 200 | //init(); |
201 | 201 | ||
202 | mTodo = todo; | 202 | mTodo = todo; |
203 | readTodo(mTodo); | 203 | readTodo(mTodo); |
204 | if ( editDescription ) { | 204 | if ( editDescription ) { |
205 | showPage( 1 ); | 205 | showPage( 1 ); |
206 | mGeneral->setFocusOn( 1 ); | 206 | mGeneral->setFocusOn( 1 ); |
207 | } else { | 207 | } else { |
208 | showPage( 0 ); | 208 | showPage( 0 ); |
209 | mGeneral->setFocusOn( 2 ); | 209 | mGeneral->setFocusOn( 2 ); |
210 | } | 210 | } |
211 | checkRecurrence(); | 211 | checkRecurrence(); |
212 | } | 212 | } |
213 | 213 | ||
214 | void KOTodoEditor::newTodo(QDateTime due,Todo *relatedTodo,bool allDay) | 214 | void KOTodoEditor::newTodo(QDateTime due,Todo *relatedTodo,bool allDay) |
215 | { | 215 | { |
216 | //init(); | 216 | //init(); |
217 | 217 | ||
218 | mTodo = 0; | 218 | mTodo = 0; |
219 | setDefaults(due,relatedTodo,allDay); | 219 | setDefaults(due,relatedTodo,allDay); |
220 | } | 220 | } |
221 | 221 | ||
222 | void KOTodoEditor::loadDefaults() | 222 | void KOTodoEditor::loadDefaults() |
223 | { | 223 | { |
224 | setDefaults(QDateTime::currentDateTime().addDays(7),0,false); | 224 | setDefaults(QDateTime::currentDateTime().addDays(7),0,false); |
225 | } | 225 | } |
226 | 226 | ||
227 | bool KOTodoEditor::processInput( bool emitTime ) | 227 | bool KOTodoEditor::processInput( bool emitTime ) |
228 | { | 228 | { |
229 | if (!validateInput()) return false; | 229 | if (!validateInput()) return false; |
230 | 230 | ||
231 | Todo *todo = 0; | 231 | Todo *todo = 0; |
232 | 232 | ||
233 | if (mTodo) todo = mTodo; | 233 | if (mTodo) todo = mTodo; |
234 | else { | 234 | else { |
235 | todo = new Todo; | 235 | todo = new Todo; |
236 | todo->setOrganizer(KOPrefs::instance()->email()); | 236 | todo->setOrganizer(KOPrefs::instance()->email()); |
237 | } | 237 | } |
238 | 238 | ||
239 | writeTodo(todo); | 239 | writeTodo(todo); |
240 | if ( emitTime ) { | 240 | if ( emitTime ) { |
241 | globalFlagBlockAgenda = 1; | 241 | globalFlagBlockAgenda = 1; |
242 | emit showAgendaView( false ); | 242 | emit showAgendaView( false ); |
243 | if ( todo->hasDueDate() ) | 243 | if ( todo->hasDueDate() ) |
244 | emit jumpToTime( todo->dtDue().date() ); | 244 | emit jumpToTime( todo->dtDue().date() ); |
245 | globalFlagBlockAgenda = 2; | 245 | globalFlagBlockAgenda = 2; |
246 | } | 246 | } |
247 | if (mTodo) { | 247 | if (mTodo) { |
248 | todo->setRevision(todo->revision()+1); | 248 | todo->setRevision(todo->revision()+1); |
249 | emit todoChanged(todo); | 249 | emit todoChanged(todo); |
250 | } else { | 250 | } else { |
251 | mCalendar->addTodo(todo); | 251 | mCalendar->addTodo(todo); |
252 | mTodo = todo; | 252 | mTodo = todo; |
253 | emit todoAdded(todo); | 253 | emit todoAdded(todo); |
254 | } | 254 | } |
255 | 255 | ||
256 | return true; | 256 | return true; |
257 | } | 257 | } |
258 | 258 | ||
259 | void KOTodoEditor::deleteTodo() | 259 | void KOTodoEditor::deleteTodo() |
260 | { | 260 | { |
261 | if (mTodo) { | 261 | if (mTodo) { |
262 | if (KOPrefs::instance()->mConfirm) { | 262 | if (KOPrefs::instance()->mConfirm) { |
263 | switch (msgItemDelete()) { | 263 | switch (msgItemDelete()) { |
264 | case KMessageBox::Continue: // OK | 264 | case KMessageBox::Continue: // OK |
265 | emit todoToBeDeleted(mTodo); | 265 | emit todoToBeDeleted(mTodo); |
266 | emit dialogClose(mTodo); | 266 | emit dialogClose(mTodo); |
267 | mCalendar->deleteTodo(mTodo); | 267 | mCalendar->deleteTodo(mTodo); |
268 | emit todoDeleted(); | 268 | emit todoDeleted(); |
269 | reject(); | 269 | reject(); |
270 | break; | 270 | break; |
271 | } | 271 | } |
272 | } | 272 | } |
273 | else { | 273 | else { |
274 | emit todoToBeDeleted(mTodo); | 274 | emit todoToBeDeleted(mTodo); |
275 | emit dialogClose(mTodo); | 275 | emit dialogClose(mTodo); |
276 | mCalendar->deleteTodo(mTodo); | 276 | mCalendar->deleteTodo(mTodo); |
277 | emit todoDeleted(); | 277 | emit todoDeleted(); |
278 | reject(); | 278 | reject(); |
279 | } | 279 | } |
280 | } else { | 280 | } else { |
281 | reject(); | 281 | reject(); |
282 | } | 282 | } |
283 | } | 283 | } |
284 | 284 | ||
285 | void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay) | 285 | void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay) |
286 | { | 286 | { |
287 | mRelatedTodo = relatedEvent; | 287 | mRelatedTodo = relatedEvent; |
288 | 288 | ||
289 | mGeneral->setDefaults(due,allDay); | 289 | mGeneral->setDefaults(due,allDay); |
290 | mDetails->setDefaults(); | 290 | mDetails->setDefaults(); |
291 | showPage( 0 ); | 291 | showPage( 0 ); |
292 | if ( mRelatedTodo ) { | 292 | if ( mRelatedTodo ) { |
293 | mGeneral->setCategories (mRelatedTodo->categoriesStr ()); | 293 | mGeneral->setCategories (mRelatedTodo->categoriesStr ()); |
294 | mGeneral->setSecrecy (mRelatedTodo->secrecy ()); | 294 | mGeneral->setSecrecy (mRelatedTodo->secrecy ()); |
295 | if ( mRelatedTodo->priority() < 3 ) | 295 | if ( mRelatedTodo->priority() < 3 ) |
296 | mGeneral->mPriorityCombo->setCurrentItem(mRelatedTodo->priority()-1); | 296 | mGeneral->mPriorityCombo->setCurrentItem(mRelatedTodo->priority()-1); |
297 | mGeneral->mSummaryEdit->lineEdit()->setText(mRelatedTodo->summary()+": "); | 297 | mGeneral->mSummaryEdit->lineEdit()->setText(mRelatedTodo->summary()+": "); |
298 | int len = mRelatedTodo->summary().length(); | 298 | int len = mRelatedTodo->summary().length(); |
299 | mGeneral->mSummaryEdit->lineEdit()->setFocus(); | 299 | mGeneral->mSummaryEdit->lineEdit()->setFocus(); |
300 | mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 ); | 300 | mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 ); |
301 | mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 ); | 301 | mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 ); |
302 | 302 | ||
303 | } else | 303 | } else |
304 | mGeneral->setFocusOn( 2 ); | 304 | mGeneral->setFocusOn( 2 ); |
305 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); | 305 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); |
306 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); | 306 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); |
307 | } | 307 | } |
308 | void KOTodoEditor::checkRecurrence() | 308 | void KOTodoEditor::checkRecurrence() |
309 | { | 309 | { |
310 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { | 310 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { |
311 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), true ); | 311 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), true ); |
312 | 312 | ||
313 | if ( mTodo ) | 313 | if ( mTodo ) |
314 | mRecurrence->readEvent( mTodo ); | 314 | mRecurrence->readEvent( mTodo ); |
315 | else { | 315 | else { |
316 | bool time = mGeneral->mTimeButton->isChecked(); | 316 | bool time = mGeneral->mTimeButton->isChecked(); |
317 | QDateTime from,to; | 317 | QDateTime from,to; |
318 | if ( time ) { | 318 | if ( time ) { |
319 | to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ; | 319 | to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ; |
320 | from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ; | 320 | from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ; |
321 | } else { | 321 | } else { |
322 | to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; | 322 | to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; |
323 | from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; | 323 | from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; |
324 | } | 324 | } |
325 | if ( to < from ) | 325 | if ( to < from ) |
326 | to = from; | 326 | to = from; |
327 | mRecurrence->setDefaults(from,to,!time); | 327 | mRecurrence->setDefaults(from,to,!time); |
328 | } | 328 | } |
329 | } else { | 329 | } else { |
330 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); | 330 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); |
331 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); | 331 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); |
332 | } | 332 | } |
333 | } | 333 | } |
334 | void KOTodoEditor::readTodo(Todo *todo) | 334 | void KOTodoEditor::readTodo(Todo *todo) |
335 | { | 335 | { |
336 | mGeneral->readTodo(todo); | 336 | mGeneral->readTodo(todo); |
337 | mDetails->readEvent(todo); | 337 | mDetails->readEvent(todo); |
338 | mRelatedTodo = 0;//todo->relatedTo(); | 338 | mRelatedTodo = 0;//todo->relatedTo(); |
339 | // categories | 339 | // categories |
340 | // mCategoryDialog->setSelected(todo->categories()); | 340 | // mCategoryDialog->setSelected(todo->categories()); |
341 | 341 | ||
342 | // We should handle read-only events here. | 342 | // We should handle read-only events here. |
343 | } | 343 | } |
344 | 344 | ||
345 | void KOTodoEditor::writeTodo(Todo *event) | 345 | void KOTodoEditor::writeTodo(Todo *event) |
346 | { | 346 | { |
347 | mGeneral->writeTodo(event); | 347 | bool maybeComputeRecurrenceTime = false; |
348 | mDetails->writeEvent(event); | 348 | if( event->hasRecurrenceID() && event->percentComplete() < 100) |
349 | 349 | maybeComputeRecurrenceTime = true; | |
350 | // set related event, i.e. parent to-do in this case. | 350 | event->setHasRecurrenceID( false ); |
351 | if (mRelatedTodo) { | 351 | mGeneral->writeTodo(event); |
352 | event->setRelatedTo(mRelatedTodo); | 352 | mDetails->writeEvent(event); |
353 | } | 353 | |
354 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { | 354 | // set related event, i.e. parent to-do in this case. |
355 | mRecurrence->writeEvent(event); | 355 | if (mRelatedTodo) { |
356 | if ( event->doesRecur() ) { | 356 | event->setRelatedTo(mRelatedTodo); |
357 | event->setRecurrenceID( event->dtStart().addSecs(-1) ); | 357 | } |
358 | event->setRecurDates(); | 358 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { |
359 | } else { | 359 | mRecurrence->writeEvent(event); |
360 | event->setHasRecurrenceID( false ); | 360 | if ( event->doesRecur() ) { |
361 | } | 361 | int addSec = -1 ; |
362 | } else { | 362 | if ( maybeComputeRecurrenceTime && event->percentComplete() == 100 ) |
363 | event->setHasRecurrenceID( false ); | 363 | addSec = 1; |
364 | event->recurrence()->unsetRecurs(); | 364 | event->setRecurrenceID( event->dtStart().addSecs( addSec ) ); |
365 | } | 365 | event->setRecurDates(); |
366 | } else { | ||
367 | event->setHasRecurrenceID( false ); | ||
368 | } | ||
369 | } else { | ||
370 | event->setHasRecurrenceID( false ); | ||
371 | event->recurrence()->unsetRecurs(); | ||
372 | } | ||
366 | } | 373 | } |
367 | 374 | ||
368 | bool KOTodoEditor::validateInput() | 375 | bool KOTodoEditor::validateInput() |
369 | { | 376 | { |
370 | if (!mGeneral->validateInput()) return false; | 377 | if (!mGeneral->validateInput()) return false; |
371 | if (!mDetails->validateInput()) return false; | 378 | if (!mDetails->validateInput()) return false; |
372 | return true; | 379 | return true; |
373 | } | 380 | } |
374 | 381 | ||
375 | int KOTodoEditor::msgItemDelete() | 382 | int KOTodoEditor::msgItemDelete() |
376 | { | 383 | { |
377 | return KMessageBox::warningContinueCancel(this, | 384 | return KMessageBox::warningContinueCancel(this, |
378 | i18n("This item will be permanently deleted."), | 385 | i18n("This item will be permanently deleted."), |
379 | i18n("KOrganizer Confirmation"),i18n("Delete")); | 386 | i18n("KOrganizer Confirmation"),i18n("Delete")); |
380 | } | 387 | } |
381 | 388 | ||
382 | void KOTodoEditor::modified (int modification) | 389 | void KOTodoEditor::modified (int modification) |
383 | { | 390 | { |
384 | if (modification == KOGlobals::CATEGORY_MODIFIED || | 391 | if (modification == KOGlobals::CATEGORY_MODIFIED || |
385 | KOGlobals::UNKNOWN_MODIFIED == modification ) | 392 | KOGlobals::UNKNOWN_MODIFIED == modification ) |
386 | // mCategoryDialog->setSelected (mTodo->categories ()); | 393 | // mCategoryDialog->setSelected (mTodo->categories ()); |
387 | mGeneral->modified (mTodo, modification); | 394 | mGeneral->modified (mTodo, modification); |
388 | 395 | ||
389 | } | 396 | } |
390 | 397 | ||
391 | void KOTodoEditor::slotLoadTemplate() | 398 | void KOTodoEditor::slotLoadTemplate() |
392 | { | 399 | { |
393 | 400 | ||
394 | QString fileName =locateLocal( "templates", "todos" ); | 401 | QString fileName =locateLocal( "templates", "todos" ); |
395 | QDir t_dir; | 402 | QDir t_dir; |
396 | if ( !t_dir.exists(fileName) ) | 403 | if ( !t_dir.exists(fileName) ) |
397 | t_dir.mkdir ( fileName ); | 404 | t_dir.mkdir ( fileName ); |
398 | fileName += "/todo"; | 405 | fileName += "/todo"; |
399 | fileName = KFileDialog::getSaveFileName( fileName , "Load Todo template", this ); | 406 | fileName = KFileDialog::getSaveFileName( fileName , "Load Todo template", this ); |
400 | if ( fileName.length() == 0 ) | 407 | if ( fileName.length() == 0 ) |
401 | return; | 408 | return; |
402 | CalendarLocal cal; | 409 | CalendarLocal cal; |
403 | ICalFormat format; | 410 | ICalFormat format; |
404 | if ( !format.load( &cal, fileName ) ) { | 411 | if ( !format.load( &cal, fileName ) ) { |
405 | KMessageBox::error( this, i18n("Error loading template file\n '%1'.") | 412 | KMessageBox::error( this, i18n("Error loading template file\n '%1'.") |
406 | .arg( fileName ) ); | 413 | .arg( fileName ) ); |
407 | return ; | 414 | return ; |
408 | } | 415 | } |
409 | QPtrList<Todo> todos = cal.todos(); | 416 | QPtrList<Todo> todos = cal.todos(); |
410 | Todo * todo = todos.first(); | 417 | Todo * todo = todos.first(); |
411 | if ( !todo ) { | 418 | if ( !todo ) { |
412 | KMessageBox::error( this, | 419 | KMessageBox::error( this, |
413 | i18n("Template does not\ncontain a valid Todo.")); | 420 | i18n("Template does not\ncontain a valid Todo.")); |
414 | } else { | 421 | } else { |
415 | readTodo( todo ); | 422 | readTodo( todo ); |
416 | } | 423 | } |
417 | 424 | ||
418 | } | 425 | } |
419 | 426 | ||
420 | void KOTodoEditor::slotSaveTemplate() | 427 | void KOTodoEditor::slotSaveTemplate() |
421 | { | 428 | { |
422 | QString fileName =locateLocal( "templates", "todos" ); | 429 | QString fileName =locateLocal( "templates", "todos" ); |
423 | QDir t_dir; | 430 | QDir t_dir; |
424 | if ( !t_dir.exists(fileName) ) | 431 | if ( !t_dir.exists(fileName) ) |
425 | t_dir.mkdir ( fileName ); | 432 | t_dir.mkdir ( fileName ); |
426 | fileName += "/todo"; | 433 | fileName += "/todo"; |
427 | fileName = KFileDialog::getSaveFileName( fileName , "Save as Todo template", this ); | 434 | fileName = KFileDialog::getSaveFileName( fileName , "Save as Todo template", this ); |
428 | if ( fileName.length() > 0 ) | 435 | if ( fileName.length() > 0 ) |
429 | saveTemplate( fileName ); | 436 | saveTemplate( fileName ); |
430 | } | 437 | } |
431 | 438 | ||
432 | void KOTodoEditor::saveTemplate( const QString &templateName ) | 439 | void KOTodoEditor::saveTemplate( const QString &templateName ) |
433 | { | 440 | { |
434 | Todo *todo = new Todo; | 441 | Todo *todo = new Todo; |
435 | writeTodo( todo ); | 442 | writeTodo( todo ); |
436 | saveAsTemplate( todo, templateName ); | 443 | saveAsTemplate( todo, templateName ); |
437 | } | 444 | } |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 25be63a..f26d16d 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1,1292 +1,1293 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qheader.h> | 25 | #include <qheader.h> |
26 | #include <qcursor.h> | 26 | #include <qcursor.h> |
27 | #include <qwhatsthis.h> | 27 | #include <qwhatsthis.h> |
28 | 28 | ||
29 | #include <qvbox.h> | 29 | #include <qvbox.h> |
30 | #include <kdebug.h> | 30 | #include <kdebug.h> |
31 | #include "koprefs.h" | 31 | #include "koprefs.h" |
32 | #include <klocale.h> | 32 | #include <klocale.h> |
33 | #include <kglobal.h> | 33 | #include <kglobal.h> |
34 | #include <kiconloader.h> | 34 | #include <kiconloader.h> |
35 | #include <kmessagebox.h> | 35 | #include <kmessagebox.h> |
36 | 36 | ||
37 | #include <libkcal/icaldrag.h> | 37 | #include <libkcal/icaldrag.h> |
38 | #include <libkcal/vcaldrag.h> | 38 | #include <libkcal/vcaldrag.h> |
39 | #include <libkcal/calfilter.h> | 39 | #include <libkcal/calfilter.h> |
40 | #include <libkcal/dndfactory.h> | 40 | #include <libkcal/dndfactory.h> |
41 | #include <libkcal/calendarresources.h> | 41 | #include <libkcal/calendarresources.h> |
42 | #include <libkcal/resourcecalendar.h> | 42 | #include <libkcal/resourcecalendar.h> |
43 | #include <kresources/resourceselectdialog.h> | 43 | #include <kresources/resourceselectdialog.h> |
44 | #include <libkcal/kincidenceformatter.h> | 44 | #include <libkcal/kincidenceformatter.h> |
45 | #ifndef DESKTOP_VERSION | 45 | #ifndef DESKTOP_VERSION |
46 | #include <qpe/qpeapplication.h> | 46 | #include <qpe/qpeapplication.h> |
47 | #else | 47 | #else |
48 | #include <qapplication.h> | 48 | #include <qapplication.h> |
49 | #endif | 49 | #endif |
50 | #ifndef KORG_NOPRINTER | 50 | #ifndef KORG_NOPRINTER |
51 | #include "calprinter.h" | 51 | #include "calprinter.h" |
52 | #endif | 52 | #endif |
53 | #include "docprefs.h" | 53 | #include "docprefs.h" |
54 | 54 | ||
55 | #include "kotodoview.h" | 55 | #include "kotodoview.h" |
56 | using namespace KOrg; | 56 | using namespace KOrg; |
57 | 57 | ||
58 | 58 | ||
59 | class KOTodoViewWhatsThis :public QWhatsThis | 59 | class KOTodoViewWhatsThis :public QWhatsThis |
60 | { | 60 | { |
61 | public: | 61 | public: |
62 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 62 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; |
63 | 63 | ||
64 | protected: | 64 | protected: |
65 | virtual QString text( const QPoint& p) | 65 | virtual QString text( const QPoint& p) |
66 | { | 66 | { |
67 | return _view->getWhatsThisText(p) ; | 67 | return _view->getWhatsThisText(p) ; |
68 | } | 68 | } |
69 | private: | 69 | private: |
70 | QWidget* _wid; | 70 | QWidget* _wid; |
71 | KOTodoView * _view; | 71 | KOTodoView * _view; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, | 74 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, |
75 | const char *name) : | 75 | const char *name) : |
76 | KListView(parent,name) | 76 | KListView(parent,name) |
77 | { | 77 | { |
78 | mName = QString ( name ); | 78 | mName = QString ( name ); |
79 | mCalendar = calendar; | 79 | mCalendar = calendar; |
80 | #ifndef DESKTOP_VERSION | 80 | #ifndef DESKTOP_VERSION |
81 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 81 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
82 | #endif | 82 | #endif |
83 | mOldCurrent = 0; | 83 | mOldCurrent = 0; |
84 | mMousePressed = false; | 84 | mMousePressed = false; |
85 | 85 | ||
86 | setAcceptDrops(true); | 86 | setAcceptDrops(true); |
87 | viewport()->setAcceptDrops(true); | 87 | viewport()->setAcceptDrops(true); |
88 | int size = 16; | 88 | int size = 16; |
89 | if (qApp->desktop()->width() < 300 ) | 89 | if (qApp->desktop()->width() < 300 ) |
90 | size = 12; | 90 | size = 12; |
91 | setTreeStepSize( size + 6 ); | 91 | setTreeStepSize( size + 6 ); |
92 | 92 | ||
93 | } | 93 | } |
94 | 94 | ||
95 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) | 95 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) |
96 | { | 96 | { |
97 | #ifndef KORG_NODND | 97 | #ifndef KORG_NODND |
98 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; | 98 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; |
99 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 99 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
100 | !QTextDrag::canDecode( e ) ) { | 100 | !QTextDrag::canDecode( e ) ) { |
101 | e->ignore(); | 101 | e->ignore(); |
102 | return; | 102 | return; |
103 | } | 103 | } |
104 | 104 | ||
105 | mOldCurrent = currentItem(); | 105 | mOldCurrent = currentItem(); |
106 | #endif | 106 | #endif |
107 | } | 107 | } |
108 | 108 | ||
109 | 109 | ||
110 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) | 110 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) |
111 | { | 111 | { |
112 | #ifndef KORG_NODND | 112 | #ifndef KORG_NODND |
113 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; | 113 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; |
114 | 114 | ||
115 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 115 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
116 | !QTextDrag::canDecode( e ) ) { | 116 | !QTextDrag::canDecode( e ) ) { |
117 | e->ignore(); | 117 | e->ignore(); |
118 | return; | 118 | return; |
119 | } | 119 | } |
120 | 120 | ||
121 | e->accept(); | 121 | e->accept(); |
122 | #endif | 122 | #endif |
123 | } | 123 | } |
124 | 124 | ||
125 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) | 125 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) |
126 | { | 126 | { |
127 | #ifndef KORG_NODND | 127 | #ifndef KORG_NODND |
128 | // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; | 128 | // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; |
129 | 129 | ||
130 | setCurrentItem(mOldCurrent); | 130 | setCurrentItem(mOldCurrent); |
131 | setSelected(mOldCurrent,true); | 131 | setSelected(mOldCurrent,true); |
132 | #endif | 132 | #endif |
133 | } | 133 | } |
134 | 134 | ||
135 | void KOTodoListView::contentsDropEvent(QDropEvent *e) | 135 | void KOTodoListView::contentsDropEvent(QDropEvent *e) |
136 | { | 136 | { |
137 | #ifndef KORG_NODND | 137 | #ifndef KORG_NODND |
138 | // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; | 138 | // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; |
139 | 139 | ||
140 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 140 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
141 | !QTextDrag::canDecode( e ) ) { | 141 | !QTextDrag::canDecode( e ) ) { |
142 | e->ignore(); | 142 | e->ignore(); |
143 | return; | 143 | return; |
144 | } | 144 | } |
145 | 145 | ||
146 | DndFactory factory( mCalendar ); | 146 | DndFactory factory( mCalendar ); |
147 | Todo *todo = factory.createDropTodo(e); | 147 | Todo *todo = factory.createDropTodo(e); |
148 | 148 | ||
149 | if (todo) { | 149 | if (todo) { |
150 | e->acceptAction(); | 150 | e->acceptAction(); |
151 | 151 | ||
152 | KOTodoViewItem *destination = | 152 | KOTodoViewItem *destination = |
153 | (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); | 153 | (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); |
154 | Todo *destinationEvent = 0; | 154 | Todo *destinationEvent = 0; |
155 | if (destination) destinationEvent = destination->todo(); | 155 | if (destination) destinationEvent = destination->todo(); |
156 | 156 | ||
157 | Todo *existingTodo = mCalendar->todo(todo->uid()); | 157 | Todo *existingTodo = mCalendar->todo(todo->uid()); |
158 | 158 | ||
159 | if(existingTodo) { | 159 | if(existingTodo) { |
160 | Incidence *to = destinationEvent; | 160 | Incidence *to = destinationEvent; |
161 | while(to) { | 161 | while(to) { |
162 | if (to->uid() == todo->uid()) { | 162 | if (to->uid() == todo->uid()) { |
163 | KMessageBox::sorry(this, | 163 | KMessageBox::sorry(this, |
164 | i18n("Cannot move Todo to itself\nor a child of itself"), | 164 | i18n("Cannot move Todo to itself\nor a child of itself"), |
165 | i18n("Drop Todo")); | 165 | i18n("Drop Todo")); |
166 | delete todo; | 166 | delete todo; |
167 | return; | 167 | return; |
168 | } | 168 | } |
169 | to = to->relatedTo(); | 169 | to = to->relatedTo(); |
170 | } | 170 | } |
171 | internalDrop = true; | 171 | internalDrop = true; |
172 | if ( destinationEvent ) | 172 | if ( destinationEvent ) |
173 | reparentTodoSignal( destinationEvent, existingTodo ); | 173 | reparentTodoSignal( destinationEvent, existingTodo ); |
174 | else | 174 | else |
175 | unparentTodoSignal(existingTodo); | 175 | unparentTodoSignal(existingTodo); |
176 | delete todo; | 176 | delete todo; |
177 | } else { | 177 | } else { |
178 | mCalendar->addTodo(todo); | 178 | mCalendar->addTodo(todo); |
179 | emit todoDropped(todo, KOGlobals::EVENTADDED); | 179 | emit todoDropped(todo, KOGlobals::EVENTADDED); |
180 | if ( destinationEvent ) | 180 | if ( destinationEvent ) |
181 | reparentTodoSignal( destinationEvent, todo ); | 181 | reparentTodoSignal( destinationEvent, todo ); |
182 | } | 182 | } |
183 | } | 183 | } |
184 | else { | 184 | else { |
185 | QString text; | 185 | QString text; |
186 | if (QTextDrag::decode(e,text)) { | 186 | if (QTextDrag::decode(e,text)) { |
187 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); | 187 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); |
188 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); | 188 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); |
189 | qDebug("Dropped : " + text); | 189 | qDebug("Dropped : " + text); |
190 | QStringList emails = QStringList::split(",",text); | 190 | QStringList emails = QStringList::split(",",text); |
191 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { | 191 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { |
192 | int pos = (*it).find("<"); | 192 | int pos = (*it).find("<"); |
193 | QString name = (*it).left(pos); | 193 | QString name = (*it).left(pos); |
194 | QString email = (*it).mid(pos); | 194 | QString email = (*it).mid(pos); |
195 | if (!email.isEmpty() && todoi) { | 195 | if (!email.isEmpty() && todoi) { |
196 | todoi->todo()->addAttendee(new Attendee(name,email)); | 196 | todoi->todo()->addAttendee(new Attendee(name,email)); |
197 | } | 197 | } |
198 | } | 198 | } |
199 | } | 199 | } |
200 | else { | 200 | else { |
201 | qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); | 201 | qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); |
202 | e->ignore(); | 202 | e->ignore(); |
203 | } | 203 | } |
204 | } | 204 | } |
205 | #endif | 205 | #endif |
206 | } | 206 | } |
207 | void KOTodoListView::wheelEvent (QWheelEvent *e) | 207 | void KOTodoListView::wheelEvent (QWheelEvent *e) |
208 | { | 208 | { |
209 | QListView::wheelEvent (e); | 209 | QListView::wheelEvent (e); |
210 | } | 210 | } |
211 | 211 | ||
212 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | 212 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) |
213 | { | 213 | { |
214 | 214 | ||
215 | QPoint p(contentsToViewport(e->pos())); | 215 | QPoint p(contentsToViewport(e->pos())); |
216 | QListViewItem *i = itemAt(p); | 216 | QListViewItem *i = itemAt(p); |
217 | bool rootClicked = true; | 217 | bool rootClicked = true; |
218 | if (i) { | 218 | if (i) { |
219 | // if the user clicked into the root decoration of the item, don't | 219 | // if the user clicked into the root decoration of the item, don't |
220 | // try to start a drag! | 220 | // try to start a drag! |
221 | int X = p.x(); | 221 | int X = p.x(); |
222 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); | 222 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); |
223 | if (X > header()->sectionPos(0) + | 223 | if (X > header()->sectionPos(0) + |
224 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + | 224 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + |
225 | itemMargin() +i->height()|| | 225 | itemMargin() +i->height()|| |
226 | X < header()->sectionPos(0)) { | 226 | X < header()->sectionPos(0)) { |
227 | rootClicked = false; | 227 | rootClicked = false; |
228 | } | 228 | } |
229 | } else { | 229 | } else { |
230 | rootClicked = false; | 230 | rootClicked = false; |
231 | } | 231 | } |
232 | #ifndef KORG_NODND | 232 | #ifndef KORG_NODND |
233 | mMousePressed = false; | 233 | mMousePressed = false; |
234 | if (! rootClicked && !( e->button() == RightButton) ) { | 234 | if (! rootClicked && !( e->button() == RightButton) ) { |
235 | mPressPos = e->pos(); | 235 | mPressPos = e->pos(); |
236 | mMousePressed = true; | 236 | mMousePressed = true; |
237 | } else { | 237 | } else { |
238 | mMousePressed = false; | 238 | mMousePressed = false; |
239 | } | 239 | } |
240 | #endif | 240 | #endif |
241 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); | 241 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); |
242 | #ifndef DESKTOP_VERSION | 242 | #ifndef DESKTOP_VERSION |
243 | if (!( e->button() == RightButton && rootClicked) ) | 243 | if (!( e->button() == RightButton && rootClicked) ) |
244 | QListView::contentsMousePressEvent(e); | 244 | QListView::contentsMousePressEvent(e); |
245 | #else | 245 | #else |
246 | QListView::contentsMousePressEvent(e); | 246 | QListView::contentsMousePressEvent(e); |
247 | #endif | 247 | #endif |
248 | } | 248 | } |
249 | void KOTodoListView::paintEvent(QPaintEvent* e) | 249 | void KOTodoListView::paintEvent(QPaintEvent* e) |
250 | { | 250 | { |
251 | emit paintNeeded(); | 251 | emit paintNeeded(); |
252 | QListView::paintEvent( e); | 252 | QListView::paintEvent( e); |
253 | } | 253 | } |
254 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | 254 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) |
255 | { | 255 | { |
256 | 256 | ||
257 | #ifndef KORG_NODND | 257 | #ifndef KORG_NODND |
258 | //QListView::contentsMouseMoveEvent(e); | 258 | //QListView::contentsMouseMoveEvent(e); |
259 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > | 259 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > |
260 | QApplication::startDragDistance()*3) { | 260 | QApplication::startDragDistance()*3) { |
261 | mMousePressed = false; | 261 | mMousePressed = false; |
262 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); | 262 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); |
263 | if (item) { | 263 | if (item) { |
264 | DndFactory factory( mCalendar ); | 264 | DndFactory factory( mCalendar ); |
265 | ICalDrag *vd = factory.createDrag( | 265 | ICalDrag *vd = factory.createDrag( |
266 | ((KOTodoViewItem *)item)->todo(),viewport()); | 266 | ((KOTodoViewItem *)item)->todo(),viewport()); |
267 | internalDrop = false; | 267 | internalDrop = false; |
268 | // we cannot do any senseful here, because the DnD is still broken in Qt | 268 | // we cannot do any senseful here, because the DnD is still broken in Qt |
269 | if (vd->drag()) { | 269 | if (vd->drag()) { |
270 | if ( !internalDrop ) { | 270 | if ( !internalDrop ) { |
271 | //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); | 271 | //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); |
272 | qDebug("Dnd: External move: Delete drag source "); | 272 | qDebug("Dnd: External move: Delete drag source "); |
273 | } else | 273 | } else |
274 | qDebug("Dnd: Internal move "); | 274 | qDebug("Dnd: Internal move "); |
275 | 275 | ||
276 | } else { | 276 | } else { |
277 | if ( !internalDrop ) { | 277 | if ( !internalDrop ) { |
278 | qDebug("Dnd: External Copy"); | 278 | qDebug("Dnd: External Copy"); |
279 | } else | 279 | } else |
280 | qDebug("DnD: Internal copy: Copy pending"); | 280 | qDebug("DnD: Internal copy: Copy pending"); |
281 | } | 281 | } |
282 | } | 282 | } |
283 | } | 283 | } |
284 | #endif | 284 | #endif |
285 | } | 285 | } |
286 | void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) | 286 | void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) |
287 | { | 287 | { |
288 | if ( !e->isAutoRepeat() ) { | 288 | if ( !e->isAutoRepeat() ) { |
289 | mFlagKeyPressed = false; | 289 | mFlagKeyPressed = false; |
290 | } | 290 | } |
291 | } | 291 | } |
292 | 292 | ||
293 | 293 | ||
294 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | 294 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) |
295 | { | 295 | { |
296 | qApp->processEvents(); | 296 | qApp->processEvents(); |
297 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 297 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
298 | e->ignore(); | 298 | e->ignore(); |
299 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 299 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
300 | return; | 300 | return; |
301 | } | 301 | } |
302 | if (! e->isAutoRepeat() ) | 302 | if (! e->isAutoRepeat() ) |
303 | mFlagKeyPressed = true; | 303 | mFlagKeyPressed = true; |
304 | QListViewItem* cn; | 304 | QListViewItem* cn; |
305 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { | 305 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { |
306 | cn = currentItem(); | 306 | cn = currentItem(); |
307 | if ( cn ) { | 307 | if ( cn ) { |
308 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 308 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
309 | if ( ci ){ | 309 | if ( ci ){ |
310 | if ( e->state() == ShiftButton ) | 310 | if ( e->state() == ShiftButton ) |
311 | ci->setOn( false ); | 311 | ci->setOn( false ); |
312 | else | 312 | else |
313 | ci->setOn( true ); | 313 | ci->setOn( true ); |
314 | cn = cn->itemBelow(); | 314 | cn = cn->itemBelow(); |
315 | if ( cn ) { | 315 | if ( cn ) { |
316 | setCurrentItem ( cn ); | 316 | setCurrentItem ( cn ); |
317 | ensureItemVisible ( cn ); | 317 | ensureItemVisible ( cn ); |
318 | } | 318 | } |
319 | 319 | ||
320 | } | 320 | } |
321 | } | 321 | } |
322 | 322 | ||
323 | return; | 323 | return; |
324 | } | 324 | } |
325 | 325 | ||
326 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { | 326 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { |
327 | switch ( e->key() ) { | 327 | switch ( e->key() ) { |
328 | case Qt::Key_Down: | 328 | case Qt::Key_Down: |
329 | case Qt::Key_Up: | 329 | case Qt::Key_Up: |
330 | QListView::keyPressEvent ( e ); | 330 | QListView::keyPressEvent ( e ); |
331 | break; | 331 | break; |
332 | case Qt::Key_Left: | 332 | case Qt::Key_Left: |
333 | case Qt::Key_Right: | 333 | case Qt::Key_Right: |
334 | QListView::keyPressEvent ( e ); | 334 | QListView::keyPressEvent ( e ); |
335 | e->accept(); | 335 | e->accept(); |
336 | return; | 336 | return; |
337 | break; | 337 | break; |
338 | default: | 338 | default: |
339 | e->ignore(); | 339 | e->ignore(); |
340 | break; | 340 | break; |
341 | } | 341 | } |
342 | return; | 342 | return; |
343 | } | 343 | } |
344 | e->ignore(); | 344 | e->ignore(); |
345 | } | 345 | } |
346 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) | 346 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) |
347 | { | 347 | { |
348 | QListView::contentsMouseReleaseEvent(e); | 348 | QListView::contentsMouseReleaseEvent(e); |
349 | mMousePressed = false; | 349 | mMousePressed = false; |
350 | } | 350 | } |
351 | 351 | ||
352 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 352 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
353 | { | 353 | { |
354 | if (!e) return; | 354 | if (!e) return; |
355 | 355 | ||
356 | QPoint vp = contentsToViewport(e->pos()); | 356 | QPoint vp = contentsToViewport(e->pos()); |
357 | 357 | ||
358 | QListViewItem *item = itemAt(vp); | 358 | QListViewItem *item = itemAt(vp); |
359 | 359 | ||
360 | emit double_Clicked(item); | 360 | emit double_Clicked(item); |
361 | if (!item) return; | 361 | if (!item) return; |
362 | 362 | ||
363 | emit doubleClicked(item,vp,0); | 363 | emit doubleClicked(item,vp,0); |
364 | } | 364 | } |
365 | 365 | ||
366 | ///////////////////////////////////////////////////////////////////////////// | 366 | ///////////////////////////////////////////////////////////////////////////// |
367 | 367 | ||
368 | KOQuickTodo::KOQuickTodo(QWidget *parent) : | 368 | KOQuickTodo::KOQuickTodo(QWidget *parent) : |
369 | QLineEdit(parent) | 369 | QLineEdit(parent) |
370 | { | 370 | { |
371 | setText(i18n("Click to add a new Todo")); | 371 | setText(i18n("Click to add a new Todo")); |
372 | } | 372 | } |
373 | 373 | ||
374 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) | 374 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) |
375 | { | 375 | { |
376 | if ( text()==i18n("Click to add a new Todo") ) | 376 | if ( text()==i18n("Click to add a new Todo") ) |
377 | setText(""); | 377 | setText(""); |
378 | QLineEdit::focusInEvent(ev); | 378 | QLineEdit::focusInEvent(ev); |
379 | } | 379 | } |
380 | 380 | ||
381 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | 381 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) |
382 | { | 382 | { |
383 | setText(i18n("Click to add a new Todo")); | 383 | setText(i18n("Click to add a new Todo")); |
384 | QLineEdit::focusOutEvent(ev); | 384 | QLineEdit::focusOutEvent(ev); |
385 | } | 385 | } |
386 | 386 | ||
387 | ///////////////////////////////////////////////////////////////////////////// | 387 | ///////////////////////////////////////////////////////////////////////////// |
388 | 388 | ||
389 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 389 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
390 | KOrg::BaseView(calendar,parent,name) | 390 | KOrg::BaseView(calendar,parent,name) |
391 | { | 391 | { |
392 | mPendingUpdateBeforeRepaint = false; | 392 | mPendingUpdateBeforeRepaint = false; |
393 | isFlatDisplay = false; | 393 | isFlatDisplay = false; |
394 | mNavigator = 0; | 394 | mNavigator = 0; |
395 | QBoxLayout *topLayout = new QVBoxLayout(this); | 395 | QBoxLayout *topLayout = new QVBoxLayout(this); |
396 | mName = QString ( name ); | 396 | mName = QString ( name ); |
397 | mBlockUpdate = false; | 397 | mBlockUpdate = false; |
398 | mQuickAdd = new KOQuickTodo(this); | 398 | mQuickAdd = new KOQuickTodo(this); |
399 | topLayout->addWidget(mQuickAdd); | 399 | topLayout->addWidget(mQuickAdd); |
400 | 400 | ||
401 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); | 401 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); |
402 | 402 | ||
403 | mTodoListView = new KOTodoListView(calendar,this, name ); | 403 | mTodoListView = new KOTodoListView(calendar,this, name ); |
404 | topLayout->addWidget(mTodoListView); | 404 | topLayout->addWidget(mTodoListView); |
405 | //mTodoListView->header()->setMaximumHeight(30); | 405 | //mTodoListView->header()->setMaximumHeight(30); |
406 | mTodoListView->setRootIsDecorated(true); | 406 | mTodoListView->setRootIsDecorated(true); |
407 | mTodoListView->setAllColumnsShowFocus(true); | 407 | mTodoListView->setAllColumnsShowFocus(true); |
408 | 408 | ||
409 | mTodoListView->setShowSortIndicator(true); | 409 | mTodoListView->setShowSortIndicator(true); |
410 | 410 | ||
411 | mTodoListView->addColumn(i18n("Todo")); | 411 | mTodoListView->addColumn(i18n("Todo")); |
412 | mTodoListView->addColumn(i18n("Prio")); | 412 | mTodoListView->addColumn(i18n("Prio")); |
413 | mTodoListView->setColumnAlignment(1,AlignHCenter); | 413 | mTodoListView->setColumnAlignment(1,AlignHCenter); |
414 | mTodoListView->addColumn(i18n("Complete")); | 414 | mTodoListView->addColumn(i18n("Complete")); |
415 | mTodoListView->setColumnAlignment(2,AlignCenter); | 415 | mTodoListView->setColumnAlignment(2,AlignCenter); |
416 | 416 | ||
417 | mTodoListView->addColumn(i18n("Due Date")); | 417 | mTodoListView->addColumn(i18n("Due Date")); |
418 | mTodoListView->setColumnAlignment(3,AlignLeft); | 418 | mTodoListView->setColumnAlignment(3,AlignLeft); |
419 | mTodoListView->addColumn(i18n("Due Time")); | 419 | mTodoListView->addColumn(i18n("Due Time")); |
420 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 420 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
421 | 421 | ||
422 | mTodoListView->addColumn(i18n("Start Date")); | 422 | mTodoListView->addColumn(i18n("Start Date")); |
423 | mTodoListView->setColumnAlignment(5,AlignLeft); | 423 | mTodoListView->setColumnAlignment(5,AlignLeft); |
424 | mTodoListView->addColumn(i18n("Start Time")); | 424 | mTodoListView->addColumn(i18n("Start Time")); |
425 | mTodoListView->setColumnAlignment(6,AlignHCenter); | 425 | mTodoListView->setColumnAlignment(6,AlignHCenter); |
426 | 426 | ||
427 | mTodoListView->addColumn(i18n("Cancelled")); | 427 | mTodoListView->addColumn(i18n("Cancelled")); |
428 | mTodoListView->addColumn(i18n("Categories")); | 428 | mTodoListView->addColumn(i18n("Categories")); |
429 | #if 0 | 429 | #if 0 |
430 | mTodoListView->addColumn(i18n("Sort Id")); | 430 | mTodoListView->addColumn(i18n("Sort Id")); |
431 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 431 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
432 | #endif | 432 | #endif |
433 | 433 | ||
434 | mTodoListView->setMinimumHeight( 60 ); | 434 | mTodoListView->setMinimumHeight( 60 ); |
435 | mTodoListView->setItemsRenameable( true ); | 435 | mTodoListView->setItemsRenameable( true ); |
436 | mTodoListView->setRenameable( 0 ); | 436 | mTodoListView->setRenameable( 0 ); |
437 | mTodoListView->setColumnWidth( 0, 120 ); | 437 | mTodoListView->setColumnWidth( 0, 120 ); |
438 | mTodoListView->setColumnWidthMode(0, QListView::Manual); | 438 | mTodoListView->setColumnWidthMode(0, QListView::Manual); |
439 | mTodoListView->setColumnWidthMode(1, QListView::Manual); | 439 | mTodoListView->setColumnWidthMode(1, QListView::Manual); |
440 | mTodoListView->setColumnWidthMode(2, QListView::Manual); | 440 | mTodoListView->setColumnWidthMode(2, QListView::Manual); |
441 | mTodoListView->setColumnWidthMode(3, QListView::Manual); | 441 | mTodoListView->setColumnWidthMode(3, QListView::Manual); |
442 | mTodoListView->setColumnWidthMode(4, QListView::Manual); | 442 | mTodoListView->setColumnWidthMode(4, QListView::Manual); |
443 | mTodoListView->setColumnWidthMode(5, QListView::Manual); | 443 | mTodoListView->setColumnWidthMode(5, QListView::Manual); |
444 | mTodoListView->setColumnWidthMode(6, QListView::Manual); | 444 | mTodoListView->setColumnWidthMode(6, QListView::Manual); |
445 | mTodoListView->setColumnWidthMode(7, QListView::Manual); | 445 | mTodoListView->setColumnWidthMode(7, QListView::Manual); |
446 | mTodoListView->setColumnWidthMode(8, QListView::Manual); | 446 | mTodoListView->setColumnWidthMode(8, QListView::Manual); |
447 | 447 | ||
448 | 448 | ||
449 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); | 449 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); |
450 | 450 | ||
451 | mPriorityPopupMenu = new QPopupMenu(this); | 451 | mPriorityPopupMenu = new QPopupMenu(this); |
452 | for (int i = 1; i <= 5; i++) { | 452 | for (int i = 1; i <= 5; i++) { |
453 | QString label = QString ("%1").arg (i); | 453 | QString label = QString ("%1").arg (i); |
454 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; | 454 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; |
455 | } | 455 | } |
456 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); | 456 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); |
457 | 457 | ||
458 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 458 | mPercentageCompletedPopupMenu = new QPopupMenu(this); |
459 | for (int i = 0; i <= 100; i+=20) { | 459 | for (int i = 0; i <= 100; i+=20) { |
460 | QString label = QString ("%1 %").arg (i); | 460 | QString label = QString ("%1 %").arg (i); |
461 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; | 461 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; |
462 | } | 462 | } |
463 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); | 463 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); |
464 | 464 | ||
465 | 465 | ||
466 | 466 | ||
467 | mItemPopupMenu = new QPopupMenu(this); | 467 | mItemPopupMenu = new QPopupMenu(this); |
468 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, | ||
469 | SLOT (toggleRunningItem())); | ||
470 | mItemPopupMenu->insertSeparator(); | ||
471 | mItemPopupMenu->insertItem(i18n("Show..."), this, | 468 | mItemPopupMenu->insertItem(i18n("Show..."), this, |
472 | SLOT (showTodo())); | 469 | SLOT (showTodo())); |
473 | mItemPopupMenu->insertItem(i18n("Edit..."), this, | 470 | mItemPopupMenu->insertItem(i18n("Edit..."), this, |
474 | SLOT (editTodo())); | 471 | SLOT (editTodo())); |
475 | mItemPopupMenu->insertItem( i18n("Delete"), this, | 472 | mItemPopupMenu->insertItem( i18n("Delete"), this, |
476 | SLOT (deleteTodo())); | 473 | SLOT (deleteTodo())); |
477 | mItemPopupMenu->insertItem( i18n("Clone..."), this, | 474 | mItemPopupMenu->insertItem( i18n("Clone..."), this, |
478 | SLOT (cloneTodo())); | 475 | SLOT (cloneTodo())); |
479 | mItemPopupMenu->insertItem( i18n("Move..."), this, | 476 | mItemPopupMenu->insertItem( i18n("Move..."), this, |
480 | SLOT (moveTodo())); | 477 | SLOT (moveTodo())); |
481 | mItemPopupMenu->insertItem( i18n("Beam..."), this, | 478 | mItemPopupMenu->insertItem( i18n("Beam..."), this, |
482 | SLOT (beamTodo())); | 479 | SLOT (beamTodo())); |
483 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, | 480 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, |
484 | SLOT (cancelTodo())); | 481 | SLOT (cancelTodo())); |
485 | mItemPopupMenu->insertSeparator(); | 482 | mItemPopupMenu->insertSeparator(); |
483 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, | ||
484 | SLOT (toggleRunningItem())); | ||
485 | mItemPopupMenu->insertSeparator(); | ||
486 | /* | 486 | /* |
487 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, | 487 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, |
488 | SLOT (newTodo())); | 488 | SLOT (newTodo())); |
489 | */ | 489 | */ |
490 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, | 490 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, |
491 | SLOT (newSubTodo())); | 491 | SLOT (newSubTodo())); |
492 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, | 492 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, |
493 | SLOT (unparentTodo()),0,21); | 493 | SLOT (unparentTodo()),0,21); |
494 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, | 494 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, |
495 | SLOT (reparentTodo()),0,22); | 495 | SLOT (reparentTodo()),0,22); |
496 | mItemPopupMenu->insertSeparator(); | 496 | mItemPopupMenu->insertSeparator(); |
497 | #if 0 | 497 | #if 0 |
498 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), | 498 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), |
499 | this, SLOT( purgeCompleted() ) ); | 499 | this, SLOT( purgeCompleted() ) ); |
500 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), | 500 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), |
501 | this, SLOT( toggleCompleted() ),0, 33 ); | 501 | this, SLOT( toggleCompleted() ),0, 33 ); |
502 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 502 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
503 | this, SLOT( toggleQuickTodo() ),0, 34 ); | 503 | this, SLOT( toggleQuickTodo() ),0, 34 ); |
504 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 504 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
505 | this, SLOT( toggleRunning() ),0, 35 ); | 505 | this, SLOT( toggleRunning() ),0, 35 ); |
506 | 506 | ||
507 | #endif | 507 | #endif |
508 | mPopupMenu = new QPopupMenu(this); | 508 | mPopupMenu = new QPopupMenu(this); |
509 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, | 509 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, |
510 | SLOT (newTodo()),0,1); | 510 | SLOT (newTodo()),0,1); |
511 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), | 511 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), |
512 | this, SLOT(purgeCompleted()),0,2); | 512 | this, SLOT(purgeCompleted()),0,2); |
513 | mPopupMenu->insertItem(i18n("Show Completed"), | 513 | mPopupMenu->insertItem(i18n("Show Completed"), |
514 | this, SLOT( toggleCompleted() ),0,3 ); | 514 | this, SLOT( toggleCompleted() ),0,3 ); |
515 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | ||
516 | this, SLOT( toggleQuickTodo() ),0,4 ); | ||
517 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 515 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
518 | this, SLOT( toggleRunning() ),0,5 ); | 516 | this, SLOT( toggleRunning() ),0,5 ); |
519 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), | 517 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), |
520 | this, SLOT( setAllOpen() ),0,6 ); | 518 | this, SLOT( setAllOpen() ),0,6 ); |
521 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), | 519 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), |
522 | this, SLOT( setAllClose() ),0,7 ); | 520 | this, SLOT( setAllClose() ),0,7 ); |
523 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), | 521 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), |
524 | this, SLOT( setAllFlat() ),0,8 ); | 522 | this, SLOT( setAllFlat() ),0,8 ); |
523 | mPopupMenu->insertSeparator(); | ||
524 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | ||
525 | this, SLOT( toggleQuickTodo() ),0,4 ); | ||
525 | mDocPrefs = new DocPrefs( name ); | 526 | mDocPrefs = new DocPrefs( name ); |
526 | 527 | ||
527 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); | 528 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); |
528 | mPopupMenu->setCheckable( true ); | 529 | mPopupMenu->setCheckable( true ); |
529 | mItemPopupMenu->setCheckable( true ); | 530 | mItemPopupMenu->setCheckable( true ); |
530 | 531 | ||
531 | 532 | ||
532 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 533 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
533 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 534 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
534 | 535 | ||
535 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 536 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
536 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 537 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
537 | 538 | ||
538 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 539 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
539 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 540 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
540 | 541 | ||
541 | 542 | ||
542 | // Double clicking conflicts with opening/closing the subtree | 543 | // Double clicking conflicts with opening/closing the subtree |
543 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), | 544 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), |
544 | SLOT( editItem( QListViewItem *) ) ); | 545 | SLOT( editItem( QListViewItem *) ) ); |
545 | /* | 546 | /* |
546 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, | 547 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, |
547 | const QPoint &,int ) ), | 548 | const QPoint &,int ) ), |
548 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 549 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
549 | */ | 550 | */ |
550 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, | 551 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, |
551 | const QPoint &,int ) ), | 552 | const QPoint &,int ) ), |
552 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 553 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
553 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), | 554 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), |
554 | SLOT( itemClicked( QListViewItem * ) ) ); | 555 | SLOT( itemClicked( QListViewItem * ) ) ); |
555 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), | 556 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), |
556 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); | 557 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); |
557 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 558 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
558 | SLOT( updateView() ) ); | 559 | SLOT( updateView() ) ); |
559 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 560 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
560 | SLOT( todoModified(Todo *, int) ) ); | 561 | SLOT( todoModified(Todo *, int) ) ); |
561 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), | 562 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), |
562 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 563 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
563 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), | 564 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), |
564 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 565 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
565 | connect( mTodoListView, SIGNAL( paintNeeded() ), | 566 | connect( mTodoListView, SIGNAL( paintNeeded() ), |
566 | SLOT( paintNeeded()) ); | 567 | SLOT( paintNeeded()) ); |
567 | 568 | ||
568 | #if 0 | 569 | #if 0 |
569 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), | 570 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), |
570 | SLOT(selectionChanged(QListViewItem *))); | 571 | SLOT(selectionChanged(QListViewItem *))); |
571 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), | 572 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), |
572 | SLOT(selectionChanged(QListViewItem *))); | 573 | SLOT(selectionChanged(QListViewItem *))); |
573 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), | 574 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), |
574 | SLOT(selectionChanged(QListViewItem *))); | 575 | SLOT(selectionChanged(QListViewItem *))); |
575 | #endif | 576 | #endif |
576 | 577 | ||
577 | connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); | 578 | connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); |
578 | connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); | 579 | connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); |
579 | connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); | 580 | connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); |
580 | 581 | ||
581 | connect( mTodoListView, SIGNAL(selectionChanged() ), | 582 | connect( mTodoListView, SIGNAL(selectionChanged() ), |
582 | SLOT( processSelectionChange() ) ); | 583 | SLOT( processSelectionChange() ) ); |
583 | connect( mQuickAdd, SIGNAL( returnPressed () ), | 584 | connect( mQuickAdd, SIGNAL( returnPressed () ), |
584 | SLOT( addQuickTodo() ) ); | 585 | SLOT( addQuickTodo() ) ); |
585 | 586 | ||
586 | } | 587 | } |
587 | 588 | ||
588 | KOTodoView::~KOTodoView() | 589 | KOTodoView::~KOTodoView() |
589 | { | 590 | { |
590 | // delete mKOTodoViewWhatsThis; | 591 | // delete mKOTodoViewWhatsThis; |
591 | delete mDocPrefs; | 592 | delete mDocPrefs; |
592 | } | 593 | } |
593 | QString KOTodoView::getWhatsThisText(QPoint p) | 594 | QString KOTodoView::getWhatsThisText(QPoint p) |
594 | { | 595 | { |
595 | KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); | 596 | KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); |
596 | if ( item ) | 597 | if ( item ) |
597 | return KIncidenceFormatter::instance()->getFormattedText( item->todo(), | 598 | return KIncidenceFormatter::instance()->getFormattedText( item->todo(), |
598 | KOPrefs::instance()->mWTshowDetails, | 599 | KOPrefs::instance()->mWTshowDetails, |
599 | KOPrefs::instance()->mWTshowCreated, | 600 | KOPrefs::instance()->mWTshowCreated, |
600 | KOPrefs::instance()->mWTshowChanged); | 601 | KOPrefs::instance()->mWTshowChanged); |
601 | return i18n("That is the todo view" ); | 602 | return i18n("That is the todo view" ); |
602 | 603 | ||
603 | } | 604 | } |
604 | 605 | ||
605 | void KOTodoView::jumpToDate () | 606 | void KOTodoView::jumpToDate () |
606 | { | 607 | { |
607 | // if (mActiveItem) { | 608 | // if (mActiveItem) { |
608 | // mActiveItem->todo()); | 609 | // mActiveItem->todo()); |
609 | // if ( mActiveItem->todo()->hasDueDate() ) | 610 | // if ( mActiveItem->todo()->hasDueDate() ) |
610 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); | 611 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); |
611 | } | 612 | } |
612 | void KOTodoView::paintNeeded() | 613 | void KOTodoView::paintNeeded() |
613 | { | 614 | { |
614 | if ( mPendingUpdateBeforeRepaint ) { | 615 | if ( mPendingUpdateBeforeRepaint ) { |
615 | updateView(); | 616 | updateView(); |
616 | mPendingUpdateBeforeRepaint = false; | 617 | mPendingUpdateBeforeRepaint = false; |
617 | } | 618 | } |
618 | } | 619 | } |
619 | void KOTodoView::paintEvent(QPaintEvent * pevent) | 620 | void KOTodoView::paintEvent(QPaintEvent * pevent) |
620 | { | 621 | { |
621 | if ( mPendingUpdateBeforeRepaint ) { | 622 | if ( mPendingUpdateBeforeRepaint ) { |
622 | updateView(); | 623 | updateView(); |
623 | mPendingUpdateBeforeRepaint = false; | 624 | mPendingUpdateBeforeRepaint = false; |
624 | } | 625 | } |
625 | KOrg::BaseView::paintEvent( pevent); | 626 | KOrg::BaseView::paintEvent( pevent); |
626 | } | 627 | } |
627 | 628 | ||
628 | void KOTodoView::updateView() | 629 | void KOTodoView::updateView() |
629 | { | 630 | { |
630 | pendingSubtodo = 0; | 631 | pendingSubtodo = 0; |
631 | if ( mBlockUpdate ) { | 632 | if ( mBlockUpdate ) { |
632 | return; | 633 | return; |
633 | } | 634 | } |
634 | if ( !isVisible() ) { | 635 | if ( !isVisible() ) { |
635 | mPendingUpdateBeforeRepaint = true; | 636 | mPendingUpdateBeforeRepaint = true; |
636 | return; | 637 | return; |
637 | } | 638 | } |
638 | storeCurrentItem(); | 639 | storeCurrentItem(); |
639 | //qDebug("KOTodoView::updateView() %x", this); | 640 | //qDebug("KOTodoView::updateView() %x", this); |
640 | if ( isFlatDisplay ) { | 641 | if ( isFlatDisplay ) { |
641 | displayAllFlat(); | 642 | displayAllFlat(); |
642 | resetCurrentItem(); | 643 | resetCurrentItem(); |
643 | return; | 644 | return; |
644 | } | 645 | } |
645 | //qDebug("update "); | 646 | //qDebug("update "); |
646 | // kdDebug() << "KOTodoView::updateView()" << endl; | 647 | // kdDebug() << "KOTodoView::updateView()" << endl; |
647 | QFont fo = KOPrefs::instance()->mTodoViewFont; | 648 | QFont fo = KOPrefs::instance()->mTodoViewFont; |
648 | 649 | ||
649 | 650 | ||
650 | mTodoListView->clear(); | 651 | mTodoListView->clear(); |
651 | if ( mName == "todolistsmall" ) { | 652 | if ( mName == "todolistsmall" ) { |
652 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { | 653 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { |
653 | int ps = fo.pointSize() -2; | 654 | int ps = fo.pointSize() -2; |
654 | if ( ps > 12 ) | 655 | if ( ps > 12 ) |
655 | ps -= 2; | 656 | ps -= 2; |
656 | fo.setPointSize( ps ); | 657 | fo.setPointSize( ps ); |
657 | } | 658 | } |
658 | } | 659 | } |
659 | 660 | ||
660 | mTodoListView->setFont( fo ); | 661 | mTodoListView->setFont( fo ); |
661 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); | 662 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); |
662 | //mTodoListView->header()->setMaximumHeight(fm.height()); | 663 | //mTodoListView->header()->setMaximumHeight(fm.height()); |
663 | QPtrList<Todo> todoList = calendar()->todos(); | 664 | QPtrList<Todo> todoList = calendar()->todos(); |
664 | 665 | ||
665 | /* | 666 | /* |
666 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; | 667 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; |
667 | Event *t; | 668 | Event *t; |
668 | for(t = todoList.first(); t; t = todoList.next()) { | 669 | for(t = todoList.first(); t; t = todoList.next()) { |
669 | kdDebug() << " " << t->getSummary() << endl; | 670 | kdDebug() << " " << t->getSummary() << endl; |
670 | 671 | ||
671 | if (t->getRelatedTo()) { | 672 | if (t->getRelatedTo()) { |
672 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; | 673 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; |
673 | } | 674 | } |
674 | 675 | ||
675 | QPtrList<Event> l = t->getRelations(); | 676 | QPtrList<Event> l = t->getRelations(); |
676 | Event *c; | 677 | Event *c; |
677 | for(c=l.first();c;c=l.next()) { | 678 | for(c=l.first();c;c=l.next()) { |
678 | kdDebug() << " - relation: " << c->getSummary() << endl; | 679 | kdDebug() << " - relation: " << c->getSummary() << endl; |
679 | } | 680 | } |
680 | } | 681 | } |
681 | */ | 682 | */ |
682 | 683 | ||
683 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a | 684 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a |
684 | // specific order of events. That means that we have to generate parent items | 685 | // specific order of events. That means that we have to generate parent items |
685 | // recursively for proper hierarchical display of Todos. | 686 | // recursively for proper hierarchical display of Todos. |
686 | mTodoMap.clear(); | 687 | mTodoMap.clear(); |
687 | Todo *todo; | 688 | Todo *todo; |
688 | todo = todoList.first();// todo; todo = todoList.next()) { | 689 | todo = todoList.first();// todo; todo = todoList.next()) { |
689 | while ( todo ) { | 690 | while ( todo ) { |
690 | bool next = true; | 691 | bool next = true; |
691 | // qDebug("todo %s ", todo->summary().latin1()); | 692 | // qDebug("todo %s ", todo->summary().latin1()); |
692 | Incidence *incidence = todo->relatedTo(); | 693 | Incidence *incidence = todo->relatedTo(); |
693 | while ( incidence ) { | 694 | while ( incidence ) { |
694 | if ( incidence->type() == "Todo") { | 695 | if ( incidence->type() == "Todo") { |
695 | //qDebug("related %s ",incidence->summary().latin1() ); | 696 | //qDebug("related %s ",incidence->summary().latin1() ); |
696 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { | 697 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { |
697 | //qDebug("related not found "); | 698 | //qDebug("related not found "); |
698 | todoList.remove( ); | 699 | todoList.remove( ); |
699 | todo = todoList.current(); | 700 | todo = todoList.current(); |
700 | next = false; | 701 | next = false; |
701 | incidence = 0; | 702 | incidence = 0; |
702 | 703 | ||
703 | } else { | 704 | } else { |
704 | //qDebug("related found "); | 705 | //qDebug("related found "); |
705 | incidence = incidence->relatedTo(); | 706 | incidence = incidence->relatedTo(); |
706 | } | 707 | } |
707 | } else | 708 | } else |
708 | incidence = 0; | 709 | incidence = 0; |
709 | } | 710 | } |
710 | if ( next ) | 711 | if ( next ) |
711 | todo = todoList.next(); | 712 | todo = todoList.next(); |
712 | } | 713 | } |
713 | 714 | ||
714 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 715 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
715 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) | 716 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) |
716 | { | 717 | { |
717 | insertTodoItem(todo); | 718 | insertTodoItem(todo); |
718 | } | 719 | } |
719 | } | 720 | } |
720 | // Restore opened/closed state | 721 | // Restore opened/closed state |
721 | mTodoListView->blockSignals( true ); | 722 | mTodoListView->blockSignals( true ); |
722 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); | 723 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); |
723 | mTodoListView->blockSignals( false ); | 724 | mTodoListView->blockSignals( false ); |
724 | resetCurrentItem(); | 725 | resetCurrentItem(); |
725 | processSelectionChange(); | 726 | processSelectionChange(); |
726 | } | 727 | } |
727 | 728 | ||
728 | void KOTodoView::storeCurrentItem() | 729 | void KOTodoView::storeCurrentItem() |
729 | { | 730 | { |
730 | mCurItem = 0; | 731 | mCurItem = 0; |
731 | mCurItemRootParent = 0; | 732 | mCurItemRootParent = 0; |
732 | mCurItemParent = 0; | 733 | mCurItemParent = 0; |
733 | mCurItemAbove = 0; | 734 | mCurItemAbove = 0; |
734 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 735 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
735 | if (mActiveItem) { | 736 | if (mActiveItem) { |
736 | mCurItem = mActiveItem->todo(); | 737 | mCurItem = mActiveItem->todo(); |
737 | KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); | 738 | KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); |
738 | if ( activeItemAbove ) | 739 | if ( activeItemAbove ) |
739 | mCurItemAbove = activeItemAbove->todo(); | 740 | mCurItemAbove = activeItemAbove->todo(); |
740 | mCurItemRootParent = mCurItem; | 741 | mCurItemRootParent = mCurItem; |
741 | mCurItemParent = mCurItemRootParent->relatedTo(); | 742 | mCurItemParent = mCurItemRootParent->relatedTo(); |
742 | while ( mCurItemRootParent->relatedTo() != 0 ) | 743 | while ( mCurItemRootParent->relatedTo() != 0 ) |
743 | mCurItemRootParent = mCurItemRootParent->relatedTo(); | 744 | mCurItemRootParent = mCurItemRootParent->relatedTo(); |
744 | } | 745 | } |
745 | mActiveItem = 0; | 746 | mActiveItem = 0; |
746 | } | 747 | } |
747 | 748 | ||
748 | void KOTodoView::resetCurrentItem() | 749 | void KOTodoView::resetCurrentItem() |
749 | { | 750 | { |
750 | mTodoListView->setFocus(); | 751 | mTodoListView->setFocus(); |
751 | KOTodoViewItem* foundItem = 0; | 752 | KOTodoViewItem* foundItem = 0; |
752 | KOTodoViewItem* foundItemRoot = 0; | 753 | KOTodoViewItem* foundItemRoot = 0; |
753 | KOTodoViewItem* foundItemParent = 0; | 754 | KOTodoViewItem* foundItemParent = 0; |
754 | KOTodoViewItem* foundItemAbove = 0; | 755 | KOTodoViewItem* foundItemAbove = 0; |
755 | if ( mTodoListView->firstChild () ) { | 756 | if ( mTodoListView->firstChild () ) { |
756 | if ( mCurItem ) { | 757 | if ( mCurItem ) { |
757 | KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); | 758 | KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); |
758 | while ( item ) { | 759 | while ( item ) { |
759 | if ( item->todo() == mCurItem ) { | 760 | if ( item->todo() == mCurItem ) { |
760 | foundItem = item; | 761 | foundItem = item; |
761 | break; | 762 | break; |
762 | } else if ( item->todo() == mCurItemAbove ) { | 763 | } else if ( item->todo() == mCurItemAbove ) { |
763 | foundItemAbove = item; | 764 | foundItemAbove = item; |
764 | 765 | ||
765 | } | 766 | } |
766 | if ( item->todo() == mCurItemRootParent ) { | 767 | if ( item->todo() == mCurItemRootParent ) { |
767 | foundItemRoot = item; | 768 | foundItemRoot = item; |
768 | } | 769 | } |
769 | if ( item->todo() == mCurItemParent ) { | 770 | if ( item->todo() == mCurItemParent ) { |
770 | foundItemParent = item; | 771 | foundItemParent = item; |
771 | } | 772 | } |
772 | item = (KOTodoViewItem*)item->itemBelow(); | 773 | item = (KOTodoViewItem*)item->itemBelow(); |
773 | } | 774 | } |
774 | if ( ! foundItem ) { | 775 | if ( ! foundItem ) { |
775 | if ( foundItemParent ) { | 776 | if ( foundItemParent ) { |
776 | foundItem = foundItemParent; | 777 | foundItem = foundItemParent; |
777 | } else { | 778 | } else { |
778 | if ( foundItemRoot ) | 779 | if ( foundItemRoot ) |
779 | foundItem = foundItemRoot; | 780 | foundItem = foundItemRoot; |
780 | else | 781 | else |
781 | foundItem = foundItemAbove; | 782 | foundItem = foundItemAbove; |
782 | } | 783 | } |
783 | } | 784 | } |
784 | } | 785 | } |
785 | if ( foundItem ) { | 786 | if ( foundItem ) { |
786 | mTodoListView->setCurrentItem( foundItem ); | 787 | mTodoListView->setCurrentItem( foundItem ); |
787 | mTodoListView->ensureItemVisible( foundItem ); | 788 | mTodoListView->ensureItemVisible( foundItem ); |
788 | } else { | 789 | } else { |
789 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); | 790 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); |
790 | } | 791 | } |
791 | } | 792 | } |
792 | mTodoListView->setFocus(); | 793 | mTodoListView->setFocus(); |
793 | } | 794 | } |
794 | //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; | 795 | //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; |
795 | bool KOTodoView::checkTodo( Todo * todo ) | 796 | bool KOTodoView::checkTodo( Todo * todo ) |
796 | { | 797 | { |
797 | 798 | ||
798 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) | 799 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) |
799 | return false; | 800 | return false; |
800 | if ( !todo->isCompleted() ) { | 801 | if ( !todo->isCompleted() ) { |
801 | if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) | 802 | if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) |
802 | return true; | 803 | return true; |
803 | } | 804 | } |
804 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { | 805 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { |
805 | if ( todo->hasStartDate() ) | 806 | if ( todo->hasStartDate() ) |
806 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) | 807 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) |
807 | return false; | 808 | return false; |
808 | if ( todo->hasDueDate() ) | 809 | if ( todo->hasDueDate() ) |
809 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) | 810 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) |
810 | return false; | 811 | return false; |
811 | } | 812 | } |
812 | return true; | 813 | return true; |
813 | } | 814 | } |
814 | 815 | ||
815 | void KOTodoView::restoreItemState( QListViewItem *item ) | 816 | void KOTodoView::restoreItemState( QListViewItem *item ) |
816 | { | 817 | { |
817 | pendingSubtodo = 0; | 818 | pendingSubtodo = 0; |
818 | while( item ) { | 819 | while( item ) { |
819 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 820 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
820 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); | 821 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); |
821 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); | 822 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); |
822 | item = item->nextSibling(); | 823 | item = item->nextSibling(); |
823 | } | 824 | } |
824 | } | 825 | } |
825 | 826 | ||
826 | 827 | ||
827 | QMap<Todo *,KOTodoViewItem *>::ConstIterator | 828 | QMap<Todo *,KOTodoViewItem *>::ConstIterator |
828 | KOTodoView::insertTodoItem(Todo *todo) | 829 | KOTodoView::insertTodoItem(Todo *todo) |
829 | { | 830 | { |
830 | 831 | ||
831 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; | 832 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; |
832 | // TODO: Check, if dynmaic cast is necessary | 833 | // TODO: Check, if dynmaic cast is necessary |
833 | 834 | ||
834 | pendingSubtodo = 0; | 835 | pendingSubtodo = 0; |
835 | Incidence *incidence = todo->relatedTo(); | 836 | Incidence *incidence = todo->relatedTo(); |
836 | if (incidence && incidence->type() == "Todo") { | 837 | if (incidence && incidence->type() == "Todo") { |
837 | Todo *relatedTodo = static_cast<Todo *>(incidence); | 838 | Todo *relatedTodo = static_cast<Todo *>(incidence); |
838 | 839 | ||
839 | // kdDebug() << " has Related" << endl; | 840 | // kdDebug() << " has Related" << endl; |
840 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 841 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
841 | itemIterator = mTodoMap.find(relatedTodo); | 842 | itemIterator = mTodoMap.find(relatedTodo); |
842 | if (itemIterator == mTodoMap.end()) { | 843 | if (itemIterator == mTodoMap.end()) { |
843 | // kdDebug() << " related not yet in list" << endl; | 844 | // kdDebug() << " related not yet in list" << endl; |
844 | itemIterator = insertTodoItem (relatedTodo); | 845 | itemIterator = insertTodoItem (relatedTodo); |
845 | } | 846 | } |
846 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem | 847 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem |
847 | // and one into the map. Sure finding is more easy but why? -zecke | 848 | // and one into the map. Sure finding is more easy but why? -zecke |
848 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); | 849 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); |
849 | return mTodoMap.insert(todo,todoItem); | 850 | return mTodoMap.insert(todo,todoItem); |
850 | } else { | 851 | } else { |
851 | // kdDebug() << " no Related" << endl; | 852 | // kdDebug() << " no Related" << endl; |
852 | // see above -zecke | 853 | // see above -zecke |
853 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 854 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
854 | return mTodoMap.insert(todo,todoItem); | 855 | return mTodoMap.insert(todo,todoItem); |
855 | } | 856 | } |
856 | } | 857 | } |
857 | 858 | ||
858 | 859 | ||
859 | void KOTodoView::updateConfig() | 860 | void KOTodoView::updateConfig() |
860 | { | 861 | { |
861 | updateView(); | 862 | updateView(); |
862 | mTodoListView->repaintContents(); | 863 | mTodoListView->repaintContents(); |
863 | } | 864 | } |
864 | 865 | ||
865 | QPtrList<Incidence> KOTodoView::selectedIncidences() | 866 | QPtrList<Incidence> KOTodoView::selectedIncidences() |
866 | { | 867 | { |
867 | QPtrList<Incidence> selected; | 868 | QPtrList<Incidence> selected; |
868 | 869 | ||
869 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 870 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
870 | // if (!item) item = mActiveItem; | 871 | // if (!item) item = mActiveItem; |
871 | if (item) selected.append(item->todo()); | 872 | if (item) selected.append(item->todo()); |
872 | 873 | ||
873 | return selected; | 874 | return selected; |
874 | } | 875 | } |
875 | 876 | ||
876 | QPtrList<Todo> KOTodoView::selectedTodos() | 877 | QPtrList<Todo> KOTodoView::selectedTodos() |
877 | { | 878 | { |
878 | QPtrList<Todo> selected; | 879 | QPtrList<Todo> selected; |
879 | 880 | ||
880 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 881 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
881 | // if (!item) item = mActiveItem; | 882 | // if (!item) item = mActiveItem; |
882 | if (item) selected.append(item->todo()); | 883 | if (item) selected.append(item->todo()); |
883 | 884 | ||
884 | return selected; | 885 | return selected; |
885 | } | 886 | } |
886 | 887 | ||
887 | void KOTodoView::changeEventDisplay(Event *, int) | 888 | void KOTodoView::changeEventDisplay(Event *, int) |
888 | { | 889 | { |
889 | updateView(); | 890 | updateView(); |
890 | } | 891 | } |
891 | 892 | ||
892 | void KOTodoView::showDates(const QDate &, const QDate &) | 893 | void KOTodoView::showDates(const QDate &, const QDate &) |
893 | { | 894 | { |
894 | } | 895 | } |
895 | 896 | ||
896 | void KOTodoView::showEvents(QPtrList<Event>) | 897 | void KOTodoView::showEvents(QPtrList<Event>) |
897 | { | 898 | { |
898 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; | 899 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; |
899 | } | 900 | } |
900 | 901 | ||
901 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 902 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
902 | const QDate &td) | 903 | const QDate &td) |
903 | { | 904 | { |
904 | #ifndef KORG_NOPRINTER | 905 | #ifndef KORG_NOPRINTER |
905 | calPrinter->preview(CalPrinter::Todolist, fd, td); | 906 | calPrinter->preview(CalPrinter::Todolist, fd, td); |
906 | #endif | 907 | #endif |
907 | } | 908 | } |
908 | 909 | ||
909 | void KOTodoView::editItem(QListViewItem *item ) | 910 | void KOTodoView::editItem(QListViewItem *item ) |
910 | { | 911 | { |
911 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); | 912 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); |
912 | } | 913 | } |
913 | 914 | ||
914 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) | 915 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) |
915 | { | 916 | { |
916 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); | 917 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); |
917 | } | 918 | } |
918 | 919 | ||
919 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) | 920 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) |
920 | { | 921 | { |
921 | pendingSubtodo = 0; | 922 | pendingSubtodo = 0; |
922 | mActiveItem = (KOTodoViewItem *)item; | 923 | mActiveItem = (KOTodoViewItem *)item; |
923 | if (item) { | 924 | if (item) { |
924 | switch (column){ | 925 | switch (column){ |
925 | case 1: | 926 | case 1: |
926 | mPriorityPopupMenu->popup(QCursor::pos ()); break; | 927 | mPriorityPopupMenu->popup(QCursor::pos ()); break; |
927 | case 2: | 928 | case 2: |
928 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; | 929 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; |
929 | case 3: | 930 | case 3: |
930 | moveTodo(); | 931 | moveTodo(); |
931 | break; | 932 | break; |
932 | case 8: | 933 | case 8: |
933 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; | 934 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; |
934 | default: | 935 | default: |
935 | mItemPopupMenu->popup(QCursor::pos()); | 936 | mItemPopupMenu->popup(QCursor::pos()); |
936 | } | 937 | } |
937 | } else mPopupMenu->popup(QCursor::pos()); | 938 | } else mPopupMenu->popup(QCursor::pos()); |
938 | } | 939 | } |
939 | void KOTodoView::newTodo() | 940 | void KOTodoView::newTodo() |
940 | { | 941 | { |
941 | emit newTodoSignal(); | 942 | emit newTodoSignal(); |
942 | } | 943 | } |
943 | 944 | ||
944 | void KOTodoView::newSubTodo() | 945 | void KOTodoView::newSubTodo() |
945 | { | 946 | { |
946 | if (mActiveItem) { | 947 | if (mActiveItem) { |
947 | emit newSubTodoSignal(mActiveItem->todo()); | 948 | emit newSubTodoSignal(mActiveItem->todo()); |
948 | } | 949 | } |
949 | } | 950 | } |
950 | void KOTodoView::unparentTodo() | 951 | void KOTodoView::unparentTodo() |
951 | { | 952 | { |
952 | if (mActiveItem) { | 953 | if (mActiveItem) { |
953 | emit unparentTodoSignal(mActiveItem->todo()); | 954 | emit unparentTodoSignal(mActiveItem->todo()); |
954 | } | 955 | } |
955 | } | 956 | } |
956 | 957 | ||
957 | void KOTodoView::reparentTodo() | 958 | void KOTodoView::reparentTodo() |
958 | { | 959 | { |
959 | if (mActiveItem) { | 960 | if (mActiveItem) { |
960 | topLevelWidget()->setCaption(i18n("Click on new parent item")); | 961 | topLevelWidget()->setCaption(i18n("Click on new parent item")); |
961 | pendingSubtodo = mActiveItem; | 962 | pendingSubtodo = mActiveItem; |
962 | } | 963 | } |
963 | } | 964 | } |
964 | void KOTodoView::editTodo() | 965 | void KOTodoView::editTodo() |
965 | { | 966 | { |
966 | if (mActiveItem) { | 967 | if (mActiveItem) { |
967 | emit editTodoSignal(mActiveItem->todo()); | 968 | emit editTodoSignal(mActiveItem->todo()); |
968 | } | 969 | } |
969 | } | 970 | } |
970 | void KOTodoView::cloneTodo() | 971 | void KOTodoView::cloneTodo() |
971 | { | 972 | { |
972 | if (mActiveItem) { | 973 | if (mActiveItem) { |
973 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); | 974 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); |
974 | } | 975 | } |
975 | } | 976 | } |
976 | void KOTodoView::cancelTodo() | 977 | void KOTodoView::cancelTodo() |
977 | { | 978 | { |
978 | if (mActiveItem) { | 979 | if (mActiveItem) { |
979 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); | 980 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); |
980 | } | 981 | } |
981 | } | 982 | } |
982 | void KOTodoView::moveTodo() | 983 | void KOTodoView::moveTodo() |
983 | { | 984 | { |
984 | if (mActiveItem) { | 985 | if (mActiveItem) { |
985 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); | 986 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); |
986 | } | 987 | } |
987 | } | 988 | } |
988 | void KOTodoView::beamTodo() | 989 | void KOTodoView::beamTodo() |
989 | { | 990 | { |
990 | if (mActiveItem) { | 991 | if (mActiveItem) { |
991 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); | 992 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); |
992 | } | 993 | } |
993 | } | 994 | } |
994 | 995 | ||
995 | 996 | ||
996 | void KOTodoView::showTodo() | 997 | void KOTodoView::showTodo() |
997 | { | 998 | { |
998 | if (mActiveItem) { | 999 | if (mActiveItem) { |
999 | emit showTodoSignal(mActiveItem->todo()); | 1000 | emit showTodoSignal(mActiveItem->todo()); |
1000 | } | 1001 | } |
1001 | } | 1002 | } |
1002 | 1003 | ||
1003 | void KOTodoView::deleteTodo() | 1004 | void KOTodoView::deleteTodo() |
1004 | { | 1005 | { |
1005 | if (mActiveItem) { | 1006 | if (mActiveItem) { |
1006 | emit deleteTodoSignal(mActiveItem->todo()); | 1007 | emit deleteTodoSignal(mActiveItem->todo()); |
1007 | } | 1008 | } |
1008 | } | 1009 | } |
1009 | 1010 | ||
1010 | void KOTodoView::setNewPriority(int index) | 1011 | void KOTodoView::setNewPriority(int index) |
1011 | { | 1012 | { |
1012 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1013 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1013 | mActiveItem->todo()->setPriority(mPriority[index]); | 1014 | mActiveItem->todo()->setPriority(mPriority[index]); |
1014 | mActiveItem->construct(); | 1015 | mActiveItem->construct(); |
1015 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); | 1016 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); |
1016 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1017 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1017 | } | 1018 | } |
1018 | } | 1019 | } |
1019 | 1020 | ||
1020 | void KOTodoView::setNewPercentage(int index) | 1021 | void KOTodoView::setNewPercentage(int index) |
1021 | { | 1022 | { |
1022 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1023 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1023 | 1024 | ||
1024 | if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { | 1025 | if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { |
1025 | mActiveItem->setOn( true ); | 1026 | mActiveItem->setOn( true ); |
1026 | return; | 1027 | return; |
1027 | } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { | 1028 | } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { |
1028 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); | 1029 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); |
1029 | if ( par && par->isOn() ) | 1030 | if ( par && par->isOn() ) |
1030 | par->setOn( false ); | 1031 | par->setOn( false ); |
1031 | } | 1032 | } |
1032 | if (mPercentage[index] == 100) { | 1033 | if (mPercentage[index] == 100) { |
1033 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); | 1034 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); |
1034 | } else { | 1035 | } else { |
1035 | mActiveItem->todo()->setCompleted(false); | 1036 | mActiveItem->todo()->setCompleted(false); |
1036 | } | 1037 | } |
1037 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); | 1038 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); |
1038 | mActiveItem->construct(); | 1039 | mActiveItem->construct(); |
1039 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); | 1040 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); |
1040 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1041 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1041 | } | 1042 | } |
1042 | } | 1043 | } |
1043 | 1044 | ||
1044 | 1045 | ||
1045 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) | 1046 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) |
1046 | { | 1047 | { |
1047 | QPopupMenu* tempMenu = new QPopupMenu (this); | 1048 | QPopupMenu* tempMenu = new QPopupMenu (this); |
1048 | QStringList checkedCategories = todoItem->todo()->categories (); | 1049 | QStringList checkedCategories = todoItem->todo()->categories (); |
1049 | 1050 | ||
1050 | tempMenu->setCheckable (true); | 1051 | tempMenu->setCheckable (true); |
1051 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 1052 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
1052 | it != KOPrefs::instance()->mCustomCategories.end (); | 1053 | it != KOPrefs::instance()->mCustomCategories.end (); |
1053 | ++it) { | 1054 | ++it) { |
1054 | int index = tempMenu->insertItem (*it); | 1055 | int index = tempMenu->insertItem (*it); |
1055 | mCategory[index] = *it; | 1056 | mCategory[index] = *it; |
1056 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); | 1057 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); |
1057 | } | 1058 | } |
1058 | 1059 | ||
1059 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 1060 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
1060 | return tempMenu; | 1061 | return tempMenu; |
1061 | 1062 | ||
1062 | 1063 | ||
1063 | } | 1064 | } |
1064 | void KOTodoView::changedCategories(int index) | 1065 | void KOTodoView::changedCategories(int index) |
1065 | { | 1066 | { |
1066 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1067 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1067 | QStringList categories = mActiveItem->todo()->categories (); | 1068 | QStringList categories = mActiveItem->todo()->categories (); |
1068 | QString colcat = categories.first(); | 1069 | QString colcat = categories.first(); |
1069 | if (categories.find (mCategory[index]) != categories.end ()) | 1070 | if (categories.find (mCategory[index]) != categories.end ()) |
1070 | categories.remove (mCategory[index]); | 1071 | categories.remove (mCategory[index]); |
1071 | else | 1072 | else |
1072 | categories.insert (categories.end(), mCategory[index]); | 1073 | categories.insert (categories.end(), mCategory[index]); |
1073 | categories.sort (); | 1074 | categories.sort (); |
1074 | if ( !colcat.isEmpty() ) { | 1075 | if ( !colcat.isEmpty() ) { |
1075 | if ( categories.find ( colcat ) != categories.end () ) { | 1076 | if ( categories.find ( colcat ) != categories.end () ) { |
1076 | categories.remove( colcat ); | 1077 | categories.remove( colcat ); |
1077 | categories.prepend( colcat ); | 1078 | categories.prepend( colcat ); |
1078 | } | 1079 | } |
1079 | } | 1080 | } |
1080 | mActiveItem->todo()->setCategories (categories); | 1081 | mActiveItem->todo()->setCategories (categories); |
1081 | mActiveItem->construct(); | 1082 | mActiveItem->construct(); |
1082 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1083 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1083 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); | 1084 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); |
1084 | } | 1085 | } |
1085 | } | 1086 | } |
1086 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 1087 | void KOTodoView::itemDoubleClicked(QListViewItem *item) |
1087 | { | 1088 | { |
1088 | if ( pendingSubtodo != 0 ) { | 1089 | if ( pendingSubtodo != 0 ) { |
1089 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1090 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1090 | } | 1091 | } |
1091 | pendingSubtodo = 0; | 1092 | pendingSubtodo = 0; |
1092 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); | 1093 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); |
1093 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); | 1094 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); |
1094 | //qDebug("ROW %d ", row); | 1095 | //qDebug("ROW %d ", row); |
1095 | if (!item) { | 1096 | if (!item) { |
1096 | newTodo(); | 1097 | newTodo(); |
1097 | return; | 1098 | return; |
1098 | } else { | 1099 | } else { |
1099 | if ( row == 2 || row == 1 ) { | 1100 | if ( row == 2 || row == 1 ) { |
1100 | mActiveItem = (KOTodoViewItem *) item; | 1101 | mActiveItem = (KOTodoViewItem *) item; |
1101 | newSubTodo(); | 1102 | newSubTodo(); |
1102 | return; | 1103 | return; |
1103 | } | 1104 | } |
1104 | if ( row == 5 || row == 6 ) { | 1105 | if ( row == 5 || row == 6 ) { |
1105 | mActiveItem = (KOTodoViewItem *) item; | 1106 | mActiveItem = (KOTodoViewItem *) item; |
1106 | toggleRunningItem(); | 1107 | toggleRunningItem(); |
1107 | return; | 1108 | return; |
1108 | } | 1109 | } |
1109 | } | 1110 | } |
1110 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 1111 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
1111 | editItem( item ); | 1112 | editItem( item ); |
1112 | else | 1113 | else |
1113 | showItem( item , QPoint(), 0 ); | 1114 | showItem( item , QPoint(), 0 ); |
1114 | } | 1115 | } |
1115 | void KOTodoView::toggleRunningItem() | 1116 | void KOTodoView::toggleRunningItem() |
1116 | { | 1117 | { |
1117 | // qDebug("KOTodoView::toggleRunning() "); | 1118 | // qDebug("KOTodoView::toggleRunning() "); |
1118 | if ( ! mActiveItem ) | 1119 | if ( ! mActiveItem ) |
1119 | return; | 1120 | return; |
1120 | Todo * t = mActiveItem->todo(); | 1121 | Todo * t = mActiveItem->todo(); |
1121 | if ( t->isRunning() ) { | 1122 | if ( t->isRunning() ) { |
1122 | int result = KMessageBox::warningContinueCancel(this, | 1123 | int result = KMessageBox::warningContinueCancel(this, |
1123 | i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); | 1124 | i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); |
1124 | if (result != KMessageBox::Continue) return; | 1125 | if (result != KMessageBox::Continue) return; |
1125 | t->setRunning( false ); | 1126 | t->setRunning( false ); |
1126 | mActiveItem->construct(); | 1127 | mActiveItem->construct(); |
1127 | } else { | 1128 | } else { |
1128 | int result = KMessageBox::warningContinueCancel(this, | 1129 | int result = KMessageBox::warningContinueCancel(this, |
1129 | i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); | 1130 | i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); |
1130 | if (result != KMessageBox::Continue) return; | 1131 | if (result != KMessageBox::Continue) return; |
1131 | t->setRunning( true ); | 1132 | t->setRunning( true ); |
1132 | mActiveItem->construct(); | 1133 | mActiveItem->construct(); |
1133 | } | 1134 | } |
1134 | } | 1135 | } |
1135 | 1136 | ||
1136 | void KOTodoView::itemClicked(QListViewItem *item) | 1137 | void KOTodoView::itemClicked(QListViewItem *item) |
1137 | { | 1138 | { |
1138 | //qDebug("KOTodoView::itemClicked %d", item); | 1139 | //qDebug("KOTodoView::itemClicked %d", item); |
1139 | if (!item) { | 1140 | if (!item) { |
1140 | if ( pendingSubtodo != 0 ) { | 1141 | if ( pendingSubtodo != 0 ) { |
1141 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1142 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1142 | } | 1143 | } |
1143 | pendingSubtodo = 0; | 1144 | pendingSubtodo = 0; |
1144 | return; | 1145 | return; |
1145 | } | 1146 | } |
1146 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1147 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1147 | if ( pendingSubtodo != 0 ) { | 1148 | if ( pendingSubtodo != 0 ) { |
1148 | bool allowReparent = true; | 1149 | bool allowReparent = true; |
1149 | QListViewItem *par = item; | 1150 | QListViewItem *par = item; |
1150 | while ( par ) { | 1151 | while ( par ) { |
1151 | if ( par == pendingSubtodo ) { | 1152 | if ( par == pendingSubtodo ) { |
1152 | allowReparent = false; | 1153 | allowReparent = false; |
1153 | break; | 1154 | break; |
1154 | } | 1155 | } |
1155 | par = par->parent(); | 1156 | par = par->parent(); |
1156 | } | 1157 | } |
1157 | if ( !allowReparent ) { | 1158 | if ( !allowReparent ) { |
1158 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); | 1159 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); |
1159 | pendingSubtodo = 0; | 1160 | pendingSubtodo = 0; |
1160 | } else { | 1161 | } else { |
1161 | Todo* newParent = todoItem->todo(); | 1162 | Todo* newParent = todoItem->todo(); |
1162 | Todo* newSub = pendingSubtodo->todo(); | 1163 | Todo* newSub = pendingSubtodo->todo(); |
1163 | pendingSubtodo = 0; | 1164 | pendingSubtodo = 0; |
1164 | emit reparentTodoSignal( newParent,newSub ); | 1165 | emit reparentTodoSignal( newParent,newSub ); |
1165 | return; | 1166 | return; |
1166 | } | 1167 | } |
1167 | } | 1168 | } |
1168 | 1169 | ||
1169 | } | 1170 | } |
1170 | 1171 | ||
1171 | void KOTodoView::setDocumentId( const QString &id ) | 1172 | void KOTodoView::setDocumentId( const QString &id ) |
1172 | { | 1173 | { |
1173 | 1174 | ||
1174 | mDocPrefs->setDoc( id ); | 1175 | mDocPrefs->setDoc( id ); |
1175 | } | 1176 | } |
1176 | 1177 | ||
1177 | void KOTodoView::itemStateChanged( QListViewItem *item ) | 1178 | void KOTodoView::itemStateChanged( QListViewItem *item ) |
1178 | { | 1179 | { |
1179 | if (!item) return; | 1180 | if (!item) return; |
1180 | 1181 | ||
1181 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1182 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1182 | 1183 | ||
1183 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; | 1184 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; |
1184 | 1185 | ||
1185 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); | 1186 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); |
1186 | } | 1187 | } |
1187 | 1188 | ||
1188 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const | 1189 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const |
1189 | { | 1190 | { |
1190 | mTodoListView->saveLayout(config,group); | 1191 | mTodoListView->saveLayout(config,group); |
1191 | } | 1192 | } |
1192 | 1193 | ||
1193 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) | 1194 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) |
1194 | { | 1195 | { |
1195 | mTodoListView->restoreLayout(config,group); | 1196 | mTodoListView->restoreLayout(config,group); |
1196 | } | 1197 | } |
1197 | 1198 | ||
1198 | void KOTodoView::processSelectionChange() | 1199 | void KOTodoView::processSelectionChange() |
1199 | { | 1200 | { |
1200 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; | 1201 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; |
1201 | 1202 | ||
1202 | KOTodoViewItem *item = | 1203 | KOTodoViewItem *item = |
1203 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); | 1204 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); |
1204 | 1205 | ||
1205 | if ( !item ) { | 1206 | if ( !item ) { |
1206 | emit incidenceSelected( 0 ); | 1207 | emit incidenceSelected( 0 ); |
1207 | } else { | 1208 | } else { |
1208 | emit incidenceSelected( item->todo() ); | 1209 | emit incidenceSelected( item->todo() ); |
1209 | } | 1210 | } |
1210 | } | 1211 | } |
1211 | 1212 | ||
1212 | void KOTodoView::modified(bool b) | 1213 | void KOTodoView::modified(bool b) |
1213 | { | 1214 | { |
1214 | emit isModified(b); | 1215 | emit isModified(b); |
1215 | } | 1216 | } |
1216 | void KOTodoView::setTodoModified( Todo* todo ) | 1217 | void KOTodoView::setTodoModified( Todo* todo ) |
1217 | { | 1218 | { |
1218 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); | 1219 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); |
1219 | } | 1220 | } |
1220 | void KOTodoView::clearSelection() | 1221 | void KOTodoView::clearSelection() |
1221 | { | 1222 | { |
1222 | mTodoListView->selectAll( false ); | 1223 | mTodoListView->selectAll( false ); |
1223 | } | 1224 | } |
1224 | void KOTodoView::setAllOpen() | 1225 | void KOTodoView::setAllOpen() |
1225 | { | 1226 | { |
1226 | if ( isFlatDisplay ) { | 1227 | if ( isFlatDisplay ) { |
1227 | isFlatDisplay = false; | 1228 | isFlatDisplay = false; |
1228 | mPopupMenu->setItemChecked( 8,false ); | 1229 | mPopupMenu->setItemChecked( 8,false ); |
1229 | updateView(); | 1230 | updateView(); |
1230 | } else { | 1231 | } else { |
1231 | storeCurrentItem(); | 1232 | storeCurrentItem(); |
1232 | } | 1233 | } |
1233 | setOpen(mTodoListView->firstChild(), true); | 1234 | setOpen(mTodoListView->firstChild(), true); |
1234 | resetCurrentItem(); | 1235 | resetCurrentItem(); |
1235 | } | 1236 | } |
1236 | void KOTodoView::setAllClose() | 1237 | void KOTodoView::setAllClose() |
1237 | { | 1238 | { |
1238 | if ( isFlatDisplay ) { | 1239 | if ( isFlatDisplay ) { |
1239 | isFlatDisplay = false; | 1240 | isFlatDisplay = false; |
1240 | mPopupMenu->setItemChecked( 8,false ); | 1241 | mPopupMenu->setItemChecked( 8,false ); |
1241 | updateView(); | 1242 | updateView(); |
1242 | } else { | 1243 | } else { |
1243 | storeCurrentItem(); | 1244 | storeCurrentItem(); |
1244 | } | 1245 | } |
1245 | setOpen(mTodoListView->firstChild(), false); | 1246 | setOpen(mTodoListView->firstChild(), false); |
1246 | resetCurrentItem(); | 1247 | resetCurrentItem(); |
1247 | } | 1248 | } |
1248 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) | 1249 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) |
1249 | { | 1250 | { |
1250 | 1251 | ||
1251 | while ( item ) { | 1252 | while ( item ) { |
1252 | setOpen( item->firstChild(), setOpenI ); | 1253 | setOpen( item->firstChild(), setOpenI ); |
1253 | item->setOpen( setOpenI ); | 1254 | item->setOpen( setOpenI ); |
1254 | item = item->nextSibling(); | 1255 | item = item->nextSibling(); |
1255 | } | 1256 | } |
1256 | } | 1257 | } |
1257 | 1258 | ||
1258 | void KOTodoView::displayAllFlat() | 1259 | void KOTodoView::displayAllFlat() |
1259 | { | 1260 | { |
1260 | pendingSubtodo = 0; | 1261 | pendingSubtodo = 0; |
1261 | if ( mBlockUpdate ) { | 1262 | if ( mBlockUpdate ) { |
1262 | return; | 1263 | return; |
1263 | } | 1264 | } |
1264 | mPopupMenu->setItemChecked( 8,true ); | 1265 | mPopupMenu->setItemChecked( 8,true ); |
1265 | isFlatDisplay = true; | 1266 | isFlatDisplay = true; |
1266 | QPtrList<Todo> todoList = calendar()->todos(); | 1267 | QPtrList<Todo> todoList = calendar()->todos(); |
1267 | mTodoMap.clear(); | 1268 | mTodoMap.clear(); |
1268 | mTodoListView->clear(); | 1269 | mTodoListView->clear(); |
1269 | Todo *todo; | 1270 | Todo *todo; |
1270 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 1271 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
1271 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 1272 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
1272 | mTodoMap.insert(todo,todoItem); | 1273 | mTodoMap.insert(todo,todoItem); |
1273 | } | 1274 | } |
1274 | mTodoListView->setFocus(); | 1275 | mTodoListView->setFocus(); |
1275 | processSelectionChange(); | 1276 | processSelectionChange(); |
1276 | } | 1277 | } |
1277 | 1278 | ||
1278 | void KOTodoView::setAllFlat() | 1279 | void KOTodoView::setAllFlat() |
1279 | { | 1280 | { |
1280 | if ( isFlatDisplay ) { | 1281 | if ( isFlatDisplay ) { |
1281 | isFlatDisplay = false; | 1282 | isFlatDisplay = false; |
1282 | mPopupMenu->setItemChecked( 8,false ); | 1283 | mPopupMenu->setItemChecked( 8,false ); |
1283 | updateView(); | 1284 | updateView(); |
1284 | return; | 1285 | return; |
1285 | } | 1286 | } |
1286 | storeCurrentItem(); | 1287 | storeCurrentItem(); |
1287 | displayAllFlat(); | 1288 | displayAllFlat(); |
1288 | resetCurrentItem(); | 1289 | resetCurrentItem(); |
1289 | } | 1290 | } |
1290 | 1291 | ||
1291 | void KOTodoView::purgeCompleted() | 1292 | void KOTodoView::purgeCompleted() |
1292 | { | 1293 | { |
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 9c35b1d..762103f 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -1,718 +1,744 @@ | |||
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 "calformat.h" | 25 | #include "calformat.h" |
26 | 26 | ||
27 | #include "incidence.h" | 27 | #include "incidence.h" |
28 | #include "todo.h" | 28 | #include "todo.h" |
29 | 29 | ||
30 | using namespace KCal; | 30 | using namespace KCal; |
31 | 31 | ||
32 | Incidence::Incidence() : | 32 | Incidence::Incidence() : |
33 | IncidenceBase(), | 33 | IncidenceBase(), |
34 | mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3) | 34 | mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3) |
35 | { | 35 | { |
36 | mRecurrence = new Recurrence(this); | 36 | mRecurrence = new Recurrence(this); |
37 | mCancelled = false; | 37 | mCancelled = false; |
38 | recreate(); | 38 | recreate(); |
39 | mHasStartDate = true; | 39 | mHasStartDate = true; |
40 | mAlarms.setAutoDelete(true); | 40 | mAlarms.setAutoDelete(true); |
41 | mAttachments.setAutoDelete(true); | 41 | mAttachments.setAutoDelete(true); |
42 | mHasRecurrenceID = false; | 42 | mHasRecurrenceID = false; |
43 | mHoliday = false; | 43 | mHoliday = false; |
44 | mBirthday = false; | 44 | mBirthday = false; |
45 | mAnniversary = false; | 45 | mAnniversary = false; |
46 | 46 | ||
47 | } | 47 | } |
48 | 48 | ||
49 | Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) | 49 | Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) |
50 | { | 50 | { |
51 | // TODO: reenable attributes currently commented out. | 51 | // TODO: reenable attributes currently commented out. |
52 | mRevision = i.mRevision; | 52 | mRevision = i.mRevision; |
53 | mCreated = i.mCreated; | 53 | mCreated = i.mCreated; |
54 | mDescription = i.mDescription; | 54 | mDescription = i.mDescription; |
55 | mSummary = i.mSummary; | 55 | mSummary = i.mSummary; |
56 | mCategories = i.mCategories; | 56 | mCategories = i.mCategories; |
57 | // Incidence *mRelatedTo; Incidence *mRelatedTo; | 57 | // Incidence *mRelatedTo; Incidence *mRelatedTo; |
58 | mRelatedTo = 0; | 58 | mRelatedTo = 0; |
59 | mRelatedToUid = i.mRelatedToUid; | 59 | mRelatedToUid = i.mRelatedToUid; |
60 | // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; | 60 | // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; |
61 | mExDates = i.mExDates; | 61 | mExDates = i.mExDates; |
62 | mAttachments = i.mAttachments; | 62 | mAttachments = i.mAttachments; |
63 | mResources = i.mResources; | 63 | mResources = i.mResources; |
64 | mSecrecy = i.mSecrecy; | 64 | mSecrecy = i.mSecrecy; |
65 | mPriority = i.mPriority; | 65 | mPriority = i.mPriority; |
66 | mLocation = i.mLocation; | 66 | mLocation = i.mLocation; |
67 | mCancelled = i.mCancelled; | 67 | mCancelled = i.mCancelled; |
68 | mHasStartDate = i.mHasStartDate; | 68 | mHasStartDate = i.mHasStartDate; |
69 | QPtrListIterator<Alarm> it( i.mAlarms ); | 69 | QPtrListIterator<Alarm> it( i.mAlarms ); |
70 | const Alarm *a; | 70 | const Alarm *a; |
71 | while( (a = it.current()) ) { | 71 | while( (a = it.current()) ) { |
72 | Alarm *b = new Alarm( *a ); | 72 | Alarm *b = new Alarm( *a ); |
73 | b->setParent( this ); | 73 | b->setParent( this ); |
74 | mAlarms.append( b ); | 74 | mAlarms.append( b ); |
75 | 75 | ||
76 | ++it; | 76 | ++it; |
77 | } | 77 | } |
78 | mAlarms.setAutoDelete(true); | 78 | mAlarms.setAutoDelete(true); |
79 | mHasRecurrenceID = i.mHasRecurrenceID; | 79 | mHasRecurrenceID = i.mHasRecurrenceID; |
80 | mRecurrenceID = i.mRecurrenceID; | 80 | mRecurrenceID = i.mRecurrenceID; |
81 | mRecurrence = new Recurrence( *(i.mRecurrence), this ); | 81 | mRecurrence = new Recurrence( *(i.mRecurrence), this ); |
82 | mHoliday = i.mHoliday ; | 82 | mHoliday = i.mHoliday ; |
83 | mBirthday = i.mBirthday; | 83 | mBirthday = i.mBirthday; |
84 | mAnniversary = i.mAnniversary; | 84 | mAnniversary = i.mAnniversary; |
85 | } | 85 | } |
86 | 86 | ||
87 | Incidence::~Incidence() | 87 | Incidence::~Incidence() |
88 | { | 88 | { |
89 | 89 | ||
90 | Incidence *ev; | 90 | Incidence *ev; |
91 | QPtrList<Incidence> Relations = relations(); | 91 | QPtrList<Incidence> Relations = relations(); |
92 | for (ev=Relations.first();ev;ev=Relations.next()) { | 92 | for (ev=Relations.first();ev;ev=Relations.next()) { |
93 | if (ev->relatedTo() == this) ev->setRelatedTo(0); | 93 | if (ev->relatedTo() == this) ev->setRelatedTo(0); |
94 | } | 94 | } |
95 | if (relatedTo()) relatedTo()->removeRelation(this); | 95 | if (relatedTo()) relatedTo()->removeRelation(this); |
96 | delete mRecurrence; | 96 | delete mRecurrence; |
97 | 97 | ||
98 | } | 98 | } |
99 | 99 | ||
100 | bool Incidence::isHoliday() const | 100 | bool Incidence::isHoliday() const |
101 | { | 101 | { |
102 | return mHoliday; | 102 | return mHoliday; |
103 | } | 103 | } |
104 | bool Incidence::isBirthday() const | 104 | bool Incidence::isBirthday() const |
105 | { | 105 | { |
106 | 106 | ||
107 | return mBirthday ; | 107 | return mBirthday ; |
108 | } | 108 | } |
109 | bool Incidence::isAnniversary() const | 109 | bool Incidence::isAnniversary() const |
110 | { | 110 | { |
111 | return mAnniversary ; | 111 | return mAnniversary ; |
112 | 112 | ||
113 | } | 113 | } |
114 | 114 | ||
115 | bool Incidence::hasRecurrenceID() const | 115 | bool Incidence::hasRecurrenceID() const |
116 | { | 116 | { |
117 | return mHasRecurrenceID; | 117 | return mHasRecurrenceID; |
118 | } | 118 | } |
119 | 119 | ||
120 | void Incidence::setHasRecurrenceID( bool b ) | 120 | void Incidence::setHasRecurrenceID( bool b ) |
121 | { | 121 | { |
122 | mHasRecurrenceID = b; | 122 | mHasRecurrenceID = b; |
123 | } | 123 | } |
124 | 124 | ||
125 | void Incidence::setRecurrenceID(QDateTime d) | 125 | void Incidence::setRecurrenceID(QDateTime d) |
126 | { | 126 | { |
127 | mRecurrenceID = d; | 127 | mRecurrenceID = d; |
128 | mHasRecurrenceID = true; | 128 | mHasRecurrenceID = true; |
129 | updated(); | 129 | updated(); |
130 | } | 130 | } |
131 | QDateTime Incidence::recurrenceID () const | 131 | QDateTime Incidence::recurrenceID () const |
132 | { | 132 | { |
133 | return mRecurrenceID; | 133 | return mRecurrenceID; |
134 | } | 134 | } |
135 | 135 | ||
136 | bool Incidence::cancelled() const | 136 | bool Incidence::cancelled() const |
137 | { | 137 | { |
138 | return mCancelled; | 138 | return mCancelled; |
139 | } | 139 | } |
140 | void Incidence::setCancelled( bool b ) | 140 | void Incidence::setCancelled( bool b ) |
141 | { | 141 | { |
142 | mCancelled = b; | 142 | mCancelled = b; |
143 | updated(); | 143 | updated(); |
144 | } | 144 | } |
145 | bool Incidence::hasStartDate() const | 145 | bool Incidence::hasStartDate() const |
146 | { | 146 | { |
147 | return mHasStartDate; | 147 | return mHasStartDate; |
148 | } | 148 | } |
149 | 149 | ||
150 | void Incidence::setHasStartDate(bool f) | 150 | void Incidence::setHasStartDate(bool f) |
151 | { | 151 | { |
152 | if (mReadOnly) return; | 152 | if (mReadOnly) return; |
153 | mHasStartDate = f; | 153 | mHasStartDate = f; |
154 | updated(); | 154 | updated(); |
155 | } | 155 | } |
156 | 156 | ||
157 | // A string comparison that considers that null and empty are the same | 157 | // A string comparison that considers that null and empty are the same |
158 | static bool stringCompare( const QString& s1, const QString& s2 ) | 158 | static bool stringCompare( const QString& s1, const QString& s2 ) |
159 | { | 159 | { |
160 | if ( s1.isEmpty() && s2.isEmpty() ) | 160 | if ( s1.isEmpty() && s2.isEmpty() ) |
161 | return true; | 161 | return true; |
162 | return s1 == s2; | 162 | return s1 == s2; |
163 | } | 163 | } |
164 | 164 | ||
165 | bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) | 165 | bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) |
166 | { | 166 | { |
167 | 167 | ||
168 | if( i1.alarms().count() != i2.alarms().count() ) { | 168 | if( i1.alarms().count() != i2.alarms().count() ) { |
169 | return false; // no need to check further | 169 | return false; // no need to check further |
170 | } | 170 | } |
171 | if ( i1.alarms().count() > 0 ) { | 171 | if ( i1.alarms().count() > 0 ) { |
172 | if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) | 172 | if ( !( *(i1.alarms().first()) == *(i2.alarms().first())) ) |
173 | { | 173 | { |
174 | qDebug("alarm not equal "); | 174 | qDebug("alarm not equal "); |
175 | return false; | 175 | return false; |
176 | } | 176 | } |
177 | } | 177 | } |
178 | #if 0 | 178 | #if 0 |
179 | QPtrListIterator<Alarm> a1( i1.alarms() ); | 179 | QPtrListIterator<Alarm> a1( i1.alarms() ); |
180 | QPtrListIterator<Alarm> a2( i2.alarms() ); | 180 | QPtrListIterator<Alarm> a2( i2.alarms() ); |
181 | for( ; a1.current() && a2.current(); ++a1, ++a2 ) { | 181 | for( ; a1.current() && a2.current(); ++a1, ++a2 ) { |
182 | if( *a1.current() == *a2.current() ) { | 182 | if( *a1.current() == *a2.current() ) { |
183 | continue; | 183 | continue; |
184 | } | 184 | } |
185 | else { | 185 | else { |
186 | return false; | 186 | return false; |
187 | } | 187 | } |
188 | } | 188 | } |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { | 191 | if ( i1.hasRecurrenceID() == i2.hasRecurrenceID() ) { |
192 | if ( i1.hasRecurrenceID() ) { | 192 | if ( i1.hasRecurrenceID() ) { |
193 | if ( i1.recurrenceID() != i2.recurrenceID() ) | 193 | if ( i1.recurrenceID() != i2.recurrenceID() ) |
194 | return false; | 194 | return false; |
195 | } | 195 | } |
196 | 196 | ||
197 | } else { | 197 | } else { |
198 | return false; | 198 | return false; |
199 | } | 199 | } |
200 | 200 | ||
201 | if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) | 201 | if ( ! operator==( (const IncidenceBase&)i1, (const IncidenceBase&)i2 ) ) |
202 | return false; | 202 | return false; |
203 | if ( i1.hasStartDate() == i2.hasStartDate() ) { | 203 | if ( i1.hasStartDate() == i2.hasStartDate() ) { |
204 | if ( i1.hasStartDate() ) { | 204 | if ( i1.hasStartDate() ) { |
205 | if ( i1.dtStart() != i2.dtStart() ) | 205 | if ( i1.dtStart() != i2.dtStart() ) |
206 | return false; | 206 | return false; |
207 | } | 207 | } |
208 | } else { | 208 | } else { |
209 | return false; | 209 | return false; |
210 | } | 210 | } |
211 | if (!( *i1.recurrence() == *i2.recurrence()) ) { | 211 | if (!( *i1.recurrence() == *i2.recurrence()) ) { |
212 | qDebug("recurrence is NOT equal "); | 212 | qDebug("recurrence is NOT equal "); |
213 | return false; | 213 | return false; |
214 | } | 214 | } |
215 | return | 215 | return |
216 | // i1.created() == i2.created() && | 216 | // i1.created() == i2.created() && |
217 | stringCompare( i1.description(), i2.description() ) && | 217 | stringCompare( i1.description(), i2.description() ) && |
218 | stringCompare( i1.summary(), i2.summary() ) && | 218 | stringCompare( i1.summary(), i2.summary() ) && |
219 | i1.categories() == i2.categories() && | 219 | i1.categories() == i2.categories() && |
220 | // no need to compare mRelatedTo | 220 | // no need to compare mRelatedTo |
221 | stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && | 221 | stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && |
222 | // i1.relations() == i2.relations() && | 222 | // i1.relations() == i2.relations() && |
223 | i1.exDates() == i2.exDates() && | 223 | i1.exDates() == i2.exDates() && |
224 | i1.attachments() == i2.attachments() && | 224 | i1.attachments() == i2.attachments() && |
225 | i1.resources() == i2.resources() && | 225 | i1.resources() == i2.resources() && |
226 | i1.secrecy() == i2.secrecy() && | 226 | i1.secrecy() == i2.secrecy() && |
227 | i1.priority() == i2.priority() && | 227 | i1.priority() == i2.priority() && |
228 | i1.cancelled() == i2.cancelled() && | 228 | i1.cancelled() == i2.cancelled() && |
229 | stringCompare( i1.location(), i2.location() ); | 229 | stringCompare( i1.location(), i2.location() ); |
230 | } | 230 | } |
231 | 231 | ||
232 | Incidence* Incidence::recreateCloneException( QDate d ) | 232 | Incidence* Incidence::recreateCloneException( QDate d ) |
233 | { | 233 | { |
234 | Incidence* newInc = clone(); | 234 | Incidence* newInc = clone(); |
235 | newInc->recreate(); | 235 | newInc->recreate(); |
236 | if ( doesRecur() ) { | 236 | if ( doesRecur() ) { |
237 | addExDate( d ); | 237 | addExDate( d ); |
238 | newInc->recurrence()->unsetRecurs(); | 238 | newInc->recurrence()->unsetRecurs(); |
239 | if ( type() == "Event") { | 239 | if ( type() == "Event") { |
240 | int len = dtStart().secsTo( ((Event*)this)->dtEnd()); | 240 | int len = dtStart().secsTo( ((Event*)this)->dtEnd()); |
241 | QTime tim = dtStart().time(); | 241 | QTime tim = dtStart().time(); |
242 | newInc->setDtStart( QDateTime(d, tim) ); | 242 | newInc->setDtStart( QDateTime(d, tim) ); |
243 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); | 243 | ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); |
244 | } else { | 244 | } else { |
245 | int len = dtStart().secsTo( ((Todo*)this)->dtDue()); | 245 | int len = dtStart().secsTo( ((Todo*)this)->dtDue()); |
246 | QTime tim = ((Todo*)this)->dtDue().time(); | 246 | QTime tim = ((Todo*)this)->dtDue().time(); |
247 | ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); | 247 | ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); |
248 | ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); | 248 | ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); |
249 | ((Todo*)this)->setRecurDates(); | 249 | ((Todo*)this)->setRecurDates(); |
250 | } | 250 | } |
251 | newInc->setExDates( DateList () ); | 251 | newInc->setExDates( DateList () ); |
252 | } | 252 | } |
253 | return newInc; | 253 | return newInc; |
254 | } | 254 | } |
255 | 255 | ||
256 | void Incidence::recreate() | 256 | void Incidence::recreate() |
257 | { | 257 | { |
258 | setCreated(QDateTime::currentDateTime()); | 258 | setCreated(QDateTime::currentDateTime()); |
259 | 259 | ||
260 | setUid(CalFormat::createUniqueId()); | 260 | setUid(CalFormat::createUniqueId()); |
261 | 261 | ||
262 | setRevision(0); | 262 | setRevision(0); |
263 | setIDStr( ":" ); | 263 | setIDStr( ":" ); |
264 | setLastModified(QDateTime::currentDateTime()); | 264 | setLastModified(QDateTime::currentDateTime()); |
265 | } | 265 | } |
266 | void Incidence::cloneRelations( Incidence * newInc ) | 266 | void Incidence::cloneRelations( Incidence * newInc ) |
267 | { | 267 | { |
268 | // newInc is already a clone of this incidence | 268 | // newInc is already a clone of this incidence |
269 | Incidence * inc; | 269 | Incidence * inc; |
270 | Incidence * cloneInc; | 270 | Incidence * cloneInc; |
271 | QPtrList<Incidence> Relations = relations(); | 271 | QPtrList<Incidence> Relations = relations(); |
272 | for (inc=Relations.first();inc;inc=Relations.next()) { | 272 | for (inc=Relations.first();inc;inc=Relations.next()) { |
273 | cloneInc = inc->clone(); | 273 | cloneInc = inc->clone(); |
274 | cloneInc->recreate(); | 274 | cloneInc->recreate(); |
275 | cloneInc->setRelatedTo( newInc ); | 275 | cloneInc->setRelatedTo( newInc ); |
276 | inc->cloneRelations( cloneInc ); | 276 | inc->cloneRelations( cloneInc ); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | void Incidence::setReadOnly( bool readOnly ) | 279 | void Incidence::setReadOnly( bool readOnly ) |
280 | { | 280 | { |
281 | IncidenceBase::setReadOnly( readOnly ); | 281 | IncidenceBase::setReadOnly( readOnly ); |
282 | recurrence()->setRecurReadOnly( readOnly); | 282 | recurrence()->setRecurReadOnly( readOnly); |
283 | } | 283 | } |
284 | 284 | ||
285 | void Incidence::setCreated(QDateTime created) | 285 | void Incidence::setCreated(QDateTime created) |
286 | { | 286 | { |
287 | if (mReadOnly) return; | 287 | if (mReadOnly) return; |
288 | mCreated = getEvenTime(created); | 288 | mCreated = getEvenTime(created); |
289 | } | 289 | } |
290 | 290 | ||
291 | QDateTime Incidence::created() const | 291 | QDateTime Incidence::created() const |
292 | { | 292 | { |
293 | return mCreated; | 293 | return mCreated; |
294 | } | 294 | } |
295 | 295 | ||
296 | void Incidence::setRevision(int rev) | 296 | void Incidence::setRevision(int rev) |
297 | { | 297 | { |
298 | if (mReadOnly) return; | 298 | if (mReadOnly) return; |
299 | mRevision = rev; | 299 | mRevision = rev; |
300 | 300 | ||
301 | updated(); | 301 | updated(); |
302 | } | 302 | } |
303 | 303 | ||
304 | int Incidence::revision() const | 304 | int Incidence::revision() const |
305 | { | 305 | { |
306 | return mRevision; | 306 | return mRevision; |
307 | } | 307 | } |
308 | 308 | ||
309 | void Incidence::setDtStart(const QDateTime &dtStart) | 309 | void Incidence::setDtStart(const QDateTime &dtStart) |
310 | { | 310 | { |
311 | 311 | ||
312 | QDateTime dt = getEvenTime(dtStart); | 312 | QDateTime dt = getEvenTime(dtStart); |
313 | recurrence()->setRecurStart( dt); | 313 | recurrence()->setRecurStart( dt); |
314 | IncidenceBase::setDtStart( dt ); | 314 | IncidenceBase::setDtStart( dt ); |
315 | } | 315 | } |
316 | 316 | ||
317 | void Incidence::setDescription(const QString &description) | 317 | void Incidence::setDescription(const QString &description) |
318 | { | 318 | { |
319 | if (mReadOnly) return; | 319 | if (mReadOnly) return; |
320 | mDescription = description; | 320 | mDescription = description; |
321 | updated(); | 321 | updated(); |
322 | } | 322 | } |
323 | 323 | ||
324 | QString Incidence::description() const | 324 | QString Incidence::description() const |
325 | { | 325 | { |
326 | return mDescription; | 326 | return mDescription; |
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
330 | void Incidence::setSummary(const QString &summary) | 330 | void Incidence::setSummary(const QString &summary) |
331 | { | 331 | { |
332 | if (mReadOnly) return; | 332 | if (mReadOnly) return; |
333 | mSummary = summary; | 333 | mSummary = summary; |
334 | updated(); | 334 | updated(); |
335 | } | 335 | } |
336 | 336 | ||
337 | QString Incidence::summary() const | 337 | QString Incidence::summary() const |
338 | { | 338 | { |
339 | return mSummary; | 339 | return mSummary; |
340 | } | 340 | } |
341 | void Incidence::checkCategories() | 341 | void Incidence::checkCategories() |
342 | { | 342 | { |
343 | mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday")); | 343 | mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday")); |
344 | mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday")); | 344 | mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday")); |
345 | mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary")); | 345 | mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary")); |
346 | } | 346 | } |
347 | 347 | ||
348 | void Incidence::setCategories(const QStringList &categories) | 348 | void Incidence::addCategories(const QStringList &categories, bool addToRelations ) //addToRelations = false |
349 | { | ||
350 | if (mReadOnly) return; | ||
351 | int i; | ||
352 | for( i = 0; i < categories.count(); ++i ) { | ||
353 | if ( !mCategories.contains (categories[i])) | ||
354 | mCategories.append( categories[i] ); | ||
355 | } | ||
356 | checkCategories(); | ||
357 | updated(); | ||
358 | if ( addToRelations ) { | ||
359 | Incidence * inc; | ||
360 | QPtrList<Incidence> Relations = relations(); | ||
361 | for (inc=Relations.first();inc;inc=Relations.next()) { | ||
362 | inc->addCategories( categories, true ); | ||
363 | } | ||
364 | } | ||
365 | } | ||
366 | |||
367 | void Incidence::setCategories(const QStringList &categories, bool setForRelations ) //setForRelations = false | ||
349 | { | 368 | { |
350 | if (mReadOnly) return; | 369 | if (mReadOnly) return; |
351 | mCategories = categories; | 370 | mCategories = categories; |
352 | checkCategories(); | 371 | checkCategories(); |
353 | updated(); | 372 | updated(); |
373 | if ( setForRelations ) { | ||
374 | Incidence * inc; | ||
375 | QPtrList<Incidence> Relations = relations(); | ||
376 | for (inc=Relations.first();inc;inc=Relations.next()) { | ||
377 | inc->setCategories( categories, true ); | ||
378 | } | ||
379 | } | ||
354 | } | 380 | } |
355 | 381 | ||
356 | // TODO: remove setCategories(QString) function | 382 | // TODO: remove setCategories(QString) function |
357 | void Incidence::setCategories(const QString &catStr) | 383 | void Incidence::setCategories(const QString &catStr) |
358 | { | 384 | { |
359 | if (mReadOnly) return; | 385 | if (mReadOnly) return; |
360 | mCategories.clear(); | 386 | mCategories.clear(); |
361 | 387 | ||
362 | if (catStr.isEmpty()) return; | 388 | if (catStr.isEmpty()) return; |
363 | 389 | ||
364 | mCategories = QStringList::split(",",catStr); | 390 | mCategories = QStringList::split(",",catStr); |
365 | 391 | ||
366 | QStringList::Iterator it; | 392 | QStringList::Iterator it; |
367 | for(it = mCategories.begin();it != mCategories.end(); ++it) { | 393 | for(it = mCategories.begin();it != mCategories.end(); ++it) { |
368 | *it = (*it).stripWhiteSpace(); | 394 | *it = (*it).stripWhiteSpace(); |
369 | } | 395 | } |
370 | checkCategories(); | 396 | checkCategories(); |
371 | updated(); | 397 | updated(); |
372 | } | 398 | } |
373 | 399 | ||
374 | QStringList Incidence::categories() const | 400 | QStringList Incidence::categories() const |
375 | { | 401 | { |
376 | return mCategories; | 402 | return mCategories; |
377 | } | 403 | } |
378 | 404 | ||
379 | QString Incidence::categoriesStr() | 405 | QString Incidence::categoriesStr() |
380 | { | 406 | { |
381 | return mCategories.join(","); | 407 | return mCategories.join(","); |
382 | } | 408 | } |
383 | QString Incidence::categoriesStrWithSpace() | 409 | QString Incidence::categoriesStrWithSpace() |
384 | { | 410 | { |
385 | return mCategories.join(", "); | 411 | return mCategories.join(", "); |
386 | } | 412 | } |
387 | 413 | ||
388 | void Incidence::setRelatedToUid(const QString &relatedToUid) | 414 | void Incidence::setRelatedToUid(const QString &relatedToUid) |
389 | { | 415 | { |
390 | if (mReadOnly) return; | 416 | if (mReadOnly) return; |
391 | mRelatedToUid = relatedToUid; | 417 | mRelatedToUid = relatedToUid; |
392 | } | 418 | } |
393 | 419 | ||
394 | QString Incidence::relatedToUid() const | 420 | QString Incidence::relatedToUid() const |
395 | { | 421 | { |
396 | return mRelatedToUid; | 422 | return mRelatedToUid; |
397 | } | 423 | } |
398 | 424 | ||
399 | void Incidence::setRelatedTo(Incidence *relatedTo) | 425 | void Incidence::setRelatedTo(Incidence *relatedTo) |
400 | { | 426 | { |
401 | //qDebug("Incidence::setRelatedTo %d ", relatedTo); | 427 | //qDebug("Incidence::setRelatedTo %d ", relatedTo); |
402 | //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); | 428 | //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); |
403 | if (mReadOnly || mRelatedTo == relatedTo) return; | 429 | if (mReadOnly || mRelatedTo == relatedTo) return; |
404 | if(mRelatedTo) { | 430 | if(mRelatedTo) { |
405 | // updated(); | 431 | // updated(); |
406 | mRelatedTo->removeRelation(this); | 432 | mRelatedTo->removeRelation(this); |
407 | } | 433 | } |
408 | mRelatedTo = relatedTo; | 434 | mRelatedTo = relatedTo; |
409 | if (mRelatedTo) { | 435 | if (mRelatedTo) { |
410 | mRelatedTo->addRelation(this); | 436 | mRelatedTo->addRelation(this); |
411 | mRelatedToUid = mRelatedTo->uid(); | 437 | mRelatedToUid = mRelatedTo->uid(); |
412 | } else { | 438 | } else { |
413 | mRelatedToUid = ""; | 439 | mRelatedToUid = ""; |
414 | } | 440 | } |
415 | } | 441 | } |
416 | 442 | ||
417 | Incidence *Incidence::relatedTo() const | 443 | Incidence *Incidence::relatedTo() const |
418 | { | 444 | { |
419 | return mRelatedTo; | 445 | return mRelatedTo; |
420 | } | 446 | } |
421 | 447 | ||
422 | QPtrList<Incidence> Incidence::relations() const | 448 | QPtrList<Incidence> Incidence::relations() const |
423 | { | 449 | { |
424 | return mRelations; | 450 | return mRelations; |
425 | } | 451 | } |
426 | 452 | ||
427 | void Incidence::addRelation(Incidence *event) | 453 | void Incidence::addRelation(Incidence *event) |
428 | { | 454 | { |
429 | if( mRelations.findRef( event ) == -1 ) { | 455 | if( mRelations.findRef( event ) == -1 ) { |
430 | mRelations.append(event); | 456 | mRelations.append(event); |
431 | //updated(); | 457 | //updated(); |
432 | } | 458 | } |
433 | } | 459 | } |
434 | 460 | ||
435 | void Incidence::removeRelation(Incidence *event) | 461 | void Incidence::removeRelation(Incidence *event) |
436 | { | 462 | { |
437 | 463 | ||
438 | mRelations.removeRef(event); | 464 | mRelations.removeRef(event); |
439 | 465 | ||
440 | // if (event->getRelatedTo() == this) event->setRelatedTo(0); | 466 | // if (event->getRelatedTo() == this) event->setRelatedTo(0); |
441 | } | 467 | } |
442 | 468 | ||
443 | bool Incidence::recursOn(const QDate &qd) const | 469 | bool Incidence::recursOn(const QDate &qd) const |
444 | { | 470 | { |
445 | if (recurrence()->recursOnPure(qd) && !isException(qd)) return true; | 471 | if (recurrence()->recursOnPure(qd) && !isException(qd)) return true; |
446 | else return false; | 472 | else return false; |
447 | } | 473 | } |
448 | 474 | ||
449 | void Incidence::setExDates(const DateList &exDates) | 475 | void Incidence::setExDates(const DateList &exDates) |
450 | { | 476 | { |
451 | if (mReadOnly) return; | 477 | if (mReadOnly) return; |
452 | mExDates = exDates; | 478 | mExDates = exDates; |
453 | 479 | ||
454 | recurrence()->setRecurExDatesCount(mExDates.count()); | 480 | recurrence()->setRecurExDatesCount(mExDates.count()); |
455 | 481 | ||
456 | updated(); | 482 | updated(); |
457 | } | 483 | } |
458 | 484 | ||
459 | void Incidence::addExDate(const QDate &date) | 485 | void Incidence::addExDate(const QDate &date) |
460 | { | 486 | { |
461 | if (mReadOnly) return; | 487 | if (mReadOnly) return; |
462 | mExDates.append(date); | 488 | mExDates.append(date); |
463 | 489 | ||
464 | recurrence()->setRecurExDatesCount(mExDates.count()); | 490 | recurrence()->setRecurExDatesCount(mExDates.count()); |
465 | 491 | ||
466 | updated(); | 492 | updated(); |
467 | } | 493 | } |
468 | 494 | ||
469 | DateList Incidence::exDates() const | 495 | DateList Incidence::exDates() const |
470 | { | 496 | { |
471 | return mExDates; | 497 | return mExDates; |
472 | } | 498 | } |
473 | 499 | ||
474 | bool Incidence::isException(const QDate &date) const | 500 | bool Incidence::isException(const QDate &date) const |
475 | { | 501 | { |
476 | DateList::ConstIterator it; | 502 | DateList::ConstIterator it; |
477 | for( it = mExDates.begin(); it != mExDates.end(); ++it ) { | 503 | for( it = mExDates.begin(); it != mExDates.end(); ++it ) { |
478 | if ( (*it) == date ) { | 504 | if ( (*it) == date ) { |
479 | return true; | 505 | return true; |
480 | } | 506 | } |
481 | } | 507 | } |
482 | 508 | ||
483 | return false; | 509 | return false; |
484 | } | 510 | } |
485 | 511 | ||
486 | void Incidence::addAttachment(Attachment *attachment) | 512 | void Incidence::addAttachment(Attachment *attachment) |
487 | { | 513 | { |
488 | if (mReadOnly || !attachment) return; | 514 | if (mReadOnly || !attachment) return; |
489 | mAttachments.append(attachment); | 515 | mAttachments.append(attachment); |
490 | updated(); | 516 | updated(); |
491 | } | 517 | } |
492 | 518 | ||
493 | void Incidence::deleteAttachment(Attachment *attachment) | 519 | void Incidence::deleteAttachment(Attachment *attachment) |
494 | { | 520 | { |
495 | mAttachments.removeRef(attachment); | 521 | mAttachments.removeRef(attachment); |
496 | } | 522 | } |
497 | 523 | ||
498 | void Incidence::deleteAttachments(const QString& mime) | 524 | void Incidence::deleteAttachments(const QString& mime) |
499 | { | 525 | { |
500 | Attachment *at = mAttachments.first(); | 526 | Attachment *at = mAttachments.first(); |
501 | while (at) { | 527 | while (at) { |
502 | if (at->mimeType() == mime) | 528 | if (at->mimeType() == mime) |
503 | mAttachments.remove(); | 529 | mAttachments.remove(); |
504 | else | 530 | else |
505 | at = mAttachments.next(); | 531 | at = mAttachments.next(); |
506 | } | 532 | } |
507 | } | 533 | } |
508 | 534 | ||
509 | QPtrList<Attachment> Incidence::attachments() const | 535 | QPtrList<Attachment> Incidence::attachments() const |
510 | { | 536 | { |
511 | return mAttachments; | 537 | return mAttachments; |
512 | } | 538 | } |
513 | 539 | ||
514 | QPtrList<Attachment> Incidence::attachments(const QString& mime) const | 540 | QPtrList<Attachment> Incidence::attachments(const QString& mime) const |
515 | { | 541 | { |
516 | QPtrList<Attachment> attachments; | 542 | QPtrList<Attachment> attachments; |
517 | QPtrListIterator<Attachment> it( mAttachments ); | 543 | QPtrListIterator<Attachment> it( mAttachments ); |
518 | Attachment *at; | 544 | Attachment *at; |
519 | while ( (at = it.current()) ) { | 545 | while ( (at = it.current()) ) { |
520 | if (at->mimeType() == mime) | 546 | if (at->mimeType() == mime) |
521 | attachments.append(at); | 547 | attachments.append(at); |
522 | ++it; | 548 | ++it; |
523 | } | 549 | } |
524 | 550 | ||
525 | return attachments; | 551 | return attachments; |
526 | } | 552 | } |
527 | 553 | ||
528 | void Incidence::setResources(const QStringList &resources) | 554 | void Incidence::setResources(const QStringList &resources) |
529 | { | 555 | { |
530 | if (mReadOnly) return; | 556 | if (mReadOnly) return; |
531 | mResources = resources; | 557 | mResources = resources; |
532 | updated(); | 558 | updated(); |
533 | } | 559 | } |
534 | 560 | ||
535 | QStringList Incidence::resources() const | 561 | QStringList Incidence::resources() const |
536 | { | 562 | { |
537 | return mResources; | 563 | return mResources; |
538 | } | 564 | } |
539 | 565 | ||
540 | 566 | ||
541 | void Incidence::setPriority(int priority) | 567 | void Incidence::setPriority(int priority) |
542 | { | 568 | { |
543 | if (mReadOnly) return; | 569 | if (mReadOnly) return; |
544 | mPriority = priority; | 570 | mPriority = priority; |
545 | updated(); | 571 | updated(); |
546 | } | 572 | } |
547 | 573 | ||
548 | int Incidence::priority() const | 574 | int Incidence::priority() const |
549 | { | 575 | { |
550 | return mPriority; | 576 | return mPriority; |
551 | } | 577 | } |
552 | 578 | ||
553 | void Incidence::setSecrecy(int sec) | 579 | void Incidence::setSecrecy(int sec) |
554 | { | 580 | { |
555 | if (mReadOnly) return; | 581 | if (mReadOnly) return; |
556 | mSecrecy = sec; | 582 | mSecrecy = sec; |
557 | updated(); | 583 | updated(); |
558 | } | 584 | } |
559 | 585 | ||
560 | int Incidence::secrecy() const | 586 | int Incidence::secrecy() const |
561 | { | 587 | { |
562 | return mSecrecy; | 588 | return mSecrecy; |
563 | } | 589 | } |
564 | 590 | ||
565 | QString Incidence::secrecyStr() const | 591 | QString Incidence::secrecyStr() const |
566 | { | 592 | { |
567 | return secrecyName(mSecrecy); | 593 | return secrecyName(mSecrecy); |
568 | } | 594 | } |
569 | 595 | ||
570 | QString Incidence::secrecyName(int secrecy) | 596 | QString Incidence::secrecyName(int secrecy) |
571 | { | 597 | { |
572 | switch (secrecy) { | 598 | switch (secrecy) { |
573 | case SecrecyPublic: | 599 | case SecrecyPublic: |
574 | return i18n("Public"); | 600 | return i18n("Public"); |
575 | break; | 601 | break; |
576 | case SecrecyPrivate: | 602 | case SecrecyPrivate: |
577 | return i18n("Private"); | 603 | return i18n("Private"); |
578 | break; | 604 | break; |
579 | case SecrecyConfidential: | 605 | case SecrecyConfidential: |
580 | return i18n("Confidential"); | 606 | return i18n("Confidential"); |
581 | break; | 607 | break; |
582 | default: | 608 | default: |
583 | return i18n("Undefined"); | 609 | return i18n("Undefined"); |
584 | break; | 610 | break; |
585 | } | 611 | } |
586 | } | 612 | } |
587 | 613 | ||
588 | QStringList Incidence::secrecyList() | 614 | QStringList Incidence::secrecyList() |
589 | { | 615 | { |
590 | QStringList list; | 616 | QStringList list; |
591 | list << secrecyName(SecrecyPublic); | 617 | list << secrecyName(SecrecyPublic); |
592 | list << secrecyName(SecrecyPrivate); | 618 | list << secrecyName(SecrecyPrivate); |
593 | list << secrecyName(SecrecyConfidential); | 619 | list << secrecyName(SecrecyConfidential); |
594 | 620 | ||
595 | return list; | 621 | return list; |
596 | } | 622 | } |
597 | 623 | ||
598 | 624 | ||
599 | QPtrList<Alarm> Incidence::alarms() const | 625 | QPtrList<Alarm> Incidence::alarms() const |
600 | { | 626 | { |
601 | return mAlarms; | 627 | return mAlarms; |
602 | } | 628 | } |
603 | 629 | ||
604 | Alarm* Incidence::newAlarm() | 630 | Alarm* Incidence::newAlarm() |
605 | { | 631 | { |
606 | Alarm* alarm = new Alarm(this); | 632 | Alarm* alarm = new Alarm(this); |
607 | mAlarms.append(alarm); | 633 | mAlarms.append(alarm); |
608 | // updated(); | 634 | // updated(); |
609 | return alarm; | 635 | return alarm; |
610 | } | 636 | } |
611 | 637 | ||
612 | void Incidence::addAlarm(Alarm *alarm) | 638 | void Incidence::addAlarm(Alarm *alarm) |
613 | { | 639 | { |
614 | mAlarms.append(alarm); | 640 | mAlarms.append(alarm); |
615 | updated(); | 641 | updated(); |
616 | } | 642 | } |
617 | 643 | ||
618 | void Incidence::removeAlarm(Alarm *alarm) | 644 | void Incidence::removeAlarm(Alarm *alarm) |
619 | { | 645 | { |
620 | mAlarms.removeRef(alarm); | 646 | mAlarms.removeRef(alarm); |
621 | updated(); | 647 | updated(); |
622 | } | 648 | } |
623 | 649 | ||
624 | void Incidence::clearAlarms() | 650 | void Incidence::clearAlarms() |
625 | { | 651 | { |
626 | mAlarms.clear(); | 652 | mAlarms.clear(); |
627 | updated(); | 653 | updated(); |
628 | } | 654 | } |
629 | 655 | ||
630 | bool Incidence::isAlarmEnabled() const | 656 | bool Incidence::isAlarmEnabled() const |
631 | { | 657 | { |
632 | Alarm* alarm; | 658 | Alarm* alarm; |
633 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 659 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |
634 | if (alarm->enabled()) | 660 | if (alarm->enabled()) |
635 | return true; | 661 | return true; |
636 | } | 662 | } |
637 | return false; | 663 | return false; |
638 | } | 664 | } |
639 | 665 | ||
640 | Recurrence *Incidence::recurrence() const | 666 | Recurrence *Incidence::recurrence() const |
641 | { | 667 | { |
642 | return mRecurrence; | 668 | return mRecurrence; |
643 | } | 669 | } |
644 | void Incidence::setRecurrence( Recurrence * r) | 670 | void Incidence::setRecurrence( Recurrence * r) |
645 | { | 671 | { |
646 | delete mRecurrence; | 672 | delete mRecurrence; |
647 | mRecurrence = r; | 673 | mRecurrence = r; |
648 | } | 674 | } |
649 | 675 | ||
650 | void Incidence::setLocation(const QString &location) | 676 | void Incidence::setLocation(const QString &location) |
651 | { | 677 | { |
652 | if (mReadOnly) return; | 678 | if (mReadOnly) return; |
653 | mLocation = location; | 679 | mLocation = location; |
654 | updated(); | 680 | updated(); |
655 | } | 681 | } |
656 | 682 | ||
657 | QString Incidence::location() const | 683 | QString Incidence::location() const |
658 | { | 684 | { |
659 | return mLocation; | 685 | return mLocation; |
660 | } | 686 | } |
661 | 687 | ||
662 | ushort Incidence::doesRecur() const | 688 | ushort Incidence::doesRecur() const |
663 | { | 689 | { |
664 | if ( mRecurrence ) return mRecurrence->doesRecur(); | 690 | if ( mRecurrence ) return mRecurrence->doesRecur(); |
665 | else return Recurrence::rNone; | 691 | else return Recurrence::rNone; |
666 | } | 692 | } |
667 | 693 | ||
668 | QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const | 694 | QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const |
669 | { | 695 | { |
670 | QDateTime incidenceStart = dt; | 696 | QDateTime incidenceStart = dt; |
671 | *ok = false; | 697 | *ok = false; |
672 | if ( doesRecur() ) { | 698 | if ( doesRecur() ) { |
673 | bool last; | 699 | bool last; |
674 | recurrence()->getPreviousDateTime( incidenceStart , &last ); | 700 | recurrence()->getPreviousDateTime( incidenceStart , &last ); |
675 | int count = 0; | 701 | int count = 0; |
676 | if ( !last ) { | 702 | if ( !last ) { |
677 | while ( !last ) { | 703 | while ( !last ) { |
678 | ++count; | 704 | ++count; |
679 | incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last ); | 705 | incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last ); |
680 | if ( recursOn( incidenceStart.date() ) ) { | 706 | if ( recursOn( incidenceStart.date() ) ) { |
681 | last = true; // exit while llop | 707 | last = true; // exit while llop |
682 | } else { | 708 | } else { |
683 | if ( last ) { // no alarm on last recurrence | 709 | if ( last ) { // no alarm on last recurrence |
684 | return QDateTime (); | 710 | return QDateTime (); |
685 | } | 711 | } |
686 | int year = incidenceStart.date().year(); | 712 | int year = incidenceStart.date().year(); |
687 | // workaround for bug in recurrence | 713 | // workaround for bug in recurrence |
688 | if ( count == 100 || year < 1000 || year > 5000 ) { | 714 | if ( count == 100 || year < 1000 || year > 5000 ) { |
689 | return QDateTime (); | 715 | return QDateTime (); |
690 | } | 716 | } |
691 | incidenceStart = incidenceStart.addSecs( 1 ); | 717 | incidenceStart = incidenceStart.addSecs( 1 ); |
692 | } | 718 | } |
693 | } | 719 | } |
694 | } else { | 720 | } else { |
695 | return QDateTime (); | 721 | return QDateTime (); |
696 | } | 722 | } |
697 | } else { | 723 | } else { |
698 | if ( hasStartDate () ) { | 724 | if ( hasStartDate () ) { |
699 | incidenceStart = dtStart(); | 725 | incidenceStart = dtStart(); |
700 | } | 726 | } |
701 | if ( type() =="Todo" ) { | 727 | if ( type() =="Todo" ) { |
702 | if ( ((Todo*)this)->hasDueDate() ) | 728 | if ( ((Todo*)this)->hasDueDate() ) |
703 | incidenceStart = ((Todo*)this)->dtDue(); | 729 | incidenceStart = ((Todo*)this)->dtDue(); |
704 | } | 730 | } |
705 | } | 731 | } |
706 | if ( incidenceStart > dt ) | 732 | if ( incidenceStart > dt ) |
707 | *ok = true; | 733 | *ok = true; |
708 | return incidenceStart; | 734 | return incidenceStart; |
709 | } | 735 | } |
710 | QDateTime Incidence::dtStart() const | 736 | QDateTime Incidence::dtStart() const |
711 | { | 737 | { |
712 | if ( doesRecur() ) { | 738 | if ( doesRecur() ) { |
713 | if ( type() == "Todo" ) { | 739 | if ( type() == "Todo" ) { |
714 | ((Todo*)this)->checkSetCompletedFalse(); | 740 | ((Todo*)this)->checkSetCompletedFalse(); |
715 | } | 741 | } |
716 | } | 742 | } |
717 | return mDtStart; | 743 | return mDtStart; |
718 | } | 744 | } |
diff --git a/libkcal/incidence.h b/libkcal/incidence.h index 327e7dd..ebd50d0 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h | |||
@@ -1,316 +1,317 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | #ifndef INCIDENCE_H | 20 | #ifndef INCIDENCE_H |
21 | #define INCIDENCE_H | 21 | #define INCIDENCE_H |
22 | // | 22 | // |
23 | // Incidence - base class of calendaring components | 23 | // Incidence - base class of calendaring components |
24 | // | 24 | // |
25 | 25 | ||
26 | #include <qdatetime.h> | 26 | #include <qdatetime.h> |
27 | #include <qstringlist.h> | 27 | #include <qstringlist.h> |
28 | #include <qvaluelist.h> | 28 | #include <qvaluelist.h> |
29 | 29 | ||
30 | #include "recurrence.h" | 30 | #include "recurrence.h" |
31 | #include "alarm.h" | 31 | #include "alarm.h" |
32 | #include "attachment.h" | 32 | #include "attachment.h" |
33 | #include "listbase.h" | 33 | #include "listbase.h" |
34 | #include "incidencebase.h" | 34 | #include "incidencebase.h" |
35 | 35 | ||
36 | namespace KCal { | 36 | namespace KCal { |
37 | 37 | ||
38 | class Event; | 38 | class Event; |
39 | class Todo; | 39 | class Todo; |
40 | class Journal; | 40 | class Journal; |
41 | 41 | ||
42 | /** | 42 | /** |
43 | This class provides the base class common to all calendar components. | 43 | This class provides the base class common to all calendar components. |
44 | */ | 44 | */ |
45 | class Incidence : public IncidenceBase | 45 | class Incidence : public IncidenceBase |
46 | { | 46 | { |
47 | public: | 47 | public: |
48 | /** | 48 | /** |
49 | This class provides the interface for a visitor of calendar components. It | 49 | This class provides the interface for a visitor of calendar components. It |
50 | serves as base class for concrete visitors, which implement certain actions on | 50 | serves as base class for concrete visitors, which implement certain actions on |
51 | calendar components. It allows to add functions, which operate on the concrete | 51 | calendar components. It allows to add functions, which operate on the concrete |
52 | types of calendar components, without changing the calendar component classes. | 52 | types of calendar components, without changing the calendar component classes. |
53 | */ | 53 | */ |
54 | class Visitor | 54 | class Visitor |
55 | { | 55 | { |
56 | public: | 56 | public: |
57 | /** Destruct Incidence::Visitor */ | 57 | /** Destruct Incidence::Visitor */ |
58 | virtual ~Visitor() {} | 58 | virtual ~Visitor() {} |
59 | 59 | ||
60 | /** | 60 | /** |
61 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 61 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
62 | on an Event object. | 62 | on an Event object. |
63 | */ | 63 | */ |
64 | virtual bool visit(Event *) { return false; } | 64 | virtual bool visit(Event *) { return false; } |
65 | /** | 65 | /** |
66 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 66 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
67 | on an Todo object. | 67 | on an Todo object. |
68 | */ | 68 | */ |
69 | virtual bool visit(Todo *) { return false; } | 69 | virtual bool visit(Todo *) { return false; } |
70 | /** | 70 | /** |
71 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions | 71 | Reimplement this function in your concrete subclass of IncidenceVisitor to perform actions |
72 | on an Journal object. | 72 | on an Journal object. |
73 | */ | 73 | */ |
74 | virtual bool visit(Journal *) { return false; } | 74 | virtual bool visit(Journal *) { return false; } |
75 | 75 | ||
76 | protected: | 76 | protected: |
77 | /** Constructor is protected to prevent direct creation of visitor base class. */ | 77 | /** Constructor is protected to prevent direct creation of visitor base class. */ |
78 | Visitor() {} | 78 | Visitor() {} |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | This class implements a visitor for adding an Incidence to a resource | 82 | This class implements a visitor for adding an Incidence to a resource |
83 | supporting addEvent(), addTodo() and addJournal() calls. | 83 | supporting addEvent(), addTodo() and addJournal() calls. |
84 | */ | 84 | */ |
85 | template<class T> | 85 | template<class T> |
86 | class AddVisitor : public Visitor | 86 | class AddVisitor : public Visitor |
87 | { | 87 | { |
88 | public: | 88 | public: |
89 | AddVisitor( T *r ) : mResource( r ) {} | 89 | AddVisitor( T *r ) : mResource( r ) {} |
90 | bool visit( Event *e ) { return mResource->addEvent( e ); } | 90 | bool visit( Event *e ) { return mResource->addEvent( e ); } |
91 | bool visit( Todo *t ) { return mResource->addTodo( t ); } | 91 | bool visit( Todo *t ) { return mResource->addTodo( t ); } |
92 | bool visit( Journal *j ) { return mResource->addJournal( j ); } | 92 | bool visit( Journal *j ) { return mResource->addJournal( j ); } |
93 | 93 | ||
94 | private: | 94 | private: |
95 | T *mResource; | 95 | T *mResource; |
96 | }; | 96 | }; |
97 | 97 | ||
98 | /** enumeration for describing an event's secrecy. */ | 98 | /** enumeration for describing an event's secrecy. */ |
99 | enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }; | 99 | enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }; |
100 | typedef ListBase<Incidence> List; | 100 | typedef ListBase<Incidence> List; |
101 | Incidence(); | 101 | Incidence(); |
102 | Incidence(const Incidence &); | 102 | Incidence(const Incidence &); |
103 | ~Incidence(); | 103 | ~Incidence(); |
104 | 104 | ||
105 | /** | 105 | /** |
106 | Accept IncidenceVisitor. A class taking part in the visitor mechanism has to | 106 | Accept IncidenceVisitor. A class taking part in the visitor mechanism has to |
107 | provide this implementation: | 107 | provide this implementation: |
108 | <pre> | 108 | <pre> |
109 | bool accept(Visitor &v) { return v.visit(this); } | 109 | bool accept(Visitor &v) { return v.visit(this); } |
110 | </pre> | 110 | </pre> |
111 | */ | 111 | */ |
112 | virtual bool accept(Visitor &) { return false; } | 112 | virtual bool accept(Visitor &) { return false; } |
113 | 113 | ||
114 | virtual Incidence *clone() = 0; | 114 | virtual Incidence *clone() = 0; |
115 | virtual void cloneRelations( Incidence * ); | 115 | virtual void cloneRelations( Incidence * ); |
116 | 116 | ||
117 | virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; | 117 | virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; |
118 | void setReadOnly( bool ); | 118 | void setReadOnly( bool ); |
119 | 119 | ||
120 | /** | 120 | /** |
121 | Recreate event. The event is made a new unique event, but already stored | 121 | Recreate event. The event is made a new unique event, but already stored |
122 | event information is preserved. Sets uniquie id, creation date, last | 122 | event information is preserved. Sets uniquie id, creation date, last |
123 | modification date and revision number. | 123 | modification date and revision number. |
124 | */ | 124 | */ |
125 | void recreate(); | 125 | void recreate(); |
126 | Incidence* recreateCloneException(QDate); | 126 | Incidence* recreateCloneException(QDate); |
127 | 127 | ||
128 | /** set creation date */ | 128 | /** set creation date */ |
129 | void setCreated(QDateTime); | 129 | void setCreated(QDateTime); |
130 | /** return time and date of creation. */ | 130 | /** return time and date of creation. */ |
131 | QDateTime created() const; | 131 | QDateTime created() const; |
132 | 132 | ||
133 | /** set the number of revisions this event has seen */ | 133 | /** set the number of revisions this event has seen */ |
134 | void setRevision(int rev); | 134 | void setRevision(int rev); |
135 | /** return the number of revisions this event has seen */ | 135 | /** return the number of revisions this event has seen */ |
136 | int revision() const; | 136 | int revision() const; |
137 | 137 | ||
138 | /** Set starting date/time. */ | 138 | /** Set starting date/time. */ |
139 | virtual void setDtStart(const QDateTime &dtStart); | 139 | virtual void setDtStart(const QDateTime &dtStart); |
140 | /** Return the incidence's ending date/time as a QDateTime. */ | 140 | /** Return the incidence's ending date/time as a QDateTime. */ |
141 | virtual QDateTime dtEnd() const { return QDateTime(); } | 141 | virtual QDateTime dtEnd() const { return QDateTime(); } |
142 | 142 | ||
143 | /** sets the event's lengthy description. */ | 143 | /** sets the event's lengthy description. */ |
144 | void setDescription(const QString &description); | 144 | void setDescription(const QString &description); |
145 | /** returns a reference to the event's description. */ | 145 | /** returns a reference to the event's description. */ |
146 | QString description() const; | 146 | QString description() const; |
147 | 147 | ||
148 | /** sets the event's short summary. */ | 148 | /** sets the event's short summary. */ |
149 | void setSummary(const QString &summary); | 149 | void setSummary(const QString &summary); |
150 | /** returns a reference to the event's summary. */ | 150 | /** returns a reference to the event's summary. */ |
151 | QString summary() const; | 151 | QString summary() const; |
152 | 152 | ||
153 | /** set event's applicable categories */ | 153 | /** set event's applicable categories */ |
154 | void setCategories(const QStringList &categories); | 154 | void setCategories(const QStringList &categories, bool setForRelations = false); |
155 | void addCategories(const QStringList &categories, bool addToRelations = false); | ||
155 | /** set event's categories based on a comma delimited string */ | 156 | /** set event's categories based on a comma delimited string */ |
156 | void setCategories(const QString &catStr); | 157 | void setCategories(const QString &catStr); |
157 | /** return categories in a list */ | 158 | /** return categories in a list */ |
158 | QStringList categories() const; | 159 | QStringList categories() const; |
159 | /** return categories as a comma separated string */ | 160 | /** return categories as a comma separated string */ |
160 | QString categoriesStr(); | 161 | QString categoriesStr(); |
161 | QString categoriesStrWithSpace(); | 162 | QString categoriesStrWithSpace(); |
162 | 163 | ||
163 | /** point at some other event to which the event relates. This function should | 164 | /** point at some other event to which the event relates. This function should |
164 | * only be used when constructing a calendar before the related Event | 165 | * only be used when constructing a calendar before the related Event |
165 | * exists. */ | 166 | * exists. */ |
166 | void setRelatedToUid(const QString &); | 167 | void setRelatedToUid(const QString &); |
167 | /** what event does this one relate to? This function should | 168 | /** what event does this one relate to? This function should |
168 | * only be used when constructing a calendar before the related Event | 169 | * only be used when constructing a calendar before the related Event |
169 | * exists. */ | 170 | * exists. */ |
170 | QString relatedToUid() const; | 171 | QString relatedToUid() const; |
171 | /** point at some other event to which the event relates */ | 172 | /** point at some other event to which the event relates */ |
172 | void setRelatedTo(Incidence *relatedTo); | 173 | void setRelatedTo(Incidence *relatedTo); |
173 | /** what event does this one relate to? */ | 174 | /** what event does this one relate to? */ |
174 | Incidence *relatedTo() const; | 175 | Incidence *relatedTo() const; |
175 | /** All events that are related to this event */ | 176 | /** All events that are related to this event */ |
176 | QPtrList<Incidence> relations() const; | 177 | QPtrList<Incidence> relations() const; |
177 | /** Add an event which is related to this event */ | 178 | /** Add an event which is related to this event */ |
178 | void addRelation(Incidence *); | 179 | void addRelation(Incidence *); |
179 | /** Remove event that is related to this event */ | 180 | /** Remove event that is related to this event */ |
180 | void removeRelation(Incidence *); | 181 | void removeRelation(Incidence *); |
181 | 182 | ||
182 | /** returns the list of dates which are exceptions to the recurrence rule */ | 183 | /** returns the list of dates which are exceptions to the recurrence rule */ |
183 | DateList exDates() const; | 184 | DateList exDates() const; |
184 | /** sets the list of dates which are exceptions to the recurrence rule */ | 185 | /** sets the list of dates which are exceptions to the recurrence rule */ |
185 | void setExDates(const DateList &_exDates); | 186 | void setExDates(const DateList &_exDates); |
186 | void setExDates(const char *dates); | 187 | void setExDates(const char *dates); |
187 | /** Add a date to the list of exceptions of the recurrence rule. */ | 188 | /** Add a date to the list of exceptions of the recurrence rule. */ |
188 | void addExDate(const QDate &date); | 189 | void addExDate(const QDate &date); |
189 | 190 | ||
190 | /** returns true if there is an exception for this date in the recurrence | 191 | /** returns true if there is an exception for this date in the recurrence |
191 | rule set, or false otherwise. */ | 192 | rule set, or false otherwise. */ |
192 | bool isException(const QDate &qd) const; | 193 | bool isException(const QDate &qd) const; |
193 | 194 | ||
194 | /** add attachment to this event */ | 195 | /** add attachment to this event */ |
195 | void addAttachment(Attachment *attachment); | 196 | void addAttachment(Attachment *attachment); |
196 | /** remove and delete a specific attachment */ | 197 | /** remove and delete a specific attachment */ |
197 | void deleteAttachment(Attachment *attachment); | 198 | void deleteAttachment(Attachment *attachment); |
198 | /** remove and delete all attachments with this mime type */ | 199 | /** remove and delete all attachments with this mime type */ |
199 | void deleteAttachments(const QString& mime); | 200 | void deleteAttachments(const QString& mime); |
200 | /** return list of all associated attachments */ | 201 | /** return list of all associated attachments */ |
201 | QPtrList<Attachment> attachments() const; | 202 | QPtrList<Attachment> attachments() const; |
202 | /** find a list of attachments with this mime type */ | 203 | /** find a list of attachments with this mime type */ |
203 | QPtrList<Attachment> attachments(const QString& mime) const; | 204 | QPtrList<Attachment> attachments(const QString& mime) const; |
204 | 205 | ||
205 | /** sets the event's status the value specified. See the enumeration | 206 | /** sets the event's status the value specified. See the enumeration |
206 | * above for possible values. */ | 207 | * above for possible values. */ |
207 | void setSecrecy(int); | 208 | void setSecrecy(int); |
208 | /** return the event's secrecy. */ | 209 | /** return the event's secrecy. */ |
209 | int secrecy() const; | 210 | int secrecy() const; |
210 | /** return the event's secrecy in string format. */ | 211 | /** return the event's secrecy in string format. */ |
211 | QString secrecyStr() const; | 212 | QString secrecyStr() const; |
212 | /** return list of all availbale secrecy classes */ | 213 | /** return list of all availbale secrecy classes */ |
213 | static QStringList secrecyList(); | 214 | static QStringList secrecyList(); |
214 | /** return human-readable name of secrecy class */ | 215 | /** return human-readable name of secrecy class */ |
215 | static QString secrecyName(int); | 216 | static QString secrecyName(int); |
216 | 217 | ||
217 | /** returns TRUE if the date specified is one on which the event will | 218 | /** returns TRUE if the date specified is one on which the event will |
218 | * recur. */ | 219 | * recur. */ |
219 | bool recursOn(const QDate &qd) const; | 220 | bool recursOn(const QDate &qd) const; |
220 | 221 | ||
221 | // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): | 222 | // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): |
222 | 223 | ||
223 | /** set resources used, such as Office, Car, etc. */ | 224 | /** set resources used, such as Office, Car, etc. */ |
224 | void setResources(const QStringList &resources); | 225 | void setResources(const QStringList &resources); |
225 | /** return list of current resources */ | 226 | /** return list of current resources */ |
226 | QStringList resources() const; | 227 | QStringList resources() const; |
227 | 228 | ||
228 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ | 229 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ |
229 | void setPriority(int priority); | 230 | void setPriority(int priority); |
230 | /** get the event's priority */ | 231 | /** get the event's priority */ |
231 | int priority() const; | 232 | int priority() const; |
232 | 233 | ||
233 | /** All alarms that are associated with this incidence */ | 234 | /** All alarms that are associated with this incidence */ |
234 | QPtrList<Alarm> alarms() const; | 235 | QPtrList<Alarm> alarms() const; |
235 | /** Create a new alarm which is associated with this incidence */ | 236 | /** Create a new alarm which is associated with this incidence */ |
236 | Alarm* newAlarm(); | 237 | Alarm* newAlarm(); |
237 | /** Add an alarm which is associated with this incidence */ | 238 | /** Add an alarm which is associated with this incidence */ |
238 | void addAlarm(Alarm*); | 239 | void addAlarm(Alarm*); |
239 | /** Remove an alarm that is associated with this incidence */ | 240 | /** Remove an alarm that is associated with this incidence */ |
240 | void removeAlarm(Alarm*); | 241 | void removeAlarm(Alarm*); |
241 | /** Remove all alarms that are associated with this incidence */ | 242 | /** Remove all alarms that are associated with this incidence */ |
242 | void clearAlarms(); | 243 | void clearAlarms(); |
243 | /** return whether any alarm associated with this incidence is enabled */ | 244 | /** return whether any alarm associated with this incidence is enabled */ |
244 | bool isAlarmEnabled() const; | 245 | bool isAlarmEnabled() const; |
245 | 246 | ||
246 | /** | 247 | /** |
247 | Return the recurrence rule associated with this incidence. If there is | 248 | Return the recurrence rule associated with this incidence. If there is |
248 | none, returns an appropriate (non-0) object. | 249 | none, returns an appropriate (non-0) object. |
249 | */ | 250 | */ |
250 | Recurrence *recurrence() const; | 251 | Recurrence *recurrence() const; |
251 | void setRecurrence(Recurrence * r); | 252 | void setRecurrence(Recurrence * r); |
252 | /** | 253 | /** |
253 | Forward to Recurrence::doesRecur(). | 254 | Forward to Recurrence::doesRecur(). |
254 | */ | 255 | */ |
255 | ushort doesRecur() const; | 256 | ushort doesRecur() const; |
256 | 257 | ||
257 | /** set the event's/todo's location. Do _not_ use it with journal */ | 258 | /** set the event's/todo's location. Do _not_ use it with journal */ |
258 | void setLocation(const QString &location); | 259 | void setLocation(const QString &location); |
259 | /** return the event's/todo's location. Do _not_ use it with journal */ | 260 | /** return the event's/todo's location. Do _not_ use it with journal */ |
260 | QString location() const; | 261 | QString location() const; |
261 | /** returns TRUE or FALSE depending on whether the todo has a start date */ | 262 | /** returns TRUE or FALSE depending on whether the todo has a start date */ |
262 | bool hasStartDate() const; | 263 | bool hasStartDate() const; |
263 | /** sets the event's hasStartDate value. */ | 264 | /** sets the event's hasStartDate value. */ |
264 | void setHasStartDate(bool f); | 265 | void setHasStartDate(bool f); |
265 | QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; | 266 | QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; |
266 | bool cancelled() const; | 267 | bool cancelled() const; |
267 | void setCancelled( bool b ); | 268 | void setCancelled( bool b ); |
268 | 269 | ||
269 | bool hasRecurrenceID() const; | 270 | bool hasRecurrenceID() const; |
270 | void setHasRecurrenceID( bool b ); | 271 | void setHasRecurrenceID( bool b ); |
271 | 272 | ||
272 | void setRecurrenceID(QDateTime); | 273 | void setRecurrenceID(QDateTime); |
273 | QDateTime recurrenceID () const; | 274 | QDateTime recurrenceID () const; |
274 | QDateTime dtStart() const; | 275 | QDateTime dtStart() const; |
275 | bool isHoliday() const; | 276 | bool isHoliday() const; |
276 | bool isBirthday() const; | 277 | bool isBirthday() const; |
277 | bool isAnniversary() const; | 278 | bool isAnniversary() const; |
278 | 279 | ||
279 | 280 | ||
280 | protected: | 281 | protected: |
281 | QPtrList<Alarm> mAlarms; | 282 | QPtrList<Alarm> mAlarms; |
282 | QPtrList<Incidence> mRelations; | 283 | QPtrList<Incidence> mRelations; |
283 | QDateTime mRecurrenceID; | 284 | QDateTime mRecurrenceID; |
284 | bool mHasRecurrenceID; | 285 | bool mHasRecurrenceID; |
285 | private: | 286 | private: |
286 | void checkCategories(); | 287 | void checkCategories(); |
287 | bool mHoliday, mBirthday, mAnniversary; | 288 | bool mHoliday, mBirthday, mAnniversary; |
288 | int mRevision; | 289 | int mRevision; |
289 | bool mCancelled; | 290 | bool mCancelled; |
290 | 291 | ||
291 | // base components of jounal, event and todo | 292 | // base components of jounal, event and todo |
292 | QDateTime mCreated; | 293 | QDateTime mCreated; |
293 | QString mDescription; | 294 | QString mDescription; |
294 | QString mSummary; | 295 | QString mSummary; |
295 | QStringList mCategories; | 296 | QStringList mCategories; |
296 | Incidence *mRelatedTo; | 297 | Incidence *mRelatedTo; |
297 | QString mRelatedToUid; | 298 | QString mRelatedToUid; |
298 | DateList mExDates; | 299 | DateList mExDates; |
299 | QPtrList<Attachment> mAttachments; | 300 | QPtrList<Attachment> mAttachments; |
300 | QStringList mResources; | 301 | QStringList mResources; |
301 | bool mHasStartDate; // if todo has associated start date | 302 | bool mHasStartDate; // if todo has associated start date |
302 | 303 | ||
303 | int mSecrecy; | 304 | int mSecrecy; |
304 | int mPriority; // 1 = highest, 2 = less, etc. | 305 | int mPriority; // 1 = highest, 2 = less, etc. |
305 | 306 | ||
306 | //QPtrList<Alarm> mAlarms; | 307 | //QPtrList<Alarm> mAlarms; |
307 | Recurrence *mRecurrence; | 308 | Recurrence *mRecurrence; |
308 | 309 | ||
309 | QString mLocation; | 310 | QString mLocation; |
310 | }; | 311 | }; |
311 | 312 | ||
312 | bool operator==( const Incidence&, const Incidence& ); | 313 | bool operator==( const Incidence&, const Incidence& ); |
313 | 314 | ||
314 | } | 315 | } |
315 | 316 | ||
316 | #endif | 317 | #endif |