author | zautrix <zautrix> | 2005-07-03 08:42:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-03 08:42:34 (UTC) |
commit | 971bfd3cf502fbbafc96bef70e21beb545e450b5 (patch) (unidiff) | |
tree | 2d4b2d0d291c5a23bb39e3f448403acbe86cc071 | |
parent | 914c795a77d8bb28fc8c2155cfc9524f3effdde1 (diff) | |
download | kdepimpi-971bfd3cf502fbbafc96bef70e21beb545e450b5.zip kdepimpi-971bfd3cf502fbbafc96bef70e21beb545e450b5.tar.gz kdepimpi-971bfd3cf502fbbafc96bef70e21beb545e450b5.tar.bz2 |
fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 16 | ||||
-rw-r--r-- | korganizer/koeventpopupmenu.cpp | 12 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 7 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
6 files changed, 25 insertions, 21 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 727921a..9dde910 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1178,319 +1178,319 @@ | |||
1178 | { "Size %1","Größe %1" }, | 1178 | { "Size %1","Größe %1" }, |
1179 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1179 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1180 | { " (%1 y.)"," (%1 J.)" }, | 1180 | { " (%1 y.)"," (%1 J.)" }, |
1181 | { "Allday:","Ganztägig:" }, | 1181 | { "Allday:","Ganztägig:" }, |
1182 | { "compl.todos","erled.Todos" }, | 1182 | { "compl.todos","erled.Todos" }, |
1183 | { "Day view","Tagesansicht" }, | 1183 | { "Day view","Tagesansicht" }, |
1184 | { "Next days","Nächste Tage" }, | 1184 | { "Next days","Nächste Tage" }, |
1185 | { "Next week","Nächste Woche" }, | 1185 | { "Next week","Nächste Woche" }, |
1186 | { "Next two weeks","Nächste zwei Wochen" }, | 1186 | { "Next two weeks","Nächste zwei Wochen" }, |
1187 | { "This month","Dieser Monat" }, | 1187 | { "This month","Dieser Monat" }, |
1188 | { "Journal view","Journal" }, | 1188 | { "Journal view","Journal" }, |
1189 | { "Display all opened","Zeige alle geöffnet" }, | 1189 | { "Display all opened","Zeige alle geöffnet" }, |
1190 | { "Display all closed","Zeige alle geschlossen" }, | 1190 | { "Display all closed","Zeige alle geschlossen" }, |
1191 | { "Display all flat","Zeige alle flach" }, | 1191 | { "Display all flat","Zeige alle flach" }, |
1192 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1192 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1193 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1193 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1194 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1194 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1195 | { "Select Week","Wähle Woche" }, | 1195 | { "Select Week","Wähle Woche" }, |
1196 | { "Set alarm...","Setze Alarm..." }, | 1196 | { "Set alarm...","Setze Alarm..." }, |
1197 | { "Set Alarm!","Setze Alarm!" }, | 1197 | { "Set Alarm!","Setze Alarm!" }, |
1198 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, | 1198 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, |
1199 | { " and "," und " }, | 1199 | { " and "," und " }, |
1200 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1200 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1201 | { "Mail to selected","Mail an Ausgewählte" }, | 1201 | { "Mail to selected","Mail an Ausgewählte" }, |
1202 | { "Mail to all","Mail an Alle" }, | 1202 | { "Mail to all","Mail an Alle" }, |
1203 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1203 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1204 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1204 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1205 | { " on"," am" }, | 1205 | { " on"," am" }, |
1206 | { " completed on "," erledigt am " }, | 1206 | { " completed on "," erledigt am " }, |
1207 | { "Save as Event template","Speichere als Vorlage" }, | 1207 | { "Save as Event template","Speichere als Vorlage" }, |
1208 | { "Load Event template","Lade Termin Vorlage" }, | 1208 | { "Load Event template","Lade Termin Vorlage" }, |
1209 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1209 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1210 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1210 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1211 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1211 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1212 | { "Parent todo:<br>","Über Todo:<br>" }, | 1212 | { "Parent todo:<br>","Über Todo:<br>" }, |
1213 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1213 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1214 | { " completed"," erledigt" }, | 1214 | { " completed"," erledigt" }, |
1215 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, | 1215 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, |
1216 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1216 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1217 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1217 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1218 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1218 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1219 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1219 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1220 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1220 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1221 | { "Error","Fehler" }, | 1221 | { "Error","Fehler" }, |
1222 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1222 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1223 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1223 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1224 | { "Warning","Warnung" }, | 1224 | { "Warning","Warnung" }, |
1225 | { "Select week number","Wähle Wochen Nummer" }, | 1225 | { "Select week number","Wähle Wochen Nummer" }, |
1226 | { "Februar","Februar" }, | 1226 | { "Februar","Februar" }, |
1227 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1227 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1228 | { "W","W" }, | 1228 | { "W","W" }, |
1229 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1229 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1230 | { "T: %1","T: %1" }, | 1230 | { "T: %1","T: %1" }, |
1231 | { "Start: ","Start: " }, | 1231 | { "Start: ","Start: " }, |
1232 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1232 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1233 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1233 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1234 | { "Remote IP address:","Ferne IP Adresse:" }, | 1234 | { "Remote IP address:","Ferne IP Adresse:" }, |
1235 | { "Remote port number:","Ferne Port Nummer:" }, | 1235 | { "Remote port number:","Ferne Port Nummer:" }, |
1236 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1236 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1237 | { "Remote from: ","Fern von: " }, | 1237 | { "Remote from: ","Fern von: " }, |
1238 | { "Local from: ","Lokal von: " }, | 1238 | { "Local from: ","Lokal von: " }, |
1239 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 1239 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
1240 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1240 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1241 | { "Write back","Schreibe zurück" }, | 1241 | { "Write back","Schreibe zurück" }, |
1242 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1242 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1243 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1243 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1244 | { "Received sync request","Sync Anfrage erhalten" }, | 1244 | { "Received sync request","Sync Anfrage erhalten" }, |
1245 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 1245 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
1246 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1246 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1247 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1247 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1248 | { "Sending file...","Sende Datei..." }, | 1248 | { "Sending file...","Sende Datei..." }, |
1249 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1249 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1250 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1250 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1251 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1251 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1252 | { "Writing file to disk...","Speichere Datei..." }, | 1252 | { "Writing file to disk...","Speichere Datei..." }, |
1253 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1253 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1254 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1254 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1255 | { "Synchronize!","Synchronisiere!" }, | 1255 | { "Synchronize!","Synchronisiere!" }, |
1256 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1256 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1257 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1257 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1258 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1258 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1259 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1259 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1260 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1260 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1261 | { "List week view","Listenwochenansicht" }, | 1261 | { "List week view","Listenwochenansicht" }, |
1262 | { "List week","Listenwochenansicht" }, | 1262 | { "List week","Listenwochenansicht" }, |
1263 | { "Next Week","Nächste Woche" }, | 1263 | { "Next Week","Nächste Woche" }, |
1264 | { "Previous Week","Vorherige Woche" }, | 1264 | { "Previous Week","Vorherige Woche" }, |
1265 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1265 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1266 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1266 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1267 | { "Details","Details" }, | 1267 | { "Details","Details" }, |
1268 | { "Created time","Erstellt Zeit" }, | 1268 | { "Created time","Erstellt Zeit" }, |
1269 | { "Last modified time","Geändert Zeit" }, | 1269 | { "Last modified time","Geändert Zeit" }, |
1270 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1270 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1271 | { "View Options","Anzeige Optionen" }, | 1271 | { "View Options","Anzeige Optionen" }, |
1272 | { "<b>Created: ","<b>Erstellt am: " }, | 1272 | { "<b>Created: ","<b>Erstellt am: " }, |
1273 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1273 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1274 | { "Journal: ","Journal: " }, | 1274 | { "Journal: ","Journal: " }, |
1275 | { "yearly","jährlich" }, | 1275 | { "yearly","jährlich" }, |
1276 | { "(%1) ","%1-" }, | 1276 | { "(%1) ","%1-" }, |
1277 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1277 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1278 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1278 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1279 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1279 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1280 | { "Summary/Loc.","Titel/Ort" }, | 1280 | { "Summary/Loc.","Titel/Ort" }, |
1281 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1281 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1282 | { "Week Number","Wochennummer" }, | 1282 | { "Week Number","Wochennummer" }, |
1283 | { "Import","Importiere" }, | 1283 | { "Import","Importiere" }, |
1284 | { "Export","Exportiere" }, | 1284 | { "Export","Exportiere" }, |
1285 | { "Beam","Beame" }, | 1285 | { "Beam","Beame" }, |
1286 | { "Export","Exportiere" }, | 1286 | { "Export","Exportiere" }, |
1287 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1287 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1288 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1288 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1289 | { "Journal/Details...","Journale/Details..." }, | 1289 | { "Journal/Details...","Journale/Details..." }, |
1290 | { "Agenda View","Agenda Ansicht" }, | 1290 | { "Agenda View","Agenda Ansicht" }, |
1291 | { "Show current time","Zeige aktuelle Zeit" }, | 1291 | { "Show current time","Zeige aktuelle Zeit" }, |
1292 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1292 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1293 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, | 1293 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, |
1294 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1294 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1295 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1295 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1296 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1296 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1297 | { "%1 days\n","%1 Tagen\n" }, | 1297 | { "%1 days\n","%1 Tagen\n" }, |
1298 | { "1 day\n","1 Tag\n" }, | 1298 | { "1 day\n","1 Tag\n" }, |
1299 | { "%1 hours\n","%1 Stunden\n" }, | 1299 | { "%1 hours\n","%1 Stunden\n" }, |
1300 | { "1 hour\n","1 Stunde\n" }, | 1300 | { "1 hour\n","1 Stunde\n" }, |
1301 | { "%1 minutes\n","%1 Minuten\n" }, | 1301 | { "%1 minutes\n","%1 Minuten\n" }, |
1302 | { "1 minute\n","1 Minute\n" }, | 1302 | { "1 minute\n","1 Minute\n" }, |
1303 | { "Only one toolbar","Nur eine Toolbar" }, | 1303 | { "Only one toolbar","Nur eine Toolbar" }, |
1304 | { "Print","Drucke" }, | 1304 | { "Print","Drucke" }, |
1305 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1305 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1306 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1306 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1307 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1307 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1308 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1308 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1309 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, | 1309 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, |
1310 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1310 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1311 | { "Print unscaled","Drucke unskaliert" }, | 1311 | { "Print unscaled","Drucke unskaliert" }, |
1312 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1312 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1313 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1313 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1314 | { "Printout Mode","Druck Modus" }, | 1314 | { "Printout Mode","Druck Modus" }, |
1315 | { "Filter menu icon","Filtermenu Icon" }, | 1315 | { "Filter menu icon","Filtermenu Icon" }, |
1316 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, | 1316 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, |
1317 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, | 1317 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, |
1318 | { "%1d","%1t" }, | 1318 | { "%1d","%1t" }, |
1319 | { "%1h","%1std" }, | 1319 | { "%1h","%1std" }, |
1320 | { "%1min","%1min" }, | 1320 | { "%1min","%1min" }, |
1321 | { "( %1 before )","( %1 vorher )" }, | 1321 | { "( %1 before )","( %1 vorher )" }, |
1322 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1322 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1323 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1323 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1324 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1324 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1325 | { "Show Sync Events","Zeige Sync-Ereignisse" }, | 1325 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1326 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1326 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1327 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1327 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1328 | { " on "," am " }, | 1328 | { " on "," am " }, |
1329 | { "On: ","Am: " }, | 1329 | { "On: ","Am: " }, |
1330 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1330 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1331 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1331 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1332 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1332 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1333 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, | 1333 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, |
1334 | { "Todo is started","Todo ist gestartet" }, | 1334 | { "Todo is started","Todo ist gestartet" }, |
1335 | { "Stop todo","Stoppe Todo" }, | 1335 | { "Stop todo","Stoppe Todo" }, |
1336 | { "Todo is stopped","Todo ist gestoppt" }, | 1336 | { "Todo is stopped","Todo ist gestoppt" }, |
1337 | { "Start todo","Starte Todo" }, | 1337 | { "Start todo","Starte Todo" }, |
1338 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, | 1338 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1339 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, | 1339 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, |
1340 | { "Todo has subtodos","Todo hat Untertodos" }, | 1340 | { "Todo has subtodos","Todo hat Untertodos" }, |
1341 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1341 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1342 | { "Colors","Farben" }, | 1342 | { "Colors","Farben" }, |
1343 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1343 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1344 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1344 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1345 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1345 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1346 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1346 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1347 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1347 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1348 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1348 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1349 | { "times","Zeiten" }, | 1349 | { "times","Zeiten" }, |
1350 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, | 1350 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, |
1351 | { "Backup enabled","Backup angeschaltet" }, | 1351 | { "Backup enabled","Backup angeschaltet" }, |
1352 | { "Use standard backup dir","Standard Backupverzeichnis" }, | 1352 | { "Use standard backup dir","Standard Backupverzeichnis" }, |
1353 | { "Number of Backups:","Anzahl der Backups" }, | 1353 | { "Number of Backups:","Anzahl der Backups" }, |
1354 | { "Make backup every ","Mache ein Backup alle " }, | 1354 | { "Make backup every ","Mache ein Backup alle " }, |
1355 | { " days"," Tage" }, | 1355 | { " days"," Tage" }, |
1356 | { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, | 1356 | { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, |
1357 | { "Backup Failed!","Backup Problem!" }, | 1357 | { "Backup Failed!","Backup Problem!" }, |
1358 | { "Try again now","Versuche jetzt nochmal" }, | 1358 | { "Try again now","Versuche jetzt nochmal" }, |
1359 | { "Try again later","Versuche später nochmal" }, | 1359 | { "Try again later","Versuche später nochmal" }, |
1360 | { "Try again tomorrow","Versuche morgen nochmal" }, | 1360 | { "Try again tomorrow","Versuche morgen nochmal" }, |
1361 | { "Disable backup","Schalte Backup ab" }, | 1361 | { "Disable backup","Schalte Backup ab" }, |
1362 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, | 1362 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, |
1363 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, | 1363 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, |
1364 | { "Choose action","Wähle Aktion" }, | 1364 | { "Choose action","Wähle Aktion" }, |
1365 | { "Comment for todo:","Kommentar zum Todo:" }, | 1365 | { "Comment for todo:","Kommentar zum Todo:" }, |
1366 | { "Stop+note","Stop+Notiz" }, | 1366 | { "Stop+note","Stop+Notiz" }, |
1367 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, | 1367 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, |
1368 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, | 1368 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, |
1369 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, | 1369 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, |
1370 | { "Print complete list","Drucke komplette Liste" }, | 1370 | { "Print complete list...","Drucke komplette Liste..." }, |
1371 | { "Hide all selected","Verstecke Selektierte" }, | 1371 | { "Hide all selected","Verstecke Ausgewählte" }, |
1372 | { "Add items","hinzufügen" }, | 1372 | { "Add items","hinzufügen" }, |
1373 | { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, | 1373 | { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, |
1374 | { "Print List View...","Drucke Listenansicht..." }, | 1374 | { "Print List View...","Drucke Listenansicht..." }, |
1375 | { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, | 1375 | { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, |
1376 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, | 1376 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, |
1377 | { "Global Settings...","Globale Einstellungen..." }, | 1377 | { "Global Settings...","Globale Einstellungen..." }, |
1378 | { "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, | 1378 | { "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, |
1379 | { "(disabled)","(abgeschaltet)" }, | 1379 | { "(disabled)","(abgeschaltet)" }, |
1380 | { "New Calendar","Neuer Kalender" }, | 1380 | { "New Calendar","Neuer Kalender" }, |
1381 | { "Calendar","Kalender" }, | 1381 | { "Calendar","Kalender" }, |
1382 | { "Filter selector","Filterauswahl" }, | 1382 | { "Filter selector","Filterauswahl" }, |
1383 | { "Filtermenu","Filtermenu" }, | 1383 | { "Filtermenu","Filtermenu" }, |
1384 | { "Toggle Fullscreen","Vollbild umschalten" }, | 1384 | { "Toggle Fullscreen","Vollbild umschalten" }, |
1385 | { "Toggle Resource View","Resourcenansicht umschalten" }, | 1385 | { "Toggle Resource View","Resourcenansicht umschalten" }, |
1386 | { "Storage HowTo...","Speicherort HowTo..." }, | 1386 | { "Storage HowTo...","Speicherort HowTo..." }, |
1387 | { "Timetracking HowTo...","Timetracking HowTo..." }, | 1387 | { "Timetracking HowTo...","Timetracking HowTo..." }, |
1388 | { "Juni","Juni" }, | 1388 | { "Juni","Juni" }, |
1389 | { "Juli","Juli" }, | 1389 | { "Juli","Juli" }, |
1390 | { "ToDo:","ToDo:" }, | 1390 | { "ToDo:","ToDo:" }, |
1391 | { "Set Calendar","Setze Kalender" }, | 1391 | { "Set Calendar","Setze Kalender" }, |
1392 | { "Todo: %1","Todo: %1" }, | 1392 | { "Todo: %1","Todo: %1" }, |
1393 | { ": (Prio ",": (Prio " }, | 1393 | { ": (Prio ",": (Prio " }, |
1394 | { "Todos","Todos" }, | 1394 | { "Todos","Todos" }, |
1395 | { "Todo Viewer","Todo Viewer" }, | 1395 | { "Todo Viewer","Todo Viewer" }, |
1396 | { "Todo ","Todo " }, | 1396 | { "Todo ","Todo " }, |
1397 | { " Calendar \n Resource "," Kalender \n Resource " }, | 1397 | { " Calendar \n Resource "," Kalender \n Resource " }, |
1398 | { " Color "," Farbe " }, | 1398 | { " Color "," Farbe " }, |
1399 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, | 1399 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, |
1400 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, | 1400 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, |
1401 | { "Add new Calendar","Füge Kalender hinzu" }, | 1401 | { "Add new Calendar","Füge Kalender hinzu" }, |
1402 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, | 1402 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, |
1403 | { "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, | 1403 | { "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, |
1404 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, | 1404 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, |
1405 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, | 1405 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, |
1406 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, | 1406 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, |
1407 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, | 1407 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, |
1408 | { "Global application font for all apps:","Globale Schriftart:" }, | 1408 | { "Global application font for all apps:","Globale Schriftart:" }, |
1409 | { "Application Font","Applikationsschriftart" }, | 1409 | { "Application Font","Applikationsschriftart" }, |
1410 | { "Kx/Pi","Kx/Pi" }, | 1410 | { "Kx/Pi","Kx/Pi" }, |
1411 | { "Backup","Backup" }, | 1411 | { "Backup","Backup" }, |
1412 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, | 1412 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, |
1413 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, | 1413 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, |
1414 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, | 1414 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, |
1415 | { "Choose Color","Wähle Farbe" }, | 1415 | { "Choose Color","Wähle Farbe" }, |
1416 | { " OK "," OK " }, | 1416 | { " OK "," OK " }, |
1417 | { " Cancel "," Abbrechen " }, | 1417 | { " Cancel "," Abbrechen " }, |
1418 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, | 1418 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, |
1419 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, | 1419 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, |
1420 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, | 1420 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, |
1421 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, | 1421 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, |
1422 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, | 1422 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, |
1423 | { "%1\nis running!","%1\nist am Laufen!" }, | 1423 | { "%1\nis running!","%1\nist am Laufen!" }, |
1424 | { "Additional Comment:","Zusätzlicher Kommentar:" }, | 1424 | { "Additional Comment:","Zusätzlicher Kommentar:" }, |
1425 | { "Stop and save","Stopp und Speichern" }, | 1425 | { "Stop and save","Stopp und Speichern" }, |
1426 | { "Continue running","Weiter laufen lassen" }, | 1426 | { "Continue running","Weiter laufen lassen" }, |
1427 | { "Stop - do not save","Stopp - nicht Speichern" }, | 1427 | { "Stop - do not save","Stopp - nicht Speichern" }, |
1428 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, | 1428 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, |
1429 | { "Time mismatch!","Zeiten stimmen nicht!" }, | 1429 | { "Time mismatch!","Zeiten stimmen nicht!" }, |
1430 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, | 1430 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, |
1431 | { "Yes, stop todo","Ja, stoppe Todo" }, | 1431 | { "Yes, stop todo","Ja, stoppe Todo" }, |
1432 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, | 1432 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, |
1433 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, | 1433 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, |
1434 | { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, | 1434 | { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, |
1435 | { "Spouse","Ehegatte" }, | 1435 | { "Spouse","Ehegatte" }, |
1436 | { "Notes","Notizen" }, | 1436 | { "Notes","Notizen" }, |
1437 | { "Messanger","Messanger" }, | 1437 | { "Messanger","Messanger" }, |
1438 | { "Assistant","Assistent" }, | 1438 | { "Assistant","Assistent" }, |
1439 | { "Manager","Manager" }, | 1439 | { "Manager","Manager" }, |
1440 | { "Secrecy","Sichtbar" }, | 1440 | { "Secrecy","Sichtbar" }, |
1441 | { "male","männlich" }, | 1441 | { "male","männlich" }, |
1442 | { "female","weiblich" }, | 1442 | { "female","weiblich" }, |
1443 | { "Hide!","Verbergen!" }, | 1443 | { "Hide!","Verbergen!" }, |
1444 | { "Show!","Anzeigen!" }, | 1444 | { "Show!","Anzeigen!" }, |
1445 | { "Details","Details" }, | 1445 | { "Details","Details" }, |
1446 | { "Profession","Beruf" }, | 1446 | { "Profession","Beruf" }, |
1447 | { "Children","Kinder" }, | 1447 | { "Children","Kinder" }, |
1448 | { "Department","Abteilung" }, | 1448 | { "Department","Abteilung" }, |
1449 | { "Backup cancelled","Backup abgebrochen" }, | 1449 | { "Backup cancelled","Backup abgebrochen" }, |
1450 | { "Backup globally disabled","Backup global abgeschaltet" }, | 1450 | { "Backup globally disabled","Backup global abgeschaltet" }, |
1451 | { "Backup succesfully finished","Backup erfolgreich beendet" }, | 1451 | { "Backup succesfully finished","Backup erfolgreich beendet" }, |
1452 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, | 1452 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, |
1453 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, | 1453 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, |
1454 | { "Birthdays","Geburtstage" }, | 1454 | { "Birthdays","Geburtstage" }, |
1455 | { "KO/Pi import information!","KO/Pi Import Information!" }, | 1455 | { "KO/Pi import information!","KO/Pi Import Information!" }, |
1456 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, | 1456 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, |
1457 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, | 1457 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, |
1458 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, | 1458 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, |
1459 | { "Reload","Neu laden" }, | 1459 | { "Reload","Neu laden" }, |
1460 | { "Timezone settings","Zeitzoneneinstellung" }, | 1460 | { "Timezone settings","Zeitzoneneinstellung" }, |
1461 | { "Title: ","Titel: " }, | 1461 | { "Title: ","Titel: " }, |
1462 | { "Journal from: ","Journal vom: " }, | 1462 | { "Journal from: ","Journal vom: " }, |
1463 | { "Journal: %1 from ","Journal: %1 vom " }, | 1463 | { "Journal: %1 from ","Journal: %1 vom " }, |
1464 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, | 1464 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, |
1465 | { "Selected Item","Ausgewähltes Item" }, | 1465 | { "Selected Item","Ausgewähltes Item" }, |
1466 | { "Select Date...","Wähle Datum..." }, | 1466 | { "Select Date...","Wähle Datum..." }, |
1467 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, | 1467 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, |
1468 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, | 1468 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, |
1469 | { "Edit category list...","Ändere Kategorieliste..." }, | 1469 | { "Edit category list...","Ändere Kategorieliste..." }, |
1470 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, | 1470 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, |
1471 | { "Filepath: ","Dateipfad: " }, | 1471 | { "Filepath: ","Dateipfad: " }, |
1472 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, | 1472 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, |
1473 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, | 1473 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, |
1474 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, | 1474 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, |
1475 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, | 1475 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, |
1476 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, | 1476 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, |
1477 | { "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, | 1477 | { "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, |
1478 | { "Alarm Options","Alarm Einstellungen" }, | 1478 | { "Alarm Options","Alarm Einstellungen" }, |
1479 | { "Delete selected...","Lösche Ausgewählte..." }, | 1479 | { "Delete selected...","Lösche Ausgewählte..." }, |
1480 | { "None","Nichts" }, | 1480 | { "None","Nichts" }, |
1481 | { "Selection","Auswahl" }, | 1481 | { "Selection","Auswahl" }, |
1482 | { "Set categories","Setze Kategorien" }, | 1482 | { "Set categories","Setze Kategorien" }, |
1483 | { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, | 1483 | { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, |
1484 | { "Reset","Neu setzen" }, | 1484 | { "Reset","Neu setzen" }, |
1485 | { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, | 1485 | { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, |
1486 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, | 1486 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, |
1487 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, | 1487 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, |
1488 | { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, | 1488 | { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, |
1489 | { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 1489 | { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
1490 | { "Edit","Edit" }, | 1490 | { "Edit","Edit" }, |
1491 | { "Last Modified","Zuletzt geändert" }, | 1491 | { "Last Modified","Zuletzt geändert" }, |
1492 | { "","" }, | 1492 | { "","" }, |
1493 | { "","" }, | 1493 | { "","" }, |
1494 | { "","" }, | 1494 | { "","" }, |
1495 | { "","" }, | 1495 | { "","" }, |
1496 | { "","" }, | 1496 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index a10e93c..72221fd 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -485,395 +485,401 @@ void CalendarView::init() | |||
485 | 485 | ||
486 | } else { | 486 | } else { |
487 | leftFrameLayout->addWidget(mTodoList,2 ); | 487 | leftFrameLayout->addWidget(mTodoList,2 ); |
488 | leftFrameLayout->addWidget(mFilterView ); | 488 | leftFrameLayout->addWidget(mFilterView ); |
489 | } | 489 | } |
490 | #endif | 490 | #endif |
491 | mFilterView->hide(); | 491 | mFilterView->hide(); |
492 | mCalEditView->hide(); | 492 | mCalEditView->hide(); |
493 | QWidget *rightBox = new QWidget( mMainFrame ); | 493 | QWidget *rightBox = new QWidget( mMainFrame ); |
494 | //mainBoxLayout->addWidget ( rightBox, 10 ); | 494 | //mainBoxLayout->addWidget ( rightBox, 10 ); |
495 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 495 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
496 | mRightFrame = new QWidgetStack( rightBox ); | 496 | mRightFrame = new QWidgetStack( rightBox ); |
497 | rightLayout->addWidget( mRightFrame, 10 ); | 497 | rightLayout->addWidget( mRightFrame, 10 ); |
498 | 498 | ||
499 | //mLeftFrame = (QWidget *)leftFrame; | 499 | //mLeftFrame = (QWidget *)leftFrame; |
500 | if ( KOPrefs::instance()->mVerticalScreen ) { | 500 | if ( KOPrefs::instance()->mVerticalScreen ) { |
501 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); | 501 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); |
502 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); | 502 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); |
503 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); | 503 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); |
504 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); | 504 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); |
505 | } else { | 505 | } else { |
506 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); | 506 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); |
507 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); | 507 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); |
508 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); | 508 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); |
509 | } | 509 | } |
510 | if ( !KOPrefs::instance()->mShowDateNavigator) | 510 | if ( !KOPrefs::instance()->mShowDateNavigator) |
511 | mDateNavigator->hide(); | 511 | mDateNavigator->hide(); |
512 | //qDebug("Calendarview Size %d %d ", width(), height()); | 512 | //qDebug("Calendarview Size %d %d ", width(), height()); |
513 | #endif | 513 | #endif |
514 | 514 | ||
515 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 515 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
516 | SLOT( showDates( const KCal::DateList & ) ) ); | 516 | SLOT( showDates( const KCal::DateList & ) ) ); |
517 | 517 | ||
518 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 518 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
519 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 519 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
520 | 520 | ||
521 | 521 | ||
522 | 522 | ||
523 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), | 523 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), |
524 | mViewManager, SLOT( showMonth( const QDate & ) ) ); | 524 | mViewManager, SLOT( showMonth( const QDate & ) ) ); |
525 | 525 | ||
526 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), | 526 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), |
527 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); | 527 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); |
528 | 528 | ||
529 | connect( mDateNavigator, SIGNAL( goPrevYear() ), | 529 | connect( mDateNavigator, SIGNAL( goPrevYear() ), |
530 | mNavigator, SLOT( selectPreviousYear() ) ); | 530 | mNavigator, SLOT( selectPreviousYear() ) ); |
531 | connect( mDateNavigator, SIGNAL( goNextYear() ), | 531 | connect( mDateNavigator, SIGNAL( goNextYear() ), |
532 | mNavigator, SLOT( selectNextYear() ) ); | 532 | mNavigator, SLOT( selectNextYear() ) ); |
533 | connect( mDateNavigator, SIGNAL( goPrevMonth() ), | 533 | connect( mDateNavigator, SIGNAL( goPrevMonth() ), |
534 | mNavigator, SLOT( selectPreviousMonth() ) ); | 534 | mNavigator, SLOT( selectPreviousMonth() ) ); |
535 | connect( mDateNavigator, SIGNAL( goNextMonth() ), | 535 | connect( mDateNavigator, SIGNAL( goNextMonth() ), |
536 | mNavigator, SLOT( selectNextMonth() ) ); | 536 | mNavigator, SLOT( selectNextMonth() ) ); |
537 | 537 | ||
538 | connect( mDateNavigator, SIGNAL( goPrevious() ), | 538 | connect( mDateNavigator, SIGNAL( goPrevious() ), |
539 | mNavigator, SLOT( selectPrevious() ) ); | 539 | mNavigator, SLOT( selectPrevious() ) ); |
540 | connect( mDateNavigator, SIGNAL( goNext() ), | 540 | connect( mDateNavigator, SIGNAL( goNext() ), |
541 | mNavigator, SLOT( selectNext() ) ); | 541 | mNavigator, SLOT( selectNext() ) ); |
542 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), | 542 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), |
543 | mNavigator, SLOT( slotMonthSelect( int ) ) ); | 543 | mNavigator, SLOT( slotMonthSelect( int ) ) ); |
544 | 544 | ||
545 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 545 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
546 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 546 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
547 | #if 0 | 547 | #if 0 |
548 | connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), | 548 | connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), |
549 | SLOT( incidenceAdded( Incidence *) ) ); | 549 | SLOT( incidenceAdded( Incidence *) ) ); |
550 | #endif | 550 | #endif |
551 | // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); | 551 | // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); |
552 | 552 | ||
553 | connect( this, SIGNAL( configChanged() ), | 553 | connect( this, SIGNAL( configChanged() ), |
554 | mDateNavigator, SLOT( updateConfig() ) ); | 554 | mDateNavigator, SLOT( updateConfig() ) ); |
555 | 555 | ||
556 | connect( mTodoList, SIGNAL( newTodoSignal() ), | 556 | connect( mTodoList, SIGNAL( newTodoSignal() ), |
557 | SLOT( newTodo() ) ); | 557 | SLOT( newTodo() ) ); |
558 | connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), | 558 | connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), |
559 | SLOT( newSubTodo( Todo * ) ) ); | 559 | SLOT( newSubTodo( Todo * ) ) ); |
560 | connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), | 560 | connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), |
561 | SLOT( editTodo( Todo * ) ) ); | 561 | SLOT( editTodo( Todo * ) ) ); |
562 | connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), | 562 | connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), |
563 | SLOT( showTodo( Todo *) ) ); | 563 | SLOT( showTodo( Todo *) ) ); |
564 | connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), | 564 | connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), |
565 | SLOT( deleteTodo( Todo *) ) ); | 565 | SLOT( deleteTodo( Todo *) ) ); |
566 | connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); | 566 | connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); |
567 | connect( mTodoList, SIGNAL( purgeCompletedSignal() ), | 567 | connect( mTodoList, SIGNAL( purgeCompletedSignal() ), |
568 | SLOT( purgeCompleted() ) ); | 568 | SLOT( purgeCompleted() ) ); |
569 | connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), | 569 | connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), |
570 | SIGNAL( todoModified( Todo *, int ) ) ); | 570 | SIGNAL( todoModified( Todo *, int ) ) ); |
571 | 571 | ||
572 | connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), | 572 | connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), |
573 | this, SLOT ( cloneIncidence( Incidence * ) ) ); | 573 | this, SLOT ( cloneIncidence( Incidence * ) ) ); |
574 | connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), | 574 | connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), |
575 | this, SLOT (cancelIncidence( Incidence * ) ) ); | 575 | this, SLOT (cancelIncidence( Incidence * ) ) ); |
576 | 576 | ||
577 | connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), | 577 | connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), |
578 | this, SLOT ( moveIncidence( Incidence * ) ) ); | 578 | this, SLOT ( moveIncidence( Incidence * ) ) ); |
579 | connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), | 579 | connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), |
580 | this, SLOT ( beamIncidence( Incidence * ) ) ); | 580 | this, SLOT ( beamIncidence( Incidence * ) ) ); |
581 | 581 | ||
582 | connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), | 582 | connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), |
583 | this, SLOT ( todo_unsub( Todo * ) ) ); | 583 | this, SLOT ( todo_unsub( Todo * ) ) ); |
584 | 584 | ||
585 | connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | 585 | connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), |
586 | this, SLOT ( todo_resub( Todo *,Todo * ) ) ); | 586 | this, SLOT ( todo_resub( Todo *,Todo * ) ) ); |
587 | connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, | 587 | connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, |
588 | SLOT( updateTodo( Todo *, int ) ) ); | 588 | SLOT( updateTodo( Todo *, int ) ) ); |
589 | connect( this, SIGNAL( todoModified( Todo *, int )), this, | 589 | connect( this, SIGNAL( todoModified( Todo *, int )), this, |
590 | SLOT( changeTodoDisplay( Todo *, int ) ) ); | 590 | SLOT( changeTodoDisplay( Todo *, int ) ) ); |
591 | 591 | ||
592 | 592 | ||
593 | connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); | 593 | connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); |
594 | connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); | 594 | connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); |
595 | connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); | 595 | connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); |
596 | connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); | 596 | connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); |
597 | 597 | ||
598 | 598 | ||
599 | 599 | ||
600 | 600 | ||
601 | 601 | ||
602 | connect(QApplication::clipboard(),SIGNAL(dataChanged()), | 602 | connect(QApplication::clipboard(),SIGNAL(dataChanged()), |
603 | SLOT(checkClipboard())); | 603 | SLOT(checkClipboard())); |
604 | connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), | 604 | connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), |
605 | SLOT( processTodoListSelection( Incidence * ) ) ); | 605 | SLOT( processTodoListSelection( Incidence * ) ) ); |
606 | connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); | 606 | connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); |
607 | 607 | ||
608 | // kdDebug() << "CalendarView::CalendarView() done" << endl; | 608 | // kdDebug() << "CalendarView::CalendarView() done" << endl; |
609 | 609 | ||
610 | mDateFrame = new QVBox(0,0,WType_Popup); | 610 | mDateFrame = new QVBox(0,0,WType_Popup); |
611 | //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); | 611 | //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); |
612 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); | 612 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); |
613 | mDateFrame->setLineWidth(3); | 613 | mDateFrame->setLineWidth(3); |
614 | mDateFrame->hide(); | 614 | mDateFrame->hide(); |
615 | mDateFrame->setCaption( i18n( "Pick a date to display")); | 615 | mDateFrame->setCaption( i18n( "Pick a date to display")); |
616 | mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); | 616 | mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); |
617 | 617 | ||
618 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); | 618 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); |
619 | 619 | ||
620 | mEventEditor = mDialogManager->getEventEditor(); | 620 | mEventEditor = mDialogManager->getEventEditor(); |
621 | mTodoEditor = mDialogManager->getTodoEditor(); | 621 | mTodoEditor = mDialogManager->getTodoEditor(); |
622 | 622 | ||
623 | mFlagEditDescription = false; | 623 | mFlagEditDescription = false; |
624 | 624 | ||
625 | mSuspendTimer = new QTimer( this ); | 625 | mSuspendTimer = new QTimer( this ); |
626 | mAlarmTimer = new QTimer( this ); | 626 | mAlarmTimer = new QTimer( this ); |
627 | mRecheckAlarmTimer = new QTimer( this ); | 627 | mRecheckAlarmTimer = new QTimer( this ); |
628 | connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); | 628 | connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); |
629 | connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); | 629 | connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); |
630 | connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); | 630 | connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); |
631 | mAlarmDialog = new AlarmDialog( this ); | 631 | mAlarmDialog = new AlarmDialog( this ); |
632 | connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); | 632 | connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); |
633 | mAlarmDialog->setServerNotification( false ); | 633 | mAlarmDialog->setServerNotification( false ); |
634 | mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); | 634 | mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); |
635 | 635 | ||
636 | 636 | ||
637 | #ifndef DESKTOP_VERSION | 637 | #ifndef DESKTOP_VERSION |
638 | //US listen for arriving address resultsets | 638 | //US listen for arriving address resultsets |
639 | connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), | 639 | connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), |
640 | this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); | 640 | this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); |
641 | #endif | 641 | #endif |
642 | mDateNavigator->setCalendar( mCalendar ); | 642 | mDateNavigator->setCalendar( mCalendar ); |
643 | } | 643 | } |
644 | 644 | ||
645 | 645 | ||
646 | CalendarView::~CalendarView() | 646 | CalendarView::~CalendarView() |
647 | { | 647 | { |
648 | // kdDebug() << "~CalendarView()" << endl; | 648 | // kdDebug() << "~CalendarView()" << endl; |
649 | //qDebug("CalendarView::~CalendarView() "); | 649 | //qDebug("CalendarView::~CalendarView() "); |
650 | delete mDialogManager; | 650 | delete mDialogManager; |
651 | delete mViewManager; | 651 | delete mViewManager; |
652 | delete mStorage; | 652 | delete mStorage; |
653 | delete mDateFrame ; | 653 | delete mDateFrame ; |
654 | delete mEventViewerDialog; | 654 | delete mEventViewerDialog; |
655 | //kdDebug() << "~CalendarView() done" << endl; | 655 | //kdDebug() << "~CalendarView() done" << endl; |
656 | } | 656 | } |
657 | void CalendarView::setCalReadOnly( int id, bool readO ) | 657 | void CalendarView::setCalReadOnly( int id, bool readO ) |
658 | { | 658 | { |
659 | if ( readO ) { | 659 | if ( readO ) { |
660 | emit save(); | 660 | emit save(); |
661 | } | 661 | } |
662 | mCalendar->setReadOnly( id, readO ); | 662 | mCalendar->setReadOnly( id, readO ); |
663 | } | 663 | } |
664 | void CalendarView::setScrollBarStep(int val ) | 664 | void CalendarView::setScrollBarStep(int val ) |
665 | { | 665 | { |
666 | #ifdef DESKTOP_VERSION | 666 | #ifdef DESKTOP_VERSION |
667 | mDateScrollBar->setLineStep ( val ); | 667 | mDateScrollBar->setLineStep ( val ); |
668 | #endif | 668 | #endif |
669 | } | 669 | } |
670 | void CalendarView::scrollBarValue(int val ) | 670 | void CalendarView::scrollBarValue(int val ) |
671 | { | 671 | { |
672 | #ifdef DESKTOP_VERSION | 672 | #ifdef DESKTOP_VERSION |
673 | if ( QApplication::desktop()->width() < 800 ) return; | 673 | if ( QApplication::desktop()->width() < 800 ) return; |
674 | static bool block = false; | 674 | static bool block = false; |
675 | if ( block ) return; | 675 | if ( block ) return; |
676 | block = true; | 676 | block = true; |
677 | val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); | ||
678 | //qDebug("VAL %d ",val ); | ||
679 | int count = mNavigator->selectedDates().count(); | 677 | int count = mNavigator->selectedDates().count(); |
680 | int year = mNavigator->selectedDates().first().year(); | ||
681 | int day = mNavigator->selectedDates().first().dayOfYear(); | 678 | int day = mNavigator->selectedDates().first().dayOfYear(); |
682 | if ( val == day -1 ) { | 679 | int stepdays = val; |
680 | if ( mDateScrollBar->lineStep () <= count ) { | ||
681 | val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); | ||
682 | //qDebug("VAL %d ",val ); | ||
683 | stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); | ||
684 | stepdays = day-1+stepdays; | ||
685 | if ( stepdays < 0 ) stepdays = 0; | ||
686 | } | ||
687 | if ( stepdays == day -1 ) { | ||
683 | block = false; | 688 | block = false; |
684 | return; | 689 | return; |
685 | } | 690 | } |
691 | int year = mNavigator->selectedDates().first().year(); | ||
686 | QDate d ( year,1,1 ); | 692 | QDate d ( year,1,1 ); |
687 | mNavigator->selectDates( d.addDays( val ), count ); | 693 | mNavigator->selectDates( d.addDays( stepdays) , count ); |
688 | block = false; | 694 | block = false; |
689 | #endif | 695 | #endif |
690 | 696 | ||
691 | } | 697 | } |
692 | void CalendarView::checkFiles() | 698 | void CalendarView::checkFiles() |
693 | { | 699 | { |
694 | QString message; | 700 | QString message; |
695 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 701 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
696 | KopiCalendarFile * cal = calendars.first(); | 702 | KopiCalendarFile * cal = calendars.first(); |
697 | while ( cal ) { | 703 | while ( cal ) { |
698 | if ( cal->mErrorOnLoad ) { | 704 | if ( cal->mErrorOnLoad ) { |
699 | message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; | 705 | message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; |
700 | } | 706 | } |
701 | cal = calendars.next(); | 707 | cal = calendars.next(); |
702 | } | 708 | } |
703 | if ( !message.isEmpty() ) { | 709 | if ( !message.isEmpty() ) { |
704 | message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); | 710 | message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); |
705 | KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); | 711 | KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); |
706 | } | 712 | } |
707 | QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); | 713 | QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); |
708 | } | 714 | } |
709 | void CalendarView::checkAlarms() | 715 | void CalendarView::checkAlarms() |
710 | { | 716 | { |
711 | 717 | ||
712 | 718 | ||
713 | KConfig *config = KOGlobals::config(); | 719 | KConfig *config = KOGlobals::config(); |
714 | config->setGroup( "AppRun" ); | 720 | config->setGroup( "AppRun" ); |
715 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 721 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
716 | int daysto = dt.daysTo( QDate::currentDate() ); | 722 | int daysto = dt.daysTo( QDate::currentDate() ); |
717 | int days = config->readNumEntry( "LatestProgramStopDays" , daysto); | 723 | int days = config->readNumEntry( "LatestProgramStopDays" , daysto); |
718 | dt = dt.addDays( days ); | 724 | dt = dt.addDays( days ); |
719 | int secto = dt.secsTo( QDateTime::currentDateTime() ); | 725 | int secto = dt.secsTo( QDateTime::currentDateTime() ); |
720 | int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; | 726 | int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; |
721 | //qDebug("KO: Reading program stop %d ", secs); | 727 | //qDebug("KO: Reading program stop %d ", secs); |
722 | //secs -= ( 3600 * 24*3 ); // debug only | 728 | //secs -= ( 3600 * 24*3 ); // debug only |
723 | QDateTime latest = dt.addSecs ( secs ); | 729 | QDateTime latest = dt.addSecs ( secs ); |
724 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); | 730 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); |
725 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | 731 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); |
726 | QPtrList<Incidence> el = mCalendar->rawIncidences(); | 732 | QPtrList<Incidence> el = mCalendar->rawIncidences(); |
727 | QPtrList<Incidence> al; | 733 | QPtrList<Incidence> al; |
728 | Incidence* inL = el.first(); | 734 | Incidence* inL = el.first(); |
729 | QDateTime cur = QDateTime::currentDateTime().addSecs(-59); | 735 | QDateTime cur = QDateTime::currentDateTime().addSecs(-59); |
730 | qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); | 736 | qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); |
731 | while ( inL ) { | 737 | while ( inL ) { |
732 | bool ok = false; | 738 | bool ok = false; |
733 | int offset = 0; | 739 | int offset = 0; |
734 | QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; | 740 | QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; |
735 | if ( ok ) { | 741 | if ( ok ) { |
736 | //qDebug("OK %s",next.toString().latin1()); | 742 | //qDebug("OK %s",next.toString().latin1()); |
737 | if ( next < cur ) { | 743 | if ( next < cur ) { |
738 | al.append( inL ); | 744 | al.append( inL ); |
739 | //qDebug("found missed alarm: %s ", inL->summary().latin1() ); | 745 | //qDebug("found missed alarm: %s ", inL->summary().latin1() ); |
740 | } | 746 | } |
741 | } | 747 | } |
742 | inL = el.next(); | 748 | inL = el.next(); |
743 | } | 749 | } |
744 | if ( al.count() ) { | 750 | if ( al.count() ) { |
745 | QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); | 751 | QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); |
746 | dia->setCaption( i18n("KO/Pi: Missing alarms!") ); | 752 | dia->setCaption( i18n("KO/Pi: Missing alarms!") ); |
747 | QVBoxLayout* lay = new QVBoxLayout( dia ); | 753 | QVBoxLayout* lay = new QVBoxLayout( dia ); |
748 | lay->setSpacing( 0 ); | 754 | lay->setSpacing( 0 ); |
749 | lay->setMargin( 0 ); | 755 | lay->setMargin( 0 ); |
750 | MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); | 756 | MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); |
751 | connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); | 757 | connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); |
752 | lay->addWidget( matb ); | 758 | lay->addWidget( matb ); |
753 | if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { | 759 | if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { |
754 | int wid = 210; | 760 | int wid = 210; |
755 | int x = QApplication::desktop()->width() - wid - 7; | 761 | int x = QApplication::desktop()->width() - wid - 7; |
756 | int y = QApplication::desktop()->height() - wid - 70; | 762 | int y = QApplication::desktop()->height() - wid - 70; |
757 | dia->setGeometry ( x,y,wid,wid); | 763 | dia->setGeometry ( x,y,wid,wid); |
758 | } else { | 764 | } else { |
759 | int si = 220; | 765 | int si = 220; |
760 | if ( QApplication::desktop()->width() > 470 ) | 766 | if ( QApplication::desktop()->width() > 470 ) |
761 | si = 400; | 767 | si = 400; |
762 | dia->resize(si,si/2); | 768 | dia->resize(si,si/2); |
763 | } | 769 | } |
764 | dia->setBackgroundColor( QColor( 255, 255, 255 ) ); | 770 | dia->setBackgroundColor( QColor( 255, 255, 255 ) ); |
765 | dia->show(); | 771 | dia->show(); |
766 | 772 | ||
767 | } | 773 | } |
768 | } | 774 | } |
769 | void CalendarView::showDay( QDate d ) | 775 | void CalendarView::showDay( QDate d ) |
770 | { | 776 | { |
771 | dateNavigator()->blockSignals( true ); | 777 | dateNavigator()->blockSignals( true ); |
772 | dateNavigator()->selectDate( d ); | 778 | dateNavigator()->selectDate( d ); |
773 | dateNavigator()->blockSignals( false ); | 779 | dateNavigator()->blockSignals( false ); |
774 | mViewManager->showDayView(); | 780 | mViewManager->showDayView(); |
775 | //dateNavigator()->selectDate( d ); | 781 | //dateNavigator()->selectDate( d ); |
776 | } | 782 | } |
777 | void CalendarView::timerAlarm() | 783 | void CalendarView::timerAlarm() |
778 | { | 784 | { |
779 | //qDebug("CalendarView::timerAlarm() "); | 785 | //qDebug("CalendarView::timerAlarm() "); |
780 | computeAlarm(mAlarmNotification ); | 786 | computeAlarm(mAlarmNotification ); |
781 | } | 787 | } |
782 | 788 | ||
783 | void CalendarView::suspendAlarm() | 789 | void CalendarView::suspendAlarm() |
784 | { | 790 | { |
785 | //qDebug(" CalendarView::suspendAlarm() "); | 791 | //qDebug(" CalendarView::suspendAlarm() "); |
786 | computeAlarm(mSuspendAlarmNotification ); | 792 | computeAlarm(mSuspendAlarmNotification ); |
787 | 793 | ||
788 | } | 794 | } |
789 | 795 | ||
790 | void CalendarView::startAlarm( QString mess , QString filename) | 796 | void CalendarView::startAlarm( QString mess , QString filename) |
791 | { | 797 | { |
792 | 798 | ||
793 | topLevelWidget()->showNormal(); | 799 | topLevelWidget()->showNormal(); |
794 | topLevelWidget()->setActiveWindow(); | 800 | topLevelWidget()->setActiveWindow(); |
795 | topLevelWidget()->raise(); | 801 | topLevelWidget()->raise(); |
796 | 802 | ||
797 | mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); | 803 | mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); |
798 | QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) ); | 804 | QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) ); |
799 | 805 | ||
800 | } | 806 | } |
801 | 807 | ||
802 | void CalendarView::checkNextTimerAlarm() | 808 | void CalendarView::checkNextTimerAlarm() |
803 | { | 809 | { |
804 | mCalendar->checkAlarmForIncidence( 0, true ); | 810 | mCalendar->checkAlarmForIncidence( 0, true ); |
805 | } | 811 | } |
806 | 812 | ||
807 | void CalendarView::computeAlarm( QString msg ) | 813 | void CalendarView::computeAlarm( QString msg ) |
808 | { | 814 | { |
809 | 815 | ||
810 | QString mess = msg; | 816 | QString mess = msg; |
811 | QString mAlarmMessage = mess.mid( 9 ); | 817 | QString mAlarmMessage = mess.mid( 9 ); |
812 | QString filename = MainWindow::resourcePath(); | 818 | QString filename = MainWindow::resourcePath(); |
813 | filename += "koalarm.wav"; | 819 | filename += "koalarm.wav"; |
814 | QString tempfilename; | 820 | QString tempfilename; |
815 | if ( mess.left( 13 ) == "suspend_alarm") { | 821 | if ( mess.left( 13 ) == "suspend_alarm") { |
816 | bool error = false; | 822 | bool error = false; |
817 | int len = mess.mid( 13 ).find("+++"); | 823 | int len = mess.mid( 13 ).find("+++"); |
818 | if ( len < 2 ) | 824 | if ( len < 2 ) |
819 | error = true; | 825 | error = true; |
820 | else { | 826 | else { |
821 | tempfilename = mess.mid( 13, len ); | 827 | tempfilename = mess.mid( 13, len ); |
822 | if ( !QFile::exists( tempfilename ) ) | 828 | if ( !QFile::exists( tempfilename ) ) |
823 | error = true; | 829 | error = true; |
824 | } | 830 | } |
825 | if ( ! error ) { | 831 | if ( ! error ) { |
826 | filename = tempfilename; | 832 | filename = tempfilename; |
827 | } | 833 | } |
828 | mAlarmMessage = mess.mid( 13+len+3 ); | 834 | mAlarmMessage = mess.mid( 13+len+3 ); |
829 | //qDebug("suspend file %s ",tempfilename.latin1() ); | 835 | //qDebug("suspend file %s ",tempfilename.latin1() ); |
830 | startAlarm( mAlarmMessage, filename); | 836 | startAlarm( mAlarmMessage, filename); |
831 | return; | 837 | return; |
832 | } | 838 | } |
833 | if ( mess.left( 11 ) == "timer_alarm") { | 839 | if ( mess.left( 11 ) == "timer_alarm") { |
834 | //mTimerTime = 0; | 840 | //mTimerTime = 0; |
835 | startAlarm( mess.mid( 11 ), filename ); | 841 | startAlarm( mess.mid( 11 ), filename ); |
836 | return; | 842 | return; |
837 | } | 843 | } |
838 | if ( mess.left( 10 ) == "proc_alarm") { | 844 | if ( mess.left( 10 ) == "proc_alarm") { |
839 | bool error = false; | 845 | bool error = false; |
840 | int len = mess.mid( 10 ).find("+++"); | 846 | int len = mess.mid( 10 ).find("+++"); |
841 | if ( len < 2 ) | 847 | if ( len < 2 ) |
842 | error = true; | 848 | error = true; |
843 | else { | 849 | else { |
844 | tempfilename = mess.mid( 10, len ); | 850 | tempfilename = mess.mid( 10, len ); |
845 | if ( !QFile::exists( tempfilename ) ) | 851 | if ( !QFile::exists( tempfilename ) ) |
846 | error = true; | 852 | error = true; |
847 | } | 853 | } |
848 | if ( error ) { | 854 | if ( error ) { |
849 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; | 855 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; |
850 | mAlarmMessage += mess.mid( 10+len+3+9 ); | 856 | mAlarmMessage += mess.mid( 10+len+3+9 ); |
851 | } else { | 857 | } else { |
852 | //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); | 858 | //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); |
853 | //qDebug("-----system command %s ",tempfilename.latin1() ); | 859 | //qDebug("-----system command %s ",tempfilename.latin1() ); |
854 | #ifndef _WIN32_ | 860 | #ifndef _WIN32_ |
855 | if ( vfork () == 0 ) { | 861 | if ( vfork () == 0 ) { |
856 | execl ( tempfilename.latin1(), 0 ); | 862 | execl ( tempfilename.latin1(), 0 ); |
857 | return; | 863 | return; |
858 | } | 864 | } |
859 | #else | 865 | #else |
860 | QProcess* p = new QProcess(); | 866 | QProcess* p = new QProcess(); |
861 | p->addArgument( tempfilename.latin1() ); | 867 | p->addArgument( tempfilename.latin1() ); |
862 | p->start(); | 868 | p->start(); |
863 | return; | 869 | return; |
864 | #endif | 870 | #endif |
865 | 871 | ||
866 | return; | 872 | return; |
867 | } | 873 | } |
868 | 874 | ||
869 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); | 875 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); |
870 | } | 876 | } |
871 | if ( mess.left( 11 ) == "audio_alarm") { | 877 | if ( mess.left( 11 ) == "audio_alarm") { |
872 | bool error = false; | 878 | bool error = false; |
873 | int len = mess.mid( 11 ).find("+++"); | 879 | int len = mess.mid( 11 ).find("+++"); |
874 | if ( len < 2 ) | 880 | if ( len < 2 ) |
875 | error = true; | 881 | error = true; |
876 | else { | 882 | else { |
877 | tempfilename = mess.mid( 11, len ); | 883 | tempfilename = mess.mid( 11, len ); |
878 | if ( !QFile::exists( tempfilename ) ) | 884 | if ( !QFile::exists( tempfilename ) ) |
879 | error = true; | 885 | error = true; |
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp index 0b0fe8e..77322e7 100644 --- a/korganizer/koeventpopupmenu.cpp +++ b/korganizer/koeventpopupmenu.cpp | |||
@@ -1,195 +1,201 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcursor.h> | 24 | #include <qcursor.h> |
25 | 25 | ||
26 | #include <klocale.h> | 26 | #include <klocale.h> |
27 | #include <kdebug.h> | 27 | #include <kdebug.h> |
28 | #include <kiconloader.h> | 28 | #include <kiconloader.h> |
29 | 29 | ||
30 | #include <libkcal/event.h> | 30 | #include <libkcal/event.h> |
31 | 31 | ||
32 | #include "koeventpopupmenu.h" | 32 | #include "koeventpopupmenu.h" |
33 | #include "koprefs.h" | 33 | #include "koprefs.h" |
34 | 34 | ||
35 | KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() | 35 | KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() |
36 | { | 36 | { |
37 | mCurrentIncidence = 0; | 37 | mCurrentIncidence = 0; |
38 | mHasAdditionalItems = false; | 38 | mHasAdditionalItems = false; |
39 | 39 | ||
40 | 40 | ||
41 | mSingleOnlyItems.append( insertItem (i18n("&Show"),this,SLOT(popupShow()))); | 41 | mSingleOnlyItems.append( insertItem (i18n("&Show"),this,SLOT(popupShow()))); |
42 | mEditOnlyItems.append(insertItem (i18n("&Edit..."),this,SLOT(popupEdit()))); | 42 | mEditOnlyItems.append(insertItem (i18n("&Edit..."),this,SLOT(popupEdit()))); |
43 | mEditOnlyItems.append(insertItem (i18n("&Delete..."), | 43 | mEditOnlyItems.append(insertItem (i18n("&Delete..."), |
44 | this,SLOT(popupDelete()))); | 44 | this,SLOT(popupDelete()))); |
45 | mEditOnlyItems.append(insertItem (i18n("&Clone..."), | 45 | mEditOnlyItems.append(insertItem (i18n("&Clone..."), |
46 | this,SLOT(popupClone()))); | 46 | this,SLOT(popupClone()))); |
47 | mEditOnlyItems.append(insertItem (i18n("&Move..."), | 47 | mEditOnlyItems.append(insertItem (i18n("&Move..."), |
48 | this,SLOT(popupMove()))); | 48 | this,SLOT(popupMove()))); |
49 | #ifndef DESKTOP_VERSION | 49 | #ifndef DESKTOP_VERSION |
50 | mEditOnlyItems.append(insertItem (i18n("&Beam..."), | 50 | mEditOnlyItems.append(insertItem (i18n("&Beam..."), |
51 | this,SLOT(popupBeam()))); | 51 | this,SLOT(popupBeam()))); |
52 | #endif | 52 | #endif |
53 | mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), | 53 | mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), |
54 | this,SLOT(popupCancel()))); | 54 | this,SLOT(popupCancel()))); |
55 | isDisabled = false; | 55 | isDisabled = false; |
56 | mCatPopup = new QPopupMenu ( this ); | 56 | mCatPopup = new QPopupMenu ( this ); |
57 | mCatPopup->setCheckable (true); | 57 | mCatPopup->setCheckable (true); |
58 | connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); | 58 | connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); |
59 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); | 59 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); |
60 | mCalPopup = new QPopupMenu ( this ); | 60 | mCalPopup = new QPopupMenu ( this ); |
61 | mCalPopup->setCheckable (true); | 61 | mCalPopup->setCheckable (true); |
62 | connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); | 62 | connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); |
63 | connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int ))); | 63 | connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int ))); |
64 | mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup )); | 64 | //mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup )); |
65 | mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup )); | 65 | //mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup )); |
66 | insertItem (i18n("Categories"),mCatPopup ); | ||
67 | insertItem (i18n("Calendar"),mCalPopup ); | ||
66 | QValueList<int>::Iterator it; | 68 | QValueList<int>::Iterator it; |
67 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { | 69 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { |
68 | mSingleOnlyItems.append(*it); | 70 | mSingleOnlyItems.append(*it); |
69 | } | 71 | } |
70 | 72 | ||
71 | } | 73 | } |
72 | void KOEventPopupMenu::enableDefault( bool enable ) | 74 | void KOEventPopupMenu::enableDefault( bool enable ) |
73 | { | 75 | { |
74 | isDisabled = !enable; | 76 | isDisabled = !enable; |
75 | QValueList<int>::Iterator it; | 77 | QValueList<int>::Iterator it; |
76 | for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { | 78 | for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { |
77 | setItemEnabled(*it,enable); | 79 | setItemEnabled(*it,enable); |
78 | } | 80 | } |
79 | 81 | ||
80 | } | 82 | } |
81 | 83 | ||
82 | void KOEventPopupMenu::fillCalPopup() // CAL | 84 | void KOEventPopupMenu::fillCalPopup() // CAL |
83 | { | 85 | { |
84 | mCalPopup->clear(); | 86 | mCalPopup->clear(); |
85 | if (!mCurrentIncidence) return; | 87 | if (!mCurrentIncidence) return; |
88 | bool readO = mCurrentIncidence->isReadOnly()|| isDisabled; | ||
86 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 89 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
87 | while ( kkf ) { | 90 | while ( kkf ) { |
88 | int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber); | 91 | int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber); |
89 | if ( kkf->mErrorOnLoad || kkf->isReadOnly ) | 92 | if ( kkf->mErrorOnLoad || kkf->isReadOnly || readO ) |
90 | mCalPopup->setItemEnabled( index, false ); | 93 | mCalPopup->setItemEnabled( index, false ); |
91 | mCalPopup->setItemChecked (index, kkf->mCalNumber == mCurrentIncidence->calID()); | 94 | mCalPopup->setItemChecked (index, kkf->mCalNumber == mCurrentIncidence->calID()); |
92 | kkf = KOPrefs::instance()->mCalendars.next(); | 95 | kkf = KOPrefs::instance()->mCalendars.next(); |
93 | } | 96 | } |
94 | } | 97 | } |
95 | void KOEventPopupMenu::computeCalPopup( int index ) // CAL | 98 | void KOEventPopupMenu::computeCalPopup( int index ) // CAL |
96 | { | 99 | { |
97 | if (!mCurrentIncidence) return; | 100 | if (!mCurrentIncidence) return; |
98 | mCurrentIncidence->setCalID( index ); | 101 | mCurrentIncidence->setCalID( index ); |
99 | emit categoryChanged( mCurrentIncidence ); | 102 | emit categoryChanged( mCurrentIncidence ); |
100 | } | 103 | } |
101 | void KOEventPopupMenu::fillCatPopup() | 104 | void KOEventPopupMenu::fillCatPopup() |
102 | { | 105 | { |
103 | mCatPopup->clear(); | 106 | mCatPopup->clear(); |
104 | if (!mCurrentIncidence) return; | 107 | if (!mCurrentIncidence) return; |
108 | bool readO = mCurrentIncidence->isReadOnly() || isDisabled; | ||
105 | QStringList checkedCategories = mCurrentIncidence->categories(); | 109 | QStringList checkedCategories = mCurrentIncidence->categories(); |
106 | int index = 0; | 110 | int index = 0; |
107 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 111 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
108 | it != KOPrefs::instance()->mCustomCategories.end (); | 112 | it != KOPrefs::instance()->mCustomCategories.end (); |
109 | ++it) { | 113 | ++it) { |
110 | mCatPopup->insertItem (*it, index ); | 114 | mCatPopup->insertItem (*it, index ); |
111 | if (checkedCategories.find (*it) != checkedCategories.end ()) { | 115 | if (checkedCategories.find (*it) != checkedCategories.end ()) { |
112 | mCatPopup->setItemChecked (index, true); | 116 | mCatPopup->setItemChecked (index, true); |
113 | } | 117 | } |
118 | if ( readO ) | ||
119 | mCatPopup->setItemEnabled( index, false ); | ||
114 | ++index; | 120 | ++index; |
115 | } | 121 | } |
116 | } | 122 | } |
117 | void KOEventPopupMenu::computeCatPopup( int index ) | 123 | void KOEventPopupMenu::computeCatPopup( int index ) |
118 | { | 124 | { |
119 | if (!mCurrentIncidence) return; | 125 | if (!mCurrentIncidence) return; |
120 | QStringList categories = mCurrentIncidence->categories(); | 126 | QStringList categories = mCurrentIncidence->categories(); |
121 | QString colcat = categories.first(); | 127 | QString colcat = categories.first(); |
122 | if (categories.find (KOPrefs::instance()->mCustomCategories[index]) != categories.end ()) | 128 | if (categories.find (KOPrefs::instance()->mCustomCategories[index]) != categories.end ()) |
123 | categories.remove (KOPrefs::instance()->mCustomCategories[index]); | 129 | categories.remove (KOPrefs::instance()->mCustomCategories[index]); |
124 | else | 130 | else |
125 | categories.insert (categories.end(), KOPrefs::instance()->mCustomCategories[index]); | 131 | categories.insert (categories.end(), KOPrefs::instance()->mCustomCategories[index]); |
126 | categories.sort (); | 132 | categories.sort (); |
127 | if ( !colcat.isEmpty() ) { | 133 | if ( !colcat.isEmpty() ) { |
128 | if ( categories.find ( colcat ) != categories.end () ) { | 134 | if ( categories.find ( colcat ) != categories.end () ) { |
129 | categories.remove( colcat ); | 135 | categories.remove( colcat ); |
130 | categories.prepend( colcat ); | 136 | categories.prepend( colcat ); |
131 | } | 137 | } |
132 | } | 138 | } |
133 | mCurrentIncidence->setCategories( categories ); | 139 | mCurrentIncidence->setCategories( categories ); |
134 | emit categoryChanged( mCurrentIncidence ); | 140 | emit categoryChanged( mCurrentIncidence ); |
135 | } | 141 | } |
136 | void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) | 142 | void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) |
137 | { | 143 | { |
138 | if ( !incidence) return; | 144 | if ( !incidence) return; |
139 | mCurrentIncidence = incidence; | 145 | mCurrentIncidence = incidence; |
140 | 146 | ||
141 | if (mCurrentIncidence) { | 147 | if (mCurrentIncidence) { |
142 | // Enable/Disabled menu items only valid for editable events. | 148 | // Enable/Disabled menu items only valid for editable events. |
143 | if ( !isDisabled ) { | 149 | if ( !isDisabled ) { |
144 | QValueList<int>::Iterator it; | 150 | QValueList<int>::Iterator it; |
145 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { | 151 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { |
146 | setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); | 152 | setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); |
147 | } | 153 | } |
148 | } | 154 | } |
149 | popup(QCursor::pos()); | 155 | popup(QCursor::pos()); |
150 | } | 156 | } |
151 | } | 157 | } |
152 | 158 | ||
153 | void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, | 159 | void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, |
154 | const QObject *receiver, const char *member, | 160 | const QObject *receiver, const char *member, |
155 | bool editOnly) | 161 | bool editOnly) |
156 | { | 162 | { |
157 | if (!mHasAdditionalItems) { | 163 | if (!mHasAdditionalItems) { |
158 | mHasAdditionalItems = true; | 164 | mHasAdditionalItems = true; |
159 | insertSeparator(); | 165 | insertSeparator(); |
160 | } | 166 | } |
161 | int id = insertItem(icon,text,receiver,member); | 167 | int id = insertItem(icon,text,receiver,member); |
162 | if (editOnly) mEditOnlyItems.append(id); | 168 | if (editOnly) mEditOnlyItems.append(id); |
163 | } | 169 | } |
164 | 170 | ||
165 | void KOEventPopupMenu::popupShow() | 171 | void KOEventPopupMenu::popupShow() |
166 | { | 172 | { |
167 | if (mCurrentIncidence) emit showIncidenceSignal(mCurrentIncidence); | 173 | if (mCurrentIncidence) emit showIncidenceSignal(mCurrentIncidence); |
168 | } | 174 | } |
169 | 175 | ||
170 | void KOEventPopupMenu::popupEdit() | 176 | void KOEventPopupMenu::popupEdit() |
171 | { | 177 | { |
172 | if (mCurrentIncidence) emit editIncidenceSignal(mCurrentIncidence); | 178 | if (mCurrentIncidence) emit editIncidenceSignal(mCurrentIncidence); |
173 | } | 179 | } |
174 | 180 | ||
175 | void KOEventPopupMenu::popupDelete() | 181 | void KOEventPopupMenu::popupDelete() |
176 | { | 182 | { |
177 | if (mCurrentIncidence) emit deleteIncidenceSignal(mCurrentIncidence); | 183 | if (mCurrentIncidence) emit deleteIncidenceSignal(mCurrentIncidence); |
178 | } | 184 | } |
179 | void KOEventPopupMenu::popupClone() | 185 | void KOEventPopupMenu::popupClone() |
180 | { | 186 | { |
181 | if (mCurrentIncidence) emit cloneIncidenceSignal(mCurrentIncidence); | 187 | if (mCurrentIncidence) emit cloneIncidenceSignal(mCurrentIncidence); |
182 | } | 188 | } |
183 | void KOEventPopupMenu::popupCancel() | 189 | void KOEventPopupMenu::popupCancel() |
184 | { | 190 | { |
185 | if (mCurrentIncidence) emit cancelIncidenceSignal(mCurrentIncidence); | 191 | if (mCurrentIncidence) emit cancelIncidenceSignal(mCurrentIncidence); |
186 | } | 192 | } |
187 | void KOEventPopupMenu::popupMove() | 193 | void KOEventPopupMenu::popupMove() |
188 | { | 194 | { |
189 | if (mCurrentIncidence) emit moveIncidenceSignal(mCurrentIncidence); | 195 | if (mCurrentIncidence) emit moveIncidenceSignal(mCurrentIncidence); |
190 | } | 196 | } |
191 | 197 | ||
192 | void KOEventPopupMenu::popupBeam() | 198 | void KOEventPopupMenu::popupBeam() |
193 | { | 199 | { |
194 | if (mCurrentIncidence) emit beamIncidenceSignal(mCurrentIncidence); | 200 | if (mCurrentIncidence) emit beamIncidenceSignal(mCurrentIncidence); |
195 | } | 201 | } |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index cec0476..25e599d 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -131,413 +131,413 @@ bool ListItemVisitor::visit(Event *e) | |||
131 | mItem->setText(5,e->alarms().first()->offsetText() ); | 131 | mItem->setText(5,e->alarms().first()->offsetText() ); |
132 | } else { | 132 | } else { |
133 | mItem->setText(5, i18n("No")); | 133 | mItem->setText(5, i18n("No")); |
134 | } | 134 | } |
135 | mItem->setText(6, e->recurrence()->recurrenceText()); | 135 | mItem->setText(6, e->recurrence()->recurrenceText()); |
136 | if( ! e->doesRecur() ) | 136 | if( ! e->doesRecur() ) |
137 | mItem->setSortKey( 6, "-" ); | 137 | mItem->setSortKey( 6, "-" ); |
138 | mItem->setText(7,"---"); | 138 | mItem->setText(7,"---"); |
139 | mItem->setText(8,"---"); | 139 | mItem->setText(8,"---"); |
140 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); | 140 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); |
141 | mItem->setText(10,e->categoriesStr()); | 141 | mItem->setText(10,e->categoriesStr()); |
142 | mItem->setText(11, KOPrefs::instance()->calName( e->calID() )); | 142 | mItem->setText(11, KOPrefs::instance()->calName( e->calID() )); |
143 | mItem->setText(12, KGlobal::locale()->formatDateTime( e->lastModified(), true, true )); | 143 | mItem->setText(12, KGlobal::locale()->formatDateTime( e->lastModified(), true, true )); |
144 | 144 | ||
145 | QString key; | 145 | QString key; |
146 | QDate d = e->lastModified().date(); | 146 | QDate d = e->lastModified().date(); |
147 | QTime t = e->lastModified().time(); | 147 | QTime t = e->lastModified().time(); |
148 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); | 148 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); |
149 | mItem->setSortKey(12,key); | 149 | mItem->setSortKey(12,key); |
150 | t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); | 150 | t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); |
151 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); | 151 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); |
152 | mItem->setSortKey(1,key); | 152 | mItem->setSortKey(1,key); |
153 | 153 | ||
154 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); | 154 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); |
155 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); | 155 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); |
156 | mItem->setSortKey(3,key); | 156 | mItem->setSortKey(3,key); |
157 | return true; | 157 | return true; |
158 | } | 158 | } |
159 | 159 | ||
160 | bool ListItemVisitor::visit(Todo *t) | 160 | bool ListItemVisitor::visit(Todo *t) |
161 | { | 161 | { |
162 | mItem->setText(0,t->summary()); | 162 | mItem->setText(0,t->summary()); |
163 | if ( t->isCompleted() ) { | 163 | if ( t->isCompleted() ) { |
164 | mItem->setSortKey(0,"99"+ t->summary().left(10)); | 164 | mItem->setSortKey(0,"99"+ t->summary().left(10)); |
165 | } else | 165 | } else |
166 | mItem->setSortKey(0,QString::number( t->percentComplete() )+ t->summary().left(10)); | 166 | mItem->setSortKey(0,QString::number( t->percentComplete() )+ t->summary().left(10)); |
167 | mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); | 167 | mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); |
168 | if (t->hasStartDate()) { | 168 | if (t->hasStartDate()) { |
169 | mItem->setText(1,t->dtStartDateStr()); | 169 | mItem->setText(1,t->dtStartDateStr()); |
170 | if (t->doesFloat()) { | 170 | if (t->doesFloat()) { |
171 | mItem->setText(2,"---"); | 171 | mItem->setText(2,"---"); |
172 | } else { | 172 | } else { |
173 | mItem->setText(2,t->dtStartTimeStr()); | 173 | mItem->setText(2,t->dtStartTimeStr()); |
174 | } | 174 | } |
175 | } else { | 175 | } else { |
176 | mItem->setText(1,"---"); | 176 | mItem->setText(1,"---"); |
177 | mItem->setText(2,"---"); | 177 | mItem->setText(2,"---"); |
178 | } | 178 | } |
179 | mItem->setText(3,"---"); | 179 | mItem->setText(3,"---"); |
180 | mItem->setText(4,"---"); | 180 | mItem->setText(4,"---"); |
181 | if ( t->isAlarmEnabled() ) { | 181 | if ( t->isAlarmEnabled() ) { |
182 | mItem->setText(5,t->alarms().first()->offsetText() ); | 182 | mItem->setText(5,t->alarms().first()->offsetText() ); |
183 | } else { | 183 | } else { |
184 | mItem->setText(5, i18n("No")); | 184 | mItem->setText(5, i18n("No")); |
185 | } | 185 | } |
186 | mItem->setText(6, t->recurrence()->recurrenceText()); | 186 | mItem->setText(6, t->recurrence()->recurrenceText()); |
187 | if( ! t->doesRecur() ) | 187 | if( ! t->doesRecur() ) |
188 | mItem->setSortKey( 6, "-" ); | 188 | mItem->setSortKey( 6, "-" ); |
189 | if (t->hasDueDate()) { | 189 | if (t->hasDueDate()) { |
190 | mItem->setText(7,t->dtDueDateStr()); | 190 | mItem->setText(7,t->dtDueDateStr()); |
191 | if (t->doesFloat()) { | 191 | if (t->doesFloat()) { |
192 | mItem->setText(8,"---"); | 192 | mItem->setText(8,"---"); |
193 | } else { | 193 | } else { |
194 | mItem->setText(8,t->dtDueTimeStr()); | 194 | mItem->setText(8,t->dtDueTimeStr()); |
195 | } | 195 | } |
196 | } else { | 196 | } else { |
197 | mItem->setText(7,"---"); | 197 | mItem->setText(7,"---"); |
198 | mItem->setText(8,"---"); | 198 | mItem->setText(8,"---"); |
199 | } | 199 | } |
200 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); | 200 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); |
201 | mItem->setText(10,t->categoriesStr()); | 201 | mItem->setText(10,t->categoriesStr()); |
202 | mItem->setText(11, KOPrefs::instance()->calName( t->calID() )); | 202 | mItem->setText(11, KOPrefs::instance()->calName( t->calID() )); |
203 | mItem->setText(12, KGlobal::locale()->formatDateTime( t->lastModified(), true, true )); | 203 | mItem->setText(12, KGlobal::locale()->formatDateTime( t->lastModified(), true, true )); |
204 | QString key; | 204 | QString key; |
205 | QDate d = t->lastModified().date(); | 205 | QDate d = t->lastModified().date(); |
206 | QTime tm = t->lastModified().time(); | 206 | QTime tm = t->lastModified().time(); |
207 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); | 207 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); |
208 | mItem->setSortKey(12,key); | 208 | mItem->setSortKey(12,key); |
209 | if (t->hasDueDate()) { | 209 | if (t->hasDueDate()) { |
210 | d = t->dtDue().date(); | 210 | d = t->dtDue().date(); |
211 | tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); | 211 | tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); |
212 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 212 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
213 | mItem->setSortKey(7,key); | 213 | mItem->setSortKey(7,key); |
214 | } | 214 | } |
215 | if ( t->hasStartDate() ) { | 215 | if ( t->hasStartDate() ) { |
216 | d = t->dtStart().date(); | 216 | d = t->dtStart().date(); |
217 | tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); | 217 | tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); |
218 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 218 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
219 | mItem->setSortKey(1,key); | 219 | mItem->setSortKey(1,key); |
220 | } | 220 | } |
221 | return true; | 221 | return true; |
222 | } | 222 | } |
223 | 223 | ||
224 | bool ListItemVisitor::visit(Journal * j) | 224 | bool ListItemVisitor::visit(Journal * j) |
225 | { | 225 | { |
226 | 226 | ||
227 | QString des; | 227 | QString des; |
228 | if ( !j->summary().isEmpty() ) { | 228 | if ( !j->summary().isEmpty() ) { |
229 | des = j->summary(); | 229 | des = j->summary(); |
230 | } else { | 230 | } else { |
231 | des = j->description().left(30); | 231 | des = j->description().left(30); |
232 | des = des.simplifyWhiteSpace (); | 232 | des = des.simplifyWhiteSpace (); |
233 | des.replace (QRegExp ("\\n"),"" ); | 233 | des.replace (QRegExp ("\\n"),"" ); |
234 | des.replace (QRegExp ("\\r"),"" ); | 234 | des.replace (QRegExp ("\\r"),"" ); |
235 | } | 235 | } |
236 | mItem->setText(0,i18n("Journal: ")+des.left(25)); | 236 | mItem->setText(0,i18n("Journal: ")+des.left(25)); |
237 | mItem->setText(1,j->dtStartDateStr()); | 237 | mItem->setText(1,j->dtStartDateStr()); |
238 | mItem->setText(2,"---"); | 238 | mItem->setText(2,"---"); |
239 | mItem->setText(3,"---"); | 239 | mItem->setText(3,"---"); |
240 | mItem->setText(4,"---"); | 240 | mItem->setText(4,"---"); |
241 | mItem->setText(5,"---"); | 241 | mItem->setText(5,"---"); |
242 | mItem->setText(6,"---"); | 242 | mItem->setText(6,"---"); |
243 | mItem->setText(7,j->dtStartDateStr()); | 243 | mItem->setText(7,j->dtStartDateStr()); |
244 | mItem->setText(8,"---"); | 244 | mItem->setText(8,"---"); |
245 | mItem->setText(9,"---"); | 245 | mItem->setText(9,"---"); |
246 | mItem->setText(10,j->categoriesStr()); | 246 | mItem->setText(10,j->categoriesStr()); |
247 | mItem->setText(11, KOPrefs::instance()->calName( j->calID() )); | 247 | mItem->setText(11, KOPrefs::instance()->calName( j->calID() )); |
248 | mItem->setText(12, KGlobal::locale()->formatDateTime( j->lastModified(), true, true )); | 248 | mItem->setText(12, KGlobal::locale()->formatDateTime( j->lastModified(), true, true )); |
249 | 249 | ||
250 | QString key; | 250 | QString key; |
251 | QDate d = j->lastModified().date(); | 251 | QDate d = j->lastModified().date(); |
252 | QTime tm = j->lastModified().time(); | 252 | QTime tm = j->lastModified().time(); |
253 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); | 253 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); |
254 | mItem->setSortKey(12,key); | 254 | mItem->setSortKey(12,key); |
255 | d = j->dtStart().date(); | 255 | d = j->dtStart().date(); |
256 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 256 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
257 | mItem->setSortKey(1,key); | 257 | mItem->setSortKey(1,key); |
258 | mItem->setSortKey(7,key); | 258 | mItem->setSortKey(7,key); |
259 | 259 | ||
260 | return true; | 260 | return true; |
261 | } | 261 | } |
262 | 262 | ||
263 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 263 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
264 | const char *name) | 264 | const char *name) |
265 | : KOEventView(calendar, parent, name) | 265 | : KOEventView(calendar, parent, name) |
266 | { | 266 | { |
267 | 267 | ||
268 | mActiveItem = 0; | 268 | mActiveItem = 0; |
269 | mForceShowCompletedTodos = false; | 269 | mForceShowCompletedTodos = false; |
270 | mListView = new KOListViewListView(this); | 270 | mListView = new KOListViewListView(this); |
271 | mListView->addColumn(i18n("Summary")); | 271 | mListView->addColumn(i18n("Summary")); |
272 | mListView->addColumn(i18n("Start Date")); | 272 | mListView->addColumn(i18n("Start Date")); |
273 | mListView->addColumn(i18n("Start Time")); | 273 | mListView->addColumn(i18n("Start Time")); |
274 | mListView->addColumn(i18n("End Date")); | 274 | mListView->addColumn(i18n("End Date")); |
275 | mListView->addColumn(i18n("End Time")); | 275 | mListView->addColumn(i18n("End Time")); |
276 | mListView->addColumn(i18n("Alarm")); // alarm set? | 276 | mListView->addColumn(i18n("Alarm")); // alarm set? |
277 | mListView->addColumn(i18n("Recurs")); // recurs? | 277 | mListView->addColumn(i18n("Recurs")); // recurs? |
278 | mListView->addColumn(i18n("Due Date")); | 278 | mListView->addColumn(i18n("Due Date")); |
279 | mListView->addColumn(i18n("Due Time")); | 279 | mListView->addColumn(i18n("Due Time")); |
280 | mListView->addColumn(i18n("Cancelled")); | 280 | mListView->addColumn(i18n("Cancelled")); |
281 | mListView->addColumn(i18n("Categories")); | 281 | mListView->addColumn(i18n("Categories")); |
282 | mListView->addColumn(i18n("Calendar")); | 282 | mListView->addColumn(i18n("Calendar")); |
283 | mListView->addColumn(i18n("Last Modified")); | 283 | mListView->addColumn(i18n("Last Modified")); |
284 | 284 | ||
285 | mListView->setColumnAlignment(0,AlignLeft); | 285 | mListView->setColumnAlignment(0,AlignLeft); |
286 | mListView->setColumnAlignment(1,AlignLeft); | 286 | mListView->setColumnAlignment(1,AlignLeft); |
287 | mListView->setColumnAlignment(2,AlignHCenter); | 287 | mListView->setColumnAlignment(2,AlignHCenter); |
288 | mListView->setColumnAlignment(3,AlignLeft); | 288 | mListView->setColumnAlignment(3,AlignLeft); |
289 | mListView->setColumnAlignment(4,AlignHCenter); | 289 | mListView->setColumnAlignment(4,AlignHCenter); |
290 | mListView->setColumnAlignment(5,AlignLeft); | 290 | mListView->setColumnAlignment(5,AlignLeft); |
291 | mListView->setColumnAlignment(6,AlignLeft); | 291 | mListView->setColumnAlignment(6,AlignLeft); |
292 | mListView->setColumnAlignment(7,AlignLeft); | 292 | mListView->setColumnAlignment(7,AlignLeft); |
293 | mListView->setColumnAlignment(8,AlignLeft); | 293 | mListView->setColumnAlignment(8,AlignLeft); |
294 | mListView->setColumnAlignment(9,AlignLeft); | 294 | mListView->setColumnAlignment(9,AlignLeft); |
295 | mListView->setColumnAlignment(10,AlignLeft); | 295 | mListView->setColumnAlignment(10,AlignLeft); |
296 | mListView->setColumnAlignment(11,AlignLeft); | 296 | mListView->setColumnAlignment(11,AlignLeft); |
297 | mListView->setColumnAlignment(12,AlignLeft); | 297 | mListView->setColumnAlignment(12,AlignLeft); |
298 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); | 298 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); |
299 | 299 | ||
300 | int iii = 0; | 300 | int iii = 0; |
301 | for ( iii = 0; iii< 13 ; ++iii ) | 301 | for ( iii = 0; iii< 13 ; ++iii ) |
302 | mListView->setColumnWidthMode( iii, QListView::Manual ); | 302 | mListView->setColumnWidthMode( iii, QListView::Manual ); |
303 | 303 | ||
304 | QBoxLayout *layoutTop = new QVBoxLayout(this); | 304 | QBoxLayout *layoutTop = new QVBoxLayout(this); |
305 | layoutTop->addWidget(mListView); | 305 | layoutTop->addWidget(mListView); |
306 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 306 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
307 | mPopupMenu = eventPopup(); | 307 | mPopupMenu = eventPopup(); |
308 | QPopupMenu* selPopup = new QPopupMenu ( this ); | 308 | QPopupMenu* selPopup = new QPopupMenu ( this ); |
309 | mPopupMenu->insertSeparator(); | 309 | mPopupMenu->insertSeparator(); |
310 | 310 | ||
311 | selPopup->insertItem(i18n("All"),this, | 311 | selPopup->insertItem(i18n("All"),this, |
312 | SLOT(allSelection())); | 312 | SLOT(allSelection())); |
313 | selPopup->insertItem(i18n("None"),this, | 313 | selPopup->insertItem(i18n("None"),this, |
314 | SLOT(clearSelection())); | 314 | SLOT(clearSelection())); |
315 | selPopup->insertItem(i18n("Delete selected..."),this, | 315 | selPopup->insertItem(i18n("Delete selected..."),this, |
316 | SLOT(deleteAll())); | 316 | SLOT(deleteAll())); |
317 | mPopupMenu->insertItem(i18n("Selection"), selPopup ); | 317 | mPopupMenu->insertItem(i18n("Selection"), selPopup ); |
318 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 318 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
319 | i18n("Hide all selected"),this, | 319 | i18n("Hide all selected"),this, |
320 | SLOT(hideAll()),true); | 320 | SLOT(hideAll()),true); |
321 | 321 | ||
322 | selPopup->insertSeparator(); | 322 | selPopup->insertSeparator(); |
323 | QPopupMenu * exportPO = new QPopupMenu ( this ); | ||
324 | selPopup->insertItem( i18n("Export"), exportPO ); | ||
323 | #ifdef DESKTOP_VERSION | 325 | #ifdef DESKTOP_VERSION |
324 | mPopupMenu->insertSeparator(); | 326 | mPopupMenu->insertSeparator(); |
325 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 327 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
326 | i18n("Print complete list"),this, | 328 | i18n("Print complete list..."),this, |
327 | SLOT(printList()),true); | 329 | SLOT(printList()),true); |
328 | #endif | 330 | #endif |
329 | mCalPopup = new QPopupMenu ( this ); | 331 | mCalPopup = new QPopupMenu ( this ); |
330 | selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); | 332 | selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); |
331 | 333 | ||
332 | selPopup->insertItem(i18n("Set categories")+"...",this, | 334 | selPopup->insertItem(i18n("Set categories")+"...",this, |
333 | SLOT(setCat()) ); | 335 | SLOT(setCat()) ); |
334 | selPopup->insertItem( i18n("Set alarm..."),this, | 336 | selPopup->insertItem( i18n("Set alarm..."),this, |
335 | SLOT(setAlarm())); | 337 | SLOT(setAlarm())); |
336 | #if 0 | 338 | #if 0 |
337 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 339 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
338 | i18n("Set categories")+"...",this, | 340 | i18n("Set categories")+"...",this, |
339 | SLOT(setCat()),true); | 341 | SLOT(setCat()),true); |
340 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 342 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
341 | i18n("Set alarm..."),this, | 343 | i18n("Set alarm..."),this, |
342 | SLOT(setAlarm()),true); | 344 | SLOT(setAlarm()),true); |
343 | #endif | 345 | #endif |
344 | QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, | 346 | QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, |
345 | SLOT( populateCalPopup() )); | 347 | SLOT( populateCalPopup() )); |
346 | QObject::connect(mCalPopup,SIGNAL(activated( int )),this, | 348 | QObject::connect(mCalPopup,SIGNAL(activated( int )),this, |
347 | SLOT( setCalendar( int ) )); | 349 | SLOT( setCalendar( int ) )); |
348 | QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, | 350 | QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, |
349 | SLOT( catChanged( Incidence * ) )); | 351 | SLOT( catChanged( Incidence * ) )); |
350 | QPopupMenu * exportPO = new QPopupMenu ( this ); | ||
351 | selPopup->insertItem( i18n("Export"), exportPO ); | ||
352 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, | 352 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, |
353 | SLOT(saveToFile())); | 353 | SLOT(saveToFile())); |
354 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, | 354 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, |
355 | SLOT(saveToFileVCS())); | 355 | SLOT(saveToFileVCS())); |
356 | exportPO->insertItem( i18n("Journal/Details..."),this, | 356 | exportPO->insertItem( i18n("Journal/Details..."),this, |
357 | SLOT(saveDescriptionToFile())); | 357 | SLOT(saveDescriptionToFile())); |
358 | // mPopupMenu->insertSeparator(); | 358 | // mPopupMenu->insertSeparator(); |
359 | // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 359 | // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
360 | // i18n("Add Categ. to selected..."),this, | 360 | // i18n("Add Categ. to selected..."),this, |
361 | // SLOT(addCat()),true); | 361 | // SLOT(addCat()),true); |
362 | //mPopupMenu->insertSeparator(); | 362 | //mPopupMenu->insertSeparator(); |
363 | #ifndef DESKTOP_VERSION | 363 | #ifndef DESKTOP_VERSION |
364 | selPopup->insertSeparator(); | 364 | selPopup->insertSeparator(); |
365 | selPopup->insertItem( i18n("Beam via IR..."),this, | 365 | selPopup->insertItem( i18n("Beam via IR..."),this, |
366 | SLOT(beamSelected())); | 366 | SLOT(beamSelected())); |
367 | #if 0 | 367 | #if 0 |
368 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 368 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
369 | i18n("Beam via IR"),this, | 369 | i18n("Beam via IR"),this, |
370 | SLOT(beamSelected()),true); | 370 | SLOT(beamSelected()),true); |
371 | #endif | 371 | #endif |
372 | #endif | 372 | #endif |
373 | /* | 373 | /* |
374 | mPopupMenu = new QPopupMenu; | 374 | mPopupMenu = new QPopupMenu; |
375 | mPopupMenu->insertItem(i18n("Edit Event"), this, | 375 | mPopupMenu->insertItem(i18n("Edit Event"), this, |
376 | SLOT (editEvent())); | 376 | SLOT (editEvent())); |
377 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, | 377 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, |
378 | SLOT (deleteEvent())); | 378 | SLOT (deleteEvent())); |
379 | mPopupMenu->insertSeparator(); | 379 | mPopupMenu->insertSeparator(); |
380 | mPopupMenu->insertItem(i18n("Show Dates"), this, | 380 | mPopupMenu->insertItem(i18n("Show Dates"), this, |
381 | SLOT(showDates())); | 381 | SLOT(showDates())); |
382 | mPopupMenu->insertItem(i18n("Hide Dates"), this, | 382 | mPopupMenu->insertItem(i18n("Hide Dates"), this, |
383 | SLOT(hideDates())); | 383 | SLOT(hideDates())); |
384 | */ | 384 | */ |
385 | QObject::connect(mListView,SIGNAL( newEvent()), | 385 | QObject::connect(mListView,SIGNAL( newEvent()), |
386 | this,SIGNAL(signalNewEvent())); | 386 | this,SIGNAL(signalNewEvent())); |
387 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), | 387 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), |
388 | this,SLOT(defaultItemAction(QListViewItem *))); | 388 | this,SLOT(defaultItemAction(QListViewItem *))); |
389 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, | 389 | QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, |
390 | const QPoint &, int )), | 390 | const QPoint &, int )), |
391 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); | 391 | this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); |
392 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), | 392 | QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), |
393 | SLOT(processSelectionChange(QListViewItem *))); | 393 | SLOT(processSelectionChange(QListViewItem *))); |
394 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), | 394 | QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), |
395 | SIGNAL(showIncidenceSignal(Incidence *)) ); | 395 | SIGNAL(showIncidenceSignal(Incidence *)) ); |
396 | 396 | ||
397 | readSettings(KOGlobals::config(),"KOListView Layout"); | 397 | readSettings(KOGlobals::config(),"KOListView Layout"); |
398 | } | 398 | } |
399 | 399 | ||
400 | KOListView::~KOListView() | 400 | KOListView::~KOListView() |
401 | { | 401 | { |
402 | delete mPopupMenu; | 402 | delete mPopupMenu; |
403 | #if QT_VERSION >= 0x030000 | 403 | #if QT_VERSION >= 0x030000 |
404 | 404 | ||
405 | #else | 405 | #else |
406 | delete mKOListViewWhatsThis; | 406 | delete mKOListViewWhatsThis; |
407 | #endif | 407 | #endif |
408 | } | 408 | } |
409 | 409 | ||
410 | void KOListView::catChanged( Incidence* inc) | 410 | void KOListView::catChanged( Incidence* inc) |
411 | { | 411 | { |
412 | KOListViewItem* item = getItemForEvent(inc); | 412 | KOListViewItem* item = getItemForEvent(inc); |
413 | if (item) { | 413 | if (item) { |
414 | ListItemVisitor v(item, mStartDate ); | 414 | ListItemVisitor v(item, mStartDate ); |
415 | inc->accept(v); | 415 | inc->accept(v); |
416 | } | 416 | } |
417 | } | 417 | } |
418 | QString KOListView::getWhatsThisText(QPoint p) | 418 | QString KOListView::getWhatsThisText(QPoint p) |
419 | { | 419 | { |
420 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); | 420 | KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); |
421 | if ( item ) | 421 | if ( item ) |
422 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), | 422 | return KIncidenceFormatter::instance()->getFormattedText( item->data(), |
423 | KOPrefs::instance()->mWTshowDetails, | 423 | KOPrefs::instance()->mWTshowDetails, |
424 | KOPrefs::instance()->mWTshowCreated, | 424 | KOPrefs::instance()->mWTshowCreated, |
425 | KOPrefs::instance()->mWTshowChanged); | 425 | KOPrefs::instance()->mWTshowChanged); |
426 | return i18n("That is the list view" ); | 426 | return i18n("That is the list view" ); |
427 | 427 | ||
428 | } | 428 | } |
429 | 429 | ||
430 | void KOListView::setCalendar( int c ) | 430 | void KOListView::setCalendar( int c ) |
431 | { | 431 | { |
432 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), | 432 | int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), |
433 | i18n("This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!").arg( KOPrefs::instance()->calName( c ) ), | 433 | i18n("This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!").arg( KOPrefs::instance()->calName( c ) ), |
434 | i18n("Continue"), i18n("Cancel"), 0, | 434 | i18n("Continue"), i18n("Cancel"), 0, |
435 | 0, 1 ); | 435 | 0, 1 ); |
436 | if ( result != 0 ) { | 436 | if ( result != 0 ) { |
437 | return; | 437 | return; |
438 | } | 438 | } |
439 | 439 | ||
440 | QPtrList<Incidence> delSel = getSelectedIncidences() ; | 440 | QPtrList<Incidence> delSel = getSelectedIncidences() ; |
441 | int icount = delSel.count(); | 441 | int icount = delSel.count(); |
442 | if ( icount ) { | 442 | if ( icount ) { |
443 | Incidence *incidence = delSel.first(); | 443 | Incidence *incidence = delSel.first(); |
444 | while ( incidence ) { | 444 | while ( incidence ) { |
445 | incidence->setCalID( c ); | 445 | incidence->setCalID( c ); |
446 | KOListViewItem * item = getItemForEvent( incidence ); | 446 | KOListViewItem * item = getItemForEvent( incidence ); |
447 | if ( item ) { | 447 | if ( item ) { |
448 | ListItemVisitor v(item, mStartDate ); | 448 | ListItemVisitor v(item, mStartDate ); |
449 | incidence->accept(v); | 449 | incidence->accept(v); |
450 | } | 450 | } |
451 | incidence = delSel.next(); | 451 | incidence = delSel.next(); |
452 | } | 452 | } |
453 | } | 453 | } |
454 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 454 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
455 | KopiCalendarFile * cal = calendars.first(); | 455 | KopiCalendarFile * cal = calendars.first(); |
456 | while ( cal ) { | 456 | while ( cal ) { |
457 | mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); | 457 | mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); |
458 | mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); | 458 | mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); |
459 | mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); | 459 | mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); |
460 | if ( cal->isStandard ) | 460 | if ( cal->isStandard ) |
461 | mCalendar->setDefaultCalendar( cal->mCalNumber ); | 461 | mCalendar->setDefaultCalendar( cal->mCalNumber ); |
462 | cal = calendars.next(); | 462 | cal = calendars.next(); |
463 | } | 463 | } |
464 | mCalendar->setSyncEventsReadOnly(); | 464 | mCalendar->setSyncEventsReadOnly(); |
465 | mCalendar->reInitAlarmSettings(); | 465 | mCalendar->reInitAlarmSettings(); |
466 | 466 | ||
467 | } | 467 | } |
468 | void KOListView::populateCalPopup() | 468 | void KOListView::populateCalPopup() |
469 | { | 469 | { |
470 | mCalPopup->clear(); | 470 | mCalPopup->clear(); |
471 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 471 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
472 | while ( kkf ) { | 472 | while ( kkf ) { |
473 | int index = mCalPopup->insertItem( kkf->mName+"...", kkf->mCalNumber); | 473 | int index = mCalPopup->insertItem( kkf->mName+"...", kkf->mCalNumber); |
474 | if ( kkf->mErrorOnLoad || kkf->isReadOnly ) | 474 | if ( kkf->mErrorOnLoad || kkf->isReadOnly ) |
475 | mCalPopup->setItemEnabled( index, false ); | 475 | mCalPopup->setItemEnabled( index, false ); |
476 | kkf = KOPrefs::instance()->mCalendars.next(); | 476 | kkf = KOPrefs::instance()->mCalendars.next(); |
477 | } | 477 | } |
478 | } | 478 | } |
479 | void KOListView::updateList() | 479 | void KOListView::updateList() |
480 | { | 480 | { |
481 | // qDebug(" KOListView::updateList() "); | 481 | // qDebug(" KOListView::updateList() "); |
482 | 482 | ||
483 | } | 483 | } |
484 | 484 | ||
485 | void KOListView::clearList() | 485 | void KOListView::clearList() |
486 | { | 486 | { |
487 | clear (); | 487 | clear (); |
488 | } | 488 | } |
489 | 489 | ||
490 | void KOListView::setCat() | 490 | void KOListView::setCat() |
491 | { | 491 | { |
492 | 492 | ||
493 | bool set = true; | 493 | bool set = true; |
494 | int result = KMessageBox::warningYesNoCancel(this, | 494 | int result = KMessageBox::warningYesNoCancel(this, |
495 | i18n("Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?"), | 495 | i18n("Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?"), |
496 | i18n("Set categories"), | 496 | i18n("Set categories"), |
497 | i18n("Add"), | 497 | i18n("Add"), |
498 | i18n("Reset")); | 498 | i18n("Reset")); |
499 | if (result == KMessageBox::Cancel) return; | 499 | if (result == KMessageBox::Cancel) return; |
500 | if (result == KMessageBox::Yes) set = false; | 500 | if (result == KMessageBox::Yes) set = false; |
501 | setCategories( set ); | 501 | setCategories( set ); |
502 | } | 502 | } |
503 | 503 | ||
504 | void KOListView::setAlarm() | 504 | void KOListView::setAlarm() |
505 | { | 505 | { |
506 | KOAlarmPrefs kap( this); | 506 | KOAlarmPrefs kap( this); |
507 | if ( !kap.exec() ) | 507 | if ( !kap.exec() ) |
508 | return; | 508 | return; |
509 | QPtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos | 509 | QPtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos |
510 | Incidence* inc = delSel.first(); | 510 | Incidence* inc = delSel.first(); |
511 | int count = 0; | 511 | int count = 0; |
512 | while ( inc ) { | 512 | while ( inc ) { |
513 | ++count; | 513 | ++count; |
514 | if (kap.mAlarmButton->isChecked()) { | 514 | if (kap.mAlarmButton->isChecked()) { |
515 | if (inc->alarms().count() == 0) | 515 | if (inc->alarms().count() == 0) |
516 | inc->newAlarm(); | 516 | inc->newAlarm(); |
517 | QPtrList<Alarm> alarms = inc->alarms(); | 517 | QPtrList<Alarm> alarms = inc->alarms(); |
518 | Alarm *alarm; | 518 | Alarm *alarm; |
519 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { | 519 | for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { |
520 | alarm->setEnabled(true); | 520 | alarm->setEnabled(true); |
521 | int j = kap.mAlarmTimeEdit->value()* -60; | 521 | int j = kap.mAlarmTimeEdit->value()* -60; |
522 | if (kap.mAlarmIncrCombo->currentItem() == 1) | 522 | if (kap.mAlarmIncrCombo->currentItem() == 1) |
523 | j = j * 60; | 523 | j = j * 60; |
524 | else if (kap.mAlarmIncrCombo->currentItem() == 2) | 524 | else if (kap.mAlarmIncrCombo->currentItem() == 2) |
525 | j = j * (60 * 24); | 525 | j = j * (60 * 24); |
526 | alarm->setStartOffset( j ); | 526 | alarm->setStartOffset( j ); |
527 | 527 | ||
528 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { | 528 | if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { |
529 | alarm->setProcedureAlarm(kap.mAlarmProgram); | 529 | alarm->setProcedureAlarm(kap.mAlarmProgram); |
530 | } | 530 | } |
531 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) | 531 | else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) |
532 | alarm->setAudioAlarm(kap.mAlarmSound); | 532 | alarm->setAudioAlarm(kap.mAlarmSound); |
533 | else | 533 | else |
534 | alarm->setType(Alarm::Invalid); | 534 | alarm->setType(Alarm::Invalid); |
535 | //alarm->setAudioAlarm("default"); | 535 | //alarm->setAudioAlarm("default"); |
536 | // TODO: Deal with multiple alarms | 536 | // TODO: Deal with multiple alarms |
537 | break; // For now, stop after the first alarm | 537 | break; // For now, stop after the first alarm |
538 | } | 538 | } |
539 | } else { | 539 | } else { |
540 | Alarm* alarm = inc->alarms().first(); | 540 | Alarm* alarm = inc->alarms().first(); |
541 | if ( alarm ) { | 541 | if ( alarm ) { |
542 | alarm->setEnabled(false); | 542 | alarm->setEnabled(false); |
543 | alarm->setType(Alarm::Invalid); | 543 | alarm->setType(Alarm::Invalid); |
@@ -1123,324 +1123,323 @@ void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) | |||
1123 | /* | 1123 | /* |
1124 | if ( incidence && incidence->type() == "Event" ) { | 1124 | if ( incidence && incidence->type() == "Event" ) { |
1125 | Event *event = static_cast<Event *>( incidence ); | 1125 | Event *event = static_cast<Event *>( incidence ); |
1126 | mPopupMenu->showEventPopup(event); | 1126 | mPopupMenu->showEventPopup(event); |
1127 | } | 1127 | } |
1128 | */ | 1128 | */ |
1129 | } | 1129 | } |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | void KOListView::readSettings(KConfig *config, QString setting) | 1132 | void KOListView::readSettings(KConfig *config, QString setting) |
1133 | { | 1133 | { |
1134 | // qDebug("KOListView::readSettings "); | 1134 | // qDebug("KOListView::readSettings "); |
1135 | mListView->restoreLayout(config,setting); | 1135 | mListView->restoreLayout(config,setting); |
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | void KOListView::writeSettings(KConfig *config, QString setting) | 1138 | void KOListView::writeSettings(KConfig *config, QString setting) |
1139 | { | 1139 | { |
1140 | // qDebug("KOListView::writeSettings "); | 1140 | // qDebug("KOListView::writeSettings "); |
1141 | mListView->saveLayout(config, setting); | 1141 | mListView->saveLayout(config, setting); |
1142 | } | 1142 | } |
1143 | 1143 | ||
1144 | void KOListView::processSelectionChange(QListViewItem *) | 1144 | void KOListView::processSelectionChange(QListViewItem *) |
1145 | { | 1145 | { |
1146 | 1146 | ||
1147 | KOListViewItem *item = | 1147 | KOListViewItem *item = |
1148 | static_cast<KOListViewItem *>( mListView->currentItem() ); | 1148 | static_cast<KOListViewItem *>( mListView->currentItem() ); |
1149 | 1149 | ||
1150 | if ( !item ) { | 1150 | if ( !item ) { |
1151 | emit incidenceSelected( 0 ); | 1151 | emit incidenceSelected( 0 ); |
1152 | } else { | 1152 | } else { |
1153 | emit incidenceSelected( item->data() ); | 1153 | emit incidenceSelected( item->data() ); |
1154 | } | 1154 | } |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | void KOListView::clearSelection() | 1157 | void KOListView::clearSelection() |
1158 | { | 1158 | { |
1159 | mListView->selectAll( false ); | 1159 | mListView->selectAll( false ); |
1160 | } | 1160 | } |
1161 | void KOListView::allSelection() | 1161 | void KOListView::allSelection() |
1162 | { | 1162 | { |
1163 | mListView->selectAll( true ); | 1163 | mListView->selectAll( true ); |
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | void KOListView::clear() | 1166 | void KOListView::clear() |
1167 | { | 1167 | { |
1168 | mListView->clear(); | 1168 | mListView->clear(); |
1169 | mUidDict.clear(); | 1169 | mUidDict.clear(); |
1170 | } | 1170 | } |
1171 | 1171 | ||
1172 | Incidence* KOListView::currentItem() | 1172 | Incidence* KOListView::currentItem() |
1173 | { | 1173 | { |
1174 | if ( mListView->currentItem() ) | 1174 | if ( mListView->currentItem() ) |
1175 | return ((KOListViewItem*) mListView->currentItem())->data(); | 1175 | return ((KOListViewItem*) mListView->currentItem())->data(); |
1176 | return 0; | 1176 | return 0; |
1177 | } | 1177 | } |
1178 | void KOListView::keyPressEvent ( QKeyEvent *e) | 1178 | void KOListView::keyPressEvent ( QKeyEvent *e) |
1179 | { | 1179 | { |
1180 | 1180 | ||
1181 | if ( e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace ) { | 1181 | if ( e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace ) { |
1182 | deleteAll(); | 1182 | deleteAll(); |
1183 | return; | 1183 | return; |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | e->ignore(); | 1186 | e->ignore(); |
1187 | } | 1187 | } |
1188 | void KOListViewListView::keyPressEvent ( QKeyEvent *e) | 1188 | void KOListViewListView::keyPressEvent ( QKeyEvent *e) |
1189 | { | 1189 | { |
1190 | 1190 | ||
1191 | switch ( e->key() ) { | 1191 | switch ( e->key() ) { |
1192 | case Qt::Key_Down: | 1192 | case Qt::Key_Down: |
1193 | if ( e->state() == ShiftButton ) { | 1193 | if ( e->state() == ShiftButton ) { |
1194 | QListViewItem* cn = currentItem(); | 1194 | QListViewItem* cn = currentItem(); |
1195 | if ( !cn ) | 1195 | if ( !cn ) |
1196 | cn = firstChild(); | 1196 | cn = firstChild(); |
1197 | if ( !cn ) | 1197 | if ( !cn ) |
1198 | return; | 1198 | return; |
1199 | while ( cn->nextSibling() ) | 1199 | while ( cn->nextSibling() ) |
1200 | cn = cn->nextSibling(); | 1200 | cn = cn->nextSibling(); |
1201 | setCurrentItem ( cn ); | 1201 | setCurrentItem ( cn ); |
1202 | ensureItemVisible ( cn ); | 1202 | ensureItemVisible ( cn ); |
1203 | 1203 | ||
1204 | e->accept(); | 1204 | e->accept(); |
1205 | return; | 1205 | return; |
1206 | } | 1206 | } |
1207 | if ( e->state() == ControlButton ) { | 1207 | if ( e->state() == ControlButton ) { |
1208 | int count = childCount (); | 1208 | int count = childCount (); |
1209 | int jump = count / 5; | 1209 | int jump = count / 5; |
1210 | QListViewItem* cn; | 1210 | QListViewItem* cn; |
1211 | cn = currentItem(); | 1211 | cn = currentItem(); |
1212 | if ( ! cn ) | 1212 | if ( ! cn ) |
1213 | return; | 1213 | return; |
1214 | if ( jump == 0 ) | 1214 | if ( jump == 0 ) |
1215 | jump = 1; | 1215 | jump = 1; |
1216 | while ( jump && cn->nextSibling() ) { | 1216 | while ( jump && cn->nextSibling() ) { |
1217 | cn = cn->nextSibling(); | 1217 | cn = cn->nextSibling(); |
1218 | --jump; | 1218 | --jump; |
1219 | } | 1219 | } |
1220 | setCurrentItem ( cn ); | 1220 | setCurrentItem ( cn ); |
1221 | ensureItemVisible ( cn ); | 1221 | ensureItemVisible ( cn ); |
1222 | 1222 | ||
1223 | } else | 1223 | } else |
1224 | QListView::keyPressEvent ( e ) ; | 1224 | QListView::keyPressEvent ( e ) ; |
1225 | e->accept(); | 1225 | e->accept(); |
1226 | break; | 1226 | break; |
1227 | 1227 | ||
1228 | case Qt::Key_Up: | 1228 | case Qt::Key_Up: |
1229 | if ( e->state() == ShiftButton ) { | 1229 | if ( e->state() == ShiftButton ) { |
1230 | QListViewItem* cn = firstChild(); | 1230 | QListViewItem* cn = firstChild(); |
1231 | if ( cn ) { | 1231 | if ( cn ) { |
1232 | setCurrentItem ( cn ); | 1232 | setCurrentItem ( cn ); |
1233 | ensureItemVisible ( cn ); | 1233 | ensureItemVisible ( cn ); |
1234 | } | 1234 | } |
1235 | e->accept(); | 1235 | e->accept(); |
1236 | return; | 1236 | return; |
1237 | } | 1237 | } |
1238 | if ( e->state() == ControlButton ) { | 1238 | if ( e->state() == ControlButton ) { |
1239 | int count = childCount (); | 1239 | int count = childCount (); |
1240 | int jump = count / 5; | 1240 | int jump = count / 5; |
1241 | QListViewItem* cn; | 1241 | QListViewItem* cn; |
1242 | cn = currentItem(); | 1242 | cn = currentItem(); |
1243 | if ( ! cn ) | 1243 | if ( ! cn ) |
1244 | return; | 1244 | return; |
1245 | if ( jump == 0 ) | 1245 | if ( jump == 0 ) |
1246 | jump = 1; | 1246 | jump = 1; |
1247 | while ( jump && cn->itemAbove ()) { | 1247 | while ( jump && cn->itemAbove ()) { |
1248 | cn = cn->itemAbove (); | 1248 | cn = cn->itemAbove (); |
1249 | --jump; | 1249 | --jump; |
1250 | } | 1250 | } |
1251 | setCurrentItem ( cn ); | 1251 | setCurrentItem ( cn ); |
1252 | ensureItemVisible ( cn ); | 1252 | ensureItemVisible ( cn ); |
1253 | } else | 1253 | } else |
1254 | QListView::keyPressEvent ( e ) ; | 1254 | QListView::keyPressEvent ( e ) ; |
1255 | e->accept(); | 1255 | e->accept(); |
1256 | break; | 1256 | break; |
1257 | case Qt::Key_I: { | 1257 | case Qt::Key_I: { |
1258 | QListViewItem* cn; | 1258 | QListViewItem* cn; |
1259 | cn = currentItem(); | 1259 | cn = currentItem(); |
1260 | if ( cn ) { | 1260 | if ( cn ) { |
1261 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1261 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1262 | if ( ci ){ | 1262 | if ( ci ){ |
1263 | //emit showIncidence( ci->data()); | 1263 | //emit showIncidence( ci->data()); |
1264 | cn = cn->nextSibling(); | 1264 | cn = cn->nextSibling(); |
1265 | if ( cn ) { | 1265 | if ( cn ) { |
1266 | setCurrentItem ( cn ); | 1266 | setCurrentItem ( cn ); |
1267 | ensureItemVisible ( cn ); | 1267 | ensureItemVisible ( cn ); |
1268 | } | 1268 | } |
1269 | emit showIncidence( ci->data()); | 1269 | emit showIncidence( ci->data()); |
1270 | } | 1270 | } |
1271 | } | 1271 | } |
1272 | e->accept(); | 1272 | e->accept(); |
1273 | } | 1273 | } |
1274 | break; | 1274 | break; |
1275 | case Qt::Key_Return: | 1275 | case Qt::Key_Return: |
1276 | case Qt::Key_Enter: | 1276 | case Qt::Key_Enter: |
1277 | { | 1277 | { |
1278 | QListViewItem* cn; | 1278 | QListViewItem* cn; |
1279 | cn = currentItem(); | 1279 | cn = currentItem(); |
1280 | if ( cn ) { | 1280 | if ( cn ) { |
1281 | KOListViewItem* ci = (KOListViewItem*)( cn ); | 1281 | KOListViewItem* ci = (KOListViewItem*)( cn ); |
1282 | if ( ci ){ | 1282 | if ( ci ){ |
1283 | if ( e->state() == ShiftButton ) | 1283 | if ( e->state() == ShiftButton ) |
1284 | ci->setSelected( false ); | 1284 | ci->setSelected( false ); |
1285 | else | 1285 | else |
1286 | ci->setSelected( true ); | 1286 | ci->setSelected( true ); |
1287 | cn = cn->nextSibling(); | 1287 | cn = cn->nextSibling(); |
1288 | if ( cn ) { | 1288 | if ( cn ) { |
1289 | setCurrentItem ( cn ); | 1289 | setCurrentItem ( cn ); |
1290 | ensureItemVisible ( cn ); | 1290 | ensureItemVisible ( cn ); |
1291 | } | 1291 | } |
1292 | } | 1292 | } |
1293 | } | 1293 | } |
1294 | e->accept(); | 1294 | e->accept(); |
1295 | } | 1295 | } |
1296 | break; | 1296 | break; |
1297 | default: | 1297 | default: |
1298 | e->ignore(); | 1298 | e->ignore(); |
1299 | } | 1299 | } |
1300 | } | 1300 | } |
1301 | KOListViewListView::KOListViewListView(KOListView * lv ) | 1301 | KOListViewListView::KOListViewListView(KOListView * lv ) |
1302 | : KListView( lv, "kolistlistview", false ) | 1302 | : KListView( lv, "kolistlistview", false ) |
1303 | { | 1303 | { |
1304 | mYMousePos = 0; | 1304 | mYMousePos = 0; |
1305 | mPopupTimer = new QTimer(this); | 1305 | mPopupTimer = new QTimer(this); |
1306 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); | 1306 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); |
1307 | #ifndef DESKTOP_VERSION | 1307 | #ifndef DESKTOP_VERSION |
1308 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 1308 | //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
1309 | #endif | 1309 | #endif |
1310 | setSelectionMode( QListView::Multi ); | 1310 | setSelectionMode( QListView::Multi ); |
1311 | setMultiSelection( true); | 1311 | setMultiSelection( true); |
1312 | } | 1312 | } |
1313 | bool KOListViewListView::hasMultiSelection(QListViewItem* item) | 1313 | bool KOListViewListView::hasMultiSelection(QListViewItem* item) |
1314 | { | 1314 | { |
1315 | int selCount = 0; | ||
1316 | QListViewItem *qitem = firstChild (); | 1315 | QListViewItem *qitem = firstChild (); |
1317 | while ( qitem ) { | 1316 | while ( qitem ) { |
1318 | if ( qitem->isSelected() && item != qitem ) | 1317 | if ( qitem->isSelected() && item != qitem ) |
1319 | return true; | 1318 | return true; |
1320 | qitem = qitem->nextSibling(); | 1319 | qitem = qitem->nextSibling(); |
1321 | } | 1320 | } |
1322 | return false; | 1321 | return false; |
1323 | } | 1322 | } |
1324 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 1323 | void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
1325 | { | 1324 | { |
1326 | if (!e) return; | 1325 | if (!e) return; |
1327 | QPoint vp = contentsToViewport(e->pos()); | 1326 | QPoint vp = contentsToViewport(e->pos()); |
1328 | QListViewItem *item = itemAt(vp); | 1327 | QListViewItem *item = itemAt(vp); |
1329 | if (!item) { | 1328 | if (!item) { |
1330 | emit newEvent(); | 1329 | emit newEvent(); |
1331 | return; | 1330 | return; |
1332 | } | 1331 | } |
1333 | KListView::contentsMouseDoubleClickEvent(e); | 1332 | KListView::contentsMouseDoubleClickEvent(e); |
1334 | } | 1333 | } |
1335 | #if 0 | 1334 | #if 0 |
1336 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1335 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1337 | { | 1336 | { |
1338 | //qDebug("contentsMousePressEvent++++ "); | 1337 | //qDebug("contentsMousePressEvent++++ "); |
1339 | KListView::contentsMousePressEvent( e ); | 1338 | KListView::contentsMousePressEvent( e ); |
1340 | if ( e->button() == RightButton ) { | 1339 | if ( e->button() == RightButton ) { |
1341 | QListViewItem* ci = currentItem(); | 1340 | QListViewItem* ci = currentItem(); |
1342 | clearSelection () ; | 1341 | clearSelection () ; |
1343 | if ( ci ) | 1342 | if ( ci ) |
1344 | ci->setSelected( true ); | 1343 | ci->setSelected( true ); |
1345 | } | 1344 | } |
1346 | } | 1345 | } |
1347 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | 1346 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) |
1348 | { | 1347 | { |
1349 | KListView::contentsMouseReleaseEvent(e); | 1348 | KListView::contentsMouseReleaseEvent(e); |
1350 | } | 1349 | } |
1351 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | 1350 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) |
1352 | { | 1351 | { |
1353 | KListView::contentsMouseMoveEvent(e); | 1352 | KListView::contentsMouseMoveEvent(e); |
1354 | } | 1353 | } |
1355 | #endif | 1354 | #endif |
1356 | void KOListViewListView::popupMenu() | 1355 | void KOListViewListView::popupMenu() |
1357 | { | 1356 | { |
1358 | mPopupTimer->stop(); | 1357 | mPopupTimer->stop(); |
1359 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); | 1358 | QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); |
1360 | QApplication::postEvent( this->viewport(), e ); | 1359 | QApplication::postEvent( this->viewport(), e ); |
1361 | 1360 | ||
1362 | } | 1361 | } |
1363 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) | 1362 | void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) |
1364 | { | 1363 | { |
1365 | //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); | 1364 | //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); |
1366 | mYMousePos = mapToGlobal( (e->pos())).y(); | 1365 | mYMousePos = mapToGlobal( (e->pos())).y(); |
1367 | if ( e->button() == LeftButton ) { | 1366 | if ( e->button() == LeftButton ) { |
1368 | mPopupTimer->start( 600 ); | 1367 | mPopupTimer->start( 600 ); |
1369 | mEventPos = contentsToViewport(e->pos()); | 1368 | mEventPos = contentsToViewport(e->pos()); |
1370 | mEventGlobalPos = e->globalPos(); | 1369 | mEventGlobalPos = e->globalPos(); |
1371 | } | 1370 | } |
1372 | KListView::contentsMousePressEvent( e ); | 1371 | KListView::contentsMousePressEvent( e ); |
1373 | if ( e->button() == RightButton ) { | 1372 | if ( e->button() == RightButton ) { |
1374 | QListViewItem* ci = currentItem(); | 1373 | QListViewItem* ci = currentItem(); |
1375 | //clearSelection(); | 1374 | //clearSelection(); |
1376 | if ( ci ) | 1375 | if ( ci ) |
1377 | ci->setSelected( true ); | 1376 | ci->setSelected( true ); |
1378 | } | 1377 | } |
1379 | } | 1378 | } |
1380 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) | 1379 | void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) |
1381 | { | 1380 | { |
1382 | mPopupTimer->stop(); | 1381 | mPopupTimer->stop(); |
1383 | KListView::contentsMouseReleaseEvent(e); | 1382 | KListView::contentsMouseReleaseEvent(e); |
1384 | } | 1383 | } |
1385 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) | 1384 | void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) |
1386 | { | 1385 | { |
1387 | // qDebug("contentsMouseMoveEv....... "); | 1386 | // qDebug("contentsMouseMoveEv....... "); |
1388 | // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() ); | 1387 | // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() ); |
1389 | int diff = mYMousePos - mapToGlobal( (e->pos())).y(); | 1388 | int diff = mYMousePos - mapToGlobal( (e->pos())).y(); |
1390 | if ( diff < 0 ) diff = -diff; | 1389 | if ( diff < 0 ) diff = -diff; |
1391 | if ( diff > 15 ) | 1390 | if ( diff > 15 ) |
1392 | mPopupTimer->stop(); | 1391 | mPopupTimer->stop(); |
1393 | else { | 1392 | else { |
1394 | mEventPos = contentsToViewport(e->pos()); | 1393 | mEventPos = contentsToViewport(e->pos()); |
1395 | mEventGlobalPos = e->globalPos(); | 1394 | mEventGlobalPos = e->globalPos(); |
1396 | } | 1395 | } |
1397 | KListView::contentsMouseMoveEvent(e); | 1396 | KListView::contentsMouseMoveEvent(e); |
1398 | } | 1397 | } |
1399 | 1398 | ||
1400 | #define protected public | 1399 | #define protected public |
1401 | #include <qheader.h> | 1400 | #include <qheader.h> |
1402 | #undef protected | 1401 | #undef protected |
1403 | void KOListViewListView::printList() | 1402 | void KOListViewListView::printList() |
1404 | { | 1403 | { |
1405 | #ifdef DESKTOP_VERSION | 1404 | #ifdef DESKTOP_VERSION |
1406 | KOPrintPrefs pp ( this ); | 1405 | KOPrintPrefs pp ( this ); |
1407 | if (!pp.exec() ) | 1406 | if (!pp.exec() ) |
1408 | return; | 1407 | return; |
1409 | int scaleval = pp.printMode() ; | 1408 | int scaleval = pp.printMode() ; |
1410 | 1409 | ||
1411 | QPrinter printer; | 1410 | QPrinter printer; |
1412 | if (!printer.setup() ) | 1411 | if (!printer.setup() ) |
1413 | return; | 1412 | return; |
1414 | clearSelection (); | 1413 | clearSelection (); |
1415 | QPainter p; | 1414 | QPainter p; |
1416 | p.begin ( &printer ); | 1415 | p.begin ( &printer ); |
1417 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); | 1416 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); |
1418 | float dx, dy; | 1417 | float dx, dy; |
1419 | int wid = (m.width() * 9)/10; | 1418 | int wid = (m.width() * 9)/10; |
1420 | dx = (float) wid/(float)contentsWidth (); | 1419 | dx = (float) wid/(float)contentsWidth (); |
1421 | dy = (float)(m.height()) / (float)contentsHeight (); | 1420 | dy = (float)(m.height()) / (float)contentsHeight (); |
1422 | float scale; | 1421 | float scale; |
1423 | // scale to fit the width or height of the paper | 1422 | // scale to fit the width or height of the paper |
1424 | if ( dx < dy ) | 1423 | if ( dx < dy ) |
1425 | scale = dx; | 1424 | scale = dx; |
1426 | else | 1425 | else |
1427 | scale = dy; | 1426 | scale = dy; |
1428 | 1427 | ||
1429 | p.translate( m.width()/10,m.width()/10 ); | 1428 | p.translate( m.width()/10,m.width()/10 ); |
1430 | if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { | 1429 | if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { |
1431 | p.scale( scale, scale ); | 1430 | p.scale( scale, scale ); |
1432 | } | 1431 | } |
1433 | 1432 | ||
1434 | int cou = header()->count(); | 1433 | int cou = header()->count(); |
1435 | int iii; | 1434 | int iii; |
1436 | QRect rect ( 0,0,0, header()->height()); | 1435 | QRect rect ( 0,0,0, header()->height()); |
1437 | for ( iii = 0; iii < cou; ++iii ) { | 1436 | for ( iii = 0; iii < cou; ++iii ) { |
1438 | rect.setLeft ( header()->sectionPos( iii ) ); | 1437 | rect.setLeft ( header()->sectionPos( iii ) ); |
1439 | rect.setRight ( header()->sectionPos( iii ) + header()->sectionSize (iii)); | 1438 | rect.setRight ( header()->sectionPos( iii ) + header()->sectionSize (iii)); |
1440 | header()->paintSection ( & p, header()->mapToIndex (iii), rect ); | 1439 | header()->paintSection ( & p, header()->mapToIndex (iii), rect ); |
1441 | } | 1440 | } |
1442 | p.translate( 0, header()->height()); | 1441 | p.translate( 0, header()->height()); |
1443 | drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () ); | 1442 | drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () ); |
1444 | p.end(); | 1443 | p.end(); |
1445 | #endif | 1444 | #endif |
1446 | } | 1445 | } |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 792a7b8..ba3bc05 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -366,422 +366,419 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | |||
366 | } | 366 | } |
367 | 367 | ||
368 | void KOViewManager::clearAllViews() | 368 | void KOViewManager::clearAllViews() |
369 | { | 369 | { |
370 | 370 | ||
371 | if ( mTodoView ) mTodoView->clearList(); | 371 | if ( mTodoView ) mTodoView->clearList(); |
372 | if ( mListView ) mListView->clearList(); | 372 | if ( mListView ) mListView->clearList(); |
373 | 373 | ||
374 | if ( mAgendaView ) mAgendaView->clearList(); | 374 | if ( mAgendaView ) mAgendaView->clearList(); |
375 | if ( mMonthView ) mMonthView->clearList(); | 375 | if ( mMonthView ) mMonthView->clearList(); |
376 | if ( mWhatsNextView ) mWhatsNextView->clearList(); | 376 | if ( mWhatsNextView ) mWhatsNextView->clearList(); |
377 | if ( mJournalView ) mJournalView->clearList(); | 377 | if ( mJournalView ) mJournalView->clearList(); |
378 | 378 | ||
379 | } | 379 | } |
380 | void KOViewManager::updateView() | 380 | void KOViewManager::updateView() |
381 | { | 381 | { |
382 | // qDebug("KOViewManager::updateView() "); | 382 | // qDebug("KOViewManager::updateView() "); |
383 | // if we are updating mTodoView, we get endless recursion | 383 | // if we are updating mTodoView, we get endless recursion |
384 | if ( mTodoView == mCurrentView ) | 384 | if ( mTodoView == mCurrentView ) |
385 | return; | 385 | return; |
386 | if ( mCurrentView ) mCurrentView->updateView(); | 386 | if ( mCurrentView ) mCurrentView->updateView(); |
387 | 387 | ||
388 | } | 388 | } |
389 | 389 | ||
390 | void KOViewManager::updateView(const QDate &start, const QDate &end) | 390 | void KOViewManager::updateView(const QDate &start, const QDate &end) |
391 | { | 391 | { |
392 | // kdDebug() << "KOViewManager::updateView()" << endl; | 392 | // kdDebug() << "KOViewManager::updateView()" << endl; |
393 | 393 | ||
394 | if (mCurrentView) mCurrentView->showDates(start, end); | 394 | if (mCurrentView) mCurrentView->showDates(start, end); |
395 | 395 | ||
396 | if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); | 396 | if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); |
397 | } | 397 | } |
398 | 398 | ||
399 | 399 | ||
400 | void KOViewManager::updateWNview() | 400 | void KOViewManager::updateWNview() |
401 | { | 401 | { |
402 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) | 402 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) |
403 | mWhatsNextView->updateView(); | 403 | mWhatsNextView->updateView(); |
404 | if ( mCurrentView == mMonthView && mMonthView ) | 404 | if ( mCurrentView == mMonthView && mMonthView ) |
405 | mMonthView->updateView(); | 405 | mMonthView->updateView(); |
406 | 406 | ||
407 | } | 407 | } |
408 | void KOViewManager::showWhatsNextView() | 408 | void KOViewManager::showWhatsNextView() |
409 | { | 409 | { |
410 | if (!mWhatsNextView) { | 410 | if (!mWhatsNextView) { |
411 | mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), | 411 | mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), |
412 | "KOViewManager::WhatsNextView"); | 412 | "KOViewManager::WhatsNextView"); |
413 | mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); | 413 | mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); |
414 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); | 414 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); |
415 | addView(mWhatsNextView); | 415 | addView(mWhatsNextView); |
416 | connect(this, SIGNAL( printWNV() ), | 416 | connect(this, SIGNAL( printWNV() ), |
417 | mWhatsNextView, SLOT( printMe() ) ); | 417 | mWhatsNextView, SLOT( printMe() ) ); |
418 | } | 418 | } |
419 | globalFlagBlockAgenda = 1; | 419 | globalFlagBlockAgenda = 1; |
420 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; | 420 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; |
421 | showView(mWhatsNextView, true ); | 421 | showView(mWhatsNextView, true ); |
422 | //mWhatsNextView->updateView(); | 422 | //mWhatsNextView->updateView(); |
423 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; | 423 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; |
424 | } | 424 | } |
425 | 425 | ||
426 | void KOViewManager::slotprintWNV() | 426 | void KOViewManager::slotprintWNV() |
427 | { | 427 | { |
428 | if (!mWhatsNextView) | 428 | if (!mWhatsNextView) |
429 | showWhatsNextView(); | 429 | showWhatsNextView(); |
430 | emit printWNV(); | 430 | emit printWNV(); |
431 | 431 | ||
432 | } | 432 | } |
433 | void KOViewManager::showListView() | 433 | void KOViewManager::showListView() |
434 | { | 434 | { |
435 | if (!mListView) { | 435 | if (!mListView) { |
436 | mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); | 436 | mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); |
437 | addView(mListView); | 437 | addView(mListView); |
438 | 438 | ||
439 | connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), | 439 | connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), |
440 | mMainView, SLOT(showIncidence(Incidence *))); | 440 | mMainView, SLOT(showIncidence(Incidence *))); |
441 | connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), | 441 | connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), |
442 | mMainView, SLOT(editIncidence(Incidence *))); | 442 | mMainView, SLOT(editIncidence(Incidence *))); |
443 | connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 443 | connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
444 | mMainView, SLOT(deleteIncidence(Incidence *))); | 444 | mMainView, SLOT(deleteIncidence(Incidence *))); |
445 | connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), | 445 | connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), |
446 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 446 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
447 | connect( mListView, SIGNAL( signalNewEvent() ), | 447 | connect( mListView, SIGNAL( signalNewEvent() ), |
448 | mMainView, SLOT( newEvent() ) ); | 448 | mMainView, SLOT( newEvent() ) ); |
449 | connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); | 449 | connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); |
450 | connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), | 450 | connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), |
451 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 451 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
452 | connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), | 452 | connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), |
453 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 453 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
454 | connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 454 | connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
455 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 455 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
456 | connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 456 | connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
457 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 457 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
458 | connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ), | 458 | connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ), |
459 | mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) ); | 459 | mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) ); |
460 | } | 460 | } |
461 | // bool temp = mFlagShowNextxDays; | 461 | // bool temp = mFlagShowNextxDays; |
462 | //globalFlagBlockPainting = true; | 462 | //globalFlagBlockPainting = true; |
463 | globalFlagBlockAgenda = 1; | 463 | globalFlagBlockAgenda = 1; |
464 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { | 464 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { |
465 | mMainView->setBlockShowDates( true ); | 465 | mMainView->setBlockShowDates( true ); |
466 | mMainView->dateNavigator()->selectMonth(); | 466 | mMainView->dateNavigator()->selectMonth(); |
467 | mMainView->setBlockShowDates( false ); | 467 | mMainView->setBlockShowDates( false ); |
468 | } | 468 | } |
469 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; | 469 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; |
470 | showView(mListView, KOPrefs::instance()->mFullViewTodo); | 470 | showView(mListView, KOPrefs::instance()->mFullViewTodo); |
471 | //mFlagShowNextxDays = temp; | 471 | //mFlagShowNextxDays = temp; |
472 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; | 472 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; |
473 | mMainView->setScrollBarStep( 7 ); | 473 | mMainView->setScrollBarStep( 7 ); |
474 | } | 474 | } |
475 | 475 | ||
476 | void KOViewManager::showAgendaView( bool fullScreen ) | 476 | void KOViewManager::showAgendaView( bool fullScreen ) |
477 | { | 477 | { |
478 | 478 | ||
479 | mMainView->dialogManager()->hideSearchDialog(); | 479 | mMainView->dialogManager()->hideSearchDialog(); |
480 | // qDebug("KOViewManager::showAgendaView "); | 480 | // qDebug("KOViewManager::showAgendaView "); |
481 | bool full; | 481 | bool full; |
482 | full = fullScreen; | 482 | full = fullScreen; |
483 | if (!mAgendaView) { | 483 | if (!mAgendaView) { |
484 | full = false; | 484 | full = false; |
485 | mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); | 485 | mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); |
486 | addView(mAgendaView); | 486 | addView(mAgendaView); |
487 | #ifndef DESKTOP_VERSION | 487 | #ifndef DESKTOP_VERSION |
488 | QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); | 488 | QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); |
489 | #endif | 489 | #endif |
490 | connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), | 490 | connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), |
491 | mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); | 491 | mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); |
492 | 492 | ||
493 | // SIGNALS/SLOTS FOR DAY/WEEK VIEW | 493 | // SIGNALS/SLOTS FOR DAY/WEEK VIEW |
494 | 494 | ||
495 | connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); | 495 | connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); |
496 | 496 | ||
497 | connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), | 497 | connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), |
498 | mMainView, SLOT(newTodoDateTime(QDateTime,bool))); | 498 | mMainView, SLOT(newTodoDateTime(QDateTime,bool))); |
499 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), | 499 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), |
500 | mMainView, SLOT(newEvent(QDateTime))); | 500 | mMainView, SLOT(newEvent(QDateTime))); |
501 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), | 501 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), |
502 | mMainView, SLOT(newEvent(QDateTime,QDateTime))); | 502 | mMainView, SLOT(newEvent(QDateTime,QDateTime))); |
503 | connect(mAgendaView,SIGNAL(newEventSignal(QDate)), | 503 | connect(mAgendaView,SIGNAL(newEventSignal(QDate)), |
504 | mMainView, SLOT(newEvent(QDate))); | 504 | mMainView, SLOT(newEvent(QDate))); |
505 | 505 | ||
506 | connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), | 506 | connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), |
507 | mMainView, SLOT(editIncidence(Incidence *))); | 507 | mMainView, SLOT(editIncidence(Incidence *))); |
508 | connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), | 508 | connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), |
509 | mMainView, SLOT(showIncidence(Incidence *))); | 509 | mMainView, SLOT(showIncidence(Incidence *))); |
510 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 510 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
511 | mMainView, SLOT(deleteIncidence(Incidence *))); | 511 | mMainView, SLOT(deleteIncidence(Incidence *))); |
512 | 512 | ||
513 | connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), | 513 | connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), |
514 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 514 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
515 | 515 | ||
516 | connect(mAgendaView, SIGNAL( toggleExpand() ), | 516 | connect(mAgendaView, SIGNAL( toggleExpand() ), |
517 | mMainView, SLOT( toggleExpand() ) ); | 517 | mMainView, SLOT( toggleExpand() ) ); |
518 | 518 | ||
519 | connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), | 519 | connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), |
520 | mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; | 520 | mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; |
521 | connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), | 521 | connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), |
522 | mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; | 522 | mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; |
523 | connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); | 523 | connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); |
524 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, | 524 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, |
525 | SLOT( updateTodo( Todo *, int ) ) ); | 525 | SLOT( updateTodo( Todo *, int ) ) ); |
526 | connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), | 526 | connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), |
527 | mMainView, SIGNAL( todoModified( Todo *, int ))); | 527 | mMainView, SIGNAL( todoModified( Todo *, int ))); |
528 | connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 528 | connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
529 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 529 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
530 | connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 530 | connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
531 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 531 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
532 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), | 532 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), |
533 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); | 533 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); |
534 | mAgendaView->readSettings(); | 534 | mAgendaView->readSettings(); |
535 | mAgendaView->updateConfig(); | 535 | mAgendaView->updateConfig(); |
536 | } | 536 | } |
537 | 537 | ||
538 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; | 538 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; |
539 | showView( mAgendaView, full); | 539 | showView( mAgendaView, full); |
540 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; | 540 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; |
541 | mMainView->setScrollBarStep( 1 ); | 541 | mMainView->setScrollBarStep( 1 ); |
542 | } | 542 | } |
543 | 543 | ||
544 | void KOViewManager::showDayView() | 544 | void KOViewManager::showDayView() |
545 | { | 545 | { |
546 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 546 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
547 | mFlagShowNextxDays = false; | 547 | mFlagShowNextxDays = false; |
548 | globalFlagBlockLabel = 1; | 548 | globalFlagBlockLabel = 1; |
549 | globalFlagBlockAgenda = 1; | 549 | globalFlagBlockAgenda = 1; |
550 | if ( mCurrentAgendaView != 1 ) | 550 | if ( mCurrentAgendaView != 1 ) |
551 | mCurrentAgendaView = -1; | 551 | mCurrentAgendaView = -1; |
552 | showAgendaView(); | 552 | showAgendaView(); |
553 | qApp->processEvents(); | 553 | qApp->processEvents(); |
554 | globalFlagBlockAgenda = 2; | 554 | globalFlagBlockAgenda = 2; |
555 | globalFlagBlockLabel = 0; | 555 | globalFlagBlockLabel = 0; |
556 | mMainView->dateNavigator()->selectDates( 1 ); | 556 | mMainView->dateNavigator()->selectDates( 1 ); |
557 | mCurrentAgendaView = 1 ; | 557 | mCurrentAgendaView = 1 ; |
558 | mMainView->setScrollBarStep( 1 ); | ||
559 | 558 | ||
560 | } | 559 | } |
561 | 560 | ||
562 | void KOViewManager::showWorkWeekView() | 561 | void KOViewManager::showWorkWeekView() |
563 | { | 562 | { |
564 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 563 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
565 | mFlagShowNextxDays = false; | 564 | mFlagShowNextxDays = false; |
566 | globalFlagBlockAgenda = 1; | 565 | globalFlagBlockAgenda = 1; |
567 | globalFlagBlockLabel = 1; | 566 | globalFlagBlockLabel = 1; |
568 | if ( mCurrentAgendaView != 5 ) | 567 | if ( mCurrentAgendaView != 5 ) |
569 | mCurrentAgendaView = -1; | 568 | mCurrentAgendaView = -1; |
570 | showAgendaView(); | 569 | showAgendaView(); |
571 | qApp->processEvents(); | 570 | qApp->processEvents(); |
572 | globalFlagBlockAgenda = 2; | 571 | globalFlagBlockAgenda = 2; |
573 | globalFlagBlockLabel = 0; | 572 | globalFlagBlockLabel = 0; |
574 | mMainView->dateNavigator()->selectWorkWeek(); | 573 | mMainView->dateNavigator()->selectWorkWeek(); |
575 | mCurrentAgendaView = 5 ; | 574 | mCurrentAgendaView = 5 ; |
576 | mMainView->setScrollBarStep( 1 ); | ||
577 | 575 | ||
578 | } | 576 | } |
579 | 577 | ||
580 | void KOViewManager::showWeekView() | 578 | void KOViewManager::showWeekView() |
581 | { | 579 | { |
582 | 580 | ||
583 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 581 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
584 | mFlagShowNextxDays = false; | 582 | mFlagShowNextxDays = false; |
585 | globalFlagBlockAgenda = 1; | 583 | globalFlagBlockAgenda = 1; |
586 | globalFlagBlockLabel = 1; | 584 | globalFlagBlockLabel = 1; |
587 | if ( mCurrentAgendaView != 7 ) | 585 | if ( mCurrentAgendaView != 7 ) |
588 | mCurrentAgendaView = -1; | 586 | mCurrentAgendaView = -1; |
589 | showAgendaView(); | 587 | showAgendaView(); |
590 | qApp->processEvents(); | 588 | qApp->processEvents(); |
591 | globalFlagBlockAgenda = 2; | 589 | globalFlagBlockAgenda = 2; |
592 | globalFlagBlockLabel = 0; | 590 | globalFlagBlockLabel = 0; |
593 | mMainView->dateNavigator()->selectWeek(); | 591 | mMainView->dateNavigator()->selectWeek(); |
594 | mCurrentAgendaView = 7 ; | 592 | mCurrentAgendaView = 7 ; |
595 | mMainView->setScrollBarStep( 1 ); | ||
596 | } | 593 | } |
597 | 594 | ||
598 | void KOViewManager::showNextXView() | 595 | void KOViewManager::showNextXView() |
599 | { | 596 | { |
600 | 597 | ||
601 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; | 598 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; |
602 | globalFlagBlockAgenda = 1; | 599 | globalFlagBlockAgenda = 1; |
603 | if ( mCurrentAgendaView != 3 ) | 600 | if ( mCurrentAgendaView != 3 ) |
604 | mCurrentAgendaView = -1; | 601 | mCurrentAgendaView = -1; |
605 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | 602 | showAgendaView(KOPrefs::instance()->mFullViewMonth); |
606 | globalFlagBlockAgenda = 2; | 603 | globalFlagBlockAgenda = 2; |
607 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), | 604 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), |
608 | KOPrefs::instance()->mNextXDays ); | 605 | KOPrefs::instance()->mNextXDays ); |
609 | mFlagShowNextxDays = true; | 606 | mFlagShowNextxDays = true; |
610 | mCurrentAgendaView = 3 ; | 607 | mCurrentAgendaView = 3 ; |
611 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; | 608 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; |
612 | mMainView->setScrollBarStep( KOPrefs::instance()->mNextXDays ); | 609 | mMainView->setScrollBarStep( KOPrefs::instance()->mNextXDays ); |
613 | } | 610 | } |
614 | bool KOViewManager::showsNextDays() | 611 | bool KOViewManager::showsNextDays() |
615 | { | 612 | { |
616 | return mFlagShowNextxDays; | 613 | return mFlagShowNextxDays; |
617 | } | 614 | } |
618 | void KOViewManager::createMonthView() | 615 | void KOViewManager::createMonthView() |
619 | { | 616 | { |
620 | if (!mMonthView) { | 617 | if (!mMonthView) { |
621 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); | 618 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); |
622 | 619 | ||
623 | addView(mMonthView); | 620 | addView(mMonthView); |
624 | // mMonthView->show(); | 621 | // mMonthView->show(); |
625 | // SIGNALS/SLOTS FOR MONTH VIEW | 622 | // SIGNALS/SLOTS FOR MONTH VIEW |
626 | 623 | ||
627 | connect(mMonthView,SIGNAL(showJournalSignal( int, QDate )),SLOT(showDateView( int, QDate ))); | 624 | connect(mMonthView,SIGNAL(showJournalSignal( int, QDate )),SLOT(showDateView( int, QDate ))); |
628 | 625 | ||
629 | connect(mMonthView, SIGNAL(newTodoSignal(QDateTime,bool)), | 626 | connect(mMonthView, SIGNAL(newTodoSignal(QDateTime,bool)), |
630 | mMainView, SLOT(newTodoDateTime(QDateTime, bool))); | 627 | mMainView, SLOT(newTodoDateTime(QDateTime, bool))); |
631 | 628 | ||
632 | 629 | ||
633 | connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), | 630 | connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), |
634 | mMainView, SLOT(newEvent(QDateTime))); | 631 | mMainView, SLOT(newEvent(QDateTime))); |
635 | 632 | ||
636 | connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), | 633 | connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), |
637 | mMainView, SLOT(showIncidence(Incidence *))); | 634 | mMainView, SLOT(showIncidence(Incidence *))); |
638 | connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), | 635 | connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), |
639 | mMainView, SLOT(editIncidence(Incidence *))); | 636 | mMainView, SLOT(editIncidence(Incidence *))); |
640 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 637 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
641 | mMainView, SLOT(deleteIncidence(Incidence *))); | 638 | mMainView, SLOT(deleteIncidence(Incidence *))); |
642 | 639 | ||
643 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), | 640 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), |
644 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 641 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
645 | connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), | 642 | connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), |
646 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 643 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
647 | connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), | 644 | connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), |
648 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 645 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
649 | 646 | ||
650 | connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 647 | connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
651 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 648 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
652 | connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 649 | connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
653 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 650 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
654 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), | 651 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), |
655 | mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); | 652 | mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); |
656 | connect( mMonthView, SIGNAL( selectMonth() ), | 653 | connect( mMonthView, SIGNAL( selectMonth() ), |
657 | mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) ); | 654 | mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) ); |
658 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), | 655 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), |
659 | mMainView, SLOT ( showDay( QDate ) ) ); | 656 | mMainView, SLOT ( showDay( QDate ) ) ); |
660 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 657 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
661 | connect( mMonthView, SIGNAL(nextMonth() ), | 658 | connect( mMonthView, SIGNAL(nextMonth() ), |
662 | mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); | 659 | mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); |
663 | connect( mMonthView, SIGNAL(prevMonth() ), | 660 | connect( mMonthView, SIGNAL(prevMonth() ), |
664 | mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); | 661 | mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); |
665 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), | 662 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), |
666 | mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); | 663 | mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); |
667 | connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), | 664 | connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), |
668 | mMainView->dateNavigator(), SLOT( selectNextYear() ) ); | 665 | mMainView->dateNavigator(), SLOT( selectNextYear() ) ); |
669 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), | 666 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), |
670 | mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); | 667 | mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); |
671 | connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), | 668 | connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), |
672 | mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); | 669 | mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); |
673 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ), | 670 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ), |
674 | mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) ); | 671 | mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) ); |
675 | connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ), | 672 | connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ), |
676 | mMainView->dateNavigator(), SLOT( selectNextWeek() ) ); | 673 | mMainView->dateNavigator(), SLOT( selectNextWeek() ) ); |
677 | 674 | ||
678 | connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 675 | connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
679 | mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); | 676 | mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); |
680 | 677 | ||
681 | 678 | ||
682 | connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), | 679 | connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), |
683 | mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); | 680 | mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); |
684 | 681 | ||
685 | } | 682 | } |
686 | } | 683 | } |
687 | void KOViewManager::showMonthViewWeek() | 684 | void KOViewManager::showMonthViewWeek() |
688 | { | 685 | { |
689 | createMonthView(); | 686 | createMonthView(); |
690 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; | 687 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; |
691 | globalFlagBlockAgenda = 1; | 688 | globalFlagBlockAgenda = 1; |
692 | bool full = true; | 689 | bool full = true; |
693 | if ( mCurrentView == mMonthView) | 690 | if ( mCurrentView == mMonthView) |
694 | full = mMainView->leftFrame()->isVisible(); | 691 | full = mMainView->leftFrame()->isVisible(); |
695 | if ( !KOPrefs::instance()->mMonthViewWeek ) { | 692 | if ( !KOPrefs::instance()->mMonthViewWeek ) { |
696 | mMonthView->switchView(); | 693 | mMonthView->switchView(); |
697 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) | 694 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) |
698 | full = false; | 695 | full = false; |
699 | else | 696 | else |
700 | full = true; | 697 | full = true; |
701 | } | 698 | } |
702 | mMainView->dateNavigator()->selectWeek(); | 699 | mMainView->dateNavigator()->selectWeek(); |
703 | showView(mMonthView, full ); | 700 | showView(mMonthView, full ); |
704 | mMonthView->setKeyBFocus(); | 701 | mMonthView->setKeyBFocus(); |
705 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; | 702 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; |
706 | mMainView->setScrollBarStep( 7 ); | 703 | mMainView->setScrollBarStep( 7 ); |
707 | } | 704 | } |
708 | 705 | ||
709 | void KOViewManager::showMonth( const QDate & date ) | 706 | void KOViewManager::showMonth( const QDate & date ) |
710 | { | 707 | { |
711 | mMainView->dateNavigator()->blockSignals( true ); | 708 | mMainView->dateNavigator()->blockSignals( true ); |
712 | mMainView->dateNavigator()->selectDate( date ); | 709 | mMainView->dateNavigator()->selectDate( date ); |
713 | mMainView->dateNavigator()->blockSignals( false ); | 710 | mMainView->dateNavigator()->blockSignals( false ); |
714 | showMonthView(); | 711 | showMonthView(); |
715 | } | 712 | } |
716 | void KOViewManager::showMonthView() | 713 | void KOViewManager::showMonthView() |
717 | { | 714 | { |
718 | 715 | ||
719 | createMonthView(); | 716 | createMonthView(); |
720 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; | 717 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; |
721 | globalFlagBlockAgenda = 1; | 718 | globalFlagBlockAgenda = 1; |
722 | //mFlagShowNextxDays = false; | 719 | //mFlagShowNextxDays = false; |
723 | bool full = true; | 720 | bool full = true; |
724 | if ( mCurrentView == mMonthView) | 721 | if ( mCurrentView == mMonthView) |
725 | full = mMainView->leftFrame()->isVisible(); | 722 | full = mMainView->leftFrame()->isVisible(); |
726 | // if(mMonthView == mCurrentView) return; | 723 | // if(mMonthView == mCurrentView) return; |
727 | if ( KOPrefs::instance()->mMonthViewWeek ) { | 724 | if ( KOPrefs::instance()->mMonthViewWeek ) { |
728 | mMonthView->switchView(); | 725 | mMonthView->switchView(); |
729 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) | 726 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) |
730 | full = false; | 727 | full = false; |
731 | else | 728 | else |
732 | full = true; | 729 | full = true; |
733 | } | 730 | } |
734 | mMainView->dateNavigator()->selectMonth(); | 731 | mMainView->dateNavigator()->selectMonth(); |
735 | 732 | ||
736 | showView(mMonthView, full ); | 733 | showView(mMonthView, full ); |
737 | mMonthView->setKeyBFocus(); | 734 | mMonthView->setKeyBFocus(); |
738 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; | 735 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; |
739 | mMainView->setScrollBarStep( 7 ); | 736 | mMainView->setScrollBarStep( 7 ); |
740 | 737 | ||
741 | } | 738 | } |
742 | 739 | ||
743 | void KOViewManager::showTodoView() | 740 | void KOViewManager::showTodoView() |
744 | { | 741 | { |
745 | //mFlagShowNextxDays = false; | 742 | //mFlagShowNextxDays = false; |
746 | if ( !mTodoView ) { | 743 | if ( !mTodoView ) { |
747 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), | 744 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), |
748 | "KOViewManager::TodoView" ); | 745 | "KOViewManager::TodoView" ); |
749 | 746 | ||
750 | addView( mTodoView ); | 747 | addView( mTodoView ); |
751 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); | 748 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); |
752 | 749 | ||
753 | // SIGNALS/SLOTS FOR TODO VIEW | 750 | // SIGNALS/SLOTS FOR TODO VIEW |
754 | connect( mTodoView, SIGNAL( newTodoSignal() ), | 751 | connect( mTodoView, SIGNAL( newTodoSignal() ), |
755 | mMainView, SLOT( newTodo() ) ); | 752 | mMainView, SLOT( newTodo() ) ); |
756 | connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), | 753 | connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), |
757 | mMainView, SLOT( newSubTodo( Todo *) ) ); | 754 | mMainView, SLOT( newSubTodo( Todo *) ) ); |
758 | connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), | 755 | connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), |
759 | mMainView, SLOT( showTodo( Todo * ) ) ); | 756 | mMainView, SLOT( showTodo( Todo * ) ) ); |
760 | connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), | 757 | connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), |
761 | mMainView, SLOT( editTodo( Todo * ) ) ); | 758 | mMainView, SLOT( editTodo( Todo * ) ) ); |
762 | connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), | 759 | connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), |
763 | mMainView, SLOT( deleteTodo( Todo * ) ) ); | 760 | mMainView, SLOT( deleteTodo( Todo * ) ) ); |
764 | connect( mTodoView, SIGNAL( purgeCompletedSignal() ), | 761 | connect( mTodoView, SIGNAL( purgeCompletedSignal() ), |
765 | mMainView, SLOT( purgeCompleted() ) ); | 762 | mMainView, SLOT( purgeCompleted() ) ); |
766 | 763 | ||
767 | connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), | 764 | connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), |
768 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 765 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
769 | 766 | ||
770 | connect( mMainView, SIGNAL( configChanged() ), mTodoView, | 767 | connect( mMainView, SIGNAL( configChanged() ), mTodoView, |
771 | SLOT( updateConfig() ) ); | 768 | SLOT( updateConfig() ) ); |
772 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, | 769 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, |
773 | SLOT( updateTodo( Todo *, int ) ) ); | 770 | SLOT( updateTodo( Todo *, int ) ) ); |
774 | connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), | 771 | connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), |
775 | mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); | 772 | mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); |
776 | connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), | 773 | connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), |
777 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 774 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
778 | connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), | 775 | connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), |
779 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 776 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
780 | connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), | 777 | connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), |
781 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); | 778 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); |
782 | connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | 779 | connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), |
783 | mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); | 780 | mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); |
784 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), | 781 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), |
785 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 782 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
786 | connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), | 783 | connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), |
787 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 784 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 7a5f3e5..5d26d35 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -641,388 +641,384 @@ void MainWindow::setUsesBigPixmaps ( bool b ) | |||
641 | void MainWindow::initActions() | 641 | void MainWindow::initActions() |
642 | { | 642 | { |
643 | //KOPrefs::instance()->mShowFullMenu | 643 | //KOPrefs::instance()->mShowFullMenu |
644 | iconToolBar->clear(); | 644 | iconToolBar->clear(); |
645 | KOPrefs *p = KOPrefs::instance(); | 645 | KOPrefs *p = KOPrefs::instance(); |
646 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 646 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
647 | 647 | ||
648 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 648 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
649 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 649 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
650 | mCurrentItemMenu = new QPopupMenu ( this ); | 650 | mCurrentItemMenu = new QPopupMenu ( this ); |
651 | QPopupMenu *importMenu = new QPopupMenu( this ); | 651 | QPopupMenu *importMenu = new QPopupMenu( this ); |
652 | QPopupMenu *importMenu_X = new QPopupMenu( this ); | 652 | QPopupMenu *importMenu_X = new QPopupMenu( this ); |
653 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); | 653 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); |
654 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); | 654 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); |
655 | selectFilterMenu = new QPopupMenu( this ); | 655 | selectFilterMenu = new QPopupMenu( this ); |
656 | selectFilterMenu->setCheckable( true ); | 656 | selectFilterMenu->setCheckable( true ); |
657 | syncMenu = new QPopupMenu( this ); | 657 | syncMenu = new QPopupMenu( this ); |
658 | configureAgendaMenu = new QPopupMenu( this ); | 658 | configureAgendaMenu = new QPopupMenu( this ); |
659 | configureToolBarMenu = new QPopupMenu( this ); | 659 | configureToolBarMenu = new QPopupMenu( this ); |
660 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 660 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
661 | QIconSet icon; | 661 | QIconSet icon; |
662 | int pixWid = 22, pixHei = 22; | 662 | int pixWid = 22, pixHei = 22; |
663 | QString pathString = ""; | 663 | QString pathString = ""; |
664 | if ( !p->mToolBarMiniIcons ) { | 664 | if ( !p->mToolBarMiniIcons ) { |
665 | if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { | 665 | if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { |
666 | pathString += "icons16/"; | 666 | pathString += "icons16/"; |
667 | pixWid = 18; pixHei = 16; | 667 | pixWid = 18; pixHei = 16; |
668 | } | 668 | } |
669 | } else { | 669 | } else { |
670 | pathString += "iconsmini/"; | 670 | pathString += "iconsmini/"; |
671 | pixWid = 18; pixHei = 16; | 671 | pixWid = 18; pixHei = 16; |
672 | } | 672 | } |
673 | if ( KOPrefs::instance()->mShowFullMenu ) { | 673 | if ( KOPrefs::instance()->mShowFullMenu ) { |
674 | QMenuBar *menuBar1; | 674 | QMenuBar *menuBar1; |
675 | menuBar1 = menuBar(); | 675 | menuBar1 = menuBar(); |
676 | menuBar1->insertItem( i18n("File"), importMenu ); | 676 | menuBar1->insertItem( i18n("File"), importMenu ); |
677 | menuBar1->insertItem( i18n("View"), viewMenu ); | 677 | menuBar1->insertItem( i18n("View"), viewMenu ); |
678 | menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); | 678 | menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); |
679 | menuBar1->insertItem( i18n("Action"), actionMenu ); | 679 | menuBar1->insertItem( i18n("Action"), actionMenu ); |
680 | #ifdef DESKTOP_VERSION | 680 | #ifdef DESKTOP_VERSION |
681 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 681 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
682 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 682 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
683 | #else | 683 | #else |
684 | menuBar1->insertItem( i18n("Sync"), syncMenu ); | 684 | menuBar1->insertItem( i18n("Sync"), syncMenu ); |
685 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); | 685 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); |
686 | #endif | 686 | #endif |
687 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 687 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
688 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 688 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
689 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 689 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
690 | } else { | 690 | } else { |
691 | QPEMenuBar *menuBar1; | 691 | QPEMenuBar *menuBar1; |
692 | menuBar1 = new QPEMenuBar( iconToolBar ); | 692 | menuBar1 = new QPEMenuBar( iconToolBar ); |
693 | QPopupMenu *menuBar = new QPopupMenu( this ); | 693 | QPopupMenu *menuBar = new QPopupMenu( this ); |
694 | icon = loadPixmap( pathString + "z_menu" ); | 694 | icon = loadPixmap( pathString + "z_menu" ); |
695 | menuBar1->insertItem( icon.pixmap(), menuBar); | 695 | menuBar1->insertItem( icon.pixmap(), menuBar); |
696 | //menuBar1->insertItem( i18n("ME"), menuBar); | 696 | //menuBar1->insertItem( i18n("ME"), menuBar); |
697 | menuBar->insertItem( i18n("File"), importMenu ); | 697 | menuBar->insertItem( i18n("File"), importMenu ); |
698 | menuBar->insertItem( i18n("View"), viewMenu ); | 698 | menuBar->insertItem( i18n("View"), viewMenu ); |
699 | menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); | 699 | menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); |
700 | menuBar->insertItem( i18n("Action"), actionMenu ); | 700 | menuBar->insertItem( i18n("Action"), actionMenu ); |
701 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 701 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
702 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 702 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
703 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 703 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
704 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 704 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
705 | menuBar->insertItem( i18n("Help"), helpMenu ); | 705 | menuBar->insertItem( i18n("Help"), helpMenu ); |
706 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 706 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
707 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 707 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
708 | } | 708 | } |
709 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 709 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
710 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 710 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
711 | 711 | ||
712 | 712 | ||
713 | mWeekBgColor = iconToolBar->backgroundColor(); | 713 | mWeekBgColor = iconToolBar->backgroundColor(); |
714 | mWeekPixmap.resize( pixWid , pixHei ); | 714 | mWeekPixmap.resize( pixWid , pixHei ); |
715 | mWeekPixmap.fill( mWeekBgColor ); | 715 | mWeekPixmap.fill( mWeekBgColor ); |
716 | icon = mWeekPixmap; | 716 | icon = mWeekPixmap; |
717 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 717 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
718 | if ( p-> mShowIconWeekNum ) | 718 | if ( p-> mShowIconWeekNum ) |
719 | mWeekAction->addTo( iconToolBar ); | 719 | mWeekAction->addTo( iconToolBar ); |
720 | mWeekFont = font(); | 720 | mWeekFont = font(); |
721 | 721 | ||
722 | int fontPoint = mWeekFont.pointSize(); | 722 | int fontPoint = mWeekFont.pointSize(); |
723 | QFontMetrics f( mWeekFont ); | 723 | QFontMetrics f( mWeekFont ); |
724 | int fontWid = f.width( "30" ); | 724 | int fontWid = f.width( "30" ); |
725 | while ( fontWid > pixWid ) { | 725 | while ( fontWid > pixWid ) { |
726 | --fontPoint; | 726 | --fontPoint; |
727 | mWeekFont.setPointSize( fontPoint ); | 727 | mWeekFont.setPointSize( fontPoint ); |
728 | QFontMetrics f( mWeekFont ); | 728 | QFontMetrics f( mWeekFont ); |
729 | fontWid = f.width( "30" ); | 729 | fontWid = f.width( "30" ); |
730 | //qDebug("dec-- "); | 730 | //qDebug("dec-- "); |
731 | } | 731 | } |
732 | 732 | ||
733 | connect( mWeekAction, SIGNAL( activated() ), | 733 | connect( mWeekAction, SIGNAL( activated() ), |
734 | this, SLOT( weekAction() ) ); | 734 | this, SLOT( weekAction() ) ); |
735 | 735 | ||
736 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 736 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
737 | if ( p->mShowIconFilterview ) { | 737 | if ( p->mShowIconFilterview ) { |
738 | icon = loadPixmap( pathString + "filter" ); | 738 | icon = loadPixmap( pathString + "filter" ); |
739 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); | 739 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); |
740 | connect( actionFilterMenuTB, SIGNAL( activated() ), | 740 | connect( actionFilterMenuTB, SIGNAL( activated() ), |
741 | this, SLOT( fillFilterMenuTB() ) ); | 741 | this, SLOT( fillFilterMenuTB() ) ); |
742 | actionFilterMenuTB->addTo( iconToolBar ); | 742 | actionFilterMenuTB->addTo( iconToolBar ); |
743 | selectFilterMenuTB = new QPopupMenu( this ); | 743 | selectFilterMenuTB = new QPopupMenu( this ); |
744 | selectFilterMenuTB->setCheckable( true ); | 744 | selectFilterMenuTB->setCheckable( true ); |
745 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 745 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
746 | } | 746 | } |
747 | 747 | ||
748 | //#endif | 748 | //#endif |
749 | // ****************** | 749 | // ****************** |
750 | QAction *action; | 750 | QAction *action; |
751 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 751 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
752 | configureToolBarMenu->setCheckable( true ); | 752 | configureToolBarMenu->setCheckable( true ); |
753 | 753 | ||
754 | 754 | ||
755 | configureAgendaMenu->setCheckable( true ); | 755 | configureAgendaMenu->setCheckable( true ); |
756 | int iii ; | 756 | int iii ; |
757 | for ( iii = 1;iii<= 10 ;++iii ){ | 757 | for ( iii = 1;iii<= 10 ;++iii ){ |
758 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); | 758 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
759 | } | 759 | } |
760 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 760 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
761 | 761 | ||
762 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 762 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
763 | this, SLOT( showConfigureAgenda( ) ) ); | 763 | this, SLOT( showConfigureAgenda( ) ) ); |
764 | icon = loadPixmap( pathString + "today" ); | 764 | icon = loadPixmap( pathString + "today" ); |
765 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 765 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
766 | today_action->addTo( actionMenu ); | 766 | today_action->addTo( actionMenu ); |
767 | connect( today_action, SIGNAL( activated() ), | 767 | connect( today_action, SIGNAL( activated() ), |
768 | mView, SLOT( goToday() ) ); | 768 | mView, SLOT( goToday() ) ); |
769 | 769 | ||
770 | icon = loadPixmap( pathString + "picker" ); | 770 | icon = loadPixmap( pathString + "picker" ); |
771 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); | 771 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); |
772 | dPickerAction->addTo( actionMenu ); | 772 | dPickerAction->addTo( actionMenu ); |
773 | connect( dPickerAction, SIGNAL( activated() ), | 773 | connect( dPickerAction, SIGNAL( activated() ), |
774 | mView, SLOT( showDatePicker() ) ); | 774 | mView, SLOT( showDatePicker() ) ); |
775 | 775 | ||
776 | icon = loadPixmap( pathString + "search" ); | 776 | icon = loadPixmap( pathString + "search" ); |
777 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 777 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
778 | search_action->addTo( actionMenu ); | 778 | search_action->addTo( actionMenu ); |
779 | connect( search_action, SIGNAL( activated() ), | 779 | connect( search_action, SIGNAL( activated() ), |
780 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 780 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
781 | 781 | ||
782 | actionMenu->insertSeparator(); | 782 | actionMenu->insertSeparator(); |
783 | 783 | ||
784 | 784 | ||
785 | 785 | ||
786 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 786 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
787 | action->addTo( mCurrentItemMenu ); | 787 | action->addTo( mCurrentItemMenu ); |
788 | connect( action, SIGNAL( activated() ), | 788 | connect( action, SIGNAL( activated() ), |
789 | mView, SLOT( undo_delete() ) ); | 789 | mView, SLOT( undo_delete() ) ); |
790 | mCurrentItemMenu->insertSeparator(); | 790 | mCurrentItemMenu->insertSeparator(); |
791 | icon = loadPixmap( pathString + "newevent" ); | 791 | icon = loadPixmap( pathString + "newevent" ); |
792 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 792 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
793 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); | 793 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); |
794 | configureToolBarMenu->insertSeparator(); | 794 | configureToolBarMenu->insertSeparator(); |
795 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); | 795 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); |
796 | configureToolBarMenu->insertSeparator(); | 796 | configureToolBarMenu->insertSeparator(); |
797 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | 797 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); |
798 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 798 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
799 | 799 | ||
800 | //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); | 800 | //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); |
801 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 801 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
802 | mShowAction->addTo( mCurrentItemMenu ); | 802 | mShowAction->addTo( mCurrentItemMenu ); |
803 | connect( mShowAction, SIGNAL( activated() ), | 803 | connect( mShowAction, SIGNAL( activated() ), |
804 | mView, SLOT( showIncidence() ) ); | 804 | mView, SLOT( showIncidence() ) ); |
805 | 805 | ||
806 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 806 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
807 | mEditAction->addTo( mCurrentItemMenu ); | 807 | mEditAction->addTo( mCurrentItemMenu ); |
808 | connect( mEditAction, SIGNAL( activated() ), | 808 | connect( mEditAction, SIGNAL( activated() ), |
809 | mView, SLOT( editIncidence() ) ); | 809 | mView, SLOT( editIncidence() ) ); |
810 | 810 | ||
811 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 811 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
812 | mDeleteAction->addTo( mCurrentItemMenu ); | 812 | mDeleteAction->addTo( mCurrentItemMenu ); |
813 | connect( mDeleteAction, SIGNAL( activated() ), | 813 | connect( mDeleteAction, SIGNAL( activated() ), |
814 | mView, SLOT( deleteIncidence() ) ); | 814 | mView, SLOT( deleteIncidence() ) ); |
815 | 815 | ||
816 | 816 | ||
817 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 817 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
818 | mCloneAction->addTo( mCurrentItemMenu ); | 818 | mCloneAction->addTo( mCurrentItemMenu ); |
819 | connect( mCloneAction, SIGNAL( activated() ), | 819 | connect( mCloneAction, SIGNAL( activated() ), |
820 | mView, SLOT( cloneIncidence() ) ); | 820 | mView, SLOT( cloneIncidence() ) ); |
821 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 821 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
822 | mMoveAction->addTo( mCurrentItemMenu ); | 822 | mMoveAction->addTo( mCurrentItemMenu ); |
823 | connect( mMoveAction, SIGNAL( activated() ), | 823 | connect( mMoveAction, SIGNAL( activated() ), |
824 | mView, SLOT( moveIncidence() ) ); | 824 | mView, SLOT( moveIncidence() ) ); |
825 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 825 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
826 | mBeamAction->addTo(mCurrentItemMenu ); | 826 | mBeamAction->addTo(mCurrentItemMenu ); |
827 | connect( mBeamAction, SIGNAL( activated() ), | 827 | connect( mBeamAction, SIGNAL( activated() ), |
828 | mView, SLOT( beamIncidence() ) ); | 828 | mView, SLOT( beamIncidence() ) ); |
829 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 829 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
830 | mCancelAction->addTo( mCurrentItemMenu ); | 830 | mCancelAction->addTo( mCurrentItemMenu ); |
831 | connect( mCancelAction, SIGNAL( activated() ), | 831 | connect( mCancelAction, SIGNAL( activated() ), |
832 | mView, SLOT( toggleCancelIncidence() ) ); | 832 | mView, SLOT( toggleCancelIncidence() ) ); |
833 | #ifdef DESKTOP_VERSION | ||
834 | actionMenu->insertSeparator(); | ||
835 | #endif | ||
836 | |||
837 | 833 | ||
838 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 834 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
839 | ne_action->addTo( actionMenu ); | 835 | ne_action->addTo( actionMenu ); |
840 | connect( ne_action, SIGNAL( activated() ), | 836 | connect( ne_action, SIGNAL( activated() ), |
841 | mView, SLOT( newEvent() ) ); | 837 | mView, SLOT( newEvent() ) ); |
842 | icon = loadPixmap( pathString + "newtodo" ); | 838 | icon = loadPixmap( pathString + "newtodo" ); |
843 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 839 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
844 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 840 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
845 | nt_action->addTo( actionMenu ); | 841 | nt_action->addTo( actionMenu ); |
846 | connect( nt_action, SIGNAL( activated() ), | 842 | connect( nt_action, SIGNAL( activated() ), |
847 | mView, SLOT( newTodo() ) ); | 843 | mView, SLOT( newTodo() ) ); |
848 | 844 | ||
849 | 845 | ||
850 | 846 | ||
851 | // *********************** | 847 | // *********************** |
852 | if ( KOPrefs::instance()->mVerticalScreen ) { | 848 | if ( KOPrefs::instance()->mVerticalScreen ) { |
853 | icon = SmallIcon( "1updownarrow" ); | 849 | icon = SmallIcon( "1updownarrow" ); |
854 | } else { | 850 | } else { |
855 | icon = SmallIcon("1leftrightarrow" ); | 851 | icon = SmallIcon("1leftrightarrow" ); |
856 | } | 852 | } |
857 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); | 853 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); |
858 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); | 854 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); |
859 | FSaction->addTo( viewMenu ); | 855 | FSaction->addTo( viewMenu ); |
860 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); | 856 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); |
861 | 857 | ||
862 | 858 | ||
863 | icon = loadPixmap( pathString + "filter" ); | 859 | icon = loadPixmap( pathString + "filter" ); |
864 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); | 860 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); |
865 | icon = loadPixmap( pathString + "configure" ); | 861 | icon = loadPixmap( pathString + "configure" ); |
866 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); | 862 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); |
867 | action->addTo( viewMenu ); | 863 | action->addTo( viewMenu ); |
868 | connect( action, SIGNAL( activated() ), | 864 | connect( action, SIGNAL( activated() ), |
869 | mView, SLOT( toggleFilter() ) ); | 865 | mView, SLOT( toggleFilter() ) ); |
870 | mToggleFilter = action; | 866 | mToggleFilter = action; |
871 | icon = loadPixmap( pathString + "navi" ); | 867 | icon = loadPixmap( pathString + "navi" ); |
872 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | 868 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); |
873 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 869 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
874 | action->addTo( viewMenu ); | 870 | action->addTo( viewMenu ); |
875 | connect( action, SIGNAL( activated() ), | 871 | connect( action, SIGNAL( activated() ), |
876 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 872 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
877 | mToggleNav = action ; | 873 | mToggleNav = action ; |
878 | icon = loadPixmap( pathString + "allday" ); | 874 | icon = loadPixmap( pathString + "allday" ); |
879 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | 875 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); |
880 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 876 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
881 | action->addTo( viewMenu ); | 877 | action->addTo( viewMenu ); |
882 | connect( action, SIGNAL( activated() ), | 878 | connect( action, SIGNAL( activated() ), |
883 | mView, SLOT( toggleAllDaySize() ) ); | 879 | mView, SLOT( toggleAllDaySize() ) ); |
884 | mToggleAllday = action; | 880 | mToggleAllday = action; |
885 | 881 | ||
886 | 882 | ||
887 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 883 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
888 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | 884 | mToggleNav, SLOT( setEnabled ( bool ) ) ); |
889 | //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 885 | //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
890 | // mToggleFilter, SLOT( setEnabled ( bool ) ) ); | 886 | // mToggleFilter, SLOT( setEnabled ( bool ) ) ); |
891 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 887 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
892 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | 888 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); |
893 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 889 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
894 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); | 890 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); |
895 | 891 | ||
896 | 892 | ||
897 | dPickerAction->addTo( iconToolBar ); | 893 | dPickerAction->addTo( iconToolBar ); |
898 | viewMenu->insertSeparator(); | 894 | viewMenu->insertSeparator(); |
899 | 895 | ||
900 | if ( p-> mShowIconToggleFull ) | 896 | if ( p-> mShowIconToggleFull ) |
901 | FSaction->addTo( iconToolBar ); | 897 | FSaction->addTo( iconToolBar ); |
902 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); | 898 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); |
903 | 899 | ||
904 | //******************** | 900 | //******************** |
905 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); | 901 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); |
906 | 902 | ||
907 | 903 | ||
908 | icon = loadPixmap( pathString + "whatsnext" ); | 904 | icon = loadPixmap( pathString + "whatsnext" ); |
909 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); | 905 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
910 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 906 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
911 | whatsnext_action->addTo( viewMenu ); | 907 | whatsnext_action->addTo( viewMenu ); |
912 | connect( whatsnext_action, SIGNAL( activated() ), | 908 | connect( whatsnext_action, SIGNAL( activated() ), |
913 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 909 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
914 | 910 | ||
915 | icon = loadPixmap( pathString + "xdays" ); | 911 | icon = loadPixmap( pathString + "xdays" ); |
916 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | 912 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); |
917 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 913 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
918 | xdays_action->addTo( viewMenu ); | 914 | xdays_action->addTo( viewMenu ); |
919 | connect( xdays_action, SIGNAL( activated() ), | 915 | connect( xdays_action, SIGNAL( activated() ), |
920 | mView->viewManager(), SLOT( showNextXView() ) ); | 916 | mView->viewManager(), SLOT( showNextXView() ) ); |
921 | 917 | ||
922 | 918 | ||
923 | icon = loadPixmap( pathString + "journal" ); | 919 | icon = loadPixmap( pathString + "journal" ); |
924 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 920 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
925 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 921 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
926 | viewjournal_action->addTo( viewMenu ); | 922 | viewjournal_action->addTo( viewMenu ); |
927 | connect( viewjournal_action, SIGNAL( activated() ), | 923 | connect( viewjournal_action, SIGNAL( activated() ), |
928 | mView->viewManager(), SLOT( showJournalView() ) ); | 924 | mView->viewManager(), SLOT( showJournalView() ) ); |
929 | 925 | ||
930 | 926 | ||
931 | icon = loadPixmap( pathString + "day" ); | 927 | icon = loadPixmap( pathString + "day" ); |
932 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 928 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
933 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 929 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
934 | day1_action->addTo( viewMenu ); | 930 | day1_action->addTo( viewMenu ); |
935 | // action->addTo( toolBar ); | 931 | // action->addTo( toolBar ); |
936 | connect( day1_action, SIGNAL( activated() ), | 932 | connect( day1_action, SIGNAL( activated() ), |
937 | mView->viewManager(), SLOT( showDayView() ) ); | 933 | mView->viewManager(), SLOT( showDayView() ) ); |
938 | 934 | ||
939 | icon = loadPixmap( pathString + "workweek" ); | 935 | icon = loadPixmap( pathString + "workweek" ); |
940 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 936 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
941 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 937 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
942 | day5_action->addTo( viewMenu ); | 938 | day5_action->addTo( viewMenu ); |
943 | connect( day5_action, SIGNAL( activated() ), | 939 | connect( day5_action, SIGNAL( activated() ), |
944 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 940 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
945 | 941 | ||
946 | icon = loadPixmap( pathString + "week" ); | 942 | icon = loadPixmap( pathString + "week" ); |
947 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 943 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
948 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 944 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
949 | day7_action->addTo( viewMenu ); | 945 | day7_action->addTo( viewMenu ); |
950 | connect( day7_action, SIGNAL( activated() ), | 946 | connect( day7_action, SIGNAL( activated() ), |
951 | mView->viewManager(), SLOT( showWeekView() ) ); | 947 | mView->viewManager(), SLOT( showWeekView() ) ); |
952 | 948 | ||
953 | icon = loadPixmap( pathString + "workweek2" ); | 949 | icon = loadPixmap( pathString + "workweek2" ); |
954 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | 950 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); |
955 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | 951 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); |
956 | day6_action->addTo( viewMenu ); | 952 | day6_action->addTo( viewMenu ); |
957 | connect( day6_action, SIGNAL( activated() ), | 953 | connect( day6_action, SIGNAL( activated() ), |
958 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | 954 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); |
959 | 955 | ||
960 | icon = loadPixmap( pathString + "month" ); | 956 | icon = loadPixmap( pathString + "month" ); |
961 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 957 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
962 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 958 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
963 | month_action->addTo( viewMenu ); | 959 | month_action->addTo( viewMenu ); |
964 | connect( month_action, SIGNAL( activated() ), | 960 | connect( month_action, SIGNAL( activated() ), |
965 | mView->viewManager(), SLOT( showMonthView() ) ); | 961 | mView->viewManager(), SLOT( showMonthView() ) ); |
966 | 962 | ||
967 | icon = loadPixmap( pathString + "list" ); | 963 | icon = loadPixmap( pathString + "list" ); |
968 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 964 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
969 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 965 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
970 | showlist_action->addTo( viewMenu ); | 966 | showlist_action->addTo( viewMenu ); |
971 | connect( showlist_action, SIGNAL( activated() ), | 967 | connect( showlist_action, SIGNAL( activated() ), |
972 | mView->viewManager(), SLOT( showListView() ) ); | 968 | mView->viewManager(), SLOT( showListView() ) ); |
973 | 969 | ||
974 | icon = loadPixmap( pathString + "todo" ); | 970 | icon = loadPixmap( pathString + "todo" ); |
975 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 971 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
976 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 972 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
977 | todoview_action->addTo( viewMenu ); | 973 | todoview_action->addTo( viewMenu ); |
978 | connect( todoview_action, SIGNAL( activated() ), | 974 | connect( todoview_action, SIGNAL( activated() ), |
979 | mView->viewManager(), SLOT( showTodoView() ) ); | 975 | mView->viewManager(), SLOT( showTodoView() ) ); |
980 | 976 | ||
981 | 977 | ||
982 | 978 | ||
983 | #if 0 | 979 | #if 0 |
984 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 980 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
985 | action->addTo( viewMenu ); | 981 | action->addTo( viewMenu ); |
986 | connect( action, SIGNAL( activated() ), | 982 | connect( action, SIGNAL( activated() ), |
987 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 983 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
988 | #endif | 984 | #endif |
989 | 985 | ||
990 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 986 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
991 | this ); | 987 | this ); |
992 | mNewSubTodoAction->addTo( actionMenu ); | 988 | mNewSubTodoAction->addTo( actionMenu ); |
993 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 989 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
994 | mView, SLOT( newSubTodo() ) ); | 990 | mView, SLOT( newSubTodo() ) ); |
995 | 991 | ||
996 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, | 992 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, |
997 | this ); | 993 | this ); |
998 | action->addTo( actionMenu ); | 994 | action->addTo( actionMenu ); |
999 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 995 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
1000 | 996 | ||
1001 | 997 | ||
1002 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); | 998 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); |
1003 | 999 | ||
1004 | 1000 | ||
1005 | 1001 | ||
1006 | actionMenu->insertSeparator(); | 1002 | actionMenu->insertSeparator(); |
1007 | action = new QAction( "manage cat", i18n("Edit category list..."), 0, | 1003 | action = new QAction( "manage cat", i18n("Edit category list..."), 0, |
1008 | this ); | 1004 | this ); |
1009 | action->addTo( actionMenu ); | 1005 | action->addTo( actionMenu ); |
1010 | connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); | 1006 | connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); |
1011 | 1007 | ||
1012 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1008 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
1013 | this ); | 1009 | this ); |
1014 | action->addTo( actionMenu ); | 1010 | action->addTo( actionMenu ); |
1015 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1011 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
1016 | 1012 | ||
1017 | 1013 | ||
1018 | actionMenu->insertSeparator(); | 1014 | actionMenu->insertSeparator(); |
1019 | icon = loadPixmap( pathString + "configure" ); | 1015 | icon = loadPixmap( pathString + "configure" ); |
1020 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); | 1016 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); |
1021 | action->addTo( actionMenu ); | 1017 | action->addTo( actionMenu ); |
1022 | connect( action, SIGNAL( activated() ), | 1018 | connect( action, SIGNAL( activated() ), |
1023 | mView, SLOT( edit_options() ) ); | 1019 | mView, SLOT( edit_options() ) ); |
1024 | icon = loadPixmap( pathString + "configure" ); | 1020 | icon = loadPixmap( pathString + "configure" ); |
1025 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); | 1021 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); |
1026 | action->addTo( actionMenu ); | 1022 | action->addTo( actionMenu ); |
1027 | connect( action, SIGNAL( activated() ), | 1023 | connect( action, SIGNAL( activated() ), |
1028 | mView, SLOT( edit_global_options() ) ); | 1024 | mView, SLOT( edit_global_options() ) ); |