author | zautrix <zautrix> | 2005-06-03 12:55:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-03 12:55:27 (UTC) |
commit | f0554322b2f27e1fa60dc79a5d76ef0741bf3423 (patch) (unidiff) | |
tree | fa49feb527b57939d78e5ac786dfcbedd36f26ea | |
parent | dd80f5bb6eee2a924748b7d0acfb4fb892f58b86 (diff) | |
download | kdepimpi-f0554322b2f27e1fa60dc79a5d76ef0741bf3423.zip kdepimpi-f0554322b2f27e1fa60dc79a5d76ef0741bf3423.tar.gz kdepimpi-f0554322b2f27e1fa60dc79a5d76ef0741bf3423.tar.bz2 |
fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 12 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 19 |
8 files changed, 30 insertions, 12 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 05cffbf..3532084 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,86 +1,87 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.1.5 ************ | 3 | ********** VERSION 2.1.5 ************ |
4 | 4 | ||
5 | This is the new stable version. | 5 | This is the new stable version. |
6 | Bugfix: | 6 | Bugfix: |
7 | Fixed a problem with agenda popup on the desktop in KO/Pi. | 7 | Fixed a problem with agenda popup on the desktop in KO/Pi. |
8 | Fixed a crash when reloading file, e.g. after a passive pi-sync operation. | 8 | Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. |
9 | Added config option to not display completed todos in agenda view. | ||
9 | 10 | ||
10 | ********** VERSION 2.1.4 ************ | 11 | ********** VERSION 2.1.4 ************ |
11 | 12 | ||
12 | Fixed two more bugs in the KA/Pi CSV import dialog: | 13 | Fixed two more bugs in the KA/Pi CSV import dialog: |
13 | Made it possible to read multi-line fields and import it to the "Note" field. | 14 | Made it possible to read multi-line fields and import it to the "Note" field. |
14 | Fixed a problem in mapping custom fields, whatever a custem field is... | 15 | Fixed a problem in mapping custom fields, whatever a custem field is... |
15 | 16 | ||
16 | ********** VERSION 2.1.3 ************ | 17 | ********** VERSION 2.1.3 ************ |
17 | 18 | ||
18 | Changed the menu structure of the alarm applet: | 19 | Changed the menu structure of the alarm applet: |
19 | Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". | 20 | Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". |
20 | 21 | ||
21 | Fixed several problems in the KA/Pi CSV import dialog: | 22 | Fixed several problems in the KA/Pi CSV import dialog: |
22 | Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. | 23 | Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. |
23 | 24 | ||
24 | 25 | ||
25 | ********** VERSION 2.1.2 ************ | 26 | ********** VERSION 2.1.2 ************ |
26 | 27 | ||
27 | Fixed a problem closing the alarm dialog on Zaurus with "OK" button. | 28 | Fixed a problem closing the alarm dialog on Zaurus with "OK" button. |
28 | 29 | ||
29 | Fixed a problem when importing data from Outlook with mutiple categories set. | 30 | Fixed a problem when importing data from Outlook with mutiple categories set. |
30 | 31 | ||
31 | Changed display of days in datenavigator: | 32 | Changed display of days in datenavigator: |
32 | Birthdays are now blue, not dark green. | 33 | Birthdays are now blue, not dark green. |
33 | When todo view is shown, no birtdays are shown and days with due todos are shown blue. | 34 | When todo view is shown, no birtdays are shown and days with due todos are shown blue. |
34 | When journal view is shown, only holidays are shown and days with journals are blue. | 35 | When journal view is shown, only holidays are shown and days with journals are blue. |
35 | 36 | ||
36 | Added Backup options to global config: | 37 | Added Backup options to global config: |
37 | You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). | 38 | You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). |
38 | It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. | 39 | It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. |
39 | The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. | 40 | The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. |
40 | 41 | ||
41 | ********** VERSION 2.1.1 ************ | 42 | ********** VERSION 2.1.1 ************ |
42 | 43 | ||
43 | Stable release 2.1.1! | 44 | Stable release 2.1.1! |
44 | 45 | ||
45 | KO/Pi: | 46 | KO/Pi: |
46 | Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. | 47 | Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. |
47 | 48 | ||
48 | ********** VERSION 2.1.0 ************ | 49 | ********** VERSION 2.1.0 ************ |
49 | 50 | ||
50 | Stable release 2.1.0! | 51 | Stable release 2.1.0! |
51 | 52 | ||
52 | Summary of changes/fixes compared to version 2.0.6: | 53 | Summary of changes/fixes compared to version 2.0.6: |
53 | 54 | ||
54 | Many bugs of version 2.0.6 fixed. | 55 | Many bugs of version 2.0.6 fixed. |
55 | Most of them were small bugs, but some of them were important. | 56 | Most of them were small bugs, but some of them were important. |
56 | It is recommended to use version 2.1.0 and not version 2.0.6. | 57 | It is recommended to use version 2.1.0 and not version 2.0.6. |
57 | 58 | ||
58 | Important changes: | 59 | Important changes: |
59 | 60 | ||
60 | Added recurring todos to KO/Pi. | 61 | Added recurring todos to KO/Pi. |
61 | 62 | ||
62 | Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. | 63 | Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. |
63 | 64 | ||
64 | Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | 65 | Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. |
65 | 66 | ||
66 | Datenavigator can now display many months. Very useful on the desktop. | 67 | Datenavigator can now display many months. Very useful on the desktop. |
67 | 68 | ||
68 | KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. | 69 | KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. |
69 | 70 | ||
70 | Made alarm sound working on Linux desktop. | 71 | Made alarm sound working on Linux desktop. |
71 | 72 | ||
72 | Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. | 73 | Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. |
73 | 74 | ||
74 | Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. | 75 | Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. |
75 | 76 | ||
76 | Many other usebility enhancements. | 77 | Many other usebility enhancements. |
77 | Special thanks to Ben for his suggestions! | 78 | Special thanks to Ben for his suggestions! |
78 | 79 | ||
79 | You can find the complete changelog | 80 | You can find the complete changelog |
80 | from version 1.7.7 to 2.1.0 | 81 | from version 1.7.7 to 2.1.0 |
81 | in the source package or on | 82 | in the source package or on |
82 | 83 | ||
83 | http://www.pi-sync.net/html/changelog.html | 84 | http://www.pi-sync.net/html/changelog.html |
84 | 85 | ||
85 | 86 | ||
86 | 87 | ||
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 2cb0132..41868d9 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1,1375 +1,1381 @@ | |||
1 | { "10 minutes","10 Minuten" }, | 1 | { "10 minutes","10 Minuten" }, |
2 | { "10th","10." }, | 2 | { "10th","10." }, |
3 | { "11th","11." }, | 3 | { "11th","11." }, |
4 | { "12 pm Format","12 AM/PM Format" }, | 4 | { "12 pm Format","12 AM/PM Format" }, |
5 | { "12th","12." }, | 5 | { "12th","12." }, |
6 | { "13th","13." }, | 6 | { "13th","13." }, |
7 | { "14th","14." }, | 7 | { "14th","14." }, |
8 | { "15th","15." }, | 8 | { "15th","15." }, |
9 | { "16th","16." }, | 9 | { "16th","16." }, |
10 | { "17th","17." }, | 10 | { "17th","17." }, |
11 | { "18th","18." }, | 11 | { "18th","18." }, |
12 | { "19th","19." }, | 12 | { "19th","19." }, |
13 | { "1 Day","1 Tag" }, | 13 | { "1 Day","1 Tag" }, |
14 | { "1 h","1 Std" }, | 14 | { "1 h","1 Std" }, |
15 | { "1 (high)","1 (hoch)" }, | 15 | { "1 (high)","1 (hoch)" }, |
16 | { "5 (low)","5" }, | 16 | { "5 (low)","5" }, |
17 | { "1st","1." }, | 17 | { "1st","1." }, |
18 | { "20th","20." }, | 18 | { "20th","20." }, |
19 | { "21st","21." }, | 19 | { "21st","21." }, |
20 | { "22nd","22." }, | 20 | { "22nd","22." }, |
21 | { "23rd","23." }, | 21 | { "23rd","23." }, |
22 | { "24:00 Hour Format","24:00 Stunden Format" }, | 22 | { "24:00 Hour Format","24:00 Stunden Format" }, |
23 | { "24th","24." }, | 23 | { "24th","24." }, |
24 | { "25th","25." }, | 24 | { "25th","25." }, |
25 | { "26th","26." }, | 25 | { "26th","26." }, |
26 | { "27th","27." }, | 26 | { "27th","27." }, |
27 | { "28th","28." }, | 27 | { "28th","28." }, |
28 | { "29th","29." }, | 28 | { "29th","29." }, |
29 | { "2nd","2." }, | 29 | { "2nd","2." }, |
30 | { "30 minutes","30 Minuten" }, | 30 | { "30 minutes","30 Minuten" }, |
31 | { "30th","30." }, | 31 | { "30th","30." }, |
32 | { "31st","31." }, | 32 | { "31st","31." }, |
33 | { "3rd","3." }, | 33 | { "3rd","3." }, |
34 | { "4th","4." }, | 34 | { "4th","4." }, |
35 | { "5 (lowest)","5 (Niedrigster)" }, | 35 | { "5 (lowest)","5 (Niedrigster)" }, |
36 | { "5th","5." }, | 36 | { "5th","5." }, |
37 | { "6th","6." }, | 37 | { "6th","6." }, |
38 | { "7th","7." }, | 38 | { "7th","7." }, |
39 | { "8th","8." }, | 39 | { "8th","8." }, |
40 | { "9th","9." }, | 40 | { "9th","9." }, |
41 | { "About...","Über..." }, | 41 | { "About...","Über..." }, |
42 | { "&Accept","&Akzeptieren" }, | 42 | { "&Accept","&Akzeptieren" }, |
43 | { "Accept","Akzeptieren" }, | 43 | { "Accept","Akzeptieren" }, |
44 | { "Accept A&ll","A&lles Akzepieren" }, | 44 | { "Accept A&ll","A&lles Akzepieren" }, |
45 | { "Access:","Zugriff:" }, | 45 | { "Access:","Zugriff:" }, |
46 | { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, | 46 | { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, |
47 | { "Actions","Aktionen" }, | 47 | { "Actions","Aktionen" }, |
48 | { "Add Filter","Filter Hinzufügen" }, | 48 | { "Add Filter","Filter Hinzufügen" }, |
49 | { "&Add","Hinzufügen" }, | 49 | { "&Add","Hinzufügen" }, |
50 | { "Add","Hinzufügen" }, | 50 | { "Add","Hinzufügen" }, |
51 | { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, | 51 | { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, |
52 | { "Additional email address:","Zusätzliche E-Mail Adresse:" }, | 52 | { "Additional email address:","Zusätzliche E-Mail Adresse:" }, |
53 | { "&Addressbook","&Adressbuch" }, | 53 | { "&Addressbook","&Adressbuch" }, |
54 | { "Address &Book...","Adress&buch..." }, | 54 | { "Address &Book...","Adress&buch..." }, |
55 | { "Agenda Size","Agende Größe" }, | 55 | { "Agenda Size","Agende Größe" }, |
56 | { "Agenda Size:","Größe der Agenda:" }, | 56 | { "Agenda Size:","Größe der Agenda:" }, |
57 | { "Agenda view:","Agenda Ansicht:" }, | 57 | { "Agenda view:","Agenda Ansicht:" }, |
58 | { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, | 58 | { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, |
59 | { "All attendees","Alle Teilnehmer" }, | 59 | { "All attendees","Alle Teilnehmer" }, |
60 | { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, | 60 | { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, |
61 | { "All day event","Ganztägig" }, | 61 | { "All day event","Ganztägig" }, |
62 | { "Anonymous","Anonym" }, | 62 | { "Anonymous","Anonym" }, |
63 | { "Apply","Anwenden" }, | 63 | { "Apply","Anwenden" }, |
64 | { "Apr","Apr" }, | 64 | { "Apr","Apr" }, |
65 | { "April","April" }, | 65 | { "April","April" }, |
66 | {"Ask for every entry on conflict","Frage bei Konflikten nach"}, | 66 | {"Ask for every entry on conflict","Frage bei Konflikten nach"}, |
67 | { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, | 67 | { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, |
68 | { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, | 68 | { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, |
69 | { "Attendees","Teilnehmer" }, | 69 | { "Attendees","Teilnehmer" }, |
70 | { "Aug","Aug" }, | 70 | { "Aug","Aug" }, |
71 | { "August","August" }, | 71 | { "August","August" }, |
72 | { "Auto-Save","Automatisches Abspeichern" }, | 72 | { "Auto-Save","Automatisches Abspeichern" }, |
73 | { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, | 73 | { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, |
74 | { "Auto saving...","Automatische Sicherung..." }, | 74 | { "Auto saving...","Automatische Sicherung..." }, |
75 | { "Begin on:","Starte mit:" }, | 75 | { "Begin on:","Starte mit:" }, |
76 | { "Begins on: %1","Starte mit: %1" }, | 76 | { "Begins on: %1","Starte mit: %1" }, |
77 | { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, | 77 | { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, |
78 | { "<b>On:</b> %1","<b>Am:</b> %1" }, | 78 | { "<b>On:</b> %1","<b>Am:</b> %1" }, |
79 | { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, | 79 | { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, |
80 | { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, | 80 | { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, |
81 | { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, | 81 | { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, |
82 | { "Busy","Belegt" }, | 82 | { "Busy","Belegt" }, |
83 | { "&Cancel","Abbre&chen" }, | 83 | { "&Cancel","Abbre&chen" }, |
84 | { "Cancel","Abbrechen" }, | 84 | { "Cancel","Abbrechen" }, |
85 | { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, | 85 | { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, |
86 | { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, | 86 | { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, |
87 | { "Categories...","Kategorien..." }, | 87 | { "Categories...","Kategorien..." }, |
88 | { "Categories","Kategorien" }, | 88 | { "Categories","Kategorien" }, |
89 | { "Category","Kategorie" }, | 89 | { "Category","Kategorie" }, |
90 | { "Center View","Zentriere Ansicht" }, | 90 | { "Center View","Zentriere Ansicht" }, |
91 | { "Change","Ändere" }, | 91 | { "Change","Ändere" }, |
92 | { "Cinema","Kino" }, | 92 | { "Cinema","Kino" }, |
93 | { "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, | 93 | { "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, |
94 | { "Clone Item","Klone Eintrag" }, | 94 | { "Clone Item","Klone Eintrag" }, |
95 | { "&Close","S&chließen" }, | 95 | { "&Close","S&chließen" }, |
96 | { "Close","Schließen" }, | 96 | { "Close","Schließen" }, |
97 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, | 97 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, |
98 | { "Colors","Farben" }, | 98 | { "Colors","Farben" }, |
99 | { "completed","erledigt" }, | 99 | { "completed","erledigt" }, |
100 | { "completed on %1","erledigt am %1" }, | 100 | { "completed on %1","erledigt am %1" }, |
101 | { "Complete","Erledigt" }, | 101 | { "Complete","Erledigt" }, |
102 | { "Confidential","Vertraulich" }, | 102 | { "Confidential","Vertraulich" }, |
103 | { "Configure...","Einstellungen..." }, | 103 | { "Configure...","Einstellungen..." }, |
104 | { "Confirm &deletes","Löschvogang bestätigen" }, | 104 | { "Confirm &deletes","Löschvogang bestätigen" }, |
105 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, | 105 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, |
106 | { "Counter-event Viewer","Terminzähler Ansicht" }, | 106 | { "Counter-event Viewer","Terminzähler Ansicht" }, |
107 | { "Daily ending hour:","Feierabend:" }, | 107 | { "Daily ending hour:","Feierabend:" }, |
108 | { "Daily starting hour:","Anfangszeit:" }, | 108 | { "Daily starting hour:","Anfangszeit:" }, |
109 | { "Daily","Täglich" }, | 109 | { "Daily","Täglich" }, |
110 | { "Date Format","Datums Format" }, | 110 | { "Date Format","Datums Format" }, |
111 | { "Date Format:","Datums Format:" }, | 111 | { "Date Format:","Datums Format:" }, |
112 | { "DateNavigator:(nr)","Datums Navigator" }, | 112 | { "DateNavigator:(nr)","Datums Navigator" }, |
113 | { "Dates: ","Datum: " }, | 113 | { "Dates: ","Datum: " }, |
114 | { "Date && Time","Datum && Zeit" }, | 114 | { "Date && Time","Datum && Zeit" }, |
115 | { "Day begins at:","Der Tag beginnt um:" }, | 115 | { "Day begins at:","Der Tag beginnt um:" }, |
116 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, | 116 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, |
117 | { "Days in What's Next:","Tage in What's Next:" }, | 117 | { "Days in What's Next:","Tage in What's Next:" }, |
118 | { "day(s)","Tag(e)" }, | 118 | { "day(s)","Tag(e)" }, |
119 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, | 119 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, |
120 | { "day","Tag" }, | 120 | { "day","Tag" }, |
121 | { "Dec","Dez" }, | 121 | { "Dec","Dez" }, |
122 | { "December","Dezember" }, | 122 | { "December","Dezember" }, |
123 | { "Default alarm time:","Standard Alarmzeit:" }, | 123 | { "Default alarm time:","Standard Alarmzeit:" }, |
124 | { "Default appointment time:","Standard Termin Startzeit:" }, | 124 | { "Default appointment time:","Standard Termin Startzeit:" }, |
125 | { "Default event color:","Standard Terminfarbe:" }, | 125 | { "Default event color:","Standard Terminfarbe:" }, |
126 | { "Default","Standard" }, | 126 | { "Default","Standard" }, |
127 | { "Def. duration of new app.:","Standard Termin Länge:" }, | 127 | { "Def. duration of new app.:","Standard Termin Länge:" }, |
128 | { "Delete All","Lösche alles" }, | 128 | { "Delete All","Lösche alles" }, |
129 | { "Delete all selected","Lösche alle Selektierten" }, | 129 | { "Delete all selected","Lösche alle Selektierten" }, |
130 | { "Delete Current","Aktuellen löschen" }, | 130 | { "Delete Current","Aktuellen löschen" }, |
131 | { "Delete Event...","Lösche Termin..." }, | 131 | { "Delete Event...","Lösche Termin..." }, |
132 | { "Delete Event","Lösche Termin" }, | 132 | { "Delete Event","Lösche Termin" }, |
133 | { "&Delete","Löschen" }, | 133 | { "&Delete","Löschen" }, |
134 | { "Delete...","Löschen..." }, | 134 | { "Delete...","Löschen..." }, |
135 | { "Delete","Löschen" }, | 135 | { "Delete","Löschen" }, |
136 | { "Delete Todo...","Lösche Todo..." }, | 136 | { "Delete Todo...","Lösche Todo..." }, |
137 | { "Delete To-Do","Lösche Todo" }, | 137 | { "Delete To-Do","Lösche Todo" }, |
138 | { "Deleting item %d ...","Lösche Eintrag %d..." }, | 138 | { "Deleting item %d ...","Lösche Eintrag %d..." }, |
139 | { "Descriptions","Beschreibungen" }, | 139 | { "Descriptions","Beschreibungen" }, |
140 | { "Deselect all","Deselektiere Alle" }, | 140 | { "Deselect all","Deselektiere Alle" }, |
141 | { "Details","Details" }, | 141 | { "Details","Details" }, |
142 | { "Dinner","Abendessen" }, | 142 | { "Dinner","Abendessen" }, |
143 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, | 143 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, |
144 | { "Due Date","Fällig am" }, | 144 | { "Due Date","Fällig am" }, |
145 | { "Due: ","Fällig: "}, | 145 | { "Due: ","Fällig: "}, |
146 | { "Due Time","Fällig um" }, | 146 | { "Due Time","Fällig um" }, |
147 | { "Due:","Fällig:"}, | 147 | { "Due:","Fällig:"}, |
148 | { "Duration: ","Dauer: " }, | 148 | { "Duration: ","Dauer: " }, |
149 | { "Edit...","Bearbeite..." }, | 149 | { "Edit...","Bearbeite..." }, |
150 | { "Edit","Bearbeite" }, | 150 | { "Edit","Bearbeite" }, |
151 | { "Edit Event...","Bearbeite Termin..." }, | 151 | { "Edit Event...","Bearbeite Termin..." }, |
152 | { "Edit Event","Bearbeite Termin" }, | 152 | { "Edit Event","Bearbeite Termin" }, |
153 | { "Edit exceptions","Bearbeite Ausnahmen" }, | 153 | { "Edit exceptions","Bearbeite Ausnahmen" }, |
154 | { "EditorBox:","Editor Fenster:" }, | 154 | { "EditorBox:","Editor Fenster:" }, |
155 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, | 155 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, |
156 | { "Edit Todo...","Berabeite Todo..." }, | 156 | { "Edit Todo...","Berabeite Todo..." }, |
157 | { "Edit To-Do","Todo bearbeiten" }, | 157 | { "Edit To-Do","Todo bearbeiten" }, |
158 | { "E&mail address:","E&mail Adresse:" }, | 158 | { "E&mail address:","E&mail Adresse:" }, |
159 | { "(EmptyEmail)","(KeineEmail)" }, | 159 | { "(EmptyEmail)","(KeineEmail)" }, |
160 | { "(EmptyName)","(KeinName)" }, | 160 | { "(EmptyName)","(KeinName)" }, |
161 | { "Enable Recurrence","Wiederholung anschalten" }, | 161 | { "Enable Recurrence","Wiederholung anschalten" }, |
162 | { "End after","Endet nach"}, | 162 | { "End after","Endet nach"}, |
163 | { "End by:","Endet am"}, | 163 | { "End by:","Endet am"}, |
164 | { "End Date","End Datum" }, | 164 | { "End Date","End Datum" }, |
165 | { "End:","Ende:" }, | 165 | { "End:","Ende:" }, |
166 | { "End Time","End Zeit" }, | 166 | { "End Time","End Zeit" }, |
167 | { "English","Englisch" }, | 167 | { "English","Englisch" }, |
168 | { "Event","Termin" }, | 168 | { "Event","Termin" }, |
169 | { "Event list","Termin Liste" }, | 169 | { "Event list","Termin Liste" }, |
170 | { "Events","Termine" }, | 170 | { "Events","Termine" }, |
171 | { "Event Viewer:","Termin Übersicht:" }, | 171 | { "Event Viewer:","Termin Übersicht:" }, |
172 | { "every","jede" }, | 172 | { "every","jede" }, |
173 | { "Exceptions...","Ausnahmen..." }, | 173 | { "Exceptions...","Ausnahmen..." }, |
174 | { "Exceptions","Ausnahmen" }, | 174 | { "Exceptions","Ausnahmen" }, |
175 | { "Exclude holidays","Ohne freie Tage" }, | 175 | { "Exclude holidays","Ohne freie Tage" }, |
176 | { "Exclude Saturdays","Ohne Samstage" }, | 176 | { "Exclude Saturdays","Ohne Samstage" }, |
177 | { "Feb","Feb" }, | 177 | { "Feb","Feb" }, |
178 | { "February","Februar" }, | 178 | { "February","Februar" }, |
179 | { "&Find","Suche!" }, | 179 | { "&Find","Suche!" }, |
180 | { "Fonts","Schriftart" }, | 180 | { "Fonts","Schriftart" }, |
181 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, | 181 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, |
182 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, | 182 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, |
183 | { "Free","Frei" }, | 183 | { "Free","Frei" }, |
184 | { "Friday","Freitag" }, | 184 | { "Friday","Freitag" }, |
185 | { "Fri","Fr" }, | 185 | { "Fri","Fr" }, |
186 | { "From:","Vom:" }, | 186 | { "From:","Vom:" }, |
187 | { "Full &name:","Vor- und &Nachname:" }, | 187 | { "Full &name:","Vor- und &Nachname:" }, |
188 | { "General","Allgemein" }, | 188 | { "General","Allgemein" }, |
189 | { "German","Deutsch" }, | 189 | { "German","Deutsch" }, |
190 | { "Gifts","Geschenke" }, | 190 | { "Gifts","Geschenke" }, |
191 | { "Go to Today","Heute anzeigen" }, | 191 | { "Go to Today","Heute anzeigen" }, |
192 | { "Help","Hilfe" }, | 192 | { "Help","Hilfe" }, |
193 | { "Hide Dates","Daten ausblenden" }, | 193 | { "Hide Dates","Daten ausblenden" }, |
194 | { "Highlight color:","Markierungen:" }, | 194 | { "Highlight color:","Markierungen:" }, |
195 | { "Holiday color:","Freie Tage:" }, | 195 | { "Holiday color:","Freie Tage:" }, |
196 | { "hour(s)","Stunde(n)" }, | 196 | { "hour(s)","Stunde(n)" }, |
197 | { "In %1 days: ","In %1 Tagen: " }, | 197 | { "In %1 days: ","In %1 Tagen: " }, |
198 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, | 198 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, |
199 | { "Information","Information" }, | 199 | { "Information","Information" }, |
200 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, | 200 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, |
201 | { "Jan","Jan" }, | 201 | { "Jan","Jan" }, |
202 | { "January","Januar" }, | 202 | { "January","Januar" }, |
203 | { "JournalView:","Journal Ansicht:" }, | 203 | { "JournalView:","Journal Ansicht:" }, |
204 | { "Journals","Journale" }, | 204 | { "Journals","Journale" }, |
205 | { "Jul","Jul" }, | 205 | { "Jul","Jul" }, |
206 | { "July","Juli" }, | 206 | { "July","Juli" }, |
207 | { "Jump to date","Springe zum Datum" }, | 207 | { "Jump to date","Springe zum Datum" }, |
208 | { "June","Juni" }, | 208 | { "June","Juni" }, |
209 | { "Jun","Jun" }, | 209 | { "Jun","Jun" }, |
210 | { "Key Bindings...","Tastenzuordnung..." }, | 210 | { "Key Bindings...","Tastenzuordnung..." }, |
211 | { "Kids","Kinder" }, | 211 | { "Kids","Kinder" }, |
212 | { "Known Problems...","Bekannte Probleme..." }, | 212 | { "Known Problems...","Bekannte Probleme..." }, |
213 | { "KO/Pi Find ","KO/Pi Suchdialog " }, | 213 | { "KO/Pi Find ","KO/Pi Suchdialog " }, |
214 | { "KO/Pi Find: ","KO/Pi Suchen: " }, | 214 | { "KO/Pi Find: ","KO/Pi Suchen: " }, |
215 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, | 215 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, |
216 | { "Language:(needs restart)","Sprache (Neustart!)" }, | 216 | { "Language:(needs restart)","Sprache (Neustart!)" }, |
217 | { "Language:","Sprache" }, | 217 | { "Language:","Sprache" }, |
218 | { "Large","Etwas mehr" }, | 218 | { "Large","Etwas mehr" }, |
219 | { "List View:","Listenansicht:" }, | 219 | { "List View:","Listenansicht:" }, |
220 | { "List View","Listenansicht" }, | 220 | { "List View","Listenansicht" }, |
221 | { "Load/Save","Laden/Speichern" }, | 221 | { "Load/Save","Laden/Speichern" }, |
222 | { "Load Template","Lade Vorlage" }, | 222 | { "Load Template","Lade Vorlage" }, |
223 | { "Locale","Localisation" }, | 223 | { "Locale","Localisation" }, |
224 | { "Local temp file:","Lokale temp. Datei:" }, | 224 | { "Local temp file:","Lokale temp. Datei:" }, |
225 | { "Location: ","Ort: " }, | 225 | { "Location: ","Ort: " }, |
226 | { "Location:","Ort:" }, | 226 | { "Location:","Ort:" }, |
227 | { "Mail client","Mail Programm" }, | 227 | { "Mail client","Mail Programm" }, |
228 | { "Mail Client","Mail Programm" }, | 228 | { "Mail Client","Mail Programm" }, |
229 | { "March","März" }, | 229 | { "March","März" }, |
230 | { "Mar","Mär" }, | 230 | { "Mar","Mär" }, |
231 | { "May","Mai" }, | 231 | { "May","Mai" }, |
232 | { "M. Bains line:","M. Bains Linie:" }, | 232 | { "M. Bains line:","M. Bains Linie:" }, |
233 | { "Medium","Medium" }, | 233 | { "Medium","Medium" }, |
234 | { "Method","Methode" }, | 234 | { "Method","Methode" }, |
235 | { "minute(s)","Minute(n)" }, | 235 | { "minute(s)","Minute(n)" }, |
236 | { "Monday","Montag" }, | 236 | { "Monday","Montag" }, |
237 | { "Mon","Mo" }, | 237 | { "Mon","Mo" }, |
238 | { "Monthly","Monatlich" }, | 238 | { "Monthly","Monatlich" }, |
239 | { "Month not long enough","Monat ist nicht lang genug" }, | 239 | { "Month not long enough","Monat ist nicht lang genug" }, |
240 | { "month(s)","Monat(e)" }, | 240 | { "month(s)","Monat(e)" }, |
241 | { "Month view:","Monatsansicht:" }, | 241 | { "Month view:","Monatsansicht:" }, |
242 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, | 242 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, |
243 | { "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, | 243 | { "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, |
244 | { "Move &Down","Nach unten verschieben" }, | 244 | { "Move &Down","Nach unten verschieben" }, |
245 | { "Move &Up","Nach oben verschieben" }, | 245 | { "Move &Up","Nach oben verschieben" }, |
246 | { "Name:","Name:" }, | 246 | { "Name:","Name:" }, |
247 | { "Name","Name" }, | 247 | { "Name","Name" }, |
248 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, | 248 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, |
249 | { "%n Days","%n Tage" }, | 249 | { "%n Days","%n Tage" }, |
250 | { "Never","Nie" }, | 250 | { "Never","Nie" }, |
251 | { "New event...","Neuer Termin..." }, | 251 | { "New event...","Neuer Termin..." }, |
252 | { "New event","Neuer Termin" }, | 252 | { "New event","Neuer Termin" }, |
253 | { "New Event...","Neuer Termin..." }, | 253 | { "New Event...","Neuer Termin..." }, |
254 | { "New Events/Todos should","Neue Termine/Todos sollten" }, | 254 | { "New Events/Todos should","Neue Termine/Todos sollten" }, |
255 | { "&New","&Neu" }, | 255 | { "&New","&Neu" }, |
256 | { "New","Neu", }, | 256 | { "New","Neu", }, |
257 | { "New Sub-Todo...","Neues Sub-Todo..." }, | 257 | { "New Sub-Todo...","Neues Sub-Todo..." }, |
258 | { "New Todo...","Neues Todo..." }, | 258 | { "New Todo...","Neues Todo..." }, |
259 | { "Next Alarm: ","Nächster Alarm: ", }, | 259 | { "Next Alarm: ","Nächster Alarm: ", }, |
260 | { "&Next Day","&Nächster Tag", }, | 260 | { "&Next Day","&Nächster Tag", }, |
261 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, | 261 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, |
262 | { "Next month","Nächster Monat" }, | 262 | { "Next month","Nächster Monat" }, |
263 | { "&Next Week","&Nächste Woche" }, | 263 | { "&Next Week","&Nächste Woche" }, |
264 | { "Next year","Nächstes Jahr" }, | 264 | { "Next year","Nächstes Jahr" }, |
265 | { "Next Year","Nächstes Jahr" }, | 265 | { "Next Year","Nächstes Jahr" }, |
266 | { "%n h","%n Std" }, | 266 | { "%n h","%n Std" }, |
267 | { "No ending date","Kein End-Datum", }, | 267 | { "No ending date","Kein End-Datum", }, |
268 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, | 268 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, |
269 | { "No event selected.","Kein Termin selektiert" }, | 269 | { "No event selected.","Kein Termin selektiert" }, |
270 | { "No","Nein" }, | 270 | { "No","Nein" }, |
271 | { "No program set","Kein Programm ausgewählt", }, | 271 | { "No program set","Kein Programm ausgewählt", }, |
272 | { "Normal","Normal" }, | 272 | { "Normal","Normal" }, |
273 | { "[No selection]","Keine Selektion", }, | 273 | { "[No selection]","Keine Selektion", }, |
274 | { "No sound set","Kein Sound ausgewählt", }, | 274 | { "No sound set","Kein Sound ausgewählt", }, |
275 | { "no time ","keine Zeit ", }, | 275 | { "no time ","keine Zeit ", }, |
276 | { "no time","keine Zeit", }, | 276 | { "no time","keine Zeit", }, |
277 | { "No Time","Keine Zeit" }, | 277 | { "No Time","Keine Zeit" }, |
278 | { "November","November" }, | 278 | { "November","November" }, |
279 | { "Nov","Nov", }, | 279 | { "Nov","Nov", }, |
280 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, | 280 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, |
281 | { "occurrence(s)","Vorkommen" }, | 281 | { "occurrence(s)","Vorkommen" }, |
282 | { "October","Oktober" }, | 282 | { "October","Oktober" }, |
283 | { "Oct","Okt", }, | 283 | { "Oct","Okt", }, |
284 | { "O-due!","Ü-fällig! " }, | 284 | { "O-due!","Ü-fällig! " }, |
285 | { "&OK","&OK" }, | 285 | { "&OK","&OK" }, |
286 | { "Ok+Show!","Ok+Anzeigen" }, | 286 | { "Ok+Show!","Ok+Anzeigen" }, |
287 | { "Organizer: %1","Organisator %1" }, | 287 | { "Organizer: %1","Organisator %1" }, |
288 | { "Organizer","Organisator" }, | 288 | { "Organizer","Organisator" }, |
289 | { "Owner: ","Besitzer: " }, | 289 | { "Owner: ","Besitzer: " }, |
290 | { "Owner:","Besitzer:" }, | 290 | { "Owner:","Besitzer:" }, |
291 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 291 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
292 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, | 292 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, |
293 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, | 293 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, |
294 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, | 294 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, |
295 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, | 295 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, |
296 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, | 296 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, |
297 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, | 297 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, |
298 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, | 298 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, |
299 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, | 299 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, |
300 | { "&Previous Day","Vorheriger Tag" }, | 300 | { "&Previous Day","Vorheriger Tag" }, |
301 | { "Previous month","Vorheriger Monat" }, | 301 | { "Previous month","Vorheriger Monat" }, |
302 | { "Previous Month","Vorheriger Monat" }, | 302 | { "Previous Month","Vorheriger Monat" }, |
303 | { "&Previous Week","Vorherige Woche" }, | 303 | { "&Previous Week","Vorherige Woche" }, |
304 | { "Previous year","Vorheriges Jahr" }, | 304 | { "Previous year","Vorheriges Jahr" }, |
305 | { "Previous Year","Vorheriges Jahr" }, | 305 | { "Previous Year","Vorheriges Jahr" }, |
306 | { "Printing","Drucken" }, | 306 | { "Printing","Drucken" }, |
307 | { "Priority:","Priorität:" }, | 307 | { "Priority:","Priorität:" }, |
308 | { "Private","Privat" }, | 308 | { "Private","Privat" }, |
309 | { "Proceed","Weiter" }, | 309 | { "Proceed","Weiter" }, |
310 | { "Public","Öffentlich" }, | 310 | { "Public","Öffentlich" }, |
311 | { "Purge","Entferne" }, | 311 | { "Purge","Entferne" }, |
312 | { "Purge Completed","Entferne erledigte Todos" }, | 312 | { "Purge Completed","Entferne erledigte Todos" }, |
313 | { "Purge Todos","Todos bereinigen" }, | 313 | { "Purge Todos","Todos bereinigen" }, |
314 | { "read-only","schreibgeschützt" }, | 314 | { "read-only","schreibgeschützt" }, |
315 | { "Recur every","Wiederh. alle" }, | 315 | { "Recur every","Wiederh. alle" }, |
316 | { "Recur in the month of","Wiederh. im Monat" }, | 316 | { "Recur in the month of","Wiederh. im Monat" }, |
317 | { "Recur on the","Wiederh. am" }, | 317 | { "Recur on the","Wiederh. am" }, |
318 | { "Recur on this day","Wiederh. am diesen Tag" }, | 318 | { "Recur on this day","Wiederh. am diesen Tag" }, |
319 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, | 319 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, |
320 | { "Recurrence Range","Wiederholungs Zeitraum" }, | 320 | { "Recurrence Range","Wiederholungs Zeitraum" }, |
321 | { "Recurrence Rule","Wiederholungs Regel" }, | 321 | { "Recurrence Rule","Wiederholungs Regel" }, |
322 | { "Recurrence","Wiederholung" }, | 322 | { "Recurrence","Wiederholung" }, |
323 | { "Recurs","Wiederholung" }, | 323 | { "Recurs","Wiederholung" }, |
324 | {"&Reject","Abweisen"}, | 324 | {"&Reject","Abweisen"}, |
325 | { "Reminder:","Alarm:" }, | 325 | { "Reminder:","Alarm:" }, |
326 | { "Rem.:","Alarm:" }, | 326 | { "Rem.:","Alarm:" }, |
327 | { "Rem.","Alarm:" }, | 327 | { "Rem.","Alarm:" }, |
328 | { "Remote file:","Remote Datei:"}, | 328 | { "Remote file:","Remote Datei:"}, |
329 | { "Remote IP:","Remote (ferne) IP:" }, | 329 | { "Remote IP:","Remote (ferne) IP:" }, |
330 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, | 330 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, |
331 | { "Remote user:","Remote Benutzer"}, | 331 | { "Remote user:","Remote Benutzer"}, |
332 | { "&Remove","Entfe&rnen" }, | 332 | { "&Remove","Entfe&rnen" }, |
333 | { "Remove","Entfernen" }, | 333 | { "Remove","Entfernen" }, |
334 | { "Request response","Bemerkung anfordern" }, | 334 | { "Request response","Bemerkung anfordern" }, |
335 | { "Role:","Rolle:" }, | 335 | { "Role:","Rolle:" }, |
336 | { "Role","Rolle" }, | 336 | { "Role","Rolle" }, |
337 | { "Sat","Sa" }, | 337 | { "Sat","Sa" }, |
338 | { "Saturday","Samstag" }, | 338 | { "Saturday","Samstag" }, |
339 | { "Search for:","Suche nach:" }, | 339 | { "Search for:","Suche nach:" }, |
340 | { "Search In","Suche in" }, | 340 | { "Search In","Suche in" }, |
341 | { "Search...","Suche..." }, | 341 | { "Search...","Suche..." }, |
342 | { "Search","Suche" }, | 342 | { "Search","Suche" }, |
343 | { "Select Addresses","Wähle Adressen" }, | 343 | { "Select Addresses","Wähle Adressen" }, |
344 | { "Select all","Selektiere Alle" }, | 344 | { "Select all","Selektiere Alle" }, |
345 | { "Select a month","Wähle Monat" }, | 345 | { "Select a month","Wähle Monat" }, |
346 | { "Select a week","Wähle Woche" }, | 346 | { "Select a week","Wähle Woche" }, |
347 | { "Select a year","Wähle Jahr" }, | 347 | { "Select a year","Wähle Jahr" }, |
348 | { "Send directly","Sende direkt" }, | 348 | { "Send directly","Sende direkt" }, |
349 | { "&Send Messages","&Sende Nachrichten", }, | 349 | { "&Send Messages","&Sende Nachrichten", }, |
350 | { "Sep","Sep" }, | 350 | { "Sep","Sep" }, |
351 | { "September","September" }, | 351 | { "September","September" }, |
352 | { "Shopping","Einkaufen" }, | 352 | { "Shopping","Einkaufen" }, |
353 | { "Show Dates","Zeige Daten" }, | 353 | { "Show Dates","Zeige Daten" }, |
354 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, | 354 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, |
355 | { "Show Event...","Zeige Termin..." }, | 355 | { "Show Event...","Zeige Termin..." }, |
356 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, | 356 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, |
357 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, | 357 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, |
358 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, | 358 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, |
359 | { "Show time as:","Zeige Zeit als" }, | 359 | { "Show time as:","Zeige Zeit als" }, |
360 | { "Show Todo...","Zeige To-Do" }, | 360 | { "Show Todo...","Zeige To-Do" }, |
361 | { "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, | 361 | { "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, |
362 | { "&Show","Zeige" }, | 362 | { "&Show","Zeige" }, |
363 | { "Show...","Zeige..." }, | 363 | { "Show...","Zeige..." }, |
364 | { "Show","Zeige" }, | 364 | { "Show","Zeige" }, |
365 | { "Small","Klein" }, | 365 | { "Small","Klein" }, |
366 | { "Sorry","Entschuldigung" }, | 366 | { "Sorry","Entschuldigung" }, |
367 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, | 367 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, |
368 | { "Start:","Start:" }, | 368 | { "Start:","Start:" }, |
369 | { "Start Date","Start Datum" }, | 369 | { "Start Date","Start Datum" }, |
370 | { "Start date: %1","Start Datum: %1" }, | 370 | { "Start date: %1","Start Datum: %1" }, |
371 | { "Start Time","Start Zeit" }, | 371 | { "Start Time","Start Zeit" }, |
372 | { "Status:","Status:" }, | 372 | { "Status:","Status:" }, |
373 | { "Status","Status:" }, | 373 | { "Status","Status:" }, |
374 | { "Summaries","Titel" }, | 374 | { "Summaries","Titel" }, |
375 | { "Summary:","Titel:" }, | 375 | { "Summary:","Titel:" }, |
376 | { "Summary","Titel" }, | 376 | { "Summary","Titel" }, |
377 | { "Sunday","Sonntag" }, | 377 | { "Sunday","Sonntag" }, |
378 | { "Sun","So" }, | 378 | { "Sun","So" }, |
379 | { "Sync preferences:","Sync Einstellungen" }, | 379 | { "Sync preferences:","Sync Einstellungen" }, |
380 | { "Sync Prefs","Sync Einstellungen" }, | 380 | { "Sync Prefs","Sync Einstellungen" }, |
381 | { "Syncronize","Daten abgleich" }, | 381 | { "Syncronize","Daten abgleich" }, |
382 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, | 382 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, |
383 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, | 383 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, |
384 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, | 384 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, |
385 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, | 385 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, |
386 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, | 386 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, |
387 | { "Template...","Vorlage..." }, | 387 | { "Template...","Vorlage..." }, |
388 | { "This day","Dieser Tag" }, | 388 | { "This day","Dieser Tag" }, |
389 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, | 389 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, |
390 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, | 390 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, |
391 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, | 391 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, |
392 | { "Thu","Do" }, | 392 | { "Thu","Do" }, |
393 | { "Thursday","Donnerstag" }, | 393 | { "Thursday","Donnerstag" }, |
394 | { "Time associated","Mit Zeit" }, | 394 | { "Time associated","Mit Zeit" }, |
395 | { "Time bar:","Uhrzeit Zeile:" }, | 395 | { "Time bar:","Uhrzeit Zeile:" }, |
396 | { "Time && Date","Zeit und Datum" }, | 396 | { "Time && Date","Zeit und Datum" }, |
397 | { "Time Format","Zeit Format" }, | 397 | { "Time Format","Zeit Format" }, |
398 | { "Time Format(nr):","Zeit Format(Neustart!)" }, | 398 | { "Time Format(nr):","Zeit Format(Neustart!)" }, |
399 | { "Date Labels:","Datumsleiste:" }, | 399 | { "Date Labels:","Datumsleiste:" }, |
400 | { "Time: ","Zeit: " }, | 400 | { "Time: ","Zeit: " }, |
401 | { "Timezone:","Zeitzone:" }, | 401 | { "Timezone:","Zeitzone:" }, |
402 | { "To: ","Bis: " }, | 402 | { "To: ","Bis: " }, |
403 | { "To:","Bis:" }, | 403 | { "To:","Bis:" }, |
404 | { "Today: ","Heute: " }, | 404 | { "Today: ","Heute: " }, |
405 | { "Todo due today color:","Heute fällige To-Do's" }, | 405 | { "Todo due today color:","Heute fällige To-Do's" }, |
406 | { "To-do items:","To-Do items:" }, | 406 | { "To-do items:","To-Do items:" }, |
407 | { "Todo overdue color:","Überfällige To-Do's" }, | 407 | { "Todo overdue color:","Überfällige To-Do's" }, |
408 | { "Todo","Todo" }, | 408 | { "Todo","Todo" }, |
409 | { "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, | 409 | { "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, |
410 | { "ToDoView:","Todo Ansicht:" }, | 410 | { "ToDoView:","Todo Ansicht:" }, |
411 | { "Toggle Alarm","Wechsle Alarm" }, | 411 | { "Toggle Alarm","Wechsle Alarm" }, |
412 | { "Toggle Allday","Umschalten Ganztag" }, | 412 | { "Toggle Allday","Umschalten Ganztag" }, |
413 | { "Tomorrow: ","Morgen: " }, | 413 | { "Tomorrow: ","Morgen: " }, |
414 | { "Tue","Di" }, | 414 | { "Tue","Di" }, |
415 | { "Tuesday","Dienstag" }, | 415 | { "Tuesday","Dienstag" }, |
416 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, | 416 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, |
417 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, | 417 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, |
418 | { "Unknown","Unbekannt" }, | 418 | { "Unknown","Unbekannt" }, |
419 | { "Up","Hinauf" }, | 419 | { "Up","Hinauf" }, |
420 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, | 420 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, |
421 | { "User defined","Benutzerdefiniert" }, | 421 | { "User defined","Benutzerdefiniert" }, |
422 | { "User long date:","Format langes Datum:" }, | 422 | { "User long date:","Format langes Datum:" }, |
423 | { "User short date:","Forma kurzes Datum:" }, | 423 | { "User short date:","Forma kurzes Datum:" }, |
424 | { "View","Ansicht" }, | 424 | { "View","Ansicht" }, |
425 | { "View Fonts","Schriftarten Ansichten" }, | 425 | { "View Fonts","Schriftarten Ansichten" }, |
426 | { "Views","Ansichten" }, | 426 | { "Views","Ansichten" }, |
427 | { "Wed","Mi" }, | 427 | { "Wed","Mi" }, |
428 | { "Wednesday","Mittwoch" }, | 428 | { "Wednesday","Mittwoch" }, |
429 | { "Week %1","Woche %1" }, | 429 | { "Week %1","Woche %1" }, |
430 | { "Weekly","Wöchentlich" }, | 430 | { "Weekly","Wöchentlich" }, |
431 | { "Week starts on Sunday","Woche beginnt Sonntags" }, | 431 | { "Week starts on Sunday","Woche beginnt Sonntags" }, |
432 | { "What's Next View:","What's Next Anz." }, | 432 | { "What's Next View:","What's Next Anz." }, |
433 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, | 433 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, |
434 | { "Working Hours","Tägliche Arbeitszeit" }, | 434 | { "Working Hours","Tägliche Arbeitszeit" }, |
435 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, | 435 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, |
436 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, | 436 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, |
437 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, | 437 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, |
438 | { "Yearly","Jährlich" }, | 438 | { "Yearly","Jährlich" }, |
439 | { "year(s)","Jahr(e)" }, | 439 | { "year(s)","Jahr(e)" }, |
440 | { "Yes","Ja" }, | 440 | { "Yes","Ja" }, |
441 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, | 441 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, |
442 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, | 442 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, |
443 | { "week(s) on:","Woche(n) am: " }, | 443 | { "week(s) on:","Woche(n) am: " }, |
444 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, | 444 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, |
445 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, | 445 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, |
446 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, | 446 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, |
447 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, | 447 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, |
448 | { "Daylight start:","Sommerzeit Start:" }, | 448 | { "Daylight start:","Sommerzeit Start:" }, |
449 | { "Daylight end:","Sommerzeit Ende:" }, | 449 | { "Daylight end:","Sommerzeit Ende:" }, |
450 | { "Time Zone","Zeitzone" }, | 450 | { "Time Zone","Zeitzone" }, |
451 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, | 451 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, |
452 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, | 452 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, |
453 | { "minutely","minütlich" }, | 453 | { "minutely","minütlich" }, |
454 | { "hourly","stündlich" }, | 454 | { "hourly","stündlich" }, |
455 | { "daily","täglich" }, | 455 | { "daily","täglich" }, |
456 | { "weekly","wöchentlich" }, | 456 | { "weekly","wöchentlich" }, |
457 | { "monthly","monatlich" }, | 457 | { "monthly","monatlich" }, |
458 | { "day-monthly","tag-monatlich" }, | 458 | { "day-monthly","tag-monatlich" }, |
459 | { "month-yearly","monat-jährlich" }, | 459 | { "month-yearly","monat-jährlich" }, |
460 | { "day-yearly","tag-jährlich" }, | 460 | { "day-yearly","tag-jährlich" }, |
461 | { "position-yearly","pos-jährlich" }, | 461 | { "position-yearly","pos-jährlich" }, |
462 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, | 462 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, |
463 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, | 463 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, |
464 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, | 464 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, |
465 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, | 465 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, |
466 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, | 466 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, |
467 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, | 467 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, |
468 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, | 468 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, |
469 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, | 469 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, |
470 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, | 470 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, |
471 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, | 471 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, |
472 | { "ViewChange","Ansichtswechsel" }, | 472 | { "ViewChange","Ansichtswechsel" }, |
473 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, | 473 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, |
474 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, | 474 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, |
475 | { "File","Datei" }, | 475 | { "File","Datei" }, |
476 | { "Clone...","Dupliziere.." }, | 476 | { "Clone...","Dupliziere.." }, |
477 | { "Move...","Bewege..." }, | 477 | { "Move...","Bewege..." }, |
478 | { "Beam...","Sende via IR..." }, | 478 | { "Beam...","Sende via IR..." }, |
479 | { "&Clone...","Dupliziere.." }, | 479 | { "&Clone...","Dupliziere.." }, |
480 | { "&Move...","Bewege..." }, | 480 | { "&Move...","Bewege..." }, |
481 | { "&Beam...","Sende via IR..." }, | 481 | { "&Beam...","Sende via IR..." }, |
482 | { "Show Completed","Zeige erledigte Todos" }, | 482 | { "Show Completed","Zeige erledigte Todos" }, |
483 | { "Show Quick Todo","Zeige Quick Todo" }, | 483 | { "Show Quick Todo","Zeige Quick Todo" }, |
484 | { "Unparent Todo","Un-sub Todo" }, | 484 | { "Unparent Todo","Un-sub Todo" }, |
485 | { "Save selected to file...","Speichere Selektierte..." }, | 485 | { "Save selected to file...","Speichere Selektierte..." }, |
486 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, | 486 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, |
487 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, | 487 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, |
488 | { "Beam selected via IR","Sende Selekt. via IR..." }, | 488 | { "Beam selected via IR","Sende Selekt. via IR..." }, |
489 | { "Search","Suchen" }, | 489 | { "Search","Suchen" }, |
490 | { "Date Picker","Datum auswählen" }, | 490 | { "Date Picker","Datum auswählen" }, |
491 | { "Day View","Tagesansicht" }, | 491 | { "Day View","Tagesansicht" }, |
492 | { "Work Week","Arbeitswoche" }, | 492 | { "Work Week","Arbeitswoche" }, |
493 | { "Week","Wochenansicht" }, | 493 | { "Week","Wochenansicht" }, |
494 | { "Month","Monatsansicht" }, | 494 | { "Month","Monatsansicht" }, |
495 | { "Todo View","Todo Liste" }, | 495 | { "Todo View","Todo Liste" }, |
496 | { "Journal","Journal" }, | 496 | { "Journal","Journal" }, |
497 | { "Next days","Nächste Tage" }, | 497 | { "Next days","Nächste Tage" }, |
498 | { "Print agenda selection...","Drucke Agendaselektion..." }, | 498 | { "Print agenda selection...","Drucke Agendaselektion..." }, |
499 | { "Toggle DateNavigator","Navigator umschalten" }, | 499 | { "Toggle DateNavigator","Navigator umschalten" }, |
500 | { "Toggle FilterView","Filteransicht umschalten" }, | 500 | { "Toggle FilterView","Filteransicht umschalten" }, |
501 | { "Prev. month","Vorheriger Monat" }, | 501 | { "Prev. month","Vorheriger Monat" }, |
502 | { "Go backward","Gehe zurück" }, | 502 | { "Go backward","Gehe zurück" }, |
503 | { "Go forward","Gehe weiter" }, | 503 | { "Go forward","Gehe weiter" }, |
504 | { "Synchronize","Synchronisieren" }, | 504 | { "Synchronize","Synchronisieren" }, |
505 | { "AgendaSize","Agendagröße" }, | 505 | { "AgendaSize","Agendagröße" }, |
506 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, | 506 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, |
507 | { "Import last file","Importiere letzte Datei" }, | 507 | { "Import last file","Importiere letzte Datei" }, |
508 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, | 508 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, |
509 | { "Load Calendar Backup","Lade Kalender Backup" }, | 509 | { "Load Calendar Backup","Lade Kalender Backup" }, |
510 | { "Save Calendar Backup","Speichere Kalender Backup" }, | 510 | { "Save Calendar Backup","Speichere Kalender Backup" }, |
511 | { "Export VCalendar","Exportiere VCalendar" }, | 511 | { "Export VCalendar","Exportiere VCalendar" }, |
512 | { "Manage new categories...","Verwalte neue Kategorien..." }, | 512 | { "Manage new categories...","Verwalte neue Kategorien..." }, |
513 | { "Beam complete calendar...","Sende kompletten Kalender via IR" }, | 513 | { "Beam complete calendar...","Sende kompletten Kalender via IR" }, |
514 | { "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, | 514 | { "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, |
515 | { "Remote via ssh","Über Netzwerk via ssh" }, | 515 | { "Remote via ssh","Über Netzwerk via ssh" }, |
516 | { "With local file","Mit lokaler Datei" }, | 516 | { "With local file","Mit lokaler Datei" }, |
517 | { "With last file","Mit letzter Datei" }, | 517 | { "With last file","Mit letzter Datei" }, |
518 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, | 518 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, |
519 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, | 519 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, |
520 | { "Save filename","Speichern: Dateinamen wählen" }, | 520 | { "Save filename","Speichern: Dateinamen wählen" }, |
521 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, | 521 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, |
522 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, | 522 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, |
523 | { "Overwrite!","Überschreibe!" }, | 523 | { "Overwrite!","Überschreibe!" }, |
524 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 524 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
525 | { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, | 525 | { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, |
526 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, | 526 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, |
527 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, | 527 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, |
528 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, | 528 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, |
529 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, | 529 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, |
530 | { "Size","Größe" }, | 530 | { "Size","Größe" }, |
531 | { "Date","Datum" }, | 531 | { "Date","Datum" }, |
532 | { "Mime Type","Datei Typ" }, | 532 | { "Mime Type","Datei Typ" }, |
533 | { "All Files","Alle Dateien" }, | 533 | { "All Files","Alle Dateien" }, |
534 | { "Files","Dateien" }, | 534 | { "Files","Dateien" }, |
535 | { "Documents","DoKumente" }, | 535 | { "Documents","DoKumente" }, |
536 | { "Select Categories","Selektiere Kategorien" }, | 536 | { "Select Categories","Selektiere Kategorien" }, |
537 | { " &Deselect All "," Auswahl aufheben " }, | 537 | { " &Deselect All "," Auswahl aufheben " }, |
538 | { "A&dd","Hinzu" }, | 538 | { "A&dd","Hinzu" }, |
539 | { "&Modify","Ändern" }, | 539 | { "&Modify","Ändern" }, |
540 | { "Edit Categories","Editiere Kategorien" }, | 540 | { "Edit Categories","Editiere Kategorien" }, |
541 | { " &Edit Categories "," &Editiere Kategorien " }, | 541 | { " &Edit Categories "," &Editiere Kategorien " }, |
542 | { "Beam Options","Beam Einstellungen" }, | 542 | { "Beam Options","Beam Einstellungen" }, |
543 | { " With timezone "," Mit Zeitzone " }, | 543 | { " With timezone "," Mit Zeitzone " }, |
544 | { " Local time ", " Lokale Zeit " }, | 544 | { " Local time ", " Lokale Zeit " }, |
545 | { "Manage new Categories","Verwalte neue Kategorien" }, | 545 | { "Manage new Categories","Verwalte neue Kategorien" }, |
546 | { "Add to category list","Füge zur Kategorieliste hinzu" }, | 546 | { "Add to category list","Füge zur Kategorieliste hinzu" }, |
547 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, | 547 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, |
548 | { "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, | 548 | { "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, |
549 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, | 549 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, |
550 | { "File format","Datei Format" }, | 550 | { "File format","Datei Format" }, |
551 | { "Time format","Zeit Format" }, | 551 | { "Time format","Zeit Format" }, |
552 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, | 552 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, |
553 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, | 553 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, |
554 | { "h","Std" }, | 554 | { "h","Std" }, |
555 | { "min","Min" }, | 555 | { "min","Min" }, |
556 | { "hou","Std" }, | 556 | { "hou","Std" }, |
557 | { "day","Tag" }, | 557 | { "day","Tag" }, |
558 | { "French","Französich" }, | 558 | { "French","Französich" }, |
559 | { "Time","Zeit" }, | 559 | { "Time","Zeit" }, |
560 | { "Event Viewer","Termin Ansicht" }, | 560 | { "Event Viewer","Termin Ansicht" }, |
561 | { "Cancel Sync","Sync Abbrechen" }, | 561 | { "Cancel Sync","Sync Abbrechen" }, |
562 | { "Remote","Fern" }, | 562 | { "Remote","Fern" }, |
563 | { "Local","Lokal" }, | 563 | { "Local","Lokal" }, |
564 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, | 564 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, |
565 | { "Local: ","Lokal: " }, | 565 | { "Local: ","Lokal: " }, |
566 | { "Remote: ","Fern: " }, | 566 | { "Remote: ","Fern: " }, |
567 | { "Last modified: ","Zuletzt geändert: " }, | 567 | { "Last modified: ","Zuletzt geändert: " }, |
568 | { "Location: ","Ort: " }, | 568 | { "Location: ","Ort: " }, |
569 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, | 569 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, |
570 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, | 570 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, |
571 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, | 571 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, |
572 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, | 572 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, |
573 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, | 573 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, |
574 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, | 574 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, |
575 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, | 575 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, |
576 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, | 576 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, |
577 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, | 577 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, |
578 | { "( %1 min before )","( %1 min vorher )" }, | 578 | { "( %1 min before )","( %1 min vorher )" }, |
579 | { "<b>Alarm on: ","<b>Alarm am: " }, | 579 | { "<b>Alarm on: ","<b>Alarm am: " }, |
580 | { "<b>Details: </b>","<b>Details: </b>" }, | 580 | { "<b>Details: </b>","<b>Details: </b>" }, |
581 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 581 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
582 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, | 582 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, |
583 | { "Organizer","Organisator" }, | 583 | { "Organizer","Organisator" }, |
584 | { "Save","Speichern" }, | 584 | { "Save","Speichern" }, |
585 | { "Exit (+save)","Beenden (+ speichern)" }, | 585 | { "Exit (+save)","Beenden (+ speichern)" }, |
586 | { "Home","Zuhause" }, | 586 | { "Home","Zuhause" }, |
587 | { "Office","Büro" }, | 587 | { "Office","Büro" }, |
588 | { "Libary","Bücherei" }, | 588 | { "Libary","Bücherei" }, |
589 | { "Doctor","Arzt" }, | 589 | { "Doctor","Arzt" }, |
590 | { "Beach","Strand" }, | 590 | { "Beach","Strand" }, |
591 | { "Conference room","Konferenzraum" }, | 591 | { "Conference room","Konferenzraum" }, |
592 | { "Drive Home","Heimfahrt" }, | 592 | { "Drive Home","Heimfahrt" }, |
593 | { "Watch TV","Tv gucken" }, | 593 | { "Watch TV","Tv gucken" }, |
594 | { "Phone call","Telefonanruf" }, | 594 | { "Phone call","Telefonanruf" }, |
595 | { "Pay bill","Rechnung bezahlen" }, | 595 | { "Pay bill","Rechnung bezahlen" }, |
596 | { "Read book","Buch lesen" }, | 596 | { "Read book","Buch lesen" }, |
597 | { "Watering plants","Pflanzen giessen" }, | 597 | { "Watering plants","Pflanzen giessen" }, |
598 | {"Appointment","Verabredung" }, | 598 | {"Appointment","Verabredung" }, |
599 | {"Birthday","Geburtstag" }, | 599 | {"Birthday","Geburtstag" }, |
600 | {"Business","Geschäft" }, | 600 | {"Business","Geschäft" }, |
601 | {"Business Travel","Geschäftsreise" }, | 601 | {"Business Travel","Geschäftsreise" }, |
602 | {"Cinema","Kino" }, | 602 | {"Cinema","Kino" }, |
603 | {"Customer","Kunde" }, | 603 | {"Customer","Kunde" }, |
604 | {"Break","Pause" }, | 604 | {"Break","Pause" }, |
605 | {"Breakfast","Frühstück" }, | 605 | {"Breakfast","Frühstück" }, |
606 | {"Competition","Wettkampf" }, | 606 | {"Competition","Wettkampf" }, |
607 | {"Dinner","Abendessen" }, | 607 | {"Dinner","Abendessen" }, |
608 | {"Education","Erziehung" }, | 608 | {"Education","Erziehung" }, |
609 | {"Family","Familie" }, | 609 | {"Family","Familie" }, |
610 | {"Favorites","Favoriten" }, | 610 | {"Favorites","Favoriten" }, |
611 | {"Festival","Festival" }, | 611 | {"Festival","Festival" }, |
612 | {"Fishing","Angeln" }, | 612 | {"Fishing","Angeln" }, |
613 | {"Flight","Flug" }, | 613 | {"Flight","Flug" }, |
614 | {"Gifts","Geschenk" }, | 614 | {"Gifts","Geschenk" }, |
615 | {"Holiday","Feiertag" }, | 615 | {"Holiday","Feiertag" }, |
616 | {"Holiday Cards","Ansichtskarten" }, | 616 | {"Holiday Cards","Ansichtskarten" }, |
617 | {"Hot Contacts","Heisse Kontakte" }, | 617 | {"Hot Contacts","Heisse Kontakte" }, |
618 | {"Hiking","Wandern" }, | 618 | {"Hiking","Wandern" }, |
619 | {"Hunting","Jagen" }, | 619 | {"Hunting","Jagen" }, |
620 | {"Key Customer","Wichtiger Kunde" }, | 620 | {"Key Customer","Wichtiger Kunde" }, |
621 | {"Kids","Kinder" }, | 621 | {"Kids","Kinder" }, |
622 | {"Lunch","Mittagessen" }, | 622 | {"Lunch","Mittagessen" }, |
623 | {"Meeting","Treffen" }, | 623 | {"Meeting","Treffen" }, |
624 | {"Miscellaneous","Verschiedenes" }, | 624 | {"Miscellaneous","Verschiedenes" }, |
625 | {"Partner","Partner" }, | 625 | {"Partner","Partner" }, |
626 | {"Party","Partie" }, | 626 | {"Party","Partie" }, |
627 | {"Personal","Privat" }, | 627 | {"Personal","Privat" }, |
628 | {"Personal Travel","Privatreise"}, | 628 | {"Personal Travel","Privatreise"}, |
629 | {"PHB","PHB" }, | 629 | {"PHB","PHB" }, |
630 | {"Phone Calls","Telefonanruf" }, | 630 | {"Phone Calls","Telefonanruf" }, |
631 | {"Projects","Projekt" }, | 631 | {"Projects","Projekt" }, |
632 | {"Recurring","Wiederholend" }, | 632 | {"Recurring","Wiederholend" }, |
633 | {"School","Schule" }, | 633 | {"School","Schule" }, |
634 | {"Shopping","Einkaufen" }, | 634 | {"Shopping","Einkaufen" }, |
635 | {"Speach","Rede" }, | 635 | {"Speach","Rede" }, |
636 | {"Special Occasion","Spez.Gelegenheit" }, | 636 | {"Special Occasion","Spez.Gelegenheit" }, |
637 | {"Sports","Sport" }, | 637 | {"Sports","Sport" }, |
638 | {"Talk","Vortrag" }, | 638 | {"Talk","Vortrag" }, |
639 | {"Travel","Reise" }, | 639 | {"Travel","Reise" }, |
640 | {"TV","TV" }, | 640 | {"TV","TV" }, |
641 | {"Germany","Deutschland" }, | 641 | {"Germany","Deutschland" }, |
642 | {"Sweden","Schweden" }, | 642 | {"Sweden","Schweden" }, |
643 | {"Forest","Wald" }, | 643 | {"Forest","Wald" }, |
644 | { "Desert","Wüste" }, | 644 | { "Desert","Wüste" }, |
645 | { "Kitchen","Küche" }, | 645 | { "Kitchen","Küche" }, |
646 | { "Lake","See" }, | 646 | { "Lake","See" }, |
647 | {"University","Universität"}, | 647 | {"University","Universität"}, |
648 | {"Vacation","Urlaub" }, | 648 | {"Vacation","Urlaub" }, |
649 | {"VIP","VIP" }, | 649 | {"VIP","VIP" }, |
650 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, | 650 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, |
651 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, | 651 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, |
652 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, | 652 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, |
653 | { "Cancelled","Gecancelt" }, | 653 | { "Cancelled","Gecancelt" }, |
654 | { "Multiple sync","Mehrfach Sync" }, | 654 | { "Multiple sync","Mehrfach Sync" }, |
655 | { "Local file","Lokale Datei" }, | 655 | { "Local file","Lokale Datei" }, |
656 | { "Last file","Letzte Datei" }, | 656 | { "Last file","Letzte Datei" }, |
657 | { "Keys + Colors...","Tasten + Farben..." }, | 657 | { "Keys + Colors...","Tasten + Farben..." }, |
658 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, | 658 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, |
659 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, | 659 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, |
660 | { "Choose...","Wähle..." }, | 660 | { "Choose...","Wähle..." }, |
661 | { "Use colors for application:","Setze Farben für Programm:" }, | 661 | { "Use colors for application:","Setze Farben für Programm:" }, |
662 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, | 662 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, |
663 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, | 663 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, |
664 | { "Show parent To-Do's","Zeige Ober-Todos" }, | 664 | { "Show parent To-Do's","Zeige Ober-Todos" }, |
665 | { "Show location","Zeige Orte" }, | 665 | { "Show location","Zeige Orte" }, |
666 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, | 666 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, |
667 | { "Show in every cell ","Zeige in jeder Zelle " }, | 667 | { "Show in every cell ","Zeige in jeder Zelle " }, |
668 | { "short month","kurzen Monat" }, | 668 | { "short month","kurzen Monat" }, |
669 | { "icons","Icons" }, | 669 | { "icons","Icons" }, |
670 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, | 670 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, |
671 | { "Categorie colors are applied to text","Kategorie Farben färben Text" }, | 671 | { "Category colors are applied to text","Kategorie Farben färben Text" }, |
672 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, | 672 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, |
673 | { "Day color odd months","Tagesfarbe ungerade Monate" }, | 673 | { "Day color odd months","Tagesfarbe ungerade Monate" }, |
674 | { "Day color even months","Tagesfarbe gerade Monate" }, | 674 | { "Day color even months","Tagesfarbe gerade Monate" }, |
675 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, | 675 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, |
676 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, | 676 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, |
677 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, | 677 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, |
678 | { "Colors are applied to text","Farben werden auf Text angewendet" }, | 678 | { "Colors are applied to text","Farben werden auf Text angewendet" }, |
679 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, | 679 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, |
680 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, | 680 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, |
681 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, | 681 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, |
682 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, | 682 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, |
683 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, | 683 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, |
684 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, | 684 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, |
685 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, | 685 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, |
686 | { "New profile","Neues Profil" }, | 686 | { "New profile","Neues Profil" }, |
687 | { "Clone profile","Klone Profil" }, | 687 | { "Clone profile","Klone Profil" }, |
688 | { "Delete profile","Lösche Profil" }, | 688 | { "Delete profile","Lösche Profil" }, |
689 | { "Profile:","Profil:" }, | 689 | { "Profile:","Profil:" }, |
690 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, | 690 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, |
691 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, | 691 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, |
692 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, | 692 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, |
693 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, | 693 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, |
694 | { "Write back file","Schreibe Datei zurück" }, | 694 | { "Write back file","Schreibe Datei zurück" }, |
695 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, | 695 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, |
696 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, | 696 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, |
697 | { "Local device name:","Name dieses Gerätes:" }, | 697 | { "Local device name:","Name dieses Gerätes:" }, |
698 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, | 698 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, |
699 | { "Sync preferences","Synchronisations Einstellungen" }, | 699 | { "Sync preferences","Synchronisations Einstellungen" }, |
700 | { "Profile kind","Profil Art" }, | 700 | { "Profile kind","Profil Art" }, |
701 | { "Local file","Lokale Datei" }, | 701 | { "Local file","Lokale Datei" }, |
702 | { "Local file:","Lokale Datei:" }, | 702 | { "Local file:","Lokale Datei:" }, |
703 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, | 703 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, |
704 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, | 704 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, |
705 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, | 705 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, |
706 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, | 706 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, |
707 | { "Device","Gerät:" }, | 707 | { "Device","Gerät:" }, |
708 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, | 708 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, |
709 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, | 709 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, |
710 | { "Synchronization successful","Synchronisation erfolgreich" }, | 710 | { "Synchronization successful","Synchronisation erfolgreich" }, |
711 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, | 711 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, |
712 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, | 712 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, |
713 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, | 713 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, |
714 | { "Enter password","Passwort eingeben" }, | 714 | { "Enter password","Passwort eingeben" }, |
715 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, | 715 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, |
716 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, | 716 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, |
717 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, | 717 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, |
718 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, | 718 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, |
719 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, | 719 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, |
720 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, | 720 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, |
721 | { "Enter filter name:","Neuer Filter Name:" }, | 721 | { "Enter filter name:","Neuer Filter Name:" }, |
722 | { "Add Filter","Filter hinzufügen" }, | 722 | { "Add Filter","Filter hinzufügen" }, |
723 | { "Question","Frage" }, | 723 | { "Question","Frage" }, |
724 | { "Filter position: ","Filter Position: " }, | 724 | { "Filter position: ","Filter Position: " }, |
725 | { "Month View","Monatsansicht" }, | 725 | { "Month View","Monatsansicht" }, |
726 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, | 726 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, |
727 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, | 727 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, |
728 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, | 728 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, |
729 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, | 729 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, |
730 | { "Access: ","Zugriff: " }, | 730 | { "Access: ","Zugriff: " }, |
731 | { "Needs Action","Aktion notwendig" }, | 731 | { "Needs Action","Aktion notwendig" }, |
732 | { "Accepted","Akzeptiert" }, | 732 | { "Accepted","Akzeptiert" }, |
733 | { "Declined","Abgelehnt" }, | 733 | { "Declined","Abgelehnt" }, |
734 | { "Tentative","Vorläufig" }, | 734 | { "Tentative","Vorläufig" }, |
735 | { "Delegated","Beauftragt" }, | 735 | { "Delegated","Beauftragt" }, |
736 | { "Completed","Vollständig" }, | 736 | { "Completed","Vollständig" }, |
737 | { "In Process","In Bearbeitung" }, | 737 | { "In Process","In Bearbeitung" }, |
738 | { "Participant","Teilnehmer" }, | 738 | { "Participant","Teilnehmer" }, |
739 | { "Optional Participant","Möglicher Teilnehmer" }, | 739 | { "Optional Participant","Möglicher Teilnehmer" }, |
740 | { "Observer","Beobachter" }, | 740 | { "Observer","Beobachter" }, |
741 | { "Chair","Vorsitzender" }, | 741 | { "Chair","Vorsitzender" }, |
742 | { "Not supported \non desktop!\n","" }, | 742 | { "Not supported \non desktop!\n","" }, |
743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, | 743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, |
744 | { "Date range: ","Datums Zeitspanne: " }, | 744 | { "Date range: ","Datums Zeitspanne: " }, |
745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
747 | { "Add / remove events","Add./entferne Termine" }, | 747 | { "Add / remove events","Add./entferne Termine" }, |
748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
751 | { "Overwrite","Überschreiben" }, | 751 | { "Overwrite","Überschreiben" }, |
752 | { "Sync+save","Syncen+speichern" }, | 752 | { "Sync+save","Syncen+speichern" }, |
753 | { "Default","Standard" }, | 753 | { "Default","Standard" }, |
754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
755 | { " %d items?"," %d Einträge?" }, | 755 | { " %d items?"," %d Einträge?" }, |
756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, | 756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, |
757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
758 | { "Current","Aktuelle" }, | 758 | { "Current","Aktuelle" }, |
759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, | 759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, |
760 | { "All","Alle" }, | 760 | { "All","Alle" }, |
761 | { "Data Loss Warning","Datenverlust Warnung" }, | 761 | { "Data Loss Warning","Datenverlust Warnung" }, |
762 | { "Proceed","Weitermachen" }, | 762 | { "Proceed","Weitermachen" }, |
763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
764 | { "Filter disabled ","Filter abgeschaltet" }, | 764 | { "Filter disabled ","Filter abgeschaltet" }, |
765 | { "Filter selected: ","Gewählter Filter: " }, | 765 | { "Filter selected: ","Gewählter Filter: " }, |
766 | { "Toggle Cancel","Gecancelt ändern" }, | 766 | { "Toggle Cancel","Gecancelt ändern" }, |
767 | { "&Toggle Cancel","Gecancel&t ändern" }, | 767 | { "&Toggle Cancel","Gecancel&t ändern" }, |
768 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 768 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
769 | { "Stretched TB","Gedehnte TB" }, | 769 | { "Stretched TB","Gedehnte TB" }, |
770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, | 772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, |
773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
774 | { "Imported file successfully","Datei erfolgreich importiert" }, | 774 | { "Imported file successfully","Datei erfolgreich importiert" }, |
775 | { "Error importing file","Fehler beim Importieren der Datei" }, | 775 | { "Error importing file","Fehler beim Importieren der Datei" }, |
776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, | 777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, |
778 | { "Overwrite!","Überschreiben!" }, | 778 | { "Overwrite!","Überschreiben!" }, |
779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, | 779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, |
780 | { "Load backup filename","Lade Backup Dateiname" }, | 780 | { "Load backup filename","Lade Backup Dateiname" }, |
781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
783 | { "Save backup filename","Speichere Backup Dateiname" }, | 783 | { "Save backup filename","Speichere Backup Dateiname" }, |
784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, | 784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, |
785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
786 | { "Details of attendee","Teilnehmerdetails" }, | 786 | { "Details of attendee","Teilnehmerdetails" }, |
787 | { "Work phone:\n","Telefon Arbeit:\n" }, | 787 | { "Work phone:\n","Telefon Arbeit:\n" }, |
788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
789 | { "Home phone:\n","Telefon privat:\n" }, | 789 | { "Home phone:\n","Telefon privat:\n" }, |
790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
791 | { "Email:\n","Email:\n" }, | 791 | { "Email:\n","Email:\n" }, |
792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
793 | { "Audio Al.: ","Audio Al.: " }, | 793 | { "Audio Al.: ","Audio Al.: " }, |
794 | { "Proc.Al.: ","Proz.Al.: " }, | 794 | { "Proc.Al.: ","Proz.Al.: " }, |
795 | { "No sound set","Kein Sound definiert" }, | 795 | { "No sound set","Kein Sound definiert" }, |
796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
797 | { "No program set","Kein Programm definiert" }, | 797 | { "No program set","Kein Programm definiert" }, |
798 | { "Running '%1'","Ausführen '%1'" }, | 798 | { "Running '%1'","Ausführen '%1'" }, |
799 | { "Playing '%1'","Abspielen '%1'" }, | 799 | { "Playing '%1'","Abspielen '%1'" }, |
800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
801 | { "Load!","Laden!" }, | 801 | { "Load!","Laden!" }, |
802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, | 802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, |
803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
806 | { "Features + hints...","Eigenschaften + Tipps..." }, | 806 | { "Features + hints...","Eigenschaften + Tipps..." }, |
807 | { "User translation...","Benutzer Übersetzung..." }, | 807 | { "User translation...","Benutzer Übersetzung..." }, |
808 | { "Sync HowTo...","Synchronisation HowTo..." }, | 808 | { "Sync HowTo...","Synchronisation HowTo..." }, |
809 | { "Print calendar...","Drucke Kalender..." }, | 809 | { "Print calendar...","Drucke Kalender..." }, |
810 | { "Anniversary","Jahrestag" }, | 810 | { "Anniversary","Jahrestag" }, |
811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, | 811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, |
812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
816 | { "(%1 min before)","(%1 min vorher)" }, | 816 | { "(%1 min before)","(%1 min vorher)" }, |
817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
818 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 818 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, | 819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, |
820 | { "Continue","Weitermachen" }, | 820 | { "Continue","Weitermachen" }, |
821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
822 | { "Attendee:","Teilnehmer:" }, | 822 | { "Attendee:","Teilnehmer:" }, |
823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
824 | { "On day ","Am Tag " }, | 824 | { "On day ","Am Tag " }, |
825 | { "%1 of ","%1 des Monats" }, | 825 | { "%1 of ","%1 des Monats" }, |
826 | { "%1 of the year","%1 des Jahres" }, | 826 | { "%1 of the year","%1 des Jahres" }, |
827 | { "Anonymous","Anonymo" }, | 827 | { "Anonymous","Anonymo" }, |
828 | { "nobody@nowhere","niemand@nirgendwo" }, | 828 | { "nobody@nowhere","niemand@nirgendwo" }, |
829 | { "calendar.html","calendar.html" }, | 829 | { "calendar.html","calendar.html" }, |
830 | { " Local Time"," Locale Zeit" }, | 830 | { " Local Time"," Locale Zeit" }, |
831 | { "Unknown Name","Unbekannter Name" }, | 831 | { "Unknown Name","Unbekannter Name" }, |
832 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 832 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
833 | { "Beam via IR!","Beam via IR!" }, | 833 | { "Beam via IR!","Beam via IR!" }, |
834 | { "Next Month","Nächster Monat" }, | 834 | { "Next Month","Nächster Monat" }, |
835 | { "Prio","Prio" }, | 835 | { "Prio","Prio" }, |
836 | { "Reparent Todo","Mache Sub-Todo" }, | 836 | { "Reparent Todo","Mache Sub-Todo" }, |
837 | { "tomorrow","morgen" }, | 837 | { "tomorrow","morgen" }, |
838 | { "today","heute" }, | 838 | { "today","heute" }, |
839 | { "yesterday","gestern" }, | 839 | { "yesterday","gestern" }, |
840 | { "Ok","Ok" }, | 840 | { "Ok","Ok" }, |
841 | { "Ok+Agenda","Ok+Agenda" }, | 841 | { "Ok+Agenda","Ok+Agenda" }, |
842 | { "Email","Email" }, | 842 | { "Email","Email" }, |
843 | { "RSVP","RSVP" }, | 843 | { "RSVP","RSVP" }, |
844 | { "Email:","Email:" }, | 844 | { "Email:","Email:" }, |
845 | { "Appointment Time ","Termin Zeit " }, | 845 | { "Appointment Time ","Termin Zeit " }, |
846 | { "2","2" }, | 846 | { "2","2" }, |
847 | { "3","3" }, | 847 | { "3","3" }, |
848 | { "4","4" }, | 848 | { "4","4" }, |
849 | { " 0 %"," 0 %" }, | 849 | { " 0 %"," 0 %" }, |
850 | { " 20 %"," 20 %" }, | 850 | { " 20 %"," 20 %" }, |
851 | { " 40 %"," 40 %" }, | 851 | { " 40 %"," 40 %" }, |
852 | { " 60 %"," 60 %" }, | 852 | { " 60 %"," 60 %" }, |
853 | { " 80 %"," 80 %" }, | 853 | { " 80 %"," 80 %" }, |
854 | { "100 %","100 %" }, | 854 | { "100 %","100 %" }, |
855 | { "Filter","Filter" }, | 855 | { "Filter","Filter" }, |
856 | { "Configure","Konfiguriere" }, | 856 | { "Configure","Konfiguriere" }, |
857 | { "What's Next","What's Next" }, | 857 | { "What's Next","What's Next" }, |
858 | { "Complete calendar...","Kompletten Kalender..." }, | 858 | { "Complete calendar...","Kompletten Kalender..." }, |
859 | { "Filtered calendar...","Gefilterten Kalender..." }, | 859 | { "Filtered calendar...","Gefilterten Kalender..." }, |
860 | { "Export to phone","Exportiere zum Handy" }, | 860 | { "Export to phone","Exportiere zum Handy" }, |
861 | { "Beam receive enabled","Beam Empfang an" }, | 861 | { "Beam receive enabled","Beam Empfang an" }, |
862 | { "What's new?","Was ist neu?" }, | 862 | { "What's new?","Was ist neu?" }, |
863 | { "FAQ...","FAQ..." }, | 863 | { "FAQ...","FAQ..." }, |
864 | { "Licence...","Licence..." }, | 864 | { "Licence...","Licence..." }, |
865 | { "What's This?","What's This?" }, | 865 | { "What's This?","What's This?" }, |
866 | { "&Edit...","&Editiere..." }, | 866 | { "&Edit...","&Editiere..." }, |
867 | { "Oktober","Oktober" }, | 867 | { "Oktober","Oktober" }, |
868 | { "Title","Titel" }, | 868 | { "Title","Titel" }, |
869 | { "%1 %","%1 %" }, | 869 | { "%1 %","%1 %" }, |
870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
871 | { "Import!","Importiere!" }, | 871 | { "Import!","Importiere!" }, |
872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
873 | { "Export to phone options","Export ans Handy Optionen" }, | 873 | { "Export to phone options","Export ans Handy Optionen" }, |
874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
875 | { "I/O device: ","I/O device: " }, | 875 | { "I/O device: ","I/O device: " }, |
876 | { "Connection: ","Connection: " }, | 876 | { "Connection: ","Connection: " }, |
877 | { "Model(opt.): ","Model(opt.): " }, | 877 | { "Model(opt.): ","Model(opt.): " }, |
878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, | 880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, |
881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
882 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 882 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
883 | { "Writing to phone...","Sende Daten ans Handy..." }, | 883 | { "Writing to phone...","Sende Daten ans Handy..." }, |
884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
885 | { "Retry","Nochmal versuchen" }, | 885 | { "Retry","Nochmal versuchen" }, |
886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
890 | { "Preferences","Vorlieben" }, | 890 | { "Preferences","Vorlieben" }, |
891 | { "Global","Global" }, | 891 | { "Global","Global" }, |
892 | { "Phone","Phone" }, | 892 | { "Phone","Phone" }, |
893 | { "SMS","SMS" }, | 893 | { "SMS","SMS" }, |
894 | { "Fax","Fax" }, | 894 | { "Fax","Fax" }, |
895 | { "Pager","Pager" }, | 895 | { "Pager","Pager" }, |
896 | { "SIP","SIP" }, | 896 | { "SIP","SIP" }, |
897 | { "Italian","Italienisch" }, | 897 | { "Italian","Italienisch" }, |
898 | { "24:00","24:00" }, | 898 | { "24:00","24:00" }, |
899 | { "12:00am","12:00am" }, | 899 | { "12:00am","12:00am" }, |
900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
906 | { "Used Mail Client","Benutzter Mail Client" }, | 906 | { "Used Mail Client","Benutzter Mail Client" }, |
907 | { "Channel:","Channel:" }, | 907 | { "Channel:","Channel:" }, |
908 | { "Message:","Message:" }, | 908 | { "Message:","Message:" }, |
909 | { "Parameters:","Parameter:" }, | 909 | { "Parameters:","Parameter:" }, |
910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
911 | { "extra Message:","extra Message:" }, | 911 | { "extra Message:","extra Message:" }, |
912 | { "extra Parameters:","extra Parameter:" }, | 912 | { "extra Parameters:","extra Parameter:" }, |
913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
914 | { "External Apps.","Externe Appl." }, | 914 | { "External Apps.","Externe Appl." }, |
915 | { "24 hours","24 Std." }, | 915 | { "24 hours","24 Std." }, |
916 | { "3 hours","3 Std." }, | 916 | { "3 hours","3 Std." }, |
917 | { "1 hour","1 Std." }, | 917 | { "1 hour","1 Std." }, |
918 | { "15 minutes","15 Min." }, | 918 | { "15 minutes","15 Min." }, |
919 | { "5 minutes","5 Min." }, | 919 | { "5 minutes","5 Min." }, |
920 | { "1 minute","1 Min." }, | 920 | { "1 minute","1 Min." }, |
921 | { "23","23" }, | 921 | { "23","23" }, |
922 | { "Mon 15","Mon 15" }, | 922 | { "Mon 15","Mon 15" }, |
923 | { "Configure KO","Konfiguriere KO" }, | 923 | { "Configure KO","Konfiguriere KO" }, |
924 | { "Event text","Termin Text" }, | 924 | { "Event text","Termin Text" }, |
925 | { "ToDo","Todo" }, | 925 | { "ToDo","Todo" }, |
926 | { "Today","Heute" }, | 926 | { "Today","Heute" }, |
927 | { "What's Next View","What's Next Ansicht" }, | 927 | { "What's Next View","What's Next Ansicht" }, |
928 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 928 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
929 | { "Alarm","Alarm" }, | 929 | { "Alarm","Alarm" }, |
930 | { "Used %1 Client","Benutzter %1 Client" }, | 930 | { "Used %1 Client","Benutzter %1 Client" }, |
931 | { "No email client installed","Kein Email Klient installiert" }, | 931 | { "No email client installed","Kein Email Klient installiert" }, |
932 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 932 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
933 | { "OM/Pi email client","OM/Pi Email Klient" }, | 933 | { "OM/Pi email client","OM/Pi Email Klient" }, |
934 | { "Include in multiple ","Beziehe in multiple " }, | 934 | { "Include in multiple ","Beziehe in multiple " }, |
935 | { "calendar ","Kalender " }, | 935 | { "calendar ","Kalender " }, |
936 | { "addressbook ","Adressbuch " }, | 936 | { "addressbook ","Adressbuch " }, |
937 | { "pwmanager","PWmanager" }, | 937 | { "pwmanager","PWmanager" }, |
938 | { " sync"," Sync ein" }, | 938 | { " sync"," Sync ein" }, |
939 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 939 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
940 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 940 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
941 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 941 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
942 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 942 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
943 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 943 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
944 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 944 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
945 | { "Help...","Hilfe..." }, | 945 | { "Help...","Hilfe..." }, |
946 | { "Local file Cal:","Lokale Datei Kal:" }, | 946 | { "Local file Cal:","Lokale Datei Kal:" }, |
947 | { "Local file ABook:","Lokale Datei ABuch:" }, | 947 | { "Local file ABook:","Lokale Datei ABuch:" }, |
948 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 948 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
949 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 949 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
950 | { "Calendar:","Kalender:" }, | 950 | { "Calendar:","Kalender:" }, |
951 | { "AddressBook:","AdressBuch:" }, | 951 | { "AddressBook:","AdressBuch:" }, |
952 | { "PWManager:","PWManager:" }, | 952 | { "PWManager:","PWManager:" }, |
953 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 953 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
954 | { "ssh/scp","ssh/scp" }, | 954 | { "ssh/scp","ssh/scp" }, |
955 | { "ftp","ftp" }, | 955 | { "ftp","ftp" }, |
956 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 956 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
957 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 957 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
958 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 958 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
959 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 959 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
960 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 960 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
961 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 961 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
962 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 962 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
963 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 963 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
964 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 964 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
965 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | 965 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, |
966 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 966 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
967 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 967 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
968 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 968 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
969 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 969 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
970 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 970 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
971 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, | 971 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
972 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 972 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
973 | { "Multiple profiles","Multi-Sync Profile" }, | 973 | { "Multiple profiles","Multi-Sync Profile" }, |
974 | { "Device: ","Gerät: " }, | 974 | { "Device: ","Gerät: " }, |
975 | { "Multiple sync started.","Multi-Sync gestartet." }, | 975 | { "Multiple sync started.","Multi-Sync gestartet." }, |
976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
977 | { "Turn filter on","Schalte Filter an" }, | 977 | { "Turn filter on","Schalte Filter an" }, |
978 | { "Turn filter off","Schalte Filter aus" }, | 978 | { "Turn filter off","Schalte Filter aus" }, |
979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
993 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, | 993 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
994 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, | 994 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
996 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, | 996 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
998 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, | 998 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1000 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, | 1000 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
1001 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 1001 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1003 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, | 1003 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
1004 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, | 1004 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
1005 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, | 1005 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1011 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, | 1011 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1012 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, | 1012 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1015 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, | 1015 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1017 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, | 1017 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1018 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1018 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, | 1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, | 1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, |
1021 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1021 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1023 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1023 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1024 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1024 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1025 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1025 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1026 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1026 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1027 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1027 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1028 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1028 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1030 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1030 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1035 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1035 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1036 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1036 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1042 | { "From: ","Von: " }, | 1042 | { "From: ","Von: " }, |
1043 | { "Remove sync info","Entferne Sync Info" }, | 1043 | { "Remove sync info","Entferne Sync Info" }, |
1044 | { "For all profiles","Für alle Profile" }, | 1044 | { "For all profiles","Für alle Profile" }, |
1045 | { "Hide not Running","Verstecke nicht Laufende" }, | 1045 | { "Hide not Running","Verstecke nicht Laufende" }, |
1046 | { "ME","ME" }, | 1046 | { "ME","ME" }, |
1047 | { "Toolbar","Toolbar" }, | 1047 | { "Toolbar","Toolbar" }, |
1048 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1048 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1049 | { "Undo Delete","Löschen rückgängig machen" }, | 1049 | { "Undo Delete","Löschen rückgängig machen" }, |
1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1052 | { "Januar","Januar" }, | 1052 | { "Januar","Januar" }, |
1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1054 | { "No Filter","Kein Filter" }, | 1054 | { "No Filter","Kein Filter" }, |
1055 | { "Multiple Sync options","Multi Sync Optionen" }, | 1055 | { "Multiple Sync options","Multi Sync Optionen" }, |
1056 | { "Sync algo options","Sync Ablauf Optionen" }, | 1056 | { "Sync algo options","Sync Ablauf Optionen" }, |
1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1060 | { "Write back options","Optionen zum Zurückschreiben" }, | 1060 | { "Write back options","Optionen zum Zurückschreiben" }, |
1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1066 | { "Time period","Zeitspanne" }, | 1066 | { "Time period","Zeitspanne" }, |
1067 | { "From ","Von " }, | 1067 | { "From ","Von " }, |
1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1069 | { " weeks in the future "," Wochen in der Zukunft " }, | 1069 | { " weeks in the future "," Wochen in der Zukunft " }, |
1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1071 | { "Local temp file:","Lokale temp Datei:" }, | 1071 | { "Local temp file:","Lokale temp Datei:" }, |
1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1074 | { "Language","Sprache" }, | 1074 | { "Language","Sprache" }, |
1075 | { "Time Format","Zeit Format" }, | 1075 | { "Time Format","Zeit Format" }, |
1076 | { "Time Zone","Zeit Zone" }, | 1076 | { "Time Zone","Zeit Zone" }, |
1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1078 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, | 1078 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1081 | { "Save settings","Speichere Einstellungen" }, | 1081 | { "Save settings","Speichere Einstellungen" }, |
1082 | { "Save standard","Speichere Standard" }, | 1082 | { "Save standard","Speichere Standard" }, |
1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1085 | { "Data storage path","Daten Speicherpfad" }, | 1085 | { "Data storage path","Daten Speicherpfad" }, |
1086 | { "Language","Sprache" }, | 1086 | { "Language","Sprache" }, |
1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1089 | { "Show events, that are done","Zeige abgelaufene Termine" }, | 1089 | { "Show events that are done","Zeige abgelaufene Termine" }, |
1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1092 | { "KO/Pi","KO/Pi" }, | 1092 | { "KO/Pi","KO/Pi" }, |
1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1095 | { "Sound.Al.: ","Sound.Al.: " }, | 1095 | { "Sound.Al.: ","Sound.Al.: " }, |
1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1097 | { "Restore","Wiederherstellen" }, | 1097 | { "Restore","Wiederherstellen" }, |
1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1099 | { "% completed","% erledigt" }, | 1099 | { "% completed","% erledigt" }, |
1100 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1100 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1101 | { "Set complete","Setze auf erledigt" }, | 1101 | { "Set complete","Setze auf erledigt" }, |
1102 | { "(cancelled)","(gecancelt)" }, | 1102 | { "(cancelled)","(gecancelt)" }, |
1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1104 | { " Local time "," Locale Zeit " }, | 1104 | { " Local time "," Locale Zeit " }, |
1105 | { "Form2","Form2" }, | 1105 | { "Form2","Form2" }, |
1106 | { "Filter enabled","Filter angeschaltet" }, | 1106 | { "Filter enabled","Filter angeschaltet" }, |
1107 | { "Edit Filters","Ändere Filter" }, | 1107 | { "Edit Filters","Ändere Filter" }, |
1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1109 | { "Agenda","Agenda" }, | 1109 | { "Agenda","Agenda" }, |
1110 | { " ("," (" }, | 1110 | { " ("," (" }, |
1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1112 | { "Print","Print" }, | 1112 | { "Print","Print" }, |
1113 | { "&Setup Printer...","Drucker &Setup..." }, | 1113 | { "&Setup Printer...","Drucker &Setup..." }, |
1114 | { "View Type","Zeige Typ" }, | 1114 | { "View Type","Zeige Typ" }, |
1115 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1115 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1118 | { "Portrait","Portrait" }, | 1118 | { "Portrait","Portrait" }, |
1119 | { "Landscape","Landschaft" }, | 1119 | { "Landscape","Landschaft" }, |
1120 | { "Print day","Drucke Tag" }, | 1120 | { "Print day","Drucke Tag" }, |
1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1122 | { "Date && Time Range","Datum && Zeitspanne" }, | 1122 | { "Date && Time Range","Datum && Zeitspanne" }, |
1123 | { "&End date:","&Enddatum:" }, | 1123 | { "&End date:","&Enddatum:" }, |
1124 | { "&Start date:","&Startdatum:" }, | 1124 | { "&Start date:","&Startdatum:" }, |
1125 | { "Start &time:","Startzeit:" }, | 1125 | { "Start &time:","Startzeit:" }, |
1126 | { "End ti&me:","Endzeit:" }, | 1126 | { "End ti&me:","Endzeit:" }, |
1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1129 | { "Alt+D","Alt+D" }, | 1129 | { "Alt+D","Alt+D" }, |
1130 | { "&Use colors","Nutze Farben" }, | 1130 | { "&Use colors","Nutze Farben" }, |
1131 | { "Alt+U","Alt+U" }, | 1131 | { "Alt+U","Alt+U" }, |
1132 | { "Print week","Drucke Woche" }, | 1132 | { "Print week","Drucke Woche" }, |
1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1134 | { "Use &colors","Nutze Farben" }, | 1134 | { "Use &colors","Nutze Farben" }, |
1135 | { "Type of View","Typ der Ansicht" }, | 1135 | { "Type of View","Typ der Ansicht" }, |
1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1137 | { "Alt+F","Alt+F" }, | 1137 | { "Alt+F","Alt+F" }, |
1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1139 | { "Alt+T","Alt+T" }, | 1139 | { "Alt+T","Alt+T" }, |
1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1141 | { "Print month","Drucke Monat" }, | 1141 | { "Print month","Drucke Monat" }, |
1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1143 | { "&Start month:","&Startmonat:" }, | 1143 | { "&Start month:","&Startmonat:" }, |
1144 | { "&End month:","&Endmonat:" }, | 1144 | { "&End month:","&Endmonat:" }, |
1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1146 | { "Print todos","Drucke Todos" }, | 1146 | { "Print todos","Drucke Todos" }, |
1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1151 | { "Items to Print","Zu druckende Items" }, | 1151 | { "Items to Print","Zu druckende Items" }, |
1152 | { "&From:","Von:" }, | 1152 | { "&From:","Von:" }, |
1153 | { "&To:","Bis:" }, | 1153 | { "&To:","Bis:" }, |
1154 | { "Print &all todo items","Drucke alle Todo Items" }, | 1154 | { "Print &all todo items","Drucke alle Todo Items" }, |
1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1157 | { "Todo List","Todo Liste" }, | 1157 | { "Todo List","Todo Liste" }, |
1158 | { "&Title:","&Titel:" }, | 1158 | { "&Title:","&Titel:" }, |
1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, | 1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, |
1160 | { "Todo list","Todo Liste" }, | 1160 | { "Todo list","Todo Liste" }, |
1161 | { "&Print...","Drucke..." }, | 1161 | { "&Print...","Drucke..." }, |
1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1163 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1163 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1164 | { "OK","OK" }, | 1164 | { "OK","OK" }, |
1165 | { "FilterEditor","FilterEditor" }, | 1165 | { "FilterEditor","FilterEditor" }, |
1166 | { "Include","Inclusive" }, | 1166 | { "Include","Inclusive" }, |
1167 | { "Exclude","Exclusive" }, | 1167 | { "Exclude","Exclusive" }, |
1168 | { "Edit Selection...","Editiere Auswahl" }, | 1168 | { "Edit Selection...","Editiere Auswahl" }, |
1169 | { "recurring events","wiederholende Termine" }, | 1169 | { "recurring events","wiederholende Termine" }, |
1170 | { "recurr. events","wiederh.Termine" }, | 1170 | { "recurr. events","wiederh.Termine" }, |
1171 | { "completed to-dos","erledigte Todos" }, | 1171 | { "completed to-dos","erledigte Todos" }, |
1172 | { "events","Termine" }, | 1172 | { "events","Termine" }, |
1173 | { "todos","Todos" }, | 1173 | { "todos","Todos" }, |
1174 | { "journals","Journale" }, | 1174 | { "journals","Journale" }, |
1175 | { "public","öffentl." }, | 1175 | { "public","öffentl." }, |
1176 | { "private","privat" }, | 1176 | { "private","privat" }, |
1177 | { "confidential","vertraul." }, | 1177 | { "confidential","vertraul." }, |
1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, | 1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, |
1179 | { "Yesterday","Gestern" }, | 1179 | { "Yesterday","Gestern" }, |
1180 | { "Day after tomorrow","Übermorgen" }, | 1180 | { "Day after tomorrow","Übermorgen" }, |
1181 | { "Tomorrow","Morgen" }, | 1181 | { "Tomorrow","Morgen" }, |
1182 | { "Day before yesterday","Vorgestern" }, | 1182 | { "Day before yesterday","Vorgestern" }, |
1183 | { "Size %1","Größe %1" }, | 1183 | { "Size %1","Größe %1" }, |
1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1185 | { " (%1 y.)"," (%1 J.)" }, | 1185 | { " (%1 y.)"," (%1 J.)" }, |
1186 | { "Allday:","Ganztägig:" }, | 1186 | { "Allday:","Ganztägig:" }, |
1187 | { "compl.todos","erled.Todos" }, | 1187 | { "compl.todos","erled.Todos" }, |
1188 | { "Day view","Tagesansicht" }, | 1188 | { "Day view","Tagesansicht" }, |
1189 | { "Next days","Nächste Tage" }, | 1189 | { "Next days","Nächste Tage" }, |
1190 | { "Next week","Nächste Woche" }, | 1190 | { "Next week","Nächste Woche" }, |
1191 | { "Next two weeks","Nächste zwei Wochen" }, | 1191 | { "Next two weeks","Nächste zwei Wochen" }, |
1192 | { "This month","Dieser Monat" }, | 1192 | { "This month","Dieser Monat" }, |
1193 | { "Journal view","Journal" }, | 1193 | { "Journal view","Journal" }, |
1194 | { "Display all opened","Zeige alle geöffnet" }, | 1194 | { "Display all opened","Zeige alle geöffnet" }, |
1195 | { "Display all closed","Zeige alle geschlossen" }, | 1195 | { "Display all closed","Zeige alle geschlossen" }, |
1196 | { "Display all flat","Zeige alle flach" }, | 1196 | { "Display all flat","Zeige alle flach" }, |
1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1200 | { "Select Week","Wähle Woche" }, | 1200 | { "Select Week","Wähle Woche" }, |
1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1202 | { "Set Alarm!","Setze Alarm!" }, | 1202 | { "Set Alarm!","Setze Alarm!" }, |
1203 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, | 1203 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, |
1204 | { " and "," und " }, | 1204 | { " and "," und " }, |
1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1206 | { "Mail to selected","Mail an Ausgewählte" }, | 1206 | { "Mail to selected","Mail an Ausgewählte" }, |
1207 | { "Mail to all","Mail an Alle" }, | 1207 | { "Mail to all","Mail an Alle" }, |
1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1210 | { " on"," am" }, | 1210 | { " on"," am" }, |
1211 | { " completed on "," erledigt am " }, | 1211 | { " completed on "," erledigt am " }, |
1212 | { "Save as Event template","Speichere als Vorlage" }, | 1212 | { "Save as Event template","Speichere als Vorlage" }, |
1213 | { "Load Event template","Lade Termin Vorlage" }, | 1213 | { "Load Event template","Lade Termin Vorlage" }, |
1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1216 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1216 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1217 | { "Parent todo:<br>","Über Todo:<br>" }, | 1217 | { "Parent todo:<br>","Über Todo:<br>" }, |
1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1219 | { " completed"," erledigt" }, | 1219 | { " completed"," erledigt" }, |
1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, | 1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, |
1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1226 | { "Error","Fehler" }, | 1226 | { "Error","Fehler" }, |
1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1229 | { "Warning","Warnung" }, | 1229 | { "Warning","Warnung" }, |
1230 | { "Select week number","Wähle Wochen Nummer" }, | 1230 | { "Select week number","Wähle Wochen Nummer" }, |
1231 | { "Februar","Februar" }, | 1231 | { "Februar","Februar" }, |
1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1233 | { "W","W" }, | 1233 | { "W","W" }, |
1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1235 | { "T: %1","T: %1" }, | 1235 | { "T: %1","T: %1" }, |
1236 | { "Start: ","Start: " }, | 1236 | { "Start: ","Start: " }, |
1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1239 | { "Remote IP address:","Ferne IP Adresse:" }, | 1239 | { "Remote IP address:","Ferne IP Adresse:" }, |
1240 | { "Remote port number:","Ferne Port Nummer:" }, | 1240 | { "Remote port number:","Ferne Port Nummer:" }, |
1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1242 | { "Remote from: ","Fern von: " }, | 1242 | { "Remote from: ","Fern von: " }, |
1243 | { "Local from: ","Lokal von: " }, | 1243 | { "Local from: ","Lokal von: " }, |
1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1246 | { "Write back","Schreibe zurück" }, | 1246 | { "Write back","Schreibe zurück" }, |
1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1249 | { "Received sync request","Sync Anfrage erhalten" }, | 1249 | { "Received sync request","Sync Anfrage erhalten" }, |
1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1253 | { "Sending file...","Sende Datei..." }, | 1253 | { "Sending file...","Sende Datei..." }, |
1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1256 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1256 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1257 | { "Writing file to disk...","Speichere Datei..." }, | 1257 | { "Writing file to disk...","Speichere Datei..." }, |
1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1260 | { "Synchronize!","Synchronisiere!" }, | 1260 | { "Synchronize!","Synchronisiere!" }, |
1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1266 | { "List week view","Listenwochenansicht" }, | 1266 | { "List week view","Listenwochenansicht" }, |
1267 | { "List week","Listenwochenansicht" }, | 1267 | { "List week","Listenwochenansicht" }, |
1268 | { "Next Week","Nächste Woche" }, | 1268 | { "Next Week","Nächste Woche" }, |
1269 | { "Previous Week","Vorherige Woche" }, | 1269 | { "Previous Week","Vorherige Woche" }, |
1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1272 | { "Details","Details" }, | 1272 | { "Details","Details" }, |
1273 | { "Created time","Erstellt Zeit" }, | 1273 | { "Created time","Erstellt Zeit" }, |
1274 | { "Last modified time","Geändert Zeit" }, | 1274 | { "Last modified time","Geändert Zeit" }, |
1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1276 | { "View Options","Anzeige Optionen" }, | 1276 | { "View Options","Anzeige Optionen" }, |
1277 | { "<b>Created: ","<b>Erstellt am: " }, | 1277 | { "<b>Created: ","<b>Erstellt am: " }, |
1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1279 | { "Journal: ","Journal: " }, | 1279 | { "Journal: ","Journal: " }, |
1280 | { "yearly","jährlich" }, | 1280 | { "yearly","jährlich" }, |
1281 | { "(%1) ","%1-" }, | 1281 | { "(%1) ","%1-" }, |
1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1285 | { "Summary/Loc.","Titel/Ort" }, | 1285 | { "Summary/Loc.","Titel/Ort" }, |
1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1287 | { "Week Number","Wochennummer" }, | 1287 | { "Week Number","Wochennummer" }, |
1288 | { "Import","Importiere" }, | 1288 | { "Import","Importiere" }, |
1289 | { "Export","Exportiere" }, | 1289 | { "Export","Exportiere" }, |
1290 | { "Beam","Beame" }, | 1290 | { "Beam","Beame" }, |
1291 | { "Export selected","Exportiere Selektierte" }, | 1291 | { "Export selected","Exportiere Selektierte" }, |
1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1294 | { "Journal/Details...","Journale/Details..." }, | 1294 | { "Journal/Details...","Journale/Details..." }, |
1295 | { "Agenda View","Agenda Ansicht" }, | 1295 | { "Agenda View","Agenda Ansicht" }, |
1296 | { "Show current time","Zeige aktuelle Zeit" }, | 1296 | { "Show current time","Zeige aktuelle Zeit" }, |
1297 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1297 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, | 1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, |
1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1302 | { "%1 days\n","%1 Tagen\n" }, | 1302 | { "%1 days\n","%1 Tagen\n" }, |
1303 | { "1 day\n","1 Tag\n" }, | 1303 | { "1 day\n","1 Tag\n" }, |
1304 | { "%1 hours\n","%1 Stunden\n" }, | 1304 | { "%1 hours\n","%1 Stunden\n" }, |
1305 | { "1 hour\n","1 Stunde\n" }, | 1305 | { "1 hour\n","1 Stunde\n" }, |
1306 | { "%1 minutes\n","%1 Minuten\n" }, | 1306 | { "%1 minutes\n","%1 Minuten\n" }, |
1307 | { "1 minute\n","1 Minute\n" }, | 1307 | { "1 minute\n","1 Minute\n" }, |
1308 | { "Only one toolbar","Nur eine Toolbar" }, | 1308 | { "Only one toolbar","Nur eine Toolbar" }, |
1309 | { "Print","Drucke" }, | 1309 | { "Print","Drucke" }, |
1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, | 1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, |
1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1316 | { "Print unscaled","Drucke unskaliert" }, | 1316 | { "Print unscaled","Drucke unskaliert" }, |
1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1319 | { "Printout Mode","Druck Modus" }, | 1319 | { "Printout Mode","Druck Modus" }, |
1320 | { "Filter menu icon","Filtermenu Icon" }, | 1320 | { "Filter menu icon","Filtermenu Icon" }, |
1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, | 1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, |
1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, | 1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, |
1323 | { "%1d","%1t" }, | 1323 | { "%1d","%1t" }, |
1324 | { "%1h","%1std" }, | 1324 | { "%1h","%1std" }, |
1325 | { "%1min","%1min" }, | 1325 | { "%1min","%1min" }, |
1326 | { "( %1 before )","( %1 vorher )" }, | 1326 | { "( %1 before )","( %1 vorher )" }, |
1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, | 1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1333 | { " on "," am " }, | 1333 | { " on "," am " }, |
1334 | { "On: ","Am: " }, | 1334 | { "On: ","Am: " }, |
1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1337 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1337 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, | 1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, |
1339 | { "Todo is started","Todo ist gestartet" }, | 1339 | { "Todo is started","Todo ist gestartet" }, |
1340 | { "Stop todo","Stoppe Todo" }, | 1340 | { "Stop todo","Stoppe Todo" }, |
1341 | { "Todo is stopped","Todo ist gestoppt" }, | 1341 | { "Todo is stopped","Todo ist gestoppt" }, |
1342 | { "Start todo","Starte Todo" }, | 1342 | { "Start todo","Starte Todo" }, |
1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, | 1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, | 1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, |
1345 | { "Todo has subtodos","Todo hat Untertodos" }, | 1345 | { "Todo has subtodos","Todo hat Untertodos" }, |
1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1347 | { "Colors","Farben" }, | 1347 | { "Colors","Farben" }, |
1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1354 | { "times","Zeiten" }, | 1354 | { "times","Zeiten" }, |
1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, | 1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, |
1356 | { "Backup enabled","Backup angeschaltet" }, | 1356 | { "Backup enabled","Backup angeschaltet" }, |
1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, | 1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, |
1358 | { "Number of Backups:","Anzahl der Backups" }, | 1358 | { "Number of Backups:","Anzahl der Backups" }, |
1359 | { "Make backup every ","Mache ein Backup alle " }, | 1359 | { "Make backup every ","Mache ein Backup alle " }, |
1360 | { " days"," Tage" }, | 1360 | { " days"," Tage" }, |
1361 | { "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, | 1361 | { "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, |
1362 | { "Backup Failed!","Backup Problem!" }, | 1362 | { "Backup Failed!","Backup Problem!" }, |
1363 | { "Try again now","Versuche jetzt nochmal" }, | 1363 | { "Try again now","Versuche jetzt nochmal" }, |
1364 | { "Try again later","Versuche später nochmal" }, | 1364 | { "Try again later","Versuche später nochmal" }, |
1365 | { "Try again tomorrow","Versuche morgen nochmal" }, | 1365 | { "Try again tomorrow","Versuche morgen nochmal" }, |
1366 | { "Disable backup","Schalte Backup ab" }, | 1366 | { "Disable backup","Schalte Backup ab" }, |
1367 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, | 1367 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, |
1368 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, | 1368 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, |
1369 | { "Choose action","Wähle Aktion" }, | 1369 | { "Choose action","Wähle Aktion" }, |
1370 | { "Comment for todo:","Kommentar zum Todo:" }, | 1370 | { "Comment for todo:","Kommentar zum Todo:" }, |
1371 | { "Stop+note","Stop+Notiz" }, | 1371 | { "Stop+note","Stop+Notiz" }, |
1372 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, | ||
1373 | { "","" }, | ||
1374 | { "","" }, | ||
1375 | { "","" }, | ||
1376 | { "","" }, | ||
1377 | { "","" }, | ||
1372 | { "","" }, | 1378 | { "","" }, |
1373 | { "","" }, | 1379 | { "","" }, |
1374 | { "","" }, | 1380 | { "","" }, |
1375 | { "","" }, \ No newline at end of file | 1381 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index cdeeac5..2a2acb1 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1,2125 +1,2127 @@ | |||
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 | Marcus Bains line. | 5 | Marcus Bains line. |
6 | Copyright (c) 2001 Ali Rahimi | 6 | Copyright (c) 2001 Ali Rahimi |
7 | 7 | ||
8 | This program is free software; you can redistribute it and/or modify | 8 | This program is free software; you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by | 9 | it under the terms of the GNU General Public License as published by |
10 | the Free Software Foundation; either version 2 of the License, or | 10 | the Free Software Foundation; either version 2 of the License, or |
11 | (at your option) any later version. | 11 | (at your option) any later version. |
12 | 12 | ||
13 | This program is distributed in the hope that it will be useful, | 13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. | 16 | GNU General Public License for more details. |
17 | 17 | ||
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software | 19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 | 21 | ||
22 | As a special exception, permission is given to link this program | 22 | As a special exception, permission is given to link this program |
23 | with any edition of Qt, and distribute the resulting executable, | 23 | with any edition of Qt, and distribute the resulting executable, |
24 | without including the source code for Qt in the source distribution. | 24 | without including the source code for Qt in the source distribution. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #ifndef _WIN32_ | 27 | #ifndef _WIN32_ |
28 | #define protected public | 28 | #define protected public |
29 | #include <qwidget.h> | 29 | #include <qwidget.h> |
30 | #undef protected | 30 | #undef protected |
31 | #endif | 31 | #endif |
32 | #include <qintdict.h> | 32 | #include <qintdict.h> |
33 | #include <qdatetime.h> | 33 | #include <qdatetime.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | #include <qpopupmenu.h> | 35 | #include <qpopupmenu.h> |
36 | #include <qcursor.h> | 36 | #include <qcursor.h> |
37 | #include <qpainter.h> | 37 | #include <qpainter.h> |
38 | 38 | ||
39 | #include <kdebug.h> | 39 | #include <kdebug.h> |
40 | #include <klocale.h> | 40 | #include <klocale.h> |
41 | #include <kiconloader.h> | 41 | #include <kiconloader.h> |
42 | #include <kglobal.h> | 42 | #include <kglobal.h> |
43 | 43 | ||
44 | #include "koagendaitem.h" | 44 | #include "koagendaitem.h" |
45 | #include "koprefs.h" | 45 | #include "koprefs.h" |
46 | #include "koglobals.h" | 46 | #include "koglobals.h" |
47 | 47 | ||
48 | #include "koagenda.h" | 48 | #include "koagenda.h" |
49 | 49 | ||
50 | #include <libkcal/event.h> | 50 | #include <libkcal/event.h> |
51 | #include <libkcal/todo.h> | 51 | #include <libkcal/todo.h> |
52 | 52 | ||
53 | #ifndef DESKTOP_VERSION | 53 | #ifndef DESKTOP_VERSION |
54 | #include <qpe/qpeapplication.h> | 54 | #include <qpe/qpeapplication.h> |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | //extern bool globalFlagBlockPainting; | 57 | //extern bool globalFlagBlockPainting; |
58 | extern int globalFlagBlockAgenda; | 58 | extern int globalFlagBlockAgenda; |
59 | extern int globalFlagBlockAgendaItemPaint; | 59 | extern int globalFlagBlockAgendaItemPaint; |
60 | extern int globalFlagBlockAgendaItemUpdate; | 60 | extern int globalFlagBlockAgendaItemUpdate; |
61 | extern int globalFlagBlockStartup; | 61 | extern int globalFlagBlockStartup; |
62 | 62 | ||
63 | //////////////////////////////////////////////////////////////////////////// | 63 | //////////////////////////////////////////////////////////////////////////// |
64 | MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) | 64 | MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) |
65 | : QFrame(_agenda->viewport(),name), agenda(_agenda) | 65 | : QFrame(_agenda->viewport(),name), agenda(_agenda) |
66 | { | 66 | { |
67 | setLineWidth(0); | 67 | setLineWidth(0); |
68 | setMargin(0); | 68 | setMargin(0); |
69 | setBackgroundColor(Qt::red); | 69 | setBackgroundColor(Qt::red); |
70 | minutes = new QTimer(this); | 70 | minutes = new QTimer(this); |
71 | connect(minutes, SIGNAL(timeout()), this, SLOT(updateLoc())); | 71 | connect(minutes, SIGNAL(timeout()), this, SLOT(updateLoc())); |
72 | minutes->start(0, true); | 72 | minutes->start(0, true); |
73 | mTimeBox = new QLabel(this); | 73 | mTimeBox = new QLabel(this); |
74 | mTimeBox->setAlignment(Qt::AlignRight | Qt::AlignBottom); | 74 | mTimeBox->setAlignment(Qt::AlignRight | Qt::AlignBottom); |
75 | QPalette pal = mTimeBox->palette(); | 75 | QPalette pal = mTimeBox->palette(); |
76 | pal.setColor(QColorGroup::Foreground, Qt::red); | 76 | pal.setColor(QColorGroup::Foreground, Qt::red); |
77 | mTimeBox->setPalette(pal); | 77 | mTimeBox->setPalette(pal); |
78 | //mTimeBox->setAutoMask(true); | 78 | //mTimeBox->setAutoMask(true); |
79 | 79 | ||
80 | agenda->addChild(mTimeBox); | 80 | agenda->addChild(mTimeBox); |
81 | 81 | ||
82 | oldToday = -1; | 82 | oldToday = -1; |
83 | } | 83 | } |
84 | 84 | ||
85 | MarcusBains::~MarcusBains() | 85 | MarcusBains::~MarcusBains() |
86 | { | 86 | { |
87 | delete minutes; | 87 | delete minutes; |
88 | } | 88 | } |
89 | 89 | ||
90 | int MarcusBains::todayColumn() | 90 | int MarcusBains::todayColumn() |
91 | { | 91 | { |
92 | QDate currentDate = QDate::currentDate(); | 92 | QDate currentDate = QDate::currentDate(); |
93 | 93 | ||
94 | DateList dateList = agenda->dateList(); | 94 | DateList dateList = agenda->dateList(); |
95 | DateList::ConstIterator it; | 95 | DateList::ConstIterator it; |
96 | int col = 0; | 96 | int col = 0; |
97 | for(it = dateList.begin(); it != dateList.end(); ++it) { | 97 | for(it = dateList.begin(); it != dateList.end(); ++it) { |
98 | if((*it) == currentDate) | 98 | if((*it) == currentDate) |
99 | return KOGlobals::self()->reverseLayout() ? | 99 | return KOGlobals::self()->reverseLayout() ? |
100 | agenda->columns() - 1 - col : col; | 100 | agenda->columns() - 1 - col : col; |
101 | ++col; | 101 | ++col; |
102 | } | 102 | } |
103 | 103 | ||
104 | return -1; | 104 | return -1; |
105 | } | 105 | } |
106 | void MarcusBains::updateLoc() | 106 | void MarcusBains::updateLoc() |
107 | { | 107 | { |
108 | updateLocation(); | 108 | updateLocation(); |
109 | } | 109 | } |
110 | void MarcusBains::updateLocation(bool recalculate) | 110 | void MarcusBains::updateLocation(bool recalculate) |
111 | { | 111 | { |
112 | 112 | ||
113 | QTime tim = QTime::currentTime(); | 113 | QTime tim = QTime::currentTime(); |
114 | //qDebug(" MarcusBains::updateLocation %s ", tim.toString().latin1()); | 114 | //qDebug(" MarcusBains::updateLocation %s ", tim.toString().latin1()); |
115 | if((tim.hour() == 0) && (oldTime.hour()==23)) | 115 | if((tim.hour() == 0) && (oldTime.hour()==23)) |
116 | recalculate = true; | 116 | recalculate = true; |
117 | 117 | ||
118 | int mins = tim.hour()*60 + tim.minute(); | 118 | int mins = tim.hour()*60 + tim.minute(); |
119 | int minutesPerCell = 24 * 60 / agenda->rows(); | 119 | int minutesPerCell = 24 * 60 / agenda->rows(); |
120 | int y = mins*agenda->gridSpacingY()/minutesPerCell; | 120 | int y = mins*agenda->gridSpacingY()/minutesPerCell; |
121 | int today = recalculate ? todayColumn() : oldToday; | 121 | int today = recalculate ? todayColumn() : oldToday; |
122 | int x = agenda->gridSpacingX()*today; | 122 | int x = agenda->gridSpacingX()*today; |
123 | bool disabled = !(KOPrefs::instance()->mMarcusBainsEnabled); | 123 | bool disabled = !(KOPrefs::instance()->mMarcusBainsEnabled); |
124 | 124 | ||
125 | oldTime = tim; | 125 | oldTime = tim; |
126 | oldToday = today; | 126 | oldToday = today; |
127 | 127 | ||
128 | if(disabled || (today<0)) { | 128 | if(disabled || (today<0)) { |
129 | hide(); mTimeBox->hide(); | 129 | hide(); mTimeBox->hide(); |
130 | return; | 130 | return; |
131 | } else { | 131 | } else { |
132 | show(); mTimeBox->show(); | 132 | show(); mTimeBox->show(); |
133 | } | 133 | } |
134 | 134 | ||
135 | if(recalculate) | 135 | if(recalculate) |
136 | setFixedSize(agenda->gridSpacingX(),1); | 136 | setFixedSize(agenda->gridSpacingX(),1); |
137 | agenda->moveChild(this, x, y); | 137 | agenda->moveChild(this, x, y); |
138 | raise(); | 138 | raise(); |
139 | 139 | ||
140 | if(recalculate) | 140 | if(recalculate) |
141 | //mTimeBox->setFont(QFont("helvetica",10)); | 141 | //mTimeBox->setFont(QFont("helvetica",10)); |
142 | mTimeBox->setFont(KOPrefs::instance()->mMarcusBainsFont); | 142 | mTimeBox->setFont(KOPrefs::instance()->mMarcusBainsFont); |
143 | 143 | ||
144 | mTimeBox->setText(KGlobal::locale()->formatTime(tim, KOPrefs::instance()->mMarcusBainsShowSeconds)); | 144 | mTimeBox->setText(KGlobal::locale()->formatTime(tim, KOPrefs::instance()->mMarcusBainsShowSeconds)); |
145 | mTimeBox->adjustSize(); | 145 | mTimeBox->adjustSize(); |
146 | // the -2 below is there because there is a bug in this program | 146 | // the -2 below is there because there is a bug in this program |
147 | // somewhere, where the last column of this widget is a few pixels | 147 | // somewhere, where the last column of this widget is a few pixels |
148 | // narrower than the other columns. | 148 | // narrower than the other columns. |
149 | int offs = (today==agenda->columns()-1) ? -4 : 0; | 149 | int offs = (today==agenda->columns()-1) ? -4 : 0; |
150 | agenda->moveChild(mTimeBox, | 150 | agenda->moveChild(mTimeBox, |
151 | x+agenda->gridSpacingX()-mTimeBox->width()+offs-1, | 151 | x+agenda->gridSpacingX()-mTimeBox->width()+offs-1, |
152 | y-mTimeBox->height()); | 152 | y-mTimeBox->height()); |
153 | 153 | ||
154 | mTimeBox->raise(); | 154 | mTimeBox->raise(); |
155 | //mTimeBox->setAutoMask(true); | 155 | //mTimeBox->setAutoMask(true); |
156 | minutes->start(5000,true); | 156 | minutes->start(5000,true); |
157 | } | 157 | } |
158 | 158 | ||
159 | 159 | ||
160 | //////////////////////////////////////////////////////////////////////////// | 160 | //////////////////////////////////////////////////////////////////////////// |
161 | 161 | ||
162 | 162 | ||
163 | /* | 163 | /* |
164 | Create an agenda widget with rows rows and columns columns. | 164 | Create an agenda widget with rows rows and columns columns. |
165 | */ | 165 | */ |
166 | KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, | 166 | KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, |
167 | const char *name,WFlags f) : | 167 | const char *name,WFlags f) : |
168 | QScrollView(parent,name,f) | 168 | QScrollView(parent,name,f) |
169 | { | 169 | { |
170 | 170 | ||
171 | mAllAgendaPopup = 0; | 171 | mAllAgendaPopup = 0; |
172 | mColumns = columns; | 172 | mColumns = columns; |
173 | mRows = rows; | 173 | mRows = rows; |
174 | mGridSpacingY = rowSize; | 174 | mGridSpacingY = rowSize; |
175 | mAllDayMode = false; | 175 | mAllDayMode = false; |
176 | #ifndef DESKTOP_VERSION | 176 | #ifndef DESKTOP_VERSION |
177 | //QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 177 | //QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
178 | #endif | 178 | #endif |
179 | mHolidayMask = 0; | 179 | mHolidayMask = 0; |
180 | init(); | 180 | init(); |
181 | } | 181 | } |
182 | 182 | ||
183 | /* | 183 | /* |
184 | Create an agenda widget with columns columns and one row. This is used for | 184 | Create an agenda widget with columns columns and one row. This is used for |
185 | all-day events. | 185 | all-day events. |
186 | */ | 186 | */ |
187 | KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : | 187 | KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : |
188 | QScrollView(parent,name,f) | 188 | QScrollView(parent,name,f) |
189 | { | 189 | { |
190 | mAllAgendaPopup = 0; | 190 | mAllAgendaPopup = 0; |
191 | blockResize = false; | 191 | blockResize = false; |
192 | mColumns = columns; | 192 | mColumns = columns; |
193 | mRows = 1; | 193 | mRows = 1; |
194 | //qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize); | 194 | //qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize); |
195 | mGridSpacingY = KOPrefs::instance()->mAllDaySize; | 195 | mGridSpacingY = KOPrefs::instance()->mAllDaySize; |
196 | mAllDayMode = true; | 196 | mAllDayMode = true; |
197 | #ifndef DESKTOP_VERSION | 197 | #ifndef DESKTOP_VERSION |
198 | //QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 198 | //QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
199 | #endif | 199 | #endif |
200 | mHolidayMask = 0; | 200 | mHolidayMask = 0; |
201 | init(); | 201 | init(); |
202 | } | 202 | } |
203 | 203 | ||
204 | 204 | ||
205 | KOAgenda::~KOAgenda() | 205 | KOAgenda::~KOAgenda() |
206 | { | 206 | { |
207 | if(mMarcusBains) delete mMarcusBains; | 207 | if(mMarcusBains) delete mMarcusBains; |
208 | 208 | ||
209 | } | 209 | } |
210 | 210 | ||
211 | Incidence *KOAgenda::selectedIncidence() const | 211 | Incidence *KOAgenda::selectedIncidence() const |
212 | { | 212 | { |
213 | return (mSelectedItem ? mSelectedItem->incidence() : 0); | 213 | return (mSelectedItem ? mSelectedItem->incidence() : 0); |
214 | } | 214 | } |
215 | 215 | ||
216 | 216 | ||
217 | QDate KOAgenda::selectedIncidenceDate() const | 217 | QDate KOAgenda::selectedIncidenceDate() const |
218 | { | 218 | { |
219 | return (mSelectedItem ? mSelectedItem->itemDate() : QDate()); | 219 | return (mSelectedItem ? mSelectedItem->itemDate() : QDate()); |
220 | } | 220 | } |
221 | 221 | ||
222 | 222 | ||
223 | void KOAgenda::init() | 223 | void KOAgenda::init() |
224 | { | 224 | { |
225 | mPopupTimer = new QTimer(this); | 225 | mPopupTimer = new QTimer(this); |
226 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); | 226 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); |
227 | 227 | ||
228 | mNewItemPopup = new QPopupMenu( this ); | 228 | mNewItemPopup = new QPopupMenu( this ); |
229 | connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); | 229 | connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); |
230 | QString pathString = ""; | 230 | QString pathString = ""; |
231 | if ( !KOPrefs::instance()->mToolBarMiniIcons ) { | 231 | if ( !KOPrefs::instance()->mToolBarMiniIcons ) { |
232 | if ( QApplication::desktop()->width() < 480 ) | 232 | if ( QApplication::desktop()->width() < 480 ) |
233 | pathString += "icons16/"; | 233 | pathString += "icons16/"; |
234 | } else | 234 | } else |
235 | pathString += "iconsmini/"; | 235 | pathString += "iconsmini/"; |
236 | 236 | ||
237 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); | 237 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); |
238 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); | 238 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); |
239 | mNewItemPopup->insertSeparator ( ); | 239 | mNewItemPopup->insertSeparator ( ); |
240 | mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); | 240 | mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); |
241 | mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); | 241 | mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); |
242 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 ); | 242 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 ); |
243 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); | 243 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); |
244 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 ); | 244 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 ); |
245 | mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); | 245 | mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); |
246 | #ifndef _WIN32_ | 246 | #ifndef _WIN32_ |
247 | int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase | 247 | int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase |
248 | viewport()->setWFlags ( wflags); | 248 | viewport()->setWFlags ( wflags); |
249 | #endif | 249 | #endif |
250 | mGridSpacingX = 80; | 250 | mGridSpacingX = 80; |
251 | mResizeBorderWidth = 8; | 251 | mResizeBorderWidth = 8; |
252 | mScrollBorderWidth = 8; | 252 | mScrollBorderWidth = 8; |
253 | mScrollDelay = 30; | 253 | mScrollDelay = 30; |
254 | mScrollOffset = 10; | 254 | mScrollOffset = 10; |
255 | mPaintPixmap.resize( 20,20); | 255 | mPaintPixmap.resize( 20,20); |
256 | //enableClipper(true); | 256 | //enableClipper(true); |
257 | 257 | ||
258 | // Grab key strokes for keyboard navigation of agenda. Seems to have no | 258 | // Grab key strokes for keyboard navigation of agenda. Seems to have no |
259 | // effect. Has to be fixed. | 259 | // effect. Has to be fixed. |
260 | setFocusPolicy(WheelFocus); | 260 | setFocusPolicy(WheelFocus); |
261 | 261 | ||
262 | connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp())); | 262 | connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp())); |
263 | connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown())); | 263 | connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown())); |
264 | connect(&mResizeTimer,SIGNAL(timeout()),SLOT(finishResize())); | 264 | connect(&mResizeTimer,SIGNAL(timeout()),SLOT(finishResize())); |
265 | 265 | ||
266 | mStartCellX = 0; | 266 | mStartCellX = 0; |
267 | mStartCellY = 0; | 267 | mStartCellY = 0; |
268 | mCurrentCellX = 0; | 268 | mCurrentCellX = 0; |
269 | mCurrentCellY = 0; | 269 | mCurrentCellY = 0; |
270 | 270 | ||
271 | mSelectionCellX = 0; | 271 | mSelectionCellX = 0; |
272 | mSelectionYTop = 0; | 272 | mSelectionYTop = 0; |
273 | mSelectionHeight = 0; | 273 | mSelectionHeight = 0; |
274 | 274 | ||
275 | mOldLowerScrollValue = -1; | 275 | mOldLowerScrollValue = -1; |
276 | mOldUpperScrollValue = -1; | 276 | mOldUpperScrollValue = -1; |
277 | 277 | ||
278 | mClickedItem = 0; | 278 | mClickedItem = 0; |
279 | 279 | ||
280 | mActionItem = 0; | 280 | mActionItem = 0; |
281 | mActionType = NOP; | 281 | mActionType = NOP; |
282 | mItemMoved = false; | 282 | mItemMoved = false; |
283 | 283 | ||
284 | mSelectedItem = 0; | 284 | mSelectedItem = 0; |
285 | 285 | ||
286 | // mItems.setAutoDelete(true); | 286 | // mItems.setAutoDelete(true); |
287 | 287 | ||
288 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); | 288 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); |
289 | 289 | ||
290 | viewport()->update(); | 290 | viewport()->update(); |
291 | 291 | ||
292 | setMinimumSize(30, 1); | 292 | setMinimumSize(30, 1); |
293 | // setMaximumHeight(mGridSpacingY * mRows + 5); | 293 | // setMaximumHeight(mGridSpacingY * mRows + 5); |
294 | 294 | ||
295 | // Disable horizontal scrollbar. This is a hack. The geometry should be | 295 | // Disable horizontal scrollbar. This is a hack. The geometry should be |
296 | // controlled in a way that the contents horizontally always fits. Then it is | 296 | // controlled in a way that the contents horizontally always fits. Then it is |
297 | // not necessary to turn off the scrollbar. | 297 | // not necessary to turn off the scrollbar. |
298 | setHScrollBarMode(AlwaysOff); | 298 | setHScrollBarMode(AlwaysOff); |
299 | if ( ! mAllDayMode ) | 299 | if ( ! mAllDayMode ) |
300 | setVScrollBarMode(AlwaysOn); | 300 | setVScrollBarMode(AlwaysOn); |
301 | else | 301 | else |
302 | setVScrollBarMode(AlwaysOff); | 302 | setVScrollBarMode(AlwaysOff); |
303 | 303 | ||
304 | setStartHour(KOPrefs::instance()->mDayBegins); | 304 | setStartHour(KOPrefs::instance()->mDayBegins); |
305 | 305 | ||
306 | calculateWorkingHours(); | 306 | calculateWorkingHours(); |
307 | 307 | ||
308 | connect(verticalScrollBar(),SIGNAL(valueChanged(int)), | 308 | connect(verticalScrollBar(),SIGNAL(valueChanged(int)), |
309 | SLOT(checkScrollBoundaries(int))); | 309 | SLOT(checkScrollBoundaries(int))); |
310 | 310 | ||
311 | // Create the Marcus Bains line. | 311 | // Create the Marcus Bains line. |
312 | if(mAllDayMode) | 312 | if(mAllDayMode) |
313 | mMarcusBains = 0; | 313 | mMarcusBains = 0; |
314 | else { | 314 | else { |
315 | mMarcusBains = new MarcusBains(this); | 315 | mMarcusBains = new MarcusBains(this); |
316 | addChild(mMarcusBains); | 316 | addChild(mMarcusBains); |
317 | } | 317 | } |
318 | mPopupKind = 0; | 318 | mPopupKind = 0; |
319 | mPopupItem = 0; | 319 | mPopupItem = 0; |
320 | } | 320 | } |
321 | 321 | ||
322 | void KOAgenda::clear() | 322 | void KOAgenda::clear() |
323 | { | 323 | { |
324 | KOAgendaItem *item; | 324 | KOAgendaItem *item; |
325 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 325 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
326 | mUnusedItems.append( item ); | 326 | mUnusedItems.append( item ); |
327 | //item->hide(); | 327 | //item->hide(); |
328 | } | 328 | } |
329 | mItems.clear(); | 329 | mItems.clear(); |
330 | mSelectedItem = 0; | 330 | mSelectedItem = 0; |
331 | clearSelection(); | 331 | clearSelection(); |
332 | } | 332 | } |
333 | 333 | ||
334 | void KOAgenda::clearSelection() | 334 | void KOAgenda::clearSelection() |
335 | { | 335 | { |
336 | mSelectionCellX = 0; | 336 | mSelectionCellX = 0; |
337 | mSelectionYTop = 0; | 337 | mSelectionYTop = 0; |
338 | mSelectionHeight = 0; | 338 | mSelectionHeight = 0; |
339 | } | 339 | } |
340 | 340 | ||
341 | void KOAgenda::marcus_bains() | 341 | void KOAgenda::marcus_bains() |
342 | { | 342 | { |
343 | if(mMarcusBains) mMarcusBains->updateLocation(true); | 343 | if(mMarcusBains) mMarcusBains->updateLocation(true); |
344 | } | 344 | } |
345 | 345 | ||
346 | 346 | ||
347 | void KOAgenda::changeColumns(int columns) | 347 | void KOAgenda::changeColumns(int columns) |
348 | { | 348 | { |
349 | if (columns == 0) { | 349 | if (columns == 0) { |
350 | qDebug("KOAgenda::changeColumns() called with argument 0 "); | 350 | qDebug("KOAgenda::changeColumns() called with argument 0 "); |
351 | return; | 351 | return; |
352 | } | 352 | } |
353 | clear(); | 353 | clear(); |
354 | mColumns = columns; | 354 | mColumns = columns; |
355 | computeSizes(); | 355 | computeSizes(); |
356 | } | 356 | } |
357 | 357 | ||
358 | /* | 358 | /* |
359 | This is the eventFilter function, which gets all events from the KOAgendaItems | 359 | This is the eventFilter function, which gets all events from the KOAgendaItems |
360 | contained in the agenda. It has to handle moving and resizing for all items. | 360 | contained in the agenda. It has to handle moving and resizing for all items. |
361 | */ | 361 | */ |
362 | bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) | 362 | bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) |
363 | { | 363 | { |
364 | // kdDebug() << "KOAgenda::eventFilter" << endl; | 364 | // kdDebug() << "KOAgenda::eventFilter" << endl; |
365 | switch(event->type()) { | 365 | switch(event->type()) { |
366 | case QEvent::MouseButtonPress: | 366 | case QEvent::MouseButtonPress: |
367 | case QEvent::MouseButtonDblClick: | 367 | case QEvent::MouseButtonDblClick: |
368 | case QEvent::MouseButtonRelease: | 368 | case QEvent::MouseButtonRelease: |
369 | case QEvent::MouseMove: | 369 | case QEvent::MouseMove: |
370 | return eventFilter_mouse(object, static_cast<QMouseEvent *>(event)); | 370 | return eventFilter_mouse(object, static_cast<QMouseEvent *>(event)); |
371 | 371 | ||
372 | case (QEvent::Leave): | 372 | case (QEvent::Leave): |
373 | if (!mActionItem) | 373 | if (!mActionItem) |
374 | setCursor(arrowCursor); | 374 | setCursor(arrowCursor); |
375 | return true; | 375 | return true; |
376 | 376 | ||
377 | default: | 377 | default: |
378 | return QScrollView::eventFilter(object,event); | 378 | return QScrollView::eventFilter(object,event); |
379 | } | 379 | } |
380 | } | 380 | } |
381 | void KOAgenda::popupMenu() | 381 | void KOAgenda::popupMenu() |
382 | { | 382 | { |
383 | mPopupTimer->stop(); | 383 | mPopupTimer->stop(); |
384 | if ( mPopupKind == 1 || mPopupKind == 3 ) { | 384 | if ( mPopupKind == 1 || mPopupKind == 3 ) { |
385 | if (mActionItem ) { | 385 | if (mActionItem ) { |
386 | endItemAction(); | 386 | endItemAction(); |
387 | } | 387 | } |
388 | mLeftMouseDown = false; // no more leftMouse computation | 388 | mLeftMouseDown = false; // no more leftMouse computation |
389 | if (mPopupItem) { | 389 | if (mPopupItem) { |
390 | //mClickedItem = mPopupItem; | 390 | //mClickedItem = mPopupItem; |
391 | selectItem(mPopupItem); | 391 | selectItem(mPopupItem); |
392 | if ( mAllAgendaPopup && KOPrefs::instance()->mBlockPopupMenu && mPopupKind == 1 ) | 392 | if ( mAllAgendaPopup && KOPrefs::instance()->mBlockPopupMenu && mPopupKind == 1 ) |
393 | mAllAgendaPopup->installEventFilter( this ); | 393 | mAllAgendaPopup->installEventFilter( this ); |
394 | emit showIncidencePopupSignal(mPopupItem->incidence()); | 394 | emit showIncidencePopupSignal(mPopupItem->incidence()); |
395 | 395 | ||
396 | } | 396 | } |
397 | } else if ( mPopupKind == 2 || mPopupKind == 4 ) { | 397 | } else if ( mPopupKind == 2 || mPopupKind == 4 ) { |
398 | if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action | 398 | if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action |
399 | endSelectAction( false ); // do not emit new event signal | 399 | endSelectAction( false ); // do not emit new event signal |
400 | mLeftMouseDown = false; // no more leftMouse computation | 400 | mLeftMouseDown = false; // no more leftMouse computation |
401 | } | 401 | } |
402 | if ( KOPrefs::instance()->mBlockPopupMenu && mPopupKind == 2 ) | 402 | if ( KOPrefs::instance()->mBlockPopupMenu && mPopupKind == 2 ) |
403 | mNewItemPopup->installEventFilter( this ); | 403 | mNewItemPopup->installEventFilter( this ); |
404 | mNewItemPopup->popup( mPopupPos); | 404 | mNewItemPopup->popup( mPopupPos); |
405 | 405 | ||
406 | } | 406 | } |
407 | mLeftMouseDown = false; | 407 | mLeftMouseDown = false; |
408 | mPopupItem = 0; | 408 | mPopupItem = 0; |
409 | mPopupKind = 0; | 409 | mPopupKind = 0; |
410 | } | 410 | } |
411 | 411 | ||
412 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | 412 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) |
413 | { | 413 | { |
414 | static int startX = 0; | 414 | static int startX = 0; |
415 | static int startY = 0; | 415 | static int startY = 0; |
416 | int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 ); | 416 | int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 ); |
417 | static bool blockMoving = true; | 417 | static bool blockMoving = true; |
418 | 418 | ||
419 | //qDebug("KOAgenda::eventFilter_mous "); | 419 | //qDebug("KOAgenda::eventFilter_mous "); |
420 | if ( object == mNewItemPopup ) { | 420 | if ( object == mNewItemPopup ) { |
421 | //qDebug("mNewItemPopup "); | 421 | //qDebug("mNewItemPopup "); |
422 | if ( me->type() == QEvent::MouseButtonRelease ) { | 422 | if ( me->type() == QEvent::MouseButtonRelease ) { |
423 | mNewItemPopup->removeEventFilter( this ); | 423 | mNewItemPopup->removeEventFilter( this ); |
424 | int dX = me->globalPos().x() - mPopupPos.x();; | 424 | int dX = me->globalPos().x() - mPopupPos.x();; |
425 | if ( dX < 0 ) | 425 | if ( dX < 0 ) |
426 | dX = -dX; | 426 | dX = -dX; |
427 | int dY = me->globalPos().y() - mPopupPos.y(); | 427 | int dY = me->globalPos().y() - mPopupPos.y(); |
428 | if ( dY < 0 ) | 428 | if ( dY < 0 ) |
429 | dY = -dY; | 429 | dY = -dY; |
430 | if ( dX > blockmoveDist || dY > blockmoveDist ) { | 430 | if ( dX > blockmoveDist || dY > blockmoveDist ) { |
431 | mNewItemPopup->hide(); | 431 | mNewItemPopup->hide(); |
432 | } | 432 | } |
433 | } | 433 | } |
434 | return true; | 434 | return true; |
435 | } | 435 | } |
436 | if ( object == mAllAgendaPopup ) { | 436 | if ( object == mAllAgendaPopup ) { |
437 | //qDebug(" mAllAgendaPopup "); | 437 | //qDebug(" mAllAgendaPopup "); |
438 | if ( me->type() == QEvent::MouseButtonRelease ) { | 438 | if ( me->type() == QEvent::MouseButtonRelease ) { |
439 | mAllAgendaPopup->removeEventFilter( this ); | 439 | mAllAgendaPopup->removeEventFilter( this ); |
440 | int dX = me->globalPos().x() - mPopupPos.x();; | 440 | int dX = me->globalPos().x() - mPopupPos.x();; |
441 | if ( dX < 0 ) | 441 | if ( dX < 0 ) |
442 | dX = -dX; | 442 | dX = -dX; |
443 | int dY = me->globalPos().y() - mPopupPos.y(); | 443 | int dY = me->globalPos().y() - mPopupPos.y(); |
444 | if ( dY < 0 ) | 444 | if ( dY < 0 ) |
445 | dY = -dY; | 445 | dY = -dY; |
446 | if ( dX > blockmoveDist || dY > blockmoveDist ) { | 446 | if ( dX > blockmoveDist || dY > blockmoveDist ) { |
447 | mAllAgendaPopup->hide(); | 447 | mAllAgendaPopup->hide(); |
448 | } | 448 | } |
449 | } | 449 | } |
450 | return true; | 450 | return true; |
451 | } | 451 | } |
452 | QPoint viewportPos; | 452 | QPoint viewportPos; |
453 | if (object != viewport()) { | 453 | if (object != viewport()) { |
454 | blockmoveDist = blockmoveDist*2; | 454 | blockmoveDist = blockmoveDist*2; |
455 | viewportPos = ((QWidget *)object)->mapToParent(me->pos()); | 455 | viewportPos = ((QWidget *)object)->mapToParent(me->pos()); |
456 | } else { | 456 | } else { |
457 | viewportPos = me->pos(); | 457 | viewportPos = me->pos(); |
458 | } | 458 | } |
459 | 459 | ||
460 | switch (me->type()) { | 460 | switch (me->type()) { |
461 | case QEvent::MouseButtonPress: | 461 | case QEvent::MouseButtonPress: |
462 | if (me->button() == LeftButton) { | 462 | if (me->button() == LeftButton) { |
463 | mPopupTimer->start( 600 ); | 463 | mPopupTimer->start( 600 ); |
464 | mLeftMouseDown = true; | 464 | mLeftMouseDown = true; |
465 | } | 465 | } |
466 | blockMoving = true; | 466 | blockMoving = true; |
467 | startX = viewportPos.x(); | 467 | startX = viewportPos.x(); |
468 | startY = viewportPos.y(); | 468 | startY = viewportPos.y(); |
469 | mPopupPos = me->globalPos(); | 469 | mPopupPos = me->globalPos(); |
470 | if (object != viewport()) { | 470 | if (object != viewport()) { |
471 | mPopupItem = (KOAgendaItem *)object; | 471 | mPopupItem = (KOAgendaItem *)object; |
472 | mPopupKind = 1; | 472 | mPopupKind = 1; |
473 | if (me->button() == RightButton) { | 473 | if (me->button() == RightButton) { |
474 | mPopupKind = 3; | 474 | mPopupKind = 3; |
475 | popupMenu(); | 475 | popupMenu(); |
476 | } else if (me->button() == LeftButton) { | 476 | } else if (me->button() == LeftButton) { |
477 | mActionItem = (KOAgendaItem *)object; | 477 | mActionItem = (KOAgendaItem *)object; |
478 | if (mActionItem) { | 478 | if (mActionItem) { |
479 | emit signalClearSelection(); | 479 | emit signalClearSelection(); |
480 | slotClearSelection(); | 480 | slotClearSelection(); |
481 | selectItem(mActionItem); | 481 | selectItem(mActionItem); |
482 | Incidence *incidence = mActionItem->incidence(); | 482 | Incidence *incidence = mActionItem->incidence(); |
483 | if ( incidence->isReadOnly() /*|| incidence->recurrence()->doesRecur() */) { | 483 | if ( incidence->isReadOnly() /*|| incidence->recurrence()->doesRecur() */) { |
484 | mActionItem = 0; | 484 | mActionItem = 0; |
485 | } else { | 485 | } else { |
486 | startItemAction(viewportPos); | 486 | startItemAction(viewportPos); |
487 | } | 487 | } |
488 | } | 488 | } |
489 | } | 489 | } |
490 | } else { // ---------- viewport() | 490 | } else { // ---------- viewport() |
491 | mPopupItem = 0; | 491 | mPopupItem = 0; |
492 | mPopupKind = 2; | 492 | mPopupKind = 2; |
493 | selectItem(0); | 493 | selectItem(0); |
494 | mActionItem = 0; | 494 | mActionItem = 0; |
495 | if (me->button() == RightButton) { | 495 | if (me->button() == RightButton) { |
496 | int x,y; | 496 | int x,y; |
497 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 497 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
498 | int gx,gy; | 498 | int gx,gy; |
499 | contentsToGrid(x,y,gx,gy); | 499 | contentsToGrid(x,y,gx,gy); |
500 | mCurrentCellX = gx; | 500 | mCurrentCellX = gx; |
501 | mCurrentCellY = gy; | 501 | mCurrentCellY = gy; |
502 | mStartCellX = gx; | 502 | mStartCellX = gx; |
503 | mStartCellY = gy; | 503 | mStartCellY = gy; |
504 | mPopupKind = 4; | 504 | mPopupKind = 4; |
505 | popupMenu(); | 505 | popupMenu(); |
506 | } else if (me->button() == LeftButton) { | 506 | } else if (me->button() == LeftButton) { |
507 | setCursor(arrowCursor); | 507 | setCursor(arrowCursor); |
508 | startSelectAction(viewportPos); | 508 | startSelectAction(viewportPos); |
509 | } | 509 | } |
510 | } | 510 | } |
511 | break; | 511 | break; |
512 | 512 | ||
513 | case QEvent::MouseButtonRelease: | 513 | case QEvent::MouseButtonRelease: |
514 | if (me->button() == LeftButton ) { | 514 | if (me->button() == LeftButton ) { |
515 | mPopupTimer->stop(); | 515 | mPopupTimer->stop(); |
516 | } | 516 | } |
517 | if (object != viewport()) { | 517 | if (object != viewport()) { |
518 | if (me->button() == LeftButton && mLeftMouseDown) { | 518 | if (me->button() == LeftButton && mLeftMouseDown) { |
519 | if (mActionItem) { | 519 | if (mActionItem) { |
520 | QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos)); | 520 | QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos)); |
521 | //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 ); | 521 | //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 ); |
522 | if ( mActionType == MOVE && (clipperPos.y() > visibleHeight()-2 ||clipperPos.y() < 0 ) ) { | 522 | if ( mActionType == MOVE && (clipperPos.y() > visibleHeight()-2 ||clipperPos.y() < 0 ) ) { |
523 | mScrollUpTimer.stop(); | 523 | mScrollUpTimer.stop(); |
524 | mScrollDownTimer.stop(); | 524 | mScrollDownTimer.stop(); |
525 | mActionItem->resetMove(); | 525 | mActionItem->resetMove(); |
526 | placeSubCells( mActionItem ); | 526 | placeSubCells( mActionItem ); |
527 | // emit startDragSignal( mActionItem->incidence() ); | 527 | // emit startDragSignal( mActionItem->incidence() ); |
528 | setCursor( arrowCursor ); | 528 | setCursor( arrowCursor ); |
529 | mActionItem = 0; | 529 | mActionItem = 0; |
530 | mActionType = NOP; | 530 | mActionType = NOP; |
531 | mItemMoved = 0; | 531 | mItemMoved = 0; |
532 | mLeftMouseDown = false; | 532 | mLeftMouseDown = false; |
533 | return true; | 533 | return true; |
534 | } | 534 | } |
535 | endItemAction(); | 535 | endItemAction(); |
536 | } | 536 | } |
537 | } | 537 | } |
538 | 538 | ||
539 | } else { // ---------- viewport() | 539 | } else { // ---------- viewport() |
540 | if (me->button() == LeftButton && mLeftMouseDown ) { //left click | 540 | if (me->button() == LeftButton && mLeftMouseDown ) { //left click |
541 | endSelectAction( true ); // emit new event signal | 541 | endSelectAction( true ); // emit new event signal |
542 | } | 542 | } |
543 | } | 543 | } |
544 | if (me->button() == LeftButton) | 544 | if (me->button() == LeftButton) |
545 | mLeftMouseDown = false; | 545 | mLeftMouseDown = false; |
546 | 546 | ||
547 | break; | 547 | break; |
548 | 548 | ||
549 | case QEvent::MouseMove: | 549 | case QEvent::MouseMove: |
550 | //qDebug("mm "); | 550 | //qDebug("mm "); |
551 | if ( !mLeftMouseDown ) | 551 | if ( !mLeftMouseDown ) |
552 | return false; | 552 | return false; |
553 | if ( blockMoving ) { | 553 | if ( blockMoving ) { |
554 | int dX, dY; | 554 | int dX, dY; |
555 | dX = startX - viewportPos.x(); | 555 | dX = startX - viewportPos.x(); |
556 | if ( dX < 0 ) | 556 | if ( dX < 0 ) |
557 | dX = -dX; | 557 | dX = -dX; |
558 | dY = viewportPos.y() - startY; | 558 | dY = viewportPos.y() - startY; |
559 | if ( dY < 0 ) | 559 | if ( dY < 0 ) |
560 | dY = -dY; | 560 | dY = -dY; |
561 | //qDebug("%d %d %d ", dX, dY , blockmoveDist ); | 561 | //qDebug("%d %d %d ", dX, dY , blockmoveDist ); |
562 | if ( dX > blockmoveDist || dY > blockmoveDist ) { | 562 | if ( dX > blockmoveDist || dY > blockmoveDist ) { |
563 | blockMoving = false; | 563 | blockMoving = false; |
564 | } | 564 | } |
565 | } | 565 | } |
566 | if ( ! blockMoving ) | 566 | if ( ! blockMoving ) |
567 | mPopupTimer->stop(); | 567 | mPopupTimer->stop(); |
568 | if (object != viewport()) { | 568 | if (object != viewport()) { |
569 | KOAgendaItem *moveItem = (KOAgendaItem *)object; | 569 | KOAgendaItem *moveItem = (KOAgendaItem *)object; |
570 | if (!moveItem->incidence()->isReadOnly() ) { | 570 | if (!moveItem->incidence()->isReadOnly() ) { |
571 | if (!mActionItem) | 571 | if (!mActionItem) |
572 | setNoActionCursor(moveItem,viewportPos); | 572 | setNoActionCursor(moveItem,viewportPos); |
573 | else { | 573 | else { |
574 | if ( !blockMoving ) | 574 | if ( !blockMoving ) |
575 | performItemAction(viewportPos); | 575 | performItemAction(viewportPos); |
576 | } | 576 | } |
577 | } | 577 | } |
578 | } else { // ---------- viewport() | 578 | } else { // ---------- viewport() |
579 | mPopupPos = viewport()->mapToGlobal( me->pos() ); | 579 | mPopupPos = viewport()->mapToGlobal( me->pos() ); |
580 | if ( mActionType == SELECT ) { | 580 | if ( mActionType == SELECT ) { |
581 | performSelectAction( viewportPos ); | 581 | performSelectAction( viewportPos ); |
582 | } | 582 | } |
583 | } | 583 | } |
584 | break; | 584 | break; |
585 | 585 | ||
586 | case QEvent::MouseButtonDblClick: | 586 | case QEvent::MouseButtonDblClick: |
587 | mPopupTimer->stop(); | 587 | mPopupTimer->stop(); |
588 | if (object == viewport()) { | 588 | if (object == viewport()) { |
589 | selectItem(0); | 589 | selectItem(0); |
590 | int x,y; | 590 | int x,y; |
591 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 591 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
592 | int gx,gy; | 592 | int gx,gy; |
593 | contentsToGrid(x,y,gx,gy); | 593 | contentsToGrid(x,y,gx,gy); |
594 | emit newEventSignal(gx,gy); | 594 | emit newEventSignal(gx,gy); |
595 | } else { | 595 | } else { |
596 | KOAgendaItem *doubleClickedItem = (KOAgendaItem *)object; | 596 | KOAgendaItem *doubleClickedItem = (KOAgendaItem *)object; |
597 | selectItem(doubleClickedItem); | 597 | selectItem(doubleClickedItem); |
598 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 598 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
599 | emit editIncidenceSignal(doubleClickedItem->incidence()); | 599 | emit editIncidenceSignal(doubleClickedItem->incidence()); |
600 | else | 600 | else |
601 | emit showIncidenceSignal(doubleClickedItem->incidence()); | 601 | emit showIncidenceSignal(doubleClickedItem->incidence()); |
602 | } | 602 | } |
603 | break; | 603 | break; |
604 | 604 | ||
605 | default: | 605 | default: |
606 | break; | 606 | break; |
607 | } | 607 | } |
608 | return true; | 608 | return true; |
609 | 609 | ||
610 | } | 610 | } |
611 | 611 | ||
612 | void KOAgenda::newItem( int item ) | 612 | void KOAgenda::newItem( int item ) |
613 | { | 613 | { |
614 | if ( item == 1 ) { //new event | 614 | if ( item == 1 ) { //new event |
615 | newEventSignal(mStartCellX ,mStartCellY ); | 615 | newEventSignal(mStartCellX ,mStartCellY ); |
616 | } else | 616 | } else |
617 | if ( item == 2 ) { //new event | 617 | if ( item == 2 ) { //new event |
618 | newTodoSignal(mStartCellX ,mStartCellY ); | 618 | newTodoSignal(mStartCellX ,mStartCellY ); |
619 | } else | 619 | } else |
620 | { | 620 | { |
621 | emit showDateView( item, mStartCellX ); | 621 | emit showDateView( item, mStartCellX ); |
622 | // 3Day view | 622 | // 3Day view |
623 | // 4Week view | 623 | // 4Week view |
624 | // 5Month view | 624 | // 5Month view |
625 | // 6Journal view | 625 | // 6Journal view |
626 | } | 626 | } |
627 | } | 627 | } |
628 | void KOAgenda::slotClearSelection() | 628 | void KOAgenda::slotClearSelection() |
629 | { | 629 | { |
630 | if (mSelectionHeight) { | 630 | if (mSelectionHeight) { |
631 | int selectionX = mSelectionCellX * mGridSpacingX; | 631 | int selectionX = mSelectionCellX * mGridSpacingX; |
632 | int top = mSelectionYTop - 2 *mGridSpacingY; | 632 | int top = mSelectionYTop - 2 *mGridSpacingY; |
633 | int hei = mSelectionHeight + 4 *mGridSpacingY; | 633 | int hei = mSelectionHeight + 4 *mGridSpacingY; |
634 | clearSelection(); | 634 | clearSelection(); |
635 | repaintContents( selectionX, top, | 635 | repaintContents( selectionX, top, |
636 | mGridSpacingX, hei ,false ); | 636 | mGridSpacingX, hei ,false ); |
637 | } | 637 | } |
638 | 638 | ||
639 | } | 639 | } |
640 | void KOAgenda::startSelectAction(QPoint viewportPos) | 640 | void KOAgenda::startSelectAction(QPoint viewportPos) |
641 | { | 641 | { |
642 | 642 | ||
643 | emit signalClearSelection(); | 643 | emit signalClearSelection(); |
644 | slotClearSelection(); | 644 | slotClearSelection(); |
645 | 645 | ||
646 | mActionType = SELECT; | 646 | mActionType = SELECT; |
647 | 647 | ||
648 | int x,y; | 648 | int x,y; |
649 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 649 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
650 | int gx,gy; | 650 | int gx,gy; |
651 | contentsToGrid(x,y,gx,gy); | 651 | contentsToGrid(x,y,gx,gy); |
652 | 652 | ||
653 | mStartCellX = gx; | 653 | mStartCellX = gx; |
654 | mStartCellY = gy; | 654 | mStartCellY = gy; |
655 | mCurrentCellX = gx; | 655 | mCurrentCellX = gx; |
656 | mCurrentCellY = gy; | 656 | mCurrentCellY = gy; |
657 | 657 | ||
658 | // Store new selection | 658 | // Store new selection |
659 | mSelectionCellX = gx; | 659 | mSelectionCellX = gx; |
660 | mSelectionYTop = gy * mGridSpacingY; | 660 | mSelectionYTop = gy * mGridSpacingY; |
661 | mSelectionHeight = mGridSpacingY; | 661 | mSelectionHeight = mGridSpacingY; |
662 | 662 | ||
663 | // Paint new selection | 663 | // Paint new selection |
664 | repaintContents( mSelectionCellX * mGridSpacingX+1, mSelectionYTop, | 664 | repaintContents( mSelectionCellX * mGridSpacingX+1, mSelectionYTop, |
665 | mGridSpacingX-1, mSelectionHeight ); | 665 | mGridSpacingX-1, mSelectionHeight ); |
666 | } | 666 | } |
667 | 667 | ||
668 | void KOAgenda::performSelectAction(QPoint viewportPos) | 668 | void KOAgenda::performSelectAction(QPoint viewportPos) |
669 | { | 669 | { |
670 | int x,y; | 670 | int x,y; |
671 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 671 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
672 | int gx,gy; | 672 | int gx,gy; |
673 | contentsToGrid(x,y,gx,gy); | 673 | contentsToGrid(x,y,gx,gy); |
674 | 674 | ||
675 | QPoint clipperPos = clipper()-> | 675 | QPoint clipperPos = clipper()-> |
676 | mapFromGlobal(viewport()->mapToGlobal(viewportPos)); | 676 | mapFromGlobal(viewport()->mapToGlobal(viewportPos)); |
677 | 677 | ||
678 | // Scroll if cursor was moved to upper or lower end of agenda. | 678 | // Scroll if cursor was moved to upper or lower end of agenda. |
679 | if (clipperPos.y() < mScrollBorderWidth) { | 679 | if (clipperPos.y() < mScrollBorderWidth) { |
680 | mScrollUpTimer.start(mScrollDelay); | 680 | mScrollUpTimer.start(mScrollDelay); |
681 | } else if (visibleHeight() - clipperPos.y() < | 681 | } else if (visibleHeight() - clipperPos.y() < |
682 | mScrollBorderWidth) { | 682 | mScrollBorderWidth) { |
683 | mScrollDownTimer.start(mScrollDelay); | 683 | mScrollDownTimer.start(mScrollDelay); |
684 | } else { | 684 | } else { |
685 | mScrollUpTimer.stop(); | 685 | mScrollUpTimer.stop(); |
686 | mScrollDownTimer.stop(); | 686 | mScrollDownTimer.stop(); |
687 | } | 687 | } |
688 | 688 | ||
689 | if ( gy > mCurrentCellY ) { | 689 | if ( gy > mCurrentCellY ) { |
690 | mSelectionHeight = ( gy + 1 ) * mGridSpacingY - mSelectionYTop; | 690 | mSelectionHeight = ( gy + 1 ) * mGridSpacingY - mSelectionYTop; |
691 | 691 | ||
692 | 692 | ||
693 | repaintContents( (KOGlobals::self()->reverseLayout() ? | 693 | repaintContents( (KOGlobals::self()->reverseLayout() ? |
694 | mColumns - 1 - mSelectionCellX : mSelectionCellX) * | 694 | mColumns - 1 - mSelectionCellX : mSelectionCellX) * |
695 | mGridSpacingX, mSelectionYTop, | 695 | mGridSpacingX, mSelectionYTop, |
696 | mGridSpacingX, mSelectionHeight , false); | 696 | mGridSpacingX, mSelectionHeight , false); |
697 | 697 | ||
698 | mCurrentCellY = gy; | 698 | mCurrentCellY = gy; |
699 | } else if ( gy < mCurrentCellY ) { | 699 | } else if ( gy < mCurrentCellY ) { |
700 | if ( gy >= mStartCellY ) { | 700 | if ( gy >= mStartCellY ) { |
701 | int selectionHeight = mSelectionHeight; | 701 | int selectionHeight = mSelectionHeight; |
702 | mSelectionHeight = ( gy + 1 ) * mGridSpacingY - mSelectionYTop; | 702 | mSelectionHeight = ( gy + 1 ) * mGridSpacingY - mSelectionYTop; |
703 | 703 | ||
704 | repaintContents( (KOGlobals::self()->reverseLayout() ? | 704 | repaintContents( (KOGlobals::self()->reverseLayout() ? |
705 | mColumns - 1 - mSelectionCellX : mSelectionCellX) * | 705 | mColumns - 1 - mSelectionCellX : mSelectionCellX) * |
706 | mGridSpacingX, mSelectionYTop, | 706 | mGridSpacingX, mSelectionYTop, |
707 | mGridSpacingX, selectionHeight,false ); | 707 | mGridSpacingX, selectionHeight,false ); |
708 | 708 | ||
709 | mCurrentCellY = gy; | 709 | mCurrentCellY = gy; |
710 | } else { | 710 | } else { |
711 | } | 711 | } |
712 | } | 712 | } |
713 | } | 713 | } |
714 | 714 | ||
715 | void KOAgenda::endSelectAction( bool emitNewEvent ) | 715 | void KOAgenda::endSelectAction( bool emitNewEvent ) |
716 | { | 716 | { |
717 | mActionType = NOP; | 717 | mActionType = NOP; |
718 | mScrollUpTimer.stop(); | 718 | mScrollUpTimer.stop(); |
719 | mScrollDownTimer.stop(); | 719 | mScrollDownTimer.stop(); |
720 | 720 | ||
721 | emit newTimeSpanSignal(mStartCellX,mStartCellY,mCurrentCellX,mCurrentCellY); | 721 | emit newTimeSpanSignal(mStartCellX,mStartCellY,mCurrentCellX,mCurrentCellY); |
722 | if ( emitNewEvent && mStartCellY < mCurrentCellY ) { | 722 | if ( emitNewEvent && mStartCellY < mCurrentCellY ) { |
723 | emit newEventSignal(mStartCellX,mStartCellY,mCurrentCellX,mCurrentCellY); | 723 | emit newEventSignal(mStartCellX,mStartCellY,mCurrentCellX,mCurrentCellY); |
724 | } | 724 | } |
725 | } | 725 | } |
726 | 726 | ||
727 | void KOAgenda::startItemAction(QPoint viewportPos) | 727 | void KOAgenda::startItemAction(QPoint viewportPos) |
728 | { | 728 | { |
729 | int x,y; | 729 | int x,y; |
730 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 730 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
731 | int gx,gy; | 731 | int gx,gy; |
732 | contentsToGrid(x,y,gx,gy); | 732 | contentsToGrid(x,y,gx,gy); |
733 | 733 | ||
734 | mStartCellX = gx; | 734 | mStartCellX = gx; |
735 | mStartCellY = gy; | 735 | mStartCellY = gy; |
736 | mCurrentCellX = gx; | 736 | mCurrentCellX = gx; |
737 | mCurrentCellY = gy; | 737 | mCurrentCellY = gy; |
738 | 738 | ||
739 | if (mAllDayMode) { | 739 | if (mAllDayMode) { |
740 | int gridDistanceX = (x - gx * mGridSpacingX); | 740 | int gridDistanceX = (x - gx * mGridSpacingX); |
741 | if (gridDistanceX < mResizeBorderWidth && | 741 | if (gridDistanceX < mResizeBorderWidth && |
742 | mActionItem->cellX() == mCurrentCellX) { | 742 | mActionItem->cellX() == mCurrentCellX) { |
743 | mActionType = RESIZELEFT; | 743 | mActionType = RESIZELEFT; |
744 | setCursor(sizeHorCursor); | 744 | setCursor(sizeHorCursor); |
745 | } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && | 745 | } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && |
746 | mActionItem->cellXWidth() == mCurrentCellX) { | 746 | mActionItem->cellXWidth() == mCurrentCellX) { |
747 | mActionType = RESIZERIGHT; | 747 | mActionType = RESIZERIGHT; |
748 | setCursor(sizeHorCursor); | 748 | setCursor(sizeHorCursor); |
749 | } else { | 749 | } else { |
750 | mActionType = MOVE; | 750 | mActionType = MOVE; |
751 | mActionItem->startMove(); | 751 | mActionItem->startMove(); |
752 | setCursor(sizeAllCursor); | 752 | setCursor(sizeAllCursor); |
753 | } | 753 | } |
754 | } else { | 754 | } else { |
755 | int gridDistanceY = (y - gy * mGridSpacingY); | 755 | int gridDistanceY = (y - gy * mGridSpacingY); |
756 | bool allowResize = ( mActionItem->incidence()->type() != "Todo" ); | 756 | bool allowResize = ( mActionItem->incidence()->type() != "Todo" ); |
757 | if (allowResize && gridDistanceY < mResizeBorderWidth && | 757 | if (allowResize && gridDistanceY < mResizeBorderWidth && |
758 | mActionItem->cellYTop() == mCurrentCellY && | 758 | mActionItem->cellYTop() == mCurrentCellY && |
759 | !mActionItem->firstMultiItem()) { | 759 | !mActionItem->firstMultiItem()) { |
760 | mActionType = RESIZETOP; | 760 | mActionType = RESIZETOP; |
761 | setCursor(sizeVerCursor); | 761 | setCursor(sizeVerCursor); |
762 | } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && | 762 | } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && |
763 | mActionItem->cellYBottom() == mCurrentCellY && | 763 | mActionItem->cellYBottom() == mCurrentCellY && |
764 | !mActionItem->lastMultiItem()) { | 764 | !mActionItem->lastMultiItem()) { |
765 | mActionType = RESIZEBOTTOM; | 765 | mActionType = RESIZEBOTTOM; |
766 | setCursor(sizeVerCursor); | 766 | setCursor(sizeVerCursor); |
767 | } else { | 767 | } else { |
768 | mActionType = MOVE; | 768 | mActionType = MOVE; |
769 | mActionItem->startMove(); | 769 | mActionItem->startMove(); |
770 | setCursor(sizeAllCursor); | 770 | setCursor(sizeAllCursor); |
771 | } | 771 | } |
772 | } | 772 | } |
773 | } | 773 | } |
774 | 774 | ||
775 | void KOAgenda::performItemAction(QPoint viewportPos) | 775 | void KOAgenda::performItemAction(QPoint viewportPos) |
776 | { | 776 | { |
777 | // kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; | 777 | // kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; |
778 | // QPoint point = viewport()->mapToGlobal(viewportPos); | 778 | // QPoint point = viewport()->mapToGlobal(viewportPos); |
779 | // kdDebug() << "Global: " << point.x() << "," << point.y() << endl; | 779 | // kdDebug() << "Global: " << point.x() << "," << point.y() << endl; |
780 | // point = clipper()->mapFromGlobal(point); | 780 | // point = clipper()->mapFromGlobal(point); |
781 | // kdDebug() << "clipper: " << point.x() << "," << point.y() << endl; | 781 | // kdDebug() << "clipper: " << point.x() << "," << point.y() << endl; |
782 | // kdDebug() << "visible height: " << visibleHeight() << endl; | 782 | // kdDebug() << "visible height: " << visibleHeight() << endl; |
783 | int x,y; | 783 | int x,y; |
784 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 784 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
785 | // kdDebug() << "contents: " << x << "," << y << "\n" << endl; | 785 | // kdDebug() << "contents: " << x << "," << y << "\n" << endl; |
786 | int gx,gy; | 786 | int gx,gy; |
787 | contentsToGrid(x,y,gx,gy); | 787 | contentsToGrid(x,y,gx,gy); |
788 | QPoint clipperPos = clipper()-> | 788 | QPoint clipperPos = clipper()-> |
789 | mapFromGlobal(viewport()->mapToGlobal(viewportPos)); | 789 | mapFromGlobal(viewport()->mapToGlobal(viewportPos)); |
790 | 790 | ||
791 | // Cursor left active agenda area. | 791 | // Cursor left active agenda area. |
792 | // This starts a drag. | 792 | // This starts a drag. |
793 | if ( /*clipperPos.y() < 0 || clipperPos.y() > visibleHeight() ||*/ | 793 | if ( /*clipperPos.y() < 0 || clipperPos.y() > visibleHeight() ||*/ |
794 | clipperPos.x() < 0 || clipperPos.x() > visibleWidth() ) { | 794 | clipperPos.x() < 0 || clipperPos.x() > visibleWidth() ) { |
795 | if ( mActionType == MOVE ) { | 795 | if ( mActionType == MOVE ) { |
796 | mScrollUpTimer.stop(); | 796 | mScrollUpTimer.stop(); |
797 | mScrollDownTimer.stop(); | 797 | mScrollDownTimer.stop(); |
798 | mActionItem->resetMove(); | 798 | mActionItem->resetMove(); |
799 | placeSubCells( mActionItem ); | 799 | placeSubCells( mActionItem ); |
800 | // emit startDragSignal( mActionItem->incidence() ); | 800 | // emit startDragSignal( mActionItem->incidence() ); |
801 | setCursor( arrowCursor ); | 801 | setCursor( arrowCursor ); |
802 | mActionItem = 0; | 802 | mActionItem = 0; |
803 | mActionType = NOP; | 803 | mActionType = NOP; |
804 | mItemMoved = 0; | 804 | mItemMoved = 0; |
805 | return; | 805 | return; |
806 | } | 806 | } |
807 | } else { | 807 | } else { |
808 | switch ( mActionType ) { | 808 | switch ( mActionType ) { |
809 | case MOVE: | 809 | case MOVE: |
810 | setCursor( sizeAllCursor ); | 810 | setCursor( sizeAllCursor ); |
811 | break; | 811 | break; |
812 | case RESIZETOP: | 812 | case RESIZETOP: |
813 | case RESIZEBOTTOM: | 813 | case RESIZEBOTTOM: |
814 | setCursor( sizeVerCursor ); | 814 | setCursor( sizeVerCursor ); |
815 | break; | 815 | break; |
816 | case RESIZELEFT: | 816 | case RESIZELEFT: |
817 | case RESIZERIGHT: | 817 | case RESIZERIGHT: |
818 | setCursor( sizeHorCursor ); | 818 | setCursor( sizeHorCursor ); |
819 | break; | 819 | break; |
820 | default: | 820 | default: |
821 | setCursor( arrowCursor ); | 821 | setCursor( arrowCursor ); |
822 | } | 822 | } |
823 | } | 823 | } |
824 | 824 | ||
825 | // Scroll if item was moved to upper or lower end of agenda. | 825 | // Scroll if item was moved to upper or lower end of agenda. |
826 | if (clipperPos.y() < mScrollBorderWidth) { | 826 | if (clipperPos.y() < mScrollBorderWidth) { |
827 | mScrollUpTimer.start(mScrollDelay); | 827 | mScrollUpTimer.start(mScrollDelay); |
828 | } else if (visibleHeight() - clipperPos.y() < | 828 | } else if (visibleHeight() - clipperPos.y() < |
829 | mScrollBorderWidth) { | 829 | mScrollBorderWidth) { |
830 | mScrollDownTimer.start(mScrollDelay); | 830 | mScrollDownTimer.start(mScrollDelay); |
831 | } else { | 831 | } else { |
832 | mScrollUpTimer.stop(); | 832 | mScrollUpTimer.stop(); |
833 | mScrollDownTimer.stop(); | 833 | mScrollDownTimer.stop(); |
834 | } | 834 | } |
835 | 835 | ||
836 | // Move or resize item if necessary | 836 | // Move or resize item if necessary |
837 | if (mCurrentCellX != gx || mCurrentCellY != gy) { | 837 | if (mCurrentCellX != gx || mCurrentCellY != gy) { |
838 | mItemMoved = true; | 838 | mItemMoved = true; |
839 | mActionItem->raise(); | 839 | mActionItem->raise(); |
840 | if (mActionType == MOVE) { | 840 | if (mActionType == MOVE) { |
841 | // Move all items belonging to a multi item | 841 | // Move all items belonging to a multi item |
842 | KOAgendaItem *moveItem = mActionItem->firstMultiItem(); | 842 | KOAgendaItem *moveItem = mActionItem->firstMultiItem(); |
843 | bool isMultiItem = (moveItem || mActionItem->lastMultiItem()); | 843 | bool isMultiItem = (moveItem || mActionItem->lastMultiItem()); |
844 | if (!moveItem) moveItem = mActionItem; | 844 | if (!moveItem) moveItem = mActionItem; |
845 | while (moveItem) { | 845 | while (moveItem) { |
846 | int dy; | 846 | int dy; |
847 | if (isMultiItem) dy = 0; | 847 | if (isMultiItem) dy = 0; |
848 | else dy = gy - mCurrentCellY; | 848 | else dy = gy - mCurrentCellY; |
849 | moveItem->moveRelative(gx - mCurrentCellX,dy); | 849 | moveItem->moveRelative(gx - mCurrentCellX,dy); |
850 | int x,y; | 850 | int x,y; |
851 | gridToContents(moveItem->cellX(),moveItem->cellYTop(),x,y); | 851 | gridToContents(moveItem->cellX(),moveItem->cellYTop(),x,y); |
852 | moveItem->resize(mGridSpacingX * moveItem->cellWidth(), | 852 | moveItem->resize(mGridSpacingX * moveItem->cellWidth(), |
853 | mGridSpacingY * moveItem->cellHeight()); | 853 | mGridSpacingY * moveItem->cellHeight()); |
854 | moveChild(moveItem,x,y); | 854 | moveChild(moveItem,x,y); |
855 | moveItem = moveItem->nextMultiItem(); | 855 | moveItem = moveItem->nextMultiItem(); |
856 | } | 856 | } |
857 | } else if (mActionType == RESIZETOP) { | 857 | } else if (mActionType == RESIZETOP) { |
858 | if (mCurrentCellY <= mActionItem->cellYBottom()) { | 858 | if (mCurrentCellY <= mActionItem->cellYBottom()) { |
859 | mActionItem->expandTop(gy - mCurrentCellY); | 859 | mActionItem->expandTop(gy - mCurrentCellY); |
860 | mActionItem->resize(mActionItem->width(), | 860 | mActionItem->resize(mActionItem->width(), |
861 | mGridSpacingY * mActionItem->cellHeight()); | 861 | mGridSpacingY * mActionItem->cellHeight()); |
862 | int x,y; | 862 | int x,y; |
863 | gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y); | 863 | gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y); |
864 | //moveChild(mActionItem,childX(mActionItem),y); | 864 | //moveChild(mActionItem,childX(mActionItem),y); |
865 | QScrollView::moveChild( mActionItem,childX(mActionItem),y ); | 865 | QScrollView::moveChild( mActionItem,childX(mActionItem),y ); |
866 | } | 866 | } |
867 | } else if (mActionType == RESIZEBOTTOM) { | 867 | } else if (mActionType == RESIZEBOTTOM) { |
868 | if (mCurrentCellY >= mActionItem->cellYTop()) { | 868 | if (mCurrentCellY >= mActionItem->cellYTop()) { |
869 | mActionItem->expandBottom(gy - mCurrentCellY); | 869 | mActionItem->expandBottom(gy - mCurrentCellY); |
870 | mActionItem->resize(mActionItem->width(), | 870 | mActionItem->resize(mActionItem->width(), |
871 | mGridSpacingY * mActionItem->cellHeight()); | 871 | mGridSpacingY * mActionItem->cellHeight()); |
872 | } | 872 | } |
873 | } else if (mActionType == RESIZELEFT) { | 873 | } else if (mActionType == RESIZELEFT) { |
874 | if (mCurrentCellX <= mActionItem->cellXWidth()) { | 874 | if (mCurrentCellX <= mActionItem->cellXWidth()) { |
875 | mActionItem->expandLeft(gx - mCurrentCellX); | 875 | mActionItem->expandLeft(gx - mCurrentCellX); |
876 | mActionItem->resize(mGridSpacingX * mActionItem->cellWidth(), | 876 | mActionItem->resize(mGridSpacingX * mActionItem->cellWidth(), |
877 | mActionItem->height()); | 877 | mActionItem->height()); |
878 | int x,y; | 878 | int x,y; |
879 | gridToContents(mActionItem->cellX(),mActionItem->cellYTop(),x,y); | 879 | gridToContents(mActionItem->cellX(),mActionItem->cellYTop(),x,y); |
880 | moveChild(mActionItem,x,childY(mActionItem)); | 880 | moveChild(mActionItem,x,childY(mActionItem)); |
881 | } | 881 | } |
882 | } else if (mActionType == RESIZERIGHT) { | 882 | } else if (mActionType == RESIZERIGHT) { |
883 | if (mCurrentCellX >= mActionItem->cellX()) { | 883 | if (mCurrentCellX >= mActionItem->cellX()) { |
884 | mActionItem->expandRight(gx - mCurrentCellX); | 884 | mActionItem->expandRight(gx - mCurrentCellX); |
885 | mActionItem->resize(mGridSpacingX * mActionItem->cellWidth(), | 885 | mActionItem->resize(mGridSpacingX * mActionItem->cellWidth(), |
886 | mActionItem->height()); | 886 | mActionItem->height()); |
887 | } | 887 | } |
888 | } | 888 | } |
889 | mCurrentCellX = gx; | 889 | mCurrentCellX = gx; |
890 | mCurrentCellY = gy; | 890 | mCurrentCellY = gy; |
891 | } | 891 | } |
892 | } | 892 | } |
893 | 893 | ||
894 | void KOAgenda::endItemAction() | 894 | void KOAgenda::endItemAction() |
895 | { | 895 | { |
896 | 896 | ||
897 | if ( mItemMoved ) { | 897 | if ( mItemMoved ) { |
898 | KOAgendaItem *placeItem = mActionItem->firstMultiItem(); | 898 | KOAgendaItem *placeItem = mActionItem->firstMultiItem(); |
899 | if ( !placeItem ) { | 899 | if ( !placeItem ) { |
900 | placeItem = mActionItem; | 900 | placeItem = mActionItem; |
901 | } | 901 | } |
902 | if ( placeItem->incidence()->recurrence()->doesRecur() ) { | 902 | if ( placeItem->incidence()->recurrence()->doesRecur() ) { |
903 | Incidence* oldInc = placeItem->incidence(); | 903 | Incidence* oldInc = placeItem->incidence(); |
904 | placeItem->recreateIncidence(); | 904 | placeItem->recreateIncidence(); |
905 | emit addToCalSignal(placeItem->incidence(), oldInc ); | 905 | emit addToCalSignal(placeItem->incidence(), oldInc ); |
906 | } | 906 | } |
907 | int type = mActionType; | 907 | int type = mActionType; |
908 | if ( mAllDayMode ) | 908 | if ( mAllDayMode ) |
909 | type = -1; | 909 | type = -1; |
910 | KOAgendaItem *modifiedItem = placeItem; | 910 | KOAgendaItem *modifiedItem = placeItem; |
911 | //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); | 911 | //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); |
912 | QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); | 912 | QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); |
913 | KOAgendaItem *item; | 913 | KOAgendaItem *item; |
914 | 914 | ||
915 | if ( placeItem->incidence()->type() == "Todo" ) { | 915 | if ( placeItem->incidence()->type() == "Todo" ) { |
916 | mSelectedItem = 0; | 916 | mSelectedItem = 0; |
917 | //qDebug("todo %d %d %d ", mCurrentCellX, modifiedItem->cellX() ,modifiedItem->cellXWidth()); | 917 | //qDebug("todo %d %d %d ", mCurrentCellX, modifiedItem->cellX() ,modifiedItem->cellXWidth()); |
918 | modifiedItem->mLastMoveXPos = mCurrentCellX; | 918 | modifiedItem->mLastMoveXPos = mCurrentCellX; |
919 | emit itemModified( modifiedItem, mActionType ); | 919 | emit itemModified( modifiedItem, mActionType ); |
920 | } | 920 | } |
921 | else { | 921 | else { |
922 | 922 | ||
923 | 923 | ||
924 | globalFlagBlockAgendaItemPaint = 1; | 924 | globalFlagBlockAgendaItemPaint = 1; |
925 | for ( item=oldconflictItems.first(); item != 0; | 925 | for ( item=oldconflictItems.first(); item != 0; |
926 | item=oldconflictItems.next() ) { | 926 | item=oldconflictItems.next() ) { |
927 | placeSubCells(item); | 927 | placeSubCells(item); |
928 | } | 928 | } |
929 | while ( placeItem ) { | 929 | while ( placeItem ) { |
930 | //qDebug("placeItem %s ", placeItem->incidence()->summary().latin1()); | 930 | //qDebug("placeItem %s ", placeItem->incidence()->summary().latin1()); |
931 | oldconflictItems = placeItem->conflictItems(); | 931 | oldconflictItems = placeItem->conflictItems(); |
932 | for ( item=oldconflictItems.first(); item != 0; | 932 | for ( item=oldconflictItems.first(); item != 0; |
933 | item=oldconflictItems.next() ) { | 933 | item=oldconflictItems.next() ) { |
934 | placeSubCells(item); | 934 | placeSubCells(item); |
935 | } | 935 | } |
936 | placeSubCells( placeItem ); | 936 | placeSubCells( placeItem ); |
937 | placeItem = placeItem->nextMultiItem(); | 937 | placeItem = placeItem->nextMultiItem(); |
938 | } | 938 | } |
939 | globalFlagBlockAgendaItemPaint = 0; | 939 | globalFlagBlockAgendaItemPaint = 0; |
940 | for ( item=oldconflictItems.first(); item != 0; | 940 | for ( item=oldconflictItems.first(); item != 0; |
941 | item=oldconflictItems.next() ) { | 941 | item=oldconflictItems.next() ) { |
942 | globalFlagBlockAgendaItemUpdate = 0; | 942 | globalFlagBlockAgendaItemUpdate = 0; |
943 | item->repaintMe(); | 943 | item->repaintMe(); |
944 | globalFlagBlockAgendaItemUpdate = 1; | 944 | globalFlagBlockAgendaItemUpdate = 1; |
945 | item->repaint( false ); | 945 | item->repaint( false ); |
946 | } | 946 | } |
947 | placeItem = modifiedItem; | 947 | placeItem = modifiedItem; |
948 | 948 | ||
949 | while ( placeItem ) { | 949 | while ( placeItem ) { |
950 | //qDebug("placeItem %s ", placeItem->incidence()->summary().latin1()); | 950 | //qDebug("placeItem %s ", placeItem->incidence()->summary().latin1()); |
951 | globalFlagBlockAgendaItemUpdate = 0; | 951 | globalFlagBlockAgendaItemUpdate = 0; |
952 | placeItem->repaintMe(); | 952 | placeItem->repaintMe(); |
953 | globalFlagBlockAgendaItemUpdate = 1; | 953 | globalFlagBlockAgendaItemUpdate = 1; |
954 | placeItem->repaint(false); | 954 | placeItem->repaint(false); |
955 | placeItem = placeItem->nextMultiItem(); | 955 | placeItem = placeItem->nextMultiItem(); |
956 | } | 956 | } |
957 | emit itemModified( modifiedItem, mActionType ); | 957 | emit itemModified( modifiedItem, mActionType ); |
958 | 958 | ||
959 | 959 | ||
960 | placeItem = modifiedItem; | 960 | placeItem = modifiedItem; |
961 | while ( placeItem ) { | 961 | while ( placeItem ) { |
962 | oldconflictItems = placeItem->conflictItems(); | 962 | oldconflictItems = placeItem->conflictItems(); |
963 | for ( item=oldconflictItems.first(); item != 0; | 963 | for ( item=oldconflictItems.first(); item != 0; |
964 | item=oldconflictItems.next() ) { | 964 | item=oldconflictItems.next() ) { |
965 | placeSubCells(item); | 965 | placeSubCells(item); |
966 | } | 966 | } |
967 | placeSubCells( placeItem ); | 967 | placeSubCells( placeItem ); |
968 | placeItem = placeItem->nextMultiItem(); | 968 | placeItem = placeItem->nextMultiItem(); |
969 | 969 | ||
970 | } | 970 | } |
971 | placeItem = modifiedItem; | 971 | placeItem = modifiedItem; |
972 | while ( placeItem ) { | 972 | while ( placeItem ) { |
973 | oldconflictItems = placeItem->conflictItems(); | 973 | oldconflictItems = placeItem->conflictItems(); |
974 | for ( item=oldconflictItems.first(); item != 0; | 974 | for ( item=oldconflictItems.first(); item != 0; |
975 | item=oldconflictItems.next() ) { | 975 | item=oldconflictItems.next() ) { |
976 | globalFlagBlockAgendaItemUpdate = 0; | 976 | globalFlagBlockAgendaItemUpdate = 0; |
977 | item->repaintMe(); | 977 | item->repaintMe(); |
978 | globalFlagBlockAgendaItemUpdate = 1; | 978 | globalFlagBlockAgendaItemUpdate = 1; |
979 | item->repaint(false); | 979 | item->repaint(false); |
980 | } | 980 | } |
981 | placeItem = placeItem->nextMultiItem(); | 981 | placeItem = placeItem->nextMultiItem(); |
982 | } | 982 | } |
983 | /* | 983 | /* |
984 | 984 | ||
985 | oldconflictItems = modifiedItem->conflictItems(); | 985 | oldconflictItems = modifiedItem->conflictItems(); |
986 | for ( item=oldconflictItems.first(); item != 0; | 986 | for ( item=oldconflictItems.first(); item != 0; |
987 | item=oldconflictItems.next() ) { | 987 | item=oldconflictItems.next() ) { |
988 | globalFlagBlockAgendaItemUpdate = 0; | 988 | globalFlagBlockAgendaItemUpdate = 0; |
989 | item->paintMe(false); | 989 | item->paintMe(false); |
990 | globalFlagBlockAgendaItemUpdate = 1; | 990 | globalFlagBlockAgendaItemUpdate = 1; |
991 | item->repaint(false); | 991 | item->repaint(false); |
992 | } | 992 | } |
993 | */ | 993 | */ |
994 | 994 | ||
995 | 995 | ||
996 | } | 996 | } |
997 | 997 | ||
998 | } | 998 | } |
999 | 999 | ||
1000 | mScrollUpTimer.stop(); | 1000 | mScrollUpTimer.stop(); |
1001 | mScrollDownTimer.stop(); | 1001 | mScrollDownTimer.stop(); |
1002 | setCursor( arrowCursor ); | 1002 | setCursor( arrowCursor ); |
1003 | mActionItem = 0; | 1003 | mActionItem = 0; |
1004 | mActionType = NOP; | 1004 | mActionType = NOP; |
1005 | mItemMoved = 0; | 1005 | mItemMoved = 0; |
1006 | 1006 | ||
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) | 1009 | void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) |
1010 | { | 1010 | { |
1011 | // kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; | 1011 | // kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; |
1012 | // QPoint point = viewport()->mapToGlobal(viewportPos); | 1012 | // QPoint point = viewport()->mapToGlobal(viewportPos); |
1013 | // kdDebug() << "Global: " << point.x() << "," << point.y() << endl; | 1013 | // kdDebug() << "Global: " << point.x() << "," << point.y() << endl; |
1014 | // point = clipper()->mapFromGlobal(point); | 1014 | // point = clipper()->mapFromGlobal(point); |
1015 | // kdDebug() << "clipper: " << point.x() << "," << point.y() << endl; | 1015 | // kdDebug() << "clipper: " << point.x() << "," << point.y() << endl; |
1016 | 1016 | ||
1017 | int x,y; | 1017 | int x,y; |
1018 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 1018 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
1019 | // kdDebug() << "contents: " << x << "," << y << "\n" << endl; | 1019 | // kdDebug() << "contents: " << x << "," << y << "\n" << endl; |
1020 | int gx,gy; | 1020 | int gx,gy; |
1021 | contentsToGrid(x,y,gx,gy); | 1021 | contentsToGrid(x,y,gx,gy); |
1022 | 1022 | ||
1023 | // Change cursor to resize cursor if appropriate | 1023 | // Change cursor to resize cursor if appropriate |
1024 | if (mAllDayMode) { | 1024 | if (mAllDayMode) { |
1025 | int gridDistanceX = (x - gx * mGridSpacingX); | 1025 | int gridDistanceX = (x - gx * mGridSpacingX); |
1026 | if (gridDistanceX < mResizeBorderWidth && | 1026 | if (gridDistanceX < mResizeBorderWidth && |
1027 | moveItem->cellX() == gx) { | 1027 | moveItem->cellX() == gx) { |
1028 | setCursor(sizeHorCursor); | 1028 | setCursor(sizeHorCursor); |
1029 | } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && | 1029 | } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && |
1030 | moveItem->cellXWidth() == gx) { | 1030 | moveItem->cellXWidth() == gx) { |
1031 | setCursor(sizeHorCursor); | 1031 | setCursor(sizeHorCursor); |
1032 | } else { | 1032 | } else { |
1033 | setCursor(arrowCursor); | 1033 | setCursor(arrowCursor); |
1034 | } | 1034 | } |
1035 | } else { | 1035 | } else { |
1036 | int gridDistanceY = (y - gy * mGridSpacingY); | 1036 | int gridDistanceY = (y - gy * mGridSpacingY); |
1037 | if (gridDistanceY < mResizeBorderWidth && | 1037 | if (gridDistanceY < mResizeBorderWidth && |
1038 | moveItem->cellYTop() == gy && | 1038 | moveItem->cellYTop() == gy && |
1039 | !moveItem->firstMultiItem()) { | 1039 | !moveItem->firstMultiItem()) { |
1040 | setCursor(sizeVerCursor); | 1040 | setCursor(sizeVerCursor); |
1041 | } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && | 1041 | } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && |
1042 | moveItem->cellYBottom() == gy && | 1042 | moveItem->cellYBottom() == gy && |
1043 | !moveItem->lastMultiItem()) { | 1043 | !moveItem->lastMultiItem()) { |
1044 | setCursor(sizeVerCursor); | 1044 | setCursor(sizeVerCursor); |
1045 | } else { | 1045 | } else { |
1046 | setCursor(arrowCursor); | 1046 | setCursor(arrowCursor); |
1047 | } | 1047 | } |
1048 | } | 1048 | } |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | 1051 | ||
1052 | /* | 1052 | /* |
1053 | Place item in cell and take care that multiple items using the same cell do | 1053 | Place item in cell and take care that multiple items using the same cell do |
1054 | not overlap. This method is not yet optimal. It doesn´t use the maximum space | 1054 | not overlap. This method is not yet optimal. It doesn´t use the maximum space |
1055 | it can get in all cases. | 1055 | it can get in all cases. |
1056 | At the moment the method has a bug: When an item is placed only the sub cell | 1056 | At the moment the method has a bug: When an item is placed only the sub cell |
1057 | widths of the items are changed, which are within the Y region the item to | 1057 | widths of the items are changed, which are within the Y region the item to |
1058 | place spans. When the sub cell width change of one of this items affects a | 1058 | place spans. When the sub cell width change of one of this items affects a |
1059 | cell, where other items are, which do not overlap in Y with the item to place, | 1059 | cell, where other items are, which do not overlap in Y with the item to place, |
1060 | the display gets corrupted, although the corruption looks quite nice. | 1060 | the display gets corrupted, although the corruption looks quite nice. |
1061 | */ | 1061 | */ |
1062 | void KOAgenda::placeSubCells(KOAgendaItem *placeItem) | 1062 | void KOAgenda::placeSubCells(KOAgendaItem *placeItem) |
1063 | { | 1063 | { |
1064 | 1064 | ||
1065 | QPtrList<KOAgendaItem> conflictItems; | 1065 | QPtrList<KOAgendaItem> conflictItems; |
1066 | int maxSubCells = 0; | 1066 | int maxSubCells = 0; |
1067 | QIntDict<KOAgendaItem> subCellDict(5); | 1067 | QIntDict<KOAgendaItem> subCellDict(5); |
1068 | 1068 | ||
1069 | KOAgendaItem *item; | 1069 | KOAgendaItem *item; |
1070 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1070 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1071 | if (item != placeItem) { | 1071 | if (item != placeItem) { |
1072 | if (placeItem->cellX() <= item->cellXWidth() && | 1072 | if (placeItem->cellX() <= item->cellXWidth() && |
1073 | placeItem->cellXWidth() >= item->cellX()) { | 1073 | placeItem->cellXWidth() >= item->cellX()) { |
1074 | if ((placeItem->cellYTop() <= item->cellYBottom()) && | 1074 | if ((placeItem->cellYTop() <= item->cellYBottom()) && |
1075 | (placeItem->cellYBottom() >= item->cellYTop())) { | 1075 | (placeItem->cellYBottom() >= item->cellYTop())) { |
1076 | conflictItems.append(item); | 1076 | conflictItems.append(item); |
1077 | if (item->subCells() > maxSubCells) | 1077 | if (item->subCells() > maxSubCells) |
1078 | maxSubCells = item->subCells(); | 1078 | maxSubCells = item->subCells(); |
1079 | subCellDict.insert(item->subCell(),item); | 1079 | subCellDict.insert(item->subCell(),item); |
1080 | } | 1080 | } |
1081 | } | 1081 | } |
1082 | } | 1082 | } |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | if (conflictItems.count() > 0) { | 1085 | if (conflictItems.count() > 0) { |
1086 | // Look for unused sub cell and insert item | 1086 | // Look for unused sub cell and insert item |
1087 | int i; | 1087 | int i; |
1088 | for(i=0;i<maxSubCells;++i) { | 1088 | for(i=0;i<maxSubCells;++i) { |
1089 | if (!subCellDict.find(i)) { | 1089 | if (!subCellDict.find(i)) { |
1090 | placeItem->setSubCell(i); | 1090 | placeItem->setSubCell(i); |
1091 | break; | 1091 | break; |
1092 | } | 1092 | } |
1093 | } | 1093 | } |
1094 | if (i == maxSubCells) { | 1094 | if (i == maxSubCells) { |
1095 | placeItem->setSubCell(maxSubCells); | 1095 | placeItem->setSubCell(maxSubCells); |
1096 | maxSubCells++; // add new item to number of sub cells | 1096 | maxSubCells++; // add new item to number of sub cells |
1097 | } | 1097 | } |
1098 | 1098 | ||
1099 | // Prepare for sub cell geometry adjustment | 1099 | // Prepare for sub cell geometry adjustment |
1100 | int newSubCellWidth; | 1100 | int newSubCellWidth; |
1101 | if (mAllDayMode) newSubCellWidth = mGridSpacingY / maxSubCells; | 1101 | if (mAllDayMode) newSubCellWidth = mGridSpacingY / maxSubCells; |
1102 | else newSubCellWidth = mGridSpacingX / maxSubCells; | 1102 | else newSubCellWidth = mGridSpacingX / maxSubCells; |
1103 | conflictItems.append(placeItem); | 1103 | conflictItems.append(placeItem); |
1104 | 1104 | ||
1105 | 1105 | ||
1106 | // Adjust sub cell geometry of all direct conflict items | 1106 | // Adjust sub cell geometry of all direct conflict items |
1107 | for ( item=conflictItems.first(); item != 0; | 1107 | for ( item=conflictItems.first(); item != 0; |
1108 | item=conflictItems.next() ) { | 1108 | item=conflictItems.next() ) { |
1109 | item->setSubCells(maxSubCells); | 1109 | item->setSubCells(maxSubCells); |
1110 | if (mAllDayMode) { | 1110 | if (mAllDayMode) { |
1111 | item->resize(item->cellWidth() * mGridSpacingX, newSubCellWidth); | 1111 | item->resize(item->cellWidth() * mGridSpacingX, newSubCellWidth); |
1112 | } else { | 1112 | } else { |
1113 | item->resize(newSubCellWidth, item->cellHeight() * mGridSpacingY); | 1113 | item->resize(newSubCellWidth, item->cellHeight() * mGridSpacingY); |
1114 | } | 1114 | } |
1115 | int x,y; | 1115 | int x,y; |
1116 | gridToContents(item->cellX(),item->cellYTop(),x,y); | 1116 | gridToContents(item->cellX(),item->cellYTop(),x,y); |
1117 | if (mAllDayMode) { | 1117 | if (mAllDayMode) { |
1118 | y += item->subCell() * newSubCellWidth; | 1118 | y += item->subCell() * newSubCellWidth; |
1119 | } else { | 1119 | } else { |
1120 | x += item->subCell() * newSubCellWidth; | 1120 | x += item->subCell() * newSubCellWidth; |
1121 | } | 1121 | } |
1122 | moveChild(item,x,y); | 1122 | moveChild(item,x,y); |
1123 | // qDebug("moveChild %s %d %d ", item->incidence()->summary().latin1() ,x,y); | 1123 | // qDebug("moveChild %s %d %d ", item->incidence()->summary().latin1() ,x,y); |
1124 | //item->updateItem(); | 1124 | //item->updateItem(); |
1125 | } | 1125 | } |
1126 | // Adjust sub cell geometry of all conflict items of all conflict items | 1126 | // Adjust sub cell geometry of all conflict items of all conflict items |
1127 | for ( item=conflictItems.first(); item != 0; | 1127 | for ( item=conflictItems.first(); item != 0; |
1128 | item=conflictItems.next() ) { | 1128 | item=conflictItems.next() ) { |
1129 | if ( placeItem != item ) { | 1129 | if ( placeItem != item ) { |
1130 | KOAgendaItem *item2; | 1130 | KOAgendaItem *item2; |
1131 | QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); | 1131 | QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); |
1132 | for ( item2=conflictItems2.first(); item2 != 0; | 1132 | for ( item2=conflictItems2.first(); item2 != 0; |
1133 | item2=conflictItems2.next() ) { | 1133 | item2=conflictItems2.next() ) { |
1134 | if ( item2->subCells() != maxSubCells) { | 1134 | if ( item2->subCells() != maxSubCells) { |
1135 | item2->setSubCells(maxSubCells); | 1135 | item2->setSubCells(maxSubCells); |
1136 | if (mAllDayMode) { | 1136 | if (mAllDayMode) { |
1137 | item2->resize(item2->cellWidth() * mGridSpacingX, newSubCellWidth); | 1137 | item2->resize(item2->cellWidth() * mGridSpacingX, newSubCellWidth); |
1138 | } else { | 1138 | } else { |
1139 | item2->resize(newSubCellWidth, item2->cellHeight() * mGridSpacingY); | 1139 | item2->resize(newSubCellWidth, item2->cellHeight() * mGridSpacingY); |
1140 | } | 1140 | } |
1141 | int x,y; | 1141 | int x,y; |
1142 | gridToContents(item2->cellX(),item2->cellYTop(),x,y); | 1142 | gridToContents(item2->cellX(),item2->cellYTop(),x,y); |
1143 | if (mAllDayMode) { | 1143 | if (mAllDayMode) { |
1144 | y += item2->subCell() * newSubCellWidth; | 1144 | y += item2->subCell() * newSubCellWidth; |
1145 | } else { | 1145 | } else { |
1146 | x += item2->subCell() * newSubCellWidth; | 1146 | x += item2->subCell() * newSubCellWidth; |
1147 | } | 1147 | } |
1148 | moveChild(item2,x,y); | 1148 | moveChild(item2,x,y); |
1149 | //qDebug("setttttt %d %s",maxSubCells, item2->text().latin1() ); | 1149 | //qDebug("setttttt %d %s",maxSubCells, item2->text().latin1() ); |
1150 | } | 1150 | } |
1151 | } | 1151 | } |
1152 | } | 1152 | } |
1153 | } | 1153 | } |
1154 | } else { | 1154 | } else { |
1155 | placeItem->setSubCell(0); | 1155 | placeItem->setSubCell(0); |
1156 | placeItem->setSubCells(1); | 1156 | placeItem->setSubCells(1); |
1157 | if (mAllDayMode) placeItem->resize(placeItem->width(),mGridSpacingY); | 1157 | if (mAllDayMode) placeItem->resize(placeItem->width(),mGridSpacingY); |
1158 | else placeItem->resize(mGridSpacingX,placeItem->height()); | 1158 | else placeItem->resize(mGridSpacingX,placeItem->height()); |
1159 | int x,y; | 1159 | int x,y; |
1160 | gridToContents(placeItem->cellX(),placeItem->cellYTop(),x,y); | 1160 | gridToContents(placeItem->cellX(),placeItem->cellYTop(),x,y); |
1161 | moveChild(placeItem,x,y); | 1161 | moveChild(placeItem,x,y); |
1162 | } | 1162 | } |
1163 | placeItem->setConflictItems(conflictItems); | 1163 | placeItem->setConflictItems(conflictItems); |
1164 | // for ( item=conflictItems.first(); item != 0; | 1164 | // for ( item=conflictItems.first(); item != 0; |
1165 | // item=conflictItems.next() ) { | 1165 | // item=conflictItems.next() ) { |
1166 | // //item->updateItem(); | 1166 | // //item->updateItem(); |
1167 | // //qDebug("xxx item->updateItem() %s %d %d", item->incidence()->summary().latin1(),item->x(), item->y() ); | 1167 | // //qDebug("xxx item->updateItem() %s %d %d", item->incidence()->summary().latin1(),item->x(), item->y() ); |
1168 | // } | 1168 | // } |
1169 | // placeItem->updateItem(); | 1169 | // placeItem->updateItem(); |
1170 | } | 1170 | } |
1171 | 1171 | ||
1172 | void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | 1172 | void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) |
1173 | { | 1173 | { |
1174 | if ( globalFlagBlockAgenda ) | 1174 | if ( globalFlagBlockAgenda ) |
1175 | return; | 1175 | return; |
1176 | if ( ! mAllDayMode ) { | 1176 | if ( ! mAllDayMode ) { |
1177 | // currently not working for | 1177 | // currently not working for |
1178 | 1178 | ||
1179 | //qDebug("KOAgenda::drawContents "); | 1179 | //qDebug("KOAgenda::drawContents "); |
1180 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | 1180 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) |
1181 | ;//drawContentsToPainter(); | 1181 | ;//drawContentsToPainter(); |
1182 | 1182 | ||
1183 | QPaintDevice* pd = p->device(); | 1183 | QPaintDevice* pd = p->device(); |
1184 | p->end(); | 1184 | p->end(); |
1185 | int vx, vy; | 1185 | int vx, vy; |
1186 | int selectionX = KOGlobals::self()->reverseLayout() ? | 1186 | int selectionX = KOGlobals::self()->reverseLayout() ? |
1187 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : | 1187 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : |
1188 | mSelectionCellX * mGridSpacingX; | 1188 | mSelectionCellX * mGridSpacingX; |
1189 | contentsToViewport ( cx, cy, vx,vy); | 1189 | contentsToViewport ( cx, cy, vx,vy); |
1190 | //qDebug(" %d %d %d %d %d", cx, cy, cw,ch,mGridSpacingX-1) ; | 1190 | //qDebug(" %d %d %d %d %d", cx, cy, cw,ch,mGridSpacingX-1) ; |
1191 | 1191 | ||
1192 | if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) { | 1192 | if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) { |
1193 | if ( mGridSpacingX == cw && mSelectionHeight > 0 && ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && | 1193 | if ( mGridSpacingX == cw && mSelectionHeight > 0 && ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && |
1194 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) ) { | 1194 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) ) { |
1195 | 1195 | ||
1196 | int vxSel, vySel; | 1196 | int vxSel, vySel; |
1197 | contentsToViewport ( selectionX, mSelectionYTop, vxSel,vySel); | 1197 | contentsToViewport ( selectionX, mSelectionYTop, vxSel,vySel); |
1198 | int off = mSelectionHeight; | 1198 | int off = mSelectionHeight; |
1199 | if ( vySel < 0 ) | 1199 | if ( vySel < 0 ) |
1200 | off += vySel; | 1200 | off += vySel; |
1201 | //qDebug("OFF %d %d %d", off,vySel, vy ); | 1201 | //qDebug("OFF %d %d %d", off,vySel, vy ); |
1202 | bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP); | 1202 | bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP); |
1203 | } else { | 1203 | } else { |
1204 | bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); | 1204 | bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); |
1205 | } | 1205 | } |
1206 | } | 1206 | } |
1207 | if ( mSelectionHeight > 0 ) { | 1207 | if ( mSelectionHeight > 0 ) { |
1208 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); | 1208 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); |
1209 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && | 1209 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && |
1210 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { | 1210 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { |
1211 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); | 1211 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); |
1212 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); | 1212 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); |
1213 | } | 1213 | } |
1214 | } | 1214 | } |
1215 | p->begin( pd ); | 1215 | p->begin( pd ); |
1216 | } else { | 1216 | } else { |
1217 | 1217 | ||
1218 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | 1218 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) |
1219 | ;//drawContentsToPainter(); | 1219 | ;//drawContentsToPainter(); |
1220 | 1220 | ||
1221 | QPaintDevice* pd = p->device(); | 1221 | QPaintDevice* pd = p->device(); |
1222 | p->end(); | 1222 | p->end(); |
1223 | int vx, vy; | 1223 | int vx, vy; |
1224 | int selectionX = KOGlobals::self()->reverseLayout() ? | 1224 | int selectionX = KOGlobals::self()->reverseLayout() ? |
1225 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : | 1225 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : |
1226 | mSelectionCellX * mGridSpacingX; | 1226 | mSelectionCellX * mGridSpacingX; |
1227 | contentsToViewport ( cx, cy, vx,vy); | 1227 | contentsToViewport ( cx, cy, vx,vy); |
1228 | // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ; | 1228 | // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ; |
1229 | if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) | 1229 | if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) |
1230 | bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); | 1230 | bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); |
1231 | 1231 | ||
1232 | if ( mSelectionHeight > 0 ) { | 1232 | if ( mSelectionHeight > 0 ) { |
1233 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); | 1233 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); |
1234 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && | 1234 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && |
1235 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { | 1235 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { |
1236 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); | 1236 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); |
1237 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); | 1237 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); |
1238 | } | 1238 | } |
1239 | } | 1239 | } |
1240 | p->begin( pd ); | 1240 | p->begin( pd ); |
1241 | } | 1241 | } |
1242 | 1242 | ||
1243 | } | 1243 | } |
1244 | 1244 | ||
1245 | void KOAgenda::finishUpdate() | 1245 | void KOAgenda::finishUpdate() |
1246 | { | 1246 | { |
1247 | 1247 | ||
1248 | KOAgendaItem *item; | 1248 | KOAgendaItem *item; |
1249 | globalFlagBlockAgendaItemPaint = 1; | 1249 | globalFlagBlockAgendaItemPaint = 1; |
1250 | // Adjust sub cell geometry of all conflict items of all conflict items of all conflict items ... of the conflict item with the max number of conflictitems | 1250 | // Adjust sub cell geometry of all conflict items of all conflict items of all conflict items ... of the conflict item with the max number of conflictitems |
1251 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1251 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1252 | if ( !item->checkLayout() ) { | 1252 | if ( !item->checkLayout() ) { |
1253 | //qDebug(" conflictitem found "); | 1253 | //qDebug(" conflictitem found "); |
1254 | int newSubCellWidth; | 1254 | int newSubCellWidth; |
1255 | if (mAllDayMode) newSubCellWidth = mGridSpacingY / item->subCells(); | 1255 | if (mAllDayMode) newSubCellWidth = mGridSpacingY / item->subCells(); |
1256 | else newSubCellWidth = mGridSpacingX / item->subCells(); | 1256 | else newSubCellWidth = mGridSpacingX / item->subCells(); |
1257 | 1257 | ||
1258 | if (mAllDayMode) { | 1258 | if (mAllDayMode) { |
1259 | item->resize(item->cellWidth() * mGridSpacingX, newSubCellWidth); | 1259 | item->resize(item->cellWidth() * mGridSpacingX, newSubCellWidth); |
1260 | } else { | 1260 | } else { |
1261 | item->resize(newSubCellWidth, item->cellHeight() * mGridSpacingY); | 1261 | item->resize(newSubCellWidth, item->cellHeight() * mGridSpacingY); |
1262 | } | 1262 | } |
1263 | int x,y; | 1263 | int x,y; |
1264 | gridToContents(item->cellX(),item->cellYTop(),x,y); | 1264 | gridToContents(item->cellX(),item->cellYTop(),x,y); |
1265 | if (mAllDayMode) { | 1265 | if (mAllDayMode) { |
1266 | y += item->subCell() * newSubCellWidth; | 1266 | y += item->subCell() * newSubCellWidth; |
1267 | } else { | 1267 | } else { |
1268 | x += item->subCell() * newSubCellWidth; | 1268 | x += item->subCell() * newSubCellWidth; |
1269 | } | 1269 | } |
1270 | moveChild(item,x,y); | 1270 | moveChild(item,x,y); |
1271 | } | 1271 | } |
1272 | } | 1272 | } |
1273 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1273 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1274 | if ( !item->isVisible() ) | 1274 | if ( !item->isVisible() ) |
1275 | item->show(); | 1275 | item->show(); |
1276 | 1276 | ||
1277 | } | 1277 | } |
1278 | globalFlagBlockAgendaItemUpdate = 0; | 1278 | globalFlagBlockAgendaItemUpdate = 0; |
1279 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1279 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1280 | item->repaintMe( ); | 1280 | item->repaintMe( ); |
1281 | } | 1281 | } |
1282 | globalFlagBlockAgendaItemUpdate = 1; | 1282 | globalFlagBlockAgendaItemUpdate = 1; |
1283 | qApp->processEvents(); | 1283 | qApp->processEvents(); |
1284 | globalFlagBlockAgendaItemPaint = 0; | 1284 | globalFlagBlockAgendaItemPaint = 0; |
1285 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1285 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1286 | item->repaint( false ); | 1286 | item->repaint( false ); |
1287 | } | 1287 | } |
1288 | 1288 | ||
1289 | } | 1289 | } |
1290 | 1290 | ||
1291 | /* | 1291 | /* |
1292 | Draw grid in the background of the agenda. | 1292 | Draw grid in the background of the agenda. |
1293 | */ | 1293 | */ |
1294 | void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// int cx, int cy, int cw, int ch) | 1294 | void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// int cx, int cy, int cw, int ch) |
1295 | { | 1295 | { |
1296 | 1296 | ||
1297 | 1297 | ||
1298 | if ( ! mGridSpacingX || ! mGridSpacingY ||! mHolidayMask ) | 1298 | if ( ! mGridSpacingX || ! mGridSpacingY ||! mHolidayMask ) |
1299 | return; | 1299 | return; |
1300 | if ( globalFlagBlockAgenda > 1 && globalFlagBlockAgenda < 4 ) | 1300 | if ( globalFlagBlockAgenda > 1 && globalFlagBlockAgenda < 4 ) |
1301 | return; | 1301 | return; |
1302 | int cx = 0, cy = 0, cw = contentsWidth(), ch = contentsHeight(); | 1302 | int cx = 0, cy = 0, cw = contentsWidth(), ch = contentsHeight(); |
1303 | if ( ch < 1 ) | 1303 | if ( ch < 1 ) |
1304 | ch = 1; | 1304 | ch = 1; |
1305 | if ( mPaintPixmap.width() < contentsWidth()+42 || mPaintPixmap.height() < ch ) { | 1305 | if ( mPaintPixmap.width() < contentsWidth()+42 || mPaintPixmap.height() < ch ) { |
1306 | mPaintPixmap.resize( contentsWidth()+42, ch ); | 1306 | mPaintPixmap.resize( contentsWidth()+42, ch ); |
1307 | } | 1307 | } |
1308 | mCurPixWid = contentsWidth(); | 1308 | mCurPixWid = contentsWidth(); |
1309 | mCurPixHei = ch; | 1309 | mCurPixHei = ch; |
1310 | if ( mHighlightPixmap.width() < mGridSpacingX-1 || mHighlightPixmap.height() < ch ) { | 1310 | if ( mHighlightPixmap.width() < mGridSpacingX-1 || mHighlightPixmap.height() < ch ) { |
1311 | mHighlightPixmap.resize( mGridSpacingX-1, ch ); | 1311 | mHighlightPixmap.resize( mGridSpacingX-1, ch ); |
1312 | mHighlightPixmap.fill ( KOPrefs::instance()->mHighlightColor ); | 1312 | mHighlightPixmap.fill ( KOPrefs::instance()->mHighlightColor ); |
1313 | } | 1313 | } |
1314 | mPixPainter.begin( &mPaintPixmap) ; | 1314 | mPixPainter.begin( &mPaintPixmap) ; |
1315 | //qDebug("wid %d hei %d ",mPaintPixmap.width(),mPaintPixmap.height() ); | 1315 | //qDebug("wid %d hei %d ",mPaintPixmap.width(),mPaintPixmap.height() ); |
1316 | QPainter * p ; | 1316 | QPainter * p ; |
1317 | if (paint == 0) { | 1317 | if (paint == 0) { |
1318 | mPaintPixmap.fill(KOPrefs::instance()->mAgendaBgColor); | 1318 | mPaintPixmap.fill(KOPrefs::instance()->mAgendaBgColor); |
1319 | p = &mPixPainter; | 1319 | p = &mPixPainter; |
1320 | } | 1320 | } |
1321 | else | 1321 | else |
1322 | p = paint ; | 1322 | p = paint ; |
1323 | // qDebug("++++++KOAgenda::drawContentsTo Painter %d %d %d %d ", cx, cy, cw, ch); | 1323 | // qDebug("++++++KOAgenda::drawContentsTo Painter %d %d %d %d ", cx, cy, cw, ch); |
1324 | 1324 | ||
1325 | //--cx;++cw; | 1325 | //--cx;++cw; |
1326 | int lGridSpacingY = mGridSpacingY*2; | 1326 | int lGridSpacingY = mGridSpacingY*2; |
1327 | int selDay; | 1327 | int selDay; |
1328 | if ( !backgroundOnly ) | 1328 | if ( !backgroundOnly ) |
1329 | for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) | 1329 | for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) |
1330 | { | 1330 | { |
1331 | if ( mSelectedDates[selDay] == QDateTime::currentDateTime ().date() && KOPrefs::instance()->mHighlightCurrentDay) { | 1331 | if ( mSelectedDates[selDay] == QDateTime::currentDateTime ().date() && KOPrefs::instance()->mHighlightCurrentDay) { |
1332 | int x1 = cx; | 1332 | int x1 = cx; |
1333 | int y1 = 0; | 1333 | int y1 = 0; |
1334 | if (y1 < cy) y1 = cy; | 1334 | if (y1 < cy) y1 = cy; |
1335 | int x2 = cx+cw-1; | 1335 | int x2 = cx+cw-1; |
1336 | int y2 = contentsHeight(); | 1336 | int y2 = contentsHeight(); |
1337 | if (y2 > cy+ch-1) y2=cy+ch-1; | 1337 | if (y2 > cy+ch-1) y2=cy+ch-1; |
1338 | if (x2 >= x1 && y2 >= y1) { | 1338 | if (x2 >= x1 && y2 >= y1) { |
1339 | int gxStart = selDay; | 1339 | int gxStart = selDay; |
1340 | int gxEnd = gxStart ; | 1340 | int gxEnd = gxStart ; |
1341 | int xStart = KOGlobals::self()->reverseLayout() ? | 1341 | int xStart = KOGlobals::self()->reverseLayout() ? |
1342 | (mColumns - 1 - gxStart)*mGridSpacingX : | 1342 | (mColumns - 1 - gxStart)*mGridSpacingX : |
1343 | gxStart*mGridSpacingX; | 1343 | gxStart*mGridSpacingX; |
1344 | if (xStart < x1) xStart = x1; | 1344 | if (xStart < x1) xStart = x1; |
1345 | int xEnd = KOGlobals::self()->reverseLayout() ? | 1345 | int xEnd = KOGlobals::self()->reverseLayout() ? |
1346 | (mColumns - gxStart)*mGridSpacingX-1 : | 1346 | (mColumns - gxStart)*mGridSpacingX-1 : |
1347 | (gxStart+1)*mGridSpacingX-1; | 1347 | (gxStart+1)*mGridSpacingX-1; |
1348 | if (xEnd > x2) xEnd = x2; | 1348 | if (xEnd > x2) xEnd = x2; |
1349 | if ( KOPrefs::instance()->mUseHighlightLightColor ) | 1349 | if ( KOPrefs::instance()->mUseHighlightLightColor ) |
1350 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, | 1350 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, |
1351 | KOPrefs::instance()->mAgendaBgColor.light()); | 1351 | KOPrefs::instance()->mAgendaBgColor.light()); |
1352 | else | 1352 | else |
1353 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, | 1353 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, |
1354 | KOPrefs::instance()->mAgendaBgColor.dark()); | 1354 | KOPrefs::instance()->mAgendaBgColor.dark()); |
1355 | 1355 | ||
1356 | } | 1356 | } |
1357 | } | 1357 | } |
1358 | } | 1358 | } |
1359 | // Highlight working hours | 1359 | // Highlight working hours |
1360 | 1360 | ||
1361 | if ( !backgroundOnly ) | 1361 | if ( !backgroundOnly ) |
1362 | if (mWorkingHoursEnable) { | 1362 | if (mWorkingHoursEnable) { |
1363 | int x1 = cx; | 1363 | int x1 = cx; |
1364 | int y1 = mWorkingHoursYTop; | 1364 | int y1 = mWorkingHoursYTop; |
1365 | if (y1 < cy) y1 = cy; | 1365 | if (y1 < cy) y1 = cy; |
1366 | int x2 = cx+cw-1; | 1366 | int x2 = cx+cw-1; |
1367 | // int x2 = mGridSpacingX * 5 - 1; | 1367 | // int x2 = mGridSpacingX * 5 - 1; |
1368 | // if (x2 > cx+cw-1) x2 = cx + cw - 1; | 1368 | // if (x2 > cx+cw-1) x2 = cx + cw - 1; |
1369 | int y2 = mWorkingHoursYBottom; | 1369 | int y2 = mWorkingHoursYBottom; |
1370 | if (y2 > cy+ch-1) y2=cy+ch-1; | 1370 | if (y2 > cy+ch-1) y2=cy+ch-1; |
1371 | 1371 | ||
1372 | if (x2 >= x1 && y2 >= y1) { | 1372 | if (x2 >= x1 && y2 >= y1) { |
1373 | // qDebug("x1 %d mGridSpacingX %d ", x1, mGridSpacingX ); | 1373 | // qDebug("x1 %d mGridSpacingX %d ", x1, mGridSpacingX ); |
1374 | int gxStart = x1/mGridSpacingX; | 1374 | int gxStart = x1/mGridSpacingX; |
1375 | int gxEnd = x2/mGridSpacingX; | 1375 | int gxEnd = x2/mGridSpacingX; |
1376 | while(gxStart <= gxEnd) { | 1376 | while(gxStart <= gxEnd) { |
1377 | if (gxStart < int(mHolidayMask->count()) && | 1377 | if (gxStart < int(mHolidayMask->count()) && |
1378 | !mHolidayMask->at(gxStart)) { | 1378 | !mHolidayMask->at(gxStart)) { |
1379 | int xStart = KOGlobals::self()->reverseLayout() ? | 1379 | int xStart = KOGlobals::self()->reverseLayout() ? |
1380 | (mColumns - 1 - gxStart)*mGridSpacingX : | 1380 | (mColumns - 1 - gxStart)*mGridSpacingX : |
1381 | gxStart*mGridSpacingX; | 1381 | gxStart*mGridSpacingX; |
1382 | if (xStart < x1) xStart = x1; | 1382 | if (xStart < x1) xStart = x1; |
1383 | int xEnd = KOGlobals::self()->reverseLayout() ? | 1383 | int xEnd = KOGlobals::self()->reverseLayout() ? |
1384 | (mColumns - gxStart)*mGridSpacingX-1 : | 1384 | (mColumns - gxStart)*mGridSpacingX-1 : |
1385 | (gxStart+1)*mGridSpacingX-1; | 1385 | (gxStart+1)*mGridSpacingX-1; |
1386 | if (xEnd > x2) xEnd = x2; | 1386 | if (xEnd > x2) xEnd = x2; |
1387 | if ( mSelectedDates[gxStart] == QDateTime::currentDateTime ().date()&& KOPrefs::instance()->mHighlightCurrentDay ) { | 1387 | if ( mSelectedDates[gxStart] == QDateTime::currentDateTime ().date()&& KOPrefs::instance()->mHighlightCurrentDay ) { |
1388 | if ( KOPrefs::instance()->mUseHighlightLightColor ) | 1388 | if ( KOPrefs::instance()->mUseHighlightLightColor ) |
1389 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, | 1389 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, |
1390 | KOPrefs::instance()->mWorkingHoursColor.light()); | 1390 | KOPrefs::instance()->mWorkingHoursColor.light()); |
1391 | else | 1391 | else |
1392 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, | 1392 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, |
1393 | KOPrefs::instance()->mWorkingHoursColor.dark()); | 1393 | KOPrefs::instance()->mWorkingHoursColor.dark()); |
1394 | } else { | 1394 | } else { |
1395 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, | 1395 | p->fillRect(xStart,y1,xEnd-xStart+1,y2-y1+1, |
1396 | KOPrefs::instance()->mWorkingHoursColor); | 1396 | KOPrefs::instance()->mWorkingHoursColor); |
1397 | } | 1397 | } |
1398 | } | 1398 | } |
1399 | ++gxStart; | 1399 | ++gxStart; |
1400 | } | 1400 | } |
1401 | } | 1401 | } |
1402 | } | 1402 | } |
1403 | /* | 1403 | /* |
1404 | int selectionX = KOGlobals::self()->reverseLayout() ? | 1404 | int selectionX = KOGlobals::self()->reverseLayout() ? |
1405 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : | 1405 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : |
1406 | mSelectionCellX * mGridSpacingX; | 1406 | mSelectionCellX * mGridSpacingX; |
1407 | 1407 | ||
1408 | // Draw selection | 1408 | // Draw selection |
1409 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && | 1409 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && |
1410 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { | 1410 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { |
1411 | // TODO: paint only part within cx,cy,cw,ch | 1411 | // TODO: paint only part within cx,cy,cw,ch |
1412 | p->fillRect( selectionX, mSelectionYTop, mGridSpacingX, | 1412 | p->fillRect( selectionX, mSelectionYTop, mGridSpacingX, |
1413 | mSelectionHeight, KOPrefs::instance()->mHighlightColor ); | 1413 | mSelectionHeight, KOPrefs::instance()->mHighlightColor ); |
1414 | } | 1414 | } |
1415 | */ | 1415 | */ |
1416 | // Draw vertical lines of grid | 1416 | // Draw vertical lines of grid |
1417 | 1417 | ||
1418 | int x = ((int)(cx/mGridSpacingX))*mGridSpacingX; | 1418 | int x = ((int)(cx/mGridSpacingX))*mGridSpacingX; |
1419 | if ( mGridSpacingX > 0 ) { | 1419 | if ( mGridSpacingX > 0 ) { |
1420 | while (x < cx + cw) { | 1420 | while (x < cx + cw) { |
1421 | p->drawLine(x,cy,x,cy+ch); | 1421 | p->drawLine(x,cy,x,cy+ch); |
1422 | x+=mGridSpacingX; | 1422 | x+=mGridSpacingX; |
1423 | } | 1423 | } |
1424 | } | 1424 | } |
1425 | // Draw horizontal lines of grid | 1425 | // Draw horizontal lines of grid |
1426 | int y = ((int)(cy/lGridSpacingY))*lGridSpacingY; | 1426 | int y = ((int)(cy/lGridSpacingY))*lGridSpacingY; |
1427 | if ( lGridSpacingY > 0 ) { | 1427 | if ( lGridSpacingY > 0 ) { |
1428 | while (y < cy + ch) { | 1428 | while (y < cy + ch) { |
1429 | p->setPen( SolidLine ); | 1429 | p->setPen( SolidLine ); |
1430 | p->drawLine(cx,y,cx+cw,y); | 1430 | p->drawLine(cx,y,cx+cw,y); |
1431 | y+=lGridSpacingY; | 1431 | y+=lGridSpacingY; |
1432 | p->setPen( DotLine ); | 1432 | p->setPen( DotLine ); |
1433 | p->drawLine(cx,y,cx+cw,y); | 1433 | p->drawLine(cx,y,cx+cw,y); |
1434 | y+=lGridSpacingY; | 1434 | y+=lGridSpacingY; |
1435 | } | 1435 | } |
1436 | p->setPen( SolidLine ); | 1436 | p->setPen( SolidLine ); |
1437 | } | 1437 | } |
1438 | mPixPainter.end() ; | 1438 | mPixPainter.end() ; |
1439 | } | 1439 | } |
1440 | 1440 | ||
1441 | /* | 1441 | /* |
1442 | Convert srcollview contents coordinates to agenda grid coordinates. | 1442 | Convert srcollview contents coordinates to agenda grid coordinates. |
1443 | */ | 1443 | */ |
1444 | void KOAgenda::contentsToGrid (int x, int y, int& gx, int& gy) | 1444 | void KOAgenda::contentsToGrid (int x, int y, int& gx, int& gy) |
1445 | { | 1445 | { |
1446 | gx = KOGlobals::self()->reverseLayout() ? mColumns - 1 - x/mGridSpacingX : | 1446 | gx = KOGlobals::self()->reverseLayout() ? mColumns - 1 - x/mGridSpacingX : |
1447 | x/mGridSpacingX; | 1447 | x/mGridSpacingX; |
1448 | gy = y/mGridSpacingY; | 1448 | gy = y/mGridSpacingY; |
1449 | } | 1449 | } |
1450 | 1450 | ||
1451 | /* | 1451 | /* |
1452 | Convert agenda grid coordinates to scrollview contents coordinates. | 1452 | Convert agenda grid coordinates to scrollview contents coordinates. |
1453 | */ | 1453 | */ |
1454 | void KOAgenda::gridToContents (int gx, int gy, int& x, int& y) | 1454 | void KOAgenda::gridToContents (int gx, int gy, int& x, int& y) |
1455 | { | 1455 | { |
1456 | x = KOGlobals::self()->reverseLayout() ? (mColumns - 1 - gx)*mGridSpacingX: | 1456 | x = KOGlobals::self()->reverseLayout() ? (mColumns - 1 - gx)*mGridSpacingX: |
1457 | gx*mGridSpacingX; | 1457 | gx*mGridSpacingX; |
1458 | y = gy*mGridSpacingY; | 1458 | y = gy*mGridSpacingY; |
1459 | } | 1459 | } |
1460 | 1460 | ||
1461 | 1461 | ||
1462 | /* | 1462 | /* |
1463 | Return Y coordinate corresponding to time. Coordinates are rounded to fit into | 1463 | Return Y coordinate corresponding to time. Coordinates are rounded to fit into |
1464 | the grid. | 1464 | the grid. |
1465 | */ | 1465 | */ |
1466 | int KOAgenda::timeToY(const QTime &time) | 1466 | int KOAgenda::timeToY(const QTime &time) |
1467 | { | 1467 | { |
1468 | int minutesPerCell = 24 * 60 / mRows; | 1468 | int minutesPerCell = 24 * 60 / mRows; |
1469 | int timeMinutes = time.hour() * 60 + time.minute(); | 1469 | int timeMinutes = time.hour() * 60 + time.minute(); |
1470 | int Y = (timeMinutes + (minutesPerCell / 2)) / minutesPerCell; | 1470 | int Y = (timeMinutes + (minutesPerCell / 2)) / minutesPerCell; |
1471 | return Y; | 1471 | return Y; |
1472 | } | 1472 | } |
1473 | 1473 | ||
1474 | 1474 | ||
1475 | /* | 1475 | /* |
1476 | Return time corresponding to cell y coordinate. Coordinates are rounded to | 1476 | Return time corresponding to cell y coordinate. Coordinates are rounded to |
1477 | fit into the grid. | 1477 | fit into the grid. |
1478 | */ | 1478 | */ |
1479 | QTime KOAgenda::gyToTime(int gy) | 1479 | QTime KOAgenda::gyToTime(int gy) |
1480 | { | 1480 | { |
1481 | 1481 | ||
1482 | int secondsPerCell = 24 * 60 * 60/ mRows; | 1482 | int secondsPerCell = 24 * 60 * 60/ mRows; |
1483 | 1483 | ||
1484 | int timeSeconds = secondsPerCell * gy; | 1484 | int timeSeconds = secondsPerCell * gy; |
1485 | 1485 | ||
1486 | QTime time( 0, 0, 0 ); | 1486 | QTime time( 0, 0, 0 ); |
1487 | if ( timeSeconds < 24 * 60 * 60 ) { | 1487 | if ( timeSeconds < 24 * 60 * 60 ) { |
1488 | time = time.addSecs(timeSeconds); | 1488 | time = time.addSecs(timeSeconds); |
1489 | } else { | 1489 | } else { |
1490 | time.setHMS( 23, 59, 59 ); | 1490 | time.setHMS( 23, 59, 59 ); |
1491 | } | 1491 | } |
1492 | 1492 | ||
1493 | return time; | 1493 | return time; |
1494 | } | 1494 | } |
1495 | 1495 | ||
1496 | void KOAgenda::setStartHour(int startHour) | 1496 | void KOAgenda::setStartHour(int startHour) |
1497 | { | 1497 | { |
1498 | int startCell = startHour * mRows / 24; | 1498 | int startCell = startHour * mRows / 24; |
1499 | setContentsPos(0,startCell * gridSpacingY()); | 1499 | setContentsPos(0,startCell * gridSpacingY()); |
1500 | } | 1500 | } |
1501 | void KOAgenda::hideUnused() | 1501 | void KOAgenda::hideUnused() |
1502 | { | 1502 | { |
1503 | // experimental only | 1503 | // experimental only |
1504 | // return; | 1504 | // return; |
1505 | KOAgendaItem *item; | 1505 | KOAgendaItem *item; |
1506 | for ( item=mUnusedItems.first(); item != 0; item=mUnusedItems.next() ) { | 1506 | for ( item=mUnusedItems.first(); item != 0; item=mUnusedItems.next() ) { |
1507 | item->hide(); | 1507 | item->hide(); |
1508 | } | 1508 | } |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | 1511 | ||
1512 | KOAgendaItem *KOAgenda::getNewItem(Incidence * event,QDate qd, QWidget* view) | 1512 | KOAgendaItem *KOAgenda::getNewItem(Incidence * event,QDate qd, QWidget* view) |
1513 | { | 1513 | { |
1514 | 1514 | ||
1515 | KOAgendaItem *fi; | 1515 | KOAgendaItem *fi; |
1516 | for ( fi=mUnusedItems.first(); fi != 0; fi=mUnusedItems.next() ) { | 1516 | for ( fi=mUnusedItems.first(); fi != 0; fi=mUnusedItems.next() ) { |
1517 | if ( fi->incidence() == event ) { | 1517 | if ( fi->incidence() == event ) { |
1518 | mUnusedItems.remove(); | 1518 | mUnusedItems.remove(); |
1519 | fi->init( event, qd ); | 1519 | fi->init( event, qd ); |
1520 | return fi; | 1520 | return fi; |
1521 | } | 1521 | } |
1522 | } | 1522 | } |
1523 | fi=mUnusedItems.first(); | 1523 | fi=mUnusedItems.first(); |
1524 | if ( fi ) { | 1524 | if ( fi ) { |
1525 | mUnusedItems.remove(); | 1525 | mUnusedItems.remove(); |
1526 | fi->init( event, qd ); | 1526 | fi->init( event, qd ); |
1527 | return fi; | 1527 | return fi; |
1528 | } | 1528 | } |
1529 | // qDebug("new KOAgendaItem "); | 1529 | // qDebug("new KOAgendaItem "); |
1530 | 1530 | ||
1531 | KOAgendaItem* agendaItem = new KOAgendaItem( event, qd, view, mAllDayMode ); | 1531 | KOAgendaItem* agendaItem = new KOAgendaItem( event, qd, view, mAllDayMode ); |
1532 | agendaItem->installEventFilter(this); | 1532 | agendaItem->installEventFilter(this); |
1533 | addChild(agendaItem,0,0); | 1533 | addChild(agendaItem,0,0); |
1534 | return agendaItem; | 1534 | return agendaItem; |
1535 | } | 1535 | } |
1536 | KOAgendaItem * KOAgenda::getItemForTodo ( Todo * todo ) | 1536 | KOAgendaItem * KOAgenda::getItemForTodo ( Todo * todo ) |
1537 | { | 1537 | { |
1538 | KOAgendaItem *item; | 1538 | KOAgendaItem *item; |
1539 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1539 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1540 | if ( item->incidence() == todo ) { | 1540 | if ( item->incidence() == todo ) { |
1541 | mItems.remove(); | 1541 | mItems.remove(); |
1542 | return item; | 1542 | return item; |
1543 | } | 1543 | } |
1544 | } | 1544 | } |
1545 | return 0; | 1545 | return 0; |
1546 | } | 1546 | } |
1547 | 1547 | ||
1548 | 1548 | ||
1549 | void KOAgenda::updateTodo( Todo * todo, int days, bool remove) | 1549 | void KOAgenda::updateTodo( Todo * todo, int days, bool remove) |
1550 | { | 1550 | { |
1551 | // ( todo->hasCompletedDate() && todo->completed().date() == currentDate )|| | 1551 | // ( todo->hasCompletedDate() && todo->completed().date() == currentDate )|| |
1552 | KOAgendaItem *item; | 1552 | KOAgendaItem *item; |
1553 | item = getItemForTodo ( todo ); | 1553 | item = getItemForTodo ( todo ); |
1554 | //qDebug("KOAgenda::updateTodo %d %d %d %d", this, todo, days, remove); | 1554 | //qDebug("KOAgenda::updateTodo %d %d %d %d", this, todo, days, remove); |
1555 | if ( item ) { | 1555 | if ( item ) { |
1556 | blockSignals( true ); | 1556 | blockSignals( true ); |
1557 | //qDebug("item found "); | 1557 | //qDebug("item found "); |
1558 | item->hide(); | 1558 | item->hide(); |
1559 | item->setCellX(-2, -1 ); | 1559 | item->setCellX(-2, -1 ); |
1560 | item->select(false); | 1560 | item->select(false); |
1561 | mUnusedItems.append( item ); | 1561 | mUnusedItems.append( item ); |
1562 | mItems.remove( item ); | 1562 | mItems.remove( item ); |
1563 | QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); | 1563 | QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); |
1564 | KOAgendaItem *itemit; | 1564 | KOAgendaItem *itemit; |
1565 | //globalFlagBlockAgendaItemPaint = 1; | 1565 | //globalFlagBlockAgendaItemPaint = 1; |
1566 | for ( itemit=oldconflictItems.first(); itemit != 0; | 1566 | for ( itemit=oldconflictItems.first(); itemit != 0; |
1567 | itemit=oldconflictItems.next() ) { | 1567 | itemit=oldconflictItems.next() ) { |
1568 | if ( itemit != item ) | 1568 | if ( itemit != item ) |
1569 | placeSubCells(itemit); | 1569 | placeSubCells(itemit); |
1570 | } | 1570 | } |
1571 | qApp->processEvents(); | 1571 | qApp->processEvents(); |
1572 | //globalFlagBlockAgendaItemPaint = 0; | 1572 | //globalFlagBlockAgendaItemPaint = 0; |
1573 | for ( itemit=oldconflictItems.first(); itemit != 0; | 1573 | for ( itemit=oldconflictItems.first(); itemit != 0; |
1574 | itemit=oldconflictItems.next() ) { | 1574 | itemit=oldconflictItems.next() ) { |
1575 | globalFlagBlockAgendaItemUpdate = 0; | 1575 | globalFlagBlockAgendaItemUpdate = 0; |
1576 | if ( itemit != item ) | 1576 | if ( itemit != item ) |
1577 | itemit->repaintMe(); | 1577 | itemit->repaintMe(); |
1578 | globalFlagBlockAgendaItemUpdate = 1; | 1578 | globalFlagBlockAgendaItemUpdate = 1; |
1579 | itemit->repaint(); | 1579 | itemit->repaint(); |
1580 | } | 1580 | } |
1581 | blockSignals( false ); | 1581 | blockSignals( false ); |
1582 | } | 1582 | } |
1583 | if ( remove ) { | 1583 | if ( remove ) { |
1584 | //qDebug("remove****************************************** "); | 1584 | //qDebug("remove****************************************** "); |
1585 | return; | 1585 | return; |
1586 | } | 1586 | } |
1587 | if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda ) | ||
1588 | return; | ||
1587 | //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); | 1589 | //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); |
1588 | bool overdue = (!todo->isCompleted()) && (todo->dtDue() < QDate::currentDate())&& ( KOPrefs::instance()->mShowTodoInAgenda ); | 1590 | bool overdue = (!todo->isCompleted()) && (todo->dtDue() < QDate::currentDate())&& ( KOPrefs::instance()->mShowTodoInAgenda ); |
1589 | QDate currentDate; | 1591 | QDate currentDate; |
1590 | QDateTime dt; | 1592 | QDateTime dt; |
1591 | if ( todo->hasCompletedDate() ) | 1593 | if ( todo->hasCompletedDate() ) |
1592 | dt = todo->completed(); | 1594 | dt = todo->completed(); |
1593 | else | 1595 | else |
1594 | dt = todo->dtDue(); | 1596 | dt = todo->dtDue(); |
1595 | if ( overdue ) { | 1597 | if ( overdue ) { |
1596 | currentDate = QDate::currentDate(); | 1598 | currentDate = QDate::currentDate(); |
1597 | days += todo->dtDue().date().daysTo( currentDate ); | 1599 | days += todo->dtDue().date().daysTo( currentDate ); |
1598 | } | 1600 | } |
1599 | else | 1601 | else |
1600 | currentDate = dt.date(); | 1602 | currentDate = dt.date(); |
1601 | 1603 | ||
1602 | if (( todo->doesFloat() || overdue) && !todo->hasCompletedDate() ) { | 1604 | if (( todo->doesFloat() || overdue) && !todo->hasCompletedDate() ) { |
1603 | if ( ! mAllDayMode ) return; | 1605 | if ( ! mAllDayMode ) return; |
1604 | // aldayagenda | 1606 | // aldayagenda |
1605 | globalFlagBlockAgendaItemPaint = 1; | 1607 | globalFlagBlockAgendaItemPaint = 1; |
1606 | item = insertAllDayItem(todo, currentDate,days, days); | 1608 | item = insertAllDayItem(todo, currentDate,days, days); |
1607 | item->show(); | 1609 | item->show(); |
1608 | 1610 | ||
1609 | } | 1611 | } |
1610 | else { | 1612 | else { |
1611 | if ( mAllDayMode ) return; | 1613 | if ( mAllDayMode ) return; |
1612 | // mAgenda | 1614 | // mAgenda |
1613 | globalFlagBlockAgendaItemPaint = 1; | 1615 | globalFlagBlockAgendaItemPaint = 1; |
1614 | int endY = timeToY(dt.time()) - 1; | 1616 | int endY = timeToY(dt.time()) - 1; |
1615 | int hi = 12/KOPrefs::instance()->mHourSize; | 1617 | int hi = 12/KOPrefs::instance()->mHourSize; |
1616 | int startY = endY - 1-hi; | 1618 | int startY = endY - 1-hi; |
1617 | item = insertItem(todo,currentDate,days,startY,endY); | 1619 | item = insertItem(todo,currentDate,days,startY,endY); |
1618 | item->show(); | 1620 | item->show(); |
1619 | } | 1621 | } |
1620 | qApp->processEvents(); | 1622 | qApp->processEvents(); |
1621 | globalFlagBlockAgendaItemPaint = 0; | 1623 | globalFlagBlockAgendaItemPaint = 0; |
1622 | QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); | 1624 | QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); |
1623 | KOAgendaItem *itemit; | 1625 | KOAgendaItem *itemit; |
1624 | for ( itemit=oldconflictItems.first(); itemit != 0; | 1626 | for ( itemit=oldconflictItems.first(); itemit != 0; |
1625 | itemit=oldconflictItems.next() ) { | 1627 | itemit=oldconflictItems.next() ) { |
1626 | globalFlagBlockAgendaItemUpdate = 0; | 1628 | globalFlagBlockAgendaItemUpdate = 0; |
1627 | itemit->repaintMe(); | 1629 | itemit->repaintMe(); |
1628 | globalFlagBlockAgendaItemUpdate = 1; | 1630 | globalFlagBlockAgendaItemUpdate = 1; |
1629 | itemit->repaint(); | 1631 | itemit->repaint(); |
1630 | } | 1632 | } |
1631 | globalFlagBlockAgendaItemUpdate = 0; | 1633 | globalFlagBlockAgendaItemUpdate = 0; |
1632 | item->repaintMe(); | 1634 | item->repaintMe(); |
1633 | globalFlagBlockAgendaItemUpdate = 1; | 1635 | globalFlagBlockAgendaItemUpdate = 1; |
1634 | item->repaint(); | 1636 | item->repaint(); |
1635 | } | 1637 | } |
1636 | /* | 1638 | /* |
1637 | Insert KOAgendaItem into agenda. | 1639 | Insert KOAgendaItem into agenda. |
1638 | */ | 1640 | */ |
1639 | KOAgendaItem *KOAgenda::insertItem (Incidence *event,QDate qd,int X,int YTop,int YBottom) | 1641 | KOAgendaItem *KOAgenda::insertItem (Incidence *event,QDate qd,int X,int YTop,int YBottom) |
1640 | { | 1642 | { |
1641 | if (mAllDayMode) { | 1643 | if (mAllDayMode) { |
1642 | qDebug("KOAgenda: calling insertItem in all-day mode is illegal. "); | 1644 | qDebug("KOAgenda: calling insertItem in all-day mode is illegal. "); |
1643 | return 0; | 1645 | return 0; |
1644 | } | 1646 | } |
1645 | 1647 | ||
1646 | KOAgendaItem *agendaItem = getNewItem(event,qd,viewport()); | 1648 | KOAgendaItem *agendaItem = getNewItem(event,qd,viewport()); |
1647 | //agendaItem->setFrameStyle(WinPanel|Raised); | 1649 | //agendaItem->setFrameStyle(WinPanel|Raised); |
1648 | 1650 | ||
1649 | int YSize = YBottom - YTop + 1; | 1651 | int YSize = YBottom - YTop + 1; |
1650 | if (YSize < 0) { | 1652 | if (YSize < 0) { |
1651 | YSize = 1; | 1653 | YSize = 1; |
1652 | } | 1654 | } |
1653 | int iheight = mGridSpacingY * YSize; | 1655 | int iheight = mGridSpacingY * YSize; |
1654 | 1656 | ||
1655 | agendaItem->resize(mGridSpacingX,iheight ); | 1657 | agendaItem->resize(mGridSpacingX,iheight ); |
1656 | agendaItem->setCellXY(X,YTop,YBottom); | 1658 | agendaItem->setCellXY(X,YTop,YBottom); |
1657 | agendaItem->setCellXWidth(X); | 1659 | agendaItem->setCellXWidth(X); |
1658 | 1660 | ||
1659 | //addChild(agendaItem,X*mGridSpacingX,YTop*mGridSpacingY); | 1661 | //addChild(agendaItem,X*mGridSpacingX,YTop*mGridSpacingY); |
1660 | mItems.append(agendaItem); | 1662 | mItems.append(agendaItem); |
1661 | 1663 | ||
1662 | placeSubCells(agendaItem); | 1664 | placeSubCells(agendaItem); |
1663 | 1665 | ||
1664 | //agendaItem->show(); | 1666 | //agendaItem->show(); |
1665 | 1667 | ||
1666 | marcus_bains(); | 1668 | marcus_bains(); |
1667 | 1669 | ||
1668 | return agendaItem; | 1670 | return agendaItem; |
1669 | } | 1671 | } |
1670 | 1672 | ||
1671 | 1673 | ||
1672 | /* | 1674 | /* |
1673 | Insert all-day KOAgendaItem into agenda. | 1675 | Insert all-day KOAgendaItem into agenda. |
1674 | */ | 1676 | */ |
1675 | KOAgendaItem *KOAgenda::insertAllDayItem (Incidence *event,QDate qd,int XBegin,int XEnd) | 1677 | KOAgendaItem *KOAgenda::insertAllDayItem (Incidence *event,QDate qd,int XBegin,int XEnd) |
1676 | { | 1678 | { |
1677 | if (!mAllDayMode) { | 1679 | if (!mAllDayMode) { |
1678 | return 0; | 1680 | return 0; |
1679 | } | 1681 | } |
1680 | 1682 | ||
1681 | KOAgendaItem *agendaItem = getNewItem(event,qd,viewport()); | 1683 | KOAgendaItem *agendaItem = getNewItem(event,qd,viewport()); |
1682 | 1684 | ||
1683 | agendaItem->setCellXY(XBegin,0,0); | 1685 | agendaItem->setCellXY(XBegin,0,0); |
1684 | agendaItem->setCellXWidth(XEnd); | 1686 | agendaItem->setCellXWidth(XEnd); |
1685 | agendaItem->resize(mGridSpacingX * agendaItem->cellWidth(),mGridSpacingY); | 1687 | agendaItem->resize(mGridSpacingX * agendaItem->cellWidth(),mGridSpacingY); |
1686 | 1688 | ||
1687 | //addChild(agendaItem,XBegin*mGridSpacingX,0); | 1689 | //addChild(agendaItem,XBegin*mGridSpacingX,0); |
1688 | mItems.append(agendaItem); | 1690 | mItems.append(agendaItem); |
1689 | 1691 | ||
1690 | placeSubCells(agendaItem); | 1692 | placeSubCells(agendaItem); |
1691 | 1693 | ||
1692 | //agendaItem->show(); | 1694 | //agendaItem->show(); |
1693 | 1695 | ||
1694 | return agendaItem; | 1696 | return agendaItem; |
1695 | } | 1697 | } |
1696 | 1698 | ||
1697 | 1699 | ||
1698 | void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd, | 1700 | void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd, |
1699 | int YTop,int YBottom) | 1701 | int YTop,int YBottom) |
1700 | { | 1702 | { |
1701 | if (mAllDayMode) { | 1703 | if (mAllDayMode) { |
1702 | ; | 1704 | ; |
1703 | return; | 1705 | return; |
1704 | } | 1706 | } |
1705 | 1707 | ||
1706 | int cellX,cellYTop,cellYBottom; | 1708 | int cellX,cellYTop,cellYBottom; |
1707 | QString newtext; | 1709 | QString newtext; |
1708 | int width = XEnd - XBegin + 1; | 1710 | int width = XEnd - XBegin + 1; |
1709 | int count = 0; | 1711 | int count = 0; |
1710 | KOAgendaItem *current = 0; | 1712 | KOAgendaItem *current = 0; |
1711 | QPtrList<KOAgendaItem> multiItems; | 1713 | QPtrList<KOAgendaItem> multiItems; |
1712 | for (cellX = XBegin;cellX <= XEnd;++cellX) { | 1714 | for (cellX = XBegin;cellX <= XEnd;++cellX) { |
1713 | if (cellX == XBegin) cellYTop = YTop; | 1715 | if (cellX == XBegin) cellYTop = YTop; |
1714 | else cellYTop = 0; | 1716 | else cellYTop = 0; |
1715 | if (cellX == XEnd) cellYBottom = YBottom; | 1717 | if (cellX == XEnd) cellYBottom = YBottom; |
1716 | else cellYBottom = rows() - 1; | 1718 | else cellYBottom = rows() - 1; |
1717 | newtext = QString("(%1/%2): ").arg(++count).arg(width); | 1719 | newtext = QString("(%1/%2): ").arg(++count).arg(width); |
1718 | newtext.append(event->summary()); | 1720 | newtext.append(event->summary()); |
1719 | current = insertItem(event,qd,cellX,cellYTop,cellYBottom); | 1721 | current = insertItem(event,qd,cellX,cellYTop,cellYBottom); |
1720 | current->setText(newtext); | 1722 | current->setText(newtext); |
1721 | multiItems.append(current); | 1723 | multiItems.append(current); |
1722 | } | 1724 | } |
1723 | 1725 | ||
1724 | KOAgendaItem *next = 0; | 1726 | KOAgendaItem *next = 0; |
1725 | KOAgendaItem *last = multiItems.last(); | 1727 | KOAgendaItem *last = multiItems.last(); |
1726 | KOAgendaItem *first = multiItems.first(); | 1728 | KOAgendaItem *first = multiItems.first(); |
1727 | KOAgendaItem *setFirst,*setLast; | 1729 | KOAgendaItem *setFirst,*setLast; |
1728 | current = first; | 1730 | current = first; |
1729 | while (current) { | 1731 | while (current) { |
1730 | next = multiItems.next(); | 1732 | next = multiItems.next(); |
1731 | if (current == first) setFirst = 0; | 1733 | if (current == first) setFirst = 0; |
1732 | else setFirst = first; | 1734 | else setFirst = first; |
1733 | if (current == last) setLast = 0; | 1735 | if (current == last) setLast = 0; |
1734 | else setLast = last; | 1736 | else setLast = last; |
1735 | 1737 | ||
1736 | current->setMultiItem(setFirst,next,setLast); | 1738 | current->setMultiItem(setFirst,next,setLast); |
1737 | current = next; | 1739 | current = next; |
1738 | } | 1740 | } |
1739 | 1741 | ||
1740 | marcus_bains(); | 1742 | marcus_bains(); |
1741 | } | 1743 | } |
1742 | 1744 | ||
1743 | 1745 | ||
1744 | //QSizePolicy KOAgenda::sizePolicy() const | 1746 | //QSizePolicy KOAgenda::sizePolicy() const |
1745 | //{ | 1747 | //{ |
1746 | // Thought this would make the all-day event agenda minimum size and the | 1748 | // Thought this would make the all-day event agenda minimum size and the |
1747 | // normal agenda take the remaining space. But it doesn´t work. The QSplitter | 1749 | // normal agenda take the remaining space. But it doesn´t work. The QSplitter |
1748 | // don´t seem to think that an Expanding widget needs more space than a | 1750 | // don´t seem to think that an Expanding widget needs more space than a |
1749 | // Preferred one. | 1751 | // Preferred one. |
1750 | // But it doesn´t hurt, so it stays. | 1752 | // But it doesn´t hurt, so it stays. |
1751 | // if (mAllDayMode) { | 1753 | // if (mAllDayMode) { |
1752 | // return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); | 1754 | // return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); |
1753 | // } else { | 1755 | // } else { |
1754 | // return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); | 1756 | // return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); |
1755 | // } | 1757 | // } |
1756 | //} | 1758 | //} |
1757 | void KOAgenda::finishResize ( ) | 1759 | void KOAgenda::finishResize ( ) |
1758 | { | 1760 | { |
1759 | //qDebug("finishResize+++++++++++++++++++++++++++++++ ( ) "); | 1761 | //qDebug("finishResize+++++++++++++++++++++++++++++++ ( ) "); |
1760 | if ( globalFlagBlockAgenda == 0 ) { | 1762 | if ( globalFlagBlockAgenda == 0 ) { |
1761 | finishUpdate(); | 1763 | finishUpdate(); |
1762 | //qDebug("finishUpdate() called "); | 1764 | //qDebug("finishUpdate() called "); |
1763 | } | 1765 | } |
1764 | } | 1766 | } |
1765 | /* | 1767 | /* |
1766 | Overridden from QScrollView to provide proper resizing of KOAgendaItems. | 1768 | Overridden from QScrollView to provide proper resizing of KOAgendaItems. |
1767 | */ | 1769 | */ |
1768 | void KOAgenda::resizeEvent ( QResizeEvent *ev ) | 1770 | void KOAgenda::resizeEvent ( QResizeEvent *ev ) |
1769 | { | 1771 | { |
1770 | mSelectionHeight = 0; | 1772 | mSelectionHeight = 0; |
1771 | mResizeTimer.start( 150 , true ); | 1773 | mResizeTimer.start( 150 , true ); |
1772 | computeSizes(); | 1774 | computeSizes(); |
1773 | return; | 1775 | return; |
1774 | 1776 | ||
1775 | } | 1777 | } |
1776 | void KOAgenda::computeSizes() | 1778 | void KOAgenda::computeSizes() |
1777 | { | 1779 | { |
1778 | if ( globalFlagBlockStartup ) | 1780 | if ( globalFlagBlockStartup ) |
1779 | return; | 1781 | return; |
1780 | int frameOffset = frameWidth() * 2 +1; | 1782 | int frameOffset = frameWidth() * 2 +1; |
1781 | if (mAllDayMode) { | 1783 | if (mAllDayMode) { |
1782 | mGridSpacingX = (width()-frameOffset) / mColumns; | 1784 | mGridSpacingX = (width()-frameOffset) / mColumns; |
1783 | mGridSpacingY = height() - 2 * frameWidth() - 1; | 1785 | mGridSpacingY = height() - 2 * frameWidth() - 1; |
1784 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY + 1); | 1786 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY + 1); |
1785 | // mGridSpacingY = height(); | 1787 | // mGridSpacingY = height(); |
1786 | // resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); | 1788 | // resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); |
1787 | 1789 | ||
1788 | KOAgendaItem *item; | 1790 | KOAgendaItem *item; |
1789 | int subCellWidth; | 1791 | int subCellWidth; |
1790 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1792 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1791 | subCellWidth = mGridSpacingY / item->subCells(); | 1793 | subCellWidth = mGridSpacingY / item->subCells(); |
1792 | item->resize(mGridSpacingX * item->cellWidth(),subCellWidth); | 1794 | item->resize(mGridSpacingX * item->cellWidth(),subCellWidth); |
1793 | moveChild(item,KOGlobals::self()->reverseLayout() ? | 1795 | moveChild(item,KOGlobals::self()->reverseLayout() ? |
1794 | (mColumns - 1 - item->cellX()) * mGridSpacingX : | 1796 | (mColumns - 1 - item->cellX()) * mGridSpacingX : |
1795 | item->cellX() * mGridSpacingX, | 1797 | item->cellX() * mGridSpacingX, |
1796 | item->subCell() * subCellWidth); | 1798 | item->subCell() * subCellWidth); |
1797 | } | 1799 | } |
1798 | KOPrefs::instance()->mAllDaySize = mGridSpacingY; | 1800 | KOPrefs::instance()->mAllDaySize = mGridSpacingY; |
1799 | } else { | 1801 | } else { |
1800 | mGridSpacingX = (width() - verticalScrollBar()->width()-frameOffset)/mColumns; | 1802 | mGridSpacingX = (width() - verticalScrollBar()->width()-frameOffset)/mColumns; |
1801 | if (height() > mGridSpacingY * mRows + 1 ) { | 1803 | if (height() > mGridSpacingY * mRows + 1 ) { |
1802 | KOPrefs::instance()->mHourSize = ((height())/mRows)+1; | 1804 | KOPrefs::instance()->mHourSize = ((height())/mRows)+1; |
1803 | mGridSpacingY = KOPrefs::instance()->mHourSize ; | 1805 | mGridSpacingY = KOPrefs::instance()->mHourSize ; |
1804 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); | 1806 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); |
1805 | emit resizedSignal(); | 1807 | emit resizedSignal(); |
1806 | } else | 1808 | } else |
1807 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); | 1809 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY * mRows + 1 ); |
1808 | KOAgendaItem *item; | 1810 | KOAgendaItem *item; |
1809 | int subCellWidth; | 1811 | int subCellWidth; |
1810 | 1812 | ||
1811 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1813 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1812 | subCellWidth = mGridSpacingX / item->subCells(); | 1814 | subCellWidth = mGridSpacingX / item->subCells(); |
1813 | item->resize(subCellWidth,item->height()); | 1815 | item->resize(subCellWidth,item->height()); |
1814 | moveChild(item,(KOGlobals::self()->reverseLayout() ? | 1816 | moveChild(item,(KOGlobals::self()->reverseLayout() ? |
1815 | (mColumns - 1 - item->cellX()) * mGridSpacingX : | 1817 | (mColumns - 1 - item->cellX()) * mGridSpacingX : |
1816 | item->cellX() * mGridSpacingX) + | 1818 | item->cellX() * mGridSpacingX) + |
1817 | item->subCell() * subCellWidth,childY(item)); | 1819 | item->subCell() * subCellWidth,childY(item)); |
1818 | } | 1820 | } |
1819 | } | 1821 | } |
1820 | int cw = contentsWidth(); | 1822 | int cw = contentsWidth(); |
1821 | int ch = contentsHeight(); | 1823 | int ch = contentsHeight(); |
1822 | if ( mAllDayMode ) { | 1824 | if ( mAllDayMode ) { |
1823 | QPixmap* paintPixAll = KOAgendaItem::paintPixAllday(); | 1825 | QPixmap* paintPixAll = KOAgendaItem::paintPixAllday(); |
1824 | if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 ) | 1826 | if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 ) |
1825 | paintPixAll->resize( cw, ch ); | 1827 | paintPixAll->resize( cw, ch ); |
1826 | } else { | 1828 | } else { |
1827 | QPixmap* paintPix = KOAgendaItem::paintPix(); | 1829 | QPixmap* paintPix = KOAgendaItem::paintPix(); |
1828 | if ( paintPix->width() < cw || paintPix->height() < ch ) | 1830 | if ( paintPix->width() < cw || paintPix->height() < ch ) |
1829 | KOAgendaItem::resizePixmap( cw , ch ); | 1831 | KOAgendaItem::resizePixmap( cw , ch ); |
1830 | } | 1832 | } |
1831 | 1833 | ||
1832 | checkScrollBoundaries(); | 1834 | checkScrollBoundaries(); |
1833 | marcus_bains(); | 1835 | marcus_bains(); |
1834 | drawContentsToPainter(); | 1836 | drawContentsToPainter(); |
1835 | viewport()->repaint(false); | 1837 | viewport()->repaint(false); |
1836 | } | 1838 | } |
1837 | 1839 | ||
1838 | void KOAgenda::scrollUp() | 1840 | void KOAgenda::scrollUp() |
1839 | { | 1841 | { |
1840 | scrollBy(0,-mScrollOffset); | 1842 | scrollBy(0,-mScrollOffset); |
1841 | } | 1843 | } |
1842 | 1844 | ||
1843 | 1845 | ||
1844 | void KOAgenda::scrollDown() | 1846 | void KOAgenda::scrollDown() |
1845 | { | 1847 | { |
1846 | scrollBy(0,mScrollOffset); | 1848 | scrollBy(0,mScrollOffset); |
1847 | } | 1849 | } |
1848 | 1850 | ||
1849 | void KOAgenda::popupAlarm() | 1851 | void KOAgenda::popupAlarm() |
1850 | { | 1852 | { |
1851 | if (!mClickedItem) { | 1853 | if (!mClickedItem) { |
1852 | qDebug("KOAgenda::popupAlarm() called without having a clicked item "); | 1854 | qDebug("KOAgenda::popupAlarm() called without having a clicked item "); |
1853 | return; | 1855 | return; |
1854 | } | 1856 | } |
1855 | // TODO: deal correctly with multiple alarms | 1857 | // TODO: deal correctly with multiple alarms |
1856 | Alarm* alarm; | 1858 | Alarm* alarm; |
1857 | QPtrList<Alarm> list(mClickedItem->incidence()->alarms()); | 1859 | QPtrList<Alarm> list(mClickedItem->incidence()->alarms()); |
1858 | for(alarm=list.first();alarm;alarm=list.next()) { | 1860 | for(alarm=list.first();alarm;alarm=list.next()) { |
1859 | alarm->toggleAlarm(); | 1861 | alarm->toggleAlarm(); |
1860 | } | 1862 | } |
1861 | emit itemModified( mClickedItem , KOGlobals::EVENTEDITED ); | 1863 | emit itemModified( mClickedItem , KOGlobals::EVENTEDITED ); |
1862 | mClickedItem->paintMe( true ); | 1864 | mClickedItem->paintMe( true ); |
1863 | mClickedItem->repaint( false ); | 1865 | mClickedItem->repaint( false ); |
1864 | } | 1866 | } |
1865 | 1867 | ||
1866 | /* | 1868 | /* |
1867 | Calculates the minimum width | 1869 | Calculates the minimum width |
1868 | */ | 1870 | */ |
1869 | int KOAgenda::minimumWidth() const | 1871 | int KOAgenda::minimumWidth() const |
1870 | { | 1872 | { |
1871 | // TODO:: develop a way to dynamically determine the minimum width | 1873 | // TODO:: develop a way to dynamically determine the minimum width |
1872 | int min = 100; | 1874 | int min = 100; |
1873 | 1875 | ||
1874 | return min; | 1876 | return min; |
1875 | } | 1877 | } |
1876 | 1878 | ||
1877 | void KOAgenda::updateConfig() | 1879 | void KOAgenda::updateConfig() |
1878 | { | 1880 | { |
1879 | if ( viewport()->backgroundColor() != KOPrefs::instance()->mAgendaBgColor) | 1881 | if ( viewport()->backgroundColor() != KOPrefs::instance()->mAgendaBgColor) |
1880 | viewport()->setBackgroundColor(KOPrefs::instance()->mAgendaBgColor); | 1882 | viewport()->setBackgroundColor(KOPrefs::instance()->mAgendaBgColor); |
1881 | if ( mAllDayMode ) { | 1883 | if ( mAllDayMode ) { |
1882 | mGridSpacingY = height() - 1 ;// KOPrefs::instance()->mAllDaySize; | 1884 | mGridSpacingY = height() - 1 ;// KOPrefs::instance()->mAllDaySize; |
1883 | //mGridSpacingY = KOPrefs::instance()->mAllDaySize; | 1885 | //mGridSpacingY = KOPrefs::instance()->mAllDaySize; |
1884 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY+1 ); | 1886 | resizeContents( mGridSpacingX * mColumns + 1 , mGridSpacingY+1 ); |
1885 | // setMaximumHeight( mGridSpacingY+1 ); | 1887 | // setMaximumHeight( mGridSpacingY+1 ); |
1886 | viewport()->repaint( false ); | 1888 | viewport()->repaint( false ); |
1887 | //setFixedHeight( mGridSpacingY+1 ); | 1889 | //setFixedHeight( mGridSpacingY+1 ); |
1888 | //qDebug("KOPrefs:aaaaa:instance()->mAllDaySize %d ", KOPrefs::instance()->mAllDaySize); | 1890 | //qDebug("KOPrefs:aaaaa:instance()->mAllDaySize %d ", KOPrefs::instance()->mAllDaySize); |
1889 | } | 1891 | } |
1890 | else { | 1892 | else { |
1891 | mGridSpacingY = KOPrefs::instance()->mHourSize; | 1893 | mGridSpacingY = KOPrefs::instance()->mHourSize; |
1892 | calculateWorkingHours(); | 1894 | calculateWorkingHours(); |
1893 | marcus_bains(); | 1895 | marcus_bains(); |
1894 | } | 1896 | } |
1895 | } | 1897 | } |
1896 | 1898 | ||
1897 | void KOAgenda::checkScrollBoundaries() | 1899 | void KOAgenda::checkScrollBoundaries() |
1898 | { | 1900 | { |
1899 | // Invalidate old values to force update | 1901 | // Invalidate old values to force update |
1900 | mOldLowerScrollValue = -1; | 1902 | mOldLowerScrollValue = -1; |
1901 | mOldUpperScrollValue = -1; | 1903 | mOldUpperScrollValue = -1; |
1902 | 1904 | ||
1903 | checkScrollBoundaries(verticalScrollBar()->value()); | 1905 | checkScrollBoundaries(verticalScrollBar()->value()); |
1904 | } | 1906 | } |
1905 | 1907 | ||
1906 | void KOAgenda::checkScrollBoundaries(int v) | 1908 | void KOAgenda::checkScrollBoundaries(int v) |
1907 | { | 1909 | { |
1908 | if ( mGridSpacingY == 0 ) | 1910 | if ( mGridSpacingY == 0 ) |
1909 | return; | 1911 | return; |
1910 | int yMin = v/mGridSpacingY; | 1912 | int yMin = v/mGridSpacingY; |
1911 | int yMax = (v+visibleHeight())/mGridSpacingY; | 1913 | int yMax = (v+visibleHeight())/mGridSpacingY; |
1912 | 1914 | ||
1913 | // kdDebug() << "--- yMin: " << yMin << " yMax: " << yMax << endl; | 1915 | // kdDebug() << "--- yMin: " << yMin << " yMax: " << yMax << endl; |
1914 | 1916 | ||
1915 | if (yMin != mOldLowerScrollValue) { | 1917 | if (yMin != mOldLowerScrollValue) { |
1916 | mOldLowerScrollValue = yMin; | 1918 | mOldLowerScrollValue = yMin; |
1917 | emit lowerYChanged(yMin); | 1919 | emit lowerYChanged(yMin); |
1918 | } | 1920 | } |
1919 | if (yMax != mOldUpperScrollValue) { | 1921 | if (yMax != mOldUpperScrollValue) { |
1920 | mOldUpperScrollValue = yMax; | 1922 | mOldUpperScrollValue = yMax; |
1921 | emit upperYChanged(yMax); | 1923 | emit upperYChanged(yMax); |
1922 | } | 1924 | } |
1923 | } | 1925 | } |
1924 | 1926 | ||
1925 | void KOAgenda::deselectItem() | 1927 | void KOAgenda::deselectItem() |
1926 | { | 1928 | { |
1927 | if (mSelectedItem.isNull()) return; | 1929 | if (mSelectedItem.isNull()) return; |
1928 | mSelectedItem->select(false); | 1930 | mSelectedItem->select(false); |
1929 | mSelectedItem = 0; | 1931 | mSelectedItem = 0; |
1930 | } | 1932 | } |
1931 | 1933 | ||
1932 | void KOAgenda::selectItem(KOAgendaItem *item) | 1934 | void KOAgenda::selectItem(KOAgendaItem *item) |
1933 | { | 1935 | { |
1934 | if ((KOAgendaItem *)mSelectedItem == item) return; | 1936 | if ((KOAgendaItem *)mSelectedItem == item) return; |
1935 | deselectItem(); | 1937 | deselectItem(); |
1936 | if (item == 0) { | 1938 | if (item == 0) { |
1937 | emit incidenceSelected( 0 ); | 1939 | emit incidenceSelected( 0 ); |
1938 | return; | 1940 | return; |
1939 | } | 1941 | } |
1940 | mSelectedItem = item; | 1942 | mSelectedItem = item; |
1941 | mSelectedItem->select(); | 1943 | mSelectedItem->select(); |
1942 | emit incidenceSelected( mSelectedItem->incidence() ); | 1944 | emit incidenceSelected( mSelectedItem->incidence() ); |
1943 | } | 1945 | } |
1944 | 1946 | ||
1945 | // This function seems never be called. | 1947 | // This function seems never be called. |
1946 | void KOAgenda::keyPressEvent( QKeyEvent *kev ) | 1948 | void KOAgenda::keyPressEvent( QKeyEvent *kev ) |
1947 | { | 1949 | { |
1948 | switch(kev->key()) { | 1950 | switch(kev->key()) { |
1949 | case Key_PageDown: | 1951 | case Key_PageDown: |
1950 | verticalScrollBar()->addPage(); | 1952 | verticalScrollBar()->addPage(); |
1951 | break; | 1953 | break; |
1952 | case Key_PageUp: | 1954 | case Key_PageUp: |
1953 | verticalScrollBar()->subtractPage(); | 1955 | verticalScrollBar()->subtractPage(); |
1954 | break; | 1956 | break; |
1955 | case Key_Down: | 1957 | case Key_Down: |
1956 | verticalScrollBar()->addLine(); | 1958 | verticalScrollBar()->addLine(); |
1957 | break; | 1959 | break; |
1958 | case Key_Up: | 1960 | case Key_Up: |
1959 | verticalScrollBar()->subtractLine(); | 1961 | verticalScrollBar()->subtractLine(); |
1960 | break; | 1962 | break; |
1961 | default: | 1963 | default: |
1962 | ; | 1964 | ; |
1963 | } | 1965 | } |
1964 | } | 1966 | } |
1965 | 1967 | ||
1966 | void KOAgenda::calculateWorkingHours() | 1968 | void KOAgenda::calculateWorkingHours() |
1967 | { | 1969 | { |
1968 | // mWorkingHoursEnable = KOPrefs::instance()->mEnableWorkingHours; | 1970 | // mWorkingHoursEnable = KOPrefs::instance()->mEnableWorkingHours; |
1969 | mWorkingHoursEnable = !mAllDayMode; | 1971 | mWorkingHoursEnable = !mAllDayMode; |
1970 | 1972 | ||
1971 | mWorkingHoursYTop = mGridSpacingY * | 1973 | mWorkingHoursYTop = mGridSpacingY * |
1972 | KOPrefs::instance()->mWorkingHoursStart * 4; | 1974 | KOPrefs::instance()->mWorkingHoursStart * 4; |
1973 | mWorkingHoursYBottom = mGridSpacingY * | 1975 | mWorkingHoursYBottom = mGridSpacingY * |
1974 | KOPrefs::instance()->mWorkingHoursEnd * 4 - 1; | 1976 | KOPrefs::instance()->mWorkingHoursEnd * 4 - 1; |
1975 | } | 1977 | } |
1976 | 1978 | ||
1977 | 1979 | ||
1978 | DateList KOAgenda::dateList() const | 1980 | DateList KOAgenda::dateList() const |
1979 | { | 1981 | { |
1980 | return mSelectedDates; | 1982 | return mSelectedDates; |
1981 | } | 1983 | } |
1982 | 1984 | ||
1983 | void KOAgenda::setDateList(const DateList &selectedDates) | 1985 | void KOAgenda::setDateList(const DateList &selectedDates) |
1984 | { | 1986 | { |
1985 | mSelectedDates = selectedDates; | 1987 | mSelectedDates = selectedDates; |
1986 | marcus_bains(); | 1988 | marcus_bains(); |
1987 | } | 1989 | } |
1988 | 1990 | ||
1989 | void KOAgenda::setHolidayMask(QMemArray<bool> *mask) | 1991 | void KOAgenda::setHolidayMask(QMemArray<bool> *mask) |
1990 | { | 1992 | { |
1991 | mHolidayMask = mask; | 1993 | mHolidayMask = mask; |
1992 | 1994 | ||
1993 | /* | 1995 | /* |
1994 | kdDebug() << "HolidayMask: "; | 1996 | kdDebug() << "HolidayMask: "; |
1995 | for(uint i=0;i<mask->count();++i) { | 1997 | for(uint i=0;i<mask->count();++i) { |
1996 | kdDebug() << (mask->at(i) ? "*" : "o"); | 1998 | kdDebug() << (mask->at(i) ? "*" : "o"); |
1997 | } | 1999 | } |
1998 | kdDebug() << endl; | 2000 | kdDebug() << endl; |
1999 | */ | 2001 | */ |
2000 | } | 2002 | } |
2001 | 2003 | ||
2002 | void KOAgenda::contentsMousePressEvent ( QMouseEvent *event ) | 2004 | void KOAgenda::contentsMousePressEvent ( QMouseEvent *event ) |
2003 | { | 2005 | { |
2004 | 2006 | ||
2005 | QScrollView::contentsMousePressEvent(event); | 2007 | QScrollView::contentsMousePressEvent(event); |
2006 | } | 2008 | } |
2007 | 2009 | ||
2008 | void KOAgenda::storePosition() | 2010 | void KOAgenda::storePosition() |
2009 | { | 2011 | { |
2010 | //mContentPosition | 2012 | //mContentPosition |
2011 | int max = mGridSpacingY*4*24; | 2013 | int max = mGridSpacingY*4*24; |
2012 | if ( contentsY() < 5 && max > viewport()->height()*3/2 ) | 2014 | if ( contentsY() < 5 && max > viewport()->height()*3/2 ) |
2013 | mContentPosition = 0; | 2015 | mContentPosition = 0; |
2014 | else if ( contentsY() + viewport()->height() > max - 5 && max > viewport()->height()*3/2) | 2016 | else if ( contentsY() + viewport()->height() > max - 5 && max > viewport()->height()*3/2) |
2015 | mContentPosition = -1.0; | 2017 | mContentPosition = -1.0; |
2016 | else | 2018 | else |
2017 | mContentPosition = ((float) max)/ ((float)(contentsY()+ ( viewport()->height()/2))); | 2019 | mContentPosition = ((float) max)/ ((float)(contentsY()+ ( viewport()->height()/2))); |
2018 | //qDebug("mContentPosition %f %d %d %d",mContentPosition , max, contentsY() ,viewport()->height()); | 2020 | //qDebug("mContentPosition %f %d %d %d",mContentPosition , max, contentsY() ,viewport()->height()); |
2019 | 2021 | ||
2020 | } | 2022 | } |
2021 | void KOAgenda::restorePosition() | 2023 | void KOAgenda::restorePosition() |
2022 | { | 2024 | { |
2023 | int posY; | 2025 | int posY; |
2024 | int max = mGridSpacingY*4*24; | 2026 | int max = mGridSpacingY*4*24; |
2025 | if ( mContentPosition < 0 ) | 2027 | if ( mContentPosition < 0 ) |
2026 | posY = max-viewport()->height(); | 2028 | posY = max-viewport()->height(); |
2027 | else | 2029 | else |
2028 | if ( mContentPosition == 0 ) | 2030 | if ( mContentPosition == 0 ) |
2029 | posY = 0; | 2031 | posY = 0; |
2030 | else | 2032 | else |
2031 | posY = (max/mContentPosition)-(viewport()->height()/2); | 2033 | posY = (max/mContentPosition)-(viewport()->height()/2); |
2032 | setContentsPos (0, posY ); | 2034 | setContentsPos (0, posY ); |
2033 | //qDebug("posY %d hei %d", posY, max); | 2035 | //qDebug("posY %d hei %d", posY, max); |
2034 | 2036 | ||
2035 | } | 2037 | } |
2036 | void KOAgenda::moveChild( QWidget *w, int x , int y ) | 2038 | void KOAgenda::moveChild( QWidget *w, int x , int y ) |
2037 | { | 2039 | { |
2038 | ++x; | 2040 | ++x; |
2039 | QScrollView::moveChild( w, x , y ); | 2041 | QScrollView::moveChild( w, x , y ); |
2040 | } | 2042 | } |
2041 | #include <qmessagebox.h> | 2043 | #include <qmessagebox.h> |
2042 | #ifdef DESKTOP_VERSION | 2044 | #ifdef DESKTOP_VERSION |
2043 | #include <qprinter.h> | 2045 | #include <qprinter.h> |
2044 | #include <qpainter.h> | 2046 | #include <qpainter.h> |
2045 | #include <qpaintdevicemetrics.h> | 2047 | #include <qpaintdevicemetrics.h> |
2046 | 2048 | ||
2047 | #endif | 2049 | #endif |
2048 | void KOAgenda::printSelection() | 2050 | void KOAgenda::printSelection() |
2049 | { | 2051 | { |
2050 | #ifdef DESKTOP_VERSION | 2052 | #ifdef DESKTOP_VERSION |
2051 | if ( mStartCellY == mCurrentCellY ) { | 2053 | if ( mStartCellY == mCurrentCellY ) { |
2052 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 2054 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
2053 | i18n("Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. "), | 2055 | i18n("Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. "), |
2054 | i18n("OK"), 0, 0, | 2056 | i18n("OK"), 0, 0, |
2055 | 0, 1 ); | 2057 | 0, 1 ); |
2056 | return; | 2058 | return; |
2057 | } | 2059 | } |
2058 | 2060 | ||
2059 | float dx, dy; | 2061 | float dx, dy; |
2060 | int x,y,w,h; | 2062 | int x,y,w,h; |
2061 | x= 0; | 2063 | x= 0; |
2062 | w= contentsWidth()+2; | 2064 | w= contentsWidth()+2; |
2063 | // h= contentsHeight(); | 2065 | // h= contentsHeight(); |
2064 | y = mGridSpacingY*mStartCellY; | 2066 | y = mGridSpacingY*mStartCellY; |
2065 | h = mGridSpacingY*(mCurrentCellY+1)-y+2; | 2067 | h = mGridSpacingY*(mCurrentCellY+1)-y+2; |
2066 | 2068 | ||
2067 | //return; | 2069 | //return; |
2068 | QPrinter* printer = new QPrinter(); | 2070 | QPrinter* printer = new QPrinter(); |
2069 | if ( !printer->setup()) { | 2071 | if ( !printer->setup()) { |
2070 | delete printer; | 2072 | delete printer; |
2071 | return; | 2073 | return; |
2072 | } | 2074 | } |
2073 | QPainter p( printer ); | 2075 | QPainter p( printer ); |
2074 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer ); | 2076 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer ); |
2075 | QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() ); | 2077 | QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() ); |
2076 | //date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true ); | 2078 | //date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true ); |
2077 | int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); | 2079 | int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); |
2078 | // p.drawText( 0, 0, date ); | 2080 | // p.drawText( 0, 0, date ); |
2079 | int offset = m.width()/8; | 2081 | int offset = m.width()/8; |
2080 | // compute the scale | 2082 | // compute the scale |
2081 | dx = ((float) m.width()-offset) / (float)w; | 2083 | dx = ((float) m.width()-offset) / (float)w; |
2082 | dy = (float)(m.height() - ( 2 * hei )-offset ) / (float)h; | 2084 | dy = (float)(m.height() - ( 2 * hei )-offset ) / (float)h; |
2083 | float scale; | 2085 | float scale; |
2084 | // scale to fit the width or height of the paper | 2086 | // scale to fit the width or height of the paper |
2085 | if ( dx < dy ) | 2087 | if ( dx < dy ) |
2086 | scale = dx; | 2088 | scale = dx; |
2087 | else | 2089 | else |
2088 | scale = dy; | 2090 | scale = dy; |
2089 | // set the scale | 2091 | // set the scale |
2090 | p.drawText( offset* scale, offset* scale*3/4, date ); | 2092 | p.drawText( offset* scale, offset* scale*3/4, date ); |
2091 | 2093 | ||
2092 | int selDay; | 2094 | int selDay; |
2093 | float widOffset = ((float) m.width()-offset) / ((float)(mSelectedDates.count())); | 2095 | float widOffset = ((float) m.width()-offset) / ((float)(mSelectedDates.count())); |
2094 | float startX = 1; | 2096 | float startX = 1; |
2095 | for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) | 2097 | for ( selDay = 0; selDay < mSelectedDates.count(); ++selDay) |
2096 | { | 2098 | { |
2097 | QString text = KGlobal::locale()->formatDate( mSelectedDates[selDay],true ); | 2099 | QString text = KGlobal::locale()->formatDate( mSelectedDates[selDay],true ); |
2098 | p.setClipRect(offset* scale+startX , 0, widOffset-4, offset* scale+(2*hei* scale) ); | 2100 | p.setClipRect(offset* scale+startX , 0, widOffset-4, offset* scale+(2*hei* scale) ); |
2099 | p.drawText( offset* scale+startX, (offset+hei)* scale, text ); | 2101 | p.drawText( offset* scale+startX, (offset+hei)* scale, text ); |
2100 | startX += widOffset; | 2102 | startX += widOffset; |
2101 | 2103 | ||
2102 | } | 2104 | } |
2103 | p.translate( offset* scale,offset* scale+ (-y * scale)+(2*hei* scale)); | 2105 | p.translate( offset* scale,offset* scale+ (-y * scale)+(2*hei* scale)); |
2104 | p.scale( scale, scale ); | 2106 | p.scale( scale, scale ); |
2105 | p.setClipRect( offset* scale, offset* scale+(2*hei* scale), w*scale, h*scale ); | 2107 | p.setClipRect( offset* scale, offset* scale+(2*hei* scale), w*scale, h*scale ); |
2106 | // now printing with y offset: 2 hei | 2108 | // now printing with y offset: 2 hei |
2107 | // p.translate( 0, -y*scale); | 2109 | // p.translate( 0, -y*scale); |
2108 | 2110 | ||
2109 | drawContentsToPainter(&p, true ); | 2111 | drawContentsToPainter(&p, true ); |
2110 | globalFlagBlockAgendaItemUpdate = false; | 2112 | globalFlagBlockAgendaItemUpdate = false; |
2111 | KOAgendaItem *item; | 2113 | KOAgendaItem *item; |
2112 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 2114 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
2113 | item->select(false); | 2115 | item->select(false); |
2114 | item->paintMe( false, &p ); | 2116 | item->paintMe( false, &p ); |
2115 | } | 2117 | } |
2116 | globalFlagBlockAgendaItemUpdate = true; | 2118 | globalFlagBlockAgendaItemUpdate = true; |
2117 | p.end(); | 2119 | p.end(); |
2118 | delete printer; | 2120 | delete printer; |
2119 | #else | 2121 | #else |
2120 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 2122 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
2121 | i18n("Not supported \non PDA!\n"), | 2123 | i18n("Not supported \non PDA!\n"), |
2122 | i18n("OK"), 0, 0, | 2124 | i18n("OK"), 0, 0, |
2123 | 0, 1 ); | 2125 | 0, 1 ); |
2124 | #endif | 2126 | #endif |
2125 | } | 2127 | } |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index b5a4199..fd9bf29 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -1,1647 +1,1647 @@ | |||
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 <qhbox.h> | 24 | #include <qhbox.h> |
25 | #include <qvbox.h> | 25 | #include <qvbox.h> |
26 | #include <qlabel.h> | 26 | #include <qlabel.h> |
27 | #include <qframe.h> | 27 | #include <qframe.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #ifndef KORG_NOSPLITTER | 29 | #ifndef KORG_NOSPLITTER |
30 | #include <qsplitter.h> | 30 | #include <qsplitter.h> |
31 | #endif | 31 | #endif |
32 | #include <qfont.h> | 32 | #include <qfont.h> |
33 | #include <qfontmetrics.h> | 33 | #include <qfontmetrics.h> |
34 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
35 | #include <qtooltip.h> | 35 | #include <qtooltip.h> |
36 | #include <qpainter.h> | 36 | #include <qpainter.h> |
37 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
38 | #include <qapplication.h> | 38 | #include <qapplication.h> |
39 | 39 | ||
40 | #include <kapplication.h> | 40 | #include <kapplication.h> |
41 | #include <KDGanttMinimizeSplitter.h> | 41 | #include <KDGanttMinimizeSplitter.h> |
42 | #include <kdebug.h> | 42 | #include <kdebug.h> |
43 | #include <kstandarddirs.h> | 43 | #include <kstandarddirs.h> |
44 | #include <kiconloader.h> | 44 | #include <kiconloader.h> |
45 | #include <klocale.h> | 45 | #include <klocale.h> |
46 | #include <kconfig.h> | 46 | #include <kconfig.h> |
47 | #include <kglobal.h> | 47 | #include <kglobal.h> |
48 | #include "calendarview.h" | 48 | #include "calendarview.h" |
49 | #include "koviewmanager.h" | 49 | #include "koviewmanager.h" |
50 | 50 | ||
51 | #include <libkcal/calendar.h> | 51 | #include <libkcal/calendar.h> |
52 | #include <libkcal/icaldrag.h> | 52 | #include <libkcal/icaldrag.h> |
53 | #include <libkcal/dndfactory.h> | 53 | #include <libkcal/dndfactory.h> |
54 | 54 | ||
55 | #include <kcalendarsystem.h> | 55 | #include <kcalendarsystem.h> |
56 | 56 | ||
57 | #include "koglobals.h" | 57 | #include "koglobals.h" |
58 | #ifndef KORG_NOPLUGINS | 58 | #ifndef KORG_NOPLUGINS |
59 | #include "kocore.h" | 59 | #include "kocore.h" |
60 | #endif | 60 | #endif |
61 | #include "koprefs.h" | 61 | #include "koprefs.h" |
62 | #include "koagenda.h" | 62 | #include "koagenda.h" |
63 | #include "koagendaitem.h" | 63 | #include "koagendaitem.h" |
64 | #ifndef KORG_NOPRINTER | 64 | #ifndef KORG_NOPRINTER |
65 | #include "calprinter.h" | 65 | #include "calprinter.h" |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #include "koagendaview.h" | 68 | #include "koagendaview.h" |
69 | //#include "koagendaview.moc" | 69 | //#include "koagendaview.moc" |
70 | 70 | ||
71 | //extern bool globalFlagBlockPainting; | 71 | //extern bool globalFlagBlockPainting; |
72 | extern int globalFlagBlockAgenda; | 72 | extern int globalFlagBlockAgenda; |
73 | extern int globalFlagBlockStartup; | 73 | extern int globalFlagBlockStartup; |
74 | extern int globalFlagBlockAgendaItemPaint; | 74 | extern int globalFlagBlockAgendaItemPaint; |
75 | extern int globalFlagBlockAgendaItemUpdate; | 75 | extern int globalFlagBlockAgendaItemUpdate; |
76 | extern int globalFlagBlockLabel; | 76 | extern int globalFlagBlockLabel; |
77 | using namespace KOrg; | 77 | using namespace KOrg; |
78 | 78 | ||
79 | 79 | ||
80 | 80 | ||
81 | TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : | 81 | TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : |
82 | QScrollView(parent,name,f) | 82 | QScrollView(parent,name,f) |
83 | { | 83 | { |
84 | myPix.resize( 1, 1 ); | 84 | myPix.resize( 1, 1 ); |
85 | mRows = rows; | 85 | mRows = rows; |
86 | 86 | ||
87 | mRedrawNeeded = true; | 87 | mRedrawNeeded = true; |
88 | setMinimumHeight( 20 ); | 88 | setMinimumHeight( 20 ); |
89 | mCellHeight = KOPrefs::instance()->mHourSize*4; | 89 | mCellHeight = KOPrefs::instance()->mHourSize*4; |
90 | 90 | ||
91 | enableClipper(true); | 91 | enableClipper(true); |
92 | 92 | ||
93 | setHScrollBarMode(AlwaysOff); | 93 | setHScrollBarMode(AlwaysOff); |
94 | setVScrollBarMode(AlwaysOff); | 94 | setVScrollBarMode(AlwaysOff); |
95 | 95 | ||
96 | resizeContents(50,mRows * mCellHeight); | 96 | resizeContents(50,mRows * mCellHeight); |
97 | 97 | ||
98 | viewport()->setBackgroundMode( PaletteBackground ); | 98 | viewport()->setBackgroundMode( PaletteBackground ); |
99 | } | 99 | } |
100 | 100 | ||
101 | void TimeLabels::setCellHeight(int height) | 101 | void TimeLabels::setCellHeight(int height) |
102 | { | 102 | { |
103 | mCellHeight = height; | 103 | mCellHeight = height; |
104 | } | 104 | } |
105 | 105 | ||
106 | /* | 106 | /* |
107 | Optimization so that only the "dirty" portion of the scroll view | 107 | Optimization so that only the "dirty" portion of the scroll view |
108 | is redrawn. Unfortunately, this is not called by default paintEvent() method. | 108 | is redrawn. Unfortunately, this is not called by default paintEvent() method. |
109 | */ | 109 | */ |
110 | void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) | 110 | void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) |
111 | { | 111 | { |
112 | 112 | ||
113 | cx = contentsX() + frameWidth()*2; | 113 | cx = contentsX() + frameWidth()*2; |
114 | cw = contentsWidth() ; | 114 | cw = contentsWidth() ; |
115 | // end of workaround | 115 | // end of workaround |
116 | 116 | ||
117 | int cell = ((int)(cy/mCellHeight)); | 117 | int cell = ((int)(cy/mCellHeight)); |
118 | int y = cell * mCellHeight; | 118 | int y = cell * mCellHeight; |
119 | QFontMetrics fm = fontMetrics(); | 119 | QFontMetrics fm = fontMetrics(); |
120 | QString hour; | 120 | QString hour; |
121 | QString suffix = "am"; | 121 | QString suffix = "am"; |
122 | int timeHeight = fm.ascent(); | 122 | int timeHeight = fm.ascent(); |
123 | QFont nFont = font(); | 123 | QFont nFont = font(); |
124 | p->setFont( font()); | 124 | p->setFont( font()); |
125 | 125 | ||
126 | if (!KGlobal::locale()->use12Clock()) { | 126 | if (!KGlobal::locale()->use12Clock()) { |
127 | suffix = "00"; | 127 | suffix = "00"; |
128 | } else | 128 | } else |
129 | if (cell > 11) suffix = "pm"; | 129 | if (cell > 11) suffix = "pm"; |
130 | 130 | ||
131 | if ( timeHeight > mCellHeight ) { | 131 | if ( timeHeight > mCellHeight ) { |
132 | timeHeight = mCellHeight-1; | 132 | timeHeight = mCellHeight-1; |
133 | int pointS = nFont.pointSize(); | 133 | int pointS = nFont.pointSize(); |
134 | while ( pointS > 4 ) { | 134 | while ( pointS > 4 ) { |
135 | nFont.setPointSize( pointS ); | 135 | nFont.setPointSize( pointS ); |
136 | fm = QFontMetrics( nFont ); | 136 | fm = QFontMetrics( nFont ); |
137 | if ( fm.ascent() < mCellHeight ) | 137 | if ( fm.ascent() < mCellHeight ) |
138 | break; | 138 | break; |
139 | -- pointS; | 139 | -- pointS; |
140 | } | 140 | } |
141 | fm = QFontMetrics( nFont ); | 141 | fm = QFontMetrics( nFont ); |
142 | timeHeight = fm.ascent(); | 142 | timeHeight = fm.ascent(); |
143 | } | 143 | } |
144 | //timeHeight -= (timeHeight/4-2); | 144 | //timeHeight -= (timeHeight/4-2); |
145 | QFont sFont = nFont; | 145 | QFont sFont = nFont; |
146 | sFont.setPointSize( sFont.pointSize()/2 ); | 146 | sFont.setPointSize( sFont.pointSize()/2 ); |
147 | QFontMetrics fmS( sFont ); | 147 | QFontMetrics fmS( sFont ); |
148 | int sHei = fmS.ascent() ; | 148 | int sHei = fmS.ascent() ; |
149 | //sHei -= (sHei/4-2); | 149 | //sHei -= (sHei/4-2); |
150 | int startW = mMiniWidth - frameWidth()-2 ; | 150 | int startW = mMiniWidth - frameWidth()-2 ; |
151 | int tw2 = fmS.width(suffix); | 151 | int tw2 = fmS.width(suffix); |
152 | timeHeight = (timeHeight-1) /2 -1; | 152 | timeHeight = (timeHeight-1) /2 -1; |
153 | //testline | 153 | //testline |
154 | //p->drawLine(0,0,0,contentsHeight()); | 154 | //p->drawLine(0,0,0,contentsHeight()); |
155 | while (y < cy + ch+mCellHeight) { | 155 | while (y < cy + ch+mCellHeight) { |
156 | p->drawLine(startW-tw2+1 ,y,cw+2,y); | 156 | p->drawLine(startW-tw2+1 ,y,cw+2,y); |
157 | hour.setNum(cell); | 157 | hour.setNum(cell); |
158 | // handle 24h and am/pm time formats | 158 | // handle 24h and am/pm time formats |
159 | if (KGlobal::locale()->use12Clock()) { | 159 | if (KGlobal::locale()->use12Clock()) { |
160 | if (cell == 12) suffix = "pm"; | 160 | if (cell == 12) suffix = "pm"; |
161 | if (cell == 0) hour.setNum(12); | 161 | if (cell == 0) hour.setNum(12); |
162 | if (cell > 12) hour.setNum(cell - 12); | 162 | if (cell > 12) hour.setNum(cell - 12); |
163 | } | 163 | } |
164 | 164 | ||
165 | // center and draw the time label | 165 | // center and draw the time label |
166 | int timeWidth = fm.width(hour); | 166 | int timeWidth = fm.width(hour); |
167 | int offset = startW - timeWidth - tw2 -1 ; | 167 | int offset = startW - timeWidth - tw2 -1 ; |
168 | p->setFont( nFont ); | 168 | p->setFont( nFont ); |
169 | p->drawText( offset, y+ timeHeight, hour); | 169 | p->drawText( offset, y+ timeHeight, hour); |
170 | p->setFont( sFont ); | 170 | p->setFont( sFont ); |
171 | offset = startW - tw2; | 171 | offset = startW - tw2; |
172 | p->drawText( offset, y -1, suffix); | 172 | p->drawText( offset, y -1, suffix); |
173 | 173 | ||
174 | // increment indices | 174 | // increment indices |
175 | y += mCellHeight; | 175 | y += mCellHeight; |
176 | cell++; | 176 | cell++; |
177 | } | 177 | } |
178 | 178 | ||
179 | 179 | ||
180 | 180 | ||
181 | 181 | ||
182 | } | 182 | } |
183 | 183 | ||
184 | /** | 184 | /** |
185 | Calculates the minimum width. | 185 | Calculates the minimum width. |
186 | */ | 186 | */ |
187 | int TimeLabels::minimumWidth() const | 187 | int TimeLabels::minimumWidth() const |
188 | { | 188 | { |
189 | return mMiniWidth; | 189 | return mMiniWidth; |
190 | } | 190 | } |
191 | 191 | ||
192 | /** updates widget's internal state */ | 192 | /** updates widget's internal state */ |
193 | void TimeLabels::updateConfig() | 193 | void TimeLabels::updateConfig() |
194 | { | 194 | { |
195 | mRedrawNeeded = true; | 195 | mRedrawNeeded = true; |
196 | // set the font | 196 | // set the font |
197 | // config->setGroup("Fonts"); | 197 | // config->setGroup("Fonts"); |
198 | // QFont font = config->readFontEntry("TimeBar Font"); | 198 | // QFont font = config->readFontEntry("TimeBar Font"); |
199 | setFont(KOPrefs::instance()->mTimeBarFont); | 199 | setFont(KOPrefs::instance()->mTimeBarFont); |
200 | QString test = "20"; | 200 | QString test = "20"; |
201 | if (KGlobal::locale()->use12Clock()) | 201 | if (KGlobal::locale()->use12Clock()) |
202 | test = "12"; | 202 | test = "12"; |
203 | mMiniWidth = fontMetrics().width(test); | 203 | mMiniWidth = fontMetrics().width(test); |
204 | if (KGlobal::locale()->use12Clock()) | 204 | if (KGlobal::locale()->use12Clock()) |
205 | test = "pm"; | 205 | test = "pm"; |
206 | else { | 206 | else { |
207 | test = "00"; | 207 | test = "00"; |
208 | } | 208 | } |
209 | QFont sFont = font(); | 209 | QFont sFont = font(); |
210 | sFont.setPointSize( sFont.pointSize()/2 ); | 210 | sFont.setPointSize( sFont.pointSize()/2 ); |
211 | QFontMetrics fmS( sFont ); | 211 | QFontMetrics fmS( sFont ); |
212 | mMiniWidth += fmS.width( test ) + frameWidth()*2+4 ; | 212 | mMiniWidth += fmS.width( test ) + frameWidth()*2+4 ; |
213 | // update geometry restrictions based on new settings | 213 | // update geometry restrictions based on new settings |
214 | setFixedWidth( mMiniWidth ); | 214 | setFixedWidth( mMiniWidth ); |
215 | 215 | ||
216 | // update HourSize | 216 | // update HourSize |
217 | mCellHeight = KOPrefs::instance()->mHourSize*4; | 217 | mCellHeight = KOPrefs::instance()->mHourSize*4; |
218 | resizeContents(mMiniWidth,mRows * mCellHeight+1); | 218 | resizeContents(mMiniWidth,mRows * mCellHeight+1); |
219 | } | 219 | } |
220 | 220 | ||
221 | /** update time label positions */ | 221 | /** update time label positions */ |
222 | void TimeLabels::positionChanged() | 222 | void TimeLabels::positionChanged() |
223 | { | 223 | { |
224 | int adjustment = mAgenda->contentsY(); | 224 | int adjustment = mAgenda->contentsY(); |
225 | setContentsPos(0, adjustment); | 225 | setContentsPos(0, adjustment); |
226 | } | 226 | } |
227 | 227 | ||
228 | /** */ | 228 | /** */ |
229 | void TimeLabels::setAgenda(KOAgenda* agenda) | 229 | void TimeLabels::setAgenda(KOAgenda* agenda) |
230 | { | 230 | { |
231 | mAgenda = agenda; | 231 | mAgenda = agenda; |
232 | } | 232 | } |
233 | 233 | ||
234 | void TimeLabels::contentsMousePressEvent ( QMouseEvent * e) | 234 | void TimeLabels::contentsMousePressEvent ( QMouseEvent * e) |
235 | { | 235 | { |
236 | mMouseDownY = e->pos().y(); | 236 | mMouseDownY = e->pos().y(); |
237 | mOrgCap = topLevelWidget()->caption(); | 237 | mOrgCap = topLevelWidget()->caption(); |
238 | } | 238 | } |
239 | 239 | ||
240 | void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e ) | 240 | void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e ) |
241 | { | 241 | { |
242 | int diff = mMouseDownY - e->pos().y(); | 242 | int diff = mMouseDownY - e->pos().y(); |
243 | if ( diff < 10 && diff > -10 ) | 243 | if ( diff < 10 && diff > -10 ) |
244 | return; | 244 | return; |
245 | int tSize = KOPrefs::instance()->mHourSize + (diff/10) ; | 245 | int tSize = KOPrefs::instance()->mHourSize + (diff/10) ; |
246 | if ( tSize < 4 ) | 246 | if ( tSize < 4 ) |
247 | tSize = 4; | 247 | tSize = 4; |
248 | if ( tSize > 22 ) | 248 | if ( tSize > 22 ) |
249 | tSize = 22; | 249 | tSize = 22; |
250 | tSize = (tSize-2)/2; | 250 | tSize = (tSize-2)/2; |
251 | topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize)); | 251 | topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize)); |
252 | 252 | ||
253 | } | 253 | } |
254 | void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e ) | 254 | void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e ) |
255 | { | 255 | { |
256 | topLevelWidget()->setCaption( mOrgCap ); | 256 | topLevelWidget()->setCaption( mOrgCap ); |
257 | int diff = mMouseDownY - e->pos().y(); | 257 | int diff = mMouseDownY - e->pos().y(); |
258 | if ( diff < 10 && diff > -10 ) | 258 | if ( diff < 10 && diff > -10 ) |
259 | return; | 259 | return; |
260 | int tSize = KOPrefs::instance()->mHourSize + (diff/10); | 260 | int tSize = KOPrefs::instance()->mHourSize + (diff/10); |
261 | if ( tSize < 4 ) | 261 | if ( tSize < 4 ) |
262 | tSize = 4; | 262 | tSize = 4; |
263 | if ( tSize > 22 ) | 263 | if ( tSize > 22 ) |
264 | tSize = 22; | 264 | tSize = 22; |
265 | tSize = (tSize/2)*2; | 265 | tSize = (tSize/2)*2; |
266 | if ( tSize == KOPrefs::instance()->mHourSize ) | 266 | if ( tSize == KOPrefs::instance()->mHourSize ) |
267 | return; | 267 | return; |
268 | KOPrefs::instance()->mHourSize = tSize; | 268 | KOPrefs::instance()->mHourSize = tSize; |
269 | emit scaleChanged(); | 269 | emit scaleChanged(); |
270 | } | 270 | } |
271 | 271 | ||
272 | /** This is called in response to repaint() */ | 272 | /** This is called in response to repaint() */ |
273 | void TimeLabels::paintEvent(QPaintEvent*) | 273 | void TimeLabels::paintEvent(QPaintEvent*) |
274 | { | 274 | { |
275 | 275 | ||
276 | // kdDebug() << "paintevent..." << endl; | 276 | // kdDebug() << "paintevent..." << endl; |
277 | // this is another hack! | 277 | // this is another hack! |
278 | // QPainter painter(this); | 278 | // QPainter painter(this); |
279 | //QString c | 279 | //QString c |
280 | repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight()); | 280 | repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight()); |
281 | } | 281 | } |
282 | 282 | ||
283 | //////////////////////////////////////////////////////////////////////////// | 283 | //////////////////////////////////////////////////////////////////////////// |
284 | 284 | ||
285 | EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) | 285 | EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) |
286 | : QFrame(parent,name) | 286 | : QFrame(parent,name) |
287 | { | 287 | { |
288 | mColumns = 1; | 288 | mColumns = 1; |
289 | mTopBox = 0; | 289 | mTopBox = 0; |
290 | mLocation = loc; | 290 | mLocation = loc; |
291 | mTopLayout = 0; | 291 | mTopLayout = 0; |
292 | mPaintWidget = 0; | 292 | mPaintWidget = 0; |
293 | mXOffset = 0; | 293 | mXOffset = 0; |
294 | if (mLocation == Top) mPixmap = SmallIcon("1uparrow"); | 294 | if (mLocation == Top) mPixmap = SmallIcon("1uparrow"); |
295 | else mPixmap = SmallIcon("1downarrow"); | 295 | else mPixmap = SmallIcon("1downarrow"); |
296 | mEnabled.resize(mColumns); | 296 | mEnabled.resize(mColumns); |
297 | mEnabled.fill( false ); | 297 | mEnabled.fill( false ); |
298 | setMinimumHeight(mPixmap.height()); | 298 | setMinimumHeight(mPixmap.height()); |
299 | } | 299 | } |
300 | 300 | ||
301 | EventIndicator::~EventIndicator() | 301 | EventIndicator::~EventIndicator() |
302 | { | 302 | { |
303 | } | 303 | } |
304 | 304 | ||
305 | void EventIndicator::drawContents(QPainter *p) | 305 | void EventIndicator::drawContents(QPainter *p) |
306 | { | 306 | { |
307 | 307 | ||
308 | // kdDebug() << "======== top: " << contentsRect().top() << " bottom " << // contentsRect().bottom() << " left " << contentsRect().left() << " right " << contentsRect().right() << endl; | 308 | // kdDebug() << "======== top: " << contentsRect().top() << " bottom " << // contentsRect().bottom() << " left " << contentsRect().left() << " right " << contentsRect().right() << endl; |
309 | KDGanttSplitterHandle* han = 0; | 309 | KDGanttSplitterHandle* han = 0; |
310 | if ( mPaintWidget ) | 310 | if ( mPaintWidget ) |
311 | han = mPaintWidget->firstHandle(); | 311 | han = mPaintWidget->firstHandle(); |
312 | if ( ! han ) { | 312 | if ( ! han ) { |
313 | int i; | 313 | int i; |
314 | for(i=0;i<mColumns;++i) { | 314 | for(i=0;i<mColumns;++i) { |
315 | if (mEnabled[i]) { | 315 | if (mEnabled[i]) { |
316 | int cellWidth = contentsRect().right()/mColumns; | 316 | int cellWidth = contentsRect().right()/mColumns; |
317 | int xOffset = KOGlobals::self()->reverseLayout() ? | 317 | int xOffset = KOGlobals::self()->reverseLayout() ? |
318 | (mColumns - 1 - i)*cellWidth + (cellWidth -mPixmap.width())/2 : | 318 | (mColumns - 1 - i)*cellWidth + (cellWidth -mPixmap.width())/2 : |
319 | i*cellWidth + (cellWidth -mPixmap.width()) /2; | 319 | i*cellWidth + (cellWidth -mPixmap.width()) /2; |
320 | p->drawPixmap(QPoint(1+xOffset,0),mPixmap); | 320 | p->drawPixmap(QPoint(1+xOffset,0),mPixmap); |
321 | } | 321 | } |
322 | } | 322 | } |
323 | } else { | 323 | } else { |
324 | han->repaint(); | 324 | han->repaint(); |
325 | //mPaintWidget->setBackgroundColor( red ); | 325 | //mPaintWidget->setBackgroundColor( red ); |
326 | 326 | ||
327 | QPainter pa( han ); | 327 | QPainter pa( han ); |
328 | int i; | 328 | int i; |
329 | bool setColor = false; | 329 | bool setColor = false; |
330 | for(i=0;i<mColumns;++i) { | 330 | for(i=0;i<mColumns;++i) { |
331 | if (mEnabled[i]) { | 331 | if (mEnabled[i]) { |
332 | setColor = true; | 332 | setColor = true; |
333 | 333 | ||
334 | int cellWidth = contentsRect().right()/mColumns; | 334 | int cellWidth = contentsRect().right()/mColumns; |
335 | int xOffset = KOGlobals::self()->reverseLayout() ? | 335 | int xOffset = KOGlobals::self()->reverseLayout() ? |
336 | (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 : | 336 | (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 : |
337 | i*cellWidth + cellWidth/2 -mPixmap.width()/2; | 337 | i*cellWidth + cellWidth/2 -mPixmap.width()/2; |
338 | pa.drawPixmap(QPoint(mXOffset + xOffset,0),mPixmap); | 338 | pa.drawPixmap(QPoint(mXOffset + xOffset,0),mPixmap); |
339 | //qDebug("222draw pix %d ",xOffset ); | 339 | //qDebug("222draw pix %d ",xOffset ); |
340 | 340 | ||
341 | } | 341 | } |
342 | 342 | ||
343 | } | 343 | } |
344 | pa.end(); | 344 | pa.end(); |
345 | 345 | ||
346 | } | 346 | } |
347 | } | 347 | } |
348 | 348 | ||
349 | void EventIndicator::setXOffset( int x ) | 349 | void EventIndicator::setXOffset( int x ) |
350 | { | 350 | { |
351 | mXOffset = x; | 351 | mXOffset = x; |
352 | } | 352 | } |
353 | void EventIndicator::setPaintWidget( KDGanttMinimizeSplitter * w ) | 353 | void EventIndicator::setPaintWidget( KDGanttMinimizeSplitter * w ) |
354 | { | 354 | { |
355 | mPaintWidget = w; | 355 | mPaintWidget = w; |
356 | setMaximumHeight(0); | 356 | setMaximumHeight(0); |
357 | setMinimumHeight(0); | 357 | setMinimumHeight(0); |
358 | } | 358 | } |
359 | void EventIndicator::changeColumns(int columns) | 359 | void EventIndicator::changeColumns(int columns) |
360 | { | 360 | { |
361 | mColumns = columns; | 361 | mColumns = columns; |
362 | mEnabled.resize(mColumns); | 362 | mEnabled.resize(mColumns); |
363 | 363 | ||
364 | update(); | 364 | update(); |
365 | } | 365 | } |
366 | 366 | ||
367 | void EventIndicator::enableColumn(int column, bool enable) | 367 | void EventIndicator::enableColumn(int column, bool enable) |
368 | { | 368 | { |
369 | mEnabled[column] = enable; | 369 | mEnabled[column] = enable; |
370 | } | 370 | } |
371 | 371 | ||
372 | 372 | ||
373 | //////////////////////////////////////////////////////////////////////////// | 373 | //////////////////////////////////////////////////////////////////////////// |
374 | //////////////////////////////////////////////////////////////////////////// | 374 | //////////////////////////////////////////////////////////////////////////// |
375 | //////////////////////////////////////////////////////////////////////////// | 375 | //////////////////////////////////////////////////////////////////////////// |
376 | 376 | ||
377 | KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | 377 | KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : |
378 | KOEventView (cal,parent,name) | 378 | KOEventView (cal,parent,name) |
379 | { | 379 | { |
380 | mBlockUpdating = true; | 380 | mBlockUpdating = true; |
381 | mStartHour = 8; | 381 | mStartHour = 8; |
382 | mSelectedDates.append(QDate::currentDate()); | 382 | mSelectedDates.append(QDate::currentDate()); |
383 | 383 | ||
384 | mLayoutDayLabels = 0; | 384 | mLayoutDayLabels = 0; |
385 | mDayLabelsFrame = 0; | 385 | mDayLabelsFrame = 0; |
386 | mDayLabels = 0; | 386 | mDayLabels = 0; |
387 | bool isRTL = KOGlobals::self()->reverseLayout(); | 387 | bool isRTL = KOGlobals::self()->reverseLayout(); |
388 | QPixmap expandPix; | 388 | QPixmap expandPix; |
389 | if ( KOPrefs::instance()->mVerticalScreen ) { | 389 | if ( KOPrefs::instance()->mVerticalScreen ) { |
390 | expandPix = SmallIcon( "1updownarrow" ); | 390 | expandPix = SmallIcon( "1updownarrow" ); |
391 | } else { | 391 | } else { |
392 | expandPix = SmallIcon("1leftrightarrow" ); | 392 | expandPix = SmallIcon("1leftrightarrow" ); |
393 | } | 393 | } |
394 | 394 | ||
395 | QBoxLayout *topLayout = new QVBoxLayout(this); | 395 | QBoxLayout *topLayout = new QVBoxLayout(this); |
396 | 396 | ||
397 | // Create day name labels for agenda columns | 397 | // Create day name labels for agenda columns |
398 | // Create agenda splitter | 398 | // Create agenda splitter |
399 | 399 | ||
400 | mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); | 400 | mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); |
401 | mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 401 | mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
402 | topLayout->addWidget( mSplitterAgenda ); | 402 | topLayout->addWidget( mSplitterAgenda ); |
403 | mAllDayFrame = new QHBox(mSplitterAgenda); | 403 | mAllDayFrame = new QHBox(mSplitterAgenda); |
404 | mAllDayFrame->setFocusPolicy(NoFocus); | 404 | mAllDayFrame->setFocusPolicy(NoFocus); |
405 | QWidget *agendaFrame = new QWidget(mSplitterAgenda); | 405 | QWidget *agendaFrame = new QWidget(mSplitterAgenda); |
406 | agendaFrame->setFocusPolicy(NoFocus); | 406 | agendaFrame->setFocusPolicy(NoFocus); |
407 | 407 | ||
408 | // Create all-day agenda widget | 408 | // Create all-day agenda widget |
409 | mDummyAllDayLeft = new QVBox( mAllDayFrame ); | 409 | mDummyAllDayLeft = new QVBox( mAllDayFrame ); |
410 | 410 | ||
411 | mExpandButton = new QPushButton(mDummyAllDayLeft); | 411 | mExpandButton = new QPushButton(mDummyAllDayLeft); |
412 | mExpandButton->setPixmap( expandPix ); | 412 | mExpandButton->setPixmap( expandPix ); |
413 | int widebut = mExpandButton->sizeHint().width()+4; | 413 | int widebut = mExpandButton->sizeHint().width()+4; |
414 | int heibut = mExpandButton->sizeHint().height()+4; | 414 | int heibut = mExpandButton->sizeHint().height()+4; |
415 | if ( heibut > widebut ) | 415 | if ( heibut > widebut ) |
416 | widebut = heibut ; | 416 | widebut = heibut ; |
417 | 417 | ||
418 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, | 418 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, |
419 | // QSizePolicy::Fixed ) ); | 419 | // QSizePolicy::Fixed ) ); |
420 | mExpandButton->setFixedSize( widebut, widebut); | 420 | mExpandButton->setFixedSize( widebut, widebut); |
421 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); | 421 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); |
422 | mExpandButton->setFocusPolicy(NoFocus); | 422 | mExpandButton->setFocusPolicy(NoFocus); |
423 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); | 423 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); |
424 | mAllDayAgenda->setFocusPolicy(NoFocus); | 424 | mAllDayAgenda->setFocusPolicy(NoFocus); |
425 | QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); | 425 | QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); |
426 | 426 | ||
427 | // Create event context menu for all day agenda | 427 | // Create event context menu for all day agenda |
428 | //mAllDayAgendaPopup = eventPopup(); | 428 | //mAllDayAgendaPopup = eventPopup(); |
429 | 429 | ||
430 | // Create agenda frame | 430 | // Create agenda frame |
431 | QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); | 431 | QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); |
432 | // QHBox *agendaFrame = new QHBox(splitterAgenda); | 432 | // QHBox *agendaFrame = new QHBox(splitterAgenda); |
433 | 433 | ||
434 | // create event indicator bars | 434 | // create event indicator bars |
435 | mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); | 435 | mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); |
436 | #ifndef DESKTOP_VERSION | 436 | #ifndef DESKTOP_VERSION |
437 | mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); | 437 | mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); |
438 | #endif | 438 | #endif |
439 | mDayLabelsFrame = new QHBox(agendaFrame); | 439 | mDayLabelsFrame = new QHBox(agendaFrame); |
440 | //topLayout->addWidget(mDayLabelsFrame); | 440 | //topLayout->addWidget(mDayLabelsFrame); |
441 | mDayLabels = new QFrame (mDayLabelsFrame); | 441 | mDayLabels = new QFrame (mDayLabelsFrame); |
442 | mLayoutDayLabels = new QHBoxLayout(mDayLabels); | 442 | mLayoutDayLabels = new QHBoxLayout(mDayLabels); |
443 | agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2); | 443 | agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2); |
444 | agendaLayout->addWidget(mEventIndicatorTop,1,1); | 444 | agendaLayout->addWidget(mEventIndicatorTop,1,1); |
445 | 445 | ||
446 | mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, | 446 | mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, |
447 | agendaFrame); | 447 | agendaFrame); |
448 | agendaLayout->addWidget(mEventIndicatorBottom,3,1); | 448 | agendaLayout->addWidget(mEventIndicatorBottom,3,1); |
449 | QWidget *dummyAgendaRight = new QWidget(agendaFrame); | 449 | QWidget *dummyAgendaRight = new QWidget(agendaFrame); |
450 | agendaLayout->addWidget(dummyAgendaRight,1,2); | 450 | agendaLayout->addWidget(dummyAgendaRight,1,2); |
451 | 451 | ||
452 | // Create time labels | 452 | // Create time labels |
453 | mTimeLabels = new TimeLabels(24,agendaFrame); | 453 | mTimeLabels = new TimeLabels(24,agendaFrame); |
454 | agendaLayout->addWidget(mTimeLabels,2,0); | 454 | agendaLayout->addWidget(mTimeLabels,2,0); |
455 | connect(mTimeLabels,SIGNAL( scaleChanged()), | 455 | connect(mTimeLabels,SIGNAL( scaleChanged()), |
456 | this,SLOT(updateConfig())); | 456 | this,SLOT(updateConfig())); |
457 | 457 | ||
458 | // Create agenda | 458 | // Create agenda |
459 | mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame); | 459 | mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame); |
460 | agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); | 460 | agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); |
461 | agendaLayout->setColStretch(1,1); | 461 | agendaLayout->setColStretch(1,1); |
462 | mAgenda->setFocusPolicy(NoFocus); | 462 | mAgenda->setFocusPolicy(NoFocus); |
463 | // Create event context menu for agenda | 463 | // Create event context menu for agenda |
464 | mAllAgendaPopup = eventPopup(); | 464 | mAllAgendaPopup = eventPopup(); |
465 | 465 | ||
466 | #if 0 | 466 | #if 0 |
467 | mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), | 467 | mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), |
468 | i18n("Toggle Alarm"),mAgenda, | 468 | i18n("Toggle Alarm"),mAgenda, |
469 | SLOT(popupAlarm()),true); | 469 | SLOT(popupAlarm()),true); |
470 | 470 | ||
471 | #endif | 471 | #endif |
472 | connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | 472 | connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), |
473 | mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | 473 | mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); |
474 | 474 | ||
475 | connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | 475 | connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), |
476 | mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | 476 | mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); |
477 | mAgenda->setPopup( mAllAgendaPopup ); | 477 | mAgenda->setPopup( mAllAgendaPopup ); |
478 | mAllDayAgenda->setPopup( mAllAgendaPopup ); | 478 | mAllDayAgenda->setPopup( mAllAgendaPopup ); |
479 | // make connections between dependent widgets | 479 | // make connections between dependent widgets |
480 | mTimeLabels->setAgenda(mAgenda); | 480 | mTimeLabels->setAgenda(mAgenda); |
481 | 481 | ||
482 | // Update widgets to reflect user preferences | 482 | // Update widgets to reflect user preferences |
483 | // updateConfig(); | 483 | // updateConfig(); |
484 | 484 | ||
485 | // createDayLabels(); | 485 | // createDayLabels(); |
486 | 486 | ||
487 | // these blank widgets make the All Day Event box line up with the agenda | 487 | // these blank widgets make the All Day Event box line up with the agenda |
488 | dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); | 488 | dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); |
489 | dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); | 489 | dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); |
490 | mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); | 490 | mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); |
491 | 491 | ||
492 | // Scrolling | 492 | // Scrolling |
493 | connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)), | 493 | connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)), |
494 | mTimeLabels, SLOT(positionChanged())); | 494 | mTimeLabels, SLOT(positionChanged())); |
495 | connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)), | 495 | connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)), |
496 | SLOT(setContentsPos(int))); | 496 | SLOT(setContentsPos(int))); |
497 | 497 | ||
498 | connect(mAgenda,SIGNAL(showDateView( int, int)),SLOT(slotShowDateView( int, int ))); | 498 | connect(mAgenda,SIGNAL(showDateView( int, int)),SLOT(slotShowDateView( int, int ))); |
499 | connect(mAllDayAgenda,SIGNAL(showDateView( int, int )), SLOT(slotShowDateView( int, int ) )); | 499 | connect(mAllDayAgenda,SIGNAL(showDateView( int, int )), SLOT(slotShowDateView( int, int ) )); |
500 | 500 | ||
501 | // Create/Show/Edit/Delete Event | 501 | // Create/Show/Edit/Delete Event |
502 | connect(mAgenda,SIGNAL(newEventSignal(int,int)), | 502 | connect(mAgenda,SIGNAL(newEventSignal(int,int)), |
503 | SLOT(newEvent(int,int))); | 503 | SLOT(newEvent(int,int))); |
504 | connect(mAgenda,SIGNAL(newTodoSignal(int,int)), | 504 | connect(mAgenda,SIGNAL(newTodoSignal(int,int)), |
505 | SLOT(newTodo(int,int))); | 505 | SLOT(newTodo(int,int))); |
506 | connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)), | 506 | connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)), |
507 | SLOT(newEvent(int,int,int,int))); | 507 | SLOT(newEvent(int,int,int,int))); |
508 | connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)), | 508 | connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)), |
509 | SLOT(newEventAllDay(int,int))); | 509 | SLOT(newEventAllDay(int,int))); |
510 | connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)), | 510 | connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)), |
511 | SLOT(newTodoAllDay(int,int))); | 511 | SLOT(newTodoAllDay(int,int))); |
512 | connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)), | 512 | connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)), |
513 | SLOT(newEventAllDay(int,int))); | 513 | SLOT(newEventAllDay(int,int))); |
514 | connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), | 514 | connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), |
515 | SLOT(newTimeSpanSelected(int,int,int,int))); | 515 | SLOT(newTimeSpanSelected(int,int,int,int))); |
516 | connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), | 516 | connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), |
517 | SLOT(newTimeSpanSelectedAllDay(int,int,int,int))); | 517 | SLOT(newTimeSpanSelectedAllDay(int,int,int,int))); |
518 | connect(mAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView())); | 518 | connect(mAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView())); |
519 | connect(mAllDayAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView())); | 519 | connect(mAllDayAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView())); |
520 | 520 | ||
521 | connect(mAgenda,SIGNAL(editIncidenceSignal(Incidence *)), | 521 | connect(mAgenda,SIGNAL(editIncidenceSignal(Incidence *)), |
522 | SIGNAL(editIncidenceSignal(Incidence *))); | 522 | SIGNAL(editIncidenceSignal(Incidence *))); |
523 | connect(mAllDayAgenda,SIGNAL(editIncidenceSignal(Incidence *)), | 523 | connect(mAllDayAgenda,SIGNAL(editIncidenceSignal(Incidence *)), |
524 | SIGNAL(editIncidenceSignal(Incidence *))); | 524 | SIGNAL(editIncidenceSignal(Incidence *))); |
525 | connect(mAgenda,SIGNAL(showIncidenceSignal(Incidence *)), | 525 | connect(mAgenda,SIGNAL(showIncidenceSignal(Incidence *)), |
526 | SIGNAL(showIncidenceSignal(Incidence *))); | 526 | SIGNAL(showIncidenceSignal(Incidence *))); |
527 | connect(mAllDayAgenda,SIGNAL(showIncidenceSignal(Incidence *)), | 527 | connect(mAllDayAgenda,SIGNAL(showIncidenceSignal(Incidence *)), |
528 | SIGNAL(showIncidenceSignal(Incidence *))); | 528 | SIGNAL(showIncidenceSignal(Incidence *))); |
529 | connect(mAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)), | 529 | connect(mAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)), |
530 | SIGNAL(deleteIncidenceSignal(Incidence *))); | 530 | SIGNAL(deleteIncidenceSignal(Incidence *))); |
531 | connect(mAllDayAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)), | 531 | connect(mAllDayAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)), |
532 | SIGNAL(deleteIncidenceSignal(Incidence *))); | 532 | SIGNAL(deleteIncidenceSignal(Incidence *))); |
533 | 533 | ||
534 | connect(mAgenda,SIGNAL(itemModified(KOAgendaItem *, int )), | 534 | connect(mAgenda,SIGNAL(itemModified(KOAgendaItem *, int )), |
535 | SLOT(updateEventDates(KOAgendaItem *, int ))); | 535 | SLOT(updateEventDates(KOAgendaItem *, int ))); |
536 | connect(mAllDayAgenda,SIGNAL(itemModified(KOAgendaItem *, int )), | 536 | connect(mAllDayAgenda,SIGNAL(itemModified(KOAgendaItem *, int )), |
537 | SLOT(updateEventDates(KOAgendaItem *, int))); | 537 | SLOT(updateEventDates(KOAgendaItem *, int))); |
538 | 538 | ||
539 | // event indicator update | 539 | // event indicator update |
540 | connect(mAgenda,SIGNAL(lowerYChanged(int)), | 540 | connect(mAgenda,SIGNAL(lowerYChanged(int)), |
541 | SLOT(updateEventIndicatorTop(int))); | 541 | SLOT(updateEventIndicatorTop(int))); |
542 | connect(mAgenda,SIGNAL(upperYChanged(int)), | 542 | connect(mAgenda,SIGNAL(upperYChanged(int)), |
543 | SLOT(updateEventIndicatorBottom(int))); | 543 | SLOT(updateEventIndicatorBottom(int))); |
544 | // drag signals | 544 | // drag signals |
545 | /* | 545 | /* |
546 | connect(mAgenda,SIGNAL(startDragSignal(Event *)), | 546 | connect(mAgenda,SIGNAL(startDragSignal(Event *)), |
547 | SLOT(startDrag(Event *))); | 547 | SLOT(startDrag(Event *))); |
548 | connect(mAllDayAgenda,SIGNAL(startDragSignal(Event *)), | 548 | connect(mAllDayAgenda,SIGNAL(startDragSignal(Event *)), |
549 | SLOT(startDrag(Event *))); | 549 | SLOT(startDrag(Event *))); |
550 | */ | 550 | */ |
551 | // synchronize selections | 551 | // synchronize selections |
552 | connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ), | 552 | connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ), |
553 | mAllDayAgenda, SLOT( deselectItem() ) ); | 553 | mAllDayAgenda, SLOT( deselectItem() ) ); |
554 | connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ), | 554 | connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ), |
555 | mAgenda, SLOT( deselectItem() ) ); | 555 | mAgenda, SLOT( deselectItem() ) ); |
556 | connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ), | 556 | connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ), |
557 | SIGNAL( incidenceSelected( Incidence * ) ) ); | 557 | SIGNAL( incidenceSelected( Incidence * ) ) ); |
558 | connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ), | 558 | connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ), |
559 | SIGNAL( incidenceSelected( Incidence * ) ) ); | 559 | SIGNAL( incidenceSelected( Incidence * ) ) ); |
560 | connect( mAgenda, SIGNAL( resizedSignal() ), | 560 | connect( mAgenda, SIGNAL( resizedSignal() ), |
561 | SLOT( updateConfig( ) ) ); | 561 | SLOT( updateConfig( ) ) ); |
562 | connect( mAgenda, SIGNAL( addToCalSignal(Incidence *, Incidence *) ), | 562 | connect( mAgenda, SIGNAL( addToCalSignal(Incidence *, Incidence *) ), |
563 | SLOT( addToCalSlot(Incidence *, Incidence * ) ) ); | 563 | SLOT( addToCalSlot(Incidence *, Incidence * ) ) ); |
564 | connect( mAllDayAgenda, SIGNAL( addToCalSignal(Incidence * ,Incidence *) ), | 564 | connect( mAllDayAgenda, SIGNAL( addToCalSignal(Incidence * ,Incidence *) ), |
565 | SLOT( addToCalSlot(Incidence * , Incidence *) ) ); | 565 | SLOT( addToCalSlot(Incidence * , Incidence *) ) ); |
566 | // connect( mAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); | 566 | // connect( mAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); |
567 | //connect( mAllDayAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); | 567 | //connect( mAllDayAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); |
568 | 568 | ||
569 | connect( mAllDayAgenda, SIGNAL( signalClearSelection() ),mAgenda, SLOT( slotClearSelection()) ); | 569 | connect( mAllDayAgenda, SIGNAL( signalClearSelection() ),mAgenda, SLOT( slotClearSelection()) ); |
570 | connect( mAgenda, SIGNAL( signalClearSelection() ),mAllDayAgenda, SLOT( slotClearSelection()) ); | 570 | connect( mAgenda, SIGNAL( signalClearSelection() ),mAllDayAgenda, SLOT( slotClearSelection()) ); |
571 | 571 | ||
572 | } | 572 | } |
573 | 573 | ||
574 | void KOAgendaView::toggleAllDay() | 574 | void KOAgendaView::toggleAllDay() |
575 | { | 575 | { |
576 | if ( mSplitterAgenda->firstHandle() ) | 576 | if ( mSplitterAgenda->firstHandle() ) |
577 | mSplitterAgenda->firstHandle()->toggle(); | 577 | mSplitterAgenda->firstHandle()->toggle(); |
578 | } | 578 | } |
579 | void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) | 579 | void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) |
580 | { | 580 | { |
581 | calendar()->addIncidence( inc ); | 581 | calendar()->addIncidence( inc ); |
582 | 582 | ||
583 | if ( incOld ) { | 583 | if ( incOld ) { |
584 | if ( incOld->type() == "Todo" ) | 584 | if ( incOld->type() == "Todo" ) |
585 | emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED ); | 585 | emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED ); |
586 | else | 586 | else |
587 | emit incidenceChanged(incOld, KOGlobals::EVENTEDITED); | 587 | emit incidenceChanged(incOld, KOGlobals::EVENTEDITED); |
588 | } | 588 | } |
589 | 589 | ||
590 | } | 590 | } |
591 | 591 | ||
592 | KOAgendaView::~KOAgendaView() | 592 | KOAgendaView::~KOAgendaView() |
593 | { | 593 | { |
594 | delete mAllAgendaPopup; | 594 | delete mAllAgendaPopup; |
595 | //delete mAllDayAgendaPopup; | 595 | //delete mAllDayAgendaPopup; |
596 | delete KOAgendaItem::paintPix(); | 596 | delete KOAgendaItem::paintPix(); |
597 | delete KOAgendaItem::paintPixSel(); | 597 | delete KOAgendaItem::paintPixSel(); |
598 | } | 598 | } |
599 | void KOAgendaView::resizeEvent( QResizeEvent* e ) | 599 | void KOAgendaView::resizeEvent( QResizeEvent* e ) |
600 | { | 600 | { |
601 | //qDebug("KOAgendaView::resizeEvent( QResizeEvent* e ) %d ", e->size().width()); | 601 | //qDebug("KOAgendaView::resizeEvent( QResizeEvent* e ) %d ", e->size().width()); |
602 | bool uc = false; | 602 | bool uc = false; |
603 | int ow = e->oldSize().width(); | 603 | int ow = e->oldSize().width(); |
604 | int oh = e->oldSize().height(); | 604 | int oh = e->oldSize().height(); |
605 | int w = e->size().width(); | 605 | int w = e->size().width(); |
606 | int h = e->size().height(); | 606 | int h = e->size().height(); |
607 | if ( (ow > oh && w< h ) || (ow < oh && w > h ) ) { | 607 | if ( (ow > oh && w< h ) || (ow < oh && w > h ) ) { |
608 | if ( ! mBlockUpdating && !globalFlagBlockStartup && !globalFlagBlockAgenda ) | 608 | if ( ! mBlockUpdating && !globalFlagBlockStartup && !globalFlagBlockAgenda ) |
609 | uc = true; | 609 | uc = true; |
610 | //qDebug("view changed %d %d %d %d ", ow, oh , w , h); | 610 | //qDebug("view changed %d %d %d %d ", ow, oh , w , h); |
611 | } | 611 | } |
612 | mUpcomingWidth = e->size().width() ; | 612 | mUpcomingWidth = e->size().width() ; |
613 | if ( mBlockUpdating || uc ) { | 613 | if ( mBlockUpdating || uc ) { |
614 | mBlockUpdating = false; | 614 | mBlockUpdating = false; |
615 | //mAgenda->setMinimumSize(800 , 600 ); | 615 | //mAgenda->setMinimumSize(800 , 600 ); |
616 | //qDebug("mAgenda->resize+++++++++++++++ "); | 616 | //qDebug("mAgenda->resize+++++++++++++++ "); |
617 | updateConfig(); | 617 | updateConfig(); |
618 | //qDebug("KOAgendaView::Updating now possible "); | 618 | //qDebug("KOAgendaView::Updating now possible "); |
619 | } else | 619 | } else |
620 | createDayLabels(); | 620 | createDayLabels(); |
621 | //qDebug("resizeEvent end "); | 621 | //qDebug("resizeEvent end "); |
622 | 622 | ||
623 | } | 623 | } |
624 | void KOAgendaView::slotDaylabelClicked( int num ) | 624 | void KOAgendaView::slotDaylabelClicked( int num ) |
625 | { | 625 | { |
626 | 626 | ||
627 | QDate firstDate = mSelectedDates.first(); | 627 | QDate firstDate = mSelectedDates.first(); |
628 | if ( num == -1 ) | 628 | if ( num == -1 ) |
629 | emit showDateView( 6, firstDate ); | 629 | emit showDateView( 6, firstDate ); |
630 | else if (num >= 0 ) { | 630 | else if (num >= 0 ) { |
631 | if ( mSelectedDates.count() == 1) | 631 | if ( mSelectedDates.count() == 1) |
632 | emit showDateView( 9, firstDate.addDays( num ) ); | 632 | emit showDateView( 9, firstDate.addDays( num ) ); |
633 | else | 633 | else |
634 | emit showDateView( 3, firstDate.addDays( num ) ); | 634 | emit showDateView( 3, firstDate.addDays( num ) ); |
635 | } | 635 | } |
636 | else | 636 | else |
637 | showDateView( 10, firstDate.addDays(1) ); | 637 | showDateView( 10, firstDate.addDays(1) ); |
638 | } | 638 | } |
639 | 639 | ||
640 | KOAgendaButton* KOAgendaView::getNewDaylabel() | 640 | KOAgendaButton* KOAgendaView::getNewDaylabel() |
641 | { | 641 | { |
642 | 642 | ||
643 | KOAgendaButton * dayLabel = new KOAgendaButton(mDayLabels); | 643 | KOAgendaButton * dayLabel = new KOAgendaButton(mDayLabels); |
644 | connect( dayLabel, SIGNAL( numClicked(int) ), this, SLOT ( slotDaylabelClicked(int) ) ); | 644 | connect( dayLabel, SIGNAL( numClicked(int) ), this, SLOT ( slotDaylabelClicked(int) ) ); |
645 | mDayLabelsList.append( dayLabel ); | 645 | mDayLabelsList.append( dayLabel ); |
646 | mLayoutDayLabels->addWidget(dayLabel); | 646 | mLayoutDayLabels->addWidget(dayLabel); |
647 | return dayLabel ; | 647 | return dayLabel ; |
648 | } | 648 | } |
649 | 649 | ||
650 | void KOAgendaView::createDayLabels() | 650 | void KOAgendaView::createDayLabels() |
651 | { | 651 | { |
652 | 652 | ||
653 | if ( mBlockUpdating || globalFlagBlockLabel == 1) { | 653 | if ( mBlockUpdating || globalFlagBlockLabel == 1) { |
654 | // qDebug(" KOAgendaView::createDayLabels() blocked "); | 654 | // qDebug(" KOAgendaView::createDayLabels() blocked "); |
655 | return; | 655 | return; |
656 | 656 | ||
657 | } | 657 | } |
658 | int newHight; | 658 | int newHight; |
659 | if ( !mSelectedDates.count()) | 659 | if ( !mSelectedDates.count()) |
660 | return; | 660 | return; |
661 | 661 | ||
662 | // ### Before deleting and recreating we could check if mSelectedDates changed... | 662 | // ### Before deleting and recreating we could check if mSelectedDates changed... |
663 | // It would remove some flickering and gain speed (since this is called by | 663 | // It would remove some flickering and gain speed (since this is called by |
664 | // each updateView() call) | 664 | // each updateView() call) |
665 | 665 | ||
666 | int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - mAgenda->frameWidth()*2; | 666 | int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - mAgenda->frameWidth()*2; |
667 | mDayLabelsFrame->setMaximumWidth( mUpcomingWidth ); | 667 | mDayLabelsFrame->setMaximumWidth( mUpcomingWidth ); |
668 | if ( maxWid < 20 ) | 668 | if ( maxWid < 20 ) |
669 | maxWid = 20; | 669 | maxWid = 20; |
670 | 670 | ||
671 | QFont dlf = KOPrefs::instance()->mTimeLabelsFont; | 671 | QFont dlf = KOPrefs::instance()->mTimeLabelsFont; |
672 | QFontMetrics fm ( dlf ); | 672 | QFontMetrics fm ( dlf ); |
673 | int selCount = mSelectedDates.count(); | 673 | int selCount = mSelectedDates.count(); |
674 | int widModulo = maxWid - (mAgenda->gridSpacingX() * selCount)+1; | 674 | int widModulo = maxWid - (mAgenda->gridSpacingX() * selCount)+1; |
675 | QString dayTest = "Mon 20"; | 675 | QString dayTest = "Mon 20"; |
676 | //QString dayTest = "Mon 20"; | 676 | //QString dayTest = "Mon 20"; |
677 | int wid = fm.width( dayTest ); | 677 | int wid = fm.width( dayTest ); |
678 | //maxWid -= ( selCount * 3 ); //working for QLabels | 678 | //maxWid -= ( selCount * 3 ); //working for QLabels |
679 | if ( QApplication::desktop()->width() <= 320 ) | 679 | if ( QApplication::desktop()->width() <= 320 ) |
680 | maxWid -= ( selCount * 3 ); //working for QPushButton | 680 | maxWid -= ( selCount * 3 ); //working for QPushButton |
681 | else | 681 | else |
682 | maxWid -= ( selCount * 3 ); //working for QPushButton | 682 | maxWid -= ( selCount * 3 ); //working for QPushButton |
683 | if ( maxWid < 0 ) | 683 | if ( maxWid < 0 ) |
684 | maxWid = 20; | 684 | maxWid = 20; |
685 | int needWid = wid * selCount; | 685 | int needWid = wid * selCount; |
686 | //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); | 686 | //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); |
687 | //if ( needWid > maxWid ) | 687 | //if ( needWid > maxWid ) |
688 | // qDebug("DAYLABELS TOOOOOOO BIG "); | 688 | // qDebug("DAYLABELS TOOOOOOO BIG "); |
689 | while ( needWid > maxWid ) { | 689 | while ( needWid > maxWid ) { |
690 | dayTest = dayTest.left( dayTest.length() - 1 ); | 690 | dayTest = dayTest.left( dayTest.length() - 1 ); |
691 | wid = fm.width( dayTest ); | 691 | wid = fm.width( dayTest ); |
692 | needWid = wid * selCount; | 692 | needWid = wid * selCount; |
693 | } | 693 | } |
694 | int maxLen = dayTest.length(); | 694 | int maxLen = dayTest.length(); |
695 | int fontPoint = dlf.pointSize(); | 695 | int fontPoint = dlf.pointSize(); |
696 | if ( maxLen < 2 ) { | 696 | if ( maxLen < 2 ) { |
697 | int fontPoint = dlf.pointSize(); | 697 | int fontPoint = dlf.pointSize(); |
698 | while ( fontPoint > 4 ) { | 698 | while ( fontPoint > 4 ) { |
699 | --fontPoint; | 699 | --fontPoint; |
700 | dlf.setPointSize( fontPoint ); | 700 | dlf.setPointSize( fontPoint ); |
701 | QFontMetrics f( dlf ); | 701 | QFontMetrics f( dlf ); |
702 | wid = f.width( "30" ); | 702 | wid = f.width( "30" ); |
703 | needWid = wid * selCount; | 703 | needWid = wid * selCount; |
704 | if ( needWid < maxWid ) | 704 | if ( needWid < maxWid ) |
705 | break; | 705 | break; |
706 | } | 706 | } |
707 | maxLen = 2; | 707 | maxLen = 2; |
708 | } | 708 | } |
709 | //qDebug("Max len %d ", dayTest.length() ); | 709 | //qDebug("Max len %d ", dayTest.length() ); |
710 | 710 | ||
711 | QFontMetrics tempF( dlf ); | 711 | QFontMetrics tempF( dlf ); |
712 | newHight = tempF.height(); | 712 | newHight = tempF.height(); |
713 | mDayLabels->setFont( dlf ); | 713 | mDayLabels->setFont( dlf ); |
714 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; | 714 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; |
715 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); | 715 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); |
716 | //mLayoutDayLabels->addSpacing( 2 ); | 716 | //mLayoutDayLabels->addSpacing( 2 ); |
717 | // QFont lFont = dlf; | 717 | // QFont lFont = dlf; |
718 | bool appendLabels = false; | 718 | bool appendLabels = false; |
719 | KOAgendaButton *dayLabel; | 719 | KOAgendaButton *dayLabel; |
720 | dayLabel = mDayLabelsList.first(); | 720 | dayLabel = mDayLabelsList.first(); |
721 | if ( !dayLabel ) { | 721 | if ( !dayLabel ) { |
722 | appendLabels = true; | 722 | appendLabels = true; |
723 | dayLabel = getNewDaylabel(); | 723 | dayLabel = getNewDaylabel(); |
724 | } | 724 | } |
725 | dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() ); | 725 | dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() ); |
726 | dayLabel->setFont( dlf ); | 726 | dayLabel->setFont( dlf ); |
727 | dayLabel->setNum( -1 ); | 727 | dayLabel->setNum( -1 ); |
728 | //dayLabel->setAlignment(QLabel::AlignHCenter); | 728 | //dayLabel->setAlignment(QLabel::AlignHCenter); |
729 | 729 | ||
730 | dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); | 730 | dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); |
731 | dayLabel->show(); | 731 | dayLabel->show(); |
732 | DateList::ConstIterator dit; | 732 | DateList::ConstIterator dit; |
733 | bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); | 733 | bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); |
734 | int counter = -1; | 734 | int counter = -1; |
735 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { | 735 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { |
736 | ++counter; | 736 | ++counter; |
737 | QDate date = *dit; | 737 | QDate date = *dit; |
738 | // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); | 738 | // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); |
739 | if ( ! appendLabels ) { | 739 | if ( ! appendLabels ) { |
740 | dayLabel = mDayLabelsList.next(); | 740 | dayLabel = mDayLabelsList.next(); |
741 | if ( !dayLabel ) | 741 | if ( !dayLabel ) |
742 | appendLabels = true; | 742 | appendLabels = true; |
743 | } | 743 | } |
744 | if ( appendLabels ) { | 744 | if ( appendLabels ) { |
745 | dayLabel = getNewDaylabel(); | 745 | dayLabel = getNewDaylabel(); |
746 | } | 746 | } |
747 | dayLabel->setMinimumWidth( 1 ); | 747 | dayLabel->setMinimumWidth( 1 ); |
748 | dayLabel->setMaximumWidth( 10240 ); | 748 | dayLabel->setMaximumWidth( 10240 ); |
749 | dayLabel->setFont( dlf ); | 749 | dayLabel->setFont( dlf ); |
750 | dayLabel->show(); | 750 | dayLabel->show(); |
751 | dayLabel->setAutoRepeat( false ); | 751 | dayLabel->setAutoRepeat( false ); |
752 | dayLabel->setNum( counter ); | 752 | dayLabel->setNum( counter ); |
753 | QString str; | 753 | QString str; |
754 | int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); | 754 | int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); |
755 | QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); | 755 | QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); |
756 | switch ( maxLen ) { | 756 | switch ( maxLen ) { |
757 | case 2: | 757 | case 2: |
758 | str = QString::number( date.day() ); | 758 | str = QString::number( date.day() ); |
759 | break; | 759 | break; |
760 | 760 | ||
761 | case 3: | 761 | case 3: |
762 | str = dayName.left( 1 ) +QString::number( date.day()); | 762 | str = dayName.left( 1 ) +QString::number( date.day()); |
763 | 763 | ||
764 | break; | 764 | break; |
765 | case 4: | 765 | case 4: |
766 | str = dayName.left( 1 ) + " " +QString::number( date.day()); | 766 | str = dayName.left( 1 ) + " " +QString::number( date.day()); |
767 | 767 | ||
768 | break; | 768 | break; |
769 | case 5: | 769 | case 5: |
770 | str = dayName.left( 2 ) + " " +QString::number( date.day()); | 770 | str = dayName.left( 2 ) + " " +QString::number( date.day()); |
771 | 771 | ||
772 | break; | 772 | break; |
773 | case 6: | 773 | case 6: |
774 | str = dayName.left( 3 ) + " " +QString::number( date.day()); | 774 | str = dayName.left( 3 ) + " " +QString::number( date.day()); |
775 | break; | 775 | break; |
776 | 776 | ||
777 | default: | 777 | default: |
778 | break; | 778 | break; |
779 | } | 779 | } |
780 | if ( oneday ) { | 780 | if ( oneday ) { |
781 | QString addString; | 781 | QString addString; |
782 | if ( mSelectedDates.first() == QDateTime::currentDateTime().date() ) | 782 | if ( mSelectedDates.first() == QDateTime::currentDateTime().date() ) |
783 | addString = i18n("Today"); | 783 | addString = i18n("Today"); |
784 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) | 784 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) |
785 | addString = i18n("Tomorrow"); | 785 | addString = i18n("Tomorrow"); |
786 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) | 786 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) |
787 | addString = i18n("Yesterday"); | 787 | addString = i18n("Yesterday"); |
788 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) | 788 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) |
789 | addString = i18n("Day before yesterday"); | 789 | addString = i18n("Day before yesterday"); |
790 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) | 790 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) |
791 | addString = i18n("Day after tomorrow"); | 791 | addString = i18n("Day after tomorrow"); |
792 | if ( !addString.isEmpty() ) { | 792 | if ( !addString.isEmpty() ) { |
793 | str = addString+", " + str; | 793 | str = addString+", " + str; |
794 | } else { | 794 | } else { |
795 | str = KGlobal::locale()->formatDate( date, KOPrefs::instance()->mShortDateInViewer); | 795 | str = KGlobal::locale()->formatDate( date, KOPrefs::instance()->mShortDateInViewer); |
796 | } | 796 | } |
797 | } | 797 | } |
798 | dayLabel->setText(str); | 798 | dayLabel->setText(str); |
799 | //dayLabel->setAlignment(QLabel::AlignHCenter); | 799 | //dayLabel->setAlignment(QLabel::AlignHCenter); |
800 | if (date == QDate::currentDate()) { | 800 | if (date == QDate::currentDate()) { |
801 | QFont bFont = dlf; | 801 | QFont bFont = dlf; |
802 | bFont.setBold( true ); | 802 | bFont.setBold( true ); |
803 | dayLabel->setFont(bFont); | 803 | dayLabel->setFont(bFont); |
804 | } | 804 | } |
805 | //dayLayout->addWidget(dayLabel); | 805 | //dayLayout->addWidget(dayLabel); |
806 | 806 | ||
807 | #ifndef KORG_NOPLUGINS | 807 | #ifndef KORG_NOPLUGINS |
808 | CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); | 808 | CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); |
809 | CalendarDecoration *it; | 809 | CalendarDecoration *it; |
810 | for(it = cds.first(); it; it = cds.next()) { | 810 | for(it = cds.first(); it; it = cds.next()) { |
811 | QString text = it->shortText( date ); | 811 | QString text = it->shortText( date ); |
812 | if ( !text.isEmpty() ) { | 812 | if ( !text.isEmpty() ) { |
813 | QLabel *label = new QLabel(text,mDayLabels); | 813 | QLabel *label = new QLabel(text,mDayLabels); |
814 | label->setAlignment(AlignCenter); | 814 | label->setAlignment(AlignCenter); |
815 | dayLayout->addWidget(label); | 815 | dayLayout->addWidget(label); |
816 | } | 816 | } |
817 | } | 817 | } |
818 | 818 | ||
819 | for(it = cds.first(); it; it = cds.next()) { | 819 | for(it = cds.first(); it; it = cds.next()) { |
820 | QWidget *wid = it->smallWidget(mDayLabels,date); | 820 | QWidget *wid = it->smallWidget(mDayLabels,date); |
821 | if ( wid ) { | 821 | if ( wid ) { |
822 | // wid->setHeight(20); | 822 | // wid->setHeight(20); |
823 | dayLayout->addWidget(wid); | 823 | dayLayout->addWidget(wid); |
824 | } | 824 | } |
825 | } | 825 | } |
826 | #endif | 826 | #endif |
827 | } | 827 | } |
828 | if ( ! appendLabels ) { | 828 | if ( ! appendLabels ) { |
829 | dayLabel = mDayLabelsList.next(); | 829 | dayLabel = mDayLabelsList.next(); |
830 | if ( !dayLabel ) | 830 | if ( !dayLabel ) |
831 | appendLabels = true; | 831 | appendLabels = true; |
832 | } | 832 | } |
833 | if ( appendLabels ) { | 833 | if ( appendLabels ) { |
834 | dayLabel = getNewDaylabel(); | 834 | dayLabel = getNewDaylabel(); |
835 | } | 835 | } |
836 | //dayLabel->hide();//test only | 836 | //dayLabel->hide();//test only |
837 | 837 | ||
838 | dayLabel->setText(">"); | 838 | dayLabel->setText(">"); |
839 | dayLabel->setFont( dlf ); | 839 | dayLabel->setFont( dlf ); |
840 | dayLabel->setAutoRepeat( true ); | 840 | dayLabel->setAutoRepeat( true ); |
841 | dayLabel->show(); | 841 | dayLabel->show(); |
842 | dayLabel->setNum( -2 ); | 842 | dayLabel->setNum( -2 ); |
843 | dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ widModulo ); | 843 | dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ widModulo ); |
844 | 844 | ||
845 | //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); | 845 | //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); |
846 | if ( !appendLabels ) { | 846 | if ( !appendLabels ) { |
847 | dayLabel = mDayLabelsList.next(); | 847 | dayLabel = mDayLabelsList.next(); |
848 | while ( dayLabel ) { | 848 | while ( dayLabel ) { |
849 | //qDebug("!dayLabel %d",dayLabel ); | 849 | //qDebug("!dayLabel %d",dayLabel ); |
850 | dayLabel->hide(); | 850 | dayLabel->hide(); |
851 | dayLabel = mDayLabelsList.next(); | 851 | dayLabel = mDayLabelsList.next(); |
852 | } | 852 | } |
853 | } | 853 | } |
854 | 854 | ||
855 | mDayLabelsFrame->setFixedHeight( newHight + 4 ); | 855 | mDayLabelsFrame->setFixedHeight( newHight + 4 ); |
856 | } | 856 | } |
857 | 857 | ||
858 | int KOAgendaView::maxDatesHint() | 858 | int KOAgendaView::maxDatesHint() |
859 | { | 859 | { |
860 | // Not sure about the max number of events, so return 0 for now. | 860 | // Not sure about the max number of events, so return 0 for now. |
861 | return 0; | 861 | return 0; |
862 | } | 862 | } |
863 | 863 | ||
864 | int KOAgendaView::currentDateCount() | 864 | int KOAgendaView::currentDateCount() |
865 | { | 865 | { |
866 | return mSelectedDates.count(); | 866 | return mSelectedDates.count(); |
867 | } | 867 | } |
868 | 868 | ||
869 | QPtrList<Incidence> KOAgendaView::selectedIncidences() | 869 | QPtrList<Incidence> KOAgendaView::selectedIncidences() |
870 | { | 870 | { |
871 | QPtrList<Incidence> selected; | 871 | QPtrList<Incidence> selected; |
872 | Incidence *incidence; | 872 | Incidence *incidence; |
873 | 873 | ||
874 | incidence = mAgenda->selectedIncidence(); | 874 | incidence = mAgenda->selectedIncidence(); |
875 | if (incidence) selected.append(incidence); | 875 | if (incidence) selected.append(incidence); |
876 | 876 | ||
877 | incidence = mAllDayAgenda->selectedIncidence(); | 877 | incidence = mAllDayAgenda->selectedIncidence(); |
878 | if (incidence) selected.append(incidence); | 878 | if (incidence) selected.append(incidence); |
879 | 879 | ||
880 | return selected; | 880 | return selected; |
881 | } | 881 | } |
882 | 882 | ||
883 | DateList KOAgendaView::selectedDates() | 883 | DateList KOAgendaView::selectedDates() |
884 | { | 884 | { |
885 | DateList selected; | 885 | DateList selected; |
886 | QDate qd; | 886 | QDate qd; |
887 | 887 | ||
888 | qd = mAgenda->selectedIncidenceDate(); | 888 | qd = mAgenda->selectedIncidenceDate(); |
889 | if (qd.isValid()) selected.append(qd); | 889 | if (qd.isValid()) selected.append(qd); |
890 | 890 | ||
891 | qd = mAllDayAgenda->selectedIncidenceDate(); | 891 | qd = mAllDayAgenda->selectedIncidenceDate(); |
892 | if (qd.isValid()) selected.append(qd); | 892 | if (qd.isValid()) selected.append(qd); |
893 | 893 | ||
894 | return selected; | 894 | return selected; |
895 | } | 895 | } |
896 | 896 | ||
897 | 897 | ||
898 | void KOAgendaView::updateView() | 898 | void KOAgendaView::updateView() |
899 | { | 899 | { |
900 | if ( mBlockUpdating ) | 900 | if ( mBlockUpdating ) |
901 | return; | 901 | return; |
902 | // kdDebug() << "KOAgendaView::updateView()" << endl; | 902 | // kdDebug() << "KOAgendaView::updateView()" << endl; |
903 | fillAgenda(); | 903 | fillAgenda(); |
904 | 904 | ||
905 | } | 905 | } |
906 | 906 | ||
907 | 907 | ||
908 | /* | 908 | /* |
909 | Update configuration settings for the agenda view. This method is not | 909 | Update configuration settings for the agenda view. This method is not |
910 | complete. | 910 | complete. |
911 | */ | 911 | */ |
912 | void KOAgendaView::updateConfig() | 912 | void KOAgendaView::updateConfig() |
913 | { | 913 | { |
914 | if ( mBlockUpdating ) | 914 | if ( mBlockUpdating ) |
915 | return; | 915 | return; |
916 | if ( mAgenda->height() > 96 * KOPrefs::instance()->mHourSize ) { | 916 | if ( mAgenda->height() > 96 * KOPrefs::instance()->mHourSize ) { |
917 | int old = KOPrefs::instance()->mHourSize; | 917 | int old = KOPrefs::instance()->mHourSize; |
918 | KOPrefs::instance()->mHourSize = mAgenda->height()/96 +1; | 918 | KOPrefs::instance()->mHourSize = mAgenda->height()/96 +1; |
919 | //qDebug("KOPrefs::instance()->mHourSize adjusted %d to %d ", old,KOPrefs::instance()->mHourSize ); | 919 | //qDebug("KOPrefs::instance()->mHourSize adjusted %d to %d ", old,KOPrefs::instance()->mHourSize ); |
920 | } | 920 | } |
921 | 921 | ||
922 | 922 | ||
923 | // update config for children | 923 | // update config for children |
924 | mTimeLabels->updateConfig(); | 924 | mTimeLabels->updateConfig(); |
925 | mAgenda->storePosition(); | 925 | mAgenda->storePosition(); |
926 | mAgenda->updateConfig(); | 926 | mAgenda->updateConfig(); |
927 | mAllDayAgenda->updateConfig(); | 927 | mAllDayAgenda->updateConfig(); |
928 | // widget synchronization | 928 | // widget synchronization |
929 | //TODO: find a better way, maybe signal/slot | 929 | //TODO: find a better way, maybe signal/slot |
930 | mTimeLabels->positionChanged(); | 930 | mTimeLabels->positionChanged(); |
931 | 931 | ||
932 | // for some reason, this needs to be called explicitly | 932 | // for some reason, this needs to be called explicitly |
933 | mTimeLabels->repaint(); | 933 | mTimeLabels->repaint(); |
934 | 934 | ||
935 | mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); | 935 | mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); |
936 | 936 | ||
937 | // ToolTips displaying summary of events | 937 | // ToolTips displaying summary of events |
938 | KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() | 938 | KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() |
939 | ->mEnableToolTips); | 939 | ->mEnableToolTips); |
940 | 940 | ||
941 | //setHolidayMasks(); | 941 | //setHolidayMasks(); |
942 | 942 | ||
943 | //createDayLabels(); called by via updateView(); | 943 | //createDayLabels(); called by via updateView(); |
944 | mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth()); | 944 | mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth()); |
945 | updateView(); | 945 | updateView(); |
946 | mAgenda->restorePosition(); | 946 | mAgenda->restorePosition(); |
947 | } | 947 | } |
948 | 948 | ||
949 | 949 | ||
950 | void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) | 950 | void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) |
951 | { | 951 | { |
952 | 952 | ||
953 | 953 | ||
954 | int xxx = item->cellX(); | 954 | int xxx = item->cellX(); |
955 | //qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),item->cellYBottom() ); | 955 | //qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),item->cellYBottom() ); |
956 | if ( mMinY.at(xxx) > item->cellYTop() ) | 956 | if ( mMinY.at(xxx) > item->cellYTop() ) |
957 | mMinY.at(xxx) = item->cellYTop(); | 957 | mMinY.at(xxx) = item->cellYTop(); |
958 | if ( mMaxY.at(xxx) < item->cellYBottom() ) | 958 | if ( mMaxY.at(xxx) < item->cellYBottom() ) |
959 | mMaxY.at(xxx) = item->cellYBottom(); | 959 | mMaxY.at(xxx) = item->cellYBottom(); |
960 | 960 | ||
961 | QDateTime startDt,endDt; | 961 | QDateTime startDt,endDt; |
962 | QDate startDate; | 962 | QDate startDate; |
963 | int lenInSecs; | 963 | int lenInSecs; |
964 | // if ( type == KOAgenda::RESIZETOP ) | 964 | // if ( type == KOAgenda::RESIZETOP ) |
965 | // qDebug("RESIZETOP "); | 965 | // qDebug("RESIZETOP "); |
966 | // if ( type == KOAgenda::RESIZEBOTTOM ) | 966 | // if ( type == KOAgenda::RESIZEBOTTOM ) |
967 | // qDebug("RESIZEBOTTOM "); | 967 | // qDebug("RESIZEBOTTOM "); |
968 | // if ( type == KOAgenda::MOVE ) | 968 | // if ( type == KOAgenda::MOVE ) |
969 | // qDebug("MOVE "); | 969 | // qDebug("MOVE "); |
970 | if ( item->incidence()->type() == "Event" ) { | 970 | if ( item->incidence()->type() == "Event" ) { |
971 | startDt =item->incidence()->dtStart(); | 971 | startDt =item->incidence()->dtStart(); |
972 | endDt = item->incidence()->dtEnd(); | 972 | endDt = item->incidence()->dtEnd(); |
973 | lenInSecs = startDt.secsTo( endDt ); | 973 | lenInSecs = startDt.secsTo( endDt ); |
974 | } | 974 | } |
975 | 975 | ||
976 | // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); | 976 | // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); |
977 | 977 | ||
978 | if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { | 978 | if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { |
979 | startDate = mSelectedDates[item->mLastMoveXPos]; | 979 | startDate = mSelectedDates[item->mLastMoveXPos]; |
980 | } else { | 980 | } else { |
981 | if (item->cellX() < 0) { | 981 | if (item->cellX() < 0) { |
982 | startDate = (mSelectedDates.first()).addDays(item->cellX()); | 982 | startDate = (mSelectedDates.first()).addDays(item->cellX()); |
983 | } else { | 983 | } else { |
984 | startDate = mSelectedDates[item->cellX()]; | 984 | startDate = mSelectedDates[item->cellX()]; |
985 | } | 985 | } |
986 | } | 986 | } |
987 | startDt.setDate(startDate); | 987 | startDt.setDate(startDate); |
988 | 988 | ||
989 | if (item->incidence()->doesFloat()) { | 989 | if (item->incidence()->doesFloat()) { |
990 | endDt.setDate(startDate.addDays(item->cellWidth() - 1)); | 990 | endDt.setDate(startDate.addDays(item->cellWidth() - 1)); |
991 | } else { | 991 | } else { |
992 | if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) | 992 | if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) |
993 | startDt.setTime(mAgenda->gyToTime(item->cellYTop())); | 993 | startDt.setTime(mAgenda->gyToTime(item->cellYTop())); |
994 | if ( item->incidence()->type() == "Event" ) { | 994 | if ( item->incidence()->type() == "Event" ) { |
995 | if ( type == KOAgenda::MOVE ) { | 995 | if ( type == KOAgenda::MOVE ) { |
996 | endDt = startDt.addSecs(lenInSecs); | 996 | endDt = startDt.addSecs(lenInSecs); |
997 | 997 | ||
998 | } else if ( type == KOAgenda::RESIZEBOTTOM ) { | 998 | } else if ( type == KOAgenda::RESIZEBOTTOM ) { |
999 | if (item->lastMultiItem()) { | 999 | if (item->lastMultiItem()) { |
1000 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 1000 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
1001 | endDt.setDate(startDate. | 1001 | endDt.setDate(startDate. |
1002 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 1002 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
1003 | } else { | 1003 | } else { |
1004 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 1004 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
1005 | endDt.setDate(startDate); | 1005 | endDt.setDate(startDate); |
1006 | } | 1006 | } |
1007 | } | 1007 | } |
1008 | } else { | 1008 | } else { |
1009 | // todo | 1009 | // todo |
1010 | if (item->lastMultiItem()) { | 1010 | if (item->lastMultiItem()) { |
1011 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 1011 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
1012 | endDt.setDate(startDate. | 1012 | endDt.setDate(startDate. |
1013 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 1013 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
1014 | } else { | 1014 | } else { |
1015 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); | 1015 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); |
1016 | if ( item->cellYBottom() > 0 ) | 1016 | if ( item->cellYBottom() > 0 ) |
1017 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 1017 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
1018 | else | 1018 | else |
1019 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); | 1019 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); |
1020 | endDt.setDate(startDate); | 1020 | endDt.setDate(startDate); |
1021 | } | 1021 | } |
1022 | } | 1022 | } |
1023 | } | 1023 | } |
1024 | if ( item->incidence()->type() == "Event" ) { | 1024 | if ( item->incidence()->type() == "Event" ) { |
1025 | item->incidence()->setDtStart(startDt); | 1025 | item->incidence()->setDtStart(startDt); |
1026 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); | 1026 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); |
1027 | } else if ( item->incidence()->type() == "Todo" ) { | 1027 | } else if ( item->incidence()->type() == "Todo" ) { |
1028 | Todo* to = static_cast<Todo*>(item->incidence()); | 1028 | Todo* to = static_cast<Todo*>(item->incidence()); |
1029 | 1029 | ||
1030 | to->setDtDue(endDt); | 1030 | to->setDtDue(endDt); |
1031 | if ( to->hasStartDate() ) { | 1031 | if ( to->hasStartDate() ) { |
1032 | if (to->dtStart() >= to->dtDue() ) | 1032 | if (to->dtStart() >= to->dtDue() ) |
1033 | to->setDtStart(to->dtDue().addDays( -2 )); | 1033 | to->setDtStart(to->dtDue().addDays( -2 )); |
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | } | 1036 | } |
1037 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); | 1037 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); |
1038 | item->incidence()->setRevision(item->incidence()->revision()+1); | 1038 | item->incidence()->setRevision(item->incidence()->revision()+1); |
1039 | item->setItemDate(startDt.date()); | 1039 | item->setItemDate(startDt.date()); |
1040 | //item->updateItem(); | 1040 | //item->updateItem(); |
1041 | if ( item->incidence()->type() == "Todo" ) { | 1041 | if ( item->incidence()->type() == "Todo" ) { |
1042 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); | 1042 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); |
1043 | 1043 | ||
1044 | } | 1044 | } |
1045 | else | 1045 | else |
1046 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); | 1046 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); |
1047 | item->updateItem(); | 1047 | item->updateItem(); |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) | 1050 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) |
1051 | { | 1051 | { |
1052 | // kdDebug() << "KOAgendaView::selectDates" << endl; | 1052 | // kdDebug() << "KOAgendaView::selectDates" << endl; |
1053 | 1053 | ||
1054 | mSelectedDates.clear(); | 1054 | mSelectedDates.clear(); |
1055 | // qDebug("KOAgendaView::showDates "); | 1055 | // qDebug("KOAgendaView::showDates "); |
1056 | QDate d = start; | 1056 | QDate d = start; |
1057 | while (d <= end) { | 1057 | while (d <= end) { |
1058 | mSelectedDates.append(d); | 1058 | mSelectedDates.append(d); |
1059 | d = d.addDays( 1 ); | 1059 | d = d.addDays( 1 ); |
1060 | } | 1060 | } |
1061 | 1061 | ||
1062 | // and update the view | 1062 | // and update the view |
1063 | fillAgenda(); | 1063 | fillAgenda(); |
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | 1066 | ||
1067 | void KOAgendaView::showEvents(QPtrList<Event>) | 1067 | void KOAgendaView::showEvents(QPtrList<Event>) |
1068 | { | 1068 | { |
1069 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; | 1069 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | void KOAgendaView::changeEventDisplay(Event *, int) | 1072 | void KOAgendaView::changeEventDisplay(Event *, int) |
1073 | { | 1073 | { |
1074 | // qDebug("KOAgendaView::changeEventDisplay "); | 1074 | // qDebug("KOAgendaView::changeEventDisplay "); |
1075 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; | 1075 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; |
1076 | // this should be re-written to be MUCH smarter. Right now we | 1076 | // this should be re-written to be MUCH smarter. Right now we |
1077 | // are just playing dumb. | 1077 | // are just playing dumb. |
1078 | fillAgenda(); | 1078 | fillAgenda(); |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | void KOAgendaView::fillAgenda(const QDate &) | 1081 | void KOAgendaView::fillAgenda(const QDate &) |
1082 | { | 1082 | { |
1083 | // qDebug("KOAgendaView::fillAgenda "); | 1083 | // qDebug("KOAgendaView::fillAgenda "); |
1084 | fillAgenda(); | 1084 | fillAgenda(); |
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | void KOAgendaView::fillAgenda() | 1087 | void KOAgendaView::fillAgenda() |
1088 | { | 1088 | { |
1089 | if ( globalFlagBlockStartup ) | 1089 | if ( globalFlagBlockStartup ) |
1090 | return; | 1090 | return; |
1091 | if ( globalFlagBlockAgenda == 1 ) | 1091 | if ( globalFlagBlockAgenda == 1 ) |
1092 | return; | 1092 | return; |
1093 | static bool onlyOne = false; | 1093 | static bool onlyOne = false; |
1094 | if ( onlyOne ) | 1094 | if ( onlyOne ) |
1095 | return; | 1095 | return; |
1096 | onlyOne = true; | 1096 | onlyOne = true; |
1097 | //if ( globalFlagBlockAgenda == 2 ) | 1097 | //if ( globalFlagBlockAgenda == 2 ) |
1098 | //globalFlagBlockAgenda = 0; | 1098 | //globalFlagBlockAgenda = 0; |
1099 | // globalFlagBlockPainting = false; | 1099 | // globalFlagBlockPainting = false; |
1100 | if ( globalFlagBlockAgenda == 0 ) | 1100 | if ( globalFlagBlockAgenda == 0 ) |
1101 | globalFlagBlockAgenda = 1; | 1101 | globalFlagBlockAgenda = 1; |
1102 | // clearView(); | 1102 | // clearView(); |
1103 | //qDebug("fillAgenda()++++ "); | 1103 | //qDebug("fillAgenda()++++ "); |
1104 | globalFlagBlockAgendaItemPaint = 1; | 1104 | globalFlagBlockAgendaItemPaint = 1; |
1105 | 1105 | ||
1106 | mAllDayAgenda->changeColumns(mSelectedDates.count()); | 1106 | mAllDayAgenda->changeColumns(mSelectedDates.count()); |
1107 | mAgenda->changeColumns(mSelectedDates.count()); | 1107 | mAgenda->changeColumns(mSelectedDates.count()); |
1108 | qApp->processEvents(); | 1108 | qApp->processEvents(); |
1109 | mEventIndicatorTop->changeColumns(mSelectedDates.count()); | 1109 | mEventIndicatorTop->changeColumns(mSelectedDates.count()); |
1110 | mEventIndicatorBottom->changeColumns(mSelectedDates.count()); | 1110 | mEventIndicatorBottom->changeColumns(mSelectedDates.count()); |
1111 | setHolidayMasks(); | 1111 | setHolidayMasks(); |
1112 | 1112 | ||
1113 | //mAgenda->hideUnused(); | 1113 | //mAgenda->hideUnused(); |
1114 | //mAllDayAgenda->hideUnused(); | 1114 | //mAllDayAgenda->hideUnused(); |
1115 | 1115 | ||
1116 | // mAgenda->blockNextRepaint( false ); | 1116 | // mAgenda->blockNextRepaint( false ); |
1117 | // mAgenda->viewport()->repaint(); | 1117 | // mAgenda->viewport()->repaint(); |
1118 | // mAgenda->blockNextRepaint( true ); | 1118 | // mAgenda->blockNextRepaint( true ); |
1119 | mMinY.resize(mSelectedDates.count()); | 1119 | mMinY.resize(mSelectedDates.count()); |
1120 | mMaxY.resize(mSelectedDates.count()); | 1120 | mMaxY.resize(mSelectedDates.count()); |
1121 | 1121 | ||
1122 | QPtrList<Event> dayEvents; | 1122 | QPtrList<Event> dayEvents; |
1123 | 1123 | ||
1124 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. | 1124 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. |
1125 | // Therefore, gtodoset all of them. | 1125 | // Therefore, gtodoset all of them. |
1126 | QPtrList<Todo> todos = calendar()->todos(); | 1126 | QPtrList<Todo> todos = calendar()->todos(); |
1127 | 1127 | ||
1128 | mAgenda->setDateList(mSelectedDates); | 1128 | mAgenda->setDateList(mSelectedDates); |
1129 | 1129 | ||
1130 | QDate today = QDate::currentDate(); | 1130 | QDate today = QDate::currentDate(); |
1131 | 1131 | ||
1132 | DateList::ConstIterator dit; | 1132 | DateList::ConstIterator dit; |
1133 | int curCol = 0; | 1133 | int curCol = 0; |
1134 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { | 1134 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { |
1135 | QDate currentDate = *dit; | 1135 | QDate currentDate = *dit; |
1136 | // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() | 1136 | // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() |
1137 | // << endl; | 1137 | // << endl; |
1138 | 1138 | ||
1139 | dayEvents = calendar()->events(currentDate,true); | 1139 | dayEvents = calendar()->events(currentDate,true); |
1140 | 1140 | ||
1141 | // Default values, which can never be reached | 1141 | // Default values, which can never be reached |
1142 | mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; | 1142 | mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; |
1143 | mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; | 1143 | mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; |
1144 | 1144 | ||
1145 | unsigned int numEvent; | 1145 | unsigned int numEvent; |
1146 | for(numEvent=0;numEvent<dayEvents.count();++numEvent) { | 1146 | for(numEvent=0;numEvent<dayEvents.count();++numEvent) { |
1147 | Event *event = dayEvents.at(numEvent); | 1147 | Event *event = dayEvents.at(numEvent); |
1148 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) | 1148 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) |
1149 | if ( event->uid().left(15) == QString("last-syncEvent-") ) | 1149 | if ( event->uid().left(15) == QString("last-syncEvent-") ) |
1150 | continue; | 1150 | continue; |
1151 | // kdDebug() << " Event: " << event->summary() << endl; | 1151 | // kdDebug() << " Event: " << event->summary() << endl; |
1152 | 1152 | ||
1153 | int beginX = currentDate.daysTo(event->dtStart().date()) + curCol; | 1153 | int beginX = currentDate.daysTo(event->dtStart().date()) + curCol; |
1154 | int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; | 1154 | int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; |
1155 | 1155 | ||
1156 | // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; | 1156 | // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; |
1157 | 1157 | ||
1158 | if (event->doesFloat()) { | 1158 | if (event->doesFloat()) { |
1159 | if (event->recurrence()->doesRecur()) { | 1159 | if (event->recurrence()->doesRecur()) { |
1160 | if (event->isMultiDay() ) { | 1160 | if (event->isMultiDay() ) { |
1161 | endX = endX - beginX;// endX is now number of days | 1161 | endX = endX - beginX;// endX is now number of days |
1162 | if ( event->recursOn( currentDate ) ) { | 1162 | if ( event->recursOn( currentDate ) ) { |
1163 | endX += curCol; | 1163 | endX += curCol; |
1164 | beginX = curCol; | 1164 | beginX = curCol; |
1165 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1165 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1166 | } else { | 1166 | } else { |
1167 | //qDebug("days %d %s",endX , currentDate.toString().latin1()); | 1167 | //qDebug("days %d %s",endX , currentDate.toString().latin1()); |
1168 | QDate dateit = currentDate.addDays( -endX ); | 1168 | QDate dateit = currentDate.addDays( -endX ); |
1169 | if ( event->recursOn( dateit ) ) { | 1169 | if ( event->recursOn( dateit ) ) { |
1170 | //qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() ); | 1170 | //qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() ); |
1171 | if ( curCol-endX < 0 ) { | 1171 | if ( curCol-endX < 0 ) { |
1172 | mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol); | 1172 | mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol); |
1173 | } | 1173 | } |
1174 | } | 1174 | } |
1175 | } | 1175 | } |
1176 | } else { | 1176 | } else { |
1177 | mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); | 1177 | mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); |
1178 | } | 1178 | } |
1179 | 1179 | ||
1180 | } else { | 1180 | } else { |
1181 | if (beginX <= 0 && curCol == 0) { | 1181 | if (beginX <= 0 && curCol == 0) { |
1182 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1182 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1183 | } else if (beginX == curCol) { | 1183 | } else if (beginX == curCol) { |
1184 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1184 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1185 | } | 1185 | } |
1186 | } | 1186 | } |
1187 | } else if (event->isMultiDay()) { | 1187 | } else if (event->isMultiDay()) { |
1188 | if ( event->doesRecur () ) { | 1188 | if ( event->doesRecur () ) { |
1189 | QDate dateit = currentDate; | 1189 | QDate dateit = currentDate; |
1190 | int count = 0; | 1190 | int count = 0; |
1191 | int max = event->dtStart().daysTo( event->dtEnd() ) +2; | 1191 | int max = event->dtStart().daysTo( event->dtEnd() ) +2; |
1192 | while (! event->recursOn( dateit ) && count <= max ) { | 1192 | while (! event->recursOn( dateit ) && count <= max ) { |
1193 | ++count; | 1193 | ++count; |
1194 | dateit = dateit.addDays( -1 ); | 1194 | dateit = dateit.addDays( -1 ); |
1195 | } | 1195 | } |
1196 | bool ok; | 1196 | bool ok; |
1197 | QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok ); | 1197 | QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok ); |
1198 | if ( ok ) | 1198 | if ( ok ) |
1199 | { | 1199 | { |
1200 | int secs = event->dtStart().secsTo( event->dtEnd() ); | 1200 | int secs = event->dtStart().secsTo( event->dtEnd() ); |
1201 | QDateTime nextOcend =nextOcstart.addSecs( secs ); ; | 1201 | QDateTime nextOcend =nextOcstart.addSecs( secs ); ; |
1202 | beginX = currentDate.daysTo(nextOcstart.date()) + curCol; | 1202 | beginX = currentDate.daysTo(nextOcstart.date()) + curCol; |
1203 | endX = currentDate.daysTo(nextOcend.date()) + curCol; | 1203 | endX = currentDate.daysTo(nextOcend.date()) + curCol; |
1204 | 1204 | ||
1205 | } | 1205 | } |
1206 | } | 1206 | } |
1207 | int startY = mAgenda->timeToY(event->dtStart().time()); | 1207 | int startY = mAgenda->timeToY(event->dtStart().time()); |
1208 | int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; | 1208 | int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; |
1209 | //qDebug("insert %d %d %d %d %d ",beginX,endX,startY,endY , curCol ); | 1209 | //qDebug("insert %d %d %d %d %d ",beginX,endX,startY,endY , curCol ); |
1210 | if ((beginX <= 0 && curCol == 0) || beginX == curCol) { | 1210 | if ((beginX <= 0 && curCol == 0) || beginX == curCol) { |
1211 | //qDebug("insert!!! "); | 1211 | //qDebug("insert!!! "); |
1212 | mAgenda->insertMultiItem(event,currentDate,beginX,endX,startY,endY); | 1212 | mAgenda->insertMultiItem(event,currentDate,beginX,endX,startY,endY); |
1213 | } | 1213 | } |
1214 | if (beginX == curCol) { | 1214 | if (beginX == curCol) { |
1215 | mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); | 1215 | mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); |
1216 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; | 1216 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; |
1217 | } else if (endX == curCol) { | 1217 | } else if (endX == curCol) { |
1218 | mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); | 1218 | mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); |
1219 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; | 1219 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; |
1220 | } else { | 1220 | } else { |
1221 | mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); | 1221 | mMinY[curCol] = mAgenda->timeToY(QTime(0,0)); |
1222 | mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); | 1222 | mMaxY[curCol] = mAgenda->timeToY(QTime(23,59)); |
1223 | } | 1223 | } |
1224 | } else { | 1224 | } else { |
1225 | int startY = mAgenda->timeToY(event->dtStart().time()); | 1225 | int startY = mAgenda->timeToY(event->dtStart().time()); |
1226 | int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; | 1226 | int endY = mAgenda->timeToY(event->dtEnd().time()) - 1; |
1227 | if (endY < startY) endY = startY; | 1227 | if (endY < startY) endY = startY; |
1228 | mAgenda->insertItem(event,currentDate,curCol,startY,endY); | 1228 | mAgenda->insertItem(event,currentDate,curCol,startY,endY); |
1229 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; | 1229 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; |
1230 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; | 1230 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; |
1231 | } | 1231 | } |
1232 | } | 1232 | } |
1233 | // ---------- [display Todos -------------- | 1233 | // ---------- [display Todos -------------- |
1234 | unsigned int numTodo; | 1234 | unsigned int numTodo; |
1235 | for (numTodo = 0; numTodo < todos.count(); ++numTodo) { | 1235 | for (numTodo = 0; numTodo < todos.count(); ++numTodo) { |
1236 | Todo *todo = todos.at(numTodo); | 1236 | Todo *todo = todos.at(numTodo); |
1237 | 1237 | ||
1238 | if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date | 1238 | if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date |
1239 | 1239 | if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda ) continue; | |
1240 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. | 1240 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. |
1241 | // Already completed items can be displayed on their original due date | 1241 | // Already completed items can be displayed on their original due date |
1242 | //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda | 1242 | //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda |
1243 | bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; | 1243 | bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; |
1244 | bool fillIn = false; | 1244 | bool fillIn = false; |
1245 | if ( todo->hasCompletedDate() && todo->completed().date() == currentDate ) | 1245 | if ( todo->hasCompletedDate() && todo->completed().date() == currentDate ) |
1246 | fillIn = true; | 1246 | fillIn = true; |
1247 | if ( ! fillIn && !todo->hasCompletedDate() ) | 1247 | if ( ! fillIn && !todo->hasCompletedDate() ) |
1248 | fillIn = ((todo->dtDue().date() == currentDate) && !overdue) || ((currentDate == today) && overdue); | 1248 | fillIn = ((todo->dtDue().date() == currentDate) && !overdue) || ((currentDate == today) && overdue); |
1249 | if ( fillIn ) { | 1249 | if ( fillIn ) { |
1250 | if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue | 1250 | if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue |
1251 | if ( KOPrefs::instance()->mShowTodoInAgenda ) | 1251 | if ( KOPrefs::instance()->mShowTodoInAgenda ) |
1252 | mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); | 1252 | mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); |
1253 | } | 1253 | } |
1254 | else { | 1254 | else { |
1255 | QDateTime dt; | 1255 | QDateTime dt; |
1256 | if ( todo->hasCompletedDate() ) | 1256 | if ( todo->hasCompletedDate() ) |
1257 | dt = todo->completed(); | 1257 | dt = todo->completed(); |
1258 | else | 1258 | else |
1259 | dt = todo->dtDue();; | 1259 | dt = todo->dtDue();; |
1260 | 1260 | ||
1261 | 1261 | ||
1262 | int endY = mAgenda->timeToY(dt.time()) - 1; | 1262 | int endY = mAgenda->timeToY(dt.time()) - 1; |
1263 | int hi = (18/KOPrefs::instance()->mHourSize); | 1263 | int hi = (18/KOPrefs::instance()->mHourSize); |
1264 | //qDebug("hei %d ",KOPrefs::instance()->mHourSize); | 1264 | //qDebug("hei %d ",KOPrefs::instance()->mHourSize); |
1265 | int startY = endY -hi; | 1265 | int startY = endY -hi; |
1266 | 1266 | ||
1267 | mAgenda->insertItem(todo,currentDate,curCol,startY,endY); | 1267 | mAgenda->insertItem(todo,currentDate,curCol,startY,endY); |
1268 | 1268 | ||
1269 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; | 1269 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; |
1270 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; | 1270 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; |
1271 | } | 1271 | } |
1272 | } | 1272 | } |
1273 | } | 1273 | } |
1274 | // ---------- display Todos] -------------- | 1274 | // ---------- display Todos] -------------- |
1275 | 1275 | ||
1276 | ++curCol; | 1276 | ++curCol; |
1277 | } | 1277 | } |
1278 | mAgenda->hideUnused(); | 1278 | mAgenda->hideUnused(); |
1279 | mAllDayAgenda->hideUnused(); | 1279 | mAllDayAgenda->hideUnused(); |
1280 | mAgenda->checkScrollBoundaries(); | 1280 | mAgenda->checkScrollBoundaries(); |
1281 | 1281 | ||
1282 | deleteSelectedDateTime(); | 1282 | deleteSelectedDateTime(); |
1283 | 1283 | ||
1284 | createDayLabels(); | 1284 | createDayLabels(); |
1285 | emit incidenceSelected( 0 ); | 1285 | emit incidenceSelected( 0 ); |
1286 | 1286 | ||
1287 | if ( globalFlagBlockAgenda == 2 ) { | 1287 | if ( globalFlagBlockAgenda == 2 ) { |
1288 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) | 1288 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) |
1289 | setStartHour( KOPrefs::instance()->mDayBegins ); | 1289 | setStartHour( KOPrefs::instance()->mDayBegins ); |
1290 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 1290 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
1291 | setStartHour( QTime::currentTime ().hour() ); | 1291 | setStartHour( QTime::currentTime ().hour() ); |
1292 | // qApp->processEvents(); | 1292 | // qApp->processEvents(); |
1293 | } | 1293 | } |
1294 | qApp->processEvents(); | 1294 | qApp->processEvents(); |
1295 | //qDebug("qApp->processEvents(); END "); | 1295 | //qDebug("qApp->processEvents(); END "); |
1296 | globalFlagBlockAgenda = 0; | 1296 | globalFlagBlockAgenda = 0; |
1297 | 1297 | ||
1298 | // mAgenda->hideUnused(); | 1298 | // mAgenda->hideUnused(); |
1299 | //mAllDayAgenda->hideUnused(); | 1299 | //mAllDayAgenda->hideUnused(); |
1300 | mAllDayAgenda->drawContentsToPainter(); | 1300 | mAllDayAgenda->drawContentsToPainter(); |
1301 | mAgenda->drawContentsToPainter(); | 1301 | mAgenda->drawContentsToPainter(); |
1302 | repaintAgenda(); | 1302 | repaintAgenda(); |
1303 | onlyOne = false; | 1303 | onlyOne = false; |
1304 | // mAgenda->finishUpdate(); | 1304 | // mAgenda->finishUpdate(); |
1305 | //mAllDayAgenda->finishUpdate(); | 1305 | //mAllDayAgenda->finishUpdate(); |
1306 | 1306 | ||
1307 | // repaintAgenda(); | 1307 | // repaintAgenda(); |
1308 | //qApp->processEvents(); | 1308 | //qApp->processEvents(); |
1309 | // globalFlagBlockAgenda = 0; | 1309 | // globalFlagBlockAgenda = 0; |
1310 | } | 1310 | } |
1311 | void KOAgendaView::repaintAgenda() | 1311 | void KOAgendaView::repaintAgenda() |
1312 | { | 1312 | { |
1313 | // mAllDayAgenda->drawContentsToPainter(); | 1313 | // mAllDayAgenda->drawContentsToPainter(); |
1314 | // mAllDayAgenda->viewport()->repaint( false ); | 1314 | // mAllDayAgenda->viewport()->repaint( false ); |
1315 | // mAgenda->drawContentsToPainter(); | 1315 | // mAgenda->drawContentsToPainter(); |
1316 | // mAgenda->viewport()->repaint( false ); | 1316 | // mAgenda->viewport()->repaint( false ); |
1317 | // qApp->processEvents(); | 1317 | // qApp->processEvents(); |
1318 | 1318 | ||
1319 | //qDebug("KOAgendaView::repaintAgenda() "); | 1319 | //qDebug("KOAgendaView::repaintAgenda() "); |
1320 | //qApp->processEvents(); | 1320 | //qApp->processEvents(); |
1321 | mAgenda->viewport()->repaint( false ); | 1321 | mAgenda->viewport()->repaint( false ); |
1322 | mAllDayAgenda->viewport()->repaint( false ); | 1322 | mAllDayAgenda->viewport()->repaint( false ); |
1323 | mAgenda->finishUpdate(); | 1323 | mAgenda->finishUpdate(); |
1324 | mAllDayAgenda->finishUpdate(); | 1324 | mAllDayAgenda->finishUpdate(); |
1325 | } | 1325 | } |
1326 | 1326 | ||
1327 | 1327 | ||
1328 | void KOAgendaView::clearView() | 1328 | void KOAgendaView::clearView() |
1329 | { | 1329 | { |
1330 | // kdDebug() << "ClearView" << endl; | 1330 | // kdDebug() << "ClearView" << endl; |
1331 | mAllDayAgenda->clear(); | 1331 | mAllDayAgenda->clear(); |
1332 | mAgenda->clear(); | 1332 | mAgenda->clear(); |
1333 | } | 1333 | } |
1334 | 1334 | ||
1335 | void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 1335 | void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
1336 | const QDate &td) | 1336 | const QDate &td) |
1337 | { | 1337 | { |
1338 | #ifndef KORG_NOPRINTER | 1338 | #ifndef KORG_NOPRINTER |
1339 | if (fd == td) | 1339 | if (fd == td) |
1340 | calPrinter->preview(CalPrinter::Day, fd, td); | 1340 | calPrinter->preview(CalPrinter::Day, fd, td); |
1341 | else | 1341 | else |
1342 | calPrinter->preview(CalPrinter::Week, fd, td); | 1342 | calPrinter->preview(CalPrinter::Week, fd, td); |
1343 | #endif | 1343 | #endif |
1344 | } | 1344 | } |
1345 | 1345 | ||
1346 | // void KOAgendaView::updateMovedTodo() | 1346 | // void KOAgendaView::updateMovedTodo() |
1347 | // { | 1347 | // { |
1348 | // // updateConfig(); | 1348 | // // updateConfig(); |
1349 | // // emit updateTodoViews(); | 1349 | // // emit updateTodoViews(); |
1350 | // } | 1350 | // } |
1351 | 1351 | ||
1352 | void KOAgendaView::slotShowDateView( int mode , int d ) | 1352 | void KOAgendaView::slotShowDateView( int mode , int d ) |
1353 | { | 1353 | { |
1354 | if ( d >= mSelectedDates.count() ) { | 1354 | if ( d >= mSelectedDates.count() ) { |
1355 | qDebug("KOAgendaView::slotShowDateView datecounterror %d d ", d, mSelectedDates.count() ); | 1355 | qDebug("KOAgendaView::slotShowDateView datecounterror %d d ", d, mSelectedDates.count() ); |
1356 | 1356 | ||
1357 | } else { | 1357 | } else { |
1358 | QDate day = mSelectedDates[d]; | 1358 | QDate day = mSelectedDates[d]; |
1359 | emit showDateView(mode , day ); | 1359 | emit showDateView(mode , day ); |
1360 | } | 1360 | } |
1361 | 1361 | ||
1362 | } | 1362 | } |
1363 | void KOAgendaView::newEvent(int gx, int gy) | 1363 | void KOAgendaView::newEvent(int gx, int gy) |
1364 | { | 1364 | { |
1365 | if (!mSelectedDates.count()) return; | 1365 | if (!mSelectedDates.count()) return; |
1366 | 1366 | ||
1367 | QDate day = mSelectedDates[gx]; | 1367 | QDate day = mSelectedDates[gx]; |
1368 | 1368 | ||
1369 | QTime time = mAgenda->gyToTime(gy); | 1369 | QTime time = mAgenda->gyToTime(gy); |
1370 | QDateTime dt(day,time); | 1370 | QDateTime dt(day,time); |
1371 | // if ( dt < QDateTime::currentDateTime () ) | 1371 | // if ( dt < QDateTime::currentDateTime () ) |
1372 | // dt = QDateTime::currentDateTime ().addSecs( 3600 ); | 1372 | // dt = QDateTime::currentDateTime ().addSecs( 3600 ); |
1373 | emit newEventSignal(dt); | 1373 | emit newEventSignal(dt); |
1374 | } | 1374 | } |
1375 | 1375 | ||
1376 | void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd) | 1376 | void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd) |
1377 | { | 1377 | { |
1378 | if (!mSelectedDates.count()) return; | 1378 | if (!mSelectedDates.count()) return; |
1379 | 1379 | ||
1380 | QDate dayStart = mSelectedDates[gxStart]; | 1380 | QDate dayStart = mSelectedDates[gxStart]; |
1381 | QDate dayEnd = mSelectedDates[gxEnd]; | 1381 | QDate dayEnd = mSelectedDates[gxEnd]; |
1382 | 1382 | ||
1383 | QTime timeStart = mAgenda->gyToTime(gyStart); | 1383 | QTime timeStart = mAgenda->gyToTime(gyStart); |
1384 | QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); | 1384 | QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); |
1385 | 1385 | ||
1386 | QDateTime dtStart(dayStart,timeStart); | 1386 | QDateTime dtStart(dayStart,timeStart); |
1387 | QDateTime dtEnd(dayEnd,timeEnd); | 1387 | QDateTime dtEnd(dayEnd,timeEnd); |
1388 | 1388 | ||
1389 | emit newEventSignal(dtStart,dtEnd); | 1389 | emit newEventSignal(dtStart,dtEnd); |
1390 | } | 1390 | } |
1391 | 1391 | ||
1392 | void KOAgendaView::newEventAllDay(int gx, int ) | 1392 | void KOAgendaView::newEventAllDay(int gx, int ) |
1393 | { | 1393 | { |
1394 | if (!mSelectedDates.count()) return; | 1394 | if (!mSelectedDates.count()) return; |
1395 | 1395 | ||
1396 | QDate day = mSelectedDates[gx]; | 1396 | QDate day = mSelectedDates[gx]; |
1397 | 1397 | ||
1398 | emit newEventSignal(day); | 1398 | emit newEventSignal(day); |
1399 | } | 1399 | } |
1400 | void KOAgendaView::newTodoAllDay(int gx, int ) | 1400 | void KOAgendaView::newTodoAllDay(int gx, int ) |
1401 | { | 1401 | { |
1402 | if (!mSelectedDates.count()) return; | 1402 | if (!mSelectedDates.count()) return; |
1403 | 1403 | ||
1404 | QDateTime day (mSelectedDates[gx] ); | 1404 | QDateTime day (mSelectedDates[gx] ); |
1405 | emit newTodoSignal(day, true); | 1405 | emit newTodoSignal(day, true); |
1406 | } | 1406 | } |
1407 | void KOAgendaView::newTodo(int gx, int gy ) | 1407 | void KOAgendaView::newTodo(int gx, int gy ) |
1408 | { | 1408 | { |
1409 | if (!mSelectedDates.count()) return; | 1409 | if (!mSelectedDates.count()) return; |
1410 | QDate dayStart = mSelectedDates[gx]; | 1410 | QDate dayStart = mSelectedDates[gx]; |
1411 | QTime timeStart = mAgenda->gyToTime(gy); | 1411 | QTime timeStart = mAgenda->gyToTime(gy); |
1412 | QDateTime dt (dayStart,timeStart); | 1412 | QDateTime dt (dayStart,timeStart); |
1413 | emit newTodoSignal( dt, false ); | 1413 | emit newTodoSignal( dt, false ); |
1414 | } | 1414 | } |
1415 | 1415 | ||
1416 | void KOAgendaView::updateEventIndicatorTop(int newY) | 1416 | void KOAgendaView::updateEventIndicatorTop(int newY) |
1417 | { | 1417 | { |
1418 | uint i; | 1418 | uint i; |
1419 | for(i=0;i<mMinY.size();++i) { | 1419 | for(i=0;i<mMinY.size();++i) { |
1420 | if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true); | 1420 | if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true); |
1421 | else mEventIndicatorTop->enableColumn(i,false); | 1421 | else mEventIndicatorTop->enableColumn(i,false); |
1422 | } | 1422 | } |
1423 | 1423 | ||
1424 | mEventIndicatorTop->update(); | 1424 | mEventIndicatorTop->update(); |
1425 | } | 1425 | } |
1426 | 1426 | ||
1427 | void KOAgendaView::updateEventIndicatorBottom(int newY) | 1427 | void KOAgendaView::updateEventIndicatorBottom(int newY) |
1428 | { | 1428 | { |
1429 | uint i; | 1429 | uint i; |
1430 | for(i=0;i<mMaxY.size();++i) { | 1430 | for(i=0;i<mMaxY.size();++i) { |
1431 | if (newY <= mMaxY.at(i)) mEventIndicatorBottom->enableColumn(i,true); | 1431 | if (newY <= mMaxY.at(i)) mEventIndicatorBottom->enableColumn(i,true); |
1432 | else mEventIndicatorBottom->enableColumn(i,false); | 1432 | else mEventIndicatorBottom->enableColumn(i,false); |
1433 | } | 1433 | } |
1434 | 1434 | ||
1435 | mEventIndicatorBottom->update(); | 1435 | mEventIndicatorBottom->update(); |
1436 | } | 1436 | } |
1437 | 1437 | ||
1438 | void KOAgendaView::startDrag(Event *event) | 1438 | void KOAgendaView::startDrag(Event *event) |
1439 | { | 1439 | { |
1440 | #ifndef KORG_NODND | 1440 | #ifndef KORG_NODND |
1441 | DndFactory factory( calendar() ); | 1441 | DndFactory factory( calendar() ); |
1442 | ICalDrag *vd = factory.createDrag(event,this); | 1442 | ICalDrag *vd = factory.createDrag(event,this); |
1443 | if (vd->drag()) { | 1443 | if (vd->drag()) { |
1444 | kdDebug() << "KOAgendaView::startDrag(): Delete drag source" << endl; | 1444 | kdDebug() << "KOAgendaView::startDrag(): Delete drag source" << endl; |
1445 | } | 1445 | } |
1446 | #endif | 1446 | #endif |
1447 | } | 1447 | } |
1448 | 1448 | ||
1449 | void KOAgendaView::readSettings() | 1449 | void KOAgendaView::readSettings() |
1450 | { | 1450 | { |
1451 | readSettings(KOGlobals::config()); | 1451 | readSettings(KOGlobals::config()); |
1452 | } | 1452 | } |
1453 | 1453 | ||
1454 | void KOAgendaView::readSettings(KConfig *config) | 1454 | void KOAgendaView::readSettings(KConfig *config) |
1455 | { | 1455 | { |
1456 | // kdDebug() << "KOAgendaView::readSettings()" << endl; | 1456 | // kdDebug() << "KOAgendaView::readSettings()" << endl; |
1457 | 1457 | ||
1458 | config->setGroup("Views"); | 1458 | config->setGroup("Views"); |
1459 | 1459 | ||
1460 | //#ifndef KORG_NOSPLITTER | 1460 | //#ifndef KORG_NOSPLITTER |
1461 | QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); | 1461 | QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); |
1462 | if (sizes.count() == 2) { | 1462 | if (sizes.count() == 2) { |
1463 | if ( sizes[0] < 20 ) { | 1463 | if ( sizes[0] < 20 ) { |
1464 | sizes[1] = sizes[1] +20 - sizes[0]; | 1464 | sizes[1] = sizes[1] +20 - sizes[0]; |
1465 | sizes[0] = 20; | 1465 | sizes[0] = 20; |
1466 | } | 1466 | } |
1467 | mSplitterAgenda->setSizes(sizes); | 1467 | mSplitterAgenda->setSizes(sizes); |
1468 | // qDebug("read %d %d ",sizes[0],sizes[1] ); | 1468 | // qDebug("read %d %d ",sizes[0],sizes[1] ); |
1469 | } | 1469 | } |
1470 | //#endif | 1470 | //#endif |
1471 | 1471 | ||
1472 | // updateConfig(); | 1472 | // updateConfig(); |
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | void KOAgendaView::writeSettings(KConfig *config) | 1475 | void KOAgendaView::writeSettings(KConfig *config) |
1476 | { | 1476 | { |
1477 | // kdDebug() << "KOAgendaView::writeSettings()" << endl; | 1477 | // kdDebug() << "KOAgendaView::writeSettings()" << endl; |
1478 | 1478 | ||
1479 | config->setGroup("Views"); | 1479 | config->setGroup("Views"); |
1480 | 1480 | ||
1481 | //#ifndef KORG_NOSPLITTER | 1481 | //#ifndef KORG_NOSPLITTER |
1482 | QValueList<int> list = mSplitterAgenda->sizes(); | 1482 | QValueList<int> list = mSplitterAgenda->sizes(); |
1483 | config->writeEntry("Separator AgendaView",list); | 1483 | config->writeEntry("Separator AgendaView",list); |
1484 | //qDebug("write %d %d ", list[0],list[1] ); | 1484 | //qDebug("write %d %d ", list[0],list[1] ); |
1485 | //#endif | 1485 | //#endif |
1486 | } | 1486 | } |
1487 | 1487 | ||
1488 | void KOAgendaView::setHolidayMasks() | 1488 | void KOAgendaView::setHolidayMasks() |
1489 | { | 1489 | { |
1490 | mHolidayMask.resize(mSelectedDates.count()); | 1490 | mHolidayMask.resize(mSelectedDates.count()); |
1491 | 1491 | ||
1492 | uint i; | 1492 | uint i; |
1493 | for(i=0;i<mSelectedDates.count();++i) { | 1493 | for(i=0;i<mSelectedDates.count();++i) { |
1494 | QDate date = mSelectedDates[i]; | 1494 | QDate date = mSelectedDates[i]; |
1495 | bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); | 1495 | bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); |
1496 | bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); | 1496 | bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); |
1497 | bool showHoliday = false; | 1497 | bool showHoliday = false; |
1498 | if ( KOPrefs::instance()->mExcludeHolidays ) { | 1498 | if ( KOPrefs::instance()->mExcludeHolidays ) { |
1499 | QPtrList<Event> events = calendar()->events( date, true ); | 1499 | QPtrList<Event> events = calendar()->events( date, true ); |
1500 | Event *event; | 1500 | Event *event; |
1501 | for( event = events.first(); event; event = events.next() ) { | 1501 | for( event = events.first(); event; event = events.next() ) { |
1502 | if ( event->isHoliday()) { | 1502 | if ( event->isHoliday()) { |
1503 | showHoliday = true; | 1503 | showHoliday = true; |
1504 | break; | 1504 | break; |
1505 | } | 1505 | } |
1506 | } | 1506 | } |
1507 | 1507 | ||
1508 | } | 1508 | } |
1509 | 1509 | ||
1510 | #ifndef KORG_NOPLUGINS | 1510 | #ifndef KORG_NOPLUGINS |
1511 | bool showHoliday = KOPrefs::instance()->mExcludeHolidays && | 1511 | bool showHoliday = KOPrefs::instance()->mExcludeHolidays && |
1512 | !KOCore::self()->holiday(date).isEmpty(); | 1512 | !KOCore::self()->holiday(date).isEmpty(); |
1513 | #endif | 1513 | #endif |
1514 | bool showDay = showSaturday || showSunday || showHoliday; | 1514 | bool showDay = showSaturday || showSunday || showHoliday; |
1515 | 1515 | ||
1516 | if (showDay) { | 1516 | if (showDay) { |
1517 | mHolidayMask.at(i) = true; | 1517 | mHolidayMask.at(i) = true; |
1518 | } else { | 1518 | } else { |
1519 | mHolidayMask.at(i) = false; | 1519 | mHolidayMask.at(i) = false; |
1520 | } | 1520 | } |
1521 | } | 1521 | } |
1522 | 1522 | ||
1523 | mAgenda->setHolidayMask(&mHolidayMask); | 1523 | mAgenda->setHolidayMask(&mHolidayMask); |
1524 | mAllDayAgenda->setHolidayMask(&mHolidayMask); | 1524 | mAllDayAgenda->setHolidayMask(&mHolidayMask); |
1525 | } | 1525 | } |
1526 | 1526 | ||
1527 | void KOAgendaView::setContentsPos(int y) | 1527 | void KOAgendaView::setContentsPos(int y) |
1528 | { | 1528 | { |
1529 | mAgenda->setContentsPos(0,y); | 1529 | mAgenda->setContentsPos(0,y); |
1530 | } | 1530 | } |
1531 | 1531 | ||
1532 | void KOAgendaView::clearSelection() | 1532 | void KOAgendaView::clearSelection() |
1533 | { | 1533 | { |
1534 | mAgenda->deselectItem(); | 1534 | mAgenda->deselectItem(); |
1535 | mAllDayAgenda->deselectItem(); | 1535 | mAllDayAgenda->deselectItem(); |
1536 | } | 1536 | } |
1537 | 1537 | ||
1538 | void KOAgendaView::newTimeSpanSelectedAllDay(int gxStart, int gyStart, | 1538 | void KOAgendaView::newTimeSpanSelectedAllDay(int gxStart, int gyStart, |
1539 | int gxEnd, int gyEnd) | 1539 | int gxEnd, int gyEnd) |
1540 | { | 1540 | { |
1541 | mTimeSpanInAllDay = true; | 1541 | mTimeSpanInAllDay = true; |
1542 | newTimeSpanSelected(gxStart,gyStart,gxEnd,gyEnd); | 1542 | newTimeSpanSelected(gxStart,gyStart,gxEnd,gyEnd); |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | 1545 | ||
1546 | 1546 | ||
1547 | 1547 | ||
1548 | void KOAgendaView::newTimeSpanSelected(int gxStart, int gyStart, | 1548 | void KOAgendaView::newTimeSpanSelected(int gxStart, int gyStart, |
1549 | int gxEnd, int gyEnd) | 1549 | int gxEnd, int gyEnd) |
1550 | { | 1550 | { |
1551 | if (!mSelectedDates.count()) return; | 1551 | if (!mSelectedDates.count()) return; |
1552 | 1552 | ||
1553 | QDate dayStart = mSelectedDates[gxStart]; | 1553 | QDate dayStart = mSelectedDates[gxStart]; |
1554 | QDate dayEnd = mSelectedDates[gxEnd]; | 1554 | QDate dayEnd = mSelectedDates[gxEnd]; |
1555 | 1555 | ||
1556 | QTime timeStart = mAgenda->gyToTime(gyStart); | 1556 | QTime timeStart = mAgenda->gyToTime(gyStart); |
1557 | QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); | 1557 | QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); |
1558 | 1558 | ||
1559 | QDateTime dtStart(dayStart,timeStart); | 1559 | QDateTime dtStart(dayStart,timeStart); |
1560 | QDateTime dtEnd(dayEnd,timeEnd); | 1560 | QDateTime dtEnd(dayEnd,timeEnd); |
1561 | 1561 | ||
1562 | mTimeSpanBegin = dtStart; | 1562 | mTimeSpanBegin = dtStart; |
1563 | mTimeSpanEnd = dtEnd; | 1563 | mTimeSpanEnd = dtEnd; |
1564 | 1564 | ||
1565 | } | 1565 | } |
1566 | 1566 | ||
1567 | void KOAgendaView::deleteSelectedDateTime() | 1567 | void KOAgendaView::deleteSelectedDateTime() |
1568 | { | 1568 | { |
1569 | mTimeSpanBegin.setDate(QDate()); | 1569 | mTimeSpanBegin.setDate(QDate()); |
1570 | mTimeSpanEnd.setDate(QDate()); | 1570 | mTimeSpanEnd.setDate(QDate()); |
1571 | mTimeSpanInAllDay = false; | 1571 | mTimeSpanInAllDay = false; |
1572 | } | 1572 | } |
1573 | 1573 | ||
1574 | void KOAgendaView::keyPressEvent ( QKeyEvent * e ) | 1574 | void KOAgendaView::keyPressEvent ( QKeyEvent * e ) |
1575 | { | 1575 | { |
1576 | e->ignore(); | 1576 | e->ignore(); |
1577 | } | 1577 | } |
1578 | 1578 | ||
1579 | void KOAgendaView::scrollOneHourUp() | 1579 | void KOAgendaView::scrollOneHourUp() |
1580 | { | 1580 | { |
1581 | 1581 | ||
1582 | mAgenda->scrollBy ( 0, -mAgenda->contentsHeight () / 24 ); | 1582 | mAgenda->scrollBy ( 0, -mAgenda->contentsHeight () / 24 ); |
1583 | } | 1583 | } |
1584 | void KOAgendaView::scrollOneHourDown() | 1584 | void KOAgendaView::scrollOneHourDown() |
1585 | { | 1585 | { |
1586 | mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 ); | 1586 | mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 ); |
1587 | } | 1587 | } |
1588 | 1588 | ||
1589 | void KOAgendaView::setStartHour( int h ) | 1589 | void KOAgendaView::setStartHour( int h ) |
1590 | { | 1590 | { |
1591 | mAgenda->setStartHour( h ); | 1591 | mAgenda->setStartHour( h ); |
1592 | 1592 | ||
1593 | } | 1593 | } |
1594 | void KOAgendaView::setInitStartHour() | 1594 | void KOAgendaView::setInitStartHour() |
1595 | { | 1595 | { |
1596 | 1596 | ||
1597 | if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 1597 | if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
1598 | setStartHour( QTime::currentTime ().hour() ); | 1598 | setStartHour( QTime::currentTime ().hour() ); |
1599 | else | 1599 | else |
1600 | setStartHour( KOPrefs::instance()->mDayBegins ); | 1600 | setStartHour( KOPrefs::instance()->mDayBegins ); |
1601 | 1601 | ||
1602 | } | 1602 | } |
1603 | 1603 | ||
1604 | 1604 | ||
1605 | void KOAgendaView::updateTodo( Todo * t, int ) | 1605 | void KOAgendaView::updateTodo( Todo * t, int ) |
1606 | { | 1606 | { |
1607 | if ( !isVisible() ) | 1607 | if ( !isVisible() ) |
1608 | return; | 1608 | return; |
1609 | bool remove = false; | 1609 | bool remove = false; |
1610 | bool removeAD = false; | 1610 | bool removeAD = false; |
1611 | QDate da; | 1611 | QDate da; |
1612 | if ( t->hasCompletedDate() ) | 1612 | if ( t->hasCompletedDate() ) |
1613 | da = t->completed().date(); | 1613 | da = t->completed().date(); |
1614 | else | 1614 | else |
1615 | da = t->dtDue().date(); | 1615 | da = t->dtDue().date(); |
1616 | if ( ! t->hasDueDate() && !t->hasCompletedDate() ) { | 1616 | if ( ! t->hasDueDate() && !t->hasCompletedDate() ) { |
1617 | remove = true; | 1617 | remove = true; |
1618 | removeAD = true; | 1618 | removeAD = true; |
1619 | } | 1619 | } |
1620 | else { | 1620 | else { |
1621 | bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ; | 1621 | bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ; |
1622 | if ( overdue && | 1622 | if ( overdue && |
1623 | QDate::currentDate() >= mSelectedDates.first() && | 1623 | QDate::currentDate() >= mSelectedDates.first() && |
1624 | QDate::currentDate() <= mSelectedDates.last()) { | 1624 | QDate::currentDate() <= mSelectedDates.last()) { |
1625 | removeAD = false; | 1625 | removeAD = false; |
1626 | remove = true; | 1626 | remove = true; |
1627 | } | 1627 | } |
1628 | else { | 1628 | else { |
1629 | 1629 | ||
1630 | if ( da < mSelectedDates.first() || | 1630 | if ( da < mSelectedDates.first() || |
1631 | da > mSelectedDates.last() ) { | 1631 | da > mSelectedDates.last() ) { |
1632 | remove = true; | 1632 | remove = true; |
1633 | removeAD = true; | 1633 | removeAD = true; |
1634 | } else { | 1634 | } else { |
1635 | remove = t->doesFloat() && !t->hasCompletedDate(); | 1635 | remove = t->doesFloat() && !t->hasCompletedDate(); |
1636 | removeAD = !remove; | 1636 | removeAD = !remove; |
1637 | } | 1637 | } |
1638 | } | 1638 | } |
1639 | } | 1639 | } |
1640 | int days = mSelectedDates.first().daysTo( da ); | 1640 | int days = mSelectedDates.first().daysTo( da ); |
1641 | //qDebug("daysto %d %d %d", days, remove,removeAD ); | 1641 | //qDebug("daysto %d %d %d", days, remove,removeAD ); |
1642 | mAgenda->updateTodo( t , days, remove); | 1642 | mAgenda->updateTodo( t , days, remove); |
1643 | if ( KOPrefs::instance()->mShowTodoInAgenda ) | 1643 | if ( KOPrefs::instance()->mShowTodoInAgenda ) |
1644 | mAllDayAgenda->updateTodo( t , days, removeAD); | 1644 | mAllDayAgenda->updateTodo( t , days, removeAD); |
1645 | //qDebug("KOAgendaView::updateTodo( Todo *, int ) "); | 1645 | //qDebug("KOAgendaView::updateTodo( Todo *, int ) "); |
1646 | 1646 | ||
1647 | } | 1647 | } |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 02247c8..5f32e79 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -1,1285 +1,1285 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 1999 Preston Brown | 3 | Copyright (c) 1999 Preston Brown |
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qlistview.h> | 25 | #include <qlistview.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qfileinfo.h> | 30 | #include <qfileinfo.h> |
31 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qwhatsthis.h> | 35 | #include <qwhatsthis.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | 37 | ||
38 | #include <klocale.h> | 38 | #include <klocale.h> |
39 | #include <kdebug.h> | 39 | #include <kdebug.h> |
40 | #include <kiconloader.h> | 40 | #include <kiconloader.h> |
41 | #include <kglobal.h> | 41 | #include <kglobal.h> |
42 | 42 | ||
43 | #include <libkdepim/kpimglobalprefs.h> | 43 | #include <libkdepim/kpimglobalprefs.h> |
44 | #include <libkcal/calendar.h> | 44 | #include <libkcal/calendar.h> |
45 | #include <libkcal/calendarlocal.h> | 45 | #include <libkcal/calendarlocal.h> |
46 | #include <libkcal/icalformat.h> | 46 | #include <libkcal/icalformat.h> |
47 | #include <libkcal/vcalformat.h> | 47 | #include <libkcal/vcalformat.h> |
48 | #include <libkcal/recurrence.h> | 48 | #include <libkcal/recurrence.h> |
49 | #include <libkcal/filestorage.h> | 49 | #include <libkcal/filestorage.h> |
50 | #include <libkdepim/categoryselectdialog.h> | 50 | #include <libkdepim/categoryselectdialog.h> |
51 | #include <libkcal/kincidenceformatter.h> | 51 | #include <libkcal/kincidenceformatter.h> |
52 | #ifndef DESKTOP_VERSION | 52 | #ifndef DESKTOP_VERSION |
53 | #include <qpe/qpeapplication.h> | 53 | #include <qpe/qpeapplication.h> |
54 | #else | 54 | #else |
55 | #include <qapplication.h> | 55 | #include <qapplication.h> |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #ifndef KORG_NOPRINTER | 58 | #ifndef KORG_NOPRINTER |
59 | #include "calprinter.h" | 59 | #include "calprinter.h" |
60 | #endif | 60 | #endif |
61 | #include "koglobals.h" | 61 | #include "koglobals.h" |
62 | #include "koprefs.h" | 62 | #include "koprefs.h" |
63 | #include "kfiledialog.h" | 63 | #include "kfiledialog.h" |
64 | 64 | ||
65 | #include "kolistview.h" | 65 | #include "kolistview.h" |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | class KOListViewWhatsThis :public QWhatsThis | 70 | class KOListViewWhatsThis :public QWhatsThis |
71 | { | 71 | { |
72 | public: | 72 | public: |
73 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 73 | KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; |
74 | 74 | ||
75 | protected: | 75 | protected: |
76 | virtual QString text( const QPoint& p) | 76 | virtual QString text( const QPoint& p) |
77 | { | 77 | { |
78 | return _view->getWhatsThisText(p) ; | 78 | return _view->getWhatsThisText(p) ; |
79 | } | 79 | } |
80 | private: | 80 | private: |
81 | QWidget* _wid; | 81 | QWidget* _wid; |
82 | KOListView * _view; | 82 | KOListView * _view; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | 85 | ||
86 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) | 86 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) |
87 | { | 87 | { |
88 | mItem = item; | 88 | mItem = item; |
89 | mDate = date; | 89 | mDate = date; |
90 | } | 90 | } |
91 | 91 | ||
92 | ListItemVisitor::~ListItemVisitor() | 92 | ListItemVisitor::~ListItemVisitor() |
93 | { | 93 | { |
94 | } | 94 | } |
95 | 95 | ||
96 | bool ListItemVisitor::visit(Event *e) | 96 | bool ListItemVisitor::visit(Event *e) |
97 | { | 97 | { |
98 | bool ok = false; | 98 | bool ok = false; |
99 | QString start, end; | 99 | QString start, end; |
100 | QDate ds, de; | 100 | QDate ds, de; |
101 | if ( e->doesRecur() ) { | 101 | if ( e->doesRecur() ) { |
102 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); | 102 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); |
103 | if ( ok ) { | 103 | if ( ok ) { |
104 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); | 104 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); |
105 | start = KGlobal::locale()->formatDate(ds,true); | 105 | start = KGlobal::locale()->formatDate(ds,true); |
106 | de = ds.addDays( days); | 106 | de = ds.addDays( days); |
107 | end = KGlobal::locale()->formatDate(de,true); | 107 | end = KGlobal::locale()->formatDate(de,true); |
108 | } | 108 | } |
109 | 109 | ||
110 | } | 110 | } |
111 | if ( ! ok ) { | 111 | if ( ! ok ) { |
112 | start =e->dtStartDateStr(); | 112 | start =e->dtStartDateStr(); |
113 | end = e->dtEndDateStr(); | 113 | end = e->dtEndDateStr(); |
114 | ds = e->dtStart().date(); | 114 | ds = e->dtStart().date(); |
115 | de = e->dtEnd().date(); | 115 | de = e->dtEnd().date(); |
116 | } | 116 | } |
117 | mItem->setText(0,e->summary()); | 117 | mItem->setText(0,e->summary()); |
118 | mItem->setText(1,start); | 118 | mItem->setText(1,start); |
119 | if ( e->doesFloat() ) | 119 | if ( e->doesFloat() ) |
120 | mItem->setText(2,"---"); | 120 | mItem->setText(2,"---"); |
121 | else | 121 | else |
122 | mItem->setText(2,e->dtStartTimeStr()); | 122 | mItem->setText(2,e->dtStartTimeStr()); |
123 | mItem->setText(3,end); | 123 | mItem->setText(3,end); |
124 | if ( e->doesFloat() ) | 124 | if ( e->doesFloat() ) |
125 | mItem->setText(4,"---"); | 125 | mItem->setText(4,"---"); |
126 | else | 126 | else |
127 | mItem->setText(4,e->dtEndTimeStr()); | 127 | mItem->setText(4,e->dtEndTimeStr()); |
128 | if ( e->isAlarmEnabled() ) { | 128 | if ( e->isAlarmEnabled() ) { |
129 | mItem->setText(5,e->alarms().first()->offsetText() ); | 129 | mItem->setText(5,e->alarms().first()->offsetText() ); |
130 | } else { | 130 | } else { |
131 | mItem->setText(5, i18n("No")); | 131 | mItem->setText(5, i18n("No")); |
132 | } | 132 | } |
133 | mItem->setText(6, e->recurrence()->recurrenceText()); | 133 | mItem->setText(6, e->recurrence()->recurrenceText()); |
134 | if( ! e->doesRecur() ) | 134 | if( ! e->doesRecur() ) |
135 | mItem->setSortKey( 6, "-" ); | 135 | mItem->setSortKey( 6, "-" ); |
136 | mItem->setText(7,"---"); | 136 | mItem->setText(7,"---"); |
137 | mItem->setText(8,"---"); | 137 | mItem->setText(8,"---"); |
138 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); | 138 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); |
139 | mItem->setText(10,e->categoriesStr()); | 139 | mItem->setText(10,e->categoriesStr()); |
140 | 140 | ||
141 | QString key; | 141 | QString key; |
142 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); | 142 | QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); |
143 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); | 143 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); |
144 | mItem->setSortKey(1,key); | 144 | mItem->setSortKey(1,key); |
145 | 145 | ||
146 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); | 146 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); |
147 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); | 147 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); |
148 | mItem->setSortKey(3,key); | 148 | mItem->setSortKey(3,key); |
149 | return true; | 149 | return true; |
150 | } | 150 | } |
151 | 151 | ||
152 | bool ListItemVisitor::visit(Todo *t) | 152 | bool ListItemVisitor::visit(Todo *t) |
153 | { | 153 | { |
154 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); | 154 | mItem->setText(0,i18n("Todo: %1").arg(t->summary())); |
155 | if (t->hasStartDate()) { | 155 | if (t->hasStartDate()) { |
156 | mItem->setText(1,t->dtStartDateStr()); | 156 | mItem->setText(1,t->dtStartDateStr()); |
157 | if (t->doesFloat()) { | 157 | if (t->doesFloat()) { |
158 | mItem->setText(2,"---"); | 158 | mItem->setText(2,"---"); |
159 | } else { | 159 | } else { |
160 | mItem->setText(2,t->dtStartTimeStr()); | 160 | mItem->setText(2,t->dtStartTimeStr()); |
161 | } | 161 | } |
162 | } else { | 162 | } else { |
163 | mItem->setText(1,"---"); | 163 | mItem->setText(1,"---"); |
164 | mItem->setText(2,"---"); | 164 | mItem->setText(2,"---"); |
165 | } | 165 | } |
166 | mItem->setText(3,"---"); | 166 | mItem->setText(3,"---"); |
167 | mItem->setText(4,"---"); | 167 | mItem->setText(4,"---"); |
168 | if ( t->isAlarmEnabled() ) { | 168 | if ( t->isAlarmEnabled() ) { |
169 | mItem->setText(5,t->alarms().first()->offsetText() ); | 169 | mItem->setText(5,t->alarms().first()->offsetText() ); |
170 | } else { | 170 | } else { |
171 | mItem->setText(5, i18n("No")); | 171 | mItem->setText(5, i18n("No")); |
172 | } | 172 | } |
173 | mItem->setText(6, t->recurrence()->recurrenceText()); | 173 | mItem->setText(6, t->recurrence()->recurrenceText()); |
174 | if( ! t->doesRecur() ) | 174 | if( ! t->doesRecur() ) |
175 | mItem->setSortKey( 6, "-" ); | 175 | mItem->setSortKey( 6, "-" ); |
176 | if (t->hasDueDate()) { | 176 | if (t->hasDueDate()) { |
177 | mItem->setText(7,t->dtDueDateStr()); | 177 | mItem->setText(7,t->dtDueDateStr()); |
178 | if (t->doesFloat()) { | 178 | if (t->doesFloat()) { |
179 | mItem->setText(8,"---"); | 179 | mItem->setText(8,"---"); |
180 | } else { | 180 | } else { |
181 | mItem->setText(8,t->dtDueTimeStr()); | 181 | mItem->setText(8,t->dtDueTimeStr()); |
182 | } | 182 | } |
183 | } else { | 183 | } else { |
184 | mItem->setText(7,"---"); | 184 | mItem->setText(7,"---"); |
185 | mItem->setText(8,"---"); | 185 | mItem->setText(8,"---"); |
186 | } | 186 | } |
187 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); | 187 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); |
188 | mItem->setText(10,t->categoriesStr()); | 188 | mItem->setText(10,t->categoriesStr()); |
189 | 189 | ||
190 | QString key; | 190 | QString key; |
191 | QDate d; | 191 | QDate d; |
192 | if (t->hasDueDate()) { | 192 | if (t->hasDueDate()) { |
193 | d = t->dtDue().date(); | 193 | d = t->dtDue().date(); |
194 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); | 194 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); |
195 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 195 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
196 | mItem->setSortKey(7,key); | 196 | mItem->setSortKey(7,key); |
197 | } | 197 | } |
198 | if ( t->hasStartDate() ) { | 198 | if ( t->hasStartDate() ) { |
199 | d = t->dtStart().date(); | 199 | d = t->dtStart().date(); |
200 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); | 200 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); |
201 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 201 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
202 | mItem->setSortKey(1,key); | 202 | mItem->setSortKey(1,key); |
203 | } | 203 | } |
204 | return true; | 204 | return true; |
205 | } | 205 | } |
206 | 206 | ||
207 | bool ListItemVisitor::visit(Journal * j) | 207 | bool ListItemVisitor::visit(Journal * j) |
208 | { | 208 | { |
209 | QString des = j->description().left(30); | 209 | QString des = j->description().left(30); |
210 | des = des.simplifyWhiteSpace (); | 210 | des = des.simplifyWhiteSpace (); |
211 | des.replace (QRegExp ("\\n"),"" ); | 211 | des.replace (QRegExp ("\\n"),"" ); |
212 | des.replace (QRegExp ("\\r"),"" ); | 212 | des.replace (QRegExp ("\\r"),"" ); |
213 | mItem->setText(0,i18n("Journal: ")+des.left(25)); | 213 | mItem->setText(0,i18n("Journal: ")+des.left(25)); |
214 | mItem->setText(1,j->dtStartDateStr()); | 214 | mItem->setText(1,j->dtStartDateStr()); |
215 | mItem->setText(2,"---"); | 215 | mItem->setText(2,"---"); |
216 | mItem->setText(3,"---"); | 216 | mItem->setText(3,"---"); |
217 | mItem->setText(4,"---"); | 217 | mItem->setText(4,"---"); |
218 | mItem->setText(5,"---"); | 218 | mItem->setText(5,"---"); |
219 | mItem->setText(6,"---"); | 219 | mItem->setText(6,"---"); |
220 | mItem->setText(7,j->dtStartDateStr()); | 220 | mItem->setText(7,j->dtStartDateStr()); |
221 | mItem->setText(8,"---"); | 221 | mItem->setText(8,"---"); |
222 | mItem->setText(9,"---"); | 222 | mItem->setText(9,"---"); |
223 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | 223 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); |
224 | 224 | ||
225 | QString key; | 225 | QString key; |
226 | QDate d = j->dtStart().date(); | 226 | QDate d = j->dtStart().date(); |
227 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 227 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
228 | mItem->setSortKey(1,key); | 228 | mItem->setSortKey(1,key); |
229 | mItem->setSortKey(7,key); | 229 | mItem->setSortKey(7,key); |
230 | 230 | ||
231 | return true; | 231 | return true; |
232 | } | 232 | } |
233 | 233 | ||
234 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 234 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
235 | const char *name) | 235 | const char *name) |
236 | : KOEventView(calendar, parent, name) | 236 | : KOEventView(calendar, parent, name) |
237 | { | 237 | { |
238 | mActiveItem = 0; | 238 | mActiveItem = 0; |
239 | mListView = new KOListViewListView(this); | 239 | mListView = new KOListViewListView(this); |
240 | mListView->addColumn(i18n("Summary")); | 240 | mListView->addColumn(i18n("Summary")); |
241 | mListView->addColumn(i18n("Start Date")); | 241 | mListView->addColumn(i18n("Start Date")); |
242 | mListView->addColumn(i18n("Start Time")); | 242 | mListView->addColumn(i18n("Start Time")); |
243 | mListView->addColumn(i18n("End Date")); | 243 | mListView->addColumn(i18n("End Date")); |
244 | mListView->addColumn(i18n("End Time")); | 244 | mListView->addColumn(i18n("End Time")); |
245 | mListView->addColumn(i18n("Alarm")); // alarm set? | 245 | mListView->addColumn(i18n("Alarm")); // alarm set? |
246 | mListView->addColumn(i18n("Recurs")); // recurs? | 246 | mListView->addColumn(i18n("Recurs")); // recurs? |
247 | mListView->addColumn(i18n("Due Date")); | 247 | mListView->addColumn(i18n("Due Date")); |
248 | mListView->addColumn(i18n("Due Time")); | 248 | mListView->addColumn(i18n("Due Time")); |
249 | mListView->addColumn(i18n("Cancelled")); | 249 | mListView->addColumn(i18n("Cancelled")); |
250 | mListView->addColumn(i18n("Categories")); | 250 | mListView->addColumn(i18n("Categories")); |
251 | 251 | ||
252 | mListView->setColumnAlignment(0,AlignLeft); | 252 | mListView->setColumnAlignment(0,AlignLeft); |
253 | mListView->setColumnAlignment(1,AlignLeft); | 253 | mListView->setColumnAlignment(1,AlignLeft); |
254 | mListView->setColumnAlignment(2,AlignHCenter); | 254 | mListView->setColumnAlignment(2,AlignHCenter); |
255 | mListView->setColumnAlignment(3,AlignLeft); | 255 | mListView->setColumnAlignment(3,AlignLeft); |
256 | mListView->setColumnAlignment(4,AlignHCenter); | 256 | mListView->setColumnAlignment(4,AlignHCenter); |
257 | mListView->setColumnAlignment(5,AlignLeft); | 257 | mListView->setColumnAlignment(5,AlignLeft); |
258 | mListView->setColumnAlignment(6,AlignLeft); | 258 | mListView->setColumnAlignment(6,AlignLeft); |
259 | mListView->setColumnAlignment(7,AlignLeft); | 259 | mListView->setColumnAlignment(7,AlignLeft); |
260 | mListView->setColumnAlignment(8,AlignLeft); | 260 | mListView->setColumnAlignment(8,AlignLeft); |
261 | mListView->setColumnAlignment(9,AlignLeft); | 261 | mListView->setColumnAlignment(9,AlignLeft); |
262 | mListView->setColumnAlignment(10,AlignLeft); | 262 | mListView->setColumnAlignment(10,AlignLeft); |
263 | mListView->setColumnWidthMode(10, QListView::Manual); | 263 | mListView->setColumnWidthMode(10, QListView::Manual); |
264 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); | 264 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); |
265 | 265 | ||
266 | int iii = 0; | 266 | int iii = 0; |
267 | for ( iii = 0; iii< 10 ; ++iii ) | 267 | for ( iii = 0; iii< 10 ; ++iii ) |
268 | mListView->setColumnWidthMode( iii, QListView::Manual ); | 268 | mListView->setColumnWidthMode( iii, QListView::Manual ); |
269 | 269 | ||
270 | QBoxLayout *layoutTop = new QVBoxLayout(this); | 270 | QBoxLayout *layoutTop = new QVBoxLayout(this); |
271 | layoutTop->addWidget(mListView); | 271 | layoutTop->addWidget(mListView); |
272 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 272 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
273 | mPopupMenu = eventPopup(); | 273 | mPopupMenu = eventPopup(); |
274 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 274 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
275 | i18n("Select all"),this, | 275 | i18n("Select all"),this, |
276 | SLOT(allSelection()),true); | 276 | SLOT(allSelection()),true); |
277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 277 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
278 | i18n("Deselect all"),this, | 278 | i18n("Deselect all"),this, |
279 | SLOT(clearSelection()),true); | 279 | SLOT(clearSelection()),true); |
280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 280 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
281 | i18n("Delete all selected"),this, | 281 | i18n("Delete all selected"),this, |
282 | SLOT(deleteAll()),true); | 282 | SLOT(deleteAll()),true); |
283 | mPopupMenu->insertSeparator(); | 283 | mPopupMenu->insertSeparator(); |
284 | QPopupMenu * exportPO = new QPopupMenu ( this ); | 284 | QPopupMenu * exportPO = new QPopupMenu ( this ); |
285 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); | 285 | mPopupMenu->insertItem( i18n("Export selected"), exportPO ); |
286 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, | 286 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, |
287 | SLOT(saveToFile())); | 287 | SLOT(saveToFile())); |
288 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, | 288 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, |
289 | SLOT(saveToFileVCS())); | 289 | SLOT(saveToFileVCS())); |
290 | exportPO->insertItem( i18n("Journal/Details..."),this, | 290 | exportPO->insertItem( i18n("Journal/Details..."),this, |
291 | SLOT(saveDescriptionToFile())); | 291 | SLOT(saveDescriptionToFile())); |
292 | // mPopupMenu->insertSeparator(); | 292 | // mPopupMenu->insertSeparator(); |
293 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 293 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
294 | i18n("Add Categ. to selected..."),this, | 294 | i18n("Add Categ. to selected..."),this, |
295 | SLOT(addCat()),true); | 295 | SLOT(addCat()),true); |
296 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 296 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
297 | i18n("Set Categ. for selected..."),this, | 297 | i18n("Set Categ. for selected..."),this, |
298 | SLOT(setCat()),true); | 298 | SLOT(setCat()),true); |
299 | //mPopupMenu->insertSeparator(); | 299 | //mPopupMenu->insertSeparator(); |
300 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 300 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
301 | i18n("Set alarm for selected..."),this, | 301 | i18n("Set alarm for selected..."),this, |
302 | SLOT(setAlarm()),true); | 302 | SLOT(setAlarm()),true); |
303 | 303 | ||
304 | 304 | ||
305 | #ifndef DESKTOP_VERSION | 305 | #ifndef DESKTOP_VERSION |
306 | mPopupMenu->insertSeparator(); | 306 | mPopupMenu->insertSeparator(); |
307 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 307 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
308 | i18n("Beam selected via IR"),this, | 308 | i18n("Beam selected via IR"),this, |
309 | SLOT(beamSelected()),true); | 309 | SLOT(beamSelected()),true); |
310 | #endif | 310 | #endif |
311 | /* | 311 | /* |
312 | mPopupMenu = new QPopupMenu; | 312 | mPopupMenu = new QPopupMenu; |
313 | mPopupMenu->insertItem(i18n("Edit Event"), this, | 313 | mPopupMenu->insertItem(i18n("Edit Event"), this, |
314 | SLOT (editEvent())); | 314 | SLOT (editEvent())); |
315 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, | 315 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, |
316 | SLOT (deleteEvent())); | 316 | SLOT (deleteEvent())); |
317 | mPopupMenu->insertSeparator(); | 317 | mPopupMenu->insertSeparator(); |
318 | mPopupMenu->insertItem(i18n("Show Dates"), this, | 318 | mPopupMenu->insertItem(i18n("Show Dates"), this, |
319 | SLOT(showDates())); | 319 | SLOT(showDates())); |
320 | mPopupMenu->insertItem(i18n("Hide Dates"), this, | 320 | mPopupMenu->insertItem(i18n("Hide Dates"), this, |
321 | SLOT(hideDates())); | 321 | SLOT(hideDates())); |
322 | */ | 322 | */ |
323 | QObject::connect(mListView,SIGNAL( newEvent()), | 323 | QObject::connect(mListView,SIGNAL( newEvent()), |
324 | this,SIGNAL(signalNewEvent())); | 324 | this,SIGNAL(signalNewEvent())); |
325 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), | 325 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), |
326 | this,SLOT(defaultItemAction(QListViewItem *))); | 326 | this,SLOT(defaultItemAction(QListViewItem *))); |
327 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, | 327 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, |
328 | const QPoint &, int )), | 328 | const QPoint &, int )), |
329 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); | 329 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); |
330 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), | 330 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), |
331 | SLOT(processSelectionChange(QListViewItem *))); | 331 | SLOT(processSelectionChange(QListViewItem *))); |
332 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), | 332 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), |
333 | SIGNAL(showIncidenceSignal(Incidence *)) ); | 333 | SIGNAL(showIncidenceSignal(Incidence *)) ); |
334 | 334 | ||
335 | readSettings(KOGlobals::config(),"KOListView Layout"); | 335 | readSettings(KOGlobals::config(),"KOListView Layout"); |
336 | } | 336 | } |
337 | 337 | ||
338 | KOListView::~KOListView() | 338 | KOListView::~KOListView() |
339 | { | 339 | { |
340 | delete mPopupMenu; | 340 | delete mPopupMenu; |
341 | #if QT_VERSION >= 0x030000 | 341 | #if QT_VERSION >= 0x030000 |
342 | 342 | ||
343 | #else | 343 | #else |
344 | delete mKOListViewWhatsThis; | 344 | delete mKOListViewWhatsThis; |
345 | #endif | 345 | #endif |
346 | } | 346 | } |
347 | 347 | ||
348 | QString KOListView::getWhatsThisText(QPoint p) | 348 | QString KOListView::getWhatsThisText(QPoint p) |
349 | { | 349 | { |
350 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | 350 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); |
351 | if ( item ) | 351 | if ( item ) |
352 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), | 352 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), |
353 | KOPrefs::instance()->mWTshowDetails, | 353 | KOPrefs::instance()->mWTshowDetails, |
354 | KOPrefs::instance()->mWTshowCreated, | 354 | KOPrefs::instance()->mWTshowCreated, |
355 | KOPrefs::instance()->mWTshowChanged); | 355 | KOPrefs::instance()->mWTshowChanged); |
356 | return i18n("That is the list view" ); | 356 | return i18n("That is the list view" ); |
357 | 357 | ||
358 | } | 358 | } |
359 | 359 | ||
360 | void KOListView::updateList() | 360 | void KOListView::updateList() |
361 | { | 361 | { |
362 | // qDebug(" KOListView::updateList() "); | 362 | // qDebug(" KOListView::updateList() "); |
363 | 363 | ||
364 | } | 364 | } |
365 | 365 | ||
366 | void KOListView::addCat( ) | 366 | void KOListView::addCat( ) |
367 | { | 367 | { |
368 | setCategories( false ); | 368 | setCategories( false ); |
369 | } | 369 | } |
370 | void KOListView::setCat() | 370 | void KOListView::setCat() |
371 | { | 371 | { |
372 | setCategories( true ); | 372 | setCategories( true ); |
373 | } | 373 | } |
374 | void KOListView::setAlarm() | 374 | void KOListView::setAlarm() |
375 | { | 375 | { |
376 | KOAlarmPrefs kap( this); | 376 | KOAlarmPrefs kap( this); |
377 | if ( !kap.exec() ) | 377 | if ( !kap.exec() ) |
378 | return; | 378 | return; |
379 | QStringList itemList; | 379 | QStringList itemList; |
380 | QPtrList<KOListViewItem> sel ; | 380 | QPtrList<KOListViewItem> sel ; |
381 | QListViewItem *qitem = mListView->firstChild (); | 381 | QListViewItem *qitem = mListView->firstChild (); |
382 | while ( qitem ) { | 382 | while ( qitem ) { |
383 | if ( qitem->isSelected() ) { | 383 | if ( qitem->isSelected() ) { |
384 | Incidence* inc = ((KOListViewItem *) qitem)->data(); | 384 | Incidence* inc = ((KOListViewItem *) qitem)->data(); |
385 | if ( inc->type() != "Journal" ) { | 385 | if ( inc->type() != "Journal" ) { |
386 | if ( inc->type() == "Todo" ) { | 386 | if ( inc->type() == "Todo" ) { |
387 | if ( ((Todo*)inc)->hasDueDate() ) | 387 | if ( ((Todo*)inc)->hasDueDate() ) |
388 | sel.append(((KOListViewItem *)qitem)); | 388 | sel.append(((KOListViewItem *)qitem)); |
389 | } else | 389 | } else |
390 | sel.append(((KOListViewItem *)qitem)); | 390 | sel.append(((KOListViewItem *)qitem)); |
391 | } | 391 | } |
392 | } | 392 | } |
393 | qitem = qitem->nextSibling(); | 393 | qitem = qitem->nextSibling(); |
394 | } | 394 | } |
395 | int count = 0; | 395 | int count = 0; |
396 | KOListViewItem * item, *temp; | 396 | KOListViewItem * item, *temp; |
397 | item = sel.first(); | 397 | item = sel.first(); |
398 | Incidence* inc; | 398 | Incidence* inc; |
399 | while ( item ) { | 399 | while ( item ) { |
400 | inc = item->data(); | 400 | inc = item->data(); |
401 | ++count; | 401 | ++count; |
402 | if (kap.mAlarmButton->isChecked()) { | 402 | if (kap.mAlarmButton->isChecked()) { |
403 | if (inc->alarms().count() == 0) | 403 | if (inc->alarms().count() == 0) |
404 | inc->newAlarm(); | 404 | inc->newAlarm(); |
405 | QPtrList<Alarm> alarms = inc->alarms(); | 405 | QPtrList<Alarm> alarms = inc->alarms(); |
406 | Alarm *alarm; | 406 | Alarm *alarm; |
407 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { | 407 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { |
408 | alarm->setEnabled(true); | 408 | alarm->setEnabled(true); |
409 | int j = kap.mAlarmTimeEdit->value()* -60; | 409 | int j = kap.mAlarmTimeEdit->value()* -60; |
410 | if (kap.mAlarmIncrCombo->currentItem() == 1) | 410 | if (kap.mAlarmIncrCombo->currentItem() == 1) |
411 | j = j * 60; | 411 | j = j * 60; |
412 | else if (kap.mAlarmIncrCombo->currentItem() == 2) | 412 | else if (kap.mAlarmIncrCombo->currentItem() == 2) |
413 | j = j * (60 * 24); | 413 | j = j * (60 * 24); |
414 | alarm->setStartOffset( j ); | 414 | alarm->setStartOffset( j ); |
415 | 415 | ||
416 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { | 416 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { |
417 | alarm->setProcedureAlarm(kap.mAlarmProgram); | 417 | alarm->setProcedureAlarm(kap.mAlarmProgram); |
418 | } | 418 | } |
419 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) | 419 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) |
420 | alarm->setAudioAlarm(kap.mAlarmSound); | 420 | alarm->setAudioAlarm(kap.mAlarmSound); |
421 | else | 421 | else |
422 | alarm->setType(Alarm::Invalid); | 422 | alarm->setType(Alarm::Invalid); |
423 | //alarm->setAudioAlarm("default"); | 423 | //alarm->setAudioAlarm("default"); |
424 | // TODO: Deal with multiple alarms | 424 | // TODO: Deal with multiple alarms |
425 | break; // For now, stop after the first alarm | 425 | break; // For now, stop after the first alarm |
426 | } | 426 | } |
427 | } else { | 427 | } else { |
428 | Alarm* alarm = inc->alarms().first(); | 428 | Alarm* alarm = inc->alarms().first(); |
429 | if ( alarm ) { | 429 | if ( alarm ) { |
430 | alarm->setEnabled(false); | 430 | alarm->setEnabled(false); |
431 | alarm->setType(Alarm::Invalid); | 431 | alarm->setType(Alarm::Invalid); |
432 | } | 432 | } |
433 | } | 433 | } |
434 | ListItemVisitor v(item, mStartDate ); | 434 | ListItemVisitor v(item, mStartDate ); |
435 | inc->accept(v); | 435 | inc->accept(v); |
436 | item = sel.next(); | 436 | item = sel.next(); |
437 | } | 437 | } |
438 | topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) ); | 438 | topLevelWidget()->setCaption( i18n("Changed alarm for %1 items").arg( count ) ); |
439 | qDebug("KO: Set alarm for %d items", count); | 439 | qDebug("KO: Set alarm for %d items", count); |
440 | calendar()->reInitAlarmSettings(); | 440 | calendar()->reInitAlarmSettings(); |
441 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 441 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
442 | } | 442 | } |
443 | void KOListView::setCategories( bool removeOld ) | 443 | void KOListView::setCategories( bool removeOld ) |
444 | { | 444 | { |
445 | 445 | ||
446 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); | 446 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); |
447 | csd->setColorEnabled(); | 447 | csd->setColorEnabled(); |
448 | if (! csd->exec()) { | 448 | if (! csd->exec()) { |
449 | delete csd; | 449 | delete csd; |
450 | return; | 450 | return; |
451 | } | 451 | } |
452 | QStringList catList = csd->selectedCategories(); | 452 | QStringList catList = csd->selectedCategories(); |
453 | delete csd; | 453 | delete csd; |
454 | // if ( catList.count() == 0 ) | 454 | // if ( catList.count() == 0 ) |
455 | // return; | 455 | // return; |
456 | //catList.sort(); | 456 | //catList.sort(); |
457 | QString categoriesStr = catList.join(","); | 457 | QString categoriesStr = catList.join(","); |
458 | int i; | 458 | int i; |
459 | QStringList itemList; | 459 | QStringList itemList; |
460 | QPtrList<KOListViewItem> sel ; | 460 | QPtrList<KOListViewItem> sel ; |
461 | QListViewItem *qitem = mListView->firstChild (); | 461 | QListViewItem *qitem = mListView->firstChild (); |
462 | while ( qitem ) { | 462 | while ( qitem ) { |
463 | if ( qitem->isSelected() ) { | 463 | if ( qitem->isSelected() ) { |
464 | sel.append(((KOListViewItem *)qitem)); | 464 | sel.append(((KOListViewItem *)qitem)); |
465 | } | 465 | } |
466 | qitem = qitem->nextSibling(); | 466 | qitem = qitem->nextSibling(); |
467 | } | 467 | } |
468 | KOListViewItem * item, *temp; | 468 | KOListViewItem * item, *temp; |
469 | item = sel.first(); | 469 | item = sel.first(); |
470 | if( item ) { | 470 | if( item ) { |
471 | Incidence* inc = item->data() ; | 471 | Incidence* inc = item->data() ; |
472 | bool setSub = false; | 472 | bool setSub = false; |
473 | if( inc->type() == "Todo" && sel.count() == 1 && inc->relations().count() > 0 ) { | 473 | if( inc->type() == "Todo" && sel.count() == 1 && inc->relations().count() > 0 ) { |
474 | int result = KMessageBox::warningYesNoCancel(this, | 474 | int result = KMessageBox::warningYesNoCancel(this, |
475 | i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), | 475 | i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), |
476 | i18n("Todo has subtodos"), | 476 | i18n("Todo has subtodos"), |
477 | i18n("Yes"), | 477 | i18n("Yes"), |
478 | i18n("No")); | 478 | i18n("No")); |
479 | if (result == KMessageBox::Cancel) item = 0; | 479 | if (result == KMessageBox::Cancel) item = 0; |
480 | if (result == KMessageBox::Yes) setSub = true; | 480 | if (result == KMessageBox::Yes) setSub = true; |
481 | } | 481 | } |
482 | while ( item ) { | 482 | while ( item ) { |
483 | inc = item->data(); | 483 | inc = item->data(); |
484 | if ( removeOld ) { | 484 | if ( removeOld ) { |
485 | inc->setCategories( catList, setSub ); | 485 | inc->setCategories( catList, setSub ); |
486 | } else { | 486 | } else { |
487 | inc->addCategories( catList, setSub ); | 487 | inc->addCategories( catList, setSub ); |
488 | } | 488 | } |
489 | ListItemVisitor v(item, mStartDate ); | 489 | ListItemVisitor v(item, mStartDate ); |
490 | inc->accept(v); | 490 | inc->accept(v); |
491 | item = sel.next(); | 491 | item = sel.next(); |
492 | } | 492 | } |
493 | } | 493 | } |
494 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 494 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
495 | } | 495 | } |
496 | 496 | ||
497 | void KOListView::beamSelected() | 497 | void KOListView::beamSelected() |
498 | { | 498 | { |
499 | int icount = 0; | 499 | int icount = 0; |
500 | QPtrList<Incidence> delSel ; | 500 | QPtrList<Incidence> delSel ; |
501 | QListViewItem *item = mListView->firstChild (); | 501 | QListViewItem *item = mListView->firstChild (); |
502 | while ( item ) { | 502 | while ( item ) { |
503 | if ( item->isSelected() ) { | 503 | if ( item->isSelected() ) { |
504 | delSel.append(((KOListViewItem *)item)->data()); | 504 | delSel.append(((KOListViewItem *)item)->data()); |
505 | ++icount; | 505 | ++icount; |
506 | } | 506 | } |
507 | 507 | ||
508 | item = item->nextSibling(); | 508 | item = item->nextSibling(); |
509 | } | 509 | } |
510 | if ( icount ) { | 510 | if ( icount ) { |
511 | emit beamIncidenceList( delSel ); | 511 | emit beamIncidenceList( delSel ); |
512 | return; | 512 | return; |
513 | QString fn ; | 513 | QString fn ; |
514 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; | 514 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; |
515 | QString mes; | 515 | QString mes; |
516 | bool createbup = true; | 516 | bool createbup = true; |
517 | if ( createbup ) { | 517 | if ( createbup ) { |
518 | QString description = "\n"; | 518 | QString description = "\n"; |
519 | CalendarLocal* cal = new CalendarLocal(); | 519 | CalendarLocal* cal = new CalendarLocal(); |
520 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 520 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
521 | Incidence *incidence = delSel.first(); | 521 | Incidence *incidence = delSel.first(); |
522 | while ( incidence ) { | 522 | while ( incidence ) { |
523 | Incidence *in = incidence->clone(); | 523 | Incidence *in = incidence->clone(); |
524 | description += in->summary() + "\n"; | 524 | description += in->summary() + "\n"; |
525 | cal->addIncidence( in ); | 525 | cal->addIncidence( in ); |
526 | incidence = delSel.next(); | 526 | incidence = delSel.next(); |
527 | } | 527 | } |
528 | FileStorage storage( cal, fn, new VCalFormat ); | 528 | FileStorage storage( cal, fn, new VCalFormat ); |
529 | storage.save(); | 529 | storage.save(); |
530 | delete cal; | 530 | delete cal; |
531 | mes = i18n("KO/Pi: Ready for beaming"); | 531 | mes = i18n("KO/Pi: Ready for beaming"); |
532 | topLevelWidget()->setCaption(mes); | 532 | topLevelWidget()->setCaption(mes); |
533 | 533 | ||
534 | #ifndef DESKTOP_VERSION | 534 | #ifndef DESKTOP_VERSION |
535 | Ir *ir = new Ir( this ); | 535 | Ir *ir = new Ir( this ); |
536 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 536 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
537 | ir->send( fn, description, "text/x-vCalendar" ); | 537 | ir->send( fn, description, "text/x-vCalendar" ); |
538 | #endif | 538 | #endif |
539 | } | 539 | } |
540 | } | 540 | } |
541 | } | 541 | } |
542 | void KOListView::beamDone( Ir *ir ) | 542 | void KOListView::beamDone( Ir *ir ) |
543 | { | 543 | { |
544 | #ifndef DESKTOP_VERSION | 544 | #ifndef DESKTOP_VERSION |
545 | delete ir; | 545 | delete ir; |
546 | #endif | 546 | #endif |
547 | topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); | 547 | topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); |
548 | } | 548 | } |
549 | 549 | ||
550 | void KOListView::saveDescriptionToFile() | 550 | void KOListView::saveDescriptionToFile() |
551 | { | 551 | { |
552 | 552 | ||
553 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), | 553 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), |
554 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), | 554 | i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), |
555 | i18n("Continue"), i18n("Cancel"), 0, | 555 | i18n("Continue"), i18n("Cancel"), 0, |
556 | 0, 1 ); | 556 | 0, 1 ); |
557 | if ( result != 0 ) { | 557 | if ( result != 0 ) { |
558 | return; | 558 | return; |
559 | } | 559 | } |
560 | int icount = 0; | 560 | int icount = 0; |
561 | QPtrList<Incidence> delSel ; | 561 | QPtrList<Incidence> delSel ; |
562 | QListViewItem *item = mListView->firstChild (); | 562 | QListViewItem *item = mListView->firstChild (); |
563 | while ( item ) { | 563 | while ( item ) { |
564 | if ( item->isSelected() ) { | 564 | if ( item->isSelected() ) { |
565 | delSel.append(((KOListViewItem *)item)->data()); | 565 | delSel.append(((KOListViewItem *)item)->data()); |
566 | ++icount; | 566 | ++icount; |
567 | } | 567 | } |
568 | 568 | ||
569 | item = item->nextSibling(); | 569 | item = item->nextSibling(); |
570 | } | 570 | } |
571 | if ( icount ) { | 571 | if ( icount ) { |
572 | QString fn = KOPrefs::instance()->mLastSaveFile; | 572 | QString fn = KOPrefs::instance()->mLastSaveFile; |
573 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 573 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
574 | 574 | ||
575 | if ( fn == "" ) | 575 | if ( fn == "" ) |
576 | return; | 576 | return; |
577 | QFileInfo info; | 577 | QFileInfo info; |
578 | info.setFile( fn ); | 578 | info.setFile( fn ); |
579 | QString mes; | 579 | QString mes; |
580 | bool createbup = true; | 580 | bool createbup = true; |
581 | if ( info. exists() ) { | 581 | if ( info. exists() ) { |
582 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 582 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
583 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 583 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
584 | i18n("Overwrite!"), i18n("Cancel"), 0, | 584 | i18n("Overwrite!"), i18n("Cancel"), 0, |
585 | 0, 1 ); | 585 | 0, 1 ); |
586 | if ( result != 0 ) { | 586 | if ( result != 0 ) { |
587 | createbup = false; | 587 | createbup = false; |
588 | } | 588 | } |
589 | } | 589 | } |
590 | if ( createbup ) { | 590 | if ( createbup ) { |
591 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + | 591 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + |
592 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); | 592 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); |
593 | Incidence *incidence = delSel.first(); | 593 | Incidence *incidence = delSel.first(); |
594 | icount = 0; | 594 | icount = 0; |
595 | while ( incidence ) { | 595 | while ( incidence ) { |
596 | if ( incidence->type() == "Journal" ) { | 596 | if ( incidence->type() == "Journal" ) { |
597 | text += "\n************************************\n"; | 597 | text += "\n************************************\n"; |
598 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); | 598 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); |
599 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 599 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
600 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); | 600 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); |
601 | ++icount; | 601 | ++icount; |
602 | 602 | ||
603 | } else { | 603 | } else { |
604 | if ( !incidence->description().isEmpty() ) { | 604 | if ( !incidence->description().isEmpty() ) { |
605 | text += "\n************************************\n"; | 605 | text += "\n************************************\n"; |
606 | if ( incidence->type() == "Todo" ) | 606 | if ( incidence->type() == "Todo" ) |
607 | text += i18n("To-Do: "); | 607 | text += i18n("To-Do: "); |
608 | text += incidence->summary(); | 608 | text += incidence->summary(); |
609 | if ( incidence->hasStartDate() ) | 609 | if ( incidence->hasStartDate() ) |
610 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); | 610 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); |
611 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 611 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
612 | if ( !incidence->location().isEmpty() ) | 612 | if ( !incidence->location().isEmpty() ) |
613 | text += "\n" +i18n("Location: ") + incidence->location(); | 613 | text += "\n" +i18n("Location: ") + incidence->location(); |
614 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); | 614 | text += "\n" + i18n("Description: ") + "\n" + incidence->description(); |
615 | ++icount; | 615 | ++icount; |
616 | 616 | ||
617 | } | 617 | } |
618 | } | 618 | } |
619 | incidence = delSel.next(); | 619 | incidence = delSel.next(); |
620 | } | 620 | } |
621 | QFile file( fn ); | 621 | QFile file( fn ); |
622 | if (!file.open( IO_WriteOnly ) ) { | 622 | if (!file.open( IO_WriteOnly ) ) { |
623 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); | 623 | topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); |
624 | return; | 624 | return; |
625 | } | 625 | } |
626 | QTextStream ts( &file ); | 626 | QTextStream ts( &file ); |
627 | ts << text; | 627 | ts << text; |
628 | file.close(); | 628 | file.close(); |
629 | //qDebug("%s ", text.latin1()); | 629 | //qDebug("%s ", text.latin1()); |
630 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); | 630 | mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); |
631 | KOPrefs::instance()->mLastSaveFile = fn; | 631 | KOPrefs::instance()->mLastSaveFile = fn; |
632 | topLevelWidget()->setCaption(mes); | 632 | topLevelWidget()->setCaption(mes); |
633 | } | 633 | } |
634 | } | 634 | } |
635 | } | 635 | } |
636 | void KOListView::saveToFileVCS() | 636 | void KOListView::saveToFileVCS() |
637 | { | 637 | { |
638 | writeToFile( false ); | 638 | writeToFile( false ); |
639 | } | 639 | } |
640 | void KOListView::saveToFile() | 640 | void KOListView::saveToFile() |
641 | { | 641 | { |
642 | writeToFile( true ); | 642 | writeToFile( true ); |
643 | } | 643 | } |
644 | void KOListView::writeToFile( bool iCal ) | 644 | void KOListView::writeToFile( bool iCal ) |
645 | { | 645 | { |
646 | 646 | ||
647 | int icount = 0; | 647 | int icount = 0; |
648 | QPtrList<Incidence> delSel ; | 648 | QPtrList<Incidence> delSel ; |
649 | QListViewItem *item = mListView->firstChild (); | 649 | QListViewItem *item = mListView->firstChild (); |
650 | bool journal = iCal; // warn only for vCal | 650 | bool journal = iCal; // warn only for vCal |
651 | while ( item ) { | 651 | while ( item ) { |
652 | if ( item->isSelected() ) { | 652 | if ( item->isSelected() ) { |
653 | if ( !journal ) | 653 | if ( !journal ) |
654 | if ( ((KOListViewItem *)item)->data()->type() == "Journal") | 654 | if ( ((KOListViewItem *)item)->data()->type() == "Journal") |
655 | journal = true; | 655 | journal = true; |
656 | delSel.append(((KOListViewItem *)item)->data()); | 656 | delSel.append(((KOListViewItem *)item)->data()); |
657 | ++icount; | 657 | ++icount; |
658 | } | 658 | } |
659 | 659 | ||
660 | item = item->nextSibling(); | 660 | item = item->nextSibling(); |
661 | } | 661 | } |
662 | if ( !iCal && journal ) { | 662 | if ( !iCal && journal ) { |
663 | int result = KMessageBox::warningContinueCancel(this, | 663 | int result = KMessageBox::warningContinueCancel(this, |
664 | i18n("The journal entries can not be\nexported to a vCalendar file."), | 664 | i18n("The journal entries can not be\nexported to a vCalendar file."), |
665 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), | 665 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), |
666 | true); | 666 | true); |
667 | if (result != KMessageBox::Continue) return; | 667 | if (result != KMessageBox::Continue) return; |
668 | } | 668 | } |
669 | if ( icount ) { | 669 | if ( icount ) { |
670 | QString fn = KOPrefs::instance()->mLastSaveFile; | 670 | QString fn = KOPrefs::instance()->mLastSaveFile; |
671 | QString extension; | 671 | QString extension; |
672 | if ( iCal ) { | 672 | if ( iCal ) { |
673 | if ( fn.right( 4 ).lower() == ".vcs" ) { | 673 | if ( fn.right( 4 ).lower() == ".vcs" ) { |
674 | fn = fn.left( fn.length() -3) + "ics"; | 674 | fn = fn.left( fn.length() -3) + "ics"; |
675 | } | 675 | } |
676 | } else { | 676 | } else { |
677 | if ( fn.right( 4 ).lower() == ".ics" ) { | 677 | if ( fn.right( 4 ).lower() == ".ics" ) { |
678 | fn = fn.left( fn.length() -3) + "vcs"; | 678 | fn = fn.left( fn.length() -3) + "vcs"; |
679 | } | 679 | } |
680 | } | 680 | } |
681 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 681 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
682 | 682 | ||
683 | if ( fn == "" ) | 683 | if ( fn == "" ) |
684 | return; | 684 | return; |
685 | QFileInfo info; | 685 | QFileInfo info; |
686 | info.setFile( fn ); | 686 | info.setFile( fn ); |
687 | QString mes; | 687 | QString mes; |
688 | bool createbup = true; | 688 | bool createbup = true; |
689 | if ( info. exists() ) { | 689 | if ( info. exists() ) { |
690 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 690 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
691 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 691 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
692 | i18n("Overwrite!"), i18n("Cancel"), 0, | 692 | i18n("Overwrite!"), i18n("Cancel"), 0, |
693 | 0, 1 ); | 693 | 0, 1 ); |
694 | if ( result != 0 ) { | 694 | if ( result != 0 ) { |
695 | createbup = false; | 695 | createbup = false; |
696 | } | 696 | } |
697 | } | 697 | } |
698 | if ( createbup ) { | 698 | if ( createbup ) { |
699 | CalendarLocal cal; | 699 | CalendarLocal cal; |
700 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 700 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
701 | Incidence *incidence = delSel.first(); | 701 | Incidence *incidence = delSel.first(); |
702 | while ( incidence ) { | 702 | while ( incidence ) { |
703 | cal.addIncidence( incidence->clone() ); | 703 | cal.addIncidence( incidence->clone() ); |
704 | incidence = delSel.next(); | 704 | incidence = delSel.next(); |
705 | } | 705 | } |
706 | if ( iCal ) { | 706 | if ( iCal ) { |
707 | ICalFormat format; | 707 | ICalFormat format; |
708 | format.save( &cal, fn ); | 708 | format.save( &cal, fn ); |
709 | } else { | 709 | } else { |
710 | 710 | ||
711 | VCalFormat format; | 711 | VCalFormat format; |
712 | format.save( &cal, fn ); | 712 | format.save( &cal, fn ); |
713 | } | 713 | } |
714 | mes = i18n("KO/Pi:Saved %1").arg(fn ); | 714 | mes = i18n("KO/Pi:Saved %1").arg(fn ); |
715 | KOPrefs::instance()->mLastSaveFile = fn; | 715 | KOPrefs::instance()->mLastSaveFile = fn; |
716 | topLevelWidget()->setCaption(mes); | 716 | topLevelWidget()->setCaption(mes); |
717 | } | 717 | } |
718 | } | 718 | } |
719 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); | 719 | QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); |
720 | } | 720 | } |
721 | void KOListView::deleteAll() | 721 | void KOListView::deleteAll() |
722 | { | 722 | { |
723 | int icount = 0; | 723 | int icount = 0; |
724 | QPtrList<Incidence> delSel ; | 724 | QPtrList<Incidence> delSel ; |
725 | QListViewItem *item = mListView->firstChild (); | 725 | QListViewItem *item = mListView->firstChild (); |
726 | while ( item ) { | 726 | while ( item ) { |
727 | if ( item->isSelected() ) { | 727 | if ( item->isSelected() ) { |
728 | delSel.append(((KOListViewItem *)item)->data()); | 728 | delSel.append(((KOListViewItem *)item)->data()); |
729 | ++icount; | 729 | ++icount; |
730 | } | 730 | } |
731 | 731 | ||
732 | item = item->nextSibling(); | 732 | item = item->nextSibling(); |
733 | } | 733 | } |
734 | if ( icount ) { | 734 | if ( icount ) { |
735 | Incidence *incidence = delSel.first(); | 735 | Incidence *incidence = delSel.first(); |
736 | Incidence *toDelete; | 736 | Incidence *toDelete; |
737 | KOPrefs *p = KOPrefs::instance(); | 737 | KOPrefs *p = KOPrefs::instance(); |
738 | bool confirm = p->mConfirm; | 738 | bool confirm = p->mConfirm; |
739 | QString mess; | 739 | QString mess; |
740 | mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); | 740 | mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); |
741 | if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { | 741 | if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { |
742 | p->mConfirm = false; | 742 | p->mConfirm = false; |
743 | int delCounter = 0; | 743 | int delCounter = 0; |
744 | QDialog dia ( this, "p-dialog", true ); | 744 | QDialog dia ( this, "p-dialog", true ); |
745 | QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); | 745 | QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); |
746 | QVBoxLayout lay( &dia ); | 746 | QVBoxLayout lay( &dia ); |
747 | lay.setMargin(7); | 747 | lay.setMargin(7); |
748 | lay.setSpacing(7); | 748 | lay.setSpacing(7); |
749 | lay.addWidget( &lab); | 749 | lay.addWidget( &lab); |
750 | QProgressBar bar( icount, &dia ); | 750 | QProgressBar bar( icount, &dia ); |
751 | lay.addWidget( &bar); | 751 | lay.addWidget( &bar); |
752 | int w = 220; | 752 | int w = 220; |
753 | int h = 50; | 753 | int h = 50; |
754 | int dw = QApplication::desktop()->width(); | 754 | int dw = QApplication::desktop()->width(); |
755 | int dh = QApplication::desktop()->height(); | 755 | int dh = QApplication::desktop()->height(); |
756 | dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 756 | dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
757 | //dia.resize( 240,50 ); | 757 | //dia.resize( 240,50 ); |
758 | dia.show(); | 758 | dia.show(); |
759 | 759 | ||
760 | while ( incidence ) { | 760 | while ( incidence ) { |
761 | bar.setProgress( delCounter ); | 761 | bar.setProgress( delCounter ); |
762 | mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); | 762 | mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); |
763 | dia.setCaption( mess ); | 763 | dia.setCaption( mess ); |
764 | qApp->processEvents(); | 764 | qApp->processEvents(); |
765 | toDelete = (incidence); | 765 | toDelete = (incidence); |
766 | incidence = delSel.next(); | 766 | incidence = delSel.next(); |
767 | emit deleteIncidenceSignal(toDelete ); | 767 | emit deleteIncidenceSignal(toDelete ); |
768 | if ( dia.result() != 0 ) | 768 | if ( dia.result() != 0 ) |
769 | break; | 769 | break; |
770 | 770 | ||
771 | } | 771 | } |
772 | mess = mess.sprintf( i18n("%d items remaining in list."), count() ); | 772 | mess = mess.sprintf( i18n("%d items remaining in list."), count() ); |
773 | topLevelWidget ()->setCaption( mess ); | 773 | topLevelWidget ()->setCaption( mess ); |
774 | p->mConfirm = confirm; | 774 | p->mConfirm = confirm; |
775 | } | 775 | } |
776 | } | 776 | } |
777 | 777 | ||
778 | 778 | ||
779 | } | 779 | } |
780 | int KOListView::maxDatesHint() | 780 | int KOListView::maxDatesHint() |
781 | { | 781 | { |
782 | return 0; | 782 | return 0; |
783 | } | 783 | } |
784 | 784 | ||
785 | int KOListView::currentDateCount() | 785 | int KOListView::currentDateCount() |
786 | { | 786 | { |
787 | return 0; | 787 | return 0; |
788 | } | 788 | } |
789 | 789 | ||
790 | QPtrList<Incidence> KOListView::selectedIncidences() | 790 | QPtrList<Incidence> KOListView::selectedIncidences() |
791 | { | 791 | { |
792 | QPtrList<Incidence> eventList; | 792 | QPtrList<Incidence> eventList; |
793 | QListViewItem *item = mListView->firstChild (); | 793 | QListViewItem *item = mListView->firstChild (); |
794 | while ( item ) { | 794 | while ( item ) { |
795 | if ( item->isSelected() ) { | 795 | if ( item->isSelected() ) { |
796 | eventList.append(((KOListViewItem *)item)->data()); | 796 | eventList.append(((KOListViewItem *)item)->data()); |
797 | } | 797 | } |
798 | 798 | ||
799 | item = item->nextSibling(); | 799 | item = item->nextSibling(); |
800 | } | 800 | } |
801 | 801 | ||
802 | // // QListViewItem *item = mListView->selectedItem(); | 802 | // // QListViewItem *item = mListView->selectedItem(); |
803 | //if (item) eventList.append(((KOListViewItem *)item)->data()); | 803 | //if (item) eventList.append(((KOListViewItem *)item)->data()); |
804 | 804 | ||
805 | return eventList; | 805 | return eventList; |
806 | } | 806 | } |
807 | 807 | ||
808 | DateList KOListView::selectedDates() | 808 | DateList KOListView::selectedDates() |
809 | { | 809 | { |
810 | DateList eventList; | 810 | DateList eventList; |
811 | return eventList; | 811 | return eventList; |
812 | } | 812 | } |
813 | 813 | ||
814 | void KOListView::showDates(bool show) | 814 | void KOListView::showDates(bool show) |
815 | { | 815 | { |
816 | // Shouldn't we set it to a value greater 0? When showDates is called with | 816 | // Shouldn't we set it to a value greater 0? When showDates is called with |
817 | // show == true at first, then the columnwidths are set to zero. | 817 | // show == true at first, then the columnwidths are set to zero. |
818 | static int oldColWidth1 = 0; | 818 | static int oldColWidth1 = 0; |
819 | static int oldColWidth3 = 0; | 819 | static int oldColWidth3 = 0; |
820 | 820 | ||
821 | if (!show) { | 821 | if (!show) { |
822 | oldColWidth1 = mListView->columnWidth(1); | 822 | oldColWidth1 = mListView->columnWidth(1); |
823 | oldColWidth3 = mListView->columnWidth(3); | 823 | oldColWidth3 = mListView->columnWidth(3); |
824 | mListView->setColumnWidth(1, 0); | 824 | mListView->setColumnWidth(1, 0); |
825 | mListView->setColumnWidth(3, 0); | 825 | mListView->setColumnWidth(3, 0); |
826 | } else { | 826 | } else { |
827 | mListView->setColumnWidth(1, oldColWidth1); | 827 | mListView->setColumnWidth(1, oldColWidth1); |
828 | mListView->setColumnWidth(3, oldColWidth3); | 828 | mListView->setColumnWidth(3, oldColWidth3); |
829 | } | 829 | } |
830 | mListView->repaint(); | 830 | mListView->repaint(); |
831 | } | 831 | } |
832 | 832 | ||
833 | void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 833 | void KOListView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
834 | const QDate &td) | 834 | const QDate &td) |
835 | { | 835 | { |
836 | #ifndef KORG_NOPRINTER | 836 | #ifndef KORG_NOPRINTER |
837 | calPrinter->preview(CalPrinter::Day, fd, td); | 837 | calPrinter->preview(CalPrinter::Day, fd, td); |
838 | #endif | 838 | #endif |
839 | } | 839 | } |
840 | 840 | ||
841 | void KOListView::showDates() | 841 | void KOListView::showDates() |
842 | { | 842 | { |
843 | showDates(true); | 843 | showDates(true); |
844 | } | 844 | } |
845 | 845 | ||
846 | void KOListView::hideDates() | 846 | void KOListView::hideDates() |
847 | { | 847 | { |
848 | showDates(false); | 848 | showDates(false); |
849 | } | 849 | } |
850 | 850 | ||
851 | void KOListView::resetFocus() | 851 | void KOListView::resetFocus() |
852 | { | 852 | { |
853 | topLevelWidget()->setActiveWindow(); | 853 | topLevelWidget()->setActiveWindow(); |
854 | topLevelWidget()->raise(); | 854 | topLevelWidget()->raise(); |
855 | mListView->setFocus(); | 855 | mListView->setFocus(); |
856 | } | 856 | } |
857 | void KOListView::updateView() | 857 | void KOListView::updateView() |
858 | { | 858 | { |
859 | mListView->setFocus(); | 859 | mListView->setFocus(); |
860 | if ( mListView->firstChild () ) | 860 | if ( mListView->firstChild () ) |
861 | mListView->setCurrentItem( mListView->firstChild () ); | 861 | mListView->setCurrentItem( mListView->firstChild () ); |
862 | } | 862 | } |
863 | void KOListView::updateConfig() | 863 | void KOListView::updateConfig() |
864 | { | 864 | { |
865 | 865 | ||
866 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 866 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
867 | updateView(); | 867 | updateView(); |
868 | 868 | ||
869 | } | 869 | } |
870 | void KOListView::setStartDate(const QDate &start) | 870 | void KOListView::setStartDate(const QDate &start) |
871 | { | 871 | { |
872 | mStartDate = start; | 872 | mStartDate = start; |
873 | } | 873 | } |
874 | 874 | ||
875 | void KOListView::showDates(const QDate &start, const QDate &end) | 875 | void KOListView::showDates(const QDate &start, const QDate &end) |
876 | { | 876 | { |
877 | clear(); | 877 | clear(); |
878 | mStartDate = start; | 878 | mStartDate = start; |
879 | QDate date = start; | 879 | QDate date = start; |
880 | QPtrList<Journal> j_list; | 880 | QPtrList<Journal> j_list; |
881 | while( date <= end ) { | 881 | while( date <= end ) { |
882 | addEvents(calendar()->events(date)); | 882 | addEvents(calendar()->events(date)); |
883 | addTodos(calendar()->todos(date)); | 883 | addTodos(calendar()->todos(date)); |
884 | Journal* jo = calendar()->journal(date); | 884 | Journal* jo = calendar()->journal(date); |
885 | if ( jo ) | 885 | if ( jo ) |
886 | j_list.append( jo ); | 886 | j_list.append( jo ); |
887 | date = date.addDays( 1 ); | 887 | date = date.addDays( 1 ); |
888 | } | 888 | } |
889 | addJournals(j_list); | 889 | addJournals(j_list); |
890 | emit incidenceSelected( 0 ); | 890 | emit incidenceSelected( 0 ); |
891 | updateView(); | 891 | updateView(); |
892 | 892 | ||
893 | } | 893 | } |
894 | 894 | ||
895 | void KOListView::addEvents(QPtrList<Event> eventList) | 895 | void KOListView::addEvents(QPtrList<Event> eventList) |
896 | { | 896 | { |
897 | 897 | ||
898 | Event *ev; | 898 | Event *ev; |
899 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 899 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
900 | addIncidence(ev); | 900 | addIncidence(ev); |
901 | } | 901 | } |
902 | if ( !mListView->currentItem() ){ | 902 | if ( !mListView->currentItem() ){ |
903 | updateView(); | 903 | updateView(); |
904 | } | 904 | } |
905 | } | 905 | } |
906 | 906 | ||
907 | void KOListView::addTodos(QPtrList<Todo> eventList) | 907 | void KOListView::addTodos(QPtrList<Todo> eventList) |
908 | { | 908 | { |
909 | Todo *ev; | 909 | Todo *ev; |
910 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 910 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
911 | addIncidence(ev); | 911 | addIncidence(ev); |
912 | } | 912 | } |
913 | if ( !mListView->currentItem() ){ | 913 | if ( !mListView->currentItem() ){ |
914 | updateView(); | 914 | updateView(); |
915 | } | 915 | } |
916 | } | 916 | } |
917 | void KOListView::addJournals(QPtrList<Journal> eventList) | 917 | void KOListView::addJournals(QPtrList<Journal> eventList) |
918 | { | 918 | { |
919 | Journal *ev; | 919 | Journal *ev; |
920 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 920 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
921 | addIncidence(ev); | 921 | addIncidence(ev); |
922 | } | 922 | } |
923 | if ( !mListView->currentItem() ){ | 923 | if ( !mListView->currentItem() ){ |
924 | updateView(); | 924 | updateView(); |
925 | } | 925 | } |
926 | } | 926 | } |
927 | 927 | ||
928 | void KOListView::addIncidence(Incidence *incidence) | 928 | void KOListView::addIncidence(Incidence *incidence) |
929 | { | 929 | { |
930 | if ( mUidDict.find( incidence->uid() ) ) return; | 930 | if ( mUidDict.find( incidence->uid() ) ) return; |
931 | 931 | ||
932 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 932 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
933 | mUidDict.insert( incidence->uid(), incidence ); | 933 | mUidDict.insert( incidence->uid(), incidence ); |
934 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); | 934 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); |
935 | ListItemVisitor v(item, mStartDate ); | 935 | ListItemVisitor v(item, mStartDate ); |
936 | if (incidence->accept(v)) { | 936 | if (incidence->accept(v)) { |
937 | return; | 937 | return; |
938 | } | 938 | } |
939 | else delete item; | 939 | else delete item; |
940 | } | 940 | } |
941 | 941 | ||
942 | void KOListView::showEvents(QPtrList<Event> eventList) | 942 | void KOListView::showEvents(QPtrList<Event> eventList) |
943 | { | 943 | { |
944 | clear(); | 944 | clear(); |
945 | 945 | ||
946 | addEvents(eventList); | 946 | addEvents(eventList); |
947 | 947 | ||
948 | // After new creation of list view no events are selected. | 948 | // After new creation of list view no events are selected. |
949 | emit incidenceSelected( 0 ); | 949 | emit incidenceSelected( 0 ); |
950 | } | 950 | } |
951 | int KOListView::count() | 951 | int KOListView::count() |
952 | { | 952 | { |
953 | return mListView->childCount(); | 953 | return mListView->childCount(); |
954 | } | 954 | } |
955 | 955 | ||
956 | void KOListView::changeEventDisplay(Event *event, int action) | 956 | void KOListView::changeEventDisplay(Event *event, int action) |
957 | { | 957 | { |
958 | KOListViewItem *item; | 958 | KOListViewItem *item; |
959 | 959 | ||
960 | switch(action) { | 960 | switch(action) { |
961 | case KOGlobals::EVENTADDED: | 961 | case KOGlobals::EVENTADDED: |
962 | addIncidence( event ); | 962 | addIncidence( event ); |
963 | break; | 963 | break; |
964 | case KOGlobals::EVENTEDITED: | 964 | case KOGlobals::EVENTEDITED: |
965 | item = getItemForEvent(event); | 965 | item = getItemForEvent(event); |
966 | if (item) { | 966 | if (item) { |
967 | mUidDict.remove( event->uid() ); | 967 | mUidDict.remove( event->uid() ); |
968 | delete item; | 968 | delete item; |
969 | addIncidence( event ); | 969 | addIncidence( event ); |
970 | } | 970 | } |
971 | break; | 971 | break; |
972 | case KOGlobals::EVENTDELETED: | 972 | case KOGlobals::EVENTDELETED: |
973 | item = getItemForEvent(event); | 973 | item = getItemForEvent(event); |
974 | if (item) { | 974 | if (item) { |
975 | mUidDict.remove( event->uid() ); | 975 | mUidDict.remove( event->uid() ); |
976 | delete item; | 976 | delete item; |
977 | } | 977 | } |
978 | break; | 978 | break; |
979 | default: | 979 | default: |
980 | ; | 980 | ; |
981 | } | 981 | } |
982 | } | 982 | } |
983 | 983 | ||
984 | KOListViewItem *KOListView::getItemForEvent(Event *event) | 984 | KOListViewItem *KOListView::getItemForEvent(Event *event) |
985 | { | 985 | { |
986 | KOListViewItem *item = (KOListViewItem *)mListView->firstChild(); | 986 | KOListViewItem *item = (KOListViewItem *)mListView->firstChild(); |
987 | while (item) { | 987 | while (item) { |
988 | if (item->data() == event) return item; | 988 | if (item->data() == event) return item; |
989 | item = (KOListViewItem *)item->nextSibling(); | 989 | item = (KOListViewItem *)item->nextSibling(); |
990 | } | 990 | } |
991 | return 0; | 991 | return 0; |
992 | } | 992 | } |
993 | 993 | ||
994 | void KOListView::defaultItemAction(QListViewItem *i) | 994 | void KOListView::defaultItemAction(QListViewItem *i) |
995 | { | 995 | { |
996 | KOListViewItem *item = static_cast<KOListViewItem *>( i ); | 996 | KOListViewItem *item = static_cast<KOListViewItem *>( i ); |
997 | if ( item ) defaultAction( item->data() ); | 997 | if ( item ) defaultAction( item->data() ); |
998 | 998 | ||
999 | } | 999 | } |
1000 | 1000 | ||
1001 | void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) | 1001 | void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) |
1002 | { | 1002 | { |
1003 | mActiveItem = (KOListViewItem *)item; | 1003 | mActiveItem = (KOListViewItem *)item; |
1004 | if (mActiveItem) { | 1004 | if (mActiveItem) { |
1005 | Incidence *incidence = mActiveItem->data(); | 1005 | Incidence *incidence = mActiveItem->data(); |
1006 | mPopupMenu->enableDefault( !mListView->hasMultiSelection( item ) ); | 1006 | mPopupMenu->enableDefault( !mListView->hasMultiSelection( item ) ); |
1007 | mPopupMenu->showIncidencePopup(incidence); | 1007 | mPopupMenu->showIncidencePopup(incidence); |
1008 | 1008 | ||
1009 | /* | 1009 | /* |
1010 | if ( incidence && incidence->type() == "Event" ) { | 1010 | if ( incidence && incidence->type() == "Event" ) { |
1011 | Event *event = static_cast<Event *>( incidence ); | 1011 | Event *event = static_cast<Event *>( incidence ); |
1012 | mPopupMenu->showEventPopup(event); | 1012 | mPopupMenu->showEventPopup(event); |
1013 | } | 1013 | } |
1014 | */ | 1014 | */ |
1015 | } | 1015 | } |
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | void KOListView::readSettings(KConfig *config, QString setting) | 1018 | void KOListView::readSettings(KConfig *config, QString setting) |
1019 | { | 1019 | { |
1020 | // qDebug("KOListView::readSettings "); | 1020 | // qDebug("KOListView::readSettings "); |
1021 | mListView->restoreLayout(config,setting); | 1021 | mListView->restoreLayout(config,setting); |
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | void KOListView::writeSettings(KConfig *config, QString setting) | 1024 | void KOListView::writeSettings(KConfig *config, QString setting) |
1025 | { | 1025 | { |
1026 | // qDebug("KOListView::writeSettings "); | 1026 | // qDebug("KOListView::writeSettings "); |
1027 | mListView->saveLayout(config, setting); | 1027 | mListView->saveLayout(config, setting); |
1028 | } | 1028 | } |
1029 | 1029 | ||
1030 | void KOListView::processSelectionChange(QListViewItem *) | 1030 | void KOListView::processSelectionChange(QListViewItem *) |
1031 | { | 1031 | { |
1032 | 1032 | ||
1033 | KOListViewItem *item = | 1033 | KOListViewItem *item = |
1034 | static_cast<KOListViewItem *>( mListView->currentItem() ); | 1034 | static_cast<KOListViewItem *>( mListView->currentItem() ); |
1035 | 1035 | ||
1036 | if ( !item ) { | 1036 | if ( !item ) { |
1037 | emit incidenceSelected( 0 ); | 1037 | emit incidenceSelected( 0 ); |
1038 | } else { | 1038 | } else { |
1039 | emit incidenceSelected( item->data() ); | 1039 | emit incidenceSelected( item->data() ); |
1040 | } | 1040 | } |
1041 | } | 1041 | } |
1042 | 1042 | ||
1043 | void KOListView::clearSelection() | 1043 | void KOListView::clearSelection() |
1044 | { | 1044 | { |
1045 | mListView->selectAll( false ); | 1045 | mListView->selectAll( false ); |
1046 | } | 1046 | } |
1047 | void KOListView::allSelection() | 1047 | void KOListView::allSelection() |
1048 | { | 1048 | { |
1049 | mListView->selectAll( true ); | 1049 | mListView->selectAll( true ); |
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | void KOListView::clear() | 1052 | void KOListView::clear() |
1053 | { | 1053 | { |
1054 | mListView->clear(); | 1054 | mListView->clear(); |
1055 | mUidDict.clear(); | 1055 | mUidDict.clear(); |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | Incidence* KOListView::currentItem() | 1058 | Incidence* KOListView::currentItem() |
1059 | { | 1059 | { |
1060 | if ( mListView->currentItem() ) | 1060 | if ( mListView->currentItem() ) |
1061 | return ((KOListViewItem*) mListView->currentItem())->data(); | 1061 | return ((KOListViewItem*) mListView->currentItem())->data(); |
1062 | return 0; | 1062 | return 0; |
1063 | } | 1063 | } |
1064 | void KOListView::keyPressEvent ( QKeyEvent *e) | 1064 | void KOListView::keyPressEvent ( QKeyEvent *e) |
1065 | { | 1065 | { |
1066 | 1066 | ||
1067 | if ( e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace ) { | 1067 | if ( e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace ) { |
1068 | deleteAll(); | 1068 | deleteAll(); |
1069 | return; | 1069 | return; |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | e->ignore(); | 1072 | e->ignore(); |
1073 | } | 1073 | } |
1074 | void KOListViewListView::keyPressEvent ( QKeyEvent *e) | 1074 | void KOListViewListView::keyPressEvent ( QKeyEvent *e) |
1075 | { | 1075 | { |
1076 | 1076 | ||
1077 | switch ( e->key() ) { | 1077 | switch ( e->key() ) { |
1078 | case Qt::Key_Down: | 1078 | case Qt::Key_Down: |
1079 | if ( e->state() == ShiftButton ) { | 1079 | if ( e->state() == ShiftButton ) { |
1080 | QListViewItem* cn = currentItem(); | 1080 | QListViewItem* cn = currentItem(); |
1081 | if ( !cn ) | 1081 | if ( !cn ) |
1082 | cn = firstChild(); | 1082 | cn = firstChild(); |
1083 | if ( !cn ) | 1083 | if ( !cn ) |
1084 | return; | 1084 | return; |
1085 | while ( cn->nextSibling() ) | 1085 | while ( cn->nextSibling() ) |
1086 | cn = cn->nextSibling(); | 1086 | cn = cn->nextSibling(); |
1087 | setCurrentItem ( cn ); | 1087 | setCurrentItem ( cn ); |
1088 | ensureItemVisible ( cn ); | 1088 | ensureItemVisible ( cn ); |
1089 | 1089 | ||
1090 | e->accept(); | 1090 | e->accept(); |
1091 | return; | 1091 | return; |
1092 | } | 1092 | } |
1093 | if ( e->state() == ControlButton ) { | 1093 | if ( e->state() == ControlButton ) { |
1094 | int count = childCount (); | 1094 | int count = childCount (); |
1095 | int jump = count / 5; | 1095 | int jump = count / 5; |
1096 | QListViewItem* cn; | 1096 | QListViewItem* cn; |
1097 | cn = currentItem(); | 1097 | cn = currentItem(); |
1098 | if ( ! cn ) | 1098 | if ( ! cn ) |
1099 | return; | 1099 | return; |
1100 | if ( jump == 0 ) | 1100 | if ( jump == 0 ) |
1101 | jump = 1; | 1101 | jump = 1; |
1102 | while ( jump && cn->nextSibling() ) { | 1102 | while ( jump && cn->nextSibling() ) { |
1103 | cn = cn->nextSibling(); | 1103 | cn = cn->nextSibling(); |
1104 | --jump; | 1104 | --jump; |
1105 | } | 1105 | } |
1106 | setCurrentItem ( cn ); | 1106 | setCurrentItem ( cn ); |
1107 | ensureItemVisible ( cn ); | 1107 | ensureItemVisible ( cn ); |
1108 | 1108 | ||
1109 | } else | 1109 | } else |
1110 | QListView::keyPressEvent ( e ) ; | 1110 | QListView::keyPressEvent ( e ) ; |
1111 | e->accept(); | 1111 | e->accept(); |
1112 | break; | 1112 | break; |
1113 | 1113 | ||
1114 | case Qt::Key_Up: | 1114 | case Qt::Key_Up: |
1115 | if ( e->state() == ShiftButton ) { | 1115 | if ( e->state() == ShiftButton ) { |
1116 | QListViewItem* cn = firstChild(); | 1116 | QListViewItem* cn = firstChild(); |
1117 | if ( cn ) { | 1117 | if ( cn ) { |
1118 | setCurrentItem ( cn ); | 1118 | setCurrentItem ( cn ); |
1119 | ensureItemVisible ( cn ); | 1119 | ensureItemVisible ( cn ); |
1120 | } | 1120 | } |
1121 | e->accept(); | 1121 | e->accept(); |
1122 | return; | 1122 | return; |
1123 | } | 1123 | } |
1124 | if ( e->state() == ControlButton ) { | 1124 | if ( e->state() == ControlButton ) { |
1125 | int count = childCount (); | 1125 | int count = childCount (); |
1126 | int jump = count / 5; | 1126 | int jump = count / 5; |
1127 | QListViewItem* cn; | 1127 | QListViewItem* cn; |
1128 | cn = currentItem(); | 1128 | cn = currentItem(); |
1129 | if ( ! cn ) | 1129 | if ( ! cn ) |
1130 | return; | 1130 | return; |
1131 | if ( jump == 0 ) | 1131 | if ( jump == 0 ) |
1132 | jump = 1; | 1132 | jump = 1; |
1133 | while ( jump && cn->itemAbove ()) { | 1133 | while ( jump && cn->itemAbove ()) { |
1134 | cn = cn->itemAbove (); | 1134 | cn = cn->itemAbove (); |
1135 | --jump; | 1135 | --jump; |
1136 | } | 1136 | } |
1137 | setCurrentItem ( cn ); | 1137 | setCurrentItem ( cn ); |
1138 | ensureItemVisible ( cn ); | 1138 | ensureItemVisible ( cn ); |
1139 | } else | 1139 | } else |
1140 | QListView::keyPressEvent ( e ) ; | 1140 | QListView::keyPressEvent ( e ) ; |
1141 | e->accept(); | 1141 | e->accept(); |
1142 | break; | 1142 | break; |
1143 | case Qt::Key_I: { | 1143 | case Qt::Key_I: { |
1144 | QListViewItem* cn; | 1144 | QListViewItem* cn; |
1145 | cn = currentItem(); | 1145 | cn = currentItem(); |
1146 | if ( cn ) { | 1146 | if ( cn ) { |
1147 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1147 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1148 | if ( ci ){ | 1148 | if ( ci ){ |
1149 | //emit showIncidence( ci->data()); | 1149 | //emit showIncidence( ci->data()); |
1150 | cn = cn->nextSibling(); | 1150 | cn = cn->nextSibling(); |
1151 | if ( cn ) { | 1151 | if ( cn ) { |
1152 | setCurrentItem ( cn ); | 1152 | setCurrentItem ( cn ); |
1153 | ensureItemVisible ( cn ); | 1153 | ensureItemVisible ( cn ); |
1154 | } | 1154 | } |
1155 | emit showIncidence( ci->data()); | 1155 | emit showIncidence( ci->data()); |
1156 | } | 1156 | } |
1157 | } | 1157 | } |
1158 | e->accept(); | 1158 | e->accept(); |
1159 | } | 1159 | } |
1160 | break; | 1160 | break; |
1161 | case Qt::Key_Return: | 1161 | case Qt::Key_Return: |
1162 | case Qt::Key_Enter: | 1162 | case Qt::Key_Enter: |
1163 | { | 1163 | { |
1164 | QListViewItem* cn; | 1164 | QListViewItem* cn; |
1165 | cn = currentItem(); | 1165 | cn = currentItem(); |
1166 | if ( cn ) { | 1166 | if ( cn ) { |
1167 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1167 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1168 | if ( ci ){ | 1168 | if ( ci ){ |
1169 | if ( e->state() == ShiftButton ) | 1169 | if ( e->state() == ShiftButton ) |
1170 | ci->setSelected( false ); | 1170 | ci->setSelected( false ); |
1171 | else | 1171 | else |
1172 | ci->setSelected( true ); | 1172 | ci->setSelected( true ); |
1173 | cn = cn->nextSibling(); | 1173 | cn = cn->nextSibling(); |
1174 | if ( cn ) { | 1174 | if ( cn ) { |
1175 | setCurrentItem ( cn ); | 1175 | setCurrentItem ( cn ); |
1176 | ensureItemVisible ( cn ); | 1176 | ensureItemVisible ( cn ); |
1177 | } | 1177 | } |
1178 | } | 1178 | } |
1179 | } | 1179 | } |
1180 | e->accept(); | 1180 | e->accept(); |
1181 | } | 1181 | } |
1182 | break; | 1182 | break; |
1183 | default: | 1183 | default: |
1184 | e->ignore(); | 1184 | e->ignore(); |
1185 | } | 1185 | } |
1186 | } | 1186 | } |
1187 | KOListViewListView::KOListViewListView(KOListView * lv ) | 1187 | KOListViewListView::KOListViewListView(KOListView * lv ) |
1188 | : KListView( lv, "kolistlistview", false ) | 1188 | : KListView( lv, "kolistlistview", false ) |
1189 | { | 1189 | { |
1190 | mYMousePos = 0; | 1190 | mYMousePos = 0; |
1191 | mPopupTimer = new QTimer(this); | 1191 | mPopupTimer = new QTimer(this); |
1192 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); | 1192 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); |
1193 | #ifndef DESKTOP_VERSION | 1193 | #ifndef DESKTOP_VERSION |
1194 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 1194 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
1195 | #endif | 1195 | #endif |
1196 | setSelectionMode( QListView::Multi ); | 1196 | setSelectionMode( QListView::Multi ); |
1197 | setMultiSelection( true); | 1197 | setMultiSelection( true); |
1198 | } | 1198 | } |
1199 | bool KOListViewListView::hasMultiSelection(QListViewItem* item) | 1199 | bool KOListViewListView::hasMultiSelection(QListViewItem* item) |
1200 | { | 1200 | { |
1201 | int selCount = 0; | 1201 | int selCount = 0; |
1202 | QListViewItem *qitem = firstChild (); | 1202 | QListViewItem *qitem = firstChild (); |
1203 | while ( qitem ) { | 1203 | while ( qitem ) { |
1204 | if ( qitem->isSelected() && item != qitem ) | 1204 | if ( qitem->isSelected() && item != qitem ) |
1205 | return true; | 1205 | return true; |
1206 | qitem = qitem->nextSibling(); | 1206 | qitem = qitem->nextSibling(); |
1207 | } | 1207 | } |
1208 | return false; | 1208 | return false; |
1209 | } | 1209 | } |
1210 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 1210 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
1211 | { | 1211 | { |
1212 | if (!e) return; | 1212 | if (!e) return; |
1213 | QPoint vp = contentsToViewport(e->pos()); | 1213 | QPoint vp = contentsToViewport(e->pos()); |
1214 | QListViewItem *item = itemAt(vp); | 1214 | QListViewItem *item = itemAt(vp); |
1215 | if (!item) { | 1215 | if (!item) { |
1216 | emit newEvent(); | 1216 | emit newEvent(); |
1217 | return; | 1217 | return; |
1218 | } | 1218 | } |
1219 | KListView::contentsMouseDoubleClickEvent(e); | 1219 | KListView::contentsMouseDoubleClickEvent(e); |
1220 | } | 1220 | } |
1221 | #if 0 | 1221 | #if 0 |
1222 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1222 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1223 | { | 1223 | { |
1224 | //qDebug("contentsMousePressEvent++++ "); | 1224 | //qDebug("contentsMousePressEvent++++ "); |
1225 | KListView::contentsMousePressEvent( e ); | 1225 | KListView::contentsMousePressEvent( e ); |
1226 | if ( e->button() == RightButton ) { | 1226 | if ( e->button() == RightButton ) { |
1227 | QListViewItem* ci = currentItem(); | 1227 | QListViewItem* ci = currentItem(); |
1228 | clearSelection () ; | 1228 | clearSelection () ; |
1229 | if ( ci ) | 1229 | if ( ci ) |
1230 | ci->setSelected( true ); | 1230 | ci->setSelected( true ); |
1231 | } | 1231 | } |
1232 | } | 1232 | } |
1233 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | 1233 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) |
1234 | { | 1234 | { |
1235 | KListView::contentsMouseReleaseEvent(e); | 1235 | KListView::contentsMouseReleaseEvent(e); |
1236 | } | 1236 | } |
1237 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | 1237 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) |
1238 | { | 1238 | { |
1239 | KListView::contentsMouseMoveEvent(e); | 1239 | KListView::contentsMouseMoveEvent(e); |
1240 | } | 1240 | } |
1241 | #endif | 1241 | #endif |
1242 | void KOListViewListView::popupMenu() | 1242 | void KOListViewListView::popupMenu() |
1243 | { | 1243 | { |
1244 | mPopupTimer->stop(); | 1244 | mPopupTimer->stop(); |
1245 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); | 1245 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); |
1246 | QApplication::postEvent( this->viewport(), e ); | 1246 | QApplication::postEvent( this->viewport(), e ); |
1247 | 1247 | ||
1248 | } | 1248 | } |
1249 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1249 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1250 | { | 1250 | { |
1251 | //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); | 1251 | //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); |
1252 | mYMousePos = mapToGlobal( (e->pos())).y(); | 1252 | mYMousePos = mapToGlobal( (e->pos())).y(); |
1253 | if ( e->button() == LeftButton ) { | 1253 | if ( e->button() == LeftButton ) { |
1254 | mPopupTimer->start( 600 ); | 1254 | mPopupTimer->start( 600 ); |
1255 | mEventPos = contentsToViewport(e->pos()); | 1255 | mEventPos = contentsToViewport(e->pos()); |
1256 | mEventGlobalPos = e->globalPos(); | 1256 | mEventGlobalPos = e->globalPos(); |
1257 | } | 1257 | } |
1258 | KListView::contentsMousePressEvent( e ); | 1258 | KListView::contentsMousePressEvent( e ); |
1259 | if ( e->button() == RightButton ) { | 1259 | if ( e->button() == RightButton ) { |
1260 | QListViewItem* ci = currentItem(); | 1260 | QListViewItem* ci = currentItem(); |
1261 | //clearSelection(); | 1261 | //clearSelection(); |
1262 | if ( ci ) | 1262 | if ( ci ) |
1263 | ci->setSelected( true ); | 1263 | ci->setSelected( true ); |
1264 | } | 1264 | } |
1265 | } | 1265 | } |
1266 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | 1266 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) |
1267 | { | 1267 | { |
1268 | mPopupTimer->stop(); | 1268 | mPopupTimer->stop(); |
1269 | KListView::contentsMouseReleaseEvent(e); | 1269 | KListView::contentsMouseReleaseEvent(e); |
1270 | } | 1270 | } |
1271 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | 1271 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) |
1272 | { | 1272 | { |
1273 | // qDebug("contentsMouseMoveEv....... "); | 1273 | // qDebug("contentsMouseMoveEv....... "); |
1274 | // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() ); | 1274 | // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() ); |
1275 | int diff = mYMousePos - mapToGlobal( (e->pos())).y(); | 1275 | int diff = mYMousePos - mapToGlobal( (e->pos())).y(); |
1276 | if ( diff < 0 ) diff = -diff; | 1276 | if ( diff < 0 ) diff = -diff; |
1277 | if ( diff > 15 ) | 1277 | if ( diff > 15 ) |
1278 | mPopupTimer->stop(); | 1278 | mPopupTimer->stop(); |
1279 | else { | 1279 | else { |
1280 | mEventPos = contentsToViewport(e->pos()); | 1280 | mEventPos = contentsToViewport(e->pos()); |
1281 | mEventGlobalPos = e->globalPos(); | 1281 | mEventGlobalPos = e->globalPos(); |
1282 | } | 1282 | } |
1283 | KListView::contentsMouseMoveEvent(e); | 1283 | KListView::contentsMouseMoveEvent(e); |
1284 | } | 1284 | } |
1285 | 1285 | ||
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 34044ab..8f951ee 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -1,510 +1,511 @@ | |||
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 <time.h> | 24 | #include <time.h> |
25 | #ifndef _WIN32_ | 25 | #ifndef _WIN32_ |
26 | #include <unistd.h> | 26 | #include <unistd.h> |
27 | #endif | 27 | #endif |
28 | #include <qdir.h> | 28 | #include <qdir.h> |
29 | #include <qtextstream.h> | 29 | #include <qtextstream.h> |
30 | #include <qtextcodec.h> | 30 | #include <qtextcodec.h> |
31 | #include <qstring.h> | 31 | #include <qstring.h> |
32 | #include <qregexp.h> | 32 | #include <qregexp.h> |
33 | #include <qfont.h> | 33 | #include <qfont.h> |
34 | #include <qcolor.h> | 34 | #include <qcolor.h> |
35 | #include <qstringlist.h> | 35 | #include <qstringlist.h> |
36 | #include <stdlib.h> | 36 | #include <stdlib.h> |
37 | 37 | ||
38 | #include <kglobal.h> | 38 | #include <kglobal.h> |
39 | #include <kglobalsettings.h> | 39 | #include <kglobalsettings.h> |
40 | #include <kconfig.h> | 40 | #include <kconfig.h> |
41 | #include <klocale.h> | 41 | #include <klocale.h> |
42 | #include <kdebug.h> | 42 | #include <kdebug.h> |
43 | #include <kemailsettings.h> | 43 | #include <kemailsettings.h> |
44 | #include <kstaticdeleter.h> | 44 | #include <kstaticdeleter.h> |
45 | #include <libkdepim/kpimglobalprefs.h> | 45 | #include <libkdepim/kpimglobalprefs.h> |
46 | 46 | ||
47 | #include "koprefs.h" | 47 | #include "koprefs.h" |
48 | #include "mainwindow.h" | 48 | #include "mainwindow.h" |
49 | 49 | ||
50 | KOPrefs *KOPrefs::mInstance = 0; | 50 | KOPrefs *KOPrefs::mInstance = 0; |
51 | static KStaticDeleter<KOPrefs> insd; | 51 | static KStaticDeleter<KOPrefs> insd; |
52 | 52 | ||
53 | KOPrefs::KOPrefs() : | 53 | KOPrefs::KOPrefs() : |
54 | KPimPrefs("korganizerrc") | 54 | KPimPrefs("korganizerrc") |
55 | { | 55 | { |
56 | mCategoryColors.setAutoDelete(true); | 56 | mCategoryColors.setAutoDelete(true); |
57 | fillMailDefaults(); | 57 | fillMailDefaults(); |
58 | mDefaultCategoryColor = QColor(175,210,255);//196,196,196); | 58 | mDefaultCategoryColor = QColor(175,210,255);//196,196,196); |
59 | QColor defaultHolidayColor = QColor(255,0,0); | 59 | QColor defaultHolidayColor = QColor(255,0,0); |
60 | QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); | 60 | QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); |
61 | QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); | 61 | QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); |
62 | QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); | 62 | QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); |
63 | QColor defaultTodoDueTodayColor = QColor(255,220,100); | 63 | QColor defaultTodoDueTodayColor = QColor(255,220,100); |
64 | QColor defaultTodoOverdueColor = QColor(255,153,125); | 64 | QColor defaultTodoOverdueColor = QColor(255,153,125); |
65 | QColor defaultTodoRunColor = QColor(99,194,30); | 65 | QColor defaultTodoRunColor = QColor(99,194,30); |
66 | KPrefs::setCurrentGroup("General"); | 66 | KPrefs::setCurrentGroup("General"); |
67 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 67 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
68 | addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); | 68 | addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); |
69 | addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); | 69 | addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); |
70 | addItemBool("ShowIconSearch",&mShowIconSearch,true); | 70 | addItemBool("ShowIconSearch",&mShowIconSearch,true); |
71 | addItemBool("ShowIconList",&mShowIconList,true); | 71 | addItemBool("ShowIconList",&mShowIconList,true); |
72 | addItemBool("ShowIconDay1",&mShowIconDay1,true); | 72 | addItemBool("ShowIconDay1",&mShowIconDay1,true); |
73 | addItemBool("ShowIconDay5",&mShowIconDay5,true); | 73 | addItemBool("ShowIconDay5",&mShowIconDay5,true); |
74 | addItemBool("ShowIconDay6",&mShowIconDay6,true); | 74 | addItemBool("ShowIconDay6",&mShowIconDay6,true); |
75 | addItemBool("ShowIconDay7",&mShowIconDay7,true); | 75 | addItemBool("ShowIconDay7",&mShowIconDay7,true); |
76 | addItemBool("ShowIconMonth",&mShowIconMonth,true); | 76 | addItemBool("ShowIconMonth",&mShowIconMonth,true); |
77 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); | 77 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); |
78 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); | 78 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); |
79 | addItemBool("ShowIconBack",&mShowIconBack,true); | 79 | addItemBool("ShowIconBack",&mShowIconBack,true); |
80 | addItemBool("ShowIconToday",&mShowIconToday,true); | 80 | addItemBool("ShowIconToday",&mShowIconToday,true); |
81 | addItemBool("ShowIconForward",&mShowIconForward,true); | 81 | addItemBool("ShowIconForward",&mShowIconForward,true); |
82 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); | 82 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); |
83 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); | 83 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); |
84 | addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); | 84 | addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); |
85 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); | 85 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); |
86 | addItemBool("ShowIconNext",&mShowIconNext,true); | 86 | addItemBool("ShowIconNext",&mShowIconNext,true); |
87 | addItemBool("ShowIconJournal",&mShowIconJournal,true); | 87 | addItemBool("ShowIconJournal",&mShowIconJournal,true); |
88 | addItemBool("ShowIconStretch",&mShowIconStretch,true); | 88 | addItemBool("ShowIconStretch",&mShowIconStretch,true); |
89 | addItemBool("ShowIconFilter",&mShowIconFilter,false); | 89 | addItemBool("ShowIconFilter",&mShowIconFilter,false); |
90 | addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); | 90 | addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); |
91 | 91 | ||
92 | bool addIcons = false; | 92 | bool addIcons = false; |
93 | #ifdef DESKTOP_VERSION | 93 | #ifdef DESKTOP_VERSION |
94 | addIcons = true; | 94 | addIcons = true; |
95 | #endif | 95 | #endif |
96 | addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); | 96 | addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); |
97 | addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); | 97 | addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); |
98 | addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); | 98 | addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); |
99 | addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); | 99 | addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); |
100 | 100 | ||
101 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); | 101 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); |
102 | 102 | ||
103 | addItemBool("AskForQuit",&mAskForQuit,false); | 103 | addItemBool("AskForQuit",&mAskForQuit,false); |
104 | 104 | ||
105 | #ifndef DESKTOP_VERSION | 105 | #ifndef DESKTOP_VERSION |
106 | addItemBool("ShowFullMenu",&mShowFullMenu,false); | 106 | addItemBool("ShowFullMenu",&mShowFullMenu,false); |
107 | #else | 107 | #else |
108 | addItemBool("ShowFullMenu",&mShowFullMenu,true); | 108 | addItemBool("ShowFullMenu",&mShowFullMenu,true); |
109 | #endif | 109 | #endif |
110 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 110 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
111 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 111 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
112 | addItemBool("ToolBarHorV",&mToolBarHorV, true ); | 112 | addItemBool("ToolBarHorV",&mToolBarHorV, true ); |
113 | addItemBool("ToolBarUpV",&mToolBarUpV, false ); | 113 | addItemBool("ToolBarUpV",&mToolBarUpV, false ); |
114 | addItemBool("ToolBarHorN",&mToolBarHorN, true ); | 114 | addItemBool("ToolBarHorN",&mToolBarHorN, true ); |
115 | addItemBool("ToolBarUpN",&mToolBarUpN, false ); | 115 | addItemBool("ToolBarUpN",&mToolBarUpN, false ); |
116 | addItemBool("ToolBarHorF",&mToolBarHorF, true ); | 116 | addItemBool("ToolBarHorF",&mToolBarHorF, true ); |
117 | addItemBool("ToolBarUpF",&mToolBarUpF, false ); | 117 | addItemBool("ToolBarUpF",&mToolBarUpF, false ); |
118 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); | 118 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); |
119 | addItemInt("Whats Next Days",&mWhatsNextDays,3); | 119 | addItemInt("Whats Next Days",&mWhatsNextDays,3); |
120 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); | 120 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); |
121 | 121 | ||
122 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); | 122 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); |
123 | addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true); | ||
123 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); | 124 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); |
124 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); | 125 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); |
125 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); | 126 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); |
126 | addItemInt("AllDay Size",&mAllDaySize,28); | 127 | addItemInt("AllDay Size",&mAllDaySize,28); |
127 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; | 128 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; |
128 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); | 129 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); |
129 | 130 | ||
130 | addItemStringList("LocationDefaults",&mLocationDefaults ); | 131 | addItemStringList("LocationDefaults",&mLocationDefaults ); |
131 | addItemStringList("EventSummary User",&mEventSummaryUser); | 132 | addItemStringList("EventSummary User",&mEventSummaryUser); |
132 | addItemStringList("TodoSummary User",&mTodoSummaryUser); | 133 | addItemStringList("TodoSummary User",&mTodoSummaryUser); |
133 | 134 | ||
134 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 135 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
135 | addItemBool("Enable Project View",&mEnableProjectView,false); | 136 | addItemBool("Enable Project View",&mEnableProjectView,false); |
136 | addItemBool("Auto Save",&mAutoSave,false); | 137 | addItemBool("Auto Save",&mAutoSave,false); |
137 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); | 138 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); |
138 | addItemBool("Confirm Deletes",&mConfirm,true); | 139 | addItemBool("Confirm Deletes",&mConfirm,true); |
139 | addItemString("Archive File",&mArchiveFile); | 140 | addItemString("Archive File",&mArchiveFile); |
140 | addItemString("Html Export File",&mHtmlExportFile, | 141 | addItemString("Html Export File",&mHtmlExportFile, |
141 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); | 142 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); |
142 | addItemBool("Html With Save",&mHtmlWithSave,false); | 143 | addItemBool("Html With Save",&mHtmlWithSave,false); |
143 | 144 | ||
144 | KPrefs::setCurrentGroup("Personal Settings"); | 145 | KPrefs::setCurrentGroup("Personal Settings"); |
145 | 146 | ||
146 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 147 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
147 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 148 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
148 | addItemBool("Bcc",&mBcc,false); | 149 | addItemBool("Bcc",&mBcc,false); |
149 | 150 | ||
150 | KPrefs::setCurrentGroup("Time & Date"); | 151 | KPrefs::setCurrentGroup("Time & Date"); |
151 | 152 | ||
152 | 153 | ||
153 | addItemInt("Default Start Time",&mStartTime,10); | 154 | addItemInt("Default Start Time",&mStartTime,10); |
154 | addItemInt("Default Duration",&mDefaultDuration,2); | 155 | addItemInt("Default Duration",&mDefaultDuration,2); |
155 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 156 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
156 | KPrefs::setCurrentGroup("AlarmSettings"); | 157 | KPrefs::setCurrentGroup("AlarmSettings"); |
157 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 158 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
158 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 159 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
159 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 160 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
160 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 161 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
161 | 162 | ||
162 | 163 | ||
163 | KPrefs::setCurrentGroup("Calendar"); | 164 | KPrefs::setCurrentGroup("Calendar"); |
164 | 165 | ||
165 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); | 166 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); |
166 | 167 | ||
167 | KPrefs::setCurrentGroup("Fonts"); | 168 | KPrefs::setCurrentGroup("Fonts"); |
168 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 169 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
169 | QFont fon = KGlobalSettings::generalFont(); | 170 | QFont fon = KGlobalSettings::generalFont(); |
170 | addItemFont("TimeBar Font",&mTimeBarFont,fon ); | 171 | addItemFont("TimeBar Font",&mTimeBarFont,fon ); |
171 | addItemFont("MonthView Font",&mMonthViewFont,fon); | 172 | addItemFont("MonthView Font",&mMonthViewFont,fon); |
172 | addItemFont("AgendaView Font",&mAgendaViewFont,fon); | 173 | addItemFont("AgendaView Font",&mAgendaViewFont,fon); |
173 | addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); | 174 | addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); |
174 | addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); | 175 | addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); |
175 | addItemFont("TodoView Font",&mTodoViewFont,fon); | 176 | addItemFont("TodoView Font",&mTodoViewFont,fon); |
176 | addItemFont("ListView Font",&mListViewFont,fon); | 177 | addItemFont("ListView Font",&mListViewFont,fon); |
177 | addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); | 178 | addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); |
178 | addItemFont("EditBox Font",&mEditBoxFont,fon); | 179 | addItemFont("EditBox Font",&mEditBoxFont,fon); |
179 | addItemFont("JournalView Font",&mJornalViewFont,fon); | 180 | addItemFont("JournalView Font",&mJornalViewFont,fon); |
180 | addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); | 181 | addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); |
181 | addItemFont("EventView Font",&mEventViewFont,fon); | 182 | addItemFont("EventView Font",&mEventViewFont,fon); |
182 | 183 | ||
183 | KPrefs::setCurrentGroup("RemoteSyncing"); | 184 | KPrefs::setCurrentGroup("RemoteSyncing"); |
184 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); | 185 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); |
185 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); | 186 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); |
186 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 187 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
187 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 188 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
188 | 189 | ||
189 | #ifdef _WIN32_ | 190 | #ifdef _WIN32_ |
190 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 191 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
191 | #else | 192 | #else |
192 | QString hdp= locateLocal("data","korganizer")+"/"; | 193 | QString hdp= locateLocal("data","korganizer")+"/"; |
193 | #endif | 194 | #endif |
194 | 195 | ||
195 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 196 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
196 | 197 | ||
197 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 198 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
198 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 199 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
199 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 200 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
200 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 201 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
201 | 202 | ||
202 | 203 | ||
203 | KPrefs::setCurrentGroup("Locale"); | 204 | KPrefs::setCurrentGroup("Locale"); |
204 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 205 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
205 | 206 | ||
206 | 207 | ||
207 | KPrefs::setCurrentGroup("Colors"); | 208 | KPrefs::setCurrentGroup("Colors"); |
208 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 209 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
209 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); | 210 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); |
210 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); | 211 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); |
211 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); | 212 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); |
212 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); | 213 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); |
213 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); | 214 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); |
214 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 215 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
215 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 216 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
216 | addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); | 217 | addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); |
217 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); | 218 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); |
218 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); | 219 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); |
219 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); | 220 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); |
220 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); | 221 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); |
221 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); | 222 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); |
222 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); | 223 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); |
223 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); | 224 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); |
224 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); | 225 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); |
225 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); | 226 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); |
226 | addItemBool("UseAppColors",&mUseAppColors,false); | 227 | addItemBool("UseAppColors",&mUseAppColors,false); |
227 | 228 | ||
228 | 229 | ||
229 | 230 | ||
230 | KPrefs::setCurrentGroup("Views"); | 231 | KPrefs::setCurrentGroup("Views"); |
231 | addItemBool("Block Popup Menu",&mBlockPopupMenu,true); | 232 | addItemBool("Block Popup Menu",&mBlockPopupMenu,true); |
232 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); | 233 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); |
233 | addItemInt("Hour Size",&mHourSize,8); | 234 | addItemInt("Hour Size",&mHourSize,8); |
234 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); | 235 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); |
235 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); | 236 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); |
236 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); | 237 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); |
237 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); | 238 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); |
238 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); | 239 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); |
239 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); | 240 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); |
240 | addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true); | 241 | addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true); |
241 | #ifdef DESKTOP_VERION | 242 | #ifdef DESKTOP_VERION |
242 | addItemBool("Enable ToolTips",&mEnableToolTips,true); | 243 | addItemBool("Enable ToolTips",&mEnableToolTips,true); |
243 | #else | 244 | #else |
244 | addItemBool("Enable ToolTips",&mEnableToolTips,false); | 245 | addItemBool("Enable ToolTips",&mEnableToolTips,false); |
245 | #endif | 246 | #endif |
246 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); | 247 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); |
247 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); | 248 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); |
248 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); | 249 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); |
249 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); | 250 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); |
250 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); | 251 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); |
251 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); | 252 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); |
252 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); | 253 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); |
253 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); | 254 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); |
254 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 255 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
255 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; | 256 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; |
256 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); | 257 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); |
257 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 258 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
258 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 259 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
259 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 260 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
260 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 261 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
261 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 262 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
262 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); | 263 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); |
263 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); | 264 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); |
264 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 265 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
265 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 266 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
266 | #ifdef DESKTOP_VERSION | 267 | #ifdef DESKTOP_VERSION |
267 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 268 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
268 | #else | 269 | #else |
269 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); | 270 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); |
270 | #endif | 271 | #endif |
271 | addItemInt("Day Begins",&mDayBegins,7); | 272 | addItemInt("Day Begins",&mDayBegins,7); |
272 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); | 273 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); |
273 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); | 274 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); |
274 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); | 275 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); |
275 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); | 276 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); |
276 | 277 | ||
277 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); | 278 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); |
278 | addItemBool("Full View Month",&mFullViewMonth,true); | 279 | addItemBool("Full View Month",&mFullViewMonth,true); |
279 | addItemBool("Full View Todo",&mFullViewTodo,true); | 280 | addItemBool("Full View Todo",&mFullViewTodo,true); |
280 | addItemBool("Quick Todo",&mEnableQuickTodo,false); | 281 | addItemBool("Quick Todo",&mEnableQuickTodo,false); |
281 | 282 | ||
282 | addItemInt("Next X Days",&mNextXDays,3); | 283 | addItemInt("Next X Days",&mNextXDays,3); |
283 | 284 | ||
284 | KPrefs::setCurrentGroup("Printer"); | 285 | KPrefs::setCurrentGroup("Printer"); |
285 | 286 | ||
286 | KPrefs::setCurrentGroup("Layout"); | 287 | KPrefs::setCurrentGroup("Layout"); |
287 | 288 | ||
288 | addItemBool("CompactDialogs",&mCompactDialogs,false); | 289 | addItemBool("CompactDialogs",&mCompactDialogs,false); |
289 | addItemBool("VerticalScreen",&mVerticalScreen,true); | 290 | addItemBool("VerticalScreen",&mVerticalScreen,true); |
290 | 291 | ||
291 | KPrefs::setCurrentGroup("KOrganizer Plugins"); | 292 | KPrefs::setCurrentGroup("KOrganizer Plugins"); |
292 | 293 | ||
293 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); | 294 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); |
294 | 295 | ||
295 | KPrefs::setCurrentGroup("Group Scheduling"); | 296 | KPrefs::setCurrentGroup("Group Scheduling"); |
296 | 297 | ||
297 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); | 298 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); |
298 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); | 299 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); |
299 | addItemStringList("AdditionalMails",&mAdditionalMails,""); | 300 | addItemStringList("AdditionalMails",&mAdditionalMails,""); |
300 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); | 301 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); |
301 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); | 302 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); |
302 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); | 303 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); |
303 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); | 304 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); |
304 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); | 305 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); |
305 | 306 | ||
306 | KPrefs::setCurrentGroup( "Editors" ); | 307 | KPrefs::setCurrentGroup( "Editors" ); |
307 | 308 | ||
308 | addItemStringList( "EventTemplates", &mEventTemplates ); | 309 | addItemStringList( "EventTemplates", &mEventTemplates ); |
309 | addItemStringList( "TodoTemplates", &mTodoTemplates ); | 310 | addItemStringList( "TodoTemplates", &mTodoTemplates ); |
310 | 311 | ||
311 | addItemInt("DestinationPolicy",&mDestination,standardDestination); | 312 | addItemInt("DestinationPolicy",&mDestination,standardDestination); |
312 | 313 | ||
313 | KPrefs::setCurrentGroup( "ViewOptions" ); | 314 | KPrefs::setCurrentGroup( "ViewOptions" ); |
314 | addItemBool("EVshowDetails",&mEVshowDetails,true); | 315 | addItemBool("EVshowDetails",&mEVshowDetails,true); |
315 | addItemBool("EVshowCreated",&mEVshowCreated,true); | 316 | addItemBool("EVshowCreated",&mEVshowCreated,true); |
316 | addItemBool("EVshowChanged",&mEVshowChanged,true); | 317 | addItemBool("EVshowChanged",&mEVshowChanged,true); |
317 | addItemBool("WTshowDetails",&mWTshowDetails,false); | 318 | addItemBool("WTshowDetails",&mWTshowDetails,false); |
318 | addItemBool("WTshowCreated",&mWTshowCreated,false); | 319 | addItemBool("WTshowCreated",&mWTshowCreated,false); |
319 | addItemBool("WTshowChanged",&mWTshowChanged,false); | 320 | addItemBool("WTshowChanged",&mWTshowChanged,false); |
320 | 321 | ||
321 | } | 322 | } |
322 | 323 | ||
323 | 324 | ||
324 | KOPrefs::~KOPrefs() | 325 | KOPrefs::~KOPrefs() |
325 | { | 326 | { |
326 | if (mInstance == this) | 327 | if (mInstance == this) |
327 | mInstance = insd.setObject(0); | 328 | mInstance = insd.setObject(0); |
328 | 329 | ||
329 | //qDebug("KOPrefs::~KOPrefs() "); | 330 | //qDebug("KOPrefs::~KOPrefs() "); |
330 | } | 331 | } |
331 | 332 | ||
332 | 333 | ||
333 | KOPrefs *KOPrefs::instance() | 334 | KOPrefs *KOPrefs::instance() |
334 | { | 335 | { |
335 | if (!mInstance) { | 336 | if (!mInstance) { |
336 | mInstance = insd.setObject(new KOPrefs()); | 337 | mInstance = insd.setObject(new KOPrefs()); |
337 | mInstance->readConfig(); | 338 | mInstance->readConfig(); |
338 | } | 339 | } |
339 | 340 | ||
340 | return mInstance; | 341 | return mInstance; |
341 | } | 342 | } |
342 | 343 | ||
343 | void KOPrefs::usrSetDefaults() | 344 | void KOPrefs::usrSetDefaults() |
344 | { | 345 | { |
345 | 346 | ||
346 | } | 347 | } |
347 | 348 | ||
348 | void KOPrefs::fillMailDefaults() | 349 | void KOPrefs::fillMailDefaults() |
349 | { | 350 | { |
350 | if (mName.isEmpty()) mName = i18n("Anonymous"); | 351 | if (mName.isEmpty()) mName = i18n("Anonymous"); |
351 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); | 352 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); |
352 | } | 353 | } |
353 | 354 | ||
354 | void KOPrefs::setTimeZoneIdDefault() | 355 | void KOPrefs::setTimeZoneIdDefault() |
355 | { | 356 | { |
356 | ; | 357 | ; |
357 | } | 358 | } |
358 | 359 | ||
359 | void KOPrefs::setAllDefaults() | 360 | void KOPrefs::setAllDefaults() |
360 | { | 361 | { |
361 | setCategoryDefaults(); | 362 | setCategoryDefaults(); |
362 | mEventSummaryUser = getDefaultList() ; | 363 | mEventSummaryUser = getDefaultList() ; |
363 | mTodoSummaryUser = getDefaultList() ; | 364 | mTodoSummaryUser = getDefaultList() ; |
364 | mLocationDefaults = getLocationDefaultList(); | 365 | mLocationDefaults = getLocationDefaultList(); |
365 | } | 366 | } |
366 | 367 | ||
367 | void KOPrefs::setCategoryDefaults() | 368 | void KOPrefs::setCategoryDefaults() |
368 | { | 369 | { |
369 | mCustomCategories.clear(); | 370 | mCustomCategories.clear(); |
370 | mCustomCategories = getDefaultList(); | 371 | mCustomCategories = getDefaultList(); |
371 | 372 | ||
372 | QStringList::Iterator it; | 373 | QStringList::Iterator it; |
373 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 374 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
374 | setCategoryColor(*it,mDefaultCategoryColor); | 375 | setCategoryColor(*it,mDefaultCategoryColor); |
375 | } | 376 | } |
376 | } | 377 | } |
377 | QStringList KOPrefs::getLocationDefaultList() | 378 | QStringList KOPrefs::getLocationDefaultList() |
378 | { | 379 | { |
379 | QStringList retval ; | 380 | QStringList retval ; |
380 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") | 381 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") |
381 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") | 382 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") |
382 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") | 383 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") |
383 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; | 384 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; |
384 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 385 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
385 | 386 | ||
386 | retval.sort(); | 387 | retval.sort(); |
387 | return retval; | 388 | return retval; |
388 | } | 389 | } |
389 | QStringList KOPrefs::getDefaultList() | 390 | QStringList KOPrefs::getDefaultList() |
390 | { | 391 | { |
391 | QStringList retval ; | 392 | QStringList retval ; |
392 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") | 393 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") |
393 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") | 394 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") |
394 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") | 395 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") |
395 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") | 396 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") |
396 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") | 397 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") |
397 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") | 398 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") |
398 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") | 399 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") |
399 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; | 400 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; |
400 | retval.sort(); | 401 | retval.sort(); |
401 | //qDebug("cat %s ", retval.join("-").latin1()); | 402 | //qDebug("cat %s ", retval.join("-").latin1()); |
402 | return retval; | 403 | return retval; |
403 | } | 404 | } |
404 | 405 | ||
405 | void KOPrefs::usrReadConfig() | 406 | void KOPrefs::usrReadConfig() |
406 | { | 407 | { |
407 | config()->setGroup("General"); | 408 | config()->setGroup("General"); |
408 | 409 | ||
409 | //qDebug("KOPrefs::usrReadConfig() "); | 410 | //qDebug("KOPrefs::usrReadConfig() "); |
410 | mCustomCategories = config()->readListEntry("Custom Categories"); | 411 | mCustomCategories = config()->readListEntry("Custom Categories"); |
411 | mOldLoadedLanguage = mOldLanguage ; | 412 | mOldLoadedLanguage = mOldLanguage ; |
412 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; | 413 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; |
413 | if (mLocationDefaults.isEmpty()) { | 414 | if (mLocationDefaults.isEmpty()) { |
414 | mLocationDefaults = getLocationDefaultList(); | 415 | mLocationDefaults = getLocationDefaultList(); |
415 | } | 416 | } |
416 | 417 | ||
417 | if (mEventSummaryUser.isEmpty()) { | 418 | if (mEventSummaryUser.isEmpty()) { |
418 | mEventSummaryUser = getDefaultList() ; | 419 | mEventSummaryUser = getDefaultList() ; |
419 | } | 420 | } |
420 | if (mTodoSummaryUser.isEmpty()) { | 421 | if (mTodoSummaryUser.isEmpty()) { |
421 | mTodoSummaryUser = getDefaultList() ; | 422 | mTodoSummaryUser = getDefaultList() ; |
422 | } | 423 | } |
423 | 424 | ||
424 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 425 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
425 | 426 | ||
426 | config()->setGroup("Personal Settings"); | 427 | config()->setGroup("Personal Settings"); |
427 | mName = config()->readEntry("user_name",""); | 428 | mName = config()->readEntry("user_name",""); |
428 | mEmail = config()->readEntry("user_email",""); | 429 | mEmail = config()->readEntry("user_email",""); |
429 | fillMailDefaults(); | 430 | fillMailDefaults(); |
430 | 431 | ||
431 | config()->setGroup("Category Colors"); | 432 | config()->setGroup("Category Colors"); |
432 | QStringList::Iterator it; | 433 | QStringList::Iterator it; |
433 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 434 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
434 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 435 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
435 | 436 | ||
436 | } | 437 | } |
437 | 438 | ||
438 | KPimPrefs::usrReadConfig(); | 439 | KPimPrefs::usrReadConfig(); |
439 | } | 440 | } |
440 | 441 | ||
441 | 442 | ||
442 | void KOPrefs::usrWriteConfig() | 443 | void KOPrefs::usrWriteConfig() |
443 | { | 444 | { |
444 | config()->setGroup("General"); | 445 | config()->setGroup("General"); |
445 | config()->writeEntry("Custom Categories",mCustomCategories); | 446 | config()->writeEntry("Custom Categories",mCustomCategories); |
446 | 447 | ||
447 | config()->setGroup("Personal Settings"); | 448 | config()->setGroup("Personal Settings"); |
448 | config()->writeEntry("user_name",mName); | 449 | config()->writeEntry("user_name",mName); |
449 | config()->writeEntry("user_email",mEmail); | 450 | config()->writeEntry("user_email",mEmail); |
450 | 451 | ||
451 | config()->setGroup("Category Colors"); | 452 | config()->setGroup("Category Colors"); |
452 | QDictIterator<QColor> it(mCategoryColors); | 453 | QDictIterator<QColor> it(mCategoryColors); |
453 | while (it.current()) { | 454 | while (it.current()) { |
454 | config()->writeEntry(it.currentKey(),*(it.current())); | 455 | config()->writeEntry(it.currentKey(),*(it.current())); |
455 | ++it; | 456 | ++it; |
456 | } | 457 | } |
457 | 458 | ||
458 | 459 | ||
459 | KPimPrefs::usrWriteConfig(); | 460 | KPimPrefs::usrWriteConfig(); |
460 | } | 461 | } |
461 | 462 | ||
462 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) | 463 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) |
463 | { | 464 | { |
464 | mCategoryColors.replace(cat,new QColor(color)); | 465 | mCategoryColors.replace(cat,new QColor(color)); |
465 | } | 466 | } |
466 | 467 | ||
467 | QColor *KOPrefs::categoryColor(QString cat) | 468 | QColor *KOPrefs::categoryColor(QString cat) |
468 | { | 469 | { |
469 | QColor *color = 0; | 470 | QColor *color = 0; |
470 | 471 | ||
471 | if (!cat.isEmpty()) color = mCategoryColors[cat]; | 472 | if (!cat.isEmpty()) color = mCategoryColors[cat]; |
472 | 473 | ||
473 | if (color) return color; | 474 | if (color) return color; |
474 | else return &mDefaultCategoryColor; | 475 | else return &mDefaultCategoryColor; |
475 | } | 476 | } |
476 | 477 | ||
477 | void KOPrefs::setFullName(const QString &name) | 478 | void KOPrefs::setFullName(const QString &name) |
478 | { | 479 | { |
479 | mName = name; | 480 | mName = name; |
480 | } | 481 | } |
481 | 482 | ||
482 | void KOPrefs::setEmail(const QString &email) | 483 | void KOPrefs::setEmail(const QString &email) |
483 | { | 484 | { |
484 | //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); | 485 | //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); |
485 | mEmail = email; | 486 | mEmail = email; |
486 | } | 487 | } |
487 | 488 | ||
488 | QString KOPrefs::fullName() | 489 | QString KOPrefs::fullName() |
489 | { | 490 | { |
490 | if (mEmailControlCenter) { | 491 | if (mEmailControlCenter) { |
491 | KEMailSettings settings; | 492 | KEMailSettings settings; |
492 | return settings.getSetting(KEMailSettings::RealName); | 493 | return settings.getSetting(KEMailSettings::RealName); |
493 | } else { | 494 | } else { |
494 | return mName; | 495 | return mName; |
495 | } | 496 | } |
496 | } | 497 | } |
497 | 498 | ||
498 | QString KOPrefs::email() | 499 | QString KOPrefs::email() |
499 | { | 500 | { |
500 | if (mEmailControlCenter) { | 501 | if (mEmailControlCenter) { |
501 | KEMailSettings settings; | 502 | KEMailSettings settings; |
502 | return settings.getSetting(KEMailSettings::EmailAddress); | 503 | return settings.getSetting(KEMailSettings::EmailAddress); |
503 | } else { | 504 | } else { |
504 | return mEmail; | 505 | return mEmail; |
505 | } | 506 | } |
506 | } | 507 | } |
507 | KConfig* KOPrefs::getConfig() | 508 | KConfig* KOPrefs::getConfig() |
508 | { | 509 | { |
509 | return config(); | 510 | return config(); |
510 | } | 511 | } |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index e06df1c..864cf1b 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -1,320 +1,321 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef KOPREFS_H | 23 | #ifndef KOPREFS_H |
24 | #define KOPREFS_H | 24 | #define KOPREFS_H |
25 | 25 | ||
26 | 26 | ||
27 | #include <libkdepim/kpimprefs.h> | 27 | #include <libkdepim/kpimprefs.h> |
28 | #include <qdict.h> | 28 | #include <qdict.h> |
29 | 29 | ||
30 | class KConfig; | 30 | class KConfig; |
31 | class QFont; | 31 | class QFont; |
32 | class QColor; | 32 | class QColor; |
33 | class QStringList; | 33 | class QStringList; |
34 | 34 | ||
35 | #define VIEW_WN_VIEW 1 | 35 | #define VIEW_WN_VIEW 1 |
36 | #define VIEW_NX_VIEW 2 | 36 | #define VIEW_NX_VIEW 2 |
37 | #define VIEW_J_VIEW 3 | 37 | #define VIEW_J_VIEW 3 |
38 | #define VIEW_A_VIEW 4 | 38 | #define VIEW_A_VIEW 4 |
39 | #define VIEW_ML_VIEW 5 | 39 | #define VIEW_ML_VIEW 5 |
40 | #define VIEW_M_VIEW 6 | 40 | #define VIEW_M_VIEW 6 |
41 | #define VIEW_L_VIEW 7 | 41 | #define VIEW_L_VIEW 7 |
42 | #define VIEW_T_VIEW 8 | 42 | #define VIEW_T_VIEW 8 |
43 | 43 | ||
44 | class KOPrefs : public KPimPrefs | 44 | class KOPrefs : public KPimPrefs |
45 | { | 45 | { |
46 | public: | 46 | public: |
47 | enum { FormatVCalendar, FormatICalendar }; | 47 | enum { FormatVCalendar, FormatICalendar }; |
48 | enum { MailClientKMail, MailClientSendmail }; | 48 | enum { MailClientKMail, MailClientSendmail }; |
49 | enum { IMIPDummy, IMIPKMail }; | 49 | enum { IMIPDummy, IMIPKMail }; |
50 | enum { IMIPOutbox, IMIPdirectsend }; | 50 | enum { IMIPOutbox, IMIPdirectsend }; |
51 | enum { neverAuto, addressbookAuto, selectedAuto }; | 51 | enum { neverAuto, addressbookAuto, selectedAuto }; |
52 | enum { standardDestination, askDestination }; | 52 | enum { standardDestination, askDestination }; |
53 | 53 | ||
54 | virtual ~KOPrefs(); | 54 | virtual ~KOPrefs(); |
55 | 55 | ||
56 | /** Get instance of KOPrefs. It is made sure that there is only one | 56 | /** Get instance of KOPrefs. It is made sure that there is only one |
57 | instance. */ | 57 | instance. */ |
58 | static KOPrefs *instance(); | 58 | static KOPrefs *instance(); |
59 | 59 | ||
60 | /** Set preferences to default values */ | 60 | /** Set preferences to default values */ |
61 | void usrSetDefaults(); | 61 | void usrSetDefaults(); |
62 | 62 | ||
63 | /** Read preferences from config file */ | 63 | /** Read preferences from config file */ |
64 | void usrReadConfig(); | 64 | void usrReadConfig(); |
65 | 65 | ||
66 | /** Write preferences to config file */ | 66 | /** Write preferences to config file */ |
67 | void usrWriteConfig(); | 67 | void usrWriteConfig(); |
68 | void setCategoryDefaults(); | 68 | void setCategoryDefaults(); |
69 | void setAllDefaults(); | 69 | void setAllDefaults(); |
70 | 70 | ||
71 | protected: | 71 | protected: |
72 | void setTimeZoneIdDefault(); | 72 | void setTimeZoneIdDefault(); |
73 | 73 | ||
74 | /** Fill empty mail fields with default values. */ | 74 | /** Fill empty mail fields with default values. */ |
75 | void fillMailDefaults(); | 75 | void fillMailDefaults(); |
76 | 76 | ||
77 | private: | 77 | private: |
78 | /** Constructor disabled for public. Use instance() to create a KOPrefs | 78 | /** Constructor disabled for public. Use instance() to create a KOPrefs |
79 | object. */ | 79 | object. */ |
80 | KOPrefs(); | 80 | KOPrefs(); |
81 | 81 | ||
82 | static KOPrefs *mInstance; | 82 | static KOPrefs *mInstance; |
83 | QStringList getDefaultList(); | 83 | QStringList getDefaultList(); |
84 | QStringList getLocationDefaultList(); | 84 | QStringList getLocationDefaultList(); |
85 | public: | 85 | public: |
86 | // preferences data | 86 | // preferences data |
87 | KConfig* getConfig(); | 87 | KConfig* getConfig(); |
88 | void setFullName(const QString &); | 88 | void setFullName(const QString &); |
89 | QString fullName(); | 89 | QString fullName(); |
90 | void setEmail(const QString &); | 90 | void setEmail(const QString &); |
91 | QString email(); | 91 | QString email(); |
92 | 92 | ||
93 | QString mAdditional; | 93 | QString mAdditional; |
94 | 94 | ||
95 | bool mEmailControlCenter; | 95 | bool mEmailControlCenter; |
96 | 96 | ||
97 | bool mBcc; | 97 | bool mBcc; |
98 | bool mAutoSave; | 98 | bool mAutoSave; |
99 | int mAutoSaveInterval; | 99 | int mAutoSaveInterval; |
100 | bool mConfirm; | 100 | bool mConfirm; |
101 | 101 | ||
102 | bool mEnableGroupScheduling; | 102 | bool mEnableGroupScheduling; |
103 | bool mEnableProjectView; | 103 | bool mEnableProjectView; |
104 | 104 | ||
105 | int mDefaultFormat; | 105 | int mDefaultFormat; |
106 | int mMailClient; | 106 | int mMailClient; |
107 | 107 | ||
108 | int mStartTime; | 108 | int mStartTime; |
109 | int mDefaultDuration; | 109 | int mDefaultDuration; |
110 | int mAlarmTime; | 110 | int mAlarmTime; |
111 | 111 | ||
112 | int mWorkingHoursStart; | 112 | int mWorkingHoursStart; |
113 | int mWorkingHoursEnd; | 113 | int mWorkingHoursEnd; |
114 | bool mExcludeHolidays; | 114 | bool mExcludeHolidays; |
115 | bool mExcludeSaturdays; | 115 | bool mExcludeSaturdays; |
116 | bool mMarcusBainsShowSeconds; | 116 | bool mMarcusBainsShowSeconds; |
117 | 117 | ||
118 | QFont mTimeBarFont; | 118 | QFont mTimeBarFont; |
119 | QFont mMonthViewFont; | 119 | QFont mMonthViewFont; |
120 | QFont mAgendaViewFont; | 120 | QFont mAgendaViewFont; |
121 | QFont mMarcusBainsFont; | 121 | QFont mMarcusBainsFont; |
122 | QFont mTimeLabelsFont; | 122 | QFont mTimeLabelsFont; |
123 | QFont mTodoViewFont; | 123 | QFont mTodoViewFont; |
124 | QFont mListViewFont; | 124 | QFont mListViewFont; |
125 | QFont mDateNavigatorFont; | 125 | QFont mDateNavigatorFont; |
126 | QFont mEditBoxFont; | 126 | QFont mEditBoxFont; |
127 | QFont mJornalViewFont; | 127 | QFont mJornalViewFont; |
128 | QFont mWhatsNextFont; | 128 | QFont mWhatsNextFont; |
129 | QFont mEventViewFont; | 129 | QFont mEventViewFont; |
130 | 130 | ||
131 | 131 | ||
132 | 132 | ||
133 | 133 | ||
134 | QColor mHolidayColor; | 134 | QColor mHolidayColor; |
135 | QColor mHighlightColor; | 135 | QColor mHighlightColor; |
136 | QColor mEventColor; | 136 | QColor mEventColor; |
137 | QColor mTodoDoneColor; | 137 | QColor mTodoDoneColor; |
138 | QColor mAgendaBgColor; | 138 | QColor mAgendaBgColor; |
139 | QColor mWorkingHoursColor; | 139 | QColor mWorkingHoursColor; |
140 | QColor mTodoDueTodayColor; | 140 | QColor mTodoDueTodayColor; |
141 | QColor mTodoOverdueColor; | 141 | QColor mTodoOverdueColor; |
142 | QColor mTodoRunColor; | 142 | QColor mTodoRunColor; |
143 | QColor mMonthViewEvenColor; | 143 | QColor mMonthViewEvenColor; |
144 | QColor mMonthViewOddColor; | 144 | QColor mMonthViewOddColor; |
145 | QColor mMonthViewHolidayColor; | 145 | QColor mMonthViewHolidayColor; |
146 | bool mMonthViewUsesDayColors; | 146 | bool mMonthViewUsesDayColors; |
147 | bool mMonthViewSatSunTog; | 147 | bool mMonthViewSatSunTog; |
148 | bool mMonthViewWeek; | 148 | bool mMonthViewWeek; |
149 | QColor mAppColor1; | 149 | QColor mAppColor1; |
150 | QColor mAppColor2; | 150 | QColor mAppColor2; |
151 | bool mUseAppColors; | 151 | bool mUseAppColors; |
152 | 152 | ||
153 | int mDayBegins; | 153 | int mDayBegins; |
154 | int mHourSize; | 154 | int mHourSize; |
155 | int mAllDaySize; | 155 | int mAllDaySize; |
156 | bool mShowFullMenu; | 156 | bool mShowFullMenu; |
157 | bool mDailyRecur; | 157 | bool mDailyRecur; |
158 | bool mWeeklyRecur; | 158 | bool mWeeklyRecur; |
159 | bool mMonthDailyRecur; | 159 | bool mMonthDailyRecur; |
160 | bool mMonthWeeklyRecur; | 160 | bool mMonthWeeklyRecur; |
161 | bool mMonthShowIcons; | 161 | bool mMonthShowIcons; |
162 | bool mMonthShowTimes; | 162 | bool mMonthShowTimes; |
163 | bool mMonthShowShort; | 163 | bool mMonthShowShort; |
164 | bool mEnableToolTips; | 164 | bool mEnableToolTips; |
165 | bool mEnableMonthScroll; | 165 | bool mEnableMonthScroll; |
166 | bool mFullViewMonth; | 166 | bool mFullViewMonth; |
167 | bool mMonthViewUsesCategoryColor; | 167 | bool mMonthViewUsesCategoryColor; |
168 | bool mFullViewTodo; | 168 | bool mFullViewTodo; |
169 | bool mShowCompletedTodo; | 169 | bool mShowCompletedTodo; |
170 | bool mMarcusBainsEnabled; | 170 | bool mMarcusBainsEnabled; |
171 | int mNextXDays; | 171 | int mNextXDays; |
172 | int mWhatsNextDays; | 172 | int mWhatsNextDays; |
173 | int mWhatsNextPrios; | 173 | int mWhatsNextPrios; |
174 | bool mEnableQuickTodo; | 174 | bool mEnableQuickTodo; |
175 | 175 | ||
176 | bool mCompactDialogs; | 176 | bool mCompactDialogs; |
177 | bool mVerticalScreen; | 177 | bool mVerticalScreen; |
178 | 178 | ||
179 | bool mShowIconNewTodo; | 179 | bool mShowIconNewTodo; |
180 | bool mShowIconNewEvent; | 180 | bool mShowIconNewEvent; |
181 | bool mShowIconSearch; | 181 | bool mShowIconSearch; |
182 | bool mShowIconList; | 182 | bool mShowIconList; |
183 | bool mShowIconDay1; | 183 | bool mShowIconDay1; |
184 | bool mShowIconDay5; | 184 | bool mShowIconDay5; |
185 | bool mShowIconDay6; | 185 | bool mShowIconDay6; |
186 | bool mShowIconDay7; | 186 | bool mShowIconDay7; |
187 | bool mShowIconMonth; | 187 | bool mShowIconMonth; |
188 | bool mShowIconTodoview; | 188 | bool mShowIconTodoview; |
189 | bool mShowIconBackFast; | 189 | bool mShowIconBackFast; |
190 | bool mShowIconBack; | 190 | bool mShowIconBack; |
191 | bool mShowIconToday; | 191 | bool mShowIconToday; |
192 | bool mShowIconForward; | 192 | bool mShowIconForward; |
193 | bool mShowIconForwardFast; | 193 | bool mShowIconForwardFast; |
194 | bool mShowIconWhatsThis; | 194 | bool mShowIconWhatsThis; |
195 | bool mShowIconWeekNum; | 195 | bool mShowIconWeekNum; |
196 | bool mShowIconNextDays; | 196 | bool mShowIconNextDays; |
197 | bool mShowIconNext; | 197 | bool mShowIconNext; |
198 | bool mShowIconJournal; | 198 | bool mShowIconJournal; |
199 | bool mShowIconFilter; | 199 | bool mShowIconFilter; |
200 | bool mShowIconOnetoolbar; | 200 | bool mShowIconOnetoolbar; |
201 | bool mShowIconNavigator; | 201 | bool mShowIconNavigator; |
202 | bool mShowIconAllday; | 202 | bool mShowIconAllday; |
203 | bool mShowIconFilterview; | 203 | bool mShowIconFilterview; |
204 | bool mShowIconToggleFull; | 204 | bool mShowIconToggleFull; |
205 | 205 | ||
206 | bool mShowIconStretch; | 206 | bool mShowIconStretch; |
207 | 207 | ||
208 | bool mToolBarHor; | 208 | bool mToolBarHor; |
209 | bool mToolBarUp; | 209 | bool mToolBarUp; |
210 | bool mToolBarHorV; | 210 | bool mToolBarHorV; |
211 | bool mToolBarUpV; | 211 | bool mToolBarUpV; |
212 | bool mToolBarHorN; | 212 | bool mToolBarHorN; |
213 | bool mToolBarUpN; | 213 | bool mToolBarUpN; |
214 | bool mToolBarHorF; | 214 | bool mToolBarHorF; |
215 | bool mToolBarUpF; | 215 | bool mToolBarUpF; |
216 | bool mToolBarMiniIcons; | 216 | bool mToolBarMiniIcons; |
217 | 217 | ||
218 | bool mAskForQuit; | 218 | bool mAskForQuit; |
219 | bool mUsePassWd; | 219 | bool mUsePassWd; |
220 | bool mShowSyncEvents; | 220 | bool mShowSyncEvents; |
221 | bool mShowTodoInAgenda; | 221 | bool mShowTodoInAgenda; |
222 | bool mShowCompletedTodoInAgenda; | ||
222 | bool mShowTimeInAgenda; | 223 | bool mShowTimeInAgenda; |
223 | bool mHideNonStartedTodos; | 224 | bool mHideNonStartedTodos; |
224 | 225 | ||
225 | bool mBlockPopupMenu; | 226 | bool mBlockPopupMenu; |
226 | 227 | ||
227 | int mLastSyncTime; | 228 | int mLastSyncTime; |
228 | void setCategoryColor(QString cat,const QColor & color); | 229 | void setCategoryColor(QString cat,const QColor & color); |
229 | QColor *categoryColor(QString cat); | 230 | QColor *categoryColor(QString cat); |
230 | 231 | ||
231 | QString mArchiveFile; | 232 | QString mArchiveFile; |
232 | QString mHtmlExportFile; | 233 | QString mHtmlExportFile; |
233 | bool mHtmlWithSave; | 234 | bool mHtmlWithSave; |
234 | 235 | ||
235 | QStringList mSelectedPlugins; | 236 | QStringList mSelectedPlugins; |
236 | 237 | ||
237 | QString mLastImportFile; | 238 | QString mLastImportFile; |
238 | QString mLastVcalFile; | 239 | QString mLastVcalFile; |
239 | QString mLastSaveFile; | 240 | QString mLastSaveFile; |
240 | QString mLastLoadFile; | 241 | QString mLastLoadFile; |
241 | 242 | ||
242 | 243 | ||
243 | QString mDefaultAlarmFile; | 244 | QString mDefaultAlarmFile; |
244 | int mIMIPScheduler; | 245 | int mIMIPScheduler; |
245 | int mIMIPSend; | 246 | int mIMIPSend; |
246 | QStringList mAdditionalMails; | 247 | QStringList mAdditionalMails; |
247 | int mIMIPAutoRefresh; | 248 | int mIMIPAutoRefresh; |
248 | int mIMIPAutoInsertReply; | 249 | int mIMIPAutoInsertReply; |
249 | int mIMIPAutoInsertRequest; | 250 | int mIMIPAutoInsertRequest; |
250 | int mIMIPAutoFreeBusy; | 251 | int mIMIPAutoFreeBusy; |
251 | int mIMIPAutoFreeBusyReply; | 252 | int mIMIPAutoFreeBusyReply; |
252 | 253 | ||
253 | QStringList mTodoTemplates; | 254 | QStringList mTodoTemplates; |
254 | QStringList mEventTemplates; | 255 | QStringList mEventTemplates; |
255 | 256 | ||
256 | int mDestination; | 257 | int mDestination; |
257 | 258 | ||
258 | 259 | ||
259 | bool mEditOnDoubleClick; | 260 | bool mEditOnDoubleClick; |
260 | bool mViewChangeHoldFullscreen; | 261 | bool mViewChangeHoldFullscreen; |
261 | bool mViewChangeHoldNonFullscreen; | 262 | bool mViewChangeHoldNonFullscreen; |
262 | bool mCenterOnCurrentTime; | 263 | bool mCenterOnCurrentTime; |
263 | bool mSetTimeToDayStartAt; | 264 | bool mSetTimeToDayStartAt; |
264 | bool mHighlightCurrentDay; | 265 | bool mHighlightCurrentDay; |
265 | bool mUseHighlightLightColor; | 266 | bool mUseHighlightLightColor; |
266 | bool mListViewMonthTimespan; | 267 | bool mListViewMonthTimespan; |
267 | bool mWNViewShowsParents; | 268 | bool mWNViewShowsParents; |
268 | bool mWNViewShowsPast; | 269 | bool mWNViewShowsPast; |
269 | bool mWNViewShowLocation; | 270 | bool mWNViewShowLocation; |
270 | bool mTodoViewShowsPercentage; | 271 | bool mTodoViewShowsPercentage; |
271 | bool mTodoViewUsesCatColors; | 272 | bool mTodoViewUsesCatColors; |
272 | bool mMonthViewUsesBigFont; | 273 | bool mMonthViewUsesBigFont; |
273 | bool mTodoViewUsesSmallFont; | 274 | bool mTodoViewUsesSmallFont; |
274 | bool mTodoViewUsesForegroundColor; | 275 | bool mTodoViewUsesForegroundColor; |
275 | bool mMonthViewUsesForegroundColor; | 276 | bool mMonthViewUsesForegroundColor; |
276 | 277 | ||
277 | bool mHightlightDateTimeEdit; | 278 | bool mHightlightDateTimeEdit; |
278 | bool mShortDateInViewer; | 279 | bool mShortDateInViewer; |
279 | 280 | ||
280 | bool mShowDateNavigator; | 281 | bool mShowDateNavigator; |
281 | 282 | ||
282 | QStringList mLocationDefaults; | 283 | QStringList mLocationDefaults; |
283 | QStringList mEventSummaryUser; | 284 | QStringList mEventSummaryUser; |
284 | QStringList mTodoSummaryUser; | 285 | QStringList mTodoSummaryUser; |
285 | 286 | ||
286 | bool mUseInternalAlarmNotification; | 287 | bool mUseInternalAlarmNotification; |
287 | int mAlarmPlayBeeps; | 288 | int mAlarmPlayBeeps; |
288 | int mAlarmSuspendTime; | 289 | int mAlarmSuspendTime; |
289 | int mAlarmSuspendCount; | 290 | int mAlarmSuspendCount; |
290 | int mAlarmBeepInterval; | 291 | int mAlarmBeepInterval; |
291 | int mOldLanguage; | 292 | int mOldLanguage; |
292 | int mOldLoadedLanguage; | 293 | int mOldLoadedLanguage; |
293 | 294 | ||
294 | 295 | ||
295 | QString mActiveSyncPort; | 296 | QString mActiveSyncPort; |
296 | QString mActiveSyncIP; | 297 | QString mActiveSyncIP; |
297 | 298 | ||
298 | // settings for eventviewer | 299 | // settings for eventviewer |
299 | bool mEVshowDetails; | 300 | bool mEVshowDetails; |
300 | bool mEVshowCreated; | 301 | bool mEVshowCreated; |
301 | bool mEVshowChanged; | 302 | bool mEVshowChanged; |
302 | bool mWTshowDetails; | 303 | bool mWTshowDetails; |
303 | bool mWTshowCreated; | 304 | bool mWTshowCreated; |
304 | bool mWTshowChanged; | 305 | bool mWTshowChanged; |
305 | 306 | ||
306 | int mCurrentDisplayedView; | 307 | int mCurrentDisplayedView; |
307 | 308 | ||
308 | private: | 309 | private: |
309 | QDict<QColor> mCategoryColors; | 310 | QDict<QColor> mCategoryColors; |
310 | QColor mDefaultCategoryColor; | 311 | QColor mDefaultCategoryColor; |
311 | 312 | ||
312 | QFont mDefaultTimeBarFont; | 313 | QFont mDefaultTimeBarFont; |
313 | QFont mDefaultViewFont; | 314 | QFont mDefaultViewFont; |
314 | QFont mDefaultMonthViewFont; | 315 | QFont mDefaultMonthViewFont; |
315 | 316 | ||
316 | QString mName; | 317 | QString mName; |
317 | QString mEmail; | 318 | QString mEmail; |
318 | }; | 319 | }; |
319 | 320 | ||
320 | #endif | 321 | #endif |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index e4bee63..c9477e3 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1,1742 +1,1749 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qgroupbox.h> | 26 | #include <qgroupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <qbuttongroup.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qfont.h> | 29 | #include <qfont.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qvbox.h> | 34 | #include <qvbox.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qradiobutton.h> | 40 | #include <qradiobutton.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qstrlist.h> | 42 | #include <qstrlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | 44 | ||
45 | #include <kcolorbutton.h> | 45 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 46 | #include <kdebug.h> |
47 | #include <klocale.h> | 47 | #include <klocale.h> |
48 | #include <kglobal.h> | 48 | #include <kglobal.h> |
49 | #include <kfontdialog.h> | 49 | #include <kfontdialog.h> |
50 | #include <kfiledialog.h> | 50 | #include <kfiledialog.h> |
51 | #include <kmessagebox.h> | 51 | #include <kmessagebox.h> |
52 | #include <kcolordialog.h> | 52 | #include <kcolordialog.h> |
53 | #include <kiconloader.h> | 53 | #include <kiconloader.h> |
54 | #include <kemailsettings.h> | 54 | #include <kemailsettings.h> |
55 | #include <kstandarddirs.h> | 55 | #include <kstandarddirs.h> |
56 | #include <kglobalsettings.h> | 56 | #include <kglobalsettings.h> |
57 | 57 | ||
58 | #include <kurlrequester.h> | 58 | #include <kurlrequester.h> |
59 | #include <klineedit.h> | 59 | #include <klineedit.h> |
60 | 60 | ||
61 | #if defined(USE_SOLARIS) | 61 | #if defined(USE_SOLARIS) |
62 | #include <sys/param.h> | 62 | #include <sys/param.h> |
63 | 63 | ||
64 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" | 64 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" |
65 | #define INITFILE "/etc/default/init" | 65 | #define INITFILE "/etc/default/init" |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #include "koprefs.h" | 68 | #include "koprefs.h" |
69 | 69 | ||
70 | #include "koprefsdialog.h" | 70 | #include "koprefsdialog.h" |
71 | #include "kpimglobalprefs.h" | 71 | #include "kpimglobalprefs.h" |
72 | 72 | ||
73 | 73 | ||
74 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 74 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
75 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 75 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
76 | { | 76 | { |
77 | 77 | ||
78 | setFont( KGlobalSettings::generalMaxFont() ); | 78 | setFont( KGlobalSettings::generalMaxFont() ); |
79 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 79 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
80 | mCategoryDict.setAutoDelete(true); | 80 | mCategoryDict.setAutoDelete(true); |
81 | 81 | ||
82 | KGlobal::locale()->insertCatalogue("timezones"); | 82 | KGlobal::locale()->insertCatalogue("timezones"); |
83 | mSpacingHint = spacingHintSmall(); | 83 | mSpacingHint = spacingHintSmall(); |
84 | mMarginHint = marginHintSmall(); | 84 | mMarginHint = marginHintSmall(); |
85 | #ifndef DESKTOP_VERSION | 85 | #ifndef DESKTOP_VERSION |
86 | if ( QApplication::desktop()->height() == 480 ) | 86 | if ( QApplication::desktop()->height() == 480 ) |
87 | hideButtons(); | 87 | hideButtons(); |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | setupGlobalTab(); | 90 | setupGlobalTab(); |
91 | setupMainTab(); | 91 | setupMainTab(); |
92 | // setupLocaleTab(); | 92 | // setupLocaleTab(); |
93 | //setupTimeZoneTab(); | 93 | //setupTimeZoneTab(); |
94 | setupTimeTab(); | 94 | setupTimeTab(); |
95 | //setupLocaleDateTab(); | 95 | //setupLocaleDateTab(); |
96 | setupFontsTab(); | 96 | setupFontsTab(); |
97 | setupColorsTab(); | 97 | setupColorsTab(); |
98 | setupViewsTab(); | 98 | setupViewsTab(); |
99 | //setupSyncTab(); | 99 | //setupSyncTab(); |
100 | //setupSyncAlgTab(); | 100 | //setupSyncAlgTab(); |
101 | //setupPrinterTab(); | 101 | //setupPrinterTab(); |
102 | //setupGroupSchedulingTab(); | 102 | //setupGroupSchedulingTab(); |
103 | //setupGroupAutomationTab(); | 103 | //setupGroupAutomationTab(); |
104 | 104 | ||
105 | 105 | ||
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | KOPrefsDialog::~KOPrefsDialog() | 109 | KOPrefsDialog::~KOPrefsDialog() |
110 | { | 110 | { |
111 | } | 111 | } |
112 | void KOPrefsDialog::setupGlobalTab() | 112 | void KOPrefsDialog::setupGlobalTab() |
113 | { | 113 | { |
114 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 114 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
115 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 115 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
116 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 116 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
117 | topLayout->addWidget( kdelibcfg ); | 117 | topLayout->addWidget( kdelibcfg ); |
118 | 118 | ||
119 | 119 | ||
120 | } | 120 | } |
121 | void KOPrefsDialog::setupLocaleDateTab() | 121 | void KOPrefsDialog::setupLocaleDateTab() |
122 | { | 122 | { |
123 | #if 0 | 123 | #if 0 |
124 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 124 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
125 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 125 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
126 | topLayout->setSpacing(mSpacingHint); | 126 | topLayout->setSpacing(mSpacingHint); |
127 | topLayout->setMargin(mMarginHint); | 127 | topLayout->setMargin(mMarginHint); |
128 | int iii = 0; | 128 | int iii = 0; |
129 | 129 | ||
130 | 130 | ||
131 | KPrefsDialogWidRadios *syncPrefsGroup = | 131 | KPrefsDialogWidRadios *syncPrefsGroup = |
132 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 132 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
133 | QString format; | 133 | QString format; |
134 | if ( QApplication::desktop()->width() < 480 ) | 134 | if ( QApplication::desktop()->width() < 480 ) |
135 | format = "(%d.%m.%Y)"; | 135 | format = "(%d.%m.%Y)"; |
136 | else | 136 | else |
137 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 137 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
138 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 138 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
139 | if ( QApplication::desktop()->width() < 480 ) | 139 | if ( QApplication::desktop()->width() < 480 ) |
140 | format = "(%m.%d.%Y)"; | 140 | format = "(%m.%d.%Y)"; |
141 | else | 141 | else |
142 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 142 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
143 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 143 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
144 | if ( QApplication::desktop()->width() < 480 ) | 144 | if ( QApplication::desktop()->width() < 480 ) |
145 | format = "(%Y-%m-%d)"; | 145 | format = "(%Y-%m-%d)"; |
146 | else | 146 | else |
147 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 147 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
148 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 148 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
149 | syncPrefsGroup->addRadio(i18n("User defined")); | 149 | syncPrefsGroup->addRadio(i18n("User defined")); |
150 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 150 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
151 | ++iii; | 151 | ++iii; |
152 | ++iii; | 152 | ++iii; |
153 | QLabel * lab; | 153 | QLabel * lab; |
154 | mUserDateFormatLong = new QLineEdit(topFrame); | 154 | mUserDateFormatLong = new QLineEdit(topFrame); |
155 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 155 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
156 | topLayout->addWidget(lab ,iii,0); | 156 | topLayout->addWidget(lab ,iii,0); |
157 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 157 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
158 | ++iii; | 158 | ++iii; |
159 | mUserDateFormatShort = new QLineEdit(topFrame); | 159 | mUserDateFormatShort = new QLineEdit(topFrame); |
160 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 160 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
161 | topLayout->addWidget(lab ,iii,0); | 161 | topLayout->addWidget(lab ,iii,0); |
162 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 162 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
163 | ++iii; | 163 | ++iii; |
164 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 164 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
165 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 165 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
166 | ++iii; | 166 | ++iii; |
167 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 167 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
168 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 168 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
169 | ++iii; | 169 | ++iii; |
170 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 170 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
171 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 171 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
172 | ++iii; | 172 | ++iii; |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | } | 175 | } |
176 | 176 | ||
177 | void KOPrefsDialog::setupLocaleTab() | 177 | void KOPrefsDialog::setupLocaleTab() |
178 | { | 178 | { |
179 | #if 0 | 179 | #if 0 |
180 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 180 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
181 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 181 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
182 | topLayout->setSpacing(mSpacingHint); | 182 | topLayout->setSpacing(mSpacingHint); |
183 | topLayout->setMargin(mMarginHint); | 183 | topLayout->setMargin(mMarginHint); |
184 | int iii = 0; | 184 | int iii = 0; |
185 | KPrefsDialogWidRadios *syncPrefsGroup = | 185 | KPrefsDialogWidRadios *syncPrefsGroup = |
186 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 186 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
187 | syncPrefsGroup->addRadio(i18n("English")); | 187 | syncPrefsGroup->addRadio(i18n("English")); |
188 | syncPrefsGroup->addRadio(i18n("German")); | 188 | syncPrefsGroup->addRadio(i18n("German")); |
189 | syncPrefsGroup->addRadio(i18n("French")); | 189 | syncPrefsGroup->addRadio(i18n("French")); |
190 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 190 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
191 | if ( QApplication::desktop()->width() < 300 ) | 191 | if ( QApplication::desktop()->width() < 300 ) |
192 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 192 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
194 | ++iii; | 194 | ++iii; |
195 | 195 | ||
196 | syncPrefsGroup = | 196 | syncPrefsGroup = |
197 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 197 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
198 | if ( QApplication::desktop()->width() > 300 ) | 198 | if ( QApplication::desktop()->width() > 300 ) |
199 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 199 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
200 | syncPrefsGroup->addRadio(i18n("24:00")); | 200 | syncPrefsGroup->addRadio(i18n("24:00")); |
201 | syncPrefsGroup->addRadio(i18n("12:00am")); | 201 | syncPrefsGroup->addRadio(i18n("12:00am")); |
202 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 202 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
203 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 203 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
204 | ++iii; | 204 | ++iii; |
205 | KPrefsDialogWidBool *sb; | 205 | KPrefsDialogWidBool *sb; |
206 | if ( QApplication::desktop()->width() < 300 ) { | 206 | if ( QApplication::desktop()->width() < 300 ) { |
207 | sb = | 207 | sb = |
208 | addWidBool(i18n("Week starts on Sunday"), | 208 | addWidBool(i18n("Week starts on Sunday"), |
209 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 209 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
210 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 210 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
211 | ++iii; | 211 | ++iii; |
212 | sb = | 212 | sb = |
213 | addWidBool(i18n("Use short date in (WN/E) view"), | 213 | addWidBool(i18n("Use short date in (WN/E) view"), |
214 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 214 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
215 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 215 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
216 | } | 216 | } |
217 | else { | 217 | else { |
218 | QWidget * hb = new QWidget( topFrame ); | 218 | QWidget * hb = new QWidget( topFrame ); |
219 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 219 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
220 | sb = | 220 | sb = |
221 | addWidBool(i18n("Week starts on Sunday"), | 221 | addWidBool(i18n("Week starts on Sunday"), |
222 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 222 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
223 | hbLayout->addWidget(sb->checkBox() ); | 223 | hbLayout->addWidget(sb->checkBox() ); |
224 | sb = | 224 | sb = |
225 | addWidBool(i18n("Use short date in (WN/E) view"), | 225 | addWidBool(i18n("Use short date in (WN/E) view"), |
226 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 226 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
227 | hbLayout->addWidget(sb->checkBox() ); | 227 | hbLayout->addWidget(sb->checkBox() ); |
228 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 228 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
229 | 229 | ||
230 | } | 230 | } |
231 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION | 231 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION |
232 | #if 0 | 232 | #if 0 |
233 | ++iii; | 233 | ++iii; |
234 | sb = | 234 | sb = |
235 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 235 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
236 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 236 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
237 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 237 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
238 | #endif | 238 | #endif |
239 | #endif | 239 | #endif |
240 | } | 240 | } |
241 | void KOPrefsDialog::showSyncPage() | 241 | void KOPrefsDialog::showSyncPage() |
242 | { | 242 | { |
243 | showPage ( 0 ) ; | 243 | showPage ( 0 ) ; |
244 | kdelibcfg->showTimeZoneTab() ; | 244 | kdelibcfg->showTimeZoneTab() ; |
245 | 245 | ||
246 | } | 246 | } |
247 | void KOPrefsDialog::setupSyncAlgTab() | 247 | void KOPrefsDialog::setupSyncAlgTab() |
248 | { | 248 | { |
249 | #if 0 | 249 | #if 0 |
250 | QLabel * lab; | 250 | QLabel * lab; |
251 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 251 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
252 | mSetupSyncAlgTab = topFrame; | 252 | mSetupSyncAlgTab = topFrame; |
253 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 253 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
254 | topLayout->setSpacing(mSpacingHint); | 254 | topLayout->setSpacing(mSpacingHint); |
255 | topLayout->setMargin(mMarginHint); | 255 | topLayout->setMargin(mMarginHint); |
256 | int iii = 0; | 256 | int iii = 0; |
257 | 257 | ||
258 | KPrefsDialogWidBool *sb = | 258 | KPrefsDialogWidBool *sb = |
259 | addWidBool(i18n("Ask for preferences before syncing"), | 259 | addWidBool(i18n("Ask for preferences before syncing"), |
260 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 260 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
261 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 261 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
262 | 262 | ||
263 | ++iii; | 263 | ++iii; |
264 | 264 | ||
265 | KPrefsDialogWidRadios *syncPrefsGroup = | 265 | KPrefsDialogWidRadios *syncPrefsGroup = |
266 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 266 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
267 | topFrame); | 267 | topFrame); |
268 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 268 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
269 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 269 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
270 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 270 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
271 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 271 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
272 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 272 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
273 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 273 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
274 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 274 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
275 | ++iii; | 275 | ++iii; |
276 | sb = | 276 | sb = |
277 | addWidBool(i18n("Show summary after syncing"), | 277 | addWidBool(i18n("Show summary after syncing"), |
278 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 278 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
279 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 279 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
280 | 280 | ||
281 | ++iii; | 281 | ++iii; |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | 284 | ||
285 | 285 | ||
286 | } | 286 | } |
287 | 287 | ||
288 | 288 | ||
289 | void KOPrefsDialog::setupSyncTab() | 289 | void KOPrefsDialog::setupSyncTab() |
290 | { | 290 | { |
291 | #if 0 | 291 | #if 0 |
292 | QLabel * lab; | 292 | QLabel * lab; |
293 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 293 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
294 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 294 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
295 | topLayout->setSpacing(mSpacingHint); | 295 | topLayout->setSpacing(mSpacingHint); |
296 | topLayout->setMargin(mMarginHint); | 296 | topLayout->setMargin(mMarginHint); |
297 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 297 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
298 | int iii = 0; | 298 | int iii = 0; |
299 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 299 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
300 | ++iii; | 300 | ++iii; |
301 | 301 | ||
302 | mRemoteIPEdit = new QLineEdit(topFrame); | 302 | mRemoteIPEdit = new QLineEdit(topFrame); |
303 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 303 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
304 | topLayout->addWidget(lab ,iii,0); | 304 | topLayout->addWidget(lab ,iii,0); |
305 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 305 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
306 | ++iii; | 306 | ++iii; |
307 | mRemoteUser = new QLineEdit(topFrame); | 307 | mRemoteUser = new QLineEdit(topFrame); |
308 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 308 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
309 | topLayout->addWidget(lab ,iii,0); | 309 | topLayout->addWidget(lab ,iii,0); |
310 | topLayout->addWidget(mRemoteUser, iii,1); | 310 | topLayout->addWidget(mRemoteUser, iii,1); |
311 | ++iii; | 311 | ++iii; |
312 | 312 | ||
313 | mRemoteFile = new QLineEdit(topFrame); | 313 | mRemoteFile = new QLineEdit(topFrame); |
314 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 314 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
315 | topLayout->addWidget(lab ,iii,0); | 315 | topLayout->addWidget(lab ,iii,0); |
316 | topLayout->addWidget(mRemoteFile,iii,1); | 316 | topLayout->addWidget(mRemoteFile,iii,1); |
317 | ++iii; | 317 | ++iii; |
318 | 318 | ||
319 | mLocalTempFile = new QLineEdit(topFrame); | 319 | mLocalTempFile = new QLineEdit(topFrame); |
320 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 320 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
321 | topLayout->addWidget(lab ,iii,0); | 321 | topLayout->addWidget(lab ,iii,0); |
322 | topLayout->addWidget(mLocalTempFile,iii,1); | 322 | topLayout->addWidget(mLocalTempFile,iii,1); |
323 | ++iii; | 323 | ++iii; |
324 | 324 | ||
325 | KPrefsDialogWidBool *wb = | 325 | KPrefsDialogWidBool *wb = |
326 | addWidBool(i18n("Write back synced file"), | 326 | addWidBool(i18n("Write back synced file"), |
327 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 327 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
328 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 328 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
329 | ++iii; | 329 | ++iii; |
330 | wb = | 330 | wb = |
331 | addWidBool(i18n("Write back existing entries only"), | 331 | addWidBool(i18n("Write back existing entries only"), |
332 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 332 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
333 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 333 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
334 | ++iii; | 334 | ++iii; |
335 | 335 | ||
336 | #endif | 336 | #endif |
337 | } | 337 | } |
338 | 338 | ||
339 | void KOPrefsDialog::setupMainTab() | 339 | void KOPrefsDialog::setupMainTab() |
340 | { | 340 | { |
341 | QFrame *topFrame = addPage(i18n("General"),0,0); | 341 | QFrame *topFrame = addPage(i18n("General"),0,0); |
342 | // DesktopIcon("identity",KIcon::SizeMedium)); | 342 | // DesktopIcon("identity",KIcon::SizeMedium)); |
343 | 343 | ||
344 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 344 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
345 | topLayout->setSpacing(mSpacingHint); | 345 | topLayout->setSpacing(mSpacingHint); |
346 | topLayout->setMargin(mMarginHint); | 346 | topLayout->setMargin(mMarginHint); |
347 | 347 | ||
348 | // KPrefsDialogWidBool *emailControlCenter = | 348 | // KPrefsDialogWidBool *emailControlCenter = |
349 | // addWidBool(i18n("&Use email settings from Control Center"), | 349 | // addWidBool(i18n("&Use email settings from Control Center"), |
350 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 350 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
351 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 351 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
352 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 352 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
353 | // SLOT(toggleEmailSettings(bool))); | 353 | // SLOT(toggleEmailSettings(bool))); |
354 | 354 | ||
355 | mNameEdit = new QLineEdit(topFrame); | 355 | mNameEdit = new QLineEdit(topFrame); |
356 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 356 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
357 | topLayout->addWidget(mNameLabel,0,0); | 357 | topLayout->addWidget(mNameLabel,0,0); |
358 | topLayout->addWidget(mNameEdit,0,1); | 358 | topLayout->addWidget(mNameEdit,0,1); |
359 | 359 | ||
360 | mEmailEdit = new QLineEdit(topFrame); | 360 | mEmailEdit = new QLineEdit(topFrame); |
361 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 361 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
362 | topLayout->addWidget(mEmailLabel,1,0); | 362 | topLayout->addWidget(mEmailLabel,1,0); |
363 | topLayout->addWidget(mEmailEdit,1,1); | 363 | topLayout->addWidget(mEmailEdit,1,1); |
364 | KPrefsDialogWidBool *wb; | 364 | KPrefsDialogWidBool *wb; |
365 | 365 | ||
366 | 366 | ||
367 | 367 | ||
368 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), | 368 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), |
369 | &(KOPrefs::instance()->mShowFullMenu),topFrame); | 369 | &(KOPrefs::instance()->mShowFullMenu),topFrame); |
370 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); | 370 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); |
371 | 371 | ||
372 | 372 | ||
373 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), | 373 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), |
374 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); | 374 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); |
375 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); | 375 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); |
376 | 376 | ||
377 | 377 | ||
378 | KPrefsDialogWidBool *verticalScreen = | 378 | KPrefsDialogWidBool *verticalScreen = |
379 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 379 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
380 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 380 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
381 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 381 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
382 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); | 382 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); |
383 | 383 | ||
384 | 384 | ||
385 | int iii = 5; | 385 | int iii = 5; |
386 | widbool = addWidBool(i18n("Block popup until mouse button release"), | 386 | widbool = addWidBool(i18n("Block popup until mouse button release"), |
387 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); | 387 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); |
388 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); | 388 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); |
389 | ++iii; | 389 | ++iii; |
390 | QHBox *dummy = new QHBox(topFrame); | 390 | QHBox *dummy = new QHBox(topFrame); |
391 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 391 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
392 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 392 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
393 | 393 | ||
394 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); | 394 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); |
395 | 395 | ||
396 | ++iii; | 396 | ++iii; |
397 | 397 | ||
398 | 398 | ||
399 | // KPrefsDialogWidBool *bcc = | 399 | // KPrefsDialogWidBool *bcc = |
400 | // addWidBool(i18n("Send copy to owner when mailing events"), | 400 | // addWidBool(i18n("Send copy to owner when mailing events"), |
401 | // &(KOPrefs::instance()->mBcc),topFrame); | 401 | // &(KOPrefs::instance()->mBcc),topFrame); |
402 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 402 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
403 | 403 | ||
404 | 404 | ||
405 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 405 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
406 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 406 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
407 | 407 | ||
408 | // addWidBool(i18n("Enable automatic saving of calendar"), | 408 | // addWidBool(i18n("Enable automatic saving of calendar"), |
409 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 409 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
410 | 410 | ||
411 | QHBox *intervalBox = new QHBox(topFrame); | 411 | QHBox *intervalBox = new QHBox(topFrame); |
412 | // intervalBox->setSpacing(mSpacingHint); | 412 | // intervalBox->setSpacing(mSpacingHint); |
413 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); | 413 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); |
414 | ++iii; | 414 | ++iii; |
415 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 415 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
416 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 416 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
417 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 417 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
418 | /* | 418 | /* |
419 | QHBox * agendasize = new QHBox ( topFrame ); | 419 | QHBox * agendasize = new QHBox ( topFrame ); |
420 | 420 | ||
421 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 421 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
422 | 422 | ||
423 | 423 | ||
424 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 424 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
425 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 425 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
426 | */ | 426 | */ |
427 | 427 | ||
428 | 428 | ||
429 | KPrefsDialogWidBool *ask = | 429 | KPrefsDialogWidBool *ask = |
430 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 430 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
431 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 431 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
432 | topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); | 432 | topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); |
433 | ++iii; | 433 | ++iii; |
434 | 434 | ||
435 | 435 | ||
436 | /* | 436 | /* |
437 | KPrefsDialogWidBool *confirmCheck = | 437 | KPrefsDialogWidBool *confirmCheck = |
438 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 438 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
439 | topFrame); | 439 | topFrame); |
440 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 440 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
441 | 441 | ||
442 | 442 | ||
443 | mEnableGroupScheduling = | 443 | mEnableGroupScheduling = |
444 | addWidBool(i18n("Enable group scheduling"), | 444 | addWidBool(i18n("Enable group scheduling"), |
445 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 445 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
446 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 446 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
447 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 447 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
448 | SLOT(warningGroupScheduling())); | 448 | SLOT(warningGroupScheduling())); |
449 | 449 | ||
450 | mEnableProjectView = | 450 | mEnableProjectView = |
451 | addWidBool(i18n("Enable project view"), | 451 | addWidBool(i18n("Enable project view"), |
452 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 452 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
453 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 453 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
454 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 454 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
455 | SLOT(warningProjectView())); | 455 | SLOT(warningProjectView())); |
456 | 456 | ||
457 | // Can't be disabled anymore | 457 | // Can't be disabled anymore |
458 | mEnableGroupScheduling->checkBox()->hide(); | 458 | mEnableGroupScheduling->checkBox()->hide(); |
459 | 459 | ||
460 | // Disable setting, because this feature now becomes stable | 460 | // Disable setting, because this feature now becomes stable |
461 | mEnableProjectView->checkBox()->hide(); | 461 | mEnableProjectView->checkBox()->hide(); |
462 | 462 | ||
463 | KPrefsDialogWidRadios *defaultFormatGroup = | 463 | KPrefsDialogWidRadios *defaultFormatGroup = |
464 | addWidRadios(i18n("Default Calendar Format"), | 464 | addWidRadios(i18n("Default Calendar Format"), |
465 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 465 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
466 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 466 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
467 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 467 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
468 | 468 | ||
469 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 469 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
470 | 470 | ||
471 | // Default format unconditionally is iCalendar | 471 | // Default format unconditionally is iCalendar |
472 | defaultFormatGroup->groupBox()->hide(); | 472 | defaultFormatGroup->groupBox()->hide(); |
473 | 473 | ||
474 | KPrefsDialogWidRadios *mailClientGroup = | 474 | KPrefsDialogWidRadios *mailClientGroup = |
475 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 475 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
476 | topFrame); | 476 | topFrame); |
477 | mailClientGroup->addRadio(i18n("KMail")); | 477 | mailClientGroup->addRadio(i18n("KMail")); |
478 | mailClientGroup->addRadio(i18n("Sendmail")); | 478 | mailClientGroup->addRadio(i18n("Sendmail")); |
479 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 479 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
480 | 480 | ||
481 | KPrefsDialogWidBool *htmlsave = | 481 | KPrefsDialogWidBool *htmlsave = |
482 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 482 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
483 | topFrame); | 483 | topFrame); |
484 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 484 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
485 | 485 | ||
486 | KPrefsDialogWidRadios *destinationGroup = | 486 | KPrefsDialogWidRadios *destinationGroup = |
487 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 487 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
488 | topFrame); | 488 | topFrame); |
489 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 489 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
490 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 490 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
491 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 491 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
492 | 492 | ||
493 | topLayout->setRowStretch(14,1); | 493 | topLayout->setRowStretch(14,1); |
494 | */ | 494 | */ |
495 | } | 495 | } |
496 | 496 | ||
497 | 497 | ||
498 | void KOPrefsDialog::setupTimeTab() | 498 | void KOPrefsDialog::setupTimeTab() |
499 | { | 499 | { |
500 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 500 | QFrame *topFrame = addPage(i18n("Time"),0,0); |
501 | // DesktopIcon("clock",KIcon::SizeMedium)); | 501 | // DesktopIcon("clock",KIcon::SizeMedium)); |
502 | 502 | ||
503 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 503 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
504 | topLayout->setSpacing(mSpacingHint); | 504 | topLayout->setSpacing(mSpacingHint); |
505 | topLayout->setMargin(mMarginHint); | 505 | topLayout->setMargin(mMarginHint); |
506 | 506 | ||
507 | QHBox *dummy = new QHBox(topFrame); | 507 | QHBox *dummy = new QHBox(topFrame); |
508 | KPrefsDialogWidTime *dayBegins = | 508 | KPrefsDialogWidTime *dayBegins = |
509 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 509 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
510 | dummy); | 510 | dummy); |
511 | //topLayout->addWidget(dayBegins->label(),2,0); | 511 | //topLayout->addWidget(dayBegins->label(),2,0); |
512 | 512 | ||
513 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 513 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
514 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 514 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
515 | 515 | ||
516 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 516 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
517 | topFrame),1,0); | 517 | topFrame),1,0); |
518 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 518 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
519 | mStartTimeSpin->setSuffix(":00"); | 519 | mStartTimeSpin->setSuffix(":00"); |
520 | topLayout->addWidget(mStartTimeSpin,1,1); | 520 | topLayout->addWidget(mStartTimeSpin,1,1); |
521 | 521 | ||
522 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 522 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
523 | topFrame),2,0); | 523 | topFrame),2,0); |
524 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 524 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
525 | mDefaultDurationSpin->setSuffix(":00"); | 525 | mDefaultDurationSpin->setSuffix(":00"); |
526 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 526 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
527 | 527 | ||
528 | QStringList alarmList; | 528 | QStringList alarmList; |
529 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 529 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
530 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 530 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
531 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 531 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
532 | 3,0); | 532 | 3,0); |
533 | mAlarmTimeCombo = new QComboBox(topFrame); | 533 | mAlarmTimeCombo = new QComboBox(topFrame); |
534 | mAlarmTimeCombo->insertStringList(alarmList); | 534 | mAlarmTimeCombo->insertStringList(alarmList); |
535 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 535 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
536 | 536 | ||
537 | 537 | ||
538 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 538 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
539 | i18n("Working Hours"), | 539 | i18n("Working Hours"), |
540 | topFrame); | 540 | topFrame); |
541 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 541 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); |
542 | workingHoursGroup->layout()->setSpacing( 0 ); | 542 | workingHoursGroup->layout()->setSpacing( 0 ); |
543 | workingHoursGroup->layout()->setMargin( 4 ); | 543 | workingHoursGroup->layout()->setMargin( 4 ); |
544 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 544 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
545 | // workStartBox->setMargin( 0 ); | 545 | // workStartBox->setMargin( 0 ); |
546 | addWidTime(i18n("Daily starting hour:"), | 546 | addWidTime(i18n("Daily starting hour:"), |
547 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 547 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
548 | 548 | ||
549 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 549 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
550 | //workEndBox->setMargin( 0 ); | 550 | //workEndBox->setMargin( 0 ); |
551 | addWidTime(i18n("Daily ending hour:"), | 551 | addWidTime(i18n("Daily ending hour:"), |
552 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 552 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
553 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 553 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
554 | //excludeBox->setMargin( 0 ); | 554 | //excludeBox->setMargin( 0 ); |
555 | addWidBool(i18n("Exclude holidays"), | 555 | addWidBool(i18n("Exclude holidays"), |
556 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 556 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
557 | 557 | ||
558 | addWidBool(i18n("Exclude Saturdays"), | 558 | addWidBool(i18n("Exclude Saturdays"), |
559 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 559 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
560 | 560 | ||
561 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 561 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
562 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 562 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
563 | // topFrame); | 563 | // topFrame); |
564 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 564 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
565 | 565 | ||
566 | // topLayout->setRowStretch(6,1); | 566 | // topLayout->setRowStretch(6,1); |
567 | } | 567 | } |
568 | 568 | ||
569 | 569 | ||
570 | void KOPrefsDialog::setupViewsTab() | 570 | void KOPrefsDialog::setupViewsTab() |
571 | { | 571 | { |
572 | 572 | ||
573 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 573 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
574 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 574 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
575 | 575 | ||
576 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 576 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
577 | topLayout->setSpacing(mSpacingHint); | 577 | topLayout->setSpacing(mSpacingHint); |
578 | topLayout->setMargin(mMarginHint); | 578 | topLayout->setMargin(mMarginHint); |
579 | 579 | ||
580 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 580 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
581 | // topLayout->addLayout(dayBeginsLayout,0,0); | 581 | // topLayout->addLayout(dayBeginsLayout,0,0); |
582 | 582 | ||
583 | // KPrefsDialogWidTime *dayBegins = | 583 | // KPrefsDialogWidTime *dayBegins = |
584 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 584 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
585 | // topFrame); | 585 | // topFrame); |
586 | // dayBeginsLayout->addWidget(dayBegins->label()); | 586 | // dayBeginsLayout->addWidget(dayBegins->label()); |
587 | // dayBeginsLayout->addStretch(1); | 587 | // dayBeginsLayout->addStretch(1); |
588 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 588 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
589 | 589 | ||
590 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 590 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
591 | // topLayout->addLayout(nextDaysLayout,1,0); | 591 | // topLayout->addLayout(nextDaysLayout,1,0); |
592 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 592 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
593 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 593 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
594 | // nextDaysLayout->addStretch(1); | 594 | // nextDaysLayout->addStretch(1); |
595 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 595 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
596 | 596 | ||
597 | 597 | ||
598 | int ii = 0; | 598 | int ii = 0; |
599 | KPrefsDialogWidBool *dummy = | 599 | KPrefsDialogWidBool *dummy = |
600 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 600 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
601 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 601 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
602 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 602 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
603 | 603 | ||
604 | 604 | ||
605 | 605 | ||
606 | 606 | ||
607 | 607 | ||
608 | 608 | ||
609 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 609 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
610 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 610 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
611 | //topLayout->setRowStretch(11,1); | 611 | //topLayout->setRowStretch(11,1); |
612 | 612 | ||
613 | 613 | ||
614 | 614 | ||
615 | 615 | ||
616 | #if 0 | 616 | #if 0 |
617 | 617 | ||
618 | topFrame = addPage(i18n("ViewChange"),0,0); | 618 | topFrame = addPage(i18n("ViewChange"),0,0); |
619 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 619 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
620 | 620 | ||
621 | topLayout = new QGridLayout(topFrame,6,1); | 621 | topLayout = new QGridLayout(topFrame,6,1); |
622 | topLayout->setSpacing(mSpacingHint); | 622 | topLayout->setSpacing(mSpacingHint); |
623 | topLayout->setMargin(mMarginHint); | 623 | topLayout->setMargin(mMarginHint); |
624 | ii = 0; | 624 | ii = 0; |
625 | 625 | ||
626 | #endif | 626 | #endif |
627 | 627 | ||
628 | dummy = | 628 | dummy = |
629 | addWidBool(i18n("Hold fullscreen on view change"), | 629 | addWidBool(i18n("Hold fullscreen on view change"), |
630 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 630 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
631 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 631 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
632 | 632 | ||
633 | dummy = | 633 | dummy = |
634 | addWidBool(i18n("Hold non-fullscreen on view change"), | 634 | addWidBool(i18n("Hold non-fullscreen on view change"), |
635 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 635 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
636 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 636 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
637 | 637 | ||
638 | 638 | ||
639 | 639 | ||
640 | KPrefsDialogWidBool *fullViewMonth = | 640 | KPrefsDialogWidBool *fullViewMonth = |
641 | addWidBool(i18n("Next days view uses full window"), | 641 | addWidBool(i18n("Next days view uses full window"), |
642 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 642 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
643 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 643 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
644 | 644 | ||
645 | 645 | ||
646 | KPrefsDialogWidBool *fullViewTodo = | 646 | KPrefsDialogWidBool *fullViewTodo = |
647 | addWidBool(i18n("Event list view uses full window"), | 647 | addWidBool(i18n("Event list view uses full window"), |
648 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 648 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
649 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 649 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
650 | dummy = | 650 | dummy = |
651 | addWidBool(i18n("Listview uses monthly timespan"), | 651 | addWidBool(i18n("Listview uses monthly timespan"), |
652 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 652 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
653 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 653 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
654 | dummy = | 654 | dummy = |
655 | addWidBool(i18n("Highlight selection in Time Edit"), | 655 | addWidBool(i18n("Highlight selection in Time Edit"), |
656 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 656 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
657 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 657 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
658 | 658 | ||
659 | KPrefsDialogWidBool *dailyRecur = | 659 | KPrefsDialogWidBool *dailyRecur = |
660 | addWidBool(i18n("Show events that recur daily in date nav."), | 660 | addWidBool(i18n("Show events that recur daily in date nav."), |
661 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 661 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
662 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 662 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
663 | 663 | ||
664 | KPrefsDialogWidBool *weeklyRecur = | 664 | KPrefsDialogWidBool *weeklyRecur = |
665 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 665 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
666 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 666 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
667 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 667 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
668 | 668 | ||
669 | #ifdef DESKTOP_VERSION | 669 | #ifdef DESKTOP_VERSION |
670 | KPrefsDialogWidBool *enableToolTips = | 670 | KPrefsDialogWidBool *enableToolTips = |
671 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 671 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
672 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 672 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
673 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 673 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
674 | #endif | 674 | #endif |
675 | // ********************************************************* | 675 | // ********************************************************* |
676 | 676 | ||
677 | topFrame = addPage(i18n("Agenda View"),0,0); | 677 | topFrame = addPage(i18n("Agenda View"),0,0); |
678 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 678 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
679 | 679 | ||
680 | topLayout = new QGridLayout(topFrame,5,1); | 680 | topLayout = new QGridLayout(topFrame,5,1); |
681 | topLayout->setSpacing(mSpacingHint); | 681 | topLayout->setSpacing(mSpacingHint); |
682 | topLayout->setMargin(mMarginHint); | 682 | topLayout->setMargin(mMarginHint); |
683 | ii = 0; | 683 | ii = 0; |
684 | 684 | ||
685 | 685 | ||
686 | dummy = | 686 | dummy = |
687 | addWidBool(i18n("Show time in agenda items"), | 687 | addWidBool(i18n("Show time in agenda items"), |
688 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); | 688 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); |
689 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 689 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
690 | 690 | ||
691 | dummy = | 691 | dummy = |
692 | addWidBool(i18n("Highlight current day in agenda"), | 692 | addWidBool(i18n("Highlight current day in agenda"), |
693 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 693 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
694 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 694 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
695 | 695 | ||
696 | dummy = | 696 | dummy = |
697 | addWidBool(i18n("Use light color for highlight current day"), | 697 | addWidBool(i18n("Use light color for highlight current day"), |
698 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 698 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
699 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 699 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
700 | 700 | ||
701 | 701 | ||
702 | KPrefsDialogWidBool *marcusBainsEnabled = | 702 | KPrefsDialogWidBool *marcusBainsEnabled = |
703 | addWidBool(i18n("Show current time"), | 703 | addWidBool(i18n("Show current time"), |
704 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 704 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
705 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 705 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
706 | 706 | ||
707 | 707 | ||
708 | dummy = | 708 | dummy = |
709 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 709 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
710 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 710 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
711 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 711 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
712 | 712 | ||
713 | dummy = | 713 | dummy = |
714 | addWidBool(i18n("Set agenda to current time on change"), | 714 | addWidBool(i18n("Set agenda to current time on change"), |
715 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 715 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
716 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 716 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
717 | 717 | ||
718 | 718 | ||
719 | dummy = | ||
720 | addWidBool(i18n("Allday Agenda view shows todos"), | ||
721 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | ||
722 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
723 | |||
724 | |||
725 | |||
726 | dummy = | ||
727 | addWidBool(i18n("Agenda view shows completed todos"), | ||
728 | &(KOPrefs::instance()->mShowCompletedTodoInAgenda),topFrame); | ||
729 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
719 | 730 | ||
720 | 731 | ||
721 | 732 | ||
722 | 733 | ||
723 | 734 | ||
724 | topFrame = addPage(i18n("Month View"),0,0); | 735 | topFrame = addPage(i18n("Month View"),0,0); |
725 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 736 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
726 | 737 | ||
727 | topLayout = new QGridLayout(topFrame,5,1); | 738 | topLayout = new QGridLayout(topFrame,5,1); |
728 | topLayout->setSpacing(mSpacingHint); | 739 | topLayout->setSpacing(mSpacingHint); |
729 | topLayout->setMargin(mMarginHint); | 740 | topLayout->setMargin(mMarginHint); |
730 | ii = 0; | 741 | ii = 0; |
731 | QLabel *lab; | 742 | QLabel *lab; |
732 | QHBox *habo = new QHBox( topFrame ); | 743 | QHBox *habo = new QHBox( topFrame ); |
733 | if ( QApplication::desktop()->width() <= 480 ) { | 744 | if ( QApplication::desktop()->width() <= 480 ) { |
734 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 745 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
735 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 746 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
736 | ii++; | 747 | ii++; |
737 | } else { | 748 | } else { |
738 | new QLabel ( i18n("Show events that recur "), habo ); | 749 | new QLabel ( i18n("Show events that recur "), habo ); |
739 | } | 750 | } |
740 | dailyRecur = | 751 | dailyRecur = |
741 | addWidBool(i18n("daily"), | 752 | addWidBool(i18n("daily"), |
742 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 753 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
743 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 754 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
744 | 755 | ||
745 | weeklyRecur = | 756 | weeklyRecur = |
746 | addWidBool(i18n("weekly"), | 757 | addWidBool(i18n("weekly"), |
747 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 758 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
748 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 759 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
749 | ii++; | 760 | ii++; |
750 | 761 | ||
751 | 762 | ||
752 | habo = new QHBox( topFrame ); | 763 | habo = new QHBox( topFrame ); |
753 | if ( QApplication::desktop()->width() <= 480 ) { | 764 | if ( QApplication::desktop()->width() <= 480 ) { |
754 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 765 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
755 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 766 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
756 | ii++; | 767 | ii++; |
757 | 768 | ||
758 | } else { | 769 | } else { |
759 | new QLabel ( i18n("Show in every cell "), habo ); | 770 | new QLabel ( i18n("Show in every cell "), habo ); |
760 | } | 771 | } |
761 | weeklyRecur = | 772 | weeklyRecur = |
762 | addWidBool(i18n("short month"), | 773 | addWidBool(i18n("short month"), |
763 | &(KOPrefs::instance()->mMonthShowShort),habo); | 774 | &(KOPrefs::instance()->mMonthShowShort),habo); |
764 | weeklyRecur = | 775 | weeklyRecur = |
765 | addWidBool(i18n("icons"), | 776 | addWidBool(i18n("icons"), |
766 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 777 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
767 | weeklyRecur = | 778 | weeklyRecur = |
768 | addWidBool(i18n("times"), | 779 | addWidBool(i18n("times"), |
769 | &(KOPrefs::instance()->mMonthShowTimes),habo); | 780 | &(KOPrefs::instance()->mMonthShowTimes),habo); |
770 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 781 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
771 | ii++; | 782 | ii++; |
772 | #ifdef DESKTOP_VERSION | 783 | #ifdef DESKTOP_VERSION |
773 | KPrefsDialogWidBool *enableMonthScroll = | 784 | KPrefsDialogWidBool *enableMonthScroll = |
774 | addWidBool(i18n("Enable scrollbars in month view cells"), | 785 | addWidBool(i18n("Enable scrollbars in month view cells"), |
775 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 786 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
776 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 787 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
777 | #endif | 788 | #endif |
778 | dummy = | 789 | dummy = |
779 | addWidBool(i18n("Week view mode uses bigger font"), | 790 | addWidBool(i18n("Week view mode uses bigger font"), |
780 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); | 791 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); |
781 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 792 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
782 | dummy = | 793 | dummy = |
783 | addWidBool(i18n("Show Sat/Sun together"), | 794 | addWidBool(i18n("Show Sat/Sun together"), |
784 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 795 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
785 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 796 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
786 | 797 | ||
787 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 798 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
788 | addWidBool(i18n("Month view uses category colors"), | 799 | addWidBool(i18n("Month view uses category colors"), |
789 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 800 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
790 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 801 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
791 | 802 | ||
792 | dummy = | 803 | dummy = |
793 | addWidBool(i18n("Categorie colors are applied to text"), | 804 | addWidBool(i18n("Category colors are applied to text"), |
794 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 805 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
795 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 806 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
796 | coloredCategoriesInMonthView = | 807 | coloredCategoriesInMonthView = |
797 | addWidBool(i18n("Month view uses day colors"), | 808 | addWidBool(i18n("Month view uses day colors"), |
798 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 809 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
799 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 810 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
800 | 811 | ||
801 | KPrefsDialogWidColor *holidayColor = | 812 | KPrefsDialogWidColor *holidayColor = |
802 | addWidColor(i18n("Day color odd months"), | 813 | addWidColor(i18n("Day color odd months"), |
803 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 814 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
804 | topLayout->addWidget(holidayColor->label(),ii,0); | 815 | topLayout->addWidget(holidayColor->label(),ii,0); |
805 | topLayout->addWidget(holidayColor->button(),ii++,1); | 816 | topLayout->addWidget(holidayColor->button(),ii++,1); |
806 | 817 | ||
807 | holidayColor = | 818 | holidayColor = |
808 | addWidColor(i18n("Day color even months"), | 819 | addWidColor(i18n("Day color even months"), |
809 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 820 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
810 | topLayout->addWidget(holidayColor->label(),ii,0); | 821 | topLayout->addWidget(holidayColor->label(),ii,0); |
811 | topLayout->addWidget(holidayColor->button(),ii++,1); | 822 | topLayout->addWidget(holidayColor->button(),ii++,1); |
812 | 823 | ||
813 | 824 | ||
814 | holidayColor = | 825 | holidayColor = |
815 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 826 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
816 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 827 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
817 | topLayout->addWidget(holidayColor->label(),ii,0); | 828 | topLayout->addWidget(holidayColor->label(),ii,0); |
818 | topLayout->addWidget(holidayColor->button(),ii++,1); | 829 | topLayout->addWidget(holidayColor->button(),ii++,1); |
819 | // *********************** What'sNext View | 830 | // *********************** What'sNext View |
820 | topFrame = addPage(i18n("What's Next View"),0,0); | 831 | topFrame = addPage(i18n("What's Next View"),0,0); |
821 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 832 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
822 | 833 | ||
823 | topLayout = new QGridLayout(topFrame,4,1); | 834 | topLayout = new QGridLayout(topFrame,4,1); |
824 | topLayout->setSpacing(mSpacingHint); | 835 | topLayout->setSpacing(mSpacingHint); |
825 | topLayout->setMargin(mMarginHint); | 836 | topLayout->setMargin(mMarginHint); |
826 | ii = 0; | 837 | ii = 0; |
827 | 838 | ||
828 | 839 | ||
829 | QHBox* hdummy = new QHBox(topFrame); | 840 | QHBox* hdummy = new QHBox(topFrame); |
830 | new QLabel(i18n("Days in What's Next:"),hdummy); | 841 | new QLabel(i18n("Days in What's Next:"),hdummy); |
831 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); | 842 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); |
832 | 843 | ||
833 | topLayout->addWidget(hdummy,ii++,0); | 844 | topLayout->addWidget(hdummy,ii++,0); |
834 | 845 | ||
835 | QHBox *prioBox = new QHBox(topFrame); | 846 | QHBox *prioBox = new QHBox(topFrame); |
836 | // intervalBox->setSpacing(mSpacingHint); | 847 | // intervalBox->setSpacing(mSpacingHint); |
837 | topLayout->addWidget(prioBox,ii++,0); | 848 | topLayout->addWidget(prioBox,ii++,0); |
838 | 849 | ||
839 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); | 850 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); |
840 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 851 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
841 | if ( QApplication::desktop()->width() < 300 ) | 852 | if ( QApplication::desktop()->width() < 300 ) |
842 | mPrioSpin->setFixedWidth( 40 ); | 853 | mPrioSpin->setFixedWidth( 40 ); |
843 | 854 | ||
844 | KPrefsDialogWidBool *passwdk = | 855 | KPrefsDialogWidBool *passwdk = |
845 | 856 | ||
846 | addWidBool(i18n("Show events, that are done"), | 857 | addWidBool(i18n("Show events that are done"), |
847 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); | 858 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); |
848 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 859 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
849 | passwdk = | 860 | passwdk = |
850 | addWidBool(i18n("Show parent To-Do's"), | 861 | addWidBool(i18n("Show parent To-Do's"), |
851 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 862 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
852 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 863 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
853 | 864 | ||
854 | passwdk = | 865 | passwdk = |
855 | addWidBool(i18n("Show location"), | 866 | addWidBool(i18n("Show location"), |
856 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 867 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
857 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 868 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
858 | 869 | ||
859 | 870 | ||
860 | passwdk = | 871 | passwdk = |
861 | addWidBool(i18n("Use short date in WN+Event view"), | 872 | addWidBool(i18n("Use short date in WN+Event view"), |
862 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 873 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
863 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 874 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
864 | 875 | ||
865 | 876 | ||
866 | 877 | ||
867 | 878 | ||
868 | // *********************** Todo View | 879 | // *********************** Todo View |
869 | 880 | ||
870 | topFrame = addPage(i18n("Todo View"),0,0); | 881 | topFrame = addPage(i18n("Todo View"),0,0); |
871 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 882 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
872 | 883 | ||
873 | topLayout = new QGridLayout(topFrame,4,1); | 884 | topLayout = new QGridLayout(topFrame,4,1); |
874 | topLayout->setSpacing(mSpacingHint); | 885 | topLayout->setSpacing(mSpacingHint); |
875 | topLayout->setMargin(mMarginHint); | 886 | topLayout->setMargin(mMarginHint); |
876 | ii = 0; | 887 | ii = 0; |
877 | dummy = | 888 | dummy = |
878 | addWidBool(i18n("Hide not running Todos in To-do view"), | 889 | addWidBool(i18n("Hide not running Todos in To-do view"), |
879 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); | 890 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); |
880 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 891 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
881 | 892 | ||
882 | 893 | ||
883 | KPrefsDialogWidBool *showCompletedTodo = | 894 | KPrefsDialogWidBool *showCompletedTodo = |
884 | addWidBool(i18n("To-do view shows completed Todos"), | 895 | addWidBool(i18n("To-do view shows completed Todos"), |
885 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 896 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
886 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 897 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
887 | dummy = | 898 | dummy = |
888 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 899 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
889 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 900 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
890 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 901 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
891 | 902 | ||
892 | dummy = | 903 | dummy = |
893 | addWidBool(i18n("Small To-do view uses smaller font"), | 904 | addWidBool(i18n("Small To-do view uses smaller font"), |
894 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 905 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
895 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 906 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
896 | 907 | ||
897 | 908 | ||
898 | 909 | ||
899 | dummy = | 910 | dummy = |
900 | addWidBool(i18n("Todo view uses category colors"), | 911 | addWidBool(i18n("Todo view uses category colors"), |
901 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 912 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
902 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 913 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
903 | 914 | ||
904 | 915 | ||
905 | QWidget* wid = new QWidget( topFrame ); | 916 | QWidget* wid = new QWidget( topFrame ); |
906 | // Todo run today color | 917 | // Todo run today color |
907 | KPrefsDialogWidColor *todoRunColor = | 918 | KPrefsDialogWidColor *todoRunColor = |
908 | addWidColor(i18n("Color for running todos:"), | 919 | addWidColor(i18n("Color for running todos:"), |
909 | &(KOPrefs::instance()->mTodoRunColor),wid); | 920 | &(KOPrefs::instance()->mTodoRunColor),wid); |
910 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 921 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
911 | widLayout->addWidget( todoRunColor->label() ); | 922 | widLayout->addWidget( todoRunColor->label() ); |
912 | widLayout->addWidget( todoRunColor->button() ); | 923 | widLayout->addWidget( todoRunColor->button() ); |
913 | topLayout->addWidget(wid,ii++,0); | 924 | topLayout->addWidget(wid,ii++,0); |
914 | 925 | ||
915 | wid = new QWidget( topFrame ); | 926 | wid = new QWidget( topFrame ); |
916 | // Todo due today color | 927 | // Todo due today color |
917 | KPrefsDialogWidColor *todoDueTodayColor = | 928 | KPrefsDialogWidColor *todoDueTodayColor = |
918 | addWidColor(i18n("Todo due today color:"), | 929 | addWidColor(i18n("Todo due today color:"), |
919 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 930 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
920 | widLayout = new QHBoxLayout(wid); | 931 | widLayout = new QHBoxLayout(wid); |
921 | widLayout->addWidget( todoDueTodayColor->label() ); | 932 | widLayout->addWidget( todoDueTodayColor->label() ); |
922 | widLayout->addWidget( todoDueTodayColor->button() ); | 933 | widLayout->addWidget( todoDueTodayColor->button() ); |
923 | topLayout->addWidget(wid,ii++,0); | 934 | topLayout->addWidget(wid,ii++,0); |
924 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 935 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
925 | 936 | ||
926 | // Todo overdue color | 937 | // Todo overdue color |
927 | wid = new QWidget( topFrame ); | 938 | wid = new QWidget( topFrame ); |
928 | widLayout = new QHBoxLayout(wid); | 939 | widLayout = new QHBoxLayout(wid); |
929 | KPrefsDialogWidColor *todoOverdueColor = | 940 | KPrefsDialogWidColor *todoOverdueColor = |
930 | addWidColor(i18n("Todo overdue color:"), | 941 | addWidColor(i18n("Todo overdue color:"), |
931 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 942 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
932 | widLayout->addWidget(todoOverdueColor->label()); | 943 | widLayout->addWidget(todoOverdueColor->label()); |
933 | widLayout->addWidget(todoOverdueColor->button()); | 944 | widLayout->addWidget(todoOverdueColor->button()); |
934 | topLayout->addWidget(wid,ii++,0); | 945 | topLayout->addWidget(wid,ii++,0); |
935 | 946 | ||
936 | dummy = | 947 | dummy = |
937 | addWidBool(i18n("Colors are applied to text"), | 948 | addWidBool(i18n("Colors are applied to text"), |
938 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 949 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
939 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 950 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
940 | 951 | ||
941 | dummy = | ||
942 | addWidBool(i18n("Allday Agenda view shows todos"), | ||
943 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | ||
944 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
945 | 952 | ||
946 | 953 | ||
947 | topFrame = addPage(i18n("View Options"),0,0); | 954 | topFrame = addPage(i18n("View Options"),0,0); |
948 | 955 | ||
949 | topLayout = new QGridLayout(topFrame,4,1); | 956 | topLayout = new QGridLayout(topFrame,4,1); |
950 | topLayout->setSpacing(mSpacingHint); | 957 | topLayout->setSpacing(mSpacingHint); |
951 | topLayout->setMargin(mMarginHint); | 958 | topLayout->setMargin(mMarginHint); |
952 | ii = 0; | 959 | ii = 0; |
953 | 960 | ||
954 | dummy = | 961 | dummy = |
955 | addWidBool(i18n("Show Sync Events"), | 962 | addWidBool(i18n("Show Sync Events"), |
956 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 963 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
957 | topLayout->addWidget(dummy->checkBox(), ii++,0); | 964 | topLayout->addWidget(dummy->checkBox(), ii++,0); |
958 | 965 | ||
959 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); | 966 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); |
960 | topLayout->addWidget(lab ,ii++,0); | 967 | topLayout->addWidget(lab ,ii++,0); |
961 | 968 | ||
962 | dummy = addWidBool(i18n("Details"), | 969 | dummy = addWidBool(i18n("Details"), |
963 | &(KOPrefs::instance()->mEVshowDetails),topFrame); | 970 | &(KOPrefs::instance()->mEVshowDetails),topFrame); |
964 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 971 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
965 | dummy = addWidBool(i18n("Created time"), | 972 | dummy = addWidBool(i18n("Created time"), |
966 | &(KOPrefs::instance()->mEVshowCreated),topFrame); | 973 | &(KOPrefs::instance()->mEVshowCreated),topFrame); |
967 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 974 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
968 | dummy = addWidBool(i18n("Last modified time"), | 975 | dummy = addWidBool(i18n("Last modified time"), |
969 | &(KOPrefs::instance()->mEVshowChanged),topFrame); | 976 | &(KOPrefs::instance()->mEVshowChanged),topFrame); |
970 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 977 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
971 | 978 | ||
972 | 979 | ||
973 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); | 980 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); |
974 | topLayout->addWidget(lab ,ii++,0); | 981 | topLayout->addWidget(lab ,ii++,0); |
975 | 982 | ||
976 | dummy = addWidBool(i18n("Details"), | 983 | dummy = addWidBool(i18n("Details"), |
977 | &(KOPrefs::instance()->mWTshowDetails),topFrame); | 984 | &(KOPrefs::instance()->mWTshowDetails),topFrame); |
978 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 985 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
979 | dummy = addWidBool(i18n("Created time"), | 986 | dummy = addWidBool(i18n("Created time"), |
980 | &(KOPrefs::instance()->mWTshowCreated),topFrame); | 987 | &(KOPrefs::instance()->mWTshowCreated),topFrame); |
981 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 988 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
982 | dummy = addWidBool(i18n("Last modified time"), | 989 | dummy = addWidBool(i18n("Last modified time"), |
983 | &(KOPrefs::instance()->mWTshowChanged),topFrame); | 990 | &(KOPrefs::instance()->mWTshowChanged),topFrame); |
984 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 991 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
985 | 992 | ||
986 | 993 | ||
987 | topFrame = addPage(i18n("Alarm"),0,0); | 994 | topFrame = addPage(i18n("Alarm"),0,0); |
988 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 995 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
989 | 996 | ||
990 | topLayout = new QGridLayout(topFrame,2,1); | 997 | topLayout = new QGridLayout(topFrame,2,1); |
991 | topLayout->setSpacing(mSpacingHint); | 998 | topLayout->setSpacing(mSpacingHint); |
992 | topLayout->setMargin(mMarginHint); | 999 | topLayout->setMargin(mMarginHint); |
993 | int iii = 0; | 1000 | int iii = 0; |
994 | 1001 | ||
995 | dummy = | 1002 | dummy = |
996 | addWidBool(i18n("Use internal alarm notification"), | 1003 | addWidBool(i18n("Use internal alarm notification"), |
997 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 1004 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
998 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 1005 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
999 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); | 1006 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); |
1000 | 1007 | ||
1001 | topLayout->addWidget(lab ,iii++,0); | 1008 | topLayout->addWidget(lab ,iii++,0); |
1002 | #ifndef DESKTOP_VERSION | 1009 | #ifndef DESKTOP_VERSION |
1003 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 1010 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
1004 | #else | 1011 | #else |
1005 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 1012 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
1006 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 1013 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
1007 | #endif | 1014 | #endif |
1008 | 1015 | ||
1009 | QHBox* dummyBox = new QHBox(topFrame); | 1016 | QHBox* dummyBox = new QHBox(topFrame); |
1010 | new QLabel(i18n("Play beeps count:"),dummyBox); | 1017 | new QLabel(i18n("Play beeps count:"),dummyBox); |
1011 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 1018 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
1012 | topLayout->addWidget(dummyBox,iii++,0); | 1019 | topLayout->addWidget(dummyBox,iii++,0); |
1013 | 1020 | ||
1014 | dummyBox = new QHBox(topFrame); | 1021 | dummyBox = new QHBox(topFrame); |
1015 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 1022 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
1016 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 1023 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
1017 | topLayout->addWidget(dummyBox,iii++,0); | 1024 | topLayout->addWidget(dummyBox,iii++,0); |
1018 | 1025 | ||
1019 | dummyBox = new QHBox(topFrame); | 1026 | dummyBox = new QHBox(topFrame); |
1020 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 1027 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
1021 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 1028 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
1022 | topLayout->addWidget(dummyBox,iii++,0); | 1029 | topLayout->addWidget(dummyBox,iii++,0); |
1023 | 1030 | ||
1024 | dummyBox = new QHBox(topFrame); | 1031 | dummyBox = new QHBox(topFrame); |
1025 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 1032 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
1026 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 1033 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
1027 | topLayout->addWidget(dummyBox,iii++,0); | 1034 | topLayout->addWidget(dummyBox,iii++,0); |
1028 | 1035 | ||
1029 | 1036 | ||
1030 | 1037 | ||
1031 | QHBox* hbo = new QHBox ( topFrame ); | 1038 | QHBox* hbo = new QHBox ( topFrame ); |
1032 | mDefaultAlarmFile = new QLineEdit(hbo); | 1039 | mDefaultAlarmFile = new QLineEdit(hbo); |
1033 | QPushButton * loadTemplate = new QPushButton(hbo); | 1040 | QPushButton * loadTemplate = new QPushButton(hbo); |
1034 | QPixmap icon; | 1041 | QPixmap icon; |
1035 | if ( QApplication::desktop()->width() < 321 ) | 1042 | if ( QApplication::desktop()->width() < 321 ) |
1036 | icon = SmallIcon("fileimport16"); | 1043 | icon = SmallIcon("fileimport16"); |
1037 | else | 1044 | else |
1038 | icon = SmallIcon("fileimport"); | 1045 | icon = SmallIcon("fileimport"); |
1039 | loadTemplate->setIconSet (icon ) ; | 1046 | loadTemplate->setIconSet (icon ) ; |
1040 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); | 1047 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); |
1041 | int size = loadTemplate->sizeHint().height(); | 1048 | int size = loadTemplate->sizeHint().height(); |
1042 | loadTemplate->setFixedSize( size, size ); | 1049 | loadTemplate->setFixedSize( size, size ); |
1043 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); | 1050 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); |
1044 | // topLayout->addWidget(lab ,iii++,0); | 1051 | // topLayout->addWidget(lab ,iii++,0); |
1045 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); | 1052 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); |
1046 | topLayout->addWidget(lab ,iii++,0); | 1053 | topLayout->addWidget(lab ,iii++,0); |
1047 | topLayout->addWidget(hbo,iii++,0); | 1054 | topLayout->addWidget(hbo,iii++,0); |
1048 | // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); | 1055 | // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); |
1049 | 1056 | ||
1050 | // topLayout->addWidget(lab ,iii++,0); | 1057 | // topLayout->addWidget(lab ,iii++,0); |
1051 | // #ifndef DESKTOP_VERSION | 1058 | // #ifndef DESKTOP_VERSION |
1052 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 1059 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
1053 | // #else | 1060 | // #else |
1054 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 1061 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
1055 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 1062 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
1056 | // #endif | 1063 | // #endif |
1057 | 1064 | ||
1058 | 1065 | ||
1059 | } | 1066 | } |
1060 | 1067 | ||
1061 | void KOPrefsDialog::selectSoundFile() | 1068 | void KOPrefsDialog::selectSoundFile() |
1062 | { | 1069 | { |
1063 | QString fileName = mDefaultAlarmFile->text(); | 1070 | QString fileName = mDefaultAlarmFile->text(); |
1064 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); | 1071 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); |
1065 | if ( fileName.length() > 0 ) | 1072 | if ( fileName.length() > 0 ) |
1066 | mDefaultAlarmFile->setText( fileName ); | 1073 | mDefaultAlarmFile->setText( fileName ); |
1067 | } | 1074 | } |
1068 | void KOPrefsDialog::setupFontsTab() | 1075 | void KOPrefsDialog::setupFontsTab() |
1069 | { | 1076 | { |
1070 | 1077 | ||
1071 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 1078 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
1072 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 1079 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
1073 | 1080 | ||
1074 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 1081 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
1075 | topLayout->setSpacing(1); | 1082 | topLayout->setSpacing(1); |
1076 | topLayout->setMargin(3); | 1083 | topLayout->setMargin(3); |
1077 | KPrefsDialogWidFont * tVFont; | 1084 | KPrefsDialogWidFont * tVFont; |
1078 | int i = 0; | 1085 | int i = 0; |
1079 | KPrefsDialogWidFont *timeLabelsFont = | 1086 | KPrefsDialogWidFont *timeLabelsFont = |
1080 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), | 1087 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), |
1081 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); | 1088 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); |
1082 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 1089 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
1083 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 1090 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
1084 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 1091 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
1085 | ++i; | 1092 | ++i; |
1086 | 1093 | ||
1087 | 1094 | ||
1088 | timeLabelsFont = | 1095 | timeLabelsFont = |
1089 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), | 1096 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), |
1090 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); | 1097 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); |
1091 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 1098 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
1092 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 1099 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
1093 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 1100 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
1094 | ++i; | 1101 | ++i; |
1095 | 1102 | ||
1096 | KPrefsDialogWidFont *timeBarFont = | 1103 | KPrefsDialogWidFont *timeBarFont = |
1097 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), | 1104 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), |
1098 | &(KOPrefs::instance()->mTimeBarFont),topFrame); | 1105 | &(KOPrefs::instance()->mTimeBarFont),topFrame); |
1099 | topLayout->addWidget(timeBarFont->label(),i,0); | 1106 | topLayout->addWidget(timeBarFont->label(),i,0); |
1100 | topLayout->addWidget(timeBarFont->preview(),i,1); | 1107 | topLayout->addWidget(timeBarFont->preview(),i,1); |
1101 | topLayout->addWidget(timeBarFont->button(),i,2); | 1108 | topLayout->addWidget(timeBarFont->button(),i,2); |
1102 | ++i; | 1109 | ++i; |
1103 | 1110 | ||
1104 | 1111 | ||
1105 | KPrefsDialogWidFont *marcusBainsFont = | 1112 | KPrefsDialogWidFont *marcusBainsFont = |
1106 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), | 1113 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), |
1107 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); | 1114 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); |
1108 | topLayout->addWidget(marcusBainsFont->label(),i,0); | 1115 | topLayout->addWidget(marcusBainsFont->label(),i,0); |
1109 | topLayout->addWidget(marcusBainsFont->preview(),i,1); | 1116 | topLayout->addWidget(marcusBainsFont->preview(),i,1); |
1110 | topLayout->addWidget(marcusBainsFont->button(),i,2); | 1117 | topLayout->addWidget(marcusBainsFont->button(),i,2); |
1111 | ++i; | 1118 | ++i; |
1112 | 1119 | ||
1113 | tVFont = | 1120 | tVFont = |
1114 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), | 1121 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), |
1115 | &(KOPrefs::instance()->mEventViewFont),topFrame); | 1122 | &(KOPrefs::instance()->mEventViewFont),topFrame); |
1116 | topLayout->addWidget(tVFont->label(),i,0); | 1123 | topLayout->addWidget(tVFont->label(),i,0); |
1117 | topLayout->addWidget(tVFont->preview(),i,1); | 1124 | topLayout->addWidget(tVFont->preview(),i,1); |
1118 | topLayout->addWidget(tVFont->button(),i,2); | 1125 | topLayout->addWidget(tVFont->button(),i,2); |
1119 | ++i; | 1126 | ++i; |
1120 | 1127 | ||
1121 | 1128 | ||
1122 | 1129 | ||
1123 | tVFont = | 1130 | tVFont = |
1124 | addWidFont(i18n("Details"),i18n("EditorBox:"), | 1131 | addWidFont(i18n("Details"),i18n("EditorBox:"), |
1125 | &(KOPrefs::instance()->mEditBoxFont),topFrame); | 1132 | &(KOPrefs::instance()->mEditBoxFont),topFrame); |
1126 | topLayout->addWidget(tVFont->label(),i,0); | 1133 | topLayout->addWidget(tVFont->label(),i,0); |
1127 | topLayout->addWidget(tVFont->preview(),i,1); | 1134 | topLayout->addWidget(tVFont->preview(),i,1); |
1128 | topLayout->addWidget(tVFont->button(),i,2); | 1135 | topLayout->addWidget(tVFont->button(),i,2); |
1129 | ++i; | 1136 | ++i; |
1130 | 1137 | ||
1131 | 1138 | ||
1132 | 1139 | ||
1133 | topLayout->setColStretch(1,1); | 1140 | topLayout->setColStretch(1,1); |
1134 | topLayout->setRowStretch(4,1); | 1141 | topLayout->setRowStretch(4,1); |
1135 | 1142 | ||
1136 | 1143 | ||
1137 | i = 0; | 1144 | i = 0; |
1138 | topFrame = addPage(i18n("View Fonts"),0, | 1145 | topFrame = addPage(i18n("View Fonts"),0, |
1139 | DesktopIcon("fonts",KIcon::SizeMedium)); | 1146 | DesktopIcon("fonts",KIcon::SizeMedium)); |
1140 | 1147 | ||
1141 | topLayout = new QGridLayout(topFrame,7,3); | 1148 | topLayout = new QGridLayout(topFrame,7,3); |
1142 | topLayout->setSpacing(1); | 1149 | topLayout->setSpacing(1); |
1143 | topLayout->setMargin(3); | 1150 | topLayout->setMargin(3); |
1144 | 1151 | ||
1145 | tVFont = | 1152 | tVFont = |
1146 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), | 1153 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), |
1147 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); | 1154 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); |
1148 | topLayout->addWidget(tVFont->label(),i,0); | 1155 | topLayout->addWidget(tVFont->label(),i,0); |
1149 | topLayout->addWidget(tVFont->preview(),i,1); | 1156 | topLayout->addWidget(tVFont->preview(),i,1); |
1150 | topLayout->addWidget(tVFont->button(),i,2); | 1157 | topLayout->addWidget(tVFont->button(),i,2); |
1151 | ++i; | 1158 | ++i; |
1152 | KPrefsDialogWidFont *agendaViewFont = | 1159 | KPrefsDialogWidFont *agendaViewFont = |
1153 | addWidFont(i18n("Event text"),i18n("Agenda view:"), | 1160 | addWidFont(i18n("Event text"),i18n("Agenda view:"), |
1154 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); | 1161 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); |
1155 | topLayout->addWidget(agendaViewFont->label(),i,0); | 1162 | topLayout->addWidget(agendaViewFont->label(),i,0); |
1156 | topLayout->addWidget(agendaViewFont->preview(),i,1); | 1163 | topLayout->addWidget(agendaViewFont->preview(),i,1); |
1157 | topLayout->addWidget(agendaViewFont->button(),i,2); | 1164 | topLayout->addWidget(agendaViewFont->button(),i,2); |
1158 | ++i; | 1165 | ++i; |
1159 | 1166 | ||
1160 | 1167 | ||
1161 | KPrefsDialogWidFont *monthViewFont = | 1168 | KPrefsDialogWidFont *monthViewFont = |
1162 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), | 1169 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), |
1163 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); | 1170 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); |
1164 | topLayout->addWidget(monthViewFont->label(),i,0); | 1171 | topLayout->addWidget(monthViewFont->label(),i,0); |
1165 | topLayout->addWidget(monthViewFont->preview(),i,1); | 1172 | topLayout->addWidget(monthViewFont->preview(),i,1); |
1166 | topLayout->addWidget(monthViewFont->button(),i,2); | 1173 | topLayout->addWidget(monthViewFont->button(),i,2); |
1167 | ++i; | 1174 | ++i; |
1168 | 1175 | ||
1169 | 1176 | ||
1170 | KPrefsDialogWidFont *lVFont = | 1177 | KPrefsDialogWidFont *lVFont = |
1171 | addWidFont(i18n("Event"),i18n("List View:"), | 1178 | addWidFont(i18n("Event"),i18n("List View:"), |
1172 | &(KOPrefs::instance()->mListViewFont),topFrame); | 1179 | &(KOPrefs::instance()->mListViewFont),topFrame); |
1173 | topLayout->addWidget(lVFont->label(),i,0); | 1180 | topLayout->addWidget(lVFont->label(),i,0); |
1174 | topLayout->addWidget(lVFont->preview(),i,1); | 1181 | topLayout->addWidget(lVFont->preview(),i,1); |
1175 | topLayout->addWidget(lVFont->button(),i,2); | 1182 | topLayout->addWidget(lVFont->button(),i,2); |
1176 | ++i; | 1183 | ++i; |
1177 | 1184 | ||
1178 | 1185 | ||
1179 | tVFont = | 1186 | tVFont = |
1180 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), | 1187 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), |
1181 | &(KOPrefs::instance()->mTodoViewFont),topFrame); | 1188 | &(KOPrefs::instance()->mTodoViewFont),topFrame); |
1182 | topLayout->addWidget(tVFont->label(),i,0); | 1189 | topLayout->addWidget(tVFont->label(),i,0); |
1183 | topLayout->addWidget(tVFont->preview(),i,1); | 1190 | topLayout->addWidget(tVFont->preview(),i,1); |
1184 | topLayout->addWidget(tVFont->button(),i,2); | 1191 | topLayout->addWidget(tVFont->button(),i,2); |
1185 | ++i; | 1192 | ++i; |
1186 | 1193 | ||
1187 | 1194 | ||
1188 | tVFont = | 1195 | tVFont = |
1189 | addWidFont(i18n("Today"),i18n("JournalView:"), | 1196 | addWidFont(i18n("Today"),i18n("JournalView:"), |
1190 | &(KOPrefs::instance()->mJornalViewFont),topFrame); | 1197 | &(KOPrefs::instance()->mJornalViewFont),topFrame); |
1191 | topLayout->addWidget(tVFont->label(),i,0); | 1198 | topLayout->addWidget(tVFont->label(),i,0); |
1192 | topLayout->addWidget(tVFont->preview(),i,1); | 1199 | topLayout->addWidget(tVFont->preview(),i,1); |
1193 | topLayout->addWidget(tVFont->button(),i,2); | 1200 | topLayout->addWidget(tVFont->button(),i,2); |
1194 | ++i; | 1201 | ++i; |
1195 | 1202 | ||
1196 | 1203 | ||
1197 | 1204 | ||
1198 | 1205 | ||
1199 | topLayout->setColStretch(1,1); | 1206 | topLayout->setColStretch(1,1); |
1200 | topLayout->setRowStretch(4,1); | 1207 | topLayout->setRowStretch(4,1); |
1201 | 1208 | ||
1202 | 1209 | ||
1203 | 1210 | ||
1204 | 1211 | ||
1205 | } | 1212 | } |
1206 | 1213 | ||
1207 | void KOPrefsDialog::setupColorsTab() | 1214 | void KOPrefsDialog::setupColorsTab() |
1208 | { | 1215 | { |
1209 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1216 | QFrame *topFrame = addPage(i18n("Colors"),0,0); |
1210 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1217 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1211 | 1218 | ||
1212 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1219 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1213 | // topLayout->setSpacing(mSpacingHint); | 1220 | // topLayout->setSpacing(mSpacingHint); |
1214 | // topLayout->setMargin(mMarginHint); | 1221 | // topLayout->setMargin(mMarginHint); |
1215 | 1222 | ||
1216 | topLayout->setSpacing(2); | 1223 | topLayout->setSpacing(2); |
1217 | topLayout->setMargin(3); | 1224 | topLayout->setMargin(3); |
1218 | 1225 | ||
1219 | int ii = 1; | 1226 | int ii = 1; |
1220 | QGroupBox *categoryGroup ; | 1227 | QGroupBox *categoryGroup ; |
1221 | 1228 | ||
1222 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1229 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), |
1223 | topFrame); | 1230 | topFrame); |
1224 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1231 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1225 | 1232 | ||
1226 | mCategoryCombo = new QComboBox(categoryGroup); | 1233 | mCategoryCombo = new QComboBox(categoryGroup); |
1227 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1234 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1228 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1235 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1229 | 1236 | ||
1230 | mCategoryButton = new KColorButton(categoryGroup); | 1237 | mCategoryButton = new KColorButton(categoryGroup); |
1231 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); | 1238 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); |
1232 | updateCategoryColor(); | 1239 | updateCategoryColor(); |
1233 | 1240 | ||
1234 | 1241 | ||
1235 | // Holiday Color | 1242 | // Holiday Color |
1236 | 1243 | ||
1237 | KPrefsDialogWidColor *holidayColor = | 1244 | KPrefsDialogWidColor *holidayColor = |
1238 | addWidColor(i18n("Holiday color:"), | 1245 | addWidColor(i18n("Holiday color:"), |
1239 | &(KOPrefs::instance()->mHolidayColor),topFrame); | 1246 | &(KOPrefs::instance()->mHolidayColor),topFrame); |
1240 | topLayout->addWidget(holidayColor->label(),ii,0); | 1247 | topLayout->addWidget(holidayColor->label(),ii,0); |
1241 | topLayout->addWidget(holidayColor->button(),ii++,1); | 1248 | topLayout->addWidget(holidayColor->button(),ii++,1); |
1242 | 1249 | ||
1243 | // Highlight Color | 1250 | // Highlight Color |
1244 | KPrefsDialogWidColor *highlightColor = | 1251 | KPrefsDialogWidColor *highlightColor = |
1245 | addWidColor(i18n("Highlight color:"), | 1252 | addWidColor(i18n("Highlight color:"), |
1246 | &(KOPrefs::instance()->mHighlightColor),topFrame); | 1253 | &(KOPrefs::instance()->mHighlightColor),topFrame); |
1247 | topLayout->addWidget(highlightColor->label(),ii,0); | 1254 | topLayout->addWidget(highlightColor->label(),ii,0); |
1248 | topLayout->addWidget(highlightColor->button(),ii++,1); | 1255 | topLayout->addWidget(highlightColor->button(),ii++,1); |
1249 | 1256 | ||
1250 | // Event color | 1257 | // Event color |
1251 | KPrefsDialogWidColor *eventColor = | 1258 | KPrefsDialogWidColor *eventColor = |
1252 | addWidColor(i18n("Default event color:"), | 1259 | addWidColor(i18n("Default event color:"), |
1253 | &(KOPrefs::instance()->mEventColor),topFrame); | 1260 | &(KOPrefs::instance()->mEventColor),topFrame); |
1254 | topLayout->addWidget(eventColor->label(),ii,0); | 1261 | topLayout->addWidget(eventColor->label(),ii,0); |
1255 | topLayout->addWidget(eventColor->button(),ii++,1); | 1262 | topLayout->addWidget(eventColor->button(),ii++,1); |
1256 | eventColor = | 1263 | eventColor = |
1257 | addWidColor(i18n("Default todo done color:"), | 1264 | addWidColor(i18n("Default todo done color:"), |
1258 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); | 1265 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); |
1259 | topLayout->addWidget(eventColor->label(),ii,0); | 1266 | topLayout->addWidget(eventColor->label(),ii,0); |
1260 | topLayout->addWidget(eventColor->button(),ii++,1); | 1267 | topLayout->addWidget(eventColor->button(),ii++,1); |
1261 | 1268 | ||
1262 | 1269 | ||
1263 | // agenda view background color | 1270 | // agenda view background color |
1264 | KPrefsDialogWidColor *agendaBgColor = | 1271 | KPrefsDialogWidColor *agendaBgColor = |
1265 | addWidColor(i18n("Agenda view background color:"), | 1272 | addWidColor(i18n("Agenda view background color:"), |
1266 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); | 1273 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); |
1267 | topLayout->addWidget(agendaBgColor->label(),ii,0); | 1274 | topLayout->addWidget(agendaBgColor->label(),ii,0); |
1268 | topLayout->addWidget(agendaBgColor->button(),ii++,1); | 1275 | topLayout->addWidget(agendaBgColor->button(),ii++,1); |
1269 | 1276 | ||
1270 | // working hours color | 1277 | // working hours color |
1271 | KPrefsDialogWidColor *workingHoursColor = | 1278 | KPrefsDialogWidColor *workingHoursColor = |
1272 | addWidColor(i18n("Working hours color:"), | 1279 | addWidColor(i18n("Working hours color:"), |
1273 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); | 1280 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); |
1274 | topLayout->addWidget(workingHoursColor->label(),ii,0); | 1281 | topLayout->addWidget(workingHoursColor->label(),ii,0); |
1275 | topLayout->addWidget(workingHoursColor->button(),ii++,1); | 1282 | topLayout->addWidget(workingHoursColor->button(),ii++,1); |
1276 | 1283 | ||
1277 | KPrefsDialogWidBool *sb = | 1284 | KPrefsDialogWidBool *sb = |
1278 | addWidBool(i18n("Use colors for application:"), | 1285 | addWidBool(i18n("Use colors for application:"), |
1279 | &(KOPrefs::instance()->mUseAppColors),topFrame); | 1286 | &(KOPrefs::instance()->mUseAppColors),topFrame); |
1280 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); | 1287 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); |
1281 | 1288 | ||
1282 | ii++; | 1289 | ii++; |
1283 | KPrefsDialogWidColor * workingHoursColor1 = | 1290 | KPrefsDialogWidColor * workingHoursColor1 = |
1284 | addWidColor(i18n("Buttons, menus, etc.:"), | 1291 | addWidColor(i18n("Buttons, menus, etc.:"), |
1285 | &(KOPrefs::instance()->mAppColor1),topFrame); | 1292 | &(KOPrefs::instance()->mAppColor1),topFrame); |
1286 | topLayout->addWidget(workingHoursColor1->label(),ii,0); | 1293 | topLayout->addWidget(workingHoursColor1->label(),ii,0); |
1287 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); | 1294 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); |
1288 | 1295 | ||
1289 | KPrefsDialogWidColor * workingHoursColor2 = | 1296 | KPrefsDialogWidColor * workingHoursColor2 = |
1290 | addWidColor(i18n("Frames, labels, etc.:"), | 1297 | addWidColor(i18n("Frames, labels, etc.:"), |
1291 | &(KOPrefs::instance()->mAppColor2),topFrame); | 1298 | &(KOPrefs::instance()->mAppColor2),topFrame); |
1292 | topLayout->addWidget(workingHoursColor2->label(),ii,0); | 1299 | topLayout->addWidget(workingHoursColor2->label(),ii,0); |
1293 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); | 1300 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); |
1294 | 1301 | ||
1295 | 1302 | ||
1296 | 1303 | ||
1297 | } | 1304 | } |
1298 | 1305 | ||
1299 | void KOPrefsDialog::setCategoryColor() | 1306 | void KOPrefsDialog::setCategoryColor() |
1300 | { | 1307 | { |
1301 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); | 1308 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); |
1302 | } | 1309 | } |
1303 | 1310 | ||
1304 | void KOPrefsDialog::updateCategoryColor() | 1311 | void KOPrefsDialog::updateCategoryColor() |
1305 | { | 1312 | { |
1306 | QString cat = mCategoryCombo->currentText(); | 1313 | QString cat = mCategoryCombo->currentText(); |
1307 | QColor *color = mCategoryDict.find(cat); | 1314 | QColor *color = mCategoryDict.find(cat); |
1308 | if (!color) { | 1315 | if (!color) { |
1309 | color = KOPrefs::instance()->categoryColor(cat); | 1316 | color = KOPrefs::instance()->categoryColor(cat); |
1310 | } | 1317 | } |
1311 | if (color) { | 1318 | if (color) { |
1312 | mCategoryButton->setColor(*color); | 1319 | mCategoryButton->setColor(*color); |
1313 | } | 1320 | } |
1314 | } | 1321 | } |
1315 | 1322 | ||
1316 | void KOPrefsDialog::setupPrinterTab() | 1323 | void KOPrefsDialog::setupPrinterTab() |
1317 | { | 1324 | { |
1318 | mPrinterTab = addPage(i18n("Printing"),0, | 1325 | mPrinterTab = addPage(i18n("Printing"),0, |
1319 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1326 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1320 | 1327 | ||
1321 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1328 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); |
1322 | topLayout->setSpacing(mSpacingHint); | 1329 | topLayout->setSpacing(mSpacingHint); |
1323 | topLayout->setMargin(mMarginHint); | 1330 | topLayout->setMargin(mMarginHint); |
1324 | 1331 | ||
1325 | topLayout->setRowStretch(4,1); | 1332 | topLayout->setRowStretch(4,1); |
1326 | } | 1333 | } |
1327 | 1334 | ||
1328 | void KOPrefsDialog::setupGroupSchedulingTab() | 1335 | void KOPrefsDialog::setupGroupSchedulingTab() |
1329 | { | 1336 | { |
1330 | #if 0 | 1337 | #if 0 |
1331 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1338 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, |
1332 | DesktopIcon("personal",KIcon::SizeMedium)); | 1339 | DesktopIcon("personal",KIcon::SizeMedium)); |
1333 | 1340 | ||
1334 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1341 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
1335 | topLayout->setSpacing(mSpacingHint); | 1342 | topLayout->setSpacing(mSpacingHint); |
1336 | topLayout->setMargin(mMarginHint); | 1343 | topLayout->setMargin(mMarginHint); |
1337 | 1344 | ||
1338 | #if 0 | 1345 | #if 0 |
1339 | KPrefsDialogWidRadios *schedulerGroup = | 1346 | KPrefsDialogWidRadios *schedulerGroup = |
1340 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), | 1347 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), |
1341 | topFrame); | 1348 | topFrame); |
1342 | schedulerGroup->addRadio("Dummy"); // Only for debugging | 1349 | schedulerGroup->addRadio("Dummy"); // Only for debugging |
1343 | schedulerGroup->addRadio(i18n("Mail client")); | 1350 | schedulerGroup->addRadio(i18n("Mail client")); |
1344 | 1351 | ||
1345 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); | 1352 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); |
1346 | #endif | 1353 | #endif |
1347 | 1354 | ||
1348 | KPrefsDialogWidRadios *sendGroup = | 1355 | KPrefsDialogWidRadios *sendGroup = |
1349 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), | 1356 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), |
1350 | topFrame); | 1357 | topFrame); |
1351 | sendGroup->addRadio(i18n("Send to outbox")); | 1358 | sendGroup->addRadio(i18n("Send to outbox")); |
1352 | sendGroup->addRadio(i18n("Send directly")); | 1359 | sendGroup->addRadio(i18n("Send directly")); |
1353 | 1360 | ||
1354 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1361 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1355 | 1362 | ||
1356 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1363 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1357 | mAMails = new QListView(topFrame); | 1364 | mAMails = new QListView(topFrame); |
1358 | mAMails->addColumn(i18n("Email"),300); | 1365 | mAMails->addColumn(i18n("Email"),300); |
1359 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1366 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1360 | 1367 | ||
1361 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); | 1368 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); |
1362 | aEmailsEdit = new QLineEdit(topFrame); | 1369 | aEmailsEdit = new QLineEdit(topFrame); |
1363 | aEmailsEdit->setEnabled(false); | 1370 | aEmailsEdit->setEnabled(false); |
1364 | topLayout->addWidget(aEmailsEdit,4,1); | 1371 | topLayout->addWidget(aEmailsEdit,4,1); |
1365 | 1372 | ||
1366 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); | 1373 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); |
1367 | topLayout->addWidget(add,5,0); | 1374 | topLayout->addWidget(add,5,0); |
1368 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); | 1375 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); |
1369 | topLayout->addWidget(del,5,1); | 1376 | topLayout->addWidget(del,5,1); |
1370 | 1377 | ||
1371 | //topLayout->setRowStretch(2,1); | 1378 | //topLayout->setRowStretch(2,1); |
1372 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1379 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1373 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1380 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1374 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1381 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1375 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1382 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); |
1376 | #endif | 1383 | #endif |
1377 | } | 1384 | } |
1378 | 1385 | ||
1379 | void KOPrefsDialog::setupGroupAutomationTab() | 1386 | void KOPrefsDialog::setupGroupAutomationTab() |
1380 | { | 1387 | { |
1381 | return; | 1388 | return; |
1382 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1389 | QFrame *topFrame = addPage(i18n("Group Automation"),0, |
1383 | DesktopIcon("personal",KIcon::SizeMedium)); | 1390 | DesktopIcon("personal",KIcon::SizeMedium)); |
1384 | 1391 | ||
1385 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1392 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); |
1386 | topLayout->setSpacing(mSpacingHint); | 1393 | topLayout->setSpacing(mSpacingHint); |
1387 | topLayout->setMargin(mMarginHint); | 1394 | topLayout->setMargin(mMarginHint); |
1388 | 1395 | ||
1389 | KPrefsDialogWidRadios *autoRefreshGroup = | 1396 | KPrefsDialogWidRadios *autoRefreshGroup = |
1390 | addWidRadios(i18n("Auto Send Refresh"), | 1397 | addWidRadios(i18n("Auto Send Refresh"), |
1391 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); | 1398 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); |
1392 | autoRefreshGroup->addRadio(i18n("Never")); | 1399 | autoRefreshGroup->addRadio(i18n("Never")); |
1393 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); | 1400 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); |
1394 | //autoRefreshGroup->addRadio(i18n("selected emails")); | 1401 | //autoRefreshGroup->addRadio(i18n("selected emails")); |
1395 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); | 1402 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); |
1396 | 1403 | ||
1397 | KPrefsDialogWidRadios *autoInsertGroup = | 1404 | KPrefsDialogWidRadios *autoInsertGroup = |
1398 | addWidRadios(i18n("Auto Insert IMIP Replies"), | 1405 | addWidRadios(i18n("Auto Insert IMIP Replies"), |
1399 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); | 1406 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); |
1400 | autoInsertGroup->addRadio(i18n("Never")); | 1407 | autoInsertGroup->addRadio(i18n("Never")); |
1401 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); | 1408 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); |
1402 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1409 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1403 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); | 1410 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); |
1404 | 1411 | ||
1405 | KPrefsDialogWidRadios *autoRequestGroup = | 1412 | KPrefsDialogWidRadios *autoRequestGroup = |
1406 | addWidRadios(i18n("Auto Insert IMIP Requests"), | 1413 | addWidRadios(i18n("Auto Insert IMIP Requests"), |
1407 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); | 1414 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); |
1408 | autoRequestGroup->addRadio(i18n("Never")); | 1415 | autoRequestGroup->addRadio(i18n("Never")); |
1409 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); | 1416 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); |
1410 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1417 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1411 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); | 1418 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); |
1412 | 1419 | ||
1413 | KPrefsDialogWidRadios *autoFreeBusyGroup = | 1420 | KPrefsDialogWidRadios *autoFreeBusyGroup = |
1414 | addWidRadios(i18n("Auto Send FreeBusy Information"), | 1421 | addWidRadios(i18n("Auto Send FreeBusy Information"), |
1415 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); | 1422 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); |
1416 | autoFreeBusyGroup->addRadio(i18n("Never")); | 1423 | autoFreeBusyGroup->addRadio(i18n("Never")); |
1417 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); | 1424 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); |
1418 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1425 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1419 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); | 1426 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); |
1420 | 1427 | ||
1421 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = | 1428 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = |
1422 | addWidRadios(i18n("Auto Save FreeBusy Replies"), | 1429 | addWidRadios(i18n("Auto Save FreeBusy Replies"), |
1423 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); | 1430 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); |
1424 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); | 1431 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); |
1425 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); | 1432 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); |
1426 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1433 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1427 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); | 1434 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); |
1428 | } | 1435 | } |
1429 | 1436 | ||
1430 | void KOPrefsDialog::showPrinterTab() | 1437 | void KOPrefsDialog::showPrinterTab() |
1431 | { | 1438 | { |
1432 | showPage(pageIndex(mPrinterTab)); | 1439 | showPage(pageIndex(mPrinterTab)); |
1433 | } | 1440 | } |
1434 | 1441 | ||
1435 | 1442 | ||
1436 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | 1443 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, |
1437 | const QStringList *tags) | 1444 | const QStringList *tags) |
1438 | { | 1445 | { |
1439 | if (tags) { | 1446 | if (tags) { |
1440 | int i = tags->findIndex(text); | 1447 | int i = tags->findIndex(text); |
1441 | if (i > 0) combo->setCurrentItem(i); | 1448 | if (i > 0) combo->setCurrentItem(i); |
1442 | } else { | 1449 | } else { |
1443 | for(int i=0;i<combo->count();++i) { | 1450 | for(int i=0;i<combo->count();++i) { |
1444 | if (combo->text(i) == text) { | 1451 | if (combo->text(i) == text) { |
1445 | combo->setCurrentItem(i); | 1452 | combo->setCurrentItem(i); |
1446 | break; | 1453 | break; |
1447 | } | 1454 | } |
1448 | } | 1455 | } |
1449 | } | 1456 | } |
1450 | } | 1457 | } |
1451 | 1458 | ||
1452 | void KOPrefsDialog::usrReadConfig() | 1459 | void KOPrefsDialog::usrReadConfig() |
1453 | { | 1460 | { |
1454 | kdelibcfg->readConfig(); | 1461 | kdelibcfg->readConfig(); |
1455 | mNameEdit->setText(KOPrefs::instance()->fullName()); | 1462 | mNameEdit->setText(KOPrefs::instance()->fullName()); |
1456 | mEmailEdit->setText(KOPrefs::instance()->email()); | 1463 | mEmailEdit->setText(KOPrefs::instance()->email()); |
1457 | 1464 | ||
1458 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); | 1465 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); |
1459 | // QDate current ( 2001, 1,1); | 1466 | // QDate current ( 2001, 1,1); |
1460 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1467 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1461 | //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1468 | //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1462 | //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); | 1469 | //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); |
1463 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1470 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1464 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); | 1471 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); |
1465 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); | 1472 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); |
1466 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); | 1473 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); |
1467 | // if (KOPrefs::instance()->mAllDaySize > 47 ) | 1474 | // if (KOPrefs::instance()->mAllDaySize > 47 ) |
1468 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; | 1475 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; |
1469 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); | 1476 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); |
1470 | 1477 | ||
1471 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); | 1478 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); |
1472 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); | 1479 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); |
1473 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); | 1480 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); |
1474 | // mAMails->clear(); | 1481 | // mAMails->clear(); |
1475 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); | 1482 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); |
1476 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { | 1483 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { |
1477 | // QListViewItem *item = new QListViewItem(mAMails); | 1484 | // QListViewItem *item = new QListViewItem(mAMails); |
1478 | // item->setText(0,*it); | 1485 | // item->setText(0,*it); |
1479 | // mAMails->insertItem(item); | 1486 | // mAMails->insertItem(item); |
1480 | // } | 1487 | // } |
1481 | 1488 | ||
1482 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); | 1489 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); |
1483 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); | 1490 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); |
1484 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); | 1491 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); |
1485 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); | 1492 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); |
1486 | 1493 | ||
1487 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); | 1494 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); |
1488 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); | 1495 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); |
1489 | //QString dummy = KOPrefs::instance()->mUserDateFormatLong; | 1496 | //QString dummy = KOPrefs::instance()->mUserDateFormatLong; |
1490 | //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1497 | //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1491 | //dummy = KOPrefs::instance()->mUserDateFormatShort; | 1498 | //dummy = KOPrefs::instance()->mUserDateFormatShort; |
1492 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1499 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1493 | updateCategories(); | 1500 | updateCategories(); |
1494 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); | 1501 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); |
1495 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); | 1502 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); |
1496 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); | 1503 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); |
1497 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); | 1504 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); |
1498 | } | 1505 | } |
1499 | 1506 | ||
1500 | 1507 | ||
1501 | void KOPrefsDialog::usrWriteConfig() | 1508 | void KOPrefsDialog::usrWriteConfig() |
1502 | { | 1509 | { |
1503 | 1510 | ||
1504 | kdelibcfg->writeConfig(); | 1511 | kdelibcfg->writeConfig(); |
1505 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); | 1512 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); |
1506 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); | 1513 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); |
1507 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); | 1514 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); |
1508 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); | 1515 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); |
1509 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); | 1516 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); |
1510 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); | 1517 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); |
1511 | 1518 | ||
1512 | //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 1519 | //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
1513 | //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 1520 | //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
1514 | KOPrefs::instance()->setFullName(mNameEdit->text()); | 1521 | KOPrefs::instance()->setFullName(mNameEdit->text()); |
1515 | KOPrefs::instance()->setEmail(mEmailEdit->text()); | 1522 | KOPrefs::instance()->setEmail(mEmailEdit->text()); |
1516 | 1523 | ||
1517 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); | 1524 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); |
1518 | 1525 | ||
1519 | // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); | 1526 | // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); |
1520 | //QDate date; | 1527 | //QDate date; |
1521 | //date = mStartDateSavingEdit->date(); | 1528 | //date = mStartDateSavingEdit->date(); |
1522 | //int sub = 0; | 1529 | //int sub = 0; |
1523 | //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1530 | //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1524 | // sub = 1; | 1531 | // sub = 1; |
1525 | // KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; | 1532 | // KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; |
1526 | // date = mEndDateSavingEdit->date(); | 1533 | // date = mEndDateSavingEdit->date(); |
1527 | // if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1534 | // if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1528 | // sub = 1; | 1535 | // sub = 1; |
1529 | // else | 1536 | // else |
1530 | // sub = 0; | 1537 | // sub = 0; |
1531 | // KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; | 1538 | // KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; |
1532 | // // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); | 1539 | // // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); |
1533 | 1540 | ||
1534 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); | 1541 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); |
1535 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); | 1542 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); |
1536 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); | 1543 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); |
1537 | 1544 | ||
1538 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); | 1545 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); |
1539 | 1546 | ||
1540 | QDictIterator<QColor> it(mCategoryDict); | 1547 | QDictIterator<QColor> it(mCategoryDict); |
1541 | while (it.current()) { | 1548 | while (it.current()) { |
1542 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1549 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1543 | ++it; | 1550 | ++it; |
1544 | } | 1551 | } |
1545 | 1552 | ||
1546 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); | 1553 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); |
1547 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); | 1554 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); |
1548 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); | 1555 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); |
1549 | 1556 | ||
1550 | KOPrefs::instance()->mAdditionalMails.clear(); | 1557 | KOPrefs::instance()->mAdditionalMails.clear(); |
1551 | // QListViewItem *item; | 1558 | // QListViewItem *item; |
1552 | // item = mAMails->firstChild(); | 1559 | // item = mAMails->firstChild(); |
1553 | // while (item) | 1560 | // while (item) |
1554 | // { | 1561 | // { |
1555 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); | 1562 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); |
1556 | // item = item->nextSibling(); | 1563 | // item = item->nextSibling(); |
1557 | // } | 1564 | // } |
1558 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); | 1565 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); |
1559 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; | 1566 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; |
1560 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; | 1567 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; |
1561 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; | 1568 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; |
1562 | 1569 | ||
1563 | } | 1570 | } |
1564 | 1571 | ||
1565 | void KOPrefsDialog::updateCategories() | 1572 | void KOPrefsDialog::updateCategories() |
1566 | { | 1573 | { |
1567 | mCategoryCombo->clear(); | 1574 | mCategoryCombo->clear(); |
1568 | mCategoryDict.clear(); | 1575 | mCategoryDict.clear(); |
1569 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1576 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1570 | updateCategoryColor(); | 1577 | updateCategoryColor(); |
1571 | } | 1578 | } |
1572 | 1579 | ||
1573 | void KOPrefsDialog::warningGroupScheduling() | 1580 | void KOPrefsDialog::warningGroupScheduling() |
1574 | { | 1581 | { |
1575 | warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); | 1582 | warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); |
1576 | } | 1583 | } |
1577 | 1584 | ||
1578 | void KOPrefsDialog::warningProjectView() | 1585 | void KOPrefsDialog::warningProjectView() |
1579 | { | 1586 | { |
1580 | warningExperimental(mEnableProjectView->checkBox()->isChecked()); | 1587 | warningExperimental(mEnableProjectView->checkBox()->isChecked()); |
1581 | } | 1588 | } |
1582 | 1589 | ||
1583 | void KOPrefsDialog::warningExperimental(bool on) | 1590 | void KOPrefsDialog::warningExperimental(bool on) |
1584 | { | 1591 | { |
1585 | if (on) { | 1592 | if (on) { |
1586 | KMessageBox::information(this,i18n("This is an experimental feature. " | 1593 | KMessageBox::information(this,i18n("This is an experimental feature. " |
1587 | "It may not work, it may do nothing useful and it may cause data loss. " | 1594 | "It may not work, it may do nothing useful and it may cause data loss. " |
1588 | "Use with care.\n" | 1595 | "Use with care.\n" |
1589 | "You have to restart KOrganizer for this setting to take effect.")); | 1596 | "You have to restart KOrganizer for this setting to take effect.")); |
1590 | } else { | 1597 | } else { |
1591 | KMessageBox::information(this, | 1598 | KMessageBox::information(this, |
1592 | i18n("You have to restart KOrganizer for this setting to take effect.")); | 1599 | i18n("You have to restart KOrganizer for this setting to take effect.")); |
1593 | } | 1600 | } |
1594 | } | 1601 | } |
1595 | 1602 | ||
1596 | void KOPrefsDialog::toggleEmailSettings(bool on) | 1603 | void KOPrefsDialog::toggleEmailSettings(bool on) |
1597 | { | 1604 | { |
1598 | if (on) { | 1605 | if (on) { |
1599 | mEmailEdit->setEnabled(false); | 1606 | mEmailEdit->setEnabled(false); |
1600 | mNameEdit->setEnabled(false); | 1607 | mNameEdit->setEnabled(false); |
1601 | mEmailLabel->setEnabled(false); | 1608 | mEmailLabel->setEnabled(false); |
1602 | mNameLabel->setEnabled(false); | 1609 | mNameLabel->setEnabled(false); |
1603 | 1610 | ||
1604 | KEMailSettings settings; | 1611 | KEMailSettings settings; |
1605 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); | 1612 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); |
1606 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); | 1613 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); |
1607 | } else { | 1614 | } else { |
1608 | mEmailEdit->setEnabled(true); | 1615 | mEmailEdit->setEnabled(true); |
1609 | mNameEdit->setEnabled(true); | 1616 | mNameEdit->setEnabled(true); |
1610 | mEmailLabel->setEnabled(true); | 1617 | mEmailLabel->setEnabled(true); |
1611 | mNameLabel->setEnabled(true); | 1618 | mNameLabel->setEnabled(true); |
1612 | } | 1619 | } |
1613 | } | 1620 | } |
1614 | 1621 | ||
1615 | void KOPrefsDialog::addItem() | 1622 | void KOPrefsDialog::addItem() |
1616 | { | 1623 | { |
1617 | // aEmailsEdit->setEnabled(true); | 1624 | // aEmailsEdit->setEnabled(true); |
1618 | // QListViewItem *item = new QListViewItem(mAMails); | 1625 | // QListViewItem *item = new QListViewItem(mAMails); |
1619 | // mAMails->insertItem(item); | 1626 | // mAMails->insertItem(item); |
1620 | // mAMails->setSelected(item,true); | 1627 | // mAMails->setSelected(item,true); |
1621 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); | 1628 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); |
1622 | } | 1629 | } |
1623 | 1630 | ||
1624 | void KOPrefsDialog::removeItem() | 1631 | void KOPrefsDialog::removeItem() |
1625 | { | 1632 | { |
1626 | // QListViewItem *item; | 1633 | // QListViewItem *item; |
1627 | // item = mAMails->selectedItem(); | 1634 | // item = mAMails->selectedItem(); |
1628 | // if (!item) return; | 1635 | // if (!item) return; |
1629 | // mAMails->takeItem(item); | 1636 | // mAMails->takeItem(item); |
1630 | // item = mAMails->selectedItem(); | 1637 | // item = mAMails->selectedItem(); |
1631 | // if (!item) { | 1638 | // if (!item) { |
1632 | // aEmailsEdit->setText(""); | 1639 | // aEmailsEdit->setText(""); |
1633 | // aEmailsEdit->setEnabled(false); | 1640 | // aEmailsEdit->setEnabled(false); |
1634 | // } | 1641 | // } |
1635 | // if (mAMails->childCount() == 0) { | 1642 | // if (mAMails->childCount() == 0) { |
1636 | // aEmailsEdit->setEnabled(false); | 1643 | // aEmailsEdit->setEnabled(false); |
1637 | // } | 1644 | // } |
1638 | } | 1645 | } |
1639 | 1646 | ||
1640 | void KOPrefsDialog::updateItem() | 1647 | void KOPrefsDialog::updateItem() |
1641 | { | 1648 | { |
1642 | // QListViewItem *item; | 1649 | // QListViewItem *item; |
1643 | // item = mAMails->selectedItem(); | 1650 | // item = mAMails->selectedItem(); |
1644 | // if (!item) return; | 1651 | // if (!item) return; |
1645 | // item->setText(0,aEmailsEdit->text()); | 1652 | // item->setText(0,aEmailsEdit->text()); |
1646 | } | 1653 | } |
1647 | 1654 | ||
1648 | void KOPrefsDialog::updateInput() | 1655 | void KOPrefsDialog::updateInput() |
1649 | { | 1656 | { |
1650 | // QListViewItem *item; | 1657 | // QListViewItem *item; |
1651 | // item = mAMails->selectedItem(); | 1658 | // item = mAMails->selectedItem(); |
1652 | // if (!item) return; | 1659 | // if (!item) return; |
1653 | // aEmailsEdit->setEnabled(true); | 1660 | // aEmailsEdit->setEnabled(true); |
1654 | // aEmailsEdit->setText(item->text(0)); | 1661 | // aEmailsEdit->setText(item->text(0)); |
1655 | } | 1662 | } |
1656 | void KOPrefsDialog::updateTimezoneOffset( int index ) | 1663 | void KOPrefsDialog::updateTimezoneOffset( int index ) |
1657 | { | 1664 | { |
1658 | /* | 1665 | /* |
1659 | qDebug("updateTimezoneOffset %d ", index); | 1666 | qDebug("updateTimezoneOffset %d ", index); |
1660 | if ( index < 24 ) { | 1667 | if ( index < 24 ) { |
1661 | mTimezoneOffsetSpin->setEnabled ( false ); | 1668 | mTimezoneOffsetSpin->setEnabled ( false ); |
1662 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); | 1669 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); |
1663 | 1670 | ||
1664 | 1671 | ||
1665 | } else { | 1672 | } else { |
1666 | if ( index == 24 ) { | 1673 | if ( index == 24 ) { |
1667 | mTimezoneOffsetSpin->setEnabled ( true ); | 1674 | mTimezoneOffsetSpin->setEnabled ( true ); |
1668 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1675 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1669 | 1676 | ||
1670 | } else { | 1677 | } else { |
1671 | mTimezoneOffsetSpin->setEnabled ( false ); | 1678 | mTimezoneOffsetSpin->setEnabled ( false ); |
1672 | mTimezoneOffsetSpin->setValue( 0 ); | 1679 | mTimezoneOffsetSpin->setValue( 0 ); |
1673 | } | 1680 | } |
1674 | } | 1681 | } |
1675 | */ | 1682 | */ |
1676 | } | 1683 | } |
1677 | 1684 | ||
1678 | void KOPrefsDialog::setupTimeZoneTab() | 1685 | void KOPrefsDialog::setupTimeZoneTab() |
1679 | { | 1686 | { |
1680 | #if 0 | 1687 | #if 0 |
1681 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); | 1688 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); |
1682 | // DesktopIcon("clock",KIcon::SizeMedium)); | 1689 | // DesktopIcon("clock",KIcon::SizeMedium)); |
1683 | 1690 | ||
1684 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1691 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1685 | topLayout->setSpacing(mSpacingHint); | 1692 | topLayout->setSpacing(mSpacingHint); |
1686 | topLayout->setMargin(mMarginHint); | 1693 | topLayout->setMargin(mMarginHint); |
1687 | 1694 | ||
1688 | QHBox *timeZoneBox = new QHBox( topFrame ); | 1695 | QHBox *timeZoneBox = new QHBox( topFrame ); |
1689 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 1696 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
1690 | 1697 | ||
1691 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 1698 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
1692 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 1699 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
1693 | if ( QApplication::desktop()->width() < 300 ) { | 1700 | if ( QApplication::desktop()->width() < 300 ) { |
1694 | mTimeZoneCombo->setMaximumWidth(150); | 1701 | mTimeZoneCombo->setMaximumWidth(150); |
1695 | } | 1702 | } |
1696 | 1703 | ||
1697 | QStringList list; | 1704 | QStringList list; |
1698 | list = KGlobal::locale()->timeZoneList(); | 1705 | list = KGlobal::locale()->timeZoneList(); |
1699 | mTimeZoneCombo->insertStringList(list); | 1706 | mTimeZoneCombo->insertStringList(list); |
1700 | 1707 | ||
1701 | // find the currently set time zone and select it | 1708 | // find the currently set time zone and select it |
1702 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; | 1709 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; |
1703 | int nCurrentlySet = 11; | 1710 | int nCurrentlySet = 11; |
1704 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 1711 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
1705 | { | 1712 | { |
1706 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 1713 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
1707 | { | 1714 | { |
1708 | nCurrentlySet = i; | 1715 | nCurrentlySet = i; |
1709 | break; | 1716 | break; |
1710 | } | 1717 | } |
1711 | } | 1718 | } |
1712 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 1719 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
1713 | int iii = 1; | 1720 | int iii = 1; |
1714 | KPrefsDialogWidBool *sb = | 1721 | KPrefsDialogWidBool *sb = |
1715 | addWidBool(i18n("Timezone has daylight saving"), | 1722 | addWidBool(i18n("Timezone has daylight saving"), |
1716 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); | 1723 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); |
1717 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 1724 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
1718 | ++iii; | 1725 | ++iii; |
1719 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 1726 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
1720 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1727 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1721 | ++iii; | 1728 | ++iii; |
1722 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 1729 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
1723 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1730 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1724 | ++iii; | 1731 | ++iii; |
1725 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 1732 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
1726 | topLayout->addWidget(lab, iii,0); | 1733 | topLayout->addWidget(lab, iii,0); |
1727 | mStartDateSavingEdit = new KDateEdit(topFrame); | 1734 | mStartDateSavingEdit = new KDateEdit(topFrame); |
1728 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 1735 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
1729 | ++iii; | 1736 | ++iii; |
1730 | 1737 | ||
1731 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 1738 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
1732 | topLayout->addWidget(lab, iii,0); | 1739 | topLayout->addWidget(lab, iii,0); |
1733 | mEndDateSavingEdit = new KDateEdit(topFrame); | 1740 | mEndDateSavingEdit = new KDateEdit(topFrame); |
1734 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 1741 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
1735 | ++iii; | 1742 | ++iii; |
1736 | QDate current ( 2001, 1,1); | 1743 | QDate current ( 2001, 1,1); |
1737 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1744 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1738 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1745 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1739 | #endif | 1746 | #endif |
1740 | 1747 | ||
1741 | } | 1748 | } |
1742 | 1749 | ||