author | zautrix <zautrix> | 2005-02-04 17:45:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-04 17:45:57 (UTC) |
commit | f4c3a3e3da57e957b920fe4662c6decd6764f0ee (patch) (unidiff) | |
tree | 05648d7d7ac6a0e4798cad08b2993df1375d84d5 | |
parent | b7c502a598566264e6e7129524104b6e39438f03 (diff) | |
download | kdepimpi-f4c3a3e3da57e957b920fe4662c6decd6764f0ee.zip kdepimpi-f4c3a3e3da57e957b920fe4662c6decd6764f0ee.tar.gz kdepimpi-f4c3a3e3da57e957b920fe4662c6decd6764f0ee.tar.bz2 |
fixxx
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 18 | ||||
-rw-r--r-- | korganizer/komonthview.h | 2 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 3 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 5 |
6 files changed, 25 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 8c3b1e4..5a5b73e 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1026,200 +1026,200 @@ | |||
1026 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1026 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1027 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" }, | 1027 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" }, |
1028 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" }, | 1028 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" }, |
1029 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1029 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " }, | 1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " }, |
1031 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1031 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1032 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1032 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1034 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1034 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1035 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1035 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1036 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1036 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1038 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1038 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, | 1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, |
1043 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1043 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1044 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1044 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1047 | { "(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n","(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi basiert auf KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.korganizer.org\nwww.pi-sync.net\n" }, | 1047 | { "(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n","(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi basiert auf KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.korganizer.org\nwww.pi-sync.net\n" }, |
1048 | { "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n","PDA-Edition\nfür: Zaurus 5x00 / 7x0 / 8x0\n" }, | 1048 | { "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n","PDA-Edition\nfür: Zaurus 5x00 / 7x0 / 8x0\n" }, |
1049 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1049 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1050 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1050 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1051 | { "From: ","Von: " }, | 1051 | { "From: ","Von: " }, |
1052 | { "Remove sync info","Entferne Sync Info" }, | 1052 | { "Remove sync info","Entferne Sync Info" }, |
1053 | { "For all profiles","Für alle Profile" }, | 1053 | { "For all profiles","Für alle Profile" }, |
1054 | { "Hide not Running","Verstecke nicht Laufende" }, | 1054 | { "Hide not Running","Verstecke nicht Laufende" }, |
1055 | { "ME","ME" }, | 1055 | { "ME","ME" }, |
1056 | { "Toolbar","Toolbar" }, | 1056 | { "Toolbar","Toolbar" }, |
1057 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1057 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1058 | { "Undo Delete","Löschen rückgängig machen" }, | 1058 | { "Undo Delete","Löschen rückgängig machen" }, |
1059 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1059 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1060 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1060 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1061 | { "Januar","Januar" }, | 1061 | { "Januar","Januar" }, |
1062 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1062 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1063 | { "No Filter","Kein Filter" }, | 1063 | { "No Filter","Kein Filter" }, |
1064 | { "Multiple Sync options","Multi Sync Optionen" }, | 1064 | { "Multiple Sync options","Multi Sync Optionen" }, |
1065 | { "Sync algo options","Sync Ablauf Optionen" }, | 1065 | { "Sync algo options","Sync Ablauf Optionen" }, |
1066 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1066 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1067 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1067 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1068 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1068 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1069 | { "Write back options","Optionen zum Zurückschreiben" }, | 1069 | { "Write back options","Optionen zum Zurückschreiben" }, |
1070 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1070 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1071 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1071 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1072 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1072 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1073 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1073 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1074 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1074 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1075 | { "Time period","Zeitspanne" }, | 1075 | { "Time period","Zeitspanne" }, |
1076 | { "From ","Von " }, | 1076 | { "From ","Von " }, |
1077 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1077 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1078 | { " weeks in the future "," Wochen in der Zukunft " }, | 1078 | { " weeks in the future "," Wochen in der Zukunft " }, |
1079 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1079 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1080 | { "Local temp file:","Lokale temp Datei:" }, | 1080 | { "Local temp file:","Lokale temp Datei:" }, |
1081 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1081 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1082 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1082 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1083 | { "Language","Sprache" }, | 1083 | { "Language","Sprache" }, |
1084 | { "Time Format","Zeit Format" }, | 1084 | { "Time Format","Zeit Format" }, |
1085 | { "Time Zone","Zeit Zone" }, | 1085 | { "Time Zone","Zeit Zone" }, |
1086 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1086 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1087 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, | 1087 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
1088 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1088 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1089 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1089 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1090 | { "Save settings","Speichere Einstellungen" }, | 1090 | { "Save settings","Speichere Einstellungen" }, |
1091 | { "Save standard","Speichere Standard" }, | 1091 | { "Save standard","Speichere Standard" }, |
1092 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1092 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1093 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1093 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1094 | { "Data storage path","Daten Speicherpfad" }, | 1094 | { "Data storage path","Daten Speicherpfad" }, |
1095 | { "Language","Sprache" }, | 1095 | { "Language","Sprache" }, |
1096 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1096 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1097 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1097 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1098 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, | 1098 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, |
1099 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1099 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1100 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1100 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1101 | { "KO/Pi","KO/Pi" }, | 1101 | { "KO/Pi","KO/Pi" }, |
1102 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1102 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1103 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1103 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1104 | { "Sound.Al.: ","Sound.Al.: " }, | 1104 | { "Sound.Al.: ","Sound.Al.: " }, |
1105 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1105 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1106 | { "Restore","Wiederherstellen" }, | 1106 | { "Restore","Wiederherstellen" }, |
1107 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1107 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1108 | { "% completed","% komplett" }, | 1108 | { "% completed","% komplett" }, |
1109 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1109 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1110 | { "Set complete","Setze auf erledigt" }, | 1110 | { "Set complete","Setze auf erledigt" }, |
1111 | { "(cancelled)","(gecancelt)" }, | 1111 | { "(cancelled)","(gecancelt)" }, |
1112 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1112 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1113 | { " Local time "," Locale Zeit " }, | 1113 | { " Local time "," Locale Zeit " }, |
1114 | { "Form2","Form2" }, | 1114 | { "Form2","Form2" }, |
1115 | { "Filter enabled","Filter angeschaltet" }, | 1115 | { "Filter enabled","Filter angeschaltet" }, |
1116 | { "Edit Filters","Ändere Filter" }, | 1116 | { "Edit Filters","Ändere Filter" }, |
1117 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1117 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1118 | { "Agenda","Agenda" }, | 1118 | { "Agenda","Agenda" }, |
1119 | { " ("," (" }, | 1119 | { " ("," (" }, |
1120 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1120 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1121 | { "Print","Print" }, | 1121 | { "Print","Print" }, |
1122 | { "&Setup Printer...","Drucker &Setup..." }, | 1122 | { "&Setup Printer...","Drucker &Setup..." }, |
1123 | { "View Type","Zeige Typ" }, | 1123 | { "View Type","Zeige Typ" }, |
1124 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1124 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1125 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1125 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1126 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1126 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1127 | { "Portrait","Portrait" }, | 1127 | { "Portrait","Portrait" }, |
1128 | { "Landscape","Landschaft" }, | 1128 | { "Landscape","Landschaft" }, |
1129 | { "Print day","Drucke Tag" }, | 1129 | { "Print day","Drucke Tag" }, |
1130 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1130 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1131 | { "Date && Time Range","Datum && Zeitspanne" }, | 1131 | { "Date && Time Range","Datum && Zeitspanne" }, |
1132 | { "&End date:","&Enddatum:" }, | 1132 | { "&End date:","&Enddatum:" }, |
1133 | { "&Start date:","&Startdatum:" }, | 1133 | { "&Start date:","&Startdatum:" }, |
1134 | { "Start &time:","Startzeit:" }, | 1134 | { "Start &time:","Startzeit:" }, |
1135 | { "End ti&me:","Endzeit:" }, | 1135 | { "End ti&me:","Endzeit:" }, |
1136 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1136 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1137 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1137 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1138 | { "Alt+D","Alt+D" }, | 1138 | { "Alt+D","Alt+D" }, |
1139 | { "&Use colors","Nutze Farben" }, | 1139 | { "&Use colors","Nutze Farben" }, |
1140 | { "Alt+U","Alt+U" }, | 1140 | { "Alt+U","Alt+U" }, |
1141 | { "Print week","Drucke Woche" }, | 1141 | { "Print week","Drucke Woche" }, |
1142 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1142 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1143 | { "Use &colors","Nutze Farben" }, | 1143 | { "Use &colors","Nutze Farben" }, |
1144 | { "Type of View","Typ der Ansicht" }, | 1144 | { "Type of View","Typ der Ansicht" }, |
1145 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1145 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1146 | { "Alt+F","Alt+F" }, | 1146 | { "Alt+F","Alt+F" }, |
1147 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1147 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1148 | { "Alt+T","Alt+T" }, | 1148 | { "Alt+T","Alt+T" }, |
1149 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1149 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1150 | { "Print month","Drucke Monat" }, | 1150 | { "Print month","Drucke Monat" }, |
1151 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1151 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1152 | { "&Start month:","&Startmonat:" }, | 1152 | { "&Start month:","&Startmonat:" }, |
1153 | { "&End month:","&Endmonat:" }, | 1153 | { "&End month:","&Endmonat:" }, |
1154 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1154 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1155 | { "Print todos","Drucke Todos" }, | 1155 | { "Print todos","Drucke Todos" }, |
1156 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1156 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1157 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1157 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1158 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1158 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1159 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1159 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1160 | { "Items to Print","Zu druckende Items" }, | 1160 | { "Items to Print","Zu druckende Items" }, |
1161 | { "&From:","Von:" }, | 1161 | { "&From:","Von:" }, |
1162 | { "&To:","Bis:" }, | 1162 | { "&To:","Bis:" }, |
1163 | { "Print &all todo items","Drucke alle Todo Items" }, | 1163 | { "Print &all todo items","Drucke alle Todo Items" }, |
1164 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1164 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1165 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1165 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1166 | { "Todo List","Todo Liste" }, | 1166 | { "Todo List","Todo Liste" }, |
1167 | { "&Title:","&Titel:" }, | 1167 | { "&Title:","&Titel:" }, |
1168 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, | 1168 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, |
1169 | { "Todo list","Todo Liste" }, | 1169 | { "Todo list","Todo Liste" }, |
1170 | { "&Print...","Drucke..." }, | 1170 | { "&Print...","Drucke..." }, |
1171 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1171 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1172 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1172 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1173 | { "OK","OK" }, | 1173 | { "OK","OK" }, |
1174 | { "FilterEditor","FilterEditor" }, | 1174 | { "FilterEditor","FilterEditor" }, |
1175 | { "Include","Inclusive" }, | 1175 | { "Include","Inclusive" }, |
1176 | { "Exclude","Exclusive" }, | 1176 | { "Exclude","Exclusive" }, |
1177 | { "Edit Selection...","Editiere Auswahl" }, | 1177 | { "Edit Selection...","Editiere Auswahl" }, |
1178 | { "recurring events","wiederholende Termine" }, | 1178 | { "recurring events","wiederholende Termine" }, |
1179 | { "recurr. events","wiederh.Termine" }, | 1179 | { "recurr. events","wiederh.Termine" }, |
1180 | { "completed to-dos","erledigte Todos" }, | 1180 | { "completed to-dos","erledigte Todos" }, |
1181 | { "events","Termine" }, | 1181 | { "events","Termine" }, |
1182 | { "todos","Todos" }, | 1182 | { "todos","Todos" }, |
1183 | { "journals","Journale" }, | 1183 | { "journals","Journale" }, |
1184 | { "public","öffentl." }, | 1184 | { "public","öffentl." }, |
1185 | { "private","privat" }, | 1185 | { "private","privat" }, |
1186 | { "confidential","vertraul." }, | 1186 | { "confidential","vertraul." }, |
1187 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1187 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1188 | { "Yesterday","Gestern" }, | 1188 | { "Yesterday","Gestern" }, |
1189 | { "Day after tomorrow","Übermorgen" }, | 1189 | { "Day after tomorrow","Übermorgen" }, |
1190 | { "Tomorrow","Morgen" }, | 1190 | { "Tomorrow","Morgen" }, |
1191 | { "Day before yesterday","Vorgestern" }, | 1191 | { "Day before yesterday","Vorgestern" }, |
1192 | { "Size %1","Größe %1" }, | 1192 | { "Size %1","Größe %1" }, |
1193 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1193 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1194 | { " (%1 y.)"," (%1 J.)" }, | 1194 | { " (%1 y.)"," (%1 J.)" }, |
1195 | { "Allday:","Ganztägig:" }, | 1195 | { "Allday:","Ganztägig:" }, |
1196 | { "compl.todos","erled.Todos" }, | 1196 | { "compl.todos","erled.Todos" }, |
1197 | { "Day view","Tagesansicht" }, | 1197 | { "Day view","Tagesansicht" }, |
1198 | { "Next days","Nächste Tage" }, | 1198 | { "Next days","Nächste Tage" }, |
1199 | { "Next week","Nächste Woche" }, | 1199 | { "Next week","Nächste Woche" }, |
1200 | { "Next two weeks","Nächste zwei Wochen" }, | 1200 | { "Next two weeks","Nächste zwei Wochen" }, |
1201 | { "Next month","Nächster Monat" }, | 1201 | { "Next month","Nächster Monat" }, |
1202 | { "Journal view","Journal" }, | 1202 | { "Journal view","Journal" }, |
1203 | { "Display all opened","Zeige alle geöffnet" }, | 1203 | { "Display all opened","Zeige alle geöffnet" }, |
1204 | { "Display all closed","Zeige alle geschlossen" }, | 1204 | { "Display all closed","Zeige alle geschlossen" }, |
1205 | { "Display all flat","Zeige alle flach" }, | 1205 | { "Display all flat","Zeige alle flach" }, |
1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1207 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1207 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1208 | { "Select week %1-%2","Selektiere Woche %1-%2" }, | 1208 | { "Select week %1-%2","Selektiere Woche %1-%2" }, |
1209 | { "Select Week","Selektiere Woche" }, | 1209 | { "Select Week","Selektiere Woche" }, |
1210 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1210 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1211 | { "Set reminder offset to:","Setze Alarm Offset auf:" }, | 1211 | { "Set reminder offset to:","Setze Alarm Offset auf:" }, |
1212 | { "Set Alarm!","Setze Alarm!" }, | 1212 | { "Set Alarm!","Setze Alarm!" }, |
1213 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, | 1213 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, |
1214 | { " and "," und " }, | 1214 | { " and "," und " }, |
1215 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1215 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1216 | { "Mail to selected","Mail an Ausgewählte" }, | 1216 | { "Mail to selected","Mail an Ausgewählte" }, |
1217 | { "Mail to all","Mail an Alle" }, | 1217 | { "Mail to all","Mail an Alle" }, |
1218 | { "","" }, | 1218 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1219 | { "","" }, | 1219 | { "","" }, |
1220 | { "","" }, | 1220 | { "","" }, |
1221 | { "","" }, | 1221 | { "","" }, |
1222 | { "","" }, | 1222 | { "","" }, |
1223 | { "","" }, | 1223 | { "","" }, |
1224 | { "","" }, | 1224 | { "","" }, |
1225 | { "","" }, | 1225 | { "","" }, |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index daa37fd..dfa89e2 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -425,762 +425,776 @@ void MonthViewCell::startUpdateCell() | |||
425 | //qApp->processEvents(); | 425 | //qApp->processEvents(); |
426 | if ( !mHolidayString.isEmpty() ) { | 426 | if ( !mHolidayString.isEmpty() ) { |
427 | MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString ); | 427 | MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString ); |
428 | item->setPalette( mHolidayPalette ); | 428 | item->setPalette( mHolidayPalette ); |
429 | mItemList->insertItem( item ); | 429 | mItemList->insertItem( item ); |
430 | mToolTip += mHolidayString+"\n"; | 430 | mToolTip += mHolidayString+"\n"; |
431 | } | 431 | } |
432 | } | 432 | } |
433 | 433 | ||
434 | void MonthViewCell::insertEvent(Event *event) | 434 | void MonthViewCell::insertEvent(Event *event) |
435 | { | 435 | { |
436 | if ( !(event->doesRecur() == Recurrence::rNone) ) { | 436 | if ( !(event->doesRecur() == Recurrence::rNone) ) { |
437 | if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) | 437 | if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) |
438 | return; | 438 | return; |
439 | else | 439 | else |
440 | if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) | 440 | if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) |
441 | return; | 441 | return; |
442 | } | 442 | } |
443 | 443 | ||
444 | if ( event->categories().contains("Holiday") || | 444 | if ( event->categories().contains("Holiday") || |
445 | event->categories().contains(i18n("Holiday"))) { | 445 | event->categories().contains(i18n("Holiday"))) { |
446 | setHoliday( true ); | 446 | setHoliday( true ); |
447 | if ( mDate.dayOfWeek() == 7 ) | 447 | if ( mDate.dayOfWeek() == 7 ) |
448 | mItemList->setLineWidth( 3 ); | 448 | mItemList->setLineWidth( 3 ); |
449 | } | 449 | } |
450 | QString text; | 450 | QString text; |
451 | if (event->isMultiDay()) { | 451 | if (event->isMultiDay()) { |
452 | QString prefix = "<->"; | 452 | QString prefix = "<->"; |
453 | if ( event->doesRecur() ) { | 453 | if ( event->doesRecur() ) { |
454 | if ( event->recursOn( mDate) ) | 454 | if ( event->recursOn( mDate) ) |
455 | prefix ="->" ; | 455 | prefix ="->" ; |
456 | else { | 456 | else { |
457 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); | 457 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); |
458 | if ( event->recursOn( mDate.addDays( -days)) ) | 458 | if ( event->recursOn( mDate.addDays( -days)) ) |
459 | prefix ="<-" ; | 459 | prefix ="<-" ; |
460 | } | 460 | } |
461 | 461 | ||
462 | } else { | 462 | } else { |
463 | if (mDate == event->dtStart().date()) { | 463 | if (mDate == event->dtStart().date()) { |
464 | prefix ="->" ; | 464 | prefix ="->" ; |
465 | } else if (mDate == event->dtEnd().date()) { | 465 | } else if (mDate == event->dtEnd().date()) { |
466 | prefix ="<-" ; | 466 | prefix ="<-" ; |
467 | } | 467 | } |
468 | } | 468 | } |
469 | if ( !event->doesFloat() ) { | 469 | if ( !event->doesFloat() ) { |
470 | if ( mDate == event->dtStart().date () ) | 470 | if ( mDate == event->dtStart().date () ) |
471 | prefix += KGlobal::locale()->formatTime(event->dtStart().time())+" "; | 471 | prefix += KGlobal::locale()->formatTime(event->dtStart().time())+" "; |
472 | else if ( mDate == event->dtEnd().date () ) | 472 | else if ( mDate == event->dtEnd().date () ) |
473 | prefix += KGlobal::locale()->formatTime(event->dtEnd().time())+" "; | 473 | prefix += KGlobal::locale()->formatTime(event->dtEnd().time())+" "; |
474 | 474 | ||
475 | } | 475 | } |
476 | text = prefix + event->summary(); | 476 | text = prefix + event->summary(); |
477 | mToolTip += text; | 477 | mToolTip += text; |
478 | } else { | 478 | } else { |
479 | if (event->doesFloat()) { | 479 | if (event->doesFloat()) { |
480 | text = event->summary(); | 480 | text = event->summary(); |
481 | mToolTip += text; | 481 | mToolTip += text; |
482 | } | 482 | } |
483 | else { | 483 | else { |
484 | text = KGlobal::locale()->formatTime(event->dtStart().time()); | 484 | text = KGlobal::locale()->formatTime(event->dtStart().time()); |
485 | text += " " + event->summary(); | 485 | text += " " + event->summary(); |
486 | mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 486 | mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); |
487 | } | 487 | } |
488 | } | 488 | } |
489 | 489 | ||
490 | MonthViewItem *item = new MonthViewItem( event, mDate, text ); | 490 | MonthViewItem *item = new MonthViewItem( event, mDate, text ); |
491 | QPalette pal; | 491 | QPalette pal; |
492 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { | 492 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { |
493 | QStringList categories = event->categories(); | 493 | QStringList categories = event->categories(); |
494 | QString cat = categories.first(); | 494 | QString cat = categories.first(); |
495 | if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { | 495 | if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { |
496 | pal = getPalette(); | 496 | pal = getPalette(); |
497 | if (cat.isEmpty()) { | 497 | if (cat.isEmpty()) { |
498 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); | 498 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); |
499 | } else { | 499 | } else { |
500 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); | 500 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); |
501 | } | 501 | } |
502 | 502 | ||
503 | } else { | 503 | } else { |
504 | if (cat.isEmpty()) { | 504 | if (cat.isEmpty()) { |
505 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); | 505 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); |
506 | } else { | 506 | } else { |
507 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); | 507 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); |
508 | } | 508 | } |
509 | } | 509 | } |
510 | 510 | ||
511 | } else { | 511 | } else { |
512 | pal = mStandardPalette ; | 512 | pal = mStandardPalette ; |
513 | } | 513 | } |
514 | item->setPalette( pal ); | 514 | item->setPalette( pal ); |
515 | item->setRecur( event->recurrence()->doesRecur() ); | 515 | item->setRecur( event->recurrence()->doesRecur() ); |
516 | item->setAlarm( event->isAlarmEnabled() ); | 516 | item->setAlarm( event->isAlarmEnabled() ); |
517 | item->setMoreInfo( event->description().length() > 0 ); | 517 | item->setMoreInfo( event->description().length() > 0 ); |
518 | #ifdef DESKTOP_VERSION | 518 | #ifdef DESKTOP_VERSION |
519 | Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, | 519 | Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, |
520 | KOPrefs::instance()->email()); | 520 | KOPrefs::instance()->email()); |
521 | if ( me != 0 ) { | 521 | if ( me != 0 ) { |
522 | if ( me->status() == Attendee::NeedsAction && me->RSVP()) | 522 | if ( me->status() == Attendee::NeedsAction && me->RSVP()) |
523 | item->setReply(true); | 523 | item->setReply(true); |
524 | else | 524 | else |
525 | item->setReply(false); | 525 | item->setReply(false); |
526 | } else | 526 | } else |
527 | item->setReply(false); | 527 | item->setReply(false); |
528 | #endif | 528 | #endif |
529 | mItemList->insertItem( item ); | 529 | mItemList->insertItem( item ); |
530 | mToolTip += "\n"; | 530 | mToolTip += "\n"; |
531 | } | 531 | } |
532 | void MonthViewCell::insertTodo(Todo *todo) | 532 | void MonthViewCell::insertTodo(Todo *todo) |
533 | { | 533 | { |
534 | QString text; | 534 | QString text; |
535 | if (todo->hasDueDate()) { | 535 | if (todo->hasDueDate()) { |
536 | if (!todo->doesFloat()) { | 536 | if (!todo->doesFloat()) { |
537 | text += KGlobal::locale()->formatTime(todo->dtDue().time()); | 537 | text += KGlobal::locale()->formatTime(todo->dtDue().time()); |
538 | text += " "; | 538 | text += " "; |
539 | } | 539 | } |
540 | } | 540 | } |
541 | text += i18n("To-Do: %1").arg(todo->summary()); | 541 | text += i18n("To-Do: %1").arg(todo->summary()); |
542 | 542 | ||
543 | MonthViewItem *item = new MonthViewItem( todo, mDate, text ); | 543 | MonthViewItem *item = new MonthViewItem( todo, mDate, text ); |
544 | //item->setPalette( mStandardPalette ); | 544 | //item->setPalette( mStandardPalette ); |
545 | QPalette pal; | 545 | QPalette pal; |
546 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { | 546 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { |
547 | QStringList categories = todo->categories(); | 547 | QStringList categories = todo->categories(); |
548 | QString cat = categories.first(); | 548 | QString cat = categories.first(); |
549 | if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { | 549 | if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { |
550 | pal = getPalette(); | 550 | pal = getPalette(); |
551 | if (cat.isEmpty()) { | 551 | if (cat.isEmpty()) { |
552 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); | 552 | pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); |
553 | } else { | 553 | } else { |
554 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); | 554 | pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); |
555 | } | 555 | } |
556 | 556 | ||
557 | } else { | 557 | } else { |
558 | if (cat.isEmpty()) { | 558 | if (cat.isEmpty()) { |
559 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); | 559 | pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); |
560 | } else { | 560 | } else { |
561 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); | 561 | pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); |
562 | } | 562 | } |
563 | } | 563 | } |
564 | 564 | ||
565 | } else { | 565 | } else { |
566 | pal = mStandardPalette ; | 566 | pal = mStandardPalette ; |
567 | } | 567 | } |
568 | item->setPalette( pal ); | 568 | item->setPalette( pal ); |
569 | mItemList->insertItem( item ); | 569 | mItemList->insertItem( item ); |
570 | mToolTip += text+"\n"; | 570 | mToolTip += text+"\n"; |
571 | } | 571 | } |
572 | void MonthViewCell::finishUpdateCell() | 572 | void MonthViewCell::finishUpdateCell() |
573 | { | 573 | { |
574 | #ifdef DESKTOP_VERSION | 574 | #ifdef DESKTOP_VERSION |
575 | if (mToolTip != "") | 575 | if (mToolTip != "") |
576 | QToolTip::add(this,mToolTip,toolTipGroup(),""); | 576 | QToolTip::add(this,mToolTip,toolTipGroup(),""); |
577 | #endif | 577 | #endif |
578 | mItemList->sort(); | 578 | mItemList->sort(); |
579 | //setMyPalette(); | 579 | //setMyPalette(); |
580 | setMyPalette(); | 580 | setMyPalette(); |
581 | QString text; | 581 | QString text; |
582 | bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog; | 582 | bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog; |
583 | if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) { | 583 | if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) { |
584 | text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " "; | 584 | text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " "; |
585 | mLabel->resize( mLabelBigSize ); | 585 | mLabel->resize( mLabelBigSize ); |
586 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); | 586 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); |
587 | } else { | 587 | } else { |
588 | mLabel->resize( mLabelSize ); | 588 | mLabel->resize( mLabelSize ); |
589 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); | 589 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); |
590 | } | 590 | } |
591 | 591 | ||
592 | mLabel->setText( text ); | 592 | mLabel->setText( text ); |
593 | resizeEvent( 0 ); | 593 | resizeEvent( 0 ); |
594 | } | 594 | } |
595 | void MonthViewCell::updateCell() | 595 | void MonthViewCell::updateCell() |
596 | { | 596 | { |
597 | if ( !mMonthView->isUpdatePossible() ) | 597 | if ( !mMonthView->isUpdatePossible() ) |
598 | return; | 598 | return; |
599 | startUpdateCell(); | 599 | startUpdateCell(); |
600 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); | 600 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); |
601 | QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); | 601 | QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); |
602 | Event *event; | 602 | Event *event; |
603 | for( event = events.first(); event; event = events.next() ) { // for event | 603 | for( event = events.first(); event; event = events.next() ) { // for event |
604 | insertEvent(event); | 604 | insertEvent(event); |
605 | } | 605 | } |
606 | // insert due todos | 606 | // insert due todos |
607 | QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); | 607 | QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); |
608 | Todo *todo; | 608 | Todo *todo; |
609 | for(todo = todos.first(); todo; todo = todos.next()) { | 609 | for(todo = todos.first(); todo; todo = todos.next()) { |
610 | insertTodo( todo ); | 610 | insertTodo( todo ); |
611 | } | 611 | } |
612 | finishUpdateCell(); | 612 | finishUpdateCell(); |
613 | // if ( isVisible()) | 613 | // if ( isVisible()) |
614 | //qApp->processEvents(); | 614 | //qApp->processEvents(); |
615 | } | 615 | } |
616 | 616 | ||
617 | void MonthViewCell::updateConfig() | 617 | void MonthViewCell::updateConfig( bool bigFont ) // = false |
618 | { | 618 | { |
619 | setFont( KOPrefs::instance()->mMonthViewFont ); | 619 | |
620 | if ( bigFont ) { | ||
621 | QFont fo = KOPrefs::instance()->mMonthViewFont; | ||
622 | int ps = fo.pointSize() + 2; | ||
623 | if ( ps < 18 ) | ||
624 | ps += 2; | ||
625 | fo.setPointSize( ps ); | ||
626 | setFont( fo ); | ||
627 | } else | ||
628 | setFont( KOPrefs::instance()->mMonthViewFont ); | ||
620 | 629 | ||
621 | QFontMetrics fm( font() ); | 630 | QFontMetrics fm( font() ); |
622 | mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); | 631 | mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); |
623 | mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); | 632 | mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); |
624 | mHolidayPalette = mStandardPalette; | 633 | mHolidayPalette = mStandardPalette; |
625 | mPrimaryPalette = mStandardPalette; | 634 | mPrimaryPalette = mStandardPalette; |
626 | mNonPrimaryPalette = mStandardPalette; | 635 | mNonPrimaryPalette = mStandardPalette; |
627 | if ( KOPrefs::instance()->mMonthViewUsesDayColors ) { | 636 | if ( KOPrefs::instance()->mMonthViewUsesDayColors ) { |
628 | mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor ); | 637 | mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor ); |
629 | mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor ); | 638 | mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor ); |
630 | mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark()); | 639 | mHolidayPalette.setColor(QColorGroup::Foreground, KOPrefs::instance()->mMonthViewHolidayColor.dark()); |
631 | mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark()); | 640 | mPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewOddColor.dark()); |
632 | mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor); | 641 | mPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewOddColor); |
633 | mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor); | 642 | mPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewOddColor); |
634 | mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark()); | 643 | mNonPrimaryPalette.setColor(QColorGroup::Foreground,KOPrefs::instance()->mMonthViewEvenColor.dark()); |
635 | mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor); | 644 | mNonPrimaryPalette.setColor(QColorGroup::Base,KOPrefs::instance()->mMonthViewEvenColor); |
636 | mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor); | 645 | mNonPrimaryPalette.setColor(QColorGroup::Background,KOPrefs::instance()->mMonthViewEvenColor); |
637 | } | 646 | } |
638 | //updateCell(); | 647 | //updateCell(); |
639 | } | 648 | } |
640 | 649 | ||
641 | void MonthViewCell::enableScrollBars( bool enabled ) | 650 | void MonthViewCell::enableScrollBars( bool enabled ) |
642 | { | 651 | { |
643 | if ( enabled ) { | 652 | if ( enabled ) { |
644 | mItemList->setVScrollBarMode(QScrollView::Auto); | 653 | mItemList->setVScrollBarMode(QScrollView::Auto); |
645 | mItemList->setHScrollBarMode(QScrollView::Auto); | 654 | mItemList->setHScrollBarMode(QScrollView::Auto); |
646 | } else { | 655 | } else { |
647 | mItemList->setVScrollBarMode(QScrollView::AlwaysOff); | 656 | mItemList->setVScrollBarMode(QScrollView::AlwaysOff); |
648 | mItemList->setHScrollBarMode(QScrollView::AlwaysOff); | 657 | mItemList->setHScrollBarMode(QScrollView::AlwaysOff); |
649 | } | 658 | } |
650 | } | 659 | } |
651 | 660 | ||
652 | Incidence *MonthViewCell::selectedIncidence() | 661 | Incidence *MonthViewCell::selectedIncidence() |
653 | { | 662 | { |
654 | int index = mItemList->currentItem(); | 663 | int index = mItemList->currentItem(); |
655 | if ( index < 0 ) return 0; | 664 | if ( index < 0 ) return 0; |
656 | 665 | ||
657 | MonthViewItem *item = | 666 | MonthViewItem *item = |
658 | static_cast<MonthViewItem *>( mItemList->item( index ) ); | 667 | static_cast<MonthViewItem *>( mItemList->item( index ) ); |
659 | 668 | ||
660 | if ( !item ) return 0; | 669 | if ( !item ) return 0; |
661 | 670 | ||
662 | return item->incidence(); | 671 | return item->incidence(); |
663 | } | 672 | } |
664 | 673 | ||
665 | QDate MonthViewCell::selectedIncidenceDate() | 674 | QDate MonthViewCell::selectedIncidenceDate() |
666 | { | 675 | { |
667 | QDate qd; | 676 | QDate qd; |
668 | int index = mItemList->currentItem(); | 677 | int index = mItemList->currentItem(); |
669 | if ( index < 0 ) return qd; | 678 | if ( index < 0 ) return qd; |
670 | 679 | ||
671 | MonthViewItem *item = | 680 | MonthViewItem *item = |
672 | static_cast<MonthViewItem *>( mItemList->item( index ) ); | 681 | static_cast<MonthViewItem *>( mItemList->item( index ) ); |
673 | 682 | ||
674 | if ( !item ) return qd; | 683 | if ( !item ) return qd; |
675 | 684 | ||
676 | return item->incidenceDate(); | 685 | return item->incidenceDate(); |
677 | } | 686 | } |
678 | 687 | ||
679 | void MonthViewCell::deselect() | 688 | void MonthViewCell::deselect() |
680 | { | 689 | { |
681 | mItemList->clearSelection(); | 690 | mItemList->clearSelection(); |
682 | enableScrollBars( false ); | 691 | enableScrollBars( false ); |
683 | // updateCell(); | 692 | // updateCell(); |
684 | } | 693 | } |
685 | void MonthViewCell::select() | 694 | void MonthViewCell::select() |
686 | { | 695 | { |
687 | ;// updateCell(); | 696 | ;// updateCell(); |
688 | } | 697 | } |
689 | 698 | ||
690 | void MonthViewCell::resizeEvent ( QResizeEvent * ) | 699 | void MonthViewCell::resizeEvent ( QResizeEvent * ) |
691 | { | 700 | { |
692 | if ( !mMonthView->isUpdatePossible() ) | 701 | if ( !mMonthView->isUpdatePossible() ) |
693 | return; | 702 | return; |
694 | 703 | ||
695 | int size = height() - mLabel->height() - 2; | 704 | int size = height() - mLabel->height() - 2; |
696 | if ( size > 0 ) | 705 | if ( size > 0 ) |
697 | mItemList->verticalScrollBar()->setMaximumHeight( size ); | 706 | mItemList->verticalScrollBar()->setMaximumHeight( size ); |
698 | size = width() - mLabel->width() -2; | 707 | size = width() - mLabel->width() -2; |
699 | if ( size > 0 ) | 708 | if ( size > 0 ) |
700 | mItemList->horizontalScrollBar()->setMaximumWidth( size ); | 709 | mItemList->horizontalScrollBar()->setMaximumWidth( size ); |
701 | mLabel->move( width()-mItemList->lineWidth() - mLabel->width(), height()-mItemList->lineWidth() - mLabel->height() ); | 710 | mLabel->move( width()-mItemList->lineWidth() - mLabel->width(), height()-mItemList->lineWidth() - mLabel->height() ); |
702 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); | 711 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); |
703 | } | 712 | } |
704 | 713 | ||
705 | void MonthViewCell::defaultAction( QListBoxItem *item ) | 714 | void MonthViewCell::defaultAction( QListBoxItem *item ) |
706 | { | 715 | { |
707 | if ( !item ) return; | 716 | if ( !item ) return; |
708 | 717 | ||
709 | MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); | 718 | MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); |
710 | Incidence *incidence = eventItem->incidence(); | 719 | Incidence *incidence = eventItem->incidence(); |
711 | if ( incidence ) mMonthView->defaultAction( incidence ); | 720 | if ( incidence ) mMonthView->defaultAction( incidence ); |
712 | } | 721 | } |
713 | void MonthViewCell::showDay() | 722 | void MonthViewCell::showDay() |
714 | { | 723 | { |
715 | emit showDaySignal( date() ); | 724 | emit showDaySignal( date() ); |
716 | } | 725 | } |
717 | void MonthViewCell::newEvent() | 726 | void MonthViewCell::newEvent() |
718 | { | 727 | { |
719 | QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); | 728 | QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); |
720 | emit newEventSignal( dt ); | 729 | emit newEventSignal( dt ); |
721 | } | 730 | } |
722 | void MonthViewCell::cellClicked( QListBoxItem *item ) | 731 | void MonthViewCell::cellClicked( QListBoxItem *item ) |
723 | { | 732 | { |
724 | static QListBoxItem * lastClicked = 0; | 733 | static QListBoxItem * lastClicked = 0; |
725 | if ( item == 0 ) { | 734 | if ( item == 0 ) { |
726 | QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); | 735 | QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); |
727 | emit newEventSignal( dt ); | 736 | emit newEventSignal( dt ); |
728 | return; | 737 | return; |
729 | } | 738 | } |
730 | /* | 739 | /* |
731 | if ( lastClicked ) | 740 | if ( lastClicked ) |
732 | if ( ! item ) { | 741 | if ( ! item ) { |
733 | if ( lastClicked->listBox() != item->listBox() ) | 742 | if ( lastClicked->listBox() != item->listBox() ) |
734 | lastClicked->listBox()->clearSelection(); | 743 | lastClicked->listBox()->clearSelection(); |
735 | } | 744 | } |
736 | */ | 745 | */ |
737 | 746 | ||
738 | mMonthView->setSelectedCell( this ); | 747 | mMonthView->setSelectedCell( this ); |
739 | if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true ); | 748 | if( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) enableScrollBars( true ); |
740 | select(); | 749 | select(); |
741 | } | 750 | } |
742 | 751 | ||
743 | void MonthViewCell::contextMenu( QListBoxItem *item ) | 752 | void MonthViewCell::contextMenu( QListBoxItem *item ) |
744 | { | 753 | { |
745 | if ( !item ) return; | 754 | if ( !item ) return; |
746 | 755 | ||
747 | MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); | 756 | MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); |
748 | Incidence *incidence = eventItem->incidence(); | 757 | Incidence *incidence = eventItem->incidence(); |
749 | if ( incidence ) mMonthView->showContextMenu( incidence ); | 758 | if ( incidence ) mMonthView->showContextMenu( incidence ); |
750 | } | 759 | } |
751 | 760 | ||
752 | void MonthViewCell::selection( QListBoxItem *item ) | 761 | void MonthViewCell::selection( QListBoxItem *item ) |
753 | { | 762 | { |
754 | if ( !item ) return; | 763 | if ( !item ) return; |
755 | 764 | ||
756 | mMonthView->setSelectedCell( this ); | 765 | mMonthView->setSelectedCell( this ); |
757 | } | 766 | } |
758 | 767 | ||
759 | 768 | ||
760 | // ******************************************************************************* | 769 | // ******************************************************************************* |
761 | // ******************************************************************************* | 770 | // ******************************************************************************* |
762 | // ******************************************************************************* | 771 | // ******************************************************************************* |
763 | 772 | ||
764 | 773 | ||
765 | KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | 774 | KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) |
766 | : KOEventView( calendar, parent, name ), | 775 | : KOEventView( calendar, parent, name ), |
767 | mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), | 776 | mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), |
768 | mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) | 777 | mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) |
769 | { | 778 | { |
770 | 779 | ||
771 | clPending = true; | 780 | clPending = true; |
772 | mWidStack = new QWidgetStack( this ); | 781 | mWidStack = new QWidgetStack( this ); |
773 | QHBoxLayout* hb = new QHBoxLayout( this ); | 782 | QHBoxLayout* hb = new QHBoxLayout( this ); |
774 | mMonthView = new QWidget( mWidStack ); | 783 | mMonthView = new QWidget( mWidStack ); |
775 | mWeekView = new QWidget( mWidStack ); | 784 | mWeekView = new QWidget( mWidStack ); |
776 | #if QT_VERSION >= 0x030000 | 785 | #if QT_VERSION >= 0x030000 |
777 | mWidStack->addWidget(mMonthView ); | 786 | mWidStack->addWidget(mMonthView ); |
778 | mWidStack->addWidget(mWeekView ); | 787 | mWidStack->addWidget(mWeekView ); |
779 | #else | 788 | #else |
780 | mWidStack->addWidget( mMonthView, 1 ); | 789 | mWidStack->addWidget( mMonthView, 1 ); |
781 | mWidStack->addWidget( mWeekView , 1 ); | 790 | mWidStack->addWidget( mWeekView , 1 ); |
782 | #endif | 791 | #endif |
783 | hb->addWidget( mWidStack ); | 792 | hb->addWidget( mWidStack ); |
784 | mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); | 793 | mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); |
785 | mShowWeekView = KOPrefs::instance()->mMonthViewWeek; | 794 | mShowWeekView = KOPrefs::instance()->mMonthViewWeek; |
786 | if ( mShowWeekView ) | 795 | if ( mShowWeekView ) |
787 | mWeekStartsMonday = true; | 796 | mWeekStartsMonday = true; |
788 | updatePossible = false; | 797 | updatePossible = false; |
789 | mCells.setAutoDelete( true ); | 798 | mCells.setAutoDelete( true ); |
790 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; | 799 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; |
791 | mDayLabels.resize( mDaysPerWeek ); | 800 | mDayLabels.resize( mDaysPerWeek ); |
792 | mDayLabelsW.resize( mDaysPerWeek ); | 801 | mDayLabelsW.resize( mDaysPerWeek ); |
793 | QFont bfont = font(); | 802 | QFont bfont = font(); |
794 | if ( QApplication::desktop()->width() < 650 ) { | 803 | if ( QApplication::desktop()->width() < 650 ) { |
795 | bfont.setPointSize( bfont.pointSize() - 2 ); | 804 | bfont.setPointSize( bfont.pointSize() - 2 ); |
796 | } | 805 | } |
797 | bfont.setBold( true ); | 806 | bfont.setBold( true ); |
798 | int i; | 807 | int i; |
799 | 808 | ||
800 | for( i = 0; i < mDaysPerWeek; i++ ) { | 809 | for( i = 0; i < mDaysPerWeek; i++ ) { |
801 | QLabel *label = new QLabel( mMonthView ); | 810 | QLabel *label = new QLabel( mMonthView ); |
802 | label->setFont(bfont); | 811 | label->setFont(bfont); |
803 | label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 812 | label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
804 | label->setLineWidth(1); | 813 | label->setLineWidth(1); |
805 | label->setAlignment(AlignCenter); | 814 | label->setAlignment(AlignCenter); |
806 | mDayLabels.insert( i, label ); | 815 | mDayLabels.insert( i, label ); |
807 | label = new QLabel( mWeekView ); | 816 | label = new QLabel( mWeekView ); |
808 | label->setFont(bfont); | 817 | label->setFont(bfont); |
809 | label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 818 | label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
810 | label->setLineWidth(1); | 819 | label->setLineWidth(1); |
811 | label->setAlignment(AlignCenter); | 820 | label->setAlignment(AlignCenter); |
812 | mDayLabelsW.insert( i, label ); | 821 | mDayLabelsW.insert( i, label ); |
813 | } | 822 | } |
814 | 823 | ||
815 | bfont.setBold( false ); | 824 | bfont.setBold( false ); |
816 | mWeekLabels.resize( mNumWeeks+1 ); | 825 | mWeekLabels.resize( mNumWeeks+1 ); |
817 | mWeekLabelsW.resize( 2 ); | 826 | mWeekLabelsW.resize( 2 ); |
818 | for( i = 0; i < mNumWeeks+1; i++ ) { | 827 | for( i = 0; i < mNumWeeks+1; i++ ) { |
819 | KOWeekButton *label = new KOWeekButton( mMonthView ); | 828 | KOWeekButton *label = new KOWeekButton( mMonthView ); |
820 | label->setFont(bfont); | 829 | label->setFont(bfont); |
821 | connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); | 830 | connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); |
822 | label->setFlat(true); | 831 | label->setFlat(true); |
823 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); | 832 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); |
824 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 833 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
825 | //label->setLineWidth(1); | 834 | //label->setLineWidth(1); |
826 | //label->setAlignment(AlignCenter); | 835 | //label->setAlignment(AlignCenter); |
827 | mWeekLabels.insert( i, label ); | 836 | mWeekLabels.insert( i, label ); |
828 | } | 837 | } |
829 | mWeekLabels[mNumWeeks]->setText( i18n("W")); | 838 | mWeekLabels[mNumWeeks]->setText( i18n("W")); |
830 | QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); | 839 | QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); |
831 | 840 | ||
832 | for( i = 0; i < 1+1; i++ ) { | 841 | for( i = 0; i < 1+1; i++ ) { |
833 | KOWeekButton *label = new KOWeekButton( mWeekView ); | 842 | KOWeekButton *label = new KOWeekButton( mWeekView ); |
834 | label->setFont(bfont); | 843 | label->setFont(bfont); |
835 | connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); | 844 | connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); |
836 | label->setFlat(true); | 845 | label->setFlat(true); |
837 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); | 846 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); |
838 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 847 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
839 | //label->setLineWidth(1); | 848 | //label->setLineWidth(1); |
840 | //label->setAlignment(AlignCenter); | 849 | //label->setAlignment(AlignCenter); |
841 | mWeekLabelsW.insert( i, label ); | 850 | mWeekLabelsW.insert( i, label ); |
842 | } | 851 | } |
843 | mWeekLabelsW[1]->setText( i18n("W")); | 852 | mWeekLabelsW[1]->setText( i18n("W")); |
844 | 853 | ||
845 | 854 | ||
846 | int row, col; | 855 | int row, col; |
847 | mCells.resize( mNumCells ); | 856 | mCells.resize( mNumCells ); |
848 | for( row = 0; row < mNumWeeks; ++row ) { | 857 | for( row = 0; row < mNumWeeks; ++row ) { |
849 | for( col = 0; col < mDaysPerWeek; ++col ) { | 858 | for( col = 0; col < mDaysPerWeek; ++col ) { |
850 | MonthViewCell *cell = new MonthViewCell( this, mMonthView ); | 859 | MonthViewCell *cell = new MonthViewCell( this, mMonthView ); |
851 | mCells.insert( row * mDaysPerWeek + col, cell ); | 860 | mCells.insert( row * mDaysPerWeek + col, cell ); |
852 | 861 | ||
853 | connect( cell, SIGNAL( defaultAction( Incidence * ) ), | 862 | connect( cell, SIGNAL( defaultAction( Incidence * ) ), |
854 | SLOT( defaultAction( Incidence * ) ) ); | 863 | SLOT( defaultAction( Incidence * ) ) ); |
855 | connect( cell, SIGNAL( newEventSignal( QDateTime ) ), | 864 | connect( cell, SIGNAL( newEventSignal( QDateTime ) ), |
856 | SIGNAL( newEventSignal( QDateTime ) ) ); | 865 | SIGNAL( newEventSignal( QDateTime ) ) ); |
857 | connect( cell, SIGNAL( showDaySignal( QDate ) ), | 866 | connect( cell, SIGNAL( showDaySignal( QDate ) ), |
858 | SIGNAL( showDaySignal( QDate ) ) ); | 867 | SIGNAL( showDaySignal( QDate ) ) ); |
859 | } | 868 | } |
860 | } | 869 | } |
861 | mCellsW.resize( mDaysPerWeek ); | 870 | mCellsW.resize( mDaysPerWeek ); |
862 | for( col = 0; col < mDaysPerWeek; ++col ) { | 871 | for( col = 0; col < mDaysPerWeek; ++col ) { |
863 | MonthViewCell *cell = new MonthViewCell( this, mWeekView ); | 872 | MonthViewCell *cell = new MonthViewCell( this, mWeekView ); |
864 | mCellsW.insert( col, cell ); | 873 | mCellsW.insert( col, cell ); |
865 | 874 | ||
866 | connect( cell, SIGNAL( defaultAction( Incidence * ) ), | 875 | connect( cell, SIGNAL( defaultAction( Incidence * ) ), |
867 | SLOT( defaultAction( Incidence * ) ) ); | 876 | SLOT( defaultAction( Incidence * ) ) ); |
868 | connect( cell, SIGNAL( newEventSignal( QDateTime ) ), | 877 | connect( cell, SIGNAL( newEventSignal( QDateTime ) ), |
869 | SIGNAL( newEventSignal( QDateTime ) ) ); | 878 | SIGNAL( newEventSignal( QDateTime ) ) ); |
870 | connect( cell, SIGNAL( showDaySignal( QDate ) ), | 879 | connect( cell, SIGNAL( showDaySignal( QDate ) ), |
871 | SIGNAL( showDaySignal( QDate ) ) ); | 880 | SIGNAL( showDaySignal( QDate ) ) ); |
881 | cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont ); | ||
872 | } | 882 | } |
873 | 883 | ||
874 | //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); | 884 | //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); |
875 | mContextMenu = eventPopup(); | 885 | mContextMenu = eventPopup(); |
876 | // updateConfig(); //useless here | 886 | // updateConfig(); //useless here |
877 | 887 | ||
878 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); | 888 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); |
879 | #if 0 | 889 | #if 0 |
880 | mWidStack = new QWidgetStack( this ); | 890 | mWidStack = new QWidgetStack( this ); |
881 | mMonthView = new QWidget( mWidStack ); | 891 | mMonthView = new QWidget( mWidStack ); |
882 | mWeekView = new QWidget( mWidStack ); | 892 | mWeekView = new QWidget( mWidStack ); |
883 | #endif | 893 | #endif |
884 | if ( mShowWeekView ) | 894 | if ( mShowWeekView ) |
885 | mWidStack->raiseWidget( mWeekView ); | 895 | mWidStack->raiseWidget( mWeekView ); |
886 | else | 896 | else |
887 | mWidStack->raiseWidget( mMonthView ); | 897 | mWidStack->raiseWidget( mMonthView ); |
888 | 898 | ||
889 | emit incidenceSelected( 0 ); | 899 | emit incidenceSelected( 0 ); |
890 | } | 900 | } |
891 | 901 | ||
892 | KOMonthView::~KOMonthView() | 902 | KOMonthView::~KOMonthView() |
893 | { | 903 | { |
894 | delete mContextMenu; | 904 | delete mContextMenu; |
895 | } | 905 | } |
896 | void KOMonthView::selectDateWeekNum ( int ) | 906 | void KOMonthView::selectDateWeekNum ( int ) |
897 | { | 907 | { |
898 | 908 | ||
899 | } | 909 | } |
900 | void KOMonthView::selectInternalWeekNum ( int n ) | 910 | void KOMonthView::selectInternalWeekNum ( int n ) |
901 | { | 911 | { |
902 | switchView(); | 912 | switchView(); |
903 | emit selectWeekNum ( n ); | 913 | emit selectWeekNum ( n ); |
904 | } | 914 | } |
905 | 915 | ||
906 | void KOMonthView::switchView() | 916 | void KOMonthView::switchView() |
907 | { | 917 | { |
908 | 918 | ||
909 | if ( selectedCell( ) ) | 919 | if ( selectedCell( ) ) |
910 | selectedCell()->deselect(); | 920 | selectedCell()->deselect(); |
911 | mShowWeekView = !mShowWeekView; | 921 | mShowWeekView = !mShowWeekView; |
912 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; | 922 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; |
913 | //emit showNavigator( !mShowWeekView ); | 923 | //emit showNavigator( !mShowWeekView ); |
914 | if ( clPending ) { | 924 | if ( clPending ) { |
915 | computeLayout(); | 925 | computeLayout(); |
916 | updateConfig(); | 926 | updateConfig(); |
917 | } | 927 | } |
918 | if ( mShowWeekView ) | 928 | if ( mShowWeekView ) |
919 | mWidStack->raiseWidget( mWeekView ); | 929 | mWidStack->raiseWidget( mWeekView ); |
920 | else | 930 | else |
921 | mWidStack->raiseWidget( mMonthView ); | 931 | mWidStack->raiseWidget( mMonthView ); |
922 | clPending = false; | 932 | clPending = false; |
923 | } | 933 | } |
924 | 934 | ||
925 | int KOMonthView::maxDatesHint() | 935 | int KOMonthView::maxDatesHint() |
926 | { | 936 | { |
927 | return mNumCells; | 937 | return mNumCells; |
928 | } | 938 | } |
929 | 939 | ||
930 | int KOMonthView::currentDateCount() | 940 | int KOMonthView::currentDateCount() |
931 | { | 941 | { |
932 | return mNumCells; | 942 | return mNumCells; |
933 | } | 943 | } |
934 | 944 | ||
935 | QPtrList<Incidence> KOMonthView::selectedIncidences() | 945 | QPtrList<Incidence> KOMonthView::selectedIncidences() |
936 | { | 946 | { |
937 | QPtrList<Incidence> selected; | 947 | QPtrList<Incidence> selected; |
938 | 948 | ||
939 | if ( mSelectedCell ) { | 949 | if ( mSelectedCell ) { |
940 | Incidence *incidence = mSelectedCell->selectedIncidence(); | 950 | Incidence *incidence = mSelectedCell->selectedIncidence(); |
941 | if ( incidence ) selected.append( incidence ); | 951 | if ( incidence ) selected.append( incidence ); |
942 | } | 952 | } |
943 | 953 | ||
944 | return selected; | 954 | return selected; |
945 | } | 955 | } |
946 | 956 | ||
947 | DateList KOMonthView::selectedDates() | 957 | DateList KOMonthView::selectedDates() |
948 | { | 958 | { |
949 | DateList selected; | 959 | DateList selected; |
950 | 960 | ||
951 | if ( mSelectedCell ) { | 961 | if ( mSelectedCell ) { |
952 | QDate qd = mSelectedCell->selectedIncidenceDate(); | 962 | QDate qd = mSelectedCell->selectedIncidenceDate(); |
953 | if ( qd.isValid() ) selected.append( qd ); | 963 | if ( qd.isValid() ) selected.append( qd ); |
954 | } | 964 | } |
955 | 965 | ||
956 | return selected; | 966 | return selected; |
957 | } | 967 | } |
958 | 968 | ||
959 | void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 969 | void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
960 | const QDate &td) | 970 | const QDate &td) |
961 | { | 971 | { |
962 | #ifndef KORG_NOPRINTER | 972 | #ifndef KORG_NOPRINTER |
963 | calPrinter->preview(CalPrinter::Month, fd, td); | 973 | calPrinter->preview(CalPrinter::Month, fd, td); |
964 | #endif | 974 | #endif |
965 | } | 975 | } |
966 | 976 | ||
967 | void KOMonthView::updateConfig() | 977 | void KOMonthView::updateConfig() |
968 | { | 978 | { |
969 | 979 | ||
970 | mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); | 980 | mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); |
971 | 981 | ||
972 | if ( mShowWeekView ) { | 982 | if ( mShowWeekView ) { |
973 | mWeekStartsMonday = true; | 983 | mWeekStartsMonday = true; |
974 | } | 984 | } |
975 | QFontMetrics fontmetric(mDayLabels[0]->font()); | 985 | QFontMetrics fontmetric(mDayLabels[0]->font()); |
976 | mWidthLongDayLabel = 0; | 986 | mWidthLongDayLabel = 0; |
977 | 987 | ||
978 | for (int i = 0; i < 7; i++) { | 988 | for (int i = 0; i < 7; i++) { |
979 | int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); | 989 | int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); |
980 | if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; | 990 | if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; |
981 | } | 991 | } |
982 | bool temp = mShowSatSunComp ; | 992 | bool temp = mShowSatSunComp ; |
983 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; | 993 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; |
984 | if ( ! mShowWeekView ) { | 994 | if ( ! mShowWeekView ) { |
985 | if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) | 995 | if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) |
986 | computeLayout(); | 996 | computeLayout(); |
987 | } | 997 | } |
988 | updateDayLabels(); | 998 | updateDayLabels(); |
989 | //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); | 999 | //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); |
990 | //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; | 1000 | //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; |
991 | //resizeEvent( 0 ); | 1001 | //resizeEvent( 0 ); |
992 | for (uint i = 0; i < mCells.count(); ++i) { | 1002 | for (uint i = 0; i < mCells.count(); ++i) { |
993 | mCells[i]->updateConfig(); | 1003 | mCells[i]->updateConfig(); |
994 | } | 1004 | } |
1005 | |||
1006 | for (uint i = 0; i < mCellsW.count(); ++i) { | ||
1007 | mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont); | ||
1008 | } | ||
995 | #ifdef DESKTOP_VERSION | 1009 | #ifdef DESKTOP_VERSION |
996 | MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); | 1010 | MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); |
997 | #endif | 1011 | #endif |
998 | updateView(); | 1012 | updateView(); |
999 | } | 1013 | } |
1000 | 1014 | ||
1001 | void KOMonthView::updateDayLabels() | 1015 | void KOMonthView::updateDayLabels() |
1002 | { | 1016 | { |
1003 | 1017 | ||
1004 | QPtrVector<QLabel> *mDayLabelsT; | 1018 | QPtrVector<QLabel> *mDayLabelsT; |
1005 | #if 0 | 1019 | #if 0 |
1006 | if (mShowWeekView ) | 1020 | if (mShowWeekView ) |
1007 | mDayLabelsT = &mDayLabelsW; | 1021 | mDayLabelsT = &mDayLabelsW; |
1008 | else | 1022 | else |
1009 | mDayLabelsT = &mDayLabels; | 1023 | mDayLabelsT = &mDayLabels; |
1010 | #endif | 1024 | #endif |
1011 | 1025 | ||
1012 | mDayLabelsT = &mDayLabelsW; | 1026 | mDayLabelsT = &mDayLabelsW; |
1013 | for (int i = 0; i < 7; i++) { | 1027 | for (int i = 0; i < 7; i++) { |
1014 | if (mWeekStartsMonday) { | 1028 | if (mWeekStartsMonday) { |
1015 | bool show = mShortDayLabels; | 1029 | bool show = mShortDayLabels; |
1016 | if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) | 1030 | if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) |
1017 | show = true; | 1031 | show = true; |
1018 | (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); | 1032 | (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); |
1019 | } else { | 1033 | } else { |
1020 | if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); | 1034 | if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); |
1021 | else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); | 1035 | else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); |
1022 | 1036 | ||
1023 | } | 1037 | } |
1024 | } | 1038 | } |
1025 | mDayLabelsT = &mDayLabels; | 1039 | mDayLabelsT = &mDayLabels; |
1026 | for (int i = 0; i < 7; i++) { | 1040 | for (int i = 0; i < 7; i++) { |
1027 | if (mWeekStartsMonday) { | 1041 | if (mWeekStartsMonday) { |
1028 | bool show = mShortDayLabels; | 1042 | bool show = mShortDayLabels; |
1029 | if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) | 1043 | if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) |
1030 | show = true; | 1044 | show = true; |
1031 | (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); | 1045 | (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); |
1032 | } else { | 1046 | } else { |
1033 | if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); | 1047 | if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); |
1034 | else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); | 1048 | else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); |
1035 | 1049 | ||
1036 | } | 1050 | } |
1037 | } | 1051 | } |
1038 | 1052 | ||
1039 | } | 1053 | } |
1040 | 1054 | ||
1041 | void KOMonthView::showDates(const QDate &start, const QDate &) | 1055 | void KOMonthView::showDates(const QDate &start, const QDate &) |
1042 | { | 1056 | { |
1043 | // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl; | 1057 | // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl; |
1044 | 1058 | ||
1045 | QPtrVector<MonthViewCell> *cells; | 1059 | QPtrVector<MonthViewCell> *cells; |
1046 | QPtrVector<QLabel> *dayLabels; | 1060 | QPtrVector<QLabel> *dayLabels; |
1047 | QPtrVector<KOWeekButton> *weekLabels; | 1061 | QPtrVector<KOWeekButton> *weekLabels; |
1048 | int weekNum = 6; | 1062 | int weekNum = 6; |
1049 | if ( mShowWeekView ) { | 1063 | if ( mShowWeekView ) { |
1050 | weekNum = 1; | 1064 | weekNum = 1; |
1051 | cells = &mCellsW; | 1065 | cells = &mCellsW; |
1052 | dayLabels = &mDayLabelsW; | 1066 | dayLabels = &mDayLabelsW; |
1053 | weekLabels = &mWeekLabelsW; | 1067 | weekLabels = &mWeekLabelsW; |
1054 | } else { | 1068 | } else { |
1055 | cells = &mCells; | 1069 | cells = &mCells; |
1056 | dayLabels = &mDayLabels; | 1070 | dayLabels = &mDayLabels; |
1057 | weekLabels = &mWeekLabels; | 1071 | weekLabels = &mWeekLabels; |
1058 | } | 1072 | } |
1059 | 1073 | ||
1060 | mStartDate = start; | 1074 | mStartDate = start; |
1061 | 1075 | ||
1062 | int startWeekDay = mWeekStartsMonday ? 1 : 7; | 1076 | int startWeekDay = mWeekStartsMonday ? 1 : 7; |
1063 | 1077 | ||
1064 | while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) { | 1078 | while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) { |
1065 | mStartDate = mStartDate.addDays( -1 ); | 1079 | mStartDate = mStartDate.addDays( -1 ); |
1066 | } | 1080 | } |
1067 | 1081 | ||
1068 | bool primary = false; | 1082 | bool primary = false; |
1069 | uint i; | 1083 | uint i; |
1070 | for( i = 0; i < (*cells).size(); ++i ) { | 1084 | for( i = 0; i < (*cells).size(); ++i ) { |
1071 | QDate date = mStartDate.addDays( i ); | 1085 | QDate date = mStartDate.addDays( i ); |
1072 | (*cells)[i]->setDate( date ); | 1086 | (*cells)[i]->setDate( date ); |
1073 | 1087 | ||
1074 | #ifndef KORG_NOPLUGINS | 1088 | #ifndef KORG_NOPLUGINS |
1075 | // add holiday, if present | 1089 | // add holiday, if present |
1076 | QString hstring(KOCore::self()->holiday(date)); | 1090 | QString hstring(KOCore::self()->holiday(date)); |
1077 | (*cells)[i]->setHoliday( hstring ); | 1091 | (*cells)[i]->setHoliday( hstring ); |
1078 | #endif | 1092 | #endif |
1079 | 1093 | ||
1080 | } | 1094 | } |
1081 | QDate date = mStartDate.addDays( mWeekStartsMonday ? 3 : 4 ); | 1095 | QDate date = mStartDate.addDays( mWeekStartsMonday ? 3 : 4 ); |
1082 | for( i = 0; i < weekNum; ++i ) { | 1096 | for( i = 0; i < weekNum; ++i ) { |
1083 | int wno; | 1097 | int wno; |
1084 | // remember, according to ISO 8601, the first week of the year is the | 1098 | // remember, according to ISO 8601, the first week of the year is the |
1085 | // first week that contains a thursday. Thus we must subtract off 4, | 1099 | // first week that contains a thursday. Thus we must subtract off 4, |
1086 | // not just 1. | 1100 | // not just 1. |
1087 | int dayOfYear = date.dayOfYear(); | 1101 | int dayOfYear = date.dayOfYear(); |
1088 | if (dayOfYear % 7 != 0) | 1102 | if (dayOfYear % 7 != 0) |
1089 | wno = dayOfYear / 7 + 1; | 1103 | wno = dayOfYear / 7 + 1; |
1090 | else | 1104 | else |
1091 | wno =dayOfYear / 7; | 1105 | wno =dayOfYear / 7; |
1092 | (*weekLabels)[i]->setWeekNum( wno ); | 1106 | (*weekLabels)[i]->setWeekNum( wno ); |
1093 | date = date.addDays( 7 ); | 1107 | date = date.addDays( 7 ); |
1094 | } | 1108 | } |
1095 | updateView(); | 1109 | updateView(); |
1096 | } | 1110 | } |
1097 | 1111 | ||
1098 | void KOMonthView::showEvents(QPtrList<Event>) | 1112 | void KOMonthView::showEvents(QPtrList<Event>) |
1099 | { | 1113 | { |
1100 | qDebug("KOMonthView::selectEvents is not implemented yet. "); | 1114 | qDebug("KOMonthView::selectEvents is not implemented yet. "); |
1101 | } | 1115 | } |
1102 | 1116 | ||
1103 | void KOMonthView::changeEventDisplay(Event *, int) | 1117 | void KOMonthView::changeEventDisplay(Event *, int) |
1104 | { | 1118 | { |
1105 | // this should be re-written to be much more efficient, but this | 1119 | // this should be re-written to be much more efficient, but this |
1106 | // quick-and-dirty-hack gets the job done for right now. | 1120 | // quick-and-dirty-hack gets the job done for right now. |
1107 | updateView(); | 1121 | updateView(); |
1108 | } | 1122 | } |
1109 | 1123 | ||
1110 | void KOMonthView::updateView() | 1124 | void KOMonthView::updateView() |
1111 | { | 1125 | { |
1112 | 1126 | ||
1113 | if ( !updatePossible ) | 1127 | if ( !updatePossible ) |
1114 | return; | 1128 | return; |
1115 | //QTime ti; | 1129 | //QTime ti; |
1116 | //ti.start(); | 1130 | //ti.start(); |
1117 | QPtrVector<MonthViewCell> *cells; | 1131 | QPtrVector<MonthViewCell> *cells; |
1118 | if ( mShowWeekView ) { | 1132 | if ( mShowWeekView ) { |
1119 | cells = &mCellsW; | 1133 | cells = &mCellsW; |
1120 | } else { | 1134 | } else { |
1121 | cells = &mCells; | 1135 | cells = &mCells; |
1122 | } | 1136 | } |
1123 | #if 1 | 1137 | #if 1 |
1124 | int i; | 1138 | int i; |
1125 | int timeSpan = (*cells).size()-1; | 1139 | int timeSpan = (*cells).size()-1; |
1126 | if ( KOPrefs::instance()->mMonthViewWeek ) | 1140 | if ( KOPrefs::instance()->mMonthViewWeek ) |
1127 | timeSpan = 6; | 1141 | timeSpan = 6; |
1128 | for( i = 0; i < timeSpan + 1; ++i ) { | 1142 | for( i = 0; i < timeSpan + 1; ++i ) { |
1129 | (*cells)[i]->startUpdateCell(); | 1143 | (*cells)[i]->startUpdateCell(); |
1130 | } | 1144 | } |
1131 | 1145 | ||
1132 | QPtrList<Event> events = calendar()->events(); | 1146 | QPtrList<Event> events = calendar()->events(); |
1133 | Event *event; | 1147 | Event *event; |
1134 | QDateTime dt; | 1148 | QDateTime dt; |
1135 | bool ok; | 1149 | bool ok; |
1136 | QDate endDate = mStartDate.addDays( timeSpan ); | 1150 | QDate endDate = mStartDate.addDays( timeSpan ); |
1137 | for( event = events.first(); event; event = events.next() ) { // for event | 1151 | for( event = events.first(); event; event = events.next() ) { // for event |
1138 | if ( event->doesRecur() ) { | 1152 | if ( event->doesRecur() ) { |
1139 | bool last; | 1153 | bool last; |
1140 | QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); | 1154 | QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); |
1141 | QDateTime incidenceEnd; | 1155 | QDateTime incidenceEnd; |
1142 | int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); | 1156 | int eventlen = event->dtStart().date().daysTo ( event->dtEnd().date() ); |
1143 | bool invalid = false; | 1157 | bool invalid = false; |
1144 | while( true ) { | 1158 | while( true ) { |
1145 | if ( incidenceStart.isValid() ) { | 1159 | if ( incidenceStart.isValid() ) { |
1146 | incidenceEnd = incidenceStart.addDays( eventlen ); | 1160 | incidenceEnd = incidenceStart.addDays( eventlen ); |
1147 | int st = incidenceStart.date().daysTo( endDate ); | 1161 | int st = incidenceStart.date().daysTo( endDate ); |
1148 | if ( st >= 0 ) { // start before timeend | 1162 | if ( st >= 0 ) { // start before timeend |
1149 | int end = mStartDate.daysTo( incidenceEnd.date() ); | 1163 | int end = mStartDate.daysTo( incidenceEnd.date() ); |
1150 | if ( end >= 0 ) { // end after timestart --- got one! | 1164 | if ( end >= 0 ) { // end after timestart --- got one! |
1151 | //normalize | 1165 | //normalize |
1152 | st = timeSpan - st; | 1166 | st = timeSpan - st; |
1153 | if ( st < 0 ) st = 0; | 1167 | if ( st < 0 ) st = 0; |
1154 | if ( end > timeSpan ) end = timeSpan; | 1168 | if ( end > timeSpan ) end = timeSpan; |
1155 | int iii; | 1169 | int iii; |
1156 | //qDebug("found %s %d %d ",event->summary().latin1(), st, end ); | 1170 | //qDebug("found %s %d %d ",event->summary().latin1(), st, end ); |
1157 | for ( iii = st;iii<= end;++iii) | 1171 | for ( iii = st;iii<= end;++iii) |
1158 | (*cells)[iii]->insertEvent( event ); | 1172 | (*cells)[iii]->insertEvent( event ); |
1159 | } | 1173 | } |
1160 | } | 1174 | } |
1161 | } else { | 1175 | } else { |
1162 | if ( invalid ) | 1176 | if ( invalid ) |
1163 | break; | 1177 | break; |
1164 | invalid = true; | 1178 | invalid = true; |
1165 | //qDebug("invalid %s", event->summary().latin1()); | 1179 | //qDebug("invalid %s", event->summary().latin1()); |
1166 | incidenceStart = QDateTime( mStartDate ); | 1180 | incidenceStart = QDateTime( mStartDate ); |
1167 | } | 1181 | } |
1168 | if ( last ) | 1182 | if ( last ) |
1169 | break; | 1183 | break; |
1170 | bool ok; | 1184 | bool ok; |
1171 | incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); | 1185 | incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); |
1172 | if ( ! ok ) | 1186 | if ( ! ok ) |
1173 | break; | 1187 | break; |
1174 | if ( incidenceStart.date() > endDate ) | 1188 | if ( incidenceStart.date() > endDate ) |
1175 | break; | 1189 | break; |
1176 | } | 1190 | } |
1177 | } else { // no recur | 1191 | } else { // no recur |
1178 | int st = event->dtStart().date().daysTo( endDate ); | 1192 | int st = event->dtStart().date().daysTo( endDate ); |
1179 | if ( st >= 0 ) { // start before timeend | 1193 | if ( st >= 0 ) { // start before timeend |
1180 | int end = mStartDate.daysTo( event->dtEnd().date() ); | 1194 | int end = mStartDate.daysTo( event->dtEnd().date() ); |
1181 | if ( end >= 0 ) { // end after timestart --- got one! | 1195 | if ( end >= 0 ) { // end after timestart --- got one! |
1182 | //normalize | 1196 | //normalize |
1183 | st = timeSpan - st; | 1197 | st = timeSpan - st; |
1184 | if ( st < 0 ) st = 0; | 1198 | if ( st < 0 ) st = 0; |
1185 | if ( end > timeSpan ) end = timeSpan; | 1199 | if ( end > timeSpan ) end = timeSpan; |
1186 | int iii; | 1200 | int iii; |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index b89b2bc..700f098 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -1,293 +1,293 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef _KOMONTHVIEW_H | 20 | #ifndef _KOMONTHVIEW_H |
21 | #define _KOMONTHVIEW_H | 21 | #define _KOMONTHVIEW_H |
22 | 22 | ||
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qframe.h> | 24 | #include <qframe.h> |
25 | #include <qdatetime.h> | 25 | #include <qdatetime.h> |
26 | #include <qlistbox.h> | 26 | #include <qlistbox.h> |
27 | #include <qpoint.h> | 27 | #include <qpoint.h> |
28 | #include <qwidgetstack.h> | 28 | #include <qwidgetstack.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qintdict.h> | 30 | #include <qintdict.h> |
31 | #include <qpushbutton.h> | 31 | #include <qpushbutton.h> |
32 | #include <qvaluelist.h> | 32 | #include <qvaluelist.h> |
33 | #include <qptrvector.h> | 33 | #include <qptrvector.h> |
34 | 34 | ||
35 | #include <libkcal/calendar.h> | 35 | #include <libkcal/calendar.h> |
36 | #include <libkcal/event.h> | 36 | #include <libkcal/event.h> |
37 | 37 | ||
38 | #include "koeventview.h" | 38 | #include "koeventview.h" |
39 | 39 | ||
40 | #ifdef DESKTOP_VERSION | 40 | #ifdef DESKTOP_VERSION |
41 | class QToolTipGroup; | 41 | class QToolTipGroup; |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | class KNOWhatsThis; | 44 | class KNOWhatsThis; |
45 | class KOWeekButton : public QPushButton | 45 | class KOWeekButton : public QPushButton |
46 | { | 46 | { |
47 | Q_OBJECT | 47 | Q_OBJECT |
48 | public: | 48 | public: |
49 | KOWeekButton( QWidget *parent=0, const char *name=0 ) : | 49 | KOWeekButton( QWidget *parent=0, const char *name=0 ) : |
50 | QPushButton( parent, name) | 50 | QPushButton( parent, name) |
51 | { | 51 | { |
52 | connect( this, SIGNAL( clicked() ), | 52 | connect( this, SIGNAL( clicked() ), |
53 | SLOT( bottonClicked() )); | 53 | SLOT( bottonClicked() )); |
54 | mNumber = -1; | 54 | mNumber = -1; |
55 | } | 55 | } |
56 | void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));} | 56 | void setWeekNum ( int num ) {mNumber = num; setText( QString::number ( num ));} |
57 | signals: | 57 | signals: |
58 | void selectWeekNum ( int ); | 58 | void selectWeekNum ( int ); |
59 | private: | 59 | private: |
60 | int mNumber; | 60 | int mNumber; |
61 | private slots : | 61 | private slots : |
62 | void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); } | 62 | void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); } |
63 | }; | 63 | }; |
64 | 64 | ||
65 | class KNoScrollListBox: public QListBox | 65 | class KNoScrollListBox: public QListBox |
66 | { | 66 | { |
67 | Q_OBJECT | 67 | Q_OBJECT |
68 | public: | 68 | public: |
69 | KNoScrollListBox(QWidget *parent=0, const char *name=0); | 69 | KNoScrollListBox(QWidget *parent=0, const char *name=0); |
70 | ~KNoScrollListBox(); | 70 | ~KNoScrollListBox(); |
71 | QString getWhatsThisText(QPoint p) ; | 71 | QString getWhatsThisText(QPoint p) ; |
72 | 72 | ||
73 | signals: | 73 | signals: |
74 | void shiftDown(); | 74 | void shiftDown(); |
75 | void shiftUp(); | 75 | void shiftUp(); |
76 | void rightClick(); | 76 | void rightClick(); |
77 | 77 | ||
78 | protected slots: | 78 | protected slots: |
79 | void keyPressEvent(QKeyEvent *); | 79 | void keyPressEvent(QKeyEvent *); |
80 | void keyReleaseEvent(QKeyEvent *); | 80 | void keyReleaseEvent(QKeyEvent *); |
81 | void mousePressEvent(QMouseEvent *); | 81 | void mousePressEvent(QMouseEvent *); |
82 | 82 | ||
83 | private: | 83 | private: |
84 | KNOWhatsThis * mWT; | 84 | KNOWhatsThis * mWT; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | 87 | ||
88 | class MonthViewItem: public QListBoxItem | 88 | class MonthViewItem: public QListBoxItem |
89 | { | 89 | { |
90 | public: | 90 | public: |
91 | MonthViewItem( Incidence *, QDate qd, const QString & title ); | 91 | MonthViewItem( Incidence *, QDate qd, const QString & title ); |
92 | 92 | ||
93 | void setRecur(bool on) { mRecur = on; } | 93 | void setRecur(bool on) { mRecur = on; } |
94 | void setAlarm(bool on) { mAlarm = on; } | 94 | void setAlarm(bool on) { mAlarm = on; } |
95 | void setReply(bool on) { mReply = on; } | 95 | void setReply(bool on) { mReply = on; } |
96 | void setMoreInfo(bool on) { mInfo = on; } | 96 | void setMoreInfo(bool on) { mInfo = on; } |
97 | 97 | ||
98 | 98 | ||
99 | void setPalette(const QPalette &p) { mPalette = p; } | 99 | void setPalette(const QPalette &p) { mPalette = p; } |
100 | QPalette palette() const { return mPalette; } | 100 | QPalette palette() const { return mPalette; } |
101 | 101 | ||
102 | Incidence *incidence() const { return mIncidence; } | 102 | Incidence *incidence() const { return mIncidence; } |
103 | QDate incidenceDate() { return mDate; } | 103 | QDate incidenceDate() { return mDate; } |
104 | 104 | ||
105 | protected: | 105 | protected: |
106 | virtual void paint(QPainter *); | 106 | virtual void paint(QPainter *); |
107 | virtual int height(const QListBox *) const; | 107 | virtual int height(const QListBox *) const; |
108 | virtual int width(const QListBox *) const; | 108 | virtual int width(const QListBox *) const; |
109 | 109 | ||
110 | private: | 110 | private: |
111 | bool mRecur; | 111 | bool mRecur; |
112 | bool mAlarm; | 112 | bool mAlarm; |
113 | bool mReply; | 113 | bool mReply; |
114 | bool mInfo; | 114 | bool mInfo; |
115 | 115 | ||
116 | QPalette mPalette; | 116 | QPalette mPalette; |
117 | QDate mDate; | 117 | QDate mDate; |
118 | 118 | ||
119 | Incidence *mIncidence; | 119 | Incidence *mIncidence; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | 122 | ||
123 | class KOMonthView; | 123 | class KOMonthView; |
124 | 124 | ||
125 | class MonthViewCell : public QWidget | 125 | class MonthViewCell : public QWidget |
126 | { | 126 | { |
127 | Q_OBJECT | 127 | Q_OBJECT |
128 | public: | 128 | public: |
129 | MonthViewCell(KOMonthView *,QWidget* ); | 129 | MonthViewCell(KOMonthView *,QWidget* ); |
130 | 130 | ||
131 | void setDate( const QDate & ); | 131 | void setDate( const QDate & ); |
132 | QDate date() const; | 132 | QDate date() const; |
133 | 133 | ||
134 | void setPrimary( bool ); | 134 | void setPrimary( bool ); |
135 | bool isPrimary() const; | 135 | bool isPrimary() const; |
136 | 136 | ||
137 | void setHoliday( bool ); | 137 | void setHoliday( bool ); |
138 | void setHoliday( const QString & ); | 138 | void setHoliday( const QString & ); |
139 | 139 | ||
140 | void updateCell(); | 140 | void updateCell(); |
141 | void startUpdateCell(); | 141 | void startUpdateCell(); |
142 | void finishUpdateCell(); | 142 | void finishUpdateCell(); |
143 | void insertEvent(Event *); | 143 | void insertEvent(Event *); |
144 | void insertTodo(Todo *); | 144 | void insertTodo(Todo *); |
145 | 145 | ||
146 | void updateConfig(); | 146 | void updateConfig( bool bigFont = false ); |
147 | 147 | ||
148 | void enableScrollBars( bool ); | 148 | void enableScrollBars( bool ); |
149 | 149 | ||
150 | Incidence *selectedIncidence(); | 150 | Incidence *selectedIncidence(); |
151 | QDate selectedIncidenceDate(); | 151 | QDate selectedIncidenceDate(); |
152 | 152 | ||
153 | void deselect(); | 153 | void deselect(); |
154 | void select(); | 154 | void select(); |
155 | void clear(); | 155 | void clear(); |
156 | 156 | ||
157 | #ifdef DESKTOP_VERSION | 157 | #ifdef DESKTOP_VERSION |
158 | static QToolTipGroup *toolTipGroup(); | 158 | static QToolTipGroup *toolTipGroup(); |
159 | #endif | 159 | #endif |
160 | signals: | 160 | signals: |
161 | void defaultAction( Incidence * ); | 161 | void defaultAction( Incidence * ); |
162 | void newEventSignal( QDateTime ); | 162 | void newEventSignal( QDateTime ); |
163 | void showDaySignal( QDate ); | 163 | void showDaySignal( QDate ); |
164 | 164 | ||
165 | protected: | 165 | protected: |
166 | QString mToolTip; | 166 | QString mToolTip; |
167 | void resizeEvent( QResizeEvent * ); | 167 | void resizeEvent( QResizeEvent * ); |
168 | 168 | ||
169 | protected slots: | 169 | protected slots: |
170 | void defaultAction( QListBoxItem * ); | 170 | void defaultAction( QListBoxItem * ); |
171 | void contextMenu( QListBoxItem * ); | 171 | void contextMenu( QListBoxItem * ); |
172 | void selection( QListBoxItem * ); | 172 | void selection( QListBoxItem * ); |
173 | void cellClicked( QListBoxItem * ); | 173 | void cellClicked( QListBoxItem * ); |
174 | void newEvent(); | 174 | void newEvent(); |
175 | void showDay(); | 175 | void showDay(); |
176 | 176 | ||
177 | private: | 177 | private: |
178 | KOMonthView *mMonthView; | 178 | KOMonthView *mMonthView; |
179 | 179 | ||
180 | QDate mDate; | 180 | QDate mDate; |
181 | bool mPrimary; | 181 | bool mPrimary; |
182 | bool mHoliday; | 182 | bool mHoliday; |
183 | QString mHolidayString; | 183 | QString mHolidayString; |
184 | 184 | ||
185 | //QLabel *mLabel; | 185 | //QLabel *mLabel; |
186 | QPushButton *mLabel; | 186 | QPushButton *mLabel; |
187 | QListBox *mItemList; | 187 | QListBox *mItemList; |
188 | #ifdef DESKTOP_VERSION | 188 | #ifdef DESKTOP_VERSION |
189 | static QToolTipGroup *mToolTipGroup; | 189 | static QToolTipGroup *mToolTipGroup; |
190 | #endif | 190 | #endif |
191 | QSize mLabelSize; | 191 | QSize mLabelSize; |
192 | QSize mLabelBigSize; | 192 | QSize mLabelBigSize; |
193 | QPalette mHolidayPalette; | 193 | QPalette mHolidayPalette; |
194 | QPalette mStandardPalette; | 194 | QPalette mStandardPalette; |
195 | QPalette mPrimaryPalette; | 195 | QPalette mPrimaryPalette; |
196 | QPalette mNonPrimaryPalette; | 196 | QPalette mNonPrimaryPalette; |
197 | void setMyPalette(); | 197 | void setMyPalette(); |
198 | QPalette getPalette (); | 198 | QPalette getPalette (); |
199 | void keyPressEvent ( QKeyEvent * ) ; | 199 | void keyPressEvent ( QKeyEvent * ) ; |
200 | 200 | ||
201 | }; | 201 | }; |
202 | 202 | ||
203 | 203 | ||
204 | class KOMonthView: public KOEventView | 204 | class KOMonthView: public KOEventView |
205 | { | 205 | { |
206 | Q_OBJECT | 206 | Q_OBJECT |
207 | public: | 207 | public: |
208 | KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); | 208 | KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); |
209 | ~KOMonthView(); | 209 | ~KOMonthView(); |
210 | 210 | ||
211 | /** Returns maximum number of days supported by the komonthview */ | 211 | /** Returns maximum number of days supported by the komonthview */ |
212 | virtual int maxDatesHint(); | 212 | virtual int maxDatesHint(); |
213 | 213 | ||
214 | /** Returns number of currently shown dates. */ | 214 | /** Returns number of currently shown dates. */ |
215 | virtual int currentDateCount(); | 215 | virtual int currentDateCount(); |
216 | 216 | ||
217 | /** returns the currently selected events */ | 217 | /** returns the currently selected events */ |
218 | virtual QPtrList<Incidence> selectedIncidences(); | 218 | virtual QPtrList<Incidence> selectedIncidences(); |
219 | 219 | ||
220 | /** returns dates of the currently selected events */ | 220 | /** returns dates of the currently selected events */ |
221 | virtual DateList selectedDates(); | 221 | virtual DateList selectedDates(); |
222 | 222 | ||
223 | virtual void printPreview(CalPrinter *calPrinter, | 223 | virtual void printPreview(CalPrinter *calPrinter, |
224 | const QDate &, const QDate &); | 224 | const QDate &, const QDate &); |
225 | bool isMonthView() { return true; } | 225 | bool isMonthView() { return true; } |
226 | bool isUpdatePossible() { return updatePossible; } | 226 | bool isUpdatePossible() { return updatePossible; } |
227 | 227 | ||
228 | MonthViewCell * selectedCell(); | 228 | MonthViewCell * selectedCell(); |
229 | public slots: | 229 | public slots: |
230 | virtual void updateView(); | 230 | virtual void updateView(); |
231 | virtual void updateConfig(); | 231 | virtual void updateConfig(); |
232 | virtual void showDates(const QDate &start, const QDate &end); | 232 | virtual void showDates(const QDate &start, const QDate &end); |
233 | virtual void showEvents(QPtrList<Event> eventList); | 233 | virtual void showEvents(QPtrList<Event> eventList); |
234 | 234 | ||
235 | void changeEventDisplay(Event *, int); | 235 | void changeEventDisplay(Event *, int); |
236 | 236 | ||
237 | void clearSelection(); | 237 | void clearSelection(); |
238 | 238 | ||
239 | void showContextMenu( Incidence * ); | 239 | void showContextMenu( Incidence * ); |
240 | 240 | ||
241 | void setSelectedCell( MonthViewCell * ); | 241 | void setSelectedCell( MonthViewCell * ); |
242 | 242 | ||
243 | protected slots: | 243 | protected slots: |
244 | void selectDateWeekNum ( int ); | 244 | void selectDateWeekNum ( int ); |
245 | void selectInternalWeekNum ( int ); | 245 | void selectInternalWeekNum ( int ); |
246 | void switchView(); | 246 | void switchView(); |
247 | void processSelectionChange(); | 247 | void processSelectionChange(); |
248 | signals: | 248 | signals: |
249 | void nextMonth(); | 249 | void nextMonth(); |
250 | void prevMonth(); | 250 | void prevMonth(); |
251 | void showNavigator( bool ); | 251 | void showNavigator( bool ); |
252 | void selectWeekNum ( int ); | 252 | void selectWeekNum ( int ); |
253 | void showDaySignal( QDate ); | 253 | void showDaySignal( QDate ); |
254 | protected: | 254 | protected: |
255 | void resizeEvent(QResizeEvent *); | 255 | void resizeEvent(QResizeEvent *); |
256 | void viewChanged(); | 256 | void viewChanged(); |
257 | void updateDayLabels(); | 257 | void updateDayLabels(); |
258 | 258 | ||
259 | private: | 259 | private: |
260 | bool clPending; | 260 | bool clPending; |
261 | QWidgetStack * mWidStack; | 261 | QWidgetStack * mWidStack; |
262 | QWidget* mMonthView; | 262 | QWidget* mMonthView; |
263 | QWidget* mWeekView; | 263 | QWidget* mWeekView; |
264 | bool mShowWeekView; | 264 | bool mShowWeekView; |
265 | bool updatePossible; | 265 | bool updatePossible; |
266 | int mDaysPerWeek; | 266 | int mDaysPerWeek; |
267 | int mNumWeeks; | 267 | int mNumWeeks; |
268 | int mNumCells; | 268 | int mNumCells; |
269 | bool mWeekStartsMonday; | 269 | bool mWeekStartsMonday; |
270 | bool mShowSatSunComp; | 270 | bool mShowSatSunComp; |
271 | void computeLayout(); | 271 | void computeLayout(); |
272 | void computeLayoutWeek(); | 272 | void computeLayoutWeek(); |
273 | 273 | ||
274 | QPtrVector<MonthViewCell> mCells; | 274 | QPtrVector<MonthViewCell> mCells; |
275 | QPtrVector<QLabel> mDayLabels; | 275 | QPtrVector<QLabel> mDayLabels; |
276 | QPtrVector<KOWeekButton> mWeekLabels; | 276 | QPtrVector<KOWeekButton> mWeekLabels; |
277 | QPtrVector<MonthViewCell> mCellsW; | 277 | QPtrVector<MonthViewCell> mCellsW; |
278 | QPtrVector<QLabel> mDayLabelsW; | 278 | QPtrVector<QLabel> mDayLabelsW; |
279 | QPtrVector<KOWeekButton> mWeekLabelsW; | 279 | QPtrVector<KOWeekButton> mWeekLabelsW; |
280 | 280 | ||
281 | bool mShortDayLabels; | 281 | bool mShortDayLabels; |
282 | int mWidthLongDayLabel; | 282 | int mWidthLongDayLabel; |
283 | 283 | ||
284 | QDate mStartDate; | 284 | QDate mStartDate; |
285 | 285 | ||
286 | MonthViewCell *mSelectedCell; | 286 | MonthViewCell *mSelectedCell; |
287 | 287 | ||
288 | KOEventPopupMenu *mContextMenu; | 288 | KOEventPopupMenu *mContextMenu; |
289 | void keyPressEvent ( QKeyEvent * ) ; | 289 | void keyPressEvent ( QKeyEvent * ) ; |
290 | 290 | ||
291 | }; | 291 | }; |
292 | 292 | ||
293 | #endif | 293 | #endif |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 2fb7c36..ea5aaa1 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -56,385 +56,386 @@ KOPrefs::KOPrefs() : | |||
56 | fillMailDefaults(); | 56 | fillMailDefaults(); |
57 | mDefaultCategoryColor = QColor(175,210,255);//196,196,196); | 57 | mDefaultCategoryColor = QColor(175,210,255);//196,196,196); |
58 | QColor defaultHolidayColor = QColor(255,0,0); | 58 | QColor defaultHolidayColor = QColor(255,0,0); |
59 | QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); | 59 | QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); |
60 | QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); | 60 | QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); |
61 | QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); | 61 | QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); |
62 | QColor defaultTodoDueTodayColor = QColor(255,220,100); | 62 | QColor defaultTodoDueTodayColor = QColor(255,220,100); |
63 | QColor defaultTodoOverdueColor = QColor(255,153,125); | 63 | QColor defaultTodoOverdueColor = QColor(255,153,125); |
64 | 64 | ||
65 | mTimeBarFont = QFont("helvetica",10);//,QFont::Bold); | 65 | mTimeBarFont = QFont("helvetica",10);//,QFont::Bold); |
66 | mDefaultViewFont = QFont("helvetica",10); | 66 | mDefaultViewFont = QFont("helvetica",10); |
67 | mDefaultMonthViewFont = QFont("helvetica",8); | 67 | mDefaultMonthViewFont = QFont("helvetica",8); |
68 | mMarcusBainsFont= QFont("helvetica",10); | 68 | mMarcusBainsFont= QFont("helvetica",10); |
69 | mDateNavigatorFont= QFont("helvetica",10, QFont::Bold); | 69 | mDateNavigatorFont= QFont("helvetica",10, QFont::Bold); |
70 | mEditBoxFont = QFont("helvetica",12); | 70 | mEditBoxFont = QFont("helvetica",12); |
71 | mJornalViewFont = QFont("helvetica",12); | 71 | mJornalViewFont = QFont("helvetica",12); |
72 | 72 | ||
73 | KPrefs::setCurrentGroup("General"); | 73 | KPrefs::setCurrentGroup("General"); |
74 | 74 | ||
75 | 75 | ||
76 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 76 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
77 | 77 | ||
78 | addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); | 78 | addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); |
79 | addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); | 79 | addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); |
80 | addItemBool("ShowIconSearch",&mShowIconSearch,true); | 80 | addItemBool("ShowIconSearch",&mShowIconSearch,true); |
81 | addItemBool("ShowIconList",&mShowIconList,true); | 81 | addItemBool("ShowIconList",&mShowIconList,true); |
82 | addItemBool("ShowIconDay1",&mShowIconDay1,true); | 82 | addItemBool("ShowIconDay1",&mShowIconDay1,true); |
83 | addItemBool("ShowIconDay5",&mShowIconDay5,true); | 83 | addItemBool("ShowIconDay5",&mShowIconDay5,true); |
84 | addItemBool("ShowIconDay7",&mShowIconDay7,true); | 84 | addItemBool("ShowIconDay7",&mShowIconDay7,true); |
85 | addItemBool("ShowIconMonth",&mShowIconMonth,true); | 85 | addItemBool("ShowIconMonth",&mShowIconMonth,true); |
86 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); | 86 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); |
87 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); | 87 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); |
88 | addItemBool("ShowIconBack",&mShowIconBack,true); | 88 | addItemBool("ShowIconBack",&mShowIconBack,true); |
89 | addItemBool("ShowIconToday",&mShowIconToday,true); | 89 | addItemBool("ShowIconToday",&mShowIconToday,true); |
90 | addItemBool("ShowIconForward",&mShowIconForward,true); | 90 | addItemBool("ShowIconForward",&mShowIconForward,true); |
91 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); | 91 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); |
92 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); | 92 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); |
93 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); | 93 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); |
94 | addItemBool("ShowIconNext",&mShowIconNext,true); | 94 | addItemBool("ShowIconNext",&mShowIconNext,true); |
95 | addItemBool("ShowIconJournal",&mShowIconJournal,true); | 95 | addItemBool("ShowIconJournal",&mShowIconJournal,true); |
96 | addItemBool("ShowIconStretch",&mShowIconStretch,true); | 96 | addItemBool("ShowIconStretch",&mShowIconStretch,true); |
97 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); | 97 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); |
98 | 98 | ||
99 | addItemBool("AskForQuit",&mAskForQuit,false); | 99 | addItemBool("AskForQuit",&mAskForQuit,false); |
100 | 100 | ||
101 | #ifndef DESKTOP_VERSION | 101 | #ifndef DESKTOP_VERSION |
102 | addItemBool("ShowFullMenu",&mShowFullMenu,false); | 102 | addItemBool("ShowFullMenu",&mShowFullMenu,false); |
103 | #else | 103 | #else |
104 | addItemBool("ShowFullMenu",&mShowFullMenu,true); | 104 | addItemBool("ShowFullMenu",&mShowFullMenu,true); |
105 | #endif | 105 | #endif |
106 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 106 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
107 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 107 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
108 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); | 108 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); |
109 | addItemInt("Whats Next Days",&mWhatsNextDays,3); | 109 | addItemInt("Whats Next Days",&mWhatsNextDays,3); |
110 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); | 110 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); |
111 | 111 | ||
112 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); | 112 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); |
113 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); | 113 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); |
114 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); | 114 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); |
115 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); | 115 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); |
116 | addItemInt("AllDay Size",&mAllDaySize,28); | 116 | addItemInt("AllDay Size",&mAllDaySize,28); |
117 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; | 117 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; |
118 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); | 118 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); |
119 | 119 | ||
120 | addItemStringList("LocationDefaults",&mLocationDefaults ); | 120 | addItemStringList("LocationDefaults",&mLocationDefaults ); |
121 | addItemStringList("EventSummary User",&mEventSummaryUser); | 121 | addItemStringList("EventSummary User",&mEventSummaryUser); |
122 | addItemStringList("TodoSummary User",&mTodoSummaryUser); | 122 | addItemStringList("TodoSummary User",&mTodoSummaryUser); |
123 | 123 | ||
124 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 124 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
125 | addItemBool("Enable Project View",&mEnableProjectView,false); | 125 | addItemBool("Enable Project View",&mEnableProjectView,false); |
126 | addItemBool("Auto Save",&mAutoSave,false); | 126 | addItemBool("Auto Save",&mAutoSave,false); |
127 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); | 127 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); |
128 | addItemBool("Confirm Deletes",&mConfirm,true); | 128 | addItemBool("Confirm Deletes",&mConfirm,true); |
129 | addItemString("Archive File",&mArchiveFile); | 129 | addItemString("Archive File",&mArchiveFile); |
130 | addItemString("Html Export File",&mHtmlExportFile, | 130 | addItemString("Html Export File",&mHtmlExportFile, |
131 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); | 131 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); |
132 | addItemBool("Html With Save",&mHtmlWithSave,false); | 132 | addItemBool("Html With Save",&mHtmlWithSave,false); |
133 | 133 | ||
134 | KPrefs::setCurrentGroup("Personal Settings"); | 134 | KPrefs::setCurrentGroup("Personal Settings"); |
135 | 135 | ||
136 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 136 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
137 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 137 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
138 | addItemBool("Bcc",&mBcc,false); | 138 | addItemBool("Bcc",&mBcc,false); |
139 | 139 | ||
140 | KPrefs::setCurrentGroup("Time & Date"); | 140 | KPrefs::setCurrentGroup("Time & Date"); |
141 | 141 | ||
142 | 142 | ||
143 | addItemInt("Default Start Time",&mStartTime,10); | 143 | addItemInt("Default Start Time",&mStartTime,10); |
144 | addItemInt("Default Duration",&mDefaultDuration,2); | 144 | addItemInt("Default Duration",&mDefaultDuration,2); |
145 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 145 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
146 | KPrefs::setCurrentGroup("AlarmSettings"); | 146 | KPrefs::setCurrentGroup("AlarmSettings"); |
147 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 147 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
148 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 148 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
149 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 149 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
150 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 150 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
151 | 151 | ||
152 | 152 | ||
153 | KPrefs::setCurrentGroup("Calendar"); | 153 | KPrefs::setCurrentGroup("Calendar"); |
154 | 154 | ||
155 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); | 155 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); |
156 | 156 | ||
157 | KPrefs::setCurrentGroup("Fonts"); | 157 | KPrefs::setCurrentGroup("Fonts"); |
158 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 158 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
159 | addItemFont("TimeBar Font",&mTimeBarFont); | 159 | addItemFont("TimeBar Font",&mTimeBarFont); |
160 | addItemFont("MonthView Font",&mMonthViewFont); | 160 | addItemFont("MonthView Font",&mMonthViewFont); |
161 | addItemFont("AgendaView Font",&mAgendaViewFont); | 161 | addItemFont("AgendaView Font",&mAgendaViewFont); |
162 | addItemFont("MarcusBains Font",&mMarcusBainsFont); | 162 | addItemFont("MarcusBains Font",&mMarcusBainsFont); |
163 | addItemFont("TimeLabels Font",&mTimeLabelsFont); | 163 | addItemFont("TimeLabels Font",&mTimeLabelsFont); |
164 | addItemFont("TodoView Font",&mTodoViewFont); | 164 | addItemFont("TodoView Font",&mTodoViewFont); |
165 | addItemFont("ListView Font",&mListViewFont); | 165 | addItemFont("ListView Font",&mListViewFont); |
166 | addItemFont("DateNavigator Font",&mDateNavigatorFont); | 166 | addItemFont("DateNavigator Font",&mDateNavigatorFont); |
167 | addItemFont("EditBox Font",&mEditBoxFont); | 167 | addItemFont("EditBox Font",&mEditBoxFont); |
168 | addItemFont("JournalView Font",&mJornalViewFont); | 168 | addItemFont("JournalView Font",&mJornalViewFont); |
169 | addItemFont("WhatsNextView Font",&mWhatsNextFont); | 169 | addItemFont("WhatsNextView Font",&mWhatsNextFont); |
170 | addItemFont("EventView Font",&mEventViewFont); | 170 | addItemFont("EventView Font",&mEventViewFont); |
171 | 171 | ||
172 | KPrefs::setCurrentGroup("RemoteSyncing"); | 172 | KPrefs::setCurrentGroup("RemoteSyncing"); |
173 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); | 173 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); |
174 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); | 174 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); |
175 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 175 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
176 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 176 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
177 | 177 | ||
178 | #ifdef _WIN32_ | 178 | #ifdef _WIN32_ |
179 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 179 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
180 | #else | 180 | #else |
181 | QString hdp= locateLocal("data","korganizer")+"/"; | 181 | QString hdp= locateLocal("data","korganizer")+"/"; |
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 184 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
185 | 185 | ||
186 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 186 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
187 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 187 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
188 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 188 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
189 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 189 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
190 | 190 | ||
191 | 191 | ||
192 | KPrefs::setCurrentGroup("Locale"); | 192 | KPrefs::setCurrentGroup("Locale"); |
193 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 193 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
194 | 194 | ||
195 | 195 | ||
196 | KPrefs::setCurrentGroup("Colors"); | 196 | KPrefs::setCurrentGroup("Colors"); |
197 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 197 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
198 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); | 198 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); |
199 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); | 199 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); |
200 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); | 200 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); |
201 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); | 201 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); |
202 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); | 202 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); |
203 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 203 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
204 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 204 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
205 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); | 205 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); |
206 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); | 206 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); |
207 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); | 207 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); |
208 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); | 208 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); |
209 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); | 209 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); |
210 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); | 210 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); |
211 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); | 211 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); |
212 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); | 212 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); |
213 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); | 213 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); |
214 | addItemBool("UseAppColors",&mUseAppColors,false); | 214 | addItemBool("UseAppColors",&mUseAppColors,false); |
215 | 215 | ||
216 | 216 | ||
217 | 217 | ||
218 | KPrefs::setCurrentGroup("Views"); | 218 | KPrefs::setCurrentGroup("Views"); |
219 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); | 219 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); |
220 | addItemInt("Hour Size",&mHourSize,8); | 220 | addItemInt("Hour Size",&mHourSize,8); |
221 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); | 221 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); |
222 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); | 222 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); |
223 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); | 223 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); |
224 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); | 224 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); |
225 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); | 225 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); |
226 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); | 226 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); |
227 | #ifdef DESKTOP_VERION | 227 | #ifdef DESKTOP_VERION |
228 | addItemBool("Enable ToolTips",&mEnableToolTips,true); | 228 | addItemBool("Enable ToolTips",&mEnableToolTips,true); |
229 | #else | 229 | #else |
230 | addItemBool("Enable ToolTips",&mEnableToolTips,false); | 230 | addItemBool("Enable ToolTips",&mEnableToolTips,false); |
231 | #endif | 231 | #endif |
232 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); | 232 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); |
233 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); | 233 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); |
234 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); | 234 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); |
235 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); | 235 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); |
236 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); | 236 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); |
237 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); | 237 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); |
238 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); | 238 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); |
239 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); | 239 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); |
240 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 240 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
241 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; | 241 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; |
242 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); | 242 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); |
243 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 243 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
244 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 244 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
245 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 245 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
246 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 246 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
247 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 247 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
248 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); | 248 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); |
249 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); | ||
249 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 250 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
250 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 251 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
251 | #ifdef DESKTOP_VERSION | 252 | #ifdef DESKTOP_VERSION |
252 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 253 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
253 | #else | 254 | #else |
254 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); | 255 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); |
255 | #endif | 256 | #endif |
256 | addItemInt("Day Begins",&mDayBegins,7); | 257 | addItemInt("Day Begins",&mDayBegins,7); |
257 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); | 258 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); |
258 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); | 259 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); |
259 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); | 260 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); |
260 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); | 261 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); |
261 | 262 | ||
262 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); | 263 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); |
263 | addItemBool("Full View Month",&mFullViewMonth,true); | 264 | addItemBool("Full View Month",&mFullViewMonth,true); |
264 | addItemBool("Full View Todo",&mFullViewTodo,true); | 265 | addItemBool("Full View Todo",&mFullViewTodo,true); |
265 | addItemBool("Quick Todo",&mEnableQuickTodo,false); | 266 | addItemBool("Quick Todo",&mEnableQuickTodo,false); |
266 | 267 | ||
267 | addItemInt("Next X Days",&mNextXDays,3); | 268 | addItemInt("Next X Days",&mNextXDays,3); |
268 | 269 | ||
269 | KPrefs::setCurrentGroup("Printer"); | 270 | KPrefs::setCurrentGroup("Printer"); |
270 | 271 | ||
271 | KPrefs::setCurrentGroup("Layout"); | 272 | KPrefs::setCurrentGroup("Layout"); |
272 | 273 | ||
273 | addItemBool("CompactDialogs",&mCompactDialogs,false); | 274 | addItemBool("CompactDialogs",&mCompactDialogs,false); |
274 | addItemBool("VerticalScreen",&mVerticalScreen,true); | 275 | addItemBool("VerticalScreen",&mVerticalScreen,true); |
275 | 276 | ||
276 | KPrefs::setCurrentGroup("KOrganizer Plugins"); | 277 | KPrefs::setCurrentGroup("KOrganizer Plugins"); |
277 | 278 | ||
278 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); | 279 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); |
279 | 280 | ||
280 | KPrefs::setCurrentGroup("Group Scheduling"); | 281 | KPrefs::setCurrentGroup("Group Scheduling"); |
281 | 282 | ||
282 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); | 283 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); |
283 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); | 284 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); |
284 | addItemStringList("AdditionalMails",&mAdditionalMails,""); | 285 | addItemStringList("AdditionalMails",&mAdditionalMails,""); |
285 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); | 286 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); |
286 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); | 287 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); |
287 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); | 288 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); |
288 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); | 289 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); |
289 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); | 290 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); |
290 | 291 | ||
291 | KPrefs::setCurrentGroup( "Editors" ); | 292 | KPrefs::setCurrentGroup( "Editors" ); |
292 | 293 | ||
293 | addItemStringList( "EventTemplates", &mEventTemplates ); | 294 | addItemStringList( "EventTemplates", &mEventTemplates ); |
294 | addItemStringList( "TodoTemplates", &mTodoTemplates ); | 295 | addItemStringList( "TodoTemplates", &mTodoTemplates ); |
295 | 296 | ||
296 | addItemInt("DestinationPolicy",&mDestination,standardDestination); | 297 | addItemInt("DestinationPolicy",&mDestination,standardDestination); |
297 | 298 | ||
298 | 299 | ||
299 | 300 | ||
300 | } | 301 | } |
301 | 302 | ||
302 | 303 | ||
303 | KOPrefs::~KOPrefs() | 304 | KOPrefs::~KOPrefs() |
304 | { | 305 | { |
305 | if (mInstance == this) | 306 | if (mInstance == this) |
306 | mInstance = insd.setObject(0); | 307 | mInstance = insd.setObject(0); |
307 | 308 | ||
308 | //qDebug("KOPrefs::~KOPrefs() "); | 309 | //qDebug("KOPrefs::~KOPrefs() "); |
309 | } | 310 | } |
310 | 311 | ||
311 | 312 | ||
312 | KOPrefs *KOPrefs::instance() | 313 | KOPrefs *KOPrefs::instance() |
313 | { | 314 | { |
314 | if (!mInstance) { | 315 | if (!mInstance) { |
315 | mInstance = insd.setObject(new KOPrefs()); | 316 | mInstance = insd.setObject(new KOPrefs()); |
316 | mInstance->readConfig(); | 317 | mInstance->readConfig(); |
317 | } | 318 | } |
318 | 319 | ||
319 | return mInstance; | 320 | return mInstance; |
320 | } | 321 | } |
321 | 322 | ||
322 | void KOPrefs::usrSetDefaults() | 323 | void KOPrefs::usrSetDefaults() |
323 | { | 324 | { |
324 | 325 | ||
325 | } | 326 | } |
326 | 327 | ||
327 | void KOPrefs::fillMailDefaults() | 328 | void KOPrefs::fillMailDefaults() |
328 | { | 329 | { |
329 | if (mName.isEmpty()) mName = i18n("Anonymous"); | 330 | if (mName.isEmpty()) mName = i18n("Anonymous"); |
330 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); | 331 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); |
331 | } | 332 | } |
332 | 333 | ||
333 | void KOPrefs::setTimeZoneIdDefault() | 334 | void KOPrefs::setTimeZoneIdDefault() |
334 | { | 335 | { |
335 | ; | 336 | ; |
336 | } | 337 | } |
337 | 338 | ||
338 | void KOPrefs::setCategoryDefaults() | 339 | void KOPrefs::setCategoryDefaults() |
339 | { | 340 | { |
340 | mCustomCategories.clear(); | 341 | mCustomCategories.clear(); |
341 | mCustomCategories = getDefaultList(); | 342 | mCustomCategories = getDefaultList(); |
342 | 343 | ||
343 | QStringList::Iterator it; | 344 | QStringList::Iterator it; |
344 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 345 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
345 | setCategoryColor(*it,mDefaultCategoryColor); | 346 | setCategoryColor(*it,mDefaultCategoryColor); |
346 | } | 347 | } |
347 | } | 348 | } |
348 | 349 | ||
349 | QStringList KOPrefs::getDefaultList() | 350 | QStringList KOPrefs::getDefaultList() |
350 | { | 351 | { |
351 | QStringList retval ; | 352 | QStringList retval ; |
352 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") | 353 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") |
353 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") | 354 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") |
354 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") | 355 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") |
355 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") | 356 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") |
356 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") | 357 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") |
357 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") | 358 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") |
358 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") | 359 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") |
359 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; | 360 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; |
360 | retval.sort(); | 361 | retval.sort(); |
361 | return retval; | 362 | return retval; |
362 | } | 363 | } |
363 | 364 | ||
364 | void KOPrefs::usrReadConfig() | 365 | void KOPrefs::usrReadConfig() |
365 | { | 366 | { |
366 | config()->setGroup("General"); | 367 | config()->setGroup("General"); |
367 | 368 | ||
368 | mCustomCategories = config()->readListEntry("Custom Categories"); | 369 | mCustomCategories = config()->readListEntry("Custom Categories"); |
369 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != mOldLanguage ) { | 370 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != mOldLanguage ) { |
370 | mLocationDefaults.clear(); | 371 | mLocationDefaults.clear(); |
371 | mEventSummaryUser.clear(); | 372 | mEventSummaryUser.clear(); |
372 | mTodoSummaryUser.clear(); | 373 | mTodoSummaryUser.clear(); |
373 | } | 374 | } |
374 | mOldLoadedLanguage = mOldLanguage ; | 375 | mOldLoadedLanguage = mOldLanguage ; |
375 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; | 376 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; |
376 | if (mLocationDefaults.isEmpty()) { | 377 | if (mLocationDefaults.isEmpty()) { |
377 | mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") | 378 | mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") |
378 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") | 379 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") |
379 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; | 380 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; |
380 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 381 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
381 | mLocationDefaults.sort(); | 382 | mLocationDefaults.sort(); |
382 | } | 383 | } |
383 | 384 | ||
384 | if (mEventSummaryUser.isEmpty()) { | 385 | if (mEventSummaryUser.isEmpty()) { |
385 | mEventSummaryUser = getDefaultList() ; | 386 | mEventSummaryUser = getDefaultList() ; |
386 | } | 387 | } |
387 | if (mTodoSummaryUser.isEmpty()) { | 388 | if (mTodoSummaryUser.isEmpty()) { |
388 | mTodoSummaryUser = getDefaultList() ; | 389 | mTodoSummaryUser = getDefaultList() ; |
389 | } | 390 | } |
390 | 391 | ||
391 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 392 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
392 | 393 | ||
393 | config()->setGroup("Personal Settings"); | 394 | config()->setGroup("Personal Settings"); |
394 | mName = config()->readEntry("user_name",""); | 395 | mName = config()->readEntry("user_name",""); |
395 | mEmail = config()->readEntry("user_email",""); | 396 | mEmail = config()->readEntry("user_email",""); |
396 | fillMailDefaults(); | 397 | fillMailDefaults(); |
397 | 398 | ||
398 | config()->setGroup("Category Colors"); | 399 | config()->setGroup("Category Colors"); |
399 | QStringList::Iterator it; | 400 | QStringList::Iterator it; |
400 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 401 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
401 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 402 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
402 | 403 | ||
403 | } | 404 | } |
404 | 405 | ||
405 | KPimPrefs::usrReadConfig(); | 406 | KPimPrefs::usrReadConfig(); |
406 | } | 407 | } |
407 | 408 | ||
408 | 409 | ||
409 | void KOPrefs::usrWriteConfig() | 410 | void KOPrefs::usrWriteConfig() |
410 | { | 411 | { |
411 | config()->setGroup("General"); | 412 | config()->setGroup("General"); |
412 | config()->writeEntry("Custom Categories",mCustomCategories); | 413 | config()->writeEntry("Custom Categories",mCustomCategories); |
413 | 414 | ||
414 | config()->setGroup("Personal Settings"); | 415 | config()->setGroup("Personal Settings"); |
415 | config()->writeEntry("user_name",mName); | 416 | config()->writeEntry("user_name",mName); |
416 | config()->writeEntry("user_email",mEmail); | 417 | config()->writeEntry("user_email",mEmail); |
417 | 418 | ||
418 | config()->setGroup("Category Colors"); | 419 | config()->setGroup("Category Colors"); |
419 | QDictIterator<QColor> it(mCategoryColors); | 420 | QDictIterator<QColor> it(mCategoryColors); |
420 | while (it.current()) { | 421 | while (it.current()) { |
421 | config()->writeEntry(it.currentKey(),*(it.current())); | 422 | config()->writeEntry(it.currentKey(),*(it.current())); |
422 | ++it; | 423 | ++it; |
423 | } | 424 | } |
424 | 425 | ||
425 | 426 | ||
426 | KPimPrefs::usrWriteConfig(); | 427 | KPimPrefs::usrWriteConfig(); |
427 | } | 428 | } |
428 | 429 | ||
429 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) | 430 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) |
430 | { | 431 | { |
431 | mCategoryColors.replace(cat,new QColor(color)); | 432 | mCategoryColors.replace(cat,new QColor(color)); |
432 | } | 433 | } |
433 | 434 | ||
434 | QColor *KOPrefs::categoryColor(QString cat) | 435 | QColor *KOPrefs::categoryColor(QString cat) |
435 | { | 436 | { |
436 | QColor *color = 0; | 437 | QColor *color = 0; |
437 | 438 | ||
438 | if (!cat.isEmpty()) color = mCategoryColors[cat]; | 439 | if (!cat.isEmpty()) color = mCategoryColors[cat]; |
439 | 440 | ||
440 | if (color) return color; | 441 | if (color) return color; |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 6541af2..dddcdca 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -51,230 +51,231 @@ class KOPrefs : public KPimPrefs | |||
51 | /** Set preferences to default values */ | 51 | /** Set preferences to default values */ |
52 | void usrSetDefaults(); | 52 | void usrSetDefaults(); |
53 | 53 | ||
54 | /** Read preferences from config file */ | 54 | /** Read preferences from config file */ |
55 | void usrReadConfig(); | 55 | void usrReadConfig(); |
56 | 56 | ||
57 | /** Write preferences to config file */ | 57 | /** Write preferences to config file */ |
58 | void usrWriteConfig(); | 58 | void usrWriteConfig(); |
59 | void setCategoryDefaults(); | 59 | void setCategoryDefaults(); |
60 | 60 | ||
61 | protected: | 61 | protected: |
62 | void setTimeZoneIdDefault(); | 62 | void setTimeZoneIdDefault(); |
63 | 63 | ||
64 | /** Fill empty mail fields with default values. */ | 64 | /** Fill empty mail fields with default values. */ |
65 | void fillMailDefaults(); | 65 | void fillMailDefaults(); |
66 | 66 | ||
67 | private: | 67 | private: |
68 | /** Constructor disabled for public. Use instance() to create a KOPrefs | 68 | /** Constructor disabled for public. Use instance() to create a KOPrefs |
69 | object. */ | 69 | object. */ |
70 | KOPrefs(); | 70 | KOPrefs(); |
71 | 71 | ||
72 | static KOPrefs *mInstance; | 72 | static KOPrefs *mInstance; |
73 | QStringList getDefaultList(); | 73 | QStringList getDefaultList(); |
74 | public: | 74 | public: |
75 | // preferences data | 75 | // preferences data |
76 | KConfig* getConfig(); | 76 | KConfig* getConfig(); |
77 | void setFullName(const QString &); | 77 | void setFullName(const QString &); |
78 | QString fullName(); | 78 | QString fullName(); |
79 | void setEmail(const QString &); | 79 | void setEmail(const QString &); |
80 | QString email(); | 80 | QString email(); |
81 | 81 | ||
82 | QString mAdditional; | 82 | QString mAdditional; |
83 | 83 | ||
84 | bool mEmailControlCenter; | 84 | bool mEmailControlCenter; |
85 | 85 | ||
86 | bool mBcc; | 86 | bool mBcc; |
87 | bool mAutoSave; | 87 | bool mAutoSave; |
88 | int mAutoSaveInterval; | 88 | int mAutoSaveInterval; |
89 | bool mConfirm; | 89 | bool mConfirm; |
90 | 90 | ||
91 | bool mEnableGroupScheduling; | 91 | bool mEnableGroupScheduling; |
92 | bool mEnableProjectView; | 92 | bool mEnableProjectView; |
93 | 93 | ||
94 | int mDefaultFormat; | 94 | int mDefaultFormat; |
95 | int mMailClient; | 95 | int mMailClient; |
96 | 96 | ||
97 | int mStartTime; | 97 | int mStartTime; |
98 | int mDefaultDuration; | 98 | int mDefaultDuration; |
99 | int mAlarmTime; | 99 | int mAlarmTime; |
100 | 100 | ||
101 | int mWorkingHoursStart; | 101 | int mWorkingHoursStart; |
102 | int mWorkingHoursEnd; | 102 | int mWorkingHoursEnd; |
103 | bool mExcludeHolidays; | 103 | bool mExcludeHolidays; |
104 | bool mExcludeSaturdays; | 104 | bool mExcludeSaturdays; |
105 | bool mMarcusBainsShowSeconds; | 105 | bool mMarcusBainsShowSeconds; |
106 | 106 | ||
107 | QFont mTimeBarFont; | 107 | QFont mTimeBarFont; |
108 | QFont mMonthViewFont; | 108 | QFont mMonthViewFont; |
109 | QFont mAgendaViewFont; | 109 | QFont mAgendaViewFont; |
110 | QFont mMarcusBainsFont; | 110 | QFont mMarcusBainsFont; |
111 | QFont mTimeLabelsFont; | 111 | QFont mTimeLabelsFont; |
112 | QFont mTodoViewFont; | 112 | QFont mTodoViewFont; |
113 | QFont mListViewFont; | 113 | QFont mListViewFont; |
114 | QFont mDateNavigatorFont; | 114 | QFont mDateNavigatorFont; |
115 | QFont mEditBoxFont; | 115 | QFont mEditBoxFont; |
116 | QFont mJornalViewFont; | 116 | QFont mJornalViewFont; |
117 | QFont mWhatsNextFont; | 117 | QFont mWhatsNextFont; |
118 | QFont mEventViewFont; | 118 | QFont mEventViewFont; |
119 | 119 | ||
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | QColor mHolidayColor; | 123 | QColor mHolidayColor; |
124 | QColor mHighlightColor; | 124 | QColor mHighlightColor; |
125 | QColor mEventColor; | 125 | QColor mEventColor; |
126 | QColor mTodoDoneColor; | 126 | QColor mTodoDoneColor; |
127 | QColor mAgendaBgColor; | 127 | QColor mAgendaBgColor; |
128 | QColor mWorkingHoursColor; | 128 | QColor mWorkingHoursColor; |
129 | QColor mTodoDueTodayColor; | 129 | QColor mTodoDueTodayColor; |
130 | QColor mTodoOverdueColor; | 130 | QColor mTodoOverdueColor; |
131 | QColor mMonthViewEvenColor; | 131 | QColor mMonthViewEvenColor; |
132 | QColor mMonthViewOddColor; | 132 | QColor mMonthViewOddColor; |
133 | QColor mMonthViewHolidayColor; | 133 | QColor mMonthViewHolidayColor; |
134 | bool mMonthViewUsesDayColors; | 134 | bool mMonthViewUsesDayColors; |
135 | bool mMonthViewSatSunTog; | 135 | bool mMonthViewSatSunTog; |
136 | bool mMonthViewWeek; | 136 | bool mMonthViewWeek; |
137 | QColor mAppColor1; | 137 | QColor mAppColor1; |
138 | QColor mAppColor2; | 138 | QColor mAppColor2; |
139 | bool mUseAppColors; | 139 | bool mUseAppColors; |
140 | 140 | ||
141 | int mDayBegins; | 141 | int mDayBegins; |
142 | int mHourSize; | 142 | int mHourSize; |
143 | int mAllDaySize; | 143 | int mAllDaySize; |
144 | bool mShowFullMenu; | 144 | bool mShowFullMenu; |
145 | bool mDailyRecur; | 145 | bool mDailyRecur; |
146 | bool mWeeklyRecur; | 146 | bool mWeeklyRecur; |
147 | bool mMonthDailyRecur; | 147 | bool mMonthDailyRecur; |
148 | bool mMonthWeeklyRecur; | 148 | bool mMonthWeeklyRecur; |
149 | bool mMonthShowIcons; | 149 | bool mMonthShowIcons; |
150 | bool mMonthShowShort; | 150 | bool mMonthShowShort; |
151 | bool mEnableToolTips; | 151 | bool mEnableToolTips; |
152 | bool mEnableMonthScroll; | 152 | bool mEnableMonthScroll; |
153 | bool mFullViewMonth; | 153 | bool mFullViewMonth; |
154 | bool mMonthViewUsesCategoryColor; | 154 | bool mMonthViewUsesCategoryColor; |
155 | bool mFullViewTodo; | 155 | bool mFullViewTodo; |
156 | bool mShowCompletedTodo; | 156 | bool mShowCompletedTodo; |
157 | bool mMarcusBainsEnabled; | 157 | bool mMarcusBainsEnabled; |
158 | int mNextXDays; | 158 | int mNextXDays; |
159 | int mWhatsNextDays; | 159 | int mWhatsNextDays; |
160 | int mWhatsNextPrios; | 160 | int mWhatsNextPrios; |
161 | bool mEnableQuickTodo; | 161 | bool mEnableQuickTodo; |
162 | 162 | ||
163 | bool mCompactDialogs; | 163 | bool mCompactDialogs; |
164 | bool mVerticalScreen; | 164 | bool mVerticalScreen; |
165 | 165 | ||
166 | bool mShowIconNewTodo; | 166 | bool mShowIconNewTodo; |
167 | bool mShowIconNewEvent; | 167 | bool mShowIconNewEvent; |
168 | bool mShowIconSearch; | 168 | bool mShowIconSearch; |
169 | bool mShowIconList; | 169 | bool mShowIconList; |
170 | bool mShowIconDay1; | 170 | bool mShowIconDay1; |
171 | bool mShowIconDay5; | 171 | bool mShowIconDay5; |
172 | bool mShowIconDay7; | 172 | bool mShowIconDay7; |
173 | bool mShowIconMonth; | 173 | bool mShowIconMonth; |
174 | bool mShowIconTodoview; | 174 | bool mShowIconTodoview; |
175 | bool mShowIconBackFast; | 175 | bool mShowIconBackFast; |
176 | bool mShowIconBack; | 176 | bool mShowIconBack; |
177 | bool mShowIconToday; | 177 | bool mShowIconToday; |
178 | bool mShowIconForward; | 178 | bool mShowIconForward; |
179 | bool mShowIconForwardFast; | 179 | bool mShowIconForwardFast; |
180 | bool mShowIconWhatsThis; | 180 | bool mShowIconWhatsThis; |
181 | bool mShowIconNextDays; | 181 | bool mShowIconNextDays; |
182 | bool mShowIconNext; | 182 | bool mShowIconNext; |
183 | bool mShowIconJournal; | 183 | bool mShowIconJournal; |
184 | 184 | ||
185 | bool mShowIconStretch; | 185 | bool mShowIconStretch; |
186 | 186 | ||
187 | bool mToolBarHor; | 187 | bool mToolBarHor; |
188 | bool mToolBarUp; | 188 | bool mToolBarUp; |
189 | bool mToolBarMiniIcons; | 189 | bool mToolBarMiniIcons; |
190 | 190 | ||
191 | bool mAskForQuit; | 191 | bool mAskForQuit; |
192 | bool mUsePassWd; | 192 | bool mUsePassWd; |
193 | bool mShowSyncEvents; | 193 | bool mShowSyncEvents; |
194 | bool mShowTodoInAgenda; | 194 | bool mShowTodoInAgenda; |
195 | bool mShowTimeInAgenda; | 195 | bool mShowTimeInAgenda; |
196 | bool mHideNonStartedTodos; | 196 | bool mHideNonStartedTodos; |
197 | 197 | ||
198 | int mLastSyncTime; | 198 | int mLastSyncTime; |
199 | void setCategoryColor(QString cat,const QColor & color); | 199 | void setCategoryColor(QString cat,const QColor & color); |
200 | QColor *categoryColor(QString cat); | 200 | QColor *categoryColor(QString cat); |
201 | 201 | ||
202 | QString mArchiveFile; | 202 | QString mArchiveFile; |
203 | QString mHtmlExportFile; | 203 | QString mHtmlExportFile; |
204 | bool mHtmlWithSave; | 204 | bool mHtmlWithSave; |
205 | 205 | ||
206 | QStringList mSelectedPlugins; | 206 | QStringList mSelectedPlugins; |
207 | 207 | ||
208 | QString mLastImportFile; | 208 | QString mLastImportFile; |
209 | QString mLastVcalFile; | 209 | QString mLastVcalFile; |
210 | QString mLastSaveFile; | 210 | QString mLastSaveFile; |
211 | QString mLastLoadFile; | 211 | QString mLastLoadFile; |
212 | 212 | ||
213 | 213 | ||
214 | QString mDefaultAlarmFile; | 214 | QString mDefaultAlarmFile; |
215 | int mIMIPScheduler; | 215 | int mIMIPScheduler; |
216 | int mIMIPSend; | 216 | int mIMIPSend; |
217 | QStringList mAdditionalMails; | 217 | QStringList mAdditionalMails; |
218 | int mIMIPAutoRefresh; | 218 | int mIMIPAutoRefresh; |
219 | int mIMIPAutoInsertReply; | 219 | int mIMIPAutoInsertReply; |
220 | int mIMIPAutoInsertRequest; | 220 | int mIMIPAutoInsertRequest; |
221 | int mIMIPAutoFreeBusy; | 221 | int mIMIPAutoFreeBusy; |
222 | int mIMIPAutoFreeBusyReply; | 222 | int mIMIPAutoFreeBusyReply; |
223 | 223 | ||
224 | QStringList mTodoTemplates; | 224 | QStringList mTodoTemplates; |
225 | QStringList mEventTemplates; | 225 | QStringList mEventTemplates; |
226 | 226 | ||
227 | int mDestination; | 227 | int mDestination; |
228 | 228 | ||
229 | 229 | ||
230 | bool mEditOnDoubleClick; | 230 | bool mEditOnDoubleClick; |
231 | bool mViewChangeHoldFullscreen; | 231 | bool mViewChangeHoldFullscreen; |
232 | bool mViewChangeHoldNonFullscreen; | 232 | bool mViewChangeHoldNonFullscreen; |
233 | bool mCenterOnCurrentTime; | 233 | bool mCenterOnCurrentTime; |
234 | bool mSetTimeToDayStartAt; | 234 | bool mSetTimeToDayStartAt; |
235 | bool mHighlightCurrentDay; | 235 | bool mHighlightCurrentDay; |
236 | bool mUseHighlightLightColor; | 236 | bool mUseHighlightLightColor; |
237 | bool mListViewMonthTimespan; | 237 | bool mListViewMonthTimespan; |
238 | bool mWNViewShowsParents; | 238 | bool mWNViewShowsParents; |
239 | bool mWNViewShowsPast; | 239 | bool mWNViewShowsPast; |
240 | bool mWNViewShowLocation; | 240 | bool mWNViewShowLocation; |
241 | bool mTodoViewShowsPercentage; | 241 | bool mTodoViewShowsPercentage; |
242 | bool mTodoViewUsesCatColors; | 242 | bool mTodoViewUsesCatColors; |
243 | bool mMonthViewUsesBigFont; | ||
243 | bool mTodoViewUsesSmallFont; | 244 | bool mTodoViewUsesSmallFont; |
244 | bool mTodoViewUsesForegroundColor; | 245 | bool mTodoViewUsesForegroundColor; |
245 | bool mMonthViewUsesForegroundColor; | 246 | bool mMonthViewUsesForegroundColor; |
246 | 247 | ||
247 | bool mHightlightDateTimeEdit; | 248 | bool mHightlightDateTimeEdit; |
248 | bool mShortDateInViewer; | 249 | bool mShortDateInViewer; |
249 | 250 | ||
250 | bool mShowDateNavigator; | 251 | bool mShowDateNavigator; |
251 | 252 | ||
252 | QStringList mLocationDefaults; | 253 | QStringList mLocationDefaults; |
253 | QStringList mEventSummaryUser; | 254 | QStringList mEventSummaryUser; |
254 | QStringList mTodoSummaryUser; | 255 | QStringList mTodoSummaryUser; |
255 | 256 | ||
256 | bool mUseInternalAlarmNotification; | 257 | bool mUseInternalAlarmNotification; |
257 | int mAlarmPlayBeeps; | 258 | int mAlarmPlayBeeps; |
258 | int mAlarmSuspendTime; | 259 | int mAlarmSuspendTime; |
259 | int mAlarmSuspendCount; | 260 | int mAlarmSuspendCount; |
260 | int mAlarmBeepInterval; | 261 | int mAlarmBeepInterval; |
261 | int mOldLanguage; | 262 | int mOldLanguage; |
262 | int mOldLoadedLanguage; | 263 | int mOldLoadedLanguage; |
263 | 264 | ||
264 | 265 | ||
265 | QString mActiveSyncPort; | 266 | QString mActiveSyncPort; |
266 | QString mActiveSyncIP; | 267 | QString mActiveSyncIP; |
267 | 268 | ||
268 | private: | 269 | private: |
269 | QDict<QColor> mCategoryColors; | 270 | QDict<QColor> mCategoryColors; |
270 | QColor mDefaultCategoryColor; | 271 | QColor mDefaultCategoryColor; |
271 | 272 | ||
272 | QFont mDefaultTimeBarFont; | 273 | QFont mDefaultTimeBarFont; |
273 | QFont mDefaultViewFont; | 274 | QFont mDefaultViewFont; |
274 | QFont mDefaultMonthViewFont; | 275 | QFont mDefaultMonthViewFont; |
275 | 276 | ||
276 | QString mName; | 277 | QString mName; |
277 | QString mEmail; | 278 | QString mEmail; |
278 | }; | 279 | }; |
279 | 280 | ||
280 | #endif | 281 | #endif |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 580dff2..452d019 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -570,385 +570,388 @@ void KOPrefsDialog::setupTimeTab() | |||
570 | 570 | ||
571 | // topLayout->setRowStretch(6,1); | 571 | // topLayout->setRowStretch(6,1); |
572 | } | 572 | } |
573 | 573 | ||
574 | 574 | ||
575 | void KOPrefsDialog::setupViewsTab() | 575 | void KOPrefsDialog::setupViewsTab() |
576 | { | 576 | { |
577 | 577 | ||
578 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 578 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
579 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 579 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
580 | 580 | ||
581 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 581 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
582 | topLayout->setSpacing(spacingHint()); | 582 | topLayout->setSpacing(spacingHint()); |
583 | topLayout->setMargin(marginHint()); | 583 | topLayout->setMargin(marginHint()); |
584 | 584 | ||
585 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 585 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
586 | // topLayout->addLayout(dayBeginsLayout,0,0); | 586 | // topLayout->addLayout(dayBeginsLayout,0,0); |
587 | 587 | ||
588 | // KPrefsDialogWidTime *dayBegins = | 588 | // KPrefsDialogWidTime *dayBegins = |
589 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 589 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
590 | // topFrame); | 590 | // topFrame); |
591 | // dayBeginsLayout->addWidget(dayBegins->label()); | 591 | // dayBeginsLayout->addWidget(dayBegins->label()); |
592 | // dayBeginsLayout->addStretch(1); | 592 | // dayBeginsLayout->addStretch(1); |
593 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 593 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
594 | 594 | ||
595 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 595 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
596 | // topLayout->addLayout(nextDaysLayout,1,0); | 596 | // topLayout->addLayout(nextDaysLayout,1,0); |
597 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 597 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
598 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 598 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
599 | // nextDaysLayout->addStretch(1); | 599 | // nextDaysLayout->addStretch(1); |
600 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 600 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
601 | 601 | ||
602 | 602 | ||
603 | int ii = 0; | 603 | int ii = 0; |
604 | KPrefsDialogWidBool *dummy = | 604 | KPrefsDialogWidBool *dummy = |
605 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 605 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
606 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 606 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
607 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 607 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
608 | 608 | ||
609 | dummy = | 609 | dummy = |
610 | addWidBool(i18n("Show time in agenda items"), | 610 | addWidBool(i18n("Show time in agenda items"), |
611 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); | 611 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); |
612 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 612 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
613 | 613 | ||
614 | dummy = | 614 | dummy = |
615 | addWidBool(i18n("Highlight current day in agenda"), | 615 | addWidBool(i18n("Highlight current day in agenda"), |
616 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 616 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
617 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 617 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
618 | 618 | ||
619 | dummy = | 619 | dummy = |
620 | addWidBool(i18n("Use light color for highlight current day"), | 620 | addWidBool(i18n("Use light color for highlight current day"), |
621 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 621 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
622 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 622 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
623 | 623 | ||
624 | KPrefsDialogWidBool *dailyRecur = | 624 | KPrefsDialogWidBool *dailyRecur = |
625 | addWidBool(i18n("Show events that recur daily in date nav."), | 625 | addWidBool(i18n("Show events that recur daily in date nav."), |
626 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 626 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
627 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 627 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
628 | 628 | ||
629 | KPrefsDialogWidBool *weeklyRecur = | 629 | KPrefsDialogWidBool *weeklyRecur = |
630 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 630 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
631 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 631 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
632 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 632 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
633 | if ( QApplication::desktop()->width() > 640 ) { | 633 | if ( QApplication::desktop()->width() > 640 ) { |
634 | 634 | ||
635 | KPrefsDialogWidBool *enableToolTips = | 635 | KPrefsDialogWidBool *enableToolTips = |
636 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 636 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
637 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 637 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
638 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 638 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
639 | 639 | ||
640 | } | 640 | } |
641 | 641 | ||
642 | KPrefsDialogWidBool *marcusBainsEnabled = | 642 | KPrefsDialogWidBool *marcusBainsEnabled = |
643 | addWidBool(i18n("Show Marcus Bains line"), | 643 | addWidBool(i18n("Show Marcus Bains line"), |
644 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 644 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
645 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 645 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
646 | 646 | ||
647 | 647 | ||
648 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 648 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
649 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 649 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
650 | //topLayout->setRowStretch(11,1); | 650 | //topLayout->setRowStretch(11,1); |
651 | 651 | ||
652 | 652 | ||
653 | 653 | ||
654 | 654 | ||
655 | 655 | ||
656 | 656 | ||
657 | topFrame = addPage(i18n("ViewChange"),0,0); | 657 | topFrame = addPage(i18n("ViewChange"),0,0); |
658 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 658 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
659 | 659 | ||
660 | topLayout = new QGridLayout(topFrame,6,1); | 660 | topLayout = new QGridLayout(topFrame,6,1); |
661 | topLayout->setSpacing(spacingHint()); | 661 | topLayout->setSpacing(spacingHint()); |
662 | topLayout->setMargin(marginHint()); | 662 | topLayout->setMargin(marginHint()); |
663 | ii = 0; | 663 | ii = 0; |
664 | 664 | ||
665 | 665 | ||
666 | dummy = | 666 | dummy = |
667 | addWidBool(i18n("Hold fullscreen on view change"), | 667 | addWidBool(i18n("Hold fullscreen on view change"), |
668 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 668 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
669 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 669 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
670 | 670 | ||
671 | dummy = | 671 | dummy = |
672 | addWidBool(i18n("Hold non-fullscreen on view change"), | 672 | addWidBool(i18n("Hold non-fullscreen on view change"), |
673 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 673 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
674 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 674 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
675 | 675 | ||
676 | 676 | ||
677 | KPrefsDialogWidBool *fullViewTodo = | 677 | KPrefsDialogWidBool *fullViewTodo = |
678 | addWidBool(i18n("Event list view uses full window"), | 678 | addWidBool(i18n("Event list view uses full window"), |
679 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 679 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
680 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 680 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
681 | 681 | ||
682 | KPrefsDialogWidBool *fullViewMonth = | 682 | KPrefsDialogWidBool *fullViewMonth = |
683 | addWidBool(i18n("Next days view uses full window"), | 683 | addWidBool(i18n("Next days view uses full window"), |
684 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 684 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
685 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 685 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
686 | 686 | ||
687 | dummy = | 687 | dummy = |
688 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 688 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
689 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 689 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
690 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 690 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
691 | 691 | ||
692 | dummy = | 692 | dummy = |
693 | addWidBool(i18n("Set agenda to current time on change"), | 693 | addWidBool(i18n("Set agenda to current time on change"), |
694 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 694 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
695 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 695 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
696 | 696 | ||
697 | dummy = | 697 | dummy = |
698 | addWidBool(i18n("Listview uses monthly timespan"), | 698 | addWidBool(i18n("Listview uses monthly timespan"), |
699 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 699 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
700 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 700 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
701 | dummy = | 701 | dummy = |
702 | addWidBool(i18n("Highlight selection in Time Edit"), | 702 | addWidBool(i18n("Highlight selection in Time Edit"), |
703 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 703 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
704 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 704 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
705 | 705 | ||
706 | 706 | ||
707 | 707 | ||
708 | 708 | ||
709 | 709 | ||
710 | topFrame = addPage(i18n("Month View"),0,0); | 710 | topFrame = addPage(i18n("Month View"),0,0); |
711 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 711 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
712 | 712 | ||
713 | topLayout = new QGridLayout(topFrame,5,1); | 713 | topLayout = new QGridLayout(topFrame,5,1); |
714 | topLayout->setSpacing(spacingHint()); | 714 | topLayout->setSpacing(spacingHint()); |
715 | topLayout->setMargin(marginHint()); | 715 | topLayout->setMargin(marginHint()); |
716 | ii = 0; | 716 | ii = 0; |
717 | QLabel *lab; | 717 | QLabel *lab; |
718 | QHBox *habo = new QHBox( topFrame ); | 718 | QHBox *habo = new QHBox( topFrame ); |
719 | if ( QApplication::desktop()->width() <= 480 ) { | 719 | if ( QApplication::desktop()->width() <= 480 ) { |
720 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 720 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
721 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 721 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
722 | ii++; | 722 | ii++; |
723 | } else { | 723 | } else { |
724 | new QLabel ( i18n("Show events that recur "), habo ); | 724 | new QLabel ( i18n("Show events that recur "), habo ); |
725 | } | 725 | } |
726 | dailyRecur = | 726 | dailyRecur = |
727 | addWidBool(i18n("daily"), | 727 | addWidBool(i18n("daily"), |
728 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 728 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
729 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 729 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
730 | 730 | ||
731 | weeklyRecur = | 731 | weeklyRecur = |
732 | addWidBool(i18n("weekly"), | 732 | addWidBool(i18n("weekly"), |
733 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 733 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
734 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 734 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
735 | ii++; | 735 | ii++; |
736 | 736 | ||
737 | 737 | ||
738 | habo = new QHBox( topFrame ); | 738 | habo = new QHBox( topFrame ); |
739 | if ( QApplication::desktop()->width() <= 480 ) { | 739 | if ( QApplication::desktop()->width() <= 480 ) { |
740 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 740 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
741 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 741 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
742 | ii++; | 742 | ii++; |
743 | 743 | ||
744 | } else { | 744 | } else { |
745 | new QLabel ( i18n("Show in every cell "), habo ); | 745 | new QLabel ( i18n("Show in every cell "), habo ); |
746 | } | 746 | } |
747 | weeklyRecur = | 747 | weeklyRecur = |
748 | addWidBool(i18n("short month"), | 748 | addWidBool(i18n("short month"), |
749 | &(KOPrefs::instance()->mMonthShowShort),habo); | 749 | &(KOPrefs::instance()->mMonthShowShort),habo); |
750 | weeklyRecur = | 750 | weeklyRecur = |
751 | addWidBool(i18n("icons"), | 751 | addWidBool(i18n("icons"), |
752 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 752 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
753 | 753 | ||
754 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 754 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
755 | ii++; | 755 | ii++; |
756 | #ifdef DESKTOP_VERSION | 756 | #ifdef DESKTOP_VERSION |
757 | KPrefsDialogWidBool *enableMonthScroll = | 757 | KPrefsDialogWidBool *enableMonthScroll = |
758 | addWidBool(i18n("Enable scrollbars in month view cells"), | 758 | addWidBool(i18n("Enable scrollbars in month view cells"), |
759 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 759 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
760 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 760 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
761 | #endif | 761 | #endif |
762 | 762 | dummy = | |
763 | addWidBool(i18n("Week view mode uses bigger font"), | ||
764 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); | ||
765 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
763 | dummy = | 766 | dummy = |
764 | addWidBool(i18n("Show Sat/Sun together"), | 767 | addWidBool(i18n("Show Sat/Sun together"), |
765 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 768 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
766 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 769 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
767 | 770 | ||
768 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 771 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
769 | addWidBool(i18n("Month view uses category colors"), | 772 | addWidBool(i18n("Month view uses category colors"), |
770 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 773 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
771 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 774 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
772 | 775 | ||
773 | dummy = | 776 | dummy = |
774 | addWidBool(i18n("Categorie colors are applied to text"), | 777 | addWidBool(i18n("Categorie colors are applied to text"), |
775 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 778 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
776 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 779 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
777 | coloredCategoriesInMonthView = | 780 | coloredCategoriesInMonthView = |
778 | addWidBool(i18n("Month view uses day colors"), | 781 | addWidBool(i18n("Month view uses day colors"), |
779 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 782 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
780 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 783 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
781 | 784 | ||
782 | KPrefsDialogWidColor *holidayColor = | 785 | KPrefsDialogWidColor *holidayColor = |
783 | addWidColor(i18n("Day color odd months"), | 786 | addWidColor(i18n("Day color odd months"), |
784 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 787 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
785 | topLayout->addWidget(holidayColor->label(),ii,0); | 788 | topLayout->addWidget(holidayColor->label(),ii,0); |
786 | topLayout->addWidget(holidayColor->button(),ii++,1); | 789 | topLayout->addWidget(holidayColor->button(),ii++,1); |
787 | 790 | ||
788 | holidayColor = | 791 | holidayColor = |
789 | addWidColor(i18n("Day color even months"), | 792 | addWidColor(i18n("Day color even months"), |
790 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 793 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
791 | topLayout->addWidget(holidayColor->label(),ii,0); | 794 | topLayout->addWidget(holidayColor->label(),ii,0); |
792 | topLayout->addWidget(holidayColor->button(),ii++,1); | 795 | topLayout->addWidget(holidayColor->button(),ii++,1); |
793 | 796 | ||
794 | 797 | ||
795 | holidayColor = | 798 | holidayColor = |
796 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 799 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
797 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 800 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
798 | topLayout->addWidget(holidayColor->label(),ii,0); | 801 | topLayout->addWidget(holidayColor->label(),ii,0); |
799 | topLayout->addWidget(holidayColor->button(),ii++,1); | 802 | topLayout->addWidget(holidayColor->button(),ii++,1); |
800 | // *********************** What'sNext View | 803 | // *********************** What'sNext View |
801 | topFrame = addPage(i18n("What's Next View"),0,0); | 804 | topFrame = addPage(i18n("What's Next View"),0,0); |
802 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 805 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
803 | 806 | ||
804 | topLayout = new QGridLayout(topFrame,4,1); | 807 | topLayout = new QGridLayout(topFrame,4,1); |
805 | topLayout->setSpacing(spacingHint()); | 808 | topLayout->setSpacing(spacingHint()); |
806 | topLayout->setMargin(marginHint()); | 809 | topLayout->setMargin(marginHint()); |
807 | ii = 0; | 810 | ii = 0; |
808 | KPrefsDialogWidBool *passwdk = | 811 | KPrefsDialogWidBool *passwdk = |
809 | 812 | ||
810 | addWidBool(i18n("Show events, that are done in \nWhat's Next view"), | 813 | addWidBool(i18n("Show events, that are done in \nWhat's Next view"), |
811 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); | 814 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); |
812 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 815 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
813 | passwdk = | 816 | passwdk = |
814 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | 817 | addWidBool(i18n("Show parent To-Do's in What's Next view"), |
815 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 818 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
816 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 819 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
817 | 820 | ||
818 | passwdk = | 821 | passwdk = |
819 | addWidBool(i18n("Show location in What's Next view"), | 822 | addWidBool(i18n("Show location in What's Next view"), |
820 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 823 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
821 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 824 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
822 | 825 | ||
823 | passwdk = | 826 | passwdk = |
824 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), | 827 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), |
825 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 828 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
826 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 829 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
827 | passwdk = | 830 | passwdk = |
828 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), | 831 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), |
829 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 832 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
830 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 833 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
831 | 834 | ||
832 | 835 | ||
833 | 836 | ||
834 | 837 | ||
835 | // *********************** Todo View | 838 | // *********************** Todo View |
836 | 839 | ||
837 | topFrame = addPage(i18n("Todo View"),0,0); | 840 | topFrame = addPage(i18n("Todo View"),0,0); |
838 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 841 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
839 | 842 | ||
840 | topLayout = new QGridLayout(topFrame,4,1); | 843 | topLayout = new QGridLayout(topFrame,4,1); |
841 | topLayout->setSpacing(spacingHint()); | 844 | topLayout->setSpacing(spacingHint()); |
842 | topLayout->setMargin(marginHint()); | 845 | topLayout->setMargin(marginHint()); |
843 | ii = 0; | 846 | ii = 0; |
844 | dummy = | 847 | dummy = |
845 | addWidBool(i18n("Hide not running Todos in To-do view"), | 848 | addWidBool(i18n("Hide not running Todos in To-do view"), |
846 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); | 849 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); |
847 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 850 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
848 | 851 | ||
849 | 852 | ||
850 | KPrefsDialogWidBool *showCompletedTodo = | 853 | KPrefsDialogWidBool *showCompletedTodo = |
851 | addWidBool(i18n("To-do view shows completed Todos"), | 854 | addWidBool(i18n("To-do view shows completed Todos"), |
852 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 855 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
853 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 856 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
854 | dummy = | 857 | dummy = |
855 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 858 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
856 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 859 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
857 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 860 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
858 | 861 | ||
859 | dummy = | 862 | dummy = |
860 | addWidBool(i18n("Small To-do view uses smaller font"), | 863 | addWidBool(i18n("Small To-do view uses smaller font"), |
861 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 864 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
862 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 865 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
863 | 866 | ||
864 | 867 | ||
865 | 868 | ||
866 | dummy = | 869 | dummy = |
867 | addWidBool(i18n("Todo view uses category colors"), | 870 | addWidBool(i18n("Todo view uses category colors"), |
868 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 871 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
869 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 872 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
870 | 873 | ||
871 | 874 | ||
872 | QWidget* wid = new QWidget( topFrame ); | 875 | QWidget* wid = new QWidget( topFrame ); |
873 | // Todo due today color | 876 | // Todo due today color |
874 | KPrefsDialogWidColor *todoDueTodayColor = | 877 | KPrefsDialogWidColor *todoDueTodayColor = |
875 | addWidColor(i18n("Todo due today color:"), | 878 | addWidColor(i18n("Todo due today color:"), |
876 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 879 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
877 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 880 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
878 | widLayout->addWidget( todoDueTodayColor->label() ); | 881 | widLayout->addWidget( todoDueTodayColor->label() ); |
879 | widLayout->addWidget( todoDueTodayColor->button() ); | 882 | widLayout->addWidget( todoDueTodayColor->button() ); |
880 | topLayout->addWidget(wid,ii++,0); | 883 | topLayout->addWidget(wid,ii++,0); |
881 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 884 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
882 | 885 | ||
883 | // Todo overdue color | 886 | // Todo overdue color |
884 | wid = new QWidget( topFrame ); | 887 | wid = new QWidget( topFrame ); |
885 | widLayout = new QHBoxLayout(wid); | 888 | widLayout = new QHBoxLayout(wid); |
886 | KPrefsDialogWidColor *todoOverdueColor = | 889 | KPrefsDialogWidColor *todoOverdueColor = |
887 | addWidColor(i18n("Todo overdue color:"), | 890 | addWidColor(i18n("Todo overdue color:"), |
888 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 891 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
889 | widLayout->addWidget(todoOverdueColor->label()); | 892 | widLayout->addWidget(todoOverdueColor->label()); |
890 | widLayout->addWidget(todoOverdueColor->button()); | 893 | widLayout->addWidget(todoOverdueColor->button()); |
891 | topLayout->addWidget(wid,ii++,0); | 894 | topLayout->addWidget(wid,ii++,0); |
892 | 895 | ||
893 | dummy = | 896 | dummy = |
894 | addWidBool(i18n("Colors are applied to text"), | 897 | addWidBool(i18n("Colors are applied to text"), |
895 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 898 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
896 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 899 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
897 | 900 | ||
898 | dummy = | 901 | dummy = |
899 | addWidBool(i18n("Allday Agenda view shows todos"), | 902 | addWidBool(i18n("Allday Agenda view shows todos"), |
900 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 903 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
901 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 904 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
902 | 905 | ||
903 | 906 | ||
904 | 907 | ||
905 | 908 | ||
906 | topFrame = addPage(i18n("Alarm"),0,0); | 909 | topFrame = addPage(i18n("Alarm"),0,0); |
907 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 910 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
908 | 911 | ||
909 | topLayout = new QGridLayout(topFrame,2,1); | 912 | topLayout = new QGridLayout(topFrame,2,1); |
910 | topLayout->setSpacing(spacingHint()); | 913 | topLayout->setSpacing(spacingHint()); |
911 | topLayout->setMargin(marginHint()); | 914 | topLayout->setMargin(marginHint()); |
912 | int iii = 0; | 915 | int iii = 0; |
913 | 916 | ||
914 | dummy = | 917 | dummy = |
915 | addWidBool(i18n("Use internal alarm notification"), | 918 | addWidBool(i18n("Use internal alarm notification"), |
916 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 919 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
917 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 920 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
918 | 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); | 921 | 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); |
919 | 922 | ||
920 | topLayout->addWidget(lab ,iii++,0); | 923 | topLayout->addWidget(lab ,iii++,0); |
921 | #ifndef DESKTOP_VERSION | 924 | #ifndef DESKTOP_VERSION |
922 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 925 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
923 | #else | 926 | #else |
924 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 927 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
925 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 928 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
926 | #endif | 929 | #endif |
927 | 930 | ||
928 | QHBox* dummyBox = new QHBox(topFrame); | 931 | QHBox* dummyBox = new QHBox(topFrame); |
929 | new QLabel(i18n("Play beeps count:"),dummyBox); | 932 | new QLabel(i18n("Play beeps count:"),dummyBox); |
930 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 933 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
931 | topLayout->addWidget(dummyBox,iii++,0); | 934 | topLayout->addWidget(dummyBox,iii++,0); |
932 | 935 | ||
933 | dummyBox = new QHBox(topFrame); | 936 | dummyBox = new QHBox(topFrame); |
934 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 937 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
935 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 938 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
936 | topLayout->addWidget(dummyBox,iii++,0); | 939 | topLayout->addWidget(dummyBox,iii++,0); |
937 | 940 | ||
938 | dummyBox = new QHBox(topFrame); | 941 | dummyBox = new QHBox(topFrame); |
939 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 942 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
940 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 943 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
941 | topLayout->addWidget(dummyBox,iii++,0); | 944 | topLayout->addWidget(dummyBox,iii++,0); |
942 | 945 | ||
943 | dummyBox = new QHBox(topFrame); | 946 | dummyBox = new QHBox(topFrame); |
944 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 947 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
945 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 948 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
946 | topLayout->addWidget(dummyBox,iii++,0); | 949 | topLayout->addWidget(dummyBox,iii++,0); |
947 | 950 | ||
948 | 951 | ||
949 | 952 | ||
950 | 953 | ||
951 | 954 | ||
952 | 955 | ||
953 | 956 | ||
954 | QHBox* hbo = new QHBox ( topFrame ); | 957 | QHBox* hbo = new QHBox ( topFrame ); |