-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 6 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 16 | ||||
-rw-r--r-- | libkcal/todo.cpp | 13 | ||||
-rw-r--r-- | libkcal/todo.h | 3 | ||||
-rw-r--r-- | qtcompat/qinputdialog.cpp | 2 |
5 files changed, 33 insertions, 7 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index bba9f87..2cb0132 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -827,547 +827,549 @@ | |||
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","Zeige Sync-Ereignisse" }, | 1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1333 | { " on "," am " }, | 1333 | { " on "," am " }, |
1334 | { "On: ","Am: " }, | 1334 | { "On: ","Am: " }, |
1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1337 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1337 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, | 1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, |
1339 | { "Todo is started","Todo is gestarted" }, | 1339 | { "Todo is started","Todo ist gestartet" }, |
1340 | { "Stop todo","Stoppe Todo" }, | 1340 | { "Stop todo","Stoppe Todo" }, |
1341 | { "Todo is stopped","Todo ist gestoppt" }, | 1341 | { "Todo is stopped","Todo ist gestoppt" }, |
1342 | { "Start todo","Starte Todo" }, | 1342 | { "Start todo","Starte Todo" }, |
1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, | 1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, | 1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, |
1345 | { "Todo has subtodos","Todo hat Untertodos" }, | 1345 | { "Todo has subtodos","Todo hat Untertodos" }, |
1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1347 | { "Colors","Farben" }, | 1347 | { "Colors","Farben" }, |
1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1354 | { "times","Zeiten" }, | 1354 | { "times","Zeiten" }, |
1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, | 1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, |
1356 | { "Backup enabled","Backup angeschaltet" }, | 1356 | { "Backup enabled","Backup angeschaltet" }, |
1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, | 1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, |
1358 | { "Number of Backups:","Anzahl der Backups" }, | 1358 | { "Number of Backups:","Anzahl der Backups" }, |
1359 | { "Make backup every ","Mache ein Backup alle " }, | 1359 | { "Make backup every ","Mache ein Backup alle " }, |
1360 | { " days"," Tage" }, | 1360 | { " days"," Tage" }, |
1361 | { "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, | 1361 | { "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, |
1362 | { "Backup Failed!","Backup Problem!" }, | 1362 | { "Backup Failed!","Backup Problem!" }, |
1363 | { "Try again now","Versuche jetzt nochmal" }, | 1363 | { "Try again now","Versuche jetzt nochmal" }, |
1364 | { "Try again later","Versuche später nochmal" }, | 1364 | { "Try again later","Versuche später nochmal" }, |
1365 | { "Try again tomorrow","Versuche morgen nochmal" }, | 1365 | { "Try again tomorrow","Versuche morgen nochmal" }, |
1366 | { "Disable backup","Schalte Backup ab" }, | 1366 | { "Disable backup","Schalte Backup ab" }, |
1367 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, | 1367 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, |
1368 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, | 1368 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, |
1369 | { "Choose action","Wähle Aktion" }, | 1369 | { "Choose action","Wähle Aktion" }, |
1370 | { "Comment for todo:","Kommentar zum Todo:" }, | ||
1371 | { "Stop+note","Stop+Notiz" }, | ||
1370 | { "","" }, | 1372 | { "","" }, |
1371 | { "","" }, | 1373 | { "","" }, |
1372 | { "","" }, | 1374 | { "","" }, |
1373 | { "","" }, | 1375 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index e95039d..8fe9999 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1,540 +1,542 @@ | |||
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 <qinputdialog.h> | ||
30 | |||
29 | #include <qvbox.h> | 31 | #include <qvbox.h> |
30 | #include <kdebug.h> | 32 | #include <kdebug.h> |
31 | #include "koprefs.h" | 33 | #include "koprefs.h" |
32 | #include <klocale.h> | 34 | #include <klocale.h> |
33 | #include <kglobal.h> | 35 | #include <kglobal.h> |
34 | #include <kiconloader.h> | 36 | #include <kiconloader.h> |
35 | #include <kmessagebox.h> | 37 | #include <kmessagebox.h> |
36 | 38 | ||
37 | #include <libkcal/icaldrag.h> | 39 | #include <libkcal/icaldrag.h> |
38 | #include <libkcal/vcaldrag.h> | 40 | #include <libkcal/vcaldrag.h> |
39 | #include <libkcal/calfilter.h> | 41 | #include <libkcal/calfilter.h> |
40 | #include <libkcal/dndfactory.h> | 42 | #include <libkcal/dndfactory.h> |
41 | #include <libkcal/calendarresources.h> | 43 | #include <libkcal/calendarresources.h> |
42 | #include <libkcal/resourcecalendar.h> | 44 | #include <libkcal/resourcecalendar.h> |
43 | #include <kresources/resourceselectdialog.h> | 45 | #include <kresources/resourceselectdialog.h> |
44 | #include <libkcal/kincidenceformatter.h> | 46 | #include <libkcal/kincidenceformatter.h> |
45 | #ifndef DESKTOP_VERSION | 47 | #ifndef DESKTOP_VERSION |
46 | #include <qpe/qpeapplication.h> | 48 | #include <qpe/qpeapplication.h> |
47 | #else | 49 | #else |
48 | #include <qapplication.h> | 50 | #include <qapplication.h> |
49 | #endif | 51 | #endif |
50 | #ifndef KORG_NOPRINTER | 52 | #ifndef KORG_NOPRINTER |
51 | #include "calprinter.h" | 53 | #include "calprinter.h" |
52 | #endif | 54 | #endif |
53 | #include "docprefs.h" | 55 | #include "docprefs.h" |
54 | 56 | ||
55 | #include "kotodoview.h" | 57 | #include "kotodoview.h" |
56 | using namespace KOrg; | 58 | using namespace KOrg; |
57 | 59 | ||
58 | 60 | ||
59 | class KOTodoViewWhatsThis :public QWhatsThis | 61 | class KOTodoViewWhatsThis :public QWhatsThis |
60 | { | 62 | { |
61 | public: | 63 | public: |
62 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 64 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; |
63 | 65 | ||
64 | protected: | 66 | protected: |
65 | virtual QString text( const QPoint& p) | 67 | virtual QString text( const QPoint& p) |
66 | { | 68 | { |
67 | return _view->getWhatsThisText(p) ; | 69 | return _view->getWhatsThisText(p) ; |
68 | } | 70 | } |
69 | private: | 71 | private: |
70 | QWidget* _wid; | 72 | QWidget* _wid; |
71 | KOTodoView * _view; | 73 | KOTodoView * _view; |
72 | }; | 74 | }; |
73 | 75 | ||
74 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, | 76 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, |
75 | const char *name) : | 77 | const char *name) : |
76 | KListView(parent,name) | 78 | KListView(parent,name) |
77 | { | 79 | { |
78 | mName = QString ( name ); | 80 | mName = QString ( name ); |
79 | mCalendar = calendar; | 81 | mCalendar = calendar; |
80 | #ifndef DESKTOP_VERSION | 82 | #ifndef DESKTOP_VERSION |
81 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 83 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
82 | #endif | 84 | #endif |
83 | mOldCurrent = 0; | 85 | mOldCurrent = 0; |
84 | mMousePressed = false; | 86 | mMousePressed = false; |
85 | 87 | ||
86 | setAcceptDrops(true); | 88 | setAcceptDrops(true); |
87 | viewport()->setAcceptDrops(true); | 89 | viewport()->setAcceptDrops(true); |
88 | int size = 16; | 90 | int size = 16; |
89 | if (qApp->desktop()->width() < 300 ) | 91 | if (qApp->desktop()->width() < 300 ) |
90 | size = 12; | 92 | size = 12; |
91 | setTreeStepSize( size + 6 ); | 93 | setTreeStepSize( size + 6 ); |
92 | 94 | ||
93 | } | 95 | } |
94 | 96 | ||
95 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) | 97 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) |
96 | { | 98 | { |
97 | #ifndef KORG_NODND | 99 | #ifndef KORG_NODND |
98 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; | 100 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; |
99 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 101 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
100 | !QTextDrag::canDecode( e ) ) { | 102 | !QTextDrag::canDecode( e ) ) { |
101 | e->ignore(); | 103 | e->ignore(); |
102 | return; | 104 | return; |
103 | } | 105 | } |
104 | 106 | ||
105 | mOldCurrent = currentItem(); | 107 | mOldCurrent = currentItem(); |
106 | #endif | 108 | #endif |
107 | } | 109 | } |
108 | 110 | ||
109 | 111 | ||
110 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) | 112 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) |
111 | { | 113 | { |
112 | #ifndef KORG_NODND | 114 | #ifndef KORG_NODND |
113 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; | 115 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; |
114 | 116 | ||
115 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 117 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
116 | !QTextDrag::canDecode( e ) ) { | 118 | !QTextDrag::canDecode( e ) ) { |
117 | e->ignore(); | 119 | e->ignore(); |
118 | return; | 120 | return; |
119 | } | 121 | } |
120 | 122 | ||
121 | e->accept(); | 123 | e->accept(); |
122 | #endif | 124 | #endif |
123 | } | 125 | } |
124 | 126 | ||
125 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) | 127 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) |
126 | { | 128 | { |
127 | #ifndef KORG_NODND | 129 | #ifndef KORG_NODND |
128 | // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; | 130 | // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; |
129 | 131 | ||
130 | setCurrentItem(mOldCurrent); | 132 | setCurrentItem(mOldCurrent); |
131 | setSelected(mOldCurrent,true); | 133 | setSelected(mOldCurrent,true); |
132 | #endif | 134 | #endif |
133 | } | 135 | } |
134 | 136 | ||
135 | void KOTodoListView::contentsDropEvent(QDropEvent *e) | 137 | void KOTodoListView::contentsDropEvent(QDropEvent *e) |
136 | { | 138 | { |
137 | #ifndef KORG_NODND | 139 | #ifndef KORG_NODND |
138 | // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; | 140 | // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; |
139 | 141 | ||
140 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 142 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
141 | !QTextDrag::canDecode( e ) ) { | 143 | !QTextDrag::canDecode( e ) ) { |
142 | e->ignore(); | 144 | e->ignore(); |
143 | return; | 145 | return; |
144 | } | 146 | } |
145 | 147 | ||
146 | DndFactory factory( mCalendar ); | 148 | DndFactory factory( mCalendar ); |
147 | Todo *todo = factory.createDropTodo(e); | 149 | Todo *todo = factory.createDropTodo(e); |
148 | 150 | ||
149 | if (todo) { | 151 | if (todo) { |
150 | e->acceptAction(); | 152 | e->acceptAction(); |
151 | 153 | ||
152 | KOTodoViewItem *destination = | 154 | KOTodoViewItem *destination = |
153 | (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); | 155 | (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); |
154 | Todo *destinationEvent = 0; | 156 | Todo *destinationEvent = 0; |
155 | if (destination) destinationEvent = destination->todo(); | 157 | if (destination) destinationEvent = destination->todo(); |
156 | 158 | ||
157 | Todo *existingTodo = mCalendar->todo(todo->uid()); | 159 | Todo *existingTodo = mCalendar->todo(todo->uid()); |
158 | 160 | ||
159 | if(existingTodo) { | 161 | if(existingTodo) { |
160 | Incidence *to = destinationEvent; | 162 | Incidence *to = destinationEvent; |
161 | while(to) { | 163 | while(to) { |
162 | if (to->uid() == todo->uid()) { | 164 | if (to->uid() == todo->uid()) { |
163 | KMessageBox::sorry(this, | 165 | KMessageBox::sorry(this, |
164 | i18n("Cannot move Todo to itself\nor a child of itself"), | 166 | i18n("Cannot move Todo to itself\nor a child of itself"), |
165 | i18n("Drop Todo")); | 167 | i18n("Drop Todo")); |
166 | delete todo; | 168 | delete todo; |
167 | return; | 169 | return; |
168 | } | 170 | } |
169 | to = to->relatedTo(); | 171 | to = to->relatedTo(); |
170 | } | 172 | } |
171 | internalDrop = true; | 173 | internalDrop = true; |
172 | if ( destinationEvent ) | 174 | if ( destinationEvent ) |
173 | reparentTodoSignal( destinationEvent, existingTodo ); | 175 | reparentTodoSignal( destinationEvent, existingTodo ); |
174 | else | 176 | else |
175 | unparentTodoSignal(existingTodo); | 177 | unparentTodoSignal(existingTodo); |
176 | delete todo; | 178 | delete todo; |
177 | } else { | 179 | } else { |
178 | mCalendar->addTodo(todo); | 180 | mCalendar->addTodo(todo); |
179 | emit todoDropped(todo, KOGlobals::EVENTADDED); | 181 | emit todoDropped(todo, KOGlobals::EVENTADDED); |
180 | if ( destinationEvent ) | 182 | if ( destinationEvent ) |
181 | reparentTodoSignal( destinationEvent, todo ); | 183 | reparentTodoSignal( destinationEvent, todo ); |
182 | } | 184 | } |
183 | } | 185 | } |
184 | else { | 186 | else { |
185 | QString text; | 187 | QString text; |
186 | if (QTextDrag::decode(e,text)) { | 188 | if (QTextDrag::decode(e,text)) { |
187 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); | 189 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); |
188 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); | 190 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); |
189 | qDebug("Dropped : " + text); | 191 | qDebug("Dropped : " + text); |
190 | QStringList emails = QStringList::split(",",text); | 192 | QStringList emails = QStringList::split(",",text); |
191 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { | 193 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { |
192 | int pos = (*it).find("<"); | 194 | int pos = (*it).find("<"); |
193 | QString name = (*it).left(pos); | 195 | QString name = (*it).left(pos); |
194 | QString email = (*it).mid(pos); | 196 | QString email = (*it).mid(pos); |
195 | if (!email.isEmpty() && todoi) { | 197 | if (!email.isEmpty() && todoi) { |
196 | todoi->todo()->addAttendee(new Attendee(name,email)); | 198 | todoi->todo()->addAttendee(new Attendee(name,email)); |
197 | } | 199 | } |
198 | } | 200 | } |
199 | } | 201 | } |
200 | else { | 202 | else { |
201 | qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); | 203 | qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); |
202 | e->ignore(); | 204 | e->ignore(); |
203 | } | 205 | } |
204 | } | 206 | } |
205 | #endif | 207 | #endif |
206 | } | 208 | } |
207 | void KOTodoListView::wheelEvent (QWheelEvent *e) | 209 | void KOTodoListView::wheelEvent (QWheelEvent *e) |
208 | { | 210 | { |
209 | QListView::wheelEvent (e); | 211 | QListView::wheelEvent (e); |
210 | } | 212 | } |
211 | 213 | ||
212 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | 214 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) |
213 | { | 215 | { |
214 | 216 | ||
215 | QPoint p(contentsToViewport(e->pos())); | 217 | QPoint p(contentsToViewport(e->pos())); |
216 | QListViewItem *i = itemAt(p); | 218 | QListViewItem *i = itemAt(p); |
217 | bool rootClicked = true; | 219 | bool rootClicked = true; |
218 | if (i) { | 220 | if (i) { |
219 | // if the user clicked into the root decoration of the item, don't | 221 | // if the user clicked into the root decoration of the item, don't |
220 | // try to start a drag! | 222 | // try to start a drag! |
221 | int X = p.x(); | 223 | int X = p.x(); |
222 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); | 224 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); |
223 | if (X > header()->sectionPos(0) + | 225 | if (X > header()->sectionPos(0) + |
224 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + | 226 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + |
225 | itemMargin() +i->height()|| | 227 | itemMargin() +i->height()|| |
226 | X < header()->sectionPos(0)) { | 228 | X < header()->sectionPos(0)) { |
227 | rootClicked = false; | 229 | rootClicked = false; |
228 | } | 230 | } |
229 | } else { | 231 | } else { |
230 | rootClicked = false; | 232 | rootClicked = false; |
231 | } | 233 | } |
232 | #ifndef KORG_NODND | 234 | #ifndef KORG_NODND |
233 | mMousePressed = false; | 235 | mMousePressed = false; |
234 | if (! rootClicked && !( e->button() == RightButton) ) { | 236 | if (! rootClicked && !( e->button() == RightButton) ) { |
235 | mPressPos = e->pos(); | 237 | mPressPos = e->pos(); |
236 | mMousePressed = true; | 238 | mMousePressed = true; |
237 | } else { | 239 | } else { |
238 | mMousePressed = false; | 240 | mMousePressed = false; |
239 | } | 241 | } |
240 | #endif | 242 | #endif |
241 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); | 243 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); |
242 | #ifndef DESKTOP_VERSION | 244 | #ifndef DESKTOP_VERSION |
243 | if (!( e->button() == RightButton && rootClicked) ) | 245 | if (!( e->button() == RightButton && rootClicked) ) |
244 | QListView::contentsMousePressEvent(e); | 246 | QListView::contentsMousePressEvent(e); |
245 | #else | 247 | #else |
246 | QListView::contentsMousePressEvent(e); | 248 | QListView::contentsMousePressEvent(e); |
247 | #endif | 249 | #endif |
248 | } | 250 | } |
249 | void KOTodoListView::paintEvent(QPaintEvent* e) | 251 | void KOTodoListView::paintEvent(QPaintEvent* e) |
250 | { | 252 | { |
251 | emit paintNeeded(); | 253 | emit paintNeeded(); |
252 | QListView::paintEvent( e); | 254 | QListView::paintEvent( e); |
253 | } | 255 | } |
254 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | 256 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) |
255 | { | 257 | { |
256 | 258 | ||
257 | #ifndef KORG_NODND | 259 | #ifndef KORG_NODND |
258 | //QListView::contentsMouseMoveEvent(e); | 260 | //QListView::contentsMouseMoveEvent(e); |
259 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > | 261 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > |
260 | QApplication::startDragDistance()*3) { | 262 | QApplication::startDragDistance()*3) { |
261 | mMousePressed = false; | 263 | mMousePressed = false; |
262 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); | 264 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); |
263 | if (item) { | 265 | if (item) { |
264 | DndFactory factory( mCalendar ); | 266 | DndFactory factory( mCalendar ); |
265 | ICalDrag *vd = factory.createDrag( | 267 | ICalDrag *vd = factory.createDrag( |
266 | ((KOTodoViewItem *)item)->todo(),viewport()); | 268 | ((KOTodoViewItem *)item)->todo(),viewport()); |
267 | internalDrop = false; | 269 | internalDrop = false; |
268 | // we cannot do any senseful here, because the DnD is still broken in Qt | 270 | // we cannot do any senseful here, because the DnD is still broken in Qt |
269 | if (vd->drag()) { | 271 | if (vd->drag()) { |
270 | if ( !internalDrop ) { | 272 | if ( !internalDrop ) { |
271 | //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); | 273 | //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); |
272 | qDebug("Dnd: External move: Delete drag source "); | 274 | qDebug("Dnd: External move: Delete drag source "); |
273 | } else | 275 | } else |
274 | qDebug("Dnd: Internal move "); | 276 | qDebug("Dnd: Internal move "); |
275 | 277 | ||
276 | } else { | 278 | } else { |
277 | if ( !internalDrop ) { | 279 | if ( !internalDrop ) { |
278 | qDebug("Dnd: External Copy"); | 280 | qDebug("Dnd: External Copy"); |
279 | } else | 281 | } else |
280 | qDebug("DnD: Internal copy: Copy pending"); | 282 | qDebug("DnD: Internal copy: Copy pending"); |
281 | } | 283 | } |
282 | } | 284 | } |
283 | } | 285 | } |
284 | #endif | 286 | #endif |
285 | } | 287 | } |
286 | void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) | 288 | void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) |
287 | { | 289 | { |
288 | if ( !e->isAutoRepeat() ) { | 290 | if ( !e->isAutoRepeat() ) { |
289 | mFlagKeyPressed = false; | 291 | mFlagKeyPressed = false; |
290 | } | 292 | } |
291 | } | 293 | } |
292 | 294 | ||
293 | 295 | ||
294 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | 296 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) |
295 | { | 297 | { |
296 | qApp->processEvents(); | 298 | qApp->processEvents(); |
297 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 299 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
298 | e->ignore(); | 300 | e->ignore(); |
299 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 301 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
300 | return; | 302 | return; |
301 | } | 303 | } |
302 | if (! e->isAutoRepeat() ) | 304 | if (! e->isAutoRepeat() ) |
303 | mFlagKeyPressed = true; | 305 | mFlagKeyPressed = true; |
304 | QListViewItem* cn; | 306 | QListViewItem* cn; |
305 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { | 307 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { |
306 | cn = currentItem(); | 308 | cn = currentItem(); |
307 | if ( cn ) { | 309 | if ( cn ) { |
308 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 310 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
309 | if ( ci ){ | 311 | if ( ci ){ |
310 | if ( e->state() == ShiftButton ) | 312 | if ( e->state() == ShiftButton ) |
311 | ci->setOn( false ); | 313 | ci->setOn( false ); |
312 | else | 314 | else |
313 | ci->setOn( true ); | 315 | ci->setOn( true ); |
314 | cn = cn->itemBelow(); | 316 | cn = cn->itemBelow(); |
315 | if ( cn ) { | 317 | if ( cn ) { |
316 | setCurrentItem ( cn ); | 318 | setCurrentItem ( cn ); |
317 | ensureItemVisible ( cn ); | 319 | ensureItemVisible ( cn ); |
318 | } | 320 | } |
319 | 321 | ||
320 | } | 322 | } |
321 | } | 323 | } |
322 | 324 | ||
323 | return; | 325 | return; |
324 | } | 326 | } |
325 | 327 | ||
326 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { | 328 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { |
327 | switch ( e->key() ) { | 329 | switch ( e->key() ) { |
328 | case Qt::Key_Down: | 330 | case Qt::Key_Down: |
329 | case Qt::Key_Up: | 331 | case Qt::Key_Up: |
330 | QListView::keyPressEvent ( e ); | 332 | QListView::keyPressEvent ( e ); |
331 | break; | 333 | break; |
332 | case Qt::Key_Left: | 334 | case Qt::Key_Left: |
333 | case Qt::Key_Right: | 335 | case Qt::Key_Right: |
334 | QListView::keyPressEvent ( e ); | 336 | QListView::keyPressEvent ( e ); |
335 | e->accept(); | 337 | e->accept(); |
336 | return; | 338 | return; |
337 | break; | 339 | break; |
338 | default: | 340 | default: |
339 | e->ignore(); | 341 | e->ignore(); |
340 | break; | 342 | break; |
341 | } | 343 | } |
342 | return; | 344 | return; |
343 | } | 345 | } |
344 | e->ignore(); | 346 | e->ignore(); |
345 | } | 347 | } |
346 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) | 348 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) |
347 | { | 349 | { |
348 | QListView::contentsMouseReleaseEvent(e); | 350 | QListView::contentsMouseReleaseEvent(e); |
349 | mMousePressed = false; | 351 | mMousePressed = false; |
350 | } | 352 | } |
351 | 353 | ||
352 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 354 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
353 | { | 355 | { |
354 | if (!e) return; | 356 | if (!e) return; |
355 | 357 | ||
356 | QPoint vp = contentsToViewport(e->pos()); | 358 | QPoint vp = contentsToViewport(e->pos()); |
357 | 359 | ||
358 | QListViewItem *item = itemAt(vp); | 360 | QListViewItem *item = itemAt(vp); |
359 | 361 | ||
360 | emit double_Clicked(item); | 362 | emit double_Clicked(item); |
361 | if (!item) return; | 363 | if (!item) return; |
362 | 364 | ||
363 | emit doubleClicked(item,vp,0); | 365 | emit doubleClicked(item,vp,0); |
364 | } | 366 | } |
365 | 367 | ||
366 | ///////////////////////////////////////////////////////////////////////////// | 368 | ///////////////////////////////////////////////////////////////////////////// |
367 | 369 | ||
368 | KOQuickTodo::KOQuickTodo(QWidget *parent) : | 370 | KOQuickTodo::KOQuickTodo(QWidget *parent) : |
369 | QLineEdit(parent) | 371 | QLineEdit(parent) |
370 | { | 372 | { |
371 | setText(i18n("Click to add a new Todo")); | 373 | setText(i18n("Click to add a new Todo")); |
372 | } | 374 | } |
373 | 375 | ||
374 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) | 376 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) |
375 | { | 377 | { |
376 | if ( text()==i18n("Click to add a new Todo") ) | 378 | if ( text()==i18n("Click to add a new Todo") ) |
377 | setText(""); | 379 | setText(""); |
378 | QLineEdit::focusInEvent(ev); | 380 | QLineEdit::focusInEvent(ev); |
379 | } | 381 | } |
380 | 382 | ||
381 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | 383 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) |
382 | { | 384 | { |
383 | setText(i18n("Click to add a new Todo")); | 385 | setText(i18n("Click to add a new Todo")); |
384 | QLineEdit::focusOutEvent(ev); | 386 | QLineEdit::focusOutEvent(ev); |
385 | } | 387 | } |
386 | 388 | ||
387 | ///////////////////////////////////////////////////////////////////////////// | 389 | ///////////////////////////////////////////////////////////////////////////// |
388 | 390 | ||
389 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 391 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
390 | KOrg::BaseView(calendar,parent,name) | 392 | KOrg::BaseView(calendar,parent,name) |
391 | { | 393 | { |
392 | mPendingUpdateBeforeRepaint = false; | 394 | mPendingUpdateBeforeRepaint = false; |
393 | isFlatDisplay = false; | 395 | isFlatDisplay = false; |
394 | mNavigator = 0; | 396 | mNavigator = 0; |
395 | QBoxLayout *topLayout = new QVBoxLayout(this); | 397 | QBoxLayout *topLayout = new QVBoxLayout(this); |
396 | mName = QString ( name ); | 398 | mName = QString ( name ); |
397 | mBlockUpdate = false; | 399 | mBlockUpdate = false; |
398 | mQuickAdd = new KOQuickTodo(this); | 400 | mQuickAdd = new KOQuickTodo(this); |
399 | topLayout->addWidget(mQuickAdd); | 401 | topLayout->addWidget(mQuickAdd); |
400 | 402 | ||
401 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); | 403 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); |
402 | 404 | ||
403 | mTodoListView = new KOTodoListView(calendar,this, name ); | 405 | mTodoListView = new KOTodoListView(calendar,this, name ); |
404 | topLayout->addWidget(mTodoListView); | 406 | topLayout->addWidget(mTodoListView); |
405 | //mTodoListView->header()->setMaximumHeight(30); | 407 | //mTodoListView->header()->setMaximumHeight(30); |
406 | mTodoListView->setRootIsDecorated(true); | 408 | mTodoListView->setRootIsDecorated(true); |
407 | mTodoListView->setAllColumnsShowFocus(true); | 409 | mTodoListView->setAllColumnsShowFocus(true); |
408 | 410 | ||
409 | mTodoListView->setShowSortIndicator(true); | 411 | mTodoListView->setShowSortIndicator(true); |
410 | 412 | ||
411 | mTodoListView->addColumn(i18n("Todo")); | 413 | mTodoListView->addColumn(i18n("Todo")); |
412 | mTodoListView->addColumn(i18n("Prio")); | 414 | mTodoListView->addColumn(i18n("Prio")); |
413 | mTodoListView->setColumnAlignment(1,AlignHCenter); | 415 | mTodoListView->setColumnAlignment(1,AlignHCenter); |
414 | mTodoListView->addColumn(i18n("Complete")); | 416 | mTodoListView->addColumn(i18n("Complete")); |
415 | mTodoListView->setColumnAlignment(2,AlignCenter); | 417 | mTodoListView->setColumnAlignment(2,AlignCenter); |
416 | 418 | ||
417 | mTodoListView->addColumn(i18n("Due Date")); | 419 | mTodoListView->addColumn(i18n("Due Date")); |
418 | mTodoListView->setColumnAlignment(3,AlignLeft); | 420 | mTodoListView->setColumnAlignment(3,AlignLeft); |
419 | mTodoListView->addColumn(i18n("Due Time")); | 421 | mTodoListView->addColumn(i18n("Due Time")); |
420 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 422 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
421 | 423 | ||
422 | mTodoListView->addColumn(i18n("Start Date")); | 424 | mTodoListView->addColumn(i18n("Start Date")); |
423 | mTodoListView->setColumnAlignment(5,AlignLeft); | 425 | mTodoListView->setColumnAlignment(5,AlignLeft); |
424 | mTodoListView->addColumn(i18n("Start Time")); | 426 | mTodoListView->addColumn(i18n("Start Time")); |
425 | mTodoListView->setColumnAlignment(6,AlignHCenter); | 427 | mTodoListView->setColumnAlignment(6,AlignHCenter); |
426 | 428 | ||
427 | mTodoListView->addColumn(i18n("Cancelled")); | 429 | mTodoListView->addColumn(i18n("Cancelled")); |
428 | mTodoListView->addColumn(i18n("Categories")); | 430 | mTodoListView->addColumn(i18n("Categories")); |
429 | #if 0 | 431 | #if 0 |
430 | mTodoListView->addColumn(i18n("Sort Id")); | 432 | mTodoListView->addColumn(i18n("Sort Id")); |
431 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 433 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
432 | #endif | 434 | #endif |
433 | 435 | ||
434 | mTodoListView->setMinimumHeight( 60 ); | 436 | mTodoListView->setMinimumHeight( 60 ); |
435 | mTodoListView->setItemsRenameable( true ); | 437 | mTodoListView->setItemsRenameable( true ); |
436 | mTodoListView->setRenameable( 0 ); | 438 | mTodoListView->setRenameable( 0 ); |
437 | mTodoListView->setColumnWidth( 0, 120 ); | 439 | mTodoListView->setColumnWidth( 0, 120 ); |
438 | mTodoListView->setColumnWidthMode(0, QListView::Manual); | 440 | mTodoListView->setColumnWidthMode(0, QListView::Manual); |
439 | mTodoListView->setColumnWidthMode(1, QListView::Manual); | 441 | mTodoListView->setColumnWidthMode(1, QListView::Manual); |
440 | mTodoListView->setColumnWidthMode(2, QListView::Manual); | 442 | mTodoListView->setColumnWidthMode(2, QListView::Manual); |
441 | mTodoListView->setColumnWidthMode(3, QListView::Manual); | 443 | mTodoListView->setColumnWidthMode(3, QListView::Manual); |
442 | mTodoListView->setColumnWidthMode(4, QListView::Manual); | 444 | mTodoListView->setColumnWidthMode(4, QListView::Manual); |
443 | mTodoListView->setColumnWidthMode(5, QListView::Manual); | 445 | mTodoListView->setColumnWidthMode(5, QListView::Manual); |
444 | mTodoListView->setColumnWidthMode(6, QListView::Manual); | 446 | mTodoListView->setColumnWidthMode(6, QListView::Manual); |
445 | mTodoListView->setColumnWidthMode(7, QListView::Manual); | 447 | mTodoListView->setColumnWidthMode(7, QListView::Manual); |
446 | mTodoListView->setColumnWidthMode(8, QListView::Manual); | 448 | mTodoListView->setColumnWidthMode(8, QListView::Manual); |
447 | 449 | ||
448 | 450 | ||
449 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); | 451 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); |
450 | 452 | ||
451 | mPriorityPopupMenu = new QPopupMenu(this); | 453 | mPriorityPopupMenu = new QPopupMenu(this); |
452 | for (int i = 1; i <= 5; i++) { | 454 | for (int i = 1; i <= 5; i++) { |
453 | QString label = QString ("%1").arg (i); | 455 | QString label = QString ("%1").arg (i); |
454 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; | 456 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; |
455 | } | 457 | } |
456 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); | 458 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); |
457 | 459 | ||
458 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 460 | mPercentageCompletedPopupMenu = new QPopupMenu(this); |
459 | for (int i = 0; i <= 100; i+=20) { | 461 | for (int i = 0; i <= 100; i+=20) { |
460 | QString label = QString ("%1 %").arg (i); | 462 | QString label = QString ("%1 %").arg (i); |
461 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; | 463 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; |
462 | } | 464 | } |
463 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); | 465 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); |
464 | 466 | ||
465 | 467 | ||
466 | 468 | ||
467 | mItemPopupMenu = new QPopupMenu(this); | 469 | mItemPopupMenu = new QPopupMenu(this); |
468 | mItemPopupMenu->insertItem(i18n("Show..."), this, | 470 | mItemPopupMenu->insertItem(i18n("Show..."), this, |
469 | SLOT (showTodo())); | 471 | SLOT (showTodo())); |
470 | mItemPopupMenu->insertItem(i18n("Edit..."), this, | 472 | mItemPopupMenu->insertItem(i18n("Edit..."), this, |
471 | SLOT (editTodo())); | 473 | SLOT (editTodo())); |
472 | mItemPopupMenu->insertItem( i18n("Delete"), this, | 474 | mItemPopupMenu->insertItem( i18n("Delete"), this, |
473 | SLOT (deleteTodo())); | 475 | SLOT (deleteTodo())); |
474 | mItemPopupMenu->insertItem( i18n("Clone..."), this, | 476 | mItemPopupMenu->insertItem( i18n("Clone..."), this, |
475 | SLOT (cloneTodo())); | 477 | SLOT (cloneTodo())); |
476 | mItemPopupMenu->insertItem( i18n("Move..."), this, | 478 | mItemPopupMenu->insertItem( i18n("Move..."), this, |
477 | SLOT (moveTodo())); | 479 | SLOT (moveTodo())); |
478 | mItemPopupMenu->insertItem( i18n("Beam..."), this, | 480 | mItemPopupMenu->insertItem( i18n("Beam..."), this, |
479 | SLOT (beamTodo())); | 481 | SLOT (beamTodo())); |
480 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, | 482 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, |
481 | SLOT (cancelTodo())); | 483 | SLOT (cancelTodo())); |
482 | mItemPopupMenu->insertSeparator(); | 484 | mItemPopupMenu->insertSeparator(); |
483 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, | 485 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, |
484 | SLOT (toggleRunningItem())); | 486 | SLOT (toggleRunningItem())); |
485 | mItemPopupMenu->insertSeparator(); | 487 | mItemPopupMenu->insertSeparator(); |
486 | /* | 488 | /* |
487 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, | 489 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, |
488 | SLOT (newTodo())); | 490 | SLOT (newTodo())); |
489 | */ | 491 | */ |
490 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, | 492 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, |
491 | SLOT (newSubTodo())); | 493 | SLOT (newSubTodo())); |
492 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, | 494 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, |
493 | SLOT (unparentTodo()),0,21); | 495 | SLOT (unparentTodo()),0,21); |
494 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, | 496 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, |
495 | SLOT (reparentTodo()),0,22); | 497 | SLOT (reparentTodo()),0,22); |
496 | mItemPopupMenu->insertSeparator(); | 498 | mItemPopupMenu->insertSeparator(); |
497 | #if 0 | 499 | #if 0 |
498 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), | 500 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), |
499 | this, SLOT( purgeCompleted() ) ); | 501 | this, SLOT( purgeCompleted() ) ); |
500 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), | 502 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), |
501 | this, SLOT( toggleCompleted() ),0, 33 ); | 503 | this, SLOT( toggleCompleted() ),0, 33 ); |
502 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 504 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
503 | this, SLOT( toggleQuickTodo() ),0, 34 ); | 505 | this, SLOT( toggleQuickTodo() ),0, 34 ); |
504 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 506 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
505 | this, SLOT( toggleRunning() ),0, 35 ); | 507 | this, SLOT( toggleRunning() ),0, 35 ); |
506 | 508 | ||
507 | #endif | 509 | #endif |
508 | mPopupMenu = new QPopupMenu(this); | 510 | mPopupMenu = new QPopupMenu(this); |
509 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, | 511 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, |
510 | SLOT (newTodo()),0,1); | 512 | SLOT (newTodo()),0,1); |
511 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), | 513 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), |
512 | this, SLOT(purgeCompleted()),0,2); | 514 | this, SLOT(purgeCompleted()),0,2); |
513 | mPopupMenu->insertItem(i18n("Show Completed"), | 515 | mPopupMenu->insertItem(i18n("Show Completed"), |
514 | this, SLOT( toggleCompleted() ),0,3 ); | 516 | this, SLOT( toggleCompleted() ),0,3 ); |
515 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 517 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
516 | this, SLOT( toggleRunning() ),0,5 ); | 518 | this, SLOT( toggleRunning() ),0,5 ); |
517 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), | 519 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), |
518 | this, SLOT( setAllOpen() ),0,6 ); | 520 | this, SLOT( setAllOpen() ),0,6 ); |
519 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), | 521 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), |
520 | this, SLOT( setAllClose() ),0,7 ); | 522 | this, SLOT( setAllClose() ),0,7 ); |
521 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), | 523 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), |
522 | this, SLOT( setAllFlat() ),0,8 ); | 524 | this, SLOT( setAllFlat() ),0,8 ); |
523 | mPopupMenu->insertSeparator(); | 525 | mPopupMenu->insertSeparator(); |
524 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 526 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
525 | this, SLOT( toggleQuickTodo() ),0,4 ); | 527 | this, SLOT( toggleQuickTodo() ),0,4 ); |
526 | mDocPrefs = new DocPrefs( name ); | 528 | mDocPrefs = new DocPrefs( name ); |
527 | 529 | ||
528 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); | 530 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); |
529 | mPopupMenu->setCheckable( true ); | 531 | mPopupMenu->setCheckable( true ); |
530 | mItemPopupMenu->setCheckable( true ); | 532 | mItemPopupMenu->setCheckable( true ); |
531 | 533 | ||
532 | 534 | ||
533 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 535 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
534 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 536 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
535 | 537 | ||
536 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 538 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
537 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 539 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
538 | 540 | ||
539 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 541 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
540 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 542 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
@@ -617,835 +619,845 @@ void KOTodoView::jumpToDate () | |||
617 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); | 619 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); |
618 | } | 620 | } |
619 | void KOTodoView::paintNeeded() | 621 | void KOTodoView::paintNeeded() |
620 | { | 622 | { |
621 | if ( mPendingUpdateBeforeRepaint ) { | 623 | if ( mPendingUpdateBeforeRepaint ) { |
622 | updateView(); | 624 | updateView(); |
623 | mPendingUpdateBeforeRepaint = false; | 625 | mPendingUpdateBeforeRepaint = false; |
624 | } | 626 | } |
625 | } | 627 | } |
626 | void KOTodoView::paintEvent(QPaintEvent * pevent) | 628 | void KOTodoView::paintEvent(QPaintEvent * pevent) |
627 | { | 629 | { |
628 | if ( mPendingUpdateBeforeRepaint ) { | 630 | if ( mPendingUpdateBeforeRepaint ) { |
629 | updateView(); | 631 | updateView(); |
630 | mPendingUpdateBeforeRepaint = false; | 632 | mPendingUpdateBeforeRepaint = false; |
631 | } | 633 | } |
632 | KOrg::BaseView::paintEvent( pevent); | 634 | KOrg::BaseView::paintEvent( pevent); |
633 | } | 635 | } |
634 | 636 | ||
635 | void KOTodoView::updateView() | 637 | void KOTodoView::updateView() |
636 | { | 638 | { |
637 | pendingSubtodo = 0; | 639 | pendingSubtodo = 0; |
638 | if ( mBlockUpdate ) { | 640 | if ( mBlockUpdate ) { |
639 | return; | 641 | return; |
640 | } | 642 | } |
641 | if ( !isVisible() ) { | 643 | if ( !isVisible() ) { |
642 | mPendingUpdateBeforeRepaint = true; | 644 | mPendingUpdateBeforeRepaint = true; |
643 | return; | 645 | return; |
644 | } | 646 | } |
645 | storeCurrentItem(); | 647 | storeCurrentItem(); |
646 | //qDebug("KOTodoView::updateView() %x", this); | 648 | //qDebug("KOTodoView::updateView() %x", this); |
647 | if ( isFlatDisplay ) { | 649 | if ( isFlatDisplay ) { |
648 | displayAllFlat(); | 650 | displayAllFlat(); |
649 | resetCurrentItem(); | 651 | resetCurrentItem(); |
650 | return; | 652 | return; |
651 | } | 653 | } |
652 | //qDebug("update "); | 654 | //qDebug("update "); |
653 | // kdDebug() << "KOTodoView::updateView()" << endl; | 655 | // kdDebug() << "KOTodoView::updateView()" << endl; |
654 | QFont fo = KOPrefs::instance()->mTodoViewFont; | 656 | QFont fo = KOPrefs::instance()->mTodoViewFont; |
655 | 657 | ||
656 | 658 | ||
657 | mTodoListView->clear(); | 659 | mTodoListView->clear(); |
658 | if ( mName == "todolistsmall" ) { | 660 | if ( mName == "todolistsmall" ) { |
659 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { | 661 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { |
660 | int ps = fo.pointSize() -2; | 662 | int ps = fo.pointSize() -2; |
661 | if ( ps > 12 ) | 663 | if ( ps > 12 ) |
662 | ps -= 2; | 664 | ps -= 2; |
663 | fo.setPointSize( ps ); | 665 | fo.setPointSize( ps ); |
664 | } | 666 | } |
665 | } | 667 | } |
666 | 668 | ||
667 | mTodoListView->setFont( fo ); | 669 | mTodoListView->setFont( fo ); |
668 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); | 670 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); |
669 | //mTodoListView->header()->setMaximumHeight(fm.height()); | 671 | //mTodoListView->header()->setMaximumHeight(fm.height()); |
670 | QPtrList<Todo> todoList = calendar()->todos(); | 672 | QPtrList<Todo> todoList = calendar()->todos(); |
671 | 673 | ||
672 | /* | 674 | /* |
673 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; | 675 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; |
674 | Event *t; | 676 | Event *t; |
675 | for(t = todoList.first(); t; t = todoList.next()) { | 677 | for(t = todoList.first(); t; t = todoList.next()) { |
676 | kdDebug() << " " << t->getSummary() << endl; | 678 | kdDebug() << " " << t->getSummary() << endl; |
677 | 679 | ||
678 | if (t->getRelatedTo()) { | 680 | if (t->getRelatedTo()) { |
679 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; | 681 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; |
680 | } | 682 | } |
681 | 683 | ||
682 | QPtrList<Event> l = t->getRelations(); | 684 | QPtrList<Event> l = t->getRelations(); |
683 | Event *c; | 685 | Event *c; |
684 | for(c=l.first();c;c=l.next()) { | 686 | for(c=l.first();c;c=l.next()) { |
685 | kdDebug() << " - relation: " << c->getSummary() << endl; | 687 | kdDebug() << " - relation: " << c->getSummary() << endl; |
686 | } | 688 | } |
687 | } | 689 | } |
688 | */ | 690 | */ |
689 | 691 | ||
690 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a | 692 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a |
691 | // specific order of events. That means that we have to generate parent items | 693 | // specific order of events. That means that we have to generate parent items |
692 | // recursively for proper hierarchical display of Todos. | 694 | // recursively for proper hierarchical display of Todos. |
693 | mTodoMap.clear(); | 695 | mTodoMap.clear(); |
694 | Todo *todo; | 696 | Todo *todo; |
695 | todo = todoList.first();// todo; todo = todoList.next()) { | 697 | todo = todoList.first();// todo; todo = todoList.next()) { |
696 | while ( todo ) { | 698 | while ( todo ) { |
697 | bool next = true; | 699 | bool next = true; |
698 | // qDebug("todo %s ", todo->summary().latin1()); | 700 | // qDebug("todo %s ", todo->summary().latin1()); |
699 | Incidence *incidence = todo->relatedTo(); | 701 | Incidence *incidence = todo->relatedTo(); |
700 | while ( incidence ) { | 702 | while ( incidence ) { |
701 | if ( incidence->type() == "Todo") { | 703 | if ( incidence->type() == "Todo") { |
702 | //qDebug("related %s ",incidence->summary().latin1() ); | 704 | //qDebug("related %s ",incidence->summary().latin1() ); |
703 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { | 705 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { |
704 | //qDebug("related not found "); | 706 | //qDebug("related not found "); |
705 | todoList.remove( ); | 707 | todoList.remove( ); |
706 | todo = todoList.current(); | 708 | todo = todoList.current(); |
707 | next = false; | 709 | next = false; |
708 | incidence = 0; | 710 | incidence = 0; |
709 | 711 | ||
710 | } else { | 712 | } else { |
711 | //qDebug("related found "); | 713 | //qDebug("related found "); |
712 | incidence = incidence->relatedTo(); | 714 | incidence = incidence->relatedTo(); |
713 | } | 715 | } |
714 | } else | 716 | } else |
715 | incidence = 0; | 717 | incidence = 0; |
716 | } | 718 | } |
717 | if ( next ) | 719 | if ( next ) |
718 | todo = todoList.next(); | 720 | todo = todoList.next(); |
719 | } | 721 | } |
720 | 722 | ||
721 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 723 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
722 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) | 724 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) |
723 | { | 725 | { |
724 | insertTodoItem(todo); | 726 | insertTodoItem(todo); |
725 | } | 727 | } |
726 | } | 728 | } |
727 | // Restore opened/closed state | 729 | // Restore opened/closed state |
728 | mTodoListView->blockSignals( true ); | 730 | mTodoListView->blockSignals( true ); |
729 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); | 731 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); |
730 | mTodoListView->blockSignals( false ); | 732 | mTodoListView->blockSignals( false ); |
731 | resetCurrentItem(); | 733 | resetCurrentItem(); |
732 | processSelectionChange(); | 734 | processSelectionChange(); |
733 | } | 735 | } |
734 | 736 | ||
735 | void KOTodoView::storeCurrentItem() | 737 | void KOTodoView::storeCurrentItem() |
736 | { | 738 | { |
737 | mCurItem = 0; | 739 | mCurItem = 0; |
738 | mCurItemRootParent = 0; | 740 | mCurItemRootParent = 0; |
739 | mCurItemParent = 0; | 741 | mCurItemParent = 0; |
740 | mCurItemAbove = 0; | 742 | mCurItemAbove = 0; |
741 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 743 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
742 | if (mActiveItem) { | 744 | if (mActiveItem) { |
743 | mCurItem = mActiveItem->todo(); | 745 | mCurItem = mActiveItem->todo(); |
744 | KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); | 746 | KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); |
745 | if ( activeItemAbove ) | 747 | if ( activeItemAbove ) |
746 | mCurItemAbove = activeItemAbove->todo(); | 748 | mCurItemAbove = activeItemAbove->todo(); |
747 | mCurItemRootParent = mCurItem; | 749 | mCurItemRootParent = mCurItem; |
748 | mCurItemParent = mCurItemRootParent->relatedTo(); | 750 | mCurItemParent = mCurItemRootParent->relatedTo(); |
749 | while ( mCurItemRootParent->relatedTo() != 0 ) | 751 | while ( mCurItemRootParent->relatedTo() != 0 ) |
750 | mCurItemRootParent = mCurItemRootParent->relatedTo(); | 752 | mCurItemRootParent = mCurItemRootParent->relatedTo(); |
751 | } | 753 | } |
752 | mActiveItem = 0; | 754 | mActiveItem = 0; |
753 | } | 755 | } |
754 | 756 | ||
755 | void KOTodoView::resetCurrentItem() | 757 | void KOTodoView::resetCurrentItem() |
756 | { | 758 | { |
757 | mTodoListView->setFocus(); | 759 | mTodoListView->setFocus(); |
758 | KOTodoViewItem* foundItem = 0; | 760 | KOTodoViewItem* foundItem = 0; |
759 | KOTodoViewItem* foundItemRoot = 0; | 761 | KOTodoViewItem* foundItemRoot = 0; |
760 | KOTodoViewItem* foundItemParent = 0; | 762 | KOTodoViewItem* foundItemParent = 0; |
761 | KOTodoViewItem* foundItemAbove = 0; | 763 | KOTodoViewItem* foundItemAbove = 0; |
762 | if ( mTodoListView->firstChild () ) { | 764 | if ( mTodoListView->firstChild () ) { |
763 | if ( mCurItem ) { | 765 | if ( mCurItem ) { |
764 | KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); | 766 | KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); |
765 | while ( item ) { | 767 | while ( item ) { |
766 | if ( item->todo() == mCurItem ) { | 768 | if ( item->todo() == mCurItem ) { |
767 | foundItem = item; | 769 | foundItem = item; |
768 | break; | 770 | break; |
769 | } else if ( item->todo() == mCurItemAbove ) { | 771 | } else if ( item->todo() == mCurItemAbove ) { |
770 | foundItemAbove = item; | 772 | foundItemAbove = item; |
771 | 773 | ||
772 | } | 774 | } |
773 | if ( item->todo() == mCurItemRootParent ) { | 775 | if ( item->todo() == mCurItemRootParent ) { |
774 | foundItemRoot = item; | 776 | foundItemRoot = item; |
775 | } | 777 | } |
776 | if ( item->todo() == mCurItemParent ) { | 778 | if ( item->todo() == mCurItemParent ) { |
777 | foundItemParent = item; | 779 | foundItemParent = item; |
778 | } | 780 | } |
779 | item = (KOTodoViewItem*)item->itemBelow(); | 781 | item = (KOTodoViewItem*)item->itemBelow(); |
780 | } | 782 | } |
781 | if ( ! foundItem ) { | 783 | if ( ! foundItem ) { |
782 | if ( foundItemParent ) { | 784 | if ( foundItemParent ) { |
783 | foundItem = foundItemParent; | 785 | foundItem = foundItemParent; |
784 | } else { | 786 | } else { |
785 | if ( foundItemRoot ) | 787 | if ( foundItemRoot ) |
786 | foundItem = foundItemRoot; | 788 | foundItem = foundItemRoot; |
787 | else | 789 | else |
788 | foundItem = foundItemAbove; | 790 | foundItem = foundItemAbove; |
789 | } | 791 | } |
790 | } | 792 | } |
791 | } | 793 | } |
792 | if ( foundItem ) { | 794 | if ( foundItem ) { |
793 | mTodoListView->setCurrentItem( foundItem ); | 795 | mTodoListView->setCurrentItem( foundItem ); |
794 | mTodoListView->ensureItemVisible( foundItem ); | 796 | mTodoListView->ensureItemVisible( foundItem ); |
795 | } else { | 797 | } else { |
796 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); | 798 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); |
797 | } | 799 | } |
798 | } | 800 | } |
799 | mTodoListView->setFocus(); | 801 | mTodoListView->setFocus(); |
800 | } | 802 | } |
801 | //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; | 803 | //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; |
802 | bool KOTodoView::checkTodo( Todo * todo ) | 804 | bool KOTodoView::checkTodo( Todo * todo ) |
803 | { | 805 | { |
804 | 806 | ||
805 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) | 807 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) |
806 | return false; | 808 | return false; |
807 | if ( !todo->isCompleted() ) { | 809 | if ( !todo->isCompleted() ) { |
808 | if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) | 810 | if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) |
809 | return true; | 811 | return true; |
810 | } | 812 | } |
811 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { | 813 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { |
812 | if ( todo->hasStartDate() ) | 814 | if ( todo->hasStartDate() ) |
813 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) | 815 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) |
814 | return false; | 816 | return false; |
815 | if ( todo->hasDueDate() ) | 817 | if ( todo->hasDueDate() ) |
816 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) | 818 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) |
817 | return false; | 819 | return false; |
818 | } | 820 | } |
819 | return true; | 821 | return true; |
820 | } | 822 | } |
821 | 823 | ||
822 | void KOTodoView::restoreItemState( QListViewItem *item ) | 824 | void KOTodoView::restoreItemState( QListViewItem *item ) |
823 | { | 825 | { |
824 | pendingSubtodo = 0; | 826 | pendingSubtodo = 0; |
825 | while( item ) { | 827 | while( item ) { |
826 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 828 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
827 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); | 829 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); |
828 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); | 830 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); |
829 | item = item->nextSibling(); | 831 | item = item->nextSibling(); |
830 | } | 832 | } |
831 | } | 833 | } |
832 | 834 | ||
833 | 835 | ||
834 | QMap<Todo *,KOTodoViewItem *>::ConstIterator | 836 | QMap<Todo *,KOTodoViewItem *>::ConstIterator |
835 | KOTodoView::insertTodoItem(Todo *todo) | 837 | KOTodoView::insertTodoItem(Todo *todo) |
836 | { | 838 | { |
837 | 839 | ||
838 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; | 840 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; |
839 | // TODO: Check, if dynmaic cast is necessary | 841 | // TODO: Check, if dynmaic cast is necessary |
840 | 842 | ||
841 | pendingSubtodo = 0; | 843 | pendingSubtodo = 0; |
842 | Incidence *incidence = todo->relatedTo(); | 844 | Incidence *incidence = todo->relatedTo(); |
843 | if (incidence && incidence->type() == "Todo") { | 845 | if (incidence && incidence->type() == "Todo") { |
844 | Todo *relatedTodo = static_cast<Todo *>(incidence); | 846 | Todo *relatedTodo = static_cast<Todo *>(incidence); |
845 | 847 | ||
846 | // kdDebug() << " has Related" << endl; | 848 | // kdDebug() << " has Related" << endl; |
847 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 849 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
848 | itemIterator = mTodoMap.find(relatedTodo); | 850 | itemIterator = mTodoMap.find(relatedTodo); |
849 | if (itemIterator == mTodoMap.end()) { | 851 | if (itemIterator == mTodoMap.end()) { |
850 | // kdDebug() << " related not yet in list" << endl; | 852 | // kdDebug() << " related not yet in list" << endl; |
851 | itemIterator = insertTodoItem (relatedTodo); | 853 | itemIterator = insertTodoItem (relatedTodo); |
852 | } | 854 | } |
853 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem | 855 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem |
854 | // and one into the map. Sure finding is more easy but why? -zecke | 856 | // and one into the map. Sure finding is more easy but why? -zecke |
855 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); | 857 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); |
856 | return mTodoMap.insert(todo,todoItem); | 858 | return mTodoMap.insert(todo,todoItem); |
857 | } else { | 859 | } else { |
858 | // kdDebug() << " no Related" << endl; | 860 | // kdDebug() << " no Related" << endl; |
859 | // see above -zecke | 861 | // see above -zecke |
860 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 862 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
861 | return mTodoMap.insert(todo,todoItem); | 863 | return mTodoMap.insert(todo,todoItem); |
862 | } | 864 | } |
863 | } | 865 | } |
864 | 866 | ||
865 | 867 | ||
866 | void KOTodoView::updateConfig() | 868 | void KOTodoView::updateConfig() |
867 | { | 869 | { |
868 | updateView(); | 870 | updateView(); |
869 | mTodoListView->repaintContents(); | 871 | mTodoListView->repaintContents(); |
870 | } | 872 | } |
871 | 873 | ||
872 | QPtrList<Incidence> KOTodoView::selectedIncidences() | 874 | QPtrList<Incidence> KOTodoView::selectedIncidences() |
873 | { | 875 | { |
874 | QPtrList<Incidence> selected; | 876 | QPtrList<Incidence> selected; |
875 | 877 | ||
876 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 878 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
877 | // if (!item) item = mActiveItem; | 879 | // if (!item) item = mActiveItem; |
878 | if (item) selected.append(item->todo()); | 880 | if (item) selected.append(item->todo()); |
879 | 881 | ||
880 | return selected; | 882 | return selected; |
881 | } | 883 | } |
882 | 884 | ||
883 | QPtrList<Todo> KOTodoView::selectedTodos() | 885 | QPtrList<Todo> KOTodoView::selectedTodos() |
884 | { | 886 | { |
885 | QPtrList<Todo> selected; | 887 | QPtrList<Todo> selected; |
886 | 888 | ||
887 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 889 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
888 | // if (!item) item = mActiveItem; | 890 | // if (!item) item = mActiveItem; |
889 | if (item) selected.append(item->todo()); | 891 | if (item) selected.append(item->todo()); |
890 | 892 | ||
891 | return selected; | 893 | return selected; |
892 | } | 894 | } |
893 | 895 | ||
894 | void KOTodoView::changeEventDisplay(Event *, int) | 896 | void KOTodoView::changeEventDisplay(Event *, int) |
895 | { | 897 | { |
896 | updateView(); | 898 | updateView(); |
897 | } | 899 | } |
898 | 900 | ||
899 | void KOTodoView::showDates(const QDate &, const QDate &) | 901 | void KOTodoView::showDates(const QDate &, const QDate &) |
900 | { | 902 | { |
901 | } | 903 | } |
902 | 904 | ||
903 | void KOTodoView::showEvents(QPtrList<Event>) | 905 | void KOTodoView::showEvents(QPtrList<Event>) |
904 | { | 906 | { |
905 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; | 907 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; |
906 | } | 908 | } |
907 | 909 | ||
908 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 910 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
909 | const QDate &td) | 911 | const QDate &td) |
910 | { | 912 | { |
911 | #ifndef KORG_NOPRINTER | 913 | #ifndef KORG_NOPRINTER |
912 | calPrinter->preview(CalPrinter::Todolist, fd, td); | 914 | calPrinter->preview(CalPrinter::Todolist, fd, td); |
913 | #endif | 915 | #endif |
914 | } | 916 | } |
915 | 917 | ||
916 | void KOTodoView::editItem(QListViewItem *item ) | 918 | void KOTodoView::editItem(QListViewItem *item ) |
917 | { | 919 | { |
918 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); | 920 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); |
919 | } | 921 | } |
920 | 922 | ||
921 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) | 923 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) |
922 | { | 924 | { |
923 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); | 925 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); |
924 | } | 926 | } |
925 | 927 | ||
926 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) | 928 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) |
927 | { | 929 | { |
928 | pendingSubtodo = 0; | 930 | pendingSubtodo = 0; |
929 | mActiveItem = (KOTodoViewItem *)item; | 931 | mActiveItem = (KOTodoViewItem *)item; |
930 | if (item) { | 932 | if (item) { |
931 | switch (column){ | 933 | switch (column){ |
932 | case 1: | 934 | case 1: |
933 | mPriorityPopupMenu->popup(QCursor::pos ()); break; | 935 | mPriorityPopupMenu->popup(QCursor::pos ()); break; |
934 | case 2: | 936 | case 2: |
935 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; | 937 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; |
936 | case 3: | 938 | case 3: |
937 | moveTodo(); | 939 | moveTodo(); |
938 | break; | 940 | break; |
939 | case 8: | 941 | case 8: |
940 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; | 942 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; |
941 | default: | 943 | default: |
942 | mItemPopupMenu->popup(QCursor::pos()); | 944 | mItemPopupMenu->popup(QCursor::pos()); |
943 | } | 945 | } |
944 | } else mPopupMenu->popup(QCursor::pos()); | 946 | } else mPopupMenu->popup(QCursor::pos()); |
945 | } | 947 | } |
946 | void KOTodoView::newTodo() | 948 | void KOTodoView::newTodo() |
947 | { | 949 | { |
948 | emit newTodoSignal(); | 950 | emit newTodoSignal(); |
949 | } | 951 | } |
950 | 952 | ||
951 | void KOTodoView::newSubTodo() | 953 | void KOTodoView::newSubTodo() |
952 | { | 954 | { |
953 | if (mActiveItem) { | 955 | if (mActiveItem) { |
954 | emit newSubTodoSignal(mActiveItem->todo()); | 956 | emit newSubTodoSignal(mActiveItem->todo()); |
955 | } | 957 | } |
956 | } | 958 | } |
957 | void KOTodoView::unparentTodo() | 959 | void KOTodoView::unparentTodo() |
958 | { | 960 | { |
959 | if (mActiveItem) { | 961 | if (mActiveItem) { |
960 | emit unparentTodoSignal(mActiveItem->todo()); | 962 | emit unparentTodoSignal(mActiveItem->todo()); |
961 | } | 963 | } |
962 | } | 964 | } |
963 | 965 | ||
964 | void KOTodoView::reparentTodo() | 966 | void KOTodoView::reparentTodo() |
965 | { | 967 | { |
966 | if (mActiveItem) { | 968 | if (mActiveItem) { |
967 | topLevelWidget()->setCaption(i18n("Click on new parent item")); | 969 | topLevelWidget()->setCaption(i18n("Click on new parent item")); |
968 | pendingSubtodo = mActiveItem; | 970 | pendingSubtodo = mActiveItem; |
969 | } | 971 | } |
970 | } | 972 | } |
971 | void KOTodoView::editTodo() | 973 | void KOTodoView::editTodo() |
972 | { | 974 | { |
973 | if (mActiveItem) { | 975 | if (mActiveItem) { |
974 | emit editTodoSignal(mActiveItem->todo()); | 976 | emit editTodoSignal(mActiveItem->todo()); |
975 | } | 977 | } |
976 | } | 978 | } |
977 | void KOTodoView::cloneTodo() | 979 | void KOTodoView::cloneTodo() |
978 | { | 980 | { |
979 | if (mActiveItem) { | 981 | if (mActiveItem) { |
980 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); | 982 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); |
981 | } | 983 | } |
982 | } | 984 | } |
983 | void KOTodoView::cancelTodo() | 985 | void KOTodoView::cancelTodo() |
984 | { | 986 | { |
985 | if (mActiveItem) { | 987 | if (mActiveItem) { |
986 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); | 988 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); |
987 | } | 989 | } |
988 | } | 990 | } |
989 | void KOTodoView::moveTodo() | 991 | void KOTodoView::moveTodo() |
990 | { | 992 | { |
991 | if (mActiveItem) { | 993 | if (mActiveItem) { |
992 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); | 994 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); |
993 | } | 995 | } |
994 | } | 996 | } |
995 | void KOTodoView::beamTodo() | 997 | void KOTodoView::beamTodo() |
996 | { | 998 | { |
997 | if (mActiveItem) { | 999 | if (mActiveItem) { |
998 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); | 1000 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); |
999 | } | 1001 | } |
1000 | } | 1002 | } |
1001 | 1003 | ||
1002 | 1004 | ||
1003 | void KOTodoView::showTodo() | 1005 | void KOTodoView::showTodo() |
1004 | { | 1006 | { |
1005 | if (mActiveItem) { | 1007 | if (mActiveItem) { |
1006 | emit showTodoSignal(mActiveItem->todo()); | 1008 | emit showTodoSignal(mActiveItem->todo()); |
1007 | } | 1009 | } |
1008 | } | 1010 | } |
1009 | 1011 | ||
1010 | void KOTodoView::deleteTodo() | 1012 | void KOTodoView::deleteTodo() |
1011 | { | 1013 | { |
1012 | if (mActiveItem) { | 1014 | if (mActiveItem) { |
1013 | emit deleteTodoSignal(mActiveItem->todo()); | 1015 | emit deleteTodoSignal(mActiveItem->todo()); |
1014 | } | 1016 | } |
1015 | } | 1017 | } |
1016 | 1018 | ||
1017 | void KOTodoView::setNewPriority(int index) | 1019 | void KOTodoView::setNewPriority(int index) |
1018 | { | 1020 | { |
1019 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1021 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1020 | mActiveItem->todo()->setPriority(mPriority[index]); | 1022 | mActiveItem->todo()->setPriority(mPriority[index]); |
1021 | mActiveItem->construct(); | 1023 | mActiveItem->construct(); |
1022 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); | 1024 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); |
1023 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1025 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1024 | } | 1026 | } |
1025 | } | 1027 | } |
1026 | 1028 | ||
1027 | void KOTodoView::setNewPercentage(int index) | 1029 | void KOTodoView::setNewPercentage(int index) |
1028 | { | 1030 | { |
1029 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1031 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1030 | 1032 | ||
1031 | if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { | 1033 | if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { |
1032 | mActiveItem->setOn( true ); | 1034 | mActiveItem->setOn( true ); |
1033 | return; | 1035 | return; |
1034 | } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { | 1036 | } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { |
1035 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); | 1037 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); |
1036 | if ( par && par->isOn() ) | 1038 | if ( par && par->isOn() ) |
1037 | par->setOn( false ); | 1039 | par->setOn( false ); |
1038 | } | 1040 | } |
1039 | if (mPercentage[index] == 100) { | 1041 | if (mPercentage[index] == 100) { |
1040 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); | 1042 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); |
1041 | } else { | 1043 | } else { |
1042 | mActiveItem->todo()->setCompleted(false); | 1044 | mActiveItem->todo()->setCompleted(false); |
1043 | } | 1045 | } |
1044 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); | 1046 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); |
1045 | mActiveItem->construct(); | 1047 | mActiveItem->construct(); |
1046 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); | 1048 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); |
1047 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1049 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1048 | } | 1050 | } |
1049 | } | 1051 | } |
1050 | 1052 | ||
1051 | 1053 | ||
1052 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) | 1054 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) |
1053 | { | 1055 | { |
1054 | QPopupMenu* tempMenu = new QPopupMenu (this); | 1056 | QPopupMenu* tempMenu = new QPopupMenu (this); |
1055 | QStringList checkedCategories = todoItem->todo()->categories (); | 1057 | QStringList checkedCategories = todoItem->todo()->categories (); |
1056 | 1058 | ||
1057 | tempMenu->setCheckable (true); | 1059 | tempMenu->setCheckable (true); |
1058 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 1060 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
1059 | it != KOPrefs::instance()->mCustomCategories.end (); | 1061 | it != KOPrefs::instance()->mCustomCategories.end (); |
1060 | ++it) { | 1062 | ++it) { |
1061 | int index = tempMenu->insertItem (*it); | 1063 | int index = tempMenu->insertItem (*it); |
1062 | mCategory[index] = *it; | 1064 | mCategory[index] = *it; |
1063 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); | 1065 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); |
1064 | } | 1066 | } |
1065 | 1067 | ||
1066 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 1068 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
1067 | return tempMenu; | 1069 | return tempMenu; |
1068 | 1070 | ||
1069 | 1071 | ||
1070 | } | 1072 | } |
1071 | void KOTodoView::changedCategories(int index) | 1073 | void KOTodoView::changedCategories(int index) |
1072 | { | 1074 | { |
1073 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1075 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1074 | QStringList categories = mActiveItem->todo()->categories (); | 1076 | QStringList categories = mActiveItem->todo()->categories (); |
1075 | QString colcat = categories.first(); | 1077 | QString colcat = categories.first(); |
1076 | if (categories.find (mCategory[index]) != categories.end ()) | 1078 | if (categories.find (mCategory[index]) != categories.end ()) |
1077 | categories.remove (mCategory[index]); | 1079 | categories.remove (mCategory[index]); |
1078 | else | 1080 | else |
1079 | categories.insert (categories.end(), mCategory[index]); | 1081 | categories.insert (categories.end(), mCategory[index]); |
1080 | categories.sort (); | 1082 | categories.sort (); |
1081 | if ( !colcat.isEmpty() ) { | 1083 | if ( !colcat.isEmpty() ) { |
1082 | if ( categories.find ( colcat ) != categories.end () ) { | 1084 | if ( categories.find ( colcat ) != categories.end () ) { |
1083 | categories.remove( colcat ); | 1085 | categories.remove( colcat ); |
1084 | categories.prepend( colcat ); | 1086 | categories.prepend( colcat ); |
1085 | } | 1087 | } |
1086 | } | 1088 | } |
1087 | mActiveItem->todo()->setCategories (categories); | 1089 | mActiveItem->todo()->setCategories (categories); |
1088 | mActiveItem->construct(); | 1090 | mActiveItem->construct(); |
1089 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1091 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1090 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); | 1092 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); |
1091 | } | 1093 | } |
1092 | } | 1094 | } |
1093 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 1095 | void KOTodoView::itemDoubleClicked(QListViewItem *item) |
1094 | { | 1096 | { |
1095 | if ( pendingSubtodo != 0 ) { | 1097 | if ( pendingSubtodo != 0 ) { |
1096 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1098 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1097 | } | 1099 | } |
1098 | pendingSubtodo = 0; | 1100 | pendingSubtodo = 0; |
1099 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); | 1101 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); |
1100 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); | 1102 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); |
1101 | //qDebug("ROW %d ", row); | 1103 | //qDebug("ROW %d ", row); |
1102 | if (!item) { | 1104 | if (!item) { |
1103 | newTodo(); | 1105 | newTodo(); |
1104 | return; | 1106 | return; |
1105 | } else { | 1107 | } else { |
1106 | if ( row == 2 || row == 1 ) { | 1108 | if ( row == 2 || row == 1 ) { |
1107 | mActiveItem = (KOTodoViewItem *) item; | 1109 | mActiveItem = (KOTodoViewItem *) item; |
1108 | newSubTodo(); | 1110 | newSubTodo(); |
1109 | return; | 1111 | return; |
1110 | } | 1112 | } |
1111 | if ( row == 5 || row == 6 ) { | 1113 | if ( row == 5 || row == 6 ) { |
1112 | mActiveItem = (KOTodoViewItem *) item; | 1114 | mActiveItem = (KOTodoViewItem *) item; |
1113 | toggleRunningItem(); | 1115 | toggleRunningItem(); |
1114 | return; | 1116 | return; |
1115 | } | 1117 | } |
1116 | } | 1118 | } |
1117 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 1119 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
1118 | editItem( item ); | 1120 | editItem( item ); |
1119 | else | 1121 | else |
1120 | showItem( item , QPoint(), 0 ); | 1122 | showItem( item , QPoint(), 0 ); |
1121 | } | 1123 | } |
1122 | void KOTodoView::toggleRunningItem() | 1124 | void KOTodoView::toggleRunningItem() |
1123 | { | 1125 | { |
1124 | // qDebug("KOTodoView::toggleRunning() "); | 1126 | // qDebug("KOTodoView::toggleRunning() "); |
1125 | if ( ! mActiveItem ) | 1127 | if ( ! mActiveItem ) |
1126 | return; | 1128 | return; |
1127 | Todo * t = mActiveItem->todo(); | 1129 | Todo * t = mActiveItem->todo(); |
1128 | if ( t->isRunning() ) { | 1130 | if ( t->isRunning() ) { |
1131 | #if 0 | ||
1129 | int result = KMessageBox::warningContinueCancel(this, | 1132 | int result = KMessageBox::warningContinueCancel(this, |
1130 | 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); | 1133 | 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); |
1131 | if (result != KMessageBox::Continue) return; | 1134 | #endif |
1132 | t->setRunning( false ); | 1135 | |
1136 | int result = KMessageBox::warningYesNoCancel(this, | ||
1137 | 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"),i18n("Stop+note")); | ||
1138 | if (result == KMessageBox::Cancel) return; | ||
1139 | if ( result == KMessageBox::No ) { | ||
1140 | QString comment = QInputDialog::getText(mActiveItem->text(0).left( 25 ),i18n("Comment for todo:") ); | ||
1141 | t->setRunningFalse( comment ); | ||
1142 | } else { | ||
1143 | t->setRunning( false ); | ||
1144 | } | ||
1133 | mActiveItem->construct(); | 1145 | mActiveItem->construct(); |
1134 | } else { | 1146 | } else { |
1135 | int result = KMessageBox::warningContinueCancel(this, | 1147 | int result = KMessageBox::warningContinueCancel(this, |
1136 | 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); | 1148 | 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); |
1137 | if (result != KMessageBox::Continue) return; | 1149 | if (result != KMessageBox::Continue) return; |
1138 | t->setRunning( true ); | 1150 | t->setRunning( true ); |
1139 | mActiveItem->construct(); | 1151 | mActiveItem->construct(); |
1140 | } | 1152 | } |
1141 | } | 1153 | } |
1142 | 1154 | ||
1143 | void KOTodoView::itemClicked(QListViewItem *item) | 1155 | void KOTodoView::itemClicked(QListViewItem *item) |
1144 | { | 1156 | { |
1145 | //qDebug("KOTodoView::itemClicked %d", item); | 1157 | //qDebug("KOTodoView::itemClicked %d", item); |
1146 | if (!item) { | 1158 | if (!item) { |
1147 | if ( pendingSubtodo != 0 ) { | 1159 | if ( pendingSubtodo != 0 ) { |
1148 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1160 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1149 | } | 1161 | } |
1150 | pendingSubtodo = 0; | 1162 | pendingSubtodo = 0; |
1151 | return; | 1163 | return; |
1152 | } | 1164 | } |
1153 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1165 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1154 | if ( pendingSubtodo != 0 ) { | 1166 | if ( pendingSubtodo != 0 ) { |
1155 | bool allowReparent = true; | 1167 | bool allowReparent = true; |
1156 | QListViewItem *par = item; | 1168 | QListViewItem *par = item; |
1157 | while ( par ) { | 1169 | while ( par ) { |
1158 | if ( par == pendingSubtodo ) { | 1170 | if ( par == pendingSubtodo ) { |
1159 | allowReparent = false; | 1171 | allowReparent = false; |
1160 | break; | 1172 | break; |
1161 | } | 1173 | } |
1162 | par = par->parent(); | 1174 | par = par->parent(); |
1163 | } | 1175 | } |
1164 | if ( !allowReparent ) { | 1176 | if ( !allowReparent ) { |
1165 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); | 1177 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); |
1166 | pendingSubtodo = 0; | 1178 | pendingSubtodo = 0; |
1167 | } else { | 1179 | } else { |
1168 | Todo* newParent = todoItem->todo(); | 1180 | Todo* newParent = todoItem->todo(); |
1169 | Todo* newSub = pendingSubtodo->todo(); | 1181 | Todo* newSub = pendingSubtodo->todo(); |
1170 | pendingSubtodo = 0; | 1182 | pendingSubtodo = 0; |
1171 | emit reparentTodoSignal( newParent,newSub ); | 1183 | emit reparentTodoSignal( newParent,newSub ); |
1172 | return; | 1184 | return; |
1173 | } | 1185 | } |
1174 | } | 1186 | } |
1175 | 1187 | ||
1176 | } | 1188 | } |
1177 | 1189 | ||
1178 | void KOTodoView::setDocumentId( const QString &id ) | 1190 | void KOTodoView::setDocumentId( const QString &id ) |
1179 | { | 1191 | { |
1180 | 1192 | ||
1181 | mDocPrefs->setDoc( id ); | 1193 | mDocPrefs->setDoc( id ); |
1182 | } | 1194 | } |
1183 | 1195 | ||
1184 | void KOTodoView::itemStateChanged( QListViewItem *item ) | 1196 | void KOTodoView::itemStateChanged( QListViewItem *item ) |
1185 | { | 1197 | { |
1186 | if (!item) return; | 1198 | if (!item) return; |
1187 | 1199 | ||
1188 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1200 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1189 | 1201 | ||
1190 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; | 1202 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; |
1191 | 1203 | ||
1192 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); | 1204 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); |
1193 | } | 1205 | } |
1194 | 1206 | ||
1195 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const | 1207 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const |
1196 | { | 1208 | { |
1197 | mTodoListView->saveLayout(config,group); | 1209 | mTodoListView->saveLayout(config,group); |
1198 | } | 1210 | } |
1199 | 1211 | ||
1200 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) | 1212 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) |
1201 | { | 1213 | { |
1202 | mTodoListView->restoreLayout(config,group); | 1214 | mTodoListView->restoreLayout(config,group); |
1203 | } | 1215 | } |
1204 | 1216 | ||
1205 | void KOTodoView::processSelectionChange() | 1217 | void KOTodoView::processSelectionChange() |
1206 | { | 1218 | { |
1207 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; | 1219 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; |
1208 | 1220 | ||
1209 | KOTodoViewItem *item = | 1221 | KOTodoViewItem *item = |
1210 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); | 1222 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); |
1211 | 1223 | ||
1212 | if ( !item ) { | 1224 | if ( !item ) { |
1213 | emit incidenceSelected( 0 ); | 1225 | emit incidenceSelected( 0 ); |
1214 | } else { | 1226 | } else { |
1215 | emit incidenceSelected( item->todo() ); | 1227 | emit incidenceSelected( item->todo() ); |
1216 | } | 1228 | } |
1217 | } | 1229 | } |
1218 | 1230 | ||
1219 | void KOTodoView::modified(bool b) | 1231 | void KOTodoView::modified(bool b) |
1220 | { | 1232 | { |
1221 | emit isModified(b); | 1233 | emit isModified(b); |
1222 | } | 1234 | } |
1223 | void KOTodoView::setTodoModified( Todo* todo ) | 1235 | void KOTodoView::setTodoModified( Todo* todo ) |
1224 | { | 1236 | { |
1225 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); | 1237 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); |
1226 | } | 1238 | } |
1227 | void KOTodoView::clearSelection() | 1239 | void KOTodoView::clearSelection() |
1228 | { | 1240 | { |
1229 | mTodoListView->selectAll( false ); | 1241 | mTodoListView->selectAll( false ); |
1230 | } | 1242 | } |
1231 | void KOTodoView::setAllOpen() | 1243 | void KOTodoView::setAllOpen() |
1232 | { | 1244 | { |
1233 | if ( isFlatDisplay ) { | 1245 | if ( isFlatDisplay ) { |
1234 | isFlatDisplay = false; | 1246 | isFlatDisplay = false; |
1235 | mPopupMenu->setItemChecked( 8,false ); | 1247 | mPopupMenu->setItemChecked( 8,false ); |
1236 | updateView(); | 1248 | updateView(); |
1237 | } else { | 1249 | } else { |
1238 | storeCurrentItem(); | 1250 | storeCurrentItem(); |
1239 | } | 1251 | } |
1240 | setOpen(mTodoListView->firstChild(), true); | 1252 | setOpen(mTodoListView->firstChild(), true); |
1241 | resetCurrentItem(); | 1253 | resetCurrentItem(); |
1242 | } | 1254 | } |
1243 | void KOTodoView::setAllClose() | 1255 | void KOTodoView::setAllClose() |
1244 | { | 1256 | { |
1245 | if ( isFlatDisplay ) { | 1257 | if ( isFlatDisplay ) { |
1246 | isFlatDisplay = false; | 1258 | isFlatDisplay = false; |
1247 | mPopupMenu->setItemChecked( 8,false ); | 1259 | mPopupMenu->setItemChecked( 8,false ); |
1248 | updateView(); | 1260 | updateView(); |
1249 | } else { | 1261 | } else { |
1250 | storeCurrentItem(); | 1262 | storeCurrentItem(); |
1251 | } | 1263 | } |
1252 | setOpen(mTodoListView->firstChild(), false); | 1264 | setOpen(mTodoListView->firstChild(), false); |
1253 | resetCurrentItem(); | 1265 | resetCurrentItem(); |
1254 | } | 1266 | } |
1255 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) | 1267 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) |
1256 | { | 1268 | { |
1257 | 1269 | ||
1258 | while ( item ) { | 1270 | while ( item ) { |
1259 | setOpen( item->firstChild(), setOpenI ); | 1271 | setOpen( item->firstChild(), setOpenI ); |
1260 | item->setOpen( setOpenI ); | 1272 | item->setOpen( setOpenI ); |
1261 | item = item->nextSibling(); | 1273 | item = item->nextSibling(); |
1262 | } | 1274 | } |
1263 | } | 1275 | } |
1264 | 1276 | ||
1265 | void KOTodoView::displayAllFlat() | 1277 | void KOTodoView::displayAllFlat() |
1266 | { | 1278 | { |
1267 | pendingSubtodo = 0; | 1279 | pendingSubtodo = 0; |
1268 | if ( mBlockUpdate ) { | 1280 | if ( mBlockUpdate ) { |
1269 | return; | 1281 | return; |
1270 | } | 1282 | } |
1271 | mPopupMenu->setItemChecked( 8,true ); | 1283 | mPopupMenu->setItemChecked( 8,true ); |
1272 | isFlatDisplay = true; | 1284 | isFlatDisplay = true; |
1273 | QPtrList<Todo> todoList = calendar()->todos(); | 1285 | QPtrList<Todo> todoList = calendar()->todos(); |
1274 | mTodoMap.clear(); | 1286 | mTodoMap.clear(); |
1275 | mTodoListView->clear(); | 1287 | mTodoListView->clear(); |
1276 | Todo *todo; | 1288 | Todo *todo; |
1277 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 1289 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
1278 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 1290 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
1279 | mTodoMap.insert(todo,todoItem); | 1291 | mTodoMap.insert(todo,todoItem); |
1280 | } | 1292 | } |
1281 | mTodoListView->setFocus(); | 1293 | mTodoListView->setFocus(); |
1282 | processSelectionChange(); | 1294 | processSelectionChange(); |
1283 | } | 1295 | } |
1284 | 1296 | ||
1285 | void KOTodoView::setAllFlat() | 1297 | void KOTodoView::setAllFlat() |
1286 | { | 1298 | { |
1287 | if ( isFlatDisplay ) { | 1299 | if ( isFlatDisplay ) { |
1288 | isFlatDisplay = false; | 1300 | isFlatDisplay = false; |
1289 | mPopupMenu->setItemChecked( 8,false ); | 1301 | mPopupMenu->setItemChecked( 8,false ); |
1290 | updateView(); | 1302 | updateView(); |
1291 | return; | 1303 | return; |
1292 | } | 1304 | } |
1293 | storeCurrentItem(); | 1305 | storeCurrentItem(); |
1294 | displayAllFlat(); | 1306 | displayAllFlat(); |
1295 | resetCurrentItem(); | 1307 | resetCurrentItem(); |
1296 | } | 1308 | } |
1297 | 1309 | ||
1298 | void KOTodoView::purgeCompleted() | 1310 | void KOTodoView::purgeCompleted() |
1299 | { | 1311 | { |
1300 | emit purgeCompletedSignal(); | 1312 | emit purgeCompletedSignal(); |
1301 | 1313 | ||
1302 | } | 1314 | } |
1303 | void KOTodoView::toggleQuickTodo() | 1315 | void KOTodoView::toggleQuickTodo() |
1304 | { | 1316 | { |
1305 | if ( mQuickAdd->isVisible() ) { | 1317 | if ( mQuickAdd->isVisible() ) { |
1306 | mQuickAdd->hide(); | 1318 | mQuickAdd->hide(); |
1307 | KOPrefs::instance()->mEnableQuickTodo = false; | 1319 | KOPrefs::instance()->mEnableQuickTodo = false; |
1308 | } | 1320 | } |
1309 | else { | 1321 | else { |
1310 | mQuickAdd->show(); | 1322 | mQuickAdd->show(); |
1311 | KOPrefs::instance()->mEnableQuickTodo = true; | 1323 | KOPrefs::instance()->mEnableQuickTodo = true; |
1312 | } | 1324 | } |
1313 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 1325 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
1314 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 1326 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
1315 | } | 1327 | } |
1316 | 1328 | ||
1317 | void KOTodoView::toggleRunning() | 1329 | void KOTodoView::toggleRunning() |
1318 | { | 1330 | { |
1319 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; | 1331 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; |
1320 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 1332 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
1321 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 1333 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
1322 | updateView(); | 1334 | updateView(); |
1323 | } | 1335 | } |
1324 | 1336 | ||
1325 | void KOTodoView::toggleCompleted() | 1337 | void KOTodoView::toggleCompleted() |
1326 | { | 1338 | { |
1327 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; | 1339 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; |
1328 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 1340 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
1329 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 1341 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
1330 | updateView(); | 1342 | updateView(); |
1331 | } | 1343 | } |
1332 | 1344 | ||
1333 | void KOTodoView::addQuickTodo() | 1345 | void KOTodoView::addQuickTodo() |
1334 | { | 1346 | { |
1335 | Todo *todo = new Todo(); | 1347 | Todo *todo = new Todo(); |
1336 | todo->setSummary(mQuickAdd->text()); | 1348 | todo->setSummary(mQuickAdd->text()); |
1337 | todo->setOrganizer(KOPrefs::instance()->email()); | 1349 | todo->setOrganizer(KOPrefs::instance()->email()); |
1338 | CalFilter * cf = mCalendar->filter(); | 1350 | CalFilter * cf = mCalendar->filter(); |
1339 | if ( cf ) { | 1351 | if ( cf ) { |
1340 | if ( cf->isEnabled()&& cf->showCategories()) { | 1352 | if ( cf->isEnabled()&& cf->showCategories()) { |
1341 | todo->setCategories(cf->categoryList()); | 1353 | todo->setCategories(cf->categoryList()); |
1342 | } | 1354 | } |
1343 | if ( cf->isEnabled() ) | 1355 | if ( cf->isEnabled() ) |
1344 | todo->setSecrecy( cf->getSecrecy()); | 1356 | todo->setSecrecy( cf->getSecrecy()); |
1345 | } | 1357 | } |
1346 | mCalendar->addTodo(todo); | 1358 | mCalendar->addTodo(todo); |
1347 | mQuickAdd->setText(""); | 1359 | mQuickAdd->setText(""); |
1348 | todoModified (todo, KOGlobals::EVENTADDED ); | 1360 | todoModified (todo, KOGlobals::EVENTADDED ); |
1349 | updateView(); | 1361 | updateView(); |
1350 | } | 1362 | } |
1351 | 1363 | ||
1352 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) | 1364 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) |
1353 | { | 1365 | { |
1354 | // e->ignore(); | 1366 | // e->ignore(); |
1355 | //return; | 1367 | //return; |
1356 | //qDebug("KOTodoView::keyPressEvent "); | 1368 | //qDebug("KOTodoView::keyPressEvent "); |
1357 | switch ( e->key() ) { | 1369 | switch ( e->key() ) { |
1358 | case Qt::Key_Down: | 1370 | case Qt::Key_Down: |
1359 | case Qt::Key_Up: | 1371 | case Qt::Key_Up: |
1360 | QWidget::keyPressEvent ( e ); | 1372 | QWidget::keyPressEvent ( e ); |
1361 | break; | 1373 | break; |
1362 | 1374 | ||
1363 | case Qt::Key_Q: | 1375 | case Qt::Key_Q: |
1364 | toggleQuickTodo(); | 1376 | toggleQuickTodo(); |
1365 | break; | 1377 | break; |
1366 | case Qt::Key_U: | 1378 | case Qt::Key_U: |
1367 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1379 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1368 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1380 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1369 | unparentTodo(); | 1381 | unparentTodo(); |
1370 | e->accept(); | 1382 | e->accept(); |
1371 | } else | 1383 | } else |
1372 | e->ignore(); | 1384 | e->ignore(); |
1373 | break; | 1385 | break; |
1374 | case Qt::Key_S: | 1386 | case Qt::Key_S: |
1375 | if ( e->state() == Qt::ControlButton ) { | 1387 | if ( e->state() == Qt::ControlButton ) { |
1376 | e->ignore(); | 1388 | e->ignore(); |
1377 | break; | 1389 | break; |
1378 | } | 1390 | } |
1379 | if ( e->state() == Qt::ShiftButton ) { | 1391 | if ( e->state() == Qt::ShiftButton ) { |
1380 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1392 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1381 | reparentTodo(); | 1393 | reparentTodo(); |
1382 | e->accept(); | 1394 | e->accept(); |
1383 | } else | 1395 | } else |
1384 | e->ignore(); | 1396 | e->ignore(); |
1385 | break; | 1397 | break; |
1386 | case Qt::Key_P: | 1398 | case Qt::Key_P: |
1387 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1399 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1388 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1400 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1389 | if ( pendingSubtodo ) | 1401 | if ( pendingSubtodo ) |
1390 | itemClicked(mActiveItem); | 1402 | itemClicked(mActiveItem); |
1391 | e->accept(); | 1403 | e->accept(); |
1392 | } else | 1404 | } else |
1393 | e->ignore(); | 1405 | e->ignore(); |
1394 | break; | 1406 | break; |
1395 | case Qt::Key_Escape: | 1407 | case Qt::Key_Escape: |
1396 | if ( pendingSubtodo ) { | 1408 | if ( pendingSubtodo ) { |
1397 | itemClicked(0); | 1409 | itemClicked(0); |
1398 | e->accept(); | 1410 | e->accept(); |
1399 | } else | 1411 | } else |
1400 | e->ignore(); | 1412 | e->ignore(); |
1401 | break; | 1413 | break; |
1402 | default: | 1414 | default: |
1403 | e->ignore(); | 1415 | e->ignore(); |
1404 | } | 1416 | } |
1405 | 1417 | ||
1406 | if ( true ) { | 1418 | if ( true ) { |
1407 | if ( e->key() == Qt::Key_I ) { | 1419 | if ( e->key() == Qt::Key_I ) { |
1408 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); | 1420 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); |
1409 | if ( cn ) { | 1421 | if ( cn ) { |
1410 | mActiveItem = cn; | 1422 | mActiveItem = cn; |
1411 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 1423 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
1412 | if ( ci ){ | 1424 | if ( ci ){ |
1413 | showTodo(); | 1425 | showTodo(); |
1414 | cn = (KOTodoViewItem*)cn->itemBelow(); | 1426 | cn = (KOTodoViewItem*)cn->itemBelow(); |
1415 | if ( cn ) { | 1427 | if ( cn ) { |
1416 | mTodoListView->setCurrentItem ( cn ); | 1428 | mTodoListView->setCurrentItem ( cn ); |
1417 | mTodoListView->ensureItemVisible ( cn ); | 1429 | mTodoListView->ensureItemVisible ( cn ); |
1418 | } | 1430 | } |
1419 | 1431 | ||
1420 | } | 1432 | } |
1421 | } | 1433 | } |
1422 | e->accept(); | 1434 | e->accept(); |
1423 | 1435 | ||
1424 | } | 1436 | } |
1425 | 1437 | ||
1426 | } | 1438 | } |
1427 | 1439 | ||
1428 | } | 1440 | } |
1429 | void KOTodoView::updateTodo( Todo * t, int type ) | 1441 | void KOTodoView::updateTodo( Todo * t, int type ) |
1430 | { | 1442 | { |
1431 | if ( mBlockUpdate) | 1443 | if ( mBlockUpdate) |
1432 | return; | 1444 | return; |
1433 | 1445 | ||
1434 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 1446 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
1435 | itemIterator = mTodoMap.find(t); | 1447 | itemIterator = mTodoMap.find(t); |
1436 | if (itemIterator != mTodoMap.end()) { | 1448 | if (itemIterator != mTodoMap.end()) { |
1437 | (*itemIterator)->construct(); | 1449 | (*itemIterator)->construct(); |
1438 | } else { | 1450 | } else { |
1439 | if ( type == KOGlobals::EVENTADDED ) { | 1451 | if ( type == KOGlobals::EVENTADDED ) { |
1440 | insertTodoItem( t ); | 1452 | insertTodoItem( t ); |
1441 | } | 1453 | } |
1442 | } | 1454 | } |
1443 | 1455 | ||
1444 | } | 1456 | } |
1445 | 1457 | ||
1446 | void KOTodoView::todoModified(Todo * t , int p ) | 1458 | void KOTodoView::todoModified(Todo * t , int p ) |
1447 | { | 1459 | { |
1448 | mBlockUpdate = true; | 1460 | mBlockUpdate = true; |
1449 | emit todoModifiedSignal ( t, p ); | 1461 | emit todoModifiedSignal ( t, p ); |
1450 | mBlockUpdate = false; | 1462 | mBlockUpdate = false; |
1451 | } | 1463 | } |
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 002d3f2..f7e38a7 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -1,562 +1,573 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <kglobal.h> | 21 | #include <kglobal.h> |
22 | #include <kglobalsettings.h> | 22 | #include <kglobalsettings.h> |
23 | #include <klocale.h> | 23 | #include <klocale.h> |
24 | #include <kdebug.h> | 24 | #include <kdebug.h> |
25 | #include <qregexp.h> | 25 | #include <qregexp.h> |
26 | #include <qfileinfo.h> | 26 | #include <qfileinfo.h> |
27 | 27 | ||
28 | #include "calendarlocal.h" | 28 | #include "calendarlocal.h" |
29 | #include "icalformat.h" | 29 | #include "icalformat.h" |
30 | #include "todo.h" | 30 | #include "todo.h" |
31 | 31 | ||
32 | using namespace KCal; | 32 | using namespace KCal; |
33 | 33 | ||
34 | Todo::Todo(): QObject(), Incidence() | 34 | Todo::Todo(): QObject(), Incidence() |
35 | { | 35 | { |
36 | // mStatus = TENTATIVE; | 36 | // mStatus = TENTATIVE; |
37 | 37 | ||
38 | mHasDueDate = false; | 38 | mHasDueDate = false; |
39 | setHasStartDate( false ); | 39 | setHasStartDate( false ); |
40 | mCompleted = getEvenTime(QDateTime::currentDateTime()); | 40 | mCompleted = getEvenTime(QDateTime::currentDateTime()); |
41 | mHasCompletedDate = false; | 41 | mHasCompletedDate = false; |
42 | mPercentComplete = 0; | 42 | mPercentComplete = 0; |
43 | mRunning = false; | 43 | mRunning = false; |
44 | mRunSaveTimer = 0; | 44 | mRunSaveTimer = 0; |
45 | } | 45 | } |
46 | 46 | ||
47 | Todo::Todo(const Todo &t) : QObject(),Incidence(t) | 47 | Todo::Todo(const Todo &t) : QObject(),Incidence(t) |
48 | { | 48 | { |
49 | mDtDue = t.mDtDue; | 49 | mDtDue = t.mDtDue; |
50 | mHasDueDate = t.mHasDueDate; | 50 | mHasDueDate = t.mHasDueDate; |
51 | mCompleted = t.mCompleted; | 51 | mCompleted = t.mCompleted; |
52 | mHasCompletedDate = t.mHasCompletedDate; | 52 | mHasCompletedDate = t.mHasCompletedDate; |
53 | mPercentComplete = t.mPercentComplete; | 53 | mPercentComplete = t.mPercentComplete; |
54 | mRunning = false; | 54 | mRunning = false; |
55 | mRunSaveTimer = 0; | 55 | mRunSaveTimer = 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | Todo::~Todo() | 58 | Todo::~Todo() |
59 | { | 59 | { |
60 | setRunning( false ); | 60 | setRunning( false ); |
61 | //qDebug("Todo::~Todo() "); | 61 | //qDebug("Todo::~Todo() "); |
62 | } | 62 | } |
63 | 63 | ||
64 | void Todo::setRunningFalse( QString s ) | ||
65 | { | ||
66 | if ( ! mRunning ) | ||
67 | return; | ||
68 | mRunning = false; | ||
69 | mRunSaveTimer->stop(); | ||
70 | saveRunningInfoToFile( s ); | ||
71 | } | ||
64 | void Todo::setRunning( bool run ) | 72 | void Todo::setRunning( bool run ) |
65 | { | 73 | { |
66 | if ( run == mRunning ) | 74 | if ( run == mRunning ) |
67 | return; | 75 | return; |
68 | //qDebug("Todo::setRunning %d ", run); | 76 | //qDebug("Todo::setRunning %d ", run); |
69 | if ( !mRunSaveTimer ) { | 77 | if ( !mRunSaveTimer ) { |
70 | mRunSaveTimer = new QTimer ( this ); | 78 | mRunSaveTimer = new QTimer ( this ); |
71 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); | 79 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); |
72 | } | 80 | } |
73 | mRunning = run; | 81 | mRunning = run; |
74 | if ( mRunning ) { | 82 | if ( mRunning ) { |
75 | mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min | 83 | mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min |
76 | mRunStart = QDateTime::currentDateTime(); | 84 | mRunStart = QDateTime::currentDateTime(); |
77 | } else { | 85 | } else { |
78 | mRunSaveTimer->stop(); | 86 | mRunSaveTimer->stop(); |
79 | saveRunningInfoToFile(); | 87 | saveRunningInfoToFile(); |
80 | } | 88 | } |
81 | } | 89 | } |
82 | 90 | ||
83 | void Todo::saveRunningInfoToFile() | 91 | void Todo::saveRunningInfoToFile( QString comment ) |
84 | { | 92 | { |
85 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); | 93 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); |
86 | if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { | 94 | if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { |
87 | qDebug("Running time < 30 seconds. Skipped. "); | 95 | qDebug("Running time < 30 seconds. Skipped. "); |
88 | return; | 96 | return; |
89 | } | 97 | } |
90 | QString dir = KGlobalSettings::timeTrackerDir(); | 98 | QString dir = KGlobalSettings::timeTrackerDir(); |
91 | //qDebug("%s ", dir.latin1()); | 99 | //qDebug("%s ", dir.latin1()); |
92 | QString file = "%1%2%3-%4%5%6-"; | 100 | QString file = "%1%2%3-%4%5%6-"; |
93 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); | 101 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); |
94 | file.replace ( QRegExp (" "), "0" ); | 102 | file.replace ( QRegExp (" "), "0" ); |
95 | file += uid(); | 103 | file += uid(); |
96 | //qDebug("File %s ",file.latin1() ); | 104 | //qDebug("File %s ",file.latin1() ); |
97 | CalendarLocal cal; | 105 | CalendarLocal cal; |
98 | cal.setLocalTime(); | 106 | cal.setLocalTime(); |
99 | Todo * to = (Todo*) clone(); | 107 | Todo * to = (Todo*) clone(); |
100 | to->setFloats( false ); | 108 | to->setFloats( false ); |
101 | to->setDtStart( mRunStart ); | 109 | to->setDtStart( mRunStart ); |
102 | to->setHasStartDate( true ); | 110 | to->setHasStartDate( true ); |
103 | to->setDtDue( QDateTime::currentDateTime() ); | 111 | to->setDtDue( QDateTime::currentDateTime() ); |
104 | to->setHasDueDate( true ); | 112 | to->setHasDueDate( true ); |
105 | to->setUid( file ); | 113 | to->setUid( file ); |
114 | if ( !comment.isEmpty() ) { | ||
115 | to->setDescription( comment ); | ||
116 | } | ||
106 | cal.addIncidence( to ); | 117 | cal.addIncidence( to ); |
107 | ICalFormat format; | 118 | ICalFormat format; |
108 | file = dir +"/" +file +".ics"; | 119 | file = dir +"/" +file +".ics"; |
109 | format.save( &cal, file ); | 120 | format.save( &cal, file ); |
110 | saveParents(); | 121 | saveParents(); |
111 | 122 | ||
112 | } | 123 | } |
113 | void Todo::saveParents() | 124 | void Todo::saveParents() |
114 | { | 125 | { |
115 | if (!relatedTo() ) | 126 | if (!relatedTo() ) |
116 | return; | 127 | return; |
117 | Incidence * inc = relatedTo(); | 128 | Incidence * inc = relatedTo(); |
118 | if ( inc->type() != "Todo" ) | 129 | if ( inc->type() != "Todo" ) |
119 | return; | 130 | return; |
120 | Todo* to = (Todo*)inc; | 131 | Todo* to = (Todo*)inc; |
121 | bool saveTodo = false; | 132 | bool saveTodo = false; |
122 | QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; | 133 | QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; |
123 | QFileInfo fi ( file ); | 134 | QFileInfo fi ( file ); |
124 | if ( fi.exists() ) { | 135 | if ( fi.exists() ) { |
125 | if ( fi.lastModified () < to->lastModified ()) | 136 | if ( fi.lastModified () < to->lastModified ()) |
126 | saveTodo = true; | 137 | saveTodo = true; |
127 | } else { | 138 | } else { |
128 | saveTodo = true; | 139 | saveTodo = true; |
129 | } | 140 | } |
130 | if ( saveTodo ) { | 141 | if ( saveTodo ) { |
131 | CalendarLocal cal; | 142 | CalendarLocal cal; |
132 | cal.setLocalTime(); | 143 | cal.setLocalTime(); |
133 | Todo * par = (Todo *) to->clone(); | 144 | Todo * par = (Todo *) to->clone(); |
134 | cal.addIncidence( par ); | 145 | cal.addIncidence( par ); |
135 | ICalFormat format; | 146 | ICalFormat format; |
136 | format.save( &cal, file ); | 147 | format.save( &cal, file ); |
137 | } | 148 | } |
138 | to->saveParents(); | 149 | to->saveParents(); |
139 | } | 150 | } |
140 | 151 | ||
141 | int Todo::runTime() | 152 | int Todo::runTime() |
142 | { | 153 | { |
143 | if ( !mRunning ) | 154 | if ( !mRunning ) |
144 | return 0; | 155 | return 0; |
145 | return mRunStart.secsTo( QDateTime::currentDateTime() ); | 156 | return mRunStart.secsTo( QDateTime::currentDateTime() ); |
146 | } | 157 | } |
147 | bool Todo::hasRunningSub() | 158 | bool Todo::hasRunningSub() |
148 | { | 159 | { |
149 | if ( mRunning ) | 160 | if ( mRunning ) |
150 | return true; | 161 | return true; |
151 | Incidence *aTodo; | 162 | Incidence *aTodo; |
152 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { | 163 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { |
153 | if ( ((Todo*)aTodo)->hasRunningSub() ) | 164 | if ( ((Todo*)aTodo)->hasRunningSub() ) |
154 | return true; | 165 | return true; |
155 | } | 166 | } |
156 | return false; | 167 | return false; |
157 | } | 168 | } |
158 | Incidence *Todo::clone() | 169 | Incidence *Todo::clone() |
159 | { | 170 | { |
160 | return new Todo(*this); | 171 | return new Todo(*this); |
161 | } | 172 | } |
162 | 173 | ||
163 | bool Todo::contains ( Todo* from ) | 174 | bool Todo::contains ( Todo* from ) |
164 | { | 175 | { |
165 | 176 | ||
166 | if ( !from->summary().isEmpty() ) | 177 | if ( !from->summary().isEmpty() ) |
167 | if ( !summary().startsWith( from->summary() )) | 178 | if ( !summary().startsWith( from->summary() )) |
168 | return false; | 179 | return false; |
169 | if ( from->hasStartDate() ) { | 180 | if ( from->hasStartDate() ) { |
170 | if ( !hasStartDate() ) | 181 | if ( !hasStartDate() ) |
171 | return false; | 182 | return false; |
172 | if ( from->dtStart() != dtStart()) | 183 | if ( from->dtStart() != dtStart()) |
173 | return false; | 184 | return false; |
174 | } | 185 | } |
175 | if ( from->hasDueDate() ){ | 186 | if ( from->hasDueDate() ){ |
176 | if ( !hasDueDate() ) | 187 | if ( !hasDueDate() ) |
177 | return false; | 188 | return false; |
178 | if ( from->dtDue() != dtDue()) | 189 | if ( from->dtDue() != dtDue()) |
179 | return false; | 190 | return false; |
180 | } | 191 | } |
181 | if ( !from->location().isEmpty() ) | 192 | if ( !from->location().isEmpty() ) |
182 | if ( !location().startsWith( from->location() ) ) | 193 | if ( !location().startsWith( from->location() ) ) |
183 | return false; | 194 | return false; |
184 | if ( !from->description().isEmpty() ) | 195 | if ( !from->description().isEmpty() ) |
185 | if ( !description().startsWith( from->description() )) | 196 | if ( !description().startsWith( from->description() )) |
186 | return false; | 197 | return false; |
187 | if ( from->alarms().count() ) { | 198 | if ( from->alarms().count() ) { |
188 | Alarm *a = from->alarms().first(); | 199 | Alarm *a = from->alarms().first(); |
189 | if ( a->enabled() ){ | 200 | if ( a->enabled() ){ |
190 | if ( !alarms().count() ) | 201 | if ( !alarms().count() ) |
191 | return false; | 202 | return false; |
192 | Alarm *b = alarms().first(); | 203 | Alarm *b = alarms().first(); |
193 | if( ! b->enabled() ) | 204 | if( ! b->enabled() ) |
194 | return false; | 205 | return false; |
195 | if ( ! (a->offset() == b->offset() )) | 206 | if ( ! (a->offset() == b->offset() )) |
196 | return false; | 207 | return false; |
197 | } | 208 | } |
198 | } | 209 | } |
199 | 210 | ||
200 | QStringList cat = categories(); | 211 | QStringList cat = categories(); |
201 | QStringList catFrom = from->categories(); | 212 | QStringList catFrom = from->categories(); |
202 | QString nCat; | 213 | QString nCat; |
203 | unsigned int iii; | 214 | unsigned int iii; |
204 | for ( iii = 0; iii < catFrom.count();++iii ) { | 215 | for ( iii = 0; iii < catFrom.count();++iii ) { |
205 | nCat = catFrom[iii]; | 216 | nCat = catFrom[iii]; |
206 | if ( !nCat.isEmpty() ) | 217 | if ( !nCat.isEmpty() ) |
207 | if ( !cat.contains( nCat )) { | 218 | if ( !cat.contains( nCat )) { |
208 | return false; | 219 | return false; |
209 | } | 220 | } |
210 | } | 221 | } |
211 | if ( from->isCompleted() ) { | 222 | if ( from->isCompleted() ) { |
212 | if ( !isCompleted() ) | 223 | if ( !isCompleted() ) |
213 | return false; | 224 | return false; |
214 | } | 225 | } |
215 | if( priority() != from->priority() ) | 226 | if( priority() != from->priority() ) |
216 | return false; | 227 | return false; |
217 | 228 | ||
218 | 229 | ||
219 | return true; | 230 | return true; |
220 | 231 | ||
221 | } | 232 | } |
222 | bool KCal::operator==( const Todo& t1, const Todo& t2 ) | 233 | bool KCal::operator==( const Todo& t1, const Todo& t2 ) |
223 | { | 234 | { |
224 | 235 | ||
225 | bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); | 236 | bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); |
226 | if ( ! ret ) | 237 | if ( ! ret ) |
227 | return false; | 238 | return false; |
228 | if ( t1.hasDueDate() == t2.hasDueDate() ) { | 239 | if ( t1.hasDueDate() == t2.hasDueDate() ) { |
229 | if ( t1.hasDueDate() ) { | 240 | if ( t1.hasDueDate() ) { |
230 | if ( t1.doesFloat() == t2.doesFloat() ) { | 241 | if ( t1.doesFloat() == t2.doesFloat() ) { |
231 | if ( t1.doesFloat() ) { | 242 | if ( t1.doesFloat() ) { |
232 | if ( t1.dtDue().date() != t2.dtDue().date() ) | 243 | if ( t1.dtDue().date() != t2.dtDue().date() ) |
233 | return false; | 244 | return false; |
234 | } else | 245 | } else |
235 | if ( t1.dtDue() != t2.dtDue() ) | 246 | if ( t1.dtDue() != t2.dtDue() ) |
236 | return false; | 247 | return false; |
237 | } else | 248 | } else |
238 | return false;// float != | 249 | return false;// float != |
239 | } | 250 | } |
240 | 251 | ||
241 | } else | 252 | } else |
242 | return false; | 253 | return false; |
243 | if ( t1.percentComplete() != t2.percentComplete() ) | 254 | if ( t1.percentComplete() != t2.percentComplete() ) |
244 | return false; | 255 | return false; |
245 | if ( t1.isCompleted() ) { | 256 | if ( t1.isCompleted() ) { |
246 | if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) { | 257 | if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) { |
247 | if ( t1.hasCompletedDate() ) { | 258 | if ( t1.hasCompletedDate() ) { |
248 | if ( t1.completed() != t2.completed() ) | 259 | if ( t1.completed() != t2.completed() ) |
249 | return false; | 260 | return false; |
250 | } | 261 | } |
251 | 262 | ||
252 | } else | 263 | } else |
253 | return false; | 264 | return false; |
254 | } | 265 | } |
255 | return true; | 266 | return true; |
256 | 267 | ||
257 | } | 268 | } |
258 | 269 | ||
259 | void Todo::setDtDue(const QDateTime &dtDue) | 270 | void Todo::setDtDue(const QDateTime &dtDue) |
260 | { | 271 | { |
261 | //int diffsecs = mDtDue.secsTo(dtDue); | 272 | //int diffsecs = mDtDue.secsTo(dtDue); |
262 | 273 | ||
263 | /*if (mReadOnly) return; | 274 | /*if (mReadOnly) return; |
264 | const QPtrList<Alarm>& alarms = alarms(); | 275 | const QPtrList<Alarm>& alarms = alarms(); |
265 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) { | 276 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) { |
266 | if (alarm->enabled()) { | 277 | if (alarm->enabled()) { |
267 | alarm->setTime(alarm->time().addSecs(diffsecs)); | 278 | alarm->setTime(alarm->time().addSecs(diffsecs)); |
268 | } | 279 | } |
269 | }*/ | 280 | }*/ |
270 | mDtDue = getEvenTime(dtDue); | 281 | mDtDue = getEvenTime(dtDue); |
271 | 282 | ||
272 | //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl; | 283 | //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl; |
273 | 284 | ||
274 | /*const QPtrList<Alarm>& alarms = alarms(); | 285 | /*const QPtrList<Alarm>& alarms = alarms(); |
275 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) | 286 | for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) |
276 | alarm->setAlarmStart(mDtDue);*/ | 287 | alarm->setAlarmStart(mDtDue);*/ |
277 | updated(); | 288 | updated(); |
278 | } | 289 | } |
279 | 290 | ||
280 | QDateTime Todo::dtDue() const | 291 | QDateTime Todo::dtDue() const |
281 | { | 292 | { |
282 | return mDtDue; | 293 | return mDtDue; |
283 | } | 294 | } |
284 | 295 | ||
285 | QString Todo::dtDueTimeStr() const | 296 | QString Todo::dtDueTimeStr() const |
286 | { | 297 | { |
287 | return KGlobal::locale()->formatTime(mDtDue.time()); | 298 | return KGlobal::locale()->formatTime(mDtDue.time()); |
288 | } | 299 | } |
289 | 300 | ||
290 | QString Todo::dtDueDateStr(bool shortfmt) const | 301 | QString Todo::dtDueDateStr(bool shortfmt) const |
291 | { | 302 | { |
292 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); | 303 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); |
293 | } | 304 | } |
294 | 305 | ||
295 | QString Todo::dtDueStr(bool shortfmt) const | 306 | QString Todo::dtDueStr(bool shortfmt) const |
296 | { | 307 | { |
297 | if ( doesFloat() ) | 308 | if ( doesFloat() ) |
298 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); | 309 | return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); |
299 | return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); | 310 | return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); |
300 | } | 311 | } |
301 | // retval 0 : no found | 312 | // retval 0 : no found |
302 | // 1 : due for date found | 313 | // 1 : due for date found |
303 | // 2 : overdue for date found | 314 | // 2 : overdue for date found |
304 | int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ) | 315 | int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ) |
305 | { | 316 | { |
306 | int retval = 0; | 317 | int retval = 0; |
307 | if ( isCompleted() ) | 318 | if ( isCompleted() ) |
308 | return 0; | 319 | return 0; |
309 | if ( hasDueDate() ) { | 320 | if ( hasDueDate() ) { |
310 | if ( dtDue().date() < date ) | 321 | if ( dtDue().date() < date ) |
311 | return 2; | 322 | return 2; |
312 | // we do not return, because we may find an overdue sub todo | 323 | // we do not return, because we may find an overdue sub todo |
313 | if ( dtDue().date() == date ) | 324 | if ( dtDue().date() == date ) |
314 | retval = 1; | 325 | retval = 1; |
315 | } | 326 | } |
316 | if ( checkSubtodos ) { | 327 | if ( checkSubtodos ) { |
317 | Incidence *aTodo; | 328 | Incidence *aTodo; |
318 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { | 329 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { |
319 | int ret = ((Todo*)aTodo)->hasDueSubTodoForDate( date ,checkSubtodos ); | 330 | int ret = ((Todo*)aTodo)->hasDueSubTodoForDate( date ,checkSubtodos ); |
320 | if ( ret == 2 ) | 331 | if ( ret == 2 ) |
321 | return 2; | 332 | return 2; |
322 | if ( ret == 1) | 333 | if ( ret == 1) |
323 | retval = 1; | 334 | retval = 1; |
324 | } | 335 | } |
325 | } | 336 | } |
326 | return retval; | 337 | return retval; |
327 | } | 338 | } |
328 | int Todo::hasDueSubTodo( bool checkSubtodos ) //= true | 339 | int Todo::hasDueSubTodo( bool checkSubtodos ) //= true |
329 | { | 340 | { |
330 | return hasDueSubTodoForDate(QDate::currentDate(), checkSubtodos ); | 341 | return hasDueSubTodoForDate(QDate::currentDate(), checkSubtodos ); |
331 | } | 342 | } |
332 | bool Todo::hasDueDate() const | 343 | bool Todo::hasDueDate() const |
333 | { | 344 | { |
334 | return mHasDueDate; | 345 | return mHasDueDate; |
335 | } | 346 | } |
336 | 347 | ||
337 | void Todo::setHasDueDate(bool f) | 348 | void Todo::setHasDueDate(bool f) |
338 | { | 349 | { |
339 | if (mReadOnly) return; | 350 | if (mReadOnly) return; |
340 | mHasDueDate = f; | 351 | mHasDueDate = f; |
341 | updated(); | 352 | updated(); |
342 | } | 353 | } |
343 | 354 | ||
344 | 355 | ||
345 | #if 0 | 356 | #if 0 |
346 | void Todo::setStatus(const QString &statStr) | 357 | void Todo::setStatus(const QString &statStr) |
347 | { | 358 | { |
348 | if (mReadOnly) return; | 359 | if (mReadOnly) return; |
349 | QString ss(statStr.upper()); | 360 | QString ss(statStr.upper()); |
350 | 361 | ||
351 | if (ss == "X-ACTION") | 362 | if (ss == "X-ACTION") |
352 | mStatus = NEEDS_ACTION; | 363 | mStatus = NEEDS_ACTION; |
353 | else if (ss == "NEEDS ACTION") | 364 | else if (ss == "NEEDS ACTION") |
354 | mStatus = NEEDS_ACTION; | 365 | mStatus = NEEDS_ACTION; |
355 | else if (ss == "ACCEPTED") | 366 | else if (ss == "ACCEPTED") |
356 | mStatus = ACCEPTED; | 367 | mStatus = ACCEPTED; |
357 | else if (ss == "SENT") | 368 | else if (ss == "SENT") |
358 | mStatus = SENT; | 369 | mStatus = SENT; |
359 | else if (ss == "TENTATIVE") | 370 | else if (ss == "TENTATIVE") |
360 | mStatus = TENTATIVE; | 371 | mStatus = TENTATIVE; |
361 | else if (ss == "CONFIRMED") | 372 | else if (ss == "CONFIRMED") |
362 | mStatus = CONFIRMED; | 373 | mStatus = CONFIRMED; |
363 | else if (ss == "DECLINED") | 374 | else if (ss == "DECLINED") |
364 | mStatus = DECLINED; | 375 | mStatus = DECLINED; |
365 | else if (ss == "COMPLETED") | 376 | else if (ss == "COMPLETED") |
366 | mStatus = COMPLETED; | 377 | mStatus = COMPLETED; |
367 | else if (ss == "DELEGATED") | 378 | else if (ss == "DELEGATED") |
368 | mStatus = DELEGATED; | 379 | mStatus = DELEGATED; |
369 | 380 | ||
370 | updated(); | 381 | updated(); |
371 | } | 382 | } |
372 | 383 | ||
373 | void Todo::setStatus(int status) | 384 | void Todo::setStatus(int status) |
374 | { | 385 | { |
375 | if (mReadOnly) return; | 386 | if (mReadOnly) return; |
376 | mStatus = status; | 387 | mStatus = status; |
377 | updated(); | 388 | updated(); |
378 | } | 389 | } |
379 | 390 | ||
380 | int Todo::status() const | 391 | int Todo::status() const |
381 | { | 392 | { |
382 | return mStatus; | 393 | return mStatus; |
383 | } | 394 | } |
384 | 395 | ||
385 | QString Todo::statusStr() const | 396 | QString Todo::statusStr() const |
386 | { | 397 | { |
387 | switch(mStatus) { | 398 | switch(mStatus) { |
388 | case NEEDS_ACTION: | 399 | case NEEDS_ACTION: |
389 | return QString("NEEDS ACTION"); | 400 | return QString("NEEDS ACTION"); |
390 | break; | 401 | break; |
391 | case ACCEPTED: | 402 | case ACCEPTED: |
392 | return QString("ACCEPTED"); | 403 | return QString("ACCEPTED"); |
393 | break; | 404 | break; |
394 | case SENT: | 405 | case SENT: |
395 | return QString("SENT"); | 406 | return QString("SENT"); |
396 | break; | 407 | break; |
397 | case TENTATIVE: | 408 | case TENTATIVE: |
398 | return QString("TENTATIVE"); | 409 | return QString("TENTATIVE"); |
399 | break; | 410 | break; |
400 | case CONFIRMED: | 411 | case CONFIRMED: |
401 | return QString("CONFIRMED"); | 412 | return QString("CONFIRMED"); |
402 | break; | 413 | break; |
403 | case DECLINED: | 414 | case DECLINED: |
404 | return QString("DECLINED"); | 415 | return QString("DECLINED"); |
405 | break; | 416 | break; |
406 | case COMPLETED: | 417 | case COMPLETED: |
407 | return QString("COMPLETED"); | 418 | return QString("COMPLETED"); |
408 | break; | 419 | break; |
409 | case DELEGATED: | 420 | case DELEGATED: |
410 | return QString("DELEGATED"); | 421 | return QString("DELEGATED"); |
411 | break; | 422 | break; |
412 | } | 423 | } |
413 | return QString(""); | 424 | return QString(""); |
414 | } | 425 | } |
415 | #endif | 426 | #endif |
416 | 427 | ||
417 | bool Todo::isCompleted() const | 428 | bool Todo::isCompleted() const |
418 | { | 429 | { |
419 | if (mPercentComplete == 100) { | 430 | if (mPercentComplete == 100) { |
420 | return true; | 431 | return true; |
421 | } | 432 | } |
422 | else return false; | 433 | else return false; |
423 | } | 434 | } |
424 | 435 | ||
425 | void Todo::setCompleted(bool completed) | 436 | void Todo::setCompleted(bool completed) |
426 | { | 437 | { |
427 | if ( mHasRecurrenceID && completed && mPercentComplete != 100 ) { | 438 | if ( mHasRecurrenceID && completed && mPercentComplete != 100 ) { |
428 | if ( !setRecurDates() ) | 439 | if ( !setRecurDates() ) |
429 | completed = false; | 440 | completed = false; |
430 | } | 441 | } |
431 | if (completed) mPercentComplete = 100; | 442 | if (completed) mPercentComplete = 100; |
432 | else { | 443 | else { |
433 | mPercentComplete = 0; | 444 | mPercentComplete = 0; |
434 | mHasCompletedDate = false; | 445 | mHasCompletedDate = false; |
435 | } | 446 | } |
436 | updated(); | 447 | updated(); |
437 | } | 448 | } |
438 | 449 | ||
439 | QDateTime Todo::completed() const | 450 | QDateTime Todo::completed() const |
440 | { | 451 | { |
441 | return mCompleted; | 452 | return mCompleted; |
442 | } | 453 | } |
443 | 454 | ||
444 | QString Todo::completedStr( bool shortF ) const | 455 | QString Todo::completedStr( bool shortF ) const |
445 | { | 456 | { |
446 | return KGlobal::locale()->formatDateTime(mCompleted, shortF); | 457 | return KGlobal::locale()->formatDateTime(mCompleted, shortF); |
447 | } | 458 | } |
448 | 459 | ||
449 | void Todo::setCompleted(const QDateTime &completed) | 460 | void Todo::setCompleted(const QDateTime &completed) |
450 | { | 461 | { |
451 | //qDebug("Todo::setCompleted "); | 462 | //qDebug("Todo::setCompleted "); |
452 | if ( mHasCompletedDate ) { | 463 | if ( mHasCompletedDate ) { |
453 | // qDebug("has completed data - return "); | 464 | // qDebug("has completed data - return "); |
454 | return; | 465 | return; |
455 | } | 466 | } |
456 | mHasCompletedDate = true; | 467 | mHasCompletedDate = true; |
457 | mPercentComplete = 100; | 468 | mPercentComplete = 100; |
458 | mCompleted = getEvenTime(completed); | 469 | mCompleted = getEvenTime(completed); |
459 | updated(); | 470 | updated(); |
460 | } | 471 | } |
461 | 472 | ||
462 | bool Todo::hasCompletedDate() const | 473 | bool Todo::hasCompletedDate() const |
463 | { | 474 | { |
464 | return mHasCompletedDate; | 475 | return mHasCompletedDate; |
465 | } | 476 | } |
466 | 477 | ||
467 | int Todo::percentComplete() const | 478 | int Todo::percentComplete() const |
468 | { | 479 | { |
469 | return mPercentComplete; | 480 | return mPercentComplete; |
470 | } | 481 | } |
471 | bool Todo::setRecurDates() | 482 | bool Todo::setRecurDates() |
472 | { | 483 | { |
473 | if ( !mHasRecurrenceID ) | 484 | if ( !mHasRecurrenceID ) |
474 | return true; | 485 | return true; |
475 | int secs = mDtStart.secsTo( dtDue() ); | 486 | int secs = mDtStart.secsTo( dtDue() ); |
476 | bool ok; | 487 | bool ok; |
477 | qDebug("T:setRecurDates() "); | 488 | qDebug("T:setRecurDates() "); |
478 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 489 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
479 | QDateTime next = getNextOccurence( mRecurrenceID, &ok ); | 490 | QDateTime next = getNextOccurence( mRecurrenceID, &ok ); |
480 | if ( ok ) { | 491 | if ( ok ) { |
481 | mRecurrenceID = next; | 492 | mRecurrenceID = next; |
482 | mDtStart = next; | 493 | mDtStart = next; |
483 | setDtDue( next.addSecs( secs ) ); | 494 | setDtDue( next.addSecs( secs ) ); |
484 | if ( QDateTime::currentDateTime() > next) | 495 | if ( QDateTime::currentDateTime() > next) |
485 | return false; | 496 | return false; |
486 | } else { | 497 | } else { |
487 | setHasRecurrenceID( false ); | 498 | setHasRecurrenceID( false ); |
488 | recurrence()->unsetRecurs(); | 499 | recurrence()->unsetRecurs(); |
489 | } | 500 | } |
490 | return true; | 501 | return true; |
491 | } | 502 | } |
492 | void Todo::setPercentComplete(int v) | 503 | void Todo::setPercentComplete(int v) |
493 | { | 504 | { |
494 | if ( mHasRecurrenceID && v == 100 && mPercentComplete != 100 ) { | 505 | if ( mHasRecurrenceID && v == 100 && mPercentComplete != 100 ) { |
495 | if ( !setRecurDates() ) | 506 | if ( !setRecurDates() ) |
496 | v = 0; | 507 | v = 0; |
497 | } | 508 | } |
498 | mPercentComplete = v; | 509 | mPercentComplete = v; |
499 | if ( v != 100 ) | 510 | if ( v != 100 ) |
500 | mHasCompletedDate = false; | 511 | mHasCompletedDate = false; |
501 | updated(); | 512 | updated(); |
502 | } | 513 | } |
503 | QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const | 514 | QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const |
504 | { | 515 | { |
505 | if ( isCompleted() || ! hasDueDate() || cancelled() ) { | 516 | if ( isCompleted() || ! hasDueDate() || cancelled() ) { |
506 | *ok = false; | 517 | *ok = false; |
507 | return QDateTime (); | 518 | return QDateTime (); |
508 | } | 519 | } |
509 | QDateTime incidenceStart; | 520 | QDateTime incidenceStart; |
510 | incidenceStart = dtDue(); | 521 | incidenceStart = dtDue(); |
511 | bool enabled = false; | 522 | bool enabled = false; |
512 | Alarm* alarm; | 523 | Alarm* alarm; |
513 | int off = 0; | 524 | int off = 0; |
514 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; | 525 | QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; |
515 | // if ( QDateTime::currentDateTime() > incidenceStart ){ | 526 | // if ( QDateTime::currentDateTime() > incidenceStart ){ |
516 | // *ok = false; | 527 | // *ok = false; |
517 | // return incidenceStart; | 528 | // return incidenceStart; |
518 | // } | 529 | // } |
519 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 530 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |
520 | if (alarm->enabled()) { | 531 | if (alarm->enabled()) { |
521 | if ( alarm->hasTime () ) { | 532 | if ( alarm->hasTime () ) { |
522 | if ( alarm->time() < alarmStart ) { | 533 | if ( alarm->time() < alarmStart ) { |
523 | alarmStart = alarm->time(); | 534 | alarmStart = alarm->time(); |
524 | enabled = true; | 535 | enabled = true; |
525 | off = alarmStart.secsTo( incidenceStart ); | 536 | off = alarmStart.secsTo( incidenceStart ); |
526 | } | 537 | } |
527 | 538 | ||
528 | } else { | 539 | } else { |
529 | int secs = alarm->startOffset().asSeconds(); | 540 | int secs = alarm->startOffset().asSeconds(); |
530 | if ( incidenceStart.addSecs( secs ) < alarmStart ) { | 541 | if ( incidenceStart.addSecs( secs ) < alarmStart ) { |
531 | alarmStart = incidenceStart.addSecs( secs ); | 542 | alarmStart = incidenceStart.addSecs( secs ); |
532 | enabled = true; | 543 | enabled = true; |
533 | off = -secs; | 544 | off = -secs; |
534 | } | 545 | } |
535 | } | 546 | } |
536 | } | 547 | } |
537 | } | 548 | } |
538 | if ( enabled ) { | 549 | if ( enabled ) { |
539 | if ( alarmStart > QDateTime::currentDateTime() ) { | 550 | if ( alarmStart > QDateTime::currentDateTime() ) { |
540 | *ok = true; | 551 | *ok = true; |
541 | * offset = off; | 552 | * offset = off; |
542 | return alarmStart; | 553 | return alarmStart; |
543 | } | 554 | } |
544 | } | 555 | } |
545 | *ok = false; | 556 | *ok = false; |
546 | return QDateTime (); | 557 | return QDateTime (); |
547 | 558 | ||
548 | } | 559 | } |
549 | 560 | ||
550 | void Todo::checkSetCompletedFalse() | 561 | void Todo::checkSetCompletedFalse() |
551 | { | 562 | { |
552 | if ( !hasRecurrenceID() ) { | 563 | if ( !hasRecurrenceID() ) { |
553 | qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); | 564 | qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); |
554 | } | 565 | } |
555 | // qDebug("Todo::checkSetCompletedFalse()"); | 566 | // qDebug("Todo::checkSetCompletedFalse()"); |
556 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 567 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
557 | if ( mPercentComplete == 100 && mDtStart == mRecurrenceID && QDateTime::currentDateTime() > mDtStart) { | 568 | if ( mPercentComplete == 100 && mDtStart == mRecurrenceID && QDateTime::currentDateTime() > mDtStart) { |
558 | qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 569 | qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
559 | setCompleted( false ); | 570 | setCompleted( false ); |
560 | qDebug("Todo::checkSetCompletedFalse "); | 571 | qDebug("Todo::checkSetCompletedFalse "); |
561 | } | 572 | } |
562 | } | 573 | } |
diff --git a/libkcal/todo.h b/libkcal/todo.h index ec1ffda..a5354ce 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h | |||
@@ -1,149 +1,150 @@ | |||
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 TODO_H | 20 | #ifndef TODO_H |
21 | #define TODO_H | 21 | #define TODO_H |
22 | // | 22 | // |
23 | // Todo component, representing a VTODO object | 23 | // Todo component, representing a VTODO object |
24 | // | 24 | // |
25 | 25 | ||
26 | #include "incidence.h" | 26 | #include "incidence.h" |
27 | 27 | ||
28 | #include <qtimer.h> | 28 | #include <qtimer.h> |
29 | 29 | ||
30 | namespace KCal { | 30 | namespace KCal { |
31 | 31 | ||
32 | /** | 32 | /** |
33 | This class provides a Todo in the sense of RFC2445. | 33 | This class provides a Todo in the sense of RFC2445. |
34 | */ | 34 | */ |
35 | class Todo : public QObject,public Incidence | 35 | class Todo : public QObject,public Incidence |
36 | { | 36 | { |
37 | Q_OBJECT | 37 | Q_OBJECT |
38 | public: | 38 | public: |
39 | Todo(); | 39 | Todo(); |
40 | Todo(const Todo &); | 40 | Todo(const Todo &); |
41 | ~Todo(); | 41 | ~Todo(); |
42 | typedef ListBase<Todo> List; | 42 | typedef ListBase<Todo> List; |
43 | QCString type() const { return "Todo"; } | 43 | QCString type() const { return "Todo"; } |
44 | 44 | ||
45 | /** Return an exact copy of this todo. */ | 45 | /** Return an exact copy of this todo. */ |
46 | Incidence *clone(); | 46 | Incidence *clone(); |
47 | QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; | 47 | QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; |
48 | 48 | ||
49 | /** for setting the todo's due date/time with a QDateTime. */ | 49 | /** for setting the todo's due date/time with a QDateTime. */ |
50 | void setDtDue(const QDateTime &dtDue); | 50 | void setDtDue(const QDateTime &dtDue); |
51 | /** returns an event's Due date/time as a QDateTime. */ | 51 | /** returns an event's Due date/time as a QDateTime. */ |
52 | QDateTime dtDue() const; | 52 | QDateTime dtDue() const; |
53 | /** returns an event's due time as a string formatted according to the | 53 | /** returns an event's due time as a string formatted according to the |
54 | users locale settings */ | 54 | users locale settings */ |
55 | QString dtDueTimeStr() const; | 55 | QString dtDueTimeStr() const; |
56 | /** returns an event's due date as a string formatted according to the | 56 | /** returns an event's due date as a string formatted according to the |
57 | users locale settings */ | 57 | users locale settings */ |
58 | QString dtDueDateStr(bool shortfmt=true) const; | 58 | QString dtDueDateStr(bool shortfmt=true) const; |
59 | /** returns an event's due date and time as a string formatted according | 59 | /** returns an event's due date and time as a string formatted according |
60 | to the users locale settings */ | 60 | to the users locale settings */ |
61 | QString dtDueStr(bool shortfmt=true) const; | 61 | QString dtDueStr(bool shortfmt=true) const; |
62 | 62 | ||
63 | /** returns TRUE or FALSE depending on whether the todo has a due date */ | 63 | /** returns TRUE or FALSE depending on whether the todo has a due date */ |
64 | bool hasDueDate() const; | 64 | bool hasDueDate() const; |
65 | /** sets the event's hasDueDate value. */ | 65 | /** sets the event's hasDueDate value. */ |
66 | void setHasDueDate(bool f); | 66 | void setHasDueDate(bool f); |
67 | 67 | ||
68 | /* | 68 | /* |
69 | Looks for a subtodo (including itself ) which is not complete and is | 69 | Looks for a subtodo (including itself ) which is not complete and is |
70 | - overdue, or | 70 | - overdue, or |
71 | - due today. | 71 | - due today. |
72 | It returns 0 for nothing found, | 72 | It returns 0 for nothing found, |
73 | 1 for found a todo which is due today and no overdue found | 73 | 1 for found a todo which is due today and no overdue found |
74 | 2 for found a overdue todo | 74 | 2 for found a overdue todo |
75 | */ | 75 | */ |
76 | int hasDueSubTodo( bool checkSubtodos = true ); | 76 | int hasDueSubTodo( bool checkSubtodos = true ); |
77 | /* same as above, but a specific date can be specified*/ | 77 | /* same as above, but a specific date can be specified*/ |
78 | int hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ); | 78 | int hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ); |
79 | 79 | ||
80 | 80 | ||
81 | /** sets the event's status to the string specified. The string | 81 | /** sets the event's status to the string specified. The string |
82 | * must be a recognized value for the status field, i.e. a string | 82 | * must be a recognized value for the status field, i.e. a string |
83 | * equivalent of the possible status enumerations previously described. */ | 83 | * equivalent of the possible status enumerations previously described. */ |
84 | // void setStatus(const QString &statStr); | 84 | // void setStatus(const QString &statStr); |
85 | /** sets the event's status to the value specified. See the enumeration | 85 | /** sets the event's status to the value specified. See the enumeration |
86 | * above for possible values. */ | 86 | * above for possible values. */ |
87 | // void setStatus(int); | 87 | // void setStatus(int); |
88 | /** return the event's status. */ | 88 | /** return the event's status. */ |
89 | // int status() const; | 89 | // int status() const; |
90 | /** return the event's status in string format. */ | 90 | /** return the event's status in string format. */ |
91 | // QString statusStr() const; | 91 | // QString statusStr() const; |
92 | 92 | ||
93 | /** return, if this todo is completed */ | 93 | /** return, if this todo is completed */ |
94 | bool isCompleted() const; | 94 | bool isCompleted() const; |
95 | /** set completed state of this todo */ | 95 | /** set completed state of this todo */ |
96 | void setCompleted(bool); | 96 | void setCompleted(bool); |
97 | 97 | ||
98 | /** | 98 | /** |
99 | Return how many percent of the task are completed. Returns a value | 99 | Return how many percent of the task are completed. Returns a value |
100 | between 0 and 100. | 100 | between 0 and 100. |
101 | */ | 101 | */ |
102 | int percentComplete() const; | 102 | int percentComplete() const; |
103 | /** | 103 | /** |
104 | Set how many percent of the task are completed. Valid values are in the | 104 | Set how many percent of the task are completed. Valid values are in the |
105 | range from 0 to 100. | 105 | range from 0 to 100. |
106 | */ | 106 | */ |
107 | void setPercentComplete(int); | 107 | void setPercentComplete(int); |
108 | 108 | ||
109 | /** return date and time when todo was completed */ | 109 | /** return date and time when todo was completed */ |
110 | QDateTime completed() const; | 110 | QDateTime completed() const; |
111 | QString completedStr(bool shortF = true) const; | 111 | QString completedStr(bool shortF = true) const; |
112 | /** set date and time of completion */ | 112 | /** set date and time of completion */ |
113 | void setCompleted(const QDateTime &completed); | 113 | void setCompleted(const QDateTime &completed); |
114 | 114 | ||
115 | /** Return true, if todo has a date associated with completion */ | 115 | /** Return true, if todo has a date associated with completion */ |
116 | bool hasCompletedDate() const; | 116 | bool hasCompletedDate() const; |
117 | bool contains ( Todo*); | 117 | bool contains ( Todo*); |
118 | void checkSetCompletedFalse(); | 118 | void checkSetCompletedFalse(); |
119 | bool setRecurDates(); | 119 | bool setRecurDates(); |
120 | bool isRunning() {return mRunning;} | 120 | bool isRunning() {return mRunning;} |
121 | bool hasRunningSub(); | 121 | bool hasRunningSub(); |
122 | void setRunning( bool ); | 122 | void setRunning( bool ); |
123 | void setRunningFalse( QString ); | ||
123 | int runTime(); | 124 | int runTime(); |
124 | QDateTime runStart () const { return mRunStart;} | 125 | QDateTime runStart () const { return mRunStart;} |
125 | public slots: | 126 | public slots: |
126 | void saveRunningInfoToFile(); | 127 | void saveRunningInfoToFile( QString st = QString::null ); |
127 | void saveParents(); | 128 | void saveParents(); |
128 | private: | 129 | private: |
129 | bool mRunning; | 130 | bool mRunning; |
130 | QTimer * mRunSaveTimer; | 131 | QTimer * mRunSaveTimer; |
131 | QDateTime mRunStart; | 132 | QDateTime mRunStart; |
132 | bool accept(Visitor &v) { return v.visit(this); } | 133 | bool accept(Visitor &v) { return v.visit(this); } |
133 | 134 | ||
134 | QDateTime mDtDue; // due date of todo | 135 | QDateTime mDtDue; // due date of todo |
135 | 136 | ||
136 | bool mHasDueDate; // if todo has associated due date | 137 | bool mHasDueDate; // if todo has associated due date |
137 | 138 | ||
138 | // int mStatus; // confirmed/delegated/tentative/etc | 139 | // int mStatus; // confirmed/delegated/tentative/etc |
139 | 140 | ||
140 | QDateTime mCompleted; | 141 | QDateTime mCompleted; |
141 | bool mHasCompletedDate; | 142 | bool mHasCompletedDate; |
142 | 143 | ||
143 | int mPercentComplete; | 144 | int mPercentComplete; |
144 | }; | 145 | }; |
145 | 146 | ||
146 | bool operator==( const Todo&, const Todo& ); | 147 | bool operator==( const Todo&, const Todo& ); |
147 | } | 148 | } |
148 | 149 | ||
149 | #endif | 150 | #endif |
diff --git a/qtcompat/qinputdialog.cpp b/qtcompat/qinputdialog.cpp index 64c581e..ce46118 100644 --- a/qtcompat/qinputdialog.cpp +++ b/qtcompat/qinputdialog.cpp | |||
@@ -1,502 +1,502 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Implementation of QInputDialog class | 4 | ** Implementation of QInputDialog class |
5 | ** | 5 | ** |
6 | ** Created : 991212 | 6 | ** Created : 991212 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the dialogs module of the Qt GUI Toolkit. | 10 | ** This file is part of the dialogs module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | //Edited Lutz Rogowski 2004-12-13 | 38 | //Edited Lutz Rogowski 2004-12-13 |
39 | 39 | ||
40 | #include "qinputdialog.h" | 40 | #include "qinputdialog.h" |
41 | 41 | ||
42 | #include <qlayout.h> | 42 | #include <qlayout.h> |
43 | #include <qlabel.h> | 43 | #include <qlabel.h> |
44 | #include <qlineedit.h> | 44 | #include <qlineedit.h> |
45 | #include <qpushbutton.h> | 45 | #include <qpushbutton.h> |
46 | #include <qspinbox.h> | 46 | #include <qspinbox.h> |
47 | #include <qcombobox.h> | 47 | #include <qcombobox.h> |
48 | #include <qwidgetstack.h> | 48 | #include <qwidgetstack.h> |
49 | #include <qvalidator.h> | 49 | #include <qvalidator.h> |
50 | #include <qapplication.h> | 50 | #include <qapplication.h> |
51 | 51 | ||
52 | class QInputDialogPrivate | 52 | class QInputDialogPrivate |
53 | { | 53 | { |
54 | public: | 54 | public: |
55 | friend class QInputDialog; | 55 | friend class QInputDialog; |
56 | QLineEdit *lineEdit; | 56 | QLineEdit *lineEdit; |
57 | QSpinBox *spinBox; | 57 | QSpinBox *spinBox; |
58 | QComboBox *comboBox, *editComboBox; | 58 | QComboBox *comboBox, *editComboBox; |
59 | QPushButton *ok; | 59 | QPushButton *ok; |
60 | QWidgetStack *stack; | 60 | QWidgetStack *stack; |
61 | QInputDialog::Type type; | 61 | QInputDialog::Type type; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | /*! | 64 | /*! |
65 | \class QInputDialog qinputdialog.h | 65 | \class QInputDialog qinputdialog.h |
66 | \brief A convenience dialog to get a simple input from the user | 66 | \brief A convenience dialog to get a simple input from the user |
67 | \ingroup dialogs | 67 | \ingroup dialogs |
68 | 68 | ||
69 | The QInputDialog is a simple dialog which can be used if you | 69 | The QInputDialog is a simple dialog which can be used if you |
70 | need a simple input from the user. This can be text, a number or | 70 | need a simple input from the user. This can be text, a number or |
71 | an item from a list. Also a label has to be set to tell the user | 71 | an item from a list. Also a label has to be set to tell the user |
72 | what he/she should input. | 72 | what he/she should input. |
73 | 73 | ||
74 | In this Qt version only the 4 static convenience functions | 74 | In this Qt version only the 4 static convenience functions |
75 | getText(), getInteger(), getDouble() and getItem() of QInputDialog | 75 | getText(), getInteger(), getDouble() and getItem() of QInputDialog |
76 | are available. | 76 | are available. |
77 | 77 | ||
78 | Use it like this: | 78 | Use it like this: |
79 | 79 | ||
80 | \code | 80 | \code |
81 | bool ok = FALSE; | 81 | bool ok = FALSE; |
82 | QString text = QInputDialog::getText( tr( "Make an input" ), tr( "Please enter your name" ), QString::null, &ok, this ); | 82 | QString text = QInputDialog::getText( tr( "Make an input" ), tr( "Please enter your name" ), QString::null, &ok, this ); |
83 | if ( ok && !text.isEmpty() ) | 83 | if ( ok && !text.isEmpty() ) |
84 | ;// user entered something and pressed ok | 84 | ;// user entered something and pressed ok |
85 | else | 85 | else |
86 | ;// user entered nothing or pressed cancel | 86 | ;// user entered nothing or pressed cancel |
87 | \endcode | 87 | \endcode |
88 | 88 | ||
89 | There are more static convenience methods! | 89 | There are more static convenience methods! |
90 | 90 | ||
91 | \sa getText(), getInteger(), getDouble(), getItem() | 91 | \sa getText(), getInteger(), getDouble(), getItem() |
92 | */ | 92 | */ |
93 | 93 | ||
94 | /*! | 94 | /*! |
95 | \enum QInputDialog::Type | 95 | \enum QInputDialog::Type |
96 | 96 | ||
97 | This enum type specifies the type of the dialog | 97 | This enum type specifies the type of the dialog |
98 | (which kind of input can be done): | 98 | (which kind of input can be done): |
99 | 99 | ||
100 | <ul> | 100 | <ul> |
101 | <li>\c LineEdit - A QLineEdit is used for taking the input, so a textual or | 101 | <li>\c LineEdit - A QLineEdit is used for taking the input, so a textual or |
102 | (e.g. using a QValidator) a numerical input can be done. Using lineEdit() | 102 | (e.g. using a QValidator) a numerical input can be done. Using lineEdit() |
103 | the QLineEdit can be accessed. | 103 | the QLineEdit can be accessed. |
104 | <li>\c SpinBox - A QSpinBox is used for taking the input, so a decimal | 104 | <li>\c SpinBox - A QSpinBox is used for taking the input, so a decimal |
105 | input can be done. Using spinBox() the QSpinBox can be accessed. | 105 | input can be done. Using spinBox() the QSpinBox can be accessed. |
106 | <li>\c ComboBox - A read-only QComboBox is used for taking the input, | 106 | <li>\c ComboBox - A read-only QComboBox is used for taking the input, |
107 | so one item of a list can be chosen. Using comboBox() the QComboBox | 107 | so one item of a list can be chosen. Using comboBox() the QComboBox |
108 | can be accessed. | 108 | can be accessed. |
109 | <li>\c EditableComboBox - An editable QComboBox is used for taking the input, | 109 | <li>\c EditableComboBox - An editable QComboBox is used for taking the input, |
110 | so either one item of a list can be chosen or a text can be entered. Using | 110 | so either one item of a list can be chosen or a text can be entered. Using |
111 | editableComboBox() the QComboBox can be accessed. | 111 | editableComboBox() the QComboBox can be accessed. |
112 | </ul> | 112 | </ul> |
113 | */ | 113 | */ |
114 | 114 | ||
115 | /*! | 115 | /*! |
116 | Constructs the dialog. \a label is the text which is shown to the user (it should mention | 116 | Constructs the dialog. \a label is the text which is shown to the user (it should mention |
117 | to the user what he/she should input), \a parent the parent widget of the dialog, \a name | 117 | to the user what he/she should input), \a parent the parent widget of the dialog, \a name |
118 | the name of it and if you set \a modal to TRUE, the dialog pops up modally, else it pops | 118 | the name of it and if you set \a modal to TRUE, the dialog pops up modally, else it pops |
119 | up modeless. With \a type you specify the type of the dialog. | 119 | up modeless. With \a type you specify the type of the dialog. |
120 | 120 | ||
121 | \sa getText(), getInteger(), getDouble(), getItem() | 121 | \sa getText(), getInteger(), getDouble(), getItem() |
122 | */ | 122 | */ |
123 | 123 | ||
124 | QInputDialog::QInputDialog( const QString &label, QWidget* parent, const char* name, | 124 | QInputDialog::QInputDialog( const QString &label, QWidget* parent, const char* name, |
125 | bool modal, Type type) | 125 | bool modal, Type type) |
126 | : QDialog( parent, name, modal ) | 126 | : QDialog( parent, name, modal ) |
127 | { | 127 | { |
128 | if ( parent && parent->icon() &&!parent->icon()->isNull() ) | 128 | if ( parent && parent->icon() &&!parent->icon()->isNull() ) |
129 | setIcon( *parent->icon() ); | 129 | setIcon( *parent->icon() ); |
130 | else if ( qApp->mainWidget() && qApp->mainWidget()->icon() && !qApp->mainWidget()->icon()->isNull() ) | 130 | else if ( qApp->mainWidget() && qApp->mainWidget()->icon() && !qApp->mainWidget()->icon()->isNull() ) |
131 | QDialog::setIcon( *qApp->mainWidget()->icon() ); | 131 | QDialog::setIcon( *qApp->mainWidget()->icon() ); |
132 | 132 | ||
133 | d = new QInputDialogPrivate; | 133 | d = new QInputDialogPrivate; |
134 | d->lineEdit = 0; | 134 | d->lineEdit = 0; |
135 | d->spinBox = 0; | 135 | d->spinBox = 0; |
136 | d->comboBox = 0; | 136 | d->comboBox = 0; |
137 | 137 | ||
138 | QVBoxLayout *vbox = new QVBoxLayout( this, 6, 6 ); | 138 | QVBoxLayout *vbox = new QVBoxLayout( this, 6, 6 ); |
139 | 139 | ||
140 | QLabel* l = new QLabel( label, this ); | 140 | QLabel* l = new QLabel( label, this ); |
141 | vbox->addWidget( l ); | 141 | vbox->addWidget( l ); |
142 | 142 | ||
143 | d->stack = new QWidgetStack( this ); | 143 | d->stack = new QWidgetStack( this ); |
144 | vbox->addWidget( d->stack ); | 144 | vbox->addWidget( d->stack ); |
145 | d->lineEdit = new QLineEdit( d->stack ); | 145 | d->lineEdit = new QLineEdit( d->stack ); |
146 | d->spinBox = new QSpinBox( d->stack ); | 146 | d->spinBox = new QSpinBox( d->stack ); |
147 | d->comboBox = new QComboBox( FALSE, d->stack ); | 147 | d->comboBox = new QComboBox( FALSE, d->stack ); |
148 | d->editComboBox = new QComboBox( TRUE, d->stack ); | 148 | d->editComboBox = new QComboBox( TRUE, d->stack ); |
149 | 149 | ||
150 | QHBoxLayout *hbox = new QHBoxLayout( 6 ); | 150 | QHBoxLayout *hbox = new QHBoxLayout( 6 ); |
151 | vbox->addLayout( hbox, AlignRight ); | 151 | vbox->addLayout( hbox, AlignRight ); |
152 | 152 | ||
153 | d->ok = new QPushButton( tr( "&OK" ), this ); | 153 | d->ok = new QPushButton( tr( "&OK" ), this ); |
154 | d->ok->setDefault( TRUE ); | 154 | d->ok->setDefault( TRUE ); |
155 | QPushButton *cancel = new QPushButton( tr( "&Cancel" ), this ); | 155 | QPushButton *cancel = new QPushButton( tr( "&Cancel" ), this ); |
156 | 156 | ||
157 | QSize bs( d->ok->sizeHint() ); | 157 | QSize bs( d->ok->sizeHint() ); |
158 | if ( cancel->sizeHint().width() > bs.width() ) | 158 | if ( cancel->sizeHint().width() > bs.width() ) |
159 | bs.setWidth( cancel->sizeHint().width() ); | 159 | bs.setWidth( cancel->sizeHint().width() ); |
160 | 160 | ||
161 | d->ok->setFixedSize( bs ); | 161 | d->ok->setFixedSize( bs ); |
162 | cancel->setFixedSize( bs ); | 162 | cancel->setFixedSize( bs ); |
163 | 163 | ||
164 | hbox->addWidget( new QWidget( this ) ); | 164 | hbox->addWidget( new QWidget( this ) ); |
165 | hbox->addWidget( d->ok ); | 165 | hbox->addWidget( d->ok ); |
166 | hbox->addWidget( cancel ); | 166 | hbox->addWidget( cancel ); |
167 | 167 | ||
168 | connect( d->lineEdit, SIGNAL( returnPressed() ), | 168 | connect( d->lineEdit, SIGNAL( returnPressed() ), |
169 | this, SLOT( tryAccept() ) ); | 169 | this, SLOT( tryAccept() ) ); |
170 | connect( d->lineEdit, SIGNAL( textChanged( const QString & ) ), | 170 | connect( d->lineEdit, SIGNAL( textChanged( const QString & ) ), |
171 | this, SLOT( textChanged( const QString & ) ) ); | 171 | this, SLOT( textChanged( const QString & ) ) ); |
172 | 172 | ||
173 | connect( d->ok, SIGNAL( clicked() ), this, SLOT( accept() ) ); | 173 | connect( d->ok, SIGNAL( clicked() ), this, SLOT( accept() ) ); |
174 | connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); | 174 | connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); |
175 | 175 | ||
176 | //US ToDo make size dependent of targetplatform | 176 | //US ToDo make size dependent of targetplatform |
177 | //US resize( QMAX( sizeHint().width(), 400 ), sizeHint().height() ); | 177 | //US resize( QMAX( sizeHint().width(), 400 ), sizeHint().height() ); |
178 | resize( sizeHint().width(), sizeHint().height() ); | 178 | resize( sizeHint().width(), sizeHint().height() ); |
179 | 179 | ||
180 | setType( type ); | 180 | setType( type ); |
181 | } | 181 | } |
182 | 182 | ||
183 | /*! | 183 | /*! |
184 | Returns the line edit, which is used in the LineEdit mode | 184 | Returns the line edit, which is used in the LineEdit mode |
185 | */ | 185 | */ |
186 | 186 | ||
187 | QLineEdit *QInputDialog::lineEdit() const | 187 | QLineEdit *QInputDialog::lineEdit() const |
188 | { | 188 | { |
189 | return d->lineEdit; | 189 | return d->lineEdit; |
190 | } | 190 | } |
191 | 191 | ||
192 | /*! | 192 | /*! |
193 | Returns the spinbox, which is used in the SpinBox mode | 193 | Returns the spinbox, which is used in the SpinBox mode |
194 | */ | 194 | */ |
195 | 195 | ||
196 | QSpinBox *QInputDialog::spinBox() const | 196 | QSpinBox *QInputDialog::spinBox() const |
197 | { | 197 | { |
198 | return d->spinBox; | 198 | return d->spinBox; |
199 | } | 199 | } |
200 | 200 | ||
201 | /*! | 201 | /*! |
202 | Returns the combobox, which is used in the ComboBox mode | 202 | Returns the combobox, which is used in the ComboBox mode |
203 | */ | 203 | */ |
204 | 204 | ||
205 | QComboBox *QInputDialog::comboBox() const | 205 | QComboBox *QInputDialog::comboBox() const |
206 | { | 206 | { |
207 | return d->comboBox; | 207 | return d->comboBox; |
208 | } | 208 | } |
209 | 209 | ||
210 | /*! | 210 | /*! |
211 | Returns the combobox, which is used in the EditableComboBox mode | 211 | Returns the combobox, which is used in the EditableComboBox mode |
212 | */ | 212 | */ |
213 | 213 | ||
214 | QComboBox *QInputDialog::editableComboBox() const | 214 | QComboBox *QInputDialog::editableComboBox() const |
215 | { | 215 | { |
216 | return d->editComboBox; | 216 | return d->editComboBox; |
217 | } | 217 | } |
218 | 218 | ||
219 | /*! | 219 | /*! |
220 | Sets the input type of the dialog to \a t. | 220 | Sets the input type of the dialog to \a t. |
221 | */ | 221 | */ |
222 | 222 | ||
223 | void QInputDialog::setType( Type t ) | 223 | void QInputDialog::setType( Type t ) |
224 | { | 224 | { |
225 | switch ( t ) { | 225 | switch ( t ) { |
226 | case LineEdit: | 226 | case LineEdit: |
227 | d->stack->raiseWidget( d->lineEdit ); | 227 | d->stack->raiseWidget( d->lineEdit ); |
228 | d->lineEdit->setFocus(); | 228 | d->lineEdit->setFocus(); |
229 | break; | 229 | break; |
230 | case SpinBox: | 230 | case SpinBox: |
231 | d->stack->raiseWidget( d->spinBox ); | 231 | d->stack->raiseWidget( d->spinBox ); |
232 | d->spinBox->setFocus(); | 232 | d->spinBox->setFocus(); |
233 | break; | 233 | break; |
234 | case ComboBox: | 234 | case ComboBox: |
235 | d->stack->raiseWidget( d->comboBox ); | 235 | d->stack->raiseWidget( d->comboBox ); |
236 | d->comboBox->setFocus(); | 236 | d->comboBox->setFocus(); |
237 | break; | 237 | break; |
238 | case EditableComboBox: | 238 | case EditableComboBox: |
239 | d->stack->raiseWidget( d->editComboBox ); | 239 | d->stack->raiseWidget( d->editComboBox ); |
240 | d->editComboBox->setFocus(); | 240 | d->editComboBox->setFocus(); |
241 | break; | 241 | break; |
242 | } | 242 | } |
243 | 243 | ||
244 | d->type = t; | 244 | d->type = t; |
245 | } | 245 | } |
246 | 246 | ||
247 | /*! | 247 | /*! |
248 | Returns the input type of the dialog. | 248 | Returns the input type of the dialog. |
249 | 249 | ||
250 | \sa setType() | 250 | \sa setType() |
251 | */ | 251 | */ |
252 | 252 | ||
253 | QInputDialog::Type QInputDialog::type() const | 253 | QInputDialog::Type QInputDialog::type() const |
254 | { | 254 | { |
255 | return d->type; | 255 | return d->type; |
256 | } | 256 | } |
257 | 257 | ||
258 | /*! | 258 | /*! |
259 | Destructor. | 259 | Destructor. |
260 | */ | 260 | */ |
261 | 261 | ||
262 | QInputDialog::~QInputDialog() | 262 | QInputDialog::~QInputDialog() |
263 | { | 263 | { |
264 | delete d; | 264 | delete d; |
265 | } | 265 | } |
266 | 266 | ||
267 | /*! | 267 | /*! |
268 | Static convenience function to get a textual input from the user. \a caption is the text | 268 | Static convenience function to get a textual input from the user. \a caption is the text |
269 | which is displayed in the title bar of the dialog. \a label is the text which | 269 | which is displayed in the title bar of the dialog. \a label is the text which |
270 | is shown to the user (it should mention to the user what he/she should input), \a text | 270 | is shown to the user (it should mention to the user what he/she should input), \a text |
271 | the default text which will be initially set to the line edit, \a ok a pointer to | 271 | the default text which will be initially set to the line edit, \a ok a pointer to |
272 | a bool which will be (if not 0!) set to TRUE if the user pressed ok or to FALSE if the | 272 | a bool which will be (if not 0!) set to TRUE if the user pressed ok or to FALSE if the |
273 | user pressed cancel, \a parent the parent widget of the dialog and \a name | 273 | user pressed cancel, \a parent the parent widget of the dialog and \a name |
274 | the name of it. The dialogs pops up modally! | 274 | the name of it. The dialogs pops up modally! |
275 | 275 | ||
276 | This method returns the text which has been entered in the line edit. | 276 | This method returns the text which has been entered in the line edit. |
277 | 277 | ||
278 | You will use this static method like this: | 278 | You will use this static method like this: |
279 | 279 | ||
280 | \code | 280 | \code |
281 | bool ok = FALSE; | 281 | bool ok = FALSE; |
282 | QString text = QInputDialog::getText( tr( "Please enter your name" ), QString::null, &ok, this ); | 282 | QString text = QInputDialog::getText( tr( "Please enter your name" ), QString::null, &ok, this ); |
283 | if ( ok && !text.isEmpty() ) | 283 | if ( ok && !text.isEmpty() ) |
284 | ;// user entered something and pressed ok | 284 | ;// user entered something and pressed ok |
285 | else | 285 | else |
286 | ;// user entered nothing or pressed cancel | 286 | ;// user entered nothing or pressed cancel |
287 | \endcode | 287 | \endcode |
288 | */ | 288 | */ |
289 | 289 | ||
290 | QString QInputDialog::getText( const QString &caption, const QString &label, const QString &text, | 290 | QString QInputDialog::getText( const QString &caption, const QString &label, const QString &text, |
291 | bool *ok, QWidget *parent, const char *name ) | 291 | bool *ok, QWidget *parent, const char *name ) |
292 | { | 292 | { |
293 | return getText( caption, label, QLineEdit::Normal, text, ok, parent, name ); | 293 | return getText( caption, label, QLineEdit::Normal, text, ok, parent, name ); |
294 | } | 294 | } |
295 | 295 | ||
296 | /*! | 296 | /*! |
297 | Like above, but accepts an a \a mode which the line edit will use to display text. | 297 | Like above, but accepts an a \a mode which the line edit will use to display text. |
298 | 298 | ||
299 | \sa getText() | 299 | \sa getText() |
300 | */ | 300 | */ |
301 | 301 | ||
302 | QString QInputDialog::getText( const QString &caption, const QString &label, QLineEdit::EchoMode mode, | 302 | QString QInputDialog::getText( const QString &caption, const QString &label, QLineEdit::EchoMode mode, |
303 | const QString &text, bool *ok, QWidget *parent, const char *name ) | 303 | const QString &text, bool *ok, QWidget *parent, const char *name ) |
304 | { | 304 | { |
305 | QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, LineEdit ); | 305 | QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, LineEdit ); |
306 | dlg->setCaption( caption ); | 306 | dlg->setCaption( caption ); |
307 | dlg->lineEdit()->setText( text ); | 307 | dlg->lineEdit()->setText( text ); |
308 | dlg->lineEdit()->setEchoMode( mode ); | 308 | dlg->lineEdit()->setEchoMode( mode ); |
309 | if ( !text.isEmpty() ) | 309 | if ( !text.isEmpty() ) |
310 | dlg->lineEdit()->selectAll(); | 310 | dlg->lineEdit()->selectAll(); |
311 | 311 | dlg->setMinimumWidth ( 230 ); | |
312 | bool ok_ = FALSE; | 312 | bool ok_ = FALSE; |
313 | QString result; | 313 | QString result; |
314 | ok_ = dlg->exec() == QDialog::Accepted; | 314 | ok_ = dlg->exec() == QDialog::Accepted; |
315 | if ( ok ) | 315 | if ( ok ) |
316 | *ok = ok_; | 316 | *ok = ok_; |
317 | if ( ok_ ) | 317 | if ( ok_ ) |
318 | result = dlg->lineEdit()->text(); | 318 | result = dlg->lineEdit()->text(); |
319 | 319 | ||
320 | delete dlg; | 320 | delete dlg; |
321 | return result; | 321 | return result; |
322 | } | 322 | } |
323 | 323 | ||
324 | /*! | 324 | /*! |
325 | Static convenience function to get an integral input from the user. \a caption is the text | 325 | Static convenience function to get an integral input from the user. \a caption is the text |
326 | which is displayed in the title bar of the dialog. \a label is the text which | 326 | which is displayed in the title bar of the dialog. \a label is the text which |
327 | is shown to the user (it should mention to the user what he/she should input), \a num | 327 | is shown to the user (it should mention to the user what he/she should input), \a num |
328 | the default number which will be initially set to the spinbox, \a from and \a to the | 328 | the default number which will be initially set to the spinbox, \a from and \a to the |
329 | range in which the entered number has to be, \a step the step in which the number can | 329 | range in which the entered number has to be, \a step the step in which the number can |
330 | be increased/decreased by the spinbox, \a ok a pointer to | 330 | be increased/decreased by the spinbox, \a ok a pointer to |
331 | a bool which will be (if not 0!) set to TRUE if the user pressed ok or to FALSE if the | 331 | a bool which will be (if not 0!) set to TRUE if the user pressed ok or to FALSE if the |
332 | user pressed cancel, \a parent the parent widget of the dialog and \a name | 332 | user pressed cancel, \a parent the parent widget of the dialog and \a name |
333 | the name of it. The dialogs pops up modally! | 333 | the name of it. The dialogs pops up modally! |
334 | 334 | ||
335 | This method returns the number which has been entered by the user. | 335 | This method returns the number which has been entered by the user. |
336 | 336 | ||
337 | You will use this static method like this: | 337 | You will use this static method like this: |
338 | 338 | ||
339 | \code | 339 | \code |
340 | bool ok = FALSE; | 340 | bool ok = FALSE; |
341 | int res = QInputDialog::getInteger( tr( "Please enter a number" ), 22, 0, 1000, 2, &ok, this ); | 341 | int res = QInputDialog::getInteger( tr( "Please enter a number" ), 22, 0, 1000, 2, &ok, this ); |
342 | if ( ok ) | 342 | if ( ok ) |
343 | ;// user entered something and pressed ok | 343 | ;// user entered something and pressed ok |
344 | else | 344 | else |
345 | ;// user pressed cancel | 345 | ;// user pressed cancel |
346 | \endcode | 346 | \endcode |
347 | */ | 347 | */ |
348 | 348 | ||
349 | int QInputDialog::getInteger( const QString &caption, const QString &label, int num, int from, int to, int step, | 349 | int QInputDialog::getInteger( const QString &caption, const QString &label, int num, int from, int to, int step, |
350 | bool *ok, QWidget *parent, const char *name ) | 350 | bool *ok, QWidget *parent, const char *name ) |
351 | { | 351 | { |
352 | QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, SpinBox ); | 352 | QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, SpinBox ); |
353 | dlg->setCaption( caption ); | 353 | dlg->setCaption( caption ); |
354 | dlg->spinBox()->setRange( from, to ); | 354 | dlg->spinBox()->setRange( from, to ); |
355 | dlg->spinBox()->setSteps( step, 0 ); | 355 | dlg->spinBox()->setSteps( step, 0 ); |
356 | dlg->spinBox()->setValue( num ); | 356 | dlg->spinBox()->setValue( num ); |
357 | 357 | ||
358 | bool ok_ = FALSE; | 358 | bool ok_ = FALSE; |
359 | int result; | 359 | int result; |
360 | ok_ = dlg->exec() == QDialog::Accepted; | 360 | ok_ = dlg->exec() == QDialog::Accepted; |
361 | if ( ok ) | 361 | if ( ok ) |
362 | *ok = ok_; | 362 | *ok = ok_; |
363 | result = dlg->spinBox()->value(); | 363 | result = dlg->spinBox()->value(); |
364 | 364 | ||
365 | delete dlg; | 365 | delete dlg; |
366 | return result; | 366 | return result; |
367 | } | 367 | } |
368 | 368 | ||
369 | /*! | 369 | /*! |
370 | Static convenience function to get a decimal input from the user. \a caption is the text | 370 | Static convenience function to get a decimal input from the user. \a caption is the text |
371 | which is displayed in the title bar of the dialog. \a label is the text which | 371 | which is displayed in the title bar of the dialog. \a label is the text which |
372 | is shown to the user (it should mention to the user what he/she should input), \a num | 372 | is shown to the user (it should mention to the user what he/she should input), \a num |
373 | the default decimal number which will be initially set to the line edit, \a from and \a to the | 373 | the default decimal number which will be initially set to the line edit, \a from and \a to the |
374 | range in which the entered number has to be, \a decimals the number of decimal which | 374 | range in which the entered number has to be, \a decimals the number of decimal which |
375 | the number may have, \a ok a pointer to | 375 | the number may have, \a ok a pointer to |
376 | a bool which will be (if not 0!) set to TRUE if the user pressed ok or to FALSE if the | 376 | a bool which will be (if not 0!) set to TRUE if the user pressed ok or to FALSE if the |
377 | user pressed cancel, \a parent the parent widget of the dialog and \a name | 377 | user pressed cancel, \a parent the parent widget of the dialog and \a name |
378 | the name of it. The dialogs pops up modally! | 378 | the name of it. The dialogs pops up modally! |
379 | 379 | ||
380 | This method returns the number which has been entered by the user. | 380 | This method returns the number which has been entered by the user. |
381 | 381 | ||
382 | You will use this static method like this: | 382 | You will use this static method like this: |
383 | 383 | ||
384 | \code | 384 | \code |
385 | bool ok = FALSE; | 385 | bool ok = FALSE; |
386 | double res = QInputDialog::getDouble( tr( "Please enter a decimal number" ), 33.7, 0, 1000, 2, &ok, this ); | 386 | double res = QInputDialog::getDouble( tr( "Please enter a decimal number" ), 33.7, 0, 1000, 2, &ok, this ); |
387 | if ( ok ) | 387 | if ( ok ) |
388 | ;// user entered something and pressed ok | 388 | ;// user entered something and pressed ok |
389 | else | 389 | else |
390 | ;// user pressed cancel | 390 | ;// user pressed cancel |
391 | \endcode | 391 | \endcode |
392 | */ | 392 | */ |
393 | 393 | ||
394 | double QInputDialog::getDouble( const QString &caption, const QString &label, double num, | 394 | double QInputDialog::getDouble( const QString &caption, const QString &label, double num, |
395 | double from, double to, int decimals, | 395 | double from, double to, int decimals, |
396 | bool *ok, QWidget *parent, const char *name ) | 396 | bool *ok, QWidget *parent, const char *name ) |
397 | { | 397 | { |
398 | QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, LineEdit ); | 398 | QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, LineEdit ); |
399 | dlg->setCaption( caption ); | 399 | dlg->setCaption( caption ); |
400 | dlg->lineEdit()->setValidator( new QDoubleValidator( from, to, decimals, dlg->lineEdit() ) ); | 400 | dlg->lineEdit()->setValidator( new QDoubleValidator( from, to, decimals, dlg->lineEdit() ) ); |
401 | dlg->lineEdit()->setText( QString::number( num, 'f', decimals ) ); | 401 | dlg->lineEdit()->setText( QString::number( num, 'f', decimals ) ); |
402 | dlg->lineEdit()->selectAll(); | 402 | dlg->lineEdit()->selectAll(); |
403 | 403 | ||
404 | bool accepted = ( dlg->exec() == QDialog::Accepted ); | 404 | bool accepted = ( dlg->exec() == QDialog::Accepted ); |
405 | if ( ok ) | 405 | if ( ok ) |
406 | *ok = accepted; | 406 | *ok = accepted; |
407 | 407 | ||
408 | double result = dlg->lineEdit()->text().toDouble(); | 408 | double result = dlg->lineEdit()->text().toDouble(); |
409 | 409 | ||
410 | delete dlg; | 410 | delete dlg; |
411 | return result; | 411 | return result; |
412 | } | 412 | } |
413 | 413 | ||
414 | /*! | 414 | /*! |
415 | Static convenience function to let the user select an item from a string list. \a caption is the text | 415 | Static convenience function to let the user select an item from a string list. \a caption is the text |
416 | which is displayed in the title bar of the dialog. \a label is the text which | 416 | which is displayed in the title bar of the dialog. \a label is the text which |
417 | is shown to the user (it should mention to the user what he/she should input), \a list the | 417 | is shown to the user (it should mention to the user what he/she should input), \a list the |
418 | string list which is inserted into the combobox, \a current the number of the item which should | 418 | string list which is inserted into the combobox, \a current the number of the item which should |
419 | be initially the current item, \a editable specifies if the combobox should be editable (if it is TRUE) | 419 | be initially the current item, \a editable specifies if the combobox should be editable (if it is TRUE) |
420 | or read-only (if \a editable is FALSE), \a ok a pointer to | 420 | or read-only (if \a editable is FALSE), \a ok a pointer to |
421 | a bool which will be (if not 0!) set to TRUE if the user pressed ok or to FALSE if the | 421 | a bool which will be (if not 0!) set to TRUE if the user pressed ok or to FALSE if the |
422 | user pressed cancel, \a parent the parent widget of the dialog and \a name | 422 | user pressed cancel, \a parent the parent widget of the dialog and \a name |
423 | the name of it. The dialogs pops up modally! | 423 | the name of it. The dialogs pops up modally! |
424 | 424 | ||
425 | This method returns the text of the current item, or if \a editable was TRUE, the current | 425 | This method returns the text of the current item, or if \a editable was TRUE, the current |
426 | text of the combobox. | 426 | text of the combobox. |
427 | 427 | ||
428 | You will use this static method like this: | 428 | You will use this static method like this: |
429 | 429 | ||
430 | \code | 430 | \code |
431 | QStringList lst; | 431 | QStringList lst; |
432 | lst << "First" << "Second" << "Third" << "Fourth" << "Fifth"; | 432 | lst << "First" << "Second" << "Third" << "Fourth" << "Fifth"; |
433 | bool ok = FALSE; | 433 | bool ok = FALSE; |
434 | QString res = QInputDialog::getItem( tr( "Please select an item" ), lst, 1, TRUE, &ok, this ); | 434 | QString res = QInputDialog::getItem( tr( "Please select an item" ), lst, 1, TRUE, &ok, this ); |
435 | if ( ok ) | 435 | if ( ok ) |
436 | ;// user selected an item and pressed ok | 436 | ;// user selected an item and pressed ok |
437 | else | 437 | else |
438 | ;// user pressed cancel | 438 | ;// user pressed cancel |
439 | \endcode | 439 | \endcode |
440 | */ | 440 | */ |
441 | 441 | ||
442 | QString QInputDialog::getItem( const QString &caption, const QString &label, const QStringList &list, | 442 | QString QInputDialog::getItem( const QString &caption, const QString &label, const QStringList &list, |
443 | int current, bool editable, | 443 | int current, bool editable, |
444 | bool *ok, QWidget *parent, const char *name ) | 444 | bool *ok, QWidget *parent, const char *name ) |
445 | { | 445 | { |
446 | QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, editable ? EditableComboBox : ComboBox ); | 446 | QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, editable ? EditableComboBox : ComboBox ); |
447 | dlg->setCaption( caption ); | 447 | dlg->setCaption( caption ); |
448 | if ( editable ) { | 448 | if ( editable ) { |
449 | dlg->editableComboBox()->insertStringList( list ); | 449 | dlg->editableComboBox()->insertStringList( list ); |
450 | dlg->editableComboBox()->setCurrentItem( current ); | 450 | dlg->editableComboBox()->setCurrentItem( current ); |
451 | } else { | 451 | } else { |
452 | dlg->comboBox()->insertStringList( list ); | 452 | dlg->comboBox()->insertStringList( list ); |
453 | dlg->comboBox()->setCurrentItem( current ); | 453 | dlg->comboBox()->setCurrentItem( current ); |
454 | } | 454 | } |
455 | 455 | ||
456 | bool ok_ = FALSE; | 456 | bool ok_ = FALSE; |
457 | QString result; | 457 | QString result; |
458 | int fixWid = 320; | 458 | int fixWid = 320; |
459 | if ( QApplication::desktop()->width() <= 240 ) { | 459 | if ( QApplication::desktop()->width() <= 240 ) { |
460 | fixWid = 230; | 460 | fixWid = 230; |
461 | } | 461 | } |
462 | dlg->setFixedWidth( fixWid); | 462 | dlg->setFixedWidth( fixWid); |
463 | ok_ = dlg->exec() == QDialog::Accepted; | 463 | ok_ = dlg->exec() == QDialog::Accepted; |
464 | if ( ok ) | 464 | if ( ok ) |
465 | *ok = ok_; | 465 | *ok = ok_; |
466 | if ( editable ) | 466 | if ( editable ) |
467 | result = dlg->editableComboBox()->currentText(); | 467 | result = dlg->editableComboBox()->currentText(); |
468 | else | 468 | else |
469 | result = dlg->comboBox()->currentText(); | 469 | result = dlg->comboBox()->currentText(); |
470 | 470 | ||
471 | delete dlg; | 471 | delete dlg; |
472 | return result; | 472 | return result; |
473 | } | 473 | } |
474 | 474 | ||
475 | /*! | 475 | /*! |
476 | \internal | 476 | \internal |
477 | */ | 477 | */ |
478 | 478 | ||
479 | void QInputDialog::textChanged( const QString &s ) | 479 | void QInputDialog::textChanged( const QString &s ) |
480 | { | 480 | { |
481 | bool on; | 481 | bool on; |
482 | if ( d->lineEdit->validator() ) { | 482 | if ( d->lineEdit->validator() ) { |
483 | QString str = d->lineEdit->text(); | 483 | QString str = d->lineEdit->text(); |
484 | int index = d->lineEdit->cursorPosition(); | 484 | int index = d->lineEdit->cursorPosition(); |
485 | on = ( d->lineEdit->validator()->validate(str, index) == | 485 | on = ( d->lineEdit->validator()->validate(str, index) == |
486 | QValidator::Acceptable ); | 486 | QValidator::Acceptable ); |
487 | } else { | 487 | } else { |
488 | on = !s.isEmpty(); | 488 | on = !s.isEmpty(); |
489 | } | 489 | } |
490 | d->ok->setEnabled( on ); | 490 | d->ok->setEnabled( on ); |
491 | } | 491 | } |
492 | 492 | ||
493 | /*! | 493 | /*! |
494 | \internal | 494 | \internal |
495 | */ | 495 | */ |
496 | 496 | ||
497 | void QInputDialog::tryAccept() | 497 | void QInputDialog::tryAccept() |
498 | { | 498 | { |
499 | if ( !d->lineEdit->text().isEmpty() ) | 499 | if ( !d->lineEdit->text().isEmpty() ) |
500 | accept(); | 500 | accept(); |
501 | } | 501 | } |
502 | 502 | ||