summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-03 15:58:48 (UTC)
committer zautrix <zautrix>2005-07-03 15:58:48 (UTC)
commit9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e (patch) (unidiff)
tree4e5e6a4e6eac36df79891d61ed1d1cd76ed6105d
parent0c632bafd2d058504118dc8957fc4808a784f548 (diff)
downloadkdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.zip
kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.gz
kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/koeventviewer.cpp26
-rw-r--r--korganizer/koeventviewer.h1
-rw-r--r--korganizer/koeventviewerdialog.cpp1
-rw-r--r--korganizer/koeventviewerdialog.h1
-rw-r--r--korganizer/kotodoview.cpp53
-rw-r--r--korganizer/kotodoview.h6
9 files changed, 80 insertions, 18 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 30bb856..71d7208 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,50 +1,55 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.1.13 ************
4
5Fixed a problem in KA/Pi search.
6
7
3********** VERSION 2.1.12 ************ 8********** VERSION 2.1.12 ************
4 9
5KO/Pi: 10KO/Pi:
6Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. 11Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus.
7Fixed a problem with the month view when file was saved but KO/Pi was not the active window. 12Fixed a problem with the month view when file was saved but KO/Pi was not the active window.
8Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). 13Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only).
9Fixed some other small problems. 14Fixed some other small problems.
10 15
11********** VERSION 2.1.11 ************ 16********** VERSION 2.1.11 ************
12 17
13KO/Pi: 18KO/Pi:
14Because we can have many calendars now in KO/Pi we can have more than one journal entry per day. 19Because we can have many calendars now in KO/Pi we can have more than one journal entry per day.
15Added features to handle (and add ) more than one journal entry per day. 20Added features to handle (and add ) more than one journal entry per day.
16Added option for a journal title. 21Added option for a journal title.
17 22
18Added info about the calendar, the item belongs to, to the event/todo/journal viewer. 23Added info about the calendar, the item belongs to, to the event/todo/journal viewer.
19Fixed a problem of the alarm of completed recurring todos. 24Fixed a problem of the alarm of completed recurring todos.
20Added to the event/todo editor to set quickly the category of an item. 25Added to the event/todo editor to set quickly the category of an item.
21 26
22 27
23Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet. 28Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet.
24 29
25Added KA/Pi multi sync to the multi sync called from the alarm applet. 30Added KA/Pi multi sync to the multi sync called from the alarm applet.
26 31
27********** VERSION 2.1.10 ************ 32********** VERSION 2.1.10 ************
28 33
29KO/Pi: 34KO/Pi:
30Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. 35Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
31When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. 36When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
32Fixed a bug in searching for a small timerange, i.e. one day. 37Fixed a bug in searching for a small timerange, i.e. one day.
33 38
34KA/Pi: 39KA/Pi:
35Fixed two problems in csv export. 40Fixed two problems in csv export.
36Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. 41Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
37 42
38********** VERSION 2.1.9 ************ 43********** VERSION 2.1.9 ************
39 44
40KO/Pi: 45KO/Pi:
41Fixed some problems of the new search options in the search dialog. 46Fixed some problems of the new search options in the search dialog.
42Fixed some problems in the new resource config options. 47Fixed some problems in the new resource config options.
43Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. 48Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
44Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 49Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
45Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. 50Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
46 51
47Fixed a problem in recurrence range in syncing with DTM. 52Fixed a problem in recurrence range in syncing with DTM.
48 53
49KA/Pi: 54KA/Pi:
50Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) 55Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index d7954c6..bc5cbb7 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1163,98 +1163,98 @@
1163{ "Edit Selection...","Editiere Auswahl" }, 1163{ "Edit Selection...","Editiere Auswahl" },
1164{ "recurring events","wiederholende Termine" }, 1164{ "recurring events","wiederholende Termine" },
1165{ "recurr. events","wiederh.Termine" }, 1165{ "recurr. events","wiederh.Termine" },
1166{ "completed to-dos","erledigte Todos" }, 1166{ "completed to-dos","erledigte Todos" },
1167{ "events","Termine" }, 1167{ "events","Termine" },
1168{ "todos","Todos" }, 1168{ "todos","Todos" },
1169{ "journals","Journale" }, 1169{ "journals","Journale" },
1170{ "public","öffentl." }, 1170{ "public","öffentl." },
1171{ "private","privat" }, 1171{ "private","privat" },
1172{ "confidential","vertraul." }, 1172{ "confidential","vertraul." },
1173{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, 1173{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
1174{ "Yesterday","Gestern" }, 1174{ "Yesterday","Gestern" },
1175{ "Day after tomorrow","Übermorgen" }, 1175{ "Day after tomorrow","Übermorgen" },
1176{ "Tomorrow","Morgen" }, 1176{ "Tomorrow","Morgen" },
1177{ "Day before yesterday","Vorgestern" }, 1177{ "Day before yesterday","Vorgestern" },
1178{ "Size %1","Größe %1" }, 1178{ "Size %1","Größe %1" },
1179{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1179{ "New Agendasize: %1","Neue Agendagröße: %1" },
1180{ " (%1 y.)"," (%1 J.)" }, 1180{ " (%1 y.)"," (%1 J.)" },
1181{ "Allday:","Ganztägig:" }, 1181{ "Allday:","Ganztägig:" },
1182{ "compl.todos","erled.Todos" }, 1182{ "compl.todos","erled.Todos" },
1183{ "Day view","Tagesansicht" }, 1183{ "Day view","Tagesansicht" },
1184{ "Next days","Nächste Tage" }, 1184{ "Next days","Nächste Tage" },
1185{ "Next week","Nächste Woche" }, 1185{ "Next week","Nächste Woche" },
1186{ "Next two weeks","Nächste zwei Wochen" }, 1186{ "Next two weeks","Nächste zwei Wochen" },
1187{ "This month","Dieser Monat" }, 1187{ "This month","Dieser Monat" },
1188{ "Journal view","Journal" }, 1188{ "Journal view","Journal" },
1189{ "Display all opened","Zeige alle geöffnet" }, 1189{ "Display all opened","Zeige alle geöffnet" },
1190{ "Display all closed","Zeige alle geschlossen" }, 1190{ "Display all closed","Zeige alle geschlossen" },
1191{ "Display all flat","Zeige alle flach" }, 1191{ "Display all flat","Zeige alle flach" },
1192{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1192{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1193{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1193{ "Default todo done color:","Standard Todo erledigt Farbe" },
1194{ "Select week %1-%2","Wähle Woche %1-%2" }, 1194{ "Select week %1-%2","Wähle Woche %1-%2" },
1195{ "Select Week","Wähle Woche" }, 1195{ "Select Week","Wähle Woche" },
1196{ "Set alarm...","Setze Alarm..." }, 1196{ "Set alarm...","Setze Alarm..." },
1197{ "Set Alarm!","Setze Alarm!" }, 1197{ "Set Alarm!","Setze Alarm!" },
1198{ "Changed alarm for %1 items","Alarm für %1 Items geändert" }, 1198{ "Changed alarm for %1 items","Alarm für %1 Items geändert" },
1199{ " and "," und " }, 1199{ " and "," und " },
1200{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1200{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1201{ "Mail to selected","Mail an Ausgewählte" }, 1201{ "Mail to selected","Mail an Ausgewählte" },
1202{ "Mail to all","Mail an Alle" }, 1202{ "Mail to all","Mail an Alle" },
1203{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1203{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1204{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1204{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1205{ " on"," am" }, 1205{ " on"," am" },
1206{ " completed on "," erledigt am " }, 1206{ " completed on "," erledigt am " },
1207{ "Save as Event template","Speichere als Vorlage" }, 1207{ "Save as Event template","Speichere als Vorlage" },
1208{ "Load Event template","Lade Termin Vorlage" }, 1208{ "Load Event template","Lade Termin Vorlage" },
1209{ "Save as Journal template","Speichere als Journal Vorlage" }, 1209{ "Save as Journal template","Speichere als Journal Vorlage" },
1210{ "Insert Journal template","Füge Journal Vorlage ein" }, 1210{ "Insert Journal template","Füge Journal Vorlage ein" },
1211{ "Sub todos:<br>","Unter Todos:<br>" }, 1211{ "Sub todos:<br>","Unter-Todos:<br>" },
1212{ "Parent todo:<br>","Über Todo:<br>" }, 1212{ "Parent todo:<br>","Über-Todo:<br>" },
1213{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1213{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1214{ " completed"," erledigt" }, 1214{ " completed"," erledigt" },
1215{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1215{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1216{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1216{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1217{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1217{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1218{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1218{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1219{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, 1219{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
1220{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1220{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1221{ "Error","Fehler" }, 1221{ "Error","Fehler" },
1222{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1222{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1223{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1223{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1224{ "Warning","Warnung" }, 1224{ "Warning","Warnung" },
1225{ "Select week number","Wähle Wochen Nummer" }, 1225{ "Select week number","Wähle Wochen Nummer" },
1226{ "Februar","Februar" }, 1226{ "Februar","Februar" },
1227{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1227{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1228{ "W","W" }, 1228{ "W","W" },
1229{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1229{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1230{ "T: %1","T: %1" }, 1230{ "T: %1","T: %1" },
1231{ "Start: ","Start: " }, 1231{ "Start: ","Start: " },
1232{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1232{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1233{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1233{ "Password for remote access:","Passwort für fernen Zugriff:" },
1234{ "Remote IP address:","Ferne IP Adresse:" }, 1234{ "Remote IP address:","Ferne IP Adresse:" },
1235{ "Remote port number:","Ferne Port Nummer:" }, 1235{ "Remote port number:","Ferne Port Nummer:" },
1236{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1236{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1237{ "Remote from: ","Fern von: " }, 1237{ "Remote from: ","Fern von: " },
1238{ "Local from: ","Lokal von: " }, 1238{ "Local from: ","Lokal von: " },
1239{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, 1239{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
1240{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1240{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1241{ "Write back","Schreibe zurück" }, 1241{ "Write back","Schreibe zurück" },
1242{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1242{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1243{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1243{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1244{ "Received sync request","Sync Anfrage erhalten" }, 1244{ "Received sync request","Sync Anfrage erhalten" },
1245{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, 1245{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
1246{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1246{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1247{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1247{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1248{ "Sending file...","Sende Datei..." }, 1248{ "Sending file...","Sende Datei..." },
1249{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1249{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1250{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1250{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1251{ "Received %1 bytes","%1 Bytes erhalten" }, 1251{ "Received %1 bytes","%1 Bytes erhalten" },
1252{ "Writing file to disk...","Speichere Datei..." }, 1252{ "Writing file to disk...","Speichere Datei..." },
1253{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1253{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1254{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1254{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1255{ "Synchronize!","Synchronisiere!" }, 1255{ "Synchronize!","Synchronisiere!" },
1256{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1256{ "High clock skew!","Großer Uhrzeitunterschied!" },
1257{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1257{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1258{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, 1258{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
1259{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1259{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1260{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1260{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 72221fd..1785b8a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3304,96 +3304,97 @@ void CalendarView::editEvent( Event *event )
3304 3304
3305 if ( !event ) return; 3305 if ( !event ) return;
3306 if ( event->isReadOnly() ) { 3306 if ( event->isReadOnly() ) {
3307 showEvent( event ); 3307 showEvent( event );
3308 return; 3308 return;
3309 } 3309 }
3310 showEventEditor(); 3310 showEventEditor();
3311 mEventEditor->editEvent( event , mFlagEditDescription); 3311 mEventEditor->editEvent( event , mFlagEditDescription);
3312 mEventEditor->exec(); 3312 mEventEditor->exec();
3313 setActiveWindow(); 3313 setActiveWindow();
3314 3314
3315} 3315}
3316void CalendarView::editJournal( Journal *jour ) 3316void CalendarView::editJournal( Journal *jour )
3317{ 3317{
3318 if ( !jour ) return; 3318 if ( !jour ) return;
3319 mDialogManager->hideSearchDialog(); 3319 mDialogManager->hideSearchDialog();
3320 mViewManager->showJournalView(); 3320 mViewManager->showJournalView();
3321 mNavigator->slotDaySelect( jour->dtStart().date() ); 3321 mNavigator->slotDaySelect( jour->dtStart().date() );
3322} 3322}
3323void CalendarView::editTodo( Todo *todo ) 3323void CalendarView::editTodo( Todo *todo )
3324{ 3324{
3325 if ( !todo ) return; 3325 if ( !todo ) return;
3326 3326
3327 if ( todo->isReadOnly() ) { 3327 if ( todo->isReadOnly() ) {
3328 showTodo( todo ); 3328 showTodo( todo );
3329 return; 3329 return;
3330 } 3330 }
3331 showTodoEditor(); 3331 showTodoEditor();
3332 mTodoEditor->editTodo( todo ,mFlagEditDescription); 3332 mTodoEditor->editTodo( todo ,mFlagEditDescription);
3333 mTodoEditor->exec(); 3333 mTodoEditor->exec();
3334 setActiveWindow(); 3334 setActiveWindow();
3335 3335
3336} 3336}
3337 3337
3338KOEventViewerDialog* CalendarView::getEventViewerDialog() 3338KOEventViewerDialog* CalendarView::getEventViewerDialog()
3339{ 3339{
3340 if ( !mEventViewerDialog ) { 3340 if ( !mEventViewerDialog ) {
3341 mEventViewerDialog = new KOEventViewerDialog(0); 3341 mEventViewerDialog = new KOEventViewerDialog(0);
3342 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 3342 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
3343 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 3343 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
3344 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 3344 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
3345 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 3345 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
3346 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 3346 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
3347 viewManager(), SLOT( showAgendaView( bool ) ) ); 3347 viewManager(), SLOT( showAgendaView( bool ) ) );
3348 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), 3348 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()),
3349 this, SLOT( slotViewerClosed() ) ); 3349 this, SLOT( slotViewerClosed() ) );
3350 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), 3350 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
3351 this, SLOT( todoChanged(Todo *) ) ); 3351 this, SLOT( todoChanged(Todo *) ) );
3352 connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
3352 mEventViewerDialog->resize( 640, 480 ); 3353 mEventViewerDialog->resize( 640, 480 );
3353 3354
3354 } 3355 }
3355 return mEventViewerDialog; 3356 return mEventViewerDialog;
3356} 3357}
3357void CalendarView::showEvent(Event *event) 3358void CalendarView::showEvent(Event *event)
3358{ 3359{
3359 getEventViewerDialog()->setEvent(event); 3360 getEventViewerDialog()->setEvent(event);
3360 getEventViewerDialog()->showMe(); 3361 getEventViewerDialog()->showMe();
3361} 3362}
3362 3363
3363void CalendarView::showTodo(Todo *event) 3364void CalendarView::showTodo(Todo *event)
3364{ 3365{
3365 getEventViewerDialog()->setTodo(event); 3366 getEventViewerDialog()->setTodo(event);
3366 getEventViewerDialog()->showMe(); 3367 getEventViewerDialog()->showMe();
3367} 3368}
3368void CalendarView::showJournal( Journal *jour ) 3369void CalendarView::showJournal( Journal *jour )
3369{ 3370{
3370 getEventViewerDialog()->setJournal(jour); 3371 getEventViewerDialog()->setJournal(jour);
3371 getEventViewerDialog()->showMe(); 3372 getEventViewerDialog()->showMe();
3372 3373
3373} 3374}
3374// void CalendarView::todoModified (Todo *event, int changed) 3375// void CalendarView::todoModified (Todo *event, int changed)
3375// { 3376// {
3376// // if (mDialogList.find (event) != mDialogList.end ()) { 3377// // if (mDialogList.find (event) != mDialogList.end ()) {
3377// // kdDebug() << "Todo modified and open" << endl; 3378// // kdDebug() << "Todo modified and open" << endl;
3378// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; 3379// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event];
3379// // temp->modified (changed); 3380// // temp->modified (changed);
3380 3381
3381// // } 3382// // }
3382 3383
3383// mViewManager->updateView(); 3384// mViewManager->updateView();
3384// } 3385// }
3385 3386
3386void CalendarView::appointment_show() 3387void CalendarView::appointment_show()
3387{ 3388{
3388 Event *anEvent = 0; 3389 Event *anEvent = 0;
3389 3390
3390 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 3391 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
3391 3392
3392 if (mViewManager->currentView()->isEventView()) { 3393 if (mViewManager->currentView()->isEventView()) {
3393 if ( incidence && incidence->typeID() == eventID ) { 3394 if ( incidence && incidence->typeID() == eventID ) {
3394 anEvent = static_cast<Event *>(incidence); 3395 anEvent = static_cast<Event *>(incidence);
3395 } 3396 }
3396 } 3397 }
3397 3398
3398 if (!anEvent) { 3399 if (!anEvent) {
3399 KNotifyClient::beep(); 3400 KNotifyClient::beep();
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index f6c252b..2d0bfff 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -65,96 +65,106 @@ KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
65 : QTextBrowser(parent,name) 65 : QTextBrowser(parent,name)
66{ 66{
67 mSyncMode = false; 67 mSyncMode = false;
68 mColorMode = 0; 68 mColorMode = 0;
69} 69}
70 70
71KOEventViewer::~KOEventViewer() 71KOEventViewer::~KOEventViewer()
72{ 72{
73} 73}
74 74
75void KOEventViewer::printMe() 75void KOEventViewer::printMe()
76{ 76{
77#ifdef DESKTOP_VERSION 77#ifdef DESKTOP_VERSION
78 78
79 KOPrintPrefs pp ( this ); 79 KOPrintPrefs pp ( this );
80 if (!pp.exec() ) 80 if (!pp.exec() )
81 return; 81 return;
82 int scaleval = pp.printMode() ; 82 int scaleval = pp.printMode() ;
83 83
84 QPrinter printer; 84 QPrinter printer;
85 if (!printer.setup() ) 85 if (!printer.setup() )
86 return; 86 return;
87 QPainter p; 87 QPainter p;
88 p.begin ( &printer ); 88 p.begin ( &printer );
89 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 89 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
90 float dx, dy; 90 float dx, dy;
91 int wid = (m.width() * 9)/10; 91 int wid = (m.width() * 9)/10;
92 dx = (float) wid/(float)contentsWidth (); 92 dx = (float) wid/(float)contentsWidth ();
93 dy = (float)(m.height()) / (float)contentsHeight (); 93 dy = (float)(m.height()) / (float)contentsHeight ();
94 float scale; 94 float scale;
95 // scale to fit the width or height of the paper 95 // scale to fit the width or height of the paper
96 if ( dx < dy ) 96 if ( dx < dy )
97 scale = dx; 97 scale = dx;
98 else 98 else
99 scale = dy; 99 scale = dy;
100 100
101 p.translate( m.width()/10,0 ); 101 p.translate( m.width()/10,0 );
102 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { 102 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
103 p.scale( scale, scale ); 103 p.scale( scale, scale );
104 } 104 }
105 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); 105 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
106 p.end(); 106 p.end();
107#endif 107#endif
108 108
109} 109}
110void KOEventViewer::setSource(const QString& n) 110void KOEventViewer::setSource(const QString& n)
111{ 111{
112 112
113 if ( n.left(8) == "todo_uid" ) {
114 int midstr = 9;
115#ifdef DESKTOP_VERSION
116 midstr = 11;
117#endif
118 qDebug("-%s- ", n.mid(midstr).latin1());
119 emit showIncidence( n.mid(midstr) );
120 return;
121 }
122
113 if ( n.left(3) == "uid" ) 123 if ( n.left(3) == "uid" )
114#ifdef DESKTOP_VERSION 124#ifdef DESKTOP_VERSION
115 { 125 {
116 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 126 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
117 KABC::AddressBook::Iterator it; 127 KABC::AddressBook::Iterator it;
118 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 128 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
119 // LR I do not understand, why the uid string is different on zaurus and desktop 129 // LR I do not understand, why the uid string is different on zaurus and desktop
120 QString uid = "uid://"+(*it).uid(); 130 QString uid = "uid://"+(*it).uid();
121 131
122 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); 132 //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1());
123 if (n == uid ) { 133 if (n == uid ) {
124 //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); 134 //qDebug("found %s ",(*it).mobileHomePhone().latin1() );
125 QDialog dia( this,"dia123", true ); 135 QDialog dia( this,"dia123", true );
126 dia.setCaption( i18n("Details of attendee") ); 136 dia.setCaption( i18n("Details of attendee") );
127 QVBoxLayout lay ( &dia ); 137 QVBoxLayout lay ( &dia );
128 KABC::AddresseeView av ( &dia ); 138 KABC::AddresseeView av ( &dia );
129 av.setAddressee( (*it) ); 139 av.setAddressee( (*it) );
130 lay.addWidget( &av ); 140 lay.addWidget( &av );
131 if ( QApplication::desktop()->width() < 480 ) 141 if ( QApplication::desktop()->width() < 480 )
132 dia.resize( 220, 240); 142 dia.resize( 220, 240);
133 else { 143 else {
134 dia.resize( 400,400); 144 dia.resize( 400,400);
135 } 145 }
136 dia.exec(); 146 dia.exec();
137 break; 147 break;
138 } 148 }
139 } 149 }
140 return; 150 return;
141 } 151 }
142#else 152#else
143 { 153 {
144 if ( "uid:organizer" == n ) { 154 if ( "uid:organizer" == n ) {
145 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); 155 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
146 return; 156 return;
147 } 157 }
148 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 158 QPtrList<Attendee> attendees = mCurrentIncidence->attendees();
149 if (attendees.count()) { 159 if (attendees.count()) {
150 Attendee *a; 160 Attendee *a;
151 for(a=attendees.first();a;a=attendees.next()) { 161 for(a=attendees.first();a;a=attendees.next()) {
152 if ( "uid:"+a->uid() == n ) { 162 if ( "uid:"+a->uid() == n ) {
153 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); 163 bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid());
154 return; 164 return;
155 } 165 }
156 } 166 }
157 } 167 }
158 return; 168 return;
159 } 169 }
160 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 170 //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
@@ -485,104 +495,116 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
485 mMailSubject += i18n(" - " )+event->dtDueStr( true ); 495 mMailSubject += i18n(" - " )+event->dtDueStr( true );
486 } 496 }
487 if (!event->location().isEmpty()) { 497 if (!event->location().isEmpty()) {
488 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); 498 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) );
489 mMailSubject += i18n(" at ") + event->location(); 499 mMailSubject += i18n(" at ") + event->location();
490 } 500 }
491 mText.append(i18n("<p><b>Priority:</b> %2</p>") 501 mText.append(i18n("<p><b>Priority:</b> %2</p>")
492 .arg(QString::number(event->priority()))); 502 .arg(QString::number(event->priority())));
493 503
494 if (event->isAlarmEnabled()) { 504 if (event->isAlarmEnabled()) {
495 Alarm *alarm =event->alarms().first() ; 505 Alarm *alarm =event->alarms().first() ;
496 QDateTime t = alarm->time(); 506 QDateTime t = alarm->time();
497 QString s =i18n("( %1 before )").arg( alarm->offsetText() ); 507 QString s =i18n("( %1 before )").arg( alarm->offsetText() );
498 if ( wideScreen ) { 508 if ( wideScreen ) {
499 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); 509 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate ));
500 } else { 510 } else {
501 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 511 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
502 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 512 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
503 } 513 }
504 } 514 }
505 515
506 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); 516 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
507 517
508 formatCategories(event); 518 formatCategories(event);
509 519
510 formatAttendees(event); 520 formatAttendees(event);
511 521
512 if ( KOPrefs::instance()->mEVshowCreated ) { 522 if ( KOPrefs::instance()->mEVshowCreated ) {
513 if(wideScreen ){ 523 if(wideScreen ){
514 524
515 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); 525 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
516 526
517 } else { 527 } else {
518 addTag("p",i18n("<b>Created: ") +" </b>"); 528 addTag("p",i18n("<b>Created: ") +" </b>");
519 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); 529 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
520 } 530 }
521 } 531 }
522 if ( KOPrefs::instance()->mEVshowChanged ) { 532 if ( KOPrefs::instance()->mEVshowChanged ) {
523 if(wideScreen ){ 533 if(wideScreen ){
524 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); 534 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
525 535
526 } else { 536 } else {
527 addTag("p",i18n("<b>Last modified: ") +" </b>"); 537 addTag("p",i18n("<b>Last modified: ") +" </b>");
528 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); 538 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
529 } 539 }
530 } 540 }
531 if ( event->relatedTo() ) { 541 if ( event->relatedTo() ) {
532 addTag("b",i18n("Parent todo:<br>")); 542 addTag("b",i18n("Parent todo:<br>"));
533 mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); 543
544 QString t_name = "[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] ";// +event->relatedTo()->summary());
545
546 mText += t_name;
547 mText += "<a href=\"todo_uid:" + event->relatedTo()->uid() + "\">";
548 mText += deTag(event->relatedTo()->summary());
549 mText += "</a><br>";
550
551 // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>");
534 } 552 }
535 QPtrList<Incidence> Relations = event->relations(); 553 QPtrList<Incidence> Relations = event->relations();
536 Incidence *to; 554 Incidence *to;
537 if ( Relations.first() ) 555 if ( Relations.first() )
538 addTag("b",i18n("Sub todos:<br>")); 556 addTag("b",i18n("Sub todos:<br>"));
539 for (to=Relations.first();to;to=Relations.next()) { 557 for (to=Relations.first();to;to=Relations.next()) {
540 mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); 558 QString t_name = "[" +QString::number(((Todo*)to)->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%] ";// +to->relatedTo()->summary());
559 mText += t_name;
560 mText += "<a href=\"todo_uid:" + to->uid() + "\">";
561 mText += deTag(to->summary());
562 mText += "</a><br>";
541 563
542 } 564 }
543 565
544 if ( KOPrefs::instance()->mEVshowDetails ) { 566 if ( KOPrefs::instance()->mEVshowDetails ) {
545 if (!event->description().isEmpty()) { 567 if (!event->description().isEmpty()) {
546 addTag("p",i18n("<b>Details: </b>")); 568 addTag("p",i18n("<b>Details: </b>"));
547 addTag("p",deTag(event->description())); 569 addTag("p",deTag(event->description()));
548 } 570 }
549 } 571 }
550 setText(mText); 572 setText(mText);
551} 573}
552 574
553void KOEventViewer::formatCategories(Incidence *event) 575void KOEventViewer::formatCategories(Incidence *event)
554{ 576{
555 if (!event->categoriesStr().isEmpty()) { 577 if (!event->categoriesStr().isEmpty()) {
556 if (event->categories().count() == 1) { 578 if (event->categories().count() == 1) {
557 addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace()); 579 addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace());
558 } else { 580 } else {
559 addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ; 581 addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ;
560 } 582 }
561 } 583 }
562} 584}
563void KOEventViewer::formatAttendees(Incidence *event) 585void KOEventViewer::formatAttendees(Incidence *event)
564{ 586{
565 QPtrList<Attendee> attendees = event->attendees(); 587 QPtrList<Attendee> attendees = event->attendees();
566 if (attendees.count()) { 588 if (attendees.count()) {
567 589
568 590
569 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); 591 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
570 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); 592 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
571 addTag("h3",i18n("Organizer")); 593 addTag("h3",i18n("Organizer"));
572 mText.append("<ul><li>"); 594 mText.append("<ul><li>");
573#ifndef KORG_NOKABC 595#ifndef KORG_NOKABC
574 596
575#ifdef DESKTOP_VERSION 597#ifdef DESKTOP_VERSION
576 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 598 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
577 KABC::Addressee::List addressList; 599 KABC::Addressee::List addressList;
578 addressList = add_book->findByEmail(event->organizer()); 600 addressList = add_book->findByEmail(event->organizer());
579 KABC::Addressee o = addressList.first(); 601 KABC::Addressee o = addressList.first();
580 if (!o.isEmpty() && addressList.size()<2) { 602 if (!o.isEmpty() && addressList.size()<2) {
581 mText += "<a href=\"uid:" + o.uid() + "\">"; 603 mText += "<a href=\"uid:" + o.uid() + "\">";
582 mText += o.formattedName(); 604 mText += o.formattedName();
583 mText += "</a>\n"; 605 mText += "</a>\n";
584 } else { 606 } else {
585 mText.append(event->organizer()); 607 mText.append(event->organizer());
586 } 608 }
587#else //DESKTOP_VERSION 609#else //DESKTOP_VERSION
588 mText += "<a href=\"uid:organizer\">"; 610 mText += "<a href=\"uid:organizer\">";
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 1eeb8d1..64eb4ff 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -81,51 +81,52 @@ private:
81 QRadioButton* pmScaledDown; 81 QRadioButton* pmScaledDown;
82}; 82};
83 83
84#endif 84#endif
85 85
86class KOEventViewer : public QTextBrowser { 86class KOEventViewer : public QTextBrowser {
87 Q_OBJECT 87 Q_OBJECT
88 public: 88 public:
89 KOEventViewer(QWidget *parent=0,const char *name=0); 89 KOEventViewer(QWidget *parent=0,const char *name=0);
90 virtual ~KOEventViewer(); 90 virtual ~KOEventViewer();
91 91
92 void setSource(const QString &); 92 void setSource(const QString &);
93 void setEvent(Event *event); 93 void setEvent(Event *event);
94 void addEvent(Event *event); 94 void addEvent(Event *event);
95 void setTodo(Todo *event, bool clearV = true ); 95 void setTodo(Todo *event, bool clearV = true );
96 void setJournal(Journal *jour, bool clearV = true ); 96 void setJournal(Journal *jour, bool clearV = true );
97 97
98 void appendEvent(Event *event, int mode = 0 ); 98 void appendEvent(Event *event, int mode = 0 );
99 void appendTodo(Todo *event, int mode = 0 ); 99 void appendTodo(Todo *event, int mode = 0 );
100 void appendJournal(Journal *jour, int mode = 0 ); 100 void appendJournal(Journal *jour, int mode = 0 );
101 101
102 void clearEvents(bool now=false); 102 void clearEvents(bool now=false);
103 103
104 void addText(QString text); 104 void addText(QString text);
105 void setSyncMode( bool ); 105 void setSyncMode( bool );
106 void setColorMode( int ); 106 void setColorMode( int );
107 void mailToAttendees( bool all ); 107 void mailToAttendees( bool all );
108 void printMe(); 108 void printMe();
109 109
110 protected: 110 protected:
111 int mColorMode; 111 int mColorMode;
112 void addTag(const QString & tag,const QString & text); 112 void addTag(const QString & tag,const QString & text);
113 113
114 void formatCategories(Incidence *event); 114 void formatCategories(Incidence *event);
115 void formatAttendees(Incidence *event); 115 void formatAttendees(Incidence *event);
116 void formatReadOnly(Incidence *event); 116 void formatReadOnly(Incidence *event);
117 void keyPressEvent ( QKeyEvent * e ); 117 void keyPressEvent ( QKeyEvent * e );
118 118
119 private: 119 private:
120 QTextBrowser *mEventTextView; 120 QTextBrowser *mEventTextView;
121 bool mSyncMode; 121 bool mSyncMode;
122 QString deTag(QString text); 122 QString deTag(QString text);
123 123
124 QString mText; 124 QString mText;
125 QString mMailSubject; 125 QString mMailSubject;
126 Incidence* mCurrentIncidence; 126 Incidence* mCurrentIncidence;
127 signals: 127 signals:
128 void launchaddressbook(QString uid); 128 void launchaddressbook(QString uid);
129 void showIncidence(QString uid);
129}; 130};
130 131
131#endif 132#endif
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 02f13c7..0763825 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -6,96 +6,97 @@
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <klocale.h> 20#include <klocale.h>
21 21
22#include <libkcal/event.h> 22#include <libkcal/event.h>
23#include <qtimer.h> 23#include <qtimer.h>
24#include <qpushbutton.h> 24#include <qpushbutton.h>
25 25
26#include "koeventviewer.h" 26#include "koeventviewer.h"
27#include <kmessagebox.h> 27#include <kmessagebox.h>
28#include "koprefs.h" 28#include "koprefs.h"
29#include <libkcal/todo.h> 29#include <libkcal/todo.h>
30#include "qapp.h" 30#include "qapp.h"
31 31
32#include "koeventviewerdialog.h" 32#include "koeventviewerdialog.h"
33extern int globalFlagBlockAgenda; 33extern int globalFlagBlockAgenda;
34 34
35KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) 35KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
36 : KDialogBase(parent,name, 36 : KDialogBase(parent,name,
37#ifndef DESKTOP_VERSION 37#ifndef DESKTOP_VERSION
38 true , 38 true ,
39#else 39#else
40 false, 40 false,
41#endif 41#endif
42 i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) 42 i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda"))
43{ 43{
44 sendSignalViewerClosed = true; 44 sendSignalViewerClosed = true;
45 mEventViewer = new KOEventViewer(this); 45 mEventViewer = new KOEventViewer(this);
46 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); 46 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont );
47 setMainWidget(mEventViewer); 47 setMainWidget(mEventViewer);
48 setButtonText(Ok, i18n("Edit") ); 48 setButtonText(Ok, i18n("Edit") );
49 49
50 QObject::connect(findButton( Ok ),SIGNAL(clicked()), 50 QObject::connect(findButton( Ok ),SIGNAL(clicked()),
51 SLOT(editIncidence())); 51 SLOT(editIncidence()));
52 QObject::connect(this,SIGNAL(user1Clicked()), 52 QObject::connect(this,SIGNAL(user1Clicked()),
53 SLOT(showIncidence())); 53 SLOT(showIncidence()));
54 connect( mEventViewer, SIGNAL( showIncidence( QString ) ),SIGNAL( showIncidence( QString ) ));
54 mIncidence = 0; 55 mIncidence = 0;
55 // TODO: Set a sensible size (based on the content?). 56 // TODO: Set a sensible size (based on the content?).
56 //showMaximized(); 57 //showMaximized();
57 //qDebug("++++++++++++KOEventViewerDialog() "); 58 //qDebug("++++++++++++KOEventViewerDialog() ");
58 // if ( KOPrefs::instance()->mCompactDialogs ) { 59 // if ( KOPrefs::instance()->mCompactDialogs ) {
59// setFixedSize( 240,284 ); 60// setFixedSize( 240,284 );
60// move( 0, 15 ); 61// move( 0, 15 );
61// } else { 62// } else {
62// setMinimumSize(300,200); 63// setMinimumSize(300,200);
63// resize(320,300); 64// resize(320,300);
64// } 65// }
65 mSyncMode = false; 66 mSyncMode = false;
66 mSyncResult = 0; 67 mSyncResult = 0;
67 68
68} 69}
69 70
70KOEventViewerDialog::~KOEventViewerDialog() 71KOEventViewerDialog::~KOEventViewerDialog()
71{ 72{
72 //qDebug("-------~KOEventViewerDialog() "); 73 //qDebug("-------~KOEventViewerDialog() ");
73} 74}
74void KOEventViewerDialog::showMe() 75void KOEventViewerDialog::showMe()
75{ 76{
76 77
77#ifdef DESKTOP_VERSION 78#ifdef DESKTOP_VERSION
78 int x,y,w,h; 79 int x,y,w,h;
79 x = geometry().x(); 80 x = geometry().x();
80 y = geometry().y(); 81 y = geometry().y();
81 w = width(); 82 w = width();
82 h = height(); 83 h = height();
83 show(); 84 show();
84 setGeometry(x,y,w,h); 85 setGeometry(x,y,w,h);
85 raise(); 86 raise();
86#else 87#else
87 showMaximized(); 88 showMaximized();
88#endif 89#endif
89 QTimer::singleShot( 1, this, SLOT ( setMyFocus() ) ); 90 QTimer::singleShot( 1, this, SLOT ( setMyFocus() ) );
90 91
91} 92}
92void KOEventViewerDialog::setMyFocus() 93void KOEventViewerDialog::setMyFocus()
93{ 94{
94 95
95 setActiveWindow(); 96 setActiveWindow();
96 mEventViewer->setFocus(); 97 mEventViewer->setFocus();
97 98
98} 99}
99void KOEventViewerDialog::print() 100void KOEventViewerDialog::print()
100{ 101{
101 mEventViewer->printMe(); 102 mEventViewer->printMe();
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 29fee49..71696f4 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -9,69 +9,70 @@
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19#ifndef KOEVENTVIEWERDIALOG_H 19#ifndef KOEVENTVIEWERDIALOG_H
20#define KOEVENTVIEWERDIALOG_H 20#define KOEVENTVIEWERDIALOG_H
21// 21//
22// Viewer dialog for events. 22// Viewer dialog for events.
23// 23//
24 24
25#include <qtextview.h> 25#include <qtextview.h>
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28 28
29#include <libkcal/event.h> 29#include <libkcal/event.h>
30 30
31using namespace KCal; 31using namespace KCal;
32 32
33class KOEventViewer; 33class KOEventViewer;
34 34
35class KOEventViewerDialog : public KDialogBase { 35class KOEventViewerDialog : public KDialogBase {
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 KOEventViewerDialog(QWidget *parent=0,const char *name=0); 38 KOEventViewerDialog(QWidget *parent=0,const char *name=0);
39 virtual ~KOEventViewerDialog(); 39 virtual ~KOEventViewerDialog();
40 40
41 void setEvent(Event *event); 41 void setEvent(Event *event);
42 void addEvent(Event *event); 42 void addEvent(Event *event);
43 void setTodo(Todo *event); 43 void setTodo(Todo *event);
44 void setJournal(Journal *journal); 44 void setJournal(Journal *journal);
45 void setIncidence(Incidence *inc); 45 void setIncidence(Incidence *inc);
46 void addIncidence(Incidence *inc); 46 void addIncidence(Incidence *inc);
47 void addText(QString text); 47 void addText(QString text);
48 void showMe(); 48 void showMe();
49 void setSyncMode( bool ); 49 void setSyncMode( bool );
50 void setColorMode( int m ); 50 void setColorMode( int m );
51 int executeS( bool ); 51 int executeS( bool );
52 public slots: 52 public slots:
53 void updateConfig(); 53 void updateConfig();
54 void print(); 54 void print();
55 void setMyFocus(); 55 void setMyFocus();
56 signals: 56 signals:
57 void showIncidence( QString );
57 void editIncidence( Incidence* ); 58 void editIncidence( Incidence* );
58 void jumpToTime( const QDate &); 59 void jumpToTime( const QDate &);
59 void showAgendaView( bool ); 60 void showAgendaView( bool );
60 void todoCompleted(Todo*); 61 void todoCompleted(Todo*);
61 void signalViewerClosed(); 62 void signalViewerClosed();
62private slots: 63private slots:
63 void slotViewerClosed(); 64 void slotViewerClosed();
64 void editIncidence(); 65 void editIncidence();
65 void showIncidence(); 66 void showIncidence();
66 protected: 67 protected:
67 void hideEvent ( QHideEvent * e ); 68 void hideEvent ( QHideEvent * e );
68 private: 69 private:
69 bool sendSignalViewerClosed; 70 bool sendSignalViewerClosed;
70 bool mSyncMode; 71 bool mSyncMode;
71 int mSyncResult; 72 int mSyncResult;
72 KOEventViewer *mEventViewer; 73 KOEventViewer *mEventViewer;
73 Incidence* mIncidence; 74 Incidence* mIncidence;
74 void keyPressEvent ( QKeyEvent * e ); 75 void keyPressEvent ( QKeyEvent * e );
75}; 76};
76 77
77#endif 78#endif
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index e2966f8..4f42c83 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -522,114 +522,128 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
522 mTodoListView->setColumnAlignment(1,AlignHCenter); 522 mTodoListView->setColumnAlignment(1,AlignHCenter);
523 mTodoListView->addColumn(i18n("Complete")); 523 mTodoListView->addColumn(i18n("Complete"));
524 mTodoListView->setColumnAlignment(2,AlignCenter); 524 mTodoListView->setColumnAlignment(2,AlignCenter);
525 525
526 mTodoListView->addColumn(i18n("Due Date")); 526 mTodoListView->addColumn(i18n("Due Date"));
527 mTodoListView->setColumnAlignment(3,AlignLeft); 527 mTodoListView->setColumnAlignment(3,AlignLeft);
528 mTodoListView->addColumn(i18n("Due Time")); 528 mTodoListView->addColumn(i18n("Due Time"));
529 mTodoListView->setColumnAlignment(4,AlignHCenter); 529 mTodoListView->setColumnAlignment(4,AlignHCenter);
530 530
531 mTodoListView->addColumn(i18n("Start Date")); 531 mTodoListView->addColumn(i18n("Start Date"));
532 mTodoListView->setColumnAlignment(5,AlignLeft); 532 mTodoListView->setColumnAlignment(5,AlignLeft);
533 mTodoListView->addColumn(i18n("Start Time")); 533 mTodoListView->addColumn(i18n("Start Time"));
534 mTodoListView->setColumnAlignment(6,AlignHCenter); 534 mTodoListView->setColumnAlignment(6,AlignHCenter);
535 535
536 mTodoListView->addColumn(i18n("Cancelled")); 536 mTodoListView->addColumn(i18n("Cancelled"));
537 mTodoListView->addColumn(i18n("Categories")); 537 mTodoListView->addColumn(i18n("Categories"));
538 mTodoListView->addColumn(i18n("Calendar")); 538 mTodoListView->addColumn(i18n("Calendar"));
539#if 0 539#if 0
540 mTodoListView->addColumn(i18n("Sort Id")); 540 mTodoListView->addColumn(i18n("Sort Id"));
541 mTodoListView->setColumnAlignment(4,AlignHCenter); 541 mTodoListView->setColumnAlignment(4,AlignHCenter);
542#endif 542#endif
543 543
544 mTodoListView->setMinimumHeight( 60 ); 544 mTodoListView->setMinimumHeight( 60 );
545 mTodoListView->setItemsRenameable( true ); 545 mTodoListView->setItemsRenameable( true );
546 mTodoListView->setRenameable( 0 ); 546 mTodoListView->setRenameable( 0 );
547 mTodoListView->setColumnWidth( 0, 120 ); 547 mTodoListView->setColumnWidth( 0, 120 );
548 int iii = 0; 548 int iii = 0;
549 for ( iii = 0; iii< 10 ; ++iii ) 549 for ( iii = 0; iii< 10 ; ++iii )
550 mTodoListView->setColumnWidthMode( iii, QListView::Manual ); 550 mTodoListView->setColumnWidthMode( iii, QListView::Manual );
551 551
552 552
553 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); 553 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
554 554
555 mPriorityPopupMenu = new QPopupMenu(this); 555 mPriorityPopupMenu = new QPopupMenu(this);
556 for (int i = 1; i <= 5; i++) { 556 for (int i = 1; i <= 5; i++) {
557 QString label = QString ("%1").arg (i); 557 QString label = QString ("%1").arg (i);
558 mPriority[mPriorityPopupMenu->insertItem (label)] = i; 558 mPriority[mPriorityPopupMenu->insertItem (label)] = i;
559 } 559 }
560 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); 560 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
561 561
562 mPercentageCompletedPopupMenu = new QPopupMenu(this); 562 mPercentageCompletedPopupMenu = new QPopupMenu(this);
563 for (int i = 0; i <= 100; i+=20) { 563 for (int i = 0; i <= 100; i+=20) {
564 QString label = QString ("%1 %").arg (i); 564 QString label = QString ("%1 %").arg (i);
565 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; 565 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
566 } 566 }
567 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); 567 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
568 568
569 569
570 mCategoryPopupMenu = new QPopupMenu (this);
571 mCategoryPopupMenu->setCheckable (true);
572 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
573 connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ()));
574
575 mCalPopupMenu = new QPopupMenu (this);
576 mCalPopupMenu->setCheckable (true);
577 connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int)));
578 connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ()));
579
580
581
570 582
571 mItemPopupMenu = new QPopupMenu(this); 583 mItemPopupMenu = new QPopupMenu(this);
572 mItemPopupMenu->insertItem(i18n("Show..."), this, 584 mItemPopupMenu->insertItem(i18n("Show"), this,
573 SLOT (showTodo())); 585 SLOT (showTodo()));
574 mItemPopupMenu->insertItem(i18n("Edit..."), this, 586 mItemPopupMenu->insertItem(i18n("Edit..."), this,
575 SLOT (editTodo())); 587 SLOT (editTodo()));
576 mItemPopupMenu->insertItem( i18n("Delete"), this, 588 mItemPopupMenu->insertItem( i18n("Delete"), this,
577 SLOT (deleteTodo())); 589 SLOT (deleteTodo()));
578 mItemPopupMenu->insertItem( i18n("Clone..."), this, 590 mItemPopupMenu->insertItem( i18n("Clone..."), this,
579 SLOT (cloneTodo())); 591 SLOT (cloneTodo()));
580 mItemPopupMenu->insertItem( i18n("Move..."), this, 592 mItemPopupMenu->insertItem( i18n("Move..."), this,
581 SLOT (moveTodo())); 593 SLOT (moveTodo()));
582#ifndef DESKTOP_VERSION 594#ifndef DESKTOP_VERSION
583 mItemPopupMenu->insertItem( i18n("Beam..."), this, 595 mItemPopupMenu->insertItem( i18n("Beam..."), this,
584 SLOT (beamTodo())); 596 SLOT (beamTodo()));
585#endif 597#endif
586 mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, 598 mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this,
587 SLOT (cancelTodo())); 599 SLOT (cancelTodo()));
600 mItemPopupMenu->insertItem( i18n("Categories"), mCategoryPopupMenu);
601 mItemPopupMenu->insertItem( i18n("Calendar"), mCalPopupMenu);
588 mItemPopupMenu->insertSeparator(); 602 mItemPopupMenu->insertSeparator();
589 mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, 603 mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this,
590 SLOT (toggleRunningItem())); 604 SLOT (toggleRunningItem()));
591 mItemPopupMenu->insertSeparator(); 605 mItemPopupMenu->insertSeparator();
592 /* 606 /*
593 mItemPopupMenu->insertItem( i18n("New Todo..."), this, 607 mItemPopupMenu->insertItem( i18n("New Todo..."), this,
594 SLOT (newTodo())); 608 SLOT (newTodo()));
595 */ 609 */
596 mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, 610 mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this,
597 SLOT (newSubTodo())); 611 SLOT (newSubTodo()));
598 mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, 612 mItemPopupMenu->insertItem(i18n("Unparent Todo"), this,
599 SLOT (unparentTodo()),0,21); 613 SLOT (unparentTodo()),0,21);
600 mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, 614 mItemPopupMenu->insertItem(i18n("Reparent Todo"), this,
601 SLOT (reparentTodo()),0,22); 615 SLOT (reparentTodo()),0,22);
602 mItemPopupMenu->insertSeparator(); 616 mItemPopupMenu->insertSeparator();
603#if 0 617#if 0
604 mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed..."), 618 mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed..."),
605 this, SLOT( purgeCompleted() ) ); 619 this, SLOT( purgeCompleted() ) );
606 mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), 620 mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"),
607 this, SLOT( toggleCompleted() ),0, 33 ); 621 this, SLOT( toggleCompleted() ),0, 33 );
608 mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), 622 mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
609 this, SLOT( toggleQuickTodo() ),0, 34 ); 623 this, SLOT( toggleQuickTodo() ),0, 34 );
610 mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), 624 mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
611 this, SLOT( toggleRunning() ),0, 35 ); 625 this, SLOT( toggleRunning() ),0, 35 );
612 626
613#endif 627#endif
614 mPopupMenu = new QPopupMenu(this); 628 mPopupMenu = new QPopupMenu(this);
615 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, 629 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this,
616 SLOT (newTodo()),0,1); 630 SLOT (newTodo()),0,1);
617 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."), 631 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."),
618 this, SLOT(purgeCompleted()),0,2); 632 this, SLOT(purgeCompleted()),0,2);
619 mPopupMenu->insertItem(i18n("Show Completed"), 633 mPopupMenu->insertItem(i18n("Show Completed"),
620 this, SLOT( toggleCompleted() ),0,3 ); 634 this, SLOT( toggleCompleted() ),0,3 );
621 mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), 635 mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
622 this, SLOT( toggleRunning() ),0,5 ); 636 this, SLOT( toggleRunning() ),0,5 );
623 mPopupMenu->insertItem(i18n(" set all open","Display all opened"), 637 mPopupMenu->insertItem(i18n(" set all open","Display all opened"),
624 this, SLOT( setAllOpen() ),0,6 ); 638 this, SLOT( setAllOpen() ),0,6 );
625 mPopupMenu->insertItem(i18n(" set all close","Display all closed"), 639 mPopupMenu->insertItem(i18n(" set all close","Display all closed"),
626 this, SLOT( setAllClose() ),0,7 ); 640 this, SLOT( setAllClose() ),0,7 );
627 mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), 641 mPopupMenu->insertItem(i18n(" set all flat","Display all flat"),
628 this, SLOT( setAllFlat() ),0,8 ); 642 this, SLOT( setAllFlat() ),0,8 );
629 mPopupMenu->insertSeparator(); 643 mPopupMenu->insertSeparator();
630 mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), 644 mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
631 this, SLOT( toggleQuickTodo() ),0,4 ); 645 this, SLOT( toggleQuickTodo() ),0,4 );
632 mDocPrefs = new DocPrefs( name ); 646 mDocPrefs = new DocPrefs( name );
633 647
634 mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); 648 mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu );
635 mPopupMenu->setCheckable( true ); 649 mPopupMenu->setCheckable( true );
@@ -1008,97 +1022,99 @@ QPtrList<Todo> KOTodoView::selectedTodos()
1008} 1022}
1009 1023
1010void KOTodoView::changeEventDisplay(Event *, int) 1024void KOTodoView::changeEventDisplay(Event *, int)
1011{ 1025{
1012 updateView(); 1026 updateView();
1013} 1027}
1014 1028
1015void KOTodoView::showDates(const QDate &, const QDate &) 1029void KOTodoView::showDates(const QDate &, const QDate &)
1016{ 1030{
1017} 1031}
1018 1032
1019void KOTodoView::showEvents(QPtrList<Event>) 1033void KOTodoView::showEvents(QPtrList<Event>)
1020{ 1034{
1021 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; 1035 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl;
1022} 1036}
1023 1037
1024void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, 1038void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1025 const QDate &td) 1039 const QDate &td)
1026{ 1040{
1027#ifndef KORG_NOPRINTER 1041#ifndef KORG_NOPRINTER
1028 calPrinter->preview(CalPrinter::Todolist, fd, td); 1042 calPrinter->preview(CalPrinter::Todolist, fd, td);
1029#endif 1043#endif
1030} 1044}
1031 1045
1032void KOTodoView::editItem(QListViewItem *item ) 1046void KOTodoView::editItem(QListViewItem *item )
1033{ 1047{
1034 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 1048 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
1035} 1049}
1036 1050
1037void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 1051void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
1038{ 1052{
1039 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 1053 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
1040} 1054}
1041 1055
1042void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) 1056void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
1043{ 1057{
1044 pendingSubtodo = 0; 1058 pendingSubtodo = 0;
1045 mActiveItem = (KOTodoViewItem *)item; 1059 mActiveItem = (KOTodoViewItem *)item;
1046 if (item) { 1060 if (item) {
1047 switch (column){ 1061 switch (column){
1048 case 1: 1062 case 1:
1049 mPriorityPopupMenu->popup(QCursor::pos ()); break; 1063 mPriorityPopupMenu->popup(QCursor::pos ()); break;
1050 case 2: 1064 case 2:
1051 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; 1065 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break;
1052 case 3: 1066 case 3:
1053 moveTodo(); 1067 moveTodo();
1054 break; 1068 break;
1055 case 8: 1069 case 8:
1056 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; 1070 mCategoryPopupMenu->popup(QCursor::pos ()); break;
1071 case 9:
1072 mCalPopupMenu->popup(QCursor::pos ()); break;
1057 default: 1073 default:
1058 mItemPopupMenu->popup(QCursor::pos()); 1074 mItemPopupMenu->popup(QCursor::pos());
1059 } 1075 }
1060 } else mPopupMenu->popup(QCursor::pos()); 1076 } else mPopupMenu->popup(QCursor::pos());
1061} 1077}
1062void KOTodoView::newTodo() 1078void KOTodoView::newTodo()
1063{ 1079{
1064 emit newTodoSignal(); 1080 emit newTodoSignal();
1065} 1081}
1066 1082
1067void KOTodoView::newSubTodo() 1083void KOTodoView::newSubTodo()
1068{ 1084{
1069 if (mActiveItem) { 1085 if (mActiveItem) {
1070 emit newSubTodoSignal(mActiveItem->todo()); 1086 emit newSubTodoSignal(mActiveItem->todo());
1071 } 1087 }
1072} 1088}
1073void KOTodoView::unparentTodo() 1089void KOTodoView::unparentTodo()
1074{ 1090{
1075 if (mActiveItem) { 1091 if (mActiveItem) {
1076 emit unparentTodoSignal(mActiveItem->todo()); 1092 emit unparentTodoSignal(mActiveItem->todo());
1077 } 1093 }
1078} 1094}
1079 1095
1080void KOTodoView::reparentTodo() 1096void KOTodoView::reparentTodo()
1081{ 1097{
1082 if (mActiveItem) { 1098 if (mActiveItem) {
1083 topLevelWidget()->setCaption(i18n("Click on new parent item")); 1099 topLevelWidget()->setCaption(i18n("Click on new parent item"));
1084 pendingSubtodo = mActiveItem; 1100 pendingSubtodo = mActiveItem;
1085 } 1101 }
1086} 1102}
1087void KOTodoView::editTodo() 1103void KOTodoView::editTodo()
1088{ 1104{
1089 if (mActiveItem) { 1105 if (mActiveItem) {
1090 emit editTodoSignal(mActiveItem->todo()); 1106 emit editTodoSignal(mActiveItem->todo());
1091 } 1107 }
1092} 1108}
1093void KOTodoView::cloneTodo() 1109void KOTodoView::cloneTodo()
1094{ 1110{
1095 if (mActiveItem) { 1111 if (mActiveItem) {
1096 emit cloneTodoSignal((Incidence*)mActiveItem->todo()); 1112 emit cloneTodoSignal((Incidence*)mActiveItem->todo());
1097 } 1113 }
1098} 1114}
1099void KOTodoView::cancelTodo() 1115void KOTodoView::cancelTodo()
1100{ 1116{
1101 if (mActiveItem) { 1117 if (mActiveItem) {
1102 emit cancelTodoSignal((Incidence*)mActiveItem->todo()); 1118 emit cancelTodoSignal((Incidence*)mActiveItem->todo());
1103 } 1119 }
1104} 1120}
@@ -1119,115 +1135,128 @@ void KOTodoView::beamTodo()
1119void KOTodoView::showTodo() 1135void KOTodoView::showTodo()
1120{ 1136{
1121 if (mActiveItem) { 1137 if (mActiveItem) {
1122 emit showTodoSignal(mActiveItem->todo()); 1138 emit showTodoSignal(mActiveItem->todo());
1123 } 1139 }
1124} 1140}
1125 1141
1126void KOTodoView::deleteTodo() 1142void KOTodoView::deleteTodo()
1127{ 1143{
1128 if (mActiveItem) { 1144 if (mActiveItem) {
1129 emit deleteTodoSignal(mActiveItem->todo()); 1145 emit deleteTodoSignal(mActiveItem->todo());
1130 } 1146 }
1131} 1147}
1132 1148
1133void KOTodoView::setNewPriority(int index) 1149void KOTodoView::setNewPriority(int index)
1134{ 1150{
1135 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1151 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1136 mActiveItem->todo()->setPriority(mPriority[index]); 1152 mActiveItem->todo()->setPriority(mPriority[index]);
1137 mActiveItem->construct(); 1153 mActiveItem->construct();
1138 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); 1154 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
1139 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1155 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1140 } 1156 }
1141} 1157}
1142 1158
1143void KOTodoView::setNewPercentage(int index) 1159void KOTodoView::setNewPercentage(int index)
1144{ 1160{
1145 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1161 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1146 1162
1147 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { 1163 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
1148 mActiveItem->setOn( true ); 1164 mActiveItem->setOn( true );
1149 return; 1165 return;
1150 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { 1166 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
1151 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); 1167 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
1152 if ( par && par->isOn() ) 1168 if ( par && par->isOn() )
1153 par->setOn( false ); 1169 par->setOn( false );
1154 } 1170 }
1155 if (mPercentage[index] == 100) { 1171 if (mPercentage[index] == 100) {
1156 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 1172 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
1157 } else { 1173 } else {
1158 mActiveItem->todo()->setCompleted(false); 1174 mActiveItem->todo()->setCompleted(false);
1159 } 1175 }
1160 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 1176 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
1161 mActiveItem->construct(); 1177 mActiveItem->construct();
1162 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 1178 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
1163 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1179 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1164 } 1180 }
1165} 1181}
1166 1182
1167 1183void KOTodoView::fillCategories ()
1168QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
1169{ 1184{
1170 if ( !mCategoryPopupMenu ) {
1171 mCategoryPopupMenu = new QPopupMenu (this);
1172 mCategoryPopupMenu->setCheckable (true);
1173 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
1174 }
1175 mCategoryPopupMenu->clear(); 1185 mCategoryPopupMenu->clear();
1176 QStringList checkedCategories = todoItem->todo()->categories (); 1186 if ( ! mActiveItem ) return;
1177 1187 QStringList checkedCategories = mActiveItem->todo()->categories ();
1178 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 1188 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
1179 it != KOPrefs::instance()->mCustomCategories.end (); 1189 it != KOPrefs::instance()->mCustomCategories.end ();
1180 ++it) { 1190 ++it) {
1181 int index = mCategoryPopupMenu->insertItem (*it); 1191 int index = mCategoryPopupMenu->insertItem (*it);
1182 mCategory[index] = *it; 1192 mCategory[index] = *it;
1183 if (checkedCategories.find (*it) != checkedCategories.end ()) mCategoryPopupMenu->setItemChecked (index, true); 1193 if (checkedCategories.find (*it) != checkedCategories.end ()) mCategoryPopupMenu->setItemChecked (index, true);
1184 } 1194 }
1185 return mCategoryPopupMenu; 1195}
1196void KOTodoView::fillCal ()
1197{
1198 mCalPopupMenu->clear();
1199 if (!mActiveItem) return;
1200 bool readO = mActiveItem->todo()->isReadOnly();
1201 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
1202 while ( kkf ) {
1203 int index = mCalPopupMenu->insertItem( kkf->mName, kkf->mCalNumber);
1204 if ( kkf->mErrorOnLoad || kkf->isReadOnly || readO )
1205 mCalPopupMenu->setItemEnabled( index, false );
1206 mCalPopupMenu->setItemChecked (index, kkf->mCalNumber == mActiveItem->todo()->calID());
1207 kkf = KOPrefs::instance()->mCalendars.next();
1208 }
1209}
1210void KOTodoView::changedCal (int index )
1211{
1212 if (!mActiveItem) return;
1213 mActiveItem->todo()->setCalID( index );
1214 mActiveItem->construct();
1186} 1215}
1187void KOTodoView::changedCategories(int index) 1216void KOTodoView::changedCategories(int index)
1188{ 1217{
1189 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1218 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1190 QStringList categories = mActiveItem->todo()->categories (); 1219 QStringList categories = mActiveItem->todo()->categories ();
1191 QString colcat = categories.first(); 1220 QString colcat = categories.first();
1192 if (categories.find (mCategory[index]) != categories.end ()) 1221 if (categories.find (mCategory[index]) != categories.end ())
1193 categories.remove (mCategory[index]); 1222 categories.remove (mCategory[index]);
1194 else 1223 else
1195 categories.insert (categories.end(), mCategory[index]); 1224 categories.insert (categories.end(), mCategory[index]);
1196 categories.sort (); 1225 categories.sort ();
1197 if ( !colcat.isEmpty() ) { 1226 if ( !colcat.isEmpty() ) {
1198 if ( categories.find ( colcat ) != categories.end () ) { 1227 if ( categories.find ( colcat ) != categories.end () ) {
1199 categories.remove( colcat ); 1228 categories.remove( colcat );
1200 categories.prepend( colcat ); 1229 categories.prepend( colcat );
1201 } 1230 }
1202 } 1231 }
1203 mActiveItem->todo()->setCategories (categories); 1232 mActiveItem->todo()->setCategories (categories);
1204 mActiveItem->construct(); 1233 mActiveItem->construct();
1205 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1234 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1206 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); 1235 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
1207 } 1236 }
1208} 1237}
1209void KOTodoView::itemDoubleClicked(QListViewItem *item) 1238void KOTodoView::itemDoubleClicked(QListViewItem *item)
1210{ 1239{
1211 if ( pendingSubtodo != 0 ) { 1240 if ( pendingSubtodo != 0 ) {
1212 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1241 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1213 } 1242 }
1214 pendingSubtodo = 0; 1243 pendingSubtodo = 0;
1215 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1244 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1216 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); 1245 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() );
1217 //qDebug("ROW %d ", row); 1246 //qDebug("ROW %d ", row);
1218 if (!item) { 1247 if (!item) {
1219 newTodo(); 1248 newTodo();
1220 return; 1249 return;
1221 } else { 1250 } else {
1222 if ( row == 1 ) { 1251 if ( row == 1 ) {
1223 mActiveItem = (KOTodoViewItem *) item; 1252 mActiveItem = (KOTodoViewItem *) item;
1224 newSubTodo(); 1253 newSubTodo();
1225 return; 1254 return;
1226 } 1255 }
1227 if ( row == 5 || row == 6 || row == 2) { 1256 if ( row == 5 || row == 6 || row == 2) {
1228 mActiveItem = (KOTodoViewItem *) item; 1257 mActiveItem = (KOTodoViewItem *) item;
1229 Todo * t = mActiveItem->todo(); 1258 Todo * t = mActiveItem->todo();
1230 if ( t->isRunning() ) { 1259 if ( t->isRunning() ) {
1231 if ( t->runTime() < 15) { 1260 if ( t->runTime() < 15) {
1232 t->stopRunning(); 1261 t->stopRunning();
1233 mActiveItem->construct(); 1262 mActiveItem->construct();
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 9ae7f53..79cc756 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -127,177 +127,179 @@ class KOTodoListView : public KListView
127 bool mFlagKeyPressed; 127 bool mFlagKeyPressed;
128 void keyPressEvent ( QKeyEvent * ) ; 128 void keyPressEvent ( QKeyEvent * ) ;
129 void keyReleaseEvent ( QKeyEvent * ) ; 129 void keyReleaseEvent ( QKeyEvent * ) ;
130}; 130};
131 131
132 132
133/** 133/**
134 This is the line-edit on top of the todoview for fast addition of new todos 134 This is the line-edit on top of the todoview for fast addition of new todos
135*/ 135*/
136class KOQuickTodo : public QLineEdit 136class KOQuickTodo : public QLineEdit
137{ 137{
138 public: 138 public:
139 KOQuickTodo(QWidget *parent=0); 139 KOQuickTodo(QWidget *parent=0);
140 protected: 140 protected:
141 void focusInEvent(QFocusEvent *ev); 141 void focusInEvent(QFocusEvent *ev);
142 void focusOutEvent(QFocusEvent *ev); 142 void focusOutEvent(QFocusEvent *ev);
143}; 143};
144 144
145 145
146/** 146/**
147 This class provides a multi-column list view of todo events. 147 This class provides a multi-column list view of todo events.
148 148
149 @short multi-column list view of todo events. 149 @short multi-column list view of todo events.
150 @author Cornelius Schumacher <schumacher@kde.org> 150 @author Cornelius Schumacher <schumacher@kde.org>
151*/ 151*/
152class KOTodoView : public KOrg::BaseView 152class KOTodoView : public KOrg::BaseView
153{ 153{
154 Q_OBJECT 154 Q_OBJECT
155 public: 155 public:
156 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); 156 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 );
157 ~KOTodoView(); 157 ~KOTodoView();
158 158
159 QPtrList<Incidence> selectedIncidences(); 159 QPtrList<Incidence> selectedIncidences();
160 QPtrList<Todo> selectedTodos(); 160 QPtrList<Todo> selectedTodos();
161 161
162 DateList selectedDates() 162 DateList selectedDates()
163 {DateList q; 163 {DateList q;
164 return q;} 164 return q;}
165 165
166 /** Return number of shown dates. TodoView does not show dates, */ 166 /** Return number of shown dates. TodoView does not show dates, */
167 int currentDateCount() { return 0; } 167 int currentDateCount() { return 0; }
168 168
169 void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); 169 void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td);
170 170
171 void setDocumentId( const QString & ); 171 void setDocumentId( const QString & );
172 172
173 void saveLayout(KConfig *config, const QString &group) const; 173 void saveLayout(KConfig *config, const QString &group) const;
174 void restoreLayout(KConfig *config, const QString &group); 174 void restoreLayout(KConfig *config, const QString &group);
175 /** Create a popup menu to set categories */
176 QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem);
177 void setNavigator( DateNavigator* nav ) {mNavigator = nav;} 175 void setNavigator( DateNavigator* nav ) {mNavigator = nav;}
178 QString getWhatsThisText(QPoint p); 176 QString getWhatsThisText(QPoint p);
179 void clearList() {mTodoListView->clear(); } 177 void clearList() {mTodoListView->clear(); }
180 178
181 public slots: 179 public slots:
182 void updateView(); 180 void updateView();
183 void updateConfig(); 181 void updateConfig();
184 182
185 void changeEventDisplay(Event *, int); 183 void changeEventDisplay(Event *, int);
186 184
187 void showDates(const QDate &start, const QDate &end); 185 void showDates(const QDate &start, const QDate &end);
188 void showEvents(QPtrList<Event> eventList); 186 void showEvents(QPtrList<Event> eventList);
189 187
190 void clearSelection(); 188 void clearSelection();
191 void jumpToDate (); 189 void jumpToDate ();
192 190
193 void editItem(QListViewItem *item); 191 void editItem(QListViewItem *item);
194 void showItem(QListViewItem *item,const QPoint &,int); 192 void showItem(QListViewItem *item,const QPoint &,int);
195 void popupMenu(QListViewItem *item,const QPoint &,int); 193 void popupMenu(QListViewItem *item,const QPoint &,int);
196 void newTodo(); 194 void newTodo();
197 void newSubTodo(); 195 void newSubTodo();
198 void unparentTodo(); 196 void unparentTodo();
199 void reparentTodo(); 197 void reparentTodo();
200 void showTodo(); 198 void showTodo();
201 void editTodo(); 199 void editTodo();
202 void cloneTodo(); 200 void cloneTodo();
203 void cancelTodo(); 201 void cancelTodo();
204 void moveTodo(); 202 void moveTodo();
205 void beamTodo(); 203 void beamTodo();
206 void deleteTodo(); 204 void deleteTodo();
207 205
208 void setNewPriority(int); 206 void setNewPriority(int);
209 void setNewPercentage(int); 207 void setNewPercentage(int);
210 void changedCategories(int); 208 void changedCategories(int);
211 209
212 void setAllOpen(); 210 void setAllOpen();
213 void setAllClose(); 211 void setAllClose();
214 void setAllFlat(); 212 void setAllFlat();
215 void displayAllFlat(); 213 void displayAllFlat();
216 214
217 void purgeCompleted(); 215 void purgeCompleted();
218 void toggleCompleted(); 216 void toggleCompleted();
219 void toggleRunning(); 217 void toggleRunning();
220 void toggleQuickTodo(); 218 void toggleQuickTodo();
221 void updateTodo( Todo *, int ); 219 void updateTodo( Todo *, int );
222 220
223 void itemClicked(QListViewItem *); 221 void itemClicked(QListViewItem *);
224 void itemStateChanged(QListViewItem *); 222 void itemStateChanged(QListViewItem *);
225 void modified(bool); 223 void modified(bool);
226 void itemDoubleClicked(QListViewItem *item); 224 void itemDoubleClicked(QListViewItem *item);
227 void resetFocusToList(); 225 void resetFocusToList();
226 void fillCategories ();
227 void fillCal ();
228 void changedCal (int);
228 229
229 signals: 230 signals:
230 void newTodoSignal(); 231 void newTodoSignal();
231 void newSubTodoSignal(Todo *); 232 void newSubTodoSignal(Todo *);
232 void unparentTodoSignal(Todo *); 233 void unparentTodoSignal(Todo *);
233 void reparentTodoSignal( Todo *,Todo * ); 234 void reparentTodoSignal( Todo *,Todo * );
234 void showTodoSignal(Todo *); 235 void showTodoSignal(Todo *);
235 236
236 void editTodoSignal(Todo *); 237 void editTodoSignal(Todo *);
237 void deleteTodoSignal(Todo *); 238 void deleteTodoSignal(Todo *);
238 void todoModifiedSignal (Todo *, int); 239 void todoModifiedSignal (Todo *, int);
239 240
240 void isModified(bool); 241 void isModified(bool);
241 void cloneTodoSignal( Incidence * ); 242 void cloneTodoSignal( Incidence * );
242 void cancelTodoSignal( Incidence * ); 243 void cancelTodoSignal( Incidence * );
243 void moveTodoSignal( Incidence * ); 244 void moveTodoSignal( Incidence * );
244 void beamTodoSignal( Incidence * ); 245 void beamTodoSignal( Incidence * );
245 void purgeCompletedSignal(); 246 void purgeCompletedSignal();
246 247
247 protected slots: 248 protected slots:
248 void toggleRunningItem(); 249 void toggleRunningItem();
249 void paintNeeded(); 250 void paintNeeded();
250 void processSelectionChange(); 251 void processSelectionChange();
251 void addQuickTodo(); 252 void addQuickTodo();
252 void setTodoModified( Todo* ); 253 void setTodoModified( Todo* );
253 void todoModified(Todo *, int ); 254 void todoModified(Todo *, int );
254 255
255 private: 256 private:
256 /* 257 /*
257 * the TodoEditor approach is rather unscaling in the long 258 * the TodoEditor approach is rather unscaling in the long
258 * run. 259 * run.
259 * Korganizer keeps it in memory and we need to update 260 * Korganizer keeps it in memory and we need to update
260 * 1. make KOTodoViewItem a QObject again? 261 * 1. make KOTodoViewItem a QObject again?
261 * 2. add a public method for setting one todo modified? 262 * 2. add a public method for setting one todo modified?
262 * 3. add a private method for setting a todo modified + friend here? 263 * 3. add a private method for setting a todo modified + friend here?
263 * -- zecke 2002-07-08 264 * -- zecke 2002-07-08
264 */ 265 */
265 KOTodoViewWhatsThis* mKOTodoViewWhatsThis; 266 KOTodoViewWhatsThis* mKOTodoViewWhatsThis;
266 friend class KOTodoListView; 267 friend class KOTodoListView;
267 void paintEvent(QPaintEvent * pevent); 268 void paintEvent(QPaintEvent * pevent);
268 bool mPendingUpdateBeforeRepaint; 269 bool mPendingUpdateBeforeRepaint;
269 friend class KOTodoViewItem; 270 friend class KOTodoViewItem;
270 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); 271 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
271 void restoreItemState( QListViewItem * ); 272 void restoreItemState( QListViewItem * );
272 273
273 bool checkTodo( Todo * ); 274 bool checkTodo( Todo * );
274 bool isFlatDisplay; 275 bool isFlatDisplay;
275 void setOpen( QListViewItem*, bool setOpen); 276 void setOpen( QListViewItem*, bool setOpen);
276 KOTodoListView *mTodoListView; 277 KOTodoListView *mTodoListView;
277 QPopupMenu *mItemPopupMenu; 278 QPopupMenu *mItemPopupMenu;
278 QPopupMenu *mPopupMenu; 279 QPopupMenu *mPopupMenu;
279 QPopupMenu *mPriorityPopupMenu; 280 QPopupMenu *mPriorityPopupMenu;
280 QPopupMenu *mPercentageCompletedPopupMenu; 281 QPopupMenu *mPercentageCompletedPopupMenu;
281 QPopupMenu *mCategoryPopupMenu; 282 QPopupMenu *mCategoryPopupMenu;
283 QPopupMenu *mCalPopupMenu;
282 284
283 QMap<int, int> mPercentage; 285 QMap<int, int> mPercentage;
284 QMap<int, int> mPriority; 286 QMap<int, int> mPriority;
285 QMap<int, QString> mCategory; 287 QMap<int, QString> mCategory;
286 KOTodoViewItem *mActiveItem; 288 KOTodoViewItem *mActiveItem;
287 289
288 QMap<Todo *,KOTodoViewItem *> mTodoMap; 290 QMap<Todo *,KOTodoViewItem *> mTodoMap;
289 QString mName; 291 QString mName;
290 292
291 DocPrefs *mDocPrefs; 293 DocPrefs *mDocPrefs;
292 QString mCurrentDoc; 294 QString mCurrentDoc;
293 KOQuickTodo *mQuickAdd; 295 KOQuickTodo *mQuickAdd;
294 bool mBlockUpdate; 296 bool mBlockUpdate;
295 void keyPressEvent ( QKeyEvent * ) ; 297 void keyPressEvent ( QKeyEvent * ) ;
296 KOTodoViewItem * pendingSubtodo; 298 KOTodoViewItem * pendingSubtodo;
297 DateNavigator* mNavigator; 299 DateNavigator* mNavigator;
298 void storeCurrentItem(); 300 void storeCurrentItem();
299 void resetCurrentItem(); 301 void resetCurrentItem();
300 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove; 302 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove;
301}; 303};
302 304
303#endif 305#endif