-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 14 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 11 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 29 | ||||
-rw-r--r-- | korganizer/koeventviewer.h | 1 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 14 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 7 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 16 | ||||
-rw-r--r-- | korganizer/navigatorbar.cpp | 15 |
12 files changed, 97 insertions, 16 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index da27fea..ce68a1d 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,104 +1,107 @@ | |||
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.0.22 ************ | 3 | ********** VERSION 2.0.22 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fix for creating events/todos via the abgenda context menu. | 6 | Fix for creating events/todos via the abgenda context menu. |
7 | Added option to split toolbar to 3 toolbars. | 7 | Added option to split toolbar to 3 toolbars. |
8 | Added option to show one small filter-view-toolbar. | 8 | Added option to show one small filter-view-toolbar. |
9 | Added a print option to the desktop version: | ||
10 | Now you can print out the view of the "Event Viewer". | ||
11 | That means you can print all data of one particular event/todo. | ||
9 | 12 | ||
10 | ********** VERSION 2.0.21 ************ | 13 | ********** VERSION 2.0.21 ************ |
11 | 14 | ||
12 | Fixed another SMTP problem in OM/Pi. | 15 | Fixed another SMTP problem in OM/Pi. |
13 | Some small changed in the new datenavigator in KO/Pi. | 16 | Some small changed in the new datenavigator in KO/Pi. |
14 | Changed default setting for new filter in KA/Pi to "exclude categories". | 17 | Changed default setting for new filter in KA/Pi to "exclude categories". |
15 | Changed the default font size for 640x480 display . | 18 | Changed the default font size for 640x480 display . |
16 | Changed popup menu behaviour in agenda and list view. | 19 | Changed popup menu behaviour in agenda and list view. |
17 | Fixed some layout problems of the date label size in the month view. | 20 | Fixed some layout problems of the date label size in the month view. |
18 | Made month view update faster. | 21 | Made month view update faster. |
19 | Made first datenavigator repainting faster. | 22 | Made first datenavigator repainting faster. |
20 | Changed the title of the event/todo edit dialogs. | 23 | Changed the title of the event/todo edit dialogs. |
21 | Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). | 24 | Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). |
22 | Many small usebility fixes in KO/Pi. | 25 | Many small usebility fixes in KO/Pi. |
23 | Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. | 26 | Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. |
24 | The set of possible "next views" are the views you have toolbar buttons for. | 27 | The set of possible "next views" are the views you have toolbar buttons for. |
25 | 28 | ||
26 | Made alarm sound working on Linux. | 29 | Made alarm sound working on Linux. |
27 | 30 | ||
28 | KO/Pi alarm applet changed: | 31 | KO/Pi alarm applet changed: |
29 | Made buttons in alarm dialog much bigger. | 32 | Made buttons in alarm dialog much bigger. |
30 | Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. | 33 | Made setting of timer more user friendly by showing the actual timer fire time and making the buttons in the timer settings much bigger. |
31 | The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. | 34 | The goal was it to make it possible to use a finger tip ( and not the stylus ) on the touchscreen to adjust the settings. |
32 | 35 | ||
33 | And because this version is realeased at Easter, I added an Easter-egg: | 36 | And because this version is realeased at Easter, I added an Easter-egg: |
34 | With a new undocumented command you can get a message box about the next alarm. | 37 | With a new undocumented command you can get a message box about the next alarm. |
35 | Good luck to find it! | 38 | Good luck to find it! |
36 | 39 | ||
37 | 40 | ||
38 | 41 | ||
39 | ********** VERSION 2.0.20 ************ | 42 | ********** VERSION 2.0.20 ************ |
40 | 43 | ||
41 | Two small fixes in OM/Pi. | 44 | Two small fixes in OM/Pi. |
42 | 45 | ||
43 | Better resizing of the new datenavigator in KO/Pi. | 46 | Better resizing of the new datenavigator in KO/Pi. |
44 | 47 | ||
45 | ********** VERSION 2.0.19 ************ | 48 | ********** VERSION 2.0.19 ************ |
46 | KO/Pi: | 49 | KO/Pi: |
47 | Enhancements and bugfixes in the new datenavigator. | 50 | Enhancements and bugfixes in the new datenavigator. |
48 | Bugfix in this changelog: | 51 | Bugfix in this changelog: |
49 | The datenavigator was changed in version 2.0.18, not the datepicker. | 52 | The datenavigator was changed in version 2.0.18, not the datepicker. |
50 | 53 | ||
51 | ********** VERSION 2.0.18 ************ | 54 | ********** VERSION 2.0.18 ************ |
52 | KO/Pi: | 55 | KO/Pi: |
53 | Fixed some minor problems. | 56 | Fixed some minor problems. |
54 | Cleaned up the KO/Pi config dialog. | 57 | Cleaned up the KO/Pi config dialog. |
55 | Fixed problem moving events in aganda view. | 58 | Fixed problem moving events in aganda view. |
56 | Made datepicker scaleable, i.e. if the datenavigator shows now a | 59 | Made datepicker scaleable, i.e. if the datenavigator shows now a |
57 | datenavigator matrix depending on its size. | 60 | datenavigator matrix depending on its size. |
58 | Birthdays are now displayed green in the datenavigator. | 61 | Birthdays are now displayed green in the datenavigator. |
59 | What'sThis Help in datenavigator shows all events of the day. | 62 | What'sThis Help in datenavigator shows all events of the day. |
60 | 63 | ||
61 | OM/Pi: | 64 | OM/Pi: |
62 | Updated the backend mail library to the latest version. | 65 | Updated the backend mail library to the latest version. |
63 | Please backup your mail before using this version. | 66 | Please backup your mail before using this version. |
64 | 67 | ||
65 | ********** VERSION 2.0.17 ************ | 68 | ********** VERSION 2.0.17 ************ |
66 | 69 | ||
67 | KO/Pi: | 70 | KO/Pi: |
68 | Tooltips in month view were not sorted. Fixed. | 71 | Tooltips in month view were not sorted. Fixed. |
69 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. | 72 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. |
70 | Conflict display dialog for syncing was not on top of other windows. Fixed. | 73 | Conflict display dialog for syncing was not on top of other windows. Fixed. |
71 | Fixed some minor problems. | 74 | Fixed some minor problems. |
72 | 75 | ||
73 | Fixed an endless loop when importing vcs file with RESOURCES entry. | 76 | Fixed an endless loop when importing vcs file with RESOURCES entry. |
74 | 77 | ||
75 | ********** VERSION 2.0.16 ************ | 78 | ********** VERSION 2.0.16 ************ |
76 | OM/Pi: | 79 | OM/Pi: |
77 | Fixed the SMTP account setting the option. | 80 | Fixed the SMTP account setting the option. |
78 | Fixed something in mail sending. | 81 | Fixed something in mail sending. |
79 | 82 | ||
80 | KO/Pi: | 83 | KO/Pi: |
81 | Added possibility to export selected events/todos as vcal file. | 84 | Added possibility to export selected events/todos as vcal file. |
82 | 85 | ||
83 | ********** VERSION 2.0.15 ************ | 86 | ********** VERSION 2.0.15 ************ |
84 | 87 | ||
85 | PwM/Pi: | 88 | PwM/Pi: |
86 | Added keyboard shorcuts for | 89 | Added keyboard shorcuts for |
87 | - toggling summary view (space bar) | 90 | - toggling summary view (space bar) |
88 | - delete item (delete + backspace key) | 91 | - delete item (delete + backspace key) |
89 | - add new item ( i + n key) | 92 | - add new item ( i + n key) |
90 | Fixed length of info in the title. | 93 | Fixed length of info in the title. |
91 | 94 | ||
92 | KO/Pi-KA/Pi: | 95 | KO/Pi-KA/Pi: |
93 | Changed "ME" menu bar entry to an icon. | 96 | Changed "ME" menu bar entry to an icon. |
94 | 97 | ||
95 | KO/Pi: | 98 | KO/Pi: |
96 | Fixed two minor bugs in displaying todos. | 99 | Fixed two minor bugs in displaying todos. |
97 | If in month view a cell is selected, the key shortcut "d" shows now that date. | 100 | If in month view a cell is selected, the key shortcut "d" shows now that date. |
98 | Added complete info for a todo in month view as an icon left of the text. | 101 | Added complete info for a todo in month view as an icon left of the text. |
99 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. | 102 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. |
100 | Fixed problem of search dialog size when switching displays. | 103 | Fixed problem of search dialog size when switching displays. |
101 | Cancel key now closes date picker. | 104 | Cancel key now closes date picker. |
102 | Rearranged KO/Pi file menu structure. | 105 | Rearranged KO/Pi file menu structure. |
103 | 106 | ||
104 | OM/Pi: | 107 | OM/Pi: |
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 732bb3f..546c32e 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -652,193 +652,193 @@ | |||
652 | {"University","Universität"}, | 652 | {"University","Universität"}, |
653 | {"Vacation","Urlaub" }, | 653 | {"Vacation","Urlaub" }, |
654 | {"VIP","VIP" }, | 654 | {"VIP","VIP" }, |
655 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, | 655 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, |
656 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, | 656 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, |
657 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, | 657 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, |
658 | { "Cancelled","Gecancelt" }, | 658 | { "Cancelled","Gecancelt" }, |
659 | { "Multiple sync","Mehrfach Sync" }, | 659 | { "Multiple sync","Mehrfach Sync" }, |
660 | { "Local file","Lokale Datei" }, | 660 | { "Local file","Lokale Datei" }, |
661 | { "Last file","Letzte Datei" }, | 661 | { "Last file","Letzte Datei" }, |
662 | { "Keys + Colors...","Tasten + Farben..." }, | 662 | { "Keys + Colors...","Tasten + Farben..." }, |
663 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, | 663 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, |
664 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, | 664 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, |
665 | { "Choose...","Wähle..." }, | 665 | { "Choose...","Wähle..." }, |
666 | { "Use colors for application:","Setze Farben für Programm:" }, | 666 | { "Use colors for application:","Setze Farben für Programm:" }, |
667 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, | 667 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, |
668 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, | 668 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, |
669 | { "Show parent To-Do's in What's Next view","Zeige Ober-Todo in What's Next Anz." }, | 669 | { "Show parent To-Do's in What's Next view","Zeige Ober-Todo in What's Next Anz." }, |
670 | { "Show location in What's Next view","Zeige Ort in What's Next Anz." }, | 670 | { "Show location in What's Next view","Zeige Ort in What's Next Anz." }, |
671 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, | 671 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, |
672 | { "Show in every cell ","Zeige in jeder Zelle " }, | 672 | { "Show in every cell ","Zeige in jeder Zelle " }, |
673 | { "short month","kurzen Monat" }, | 673 | { "short month","kurzen Monat" }, |
674 | { "icons","Icons" }, | 674 | { "icons","Icons" }, |
675 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, | 675 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, |
676 | { "Categorie colors are applied to text","Kategorie Farben färben Text" }, | 676 | { "Categorie colors are applied to text","Kategorie Farben färben Text" }, |
677 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, | 677 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, |
678 | { "Day color odd months","Tagesfarbe ungerade Monate" }, | 678 | { "Day color odd months","Tagesfarbe ungerade Monate" }, |
679 | { "Day color even months","Tagesfarbe gerade Monate" }, | 679 | { "Day color even months","Tagesfarbe gerade Monate" }, |
680 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, | 680 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, |
681 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, | 681 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, |
682 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, | 682 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, |
683 | { "Colors are applied to text","Farben werden auf Text angewendet" }, | 683 | { "Colors are applied to text","Farben werden auf Text angewendet" }, |
684 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, | 684 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, |
685 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, | 685 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, |
686 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, | 686 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, |
687 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, | 687 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, |
688 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, | 688 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, |
689 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, | 689 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, |
690 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, | 690 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, |
691 | { "New profile","Neues Profil" }, | 691 | { "New profile","Neues Profil" }, |
692 | { "Clone profile","Klone Profil" }, | 692 | { "Clone profile","Klone Profil" }, |
693 | { "Delete profile","Lösche Profil" }, | 693 | { "Delete profile","Lösche Profil" }, |
694 | { "Profile:","Profil:" }, | 694 | { "Profile:","Profil:" }, |
695 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, | 695 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, |
696 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, | 696 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, |
697 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, | 697 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, |
698 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, | 698 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, |
699 | { "Write back file","Schreibe Datei zurück" }, | 699 | { "Write back file","Schreibe Datei zurück" }, |
700 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, | 700 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, |
701 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, | 701 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, |
702 | { "Local device name:","Name dieses Gerätes:" }, | 702 | { "Local device name:","Name dieses Gerätes:" }, |
703 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, | 703 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, |
704 | { "Sync preferences","Synchronisations Einstellungen" }, | 704 | { "Sync preferences","Synchronisations Einstellungen" }, |
705 | { "Profile kind","Profil Art" }, | 705 | { "Profile kind","Profil Art" }, |
706 | { "Local file","Lokale Datei" }, | 706 | { "Local file","Lokale Datei" }, |
707 | { "Local file:","Lokale Datei:" }, | 707 | { "Local file:","Lokale Datei:" }, |
708 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, | 708 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, |
709 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, | 709 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, |
710 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, | 710 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, |
711 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, | 711 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, |
712 | { "Device","Gerät:" }, | 712 | { "Device","Gerät:" }, |
713 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, | 713 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, |
714 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, | 714 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, |
715 | { "Synchronization successful","Synchronisation erfolgreich" }, | 715 | { "Synchronization successful","Synchronisation erfolgreich" }, |
716 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, | 716 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, |
717 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, | 717 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, |
718 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, | 718 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, |
719 | { "Enter password","Passwort eingeben" }, | 719 | { "Enter password","Passwort eingeben" }, |
720 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, | 720 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, |
721 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, | 721 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, |
722 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, | 722 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, |
723 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, | 723 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, |
724 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, | 724 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, |
725 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, | 725 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, |
726 | { "Enter filter name:","Neuer Filter Name:" }, | 726 | { "Enter filter name:","Neuer Filter Name:" }, |
727 | { "Add Filter","Filter hinzufügen" }, | 727 | { "Add Filter","Filter hinzufügen" }, |
728 | { "Question","Frage" }, | 728 | { "Question","Frage" }, |
729 | { "Filter position: ","Filter Position: " }, | 729 | { "Filter position: ","Filter Position: " }, |
730 | { "Month View","Monatsansicht" }, | 730 | { "Month View","Monatsansicht" }, |
731 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, | 731 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, |
732 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, | 732 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, |
733 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, | 733 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, |
734 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, | 734 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, |
735 | { "Access: ","Zugriff: " }, | 735 | { "Access: ","Zugriff: " }, |
736 | { "Needs Action","Aktion notwendig" }, | 736 | { "Needs Action","Aktion notwendig" }, |
737 | { "Accepted","Akzeptiert" }, | 737 | { "Accepted","Akzeptiert" }, |
738 | { "Declined","Abgelehnt" }, | 738 | { "Declined","Abgelehnt" }, |
739 | { "Tentative","Vorläufig" }, | 739 | { "Tentative","Vorläufig" }, |
740 | { "Delegated","Beauftragt" }, | 740 | { "Delegated","Beauftragt" }, |
741 | { "Completed","Vollständig" }, | 741 | { "Completed","Vollständig" }, |
742 | { "In Process","In Bearbeitung" }, | 742 | { "In Process","In Bearbeitung" }, |
743 | { "Participant","Teilnehmer" }, | 743 | { "Participant","Teilnehmer" }, |
744 | { "Optional Participant","Möglicher Teilnehmer" }, | 744 | { "Optional Participant","Möglicher Teilnehmer" }, |
745 | { "Observer","Beobachter" }, | 745 | { "Observer","Beobachter" }, |
746 | { "Chair","Vorsitzender" }, | 746 | { "Chair","Vorsitzender" }, |
747 | { "Not supported \non desktop!\n","" }, | 747 | { "Not supported \non desktop!\n","" }, |
748 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die verticale Auswahl zum Drucken zu bestimmen,\nbitte einen verticalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen. " }, | 748 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, |
749 | { "Date range: ","Datums Zeitspanne: " }, | 749 | { "Date range: ","Datums Zeitspanne: " }, |
750 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 750 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
751 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 751 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
752 | { "Add / remove events","Add./entferne Termine" }, | 752 | { "Add / remove events","Add./entferne Termine" }, |
753 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 753 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
754 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 754 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
755 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 755 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
756 | { "Overwrite","Überschreiben" }, | 756 | { "Overwrite","Überschreiben" }, |
757 | { "Sync+save","Syncen+speichern" }, | 757 | { "Sync+save","Syncen+speichern" }, |
758 | { "Default","Standard" }, | 758 | { "Default","Standard" }, |
759 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 759 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
760 | { " %d items?"," %d Einträge?" }, | 760 | { " %d items?"," %d Einträge?" }, |
761 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, | 761 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, |
762 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 762 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
763 | { "Current","Aktuelle" }, | 763 | { "Current","Aktuelle" }, |
764 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, | 764 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, |
765 | { "All","Alle" }, | 765 | { "All","Alle" }, |
766 | { "Data Loss Warning","Datenverlust Warnung" }, | 766 | { "Data Loss Warning","Datenverlust Warnung" }, |
767 | { "Proceed","Weitermachen" }, | 767 | { "Proceed","Weitermachen" }, |
768 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 768 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
769 | { "Filter disabled ","Filter abgeschaltet" }, | 769 | { "Filter disabled ","Filter abgeschaltet" }, |
770 | { "Filter selected: ","Gewählter Filter: " }, | 770 | { "Filter selected: ","Gewählter Filter: " }, |
771 | { "Toggle Cancel","Gecancelt ändern" }, | 771 | { "Toggle Cancel","Gecancelt ändern" }, |
772 | { "&Toggle Cancel","Gecancel&t ändern" }, | 772 | { "&Toggle Cancel","Gecancel&t ändern" }, |
773 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 773 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
774 | { "Stretched TB","Gedehnte TB" }, | 774 | { "Stretched TB","Gedehnte TB" }, |
775 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 775 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
776 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 776 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
777 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, | 777 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, |
778 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 778 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
779 | { "Imported file successfully","Datei erfolgreich importiert" }, | 779 | { "Imported file successfully","Datei erfolgreich importiert" }, |
780 | { "Error importing file","Fehler beim Importieren der Datei" }, | 780 | { "Error importing file","Fehler beim Importieren der Datei" }, |
781 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 781 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
782 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, | 782 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, |
783 | { "Overwrite!","Überschreiben!" }, | 783 | { "Overwrite!","Überschreiben!" }, |
784 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, | 784 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, |
785 | { "Load backup filename","Lade Backup Dateiname" }, | 785 | { "Load backup filename","Lade Backup Dateiname" }, |
786 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 786 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
787 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 787 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
788 | { "Save backup filename","Speichere Backup Dateiname" }, | 788 | { "Save backup filename","Speichere Backup Dateiname" }, |
789 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, | 789 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, |
790 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 790 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
791 | { "Details of attendee","Teilnehmerdetails" }, | 791 | { "Details of attendee","Teilnehmerdetails" }, |
792 | { "Work phone:\n","Telefon Arbeit:\n" }, | 792 | { "Work phone:\n","Telefon Arbeit:\n" }, |
793 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 793 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
794 | { "Home phone:\n","Telefon privat:\n" }, | 794 | { "Home phone:\n","Telefon privat:\n" }, |
795 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 795 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
796 | { "Email:\n","Email:\n" }, | 796 | { "Email:\n","Email:\n" }, |
797 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 797 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
798 | { "Audio Al.: ","Audio Al.: " }, | 798 | { "Audio Al.: ","Audio Al.: " }, |
799 | { "Proc.Al.: ","Proz.Al.: " }, | 799 | { "Proc.Al.: ","Proz.Al.: " }, |
800 | { "No sound set","Kein Sound definiert" }, | 800 | { "No sound set","Kein Sound definiert" }, |
801 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 801 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
802 | { "No program set","Kein Programm definiert" }, | 802 | { "No program set","Kein Programm definiert" }, |
803 | { "Running '%1'","Ausführen '%1'" }, | 803 | { "Running '%1'","Ausführen '%1'" }, |
804 | { "Playing '%1'","Abspielen '%1'" }, | 804 | { "Playing '%1'","Abspielen '%1'" }, |
805 | { "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, | 805 | { "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, |
806 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 806 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
807 | { "Load!","Laden!" }, | 807 | { "Load!","Laden!" }, |
808 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, | 808 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, |
809 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 809 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
810 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 810 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
811 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 811 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
812 | { "Features + hints...","Eigenschaften + Tipps..." }, | 812 | { "Features + hints...","Eigenschaften + Tipps..." }, |
813 | { "User translation...","Benutzer Übersetzung..." }, | 813 | { "User translation...","Benutzer Übersetzung..." }, |
814 | { "Sync HowTo...","Synchronisation HowTo..." }, | 814 | { "Sync HowTo...","Synchronisation HowTo..." }, |
815 | { "Print calendar...","Drucke Kalender..." }, | 815 | { "Print calendar...","Drucke Kalender..." }, |
816 | { "Anniversary","Jahrestag" }, | 816 | { "Anniversary","Jahrestag" }, |
817 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, | 817 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, |
818 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 818 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
819 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 819 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
820 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 820 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
821 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 821 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
822 | { "(%1 min before)","(%1 min vorher)" }, | 822 | { "(%1 min before)","(%1 min vorher)" }, |
823 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 823 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
824 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 824 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
825 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, | 825 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, |
826 | { "Continue","Weitermachen" }, | 826 | { "Continue","Weitermachen" }, |
827 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 827 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
828 | { "Attendee:","Teilnehmer:" }, | 828 | { "Attendee:","Teilnehmer:" }, |
829 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 829 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
830 | { "On day ","Am Tag " }, | 830 | { "On day ","Am Tag " }, |
831 | { "%1 of ","%1 des Monats" }, | 831 | { "%1 of ","%1 des Monats" }, |
832 | { "%1 of the year","%1 des Jahres" }, | 832 | { "%1 of the year","%1 des Jahres" }, |
833 | { "Anonymous","Anonymo" }, | 833 | { "Anonymous","Anonymo" }, |
834 | { "nobody@nowhere","niemand@nirgendwo" }, | 834 | { "nobody@nowhere","niemand@nirgendwo" }, |
835 | { "calendar.html","calendar.html" }, | 835 | { "calendar.html","calendar.html" }, |
836 | { " Local Time"," Locale Zeit" }, | 836 | { " Local Time"," Locale Zeit" }, |
837 | { "Unknown Name","Unbekannter Name" }, | 837 | { "Unknown Name","Unbekannter Name" }, |
838 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 838 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
839 | { "Beam via IR!","Beam via IR!" }, | 839 | { "Beam via IR!","Beam via IR!" }, |
840 | { "Next Month","Nächster Monat" }, | 840 | { "Next Month","Nächster Monat" }, |
841 | { "Prio","Prio" }, | 841 | { "Prio","Prio" }, |
842 | { "Reparent Todo","Mache Sub-Todo" }, | 842 | { "Reparent Todo","Mache Sub-Todo" }, |
843 | { "tomorrow","morgen" }, | 843 | { "tomorrow","morgen" }, |
844 | { "today","heute" }, | 844 | { "today","heute" }, |
@@ -1221,105 +1221,107 @@ | |||
1221 | { "Load Event template","Lade Termin Vorlage" }, | 1221 | { "Load Event template","Lade Termin Vorlage" }, |
1222 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1222 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1223 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1223 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1224 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1224 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1225 | { "Parent todo:<br>","Über Todo:<br>" }, | 1225 | { "Parent todo:<br>","Über Todo:<br>" }, |
1226 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1226 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1227 | { " completed"," erledigt" }, | 1227 | { " completed"," erledigt" }, |
1228 | { "(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!" }, | 1228 | { "(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!" }, |
1229 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1229 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1230 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1230 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1231 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1231 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1232 | { "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?" }, | 1232 | { "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?" }, |
1233 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1233 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1234 | { "Error","Fehler" }, | 1234 | { "Error","Fehler" }, |
1235 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1235 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1236 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1236 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1237 | { "Warning","Warnung" }, | 1237 | { "Warning","Warnung" }, |
1238 | { "Select week number","Wähle Wochen Nummer" }, | 1238 | { "Select week number","Wähle Wochen Nummer" }, |
1239 | { "Februar","Februar" }, | 1239 | { "Februar","Februar" }, |
1240 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1240 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1241 | { "W","W" }, | 1241 | { "W","W" }, |
1242 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1242 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1243 | { "T: %1","T: %1" }, | 1243 | { "T: %1","T: %1" }, |
1244 | { "Start: ","Start: " }, | 1244 | { "Start: ","Start: " }, |
1245 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1245 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1246 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1246 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1247 | { "Remote IP address:","Ferne IP Adresse:" }, | 1247 | { "Remote IP address:","Ferne IP Adresse:" }, |
1248 | { "Remote port number:","Ferne Port Nummer:" }, | 1248 | { "Remote port number:","Ferne Port Nummer:" }, |
1249 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1249 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1250 | { "Remote from: ","Fern von: " }, | 1250 | { "Remote from: ","Fern von: " }, |
1251 | { "Local from: ","Lokal von: " }, | 1251 | { "Local from: ","Lokal von: " }, |
1252 | { "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" }, | 1252 | { "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" }, |
1253 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1253 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1254 | { "Write back","Schreibe zurück" }, | 1254 | { "Write back","Schreibe zurück" }, |
1255 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1255 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1256 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1256 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1257 | { "Received sync request","Sync Anfrage erhalten" }, | 1257 | { "Received sync request","Sync Anfrage erhalten" }, |
1258 | { "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." }, | 1258 | { "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." }, |
1259 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1259 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1260 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1260 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1261 | { "Sending file...","Sende Datei..." }, | 1261 | { "Sending file...","Sende Datei..." }, |
1262 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1262 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1264 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1264 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1265 | { "Writing file to disk...","Speichere Datei..." }, | 1265 | { "Writing file to disk...","Speichere Datei..." }, |
1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1268 | { "Synchronize!","Synchronisiere!" }, | 1268 | { "Synchronize!","Synchronisiere!" }, |
1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1271 | { "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!" }, | 1271 | { "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!" }, |
1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1274 | { "List week view","Listenwochenansicht" }, | 1274 | { "List week view","Listenwochenansicht" }, |
1275 | { "List week","Listenwochenansicht" }, | 1275 | { "List week","Listenwochenansicht" }, |
1276 | { "Next Week","Nächste Woche" }, | 1276 | { "Next Week","Nächste Woche" }, |
1277 | { "Previous Week","Vorherige Woche" }, | 1277 | { "Previous Week","Vorherige Woche" }, |
1278 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1278 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1280 | { "Details","Details" }, | 1280 | { "Details","Details" }, |
1281 | { "Created time","Erstellt Zeit" }, | 1281 | { "Created time","Erstellt Zeit" }, |
1282 | { "Last modified time","Geändert Zeit" }, | 1282 | { "Last modified time","Geändert Zeit" }, |
1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1284 | { "View Options","Anzeige Optionen" }, | 1284 | { "View Options","Anzeige Optionen" }, |
1285 | { "<b>Created: ","<b>Erstellt am: " }, | 1285 | { "<b>Created: ","<b>Erstellt am: " }, |
1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1287 | { "Journal: ","Journal: " }, | 1287 | { "Journal: ","Journal: " }, |
1288 | { "yearly","jährlich" }, | 1288 | { "yearly","jährlich" }, |
1289 | { "(%1) ","%1-" }, | 1289 | { "(%1) ","%1-" }, |
1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1293 | { "Summary/Loc.","Titel/Ort" }, | 1293 | { "Summary/Loc.","Titel/Ort" }, |
1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1295 | { "Week Number","Wochennummer" }, | 1295 | { "Week Number","Wochennummer" }, |
1296 | { "Import","Importiere" }, | 1296 | { "Import","Importiere" }, |
1297 | { "Export","Exportiere" }, | 1297 | { "Export","Exportiere" }, |
1298 | { "Beam","Beame" }, | 1298 | { "Beam","Beame" }, |
1299 | { "Export selected","Exportiere Selektierte" }, | 1299 | { "Export selected","Exportiere Selektierte" }, |
1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1302 | { "Journal/Details...","Journale/Details..." }, | 1302 | { "Journal/Details...","Journale/Details..." }, |
1303 | { "Agenda View","Agenda Ansicht" }, | 1303 | { "Agenda View","Agenda Ansicht" }, |
1304 | { "Show current time","Zeige aktuelle Zeit" }, | 1304 | { "Show current time","Zeige aktuelle Zeit" }, |
1305 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1305 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1306 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, | 1306 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, |
1307 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1307 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1308 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1308 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1309 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1309 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1310 | { "%1 days\n","%1 Tagen\n" }, | 1310 | { "%1 days\n","%1 Tagen\n" }, |
1311 | { "1 day\n","1 Tag\n" }, | 1311 | { "1 day\n","1 Tag\n" }, |
1312 | { "%1 hours\n","%1 Stunden\n" }, | 1312 | { "%1 hours\n","%1 Stunden\n" }, |
1313 | { "1 hour\n","1 Stunde\n" }, | 1313 | { "1 hour\n","1 Stunde\n" }, |
1314 | { "%1 minutes\n","%1 Minuten\n" }, | 1314 | { "%1 minutes\n","%1 Minuten\n" }, |
1315 | { "1 minute\n","1 Minute\n" }, | 1315 | { "1 minute\n","1 Minute\n" }, |
1316 | { "Only one toolbar","Nur eine Toolbar" }, | 1316 | { "Only one toolbar","Nur eine Toolbar" }, |
1317 | { "Print","Drucke" }, | ||
1318 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | ||
1319 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | ||
1320 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | ||
1321 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | ||
1317 | { "","" }, | 1322 | { "","" }, |
1318 | { "","" }, | 1323 | { "","" }, |
1319 | { "","" }, | 1324 | { "","" }, |
1320 | { "","" }, | 1325 | { "","" }, |
1321 | { "","" }, | 1326 | |
1322 | { "","" }, | 1327 | |
1323 | { "","" }, | ||
1324 | { "","" }, | ||
1325 | { "","" }, \ No newline at end of file | ||
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index a330414..0015bd6 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -3334,193 +3334,202 @@ void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) | |||
3334 | Todo *todo = 0; | 3334 | Todo *todo = 0; |
3335 | 3335 | ||
3336 | if (incidence == 0) { | 3336 | if (incidence == 0) { |
3337 | incidence = mViewManager->currentView()->selectedIncidences().first(); | 3337 | incidence = mViewManager->currentView()->selectedIncidences().first(); |
3338 | if (incidence == 0) { | 3338 | if (incidence == 0) { |
3339 | incidence = mTodoList->selectedIncidences().first(); | 3339 | incidence = mTodoList->selectedIncidences().first(); |
3340 | } | 3340 | } |
3341 | } | 3341 | } |
3342 | if ( incidence && incidence->type() == "Event" ) { | 3342 | if ( incidence && incidence->type() == "Event" ) { |
3343 | event = static_cast<Event *>(incidence); | 3343 | event = static_cast<Event *>(incidence); |
3344 | } | 3344 | } |
3345 | if ( incidence && incidence->type() == "Todo" ) { | 3345 | if ( incidence && incidence->type() == "Todo" ) { |
3346 | todo = static_cast<Todo *>(incidence); | 3346 | todo = static_cast<Todo *>(incidence); |
3347 | } | 3347 | } |
3348 | 3348 | ||
3349 | if (!event && !todo) { | 3349 | if (!event && !todo) { |
3350 | KMessageBox::sorry(this,i18n("No event selected.")); | 3350 | KMessageBox::sorry(this,i18n("No event selected.")); |
3351 | return; | 3351 | return; |
3352 | } | 3352 | } |
3353 | 3353 | ||
3354 | if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { | 3354 | if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { |
3355 | KMessageBox::sorry(this,i18n("The event has no attendees.")); | 3355 | KMessageBox::sorry(this,i18n("The event has no attendees.")); |
3356 | return; | 3356 | return; |
3357 | } | 3357 | } |
3358 | 3358 | ||
3359 | Event *ev = 0; | 3359 | Event *ev = 0; |
3360 | if (event) ev = new Event(*event); | 3360 | if (event) ev = new Event(*event); |
3361 | Todo *to = 0; | 3361 | Todo *to = 0; |
3362 | if (todo) to = new Todo(*todo); | 3362 | if (todo) to = new Todo(*todo); |
3363 | 3363 | ||
3364 | if (method == Scheduler::Reply || method == Scheduler::Refresh) { | 3364 | if (method == Scheduler::Reply || method == Scheduler::Refresh) { |
3365 | Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); | 3365 | Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); |
3366 | if (!me) { | 3366 | if (!me) { |
3367 | KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); | 3367 | KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); |
3368 | return; | 3368 | return; |
3369 | } | 3369 | } |
3370 | if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { | 3370 | if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { |
3371 | StatusDialog *statdlg = new StatusDialog(this); | 3371 | StatusDialog *statdlg = new StatusDialog(this); |
3372 | if (!statdlg->exec()==QDialog::Accepted) return; | 3372 | if (!statdlg->exec()==QDialog::Accepted) return; |
3373 | me->setStatus( statdlg->status() ); | 3373 | me->setStatus( statdlg->status() ); |
3374 | delete(statdlg); | 3374 | delete(statdlg); |
3375 | } | 3375 | } |
3376 | Attendee *menew = new Attendee(*me); | 3376 | Attendee *menew = new Attendee(*me); |
3377 | if (ev) { | 3377 | if (ev) { |
3378 | ev->clearAttendees(); | 3378 | ev->clearAttendees(); |
3379 | ev->addAttendee(menew,false); | 3379 | ev->addAttendee(menew,false); |
3380 | } else { | 3380 | } else { |
3381 | if (to) { | 3381 | if (to) { |
3382 | todo->clearAttendees(); | 3382 | todo->clearAttendees(); |
3383 | todo->addAttendee(menew,false); | 3383 | todo->addAttendee(menew,false); |
3384 | } | 3384 | } |
3385 | } | 3385 | } |
3386 | } | 3386 | } |
3387 | 3387 | ||
3388 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 3388 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
3389 | if (ev) { | 3389 | if (ev) { |
3390 | if ( !dlg->addMessage(ev,method) ) delete(ev); | 3390 | if ( !dlg->addMessage(ev,method) ) delete(ev); |
3391 | } else { | 3391 | } else { |
3392 | if (to) { | 3392 | if (to) { |
3393 | if ( !dlg->addMessage(to,method) ) delete(to); | 3393 | if ( !dlg->addMessage(to,method) ) delete(to); |
3394 | } | 3394 | } |
3395 | } | 3395 | } |
3396 | } | 3396 | } |
3397 | 3397 | ||
3398 | void CalendarView::openAddressbook() | 3398 | void CalendarView::openAddressbook() |
3399 | { | 3399 | { |
3400 | KRun::runCommand("kaddressbook"); | 3400 | KRun::runCommand("kaddressbook"); |
3401 | } | 3401 | } |
3402 | 3402 | ||
3403 | void CalendarView::setModified(bool modified) | 3403 | void CalendarView::setModified(bool modified) |
3404 | { | 3404 | { |
3405 | if ( modified ) | 3405 | if ( modified ) |
3406 | emit signalmodified(); | 3406 | emit signalmodified(); |
3407 | if (mModified != modified) { | 3407 | if (mModified != modified) { |
3408 | mModified = modified; | 3408 | mModified = modified; |
3409 | emit modifiedChanged(mModified); | 3409 | emit modifiedChanged(mModified); |
3410 | } | 3410 | } |
3411 | } | 3411 | } |
3412 | 3412 | ||
3413 | bool CalendarView::isReadOnly() | 3413 | bool CalendarView::isReadOnly() |
3414 | { | 3414 | { |
3415 | return mReadOnly; | 3415 | return mReadOnly; |
3416 | } | 3416 | } |
3417 | 3417 | ||
3418 | void CalendarView::setReadOnly(bool readOnly) | 3418 | void CalendarView::setReadOnly(bool readOnly) |
3419 | { | 3419 | { |
3420 | if (mReadOnly != readOnly) { | 3420 | if (mReadOnly != readOnly) { |
3421 | mReadOnly = readOnly; | 3421 | mReadOnly = readOnly; |
3422 | emit readOnlyChanged(mReadOnly); | 3422 | emit readOnlyChanged(mReadOnly); |
3423 | } | 3423 | } |
3424 | } | 3424 | } |
3425 | 3425 | ||
3426 | bool CalendarView::isModified() | 3426 | bool CalendarView::isModified() |
3427 | { | 3427 | { |
3428 | return mModified; | 3428 | return mModified; |
3429 | } | 3429 | } |
3430 | 3430 | void CalendarView::slotprintSelInc() | |
3431 | { | ||
3432 | if ( currentSelection() == 0 ) { | ||
3433 | KMessageBox::sorry(this,i18n("There is nothing selected!")); | ||
3434 | return; | ||
3435 | } | ||
3436 | showIncidence(); | ||
3437 | getEventViewerDialog()->print(); | ||
3438 | |||
3439 | } | ||
3431 | void CalendarView::printSetup() | 3440 | void CalendarView::printSetup() |
3432 | { | 3441 | { |
3433 | #ifndef KORG_NOPRINTER | 3442 | #ifndef KORG_NOPRINTER |
3434 | createPrinter(); | 3443 | createPrinter(); |
3435 | 3444 | ||
3436 | mCalPrinter->setupPrinter(); | 3445 | mCalPrinter->setupPrinter(); |
3437 | #endif | 3446 | #endif |
3438 | } | 3447 | } |
3439 | 3448 | ||
3440 | void CalendarView::print() | 3449 | void CalendarView::print() |
3441 | { | 3450 | { |
3442 | #ifndef KORG_NOPRINTER | 3451 | #ifndef KORG_NOPRINTER |
3443 | createPrinter(); | 3452 | createPrinter(); |
3444 | 3453 | ||
3445 | DateList tmpDateList = mNavigator->selectedDates(); | 3454 | DateList tmpDateList = mNavigator->selectedDates(); |
3446 | mCalPrinter->print(CalPrinter::Month, | 3455 | mCalPrinter->print(CalPrinter::Month, |
3447 | tmpDateList.first(), tmpDateList.last()); | 3456 | tmpDateList.first(), tmpDateList.last()); |
3448 | #endif | 3457 | #endif |
3449 | } | 3458 | } |
3450 | 3459 | ||
3451 | void CalendarView::printPreview() | 3460 | void CalendarView::printPreview() |
3452 | { | 3461 | { |
3453 | #ifndef KORG_NOPRINTER | 3462 | #ifndef KORG_NOPRINTER |
3454 | kdDebug() << "CalendarView::printPreview()" << endl; | 3463 | kdDebug() << "CalendarView::printPreview()" << endl; |
3455 | 3464 | ||
3456 | createPrinter(); | 3465 | createPrinter(); |
3457 | 3466 | ||
3458 | DateList tmpDateList = mNavigator->selectedDates(); | 3467 | DateList tmpDateList = mNavigator->selectedDates(); |
3459 | 3468 | ||
3460 | mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), | 3469 | mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), |
3461 | tmpDateList.last()); | 3470 | tmpDateList.last()); |
3462 | #endif | 3471 | #endif |
3463 | } | 3472 | } |
3464 | 3473 | ||
3465 | void CalendarView::exportICalendar() | 3474 | void CalendarView::exportICalendar() |
3466 | { | 3475 | { |
3467 | QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); | 3476 | QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); |
3468 | 3477 | ||
3469 | // Force correct extension | 3478 | // Force correct extension |
3470 | if (filename.right(4) != ".ics") filename += ".ics"; | 3479 | if (filename.right(4) != ".ics") filename += ".ics"; |
3471 | 3480 | ||
3472 | FileStorage storage( mCalendar, filename, new ICalFormat() ); | 3481 | FileStorage storage( mCalendar, filename, new ICalFormat() ); |
3473 | storage.save(); | 3482 | storage.save(); |
3474 | } | 3483 | } |
3475 | 3484 | ||
3476 | bool CalendarView::exportVCalendar( QString filename ) | 3485 | bool CalendarView::exportVCalendar( QString filename ) |
3477 | { | 3486 | { |
3478 | if (mCalendar->journals().count() > 0) { | 3487 | if (mCalendar->journals().count() > 0) { |
3479 | int result = KMessageBox::warningContinueCancel(this, | 3488 | int result = KMessageBox::warningContinueCancel(this, |
3480 | i18n("The journal entries can not be\nexported to a vCalendar file."), | 3489 | i18n("The journal entries can not be\nexported to a vCalendar file."), |
3481 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), | 3490 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), |
3482 | true); | 3491 | true); |
3483 | if (result != KMessageBox::Continue) return false; | 3492 | if (result != KMessageBox::Continue) return false; |
3484 | } | 3493 | } |
3485 | 3494 | ||
3486 | //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); | 3495 | //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); |
3487 | 3496 | ||
3488 | // Force correct extension | 3497 | // Force correct extension |
3489 | if (filename.right(4) != ".vcs") filename += ".vcs"; | 3498 | if (filename.right(4) != ".vcs") filename += ".vcs"; |
3490 | 3499 | ||
3491 | FileStorage storage( mCalendar, filename, new VCalFormat ); | 3500 | FileStorage storage( mCalendar, filename, new VCalFormat ); |
3492 | return storage.save(); | 3501 | return storage.save(); |
3493 | 3502 | ||
3494 | } | 3503 | } |
3495 | 3504 | ||
3496 | void CalendarView::eventUpdated(Incidence *) | 3505 | void CalendarView::eventUpdated(Incidence *) |
3497 | { | 3506 | { |
3498 | setModified(); | 3507 | setModified(); |
3499 | // Don't call updateView here. The code, which has caused the update of the | 3508 | // Don't call updateView here. The code, which has caused the update of the |
3500 | // event is responsible for updating the view. | 3509 | // event is responsible for updating the view. |
3501 | // updateView(); | 3510 | // updateView(); |
3502 | } | 3511 | } |
3503 | 3512 | ||
3504 | void CalendarView::adaptNavigationUnits() | 3513 | void CalendarView::adaptNavigationUnits() |
3505 | { | 3514 | { |
3506 | if (mViewManager->currentView()->isEventView()) { | 3515 | if (mViewManager->currentView()->isEventView()) { |
3507 | int days = mViewManager->currentView()->currentDateCount(); | 3516 | int days = mViewManager->currentView()->currentDateCount(); |
3508 | if (days == 1) { | 3517 | if (days == 1) { |
3509 | emit changeNavStringPrev(i18n("&Previous Day")); | 3518 | emit changeNavStringPrev(i18n("&Previous Day")); |
3510 | emit changeNavStringNext(i18n("&Next Day")); | 3519 | emit changeNavStringNext(i18n("&Next Day")); |
3511 | } else { | 3520 | } else { |
3512 | emit changeNavStringPrev(i18n("&Previous Week")); | 3521 | emit changeNavStringPrev(i18n("&Previous Week")); |
3513 | emit changeNavStringNext(i18n("&Next Week")); | 3522 | emit changeNavStringNext(i18n("&Next Week")); |
3514 | } | 3523 | } |
3515 | } | 3524 | } |
3516 | } | 3525 | } |
3517 | 3526 | ||
3518 | void CalendarView::processMainViewSelection( Incidence *incidence ) | 3527 | void CalendarView::processMainViewSelection( Incidence *incidence ) |
3519 | { | 3528 | { |
3520 | if ( incidence ) mTodoList->clearSelection(); | 3529 | if ( incidence ) mTodoList->clearSelection(); |
3521 | processIncidenceSelection( incidence ); | 3530 | processIncidenceSelection( incidence ); |
3522 | } | 3531 | } |
3523 | 3532 | ||
3524 | void CalendarView::processTodoListSelection( Incidence *incidence ) | 3533 | void CalendarView::processTodoListSelection( Incidence *incidence ) |
3525 | { | 3534 | { |
3526 | if ( incidence && mViewManager->currentView() ) { | 3535 | if ( incidence && mViewManager->currentView() ) { |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 9782ffe..05a34b4 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -83,192 +83,193 @@ using namespace KCal; | |||
83 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface | 83 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface |
84 | { | 84 | { |
85 | Q_OBJECT | 85 | Q_OBJECT |
86 | public: | 86 | public: |
87 | /** | 87 | /** |
88 | Constructs a new calendar view widget. | 88 | Constructs a new calendar view widget. |
89 | 89 | ||
90 | @param calendar calendar document | 90 | @param calendar calendar document |
91 | @param parent parent window | 91 | @param parent parent window |
92 | @param name Qt internal widget object name | 92 | @param name Qt internal widget object name |
93 | */ | 93 | */ |
94 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, | 94 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, |
95 | const char *name = 0 ); | 95 | const char *name = 0 ); |
96 | CalendarView( Calendar *calendar, QWidget *parent = 0, | 96 | CalendarView( Calendar *calendar, QWidget *parent = 0, |
97 | const char *name = 0 ); | 97 | const char *name = 0 ); |
98 | virtual ~CalendarView(); | 98 | virtual ~CalendarView(); |
99 | 99 | ||
100 | Calendar *calendar() { return mCalendar; } | 100 | Calendar *calendar() { return mCalendar; } |
101 | 101 | ||
102 | KOViewManager *viewManager(); | 102 | KOViewManager *viewManager(); |
103 | KODialogManager *dialogManager(); | 103 | KODialogManager *dialogManager(); |
104 | 104 | ||
105 | QDate startDate(); | 105 | QDate startDate(); |
106 | QDate endDate(); | 106 | QDate endDate(); |
107 | 107 | ||
108 | QWidgetStack *viewStack(); | 108 | QWidgetStack *viewStack(); |
109 | QWidget *leftFrame(); | 109 | QWidget *leftFrame(); |
110 | 110 | ||
111 | DateNavigator *dateNavigator(); | 111 | DateNavigator *dateNavigator(); |
112 | KDateNavigator *dateNavigatorWidget(); | 112 | KDateNavigator *dateNavigatorWidget(); |
113 | 113 | ||
114 | void addView(KOrg::BaseView *); | 114 | void addView(KOrg::BaseView *); |
115 | void showView(KOrg::BaseView *); | 115 | void showView(KOrg::BaseView *); |
116 | KOEventViewerDialog* getEventViewerDialog(); | 116 | KOEventViewerDialog* getEventViewerDialog(); |
117 | Incidence *currentSelection(); | 117 | Incidence *currentSelection(); |
118 | 118 | ||
119 | signals: | 119 | signals: |
120 | void save (); | 120 | void save (); |
121 | void saveStopTimer (); | 121 | void saveStopTimer (); |
122 | void tempDisableBR(bool); | 122 | void tempDisableBR(bool); |
123 | /** This todo has been modified */ | 123 | /** This todo has been modified */ |
124 | void todoModified(Todo *, int); | 124 | void todoModified(Todo *, int); |
125 | 125 | ||
126 | /** when change is made to options dialog, the topwidget will catch this | 126 | /** when change is made to options dialog, the topwidget will catch this |
127 | * and emit this signal which notifies all widgets which have registered | 127 | * and emit this signal which notifies all widgets which have registered |
128 | * for notification to update their settings. */ | 128 | * for notification to update their settings. */ |
129 | void configChanged(); | 129 | void configChanged(); |
130 | /** emitted when the topwidget is closing down, so that any attached | 130 | /** emitted when the topwidget is closing down, so that any attached |
131 | child windows can also close. */ | 131 | child windows can also close. */ |
132 | void closingDown(); | 132 | void closingDown(); |
133 | /** emitted right before we die */ | 133 | /** emitted right before we die */ |
134 | void closed(QWidget *); | 134 | void closed(QWidget *); |
135 | 135 | ||
136 | /** Emitted when state of modified flag changes */ | 136 | /** Emitted when state of modified flag changes */ |
137 | void modifiedChanged(bool); | 137 | void modifiedChanged(bool); |
138 | void signalmodified(); | 138 | void signalmodified(); |
139 | 139 | ||
140 | /** Emitted when state of read-only flag changes */ | 140 | /** Emitted when state of read-only flag changes */ |
141 | void readOnlyChanged(bool); | 141 | void readOnlyChanged(bool); |
142 | 142 | ||
143 | /** Emitted when the unit of navigation changes */ | 143 | /** Emitted when the unit of navigation changes */ |
144 | void changeNavStringPrev(const QString &); | 144 | void changeNavStringPrev(const QString &); |
145 | void changeNavStringNext(const QString &); | 145 | void changeNavStringNext(const QString &); |
146 | 146 | ||
147 | /** Emitted when state of events selection has changed and user is organizer*/ | 147 | /** Emitted when state of events selection has changed and user is organizer*/ |
148 | void organizerEventsSelected(bool); | 148 | void organizerEventsSelected(bool); |
149 | /** Emitted when state of events selection has changed and user is attendee*/ | 149 | /** Emitted when state of events selection has changed and user is attendee*/ |
150 | void groupEventsSelected(bool); | 150 | void groupEventsSelected(bool); |
151 | /** | 151 | /** |
152 | Emitted when an incidence gets selected. If the selection is cleared the | 152 | Emitted when an incidence gets selected. If the selection is cleared the |
153 | signal is emitted with 0 as argument. | 153 | signal is emitted with 0 as argument. |
154 | */ | 154 | */ |
155 | void incidenceSelected( Incidence * ); | 155 | void incidenceSelected( Incidence * ); |
156 | /** Emitted, when a todoitem is selected or deselected. */ | 156 | /** Emitted, when a todoitem is selected or deselected. */ |
157 | void todoSelected( bool ); | 157 | void todoSelected( bool ); |
158 | 158 | ||
159 | /** | 159 | /** |
160 | Emitted, when clipboard content changes. Parameter indicates if paste | 160 | Emitted, when clipboard content changes. Parameter indicates if paste |
161 | is possible or not. | 161 | is possible or not. |
162 | */ | 162 | */ |
163 | void pasteEnabled(bool); | 163 | void pasteEnabled(bool); |
164 | 164 | ||
165 | /** Emitted, when the number of incoming messages has changed. */ | 165 | /** Emitted, when the number of incoming messages has changed. */ |
166 | void numIncomingChanged(int); | 166 | void numIncomingChanged(int); |
167 | 167 | ||
168 | /** Emitted, when the number of outgoing messages has changed. */ | 168 | /** Emitted, when the number of outgoing messages has changed. */ |
169 | void numOutgoingChanged(int); | 169 | void numOutgoingChanged(int); |
170 | 170 | ||
171 | /** Send status message, which can e.g. be displayed in the status bar. */ | 171 | /** Send status message, which can e.g. be displayed in the status bar. */ |
172 | void statusMessage(const QString &); | 172 | void statusMessage(const QString &); |
173 | 173 | ||
174 | void calendarViewExpanded( bool ); | 174 | void calendarViewExpanded( bool ); |
175 | void updateSearchDialog(); | 175 | void updateSearchDialog(); |
176 | 176 | ||
177 | 177 | ||
178 | public slots: | 178 | public slots: |
179 | void slotprintSelInc(); | ||
179 | void showNextAlarms(); | 180 | void showNextAlarms(); |
180 | void showOpenError(); | 181 | void showOpenError(); |
181 | void watchSavedFile(); | 182 | void watchSavedFile(); |
182 | void recheckTimerAlarm(); | 183 | void recheckTimerAlarm(); |
183 | void checkNextTimerAlarm(); | 184 | void checkNextTimerAlarm(); |
184 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 185 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
185 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 186 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
186 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 187 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
187 | 188 | ||
188 | /** options dialog made a changed to the configuration. we catch this | 189 | /** options dialog made a changed to the configuration. we catch this |
189 | * and notify all widgets which need to update their configuration. */ | 190 | * and notify all widgets which need to update their configuration. */ |
190 | void updateConfig(); | 191 | void updateConfig(); |
191 | 192 | ||
192 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 193 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
193 | const QStringList& anniversaryList, const QStringList& realNameList, | 194 | const QStringList& anniversaryList, const QStringList& realNameList, |
194 | const QStringList& emailList, const QStringList& assembledNameList, | 195 | const QStringList& emailList, const QStringList& assembledNameList, |
195 | const QStringList& uidList); | 196 | const QStringList& uidList); |
196 | 197 | ||
197 | /** | 198 | /** |
198 | Load calendar from file \a filename. If \a merge is true, load | 199 | Load calendar from file \a filename. If \a merge is true, load |
199 | calendar into existing one, if it is false, clear calendar, before | 200 | calendar into existing one, if it is false, clear calendar, before |
200 | loading. Return true, if calendar could be successfully loaded. | 201 | loading. Return true, if calendar could be successfully loaded. |
201 | */ | 202 | */ |
202 | bool openCalendar(QString filename, bool merge=false); | 203 | bool openCalendar(QString filename, bool merge=false); |
203 | bool syncCalendar(QString filename,int mode = 0 ); | 204 | bool syncCalendar(QString filename,int mode = 0 ); |
204 | 205 | ||
205 | /** | 206 | /** |
206 | Save calendar data to file. Return true if calendar could be | 207 | Save calendar data to file. Return true if calendar could be |
207 | successfully saved. | 208 | successfully saved. |
208 | */ | 209 | */ |
209 | bool saveCalendar(QString filename); | 210 | bool saveCalendar(QString filename); |
210 | 211 | ||
211 | /** | 212 | /** |
212 | Close calendar. Clear calendar data and reset views to display an empty | 213 | Close calendar. Clear calendar data and reset views to display an empty |
213 | calendar. | 214 | calendar. |
214 | */ | 215 | */ |
215 | void closeCalendar(); | 216 | void closeCalendar(); |
216 | 217 | ||
217 | /** Archive old events of calendar */ | 218 | /** Archive old events of calendar */ |
218 | void archiveCalendar(); | 219 | void archiveCalendar(); |
219 | 220 | ||
220 | void showIncidence(); | 221 | void showIncidence(); |
221 | void editIncidence(); | 222 | void editIncidence(); |
222 | void editIncidenceDescription(); | 223 | void editIncidenceDescription(); |
223 | void deleteIncidence(); | 224 | void deleteIncidence(); |
224 | void cloneIncidence(); | 225 | void cloneIncidence(); |
225 | void moveIncidence(); | 226 | void moveIncidence(); |
226 | void beamIncidence(); | 227 | void beamIncidence(); |
227 | void toggleCancelIncidence(); | 228 | void toggleCancelIncidence(); |
228 | 229 | ||
229 | /** create an editeventwin with supplied date/time, and if bool is true, | 230 | /** create an editeventwin with supplied date/time, and if bool is true, |
230 | * make the event take all day. */ | 231 | * make the event take all day. */ |
231 | void newEvent(QDateTime, QDateTime, bool allDay ); | 232 | void newEvent(QDateTime, QDateTime, bool allDay ); |
232 | void newEvent(QDateTime, QDateTime); | 233 | void newEvent(QDateTime, QDateTime); |
233 | void newEvent(QDateTime fh); | 234 | void newEvent(QDateTime fh); |
234 | void newEvent(QDate dt); | 235 | void newEvent(QDate dt); |
235 | /** create new event without having a date hint. Takes current date as | 236 | /** create new event without having a date hint. Takes current date as |
236 | default hint. */ | 237 | default hint. */ |
237 | void newEvent(); | 238 | void newEvent(); |
238 | void newFloatingEvent(); | 239 | void newFloatingEvent(); |
239 | 240 | ||
240 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ | 241 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ |
241 | void showIncidence(Incidence *); | 242 | void showIncidence(Incidence *); |
242 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ | 243 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ |
243 | void editIncidence(Incidence *); | 244 | void editIncidence(Incidence *); |
244 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ | 245 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ |
245 | void deleteIncidence(Incidence *); | 246 | void deleteIncidence(Incidence *); |
246 | void cloneIncidence(Incidence *); | 247 | void cloneIncidence(Incidence *); |
247 | void cancelIncidence(Incidence *); | 248 | void cancelIncidence(Incidence *); |
248 | /** Create an editor for the supplied event. */ | 249 | /** Create an editor for the supplied event. */ |
249 | void editEvent(Event *); | 250 | void editEvent(Event *); |
250 | /** Delete the supplied event. */ | 251 | /** Delete the supplied event. */ |
251 | void deleteEvent(Event *); | 252 | void deleteEvent(Event *); |
252 | /** Delete the event with the given unique ID. Returns false, if event wasn't | 253 | /** Delete the event with the given unique ID. Returns false, if event wasn't |
253 | found. */ | 254 | found. */ |
254 | bool deleteEvent(const QString &uid); | 255 | bool deleteEvent(const QString &uid); |
255 | /** Create a read-only viewer dialog for the supplied event. */ | 256 | /** Create a read-only viewer dialog for the supplied event. */ |
256 | void showEvent(Event *); | 257 | void showEvent(Event *); |
257 | 258 | ||
258 | void editJournal(Journal *); | 259 | void editJournal(Journal *); |
259 | void showJournal(Journal *); | 260 | void showJournal(Journal *); |
260 | void deleteJournal(Journal *); | 261 | void deleteJournal(Journal *); |
261 | /** Create an editor dialog for a todo */ | 262 | /** Create an editor dialog for a todo */ |
262 | void editTodo(Todo *); | 263 | void editTodo(Todo *); |
263 | /** Create a read-only viewer dialog for the supplied todo */ | 264 | /** Create a read-only viewer dialog for the supplied todo */ |
264 | void showTodo(Todo *); | 265 | void showTodo(Todo *); |
265 | /** create new todo */ | 266 | /** create new todo */ |
266 | void newTodo(); | 267 | void newTodo(); |
267 | void newTodoDateTime(QDateTime, bool allday); | 268 | void newTodoDateTime(QDateTime, bool allday); |
268 | /** create new todo with a parent todo */ | 269 | /** create new todo with a parent todo */ |
269 | void newSubTodo(); | 270 | void newSubTodo(); |
270 | /** create new todo with a parent todo */ | 271 | /** create new todo with a parent todo */ |
271 | void newSubTodo(Todo *); | 272 | void newSubTodo(Todo *); |
272 | /** Delete todo */ | 273 | /** Delete todo */ |
273 | void deleteTodo(Todo *); | 274 | void deleteTodo(Todo *); |
274 | 275 | ||
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 1508638..445fc86 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -1,167 +1,196 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qcstring.h> | 20 | #include <qcstring.h> |
21 | #include <qwhatsthis.h> | 21 | #include <qwhatsthis.h> |
22 | #include <qdialog.h> | 22 | #include <qdialog.h> |
23 | #include <qapplication.h> | 23 | #include <qapplication.h> |
24 | #include <qlabel.h> | 24 | #include <qlabel.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | 26 | ||
27 | #include <klocale.h> | 27 | #include <klocale.h> |
28 | #include <kapplication.h> | 28 | #include <kapplication.h> |
29 | #include <libkcal/event.h> | 29 | #include <libkcal/event.h> |
30 | #include <libkcal/todo.h> | 30 | #include <libkcal/todo.h> |
31 | #include <kdebug.h> | 31 | #include <kdebug.h> |
32 | #include <kiconloader.h> | 32 | #include <kiconloader.h> |
33 | #include <krun.h> | 33 | #include <krun.h> |
34 | #include <kglobal.h> | 34 | #include <kglobal.h> |
35 | #include <kprocess.h> | 35 | #include <kprocess.h> |
36 | #include "koprefs.h" | 36 | #include "koprefs.h" |
37 | 37 | ||
38 | #include <kabc/stdaddressbook.h> | 38 | #include <kabc/stdaddressbook.h> |
39 | 39 | ||
40 | #ifndef KORG_NODCOP | 40 | #ifndef KORG_NODCOP |
41 | #include <dcopclient.h> | 41 | #include <dcopclient.h> |
42 | #include "korganizer.h" | 42 | #include "korganizer.h" |
43 | #include "koprefs.h" | 43 | #include "koprefs.h" |
44 | #include "actionmanager.h" | 44 | #include "actionmanager.h" |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #include "koeventviewer.h" | 47 | #include "koeventviewer.h" |
48 | //#ifndef KORG_NOKABC | 48 | //#ifndef KORG_NOKABC |
49 | //#include <kabc/stdaddressbook.h> | 49 | //#include <kabc/stdaddressbook.h> |
50 | //#define size count | 50 | //#define size count |
51 | //#endif | 51 | //#endif |
52 | 52 | ||
53 | #ifdef DESKTOP_VERSION | 53 | #ifdef DESKTOP_VERSION |
54 | #include <kabc/addresseedialog.h> | 54 | #include <kabc/addresseedialog.h> |
55 | #include <kabc/addresseeview.h> | 55 | #include <kabc/addresseeview.h> |
56 | #include <qprinter.h> | ||
57 | #include <qpainter.h> | ||
58 | #include <qpaintdevicemetrics.h> | ||
56 | #else //DESKTOP_VERSION | 59 | #else //DESKTOP_VERSION |
57 | #include <externalapphandler.h> | 60 | #include <externalapphandler.h> |
58 | #include <qtopia/qcopenvelope_qws.h> | 61 | #include <qtopia/qcopenvelope_qws.h> |
59 | #endif //DESKTOP_VERSION | 62 | #endif //DESKTOP_VERSION |
60 | 63 | ||
61 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) | 64 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) |
62 | : QTextBrowser(parent,name) | 65 | : QTextBrowser(parent,name) |
63 | { | 66 | { |
64 | mSyncMode = false; | 67 | mSyncMode = false; |
65 | mColorMode = 0; | 68 | mColorMode = 0; |
66 | } | 69 | } |
67 | 70 | ||
68 | KOEventViewer::~KOEventViewer() | 71 | KOEventViewer::~KOEventViewer() |
69 | { | 72 | { |
70 | } | 73 | } |
71 | 74 | ||
75 | void KOEventViewer::printMe() | ||
76 | { | ||
77 | #ifdef DESKTOP_VERSION | ||
78 | QPrinter printer; | ||
79 | if (!printer.setup() ) | ||
80 | return; | ||
81 | QPainter p; | ||
82 | p.begin ( &printer ); | ||
83 | QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); | ||
84 | float dx, dy; | ||
85 | int wid = (m.width() * 9)/10; | ||
86 | dx = (float) wid/(float)contentsWidth (); | ||
87 | dy = (float)(m.height()) / (float)contentsHeight (); | ||
88 | float scale; | ||
89 | // scale to fit the width or height of the paper | ||
90 | if ( dx < dy ) | ||
91 | scale = dx; | ||
92 | else | ||
93 | scale = dy; | ||
94 | p.translate( m.width()/10,0 ); | ||
95 | p.scale( scale, scale ); | ||
96 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); | ||
97 | p.end(); | ||
98 | #endif | ||
99 | |||
100 | } | ||
72 | void KOEventViewer::setSource(const QString& n) | 101 | void KOEventViewer::setSource(const QString& n) |
73 | { | 102 | { |
74 | 103 | ||
75 | if ( n.left(3) == "uid" ) | 104 | if ( n.left(3) == "uid" ) |
76 | #ifdef DESKTOP_VERSION | 105 | #ifdef DESKTOP_VERSION |
77 | { | 106 | { |
78 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 107 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
79 | KABC::AddressBook::Iterator it; | 108 | KABC::AddressBook::Iterator it; |
80 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 109 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
81 | // LR I do not understand, why the uid string is different on zaurus and desktop | 110 | // LR I do not understand, why the uid string is different on zaurus and desktop |
82 | QString uid = "uid://"+(*it).uid(); | 111 | QString uid = "uid://"+(*it).uid(); |
83 | 112 | ||
84 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); | 113 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); |
85 | if (n == uid ) { | 114 | if (n == uid ) { |
86 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); | 115 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); |
87 | QDialog dia( this,"dia123", true ); | 116 | QDialog dia( this,"dia123", true ); |
88 | dia.setCaption( i18n("Details of attendee") ); | 117 | dia.setCaption( i18n("Details of attendee") ); |
89 | QVBoxLayout lay ( &dia ); | 118 | QVBoxLayout lay ( &dia ); |
90 | KABC::AddresseeView av ( &dia ); | 119 | KABC::AddresseeView av ( &dia ); |
91 | av.setAddressee( (*it) ); | 120 | av.setAddressee( (*it) ); |
92 | lay.addWidget( &av ); | 121 | lay.addWidget( &av ); |
93 | if ( QApplication::desktop()->width() < 480 ) | 122 | if ( QApplication::desktop()->width() < 480 ) |
94 | dia.resize( 220, 240); | 123 | dia.resize( 220, 240); |
95 | else { | 124 | else { |
96 | dia.resize( 400,400); | 125 | dia.resize( 400,400); |
97 | } | 126 | } |
98 | dia.exec(); | 127 | dia.exec(); |
99 | break; | 128 | break; |
100 | } | 129 | } |
101 | } | 130 | } |
102 | return; | 131 | return; |
103 | } | 132 | } |
104 | #else | 133 | #else |
105 | { | 134 | { |
106 | if ( "uid:organizer" == n ) { | 135 | if ( "uid:organizer" == n ) { |
107 | ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); | 136 | ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); |
108 | return; | 137 | return; |
109 | } | 138 | } |
110 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); | 139 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); |
111 | if (attendees.count()) { | 140 | if (attendees.count()) { |
112 | Attendee *a; | 141 | Attendee *a; |
113 | for(a=attendees.first();a;a=attendees.next()) { | 142 | for(a=attendees.first();a;a=attendees.next()) { |
114 | if ( "uid:"+a->uid() == n ) { | 143 | if ( "uid:"+a->uid() == n ) { |
115 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); | 144 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); |
116 | return; | 145 | return; |
117 | } | 146 | } |
118 | } | 147 | } |
119 | } | 148 | } |
120 | return; | 149 | return; |
121 | } | 150 | } |
122 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 151 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
123 | // the result should now arrive through method insertAttendees | 152 | // the result should now arrive through method insertAttendees |
124 | //QString uid = "uid:"+(*it).uid(); | 153 | //QString uid = "uid:"+(*it).uid(); |
125 | #endif | 154 | #endif |
126 | if ( n.left(6) == "mailto" ) { | 155 | if ( n.left(6) == "mailto" ) { |
127 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); | 156 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); |
128 | #ifndef DESKTOP_VERSION | 157 | #ifndef DESKTOP_VERSION |
129 | if ( n.mid(7,3) == "ALL" ) { | 158 | if ( n.mid(7,3) == "ALL" ) { |
130 | qDebug("all "); | 159 | qDebug("all "); |
131 | mailToAttendees( true ); | 160 | mailToAttendees( true ); |
132 | } else if ( n.mid(7,4) == "RSVP" ) { | 161 | } else if ( n.mid(7,4) == "RSVP" ) { |
133 | mailToAttendees( false ); | 162 | mailToAttendees( false ); |
134 | qDebug("rsvp "); | 163 | qDebug("rsvp "); |
135 | } else { | 164 | } else { |
136 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); | 165 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); |
137 | e << n.mid(7); | 166 | e << n.mid(7); |
138 | } | 167 | } |
139 | #endif | 168 | #endif |
140 | 169 | ||
141 | } | 170 | } |
142 | 171 | ||
143 | 172 | ||
144 | #ifndef KORG_NODCOP | 173 | #ifndef KORG_NODCOP |
145 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; | 174 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; |
146 | QString tmpStr; | 175 | QString tmpStr; |
147 | if (n.startsWith("mailto:")) { | 176 | if (n.startsWith("mailto:")) { |
148 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); | 177 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); |
149 | //emit showIncidence(n); | 178 | //emit showIncidence(n); |
150 | return; | 179 | return; |
151 | } else if (n.startsWith("uid:")) { | 180 | } else if (n.startsWith("uid:")) { |
152 | DCOPClient *client = KApplication::kApplication()->dcopClient(); | 181 | DCOPClient *client = KApplication::kApplication()->dcopClient(); |
153 | const QByteArray noParamData; | 182 | const QByteArray noParamData; |
154 | const QByteArray paramData; | 183 | const QByteArray paramData; |
155 | QByteArray replyData; | 184 | QByteArray replyData; |
156 | QCString replyTypeStr; | 185 | QCString replyTypeStr; |
157 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) | 186 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) |
158 | bool foundAbbrowser = PING_ABBROWSER; | 187 | bool foundAbbrowser = PING_ABBROWSER; |
159 | 188 | ||
160 | if (foundAbbrowser) { | 189 | if (foundAbbrowser) { |
161 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor | 190 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor |
162 | //client->send("kaddressbook","KAddressBookIface", | 191 | //client->send("kaddressbook","KAddressBookIface", |
163 | QDataStream arg(paramData, IO_WriteOnly); | 192 | QDataStream arg(paramData, IO_WriteOnly); |
164 | arg << n.mid(6); | 193 | arg << n.mid(6); |
165 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); | 194 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); |
166 | return; | 195 | return; |
167 | } else { | 196 | } else { |
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 47cc5e9..ca5bc15 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h | |||
@@ -1,77 +1,78 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | #ifndef KOEVENTVIEWER_H | 19 | #ifndef KOEVENTVIEWER_H |
20 | #define KOEVENTVIEWER_H | 20 | #define KOEVENTVIEWER_H |
21 | // | 21 | // |
22 | // Viewer widget for events. | 22 | // Viewer widget for events. |
23 | // | 23 | // |
24 | 24 | ||
25 | #include <qtextbrowser.h> | 25 | #include <qtextbrowser.h> |
26 | 26 | ||
27 | #include <libkcal/event.h> | 27 | #include <libkcal/event.h> |
28 | #include <libkcal/journal.h> | 28 | #include <libkcal/journal.h> |
29 | 29 | ||
30 | 30 | ||
31 | using namespace KCal; | 31 | using namespace KCal; |
32 | 32 | ||
33 | class KOEventViewer : public QTextBrowser { | 33 | class KOEventViewer : public QTextBrowser { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | public: | 35 | public: |
36 | KOEventViewer(QWidget *parent=0,const char *name=0); | 36 | KOEventViewer(QWidget *parent=0,const char *name=0); |
37 | virtual ~KOEventViewer(); | 37 | virtual ~KOEventViewer(); |
38 | 38 | ||
39 | void setSource(const QString &); | 39 | void setSource(const QString &); |
40 | void setEvent(Event *event); | 40 | void setEvent(Event *event); |
41 | void addEvent(Event *event); | 41 | void addEvent(Event *event); |
42 | void setTodo(Todo *event, bool clearV = true ); | 42 | void setTodo(Todo *event, bool clearV = true ); |
43 | void setJournal(Journal *jour, bool clearV = true ); | 43 | void setJournal(Journal *jour, bool clearV = true ); |
44 | 44 | ||
45 | void appendEvent(Event *event, int mode = 0 ); | 45 | void appendEvent(Event *event, int mode = 0 ); |
46 | void appendTodo(Todo *event, int mode = 0 ); | 46 | void appendTodo(Todo *event, int mode = 0 ); |
47 | void appendJournal(Journal *jour, int mode = 0 ); | 47 | void appendJournal(Journal *jour, int mode = 0 ); |
48 | 48 | ||
49 | void clearEvents(bool now=false); | 49 | void clearEvents(bool now=false); |
50 | 50 | ||
51 | void addText(QString text); | 51 | void addText(QString text); |
52 | void setSyncMode( bool ); | 52 | void setSyncMode( bool ); |
53 | void setColorMode( int ); | 53 | void setColorMode( int ); |
54 | void mailToAttendees( bool all ); | 54 | void mailToAttendees( bool all ); |
55 | void printMe(); | ||
55 | 56 | ||
56 | protected: | 57 | protected: |
57 | int mColorMode; | 58 | int mColorMode; |
58 | void addTag(const QString & tag,const QString & text); | 59 | void addTag(const QString & tag,const QString & text); |
59 | 60 | ||
60 | void formatCategories(Incidence *event); | 61 | void formatCategories(Incidence *event); |
61 | void formatAttendees(Incidence *event); | 62 | void formatAttendees(Incidence *event); |
62 | void formatReadOnly(Incidence *event); | 63 | void formatReadOnly(Incidence *event); |
63 | void keyPressEvent ( QKeyEvent * e ); | 64 | void keyPressEvent ( QKeyEvent * e ); |
64 | 65 | ||
65 | private: | 66 | private: |
66 | QTextBrowser *mEventTextView; | 67 | QTextBrowser *mEventTextView; |
67 | bool mSyncMode; | 68 | bool mSyncMode; |
68 | QString deTag(QString text); | 69 | QString deTag(QString text); |
69 | 70 | ||
70 | QString mText; | 71 | QString mText; |
71 | QString mMailSubject; | 72 | QString mMailSubject; |
72 | Incidence* mCurrentIncidence; | 73 | Incidence* mCurrentIncidence; |
73 | signals: | 74 | signals: |
74 | void launchaddressbook(QString uid); | 75 | void launchaddressbook(QString uid); |
75 | }; | 76 | }; |
76 | 77 | ||
77 | #endif | 78 | #endif |
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index f734696..ec55cca 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -1,188 +1,202 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #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 "koprefs.h" | 28 | #include "koprefs.h" |
28 | #include <libkcal/todo.h> | 29 | #include <libkcal/todo.h> |
29 | #include "qapp.h" | 30 | #include "qapp.h" |
30 | 31 | ||
31 | #include "koeventviewerdialog.h" | 32 | #include "koeventviewerdialog.h" |
32 | extern int globalFlagBlockAgenda; | 33 | extern int globalFlagBlockAgenda; |
33 | 34 | ||
34 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) | 35 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) |
35 | : KDialogBase(parent,name, | 36 | : KDialogBase(parent,name, |
36 | #ifndef DESKTOP_VERSION | 37 | #ifndef DESKTOP_VERSION |
37 | true , | 38 | true , |
38 | #else | 39 | #else |
39 | false, | 40 | false, |
40 | #endif | 41 | #endif |
41 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) | 42 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) |
42 | { | 43 | { |
43 | sendSignalViewerClosed = true; | 44 | sendSignalViewerClosed = true; |
44 | mEventViewer = new KOEventViewer(this); | 45 | mEventViewer = new KOEventViewer(this); |
45 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 46 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
46 | setMainWidget(mEventViewer); | 47 | setMainWidget(mEventViewer); |
47 | setButtonText(Ok, i18n("Edit") ); | 48 | setButtonText(Ok, i18n("Edit") ); |
48 | 49 | ||
49 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), | 50 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), |
50 | SLOT(editIncidence())); | 51 | SLOT(editIncidence())); |
51 | QObject::connect(this,SIGNAL(user1Clicked()), | 52 | QObject::connect(this,SIGNAL(user1Clicked()), |
52 | SLOT(showIncidence())); | 53 | SLOT(showIncidence())); |
53 | mIncidence = 0; | 54 | mIncidence = 0; |
54 | // TODO: Set a sensible size (based on the content?). | 55 | // TODO: Set a sensible size (based on the content?). |
55 | //showMaximized(); | 56 | //showMaximized(); |
56 | //qDebug("++++++++++++KOEventViewerDialog() "); | 57 | //qDebug("++++++++++++KOEventViewerDialog() "); |
57 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 58 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
58 | // setFixedSize( 240,284 ); | 59 | // setFixedSize( 240,284 ); |
59 | // move( 0, 15 ); | 60 | // move( 0, 15 ); |
60 | // } else { | 61 | // } else { |
61 | // setMinimumSize(300,200); | 62 | // setMinimumSize(300,200); |
62 | // resize(320,300); | 63 | // resize(320,300); |
63 | // } | 64 | // } |
64 | mSyncMode = false; | 65 | mSyncMode = false; |
65 | mSyncResult = 0; | 66 | mSyncResult = 0; |
66 | 67 | ||
67 | } | 68 | } |
68 | 69 | ||
69 | KOEventViewerDialog::~KOEventViewerDialog() | 70 | KOEventViewerDialog::~KOEventViewerDialog() |
70 | { | 71 | { |
71 | //qDebug("-------~KOEventViewerDialog() "); | 72 | //qDebug("-------~KOEventViewerDialog() "); |
72 | } | 73 | } |
73 | void KOEventViewerDialog::showMe() | 74 | void KOEventViewerDialog::showMe() |
74 | { | 75 | { |
75 | 76 | ||
76 | #ifdef DESKTOP_VERSION | 77 | #ifdef DESKTOP_VERSION |
77 | int x,y,w,h; | 78 | int x,y,w,h; |
78 | x = geometry().x(); | 79 | x = geometry().x(); |
79 | y = geometry().y(); | 80 | y = geometry().y(); |
80 | w = width(); | 81 | w = width(); |
81 | h = height(); | 82 | h = height(); |
82 | show(); | 83 | show(); |
83 | setGeometry(x,y,w,h); | 84 | setGeometry(x,y,w,h); |
84 | #else | 85 | #else |
85 | showMaximized(); | 86 | showMaximized(); |
86 | #endif | 87 | #endif |
87 | raise(); | 88 | raise(); |
88 | setActiveWindow(); | 89 | setActiveWindow(); |
89 | mEventViewer->setFocus(); | 90 | mEventViewer->setFocus(); |
90 | //raise(); | 91 | //raise(); |
91 | 92 | ||
92 | } | 93 | } |
94 | void KOEventViewerDialog::print() | ||
95 | { | ||
96 | qDebug("PRINT "); | ||
97 | int km = KMessageBox::warningContinueCancel(this,mIncidence->summary().left(35) + | ||
98 | i18n("\n\nDo you really want to print this item?"), | ||
99 | i18n("KO/Pi Print Confirmation"),i18n("Print")); | ||
100 | if ( km != KMessageBox::Continue ) { | ||
101 | qDebug("cancel "); | ||
102 | return; | ||
103 | } | ||
104 | mEventViewer->printMe(); | ||
105 | |||
106 | } | ||
93 | void KOEventViewerDialog::setSyncMode( bool b ) | 107 | void KOEventViewerDialog::setSyncMode( bool b ) |
94 | { | 108 | { |
95 | mSyncMode = b; | 109 | mSyncMode = b; |
96 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); | 110 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); |
97 | if ( mSyncMode ) { | 111 | if ( mSyncMode ) { |
98 | findButton( Close )->setText( i18n("Cancel Sync")); | 112 | findButton( Close )->setText( i18n("Cancel Sync")); |
99 | findButton( Ok )->setText( i18n("Remote")); | 113 | findButton( Ok )->setText( i18n("Remote")); |
100 | findButton( User1 )->setText( i18n("Local")); | 114 | findButton( User1 )->setText( i18n("Local")); |
101 | } else { | 115 | } else { |
102 | findButton( Close )->setText( i18n("Close")); | 116 | findButton( Close )->setText( i18n("Close")); |
103 | findButton( Ok )->setText( i18n("Edit")); | 117 | findButton( Ok )->setText( i18n("Edit")); |
104 | findButton( User1 )->setText( i18n("Agenda")); | 118 | findButton( User1 )->setText( i18n("Agenda")); |
105 | } | 119 | } |
106 | mEventViewer->setSyncMode( b ); | 120 | mEventViewer->setSyncMode( b ); |
107 | } | 121 | } |
108 | void KOEventViewerDialog::setColorMode( int m ) | 122 | void KOEventViewerDialog::setColorMode( int m ) |
109 | { | 123 | { |
110 | mEventViewer->setColorMode( m ); | 124 | mEventViewer->setColorMode( m ); |
111 | } | 125 | } |
112 | int KOEventViewerDialog::executeS( bool local ) | 126 | int KOEventViewerDialog::executeS( bool local ) |
113 | { | 127 | { |
114 | mSyncResult = 3; | 128 | mSyncResult = 3; |
115 | if ( local ) | 129 | if ( local ) |
116 | findButton( User1 )->setFocus(); | 130 | findButton( User1 )->setFocus(); |
117 | else | 131 | else |
118 | findButton( Ok )->setFocus(); | 132 | findButton( Ok )->setFocus(); |
119 | exec(); | 133 | exec(); |
120 | return mSyncResult; | 134 | return mSyncResult; |
121 | } | 135 | } |
122 | 136 | ||
123 | void KOEventViewerDialog::updateConfig() | 137 | void KOEventViewerDialog::updateConfig() |
124 | { | 138 | { |
125 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 139 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
126 | 140 | ||
127 | } | 141 | } |
128 | void KOEventViewerDialog::setEvent(Event *event) | 142 | void KOEventViewerDialog::setEvent(Event *event) |
129 | { | 143 | { |
130 | mEventViewer->setEvent(event); | 144 | mEventViewer->setEvent(event); |
131 | mIncidence = event; | 145 | mIncidence = event; |
132 | mEventViewer->setFocus(); | 146 | mEventViewer->setFocus(); |
133 | //findButton( Close )->setFocus(); | 147 | //findButton( Close )->setFocus(); |
134 | if ( !mSyncMode ) { | 148 | if ( !mSyncMode ) { |
135 | findButton( User1 )->setText( i18n("Agenda")); | 149 | findButton( User1 )->setText( i18n("Agenda")); |
136 | } | 150 | } |
137 | } | 151 | } |
138 | void KOEventViewerDialog::setIncidence(Incidence *in ) | 152 | void KOEventViewerDialog::setIncidence(Incidence *in ) |
139 | { | 153 | { |
140 | if ( in->type() == "Event" ) | 154 | if ( in->type() == "Event" ) |
141 | setEvent( (Event*) in ); | 155 | setEvent( (Event*) in ); |
142 | else if ( in->type() =="Todo" ) | 156 | else if ( in->type() =="Todo" ) |
143 | setTodo( (Todo*) in ); | 157 | setTodo( (Todo*) in ); |
144 | else if ( in->type() =="Journal" ) | 158 | else if ( in->type() =="Journal" ) |
145 | setJournal( (Journal*) in ); | 159 | setJournal( (Journal*) in ); |
146 | } | 160 | } |
147 | void KOEventViewerDialog::addIncidence(Incidence *in) | 161 | void KOEventViewerDialog::addIncidence(Incidence *in) |
148 | { | 162 | { |
149 | if ( in->type() == "Event" ) | 163 | if ( in->type() == "Event" ) |
150 | addEvent( (Event*) in ); | 164 | addEvent( (Event*) in ); |
151 | else if ( in->type() =="Todo" ) | 165 | else if ( in->type() =="Todo" ) |
152 | mEventViewer->setTodo( (Todo*) in, false ); | 166 | mEventViewer->setTodo( (Todo*) in, false ); |
153 | else if ( in->type() =="Journal" ) | 167 | else if ( in->type() =="Journal" ) |
154 | mEventViewer->setJournal( (Journal*) in, false ); | 168 | mEventViewer->setJournal( (Journal*) in, false ); |
155 | if ( mSyncMode ) { | 169 | if ( mSyncMode ) { |
156 | findButton( User1 )->setFocus(); | 170 | findButton( User1 )->setFocus(); |
157 | setCaption(i18n("Conflict! Please choose entry")); | 171 | setCaption(i18n("Conflict! Please choose entry")); |
158 | } | 172 | } |
159 | } | 173 | } |
160 | 174 | ||
161 | void KOEventViewerDialog::addEvent(Event *event) | 175 | void KOEventViewerDialog::addEvent(Event *event) |
162 | { | 176 | { |
163 | mEventViewer->addEvent(event); | 177 | mEventViewer->addEvent(event); |
164 | mIncidence = event; | 178 | mIncidence = event; |
165 | mEventViewer->setFocus(); | 179 | mEventViewer->setFocus(); |
166 | //findButton( Close )->setFocus(); | 180 | //findButton( Close )->setFocus(); |
167 | if ( !mSyncMode ) { | 181 | if ( !mSyncMode ) { |
168 | findButton( User1 )->setText( i18n("Agenda")); | 182 | findButton( User1 )->setText( i18n("Agenda")); |
169 | } | 183 | } |
170 | } | 184 | } |
171 | 185 | ||
172 | void KOEventViewerDialog::setTodo(Todo *event) | 186 | void KOEventViewerDialog::setTodo(Todo *event) |
173 | { | 187 | { |
174 | mEventViewer->setTodo(event); | 188 | mEventViewer->setTodo(event); |
175 | mIncidence = (Incidence*)event; | 189 | mIncidence = (Incidence*)event; |
176 | mEventViewer->setFocus(); | 190 | mEventViewer->setFocus(); |
177 | //findButton( Close )->setFocus(); | 191 | //findButton( Close )->setFocus(); |
178 | if ( !mSyncMode ) { | 192 | if ( !mSyncMode ) { |
179 | findButton( User1 )->setText( i18n("Set complete")); | 193 | findButton( User1 )->setText( i18n("Set complete")); |
180 | } | 194 | } |
181 | } | 195 | } |
182 | void KOEventViewerDialog::setJournal(Journal *j) | 196 | void KOEventViewerDialog::setJournal(Journal *j) |
183 | { | 197 | { |
184 | mEventViewer->setJournal(j); | 198 | mEventViewer->setJournal(j); |
185 | mIncidence = (Incidence*)j; | 199 | mIncidence = (Incidence*)j; |
186 | mEventViewer->setFocus(); | 200 | mEventViewer->setFocus(); |
187 | //findButton( Close )->setFocus(); | 201 | //findButton( Close )->setFocus(); |
188 | if ( !mSyncMode ) { | 202 | if ( !mSyncMode ) { |
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 36431ad..8e1cd44 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h | |||
@@ -1,75 +1,76 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | #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 | ||
31 | using namespace KCal; | 31 | using namespace KCal; |
32 | 32 | ||
33 | class KOEventViewer; | 33 | class KOEventViewer; |
34 | 34 | ||
35 | class KOEventViewerDialog : public KDialogBase { | 35 | class 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 | signals: | 55 | signals: |
55 | void editIncidence( Incidence* ); | 56 | void editIncidence( Incidence* ); |
56 | void jumpToTime( const QDate &); | 57 | void jumpToTime( const QDate &); |
57 | void showAgendaView( bool ); | 58 | void showAgendaView( bool ); |
58 | void todoCompleted(Todo*); | 59 | void todoCompleted(Todo*); |
59 | void signalViewerClosed(); | 60 | void signalViewerClosed(); |
60 | private slots: | 61 | private slots: |
61 | void slotViewerClosed(); | 62 | void slotViewerClosed(); |
62 | void editIncidence(); | 63 | void editIncidence(); |
63 | void showIncidence(); | 64 | void showIncidence(); |
64 | protected: | 65 | protected: |
65 | void hideEvent ( QHideEvent * e ); | 66 | void hideEvent ( QHideEvent * e ); |
66 | private: | 67 | private: |
67 | bool sendSignalViewerClosed; | 68 | bool sendSignalViewerClosed; |
68 | bool mSyncMode; | 69 | bool mSyncMode; |
69 | int mSyncResult; | 70 | int mSyncResult; |
70 | KOEventViewer *mEventViewer; | 71 | KOEventViewer *mEventViewer; |
71 | Incidence* mIncidence; | 72 | Incidence* mIncidence; |
72 | void keyPressEvent ( QKeyEvent * e ); | 73 | void keyPressEvent ( QKeyEvent * e ); |
73 | }; | 74 | }; |
74 | 75 | ||
75 | #endif | 76 | #endif |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index e80b3fc..8752636 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -289,192 +289,199 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
289 | // bool full = fullScreen; | 289 | // bool full = fullScreen; |
290 | bool isFull = !mMainView->leftFrame()->isVisible(); | 290 | bool isFull = !mMainView->leftFrame()->isVisible(); |
291 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) | 291 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) |
292 | full = true; | 292 | full = true; |
293 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) | 293 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) |
294 | full = false; | 294 | full = false; |
295 | } | 295 | } |
296 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); | 296 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); |
297 | //raiseCurrentView( full ); | 297 | //raiseCurrentView( full ); |
298 | mMainView->processIncidenceSelection( 0 ); | 298 | mMainView->processIncidenceSelection( 0 ); |
299 | //mMainView->updateView(); | 299 | //mMainView->updateView(); |
300 | raiseCurrentView( full, callupdate ); | 300 | raiseCurrentView( full, callupdate ); |
301 | mMainView->adaptNavigationUnits(); | 301 | mMainView->adaptNavigationUnits(); |
302 | } | 302 | } |
303 | 303 | ||
304 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | 304 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) |
305 | { | 305 | { |
306 | mCurrentAgendaView = 0; | 306 | mCurrentAgendaView = 0; |
307 | if ( fullScreen ) { | 307 | if ( fullScreen ) { |
308 | mMainView->leftFrame()->hide(); | 308 | mMainView->leftFrame()->hide(); |
309 | } else { | 309 | } else { |
310 | mMainView->leftFrame()->show(); | 310 | mMainView->leftFrame()->show(); |
311 | } | 311 | } |
312 | //if ( mCurrentView == mMonthView ) qApp->processEvents(); | 312 | //if ( mCurrentView == mMonthView ) qApp->processEvents(); |
313 | emit signalFullScreen( !fullScreen ); | 313 | emit signalFullScreen( !fullScreen ); |
314 | if ( callUpdateView ) | 314 | if ( callUpdateView ) |
315 | mMainView->updateView(); | 315 | mMainView->updateView(); |
316 | 316 | ||
317 | if ( globalFlagBlockAgenda == 5 ) { | 317 | if ( globalFlagBlockAgenda == 5 ) { |
318 | globalFlagBlockAgenda = 4; | 318 | globalFlagBlockAgenda = 4; |
319 | globalFlagBlockAgendaItemPaint = 1; | 319 | globalFlagBlockAgendaItemPaint = 1; |
320 | } | 320 | } |
321 | mMainView->viewStack()->raiseWidget(mCurrentView); | 321 | mMainView->viewStack()->raiseWidget(mCurrentView); |
322 | if ( globalFlagBlockAgenda == 4 ) { | 322 | if ( globalFlagBlockAgenda == 4 ) { |
323 | if ( mCurrentView == mAgendaView ) { | 323 | if ( mCurrentView == mAgendaView ) { |
324 | //globalFlagBlockAgenda =1 ; | 324 | //globalFlagBlockAgenda =1 ; |
325 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) | 325 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) |
326 | mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); | 326 | mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); |
327 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 327 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
328 | mAgendaView->setStartHour( QTime::currentTime ().hour() ); | 328 | mAgendaView->setStartHour( QTime::currentTime ().hour() ); |
329 | qApp->processEvents(); | 329 | qApp->processEvents(); |
330 | //qDebug("qApp->processEvents() "); | 330 | //qDebug("qApp->processEvents() "); |
331 | globalFlagBlockAgenda = 0; | 331 | globalFlagBlockAgenda = 0; |
332 | mAgendaView->repaintAgenda(); | 332 | mAgendaView->repaintAgenda(); |
333 | 333 | ||
334 | } | 334 | } |
335 | globalFlagBlockAgenda = 0; | 335 | globalFlagBlockAgenda = 0; |
336 | } | 336 | } |
337 | emit signalAgendaView( mCurrentView == mAgendaView ); | 337 | emit signalAgendaView( mCurrentView == mAgendaView ); |
338 | //qDebug("raiseCurrentView ende "); | 338 | //qDebug("raiseCurrentView ende "); |
339 | 339 | ||
340 | } | 340 | } |
341 | 341 | ||
342 | void KOViewManager::updateView() | 342 | void KOViewManager::updateView() |
343 | { | 343 | { |
344 | // qDebug("KOViewManager::updateView() "); | 344 | // qDebug("KOViewManager::updateView() "); |
345 | // if we are updating mTodoView, we get endless recursion | 345 | // if we are updating mTodoView, we get endless recursion |
346 | if ( mTodoView == mCurrentView ) | 346 | if ( mTodoView == mCurrentView ) |
347 | return; | 347 | return; |
348 | if ( mCurrentView ) mCurrentView->updateView(); | 348 | if ( mCurrentView ) mCurrentView->updateView(); |
349 | 349 | ||
350 | } | 350 | } |
351 | 351 | ||
352 | void KOViewManager::updateView(const QDate &start, const QDate &end) | 352 | void KOViewManager::updateView(const QDate &start, const QDate &end) |
353 | { | 353 | { |
354 | // kdDebug() << "KOViewManager::updateView()" << endl; | 354 | // kdDebug() << "KOViewManager::updateView()" << endl; |
355 | 355 | ||
356 | if (mCurrentView) mCurrentView->showDates(start, end); | 356 | if (mCurrentView) mCurrentView->showDates(start, end); |
357 | 357 | ||
358 | if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); | 358 | if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); |
359 | } | 359 | } |
360 | 360 | ||
361 | 361 | ||
362 | void KOViewManager::updateWNview() | 362 | void KOViewManager::updateWNview() |
363 | { | 363 | { |
364 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) | 364 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) |
365 | mWhatsNextView->updateView(); | 365 | mWhatsNextView->updateView(); |
366 | 366 | ||
367 | } | 367 | } |
368 | void KOViewManager::showWhatsNextView() | 368 | void KOViewManager::showWhatsNextView() |
369 | { | 369 | { |
370 | if (!mWhatsNextView) { | 370 | if (!mWhatsNextView) { |
371 | mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), | 371 | mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), |
372 | "KOViewManager::WhatsNextView"); | 372 | "KOViewManager::WhatsNextView"); |
373 | mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); | 373 | mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); |
374 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); | 374 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); |
375 | addView(mWhatsNextView); | 375 | addView(mWhatsNextView); |
376 | connect(this, SIGNAL( printWNV() ), | 376 | connect(this, SIGNAL( printWNV() ), |
377 | mWhatsNextView, SLOT( printMe() ) ); | 377 | mWhatsNextView, SLOT( printMe() ) ); |
378 | } | 378 | } |
379 | globalFlagBlockAgenda = 1; | 379 | globalFlagBlockAgenda = 1; |
380 | showView(mWhatsNextView, true ); | 380 | showView(mWhatsNextView, true ); |
381 | //mWhatsNextView->updateView(); | 381 | //mWhatsNextView->updateView(); |
382 | 382 | ||
383 | } | 383 | } |
384 | 384 | ||
385 | void KOViewManager::slotprintWNV() | ||
386 | { | ||
387 | if (!mWhatsNextView) | ||
388 | showWhatsNextView(); | ||
389 | emit printWNV(); | ||
390 | |||
391 | } | ||
385 | void KOViewManager::showListView() | 392 | void KOViewManager::showListView() |
386 | { | 393 | { |
387 | if (!mListView) { | 394 | if (!mListView) { |
388 | mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); | 395 | mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); |
389 | addView(mListView); | 396 | addView(mListView); |
390 | 397 | ||
391 | connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), | 398 | connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), |
392 | mMainView, SLOT(showIncidence(Incidence *))); | 399 | mMainView, SLOT(showIncidence(Incidence *))); |
393 | connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), | 400 | connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), |
394 | mMainView, SLOT(editIncidence(Incidence *))); | 401 | mMainView, SLOT(editIncidence(Incidence *))); |
395 | connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 402 | connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
396 | mMainView, SLOT(deleteIncidence(Incidence *))); | 403 | mMainView, SLOT(deleteIncidence(Incidence *))); |
397 | connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), | 404 | connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), |
398 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 405 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
399 | connect( mListView, SIGNAL( signalNewEvent() ), | 406 | connect( mListView, SIGNAL( signalNewEvent() ), |
400 | mMainView, SLOT( newEvent() ) ); | 407 | mMainView, SLOT( newEvent() ) ); |
401 | connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); | 408 | connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); |
402 | connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), | 409 | connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), |
403 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 410 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
404 | connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), | 411 | connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), |
405 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 412 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
406 | connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 413 | connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
407 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 414 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
408 | connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 415 | connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
409 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 416 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
410 | } | 417 | } |
411 | // bool temp = mFlagShowNextxDays; | 418 | // bool temp = mFlagShowNextxDays; |
412 | //globalFlagBlockPainting = true; | 419 | //globalFlagBlockPainting = true; |
413 | globalFlagBlockAgenda = 1; | 420 | globalFlagBlockAgenda = 1; |
414 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { | 421 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { |
415 | mMainView->setBlockShowDates( true ); | 422 | mMainView->setBlockShowDates( true ); |
416 | mMainView->dateNavigator()->selectMonth(); | 423 | mMainView->dateNavigator()->selectMonth(); |
417 | mMainView->setBlockShowDates( false ); | 424 | mMainView->setBlockShowDates( false ); |
418 | } | 425 | } |
419 | showView(mListView, KOPrefs::instance()->mFullViewTodo); | 426 | showView(mListView, KOPrefs::instance()->mFullViewTodo); |
420 | //mFlagShowNextxDays = temp; | 427 | //mFlagShowNextxDays = temp; |
421 | } | 428 | } |
422 | 429 | ||
423 | void KOViewManager::showAgendaView( bool fullScreen ) | 430 | void KOViewManager::showAgendaView( bool fullScreen ) |
424 | { | 431 | { |
425 | 432 | ||
426 | mMainView->dialogManager()->hideSearchDialog(); | 433 | mMainView->dialogManager()->hideSearchDialog(); |
427 | // qDebug("KOViewManager::showAgendaView "); | 434 | // qDebug("KOViewManager::showAgendaView "); |
428 | bool full; | 435 | bool full; |
429 | full = fullScreen; | 436 | full = fullScreen; |
430 | if (!mAgendaView) { | 437 | if (!mAgendaView) { |
431 | full = false; | 438 | full = false; |
432 | mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); | 439 | mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); |
433 | addView(mAgendaView); | 440 | addView(mAgendaView); |
434 | #ifndef DESKTOP_VERSION | 441 | #ifndef DESKTOP_VERSION |
435 | QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); | 442 | QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); |
436 | #endif | 443 | #endif |
437 | connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), | 444 | connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), |
438 | mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); | 445 | mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); |
439 | 446 | ||
440 | // SIGNALS/SLOTS FOR DAY/WEEK VIEW | 447 | // SIGNALS/SLOTS FOR DAY/WEEK VIEW |
441 | 448 | ||
442 | connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); | 449 | connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); |
443 | 450 | ||
444 | connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), | 451 | connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), |
445 | mMainView, SLOT(newTodoDateTime(QDateTime,bool))); | 452 | mMainView, SLOT(newTodoDateTime(QDateTime,bool))); |
446 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), | 453 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), |
447 | mMainView, SLOT(newEvent(QDateTime))); | 454 | mMainView, SLOT(newEvent(QDateTime))); |
448 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), | 455 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), |
449 | mMainView, SLOT(newEvent(QDateTime,QDateTime))); | 456 | mMainView, SLOT(newEvent(QDateTime,QDateTime))); |
450 | connect(mAgendaView,SIGNAL(newEventSignal(QDate)), | 457 | connect(mAgendaView,SIGNAL(newEventSignal(QDate)), |
451 | mMainView, SLOT(newEvent(QDate))); | 458 | mMainView, SLOT(newEvent(QDate))); |
452 | 459 | ||
453 | connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), | 460 | connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), |
454 | mMainView, SLOT(editIncidence(Incidence *))); | 461 | mMainView, SLOT(editIncidence(Incidence *))); |
455 | connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), | 462 | connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), |
456 | mMainView, SLOT(showIncidence(Incidence *))); | 463 | mMainView, SLOT(showIncidence(Incidence *))); |
457 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 464 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
458 | mMainView, SLOT(deleteIncidence(Incidence *))); | 465 | mMainView, SLOT(deleteIncidence(Incidence *))); |
459 | 466 | ||
460 | connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), | 467 | connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), |
461 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 468 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
462 | 469 | ||
463 | connect(mAgendaView, SIGNAL( toggleExpand() ), | 470 | connect(mAgendaView, SIGNAL( toggleExpand() ), |
464 | mMainView, SLOT( toggleExpand() ) ); | 471 | mMainView, SLOT( toggleExpand() ) ); |
465 | 472 | ||
466 | connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), | 473 | connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), |
467 | mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; | 474 | mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; |
468 | connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), | 475 | connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), |
469 | mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; | 476 | mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; |
470 | connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); | 477 | connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); |
471 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, | 478 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, |
472 | SLOT( updateTodo( Todo *, int ) ) ); | 479 | SLOT( updateTodo( Todo *, int ) ) ); |
473 | connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), | 480 | connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), |
474 | mMainView, SIGNAL( todoModified( Todo *, int ))); | 481 | mMainView, SIGNAL( todoModified( Todo *, int ))); |
475 | connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 482 | connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
476 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 483 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
477 | connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 484 | connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
478 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 485 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
479 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), | 486 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), |
480 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); | 487 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index d829f14..1d565a6 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -1,122 +1,123 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 | 3 | Copyright (c) 2001 |
4 | Cornelius Schumacher <schumacher@kde.org> | 4 | Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | #ifndef KOVIEWMANAGER_H | 24 | #ifndef KOVIEWMANAGER_H |
25 | #define KOVIEWMANAGER_H | 25 | #define KOVIEWMANAGER_H |
26 | 26 | ||
27 | #include <qobject.h> | 27 | #include <qobject.h> |
28 | 28 | ||
29 | #include <korganizer/baseview.h> | 29 | #include <korganizer/baseview.h> |
30 | 30 | ||
31 | class CalendarView; | 31 | class CalendarView; |
32 | 32 | ||
33 | class KOListView; | 33 | class KOListView; |
34 | class KOAgendaView; | 34 | class KOAgendaView; |
35 | class KOMonthView; | 35 | class KOMonthView; |
36 | class KOTimeSpanView; | 36 | class KOTimeSpanView; |
37 | class KOTodoView; | 37 | class KOTodoView; |
38 | class KOWhatsNextView; | 38 | class KOWhatsNextView; |
39 | class KOJournalView; | 39 | class KOJournalView; |
40 | 40 | ||
41 | using namespace KCal; | 41 | using namespace KCal; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | This class manages the views of the calendar. It owns the objects and handles | 44 | This class manages the views of the calendar. It owns the objects and handles |
45 | creation and selection. | 45 | creation and selection. |
46 | */ | 46 | */ |
47 | class KOViewManager : public QObject | 47 | class KOViewManager : public QObject |
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | public: | 50 | public: |
51 | KOViewManager( CalendarView * ); | 51 | KOViewManager( CalendarView * ); |
52 | virtual ~KOViewManager(); | 52 | virtual ~KOViewManager(); |
53 | 53 | ||
54 | /** changes the view to be the currently selected view */ | 54 | /** changes the view to be the currently selected view */ |
55 | void showView(KOrg::BaseView *, bool fullScreen = false ); | 55 | void showView(KOrg::BaseView *, bool fullScreen = false ); |
56 | void updateWNview(); | 56 | void updateWNview(); |
57 | void readSettings(KConfig *config); | 57 | void readSettings(KConfig *config); |
58 | void writeSettings(KConfig *config); | 58 | void writeSettings(KConfig *config); |
59 | bool showsNextDays(); | 59 | bool showsNextDays(); |
60 | /** Read which view was shown last from config file */ | 60 | /** Read which view was shown last from config file */ |
61 | void readCurrentView(KConfig *); | 61 | void readCurrentView(KConfig *); |
62 | /** Write which view is currently shown to config file */ | 62 | /** Write which view is currently shown to config file */ |
63 | void writeCurrentView(KConfig *); | 63 | void writeCurrentView(KConfig *); |
64 | 64 | ||
65 | KOrg::BaseView *currentView(); | 65 | KOrg::BaseView *currentView(); |
66 | 66 | ||
67 | void setDocumentId( const QString & ); | 67 | void setDocumentId( const QString & ); |
68 | 68 | ||
69 | void updateView( const QDate &start, const QDate &end ); | 69 | void updateView( const QDate &start, const QDate &end ); |
70 | 70 | ||
71 | void raiseCurrentView( bool fullScreen = false , bool updateView = false); | 71 | void raiseCurrentView( bool fullScreen = false , bool updateView = false); |
72 | 72 | ||
73 | void addView(KOrg::BaseView *); | 73 | void addView(KOrg::BaseView *); |
74 | 74 | ||
75 | Incidence *currentSelection(); | 75 | Incidence *currentSelection(); |
76 | QDate currentSelectionDate(); | 76 | QDate currentSelectionDate(); |
77 | 77 | ||
78 | KOAgendaView *agendaView() const { return mAgendaView; } | 78 | KOAgendaView *agendaView() const { return mAgendaView; } |
79 | 79 | ||
80 | signals: | 80 | signals: |
81 | void printWNV(); | 81 | void printWNV(); |
82 | void signalFullScreen( bool ); | 82 | void signalFullScreen( bool ); |
83 | void signalAgendaView( bool ); | 83 | void signalAgendaView( bool ); |
84 | public slots: | 84 | public slots: |
85 | void slotprintWNV(); | ||
85 | void showNextView(); | 86 | void showNextView(); |
86 | void showMonth( const QDate & ); | 87 | void showMonth( const QDate & ); |
87 | void showDateView( int, QDate ); | 88 | void showDateView( int, QDate ); |
88 | void updateView(); | 89 | void updateView(); |
89 | void showWhatsNextView(); | 90 | void showWhatsNextView(); |
90 | void showListView(); | 91 | void showListView(); |
91 | void showAgendaView( bool fullScreen = false ); | 92 | void showAgendaView( bool fullScreen = false ); |
92 | void showDayView(); | 93 | void showDayView(); |
93 | void showWorkWeekView(); | 94 | void showWorkWeekView(); |
94 | void showWeekView(); | 95 | void showWeekView(); |
95 | void showNextXView(); | 96 | void showNextXView(); |
96 | void showMonthView(); | 97 | void showMonthView(); |
97 | void showMonthViewWeek(); | 98 | void showMonthViewWeek(); |
98 | void showTodoView(); | 99 | void showTodoView(); |
99 | void showJournalView(); | 100 | void showJournalView(); |
100 | void showTimeSpanView(); | 101 | void showTimeSpanView(); |
101 | 102 | ||
102 | private: | 103 | private: |
103 | void createMonthView(); | 104 | void createMonthView(); |
104 | CalendarView *mMainView; | 105 | CalendarView *mMainView; |
105 | 106 | ||
106 | int mCurrentAgendaView; | 107 | int mCurrentAgendaView; |
107 | KOAgendaView *mAgendaView; | 108 | KOAgendaView *mAgendaView; |
108 | KOListView *mListView; | 109 | KOListView *mListView; |
109 | KOMonthView *mMonthView; | 110 | KOMonthView *mMonthView; |
110 | KOTodoView *mTodoView; | 111 | KOTodoView *mTodoView; |
111 | KOWhatsNextView *mWhatsNextView; | 112 | KOWhatsNextView *mWhatsNextView; |
112 | KOJournalView *mJournalView; | 113 | KOJournalView *mJournalView; |
113 | KOTimeSpanView *mTimeSpanView; | 114 | KOTimeSpanView *mTimeSpanView; |
114 | 115 | ||
115 | KOrg::BaseView *mCurrentView; // currently active event view | 116 | KOrg::BaseView *mCurrentView; // currently active event view |
116 | 117 | ||
117 | int mAgendaViewMode; | 118 | int mAgendaViewMode; |
118 | bool mFlagShowNextxDays; | 119 | bool mFlagShowNextxDays; |
119 | 120 | ||
120 | }; | 121 | }; |
121 | 122 | ||
122 | #endif | 123 | #endif |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a4e0834..ad1c0cd 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -92,355 +92,360 @@ class KOex2phonePrefs : public QDialog | |||
92 | new QLabel( i18n("I/O device: "), temphb ); | 92 | new QLabel( i18n("I/O device: "), temphb ); |
93 | mPhoneDevice = new QLineEdit( temphb); | 93 | mPhoneDevice = new QLineEdit( temphb); |
94 | lay->addWidget( temphb ); | 94 | lay->addWidget( temphb ); |
95 | temphb = new QHBox( this ); | 95 | temphb = new QHBox( this ); |
96 | new QLabel( i18n("Connection: "), temphb ); | 96 | new QLabel( i18n("Connection: "), temphb ); |
97 | mPhoneConnection = new QLineEdit( temphb); | 97 | mPhoneConnection = new QLineEdit( temphb); |
98 | lay->addWidget( temphb ); | 98 | lay->addWidget( temphb ); |
99 | temphb = new QHBox( this ); | 99 | temphb = new QHBox( this ); |
100 | new QLabel( i18n("Model(opt.): "), temphb ); | 100 | new QLabel( i18n("Model(opt.): "), temphb ); |
101 | mPhoneModel = new QLineEdit( temphb); | 101 | mPhoneModel = new QLineEdit( temphb); |
102 | lay->addWidget( temphb ); | 102 | lay->addWidget( temphb ); |
103 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); | 103 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); |
104 | mWriteBackFuture->setChecked( true ); | 104 | mWriteBackFuture->setChecked( true ); |
105 | lay->addWidget( mWriteBackFuture ); | 105 | lay->addWidget( mWriteBackFuture ); |
106 | temphb = new QHBox( this ); | 106 | temphb = new QHBox( this ); |
107 | new QLabel( i18n("Max. weeks in future: ") , temphb ); | 107 | new QLabel( i18n("Max. weeks in future: ") , temphb ); |
108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); | 108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); |
109 | mWriteBackFutureWeeks->setValue( 8 ); | 109 | mWriteBackFutureWeeks->setValue( 8 ); |
110 | lay->addWidget( temphb ); | 110 | lay->addWidget( temphb ); |
111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); | 111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); |
112 | lab->setAlignment (AlignHCenter ); | 112 | lab->setAlignment (AlignHCenter ); |
113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
114 | lay->addWidget( ok ); | 114 | lay->addWidget( ok ); |
115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
116 | lay->addWidget( cancel ); | 116 | lay->addWidget( cancel ); |
117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
119 | resize( 220, 240 ); | 119 | resize( 220, 240 ); |
120 | qApp->processEvents(); | 120 | qApp->processEvents(); |
121 | int dw = QApplication::desktop()->width(); | 121 | int dw = QApplication::desktop()->width(); |
122 | int dh = QApplication::desktop()->height(); | 122 | int dh = QApplication::desktop()->height(); |
123 | move( (dw-width())/2, (dh - height() )/2 ); | 123 | move( (dw-width())/2, (dh - height() )/2 ); |
124 | } | 124 | } |
125 | 125 | ||
126 | public: | 126 | public: |
127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
128 | QCheckBox* mWriteBackFuture; | 128 | QCheckBox* mWriteBackFuture; |
129 | QSpinBox* mWriteBackFutureWeeks; | 129 | QSpinBox* mWriteBackFutureWeeks; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | int globalFlagBlockStartup; | 132 | int globalFlagBlockStartup; |
133 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | 133 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : |
134 | QMainWindow( parent, name ) | 134 | QMainWindow( parent, name ) |
135 | { | 135 | { |
136 | 136 | ||
137 | mClosed = false; | 137 | mClosed = false; |
138 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 138 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
139 | QString confFile = locateLocal("config","korganizerrc"); | 139 | QString confFile = locateLocal("config","korganizerrc"); |
140 | QFileInfo finf ( confFile ); | 140 | QFileInfo finf ( confFile ); |
141 | bool showWarning = !finf.exists(); | 141 | bool showWarning = !finf.exists(); |
142 | setIcon(SmallIcon( "ko24" ) ); | 142 | setIcon(SmallIcon( "ko24" ) ); |
143 | mBlockAtStartup = true; | 143 | mBlockAtStartup = true; |
144 | mFlagKeyPressed = false; | 144 | mFlagKeyPressed = false; |
145 | setCaption("KO/Pi"); | 145 | setCaption("KO/Pi"); |
146 | KOPrefs *p = KOPrefs::instance(); | 146 | KOPrefs *p = KOPrefs::instance(); |
147 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 147 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
148 | if ( p->mHourSize > 22 ) | 148 | if ( p->mHourSize > 22 ) |
149 | p->mHourSize = 22; | 149 | p->mHourSize = 22; |
150 | QMainWindow::ToolBarDock tbd; | 150 | QMainWindow::ToolBarDock tbd; |
151 | if ( p->mToolBarHor ) { | 151 | if ( p->mToolBarHor ) { |
152 | if ( p->mToolBarUp ) | 152 | if ( p->mToolBarUp ) |
153 | tbd = Bottom; | 153 | tbd = Bottom; |
154 | else | 154 | else |
155 | tbd = Top; | 155 | tbd = Top; |
156 | } | 156 | } |
157 | else { | 157 | else { |
158 | if ( p->mToolBarUp ) | 158 | if ( p->mToolBarUp ) |
159 | tbd = Right; | 159 | tbd = Right; |
160 | else | 160 | else |
161 | tbd = Left; | 161 | tbd = Left; |
162 | } | 162 | } |
163 | if ( KOPrefs::instance()->mUseAppColors ) | 163 | if ( KOPrefs::instance()->mUseAppColors ) |
164 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 164 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
165 | globalFlagBlockStartup = 1; | 165 | globalFlagBlockStartup = 1; |
166 | iconToolBar = new QPEToolBar( this ); | 166 | iconToolBar = new QPEToolBar( this ); |
167 | addToolBar (iconToolBar , tbd ); | 167 | addToolBar (iconToolBar , tbd ); |
168 | 168 | ||
169 | if ( KOPrefs::instance()->mShowIconFilter ) { | 169 | if ( KOPrefs::instance()->mShowIconFilter ) { |
170 | if ( p->mToolBarHorF ) { | 170 | if ( p->mToolBarHorF ) { |
171 | if ( p->mToolBarUpF ) | 171 | if ( p->mToolBarUpF ) |
172 | tbd = Bottom; | 172 | tbd = Bottom; |
173 | else | 173 | else |
174 | tbd = Top; | 174 | tbd = Top; |
175 | } | 175 | } |
176 | else { | 176 | else { |
177 | if ( p->mToolBarUpF ) | 177 | if ( p->mToolBarUpF ) |
178 | tbd = Right; | 178 | tbd = Right; |
179 | else | 179 | else |
180 | tbd = Left; | 180 | tbd = Left; |
181 | } | 181 | } |
182 | filterToolBar = new QPEToolBar ( this ); | 182 | filterToolBar = new QPEToolBar ( this ); |
183 | filterMenubar = new QPEMenuBar( filterToolBar ); | 183 | filterMenubar = new QPEMenuBar( filterToolBar ); |
184 | QFontMetrics fm ( filterMenubar->font() ); | 184 | QFontMetrics fm ( filterMenubar->font() ); |
185 | 185 | ||
186 | filterPopupMenu = new QPopupMenu( this ); | 186 | filterPopupMenu = new QPopupMenu( this ); |
187 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 187 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
188 | filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+"Ax" ) ); | 188 | QString addTest = "Ax"; |
189 | #ifdef DESKTOP_VERSION | ||
190 | addTest = "AAAx"; | ||
191 | #endif | ||
192 | filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+addTest ) ); | ||
189 | addToolBar (filterToolBar , tbd ); | 193 | addToolBar (filterToolBar , tbd ); |
190 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 194 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
191 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 195 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
192 | } else { | 196 | } else { |
193 | filterToolBar = 0; | 197 | filterToolBar = 0; |
194 | filterMenubar = 0; | 198 | filterMenubar = 0; |
195 | filterPopupMenu = 0; | 199 | filterPopupMenu = 0; |
196 | } | 200 | } |
197 | if ( p->mShowIconOnetoolbar ) { | 201 | if ( p->mShowIconOnetoolbar ) { |
198 | viewToolBar = iconToolBar ; | 202 | viewToolBar = iconToolBar ; |
199 | navigatorToolBar = iconToolBar ; | 203 | navigatorToolBar = iconToolBar ; |
200 | } else { | 204 | } else { |
201 | if ( p->mToolBarHorV ) { | 205 | if ( p->mToolBarHorV ) { |
202 | if ( p->mToolBarUpV ) | 206 | if ( p->mToolBarUpV ) |
203 | tbd = Bottom; | 207 | tbd = Bottom; |
204 | else | 208 | else |
205 | tbd = Top; | 209 | tbd = Top; |
206 | } | 210 | } |
207 | else { | 211 | else { |
208 | if ( p->mToolBarUpV ) | 212 | if ( p->mToolBarUpV ) |
209 | tbd = Right; | 213 | tbd = Right; |
210 | else | 214 | else |
211 | tbd = Left; | 215 | tbd = Left; |
212 | } | 216 | } |
213 | viewToolBar = new QPEToolBar( this ); | 217 | viewToolBar = new QPEToolBar( this ); |
214 | addToolBar (viewToolBar , tbd ); | 218 | addToolBar (viewToolBar , tbd ); |
215 | if ( p->mToolBarHorN ) { | 219 | if ( p->mToolBarHorN ) { |
216 | if ( p->mToolBarUpN ) | 220 | if ( p->mToolBarUpN ) |
217 | tbd = Bottom; | 221 | tbd = Bottom; |
218 | else | 222 | else |
219 | tbd = Top; | 223 | tbd = Top; |
220 | } | 224 | } |
221 | else { | 225 | else { |
222 | if ( p->mToolBarUpN ) | 226 | if ( p->mToolBarUpN ) |
223 | tbd = Right; | 227 | tbd = Right; |
224 | else | 228 | else |
225 | tbd = Left; | 229 | tbd = Left; |
226 | } | 230 | } |
227 | navigatorToolBar = new QPEToolBar( this ); | 231 | navigatorToolBar = new QPEToolBar( this ); |
228 | addToolBar (navigatorToolBar , tbd ); | 232 | addToolBar (navigatorToolBar , tbd ); |
229 | } | 233 | } |
230 | 234 | ||
231 | 235 | ||
232 | 236 | ||
233 | mCalendarModifiedFlag = false; | 237 | mCalendarModifiedFlag = false; |
234 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); | 238 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); |
235 | splash->setAlignment ( AlignCenter ); | 239 | splash->setAlignment ( AlignCenter ); |
236 | setCentralWidget( splash ); | 240 | setCentralWidget( splash ); |
237 | #ifndef DESKTOP_VERSION | 241 | #ifndef DESKTOP_VERSION |
238 | showMaximized(); | 242 | showMaximized(); |
239 | #endif | 243 | #endif |
240 | 244 | ||
241 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); | 245 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); |
242 | setDefaultPreferences(); | 246 | setDefaultPreferences(); |
243 | mCalendar = new CalendarLocal(); | 247 | mCalendar = new CalendarLocal(); |
244 | mView = new CalendarView( mCalendar, this,"mCalendar " ); | 248 | mView = new CalendarView( mCalendar, this,"mCalendar " ); |
245 | mView->hide(); | 249 | mView->hide(); |
246 | //mView->resize(splash->size() ); | 250 | //mView->resize(splash->size() ); |
247 | initActions(); | 251 | initActions(); |
248 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); | 252 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); |
249 | mSyncManager->setBlockSave(false); | 253 | mSyncManager->setBlockSave(false); |
250 | mView->setSyncManager(mSyncManager); | 254 | mView->setSyncManager(mSyncManager); |
251 | #ifndef DESKTOP_VERSION | 255 | #ifndef DESKTOP_VERSION |
252 | iconToolBar->show(); | 256 | iconToolBar->show(); |
253 | qApp->processEvents(); | 257 | qApp->processEvents(); |
254 | #endif | 258 | #endif |
255 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); | 259 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); |
256 | int vh = height() ; | 260 | int vh = height() ; |
257 | int vw = width(); | 261 | int vw = width(); |
258 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); | 262 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); |
259 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 263 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
260 | vh -= iconToolBar->height(); | 264 | vh -= iconToolBar->height(); |
261 | } else { | 265 | } else { |
262 | vw -= iconToolBar->height(); | 266 | vw -= iconToolBar->height(); |
263 | } | 267 | } |
264 | //mView->setMaximumSize( splash->size() ); | 268 | //mView->setMaximumSize( splash->size() ); |
265 | //mView->resize( splash->size() ); | 269 | //mView->resize( splash->size() ); |
266 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 270 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
267 | mView->readSettings(); | 271 | mView->readSettings(); |
268 | bool newFile = false; | 272 | bool newFile = false; |
269 | if( !QFile::exists( defaultFileName() ) ) { | 273 | if( !QFile::exists( defaultFileName() ) ) { |
270 | QFileInfo finfo ( defaultFileName() ); | 274 | QFileInfo finfo ( defaultFileName() ); |
271 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); | 275 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); |
272 | qDebug("oldfile %s ", oldFile.latin1()); | 276 | qDebug("oldfile %s ", oldFile.latin1()); |
273 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; | 277 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; |
274 | finfo.setFile( oldFile ); | 278 | finfo.setFile( oldFile ); |
275 | if (finfo.exists() ) { | 279 | if (finfo.exists() ) { |
276 | KMessageBox::information( this, message); | 280 | KMessageBox::information( this, message); |
277 | mView->openCalendar( oldFile ); | 281 | mView->openCalendar( oldFile ); |
278 | qApp->processEvents(); | 282 | qApp->processEvents(); |
279 | } else { | 283 | } else { |
280 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); | 284 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); |
281 | finfo.setFile( oldFile ); | 285 | finfo.setFile( oldFile ); |
282 | if (finfo.exists() ) { | 286 | if (finfo.exists() ) { |
283 | KMessageBox::information( this, message); | 287 | KMessageBox::information( this, message); |
284 | mView->openCalendar( oldFile ); | 288 | mView->openCalendar( oldFile ); |
285 | qApp->processEvents(); | 289 | qApp->processEvents(); |
286 | } | 290 | } |
287 | } | 291 | } |
288 | mView->saveCalendar( defaultFileName() ); | 292 | mView->saveCalendar( defaultFileName() ); |
289 | newFile = true; | 293 | newFile = true; |
290 | } | 294 | } |
291 | 295 | ||
292 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 296 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
293 | mView->openCalendar( defaultFileName() ); | 297 | mView->openCalendar( defaultFileName() ); |
294 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 298 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
295 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 299 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
296 | 300 | ||
297 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { | 301 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { |
298 | KOPrefs::instance()->setAllDefaults(); | 302 | KOPrefs::instance()->setAllDefaults(); |
299 | int count = mView->addCategories(); | 303 | int count = mView->addCategories(); |
300 | } | 304 | } |
301 | processIncidenceSelection( 0 ); | 305 | processIncidenceSelection( 0 ); |
302 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | 306 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), |
303 | SLOT( processIncidenceSelection( Incidence * ) ) ); | 307 | SLOT( processIncidenceSelection( Incidence * ) ) ); |
304 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | 308 | connect( mView, SIGNAL( modifiedChanged( bool ) ), |
305 | SLOT( slotModifiedChanged( bool ) ) ); | 309 | SLOT( slotModifiedChanged( bool ) ) ); |
306 | 310 | ||
307 | 311 | ||
308 | connect( mView, SIGNAL( tempDisableBR(bool) ), | 312 | connect( mView, SIGNAL( tempDisableBR(bool) ), |
309 | SLOT( disableBR(bool) ) ); | 313 | SLOT( disableBR(bool) ) ); |
310 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 314 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
311 | mView->setModified( false ); | 315 | mView->setModified( false ); |
312 | mBlockAtStartup = false; | 316 | mBlockAtStartup = false; |
313 | mView->setModified( false ); | 317 | mView->setModified( false ); |
314 | setCentralWidget( mView ); | 318 | setCentralWidget( mView ); |
315 | globalFlagBlockStartup = 0; | 319 | globalFlagBlockStartup = 0; |
316 | mView->show(); | 320 | mView->show(); |
317 | delete splash; | 321 | delete splash; |
318 | if ( newFile ) | 322 | if ( newFile ) |
319 | mView->updateConfig(); | 323 | mView->updateConfig(); |
320 | // qApp->processEvents(); | 324 | // qApp->processEvents(); |
321 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 325 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
322 | //fillSyncMenu(); | 326 | //fillSyncMenu(); |
323 | 327 | ||
324 | 328 | ||
325 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 329 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
326 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | 330 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); |
327 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); | 331 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); |
328 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 332 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
329 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 333 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
330 | mSyncManager->setDefaultFileName( sentSyncFile()); | 334 | mSyncManager->setDefaultFileName( sentSyncFile()); |
331 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); | 335 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); |
332 | mSyncManager->fillSyncMenu(); | 336 | mSyncManager->fillSyncMenu(); |
333 | 337 | ||
334 | 338 | ||
335 | 339 | ||
336 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 340 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
337 | if ( showWarning ) { | 341 | if ( showWarning ) { |
338 | KMessageBox::information( this, | 342 | KMessageBox::information( this, |
339 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 343 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
340 | qApp->processEvents(); | 344 | qApp->processEvents(); |
341 | mView->dialogManager()->showSyncOptions(); | 345 | mView->dialogManager()->showSyncOptions(); |
342 | } | 346 | } |
343 | 347 | ||
344 | //US listen for result adressed from Ka/Pi | 348 | //US listen for result adressed from Ka/Pi |
345 | #ifndef DESKTOP_VERSION | 349 | #ifndef DESKTOP_VERSION |
346 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 350 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
347 | #endif | 351 | #endif |
348 | #ifndef DESKTOP_VERSION | 352 | #ifndef DESKTOP_VERSION |
349 | infrared = 0; | 353 | infrared = 0; |
350 | #endif | 354 | #endif |
355 | updateFilterToolbar(); | ||
351 | updateWeek( mView->startDate() ); | 356 | updateWeek( mView->startDate() ); |
352 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 357 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
353 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); | 358 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); |
354 | mBRdisabled = false; | 359 | mBRdisabled = false; |
355 | //toggleBeamReceive(); | 360 | //toggleBeamReceive(); |
356 | } | 361 | } |
357 | MainWindow::~MainWindow() | 362 | MainWindow::~MainWindow() |
358 | { | 363 | { |
359 | //qDebug("MainWindow::~MainWindow() "); | 364 | //qDebug("MainWindow::~MainWindow() "); |
360 | //save toolbar location | 365 | //save toolbar location |
361 | delete mCalendar; | 366 | delete mCalendar; |
362 | delete mSyncManager; | 367 | delete mSyncManager; |
363 | #ifndef DESKTOP_VERSION | 368 | #ifndef DESKTOP_VERSION |
364 | if ( infrared ) | 369 | if ( infrared ) |
365 | delete infrared; | 370 | delete infrared; |
366 | #endif | 371 | #endif |
367 | 372 | ||
368 | 373 | ||
369 | } | 374 | } |
370 | 375 | ||
371 | void MainWindow::disableBR(bool b) | 376 | void MainWindow::disableBR(bool b) |
372 | { | 377 | { |
373 | #ifndef DESKTOP_VERSION | 378 | #ifndef DESKTOP_VERSION |
374 | if ( b ) { | 379 | if ( b ) { |
375 | if ( infrared ) { | 380 | if ( infrared ) { |
376 | toggleBeamReceive(); | 381 | toggleBeamReceive(); |
377 | mBRdisabled = true; | 382 | mBRdisabled = true; |
378 | } | 383 | } |
379 | mBRdisabled = true; | 384 | mBRdisabled = true; |
380 | } else { | 385 | } else { |
381 | if ( mBRdisabled ) { | 386 | if ( mBRdisabled ) { |
382 | mBRdisabled = false; | 387 | mBRdisabled = false; |
383 | //makes no sense,because other cal ap is probably running | 388 | //makes no sense,because other cal ap is probably running |
384 | // toggleBeamReceive(); | 389 | // toggleBeamReceive(); |
385 | } | 390 | } |
386 | } | 391 | } |
387 | #endif | 392 | #endif |
388 | 393 | ||
389 | } | 394 | } |
390 | bool MainWindow::beamReceiveEnabled() | 395 | bool MainWindow::beamReceiveEnabled() |
391 | { | 396 | { |
392 | #ifndef DESKTOP_VERSION | 397 | #ifndef DESKTOP_VERSION |
393 | return ( infrared != 0 ); | 398 | return ( infrared != 0 ); |
394 | #endif | 399 | #endif |
395 | return false; | 400 | return false; |
396 | } | 401 | } |
397 | 402 | ||
398 | void MainWindow::toggleBeamReceive() | 403 | void MainWindow::toggleBeamReceive() |
399 | { | 404 | { |
400 | if ( mBRdisabled ) | 405 | if ( mBRdisabled ) |
401 | return; | 406 | return; |
402 | #ifndef DESKTOP_VERSION | 407 | #ifndef DESKTOP_VERSION |
403 | if ( infrared ) { | 408 | if ( infrared ) { |
404 | qDebug("disable BeamReceive "); | 409 | qDebug("disable BeamReceive "); |
405 | delete infrared; | 410 | delete infrared; |
406 | infrared = 0; | 411 | infrared = 0; |
407 | brAction->setOn(false); | 412 | brAction->setOn(false); |
408 | return; | 413 | return; |
409 | } | 414 | } |
410 | qDebug("enable BeamReceive "); | 415 | qDebug("enable BeamReceive "); |
411 | brAction->setOn(true); | 416 | brAction->setOn(true); |
412 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 417 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
413 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 418 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); |
414 | #endif | 419 | #endif |
415 | } | 420 | } |
416 | void MainWindow::showMaximized () | 421 | void MainWindow::showMaximized () |
417 | { | 422 | { |
418 | #ifndef DESKTOP_VERSION | 423 | #ifndef DESKTOP_VERSION |
419 | if ( ! globalFlagBlockStartup ) | 424 | if ( ! globalFlagBlockStartup ) |
420 | if ( mClosed ) | 425 | if ( mClosed ) |
421 | mView->goToday(); | 426 | mView->goToday(); |
422 | #endif | 427 | #endif |
423 | QWidget::showMaximized () ; | 428 | QWidget::showMaximized () ; |
424 | mClosed = false; | 429 | mClosed = false; |
425 | } | 430 | } |
426 | void MainWindow::closeEvent( QCloseEvent* ce ) | 431 | void MainWindow::closeEvent( QCloseEvent* ce ) |
427 | { | 432 | { |
428 | 433 | ||
429 | 434 | ||
430 | 435 | ||
431 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 436 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
432 | saveOnClose(); | 437 | saveOnClose(); |
433 | mClosed = true; | 438 | mClosed = true; |
434 | ce->accept(); | 439 | ce->accept(); |
435 | return; | 440 | return; |
436 | 441 | ||
437 | } | 442 | } |
438 | 443 | ||
439 | switch( QMessageBox::information( this, "KO/Pi", | 444 | switch( QMessageBox::information( this, "KO/Pi", |
440 | i18n("Do you really want\nto close KO/Pi?"), | 445 | i18n("Do you really want\nto close KO/Pi?"), |
441 | i18n("Close"), i18n("No"), | 446 | i18n("Close"), i18n("No"), |
442 | 0, 0 ) ) { | 447 | 0, 0 ) ) { |
443 | case 0: | 448 | case 0: |
444 | saveOnClose(); | 449 | saveOnClose(); |
445 | mClosed = true; | 450 | mClosed = true; |
446 | ce->accept(); | 451 | ce->accept(); |
@@ -899,193 +904,200 @@ void MainWindow::initActions() | |||
899 | if ( KOPrefs::instance()->mShowFullMenu ) { | 904 | if ( KOPrefs::instance()->mShowFullMenu ) { |
900 | actionMenu->insertSeparator(); | 905 | actionMenu->insertSeparator(); |
901 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 906 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
902 | 907 | ||
903 | } | 908 | } |
904 | // actionMenu->insertSeparator(); | 909 | // actionMenu->insertSeparator(); |
905 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 910 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
906 | this ); | 911 | this ); |
907 | action->addTo( importMenu_X ); | 912 | action->addTo( importMenu_X ); |
908 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 913 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
909 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 914 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
910 | this ); | 915 | this ); |
911 | action->addTo( importMenu_X ); | 916 | action->addTo( importMenu_X ); |
912 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 917 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
913 | importMenu_X->insertSeparator(); | 918 | importMenu_X->insertSeparator(); |
914 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 919 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
915 | this ); | 920 | this ); |
916 | action->addTo( importMenu_X ); | 921 | action->addTo( importMenu_X ); |
917 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 922 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
918 | //#ifndef DESKTOP_VERSION | 923 | //#ifndef DESKTOP_VERSION |
919 | importMenu_X->insertSeparator(); | 924 | importMenu_X->insertSeparator(); |
920 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 925 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
921 | this ); | 926 | this ); |
922 | action->addTo( importMenu_X ); | 927 | action->addTo( importMenu_X ); |
923 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 928 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
924 | //#else | 929 | //#else |
925 | #ifdef _OL_IMPORT_ | 930 | #ifdef _OL_IMPORT_ |
926 | importMenu_X->insertSeparator(); | 931 | importMenu_X->insertSeparator(); |
927 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 932 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
928 | this ); | 933 | this ); |
929 | action->addTo( importMenu_X ); | 934 | action->addTo( importMenu_X ); |
930 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 935 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
931 | #endif | 936 | #endif |
932 | //#endif | 937 | //#endif |
933 | 938 | ||
934 | //importMenu->insertSeparator(); | 939 | //importMenu->insertSeparator(); |
935 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 940 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
936 | this ); | 941 | this ); |
937 | action->addTo( importMenu ); | 942 | action->addTo( importMenu ); |
938 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 943 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
939 | 944 | ||
940 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, | 945 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, |
941 | this ); | 946 | this ); |
942 | action->addTo( importMenu ); | 947 | action->addTo( importMenu ); |
943 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 948 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
944 | importMenu->insertSeparator(); | 949 | importMenu->insertSeparator(); |
945 | importMenu->insertItem( i18n("Import"), importMenu_X ); | 950 | importMenu->insertItem( i18n("Import"), importMenu_X ); |
946 | //importMenu->insertSeparator(); | 951 | //importMenu->insertSeparator(); |
947 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 952 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
948 | this ); | 953 | this ); |
949 | action->addTo( exportMenu_X ); | 954 | action->addTo( exportMenu_X ); |
950 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 955 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
951 | 956 | ||
952 | 957 | ||
953 | //LR | 958 | //LR |
954 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 959 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
955 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 960 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
956 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 961 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
957 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 962 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
958 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); | 963 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); |
959 | 964 | ||
960 | importMenu->insertItem( i18n("Export"), exportMenu_X ); | 965 | importMenu->insertItem( i18n("Export"), exportMenu_X ); |
961 | #ifndef DESKTOP_VERSION | 966 | #ifndef DESKTOP_VERSION |
962 | //importMenu->insertSeparator(); | 967 | //importMenu->insertSeparator(); |
963 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 968 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
964 | this ); | 969 | this ); |
965 | brAction->addTo( beamMenu_X ); | 970 | brAction->addTo( beamMenu_X ); |
966 | brAction->setToggleAction (true ) ; | 971 | brAction->setToggleAction (true ) ; |
967 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 972 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
968 | 973 | ||
969 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 974 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
970 | this ); | 975 | this ); |
971 | action->addTo( beamMenu_X ); | 976 | action->addTo( beamMenu_X ); |
972 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 977 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
973 | 978 | ||
974 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 979 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
975 | this ); | 980 | this ); |
976 | action->addTo( beamMenu_X ); | 981 | action->addTo( beamMenu_X ); |
977 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 982 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
978 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); | 983 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); |
979 | #else | 984 | #else |
980 | //importMenu->insertSeparator(); | 985 | //importMenu->insertSeparator(); |
981 | icon = loadPixmap( pathString + "print" ); | 986 | icon = loadPixmap( pathString + "print" ); |
982 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 987 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
983 | action->addTo( beamMenu_X ); | 988 | action->addTo( beamMenu_X ); |
984 | connect( action, SIGNAL( activated() ), | 989 | connect( action, SIGNAL( activated() ), |
985 | this, SLOT( printCal() ) ); | 990 | this, SLOT( printCal() ) ); |
986 | 991 | ||
987 | icon = loadPixmap( pathString + "print" ); | 992 | icon = loadPixmap( pathString + "print" ); |
988 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 993 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
989 | action->addTo( beamMenu_X ); | 994 | action->addTo( beamMenu_X ); |
990 | connect( action, SIGNAL( activated() ), | 995 | connect( action, SIGNAL( activated() ), |
991 | this, SLOT( printSel() ) ); | 996 | this, SLOT( printSel() ) ); |
992 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | 997 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); |
993 | action->addTo( beamMenu_X ); | 998 | action->addTo( beamMenu_X ); |
994 | connect( action, SIGNAL( activated() ), | 999 | connect( action, SIGNAL( activated() ), |
995 | mView->viewManager(), SIGNAL( printWNV() ) ); | 1000 | mView->viewManager(), SLOT( slotprintWNV() ) ); |
1001 | |||
1002 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); | ||
1003 | action->addTo( beamMenu_X ); | ||
1004 | connect( action, SIGNAL( activated() ), | ||
1005 | mView, SLOT( slotprintSelInc() ) ); | ||
1006 | |||
1007 | |||
996 | importMenu->insertItem( i18n("Print"), beamMenu_X ); | 1008 | importMenu->insertItem( i18n("Print"), beamMenu_X ); |
997 | #endif | 1009 | #endif |
998 | importMenu->insertSeparator(); | 1010 | importMenu->insertSeparator(); |
999 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1011 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
1000 | this ); | 1012 | this ); |
1001 | action->addTo( importMenu ); | 1013 | action->addTo( importMenu ); |
1002 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1014 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
1003 | importMenu->insertSeparator(); | 1015 | importMenu->insertSeparator(); |
1004 | action = new QAction( "beam all", i18n("Save"), 0, | 1016 | action = new QAction( "beam all", i18n("Save"), 0, |
1005 | this ); | 1017 | this ); |
1006 | action->addTo( importMenu ); | 1018 | action->addTo( importMenu ); |
1007 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 1019 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
1008 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 1020 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
1009 | this ); | 1021 | this ); |
1010 | action->addTo( importMenu ); | 1022 | action->addTo( importMenu ); |
1011 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 1023 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
1012 | 1024 | ||
1013 | //menuBar->insertItem( "Configure",configureMenu ); | 1025 | //menuBar->insertItem( "Configure",configureMenu ); |
1014 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 1026 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
1015 | icon = loadPixmap( "korganizer/korganizer" ); | 1027 | icon = loadPixmap( "korganizer/korganizer" ); |
1016 | 1028 | ||
1017 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 1029 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
1018 | action->addTo( helpMenu ); | 1030 | action->addTo( helpMenu ); |
1019 | connect( action, SIGNAL( activated() ), | 1031 | connect( action, SIGNAL( activated() ), |
1020 | SLOT( whatsNew() ) ); | 1032 | SLOT( whatsNew() ) ); |
1021 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 1033 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
1022 | action->addTo( helpMenu ); | 1034 | action->addTo( helpMenu ); |
1023 | connect( action, SIGNAL( activated() ), | 1035 | connect( action, SIGNAL( activated() ), |
1024 | SLOT( features() ) ); | 1036 | SLOT( features() ) ); |
1025 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 1037 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
1026 | action->addTo( helpMenu ); | 1038 | action->addTo( helpMenu ); |
1027 | connect( action, SIGNAL( activated() ), | 1039 | connect( action, SIGNAL( activated() ), |
1028 | SLOT( keyBindings() ) ); | 1040 | SLOT( keyBindings() ) ); |
1029 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 1041 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
1030 | action->addTo( helpMenu ); | 1042 | action->addTo( helpMenu ); |
1031 | connect( action, SIGNAL( activated() ), | 1043 | connect( action, SIGNAL( activated() ), |
1032 | SLOT( synchowto() ) ); | 1044 | SLOT( synchowto() ) ); |
1033 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 1045 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
1034 | action->addTo( helpMenu ); | 1046 | action->addTo( helpMenu ); |
1035 | connect( action, SIGNAL( activated() ), | 1047 | connect( action, SIGNAL( activated() ), |
1036 | SLOT( kdesynchowto() ) ); | 1048 | SLOT( kdesynchowto() ) ); |
1037 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 1049 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
1038 | action->addTo( helpMenu ); | 1050 | action->addTo( helpMenu ); |
1039 | connect( action, SIGNAL( activated() ), | 1051 | connect( action, SIGNAL( activated() ), |
1040 | SLOT( multisynchowto() ) ); | 1052 | SLOT( multisynchowto() ) ); |
1041 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 1053 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
1042 | action->addTo( helpMenu ); | 1054 | action->addTo( helpMenu ); |
1043 | connect( action, SIGNAL( activated() ), | 1055 | connect( action, SIGNAL( activated() ), |
1044 | SLOT( aboutAutoSaving() ) ); | 1056 | SLOT( aboutAutoSaving() ) ); |
1045 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 1057 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
1046 | action->addTo( helpMenu ); | 1058 | action->addTo( helpMenu ); |
1047 | connect( action, SIGNAL( activated() ), | 1059 | connect( action, SIGNAL( activated() ), |
1048 | SLOT( aboutKnownBugs() ) ); | 1060 | SLOT( aboutKnownBugs() ) ); |
1049 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 1061 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
1050 | action->addTo( helpMenu ); | 1062 | action->addTo( helpMenu ); |
1051 | connect( action, SIGNAL( activated() ), | 1063 | connect( action, SIGNAL( activated() ), |
1052 | SLOT( usertrans() ) ); | 1064 | SLOT( usertrans() ) ); |
1053 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 1065 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
1054 | action->addTo( helpMenu ); | 1066 | action->addTo( helpMenu ); |
1055 | connect( action, SIGNAL( activated() ), | 1067 | connect( action, SIGNAL( activated() ), |
1056 | SLOT( faq() ) ); | 1068 | SLOT( faq() ) ); |
1057 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 1069 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
1058 | action->addTo( helpMenu ); | 1070 | action->addTo( helpMenu ); |
1059 | connect( action, SIGNAL( activated() ), | 1071 | connect( action, SIGNAL( activated() ), |
1060 | SLOT( licence() ) ); | 1072 | SLOT( licence() ) ); |
1061 | action = new QAction( "about", i18n("About..."), 0, this ); | 1073 | action = new QAction( "about", i18n("About..."), 0, this ); |
1062 | action->addTo( helpMenu ); | 1074 | action->addTo( helpMenu ); |
1063 | connect( action, SIGNAL( activated() ), | 1075 | connect( action, SIGNAL( activated() ), |
1064 | SLOT( about() ) ); | 1076 | SLOT( about() ) ); |
1065 | //menuBar->insertSeparator(); | 1077 | //menuBar->insertSeparator(); |
1066 | 1078 | ||
1067 | // ****************************************************** | 1079 | // ****************************************************** |
1068 | // menubar icons | 1080 | // menubar icons |
1069 | 1081 | ||
1070 | 1082 | ||
1071 | 1083 | ||
1072 | //menuBar->insertItem( iconToolBar ); | 1084 | //menuBar->insertItem( iconToolBar ); |
1073 | //xdays_action | 1085 | //xdays_action |
1074 | if (p-> mShowIconNewEvent) | 1086 | if (p-> mShowIconNewEvent) |
1075 | ne_action->addTo( iconToolBar ); | 1087 | ne_action->addTo( iconToolBar ); |
1076 | if (p->mShowIconNewTodo ) | 1088 | if (p->mShowIconNewTodo ) |
1077 | nt_action->addTo( iconToolBar ); | 1089 | nt_action->addTo( iconToolBar ); |
1078 | if (p-> mShowIconSearch) | 1090 | if (p-> mShowIconSearch) |
1079 | search_action->addTo( iconToolBar ); | 1091 | search_action->addTo( iconToolBar ); |
1080 | if (p-> mShowIconWhatsThis) | 1092 | if (p-> mShowIconWhatsThis) |
1081 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1093 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1082 | if (p-> mShowIconNext) | 1094 | if (p-> mShowIconNext) |
1083 | whatsnext_action->addTo( viewToolBar ); | 1095 | whatsnext_action->addTo( viewToolBar ); |
1084 | if (p-> mShowIconNextDays) | 1096 | if (p-> mShowIconNextDays) |
1085 | xdays_action->addTo( viewToolBar ); | 1097 | xdays_action->addTo( viewToolBar ); |
1086 | if (p-> mShowIconJournal) | 1098 | if (p-> mShowIconJournal) |
1087 | viewjournal_action->addTo( viewToolBar ); | 1099 | viewjournal_action->addTo( viewToolBar ); |
1088 | if (p-> mShowIconDay1) | 1100 | if (p-> mShowIconDay1) |
1089 | day1_action->addTo( viewToolBar ); | 1101 | day1_action->addTo( viewToolBar ); |
1090 | if (p-> mShowIconDay5) | 1102 | if (p-> mShowIconDay5) |
1091 | day5_action->addTo( viewToolBar ); | 1103 | day5_action->addTo( viewToolBar ); |
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index 49149f2..0610d55 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp | |||
@@ -20,237 +20,238 @@ | |||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qstring.h> | 25 | #include <qstring.h> |
26 | #include <qtooltip.h> | 26 | #include <qtooltip.h> |
27 | #include <qpushbutton.h> | 27 | #include <qpushbutton.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qframe.h> | 29 | #include <qframe.h> |
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <qpopupmenu.h> | 31 | #include <qpopupmenu.h> |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | 33 | ||
34 | #include <kdebug.h> | 34 | #include <kdebug.h> |
35 | #include <klocale.h> | 35 | #include <klocale.h> |
36 | #include <kglobal.h> | 36 | #include <kglobal.h> |
37 | #include <kiconloader.h> | 37 | #include <kiconloader.h> |
38 | #include "libkdepim/kdatepicker.h" | 38 | #include "libkdepim/kdatepicker.h" |
39 | #include <knotifyclient.h> | 39 | #include <knotifyclient.h> |
40 | #include "kdatetbl.h" | 40 | #include "kdatetbl.h" |
41 | 41 | ||
42 | #include "koglobals.h" | 42 | #include "koglobals.h" |
43 | #include <kglobalsettings.h> | 43 | #include <kglobalsettings.h> |
44 | #include "koprefs.h" | 44 | #include "koprefs.h" |
45 | #ifndef KORG_NOPLUGINS | 45 | #ifndef KORG_NOPLUGINS |
46 | #include "kocore.h" | 46 | #include "kocore.h" |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #include <kcalendarsystem.h> | 49 | #include <kcalendarsystem.h> |
50 | 50 | ||
51 | #include "navigatorbar.h" | 51 | #include "navigatorbar.h" |
52 | 52 | ||
53 | NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name ) | 53 | NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name ) |
54 | : QWidget( parent, name ) | 54 | : QWidget( parent, name ) |
55 | { | 55 | { |
56 | QBoxLayout *topLayout = new QHBoxLayout( this ); | 56 | QBoxLayout *topLayout = new QHBoxLayout( this ); |
57 | 57 | ||
58 | // Set up the control buttons and date label | 58 | // Set up the control buttons and date label |
59 | mCtrlFrame = new QFrame( this ); | 59 | mCtrlFrame = new QFrame( this ); |
60 | mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); | 60 | mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); |
61 | mCtrlFrame->setLineWidth(1); | 61 | mCtrlFrame->setLineWidth(1); |
62 | 62 | ||
63 | topLayout->addWidget( mCtrlFrame ); | 63 | topLayout->addWidget( mCtrlFrame ); |
64 | 64 | ||
65 | 65 | ||
66 | 66 | ||
67 | bool isRTL = KOGlobals::self()->reverseLayout(); | 67 | bool isRTL = KOGlobals::self()->reverseLayout(); |
68 | #ifndef DESKTOP_VERSION | 68 | #ifndef DESKTOP_VERSION |
69 | bool isDesktop = false; | 69 | bool isDesktop = false; |
70 | #else | 70 | #else |
71 | bool isDesktop = true; | 71 | bool isDesktop = true; |
72 | #endif | 72 | #endif |
73 | if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 ) | 73 | if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 ) |
74 | isDesktop = true; | 74 | isDesktop = true; |
75 | // Create backward navigation buttons | 75 | // Create backward navigation buttons |
76 | mPrevYear = new QPushButton( mCtrlFrame ); | 76 | mPrevYear = new QPushButton( mCtrlFrame ); |
77 | mPrevYear->setPixmap( SmallIcon( isDesktop ? "3leftarrowB" : "3leftarrow" ) ); | 77 | mPrevYear->setPixmap( SmallIcon( isDesktop ? "3leftarrowB" : "3leftarrow" ) ); |
78 | QToolTip::add( mPrevYear, i18n("Previous Year") ); | 78 | QToolTip::add( mPrevYear, i18n("Previous Year") ); |
79 | 79 | ||
80 | mPrevMonth = new QPushButton( mCtrlFrame ); | 80 | mPrevMonth = new QPushButton( mCtrlFrame ); |
81 | mPrevMonth->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow") ); | 81 | mPrevMonth->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow") ); |
82 | QToolTip::add( mPrevMonth, i18n("Previous Month") ); | 82 | QToolTip::add( mPrevMonth, i18n("Previous Month") ); |
83 | 83 | ||
84 | // Create forward navigation buttons | 84 | // Create forward navigation buttons |
85 | mNextMonth = new QPushButton( mCtrlFrame ); | 85 | mNextMonth = new QPushButton( mCtrlFrame ); |
86 | mNextMonth->setPixmap( SmallIcon( isDesktop ? "2rightarrowB" : "2rightarrow") ); | 86 | mNextMonth->setPixmap( SmallIcon( isDesktop ? "2rightarrowB" : "2rightarrow") ); |
87 | QToolTip::add( mNextMonth, i18n("Next Month") ); | 87 | QToolTip::add( mNextMonth, i18n("Next Month") ); |
88 | 88 | ||
89 | mPrevWeek = new QPushButton( mCtrlFrame ); | 89 | mPrevWeek = new QPushButton( mCtrlFrame ); |
90 | mPrevWeek->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") ); | 90 | mPrevWeek->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") ); |
91 | QToolTip::add( mPrevWeek, i18n("Previous Week") ); | 91 | QToolTip::add( mPrevWeek, i18n("Previous Week") ); |
92 | 92 | ||
93 | // Create forward navigation buttons | 93 | // Create forward navigation buttons |
94 | mNextWeek = new QPushButton( mCtrlFrame ); | 94 | mNextWeek = new QPushButton( mCtrlFrame ); |
95 | mNextWeek->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") ); | 95 | mNextWeek->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") ); |
96 | QToolTip::add( mNextWeek, i18n("Next Week") ); | 96 | QToolTip::add( mNextWeek, i18n("Next Week") ); |
97 | 97 | ||
98 | mNextYear = new QPushButton( mCtrlFrame ); | 98 | mNextYear = new QPushButton( mCtrlFrame ); |
99 | mNextYear->setPixmap( SmallIcon( isDesktop ? "3rightarrowB": "3rightarrow") ); | 99 | mNextYear->setPixmap( SmallIcon( isDesktop ? "3rightarrowB": "3rightarrow") ); |
100 | QToolTip::add( mNextYear, i18n("Next Year") ); | 100 | QToolTip::add( mNextYear, i18n("Next Year") ); |
101 | mSelectMonth = new QPushButton( mCtrlFrame ); | 101 | mSelectMonth = new QPushButton( mCtrlFrame ); |
102 | // Create month name label | 102 | // Create month name label |
103 | //selectMonth->setFont( tfont ); | 103 | //selectMonth->setFont( tfont ); |
104 | // selectMonth->setAlignment( AlignCenter ); | 104 | // selectMonth->setAlignment( AlignCenter ); |
105 | //mDateLabel = new QLabel( selectMonth ); | 105 | //mDateLabel = new QLabel( selectMonth ); |
106 | //mDateLabel->setFont( tfont ); | 106 | //mDateLabel->setFont( tfont ); |
107 | //mDateLabel->setAlignment( AlignCenter ); | 107 | //mDateLabel->setAlignment( AlignCenter ); |
108 | if ( QString ( name ) == QString("useBigPixmaps") ) { | 108 | if ( QString ( name ) == QString("useBigPixmaps") ) { |
109 | mNextMonth->setFlat( true); | 109 | mNextMonth->setFlat( true); |
110 | mNextWeek->setFlat( true); | 110 | mNextWeek->setFlat( true); |
111 | mNextYear->setFlat( true); | 111 | mNextYear->setFlat( true); |
112 | mSelectMonth->setFlat( true); | 112 | mSelectMonth->setFlat( true); |
113 | mPrevYear->setFlat( true); | 113 | mPrevYear->setFlat( true); |
114 | mPrevMonth->setFlat( true); | 114 | mPrevMonth->setFlat( true); |
115 | mPrevWeek->setFlat( true); | 115 | mPrevWeek->setFlat( true); |
116 | |||
117 | mPrevYear->setAutoRepeat( true ); | ||
118 | mPrevMonth->setAutoRepeat( true ); | ||
119 | mNextMonth->setAutoRepeat( true ); | ||
120 | mPrevWeek->setAutoRepeat( true ); | ||
121 | mNextWeek->setAutoRepeat( true ); | ||
122 | mNextYear->setAutoRepeat( true ); | ||
116 | } else { | 123 | } else { |
117 | mPrevWeek->hide(); | 124 | mPrevWeek->hide(); |
118 | mNextWeek->hide(); | 125 | mNextWeek->hide(); |
119 | } | 126 | } |
120 | 127 | ||
121 | resetFont( font() ); | 128 | resetFont( font() ); |
122 | 129 | ||
123 | 130 | ||
124 | // set up control frame layout | 131 | // set up control frame layout |
125 | QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); | 132 | QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); |
126 | ctrlLayout->addWidget( mPrevYear, 3 ); | 133 | ctrlLayout->addWidget( mPrevYear, 3 ); |
127 | ctrlLayout->addWidget( mPrevMonth, 3 ); | 134 | ctrlLayout->addWidget( mPrevMonth, 3 ); |
128 | ctrlLayout->addWidget( mPrevWeek, 3 ); | 135 | ctrlLayout->addWidget( mPrevWeek, 3 ); |
129 | //ctrlLayout->addStretch( 1 ); | 136 | //ctrlLayout->addStretch( 1 ); |
130 | // ctrlLayout->addSpacing( 1 ); | 137 | // ctrlLayout->addSpacing( 1 ); |
131 | // ctrlLayout->addWidget( mDateLabel ); | 138 | // ctrlLayout->addWidget( mDateLabel ); |
132 | ctrlLayout->addWidget( mSelectMonth ); | 139 | ctrlLayout->addWidget( mSelectMonth ); |
133 | // ctrlLayout->addSpacing( 1 ); | 140 | // ctrlLayout->addSpacing( 1 ); |
134 | // ctrlLayout->addStretch( 1 ); | 141 | // ctrlLayout->addStretch( 1 ); |
135 | ctrlLayout->addWidget( mNextWeek, 3 ); | 142 | ctrlLayout->addWidget( mNextWeek, 3 ); |
136 | ctrlLayout->addWidget( mNextMonth, 3 ); | 143 | ctrlLayout->addWidget( mNextMonth, 3 ); |
137 | ctrlLayout->addWidget( mNextYear, 3 ); | 144 | ctrlLayout->addWidget( mNextYear, 3 ); |
138 | 145 | ||
139 | connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) ); | 146 | connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) ); |
140 | connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) ); | 147 | connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) ); |
141 | connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) ); | 148 | connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) ); |
142 | connect( mPrevWeek, SIGNAL( clicked() ), SIGNAL( goPrevWeek() ) ); | 149 | connect( mPrevWeek, SIGNAL( clicked() ), SIGNAL( goPrevWeek() ) ); |
143 | connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) ); | 150 | connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) ); |
144 | connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); | 151 | connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); |
145 | connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); | 152 | connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); |
146 | mPrevYear->setFocusPolicy(NoFocus); | 153 | mPrevYear->setFocusPolicy(NoFocus); |
147 | mPrevMonth->setFocusPolicy(NoFocus); | 154 | mPrevMonth->setFocusPolicy(NoFocus); |
148 | mNextMonth->setFocusPolicy(NoFocus); | 155 | mNextMonth->setFocusPolicy(NoFocus); |
149 | mPrevWeek->setFocusPolicy(NoFocus); | 156 | mPrevWeek->setFocusPolicy(NoFocus); |
150 | mNextWeek->setFocusPolicy(NoFocus); | 157 | mNextWeek->setFocusPolicy(NoFocus); |
151 | mNextYear->setFocusPolicy(NoFocus); | 158 | mNextYear->setFocusPolicy(NoFocus); |
152 | mSelectMonth->setFocusPolicy(NoFocus); | 159 | mSelectMonth->setFocusPolicy(NoFocus); |
153 | setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); | 160 | setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); |
154 | mPrevYear->setAutoRepeat( true ); | 161 | |
155 | mPrevMonth->setAutoRepeat( true ); | ||
156 | mNextMonth->setAutoRepeat( true ); | ||
157 | mPrevWeek->setAutoRepeat( true ); | ||
158 | mNextWeek->setAutoRepeat( true ); | ||
159 | mNextYear->setAutoRepeat( true ); | ||
160 | |||
161 | } | 162 | } |
162 | 163 | ||
163 | NavigatorBar::~NavigatorBar() | 164 | NavigatorBar::~NavigatorBar() |
164 | { | 165 | { |
165 | } | 166 | } |
166 | QSize NavigatorBar::sizeHint() const | 167 | QSize NavigatorBar::sizeHint() const |
167 | { | 168 | { |
168 | int wid = mCurrentMinWid ; | 169 | int wid = mCurrentMinWid ; |
169 | if ( mPrevYear->isVisible() ) | 170 | if ( mPrevYear->isVisible() ) |
170 | wid += mCurrentButtonMinWid; | 171 | wid += mCurrentButtonMinWid; |
171 | if ( mPrevMonth->isVisible() ) | 172 | if ( mPrevMonth->isVisible() ) |
172 | wid += mCurrentButtonMinWid; | 173 | wid += mCurrentButtonMinWid; |
173 | if ( mPrevWeek->isVisible() ) | 174 | if ( mPrevWeek->isVisible() ) |
174 | wid += mCurrentButtonMinWid; | 175 | wid += mCurrentButtonMinWid; |
175 | if ( mNextMonth->isVisible() ) | 176 | if ( mNextMonth->isVisible() ) |
176 | wid += mCurrentButtonMinWid; | 177 | wid += mCurrentButtonMinWid; |
177 | if ( mNextWeek->isVisible() ) | 178 | if ( mNextWeek->isVisible() ) |
178 | wid += mCurrentButtonMinWid; | 179 | wid += mCurrentButtonMinWid; |
179 | if ( mNextYear->isVisible() ) | 180 | if ( mNextYear->isVisible() ) |
180 | wid += mCurrentButtonMinWid; | 181 | wid += mCurrentButtonMinWid; |
181 | //qDebug("ret %d %d ", wid, mCurrentHei); | 182 | //qDebug("ret %d %d ", wid, mCurrentHei); |
182 | return QSize ( wid, mCurrentHei ); | 183 | return QSize ( wid, mCurrentHei ); |
183 | } | 184 | } |
184 | QSize NavigatorBar::sizeHintTwoButtons( int butNum ) const | 185 | QSize NavigatorBar::sizeHintTwoButtons( int butNum ) const |
185 | { | 186 | { |
186 | return QSize ( mCurrentMinWid + butNum * mCurrentButtonMinWid , mCurrentHei ); | 187 | return QSize ( mCurrentMinWid + butNum * mCurrentButtonMinWid , mCurrentHei ); |
187 | } | 188 | } |
188 | void NavigatorBar::resetFont ( QFont fo ) | 189 | void NavigatorBar::resetFont ( QFont fo ) |
189 | { | 190 | { |
190 | 191 | ||
191 | QFont tfont = fo; | 192 | QFont tfont = fo; |
192 | if ( QApplication::desktop()->width() >= 480 ) | 193 | if ( QApplication::desktop()->width() >= 480 ) |
193 | tfont.setPointSize(tfont.pointSize()+2); | 194 | tfont.setPointSize(tfont.pointSize()+2); |
194 | tfont.setBold(true); | 195 | tfont.setBold(true); |
195 | 196 | ||
196 | mSelectMonth->setFont( tfont ); | 197 | mSelectMonth->setFont( tfont ); |
197 | // Set minimum width to width of widest month name label | 198 | // Set minimum width to width of widest month name label |
198 | int i; | 199 | int i; |
199 | int maxwidth = 0; | 200 | int maxwidth = 0; |
200 | QFontMetrics fm ( mSelectMonth->font() ); | 201 | QFontMetrics fm ( mSelectMonth->font() ); |
201 | int width = fm.width("September '00" ); | 202 | int width = fm.width("September '00" ); |
202 | maxwidth = width+2; | 203 | maxwidth = width+2; |
203 | int size = fm.height()+2; | 204 | int size = fm.height()+2; |
204 | if ( QApplication::desktop()->width() >= 480 ) { | 205 | if ( QApplication::desktop()->width() >= 480 ) { |
205 | size += 6; | 206 | size += 6; |
206 | maxwidth+= 6; | 207 | maxwidth+= 6; |
207 | } | 208 | } |
208 | mSelectMonth->setMinimumWidth( maxwidth ); | 209 | mSelectMonth->setMinimumWidth( maxwidth ); |
209 | mSelectMonth->setFixedHeight( size ); | 210 | mSelectMonth->setFixedHeight( size ); |
210 | mPrevYear->setFixedHeight( size ); | 211 | mPrevYear->setFixedHeight( size ); |
211 | mPrevMonth->setFixedHeight( size ); | 212 | mPrevMonth->setFixedHeight( size ); |
212 | mPrevWeek->setFixedHeight( size ); | 213 | mPrevWeek->setFixedHeight( size ); |
213 | mNextMonth->setFixedHeight( size ); | 214 | mNextMonth->setFixedHeight( size ); |
214 | mNextWeek->setFixedHeight( size ); | 215 | mNextWeek->setFixedHeight( size ); |
215 | mNextYear->setFixedHeight ( size ); | 216 | mNextYear->setFixedHeight ( size ); |
216 | mCurrentHei = size +2; | 217 | mCurrentHei = size +2; |
217 | mCurrentMinWid = maxwidth+2; | 218 | mCurrentMinWid = maxwidth+2; |
218 | mCurrentButtonMinWid = mPrevYear->sizeHint().width()+2; | 219 | mCurrentButtonMinWid = mPrevYear->sizeHint().width()+2; |
219 | } | 220 | } |
220 | 221 | ||
221 | void NavigatorBar::showButtons( bool left, bool right ) | 222 | void NavigatorBar::showButtons( bool left, bool right ) |
222 | { | 223 | { |
223 | if ( left ) { | 224 | if ( left ) { |
224 | mPrevYear->show(); | 225 | mPrevYear->show(); |
225 | mPrevMonth->show(); | 226 | mPrevMonth->show(); |
226 | } else { | 227 | } else { |
227 | mPrevYear->hide(); | 228 | mPrevYear->hide(); |
228 | mPrevMonth->hide(); | 229 | mPrevMonth->hide(); |
229 | } | 230 | } |
230 | 231 | ||
231 | if ( right ) { | 232 | if ( right ) { |
232 | mNextYear->show(); | 233 | mNextYear->show(); |
233 | mNextMonth->show(); | 234 | mNextMonth->show(); |
234 | } else { | 235 | } else { |
235 | mNextYear->hide(); | 236 | mNextYear->hide(); |
236 | mNextMonth->hide(); | 237 | mNextMonth->hide(); |
237 | } | 238 | } |
238 | if ( !left && !right ) { | 239 | if ( !left && !right ) { |
239 | //mSelectMonth->setMaximumWidth( 1024 ); | 240 | //mSelectMonth->setMaximumWidth( 1024 ); |
240 | mSelectMonth->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); | 241 | mSelectMonth->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); |
241 | } | 242 | } |
242 | } | 243 | } |
243 | 244 | ||
244 | void NavigatorBar::selectMonth() | 245 | void NavigatorBar::selectMonth() |
245 | { | 246 | { |
246 | 247 | ||
247 | int month; | 248 | int month; |
248 | KPopupFrame* popup = new KPopupFrame(this); | 249 | KPopupFrame* popup = new KPopupFrame(this); |
249 | KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(popup); | 250 | KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(popup); |
250 | // ----- | 251 | // ----- |
251 | picker->resize(picker->sizeHint()); | 252 | picker->resize(picker->sizeHint()); |
252 | popup->setMainWidget(picker); | 253 | popup->setMainWidget(picker); |
253 | picker->setFocus(); | 254 | picker->setFocus(); |
254 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); | 255 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); |
255 | if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height())))) | 256 | if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height())))) |
256 | { | 257 | { |