author | zautrix <zautrix> | 2005-03-26 20:29:59 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-26 20:29:59 (UTC) |
commit | c9c3f9e65a72a3c79d7f67eba68fca4537004808 (patch) (unidiff) | |
tree | 395970dbf2b5aad3cdafe195e7a9958f5cc8aa15 | |
parent | 36dd498ad2f5a2cf43fc08c621669fe42198e5eb (diff) | |
download | kdepimpi-c9c3f9e65a72a3c79d7f67eba68fca4537004808.zip kdepimpi-c9c3f9e65a72a3c79d7f67eba68fca4537004808.tar.gz kdepimpi-c9c3f9e65a72a3c79d7f67eba68fca4537004808.tar.bz2 |
better timer
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 108 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.h | 35 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 1 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 5 |
5 files changed, 135 insertions, 18 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index a8035d4..b6293b5 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -922,388 +922,392 @@ | |||
922 | { "3 hours","3 Std." }, | 922 | { "3 hours","3 Std." }, |
923 | { "1 hour","1 Std." }, | 923 | { "1 hour","1 Std." }, |
924 | { "15 minutes","15 Min." }, | 924 | { "15 minutes","15 Min." }, |
925 | { "5 minutes","5 Min." }, | 925 | { "5 minutes","5 Min." }, |
926 | { "1 minute","1 Min." }, | 926 | { "1 minute","1 Min." }, |
927 | { "23","23" }, | 927 | { "23","23" }, |
928 | { "Mon 15","Mon 15" }, | 928 | { "Mon 15","Mon 15" }, |
929 | { "Configure KO","Konfiguriere KO" }, | 929 | { "Configure KO","Konfiguriere KO" }, |
930 | { "Event text","Termin Text" }, | 930 | { "Event text","Termin Text" }, |
931 | { "ToDo","ToDo" }, | 931 | { "ToDo","ToDo" }, |
932 | { "Today","Heute" }, | 932 | { "Today","Heute" }, |
933 | { "What's Next View","What's Next Ansicht" }, | 933 | { "What's Next View","What's Next Ansicht" }, |
934 | { "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, | 934 | { "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, |
935 | { "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, | 935 | { "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, |
936 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 936 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
937 | { "Alarm","Alarm" }, | 937 | { "Alarm","Alarm" }, |
938 | { "Used %1 Client","Benutzter %1 Client" }, | 938 | { "Used %1 Client","Benutzter %1 Client" }, |
939 | { "No email client installed","Kein Email Klient installiert" }, | 939 | { "No email client installed","Kein Email Klient installiert" }, |
940 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 940 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
941 | { "OM/Pi email client","OM/Pi Email Klient" }, | 941 | { "OM/Pi email client","OM/Pi Email Klient" }, |
942 | { "Include in multiple ","Beziehe in multiple " }, | 942 | { "Include in multiple ","Beziehe in multiple " }, |
943 | { "calendar ","Kalender " }, | 943 | { "calendar ","Kalender " }, |
944 | { "addressbook ","Adressbuch " }, | 944 | { "addressbook ","Adressbuch " }, |
945 | { "pwmanager","PWmanager" }, | 945 | { "pwmanager","PWmanager" }, |
946 | { " sync"," Sync ein" }, | 946 | { " sync"," Sync ein" }, |
947 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 947 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
948 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 948 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
949 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 949 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
950 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 950 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
951 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 951 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
952 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 952 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
953 | { "Help...","Hilfe..." }, | 953 | { "Help...","Hilfe..." }, |
954 | { "Local file Cal:","Lokale Datei Kal:" }, | 954 | { "Local file Cal:","Lokale Datei Kal:" }, |
955 | { "Local file ABook:","Lokale Datei ABuch:" }, | 955 | { "Local file ABook:","Lokale Datei ABuch:" }, |
956 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 956 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
957 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 957 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
958 | { "Calendar:","Kalender:" }, | 958 | { "Calendar:","Kalender:" }, |
959 | { "AddressBook:","AdressBuch:" }, | 959 | { "AddressBook:","AdressBuch:" }, |
960 | { "PWManager:","PWManager:" }, | 960 | { "PWManager:","PWManager:" }, |
961 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 961 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
962 | { "ssh/scp","ssh/scp" }, | 962 | { "ssh/scp","ssh/scp" }, |
963 | { "ftp","ftp" }, | 963 | { "ftp","ftp" }, |
964 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 964 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
965 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 965 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
966 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 966 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
967 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 967 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
968 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 968 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
969 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 969 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
970 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 970 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
971 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 971 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
972 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 972 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
973 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | 973 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, |
974 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 974 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
975 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 975 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
976 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 976 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
977 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 977 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
978 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 978 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
979 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, | 979 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
980 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 980 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
981 | { "Multiple profiles","Multi-Sync Profile" }, | 981 | { "Multiple profiles","Multi-Sync Profile" }, |
982 | { "Device: ","Gerät: " }, | 982 | { "Device: ","Gerät: " }, |
983 | { "Multiple sync started.","Multi-Sync gestartet." }, | 983 | { "Multiple sync started.","Multi-Sync gestartet." }, |
984 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 984 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
985 | { "Turn filter on","Schalte Filter an" }, | 985 | { "Turn filter on","Schalte Filter an" }, |
986 | { "Turn filter off","Schalte Filter aus" }, | 986 | { "Turn filter off","Schalte Filter aus" }, |
987 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 987 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
988 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 988 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
989 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 989 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
990 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 990 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
991 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 991 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
992 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 992 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
993 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 993 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
994 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 994 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
995 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 995 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
996 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 996 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
997 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 997 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
998 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 998 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
999 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 999 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
1000 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 1000 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
1001 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, | 1001 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
1002 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, | 1002 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
1003 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 1003 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
1004 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, | 1004 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
1005 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 1005 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
1006 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, | 1006 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
1007 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 1007 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1008 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, | 1008 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
1009 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 1009 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
1010 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1010 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1011 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, | 1011 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
1012 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, | 1012 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
1013 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, | 1013 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1014 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1014 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1015 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1015 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1016 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1016 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1017 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1017 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1018 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1018 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1019 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, | 1019 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1020 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, | 1020 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1021 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1021 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1022 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1022 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1023 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, | 1023 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1024 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1024 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1025 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, | 1025 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1026 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1026 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1027 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, | 1027 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1028 | { "<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" }, | 1028 | { "<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" }, |
1029 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1029 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1031 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1031 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1032 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1032 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1034 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1034 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1035 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1035 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1036 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1036 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1038 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1038 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1043 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1043 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1044 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1044 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1047 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1047 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1048 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1048 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1049 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1049 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1050 | { "From: ","Von: " }, | 1050 | { "From: ","Von: " }, |
1051 | { "Remove sync info","Entferne Sync Info" }, | 1051 | { "Remove sync info","Entferne Sync Info" }, |
1052 | { "For all profiles","Für alle Profile" }, | 1052 | { "For all profiles","Für alle Profile" }, |
1053 | { "Hide not Running","Verstecke nicht Laufende" }, | 1053 | { "Hide not Running","Verstecke nicht Laufende" }, |
1054 | { "ME","ME" }, | 1054 | { "ME","ME" }, |
1055 | { "Toolbar","Toolbar" }, | 1055 | { "Toolbar","Toolbar" }, |
1056 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1056 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1057 | { "Undo Delete","Löschen rückgängig machen" }, | 1057 | { "Undo Delete","Löschen rückgängig machen" }, |
1058 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1058 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1059 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1059 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1060 | { "Januar","Januar" }, | 1060 | { "Januar","Januar" }, |
1061 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1061 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1062 | { "No Filter","Kein Filter" }, | 1062 | { "No Filter","Kein Filter" }, |
1063 | { "Multiple Sync options","Multi Sync Optionen" }, | 1063 | { "Multiple Sync options","Multi Sync Optionen" }, |
1064 | { "Sync algo options","Sync Ablauf Optionen" }, | 1064 | { "Sync algo options","Sync Ablauf Optionen" }, |
1065 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1065 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1066 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1066 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1067 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1067 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1068 | { "Write back options","Optionen zum Zurückschreiben" }, | 1068 | { "Write back options","Optionen zum Zurückschreiben" }, |
1069 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1069 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1070 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1070 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1071 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1071 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1072 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1072 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1073 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1073 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1074 | { "Time period","Zeitspanne" }, | 1074 | { "Time period","Zeitspanne" }, |
1075 | { "From ","Von " }, | 1075 | { "From ","Von " }, |
1076 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1076 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1077 | { " weeks in the future "," Wochen in der Zukunft " }, | 1077 | { " weeks in the future "," Wochen in der Zukunft " }, |
1078 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1078 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1079 | { "Local temp file:","Lokale temp Datei:" }, | 1079 | { "Local temp file:","Lokale temp Datei:" }, |
1080 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1080 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1081 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1081 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1082 | { "Language","Sprache" }, | 1082 | { "Language","Sprache" }, |
1083 | { "Time Format","Zeit Format" }, | 1083 | { "Time Format","Zeit Format" }, |
1084 | { "Time Zone","Zeit Zone" }, | 1084 | { "Time Zone","Zeit Zone" }, |
1085 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1085 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1086 | { "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" }, | 1086 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
1087 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1087 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1088 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1088 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1089 | { "Save settings","Speichere Einstellungen" }, | 1089 | { "Save settings","Speichere Einstellungen" }, |
1090 | { "Save standard","Speichere Standard" }, | 1090 | { "Save standard","Speichere Standard" }, |
1091 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1091 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1092 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1092 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1093 | { "Data storage path","Daten Speicherpfad" }, | 1093 | { "Data storage path","Daten Speicherpfad" }, |
1094 | { "Language","Sprache" }, | 1094 | { "Language","Sprache" }, |
1095 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1095 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1096 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1096 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1097 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, | 1097 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, |
1098 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1098 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1099 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1099 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1100 | { "KO/Pi","KO/Pi" }, | 1100 | { "KO/Pi","KO/Pi" }, |
1101 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1101 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1102 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1102 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1103 | { "Sound.Al.: ","Sound.Al.: " }, | 1103 | { "Sound.Al.: ","Sound.Al.: " }, |
1104 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1104 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1105 | { "Restore","Wiederherstellen" }, | 1105 | { "Restore","Wiederherstellen" }, |
1106 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1106 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1107 | { "% completed","% erledigt" }, | 1107 | { "% completed","% erledigt" }, |
1108 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1108 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1109 | { "Set complete","Setze auf erledigt" }, | 1109 | { "Set complete","Setze auf erledigt" }, |
1110 | { "(cancelled)","(gecancelt)" }, | 1110 | { "(cancelled)","(gecancelt)" }, |
1111 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1111 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1112 | { " Local time "," Locale Zeit " }, | 1112 | { " Local time "," Locale Zeit " }, |
1113 | { "Form2","Form2" }, | 1113 | { "Form2","Form2" }, |
1114 | { "Filter enabled","Filter angeschaltet" }, | 1114 | { "Filter enabled","Filter angeschaltet" }, |
1115 | { "Edit Filters","Ändere Filter" }, | 1115 | { "Edit Filters","Ändere Filter" }, |
1116 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1116 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1117 | { "Agenda","Agenda" }, | 1117 | { "Agenda","Agenda" }, |
1118 | { " ("," (" }, | 1118 | { " ("," (" }, |
1119 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1119 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1120 | { "Print","Print" }, | 1120 | { "Print","Print" }, |
1121 | { "&Setup Printer...","Drucker &Setup..." }, | 1121 | { "&Setup Printer...","Drucker &Setup..." }, |
1122 | { "View Type","Zeige Typ" }, | 1122 | { "View Type","Zeige Typ" }, |
1123 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1123 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1124 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1124 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1125 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1125 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1126 | { "Portrait","Portrait" }, | 1126 | { "Portrait","Portrait" }, |
1127 | { "Landscape","Landschaft" }, | 1127 | { "Landscape","Landschaft" }, |
1128 | { "Print day","Drucke Tag" }, | 1128 | { "Print day","Drucke Tag" }, |
1129 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1129 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1130 | { "Date && Time Range","Datum && Zeitspanne" }, | 1130 | { "Date && Time Range","Datum && Zeitspanne" }, |
1131 | { "&End date:","&Enddatum:" }, | 1131 | { "&End date:","&Enddatum:" }, |
1132 | { "&Start date:","&Startdatum:" }, | 1132 | { "&Start date:","&Startdatum:" }, |
1133 | { "Start &time:","Startzeit:" }, | 1133 | { "Start &time:","Startzeit:" }, |
1134 | { "End ti&me:","Endzeit:" }, | 1134 | { "End ti&me:","Endzeit:" }, |
1135 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1135 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1136 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1136 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1137 | { "Alt+D","Alt+D" }, | 1137 | { "Alt+D","Alt+D" }, |
1138 | { "&Use colors","Nutze Farben" }, | 1138 | { "&Use colors","Nutze Farben" }, |
1139 | { "Alt+U","Alt+U" }, | 1139 | { "Alt+U","Alt+U" }, |
1140 | { "Print week","Drucke Woche" }, | 1140 | { "Print week","Drucke Woche" }, |
1141 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1141 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1142 | { "Use &colors","Nutze Farben" }, | 1142 | { "Use &colors","Nutze Farben" }, |
1143 | { "Type of View","Typ der Ansicht" }, | 1143 | { "Type of View","Typ der Ansicht" }, |
1144 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1144 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1145 | { "Alt+F","Alt+F" }, | 1145 | { "Alt+F","Alt+F" }, |
1146 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1146 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1147 | { "Alt+T","Alt+T" }, | 1147 | { "Alt+T","Alt+T" }, |
1148 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1148 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1149 | { "Print month","Drucke Monat" }, | 1149 | { "Print month","Drucke Monat" }, |
1150 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1150 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1151 | { "&Start month:","&Startmonat:" }, | 1151 | { "&Start month:","&Startmonat:" }, |
1152 | { "&End month:","&Endmonat:" }, | 1152 | { "&End month:","&Endmonat:" }, |
1153 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1153 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1154 | { "Print todos","Drucke Todos" }, | 1154 | { "Print todos","Drucke Todos" }, |
1155 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1155 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1156 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1156 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1157 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1157 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1158 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1158 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1159 | { "Items to Print","Zu druckende Items" }, | 1159 | { "Items to Print","Zu druckende Items" }, |
1160 | { "&From:","Von:" }, | 1160 | { "&From:","Von:" }, |
1161 | { "&To:","Bis:" }, | 1161 | { "&To:","Bis:" }, |
1162 | { "Print &all todo items","Drucke alle Todo Items" }, | 1162 | { "Print &all todo items","Drucke alle Todo Items" }, |
1163 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1163 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1164 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1164 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1165 | { "Todo List","Todo Liste" }, | 1165 | { "Todo List","Todo Liste" }, |
1166 | { "&Title:","&Titel:" }, | 1166 | { "&Title:","&Titel:" }, |
1167 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, | 1167 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, |
1168 | { "Todo list","Todo Liste" }, | 1168 | { "Todo list","Todo Liste" }, |
1169 | { "&Print...","Drucke..." }, | 1169 | { "&Print...","Drucke..." }, |
1170 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1170 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1171 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1171 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1172 | { "OK","OK" }, | 1172 | { "OK","OK" }, |
1173 | { "FilterEditor","FilterEditor" }, | 1173 | { "FilterEditor","FilterEditor" }, |
1174 | { "Include","Inclusive" }, | 1174 | { "Include","Inclusive" }, |
1175 | { "Exclude","Exclusive" }, | 1175 | { "Exclude","Exclusive" }, |
1176 | { "Edit Selection...","Editiere Auswahl" }, | 1176 | { "Edit Selection...","Editiere Auswahl" }, |
1177 | { "recurring events","wiederholende Termine" }, | 1177 | { "recurring events","wiederholende Termine" }, |
1178 | { "recurr. events","wiederh.Termine" }, | 1178 | { "recurr. events","wiederh.Termine" }, |
1179 | { "completed to-dos","erledigte Todos" }, | 1179 | { "completed to-dos","erledigte Todos" }, |
1180 | { "events","Termine" }, | 1180 | { "events","Termine" }, |
1181 | { "todos","Todos" }, | 1181 | { "todos","Todos" }, |
1182 | { "journals","Journale" }, | 1182 | { "journals","Journale" }, |
1183 | { "public","öffentl." }, | 1183 | { "public","öffentl." }, |
1184 | { "private","privat" }, | 1184 | { "private","privat" }, |
1185 | { "confidential","vertraul." }, | 1185 | { "confidential","vertraul." }, |
1186 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1186 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1187 | { "Yesterday","Gestern" }, | 1187 | { "Yesterday","Gestern" }, |
1188 | { "Day after tomorrow","Übermorgen" }, | 1188 | { "Day after tomorrow","Übermorgen" }, |
1189 | { "Tomorrow","Morgen" }, | 1189 | { "Tomorrow","Morgen" }, |
1190 | { "Day before yesterday","Vorgestern" }, | 1190 | { "Day before yesterday","Vorgestern" }, |
1191 | { "Size %1","Größe %1" }, | 1191 | { "Size %1","Größe %1" }, |
1192 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1192 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1193 | { " (%1 y.)"," (%1 J.)" }, | 1193 | { " (%1 y.)"," (%1 J.)" }, |
1194 | { "Allday:","Ganztägig:" }, | 1194 | { "Allday:","Ganztägig:" }, |
1195 | { "compl.todos","erled.Todos" }, | 1195 | { "compl.todos","erled.Todos" }, |
1196 | { "Day view","Tagesansicht" }, | 1196 | { "Day view","Tagesansicht" }, |
1197 | { "Next days","Nächste Tage" }, | 1197 | { "Next days","Nächste Tage" }, |
1198 | { "Next week","Nächste Woche" }, | 1198 | { "Next week","Nächste Woche" }, |
1199 | { "Next two weeks","Nächste zwei Wochen" }, | 1199 | { "Next two weeks","Nächste zwei Wochen" }, |
1200 | { "Next month","Nächster Monat" }, | 1200 | { "Next month","Nächster Monat" }, |
1201 | { "Journal view","Journal" }, | 1201 | { "Journal view","Journal" }, |
1202 | { "Display all opened","Zeige alle geöffnet" }, | 1202 | { "Display all opened","Zeige alle geöffnet" }, |
1203 | { "Display all closed","Zeige alle geschlossen" }, | 1203 | { "Display all closed","Zeige alle geschlossen" }, |
1204 | { "Display all flat","Zeige alle flach" }, | 1204 | { "Display all flat","Zeige alle flach" }, |
1205 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1205 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1206 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1206 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1207 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1207 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1208 | { "Select Week","Wähle Woche" }, | 1208 | { "Select Week","Wähle Woche" }, |
1209 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1209 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1210 | { "Set Alarm!","Setze Alarm!" }, | 1210 | { "Set Alarm!","Setze Alarm!" }, |
1211 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, | 1211 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, |
1212 | { " and "," und " }, | 1212 | { " and "," und " }, |
1213 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1213 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1214 | { "Mail to selected","Mail an Ausgewählte" }, | 1214 | { "Mail to selected","Mail an Ausgewählte" }, |
1215 | { "Mail to all","Mail an Alle" }, | 1215 | { "Mail to all","Mail an Alle" }, |
1216 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1216 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1217 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1217 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1218 | { " on"," am" }, | 1218 | { " on"," am" }, |
1219 | { " completed on "," erledigt am " }, | 1219 | { " completed on "," erledigt am " }, |
1220 | { "Save as Event template","Speichere als Vorlage" }, | 1220 | { "Save as Event template","Speichere als Vorlage" }, |
1221 | { "Load Event template","Lade Termin Vorlage" }, | 1221 | { "Load Event template","Lade Termin Vorlage" }, |
1222 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1222 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1223 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1223 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1224 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1224 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1225 | { "Parent todo:<br>","Über Todo:<br>" }, | 1225 | { "Parent todo:<br>","Über Todo:<br>" }, |
1226 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1226 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1227 | { " completed"," erledigt" }, | 1227 | { " completed"," erledigt" }, |
1228 | { "(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!" }, | 1228 | { "(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!" }, |
1229 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1229 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1230 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1230 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1231 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1231 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1232 | { "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?" }, | 1232 | { "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?" }, |
1233 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1233 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1234 | { "Error","Fehler" }, | 1234 | { "Error","Fehler" }, |
1235 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1235 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1236 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1236 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1237 | { "Warning","Warnung" }, | 1237 | { "Warning","Warnung" }, |
1238 | { "Select week number","Wähle Wochen Nummer" }, | 1238 | { "Select week number","Wähle Wochen Nummer" }, |
1239 | { "Februar","Februar" }, | 1239 | { "Februar","Februar" }, |
1240 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1240 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1241 | { "W","W" }, | 1241 | { "W","W" }, |
1242 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1242 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1243 | { "T: %1","T: %1" }, | 1243 | { "T: %1","T: %1" }, |
1244 | { "Start: ","Start: " }, | 1244 | { "Start: ","Start: " }, |
1245 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1245 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1246 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1246 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1247 | { "Remote IP address:","Ferne IP Adresse:" }, | 1247 | { "Remote IP address:","Ferne IP Adresse:" }, |
1248 | { "Remote port number:","Ferne Port Nummer:" }, | 1248 | { "Remote port number:","Ferne Port Nummer:" }, |
1249 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1249 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1250 | { "Remote from: ","Fern von: " }, | 1250 | { "Remote from: ","Fern von: " }, |
1251 | { "Local from: ","Lokal von: " }, | 1251 | { "Local from: ","Lokal von: " }, |
1252 | { "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" }, | 1252 | { "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" }, |
1253 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1253 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1254 | { "Write back","Schreibe zurück" }, | 1254 | { "Write back","Schreibe zurück" }, |
1255 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1255 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1256 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1256 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1257 | { "Received sync request","Sync Anfrage erhalten" }, | 1257 | { "Received sync request","Sync Anfrage erhalten" }, |
1258 | { "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." }, | 1258 | { "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." }, |
1259 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1259 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1260 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1260 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1261 | { "Sending file...","Sende Datei..." }, | 1261 | { "Sending file...","Sende Datei..." }, |
1262 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1262 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1264 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1264 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1265 | { "Writing file to disk...","Speichere Datei..." }, | 1265 | { "Writing file to disk...","Speichere Datei..." }, |
1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1268 | { "Synchronize!","Synchronisiere!" }, | 1268 | { "Synchronize!","Synchronisiere!" }, |
1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1271 | { "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!" }, | 1271 | { "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!" }, |
1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1274 | { "List week view","Listenwochenansicht" }, | 1274 | { "List week view","Listenwochenansicht" }, |
1275 | { "List week","Listenwochenansicht" }, | 1275 | { "List week","Listenwochenansicht" }, |
1276 | { "Next Week","Nächste Woche" }, | 1276 | { "Next Week","Nächste Woche" }, |
1277 | { "Previous Week","Vorherige Woche" }, | 1277 | { "Previous Week","Vorherige Woche" }, |
1278 | { "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." }, | 1278 | { "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." }, |
1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1280 | { "Details","Details" }, | 1280 | { "Details","Details" }, |
1281 | { "Created time","Erstellt Zeit" }, | 1281 | { "Created time","Erstellt Zeit" }, |
1282 | { "Last modified time","Geändert Zeit" }, | 1282 | { "Last modified time","Geändert Zeit" }, |
1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1284 | { "View Options","Anzeige Optionen" }, | 1284 | { "View Options","Anzeige Optionen" }, |
1285 | { "<b>Created: ","<b>Erstellt am: " }, | 1285 | { "<b>Created: ","<b>Erstellt am: " }, |
1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1287 | { "Journal: ","Journal: " }, | 1287 | { "Journal: ","Journal: " }, |
1288 | { "yearly","jährlich" }, | 1288 | { "yearly","jährlich" }, |
1289 | { "(%1) ","%1-" }, | 1289 | { "(%1) ","%1-" }, |
1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1293 | { "Summary/Loc.","Titel/Ort" }, | 1293 | { "Summary/Loc.","Titel/Ort" }, |
1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1295 | { "Week Number","Wochennummer" }, | 1295 | { "Week Number","Wochennummer" }, |
1296 | { "Import","Importiere" }, | 1296 | { "Import","Importiere" }, |
1297 | { "Export","Exportiere" }, | 1297 | { "Export","Exportiere" }, |
1298 | { "Beam","Beame" }, | 1298 | { "Beam","Beame" }, |
1299 | { "Export selected","Exportiere Selektierte" }, | 1299 | { "Export selected","Exportiere Selektierte" }, |
1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1302 | { "Journal/Details...","Journale/Details..." }, | 1302 | { "Journal/Details...","Journale/Details..." }, |
1303 | { "Agenda View","Agenda Ansicht" }, | 1303 | { "Agenda View","Agenda Ansicht" }, |
1304 | { "Show current time","Zeige aktuelle Zeit" }, | 1304 | { "Show current time","Zeige aktuelle Zeit" }, |
1305 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1305 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1306 | { "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" }, | ||
1307 | { "","" }, | ||
1308 | { "","" }, | ||
1309 | { "","" }, | ||
1306 | { "","" }, | 1310 | { "","" }, |
1307 | { "","" }, | 1311 | { "","" }, |
1308 | { "","" }, | 1312 | { "","" }, |
1309 | { "","" }, | 1313 | { "","" }, |
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 50c4605..ec7f730 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -1,607 +1,681 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the KOrganizer alarm daemon. | 2 | This file is part of the KOrganizer alarm daemon. |
3 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2002 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 "simplealarmdaemonimpl.h" | 24 | #include "simplealarmdaemonimpl.h" |
25 | 25 | ||
26 | #include "alarmdialog.h" | 26 | #include "alarmdialog.h" |
27 | #include <qpopupmenu.h> | 27 | #include <qpopupmenu.h> |
28 | #include <qapp.h> | 28 | #include <qapp.h> |
29 | #include <qdir.h> | 29 | #include <qdir.h> |
30 | #include <qfile.h> | 30 | #include <qfile.h> |
31 | #include <qhbox.h> | 31 | #include <qhbox.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qfile.h> | 33 | #include <qfile.h> |
34 | #include <qdatetime.h> | ||
35 | #include <qpushbutton.h> | ||
34 | #include <qlayout.h> | 36 | #include <qlayout.h> |
35 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
36 | #include <qdialog.h> | 38 | #include <qdialog.h> |
39 | #define protected public | ||
37 | #include <qspinbox.h> | 40 | #include <qspinbox.h> |
41 | #undef protected | ||
38 | #include <qtextstream.h> | 42 | #include <qtextstream.h> |
39 | #include <qtopia/qcopenvelope_qws.h> | 43 | #include <qtopia/qcopenvelope_qws.h> |
40 | #include <qtopia/alarmserver.h> | 44 | #include <qtopia/alarmserver.h> |
41 | 45 | ||
42 | #include <stdlib.h> | 46 | #include <stdlib.h> |
43 | #include <stdio.h> | 47 | #include <stdio.h> |
44 | #include <unistd.h> | 48 | #include <unistd.h> |
45 | 49 | ||
46 | 50 | ||
47 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | 51 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) |
48 | : QLabel( parent ) | 52 | : QLabel( parent ) |
49 | { | 53 | { |
50 | mAlarmDialog = new AlarmDialog( 0 ); | 54 | mAlarmDialog = new AlarmDialog( 0 ); |
51 | mPopUp = new QPopupMenu( this ); | 55 | mPopUp = new QPopupMenu( this ); |
52 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); | 56 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); |
53 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); | 57 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); |
54 | mPopUp->insertSeparator(); | 58 | mPopUp->insertSeparator(); |
55 | mPopUp->insertItem( "What's Todo?", this, SLOT ( showTodo() ) ); | 59 | mPopUp->insertItem( "What's Todo?", this, SLOT ( showTodo() ) ); |
56 | mPopUp->insertSeparator(); | 60 | mPopUp->insertSeparator(); |
57 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); | 61 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); |
58 | mPopUp->insertSeparator(); | 62 | mPopUp->insertSeparator(); |
59 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); | 63 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); |
60 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); | 64 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); |
61 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); | 65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); |
62 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); | 66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); |
63 | mPopUp->insertSeparator(); | 67 | mPopUp->insertSeparator(); |
64 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); | 68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); |
65 | mTimerPopUp = new QPopupMenu( this ); | 69 | mTimerPopUp = new QPopupMenu( this ); |
66 | 70 | QFont fon = mTimerPopUp->font(); | |
71 | fon.setPointSize( fon.pointSize() *3/2 ); | ||
72 | mTimerPopUp->setFont( fon ); | ||
67 | mBeepPopUp = new QPopupMenu( this ); | 73 | mBeepPopUp = new QPopupMenu( this ); |
68 | mSoundPopUp = new QPopupMenu( this ); | 74 | mSoundPopUp = new QPopupMenu( this ); |
69 | mPausePopUp = new QPopupMenu( this ); | 75 | mPausePopUp = new QPopupMenu( this ); |
70 | QPopupMenu* savePopUp = new QPopupMenu( this ); | 76 | QPopupMenu* savePopUp = new QPopupMenu( this ); |
71 | savePopUp->insertItem( "Save", 0 ); | 77 | savePopUp->insertItem( "Save", 0 ); |
72 | savePopUp->insertItem( "Load", 1 ); | 78 | savePopUp->insertItem( "Load", 1 ); |
73 | mSoundPopUp->insertItem( "Buzzer", 0 ); | 79 | mSoundPopUp->insertItem( "Buzzer", 0 ); |
74 | mSoundPopUp->insertItem( "Wav file", 1 ); | 80 | mSoundPopUp->insertItem( "Wav file", 1 ); |
75 | mPausePopUp->insertItem( " 1 sec", 1 ); | 81 | mPausePopUp->insertItem( " 1 sec", 1 ); |
76 | mPausePopUp->insertItem( " 2 sec", 2 ); | 82 | mPausePopUp->insertItem( " 2 sec", 2 ); |
77 | mPausePopUp->insertItem( " 3 sec", 3 ); | 83 | mPausePopUp->insertItem( " 3 sec", 3 ); |
78 | mPausePopUp->insertItem( " 5 sec", 5 ); | 84 | mPausePopUp->insertItem( " 5 sec", 5 ); |
79 | mPausePopUp->insertItem( "10 sec", 10 ); | 85 | mPausePopUp->insertItem( "10 sec", 10 ); |
80 | mPausePopUp->insertItem( "30 sec", 30 ); | 86 | mPausePopUp->insertItem( "30 sec", 30 ); |
81 | mPausePopUp->insertItem( " 1 min", 60 ); | 87 | mPausePopUp->insertItem( " 1 min", 60 ); |
82 | mPausePopUp->insertItem( " 5 min", 300 ); | 88 | mPausePopUp->insertItem( " 5 min", 300 ); |
83 | mPausePopUp->insertItem( "10 min", 600 ); | 89 | mPausePopUp->insertItem( "10 min", 600 ); |
84 | mSuspendPopUp = new QPopupMenu( this ); | 90 | mSuspendPopUp = new QPopupMenu( this ); |
85 | mSuspendPopUp->insertItem( "Off", 0 ); | 91 | mSuspendPopUp->insertItem( "Off", 0 ); |
86 | mSuspendPopUp->insertItem( " 1x", 1 ); | 92 | mSuspendPopUp->insertItem( " 1x", 1 ); |
87 | mSuspendPopUp->insertItem( " 2x", 2 ); | 93 | mSuspendPopUp->insertItem( " 2x", 2 ); |
88 | mSuspendPopUp->insertItem( " 3x", 3 ); | 94 | mSuspendPopUp->insertItem( " 3x", 3 ); |
89 | mSuspendPopUp->insertItem( " 5x", 5 ); | 95 | mSuspendPopUp->insertItem( " 5x", 5 ); |
90 | mSuspendPopUp->insertItem( "10x", 10 ); | 96 | mSuspendPopUp->insertItem( "10x", 10 ); |
91 | mSuspendPopUp->insertItem( "20x", 20 ); | 97 | mSuspendPopUp->insertItem( "20x", 20 ); |
92 | mSuspendPopUp->insertItem( "30x", 30 ); | 98 | mSuspendPopUp->insertItem( "30x", 30 ); |
93 | mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); | 99 | mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); |
94 | mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); | 100 | mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); |
95 | mBeepPopUp->insertItem( "Replay",mSoundPopUp ); | 101 | mBeepPopUp->insertItem( "Replay",mSoundPopUp ); |
96 | mBeepPopUp->insertItem( "Config",savePopUp ); | 102 | mBeepPopUp->insertItem( "Config",savePopUp ); |
97 | mBeepPopUp->insertItem( "300", 300 ); | 103 | mBeepPopUp->insertItem( "300", 300 ); |
98 | mBeepPopUp->insertItem( "180", 180 ); | 104 | mBeepPopUp->insertItem( "180", 180 ); |
99 | mBeepPopUp->insertItem( "60", 60 ); | 105 | mBeepPopUp->insertItem( "60", 60 ); |
100 | mBeepPopUp->insertItem( "30", 30 ); | 106 | mBeepPopUp->insertItem( "30", 30 ); |
101 | mBeepPopUp->insertItem( "10", 10 ); | 107 | mBeepPopUp->insertItem( "10", 10 ); |
102 | mBeepPopUp->insertItem( "3", 3 ); | 108 | mBeepPopUp->insertItem( "3", 3 ); |
103 | mBeepPopUp->insertItem( "1", 1 ); | 109 | mBeepPopUp->insertItem( "1", 1 ); |
104 | mBeepPopUp->insertItem( "Off", 0 ); | 110 | mBeepPopUp->insertItem( "Off", 0 ); |
105 | mBeepPopUp->setCheckable( true ); | 111 | mBeepPopUp->setCheckable( true ); |
106 | mPopUp->insertSeparator(); | 112 | mPopUp->insertSeparator(); |
107 | mPopUp->insertItem( "Play beeps", mBeepPopUp ); | 113 | mPopUp->insertItem( "Play beeps", mBeepPopUp ); |
108 | mPopUp->insertSeparator(); | 114 | mPopUp->insertSeparator(); |
109 | mPopUp->insertItem( "Timer", mTimerPopUp ); | 115 | mPopUp->insertItem( "Timer", mTimerPopUp ); |
110 | mPopUp->insertSeparator(); | 116 | mPopUp->insertSeparator(); |
111 | mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); | 117 | mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); |
112 | 118 | ||
113 | mPopUp->resize( mPopUp->sizeHint() ); | 119 | mPopUp->resize( mPopUp->sizeHint() ); |
114 | mPlayBeeps = 60; | 120 | mPlayBeeps = 60; |
115 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); | 121 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); |
116 | connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) ); | 122 | connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) ); |
117 | connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) ); | 123 | connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) ); |
118 | connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) ); | 124 | connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) ); |
119 | connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) ); | 125 | connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) ); |
120 | connect ( mPausePopUp, SIGNAL( activated ( int ) ), this, SLOT (confPause( int ) ) ); | 126 | connect ( mPausePopUp, SIGNAL( activated ( int ) ), this, SLOT (confPause( int ) ) ); |
121 | connect ( mSuspendPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSuspend( int ) ) ); | 127 | connect ( mSuspendPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSuspend( int ) ) ); |
122 | connect ( savePopUp, SIGNAL( activated ( int ) ), this, SLOT (saveSlot( int ) ) ); | 128 | connect ( savePopUp, SIGNAL( activated ( int ) ), this, SLOT (saveSlot( int ) ) ); |
123 | mTimerTime = 0; | 129 | mTimerTime = 0; |
124 | mCustomText = "Custom Text"; | 130 | mCustomText = "Custom Text"; |
125 | mCustomMinutes = 7; | 131 | mCustomMinutes = 7; |
126 | mTimerPopupConf = 1; | 132 | mTimerPopupConf = 1; |
127 | fillTimerPopUp(); | 133 | fillTimerPopUp(); |
128 | mPausePlay = 0; | 134 | mPausePlay = 0; |
129 | confPause( 1 ); | 135 | confPause( 1 ); |
130 | mSuspend = 0; | 136 | mSuspend = 0; |
131 | confSuspend( 0 ); | 137 | confSuspend( 0 ); |
132 | if ( QApplication::desktop()->width() < 480 ) { | 138 | if ( QApplication::desktop()->width() < 480 ) { |
133 | wavAlarm = false; | 139 | wavAlarm = false; |
134 | mSoundPopUp->setItemChecked ( 0, true ); | 140 | mSoundPopUp->setItemChecked ( 0, true ); |
135 | } | 141 | } |
136 | else { | 142 | else { |
137 | wavAlarm = true; | 143 | wavAlarm = true; |
138 | mSoundPopUp->setItemChecked ( 1, true ); | 144 | mSoundPopUp->setItemChecked ( 1, true ); |
139 | } | 145 | } |
140 | saveSlot( 1 ); | 146 | saveSlot( 1 ); |
141 | } | 147 | } |
142 | 148 | ||
143 | SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl() | 149 | SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl() |
144 | { | 150 | { |
145 | //delete mPopUp; | 151 | //delete mPopUp; |
146 | delete mAlarmDialog; | 152 | delete mAlarmDialog; |
147 | } | 153 | } |
148 | void SimpleAlarmDaemonImpl::saveSlot( int load ) | 154 | void SimpleAlarmDaemonImpl::saveSlot( int load ) |
149 | { | 155 | { |
150 | QString fileName = QDir::homeDirPath() +"/.kopialarmrc"; | 156 | QString fileName = QDir::homeDirPath() +"/.kopialarmrc"; |
151 | //qDebug("save %d ", load ); | 157 | //qDebug("save %d ", load ); |
152 | QFile file( fileName ); | 158 | QFile file( fileName ); |
153 | if ( load ) { | 159 | if ( load ) { |
154 | if( !QFile::exists( fileName) ) | 160 | if( !QFile::exists( fileName) ) |
155 | return; | 161 | return; |
156 | if (!file.open( IO_ReadOnly ) ) { | 162 | if (!file.open( IO_ReadOnly ) ) { |
157 | return ; | 163 | return ; |
158 | } | 164 | } |
159 | QString line; | 165 | QString line; |
160 | bool ok; | 166 | bool ok; |
161 | int val; | 167 | int val; |
162 | int len; | 168 | int len; |
163 | while ( file.readLine( line, 1024 ) > 0 ) { | 169 | while ( file.readLine( line, 1024 ) > 0 ) { |
164 | //qDebug("read %s ", line.latin1()); | 170 | //qDebug("read %s ", line.latin1()); |
165 | len = line.length(); | 171 | len = line.length(); |
166 | if ( line.left(4 ) == "PPAU" ) { | 172 | if ( line.left(4 ) == "PPAU" ) { |
167 | val = line.mid( 4,len-5).toInt( &ok ); | 173 | val = line.mid( 4,len-5).toInt( &ok ); |
168 | if ( ok ) { | 174 | if ( ok ) { |
169 | confPause( val ); | 175 | confPause( val ); |
170 | } | 176 | } |
171 | } | 177 | } |
172 | if ( line.left(4 ) == "SUCO" ) { | 178 | if ( line.left(4 ) == "SUCO" ) { |
173 | val = line.mid( 4,len-5).toInt( &ok ); | 179 | val = line.mid( 4,len-5).toInt( &ok ); |
174 | if ( ok ) | 180 | if ( ok ) |
175 | confSuspend ( val ); | 181 | confSuspend ( val ); |
176 | } | 182 | } |
177 | if ( line.left(4 ) == "WAAL" ) { | 183 | if ( line.left(4 ) == "WAAL" ) { |
178 | val = line.mid( 4,len-5).toInt( &ok ); | 184 | val = line.mid( 4,len-5).toInt( &ok ); |
179 | if ( ok ) | 185 | if ( ok ) |
180 | confSound( val ); | 186 | confSound( val ); |
181 | 187 | ||
182 | } | 188 | } |
183 | if ( line.left(4 ) == "PLBE" ) { | 189 | if ( line.left(4 ) == "PLBE" ) { |
184 | val = line.mid( 4,len-5).toInt( &ok ); | 190 | val = line.mid( 4,len-5).toInt( &ok ); |
185 | if ( ok ) | 191 | if ( ok ) |
186 | slotPlayBeep( val ); | 192 | slotPlayBeep( val ); |
187 | 193 | ||
188 | } | 194 | } |
189 | if ( line.left(4 ) == "CUTE" ) { | 195 | if ( line.left(4 ) == "CUTE" ) { |
190 | mCustomText = line.mid( 5,len-6); | 196 | mCustomText = line.mid( 5,len-6); |
191 | // qDebug("text ***%s*** ",mCustomText.latin1() ); | 197 | // qDebug("text ***%s*** ",mCustomText.latin1() ); |
192 | 198 | ||
193 | } | 199 | } |
194 | if ( line.left(4 ) == "CUMI" ) { | 200 | if ( line.left(4 ) == "CUMI" ) { |
195 | val = line.mid( 4,len-5).toInt( &ok ); | 201 | val = line.mid( 4,len-5).toInt( &ok ); |
196 | if ( ok ) | 202 | if ( ok ) |
197 | mCustomMinutes = val; | 203 | mCustomMinutes = val; |
198 | 204 | ||
199 | } | 205 | } |
200 | if ( line.left(4 ) == "SUTI" ) { | 206 | if ( line.left(4 ) == "SUTI" ) { |
201 | val = line.mid( 4,len-5).toInt( &ok ); | 207 | val = line.mid( 4,len-5).toInt( &ok ); |
202 | if ( ok ) | 208 | if ( ok ) |
203 | mAlarmDialog->setSuspendTime( val );; | 209 | mAlarmDialog->setSuspendTime( val );; |
204 | 210 | ||
205 | } | 211 | } |
206 | } | 212 | } |
207 | file.close(); | 213 | file.close(); |
208 | } else { | 214 | } else { |
209 | if (!file.open( IO_WriteOnly ) ) { | 215 | if (!file.open( IO_WriteOnly ) ) { |
210 | return; | 216 | return; |
211 | } | 217 | } |
212 | QString configString ; | 218 | QString configString ; |
213 | configString += "PPAU " + QString::number( mPausePlay ) + "\n"; | 219 | configString += "PPAU " + QString::number( mPausePlay ) + "\n"; |
214 | configString += "SUCO " + QString::number( mSuspend ) + "\n"; | 220 | configString += "SUCO " + QString::number( mSuspend ) + "\n"; |
215 | configString += "WAAL " + QString::number( wavAlarm ) + "\n"; | 221 | configString += "WAAL " + QString::number( wavAlarm ) + "\n"; |
216 | configString += "PLBE " + QString::number( mPlayBeeps ) + "\n"; | 222 | configString += "PLBE " + QString::number( mPlayBeeps ) + "\n"; |
217 | configString += "CUTE " + mCustomText + "\n"; | 223 | configString += "CUTE " + mCustomText + "\n"; |
218 | configString += "CUMI " + QString::number( mCustomMinutes ) + "\n"; | 224 | configString += "CUMI " + QString::number( mCustomMinutes ) + "\n"; |
219 | configString += "SUTI " + QString::number( mAlarmDialog->getSuspendTime( )) + "\n"; | 225 | configString += "SUTI " + QString::number( mAlarmDialog->getSuspendTime( )) + "\n"; |
220 | QTextStream ts( &file ); | 226 | QTextStream ts( &file ); |
221 | ts << configString ; | 227 | ts << configString ; |
222 | file.close(); | 228 | file.close(); |
223 | } | 229 | } |
224 | 230 | ||
225 | } | 231 | } |
226 | void SimpleAlarmDaemonImpl::confSuspend( int num ) | 232 | void SimpleAlarmDaemonImpl::confSuspend( int num ) |
227 | { | 233 | { |
228 | mSuspendPopUp->setItemChecked ( mSuspend,false ); | 234 | mSuspendPopUp->setItemChecked ( mSuspend,false ); |
229 | mSuspend = num; | 235 | mSuspend = num; |
230 | mSuspendPopUp->setItemChecked ( mSuspend,true ); | 236 | mSuspendPopUp->setItemChecked ( mSuspend,true ); |
231 | } | 237 | } |
232 | void SimpleAlarmDaemonImpl::confPause( int num ) | 238 | void SimpleAlarmDaemonImpl::confPause( int num ) |
233 | { | 239 | { |
234 | mPausePopUp->setItemChecked ( mPausePlay,false ); | 240 | mPausePopUp->setItemChecked ( mPausePlay,false ); |
235 | mPausePlay = num; | 241 | mPausePlay = num; |
236 | mPausePopUp->setItemChecked ( mPausePlay,true ); | 242 | mPausePopUp->setItemChecked ( mPausePlay,true ); |
237 | } | 243 | } |
238 | void SimpleAlarmDaemonImpl::confSound( int num ) | 244 | void SimpleAlarmDaemonImpl::confSound( int num ) |
239 | { | 245 | { |
240 | if ( num == 0 ) { | 246 | if ( num == 0 ) { |
241 | wavAlarm = false; | 247 | wavAlarm = false; |
242 | mSoundPopUp->setItemChecked ( 0, true ); | 248 | mSoundPopUp->setItemChecked ( 0, true ); |
243 | mSoundPopUp->setItemChecked ( 1, false ); | 249 | mSoundPopUp->setItemChecked ( 1, false ); |
244 | } else { | 250 | } else { |
245 | wavAlarm = true; | 251 | wavAlarm = true; |
246 | mSoundPopUp->setItemChecked ( 0, false ); | 252 | mSoundPopUp->setItemChecked ( 0, false ); |
247 | mSoundPopUp->setItemChecked ( 1, true ); | 253 | mSoundPopUp->setItemChecked ( 1, true ); |
248 | } | 254 | } |
249 | } | 255 | } |
250 | void SimpleAlarmDaemonImpl::slotPlayBeep( int num ) | 256 | void SimpleAlarmDaemonImpl::slotPlayBeep( int num ) |
251 | { | 257 | { |
252 | mBeepPopUp->setItemChecked ( mPlayBeeps,false ); | 258 | mBeepPopUp->setItemChecked ( mPlayBeeps,false ); |
253 | mPlayBeeps = num; | 259 | mPlayBeeps = num; |
254 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); | 260 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); |
255 | } | 261 | } |
256 | 262 | ||
257 | void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) | 263 | void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) |
258 | { | 264 | { |
259 | //qDebug("SimpleAlarmDaemonImpl::ALARM RECEIVED! %s", msg.data()); | 265 | //qDebug("SimpleAlarmDaemonImpl::ALARM RECEIVED! %s", msg.data()); |
260 | QString mess = msg; | 266 | QString mess = msg; |
261 | mAlarmMessage = mess.mid( 9 ); | 267 | mAlarmMessage = mess.mid( 9 ); |
262 | QString filename = getenv("QPEDIR") ; | 268 | QString filename = getenv("QPEDIR") ; |
263 | filename += "/pics/kdepim/korganizer/koalarm.wav"; | 269 | filename += "/pics/kdepim/korganizer/koalarm.wav"; |
264 | QString tempfilename; | 270 | QString tempfilename; |
265 | if ( mess.left( 13 ) == "suspend_alarm") { | 271 | if ( mess.left( 13 ) == "suspend_alarm") { |
266 | bool error = false; | 272 | bool error = false; |
267 | int len = mess.mid( 13 ).find("+++"); | 273 | int len = mess.mid( 13 ).find("+++"); |
268 | if ( len < 2 ) | 274 | if ( len < 2 ) |
269 | error = true; | 275 | error = true; |
270 | else { | 276 | else { |
271 | tempfilename = mess.mid( 13, len ); | 277 | tempfilename = mess.mid( 13, len ); |
272 | if ( !QFile::exists( tempfilename ) ) | 278 | if ( !QFile::exists( tempfilename ) ) |
273 | error = true; | 279 | error = true; |
274 | } | 280 | } |
275 | if ( ! error ) { | 281 | if ( ! error ) { |
276 | filename = tempfilename; | 282 | filename = tempfilename; |
277 | } | 283 | } |
278 | mAlarmMessage = mess.mid( 13+len+3 ); | 284 | mAlarmMessage = mess.mid( 13+len+3 ); |
279 | //qDebug("suspend file %s ",tempfilename.latin1() ); | 285 | //qDebug("suspend file %s ",tempfilename.latin1() ); |
280 | startAlarm( mAlarmMessage, filename); | 286 | startAlarm( mAlarmMessage, filename); |
281 | return; | 287 | return; |
282 | } | 288 | } |
283 | if ( mess.left( 11 ) == "timer_alarm") { | 289 | if ( mess.left( 11 ) == "timer_alarm") { |
284 | mTimerTime = 0; | 290 | mTimerTime = 0; |
285 | startAlarm( mess.mid( 11 ), filename ); | 291 | startAlarm( mess.mid( 11 ), filename ); |
286 | return; | 292 | return; |
287 | } | 293 | } |
288 | if ( mess.left( 10 ) == "proc_alarm") { | 294 | if ( mess.left( 10 ) == "proc_alarm") { |
289 | bool error = false; | 295 | bool error = false; |
290 | int len = mess.mid( 10 ).find("+++"); | 296 | int len = mess.mid( 10 ).find("+++"); |
291 | if ( len < 2 ) | 297 | if ( len < 2 ) |
292 | error = true; | 298 | error = true; |
293 | else { | 299 | else { |
294 | tempfilename = mess.mid( 10, len ); | 300 | tempfilename = mess.mid( 10, len ); |
295 | if ( !QFile::exists( tempfilename ) ) | 301 | if ( !QFile::exists( tempfilename ) ) |
296 | error = true; | 302 | error = true; |
297 | } | 303 | } |
298 | if ( error ) { | 304 | if ( error ) { |
299 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; | 305 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; |
300 | mAlarmMessage += mess.mid( 10+len+3+9 ); | 306 | mAlarmMessage += mess.mid( 10+len+3+9 ); |
301 | } else { | 307 | } else { |
302 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); | 308 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); |
303 | //qDebug("-----system command %s ",tempfilename.latin1() ); | 309 | //qDebug("-----system command %s ",tempfilename.latin1() ); |
304 | if ( vfork () == 0 ) { | 310 | if ( vfork () == 0 ) { |
305 | execl ( tempfilename.latin1(), 0 ); | 311 | execl ( tempfilename.latin1(), 0 ); |
306 | return; | 312 | return; |
307 | } | 313 | } |
308 | return; | 314 | return; |
309 | } | 315 | } |
310 | 316 | ||
311 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); | 317 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); |
312 | } | 318 | } |
313 | if ( mess.left( 11 ) == "audio_alarm") { | 319 | if ( mess.left( 11 ) == "audio_alarm") { |
314 | bool error = false; | 320 | bool error = false; |
315 | int len = mess.mid( 11 ).find("+++"); | 321 | int len = mess.mid( 11 ).find("+++"); |
316 | if ( len < 2 ) | 322 | if ( len < 2 ) |
317 | error = true; | 323 | error = true; |
318 | else { | 324 | else { |
319 | tempfilename = mess.mid( 11, len ); | 325 | tempfilename = mess.mid( 11, len ); |
320 | if ( !QFile::exists( tempfilename ) ) | 326 | if ( !QFile::exists( tempfilename ) ) |
321 | error = true; | 327 | error = true; |
322 | } | 328 | } |
323 | if ( ! error ) { | 329 | if ( ! error ) { |
324 | filename = tempfilename; | 330 | filename = tempfilename; |
325 | } | 331 | } |
326 | mAlarmMessage = mess.mid( 11+len+3+9 ); | 332 | mAlarmMessage = mess.mid( 11+len+3+9 ); |
327 | //qDebug("audio file command %s ",tempfilename.latin1() ); | 333 | //qDebug("audio file command %s ",tempfilename.latin1() ); |
328 | } | 334 | } |
329 | if ( mess.left( 9 ) == "cal_alarm") { | 335 | if ( mess.left( 9 ) == "cal_alarm") { |
330 | mAlarmMessage = mess.mid( 9 ) ; | 336 | mAlarmMessage = mess.mid( 9 ) ; |
331 | } | 337 | } |
332 | 338 | ||
333 | writeFile(); | 339 | writeFile(); |
334 | startAlarm( mAlarmMessage, filename ); | 340 | startAlarm( mAlarmMessage, filename ); |
335 | 341 | ||
336 | } | 342 | } |
337 | 343 | ||
338 | int SimpleAlarmDaemonImpl::getFileNameLen( QString mess ) | 344 | int SimpleAlarmDaemonImpl::getFileNameLen( QString mess ) |
339 | { | 345 | { |
340 | return 0; | 346 | return 0; |
341 | } | 347 | } |
342 | void SimpleAlarmDaemonImpl::startAlarm( QString mess, QString filename ) | 348 | void SimpleAlarmDaemonImpl::startAlarm( QString mess, QString filename ) |
343 | { | 349 | { |
344 | //mAlarmDialog->show(); | 350 | //mAlarmDialog->show(); |
345 | //mAlarmDialog->raise(); | 351 | //mAlarmDialog->raise(); |
346 | mAlarmDialog->eventNotification( mess, mPlayBeeps, filename, wavAlarm,mPausePlay ,mSuspend ); | 352 | mAlarmDialog->eventNotification( mess, mPlayBeeps, filename, wavAlarm,mPausePlay ,mSuspend ); |
347 | } | 353 | } |
348 | 354 | ||
349 | 355 | ||
350 | void SimpleAlarmDaemonImpl::fillTimerPopUp() | 356 | void SimpleAlarmDaemonImpl::fillTimerPopUp() |
351 | { | 357 | { |
352 | 358 | ||
353 | // qDebug(" timer %d %d ",mTimerPopupConf, mTimerTime ); | 359 | // qDebug(" timer %d %d ",mTimerPopupConf, mTimerTime ); |
354 | if ( mTimerPopupConf == mTimerTime ) { | 360 | if ( mTimerPopupConf == mTimerTime ) { |
355 | if ( mTimerTime ) { | 361 | if ( mTimerTime ) { |
356 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); | 362 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); |
357 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); | 363 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); |
358 | mTimerPopUp->changeItem ( 1 , t.toString()); | 364 | mTimerPopUp->changeItem ( 1 , t.toString() + " (remaining time)"); |
359 | } | 365 | } |
360 | else { | 366 | else { |
361 | QString text = mCustomText.stripWhiteSpace (); | 367 | QString text = mCustomText.stripWhiteSpace (); |
362 | int in = text.find( " " ); | 368 | int in = text.find( " " ); |
363 | text = text.left ( in ); | 369 | text = text.left ( in ); |
364 | mTimerPopUp->changeItem ( 3, text ); | 370 | mTimerPopUp->changeItem ( 3, text ); |
365 | } | 371 | } |
366 | return; | 372 | return; |
367 | } | 373 | } |
368 | mTimerPopupConf = mTimerTime; | 374 | mTimerPopupConf = mTimerTime; |
369 | mTimerPopUp->clear(); | 375 | mTimerPopUp->clear(); |
370 | if ( mTimerTime ) { | 376 | if ( mTimerTime ) { |
371 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); | 377 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); |
372 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); | 378 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); |
373 | mTimerPopUp->insertItem( "Stop", 0 ); | 379 | |
374 | mTimerPopUp->insertItem( t.toString(),1); | 380 | |
381 | mTimerPopUp->insertItem( "Stop timer "+ mRunningTimerText , 0 ); | ||
382 | mTimerPopUp->insertItem( t.toString() + " (remaining time)",1); | ||
383 | mTimerPopUp->insertItem( mRunningTimer.time().toString() + " (alarm time)",2); | ||
375 | } else { | 384 | } else { |
376 | 385 | ||
377 | QString fileName = QDir::homeDirPath() +"/.kopialarmtimerrc"; | 386 | QString fileName = QDir::homeDirPath() +"/.kopialarmtimerrc"; |
378 | QFile file( fileName ); | 387 | QFile file( fileName ); |
379 | if( !QFile::exists( fileName) ) { | 388 | if( !QFile::exists( fileName) ) { |
380 | // write defaults | 389 | // write defaults |
381 | if (!file.open( IO_WriteOnly ) ) { | 390 | if (!file.open( IO_WriteOnly ) ) { |
382 | return; | 391 | return; |
383 | } | 392 | } |
384 | QString configString ; | 393 | QString configString ; |
385 | configString += "#config file for kopi alarm timer\n"; | 394 | configString += "#config file for kopi alarm timer\n"; |
386 | configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n"; | 395 | configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n"; |
387 | configString += "#NOTE: minimum value for timer are 3 minutes!\n"; | 396 | configString += "#NOTE: minimum value for timer are 3 minutes!\n"; |
388 | configString += "24 h; 1440\n"; | 397 | configString += "24 h; 1440\n"; |
389 | configString += " 8 h; 480\n"; | 398 | configString += " 8 h; 480\n"; |
390 | configString += " 5 h; 300\n"; | 399 | configString += " 5 h; 300\n"; |
391 | configString += " 1 h; 60\n"; | 400 | configString += " 1 h; 60\n"; |
392 | configString += "30 min; 30\n"; | 401 | configString += "30 min; 30\n"; |
393 | configString += "15 min; 15\n"; | 402 | configString += "15 min; 15\n"; |
394 | configString += "SEPARATOR\n"; | 403 | configString += "SEPARATOR\n"; |
395 | configString += "Pizza; 22\n"; | 404 | configString += "Pizza; 22\n"; |
396 | configString += "Nap; 45\n"; | 405 | configString += "Nap; 45\n"; |
397 | configString += "Tea; 5\n"; | 406 | configString += "Tea; 5\n"; |
398 | QTextStream ts( &file ); | 407 | QTextStream ts( &file ); |
399 | ts << configString ; | 408 | ts << configString ; |
400 | file.close(); | 409 | file.close(); |
401 | } | 410 | } |
402 | 411 | ||
403 | if (!file.open( IO_ReadOnly ) ) { | 412 | if (!file.open( IO_ReadOnly ) ) { |
404 | return ; | 413 | return ; |
405 | } | 414 | } |
406 | QString line; | 415 | QString line; |
407 | bool ok; | 416 | bool ok; |
408 | while ( file.readLine( line, 1024 ) > 0 ) { | 417 | while ( file.readLine( line, 1024 ) > 0 ) { |
409 | //qDebug("read %s ", line.latin1()); | 418 | //qDebug("read %s ", line.latin1()); |
410 | if ( line.left(1 ) != "#" ) { | 419 | if ( line.left(1 ) != "#" ) { |
411 | // no comment | 420 | // no comment |
412 | if ( line.left(9 ) == "SEPARATOR" ) { | 421 | if ( line.left(9 ) == "SEPARATOR" ) { |
413 | mTimerPopUp->insertSeparator(); | 422 | mTimerPopUp->insertSeparator(); |
414 | } else { | 423 | } else { |
415 | QStringList li = QStringList::split(";",line); | 424 | QStringList li = QStringList::split(";",line); |
416 | ok = false; | 425 | ok = false; |
417 | if ( li.count() == 2 ) { | 426 | if ( li.count() == 2 ) { |
418 | int val = li[1].toInt( &ok ); | 427 | int val = li[1].toInt( &ok ); |
419 | if ( ok && val > 2 ) { | 428 | if ( ok && val > 2 ) { |
420 | mTimerPopUp->insertItem( li[0], val); | 429 | mTimerPopUp->insertItem( li[0], val); |
421 | } | 430 | } |
422 | } | 431 | } |
423 | } | 432 | } |
424 | } | 433 | } |
425 | } | 434 | } |
426 | file.close(); | 435 | file.close(); |
427 | #if 0 | 436 | #if 0 |
428 | mTimerPopUp->insertItem( "24 h", 1440 ); | 437 | mTimerPopUp->insertItem( "24 h", 1440 ); |
429 | // mTimerPopUp->insertItem( i18n("12 h"), 720 ); | 438 | // mTimerPopUp->insertItem( i18n("12 h"), 720 ); |
430 | mTimerPopUp->insertItem( " 8 h", 480 ); | 439 | mTimerPopUp->insertItem( " 8 h", 480 ); |
431 | mTimerPopUp->insertItem( " 5 h", 300 ); | 440 | mTimerPopUp->insertItem( " 5 h", 300 ); |
432 | // mTimerPopUp->insertItem( i18n(" 2 h"), 120 ); | 441 | // mTimerPopUp->insertItem( i18n(" 2 h"), 120 ); |
433 | mTimerPopUp->insertItem( " 1 h", 60 ); | 442 | mTimerPopUp->insertItem( " 1 h", 60 ); |
434 | mTimerPopUp->insertItem( "30 min", 30 ); | 443 | mTimerPopUp->insertItem( "30 min", 30 ); |
435 | mTimerPopUp->insertItem( "15 min", 15 ); | 444 | mTimerPopUp->insertItem( "15 min", 15 ); |
436 | mTimerPopUp->insertItem( "10 min", 10 ); | 445 | mTimerPopUp->insertItem( "10 min", 10 ); |
437 | //mTimerPopUp->insertItem( " 5 min", 5 ); | 446 | //mTimerPopUp->insertItem( " 5 min", 5 ); |
438 | mTimerPopUp->insertSeparator(); | 447 | mTimerPopUp->insertSeparator(); |
439 | mTimerPopUp->insertItem( "Pizza", 22 ); | 448 | mTimerPopUp->insertItem( "Pizza", 22 ); |
440 | mTimerPopUp->insertItem( "Nap", 45 ); | 449 | mTimerPopUp->insertItem( "Nap", 45 ); |
441 | mTimerPopUp->insertItem( "Tea", 5 ); | 450 | mTimerPopUp->insertItem( "Tea", 5 ); |
442 | #endif | 451 | #endif |
443 | QString text = mCustomText.stripWhiteSpace (); | 452 | QString text = mCustomText.stripWhiteSpace (); |
444 | int in = text.find( " " ); | 453 | int in = text.find( " " ); |
445 | text = text.left ( in ); | 454 | text = text.left ( in ); |
446 | mTimerPopUp->insertItem( text, 3 ); | 455 | mTimerPopUp->insertItem( text, 3 ); |
447 | mTimerPopUp->insertSeparator(); | 456 | mTimerPopUp->insertSeparator(); |
448 | mTimerPopUp->insertItem( "Customize", 2 ); | 457 | mTimerPopUp->insertItem( "Customize", 2 ); |
449 | } | 458 | } |
450 | 459 | ||
451 | } | 460 | } |
452 | 461 | ||
453 | void SimpleAlarmDaemonImpl::showTimer() | 462 | void SimpleAlarmDaemonImpl::showTimer() |
454 | { | 463 | { |
455 | fillTimerPopUp(); | 464 | fillTimerPopUp(); |
456 | } | 465 | } |
457 | 466 | ||
458 | void SimpleAlarmDaemonImpl::confTimer( int time ) | 467 | void SimpleAlarmDaemonImpl::confTimer( int time ) |
459 | { | 468 | { |
460 | //qDebug("impleAlarmDaemonImpl::confTimer() %d ", time ); | 469 | //qDebug("impleAlarmDaemonImpl::confTimer() %d ", time ); |
461 | int minutes = time; | 470 | int minutes = time; |
462 | if ( minutes == 0 ) { | 471 | if ( minutes == 0 ) { |
463 | if ( ! mTimerTime ) | 472 | if ( ! mTimerTime ) |
464 | return; | 473 | return; |
465 | 474 | ||
466 | QDialog dia ( 0, ("Stop Timer" ), true ); | 475 | QDialog dia ( 0, ("Stop Timer" ), true ); |
467 | QLabel lab (("Really stop the timer?"), &dia ); | 476 | QLabel lab (("Really stop the timer?\n\n"+ mRunningTimerText+"\n"), &dia ); |
477 | lab.setAlignment( AlignCenter ); | ||
468 | dia.setCaption(("KO/Pi Timer Stop" )); | 478 | dia.setCaption(("KO/Pi Timer Stop" )); |
469 | QVBoxLayout lay( &dia ); | 479 | QVBoxLayout lay( &dia ); |
480 | lay.addWidget( &lab); | ||
481 | QPushButton ok ( "Stop timer!", &dia); | ||
482 | QFont fo = dia.font(); | ||
483 | fo.setPointSize( 36 ); | ||
484 | ok.setFont( fo ); | ||
485 | lay.addWidget( &ok); | ||
486 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); | ||
487 | QPushButton con ( "Continue timer!", &dia); | ||
488 | fo.setPointSize( 36 ); | ||
489 | con.setFont( fo ); | ||
490 | lay.addWidget( &con); | ||
491 | connect ( &con, SIGNAL (clicked()), &dia, SLOT ( reject() ) ); | ||
470 | lay.setMargin(5); | 492 | lay.setMargin(5); |
471 | lay.setSpacing(5); | 493 | lay.setSpacing(5); |
472 | lay.addWidget( &lab); | 494 | dia.resize(dia.sizeHint() ); |
473 | dia.resize( 200, dia.sizeHint().height() ); | ||
474 | 495 | ||
475 | if ( !dia.exec() ) | 496 | if ( !dia.exec() ) |
476 | return; | 497 | return; |
477 | 498 | ||
478 | AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.latin1() ); | 499 | AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.latin1() ); |
479 | mTimerTime = 0; | 500 | mTimerTime = 0; |
480 | return; | 501 | return; |
481 | } | 502 | } |
482 | if ( mTimerTime ) | 503 | if ( mTimerTime ) |
483 | return; | 504 | return; |
484 | if ( minutes == 1 ) { | 505 | if ( minutes == 1 ) { |
485 | return; | 506 | return; |
486 | } | 507 | } |
487 | QString mess = "timer_alarm"; | 508 | QString mess = "timer_alarm"; |
488 | mess += ("Timer Alarm!\n"); | 509 | mess += ("Timer Alarm!\n"); |
489 | if ( minutes == 22 ) | 510 | if ( minutes == 22 ) { |
490 | mess += ( "Pizza is ready"); | 511 | mess += ( "Pizza is ready"); |
491 | else if ( minutes == 45 ) | 512 | mRunningTimerText = "Pizza"; |
513 | } | ||
514 | else if ( minutes == 45 ) { | ||
492 | mess += ( "Please wake up!"); | 515 | mess += ( "Please wake up!"); |
493 | else if ( minutes == 5 ) | 516 | mRunningTimerText = "Nap"; |
517 | } | ||
518 | else if ( minutes == 5 ) { | ||
494 | mess += ( "Tea is ready"); | 519 | mess += ( "Tea is ready"); |
520 | mRunningTimerText = "Tea"; | ||
521 | } | ||
495 | else if ( minutes == 3 ) { | 522 | else if ( minutes == 3 ) { |
496 | mess += mCustomText; | 523 | mess += mCustomText; |
497 | minutes = mCustomMinutes ; | 524 | minutes = mCustomMinutes ; |
525 | mRunningTimerText = mCustomText.stripWhiteSpace (); | ||
526 | int in = mRunningTimerText.find( " " ); | ||
527 | mRunningTimerText = mRunningTimerText.left ( in ); | ||
498 | } | 528 | } |
499 | else { | 529 | else { |
500 | if ( minutes == 2 ) { | 530 | if ( minutes == 2 ) { |
501 | // ask time | 531 | // ask time |
502 | QDialog dia ( 0, ("Customize Timer" ), true ); | 532 | QDialog dia ( 0, ("Customize Timer" ), true ); |
503 | QLabel lab (("Message Text:"), &dia ); | 533 | QLabel lab (("Message Text:"), &dia ); |
504 | dia.setCaption(("KO/Pi Timer" )); | 534 | dia.setCaption(("KO/Pi Timer" )); |
505 | QVBoxLayout lay( &dia ); | 535 | QVBoxLayout lay( &dia ); |
506 | lay.setMargin(5); | 536 | lay.setMargin(5); |
507 | lay.setSpacing(5); | 537 | lay.setSpacing(5); |
508 | lay.addWidget( &lab); | 538 | lay.addWidget( &lab); |
509 | QLineEdit lEdit( mCustomText, &dia ); | 539 | QLineEdit lEdit( mCustomText, &dia ); |
510 | lay.addWidget( &lEdit); | 540 | lay.addWidget( &lEdit); |
511 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); | 541 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); |
512 | lay.addWidget( &lab2); | 542 | lay.addWidget( &lab2); |
543 | QHBox hbox1 ( &dia ); | ||
544 | lay.addWidget( &hbox1); | ||
545 | QLabel lab3 (("Hours"), &hbox1 ); | ||
546 | QLabel lab4 (("Minutes"), &hbox1 ); | ||
513 | QHBox hbox ( &dia ); | 547 | QHBox hbox ( &dia ); |
514 | QLabel lab3 (("h:"), &hbox ); | ||
515 | QSpinBox spinh( 0, 24, 1,& hbox ); | 548 | QSpinBox spinh( 0, 24, 1,& hbox ); |
516 | QLabel lab4 ((" min:"), &hbox ); | 549 | QFont fo = dia.font(); |
550 | fo.setPointSize( 36 ); | ||
517 | QSpinBox spinm( 0, 59, 1,&hbox ); | 551 | QSpinBox spinm( 0, 59, 1,&hbox ); |
552 | spinm.setFont( fo ); | ||
553 | spinh.setFont( fo ); | ||
554 | spinh.setButtonSymbols( QSpinBox::PlusMinus ); | ||
555 | spinm.setButtonSymbols( QSpinBox::PlusMinus ); | ||
556 | spinh.upButton ()->setFixedSize( QSize( 48, 30 )); | ||
557 | spinh.downButton ()->setFixedSize( QSize( 48, 30 )); | ||
558 | //spinh.editor ()->setFixedSize( QSize( 50, 100 )); | ||
559 | spinh.setFixedSize( 100,62 ); | ||
560 | spinm.upButton ()->setFixedSize( QSize( 48, 30 )); | ||
561 | spinm.downButton ()->setFixedSize( QSize( 48, 30 )); | ||
562 | spinm.downButton ()->setGeometry( 50,50,50,50); | ||
563 | spinm.setSuffix( " m" ); | ||
564 | spinh.setSuffix( " h" ); | ||
565 | spinm.setWrapping ( true ); | ||
566 | //spinm.editor ()->setFixedSize( QSize( 50, 100 )); | ||
567 | spinm.setLineStep( 1 ); | ||
568 | spinm.setFixedSize( 110,62 ); | ||
569 | lay.addWidget( &hbox); | ||
570 | QLabel lab5 ("Timer fires at:", &dia ); | ||
571 | lab5.setAlignment( AlignCenter ); | ||
572 | lay.addWidget( &lab5); | ||
573 | KODateLabel dl ( &dia ); | ||
574 | dl.setAlignment( AlignCenter ); | ||
575 | dl.setFont( fo ); | ||
576 | connect ( &spinh, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_hours( int ) ) ); | ||
577 | connect ( &spinm, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_minutes( int ) ) ); | ||
578 | lay.addWidget( &dl); | ||
518 | spinh.setValue( mCustomMinutes/60 ); | 579 | spinh.setValue( mCustomMinutes/60 ); |
519 | spinm.setValue( mCustomMinutes%60 ); | 580 | spinm.setValue( mCustomMinutes%60 ); |
520 | lay.addWidget( &hbox); | 581 | QPushButton ok ( "Start timer", &dia); |
582 | ok.setFont( fo ); | ||
583 | lay.addWidget( &ok); | ||
584 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); | ||
521 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); | 585 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); |
586 | |||
522 | if ( !dia.exec() ) | 587 | if ( !dia.exec() ) |
523 | return; | 588 | return; |
524 | mCustomText = lEdit.text(); | 589 | mCustomText = lEdit.text(); |
525 | mCustomMinutes = spinh.value()*60+spinm.value(); | 590 | mCustomMinutes = spinh.value()*60+spinm.value(); |
526 | if ( mCustomMinutes == 0 ) | 591 | if ( mCustomMinutes == 0 ) |
527 | mCustomMinutes = 1; | 592 | mCustomMinutes = 1; |
528 | if ( mCustomMinutes > 1440 ) | 593 | if ( mCustomMinutes > 1440 ) |
529 | mCustomMinutes = 1440; | 594 | mCustomMinutes = 1440; |
530 | mess += mCustomText; | 595 | mess += mCustomText; |
531 | minutes = mCustomMinutes; | 596 | minutes = mCustomMinutes; |
597 | mRunningTimerText = mCustomText.stripWhiteSpace (); | ||
598 | int in = mRunningTimerText.find( " " ); | ||
599 | mRunningTimerText = mRunningTimerText.left ( in ); | ||
532 | } | 600 | } |
533 | else | 601 | else { |
534 | mess+= QString::number ( minutes ) + ( " minutes are past!"); | 602 | mess+= QString::number ( minutes ) + ( " minutes are past!"); |
603 | int min = minutes; | ||
604 | if ( min % 60 == 0 ) | ||
605 | mRunningTimerText = QString::number ( min/60 ) + ( " hours"); | ||
606 | else | ||
607 | mRunningTimerText = QString::number ( minutes ) + ( " minutes"); | ||
608 | } | ||
535 | } | 609 | } |
536 | //minutes = 1; | 610 | //minutes = 1; |
537 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); | 611 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); |
538 | timerMesssage = mess; | 612 | timerMesssage = mess; |
539 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1()); | 613 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1()); |
540 | mTimerTime = 1; | 614 | mTimerTime = 1; |
541 | } | 615 | } |
542 | 616 | ||
543 | void SimpleAlarmDaemonImpl::writeFile() | 617 | void SimpleAlarmDaemonImpl::writeFile() |
544 | { | 618 | { |
545 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); | 619 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); |
546 | } | 620 | } |
547 | void SimpleAlarmDaemonImpl::showWN() | 621 | void SimpleAlarmDaemonImpl::showWN() |
548 | { | 622 | { |
549 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); | 623 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); |
550 | } | 624 | } |
551 | void SimpleAlarmDaemonImpl::newTodo() | 625 | void SimpleAlarmDaemonImpl::newTodo() |
552 | { | 626 | { |
553 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); | 627 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); |
554 | } | 628 | } |
555 | 629 | ||
556 | void SimpleAlarmDaemonImpl::newEvent() | 630 | void SimpleAlarmDaemonImpl::newEvent() |
557 | { | 631 | { |
558 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); | 632 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); |
559 | 633 | ||
560 | } | 634 | } |
561 | void SimpleAlarmDaemonImpl::newMail() | 635 | void SimpleAlarmDaemonImpl::newMail() |
562 | { | 636 | { |
563 | QCopEnvelope e("QPE/Application/ompi", "newMail()"); | 637 | QCopEnvelope e("QPE/Application/ompi", "newMail()"); |
564 | } | 638 | } |
565 | void SimpleAlarmDaemonImpl::showAdd() | 639 | void SimpleAlarmDaemonImpl::showAdd() |
566 | { | 640 | { |
567 | QCopEnvelope e("QPE/Application/kapi", "raise()"); | 641 | QCopEnvelope e("QPE/Application/kapi", "raise()"); |
568 | } | 642 | } |
569 | void SimpleAlarmDaemonImpl::ringSync() | 643 | void SimpleAlarmDaemonImpl::ringSync() |
570 | { | 644 | { |
571 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); | 645 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); |
572 | 646 | ||
573 | } | 647 | } |
574 | void SimpleAlarmDaemonImpl::newCountdown() | 648 | void SimpleAlarmDaemonImpl::newCountdown() |
575 | { | 649 | { |
576 | //recieve("cal_alarm", 10 ); | 650 | //recieve("cal_alarm", 10 ); |
577 | } | 651 | } |
578 | void SimpleAlarmDaemonImpl::simulate() | 652 | void SimpleAlarmDaemonImpl::simulate() |
579 | { | 653 | { |
580 | writeFile(); | 654 | writeFile(); |
581 | QString filename = getenv("QPEDIR") ; | 655 | QString filename = getenv("QPEDIR") ; |
582 | filename += "/pics/kdepim/korganizer/koalarm.wav"; | 656 | filename += "/pics/kdepim/korganizer/koalarm.wav"; |
583 | startAlarm("Alarm simulation", filename ); | 657 | startAlarm("Alarm simulation", filename ); |
584 | } | 658 | } |
585 | void SimpleAlarmDaemonImpl::showKO() | 659 | void SimpleAlarmDaemonImpl::showKO() |
586 | { | 660 | { |
587 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); | 661 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); |
588 | 662 | ||
589 | } | 663 | } |
590 | void SimpleAlarmDaemonImpl::showTodo() | 664 | void SimpleAlarmDaemonImpl::showTodo() |
591 | { | 665 | { |
592 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); | 666 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); |
593 | 667 | ||
594 | } | 668 | } |
595 | void SimpleAlarmDaemonImpl::writeJournal() | 669 | void SimpleAlarmDaemonImpl::writeJournal() |
596 | { | 670 | { |
597 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); | 671 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); |
598 | 672 | ||
599 | } | 673 | } |
600 | 674 | ||
601 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) | 675 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) |
602 | { | 676 | { |
603 | 677 | ||
604 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); | 678 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); |
605 | 679 | ||
606 | } | 680 | } |
607 | 681 | ||
diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index 32a3867..cbdba47 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h | |||
@@ -1,86 +1,119 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the KOrganizer alarm daemon. | 2 | This file is part of the KOrganizer alarm daemon. |
3 | Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef SIMPLEALARMDAEMONIMPL_H | 23 | #ifndef SIMPLEALARMDAEMONIMPL_H |
24 | #define SIMPLEALARMDAEMONIMPL_H | 24 | #define SIMPLEALARMDAEMONIMPL_H |
25 | 25 | ||
26 | //#include "simplealarmdaemon.h" | 26 | //#include "simplealarmdaemon.h" |
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qtimer.h> | ||
29 | 30 | ||
30 | class QLabel; | 31 | class QLabel; |
31 | class QTimer; | 32 | class QTimer; |
32 | class QPopupMenu; | 33 | class QPopupMenu; |
33 | class AlarmDialog; | 34 | class AlarmDialog; |
34 | class SimpleAlarmDaemonImpl : public QLabel | 35 | class SimpleAlarmDaemonImpl : public QLabel |
35 | { | 36 | { |
36 | Q_OBJECT | 37 | Q_OBJECT |
37 | public: | 38 | public: |
38 | SimpleAlarmDaemonImpl( QWidget *parent = 0 ); | 39 | SimpleAlarmDaemonImpl( QWidget *parent = 0 ); |
39 | 40 | ||
40 | ~SimpleAlarmDaemonImpl(); | 41 | ~SimpleAlarmDaemonImpl(); |
41 | 42 | ||
42 | protected slots: | 43 | protected slots: |
43 | void recieve( const QCString& msg, const QByteArray& data ); | 44 | void recieve( const QCString& msg, const QByteArray& data ); |
44 | void newTodo(); | 45 | void newTodo(); |
45 | void newEvent(); | 46 | void newEvent(); |
46 | void newCountdown(); | 47 | void newCountdown(); |
47 | void simulate(); | 48 | void simulate(); |
48 | void showKO(); | 49 | void showKO(); |
49 | void showWN(); | 50 | void showWN(); |
50 | void showAdd(); | 51 | void showAdd(); |
51 | void newMail(); | 52 | void newMail(); |
52 | void ringSync(); | 53 | void ringSync(); |
53 | void showTodo(); | 54 | void showTodo(); |
54 | void writeFile(); | 55 | void writeFile(); |
55 | void writeJournal(); | 56 | void writeJournal(); |
56 | void slotPlayBeep( int ); | 57 | void slotPlayBeep( int ); |
57 | void showTimer( ); | 58 | void showTimer( ); |
58 | void confPause( int ); | 59 | void confPause( int ); |
59 | void confTimer( int ); | 60 | void confTimer( int ); |
60 | void saveSlot( int ); | 61 | void saveSlot( int ); |
61 | void confSuspend( int ); | 62 | void confSuspend( int ); |
62 | void confSound( int num ); | 63 | void confSound( int num ); |
63 | void startAlarm(QString mess, QString fn ); | 64 | void startAlarm(QString mess, QString fn ); |
64 | 65 | ||
65 | protected: | 66 | protected: |
66 | void mousePressEvent( QMouseEvent * ); | 67 | void mousePressEvent( QMouseEvent * ); |
67 | 68 | ||
68 | private: | 69 | private: |
69 | AlarmDialog *mAlarmDialog; | 70 | AlarmDialog *mAlarmDialog; |
70 | int mPlayBeeps; | 71 | int mPlayBeeps; |
71 | int mPausePlay; | 72 | int mPausePlay; |
72 | int mSuspend; | 73 | int mSuspend; |
73 | QString mAlarmMessage; | 74 | QString mAlarmMessage; |
74 | int mTimerTime; | 75 | int mTimerTime; |
75 | int getFileNameLen( QString ); | 76 | int getFileNameLen( QString ); |
76 | QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp; | 77 | QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp; |
77 | QDateTime mRunningTimer; | 78 | QDateTime mRunningTimer; |
78 | void fillTimerPopUp(); | 79 | void fillTimerPopUp(); |
79 | QString timerMesssage; | 80 | QString timerMesssage; |
80 | QString mCustomText; | 81 | QString mCustomText; |
82 | QString mRunningTimerText; | ||
81 | int mCustomMinutes; | 83 | int mCustomMinutes; |
82 | int mTimerPopupConf; | 84 | int mTimerPopupConf; |
83 | bool wavAlarm; | 85 | bool wavAlarm; |
84 | }; | 86 | }; |
85 | 87 | class KODateLabel : public QLabel | |
88 | { | ||
89 | Q_OBJECT | ||
90 | public: | ||
91 | KODateLabel( QWidget *parent=0, const char *name=0 ) : | ||
92 | QLabel( parent, name ) | ||
93 | { | ||
94 | hour = 0; | ||
95 | minutes = 0; | ||
96 | QTimer * ti = new QTimer( this ); | ||
97 | connect ( ti, SIGNAL ( timeout () ), this, SLOT ( updateText() )); | ||
98 | ti->start( 1000 ); | ||
99 | |||
100 | } | ||
101 | public slots: | ||
102 | void slot_minutes( int m ) | ||
103 | { | ||
104 | minutes = m; updateText(); | ||
105 | } | ||
106 | void slot_hours( int h ) | ||
107 | { | ||
108 | hour = h; updateText(); | ||
109 | } | ||
110 | private slots: | ||
111 | void updateText() | ||
112 | { | ||
113 | QDateTime dt = QDateTime::currentDateTime(); | ||
114 | dt = dt.addSecs( minutes * 60 + hour * 3600 ); | ||
115 | setText( dt.time().toString() ); | ||
116 | } | ||
117 | int hour, minutes; | ||
118 | }; | ||
86 | #endif | 119 | #endif |
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 92fcd1c..b14ca43 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -1,514 +1,515 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | 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 <qwidget.h> | 24 | #include <qwidget.h> |
25 | #include <qtooltip.h> | 25 | #include <qtooltip.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qvbox.h> | 27 | #include <qvbox.h> |
28 | #include <qbuttongroup.h> | 28 | #include <qbuttongroup.h> |
29 | #include <qvgroupbox.h> | 29 | #include <qvgroupbox.h> |
30 | #include <qwidgetstack.h> | 30 | #include <qwidgetstack.h> |
31 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | 33 | ||
34 | 34 | ||
35 | #include <kglobal.h> | 35 | #include <kglobal.h> |
36 | #include <kdebug.h> | 36 | #include <kdebug.h> |
37 | #include <klocale.h> | 37 | #include <klocale.h> |
38 | #include <kiconloader.h> | 38 | #include <kiconloader.h> |
39 | #include <kmessagebox.h> | 39 | #include <kmessagebox.h> |
40 | #include <kfiledialog.h> | 40 | #include <kfiledialog.h> |
41 | #include <kstandarddirs.h> | 41 | #include <kstandarddirs.h> |
42 | 42 | ||
43 | #include <libkcal/todo.h> | 43 | #include <libkcal/todo.h> |
44 | #include <libkcal/event.h> | 44 | #include <libkcal/event.h> |
45 | #include <libkdepim/categoryselectdialog.h> | 45 | #include <libkdepim/categoryselectdialog.h> |
46 | #include <libkdepim/kdateedit.h> | 46 | #include <libkdepim/kdateedit.h> |
47 | 47 | ||
48 | #include "koprefs.h" | 48 | #include "koprefs.h" |
49 | #include "koglobals.h" | 49 | #include "koglobals.h" |
50 | 50 | ||
51 | #include "koeditorgeneral.h" | 51 | #include "koeditorgeneral.h" |
52 | #include "kolocationbox.h" | 52 | #include "kolocationbox.h" |
53 | #ifndef DESKTOP_VERSION | 53 | #ifndef DESKTOP_VERSION |
54 | #include <qpe/qpeapplication.h> | 54 | #include <qpe/qpeapplication.h> |
55 | #else | 55 | #else |
56 | #include <qapplication.h> | 56 | #include <qapplication.h> |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : | 59 | KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : |
60 | QObject( parent, name) | 60 | QObject( parent, name) |
61 | { | 61 | { |
62 | } | 62 | } |
63 | 63 | ||
64 | KOEditorGeneral::~KOEditorGeneral() | 64 | KOEditorGeneral::~KOEditorGeneral() |
65 | { | 65 | { |
66 | } | 66 | } |
67 | 67 | ||
68 | void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) | 68 | void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) |
69 | { | 69 | { |
70 | QGridLayout *headerLayout = new QGridLayout(topLayout); | 70 | QGridLayout *headerLayout = new QGridLayout(topLayout); |
71 | 71 | ||
72 | #if 0 | 72 | #if 0 |
73 | mOwnerLabel = new QLabel(i18n("Owner:"),parent); | 73 | mOwnerLabel = new QLabel(i18n("Owner:"),parent); |
74 | headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1); | 74 | headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1); |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent); | 77 | QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent); |
78 | headerLayout->addWidget(summaryLabel,1,0); | 78 | headerLayout->addWidget(summaryLabel,1,0); |
79 | 79 | ||
80 | mSummaryEdit = new KOLocationBox(TRUE,parent, 10); | 80 | mSummaryEdit = new KOLocationBox(TRUE,parent, 10); |
81 | mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); | 81 | mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); |
82 | //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) ); | 82 | //mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) ); |
83 | //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() ); | 83 | //qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() ); |
84 | int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2; | 84 | int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2; |
85 | if ( QApplication::desktop()->width() > 320 ) | 85 | if ( QApplication::desktop()->width() > 320 ) |
86 | mSummaryEdit->setMaximumHeight( hei +6 ); | 86 | mSummaryEdit->setMaximumHeight( hei +6 ); |
87 | //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding ); | 87 | //qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding ); |
88 | // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink } | 88 | // SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink } |
89 | // mSummaryEdit = new QLineEdit(parent); | 89 | // mSummaryEdit = new QLineEdit(parent); |
90 | headerLayout->addWidget(mSummaryEdit,1,1); | 90 | headerLayout->addWidget(mSummaryEdit,1,1); |
91 | connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); | 91 | connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); |
92 | 92 | ||
93 | QLabel *locationLabel = new QLabel(i18n("Location:"),parent); | 93 | QLabel *locationLabel = new QLabel(i18n("Location:"),parent); |
94 | headerLayout->addWidget(locationLabel,2,0); | 94 | headerLayout->addWidget(locationLabel,2,0); |
95 | 95 | ||
96 | mLocationEdit = new KOLocationBox(TRUE,parent,10); | 96 | mLocationEdit = new KOLocationBox(TRUE,parent,10); |
97 | mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); | 97 | mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); |
98 | if ( QApplication::desktop()->width() > 320 ) | 98 | if ( QApplication::desktop()->width() > 320 ) |
99 | mLocationEdit->setMaximumHeight( hei + 6); | 99 | mLocationEdit->setMaximumHeight( hei + 6); |
100 | 100 | ||
101 | // mLocationEdit = new QLineEdit(parent); | 101 | // mLocationEdit = new QLineEdit(parent); |
102 | connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); | 102 | connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); |
103 | headerLayout->addWidget(mLocationEdit,2,1); | 103 | headerLayout->addWidget(mLocationEdit,2,1); |
104 | headerLayout->setColStretch( 1, 10); | 104 | headerLayout->setColStretch( 1, 10); |
105 | } | 105 | } |
106 | void KOEditorGeneral::setFocusOn( int i ) | 106 | void KOEditorGeneral::setFocusOn( int i ) |
107 | { | 107 | { |
108 | qApp->processEvents(); | 108 | qApp->processEvents(); |
109 | if ( i == 1 ) { | 109 | if ( i == 1 ) { |
110 | mDescriptionEdit->setFocus(); | 110 | mDescriptionEdit->setFocus(); |
111 | mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); | 111 | mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); |
112 | } | 112 | } |
113 | if ( i == 2 ) { | 113 | if ( i == 2 ) { |
114 | mSummaryEdit->setFocus(); | 114 | mSummaryEdit->setFocus(); |
115 | } | 115 | } |
116 | 116 | ||
117 | } | 117 | } |
118 | void KOEditorGeneral::editCategories() | 118 | void KOEditorGeneral::editCategories() |
119 | { | 119 | { |
120 | // qDebug("KOEditorGeneral::editCategories() "); | 120 | // qDebug("KOEditorGeneral::editCategories() "); |
121 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); | 121 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); |
122 | connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); | 122 | connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); |
123 | //KOGlobals::fitDialogToScreen( csd ); | 123 | //KOGlobals::fitDialogToScreen( csd ); |
124 | csd->setColorEnabled(); | 124 | csd->setColorEnabled(); |
125 | csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) ); | 125 | csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) ); |
126 | csd->exec(); | 126 | csd->exec(); |
127 | delete csd; | 127 | delete csd; |
128 | } | 128 | } |
129 | void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) | 129 | void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) |
130 | { | 130 | { |
131 | QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); | 131 | QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); |
132 | 132 | ||
133 | mCategoriesButton = new QPushButton(parent); | 133 | mCategoriesButton = new QPushButton(parent); |
134 | mCategoriesButton->setText(i18n("Categories...")); | 134 | mCategoriesButton->setText(i18n("Categories...")); |
135 | connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() )); | 135 | connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() )); |
136 | categoriesLayout->addWidget(mCategoriesButton); | 136 | categoriesLayout->addWidget(mCategoriesButton); |
137 | 137 | ||
138 | mCategoriesLabel = new QLabel(parent); | 138 | mCategoriesLabel = new QLabel(parent); |
139 | mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken); | 139 | mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken); |
140 | categoriesLayout->addWidget(mCategoriesLabel,1); | 140 | categoriesLayout->addWidget(mCategoriesLabel,1); |
141 | } | 141 | } |
142 | 142 | ||
143 | void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) | 143 | void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) |
144 | { | 144 | { |
145 | QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); | 145 | QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); |
146 | 146 | ||
147 | QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent); | 147 | QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent); |
148 | mCancelBox = new QCheckBox ( i18n("Cancelled"), parent); | 148 | mCancelBox = new QCheckBox ( i18n("Cancelled"), parent); |
149 | secrecyLayout->addWidget(mCancelBox); | 149 | secrecyLayout->addWidget(mCancelBox); |
150 | secrecyLayout->addWidget(secrecyLabel); | 150 | secrecyLayout->addWidget(secrecyLabel); |
151 | 151 | ||
152 | mSecrecyCombo = new QComboBox(parent); | 152 | mSecrecyCombo = new QComboBox(parent); |
153 | mSecrecyCombo->insertStringList(Incidence::secrecyList()); | 153 | mSecrecyCombo->insertStringList(Incidence::secrecyList()); |
154 | secrecyLayout->addWidget(mSecrecyCombo); | 154 | secrecyLayout->addWidget(mSecrecyCombo); |
155 | } | 155 | } |
156 | 156 | ||
157 | void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) | 157 | void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) |
158 | { | 158 | { |
159 | mDescriptionEdit = new KTextEdit(parent); | 159 | mDescriptionEdit = new KTextEdit(parent); |
160 | mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont ); | 160 | mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont ); |
161 | mDescriptionEdit->append(""); | 161 | mDescriptionEdit->append(""); |
162 | mDescriptionEdit->setReadOnly(false); | 162 | mDescriptionEdit->setReadOnly(false); |
163 | mDescriptionEdit->setOverwriteMode(false); | 163 | mDescriptionEdit->setOverwriteMode(false); |
164 | mDescriptionEdit->setWordWrap( KTextEdit::WidgetWidth ); | 164 | mDescriptionEdit->setWordWrap( KTextEdit::WidgetWidth ); |
165 | topLayout->addWidget(mDescriptionEdit); | 165 | topLayout->addWidget(mDescriptionEdit); |
166 | #ifndef DESKTOP_VERSION | 166 | #ifndef DESKTOP_VERSION |
167 | QPEApplication::setStylusOperation( mDescriptionEdit, QPEApplication::RightOnHold ); | 167 | QPEApplication::setStylusOperation( mDescriptionEdit, QPEApplication::RightOnHold ); |
168 | #endif | 168 | #endif |
169 | 169 | ||
170 | } | 170 | } |
171 | 171 | ||
172 | void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) | 172 | void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) |
173 | { | 173 | { |
174 | QBoxLayout *alarmLayout = new QHBoxLayout(topLayout); | 174 | QBoxLayout *alarmLayout = new QHBoxLayout(topLayout); |
175 | 175 | ||
176 | //mAlarmBell = new QLabel(parent); | 176 | //mAlarmBell = new QLabel(parent); |
177 | //mAlarmBell->setPixmap(SmallIcon("bell")); | 177 | //mAlarmBell->setPixmap(SmallIcon("bell")); |
178 | //alarmLayout->addWidget(mAlarmBell); | 178 | //alarmLayout->addWidget(mAlarmBell); |
179 | if ( QApplication::desktop()->width() < 320 ) | 179 | if ( QApplication::desktop()->width() < 320 ) |
180 | mAlarmButton = new QCheckBox(i18n("Rem."),parent); | 180 | mAlarmButton = new QCheckBox(i18n("Rem."),parent); |
181 | else | 181 | else |
182 | mAlarmButton = new QCheckBox(i18n("Reminder:"),parent); | 182 | mAlarmButton = new QCheckBox(i18n("Reminder:"),parent); |
183 | 183 | ||
184 | connect(mAlarmButton, SIGNAL(toggled(bool)), SLOT(enableAlarmEdit(bool))); | 184 | connect(mAlarmButton, SIGNAL(toggled(bool)), SLOT(enableAlarmEdit(bool))); |
185 | alarmLayout->addWidget(mAlarmButton); | 185 | alarmLayout->addWidget(mAlarmButton); |
186 | 186 | ||
187 | mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ; | 187 | mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ; |
188 | mAlarmTimeEdit->setButtonSymbols( QSpinBox::PlusMinus ); | ||
188 | alarmLayout->addWidget(mAlarmTimeEdit); | 189 | alarmLayout->addWidget(mAlarmTimeEdit); |
189 | mAlarmIncrCombo = new QComboBox(false, parent); | 190 | mAlarmIncrCombo = new QComboBox(false, parent); |
190 | if ( QApplication::desktop()->width() < 320 ) { | 191 | if ( QApplication::desktop()->width() < 320 ) { |
191 | mAlarmIncrCombo->insertItem(i18n("min")); | 192 | mAlarmIncrCombo->insertItem(i18n("min")); |
192 | mAlarmIncrCombo->insertItem(i18n("hou")); | 193 | mAlarmIncrCombo->insertItem(i18n("hou")); |
193 | mAlarmIncrCombo->insertItem(i18n("day")); | 194 | mAlarmIncrCombo->insertItem(i18n("day")); |
194 | mAlarmTimeEdit->setMaximumWidth( mAlarmTimeEdit->sizeHint().width() ); | 195 | mAlarmTimeEdit->setMaximumWidth( mAlarmTimeEdit->sizeHint().width() ); |
195 | mAlarmIncrCombo->setMaximumWidth( mAlarmIncrCombo->sizeHint().width() ); | 196 | mAlarmIncrCombo->setMaximumWidth( mAlarmIncrCombo->sizeHint().width() ); |
196 | } else { | 197 | } else { |
197 | mAlarmIncrCombo->insertItem(i18n("minute(s)")); | 198 | mAlarmIncrCombo->insertItem(i18n("minute(s)")); |
198 | mAlarmIncrCombo->insertItem(i18n("hour(s)")); | 199 | mAlarmIncrCombo->insertItem(i18n("hour(s)")); |
199 | mAlarmIncrCombo->insertItem(i18n("day(s)")); | 200 | mAlarmIncrCombo->insertItem(i18n("day(s)")); |
200 | } | 201 | } |
201 | 202 | ||
202 | // mAlarmIncrCombo->setMinimumHeight(20); | 203 | // mAlarmIncrCombo->setMinimumHeight(20); |
203 | alarmLayout->addWidget(mAlarmIncrCombo); | 204 | alarmLayout->addWidget(mAlarmIncrCombo); |
204 | mAlarmSoundButton = new QPushButton(parent); | 205 | mAlarmSoundButton = new QPushButton(parent); |
205 | mAlarmSoundButton->setPixmap(SmallIcon("playsound")); | 206 | mAlarmSoundButton->setPixmap(SmallIcon("playsound")); |
206 | mAlarmSoundButton->setToggleButton(true); | 207 | mAlarmSoundButton->setToggleButton(true); |
207 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); | 208 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); |
208 | connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); | 209 | connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); |
209 | alarmLayout->addWidget(mAlarmSoundButton); | 210 | alarmLayout->addWidget(mAlarmSoundButton); |
210 | 211 | ||
211 | mAlarmProgramButton = new QPushButton(parent); | 212 | mAlarmProgramButton = new QPushButton(parent); |
212 | mAlarmProgramButton->setPixmap(SmallIcon("run")); | 213 | mAlarmProgramButton->setPixmap(SmallIcon("run")); |
213 | mAlarmProgramButton->setToggleButton(true); | 214 | mAlarmProgramButton->setToggleButton(true); |
214 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); | 215 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); |
215 | connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); | 216 | connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); |
216 | alarmLayout->addWidget(mAlarmProgramButton); | 217 | alarmLayout->addWidget(mAlarmProgramButton); |
217 | mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); | 218 | mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); |
218 | mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); | 219 | mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); |
219 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 220 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
220 | // mAlarmSoundButton->hide(); | 221 | // mAlarmSoundButton->hide(); |
221 | // mAlarmProgramButton->hide(); | 222 | // mAlarmProgramButton->hide(); |
222 | // } | 223 | // } |
223 | } | 224 | } |
224 | 225 | ||
225 | void KOEditorGeneral::pickAlarmSound() | 226 | void KOEditorGeneral::pickAlarmSound() |
226 | { | 227 | { |
227 | 228 | ||
228 | qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); | 229 | qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); |
229 | //QString prefix = mAlarmSound; | 230 | //QString prefix = mAlarmSound; |
230 | if (!mAlarmSoundButton->isOn()) { | 231 | if (!mAlarmSoundButton->isOn()) { |
231 | mAlarmSoundButton->setOn(true); | 232 | mAlarmSoundButton->setOn(true); |
232 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 233 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
233 | } else { | 234 | } else { |
234 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, | 235 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, |
235 | i18n("*.wav|Wav Files"), 0)); | 236 | i18n("*.wav|Wav Files"), 0)); |
236 | if (!fileName.isEmpty()) { | 237 | if (!fileName.isEmpty()) { |
237 | mAlarmSound = fileName; | 238 | mAlarmSound = fileName; |
238 | QToolTip::remove(mAlarmSoundButton); | 239 | QToolTip::remove(mAlarmSoundButton); |
239 | QString dispStr = i18n("Playing '%1'").arg(fileName); | 240 | QString dispStr = i18n("Playing '%1'").arg(fileName); |
240 | QToolTip::add(mAlarmSoundButton, dispStr); | 241 | QToolTip::add(mAlarmSoundButton, dispStr); |
241 | mAlarmProgramButton->setOn(false); | 242 | mAlarmProgramButton->setOn(false); |
242 | mAlarmSoundButton->setOn(true); | 243 | mAlarmSoundButton->setOn(true); |
243 | } else { | 244 | } else { |
244 | mAlarmProgramButton->setOn(true); | 245 | mAlarmProgramButton->setOn(true); |
245 | mAlarmSoundButton->setOn(false); | 246 | mAlarmSoundButton->setOn(false); |
246 | 247 | ||
247 | } | 248 | } |
248 | } | 249 | } |
249 | #if 0 | 250 | #if 0 |
250 | if (mAlarmProgramButton->isOn()) | 251 | if (mAlarmProgramButton->isOn()) |
251 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 252 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
252 | if ( mAlarmSoundButton->isOn()) | 253 | if ( mAlarmSoundButton->isOn()) |
253 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 254 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
254 | #endif | 255 | #endif |
255 | } | 256 | } |
256 | 257 | ||
257 | void KOEditorGeneral::pickAlarmProgram() | 258 | void KOEditorGeneral::pickAlarmProgram() |
258 | { | 259 | { |
259 | if (!mAlarmProgramButton->isOn()) { | 260 | if (!mAlarmProgramButton->isOn()) { |
260 | mAlarmProgramButton->setOn(true); | 261 | mAlarmProgramButton->setOn(true); |
261 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 262 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
262 | } else { | 263 | } else { |
263 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); | 264 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); |
264 | if (!fileName.isEmpty()) { | 265 | if (!fileName.isEmpty()) { |
265 | mAlarmProgram = fileName; | 266 | mAlarmProgram = fileName; |
266 | QToolTip::remove(mAlarmProgramButton); | 267 | QToolTip::remove(mAlarmProgramButton); |
267 | QString dispStr = i18n("Running '%1'").arg(fileName); | 268 | QString dispStr = i18n("Running '%1'").arg(fileName); |
268 | QToolTip::add(mAlarmProgramButton, dispStr); | 269 | QToolTip::add(mAlarmProgramButton, dispStr); |
269 | mAlarmSoundButton->setOn(false); | 270 | mAlarmSoundButton->setOn(false); |
270 | mAlarmProgramButton->setOn(true); | 271 | mAlarmProgramButton->setOn(true); |
271 | } else { | 272 | } else { |
272 | mAlarmProgramButton->setOn(false); | 273 | mAlarmProgramButton->setOn(false); |
273 | mAlarmSoundButton->setOn(true); | 274 | mAlarmSoundButton->setOn(true); |
274 | } | 275 | } |
275 | } | 276 | } |
276 | #if 0 | 277 | #if 0 |
277 | if (mAlarmProgramButton->isOn()) | 278 | if (mAlarmProgramButton->isOn()) |
278 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 279 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
279 | if ( mAlarmSoundButton->isOn()) | 280 | if ( mAlarmSoundButton->isOn()) |
280 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 281 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
281 | #endif | 282 | #endif |
282 | } | 283 | } |
283 | 284 | ||
284 | 285 | ||
285 | QString KOEditorGeneral::getFittingPath( const QString s ) | 286 | QString KOEditorGeneral::getFittingPath( const QString s ) |
286 | { | 287 | { |
287 | int maxlen = 50; | 288 | int maxlen = 50; |
288 | if ( QApplication::desktop()->width() < 640 ) { | 289 | if ( QApplication::desktop()->width() < 640 ) { |
289 | if ( QApplication::desktop()->width() < 320 ) | 290 | if ( QApplication::desktop()->width() < 320 ) |
290 | maxlen = 22; | 291 | maxlen = 22; |
291 | else | 292 | else |
292 | maxlen = 35; | 293 | maxlen = 35; |
293 | } | 294 | } |
294 | if ( s.length() > maxlen ) { | 295 | if ( s.length() > maxlen ) { |
295 | return "..."+s.right(maxlen -3); | 296 | return "..."+s.right(maxlen -3); |
296 | } | 297 | } |
297 | return s; | 298 | return s; |
298 | } | 299 | } |
299 | 300 | ||
300 | void KOEditorGeneral::enableAlarmEdit(bool enable) | 301 | void KOEditorGeneral::enableAlarmEdit(bool enable) |
301 | { | 302 | { |
302 | if ( enable ) { | 303 | if ( enable ) { |
303 | if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) { | 304 | if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) { |
304 | mAlarmSoundButton->setOn( true ); | 305 | mAlarmSoundButton->setOn( true ); |
305 | if ( mAlarmSound.isEmpty() ) | 306 | if ( mAlarmSound.isEmpty() ) |
306 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; | 307 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; |
307 | else { | 308 | else { |
308 | if ( ! QFile::exists( mAlarmSound ) ) | 309 | if ( ! QFile::exists( mAlarmSound ) ) |
309 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; | 310 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; |
310 | } | 311 | } |
311 | } | 312 | } |
312 | } | 313 | } |
313 | ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage); | 314 | ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage); |
314 | mAlarmTimeEdit->setEnabled(enable); | 315 | mAlarmTimeEdit->setEnabled(enable); |
315 | mAlarmSoundButton->setEnabled(enable); | 316 | mAlarmSoundButton->setEnabled(enable); |
316 | mAlarmProgramButton->setEnabled(enable); | 317 | mAlarmProgramButton->setEnabled(enable); |
317 | mAlarmIncrCombo->setEnabled(enable); | 318 | mAlarmIncrCombo->setEnabled(enable); |
318 | } | 319 | } |
319 | 320 | ||
320 | void KOEditorGeneral::disableAlarmEdit(bool disable) | 321 | void KOEditorGeneral::disableAlarmEdit(bool disable) |
321 | { | 322 | { |
322 | enableAlarmEdit( !disable ); | 323 | enableAlarmEdit( !disable ); |
323 | } | 324 | } |
324 | 325 | ||
325 | void KOEditorGeneral::enableAlarm( bool enable ) | 326 | void KOEditorGeneral::enableAlarm( bool enable ) |
326 | { | 327 | { |
327 | enableAlarmEdit( enable ); | 328 | enableAlarmEdit( enable ); |
328 | } | 329 | } |
329 | 330 | ||
330 | void KOEditorGeneral::alarmDisable(bool disable) | 331 | void KOEditorGeneral::alarmDisable(bool disable) |
331 | { | 332 | { |
332 | if (!disable) { | 333 | if (!disable) { |
333 | //mAlarmBell->setEnabled(true); | 334 | //mAlarmBell->setEnabled(true); |
334 | mAlarmButton->setEnabled(true); | 335 | mAlarmButton->setEnabled(true); |
335 | } else { | 336 | } else { |
336 | //mAlarmBell->setEnabled(false); | 337 | //mAlarmBell->setEnabled(false); |
337 | mAlarmButton->setEnabled(false); | 338 | mAlarmButton->setEnabled(false); |
338 | mAlarmButton->setChecked(false); | 339 | mAlarmButton->setChecked(false); |
339 | mAlarmTimeEdit->setEnabled(false); | 340 | mAlarmTimeEdit->setEnabled(false); |
340 | mAlarmSoundButton->setEnabled(false); | 341 | mAlarmSoundButton->setEnabled(false); |
341 | mAlarmProgramButton->setEnabled(false); | 342 | mAlarmProgramButton->setEnabled(false); |
342 | mAlarmIncrCombo->setEnabled(false); | 343 | mAlarmIncrCombo->setEnabled(false); |
343 | } | 344 | } |
344 | } | 345 | } |
345 | 346 | ||
346 | void KOEditorGeneral::setCategories(const QString &str) | 347 | void KOEditorGeneral::setCategories(const QString &str) |
347 | { | 348 | { |
348 | mCategoriesLabel->setText(str); | 349 | mCategoriesLabel->setText(str); |
349 | } | 350 | } |
350 | 351 | ||
351 | void KOEditorGeneral::setDefaults(bool allDay) | 352 | void KOEditorGeneral::setDefaults(bool allDay) |
352 | { | 353 | { |
353 | #if 0 | 354 | #if 0 |
354 | mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); | 355 | mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); |
355 | #endif | 356 | #endif |
356 | 357 | ||
357 | mAlarmMessage = i18n("Edit new item"); | 358 | mAlarmMessage = i18n("Edit new item"); |
358 | enableAlarmEdit( !allDay ); | 359 | enableAlarmEdit( !allDay ); |
359 | 360 | ||
360 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. | 361 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. |
361 | int alarmTime; | 362 | int alarmTime; |
362 | int a[] = { 1,5,10,15,30,60,180, 1440 }; | 363 | int a[] = { 1,5,10,15,30,60,180, 1440 }; |
363 | int index = KOPrefs::instance()->mAlarmTime; | 364 | int index = KOPrefs::instance()->mAlarmTime; |
364 | if (index < 0 || index > 7) { | 365 | if (index < 0 || index > 7) { |
365 | alarmTime = 15; | 366 | alarmTime = 15; |
366 | } else { | 367 | } else { |
367 | alarmTime = a[index]; | 368 | alarmTime = a[index]; |
368 | } | 369 | } |
369 | mAlarmButton ->setChecked( false ); | 370 | mAlarmButton ->setChecked( false ); |
370 | mAlarmTimeEdit->setValue(alarmTime); | 371 | mAlarmTimeEdit->setValue(alarmTime); |
371 | mAlarmIncrCombo->setCurrentItem(0); | 372 | mAlarmIncrCombo->setCurrentItem(0); |
372 | enableAlarmEdit( false ); | 373 | enableAlarmEdit( false ); |
373 | //alarmDisable (false); | 374 | //alarmDisable (false); |
374 | mSecrecyCombo->setCurrentItem(Incidence::SecrecyPublic); | 375 | mSecrecyCombo->setCurrentItem(Incidence::SecrecyPublic); |
375 | mCancelBox->setChecked( false ); | 376 | mCancelBox->setChecked( false ); |
376 | mSummaryEdit->setEditText(""); | 377 | mSummaryEdit->setEditText(""); |
377 | mLocationEdit->setEditText(""); | 378 | mLocationEdit->setEditText(""); |
378 | mDescriptionEdit->setText(""); | 379 | mDescriptionEdit->setText(""); |
379 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; | 380 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; |
380 | setCategories(""); | 381 | setCategories(""); |
381 | } | 382 | } |
382 | void KOEditorGeneral::setSecrecy( int num ) | 383 | void KOEditorGeneral::setSecrecy( int num ) |
383 | { | 384 | { |
384 | mSecrecyCombo->setCurrentItem(num); | 385 | mSecrecyCombo->setCurrentItem(num); |
385 | } | 386 | } |
386 | void KOEditorGeneral::readIncidence(Incidence *event) | 387 | void KOEditorGeneral::readIncidence(Incidence *event) |
387 | { | 388 | { |
388 | 389 | ||
389 | mAlarmMessage = event->summary(); | 390 | mAlarmMessage = event->summary(); |
390 | if ( ! event->location().isEmpty() ) | 391 | if ( ! event->location().isEmpty() ) |
391 | mAlarmMessage += " ("+event->location()+")"; | 392 | mAlarmMessage += " ("+event->location()+")"; |
392 | mAlarmIncrCombo->setCurrentItem(0); | 393 | mAlarmIncrCombo->setCurrentItem(0); |
393 | mSummaryEdit->setEditText(event->summary()); | 394 | mSummaryEdit->setEditText(event->summary()); |
394 | mLocationEdit->setEditText(event->location()); | 395 | mLocationEdit->setEditText(event->location()); |
395 | mDescriptionEdit->setText(event->description()); | 396 | mDescriptionEdit->setText(event->description()); |
396 | 397 | ||
397 | #if 0 | 398 | #if 0 |
398 | // organizer information | 399 | // organizer information |
399 | mOwnerLabel->setText(i18n("Owner: ") + event->organizer()); | 400 | mOwnerLabel->setText(i18n("Owner: ") + event->organizer()); |
400 | #endif | 401 | #endif |
401 | 402 | ||
402 | enableAlarmEdit( event->isAlarmEnabled() ); | 403 | enableAlarmEdit( event->isAlarmEnabled() ); |
403 | //qDebug("KOEditorGeneral::readIncidence(Incidence *event) "); | 404 | //qDebug("KOEditorGeneral::readIncidence(Incidence *event) "); |
404 | if(!event->isAlarmEnabled()) { | 405 | if(!event->isAlarmEnabled()) { |
405 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. | 406 | // TODO: Implement a KPrefsComboItem to solve this in a clean way. |
406 | int alarmTime; | 407 | int alarmTime; |
407 | int a[] = { 1,5,10,15,30,60,180, 1440 }; | 408 | int a[] = { 1,5,10,15,30,60,180, 1440 }; |
408 | int index = KOPrefs::instance()->mAlarmTime; | 409 | int index = KOPrefs::instance()->mAlarmTime; |
409 | if (index < 0 || index > 7) { | 410 | if (index < 0 || index > 7) { |
410 | alarmTime = 15; | 411 | alarmTime = 15; |
411 | } else { | 412 | } else { |
412 | alarmTime = a[index]; | 413 | alarmTime = a[index]; |
413 | } | 414 | } |
414 | mAlarmTimeEdit->setValue(alarmTime); | 415 | mAlarmTimeEdit->setValue(alarmTime); |
415 | } | 416 | } |
416 | mAlarmButton->setChecked( event->isAlarmEnabled() ); | 417 | mAlarmButton->setChecked( event->isAlarmEnabled() ); |
417 | mSecrecyCombo->setCurrentItem(event->secrecy()); | 418 | mSecrecyCombo->setCurrentItem(event->secrecy()); |
418 | mCancelBox->setChecked( event->cancelled() ); | 419 | mCancelBox->setChecked( event->cancelled() ); |
419 | mAlarmProgramButton->setOn(false); | 420 | mAlarmProgramButton->setOn(false); |
420 | mAlarmSoundButton->setOn(false); | 421 | mAlarmSoundButton->setOn(false); |
421 | 422 | ||
422 | // set up alarm stuff | 423 | // set up alarm stuff |
423 | QPtrList<Alarm> alarms = event->alarms(); | 424 | QPtrList<Alarm> alarms = event->alarms(); |
424 | Alarm* alarm; | 425 | Alarm* alarm; |
425 | mAlarmIncrCombo->setCurrentItem(0); | 426 | mAlarmIncrCombo->setCurrentItem(0); |
426 | for ( alarm = alarms.first(); alarm; alarm = alarms.next() ) { | 427 | for ( alarm = alarms.first(); alarm; alarm = alarms.next() ) { |
427 | int offset; | 428 | int offset; |
428 | if ( alarm->hasTime() ) { | 429 | if ( alarm->hasTime() ) { |
429 | QDateTime t = alarm->time(); | 430 | QDateTime t = alarm->time(); |
430 | offset = event->dtStart().secsTo( t ); | 431 | offset = event->dtStart().secsTo( t ); |
431 | } else { | 432 | } else { |
432 | offset = alarm->startOffset().asSeconds(); | 433 | offset = alarm->startOffset().asSeconds(); |
433 | } | 434 | } |
434 | if ( offset != 0 ) { | 435 | if ( offset != 0 ) { |
435 | offset = offset / -60; // make minutes | 436 | offset = offset / -60; // make minutes |
436 | if (offset % 60 == 0) { // divides evenly into hours? | 437 | if (offset % 60 == 0) { // divides evenly into hours? |
437 | offset = offset / 60; | 438 | offset = offset / 60; |
438 | mAlarmIncrCombo->setCurrentItem(1); | 439 | mAlarmIncrCombo->setCurrentItem(1); |
439 | if (offset % 24 == 0) { // divides evenly into days? | 440 | if (offset % 24 == 0) { // divides evenly into days? |
440 | offset = offset / 24; | 441 | offset = offset / 24; |
441 | mAlarmIncrCombo->setCurrentItem(2); | 442 | mAlarmIncrCombo->setCurrentItem(2); |
442 | } | 443 | } |
443 | } | 444 | } |
444 | } | 445 | } |
445 | mAlarmTimeEdit->setValue( offset ); | 446 | mAlarmTimeEdit->setValue( offset ); |
446 | if (alarm->type() == Alarm::Procedure) { | 447 | if (alarm->type() == Alarm::Procedure) { |
447 | 448 | ||
448 | mAlarmProgram = alarm->programFile(); | 449 | mAlarmProgram = alarm->programFile(); |
449 | mAlarmProgramButton->setOn(true); | 450 | mAlarmProgramButton->setOn(true); |
450 | QString dispStr = i18n("Running '%1'").arg(mAlarmProgram); | 451 | QString dispStr = i18n("Running '%1'").arg(mAlarmProgram); |
451 | QToolTip::add(mAlarmProgramButton, dispStr); | 452 | QToolTip::add(mAlarmProgramButton, dispStr); |
452 | } | 453 | } |
453 | else if (alarm->type() == Alarm::Audio) { | 454 | else if (alarm->type() == Alarm::Audio) { |
454 | mAlarmSound = alarm->audioFile(); | 455 | mAlarmSound = alarm->audioFile(); |
455 | if ( ! QFile::exists( mAlarmSound ) ) | 456 | if ( ! QFile::exists( mAlarmSound ) ) |
456 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; | 457 | mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; |
457 | mAlarmSoundButton->setOn(true); | 458 | mAlarmSoundButton->setOn(true); |
458 | QString dispStr = i18n("Playing '%1'").arg(mAlarmSound); | 459 | QString dispStr = i18n("Playing '%1'").arg(mAlarmSound); |
459 | QToolTip::add(mAlarmSoundButton, dispStr); | 460 | QToolTip::add(mAlarmSoundButton, dispStr); |
460 | } | 461 | } |
461 | mAlarmButton->setChecked(alarm->enabled()); | 462 | mAlarmButton->setChecked(alarm->enabled()); |
462 | enableAlarmEdit( alarm->enabled() ); | 463 | enableAlarmEdit( alarm->enabled() ); |
463 | //qDebug("nableAlarmEdit( alarm->enabled() )********* "); | 464 | //qDebug("nableAlarmEdit( alarm->enabled() )********* "); |
464 | // TODO: Deal with multiple alarms | 465 | // TODO: Deal with multiple alarms |
465 | break; // For now, stop after the first alarm | 466 | break; // For now, stop after the first alarm |
466 | } | 467 | } |
467 | 468 | ||
468 | setCategories(event->categoriesStr()); | 469 | setCategories(event->categoriesStr()); |
469 | } | 470 | } |
470 | 471 | ||
471 | void KOEditorGeneral::writeIncidence(Incidence *event) | 472 | void KOEditorGeneral::writeIncidence(Incidence *event) |
472 | { | 473 | { |
473 | // kdDebug() << "KOEditorGeneral::writeEvent()" << endl; | 474 | // kdDebug() << "KOEditorGeneral::writeEvent()" << endl; |
474 | mLocationEdit->save(KOLocationBox::LOCATION); | 475 | mLocationEdit->save(KOLocationBox::LOCATION); |
475 | event->setSummary(mSummaryEdit->currentText()); | 476 | event->setSummary(mSummaryEdit->currentText()); |
476 | event->setLocation(mLocationEdit->currentText()); | 477 | event->setLocation(mLocationEdit->currentText()); |
477 | event->setDescription(mDescriptionEdit->text()); | 478 | event->setDescription(mDescriptionEdit->text()); |
478 | event->setCategories(mCategoriesLabel->text()); | 479 | event->setCategories(mCategoriesLabel->text()); |
479 | event->setSecrecy(mSecrecyCombo->currentItem()); | 480 | event->setSecrecy(mSecrecyCombo->currentItem()); |
480 | event->setCancelled(mCancelBox->isChecked() );; | 481 | event->setCancelled(mCancelBox->isChecked() );; |
481 | // alarm stuff | 482 | // alarm stuff |
482 | if (mAlarmButton->isChecked()) { | 483 | if (mAlarmButton->isChecked()) { |
483 | if (event->alarms().count() == 0) | 484 | if (event->alarms().count() == 0) |
484 | event->newAlarm(); | 485 | event->newAlarm(); |
485 | QPtrList<Alarm> alarms = event->alarms(); | 486 | QPtrList<Alarm> alarms = event->alarms(); |
486 | Alarm *alarm; | 487 | Alarm *alarm; |
487 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { | 488 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { |
488 | alarm->setEnabled(true); | 489 | alarm->setEnabled(true); |
489 | int j = mAlarmTimeEdit->value()* -60; | 490 | int j = mAlarmTimeEdit->value()* -60; |
490 | if (mAlarmIncrCombo->currentItem() == 1) | 491 | if (mAlarmIncrCombo->currentItem() == 1) |
491 | j = j * 60; | 492 | j = j * 60; |
492 | else if (mAlarmIncrCombo->currentItem() == 2) | 493 | else if (mAlarmIncrCombo->currentItem() == 2) |
493 | j = j * (60 * 24); | 494 | j = j * (60 * 24); |
494 | alarm->setStartOffset( j ); | 495 | alarm->setStartOffset( j ); |
495 | 496 | ||
496 | if (!mAlarmProgram.isEmpty() && mAlarmProgramButton->isOn()) { | 497 | if (!mAlarmProgram.isEmpty() && mAlarmProgramButton->isOn()) { |
497 | alarm->setProcedureAlarm(mAlarmProgram); | 498 | alarm->setProcedureAlarm(mAlarmProgram); |
498 | } | 499 | } |
499 | else if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn()) | 500 | else if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn()) |
500 | alarm->setAudioAlarm(mAlarmSound); | 501 | alarm->setAudioAlarm(mAlarmSound); |
501 | else | 502 | else |
502 | alarm->setType(Alarm::Invalid); | 503 | alarm->setType(Alarm::Invalid); |
503 | //alarm->setAudioAlarm("default"); | 504 | //alarm->setAudioAlarm("default"); |
504 | // TODO: Deal with multiple alarms | 505 | // TODO: Deal with multiple alarms |
505 | break; // For now, stop after the first alarm | 506 | break; // For now, stop after the first alarm |
506 | } | 507 | } |
507 | } else { | 508 | } else { |
508 | Alarm* alarm = event->alarms().first(); | 509 | Alarm* alarm = event->alarms().first(); |
509 | if ( alarm ) { | 510 | if ( alarm ) { |
510 | alarm->setEnabled(false); | 511 | alarm->setEnabled(false); |
511 | alarm->setType(Alarm::Invalid); | 512 | alarm->setType(Alarm::Invalid); |
512 | } | 513 | } |
513 | } | 514 | } |
514 | } | 515 | } |
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 678e1bd..341a839 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp | |||
@@ -1,412 +1,417 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1998 Preston Brown | 3 | Copyright (c) 1998 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qcheckbox.h> | 26 | #include <qcheckbox.h> |
27 | #include <qgroupbox.h> | 27 | #include <qgroupbox.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qlistview.h> | 29 | #include <qlistview.h> |
30 | #include <qwhatsthis.h> | 30 | #include <qwhatsthis.h> |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
33 | 33 | ||
34 | #include <klocale.h> | 34 | #include <klocale.h> |
35 | #include <kmessagebox.h> | 35 | #include <kmessagebox.h> |
36 | 36 | ||
37 | #include <libkdepim/kdateedit.h> | 37 | #include <libkdepim/kdateedit.h> |
38 | 38 | ||
39 | #include "koglobals.h" | 39 | #include "koglobals.h" |
40 | #include "koprefs.h" | 40 | #include "koprefs.h" |
41 | #include "klineedit.h" | 41 | #include "klineedit.h" |
42 | 42 | ||
43 | #include "calendarview.h" | 43 | #include "calendarview.h" |
44 | #include "koviewmanager.h" | 44 | #include "koviewmanager.h" |
45 | #include "searchdialog.h" | 45 | #include "searchdialog.h" |
46 | 46 | ||
47 | SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | 47 | SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) |
48 | : QVBox( 0 ) | 48 | : QVBox( 0 ) |
49 | 49 | ||
50 | { | 50 | { |
51 | mCalendar = calendar; | 51 | mCalendar = calendar; |
52 | QFrame *topFrame = new QFrame( this ) ;//plainPage(); | 52 | QFrame *topFrame = new QFrame( this ) ;//plainPage(); |
53 | QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); | 53 | QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); |
54 | 54 | ||
55 | // Search expression | 55 | // Search expression |
56 | QHBoxLayout *subLayout = new QHBoxLayout(); | 56 | QHBoxLayout *subLayout = new QHBoxLayout(); |
57 | layout->addLayout(subLayout); | 57 | layout->addLayout(subLayout); |
58 | searchLabel = new QLabel(topFrame); | 58 | searchLabel = new QLabel(topFrame); |
59 | searchLabel->setText(i18n("Search for:")); | 59 | searchLabel->setText(i18n("Search for:")); |
60 | subLayout->addWidget(searchLabel); | 60 | subLayout->addWidget(searchLabel); |
61 | 61 | ||
62 | searchEdit = new KLineEdit(topFrame); | 62 | searchEdit = new KLineEdit(topFrame); |
63 | subLayout->addWidget(searchEdit); | 63 | subLayout->addWidget(searchEdit); |
64 | QPushButton *OkButton = new QPushButton( i18n("&Find"), topFrame ); | 64 | QPushButton *OkButton = new QPushButton( i18n("&Find"), topFrame ); |
65 | //OkButton->setDefault( true ); | 65 | //OkButton->setDefault( true ); |
66 | connect(OkButton,SIGNAL(clicked()),SLOT(doSearch())); | 66 | connect(OkButton,SIGNAL(clicked()),SLOT(doSearch())); |
67 | subLayout->addWidget(OkButton); | 67 | subLayout->addWidget(OkButton); |
68 | searchEdit->setText("*"); // Find all events by default | 68 | searchEdit->setText("*"); // Find all events by default |
69 | searchEdit->setFocus(); | 69 | searchEdit->setFocus(); |
70 | connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); | 70 | connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); |
71 | connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); | 71 | connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); |
72 | // Subjects to search | 72 | // Subjects to search |
73 | // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), | 73 | // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), |
74 | // topFrame); | 74 | // topFrame); |
75 | 75 | ||
76 | QHBox *incidenceGroup = new QHBox( topFrame ); | 76 | QHBox *incidenceGroup = new QHBox( topFrame ); |
77 | layout->addWidget(incidenceGroup); | 77 | layout->addWidget(incidenceGroup); |
78 | 78 | ||
79 | mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); | 79 | mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); |
80 | mSearchEvent->setChecked(true); | 80 | mSearchEvent->setChecked(true); |
81 | mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); | 81 | mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); |
82 | mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); | 82 | mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); |
83 | 83 | ||
84 | QHBox *subjectGroup = new QHBox( topFrame ); | 84 | QHBox *subjectGroup = new QHBox( topFrame ); |
85 | layout->addWidget(subjectGroup); | 85 | layout->addWidget(subjectGroup); |
86 | 86 | ||
87 | mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); | 87 | mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); |
88 | mSummaryCheck->setChecked(true); | 88 | mSummaryCheck->setChecked(true); |
89 | mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); | 89 | mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); |
90 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); | 90 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); |
91 | 91 | ||
92 | QHBox *attendeeGroup = new QHBox( topFrame ); | 92 | QHBox *attendeeGroup = new QHBox( topFrame ); |
93 | layout->addWidget(attendeeGroup ); | 93 | layout->addWidget(attendeeGroup ); |
94 | new QLabel( i18n("Attendee:"),attendeeGroup ); | 94 | new QLabel( i18n("Attendee:"),attendeeGroup ); |
95 | mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); | 95 | mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); |
96 | mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); | 96 | mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); |
97 | // Date range | 97 | // Date range |
98 | // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), | 98 | // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), |
99 | // topFrame); | 99 | // topFrame); |
100 | // layout->addWidget(rangeGroup); | 100 | // layout->addWidget(rangeGroup); |
101 | 101 | ||
102 | QWidget *rangeWidget = new QWidget(topFrame); | 102 | QWidget *rangeWidget = new QWidget(topFrame); |
103 | QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint()); | 103 | QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint()); |
104 | rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); | 104 | rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); |
105 | mStartDate = new KDateEdit(rangeWidget); | 105 | mStartDate = new KDateEdit(rangeWidget); |
106 | rangeLayout->addWidget(mStartDate); | 106 | rangeLayout->addWidget(mStartDate); |
107 | rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); | 107 | rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); |
108 | mEndDate = new KDateEdit(rangeWidget); | 108 | mEndDate = new KDateEdit(rangeWidget); |
109 | mEndDate->setDate(QDate::currentDate().addDays(365)); | 109 | mEndDate->setDate(QDate::currentDate().addDays(365)); |
110 | rangeLayout->addWidget(mEndDate); | 110 | rangeLayout->addWidget(mEndDate); |
111 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); | 111 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); |
112 | rangeLayout->addWidget( (QWidget*)wt ); | 112 | rangeLayout->addWidget( (QWidget*)wt ); |
113 | layout->addWidget(rangeWidget); | 113 | layout->addWidget(rangeWidget); |
114 | // Results list view | 114 | // Results list view |
115 | listView = new KOListView(mCalendar,topFrame); | 115 | listView = new KOListView(mCalendar,topFrame); |
116 | layout->addWidget(listView); | 116 | layout->addWidget(listView); |
117 | 117 | ||
118 | listView->readSettings(KOGlobals::config(),"SearchListView Layout"); | 118 | listView->readSettings(KOGlobals::config(),"SearchListView Layout"); |
119 | connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList())); | 119 | connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList())); |
120 | 120 | ||
121 | setCaption( i18n("KO/Pi Find: ")); | 121 | setCaption( i18n("KO/Pi Find: ")); |
122 | #ifdef DESKTOP_VERSION | 122 | #ifdef DESKTOP_VERSION |
123 | OkButton = new QPushButton( i18n("Close"), this ); | 123 | OkButton = new QPushButton( i18n("Close"), this ); |
124 | connect(OkButton,SIGNAL(clicked()),SLOT(hide())); | 124 | connect(OkButton,SIGNAL(clicked()),SLOT(hide())); |
125 | #endif | 125 | #endif |
126 | } | 126 | } |
127 | 127 | ||
128 | SearchDialog::~SearchDialog() | 128 | SearchDialog::~SearchDialog() |
129 | { | 129 | { |
130 | 130 | ||
131 | } | 131 | } |
132 | void SearchDialog::setFocusToList() | 132 | void SearchDialog::setFocusToList() |
133 | { | 133 | { |
134 | listView->resetFocus(); | 134 | listView->resetFocus(); |
135 | } | 135 | } |
136 | void SearchDialog::accept() | 136 | void SearchDialog::accept() |
137 | { | 137 | { |
138 | doSearch(); | 138 | doSearch(); |
139 | } | 139 | } |
140 | void SearchDialog::updateList() | 140 | void SearchDialog::updateList() |
141 | { | 141 | { |
142 | //listView->updateList(); | 142 | //listView->updateList(); |
143 | if ( isVisible() ) { | 143 | if ( isVisible() ) { |
144 | updateView(); | 144 | updateView(); |
145 | //qDebug("SearchDialog::updated "); | 145 | //qDebug("SearchDialog::updated "); |
146 | } | 146 | } |
147 | else { | 147 | else { |
148 | listView->clear(); | 148 | listView->clear(); |
149 | //qDebug("SearchDialog::cleared "); | 149 | //qDebug("SearchDialog::cleared "); |
150 | 150 | ||
151 | } | 151 | } |
152 | } | 152 | } |
153 | void SearchDialog::searchTextChanged( const QString &_text ) | 153 | void SearchDialog::searchTextChanged( const QString &_text ) |
154 | { | 154 | { |
155 | #if 0 | 155 | #if 0 |
156 | enableButton( KDialogBase::User1, !_text.isEmpty() ); | 156 | enableButton( KDialogBase::User1, !_text.isEmpty() ); |
157 | #endif | 157 | #endif |
158 | } | 158 | } |
159 | 159 | ||
160 | void SearchDialog::doSearch() | 160 | void SearchDialog::doSearch() |
161 | { | 161 | { |
162 | QRegExp re; | 162 | QRegExp re; |
163 | 163 | ||
164 | re.setWildcard(true); // most people understand these better. | 164 | re.setWildcard(true); // most people understand these better. |
165 | re.setCaseSensitive(false); | 165 | re.setCaseSensitive(false); |
166 | re.setPattern(searchEdit->text()); | 166 | re.setPattern(searchEdit->text()); |
167 | if (!mSearchEvent->isChecked() && !mSearchTodo->isChecked() && !mSearchJournal->isChecked() ) { | ||
168 | KMessageBox::sorry(this, | ||
169 | i18n("Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals")); | ||
170 | return; | ||
171 | } | ||
167 | if (!re.isValid() ) { | 172 | if (!re.isValid() ) { |
168 | KMessageBox::sorry(this, | 173 | KMessageBox::sorry(this, |
169 | i18n("Invalid search expression,\ncannot perform " | 174 | i18n("Invalid search expression,\ncannot perform " |
170 | "the search.\nPlease enter a search expression\n" | 175 | "the search.\nPlease enter a search expression\n" |
171 | "using the wildcard characters\n '*' and '?'" | 176 | "using the wildcard characters\n '*' and '?'" |
172 | "where needed.")); | 177 | "where needed.")); |
173 | return; | 178 | return; |
174 | } | 179 | } |
175 | 180 | ||
176 | search(re); | 181 | search(re); |
177 | 182 | ||
178 | listView->setStartDate( mStartDate->date() ); | 183 | listView->setStartDate( mStartDate->date() ); |
179 | listView->showEvents(mMatchedEvents); | 184 | listView->showEvents(mMatchedEvents); |
180 | listView->addTodos(mMatchedTodos); | 185 | listView->addTodos(mMatchedTodos); |
181 | listView->addJournals(mMatchedJournals); | 186 | listView->addJournals(mMatchedJournals); |
182 | 187 | ||
183 | if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { | 188 | if (mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() == 0) { |
184 | setCaption(i18n("No items found. Use '*' and '?' where needed.")); | 189 | setCaption(i18n("No items found. Use '*' and '?' where needed.")); |
185 | } else { | 190 | } else { |
186 | QString mess; | 191 | QString mess; |
187 | mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() ); | 192 | mess = mess.sprintf( i18n("%d item(s) found."), mMatchedEvents.count()+ mMatchedJournals.count() + mMatchedTodos.count() ); |
188 | setCaption( i18n("KO/Pi Find: ") + mess); | 193 | setCaption( i18n("KO/Pi Find: ") + mess); |
189 | 194 | ||
190 | } | 195 | } |
191 | searchEdit->setFocus(); | 196 | searchEdit->setFocus(); |
192 | } | 197 | } |
193 | void SearchDialog::updateConfig() | 198 | void SearchDialog::updateConfig() |
194 | { | 199 | { |
195 | listView->updateConfig(); | 200 | listView->updateConfig(); |
196 | } | 201 | } |
197 | void SearchDialog::updateView() | 202 | void SearchDialog::updateView() |
198 | { | 203 | { |
199 | 204 | ||
200 | QRegExp re; | 205 | QRegExp re; |
201 | re.setWildcard(true); // most people understand these better. | 206 | re.setWildcard(true); // most people understand these better. |
202 | re.setCaseSensitive(false); | 207 | re.setCaseSensitive(false); |
203 | re.setPattern(searchEdit->text()); | 208 | re.setPattern(searchEdit->text()); |
204 | if (re.isValid()) { | 209 | if (re.isValid()) { |
205 | search(re); | 210 | search(re); |
206 | } else { | 211 | } else { |
207 | mMatchedEvents.clear(); | 212 | mMatchedEvents.clear(); |
208 | mMatchedTodos.clear(); | 213 | mMatchedTodos.clear(); |
209 | mMatchedJournals.clear(); | 214 | mMatchedJournals.clear(); |
210 | } | 215 | } |
211 | listView->setStartDate( mStartDate->date() ); | 216 | listView->setStartDate( mStartDate->date() ); |
212 | listView->showEvents(mMatchedEvents); | 217 | listView->showEvents(mMatchedEvents); |
213 | listView->addTodos(mMatchedTodos); | 218 | listView->addTodos(mMatchedTodos); |
214 | listView->addJournals(mMatchedJournals); | 219 | listView->addJournals(mMatchedJournals); |
215 | } | 220 | } |
216 | 221 | ||
217 | void SearchDialog::search(const QRegExp &re) | 222 | void SearchDialog::search(const QRegExp &re) |
218 | { | 223 | { |
219 | QPtrList<Event> events = mCalendar->events( mStartDate->date(), | 224 | QPtrList<Event> events = mCalendar->events( mStartDate->date(), |
220 | mEndDate->date(), | 225 | mEndDate->date(), |
221 | false /*mInclusiveCheck->isChecked()*/ ); | 226 | false /*mInclusiveCheck->isChecked()*/ ); |
222 | 227 | ||
223 | mMatchedEvents.clear(); | 228 | mMatchedEvents.clear(); |
224 | if ( mSearchEvent->isChecked() ) { | 229 | if ( mSearchEvent->isChecked() ) { |
225 | Event *ev; | 230 | Event *ev; |
226 | for(ev=events.first();ev;ev=events.next()) { | 231 | for(ev=events.first();ev;ev=events.next()) { |
227 | if (mSummaryCheck->isChecked()) { | 232 | if (mSummaryCheck->isChecked()) { |
228 | #if QT_VERSION >= 0x030000 | 233 | #if QT_VERSION >= 0x030000 |
229 | if (re.search(ev->summary()) != -1) | 234 | if (re.search(ev->summary()) != -1) |
230 | #else | 235 | #else |
231 | if (re.match(ev->summary()) != -1) | 236 | if (re.match(ev->summary()) != -1) |
232 | #endif | 237 | #endif |
233 | { | 238 | { |
234 | mMatchedEvents.append(ev); | 239 | mMatchedEvents.append(ev); |
235 | continue; | 240 | continue; |
236 | } | 241 | } |
237 | #if QT_VERSION >= 0x030000 | 242 | #if QT_VERSION >= 0x030000 |
238 | if (re.search(ev->location()) != -1) | 243 | if (re.search(ev->location()) != -1) |
239 | #else | 244 | #else |
240 | if (re.match(ev->location()) != -1) | 245 | if (re.match(ev->location()) != -1) |
241 | #endif | 246 | #endif |
242 | { | 247 | { |
243 | mMatchedEvents.append(ev); | 248 | mMatchedEvents.append(ev); |
244 | continue; | 249 | continue; |
245 | } | 250 | } |
246 | } | 251 | } |
247 | if (mDescriptionCheck->isChecked()) { | 252 | if (mDescriptionCheck->isChecked()) { |
248 | #if QT_VERSION >= 0x030000 | 253 | #if QT_VERSION >= 0x030000 |
249 | if (re.search(ev->description()) != -1) | 254 | if (re.search(ev->description()) != -1) |
250 | #else | 255 | #else |
251 | if (re.match(ev->description()) != -1) | 256 | if (re.match(ev->description()) != -1) |
252 | #endif | 257 | #endif |
253 | { | 258 | { |
254 | mMatchedEvents.append(ev); | 259 | mMatchedEvents.append(ev); |
255 | continue; | 260 | continue; |
256 | } | 261 | } |
257 | } | 262 | } |
258 | if (mCategoryCheck->isChecked()) { | 263 | if (mCategoryCheck->isChecked()) { |
259 | #if QT_VERSION >= 0x030000 | 264 | #if QT_VERSION >= 0x030000 |
260 | if (re.search(ev->categoriesStr()) != -1) | 265 | if (re.search(ev->categoriesStr()) != -1) |
261 | #else | 266 | #else |
262 | if (re.match(ev->categoriesStr()) != -1) | 267 | if (re.match(ev->categoriesStr()) != -1) |
263 | #endif | 268 | #endif |
264 | { | 269 | { |
265 | mMatchedEvents.append(ev); | 270 | mMatchedEvents.append(ev); |
266 | continue; | 271 | continue; |
267 | } | 272 | } |
268 | } | 273 | } |
269 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { | 274 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { |
270 | QPtrList<Attendee> tmpAList = ev->attendees(); | 275 | QPtrList<Attendee> tmpAList = ev->attendees(); |
271 | Attendee *a; | 276 | Attendee *a; |
272 | for (a = tmpAList.first(); a; a = tmpAList.next()) { | 277 | for (a = tmpAList.first(); a; a = tmpAList.next()) { |
273 | if (mSearchAName->isChecked()) { | 278 | if (mSearchAName->isChecked()) { |
274 | #if QT_VERSION >= 0x030000 | 279 | #if QT_VERSION >= 0x030000 |
275 | if (re.search(a->name()) != -1) | 280 | if (re.search(a->name()) != -1) |
276 | #else | 281 | #else |
277 | if (re.match(a->name()) != -1) | 282 | if (re.match(a->name()) != -1) |
278 | #endif | 283 | #endif |
279 | { | 284 | { |
280 | mMatchedEvents.append(ev); | 285 | mMatchedEvents.append(ev); |
281 | break; | 286 | break; |
282 | } | 287 | } |
283 | } | 288 | } |
284 | if (mSearchAEmail->isChecked()) { | 289 | if (mSearchAEmail->isChecked()) { |
285 | #if QT_VERSION >= 0x030000 | 290 | #if QT_VERSION >= 0x030000 |
286 | if (re.search(a->email()) != -1) | 291 | if (re.search(a->email()) != -1) |
287 | #else | 292 | #else |
288 | if (re.match(a->email()) != -1) | 293 | if (re.match(a->email()) != -1) |
289 | #endif | 294 | #endif |
290 | { | 295 | { |
291 | mMatchedEvents.append(ev); | 296 | mMatchedEvents.append(ev); |
292 | break; | 297 | break; |
293 | } | 298 | } |
294 | } | 299 | } |
295 | } | 300 | } |
296 | } | 301 | } |
297 | } | 302 | } |
298 | } | 303 | } |
299 | QPtrList<Todo> todos = mCalendar->todos( ); | 304 | QPtrList<Todo> todos = mCalendar->todos( ); |
300 | mMatchedTodos.clear(); | 305 | mMatchedTodos.clear(); |
301 | if ( mSearchTodo->isChecked() ) { | 306 | if ( mSearchTodo->isChecked() ) { |
302 | Todo *tod; | 307 | Todo *tod; |
303 | for(tod=todos.first();tod;tod=todos.next()) { | 308 | for(tod=todos.first();tod;tod=todos.next()) { |
304 | if (mSummaryCheck->isChecked()) { | 309 | if (mSummaryCheck->isChecked()) { |
305 | #if QT_VERSION >= 0x030000 | 310 | #if QT_VERSION >= 0x030000 |
306 | if (re.search(tod->summary()) != -1) | 311 | if (re.search(tod->summary()) != -1) |
307 | #else | 312 | #else |
308 | if (re.match(tod->summary()) != -1) | 313 | if (re.match(tod->summary()) != -1) |
309 | #endif | 314 | #endif |
310 | { | 315 | { |
311 | mMatchedTodos.append(tod); | 316 | mMatchedTodos.append(tod); |
312 | continue; | 317 | continue; |
313 | } | 318 | } |
314 | } | 319 | } |
315 | if (mDescriptionCheck->isChecked()) { | 320 | if (mDescriptionCheck->isChecked()) { |
316 | #if QT_VERSION >= 0x030000 | 321 | #if QT_VERSION >= 0x030000 |
317 | if (re.search(tod->description()) != -1) | 322 | if (re.search(tod->description()) != -1) |
318 | #else | 323 | #else |
319 | if (re.match(tod->description()) != -1) | 324 | if (re.match(tod->description()) != -1) |
320 | #endif | 325 | #endif |
321 | { | 326 | { |
322 | mMatchedTodos.append(tod); | 327 | mMatchedTodos.append(tod); |
323 | continue; | 328 | continue; |
324 | } | 329 | } |
325 | } | 330 | } |
326 | if (mCategoryCheck->isChecked()) { | 331 | if (mCategoryCheck->isChecked()) { |
327 | #if QT_VERSION >= 0x030000 | 332 | #if QT_VERSION >= 0x030000 |
328 | if (re.search(tod->categoriesStr()) != -1) | 333 | if (re.search(tod->categoriesStr()) != -1) |
329 | #else | 334 | #else |
330 | if (re.match(tod->categoriesStr()) != -1) | 335 | if (re.match(tod->categoriesStr()) != -1) |
331 | #endif | 336 | #endif |
332 | { | 337 | { |
333 | mMatchedTodos.append(tod); | 338 | mMatchedTodos.append(tod); |
334 | continue; | 339 | continue; |
335 | } | 340 | } |
336 | } | 341 | } |
337 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { | 342 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { |
338 | QPtrList<Attendee> tmpAList = tod->attendees(); | 343 | QPtrList<Attendee> tmpAList = tod->attendees(); |
339 | Attendee *a; | 344 | Attendee *a; |
340 | for (a = tmpAList.first(); a; a = tmpAList.next()) { | 345 | for (a = tmpAList.first(); a; a = tmpAList.next()) { |
341 | if (mSearchAName->isChecked()) { | 346 | if (mSearchAName->isChecked()) { |
342 | #if QT_VERSION >= 0x030000 | 347 | #if QT_VERSION >= 0x030000 |
343 | if (re.search(a->name()) != -1) | 348 | if (re.search(a->name()) != -1) |
344 | #else | 349 | #else |
345 | if (re.match(a->name()) != -1) | 350 | if (re.match(a->name()) != -1) |
346 | #endif | 351 | #endif |
347 | { | 352 | { |
348 | mMatchedTodos.append(tod); | 353 | mMatchedTodos.append(tod); |
349 | break; | 354 | break; |
350 | } | 355 | } |
351 | } | 356 | } |
352 | if (mSearchAEmail->isChecked()) { | 357 | if (mSearchAEmail->isChecked()) { |
353 | #if QT_VERSION >= 0x030000 | 358 | #if QT_VERSION >= 0x030000 |
354 | if (re.search(a->email()) != -1) | 359 | if (re.search(a->email()) != -1) |
355 | #else | 360 | #else |
356 | if (re.match(a->email()) != -1) | 361 | if (re.match(a->email()) != -1) |
357 | #endif | 362 | #endif |
358 | { | 363 | { |
359 | mMatchedTodos.append(tod); | 364 | mMatchedTodos.append(tod); |
360 | break; | 365 | break; |
361 | } | 366 | } |
362 | } | 367 | } |
363 | } | 368 | } |
364 | } | 369 | } |
365 | } | 370 | } |
366 | } | 371 | } |
367 | mMatchedJournals.clear(); | 372 | mMatchedJournals.clear(); |
368 | if (mSearchJournal->isChecked() ) { | 373 | if (mSearchJournal->isChecked() ) { |
369 | QPtrList<Journal> journals = mCalendar->journals( ); | 374 | QPtrList<Journal> journals = mCalendar->journals( ); |
370 | Journal* journ; | 375 | Journal* journ; |
371 | 376 | ||
372 | for(journ=journals.first();journ;journ=journals.next()) { | 377 | for(journ=journals.first();journ;journ=journals.next()) { |
373 | if ( journ->dtStart().date() <= mEndDate->date() | 378 | if ( journ->dtStart().date() <= mEndDate->date() |
374 | &&journ->dtStart().date() >= mStartDate->date()) { | 379 | &&journ->dtStart().date() >= mStartDate->date()) { |
375 | #if QT_VERSION >= 0x030000 | 380 | #if QT_VERSION >= 0x030000 |
376 | if (re.search(journ->description()) != -1) | 381 | if (re.search(journ->description()) != -1) |
377 | #else | 382 | #else |
378 | if (re.match(journ->description()) != -1) | 383 | if (re.match(journ->description()) != -1) |
379 | #endif | 384 | #endif |
380 | { | 385 | { |
381 | mMatchedJournals.append(journ); | 386 | mMatchedJournals.append(journ); |
382 | continue; | 387 | continue; |
383 | } | 388 | } |
384 | } | 389 | } |
385 | } | 390 | } |
386 | } | 391 | } |
387 | 392 | ||
388 | } | 393 | } |
389 | 394 | ||
390 | void SearchDialog::keyPressEvent ( QKeyEvent *e) | 395 | void SearchDialog::keyPressEvent ( QKeyEvent *e) |
391 | { | 396 | { |
392 | switch ( e->key() ) { | 397 | switch ( e->key() ) { |
393 | case Qt::Key_Escape: | 398 | case Qt::Key_Escape: |
394 | hide(); | 399 | hide(); |
395 | break; | 400 | break; |
396 | case Qt::Key_F: | 401 | case Qt::Key_F: |
397 | if ( e->state() == Qt::ControlButton ) { | 402 | if ( e->state() == Qt::ControlButton ) { |
398 | qDebug("full "); | 403 | qDebug("full "); |
399 | 404 | ||
400 | } | 405 | } |
401 | break; | 406 | break; |
402 | case Qt::Key_Return: | 407 | case Qt::Key_Return: |
403 | case Qt::Key_Enter: | 408 | case Qt::Key_Enter: |
404 | doSearch(); | 409 | doSearch(); |
405 | break; | 410 | break; |
406 | 411 | ||
407 | default: | 412 | default: |
408 | e->ignore(); | 413 | e->ignore(); |
409 | } | 414 | } |
410 | } | 415 | } |
411 | 416 | ||
412 | //mMatchedJournals; | 417 | //mMatchedJournals; |