author | zautrix <zautrix> | 2005-10-22 16:49:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-22 16:49:42 (UTC) |
commit | 3ec18dd19fdf4eb7e763b8022f90de83249facfd (patch) (unidiff) | |
tree | abc6c8568c33b70afd8abc46ae9495e5d862cba1 | |
parent | c643664ae97e757afda1012dc998b49e6cc2d575 (diff) | |
download | kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.zip kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.tar.gz kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.tar.bz2 |
fixxx
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 16 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 1 | ||||
-rw-r--r-- | libkcal/calendar.h | 2 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 26 | ||||
-rw-r--r-- | libkcal/calendarlocal.h | 1 |
9 files changed, 52 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 6c1f664..edf7eb1 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,81 +1,82 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.2.5 ************ | 3 | ********** VERSION 2.2.5 ************ |
4 | 4 | ||
5 | Bugfixes in KO/Pi, KA/Pi and OM/Pi. | 5 | Bugfixes in KO/Pi, KA/Pi and OM/Pi. |
6 | Added possibility to disable auto saving in KO/Pi. | 6 | Added possibility to disable auto saving in KO/Pi. |
7 | How to disable it? Good question! Next question, please? | 7 | How to disable it? Good question! Next question, please? |
8 | Added info about count of events/todos/journals to calendar info. | ||
8 | 9 | ||
9 | 10 | ||
10 | ********** VERSION 2.2.4 ************ | 11 | ********** VERSION 2.2.4 ************ |
11 | 12 | ||
12 | KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z. | 13 | KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z. |
13 | Added 3 sec notification about a started timer. | 14 | Added 3 sec notification about a started timer. |
14 | 15 | ||
15 | KO/Pi: | 16 | KO/Pi: |
16 | Added export option for all data to File->Export menu. | 17 | Added export option for all data to File->Export menu. |
17 | Better management if a save error occours. | 18 | Better management if a save error occours. |
18 | Added 15 sec delay in automatic saving when Z wake up from suspend and the automatic save timer did expire - to avoid problems accessing data storage directly after wake up. | 19 | Added 15 sec delay in automatic saving when Z wake up from suspend and the automatic save timer did expire - to avoid problems accessing data storage directly after wake up. |
19 | Fix for displaying month names of an utf8 translated language (like Russian). I hope a Russian version of KO/Pi will be available soon. | 20 | Fix for displaying month names of an utf8 translated language (like Russian). I hope a Russian version of KO/Pi will be available soon. |
20 | 21 | ||
21 | Added duration info about multiday events. | 22 | Added duration info about multiday events. |
22 | Changed behaviour of "Set complete" in Todo viewer: Now Todo viewer closes not automatically. | 23 | Changed behaviour of "Set complete" in Todo viewer: Now Todo viewer closes not automatically. |
23 | 24 | ||
24 | KA/Pi: | 25 | KA/Pi: |
25 | Added for vCard import the option to import contact data in Latin1 format. | 26 | Added for vCard import the option to import contact data in Latin1 format. |
26 | 27 | ||
27 | ********** VERSION 2.2.3 ************ | 28 | ********** VERSION 2.2.3 ************ |
28 | 29 | ||
29 | KO/Pi: | 30 | KO/Pi: |
30 | Fixed a problem with (non empty) exception dates in the exception date edit dialog of recurring events for newly created events. | 31 | Fixed a problem with (non empty) exception dates in the exception date edit dialog of recurring events for newly created events. |
31 | 32 | ||
32 | Fixed usability problem in KA/Pi: | 33 | Fixed usability problem in KA/Pi: |
33 | Now searching works for "all phone numbers and all addresses" if "all fields" is selected as search option. | 34 | Now searching works for "all phone numbers and all addresses" if "all fields" is selected as search option. |
34 | 35 | ||
35 | Changed some behaviour in OM/Pi mail management to make it more usable. | 36 | Changed some behaviour in OM/Pi mail management to make it more usable. |
36 | 37 | ||
37 | 38 | ||
38 | ********** VERSION 2.2.2 ************ | 39 | ********** VERSION 2.2.2 ************ |
39 | 40 | ||
40 | KO/Pi: | 41 | KO/Pi: |
41 | Fixed a problem with the sort order of last modified date in list view. | 42 | Fixed a problem with the sort order of last modified date in list view. |
42 | KA/Pi: | 43 | KA/Pi: |
43 | Fixed a resource config read problem on windows. | 44 | Fixed a resource config read problem on windows. |
44 | 45 | ||
45 | 46 | ||
46 | ********** VERSION 2.2.1 ************ | 47 | ********** VERSION 2.2.1 ************ |
47 | 48 | ||
48 | KO/Pi: | 49 | KO/Pi: |
49 | Fixed a problem displaying very long allday events in agenda view in single day mode. | 50 | Fixed a problem displaying very long allday events in agenda view in single day mode. |
50 | Fixed a problem with the default settings for new todos. | 51 | Fixed a problem with the default settings for new todos. |
51 | Added an error message dialog if saving of calendar files is not possible. | 52 | Added an error message dialog if saving of calendar files is not possible. |
52 | Made it impossible to close KO/Pi if saving fails. | 53 | Made it impossible to close KO/Pi if saving fails. |
53 | Fixed a problem adding calendars on windows such that these calendars can be used on the memory stick. | 54 | Fixed a problem adding calendars on windows such that these calendars can be used on the memory stick. |
54 | Added config options for conflict detection. | 55 | Added config options for conflict detection. |
55 | 56 | ||
56 | KA/Pi: | 57 | KA/Pi: |
57 | Added a config option to turn on asking before a contact is deleted. | 58 | Added a config option to turn on asking before a contact is deleted. |
58 | Fixed a problem with the default view and view selection at startup. | 59 | Fixed a problem with the default view and view selection at startup. |
59 | Formatted name is now set on import, if formatted name is empty. | 60 | Formatted name is now set on import, if formatted name is empty. |
60 | Fixed a problem of displaying images in the contact details view: | 61 | Fixed a problem of displaying images in the contact details view: |
61 | Now the wid/hei ratio is not changed. | 62 | Now the wid/hei ratio is not changed. |
62 | I a picture is larger than 128 pixels in wid or hei it is downscaled to | 63 | I a picture is larger than 128 pixels in wid or hei it is downscaled to |
63 | max 128 pixels wid/hei. | 64 | max 128 pixels wid/hei. |
64 | 65 | ||
65 | ********** VERSION 2.2.0 ************ | 66 | ********** VERSION 2.2.0 ************ |
66 | 67 | ||
67 | New stable release! | 68 | New stable release! |
68 | Fixed some minor usability problems. | 69 | Fixed some minor usability problems. |
69 | Added writing of next alarm to a file for usage on pdaXrom. | 70 | Added writing of next alarm to a file for usage on pdaXrom. |
70 | 71 | ||
71 | 72 | ||
72 | ************************************* | 73 | ************************************* |
73 | 74 | ||
74 | You can find the complete changelog | 75 | You can find the complete changelog |
75 | from version 1.7.7 to 2.2.0 | 76 | from version 1.7.7 to 2.2.0 |
76 | in the source package or on | 77 | in the source package or on |
77 | 78 | ||
78 | http://www.pi-sync.net/html/changelog.html | 79 | http://www.pi-sync.net/html/changelog.html |
79 | 80 | ||
80 | 81 | ||
81 | 82 | ||
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index e8b54fd..288ce4b 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1477,105 +1477,105 @@ | |||
1477 | { "Delete selected...","Lösche Ausgewählte..." }, | 1477 | { "Delete selected...","Lösche Ausgewählte..." }, |
1478 | { "None","Nichts" }, | 1478 | { "None","Nichts" }, |
1479 | { "Selection","Auswahl" }, | 1479 | { "Selection","Auswahl" }, |
1480 | { "Set categories","Setze Kategorien" }, | 1480 | { "Set categories","Setze Kategorien" }, |
1481 | { "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!" }, | 1481 | { "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!" }, |
1482 | { "Reset","Neu setzen" }, | 1482 | { "Reset","Neu setzen" }, |
1483 | { "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)?" }, | 1483 | { "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)?" }, |
1484 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, | 1484 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, |
1485 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, | 1485 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, |
1486 | { "\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" }, | 1486 | { "\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" }, |
1487 | { "\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" }, | 1487 | { "\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" }, |
1488 | { "Edit","Edit" }, | 1488 | { "Edit","Edit" }, |
1489 | { "Last Modified","Zuletzt geändert" }, | 1489 | { "Last Modified","Zuletzt geändert" }, |
1490 | { "Journal viewer","Journal Anzeige" }, | 1490 | { "Journal viewer","Journal Anzeige" }, |
1491 | { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, | 1491 | { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, |
1492 | { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, | 1492 | { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, |
1493 | { "Hide Completed","Verstecke erledigte Todos" }, | 1493 | { "Hide Completed","Verstecke erledigte Todos" }, |
1494 | { "Show not Running","Zeige nicht Laufende" }, | 1494 | { "Show not Running","Zeige nicht Laufende" }, |
1495 | { "Click to add new Todo","Klick für neues Todo!" }, | 1495 | { "Click to add new Todo","Klick für neues Todo!" }, |
1496 | { "Show next conflict for","Zeige nächsten Konflikt für" }, | 1496 | { "Show next conflict for","Zeige nächsten Konflikt für" }, |
1497 | { "All events","Alle Termine" }, | 1497 | { "All events","Alle Termine" }, |
1498 | { "Allday events","Ganztagestermine" }, | 1498 | { "Allday events","Ganztagestermine" }, |
1499 | { "Events with time","Termine mit Zeit" }, | 1499 | { "Events with time","Termine mit Zeit" }, |
1500 | { "No conflict found","Kein Konflikt gefunden" }, | 1500 | { "No conflict found","Kein Konflikt gefunden" }, |
1501 | { "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, | 1501 | { "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, |
1502 | { "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, | 1502 | { "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, |
1503 | { "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, | 1503 | { "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, |
1504 | { "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, | 1504 | { "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, |
1505 | { "KO/Pi Conflict detected","KO/Pi Konflikt erkannt" }, | 1505 | { "KO/Pi Conflict detected","KO/Pi Konflikt erkannt" }, |
1506 | { "Show date","Zeige Datum" }, | 1506 | { "Show date","Zeige Datum" }, |
1507 | { "No problem!","Null Problemo!" }, | 1507 | { "No problem!","Null Problemo!" }, |
1508 | { "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, | 1508 | { "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, |
1509 | { "Pi-Sync Port Error","Pi-Sync Port Fehler" }, | 1509 | { "Pi-Sync Port Error","Pi-Sync Port Fehler" }, |
1510 | { "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, | 1510 | { "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, |
1511 | { "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, | 1511 | { "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, |
1512 | { "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, | 1512 | { "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, |
1513 | { "Pi-Sync Error","Pi-Sync Fehler" }, | 1513 | { "Pi-Sync Error","Pi-Sync Fehler" }, |
1514 | { "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, | 1514 | { "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, |
1515 | { "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, | 1515 | { "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, |
1516 | { "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, | 1516 | { "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, |
1517 | { "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, | 1517 | { "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, |
1518 | { "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, | 1518 | { "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, |
1519 | { "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, | 1519 | { "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, |
1520 | { "Receiving file from remote...","Empfange entfernte Datei..." }, | 1520 | { "Receiving file from remote...","Empfange entfernte Datei..." }, |
1521 | { "Sending back synced file...","Sende synchronisierte Datei zurück..." }, | 1521 | { "Sending back synced file...","Sende synchronisierte Datei zurück..." }, |
1522 | { "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, | 1522 | { "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, |
1523 | { "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, | 1523 | { "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, |
1524 | { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, | 1524 | { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, |
1525 | { "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, | 1525 | { "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, |
1526 | { "Writing back file ...","Schreibe Datei zurück..." }, | 1526 | { "Writing back file ...","Schreibe Datei zurück..." }, |
1527 | { "Sending back file ...","Sende Datei zurück..." }, | 1527 | { "Sending back file ...","Sende Datei zurück..." }, |
1528 | { "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, | 1528 | { "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, |
1529 | { "Created","Angelegt" }, | 1529 | { "Created","Angelegt" }, |
1530 | { "Last Modified Sub","Zuletzt geändertes Sub" }, | 1530 | { "Last Modified Sub","Zuletzt geändertes Sub" }, |
1531 | { "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, | 1531 | { "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, |
1532 | { "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, | 1532 | { "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, |
1533 | { "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, | 1533 | { "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, |
1534 | { "Duration","Dauer" }, | 1534 | { "Duration","Dauer" }, |
1535 | { " day"," Tag" }, | 1535 | { " day"," Tag" }, |
1536 | { "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" }, | 1536 | { "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" }, |
1537 | { "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" }, | 1537 | { "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" }, |
1538 | { "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" }, | 1538 | { "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" }, |
1539 | { "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" }, | 1539 | { "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" }, |
1540 | { "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" }, | 1540 | { "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" }, |
1541 | { "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" }, | 1541 | { "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" }, |
1542 | { "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." }, | 1542 | { "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." }, |
1543 | { "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." }, | 1543 | { "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." }, |
1544 | { "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, | 1544 | { "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, |
1545 | { "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, | 1545 | { "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, |
1546 | { "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, | 1546 | { "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, |
1547 | { "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, | 1547 | { "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, |
1548 | { "Error saving data","Fehler beim Abspeichern" }, | 1548 | { "Error saving data","Fehler beim Abspeichern" }, |
1549 | { "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, | 1549 | { "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, |
1550 | { "Enable conflict detection","Schalte Konflikterkennung an" }, | 1550 | { "Enable conflict detection","Schalte Konflikterkennung an" }, |
1551 | { "Filter for the edited event","Filter für den bearbeiteten Termin" }, | 1551 | { "Filter for the edited event","Filter für den bearbeiteten Termin" }, |
1552 | { "Filter for other events","Filter für die anderen Termine" }, | 1552 | { "Filter for other events","Filter für die anderen Termine" }, |
1553 | { "Check Allday with Allday","Prüfe GanzTag mit GanzTag" }, | 1553 | { "Check Allday with Allday","Prüfe GanzTag mit GanzTag" }, |
1554 | { "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" }, | 1554 | { "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" }, |
1555 | { "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, | 1555 | { "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, |
1556 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, | 1556 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, |
1557 | { "Conflict detection","Konflikterkennung" }, | 1557 | { "Conflict detection","Konflikterkennung" }, |
1558 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, | 1558 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, |
1559 | { "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, | 1559 | { "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, |
1560 | { "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, | 1560 | { "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, |
1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, | 1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, |
1562 | { " Yes, close "," Ja, beenden " }, | 1562 | { " Yes, close "," Ja, beenden " }, |
1563 | { "Export All Data","Exportiere alle Daten" }, | 1563 | { "Export All Data","Exportiere alle Daten" }, |
1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, | 1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, |
1565 | { "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, | 1565 | { "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, |
1566 | { " (Duration: %1 days)"," (Dauer: %1 Tage)" }, | 1566 | { " (Duration: %1 days)"," (Dauer: %1 Tage)" }, |
1567 | { "Autosave enabled!","Auto-Speichern angeschaltet!" }, | 1567 | { "Autosave enabled!","Auto-Speichern angeschaltet!" }, |
1568 | { "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, | 1568 | { "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, |
1569 | { "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, | 1569 | { "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, |
1570 | { "Yes, Save!","Ja, Speichern!" }, | 1570 | { "Yes, Save!","Ja, Speichern!" }, |
1571 | { "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, | 1571 | { "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, |
1572 | { "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, | 1572 | { "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, |
1573 | { "","" }, | 1573 | { "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" }, |
1574 | { "","" }, | 1574 | { "","" }, |
1575 | { "","" }, | 1575 | { "","" }, |
1576 | { "","" }, | 1576 | { "","" }, |
1577 | { "","" }, | 1577 | { "","" }, |
1578 | { "","" }, | 1578 | { "","" }, |
1579 | { "","" }, | 1579 | { "","" }, |
1580 | { "","" }, | 1580 | { "","" }, |
1581 | { "","" }, | 1581 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e31a6e1..28b17a5 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -384,193 +384,195 @@ void CalendarView::init() | |||
384 | 384 | ||
385 | mCalendar->registerObserver( this ); | 385 | mCalendar->registerObserver( this ); |
386 | // TODO: Make sure that view is updated, when calendar is changed. | 386 | // TODO: Make sure that view is updated, when calendar is changed. |
387 | 387 | ||
388 | mStorage = new FileStorage( mCalendar ); | 388 | mStorage = new FileStorage( mCalendar ); |
389 | mNavigator = new DateNavigator( this, "datevav", mViewManager ); | 389 | mNavigator = new DateNavigator( this, "datevav", mViewManager ); |
390 | 390 | ||
391 | QBoxLayout *topLayout = (QBoxLayout*)layout(); | 391 | QBoxLayout *topLayout = (QBoxLayout*)layout(); |
392 | #ifndef KORG_NOSPLITTER | 392 | #ifndef KORG_NOSPLITTER |
393 | // create the main layout frames. | 393 | // create the main layout frames. |
394 | mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); | 394 | mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); |
395 | topLayout->addWidget(mPanner); | 395 | topLayout->addWidget(mPanner); |
396 | 396 | ||
397 | mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, | 397 | mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, |
398 | "CalendarView::LeftFrame"); | 398 | "CalendarView::LeftFrame"); |
399 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); | 399 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); |
400 | 400 | ||
401 | mDateNavigator = new DateNavigatorContainer( mLeftSplitter, | 401 | mDateNavigator = new DateNavigatorContainer( mLeftSplitter, |
402 | "CalendarView::DateNavigator" ); | 402 | "CalendarView::DateNavigator" ); |
403 | 403 | ||
404 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); | 404 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); |
405 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); | 405 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); |
406 | mTodoList->setNavigator( mNavigator ); | 406 | mTodoList->setNavigator( mNavigator ); |
407 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); | 407 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); |
408 | 408 | ||
409 | #ifdef KORG_NORESOURCEVIEW | 409 | #ifdef KORG_NORESOURCEVIEW |
410 | mResourceView = 0; | 410 | mResourceView = 0; |
411 | #else | 411 | #else |
412 | if ( mResourceManager ) { | 412 | if ( mResourceManager ) { |
413 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); | 413 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); |
414 | mResourceView->updateView(); | 414 | mResourceView->updateView(); |
415 | connect( mResourceView, SIGNAL( resourcesChanged() ), | 415 | connect( mResourceView, SIGNAL( resourcesChanged() ), |
416 | SLOT( updateView() ) ); | 416 | SLOT( updateView() ) ); |
417 | } else { | 417 | } else { |
418 | mResourceView = 0; | 418 | mResourceView = 0; |
419 | } | 419 | } |
420 | #endif | 420 | #endif |
421 | QWidget *rightBox = new QWidget( mPanner ); | 421 | QWidget *rightBox = new QWidget( mPanner ); |
422 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 422 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
423 | 423 | ||
424 | mRightFrame = new QWidgetStack( rightBox ); | 424 | mRightFrame = new QWidgetStack( rightBox ); |
425 | rightLayout->addWidget( mRightFrame, 1 ); | 425 | rightLayout->addWidget( mRightFrame, 1 ); |
426 | 426 | ||
427 | mLeftFrame = mLeftSplitter; | 427 | mLeftFrame = mLeftSplitter; |
428 | #else | 428 | #else |
429 | //QWidget *mainBox = new QWidget( this ); | 429 | //QWidget *mainBox = new QWidget( this ); |
430 | //QWidget *leftFrame = new QWidget( mainBox ); | 430 | //QWidget *leftFrame = new QWidget( mainBox ); |
431 | //QBoxLayout * mainBoxLayout; | 431 | //QBoxLayout * mainBoxLayout; |
432 | if ( KOPrefs::instance()->mVerticalScreen ) { | 432 | if ( KOPrefs::instance()->mVerticalScreen ) { |
433 | //mainBoxLayout = new QVBoxLayout(mainBox); | 433 | //mainBoxLayout = new QVBoxLayout(mainBox); |
434 | //leftFrameLayout = new QHBoxLayout(leftFrame ); | 434 | //leftFrameLayout = new QHBoxLayout(leftFrame ); |
435 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); | 435 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); |
436 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 436 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
437 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; | 437 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; |
438 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 438 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
439 | } else { | 439 | } else { |
440 | //mainBoxLayout = new QHBoxLayout(mainBox); | 440 | //mainBoxLayout = new QHBoxLayout(mainBox); |
441 | //leftFrameLayout = new QVBoxLayout(leftFrame ); | 441 | //leftFrameLayout = new QVBoxLayout(leftFrame ); |
442 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 442 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
443 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); | 443 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); |
444 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); | 444 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); |
445 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 445 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
446 | } | 446 | } |
447 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); | 447 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); |
448 | //QBoxLayout * leftFrameLayout; | 448 | //QBoxLayout * leftFrameLayout; |
449 | topLayout->addWidget( mMainFrame ); | 449 | topLayout->addWidget( mMainFrame ); |
450 | #ifdef DESKTOP_VERSION | 450 | #ifdef DESKTOP_VERSION |
451 | mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); | 451 | mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); |
452 | topLayout->addWidget( mDateScrollBar ); | 452 | topLayout->addWidget( mDateScrollBar ); |
453 | connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); | 453 | connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); |
454 | if ( QApplication::desktop()->width() < 800 ) | 454 | if ( QApplication::desktop()->width() < 800 ) |
455 | mDateScrollBar->hide(); | 455 | mDateScrollBar->hide(); |
456 | #endif | 456 | #endif |
457 | //mainBoxLayout->addWidget (mLeftFrame); | 457 | //mainBoxLayout->addWidget (mLeftFrame); |
458 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, | 458 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, |
459 | "CalendarView::DateNavigator" ); | 459 | "CalendarView::DateNavigator" ); |
460 | #if 0 | 460 | #if 0 |
461 | // FIXME | 461 | // FIXME |
462 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, | 462 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, |
463 | "CalendarView::DateNavigator", QDate::currentDate()); | 463 | "CalendarView::DateNavigator", QDate::currentDate()); |
464 | #endif | 464 | #endif |
465 | // mDateNavigator->blockSignals( true ); | 465 | // mDateNavigator->blockSignals( true ); |
466 | //leftFrameLayout->addWidget( mDateNavigator ); | 466 | //leftFrameLayout->addWidget( mDateNavigator ); |
467 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); | 467 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); |
468 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); | 468 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); |
469 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); | 469 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); |
470 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); | 470 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); |
471 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); | 471 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); |
472 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); | 472 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); |
473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); | 473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); |
474 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); | 474 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); |
475 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); | 475 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); |
476 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); | 476 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); |
477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); | 477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); |
478 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); | 478 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); |
479 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); | 479 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); |
480 | connect( mCalEditView, SIGNAL( requestCalendarInfo( int ) ),this, SLOT( displayCalendarInfo( int ) ) ); | ||
480 | 481 | ||
482 | |||
481 | mTodoList->setNavigator( mNavigator ); | 483 | mTodoList->setNavigator( mNavigator ); |
482 | #if 0 | 484 | #if 0 |
483 | if ( QApplication::desktop()->width() < 480 ) { | 485 | if ( QApplication::desktop()->width() < 480 ) { |
484 | leftFrameLayout->addWidget(mFilterView); | 486 | leftFrameLayout->addWidget(mFilterView); |
485 | leftFrameLayout->addWidget(mTodoList, 2 ); | 487 | leftFrameLayout->addWidget(mTodoList, 2 ); |
486 | 488 | ||
487 | } else { | 489 | } else { |
488 | leftFrameLayout->addWidget(mTodoList,2 ); | 490 | leftFrameLayout->addWidget(mTodoList,2 ); |
489 | leftFrameLayout->addWidget(mFilterView ); | 491 | leftFrameLayout->addWidget(mFilterView ); |
490 | } | 492 | } |
491 | #endif | 493 | #endif |
492 | mFilterView->hide(); | 494 | mFilterView->hide(); |
493 | mCalEditView->hide(); | 495 | mCalEditView->hide(); |
494 | QWidget *rightBox = new QWidget( mMainFrame ); | 496 | QWidget *rightBox = new QWidget( mMainFrame ); |
495 | //mainBoxLayout->addWidget ( rightBox, 10 ); | 497 | //mainBoxLayout->addWidget ( rightBox, 10 ); |
496 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 498 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
497 | mRightFrame = new QWidgetStack( rightBox ); | 499 | mRightFrame = new QWidgetStack( rightBox ); |
498 | rightLayout->addWidget( mRightFrame, 10 ); | 500 | rightLayout->addWidget( mRightFrame, 10 ); |
499 | 501 | ||
500 | //mLeftFrame = (QWidget *)leftFrame; | 502 | //mLeftFrame = (QWidget *)leftFrame; |
501 | if ( KOPrefs::instance()->mVerticalScreen ) { | 503 | if ( KOPrefs::instance()->mVerticalScreen ) { |
502 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); | 504 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); |
503 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); | 505 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); |
504 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); | 506 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); |
505 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); | 507 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); |
506 | } else { | 508 | } else { |
507 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); | 509 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); |
508 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); | 510 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); |
509 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); | 511 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); |
510 | } | 512 | } |
511 | if ( !KOPrefs::instance()->mShowDateNavigator) | 513 | if ( !KOPrefs::instance()->mShowDateNavigator) |
512 | mDateNavigator->hide(); | 514 | mDateNavigator->hide(); |
513 | //qDebug("Calendarview Size %d %d ", width(), height()); | 515 | //qDebug("Calendarview Size %d %d ", width(), height()); |
514 | #endif | 516 | #endif |
515 | 517 | ||
516 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 518 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
517 | SLOT( showDates( const KCal::DateList & ) ) ); | 519 | SLOT( showDates( const KCal::DateList & ) ) ); |
518 | 520 | ||
519 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 521 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
520 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 522 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
521 | 523 | ||
522 | 524 | ||
523 | 525 | ||
524 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), | 526 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), |
525 | mViewManager, SLOT( showMonth( const QDate & ) ) ); | 527 | mViewManager, SLOT( showMonth( const QDate & ) ) ); |
526 | 528 | ||
527 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), | 529 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), |
528 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); | 530 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); |
529 | 531 | ||
530 | connect( mDateNavigator, SIGNAL( goPrevYear() ), | 532 | connect( mDateNavigator, SIGNAL( goPrevYear() ), |
531 | mNavigator, SLOT( selectPreviousYear() ) ); | 533 | mNavigator, SLOT( selectPreviousYear() ) ); |
532 | connect( mDateNavigator, SIGNAL( goNextYear() ), | 534 | connect( mDateNavigator, SIGNAL( goNextYear() ), |
533 | mNavigator, SLOT( selectNextYear() ) ); | 535 | mNavigator, SLOT( selectNextYear() ) ); |
534 | connect( mDateNavigator, SIGNAL( goPrevMonth() ), | 536 | connect( mDateNavigator, SIGNAL( goPrevMonth() ), |
535 | mNavigator, SLOT( selectPreviousMonth() ) ); | 537 | mNavigator, SLOT( selectPreviousMonth() ) ); |
536 | connect( mDateNavigator, SIGNAL( goNextMonth() ), | 538 | connect( mDateNavigator, SIGNAL( goNextMonth() ), |
537 | mNavigator, SLOT( selectNextMonth() ) ); | 539 | mNavigator, SLOT( selectNextMonth() ) ); |
538 | 540 | ||
539 | connect( mDateNavigator, SIGNAL( goPrevious() ), | 541 | connect( mDateNavigator, SIGNAL( goPrevious() ), |
540 | mNavigator, SLOT( selectPrevious() ) ); | 542 | mNavigator, SLOT( selectPrevious() ) ); |
541 | connect( mDateNavigator, SIGNAL( goNext() ), | 543 | connect( mDateNavigator, SIGNAL( goNext() ), |
542 | mNavigator, SLOT( selectNext() ) ); | 544 | mNavigator, SLOT( selectNext() ) ); |
543 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), | 545 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), |
544 | mNavigator, SLOT( slotMonthSelect( int ) ) ); | 546 | mNavigator, SLOT( slotMonthSelect( int ) ) ); |
545 | 547 | ||
546 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 548 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
547 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 549 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
548 | #if 0 | 550 | #if 0 |
549 | connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), | 551 | connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), |
550 | SLOT( incidenceAdded( Incidence *) ) ); | 552 | SLOT( incidenceAdded( Incidence *) ) ); |
551 | #endif | 553 | #endif |
552 | // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); | 554 | // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); |
553 | 555 | ||
554 | connect( this, SIGNAL( configChanged() ), | 556 | connect( this, SIGNAL( configChanged() ), |
555 | mDateNavigator, SLOT( updateConfig() ) ); | 557 | mDateNavigator, SLOT( updateConfig() ) ); |
556 | 558 | ||
557 | connect( mTodoList, SIGNAL( newTodoSignal() ), | 559 | connect( mTodoList, SIGNAL( newTodoSignal() ), |
558 | SLOT( newTodo() ) ); | 560 | SLOT( newTodo() ) ); |
559 | connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), | 561 | connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), |
560 | SLOT( newSubTodo( Todo * ) ) ); | 562 | SLOT( newSubTodo( Todo * ) ) ); |
561 | connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), | 563 | connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), |
562 | SLOT( editTodo( Todo * ) ) ); | 564 | SLOT( editTodo( Todo * ) ) ); |
563 | connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), | 565 | connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), |
564 | SLOT( showTodo( Todo *) ) ); | 566 | SLOT( showTodo( Todo *) ) ); |
565 | connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), | 567 | connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), |
566 | SLOT( deleteTodo( Todo *) ) ); | 568 | SLOT( deleteTodo( Todo *) ) ); |
567 | connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); | 569 | connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); |
568 | connect( mTodoList, SIGNAL( purgeCompletedSignal() ), | 570 | connect( mTodoList, SIGNAL( purgeCompletedSignal() ), |
569 | SLOT( purgeCompleted() ) ); | 571 | SLOT( purgeCompleted() ) ); |
570 | connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), | 572 | connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), |
571 | SIGNAL( todoModified( Todo *, int ) ) ); | 573 | SIGNAL( todoModified( Todo *, int ) ) ); |
572 | 574 | ||
573 | connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), | 575 | connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), |
574 | this, SLOT ( cloneIncidence( Incidence * ) ) ); | 576 | this, SLOT ( cloneIncidence( Incidence * ) ) ); |
575 | connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), | 577 | connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), |
576 | this, SLOT (cancelIncidence( Incidence * ) ) ); | 578 | this, SLOT (cancelIncidence( Incidence * ) ) ); |
@@ -5065,96 +5067,110 @@ void CalendarView::setSyncManager(KSyncManager* manager) | |||
5065 | 5067 | ||
5066 | void CalendarView::removeSyncInfo( QString syncProfile) | 5068 | void CalendarView::removeSyncInfo( QString syncProfile) |
5067 | { | 5069 | { |
5068 | qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); | 5070 | qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); |
5069 | mCalendar->removeSyncInfo( syncProfile ); | 5071 | mCalendar->removeSyncInfo( syncProfile ); |
5070 | 5072 | ||
5071 | } | 5073 | } |
5072 | 5074 | ||
5073 | void CalendarView::undo_delete() | 5075 | void CalendarView::undo_delete() |
5074 | { | 5076 | { |
5075 | //qDebug("undo_delete() "); | 5077 | //qDebug("undo_delete() "); |
5076 | Incidence* undo = mCalendar->undoIncidence(); | 5078 | Incidence* undo = mCalendar->undoIncidence(); |
5077 | if ( !undo ) { | 5079 | if ( !undo ) { |
5078 | KMessageBox::sorry(this,i18n("There is nothing to undo!"), | 5080 | KMessageBox::sorry(this,i18n("There is nothing to undo!"), |
5079 | i18n("KO/Pi")); | 5081 | i18n("KO/Pi")); |
5080 | return; | 5082 | return; |
5081 | } | 5083 | } |
5082 | if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( undo->summary(),0 ) + | 5084 | if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( undo->summary(),0 ) + |
5083 | i18n("\nAre you sure you want\nto restore this?"), | 5085 | i18n("\nAre you sure you want\nto restore this?"), |
5084 | i18n("KO/Pi Confirmation"),i18n("Restore"))) { | 5086 | i18n("KO/Pi Confirmation"),i18n("Restore"))) { |
5085 | mCalendar->undoDeleteIncidence(); | 5087 | mCalendar->undoDeleteIncidence(); |
5086 | updateView(); | 5088 | updateView(); |
5087 | } | 5089 | } |
5088 | } | 5090 | } |
5089 | 5091 | ||
5090 | void CalendarView::slotViewerClosed() | 5092 | void CalendarView::slotViewerClosed() |
5091 | { | 5093 | { |
5092 | QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); | 5094 | QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); |
5093 | } | 5095 | } |
5094 | 5096 | ||
5095 | void CalendarView::resetFocus() | 5097 | void CalendarView::resetFocus() |
5096 | { | 5098 | { |
5097 | if ( mViewerCallerIsSearchDialog ) { | 5099 | if ( mViewerCallerIsSearchDialog ) { |
5098 | if ( mDialogManager->getSearchDialog()->isVisible() ){ | 5100 | if ( mDialogManager->getSearchDialog()->isVisible() ){ |
5099 | mDialogManager->getSearchDialog()->raise(); | 5101 | mDialogManager->getSearchDialog()->raise(); |
5100 | mDialogManager->getSearchDialog()->setActiveWindow(); | 5102 | mDialogManager->getSearchDialog()->setActiveWindow(); |
5101 | mDialogManager->getSearchDialog()->listview()->resetFocus(); | 5103 | mDialogManager->getSearchDialog()->listview()->resetFocus(); |
5102 | } else | 5104 | } else |
5103 | mViewerCallerIsSearchDialog = false; | 5105 | mViewerCallerIsSearchDialog = false; |
5104 | } | 5106 | } |
5105 | if ( !mViewerCallerIsSearchDialog ) { | 5107 | if ( !mViewerCallerIsSearchDialog ) { |
5106 | //mViewManager->currentView()->setFocus(); | 5108 | //mViewManager->currentView()->setFocus(); |
5107 | //qDebug("sssssssssssssssset focus "); | 5109 | //qDebug("sssssssssssssssset focus "); |
5108 | topLevelWidget()->raise(); | 5110 | topLevelWidget()->raise(); |
5109 | setActiveWindow(); | 5111 | setActiveWindow(); |
5110 | //setFocus(); | 5112 | //setFocus(); |
5111 | } | 5113 | } |
5112 | mViewerCallerIsSearchDialog = false; | 5114 | mViewerCallerIsSearchDialog = false; |
5113 | } | 5115 | } |
5114 | 5116 | ||
5115 | void CalendarView::showNextAlarms() | 5117 | void CalendarView::showNextAlarms() |
5116 | { | 5118 | { |
5117 | QString message; | 5119 | QString message; |
5118 | QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); | 5120 | QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); |
5119 | if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { | 5121 | if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { |
5120 | QString sum = mCalendar->nextSummary(); | 5122 | QString sum = mCalendar->nextSummary(); |
5121 | QDateTime nextA = mNextAlarmDateTime; | 5123 | QDateTime nextA = mNextAlarmDateTime; |
5122 | QDateTime cur = QDateTime::currentDateTime(); | 5124 | QDateTime cur = QDateTime::currentDateTime(); |
5123 | int secs = cur.secsTo( nextA ); | 5125 | int secs = cur.secsTo( nextA ); |
5124 | int min = secs /60; | 5126 | int min = secs /60; |
5125 | int hours = min /60; | 5127 | int hours = min /60; |
5126 | min = min % 60; | 5128 | min = min % 60; |
5127 | int days = hours /24; | 5129 | int days = hours /24; |
5128 | hours = hours % 24; | 5130 | hours = hours % 24; |
5129 | 5131 | ||
5130 | //message = i18n("The next alarm is in:\n"); | 5132 | //message = i18n("The next alarm is in:\n"); |
5131 | if ( days > 1 ) | 5133 | if ( days > 1 ) |
5132 | message += i18n("%1 days\n").arg( days ); | 5134 | message += i18n("%1 days\n").arg( days ); |
5133 | else if ( days == 1 ) | 5135 | else if ( days == 1 ) |
5134 | message += i18n("1 day\n"); | 5136 | message += i18n("1 day\n"); |
5135 | if ( hours > 1 ) | 5137 | if ( hours > 1 ) |
5136 | message += i18n("%1 hours\n").arg( hours ); | 5138 | message += i18n("%1 hours\n").arg( hours ); |
5137 | else if ( hours == 1 ) | 5139 | else if ( hours == 1 ) |
5138 | message += i18n("1 hour\n"); | 5140 | message += i18n("1 hour\n"); |
5139 | if ( min > 1 ) | 5141 | if ( min > 1 ) |
5140 | message += i18n("%1 minutes\n").arg( min ); | 5142 | message += i18n("%1 minutes\n").arg( min ); |
5141 | else if ( min == 1 ) | 5143 | else if ( min == 1 ) |
5142 | message += i18n("1 minute\n"); | 5144 | message += i18n("1 minute\n"); |
5143 | if ( message.isEmpty() ) | 5145 | if ( message.isEmpty() ) |
5144 | message = i18n("The next alarm is in\nless than one minute!"); | 5146 | message = i18n("The next alarm is in\nless than one minute!"); |
5145 | else | 5147 | else |
5146 | message = i18n("The next alarm is in:\n") + message; | 5148 | message = i18n("The next alarm is in:\n") + message; |
5147 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; | 5149 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; |
5148 | } else { | 5150 | } else { |
5149 | message = i18n("There is no next alarm."); | 5151 | message = i18n("There is no next alarm."); |
5150 | 5152 | ||
5151 | } | 5153 | } |
5152 | #ifdef DESKTOP_VERSION | 5154 | #ifdef DESKTOP_VERSION |
5153 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 5155 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
5154 | message += i18n("\nThe internal alarm notification is disabled!\n"); | 5156 | message += i18n("\nThe internal alarm notification is disabled!\n"); |
5155 | message += i18n("Enable it in the settings menu, TAB alarm."); | 5157 | message += i18n("Enable it in the settings menu, TAB alarm."); |
5156 | } | 5158 | } |
5157 | 5159 | ||
5158 | #endif | 5160 | #endif |
5159 | KMessageBox::information( this, message); | 5161 | KMessageBox::information( this, message); |
5160 | } | 5162 | } |
5163 | |||
5164 | void CalendarView::displayCalendarInfo( int id ) | ||
5165 | { | ||
5166 | int e, t,j; | ||
5167 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); | ||
5168 | QString name = kkf->mName; | ||
5169 | mCalendar->getIncidenceCount( id, e, t, j ); | ||
5170 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); | ||
5171 | QString mess = i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file); | ||
5172 | mess += i18n("<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>").arg( e ).arg( t ).arg( j ); | ||
5173 | KMessageBox::information( this, mess ); | ||
5174 | |||
5175 | |||
5176 | } | ||
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 8670832..0924f07 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -108,192 +108,193 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
108 | public: | 108 | public: |
109 | /** | 109 | /** |
110 | Constructs a new calendar view widget. | 110 | Constructs a new calendar view widget. |
111 | 111 | ||
112 | @param calendar calendar document | 112 | @param calendar calendar document |
113 | @param parent parent window | 113 | @param parent parent window |
114 | @param name Qt internal widget object name | 114 | @param name Qt internal widget object name |
115 | */ | 115 | */ |
116 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, | 116 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, |
117 | const char *name = 0 ); | 117 | const char *name = 0 ); |
118 | CalendarView( Calendar *calendar, QWidget *parent = 0, | 118 | CalendarView( Calendar *calendar, QWidget *parent = 0, |
119 | const char *name = 0 ); | 119 | const char *name = 0 ); |
120 | virtual ~CalendarView(); | 120 | virtual ~CalendarView(); |
121 | 121 | ||
122 | Calendar *calendar() { return mCalendar; } | 122 | Calendar *calendar() { return mCalendar; } |
123 | 123 | ||
124 | KOViewManager *viewManager(); | 124 | KOViewManager *viewManager(); |
125 | KODialogManager *dialogManager(); | 125 | KODialogManager *dialogManager(); |
126 | 126 | ||
127 | QDate startDate(); | 127 | QDate startDate(); |
128 | QDate endDate(); | 128 | QDate endDate(); |
129 | 129 | ||
130 | QWidgetStack *viewStack(); | 130 | QWidgetStack *viewStack(); |
131 | QWidget *leftFrame(); | 131 | QWidget *leftFrame(); |
132 | 132 | ||
133 | DateNavigator *dateNavigator(); | 133 | DateNavigator *dateNavigator(); |
134 | KDateNavigator *dateNavigatorWidget(); | 134 | KDateNavigator *dateNavigatorWidget(); |
135 | 135 | ||
136 | void addView(KOrg::BaseView *); | 136 | void addView(KOrg::BaseView *); |
137 | void showView(KOrg::BaseView *); | 137 | void showView(KOrg::BaseView *); |
138 | KOEventViewerDialog* getEventViewerDialog(); | 138 | KOEventViewerDialog* getEventViewerDialog(); |
139 | Incidence *currentSelection(); | 139 | Incidence *currentSelection(); |
140 | void checkSuspendAlarm(); | 140 | void checkSuspendAlarm(); |
141 | void mergeFile( QString fn ); | 141 | void mergeFile( QString fn ); |
142 | 142 | ||
143 | signals: | 143 | signals: |
144 | void save (); | 144 | void save (); |
145 | void saveStopTimer (); | 145 | void saveStopTimer (); |
146 | void tempDisableBR(bool); | 146 | void tempDisableBR(bool); |
147 | /** This todo has been modified */ | 147 | /** This todo has been modified */ |
148 | void todoModified(Todo *, int); | 148 | void todoModified(Todo *, int); |
149 | 149 | ||
150 | /** when change is made to options dialog, the topwidget will catch this | 150 | /** when change is made to options dialog, the topwidget will catch this |
151 | * and emit this signal which notifies all widgets which have registered | 151 | * and emit this signal which notifies all widgets which have registered |
152 | * for notification to update their settings. */ | 152 | * for notification to update their settings. */ |
153 | void configChanged(); | 153 | void configChanged(); |
154 | /** emitted when the topwidget is closing down, so that any attached | 154 | /** emitted when the topwidget is closing down, so that any attached |
155 | child windows can also close. */ | 155 | child windows can also close. */ |
156 | void closingDown(); | 156 | void closingDown(); |
157 | /** emitted right before we die */ | 157 | /** emitted right before we die */ |
158 | void closed(QWidget *); | 158 | void closed(QWidget *); |
159 | 159 | ||
160 | /** Emitted when state of modified flag changes */ | 160 | /** Emitted when state of modified flag changes */ |
161 | void modifiedChanged(bool); | 161 | void modifiedChanged(bool); |
162 | void signalmodified(); | 162 | void signalmodified(); |
163 | 163 | ||
164 | /** Emitted when state of read-only flag changes */ | 164 | /** Emitted when state of read-only flag changes */ |
165 | void readOnlyChanged(bool); | 165 | void readOnlyChanged(bool); |
166 | 166 | ||
167 | /** Emitted when the unit of navigation changes */ | 167 | /** Emitted when the unit of navigation changes */ |
168 | void changeNavStringPrev(const QString &); | 168 | void changeNavStringPrev(const QString &); |
169 | void changeNavStringNext(const QString &); | 169 | void changeNavStringNext(const QString &); |
170 | 170 | ||
171 | /** Emitted when state of events selection has changed and user is organizer*/ | 171 | /** Emitted when state of events selection has changed and user is organizer*/ |
172 | void organizerEventsSelected(bool); | 172 | void organizerEventsSelected(bool); |
173 | /** Emitted when state of events selection has changed and user is attendee*/ | 173 | /** Emitted when state of events selection has changed and user is attendee*/ |
174 | void groupEventsSelected(bool); | 174 | void groupEventsSelected(bool); |
175 | /** | 175 | /** |
176 | Emitted when an incidence gets selected. If the selection is cleared the | 176 | Emitted when an incidence gets selected. If the selection is cleared the |
177 | signal is emitted with 0 as argument. | 177 | signal is emitted with 0 as argument. |
178 | */ | 178 | */ |
179 | void incidenceSelected( Incidence * ); | 179 | void incidenceSelected( Incidence * ); |
180 | /** Emitted, when a todoitem is selected or deselected. */ | 180 | /** Emitted, when a todoitem is selected or deselected. */ |
181 | void todoSelected( bool ); | 181 | void todoSelected( bool ); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | Emitted, when clipboard content changes. Parameter indicates if paste | 184 | Emitted, when clipboard content changes. Parameter indicates if paste |
185 | is possible or not. | 185 | is possible or not. |
186 | */ | 186 | */ |
187 | void pasteEnabled(bool); | 187 | void pasteEnabled(bool); |
188 | 188 | ||
189 | /** Emitted, when the number of incoming messages has changed. */ | 189 | /** Emitted, when the number of incoming messages has changed. */ |
190 | void numIncomingChanged(int); | 190 | void numIncomingChanged(int); |
191 | 191 | ||
192 | /** Emitted, when the number of outgoing messages has changed. */ | 192 | /** Emitted, when the number of outgoing messages has changed. */ |
193 | void numOutgoingChanged(int); | 193 | void numOutgoingChanged(int); |
194 | 194 | ||
195 | /** Send status message, which can e.g. be displayed in the status bar. */ | 195 | /** Send status message, which can e.g. be displayed in the status bar. */ |
196 | void statusMessage(const QString &); | 196 | void statusMessage(const QString &); |
197 | 197 | ||
198 | void calendarViewExpanded( bool ); | 198 | void calendarViewExpanded( bool ); |
199 | void updateSearchDialog(); | 199 | void updateSearchDialog(); |
200 | void filtersUpdated(); | 200 | void filtersUpdated(); |
201 | 201 | ||
202 | 202 | ||
203 | public slots: | 203 | public slots: |
204 | void displayCalendarInfo( int id ); | ||
204 | void nextConflict( bool all, bool allday ); | 205 | void nextConflict( bool all, bool allday ); |
205 | void conflictAll(); | 206 | void conflictAll(); |
206 | void conflictAllday(); | 207 | void conflictAllday(); |
207 | void conflictNotAll(); | 208 | void conflictNotAll(); |
208 | void setCalReadOnly( int id, bool readO ); | 209 | void setCalReadOnly( int id, bool readO ); |
209 | void checkAlarms(); | 210 | void checkAlarms(); |
210 | void checkFiles(); | 211 | void checkFiles(); |
211 | void slotprintSelInc(); | 212 | void slotprintSelInc(); |
212 | void showNextAlarms(); | 213 | void showNextAlarms(); |
213 | void showOpenError(); | 214 | void showOpenError(); |
214 | void watchSavedFile(); | 215 | void watchSavedFile(); |
215 | void recheckTimerAlarm(); | 216 | void recheckTimerAlarm(); |
216 | void checkNextTimerAlarm(); | 217 | void checkNextTimerAlarm(); |
217 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 218 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
218 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 219 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
219 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 220 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
220 | 221 | ||
221 | /** options dialog made a changed to the configuration. we catch this | 222 | /** options dialog made a changed to the configuration. we catch this |
222 | * and notify all widgets which need to update their configuration. */ | 223 | * and notify all widgets which need to update their configuration. */ |
223 | void updateConfig(); | 224 | void updateConfig(); |
224 | 225 | ||
225 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 226 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
226 | const QStringList& anniversaryList, const QStringList& realNameList, | 227 | const QStringList& anniversaryList, const QStringList& realNameList, |
227 | const QStringList& emailList, const QStringList& assembledNameList, | 228 | const QStringList& emailList, const QStringList& assembledNameList, |
228 | const QStringList& uidList); | 229 | const QStringList& uidList); |
229 | 230 | ||
230 | /** | 231 | /** |
231 | Load calendar from file \a filename. If \a merge is true, load | 232 | Load calendar from file \a filename. If \a merge is true, load |
232 | calendar into existing one, if it is false, clear calendar, before | 233 | calendar into existing one, if it is false, clear calendar, before |
233 | loading. Return true, if calendar could be successfully loaded. | 234 | loading. Return true, if calendar could be successfully loaded. |
234 | */ | 235 | */ |
235 | bool openCalendar(QString filename, bool merge=false); | 236 | bool openCalendar(QString filename, bool merge=false); |
236 | bool loadCalendars(); | 237 | bool loadCalendars(); |
237 | bool saveCalendars(); | 238 | bool saveCalendars(); |
238 | bool restoreCalendarSettings(); | 239 | bool restoreCalendarSettings(); |
239 | bool addCalendar( KopiCalendarFile * ); | 240 | bool addCalendar( KopiCalendarFile * ); |
240 | void addCalendarId( int id ); | 241 | void addCalendarId( int id ); |
241 | bool syncCalendar(QString filename,int mode = 0 ); | 242 | bool syncCalendar(QString filename,int mode = 0 ); |
242 | 243 | ||
243 | /** | 244 | /** |
244 | Save calendar data to file. Return true if calendar could be | 245 | Save calendar data to file. Return true if calendar could be |
245 | successfully saved. | 246 | successfully saved. |
246 | */ | 247 | */ |
247 | bool saveCalendar(QString filename); | 248 | bool saveCalendar(QString filename); |
248 | 249 | ||
249 | /** | 250 | /** |
250 | Close calendar. Clear calendar data and reset views to display an empty | 251 | Close calendar. Clear calendar data and reset views to display an empty |
251 | calendar. | 252 | calendar. |
252 | */ | 253 | */ |
253 | void closeCalendar(); | 254 | void closeCalendar(); |
254 | 255 | ||
255 | /** Archive old events of calendar */ | 256 | /** Archive old events of calendar */ |
256 | void archiveCalendar(); | 257 | void archiveCalendar(); |
257 | 258 | ||
258 | void showIncidence(); | 259 | void showIncidence(); |
259 | void editIncidence(); | 260 | void editIncidence(); |
260 | void editIncidenceDescription(); | 261 | void editIncidenceDescription(); |
261 | void deleteIncidence(); | 262 | void deleteIncidence(); |
262 | void cloneIncidence(); | 263 | void cloneIncidence(); |
263 | void moveIncidence(); | 264 | void moveIncidence(); |
264 | void beamIncidence(); | 265 | void beamIncidence(); |
265 | void toggleCancelIncidence(); | 266 | void toggleCancelIncidence(); |
266 | 267 | ||
267 | /** create an editeventwin with supplied date/time, and if bool is true, | 268 | /** create an editeventwin with supplied date/time, and if bool is true, |
268 | * make the event take all day. */ | 269 | * make the event take all day. */ |
269 | void newEvent(QDateTime, QDateTime, bool allDay ); | 270 | void newEvent(QDateTime, QDateTime, bool allDay ); |
270 | void newEvent(QDateTime, QDateTime); | 271 | void newEvent(QDateTime, QDateTime); |
271 | void newEvent(QDateTime fh); | 272 | void newEvent(QDateTime fh); |
272 | void newEvent(QDate dt); | 273 | void newEvent(QDate dt); |
273 | /** create new event without having a date hint. Takes current date as | 274 | /** create new event without having a date hint. Takes current date as |
274 | default hint. */ | 275 | default hint. */ |
275 | void newEvent(); | 276 | void newEvent(); |
276 | void newFloatingEvent(); | 277 | void newFloatingEvent(); |
277 | 278 | ||
278 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ | 279 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ |
279 | void showIncidence(Incidence *); | 280 | void showIncidence(Incidence *); |
280 | void showIncidence(QString uid); | 281 | void showIncidence(QString uid); |
281 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ | 282 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ |
282 | void editIncidence(Incidence *); | 283 | void editIncidence(Incidence *); |
283 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ | 284 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ |
284 | void deleteIncidence(Incidence *); | 285 | void deleteIncidence(Incidence *); |
285 | void cloneIncidence(Incidence *); | 286 | void cloneIncidence(Incidence *); |
286 | void cancelIncidence(Incidence *); | 287 | void cancelIncidence(Incidence *); |
287 | /** Create an editor for the supplied event. */ | 288 | /** Create an editor for the supplied event. */ |
288 | void editEvent(Event *); | 289 | void editEvent(Event *); |
289 | /** Delete the supplied event. */ | 290 | /** Delete the supplied event. */ |
290 | void deleteEvent(Event *); | 291 | void deleteEvent(Event *); |
291 | /** Delete the event with the given unique ID. Returns false, if event wasn't | 292 | /** Delete the event with the given unique ID. Returns false, if event wasn't |
292 | found. */ | 293 | found. */ |
293 | bool deleteEvent(const QString &uid); | 294 | bool deleteEvent(const QString &uid); |
294 | /** Create a read-only viewer dialog for the supplied event. */ | 295 | /** Create a read-only viewer dialog for the supplied event. */ |
295 | void showEvent(Event *); | 296 | void showEvent(Event *); |
296 | 297 | ||
297 | void editJournal(Journal *); | 298 | void editJournal(Journal *); |
298 | void showJournal(Journal *); | 299 | void showJournal(Journal *); |
299 | void deleteJournal(Journal *); | 300 | void deleteJournal(Journal *); |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index ef25fd0..ee9c9f6 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -137,194 +137,196 @@ void KOCalEditView::selectCal(int id ,bool b) | |||
137 | } | 137 | } |
138 | void KOCalEditView::selectStdCal( int id ) | 138 | void KOCalEditView::selectStdCal( int id ) |
139 | { | 139 | { |
140 | KOCalRadioButton* it = mStdandardB.first(); | 140 | KOCalRadioButton* it = mStdandardB.first(); |
141 | while ( it ) { | 141 | while ( it ) { |
142 | it->blockSignals( true ); | 142 | it->blockSignals( true ); |
143 | it->setChecked( it->num() == id ); | 143 | it->setChecked( it->num() == id ); |
144 | it->blockSignals( false ); | 144 | it->blockSignals( false ); |
145 | it = mStdandardB.next(); | 145 | it = mStdandardB.next(); |
146 | } | 146 | } |
147 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 147 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
148 | while ( kkf ) { | 148 | while ( kkf ) { |
149 | kkf->isStandard = (kkf->mCalNumber == id ); | 149 | kkf->isStandard = (kkf->mCalNumber == id ); |
150 | kkf = KOPrefs::instance()->mCalendars.next(); | 150 | kkf = KOPrefs::instance()->mCalendars.next(); |
151 | } | 151 | } |
152 | emit setCalendarDefault ( id ); | 152 | emit setCalendarDefault ( id ); |
153 | } | 153 | } |
154 | 154 | ||
155 | void KOCalEditView::selectCalAlarm(int id ,bool b ) | 155 | void KOCalEditView::selectCalAlarm(int id ,bool b ) |
156 | { | 156 | { |
157 | KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; | 157 | KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; |
158 | emit alarmEnabled ( id , b ); | 158 | emit alarmEnabled ( id , b ); |
159 | emit needsUpdate(); | 159 | emit needsUpdate(); |
160 | } | 160 | } |
161 | void KOCalEditView::selectReadOnly(int id ,bool b ) | 161 | void KOCalEditView::selectReadOnly(int id ,bool b ) |
162 | { | 162 | { |
163 | 163 | ||
164 | emit calendarReadonly ( id , b ); | 164 | emit calendarReadonly ( id , b ); |
165 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; | 165 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; |
166 | if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { | 166 | if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { |
167 | findNewStandard(); | 167 | findNewStandard(); |
168 | } | 168 | } |
169 | if ( !b ){ | 169 | if ( !b ){ |
170 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 170 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
171 | while ( kkf ) { | 171 | while ( kkf ) { |
172 | if (kkf->isReadOnly && kkf->isStandard ) { | 172 | if (kkf->isReadOnly && kkf->isStandard ) { |
173 | selectStdCal( id ); | 173 | selectStdCal( id ); |
174 | break; | 174 | break; |
175 | } | 175 | } |
176 | kkf = KOPrefs::instance()->mCalendars.next(); | 176 | kkf = KOPrefs::instance()->mCalendars.next(); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | 179 | ||
180 | mStdandardB.at(id-1)->setEnabled( !b ); | 180 | mStdandardB.at(id-1)->setEnabled( !b ); |
181 | emit needsUpdate(); | 181 | emit needsUpdate(); |
182 | 182 | ||
183 | } | 183 | } |
184 | void KOCalEditView::findNewStandard() | 184 | void KOCalEditView::findNewStandard() |
185 | { | 185 | { |
186 | bool found = false; | 186 | bool found = false; |
187 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 187 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
188 | while ( kkf ) { | 188 | while ( kkf ) { |
189 | if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { | 189 | if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { |
190 | found = true; | 190 | found = true; |
191 | selectStdCal( kkf->mCalNumber ); | 191 | selectStdCal( kkf->mCalNumber ); |
192 | break; | 192 | break; |
193 | } | 193 | } |
194 | kkf = KOPrefs::instance()->mCalendars.next(); | 194 | kkf = KOPrefs::instance()->mCalendars.next(); |
195 | } | 195 | } |
196 | if ( !found ) { | 196 | if ( !found ) { |
197 | KMessageBox::error( this,i18n("\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n"), | 197 | KMessageBox::error( this,i18n("\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n"), |
198 | i18n("Houston, we have a problem!") ); | 198 | i18n("Houston, we have a problem!") ); |
199 | 199 | ||
200 | } | 200 | } |
201 | } | 201 | } |
202 | 202 | ||
203 | void KOCalEditView::setColor( const QColor& c, int id ) | 203 | void KOCalEditView::setColor( const QColor& c, int id ) |
204 | { | 204 | { |
205 | KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; | 205 | KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; |
206 | emit needsUpdate(); | 206 | emit needsUpdate(); |
207 | } | 207 | } |
208 | void KOCalEditView::deleteCal( int id ) | 208 | void KOCalEditView::deleteCal( int id ) |
209 | { | 209 | { |
210 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); | 210 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); |
211 | QString name = kkf->mName; | 211 | QString name = kkf->mName; |
212 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); | 212 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); |
213 | if ( KMessageBox::warningContinueCancel( this, i18n("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!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; | 213 | if ( KMessageBox::warningContinueCancel( this, i18n("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!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; |
214 | bool findnewstd = kkf->isStandard; | 214 | bool findnewstd = kkf->isStandard; |
215 | emit removeCalendar ( id ); | 215 | emit removeCalendar ( id ); |
216 | KOPrefs::instance()->mCalendars.remove ( kkf ); | 216 | KOPrefs::instance()->mCalendars.remove ( kkf ); |
217 | if ( findnewstd ) findNewStandard(); | 217 | if ( findnewstd ) findNewStandard(); |
218 | emit needsUpdate(); | 218 | emit needsUpdate(); |
219 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); | 219 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); |
220 | } | 220 | } |
221 | void KOCalEditView::infoCal( int id ) | 221 | void KOCalEditView::infoCal( int id ) |
222 | { | 222 | { |
223 | QString name = KOPrefs::instance()->getCalendar( id )->mName; | 223 | QString name = KOPrefs::instance()->getCalendar( id )->mName; |
224 | QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); | 224 | QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); |
225 | if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { | 225 | if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { |
226 | if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { | 226 | if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { |
227 | emit calendarAdded( id ); | 227 | emit calendarAdded( id ); |
228 | emit needsUpdate(); | 228 | emit needsUpdate(); |
229 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); | 229 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); |
230 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); | 230 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); |
231 | } | 231 | } |
232 | } | 232 | } |
233 | else | 233 | else { |
234 | KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); | 234 | emit requestCalendarInfo( id ); |
235 | |||
236 | } | ||
235 | } | 237 | } |
236 | void KOCalEditView::readConfig() | 238 | void KOCalEditView::readConfig() |
237 | { | 239 | { |
238 | 240 | ||
239 | mStdandardB.clear(); | 241 | mStdandardB.clear(); |
240 | mEnabledB.clear(); | 242 | mEnabledB.clear(); |
241 | mAlarmB.clear(); | 243 | mAlarmB.clear(); |
242 | mROB.clear(); | 244 | mROB.clear(); |
243 | 245 | ||
244 | if ( mw ) delete mw; | 246 | if ( mw ) delete mw; |
245 | mw = new QWidget ( viewport() ); | 247 | mw = new QWidget ( viewport() ); |
246 | addChild(mw); | 248 | addChild(mw); |
247 | int ii = 0; | 249 | int ii = 0; |
248 | mainLayout = new QGridLayout ( mw , 2, 8 ); | 250 | mainLayout = new QGridLayout ( mw , 2, 8 ); |
249 | mainLayout->setMargin( 2 ); | 251 | mainLayout->setMargin( 2 ); |
250 | mainLayout->setSpacing( 2 ); | 252 | mainLayout->setSpacing( 2 ); |
251 | QPushButton * addButT = new QPushButton ( mw ); | 253 | QPushButton * addButT = new QPushButton ( mw ); |
252 | addButT->setFocusPolicy(NoFocus); | 254 | addButT->setFocusPolicy(NoFocus); |
253 | mainLayout->addWidget( addButT,0,0 ); | 255 | mainLayout->addWidget( addButT,0,0 ); |
254 | addButT->setText( "D"); | 256 | addButT->setText( "D"); |
255 | connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); | 257 | connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); |
256 | QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); | 258 | QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); |
257 | //addBut->setPixmap ( SmallIcon("greenhook16")); | 259 | //addBut->setPixmap ( SmallIcon("greenhook16")); |
258 | QPushButton *addBut = new QPushButton ( mw ); | 260 | QPushButton *addBut = new QPushButton ( mw ); |
259 | addBut->setFocusPolicy(NoFocus); | 261 | addBut->setFocusPolicy(NoFocus); |
260 | mainLayout->addWidget( addBut,0,++ii ); | 262 | mainLayout->addWidget( addBut,0,++ii ); |
261 | addBut->setPixmap ( SmallIcon("eye")); | 263 | addBut->setPixmap ( SmallIcon("eye")); |
262 | QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") ); | 264 | QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") ); |
263 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); | 265 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); |
264 | int max = addBut->sizeHint().height(); | 266 | int max = addBut->sizeHint().height(); |
265 | addBut->setMaximumWidth( max ); | 267 | addBut->setMaximumWidth( max ); |
266 | addButT->setFixedSize( QSize( max, max ) ); | 268 | addButT->setFixedSize( QSize( max, max ) ); |
267 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); | 269 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); |
268 | mainLayout->addWidget( lab,0,++ii ); | 270 | mainLayout->addWidget( lab,0,++ii ); |
269 | QWhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") ); | 271 | QWhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") ); |
270 | //lab = new QLabel ( i18n(" "), mw ); | 272 | //lab = new QLabel ( i18n(" "), mw ); |
271 | //mainLayout->addWidget( lab,0,++ii ); | 273 | //mainLayout->addWidget( lab,0,++ii ); |
272 | //lab->setFixedWidth( 1 ); | 274 | //lab->setFixedWidth( 1 ); |
273 | addBut = new QPushButton ( mw ); | 275 | addBut = new QPushButton ( mw ); |
274 | addBut->setFocusPolicy(NoFocus); | 276 | addBut->setFocusPolicy(NoFocus); |
275 | mainLayout->addWidget( addBut,0,++ii ); | 277 | mainLayout->addWidget( addBut,0,++ii ); |
276 | addBut->setPixmap ( SmallIcon("bell")); | 278 | addBut->setPixmap ( SmallIcon("bell")); |
277 | QWhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") ); | 279 | QWhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") ); |
278 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); | 280 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); |
279 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 281 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
280 | 282 | ||
281 | addBut = new QPushButton ( mw ); | 283 | addBut = new QPushButton ( mw ); |
282 | addBut->setFocusPolicy(NoFocus); | 284 | addBut->setFocusPolicy(NoFocus); |
283 | mainLayout->addWidget( addBut,0,++ii ); | 285 | mainLayout->addWidget( addBut,0,++ii ); |
284 | addBut->setPixmap ( SmallIcon("pencil")); | 286 | addBut->setPixmap ( SmallIcon("pencil")); |
285 | QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") ); | 287 | QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") ); |
286 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); | 288 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); |
287 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 289 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
288 | lab = new QLabel ( "", mw ); | 290 | lab = new QLabel ( "", mw ); |
289 | mainLayout->addWidget( lab,0,++ii ); | 291 | mainLayout->addWidget( lab,0,++ii ); |
290 | 292 | ||
291 | addBut = new QPushButton ( mw ); | 293 | addBut = new QPushButton ( mw ); |
292 | addBut->setFocusPolicy(NoFocus); | 294 | addBut->setFocusPolicy(NoFocus); |
293 | mainLayout->addWidget( addBut,0,++ii ); | 295 | mainLayout->addWidget( addBut,0,++ii ); |
294 | addBut->setPixmap ( SmallIcon("plus")); | 296 | addBut->setPixmap ( SmallIcon("plus")); |
295 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); | 297 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); |
296 | QWhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") ); | 298 | QWhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") ); |
297 | lab = new QLabel ( " ", mw ); | 299 | lab = new QLabel ( " ", mw ); |
298 | mainLayout->addWidget( lab,0,++ii ); | 300 | mainLayout->addWidget( lab,0,++ii ); |
299 | 301 | ||
300 | 302 | ||
301 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 303 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
302 | int row = 1; | 304 | int row = 1; |
303 | bool errorLoadStandard = false; | 305 | bool errorLoadStandard = false; |
304 | while ( kkf ) { | 306 | while ( kkf ) { |
305 | int iii = 0; | 307 | int iii = 0; |
306 | KOCalRadioButton* rb = new KOCalRadioButton( mw ); | 308 | KOCalRadioButton* rb = new KOCalRadioButton( mw ); |
307 | mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb ); | 309 | mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb ); |
308 | rb->setChecked( kkf->isStandard ); | 310 | rb->setChecked( kkf->isStandard ); |
309 | if ( kkf->isStandard && ( kkf->mErrorOnLoad || kkf->isReadOnly ) ) | 311 | if ( kkf->isStandard && ( kkf->mErrorOnLoad || kkf->isReadOnly ) ) |
310 | errorLoadStandard = true; | 312 | errorLoadStandard = true; |
311 | rb->setNum( kkf->mCalNumber ); | 313 | rb->setNum( kkf->mCalNumber ); |
312 | connect (rb, SIGNAL (selectNum(int)), SLOT ( selectStdCal(int) ) ); | 314 | connect (rb, SIGNAL (selectNum(int)), SLOT ( selectStdCal(int) ) ); |
313 | if ( kkf->mErrorOnLoad || kkf->isReadOnly ) | 315 | if ( kkf->mErrorOnLoad || kkf->isReadOnly ) |
314 | rb->setEnabled( false ); | 316 | rb->setEnabled( false ); |
315 | KOCalCheckButton* cb = new KOCalCheckButton( mw ); | 317 | KOCalCheckButton* cb = new KOCalCheckButton( mw ); |
316 | mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); | 318 | mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); |
317 | cb->setChecked( kkf->isEnabled && !kkf->mErrorOnLoad ); | 319 | cb->setChecked( kkf->isEnabled && !kkf->mErrorOnLoad ); |
318 | cb->setNum( kkf->mCalNumber ); | 320 | cb->setNum( kkf->mCalNumber ); |
319 | if ( kkf->mErrorOnLoad ) | 321 | if ( kkf->mErrorOnLoad ) |
320 | cb->setEnabled( false ); | 322 | cb->setEnabled( false ); |
321 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); | 323 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); |
322 | KOCalButton* name = new KOCalButton( mw ); | 324 | KOCalButton* name = new KOCalButton( mw ); |
323 | name->setNum( kkf->mCalNumber ); | 325 | name->setNum( kkf->mCalNumber ); |
324 | name->setText( kkf->mName ); | 326 | name->setText( kkf->mName ); |
325 | mainLayout->addWidget( name,row,++iii ); | 327 | mainLayout->addWidget( name,row,++iii ); |
326 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); | 328 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); |
327 | //lab = new QLabel (" ", mw ); | 329 | //lab = new QLabel (" ", mw ); |
328 | //mainLayout->addWidget( lab,row,++iii ); | 330 | //mainLayout->addWidget( lab,row,++iii ); |
329 | cb = new KOCalCheckButton( mw ); | 331 | cb = new KOCalCheckButton( mw ); |
330 | mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); | 332 | mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); |
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index d534dbf..0dd423a 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -147,110 +147,111 @@ private: | |||
147 | void keyPressEvent ( QKeyEvent * e ) | 147 | void keyPressEvent ( QKeyEvent * e ) |
148 | { | 148 | { |
149 | e->ignore(); | 149 | e->ignore(); |
150 | } | 150 | } |
151 | 151 | ||
152 | private slots : | 152 | private slots : |
153 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } | 153 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } |
154 | }; | 154 | }; |
155 | 155 | ||
156 | class KOCalRadioButton : public QRadioButton | 156 | class KOCalRadioButton : public QRadioButton |
157 | { | 157 | { |
158 | Q_OBJECT | 158 | Q_OBJECT |
159 | public: | 159 | public: |
160 | KOCalRadioButton( QWidget *parent=0, const char *name=0 ) : | 160 | KOCalRadioButton( QWidget *parent=0, const char *name=0 ) : |
161 | QRadioButton( parent, name) | 161 | QRadioButton( parent, name) |
162 | { | 162 | { |
163 | connect( this, SIGNAL( toggled ( bool ) ), | 163 | connect( this, SIGNAL( toggled ( bool ) ), |
164 | SLOT( bottonClicked( bool ) )); | 164 | SLOT( bottonClicked( bool ) )); |
165 | mNumber = -1; | 165 | mNumber = -1; |
166 | setFocusPolicy(NoFocus); | 166 | setFocusPolicy(NoFocus); |
167 | //setMaximumWidth( 10 ); | 167 | //setMaximumWidth( 10 ); |
168 | 168 | ||
169 | } | 169 | } |
170 | int num() { return mNumber;} | 170 | int num() { return mNumber;} |
171 | void setNum ( int num ) {mNumber = num; } | 171 | void setNum ( int num ) {mNumber = num; } |
172 | signals: | 172 | signals: |
173 | void selectNum ( int ); | 173 | void selectNum ( int ); |
174 | private: | 174 | private: |
175 | int mNumber; | 175 | int mNumber; |
176 | void keyPressEvent ( QKeyEvent * e ) | 176 | void keyPressEvent ( QKeyEvent * e ) |
177 | { | 177 | { |
178 | e->ignore(); | 178 | e->ignore(); |
179 | } | 179 | } |
180 | 180 | ||
181 | private slots : | 181 | private slots : |
182 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber); } | 182 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber); } |
183 | }; | 183 | }; |
184 | 184 | ||
185 | 185 | ||
186 | 186 | ||
187 | class KOFilterView : public KOFilterView_base | 187 | class KOFilterView : public KOFilterView_base |
188 | { | 188 | { |
189 | Q_OBJECT | 189 | Q_OBJECT |
190 | public: | 190 | public: |
191 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); | 191 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); |
192 | ~KOFilterView(); | 192 | ~KOFilterView(); |
193 | 193 | ||
194 | void updateFilters(); | 194 | void updateFilters(); |
195 | 195 | ||
196 | bool filtersEnabled(); | 196 | bool filtersEnabled(); |
197 | void setFiltersEnabled(bool); | 197 | void setFiltersEnabled(bool); |
198 | CalFilter *selectedFilter(); | 198 | CalFilter *selectedFilter(); |
199 | void setSelectedFilter(QString); | 199 | void setSelectedFilter(QString); |
200 | void setSelectedFilter( int ); | 200 | void setSelectedFilter( int ); |
201 | 201 | ||
202 | signals: | 202 | signals: |
203 | void filterChanged(); | 203 | void filterChanged(); |
204 | void editFilters(); | 204 | void editFilters(); |
205 | 205 | ||
206 | private: | 206 | private: |
207 | QPtrList<CalFilter> *mFilters; | 207 | QPtrList<CalFilter> *mFilters; |
208 | }; | 208 | }; |
209 | 209 | ||
210 | class KOCalEditView : public QScrollView | 210 | class KOCalEditView : public QScrollView |
211 | { | 211 | { |
212 | Q_OBJECT | 212 | Q_OBJECT |
213 | public: | 213 | public: |
214 | KOCalEditView( QWidget* parent=0,const char* name=0); | 214 | KOCalEditView( QWidget* parent=0,const char* name=0); |
215 | ~KOCalEditView(); | 215 | ~KOCalEditView(); |
216 | int addCalendar( QString calName, QString fileName, bool ask = true ); | 216 | int addCalendar( QString calName, QString fileName, bool ask = true ); |
217 | int getBirtdayID(); | 217 | int getBirtdayID(); |
218 | public slots: | 218 | public slots: |
219 | void addCal(); | 219 | void addCal(); |
220 | void enableAll(); | 220 | void enableAll(); |
221 | void enableAlarm(); | 221 | void enableAlarm(); |
222 | void disableRO(); | 222 | void disableRO(); |
223 | void deleteAll(); | 223 | void deleteAll(); |
224 | void selectStdCal(int); | 224 | void selectStdCal(int); |
225 | void selectCal(int,bool ); | 225 | void selectCal(int,bool ); |
226 | void selectCalAlarm(int,bool ); | 226 | void selectCalAlarm(int,bool ); |
227 | void selectReadOnly(int,bool ); | 227 | void selectReadOnly(int,bool ); |
228 | void setColor(const QColor &,int) ; | 228 | void setColor(const QColor &,int) ; |
229 | void deleteCal(int) ; | 229 | void deleteCal(int) ; |
230 | void infoCal(int) ; | 230 | void infoCal(int) ; |
231 | void readConfig(); | 231 | void readConfig(); |
232 | void defaultInfo(); | 232 | void defaultInfo(); |
233 | void findNewStandard(); | 233 | void findNewStandard(); |
234 | signals: | 234 | signals: |
235 | void alarmEnabled ( int cal, bool enable ); | 235 | void alarmEnabled ( int cal, bool enable ); |
236 | void calendarEnabled ( int cal, bool enable ); | 236 | void calendarEnabled ( int cal, bool enable ); |
237 | void calendarReadonly ( int cal, bool readonly ); | 237 | void calendarReadonly ( int cal, bool readonly ); |
238 | void setCalendarDefault ( int cal ); | 238 | void setCalendarDefault ( int cal ); |
239 | void removeCalendar ( int cal ); | 239 | void removeCalendar ( int cal ); |
240 | void calendarAdded( int ); | 240 | void calendarAdded( int ); |
241 | void needsUpdate(); | 241 | void needsUpdate(); |
242 | void checkCalendar(); | 242 | void checkCalendar(); |
243 | void requestCalendarInfo( int id ); | ||
243 | 244 | ||
244 | private: | 245 | private: |
245 | QWidget *mw; | 246 | QWidget *mw; |
246 | void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); | 247 | void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); |
247 | QPtrList<KOCalRadioButton> mStdandardB; | 248 | QPtrList<KOCalRadioButton> mStdandardB; |
248 | QPtrList<KOCalCheckButton> mEnabledB; | 249 | QPtrList<KOCalCheckButton> mEnabledB; |
249 | QPtrList<KOCalCheckButton> mAlarmB; | 250 | QPtrList<KOCalCheckButton> mAlarmB; |
250 | QPtrList<KOCalCheckButton> mROB; | 251 | QPtrList<KOCalCheckButton> mROB; |
251 | QGridLayout* mainLayout; | 252 | QGridLayout* mainLayout; |
252 | }; | 253 | }; |
253 | 254 | ||
254 | 255 | ||
255 | 256 | ||
256 | #endif // KOFILTERVIEW_H | 257 | #endif // KOFILTERVIEW_H |
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 3f6895d..4b8b3ff 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -226,155 +226,157 @@ public: | |||
226 | returns a pointer or null. | 226 | returns a pointer or null. |
227 | */ | 227 | */ |
228 | virtual Todo *todo( const QString &uid ) = 0; | 228 | virtual Todo *todo( const QString &uid ) = 0; |
229 | virtual Todo *todo( QString, QString ) = 0; | 229 | virtual Todo *todo( QString, QString ) = 0; |
230 | /** | 230 | /** |
231 | Returns list of todos due on the specified date. | 231 | Returns list of todos due on the specified date. |
232 | */ | 232 | */ |
233 | virtual QPtrList<Todo> todos( const QDate &date ) = 0; | 233 | virtual QPtrList<Todo> todos( const QDate &date ) = 0; |
234 | /** | 234 | /** |
235 | Return unfiltered list of todos. | 235 | Return unfiltered list of todos. |
236 | */ | 236 | */ |
237 | virtual QPtrList<Todo> rawTodos() = 0; | 237 | virtual QPtrList<Todo> rawTodos() = 0; |
238 | 238 | ||
239 | /** | 239 | /** |
240 | Add a Journal entry to calendar. | 240 | Add a Journal entry to calendar. |
241 | 241 | ||
242 | @return true on success, false on error. | 242 | @return true on success, false on error. |
243 | */ | 243 | */ |
244 | virtual bool addJournal( Journal * ) = 0; | 244 | virtual bool addJournal( Journal * ) = 0; |
245 | /** | 245 | /** |
246 | Return Journal for given date. | 246 | Return Journal for given date. |
247 | */ | 247 | */ |
248 | virtual Journal *journal( const QDate & ) = 0; | 248 | virtual Journal *journal( const QDate & ) = 0; |
249 | virtual QPtrList<Journal> journals4Date( const QDate & ) = 0; | 249 | virtual QPtrList<Journal> journals4Date( const QDate & ) = 0; |
250 | /** | 250 | /** |
251 | Return Journal with given UID. | 251 | Return Journal with given UID. |
252 | */ | 252 | */ |
253 | virtual Journal *journal( const QString &UID ) = 0; | 253 | virtual Journal *journal( const QString &UID ) = 0; |
254 | /** | 254 | /** |
255 | Return list of all Journal entries. | 255 | Return list of all Journal entries. |
256 | */ | 256 | */ |
257 | virtual QPtrList<Journal> journals() = 0; | 257 | virtual QPtrList<Journal> journals() = 0; |
258 | 258 | ||
259 | /** | 259 | /** |
260 | Searches all incidence types for an incidence with this unique | 260 | Searches all incidence types for an incidence with this unique |
261 | string identifier, returns a pointer or null. | 261 | string identifier, returns a pointer or null. |
262 | */ | 262 | */ |
263 | Incidence* incidence( const QString&UID ); | 263 | Incidence* incidence( const QString&UID ); |
264 | 264 | ||
265 | /** | 265 | /** |
266 | Setup relations for an incidence. | 266 | Setup relations for an incidence. |
267 | */ | 267 | */ |
268 | virtual void setupRelations( Incidence * ); | 268 | virtual void setupRelations( Incidence * ); |
269 | /** | 269 | /** |
270 | Remove all relations to an incidence | 270 | Remove all relations to an incidence |
271 | */ | 271 | */ |
272 | virtual void removeRelations( Incidence * ); | 272 | virtual void removeRelations( Incidence * ); |
273 | 273 | ||
274 | /** | 274 | /** |
275 | Set calendar filter, which filters events for the events() functions. | 275 | Set calendar filter, which filters events for the events() functions. |
276 | The Filter object is owned by the caller. | 276 | The Filter object is owned by the caller. |
277 | */ | 277 | */ |
278 | void setFilter( CalFilter * ); | 278 | void setFilter( CalFilter * ); |
279 | /** | 279 | /** |
280 | Return calendar filter. | 280 | Return calendar filter. |
281 | */ | 281 | */ |
282 | CalFilter *filter(); | 282 | CalFilter *filter(); |
283 | virtual QDateTime nextAlarm( int daysTo ) = 0; | 283 | virtual QDateTime nextAlarm( int daysTo ) = 0; |
284 | virtual QString nextSummary( ) const = 0; | 284 | virtual QString nextSummary( ) const = 0; |
285 | virtual void reInitAlarmSettings() = 0; | 285 | virtual void reInitAlarmSettings() = 0; |
286 | virtual QDateTime nextAlarmEventDateTime() const = 0; | 286 | virtual QDateTime nextAlarmEventDateTime() const = 0; |
287 | virtual void checkAlarmForIncidence( Incidence *, bool ) = 0; | 287 | virtual void checkAlarmForIncidence( Incidence *, bool ) = 0; |
288 | /** | 288 | /** |
289 | Return all alarms, which ocur in the given time interval. | 289 | Return all alarms, which ocur in the given time interval. |
290 | */ | 290 | */ |
291 | virtual Alarm::List alarms( const QDateTime &from, | 291 | virtual Alarm::List alarms( const QDateTime &from, |
292 | const QDateTime &to ) = 0; | 292 | const QDateTime &to ) = 0; |
293 | 293 | ||
294 | class Observer { | 294 | class Observer { |
295 | public: | 295 | public: |
296 | virtual void calendarModified( bool, Calendar * ) = 0; | 296 | virtual void calendarModified( bool, Calendar * ) = 0; |
297 | }; | 297 | }; |
298 | 298 | ||
299 | void registerObserver( Observer * ); | 299 | void registerObserver( Observer * ); |
300 | 300 | ||
301 | void setModified( bool ); | 301 | void setModified( bool ); |
302 | 302 | ||
303 | /** | 303 | /** |
304 | Set product id returned by loadedProductId(). This function is only | 304 | Set product id returned by loadedProductId(). This function is only |
305 | useful for the calendar loading code. | 305 | useful for the calendar loading code. |
306 | */ | 306 | */ |
307 | void setLoadedProductId( const QString & ); | 307 | void setLoadedProductId( const QString & ); |
308 | /** | 308 | /** |
309 | Return product id taken from file that has been loaded. Returns | 309 | Return product id taken from file that has been loaded. Returns |
310 | QString::null, if no calendar has been loaded. | 310 | QString::null, if no calendar has been loaded. |
311 | */ | 311 | */ |
312 | QString loadedProductId(); | 312 | QString loadedProductId(); |
313 | int defaultCalendar(); | 313 | int defaultCalendar(); |
314 | void setDontDeleteIncidencesOnClose (); | 314 | void setDontDeleteIncidencesOnClose (); |
315 | public slots: | 315 | public slots: |
316 | void setDefaultCalendar( int ); | 316 | void setDefaultCalendar( int ); |
317 | virtual void setCalendarEnabled( int id, bool enable ) = 0; | 317 | virtual void setCalendarEnabled( int id, bool enable ) = 0; |
318 | virtual void setAlarmEnabled( int id, bool enable ) = 0; | 318 | virtual void setAlarmEnabled( int id, bool enable ) = 0; |
319 | virtual void setReadOnly( int id, bool enable ) = 0; | 319 | virtual void setReadOnly( int id, bool enable ) = 0; |
320 | virtual void setDefaultCalendarEnabledOnly() = 0; | 320 | virtual void setDefaultCalendarEnabledOnly() = 0; |
321 | virtual void setCalendarRemove( int id ) = 0; | 321 | virtual void setCalendarRemove( int id ) = 0; |
322 | virtual void getIncidenceCount( int calId, int& events, int & todos, int & journals) = 0; | ||
323 | |||
322 | signals: | 324 | signals: |
323 | void calendarChanged(); | 325 | void calendarChanged(); |
324 | void calendarSaved(); | 326 | void calendarSaved(); |
325 | void calendarLoaded(); | 327 | void calendarLoaded(); |
326 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 328 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
327 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 329 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
328 | 330 | ||
329 | protected: | 331 | protected: |
330 | /** | 332 | /** |
331 | Get unfiltered events, which occur on the given date. | 333 | Get unfiltered events, which occur on the given date. |
332 | */ | 334 | */ |
333 | virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; | 335 | virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; |
334 | /** | 336 | /** |
335 | Get unfiltered events, which occur on the given date. | 337 | Get unfiltered events, which occur on the given date. |
336 | */ | 338 | */ |
337 | virtual QPtrList<Event> rawEventsForDate( const QDate &date, | 339 | virtual QPtrList<Event> rawEventsForDate( const QDate &date, |
338 | bool sorted = false ) = 0; | 340 | bool sorted = false ) = 0; |
339 | /** | 341 | /** |
340 | Get events in a range of dates. If inclusive is set to true, only events | 342 | Get events in a range of dates. If inclusive is set to true, only events |
341 | are returned, which are completely included in the range. | 343 | are returned, which are completely included in the range. |
342 | */ | 344 | */ |
343 | virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, | 345 | virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, |
344 | bool inclusive = false ) = 0; | 346 | bool inclusive = false ) = 0; |
345 | 347 | ||
346 | Incidence *mNextAlarmIncidence; | 348 | Incidence *mNextAlarmIncidence; |
347 | Incidence *mUndoIncidence; | 349 | Incidence *mUndoIncidence; |
348 | int mDefaultCalendar; | 350 | int mDefaultCalendar; |
349 | bool mDeleteIncidencesOnClose; | 351 | bool mDeleteIncidencesOnClose; |
350 | 352 | ||
351 | private: | 353 | private: |
352 | void init(); | 354 | void init(); |
353 | 355 | ||
354 | QString mOwner; // who the calendar belongs to | 356 | QString mOwner; // who the calendar belongs to |
355 | QString mOwnerEmail; // email address of the owner | 357 | QString mOwnerEmail; // email address of the owner |
356 | int mTimeZone; // timezone OFFSET from GMT (MINUTES) | 358 | int mTimeZone; // timezone OFFSET from GMT (MINUTES) |
357 | bool mLocalTime; // use local time, not UTC or a time zone | 359 | bool mLocalTime; // use local time, not UTC or a time zone |
358 | 360 | ||
359 | 361 | ||
360 | CalFilter *mFilter; | 362 | CalFilter *mFilter; |
361 | CalFilter *mDefaultFilter; | 363 | CalFilter *mDefaultFilter; |
362 | 364 | ||
363 | 365 | ||
364 | QString mTimeZoneId; | 366 | QString mTimeZoneId; |
365 | 367 | ||
366 | Observer *mObserver; | 368 | Observer *mObserver; |
367 | bool mNewObserver; | 369 | bool mNewObserver; |
368 | 370 | ||
369 | bool mModified; | 371 | bool mModified; |
370 | 372 | ||
371 | QString mLoadedProductId; | 373 | QString mLoadedProductId; |
372 | 374 | ||
373 | // This list is used to put together related todos | 375 | // This list is used to put together related todos |
374 | QDict<Incidence> mOrphans; | 376 | QDict<Incidence> mOrphans; |
375 | QDict<Incidence> mOrphanUids; | 377 | QDict<Incidence> mOrphanUids; |
376 | }; | 378 | }; |
377 | 379 | ||
378 | } | 380 | } |
379 | 381 | ||
380 | #endif | 382 | #endif |
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 1a1c6be..0ddfeca 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -359,207 +359,231 @@ bool CalendarLocal::addTodoNoDup( Todo *todo ) | |||
359 | //qDebug("duplicate todo found! not inserted! "); | 359 | //qDebug("duplicate todo found! not inserted! "); |
360 | return false; | 360 | return false; |
361 | } | 361 | } |
362 | } | 362 | } |
363 | return addTodo( todo ); | 363 | return addTodo( todo ); |
364 | } | 364 | } |
365 | bool CalendarLocal::addTodo( Todo *todo ) | 365 | bool CalendarLocal::addTodo( Todo *todo ) |
366 | { | 366 | { |
367 | mTodoList.append( todo ); | 367 | mTodoList.append( todo ); |
368 | 368 | ||
369 | todo->registerObserver( this ); | 369 | todo->registerObserver( this ); |
370 | 370 | ||
371 | // Set up subtask relations | 371 | // Set up subtask relations |
372 | setupRelations( todo ); | 372 | setupRelations( todo ); |
373 | 373 | ||
374 | setModified( true ); | 374 | setModified( true ); |
375 | if ( todo->calID() == 0 ) | 375 | if ( todo->calID() == 0 ) |
376 | todo->setCalID( mDefaultCalendar ); | 376 | todo->setCalID( mDefaultCalendar ); |
377 | todo->setCalEnabled( true ); | 377 | todo->setCalEnabled( true ); |
378 | return true; | 378 | return true; |
379 | } | 379 | } |
380 | 380 | ||
381 | void CalendarLocal::deleteTodo( Todo *todo ) | 381 | void CalendarLocal::deleteTodo( Todo *todo ) |
382 | { | 382 | { |
383 | // Handle orphaned children | 383 | // Handle orphaned children |
384 | removeRelations( todo ); | 384 | removeRelations( todo ); |
385 | clearUndo(todo); | 385 | clearUndo(todo); |
386 | 386 | ||
387 | if ( mTodoList.removeRef( todo ) ) { | 387 | if ( mTodoList.removeRef( todo ) ) { |
388 | setModified( true ); | 388 | setModified( true ); |
389 | } | 389 | } |
390 | } | 390 | } |
391 | 391 | ||
392 | QPtrList<Todo> CalendarLocal::rawTodos() | 392 | QPtrList<Todo> CalendarLocal::rawTodos() |
393 | { | 393 | { |
394 | QPtrList<Todo> el; | 394 | QPtrList<Todo> el; |
395 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 395 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
396 | if ( it->calEnabled() ) el.append( it ); | 396 | if ( it->calEnabled() ) el.append( it ); |
397 | return el; | 397 | return el; |
398 | } | 398 | } |
399 | Todo *CalendarLocal::todo( QString syncProf, QString id ) | 399 | Todo *CalendarLocal::todo( QString syncProf, QString id ) |
400 | { | 400 | { |
401 | Todo *todo; | 401 | Todo *todo; |
402 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | 402 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { |
403 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; | 403 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; |
404 | } | 404 | } |
405 | 405 | ||
406 | return 0; | 406 | return 0; |
407 | } | 407 | } |
408 | void CalendarLocal::removeSyncInfo( QString syncProfile) | 408 | void CalendarLocal::removeSyncInfo( QString syncProfile) |
409 | { | 409 | { |
410 | QPtrList<Incidence> all = rawIncidences() ; | 410 | QPtrList<Incidence> all = rawIncidences() ; |
411 | Incidence *inc; | 411 | Incidence *inc; |
412 | for ( inc = all.first(); inc; inc = all.next() ) { | 412 | for ( inc = all.first(); inc; inc = all.next() ) { |
413 | inc->removeID( syncProfile ); | 413 | inc->removeID( syncProfile ); |
414 | } | 414 | } |
415 | if ( syncProfile.isEmpty() ) { | 415 | if ( syncProfile.isEmpty() ) { |
416 | QPtrList<Event> el; | 416 | QPtrList<Event> el; |
417 | Event *todo; | 417 | Event *todo; |
418 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | 418 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { |
419 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) | 419 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) |
420 | el.append( todo ); | 420 | el.append( todo ); |
421 | } | 421 | } |
422 | for ( todo = el.first(); todo; todo = el.next() ) { | 422 | for ( todo = el.first(); todo; todo = el.next() ) { |
423 | deleteIncidence ( todo ); | 423 | deleteIncidence ( todo ); |
424 | } | 424 | } |
425 | } else { | 425 | } else { |
426 | Event *lse = event( "last-syncEvent-"+ syncProfile); | 426 | Event *lse = event( "last-syncEvent-"+ syncProfile); |
427 | if ( lse ) | 427 | if ( lse ) |
428 | deleteIncidence ( lse ); | 428 | deleteIncidence ( lse ); |
429 | } | 429 | } |
430 | } | 430 | } |
431 | QPtrList<Event> CalendarLocal::getExternLastSyncEvents() | 431 | QPtrList<Event> CalendarLocal::getExternLastSyncEvents() |
432 | { | 432 | { |
433 | QPtrList<Event> el; | 433 | QPtrList<Event> el; |
434 | Event *todo; | 434 | Event *todo; |
435 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | 435 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { |
436 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) | 436 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) |
437 | if ( todo->summary().left(3) == "E: " ) | 437 | if ( todo->summary().left(3) == "E: " ) |
438 | el.append( todo ); | 438 | el.append( todo ); |
439 | } | 439 | } |
440 | 440 | ||
441 | return el; | 441 | return el; |
442 | 442 | ||
443 | } | 443 | } |
444 | Event *CalendarLocal::event( QString syncProf, QString id ) | 444 | Event *CalendarLocal::event( QString syncProf, QString id ) |
445 | { | 445 | { |
446 | Event *todo; | 446 | Event *todo; |
447 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | 447 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { |
448 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; | 448 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; |
449 | } | 449 | } |
450 | 450 | ||
451 | return 0; | 451 | return 0; |
452 | } | 452 | } |
453 | Todo *CalendarLocal::todo( const QString &uid ) | 453 | Todo *CalendarLocal::todo( const QString &uid ) |
454 | { | 454 | { |
455 | Todo *todo;; | 455 | Todo *todo; |
456 | Todo *retVal = 0; | 456 | Todo *retVal = 0; |
457 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | 457 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { |
458 | if ( todo->calEnabled() && todo->uid() == uid ) { | 458 | if ( todo->calEnabled() && todo->uid() == uid ) { |
459 | if ( retVal ) { | 459 | if ( retVal ) { |
460 | if ( retVal->calID() > todo->calID() ) { | 460 | if ( retVal->calID() > todo->calID() ) { |
461 | retVal = todo; | 461 | retVal = todo; |
462 | } | 462 | } |
463 | } else { | 463 | } else { |
464 | retVal = todo; | 464 | retVal = todo; |
465 | } | 465 | } |
466 | } | 466 | } |
467 | } | 467 | } |
468 | return retVal; | 468 | return retVal; |
469 | } | 469 | } |
470 | void CalendarLocal::getIncidenceCount( int calId, int& events, int & todos, int & journals) | ||
471 | { | ||
472 | events = 0; | ||
473 | todos = 0; | ||
474 | journals = 0; | ||
475 | { | ||
476 | Todo *todo; | ||
477 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | ||
478 | if ( todo->calID() == calId ) | ||
479 | ++todos; | ||
480 | } | ||
481 | } | ||
482 | { | ||
483 | Event *todo; | ||
484 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | ||
485 | if ( todo->calID() == calId ) | ||
486 | ++events; | ||
487 | |||
488 | } | ||
489 | } | ||
490 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | ||
491 | if ( it->calID() == calId ) ++journals; | ||
492 | |||
493 | } | ||
470 | QString CalendarLocal::nextSummary() const | 494 | QString CalendarLocal::nextSummary() const |
471 | { | 495 | { |
472 | return mNextSummary; | 496 | return mNextSummary; |
473 | } | 497 | } |
474 | QDateTime CalendarLocal::nextAlarmEventDateTime() const | 498 | QDateTime CalendarLocal::nextAlarmEventDateTime() const |
475 | { | 499 | { |
476 | return mNextAlarmEventDateTime; | 500 | return mNextAlarmEventDateTime; |
477 | } | 501 | } |
478 | void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted) | 502 | void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted) |
479 | { | 503 | { |
480 | //mNextAlarmIncidence | 504 | //mNextAlarmIncidence |
481 | //mNextAlarmDateTime | 505 | //mNextAlarmDateTime |
482 | //return mNextSummary; | 506 | //return mNextSummary; |
483 | //return mNextAlarmEventDateTime; | 507 | //return mNextAlarmEventDateTime; |
484 | bool newNextAlarm = false; | 508 | bool newNextAlarm = false; |
485 | bool computeNextAlarm = false; | 509 | bool computeNextAlarm = false; |
486 | bool ok; | 510 | bool ok; |
487 | int offset; | 511 | int offset; |
488 | QDateTime nextA; | 512 | QDateTime nextA; |
489 | // QString nextSum; | 513 | // QString nextSum; |
490 | //QDateTime nextEvent; | 514 | //QDateTime nextEvent; |
491 | if ( mNextAlarmIncidence == 0 || incidence == 0 ) { | 515 | if ( mNextAlarmIncidence == 0 || incidence == 0 ) { |
492 | computeNextAlarm = true; | 516 | computeNextAlarm = true; |
493 | } else { | 517 | } else { |
494 | if ( ! deleted ) { | 518 | if ( ! deleted ) { |
495 | nextA = incidence->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; | 519 | nextA = incidence->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; |
496 | if ( ok ) { | 520 | if ( ok ) { |
497 | if ( nextA < mNextAlarmDateTime ) { | 521 | if ( nextA < mNextAlarmDateTime ) { |
498 | deRegisterAlarm(); | 522 | deRegisterAlarm(); |
499 | mNextAlarmDateTime = nextA; | 523 | mNextAlarmDateTime = nextA; |
500 | mNextSummary = incidence->summary(); | 524 | mNextSummary = incidence->summary(); |
501 | mNextAlarmEventDateTime = nextA.addSecs(offset ) ; | 525 | mNextAlarmEventDateTime = nextA.addSecs(offset ) ; |
502 | mNextAlarmEventDateTimeString = KGlobal::locale()->formatDateTime(mNextAlarmEventDateTime); | 526 | mNextAlarmEventDateTimeString = KGlobal::locale()->formatDateTime(mNextAlarmEventDateTime); |
503 | newNextAlarm = true; | 527 | newNextAlarm = true; |
504 | mNextAlarmIncidence = incidence; | 528 | mNextAlarmIncidence = incidence; |
505 | } else { | 529 | } else { |
506 | if ( incidence == mNextAlarmIncidence ) { | 530 | if ( incidence == mNextAlarmIncidence ) { |
507 | computeNextAlarm = true; | 531 | computeNextAlarm = true; |
508 | } | 532 | } |
509 | } | 533 | } |
510 | } else { | 534 | } else { |
511 | if ( mNextAlarmIncidence == incidence ) { | 535 | if ( mNextAlarmIncidence == incidence ) { |
512 | computeNextAlarm = true; | 536 | computeNextAlarm = true; |
513 | } | 537 | } |
514 | } | 538 | } |
515 | } else { // deleted | 539 | } else { // deleted |
516 | if ( incidence == mNextAlarmIncidence ) { | 540 | if ( incidence == mNextAlarmIncidence ) { |
517 | computeNextAlarm = true; | 541 | computeNextAlarm = true; |
518 | } | 542 | } |
519 | } | 543 | } |
520 | } | 544 | } |
521 | if ( computeNextAlarm ) { | 545 | if ( computeNextAlarm ) { |
522 | deRegisterAlarm(); | 546 | deRegisterAlarm(); |
523 | nextA = nextAlarm( 1000 ); | 547 | nextA = nextAlarm( 1000 ); |
524 | if (! mNextAlarmIncidence ) { | 548 | if (! mNextAlarmIncidence ) { |
525 | return; | 549 | return; |
526 | } | 550 | } |
527 | newNextAlarm = true; | 551 | newNextAlarm = true; |
528 | } | 552 | } |
529 | if ( newNextAlarm ) | 553 | if ( newNextAlarm ) |
530 | registerAlarm(); | 554 | registerAlarm(); |
531 | } | 555 | } |
532 | QString CalendarLocal:: getAlarmNotification() | 556 | QString CalendarLocal:: getAlarmNotification() |
533 | { | 557 | { |
534 | QString ret; | 558 | QString ret; |
535 | // this should not happen | 559 | // this should not happen |
536 | if (! mNextAlarmIncidence ) | 560 | if (! mNextAlarmIncidence ) |
537 | return "cal_alarm"+ mNextSummary.left( 25 )+"\n"+mNextAlarmEventDateTimeString; | 561 | return "cal_alarm"+ mNextSummary.left( 25 )+"\n"+mNextAlarmEventDateTimeString; |
538 | Alarm* alarm = mNextAlarmIncidence->alarms().first(); | 562 | Alarm* alarm = mNextAlarmIncidence->alarms().first(); |
539 | if ( alarm->type() == Alarm::Procedure ) { | 563 | if ( alarm->type() == Alarm::Procedure ) { |
540 | ret = "proc_alarm" + alarm->programFile()+"+++"; | 564 | ret = "proc_alarm" + alarm->programFile()+"+++"; |
541 | } else { | 565 | } else { |
542 | ret = "audio_alarm" +alarm->audioFile() +"+++"; | 566 | ret = "audio_alarm" +alarm->audioFile() +"+++"; |
543 | } | 567 | } |
544 | ret += "cal_alarm"+ mNextSummary.left( 25 ); | 568 | ret += "cal_alarm"+ mNextSummary.left( 25 ); |
545 | if ( mNextSummary.length() > 25 ) | 569 | if ( mNextSummary.length() > 25 ) |
546 | ret += "\n" + mNextSummary.mid(25, 25 ); | 570 | ret += "\n" + mNextSummary.mid(25, 25 ); |
547 | ret+= "\n"+mNextAlarmEventDateTimeString; | 571 | ret+= "\n"+mNextAlarmEventDateTimeString; |
548 | return ret; | 572 | return ret; |
549 | } | 573 | } |
550 | void CalendarLocal::registerAlarm() | 574 | void CalendarLocal::registerAlarm() |
551 | { | 575 | { |
552 | mLastAlarmNotificationString = getAlarmNotification(); | 576 | mLastAlarmNotificationString = getAlarmNotification(); |
553 | // qDebug("++ register Alarm %s %s",mNextAlarmDateTime.toString().latin1(), mLastAlarmNotificationString.latin1() ); | 577 | // qDebug("++ register Alarm %s %s",mNextAlarmDateTime.toString().latin1(), mLastAlarmNotificationString.latin1() ); |
554 | emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); | 578 | emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); |
555 | // #ifndef DESKTOP_VERSION | 579 | // #ifndef DESKTOP_VERSION |
556 | // AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() ); | 580 | // AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() ); |
557 | // #endif | 581 | // #endif |
558 | } | 582 | } |
559 | void CalendarLocal::deRegisterAlarm() | 583 | void CalendarLocal::deRegisterAlarm() |
560 | { | 584 | { |
561 | if ( mLastAlarmNotificationString.isNull() ) | 585 | if ( mLastAlarmNotificationString.isNull() ) |
562 | return; | 586 | return; |
563 | //qDebug("-- deregister Alarm %s ", mLastAlarmNotificationString.latin1() ); | 587 | //qDebug("-- deregister Alarm %s ", mLastAlarmNotificationString.latin1() ); |
564 | 588 | ||
565 | emit removeAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); | 589 | emit removeAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); |
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index a7a85c8..ca0bd98 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h | |||
@@ -92,139 +92,140 @@ class CalendarLocal : public Calendar | |||
92 | Return unfiltered list of all events in calendar. | 92 | Return unfiltered list of all events in calendar. |
93 | */ | 93 | */ |
94 | QPtrList<Event> rawEvents(); | 94 | QPtrList<Event> rawEvents(); |
95 | QPtrList<Event> getExternLastSyncEvents(); | 95 | QPtrList<Event> getExternLastSyncEvents(); |
96 | /** | 96 | /** |
97 | Add a todo to the todolist. | 97 | Add a todo to the todolist. |
98 | */ | 98 | */ |
99 | bool addTodo( Todo *todo ); | 99 | bool addTodo( Todo *todo ); |
100 | bool addTodoNoDup( Todo *todo ); | 100 | bool addTodoNoDup( Todo *todo ); |
101 | /** | 101 | /** |
102 | Remove a todo from the todolist. | 102 | Remove a todo from the todolist. |
103 | */ | 103 | */ |
104 | void deleteTodo( Todo * ); | 104 | void deleteTodo( Todo * ); |
105 | /** | 105 | /** |
106 | Searches todolist for an event with this unique string identifier, | 106 | Searches todolist for an event with this unique string identifier, |
107 | returns a pointer or null. | 107 | returns a pointer or null. |
108 | */ | 108 | */ |
109 | Todo *todo( const QString &uid ); | 109 | Todo *todo( const QString &uid ); |
110 | /** | 110 | /** |
111 | Return list of all todos. | 111 | Return list of all todos. |
112 | */ | 112 | */ |
113 | QPtrList<Todo> rawTodos(); | 113 | QPtrList<Todo> rawTodos(); |
114 | /** | 114 | /** |
115 | Returns list of todos due on the specified date. | 115 | Returns list of todos due on the specified date. |
116 | */ | 116 | */ |
117 | QPtrList<Todo> todos( const QDate &date ); | 117 | QPtrList<Todo> todos( const QDate &date ); |
118 | /** | 118 | /** |
119 | Return list of all todos. | 119 | Return list of all todos. |
120 | 120 | ||
121 | Workaround because compiler does not recognize function of base class. | 121 | Workaround because compiler does not recognize function of base class. |
122 | */ | 122 | */ |
123 | QPtrList<Todo> todos() { return Calendar::todos(); } | 123 | QPtrList<Todo> todos() { return Calendar::todos(); } |
124 | 124 | ||
125 | /** | 125 | /** |
126 | Add a Journal entry to calendar. | 126 | Add a Journal entry to calendar. |
127 | */ | 127 | */ |
128 | bool addJournal( Journal * ); | 128 | bool addJournal( Journal * ); |
129 | /** | 129 | /** |
130 | Remove a Journal from the calendar. | 130 | Remove a Journal from the calendar. |
131 | */ | 131 | */ |
132 | void deleteJournal( Journal * ); | 132 | void deleteJournal( Journal * ); |
133 | /** | 133 | /** |
134 | Return Journal for given date. | 134 | Return Journal for given date. |
135 | */ | 135 | */ |
136 | Journal *journal( const QDate & ); | 136 | Journal *journal( const QDate & ); |
137 | QPtrList<Journal> journals4Date( const QDate & ); | 137 | QPtrList<Journal> journals4Date( const QDate & ); |
138 | /** | 138 | /** |
139 | Return Journal with given UID. | 139 | Return Journal with given UID. |
140 | */ | 140 | */ |
141 | Journal *journal( const QString &uid ); | 141 | Journal *journal( const QString &uid ); |
142 | /** | 142 | /** |
143 | Return list of all Journals stored in calendar. | 143 | Return list of all Journals stored in calendar. |
144 | */ | 144 | */ |
145 | QPtrList<Journal> journals(); | 145 | QPtrList<Journal> journals(); |
146 | 146 | ||
147 | /** | 147 | /** |
148 | Return all alarms, which ocur in the given time interval. | 148 | Return all alarms, which ocur in the given time interval. |
149 | */ | 149 | */ |
150 | Alarm::List alarms( const QDateTime &from, const QDateTime &to ); | 150 | Alarm::List alarms( const QDateTime &from, const QDateTime &to ); |
151 | 151 | ||
152 | /** | 152 | /** |
153 | Return all alarms, which ocur before given date. | 153 | Return all alarms, which ocur before given date. |
154 | */ | 154 | */ |
155 | Alarm::List alarmsTo( const QDateTime &to ); | 155 | Alarm::List alarmsTo( const QDateTime &to ); |
156 | 156 | ||
157 | QDateTime nextAlarm( int daysTo ) ; | 157 | QDateTime nextAlarm( int daysTo ) ; |
158 | QDateTime nextAlarmEventDateTime() const; | 158 | QDateTime nextAlarmEventDateTime() const; |
159 | void checkAlarmForIncidence( Incidence *, bool deleted ) ; | 159 | void checkAlarmForIncidence( Incidence *, bool deleted ) ; |
160 | void registerAlarm(); | 160 | void registerAlarm(); |
161 | void deRegisterAlarm(); | 161 | void deRegisterAlarm(); |
162 | QString getAlarmNotification(); | 162 | QString getAlarmNotification(); |
163 | QString nextSummary() const ; | 163 | QString nextSummary() const ; |
164 | /** | 164 | /** |
165 | This method should be called whenever a Event is modified directly | 165 | This method should be called whenever a Event is modified directly |
166 | via it's pointer. It makes sure that the calendar is internally | 166 | via it's pointer. It makes sure that the calendar is internally |
167 | consistent. | 167 | consistent. |
168 | */ | 168 | */ |
169 | void update( IncidenceBase *incidence ); | 169 | void update( IncidenceBase *incidence ); |
170 | 170 | ||
171 | /** | 171 | /** |
172 | Builds and then returns a list of all events that match for the | 172 | Builds and then returns a list of all events that match for the |
173 | date specified. useful for dayView, etc. etc. | 173 | date specified. useful for dayView, etc. etc. |
174 | */ | 174 | */ |
175 | QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); | 175 | QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); |
176 | /** | 176 | /** |
177 | Get unfiltered events for date \a qdt. | 177 | Get unfiltered events for date \a qdt. |
178 | */ | 178 | */ |
179 | QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); | 179 | QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); |
180 | /** | 180 | /** |
181 | Get unfiltered events in a range of dates. If inclusive is set to true, | 181 | Get unfiltered events in a range of dates. If inclusive is set to true, |
182 | only events are returned, which are completely included in the range. | 182 | only events are returned, which are completely included in the range. |
183 | */ | 183 | */ |
184 | QPtrList<Event> rawEvents( const QDate &start, const QDate &end, | 184 | QPtrList<Event> rawEvents( const QDate &start, const QDate &end, |
185 | bool inclusive = false ); | 185 | bool inclusive = false ); |
186 | Todo *todo( QString, QString ); | 186 | Todo *todo( QString, QString ); |
187 | Event *event( QString, QString ); | 187 | Event *event( QString, QString ); |
188 | void getIncidenceCount( int calId, int& events, int & todos, int & journals); | ||
188 | 189 | ||
189 | public slots: | 190 | public slots: |
190 | void setCalendarEnabled( int id, bool enable ); | 191 | void setCalendarEnabled( int id, bool enable ); |
191 | void setAlarmEnabled( int id, bool enable ); | 192 | void setAlarmEnabled( int id, bool enable ); |
192 | void setReadOnly( int id, bool enable ); | 193 | void setReadOnly( int id, bool enable ); |
193 | void setDefaultCalendarEnabledOnly(); | 194 | void setDefaultCalendarEnabledOnly(); |
194 | void setCalendarRemove( int id ); | 195 | void setCalendarRemove( int id ); |
195 | 196 | ||
196 | protected: | 197 | protected: |
197 | 198 | ||
198 | // Event* mNextAlarmEvent; | 199 | // Event* mNextAlarmEvent; |
199 | QString mNextSummary; | 200 | QString mNextSummary; |
200 | QString mNextAlarmEventDateTimeString; | 201 | QString mNextAlarmEventDateTimeString; |
201 | QString mLastAlarmNotificationString; | 202 | QString mLastAlarmNotificationString; |
202 | QDateTime mNextAlarmEventDateTime; | 203 | QDateTime mNextAlarmEventDateTime; |
203 | QDateTime mNextAlarmDateTime; | 204 | QDateTime mNextAlarmDateTime; |
204 | void reInitAlarmSettings(); | 205 | void reInitAlarmSettings(); |
205 | 206 | ||
206 | /** Notification function of IncidenceBase::Observer. */ | 207 | /** Notification function of IncidenceBase::Observer. */ |
207 | void incidenceUpdated( IncidenceBase *i ) { update( i ); } | 208 | void incidenceUpdated( IncidenceBase *i ) { update( i ); } |
208 | 209 | ||
209 | /** inserts an event into its "proper place" in the calendar. */ | 210 | /** inserts an event into its "proper place" in the calendar. */ |
210 | void insertEvent( Event *event ); | 211 | void insertEvent( Event *event ); |
211 | 212 | ||
212 | /** Append alarms of incidence in interval to list of alarms. */ | 213 | /** Append alarms of incidence in interval to list of alarms. */ |
213 | void appendAlarms( Alarm::List &alarms, Incidence *incidence, | 214 | void appendAlarms( Alarm::List &alarms, Incidence *incidence, |
214 | const QDateTime &from, const QDateTime &to ); | 215 | const QDateTime &from, const QDateTime &to ); |
215 | 216 | ||
216 | /** Append alarms of recurring events in interval to list of alarms. */ | 217 | /** Append alarms of recurring events in interval to list of alarms. */ |
217 | void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence, | 218 | void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence, |
218 | const QDateTime &from, const QDateTime &to ); | 219 | const QDateTime &from, const QDateTime &to ); |
219 | 220 | ||
220 | private: | 221 | private: |
221 | void init(); | 222 | void init(); |
222 | 223 | ||
223 | QPtrList<Event> mEventList; | 224 | QPtrList<Event> mEventList; |
224 | QPtrList<Todo> mTodoList; | 225 | QPtrList<Todo> mTodoList; |
225 | QPtrList<Journal> mJournalList; | 226 | QPtrList<Journal> mJournalList; |
226 | }; | 227 | }; |
227 | 228 | ||
228 | } | 229 | } |
229 | 230 | ||
230 | #endif | 231 | #endif |