-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 15 | ||||
-rw-r--r-- | desktop/rpm/kdepim_rpm | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 11 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 3 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 167 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | version | 2 |
9 files changed, 126 insertions, 80 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 3daf215..2bfdb2f 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1,932 +1,931 @@ { "10 minutes","10 Minuten" }, { "10th","10." }, { "11th","11." }, { "12 pm Format","12 AM/PM Format" }, { "12th","12." }, { "13th","13." }, { "14th","14." }, { "15th","15." }, { "16th","16." }, { "17th","17." }, { "18th","18." }, { "19th","19." }, { "1 Day","1 Tag" }, { "1 h","1 Std" }, { "1 (high)","1 (hoch)" }, { "5 (low)","5" }, { "1st","1." }, { "20th","20." }, { "21st","21." }, { "22nd","22." }, { "23rd","23." }, { "24:00 Hour Format","24:00 Stunden Format" }, { "24th","24." }, { "25th","25." }, { "26th","26." }, { "27th","27." }, { "28th","28." }, { "29th","29." }, { "2nd","2." }, { "30 minutes","30 Minuten" }, { "30th","30." }, { "31st","31." }, { "3rd","3." }, { "4th","4." }, { "5 (lowest)","5 (Niedrigster)" }, { "5th","5." }, { "6th","6." }, { "7th","7." }, { "8th","8." }, { "9th","9." }, { "About...","Über..." }, { "&Accept","&Akzeptieren" }, { "Accept","Akzeptieren" }, { "Accept A&ll","A&lles Akzepieren" }, { "Access:","Zugriff:" }, { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, { "Actions","Aktionen" }, { "Add Filter","Filter Hinzufügen" }, { "&Add","Hinzufügen" }, { "Add","Hinzufügen" }, { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, { "Additional email address:","Zusätzliche E-Mail Adresse:" }, { "&Addressbook","&Adressbuch" }, { "Address &Book...","Adress&buch..." }, { "Agenda Size","Agende Größe" }, { "Agenda Size:","Größe der Agenda:" }, { "Agenda view:","Agenda Ansicht:" }, { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, { "All attendees","Alle Teilnehmer" }, { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, { "All day event","Ganztägig" }, { "Anonymous","Anonym" }, { "Apply","Anwenden" }, { "Apr","Apr" }, { "April","April" }, {"Ask for every entry on conflict","Frage bei Konflikten nach"}, { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, { "Attendees","Teilnehmer" }, { "Aug","Aug" }, { "August","August" }, { "Auto-Save","Automatisches Abspeichern" }, { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, { "Auto saving...","Automatische Sicherung..." }, { "Begin on:","Starte mit:" }, { "Begins on: %1","Starte mit: %1" }, { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, { "<b>On:</b> %1","<b>Am:</b> %1" }, { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, { "Busy","Belegt" }, { "&Cancel","Abbre&chen" }, { "Cancel","Abbrechen" }, { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, { "Categories...","Kategorien..." }, { "Categories","Kategorien" }, { "Category","Kategorie" }, { "Center View","Zentriere Ansicht" }, { "Change","Ändere" }, { "Cinema","Kino" }, { "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, { "Clone Item","Klone Eintrag" }, { "&Close","S&chließen" }, { "Close","Schließen" }, { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, { "Colors","Farben" }, { "completed","erledigt" }, { "completed on %1","erledigt am %1" }, { "Complete","Erledigt" }, { "Confidential","Vertraulich" }, { "Configure...","Einstellungen..." }, { "Confirm &deletes","Löschvogang bestätigen" }, { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, { "Counter-event Viewer","Terminzähler Ansicht" }, { "Daily ending hour:","Feierabend:" }, { "Daily starting hour:","Anfangszeit:" }, { "Daily","Täglich" }, { "Date Format","Datums Format" }, { "Date Format:","Datums Format:" }, { "DateNavigator:(nr)","Datums Navigator" }, { "Dates: ","Datum: " }, { "Date && Time","Datum && Zeit" }, { "Day begins at:","Der Tag beginnt um:" }, { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, { "Days in What's Next:","Tage in What's Next:" }, { "day(s)","Tag(e)" }, { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, { "day","Tag" }, { "Dec","Dez" }, { "December","Dezember" }, { "Default alarm time:","Standard Alarmzeit:" }, { "Default appointment time:","Standard Termin Startzeit:" }, { "Default event color:","Standard Terminfarbe:" }, { "Default","Standard" }, { "Def. duration of new app.:","Standard Termin Länge:" }, { "Delete All","Lösche alles" }, { "Delete all selected","Lösche alle Selektierten" }, { "Delete Current","Aktuellen löschen" }, { "Delete Event...","Lösche Termin..." }, { "Delete Event","Lösche Termin" }, { "&Delete","Löschen" }, { "Delete...","Löschen..." }, { "Delete","Löschen" }, { "Delete Todo...","Lösche Todo..." }, { "Delete To-Do","Lösche Todo" }, { "Deleting item %d ...","Lösche Eintrag %d..." }, { "Descriptions","Beschreibungen" }, { "Deselect all","Deselektiere Alle" }, { "Details","Details" }, { "Dinner","Abendessen" }, { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, { "Due Date","Fällig am" }, { "Due: ","Fällig: "}, { "Due Time","Fällig um" }, { "Due:","Fällig:"}, { "Duration: ","Dauer: " }, { "Edit...","Bearbeite..." }, { "Edit","Bearbeite" }, { "Edit Event...","Bearbeite Termin..." }, { "Edit Event","Bearbeite Termin" }, { "Edit exceptions","Bearbeite Ausnahmen" }, { "EditorBox:","Editor Fenster:" }, { "Edit Recurrence Range","Bearbeite Wiederholung" }, { "Edit Todo...","Berabeite Todo..." }, { "Edit To-Do","Todo bearbeiten" }, { "E&mail address:","E&mail Adresse:" }, { "(EmptyEmail)","(KeineEmail)" }, { "(EmptyName)","(KeinName)" }, { "Enable Recurrence","Wiederholung anschalten" }, { "End after","Endet nach"}, { "End by:","Endet am"}, { "End Date","End Datum" }, { "End:","Ende:" }, { "End Time","End Zeit" }, { "English","Englisch" }, { "Event","Termin" }, { "Event list","Termin Liste" }, { "Events","Termine" }, { "Event Viewer:","Termin Übersicht:" }, { "every","jede" }, { "Exceptions...","Ausnahmen..." }, { "Exceptions","Ausnahmen" }, { "Exclude holidays","Ohne freie Tage" }, { "Exclude Saturdays","Ohne Samstage" }, { "Feb","Feb" }, { "February","Februar" }, { "&Find","Suche!" }, { "Fonts","Schriftart" }, { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, { "Free","Frei" }, { "Friday","Freitag" }, { "Fri","Fr" }, { "From:","Vom:" }, { "Full &name:","Vor- und &Nachname:" }, { "General","Allgemein" }, { "German","Deutsch" }, { "Gifts","Geschenke" }, { "Go to Today","Heute anzeigen" }, { "Help","Hilfe" }, { "Hide Dates","Daten ausblenden" }, { "Highlight color:","Markierungen:" }, { "Holiday color:","Freie Tage:" }, { "hour(s)","Stunde(n)" }, { "In %1 days: ","In %1 Tagen: " }, { "Incomplete Todo:","Unerledigte Aufgaben:" }, { "Information","Information" }, { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, { "Jan","Jan" }, { "January","Januar" }, { "JournalView:","Journal Ansicht:" }, { "Journals","Journale" }, { "Jul","Jul" }, { "July","Juli" }, { "Jump to date","Springe zum Datum" }, { "June","Juni" }, { "Jun","Jun" }, { "Key Bindings...","Tastenzuordnung..." }, { "Kids","Kinder" }, { "Known Problems...","Bekannte Probleme..." }, { "KO/Pi Find ","KO/Pi Suchdialog " }, { "KO/Pi Find: ","KO/Pi Suchen: " }, { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, { "Language:(needs restart)","Sprache (Neustart!)" }, { "Language:","Sprache" }, { "Large","Etwas mehr" }, { "List View:","Listenansicht:" }, { "List View","Listenansicht" }, { "Load/Save","Laden/Speichern" }, { "Load Template","Lade Vorlage" }, { "Locale","Localisation" }, { "Local temp file:","Lokale temp. Datei:" }, { "Location: ","Ort: " }, { "Location:","Ort:" }, { "Mail client","Mail Programm" }, { "Mail Client","Mail Programm" }, { "March","März" }, { "Mar","Mär" }, { "May","Mai" }, { "M. Bains line:","M. Bains Linie:" }, { "Medium","Medium" }, { "Method","Methode" }, { "minute(s)","Minute(n)" }, { "Monday","Montag" }, { "Mon","Mo" }, { "Monthly","Monatlich" }, { "Month not long enough","Monat ist nicht lang genug" }, { "month(s)","Monat(e)" }, { "Month view:","Monatsansicht:" }, { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, { "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, { "Move &Down","Nach unten verschieben" }, { "Move &Up","Nach oben verschieben" }, { "Name:","Name:" }, { "Name","Name" }, { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, { "%n Days","%n Tage" }, { "Never","Nie" }, { "New event...","Neuer Termin..." }, { "New event","Neuer Termin" }, { "New Event...","Neuer Termin..." }, { "New Events/Todos should","Neue Termine/Todos sollten" }, { "&New","&Neu" }, { "New","Neu", }, { "New Sub-Todo...","Neues Sub-Todo..." }, { "New Todo...","Neues Todo..." }, { "Next Alarm: ","Nächster Alarm: ", }, { "&Next Day","&Nächster Tag", }, { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, { "Next month","Nächster Monat" }, { "&Next Week","&Nächste Woche" }, { "Next year","Nächstes Jahr" }, { "Next Year","Nächstes Jahr" }, { "%n h","%n Std" }, { "No ending date","Kein End-Datum", }, { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, { "No event selected.","Kein Termin selektiert" }, { "No","Nein" }, { "No program set","Kein Programm ausgewählt", }, { "Normal","Normal" }, { "[No selection]","Keine Selektion", }, { "No sound set","Kein Sound ausgewählt", }, { "no time ","keine Zeit ", }, { "no time","keine Zeit", }, { "No Time","Keine Zeit" }, { "November","November" }, { "Nov","Nov", }, { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, { "occurrence(s)","Vorkommen" }, { "October","Oktober" }, { "Oct","Okt", }, { "O-due!","Ü-fällig! " }, { "&OK","&OK" }, { "Ok+Show!","Ok+Anzeigen" }, { "Organizer: %1","Organisator %1" }, { "Organizer","Organisator" }, { "Owner: ","Besitzer: " }, { "Owner:","Besitzer:" }, { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, { "&Previous Day","Vorheriger Tag" }, { "Previous month","Vorheriger Monat" }, { "Previous Month","Vorheriger Monat" }, { "&Previous Week","Vorherige Woche" }, { "Previous year","Vorheriges Jahr" }, { "Previous Year","Vorheriges Jahr" }, { "Printing","Drucken" }, { "Priority:","Priorität:" }, { "Private","Privat" }, { "Proceed","Weiter" }, { "Public","Öffentlich" }, { "Purge","Entferne" }, -{ "Purge Completed","Entferne erledigte Todos" }, +{ "Purge Completed...","Entferne erledigte Todos..." }, { "Purge Todos","Todos bereinigen" }, { "read-only","schreibgeschützt" }, { "Recur every","Wiederh. alle" }, { "Recur in the month of","Wiederh. im Monat" }, { "Recur on the","Wiederh. am" }, { "Recur on this day","Wiederh. am diesen Tag" }, { "Recurrence Range...","Wiederholungs Zeitraum..." }, { "Recurrence Range","Wiederholungs Zeitraum" }, { "Recurrence Rule","Wiederholungs Regel" }, { "Recurrence","Wiederholung" }, { "Recurs","Wiederholung" }, {"&Reject","Abweisen"}, { "Reminder:","Alarm:" }, { "Rem.:","Alarm:" }, { "Rem.","Alarm:" }, { "Remote file:","Remote Datei:"}, { "Remote IP:","Remote (ferne) IP:" }, { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, { "Remote user:","Remote Benutzer"}, { "&Remove","Entfe&rnen" }, { "Remove","Entfernen" }, { "Request response","Bemerkung anfordern" }, { "Role:","Rolle:" }, { "Role","Rolle" }, { "Sat","Sa" }, { "Saturday","Samstag" }, { "Search for:","Suche nach:" }, { "Search In","Suche in" }, { "Search...","Suche..." }, { "Search","Suche" }, { "Select Addresses","Wähle Adressen" }, { "Select all","Selektiere Alle" }, { "Select a month","Wähle Monat" }, { "Select a week","Wähle Woche" }, { "Select a year","Wähle Jahr" }, { "Send directly","Sende direkt" }, { "&Send Messages","&Sende Nachrichten", }, { "Sep","Sep" }, { "September","September" }, { "Shopping","Einkaufen" }, { "Show Dates","Zeige Daten" }, { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, { "Show Event...","Zeige Termin..." }, { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, { "Show time as:","Zeige Zeit als" }, { "Show Todo...","Zeige To-Do" }, { "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, { "&Show","Zeige" }, { "Show...","Zeige..." }, { "Show","Zeige" }, { "Small","Klein" }, { "Sorry","Entschuldigung" }, {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, { "Start:","Start:" }, { "Start Date","Start Datum" }, { "Start date: %1","Start Datum: %1" }, { "Start Time","Start Zeit" }, { "Status:","Status:" }, { "Status","Status:" }, { "Summaries","Titel" }, { "Summary:","Titel:" }, { "Summary","Titel" }, { "Sunday","Sonntag" }, { "Sun","So" }, { "Sync preferences:","Sync Einstellungen" }, { "Sync Prefs","Sync Einstellungen" }, { "Syncronize","Daten abgleich" }, { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, { "Template...","Vorlage..." }, { "This day","Dieser Tag" }, { "This is an experimental feature. ","Dieses Feature ist experimentel" }, { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, { "Thu","Do" }, { "Thursday","Donnerstag" }, { "Time associated","Mit Zeit" }, { "Time bar:","Uhrzeit Zeile:" }, { "Time && Date","Zeit und Datum" }, { "Time Format","Zeit Format" }, { "Time Format(nr):","Zeit Format(Neustart!)" }, { "Date Labels:","Datumsleiste:" }, { "Time: ","Zeit: " }, { "Timezone:","Zeitzone:" }, { "To: ","Bis: " }, { "To:","Bis:" }, { "Today: ","Heute: " }, { "Todo due today color:","Heute fällige To-Do's" }, { "To-do items:","To-Do items:" }, { "Todo overdue color:","Überfällige To-Do's" }, { "Todo","Todo" }, { "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, { "ToDoView:","Todo Ansicht:" }, { "Toggle Alarm","Wechsle Alarm" }, { "Toggle Allday","Umschalten Ganztag" }, { "Tomorrow: ","Morgen: " }, { "Tue","Di" }, { "Tuesday","Dienstag" }, { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, { "Unknown","Unbekannt" }, { "Up","Hinauf" }, { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, { "User defined","Benutzerdefiniert" }, { "User long date:","Format langes Datum:" }, { "User short date:","Forma kurzes Datum:" }, { "View","Ansicht" }, { "View Fonts","Schriftarten Ansichten" }, { "Views","Ansichten" }, { "Wed","Mi" }, { "Wednesday","Mittwoch" }, { "Week %1","Woche %1" }, { "Weekly","Wöchentlich" }, { "Week starts on Sunday","Woche beginnt Sonntags" }, { "What's Next View:","What's Next Anz." }, { "What's next ?","Was kommt als nächstes?(What's Next)" }, { "Working Hours","Tägliche Arbeitszeit" }, { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, { "Write back synced file","Syncronisierte Datei zurückschreiben" }, { "Yearly","Jährlich" }, { "year(s)","Jahr(e)" }, { "Yes","Ja" }, { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, { "week(s) on:","Woche(n) am: " }, { "Full menu bar(nr)","Volle Menuleiste(bn)" }, { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, { "Daylight start:","Sommerzeit Start:" }, { "Daylight end:","Sommerzeit Ende:" }, { "Time Zone","Zeitzone" }, { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, { "minutely","minütlich" }, { "hourly","stündlich" }, { "daily","täglich" }, { "weekly","wöchentlich" }, { "monthly","monatlich" }, { "day-monthly","tag-monatlich" }, { "month-yearly","monat-jährlich" }, { "day-yearly","tag-jährlich" }, { "position-yearly","pos-jährlich" }, { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, { "Event list view uses full window","Listenansicht nutzt Vollbild" }, { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, { "ViewChange","Ansichtswechsel" }, { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, { "File","Datei" }, -{ "Clone...","Dupliziere.." }, +{ "Clone...","Dupliziere..." }, { "Move...","Bewege..." }, { "Beam...","Sende via IR..." }, { "&Clone...","Dupliziere.." }, { "&Move...","Bewege..." }, { "&Beam...","Sende via IR..." }, { "Show Completed","Zeige erledigte Todos" }, { "Show Quick Todo","Zeige Quick Todo" }, { "Unparent Todo","Un-sub Todo" }, { "Save selected to file...","Speichere Selektierte..." }, { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, { "Set Categ. for selected...","Setze Kateg. für Selekt." }, { "Beam selected via IR","Sende Selekt. via IR..." }, { "Search","Suchen" }, { "Date Picker","Datum auswählen" }, { "Day View","Tagesansicht" }, { "Work Week","Arbeitswoche" }, { "Week","Wochenansicht" }, { "Month","Monatsansicht" }, { "Todo View","Todo Liste" }, { "Journal","Journal" }, { "Next days","Nächste Tage" }, { "Print agenda selection...","Drucke Agendaselektion..." }, { "Toggle DateNavigator","Navigator umschalten" }, { "Toggle FilterView","Filteransicht umschalten" }, { "Prev. month","Vorheriger Monat" }, { "Go backward","Gehe zurück" }, { "Go forward","Gehe weiter" }, { "Synchronize","Synchronisieren" }, { "AgendaSize","Agendagröße" }, { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, { "Import last file","Importiere letzte Datei" }, { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, { "Load Calendar Backup","Lade Kalender Backup" }, { "Save Calendar Backup","Speichere Kalender Backup" }, { "Export VCalendar","Exportiere VCalendar" }, { "Manage new categories...","Verwalte neue Kategorien..." }, { "Beam complete calendar...","Sende kompletten Kalender via IR" }, { "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, { "Remote via ssh","Über Netzwerk via ssh" }, { "With local file","Mit lokaler Datei" }, { "With last file","Mit letzter Datei" }, { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, { "Save filename","Speichern: Dateinamen wählen" }, { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, { "KO/Pi: Warning!","KO/Pi: Warnung!" }, { "Overwrite!","Überschreibe!" }, { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, { "KO/Pi Confirmation","KO/Pi Bestätigung" }, { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, { "Deleting item %d ...","Lösche Eintrag %d ..." }, { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, { "Size","Größe" }, { "Date","Datum" }, { "Mime Type","Datei Typ" }, { "All Files","Alle Dateien" }, { "Files","Dateien" }, { "Documents","DoKumente" }, { "Select Categories","Selektiere Kategorien" }, { " &Deselect All "," Auswahl aufheben " }, { "A&dd","Hinzu" }, { "&Modify","Ändern" }, { "Edit Categories","Editiere Kategorien" }, { " &Edit Categories "," &Editiere Kategorien " }, { "Beam Options","Beam Einstellungen" }, { " With timezone "," Mit Zeitzone " }, { " Local time ", " Lokale Zeit " }, { "Manage new Categories","Verwalte neue Kategorien" }, { "Add to category list","Füge zur Kategorieliste hinzu" }, { "Remove from Events/Todos","Entferne von Terminen/Todos" }, -{ "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, { "File format","Datei Format" }, { "Time format","Zeit Format" }, { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, { "h","Std" }, { "min","Min" }, { "hou","Std" }, { "day","Tag" }, { "French","Französich" }, { "Time","Zeit" }, { "Event Viewer","Termin Ansicht" }, { "Cancel Sync","Sync Abbrechen" }, { "Remote","Fern" }, { "Local","Lokal" }, { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, { "Local: ","Lokal: " }, { "Remote: ","Fern: " }, { "Last modified: ","Zuletzt geändert: " }, { "Location: ","Ort: " }, { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, { "( %1 min before )","( %1 min vorher )" }, { "<b>Alarm on: ","<b>Alarm am: " }, { "<b>Details: </b>","<b>Details: </b>" }, { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, { "Organizer","Organisator" }, { "Save","Speichern" }, { "Exit (+save)","Beenden (+ speichern)" }, { "Home","Zuhause" }, { "Office","Büro" }, { "Library","Bibliothek" }, { "Doctor","Arzt" }, { "Beach","Strand" }, { "Conference room","Konferenzraum" }, { "Drive Home","Heimfahrt" }, { "Watch TV","Tv gucken" }, { "Phone call","Telefonanruf" }, { "Pay bill","Rechnung bezahlen" }, { "Read book","Buch lesen" }, { "Watering plants","Pflanzen giessen" }, {"Appointment","Verabredung" }, {"Birthday","Geburtstag" }, {"Business","Geschäft" }, {"Business Travel","Geschäftsreise" }, {"Cinema","Kino" }, {"Customer","Kunde" }, {"Break","Pause" }, {"Breakfast","Frühstück" }, {"Competition","Wettkampf" }, {"Dinner","Abendessen" }, {"Education","Erziehung" }, {"Family","Familie" }, {"Favorites","Favoriten" }, {"Festival","Festival" }, {"Fishing","Angeln" }, {"Flight","Flug" }, {"Gifts","Geschenk" }, {"Holiday","Feiertag" }, {"Holiday Cards","Ansichtskarten" }, {"Hot Contacts","Heisse Kontakte" }, {"Hiking","Wandern" }, {"Hunting","Jagen" }, {"Key Customer","Wichtiger Kunde" }, {"Kids","Kinder" }, {"Lunch","Mittagessen" }, {"Meeting","Treffen" }, {"Miscellaneous","Verschiedenes" }, {"Partner","Partner" }, {"Party","Partie" }, {"Personal","Privat" }, {"Personal Travel","Privatreise"}, {"PHB","PHB" }, {"Phone Calls","Telefonanruf" }, {"Projects","Projekt" }, {"Recurring","Wiederholend" }, {"School","Schule" }, {"Shopping","Einkaufen" }, {"Speach","Rede" }, {"Special Occasion","Spez.Gelegenheit" }, {"Sports","Sport" }, {"Talk","Vortrag" }, {"Travel","Reise" }, {"TV","TV" }, {"Germany","Deutschland" }, {"Sweden","Schweden" }, {"Forest","Wald" }, { "Desert","Wüste" }, { "Kitchen","Küche" }, { "Lake","See" }, {"University","Universität"}, {"Vacation","Urlaub" }, {"VIP","VIP" }, { "Import Sharp Calendar","Importiere Sharp Kalender" }, { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, { "Cancelled","Gecancelt" }, { "Multiple sync","Mehrfach Sync" }, { "Local file","Lokale Datei" }, { "Last file","Letzte Datei" }, { "Keys + Colors...","Tasten + Farben..." }, { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, { "Choose...","Wähle..." }, { "Use colors for application:","Setze Farben für Programm:" }, { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, { "Show parent To-Do's","Zeige Ober-Todos" }, { "Show location","Zeige Orte" }, { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, { "Show in every cell ","Zeige in jeder Zelle " }, { "short month","kurzen Monat" }, { "icons","Icons" }, { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, { "Category colors are applied to text","Kategorie Farben färben Text" }, { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, { "Day color odd months","Tagesfarbe ungerade Monate" }, { "Day color even months","Tagesfarbe gerade Monate" }, { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, { "Colors are applied to text","Farben werden auf Text angewendet" }, { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, { "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" }, { "Play beeps count:","Anzahl der Alarmpiepse: " }, { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, { "Default suspend time in min:","Standard Supendierungs Zeit: " }, { "Auto suspend count:","Anzahl der auto Suspendierungen" }, { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, { "New profile","Neues Profil" }, { "Clone profile","Klone Profil" }, { "Delete profile","Lösche Profil" }, { "Profile:","Profil:" }, { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, { "Write back file","Schreibe Datei zurück" }, { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, { "Local device name:","Name dieses Gerätes:" }, { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, { "Sync preferences","Synchronisations Einstellungen" }, { "Profile kind","Profil Art" }, { "Local file","Lokale Datei" }, { "Local file:","Lokale Datei:" }, { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, { "Fill in default values for:","Setze Beispiel Werte ein für:" }, { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, { "Device","Gerät:" }, { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, { "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" }, { "Synchronization successful","Synchronisation erfolgreich" }, { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, { "Enter password","Passwort eingeben" }, { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, { "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" }, { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, { "Edit Calendar Filters","Editiere Kalendar Filter" }, { "Enter filter name:","Neuer Filter Name:" }, { "Add Filter","Filter hinzufügen" }, { "Question","Frage" }, { "Filter position: ","Filter Position: " }, { "Month View","Monatsansicht" }, { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, { "KO/Pi config error","KO/Pi Konfig. Fehler" }, { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, { "Access: ","Zugriff: " }, { "Needs Action","Aktion notwendig" }, { "Accepted","Akzeptiert" }, { "Declined","Abgelehnt" }, { "Tentative","Vorläufig" }, { "Delegated","Beauftragt" }, { "Completed","Vollständig" }, { "In Process","In Bearbeitung" }, { "Participant","Teilnehmer" }, { "Optional Participant","Möglicher Teilnehmer" }, { "Observer","Beobachter" }, { "Chair","Vorsitzender" }, { "Not supported \non desktop!\n","" }, { "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) " }, { "Date range: ","Datums Zeitspanne: " }, { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, { "Add / remove events","Add./entferne Termine" }, { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, { "\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" }, { "Overwrite","Überschreiben" }, { "Sync+save","Syncen+speichern" }, { "Default","Standard" }, { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, { " %d items?"," %d Einträge?" }, { "\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?" }, { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, { "Current","Aktuelle" }, { "\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" }, { "All","Alle" }, { "Data Loss Warning","Datenverlust Warnung" }, { "Proceed","Weitermachen" }, { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, { "Filter disabled ","Filter abgeschaltet" }, { "Filter selected: ","Gewählter Filter: " }, { "Toggle Cancel","Gecancelt ändern" }, { "&Toggle Cancel","Gecancel&t ändern" }, { "Configure Toolbar","Konfiguriere Toolbar" }, { "Stretched TB","Gedehnte TB" }, { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, { "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" }, { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, { "Imported file successfully","Datei erfolgreich importiert" }, { "Error importing file","Fehler beim Importieren der Datei" }, { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, { "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" }, { "Overwrite!","Überschreiben!" }, { "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" }, { "Load backup filename","Lade Backup Dateiname" }, { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, { "Save backup filename","Speichere Backup Dateiname" }, { "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" }, { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, { "Details of attendee","Teilnehmerdetails" }, { "Work phone:\n","Telefon Arbeit:\n" }, { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, { "Home phone:\n","Telefon privat:\n" }, { "Mobile home phone:\n","Mobiltelefon privat:\n" }, { "Email:\n","Email:\n" }, { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, { "Audio Al.: ","Audio Al.: " }, { "Proc.Al.: ","Proz.Al.: " }, { "No sound set","Kein Sound definiert" }, { "*.wav|Wav Files","*.wav|Wav Dateien" }, { "No program set","Kein Programm definiert" }, { "Running '%1'","Ausführen '%1'" }, { "Playing '%1'","Abspielen '%1'" }, { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, { "Load!","Laden!" }, { "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" }, { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, { "Features + hints...","Eigenschaften + Tipps..." }, { "User translation...","Benutzer Übersetzung..." }, { "Sync HowTo...","Synchronisation HowTo..." }, { "Print calendar...","Drucke Kalender..." }, { "Anniversary","Jahrestag" }, { "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" }, { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, { "<b>Access: </b>","<b>Zugriff: </b>" }, { "(%1 min before)","(%1 min vorher)" }, { "<b>Categories: </b>","<b>Kategorien: </b>" }, { "Save Journal/Description...","Speichere Journal/Details..." }, { "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." }, { "Continue","Weitermachen" }, { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, { "Attendee:","Teilnehmer:" }, { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, { "On day ","Am Tag " }, { "%1 of ","%1 des Monats" }, { "%1 of the year","%1 des Jahres" }, { "Anonymous","Anonymo" }, { "nobody@nowhere","niemand@nirgendwo" }, { "calendar.html","calendar.html" }, { " Local Time"," Lokale Zeit" }, { "Unknown Name","Unbekannter Name" }, { "unknown@nowhere","unbekannt@nirgendwo" }, { "Beam via IR!","Beam via IR!" }, { "Next Month","Nächster Monat" }, { "Prio","Prio" }, { "Reparent Todo","Mache Sub-Todo" }, { "tomorrow","morgen" }, { "today","heute" }, { "yesterday","gestern" }, { "Ok","Ok" }, { "Ok+Agenda","Ok+Agenda" }, { "Email","Email" }, { "RSVP","RSVP" }, { "Email:","Email:" }, { "Appointment Time ","Termin Zeit " }, { "2","2" }, { "3","3" }, { "4","4" }, { " 0 %"," 0 %" }, { " 20 %"," 20 %" }, { " 40 %"," 40 %" }, { " 60 %"," 60 %" }, { " 80 %"," 80 %" }, { "100 %","100 %" }, { "Filter","Filter" }, { "Configure","Konfiguriere" }, { "What's Next","What's Next" }, { "Complete calendar...","Kompletten Kalender..." }, { "Filtered calendar...","Gefilterten Kalender..." }, { "Export to phone","Exportiere zum Handy" }, { "Beam receive enabled","Beam Empfang an" }, { "What's new?","Was ist neu?" }, { "FAQ...","FAQ..." }, { "Licence...","Licence..." }, { "What's This?","What's This?" }, { "&Edit...","&Editiere..." }, { "Oktober","Oktober" }, { "Title","Titel" }, { "%1 %","%1 %" }, { "Enable Pi-Sync","Schalte Pi-Sync an" }, { "Import!","Importiere!" }, { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, { "Export to phone options","Export ans Handy Optionen" }, { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, { "I/O device: ","I/O device: " }, { "Connection: ","Connection: " }, { "Model(opt.): ","Model(opt.): " }, { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, { "Export to mobile phone!","Exportiere auf das Handy!" }, { "Export complete calendar","Exportiere kompletten Kalender" }, { "Writing to phone...","Sende Daten ans Handy..." }, { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, { "Retry","Nochmal versuchen" }, { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, { "Export filtered calendar","Exportiere gefilterten Kalender" }, { "Preferences","Vorlieben" }, { "Global","Global" }, { "Phone","Phone" }, { "SMS","SMS" }, { "Fax","Fax" }, { "Pager","Pager" }, { "SIP","SIP" }, { "Italian","Italienisch" }, { "24:00","24:00" }, { "12:00am","12:00am" }, { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, { "Used Mail Client","Benutzter Mail Client" }, { "Channel:","Channel:" }, { "Message:","Message:" }, { "Parameters:","Parameter:" }, { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, { "extra Message:","extra Message:" }, { "extra Parameters:","extra Parameter:" }, { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, { "External Apps.","Externe Appl." }, { "24 hours","24 Std." }, { "3 hours","3 Std." }, { "1 hour","1 Std." }, { "15 minutes","15 Min." }, { "5 minutes","5 Min." }, { "1 minute","1 Min." }, { "23","23" }, { "Mon 15","Mon 15" }, { "Configure KO","Konfiguriere KO" }, { "Event text","Termin Text" }, { "ToDo","Todo" }, { "Today","Heute" }, { "What's Next View","What's Next Ansicht" }, { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, { "Alarm","Alarm" }, { "Used %1 Client","Benutzter %1 Client" }, { "No email client installed","Kein Email Klient installiert" }, { "Userdefined email client","Benutzerdef. Email Klient" }, @@ -1085,388 +1084,398 @@ { "Language","Sprache" }, { "Show time in agenda items","Zeige Zeit in Agenda Items" }, { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, { "Show events that are done","Zeige abgelaufene Termine" }, { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, { "KO/Pi","KO/Pi" }, { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, { "Sound.Al.: ","Sound.Al.: " }, { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, { "Restore","Wiederherstellen" }, { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, { "% completed","% erledigt" }, { "%d item(s) found.","%d Item(s) gefunden." }, { "Set complete","Setze auf erledigt" }, { "(cancelled)","(gecancelt)" }, { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, { " Local time "," Locale Zeit " }, { "Form2","Form2" }, { "Filter enabled","Filter angeschaltet" }, { "Edit Filters","Ändere Filter" }, { "Print What's Next View...","Drucke What's Next Ansicht..." }, { "Agenda","Agenda" }, { " ("," (" }, { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, { "Print","Print" }, { "&Setup Printer...","Drucker &Setup..." }, { "View Type","Zeige Typ" }, { "Page &orientation:","Seiten Ausrichtung:" }, { "Use Default of Selected Style","Default des selektierten Stils" }, { "Use Default Setting of Printer","Default Einstellung des Druckers" }, { "Portrait","Portrait" }, { "Landscape","Landschaft" }, { "Print day","Drucke Tag" }, { "CalPrintDay_Base","CalPrintDay_Base" }, { "Date && Time Range","Datum && Zeitspanne" }, { "&End date:","&Enddatum:" }, { "&Start date:","&Startdatum:" }, { "Start &time:","Startzeit:" }, { "End ti&me:","Endzeit:" }, { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, { "Alt+D","Alt+D" }, { "&Use colors","Nutze Farben" }, { "Alt+U","Alt+U" }, { "Print week","Drucke Woche" }, { "CalPrintWeek_Base","CalPrintWeek_Base" }, { "Use &colors","Nutze Farben" }, { "Type of View","Typ der Ansicht" }, { "Print as &Filofax page","Drucke als &Filofax Seite" }, { "Alt+F","Alt+F" }, { "Print as &timetable view:","Drucke als Zeittabelle:" }, { "Alt+T","Alt+T" }, { "Print as split week view","Drucke als gesplittete Wochenansicht" }, { "Print month","Drucke Monat" }, { "CalPrintMonth_Base","CalPrintMonth_Base" }, { "&Start month:","&Startmonat:" }, { "&End month:","&Endmonat:" }, { "Print week &numbers","Drucke Wochen Nummer(n)" }, { "Print todos","Drucke Todos" }, { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, { "Include &description of the item","Inclusive Itembeschreibung" }, { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, { "Include &priority of the item","Inclusive Priorität des Items" }, { "Items to Print","Zu druckende Items" }, { "&From:","Von:" }, { "&To:","Bis:" }, { "Print &all todo items","Drucke alle Todo Items" }, { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, { "Todo List","Todo Liste" }, { "&Title:","&Titel:" }, { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, { "Todo list","Todo Liste" }, { "&Print...","Drucke..." }, { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, { "[Unconfigured]","[Unkonfiguriert]" }, { "OK","OK" }, { "FilterEditor","FilterEditor" }, { "Include","Inclusive" }, { "Exclude","Exclusive" }, { "Edit Selection...","Editiere Auswahl" }, { "recurring events","wiederholende Termine" }, { "recurr. events","wiederh.Termine" }, { "completed to-dos","erledigte Todos" }, { "events","Termine" }, { "todos","Todos" }, { "journals","Journale" }, { "public","öffentl." }, { "private","privat" }, { "confidential","vertraul." }, { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, { "Yesterday","Gestern" }, { "Day after tomorrow","Übermorgen" }, { "Tomorrow","Morgen" }, { "Day before yesterday","Vorgestern" }, { "Size %1","Größe %1" }, { "New Agendasize: %1","Neue Agendagröße: %1" }, { " (%1 y.)"," (%1 J.)" }, { "Allday:","Ganztägig:" }, { "compl.todos","erled.Todos" }, { "Day view","Tagesansicht" }, { "Next days","Nächste Tage" }, { "Next week","Nächste Woche" }, { "Next two weeks","Nächste zwei Wochen" }, { "This month","Dieser Monat" }, { "Journal view","Journal" }, { "Display all opened","Zeige alle geöffnet" }, { "Display all closed","Zeige alle geschlossen" }, { "Display all flat","Zeige alle flach" }, { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, { "Default todo done color:","Standard Todo erledigt Farbe" }, { "Select week %1-%2","Wähle Woche %1-%2" }, { "Select Week","Wähle Woche" }, { "Set alarm for selected...","Setze Alarm für Selekt..." }, { "Set Alarm!","Setze Alarm!" }, { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, { " and "," und " }, { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, { "Mail to selected","Mail an Ausgewählte" }, { "Mail to all","Mail an Alle" }, { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, { " on"," am" }, { " completed on "," erledigt am " }, { "Save as Event template","Speichere als Vorlage" }, { "Load Event template","Lade Termin Vorlage" }, { "Save as Journal template","Speichere als Journal Vorlage" }, { "Insert Journal template","Füge Journal Vorlage ein" }, { "Sub todos:<br>","Unter Todos:<br>" }, { "Parent todo:<br>","Über Todo:<br>" }, { "Set current as color category","Setze Gewählte als Farbkategorie" }, { " completed"," erledigt" }, { "(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!" }, { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, { "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?" }, { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, { "Error","Fehler" }, { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, { "Warning","Warnung" }, { "Select week number","Wähle Wochen Nummer" }, { "Februar","Februar" }, { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, { "W","W" }, { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, { "T: %1","T: %1" }, { "Start: ","Start: " }, { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, { "Password for remote access:","Passwort für fernen Zugriff:" }, { "Remote IP address:","Ferne IP Adresse:" }, { "Remote port number:","Ferne Port Nummer:" }, { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, { "Remote from: ","Fern von: " }, { "Local from: ","Lokal von: " }, { "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" }, { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, { "Write back","Schreibe zurück" }, { "KO/Pi Synchronization","KO/Pi Synchronisation" }, { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, { "Received sync request","Sync Anfrage erhalten" }, { "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." }, { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, { "Sending file...","Sende Datei..." }, { "Waiting for synced file...","Warte auf gesyncte Daten..." }, { "Receiving synced file...","Gesyncte Daten erhalten..." }, { "Received %1 bytes","%1 Bytes erhalten" }, { "Writing file to disk...","Speichere Datei..." }, { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, { "Synchronize!","Synchronisiere!" }, { "High clock skew!","Großer Uhrzeitunterschied!" }, { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, { "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!" }, { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, { "List week view","Listenwochenansicht" }, { "List week","Listenwochenansicht" }, { "Next Week","Nächste Woche" }, { "Previous Week","Vorherige Woche" }, { "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." }, { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, { "Details","Details" }, { "Created time","Erstellt Zeit" }, { "Last modified time","Geändert Zeit" }, { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, { "View Options","Anzeige Optionen" }, { "<b>Created: ","<b>Erstellt am: " }, { "<b>Last modified: ","<b>Zuletzt geändert am: " }, { "Journal: ","Journal: " }, { "yearly","jährlich" }, { "(%1) ","%1-" }, { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, { "Summary/Loc.","Titel/Ort" }, { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, { "Week Number","Wochennummer" }, { "Import","Importiere" }, { "Export","Exportiere" }, { "Beam","Beame" }, { "Export selected","Exportiere Selektierte" }, { "As iCal (ics) file...","Als iCal (ics) Datei..." }, { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, { "Journal/Details...","Journale/Details..." }, { "Agenda View","Agenda Ansicht" }, { "Show current time","Zeige aktuelle Zeit" }, { "Edit new item","Bearbeite neuen Eintrag" }, { "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" }, { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, { "%1 days\n","%1 Tagen\n" }, { "1 day\n","1 Tag\n" }, { "%1 hours\n","%1 Stunden\n" }, { "1 hour\n","1 Stunde\n" }, { "%1 minutes\n","%1 Minuten\n" }, { "1 minute\n","1 Minute\n" }, { "Only one toolbar","Nur eine Toolbar" }, { "Print","Drucke" }, { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, { "There is nothing selected!","Es ist nichts ausgewählt!" }, { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, { "KO/Pi Printout","KO/Pi Ausdruck" }, { "Print unscaled","Drucke unskaliert" }, { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, { "Printout Mode","Druck Modus" }, { "Filter menu icon","Filtermenu Icon" }, { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, { "%1d","%1t" }, { "%1h","%1std" }, { "%1min","%1min" }, { "( %1 before )","( %1 vorher )" }, { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, { "Show Sync Events","Zeige Sync-Ereignisse" }, { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, { " on "," am " }, { "On: ","Am: " }, { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, { "Start/Stop todo...","Starte/Stoppe Todo..." }, { "Color for running todos:","Farbe für laufende Todos:" }, { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, { "Todo is started","Todo ist gestartet" }, { "Stop todo","Stoppe Todo" }, { "Todo is stopped","Todo ist gestoppt" }, { "Start todo","Starte Todo" }, { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, { "Todo has subtodos","Todo hat Untertodos" }, { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, { "Colors","Farben" }, { "Click on new parent item","Klicke auf neues Übertodo" }, { "Reparenting aborted!","Übertodo setzen abgebrochen" }, { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, { "times","Zeiten" }, { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, { "Backup enabled","Backup angeschaltet" }, { "Use standard backup dir","Standard Backupverzeichnis" }, { "Number of Backups:","Anzahl der Backups" }, { "Make backup every ","Mache ein Backup alle " }, { " days"," Tage" }, { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, { "Backup Failed!","Backup Problem!" }, { "Try again now","Versuche jetzt nochmal" }, { "Try again later","Versuche später nochmal" }, { "Try again tomorrow","Versuche morgen nochmal" }, { "Disable backup","Schalte Backup ab" }, { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, { "Choose action","Wähle Aktion" }, { "Comment for todo:","Kommentar zum Todo:" }, { "Stop+note","Stop+Notiz" }, { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, { "Print complete list","Drucke komplette Liste" }, { "Hide all selected","Verstecke Selektierte" }, { "Add items","hinzufügen" }, { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, { "Print List View...","Drucke Listenansicht..." }, { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, { "Global Settings...","Globale Einstellungen..." }, { "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, { "(disabled)","(abgeschaltet)" }, { "New Calendar","Neuer Kalender" }, { "Calendar","Kalender" }, { "Filter selector","Filterauswahl" }, { "Filtermenu","Filtermenu" }, { "Toggle Fullscreen","Vollbild umschalten" }, { "Toggle Resource View","Resourcenansicht umschalten" }, { "Storage HowTo...","Speicherort HowTo..." }, { "Timetracking HowTo...","Timetracking HowTo..." }, { "Juni","Juni" }, { "Juli","Juli" }, { "ToDo:","ToDo:" }, { "Set Calendar","Setze Kalender" }, { "Todo: %1","Todo: %1" }, { ": (Prio ",": (Prio " }, { "Todos","Todos" }, { "Todo Viewer","Todo Viewer" }, { "Todo ","Todo " }, { " Calendar \n Resource "," Kalender \n Resource " }, { " Color "," Farbe " }, { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, { "Add new Calendar","Füge Kalender hinzu" }, { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, { "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, { "Global application font for all apps:","Globale Schriftart:" }, { "Application Font","Applikationsschriftart" }, { "Kx/Pi","Kx/Pi" }, { "Backup","Backup" }, { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, { "Choose Color","Wähle Farbe" }, { " OK "," OK " }, { " Cancel "," Abbrechen " }, { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, { "Search on displayed list only","Suche auf der dargestellten Liste" }, { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, { "%1\nis running!","%1\nist am Laufen!" }, { "Additional Comment:","Zusätzlicher Kommentar:" }, { "Stop and save","Stopp und Speichern" }, { "Continue running","Weiter laufen lassen" }, { "Stop - do not save","Stopp - nicht Speichern" }, { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, { "Time mismatch!","Zeiten stimmen nicht!" }, { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, { "Yes, stop todo","Ja, stoppe Todo" }, { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, { "Spouse","Ehegatte" }, { "Notes","Notizen" }, { "Messanger","Messanger" }, { "Assistant","Assistent" }, { "Manager","Manager" }, { "Secrecy","Sichtbar" }, { "male","männlich" }, { "female","weiblich" }, { "Hide!","Verbergen!" }, { "Show!","Anzeigen!" }, { "Details","Details" }, { "Profession","Beruf" }, { "Children","Kinder" }, { "Department","Abteilung" }, { "Backup cancelled","Backup abgebrochen" }, { "Backup globally disabled","Backup global abgeschaltet" }, { "Backup succesfully finished","Backup erfolgreich beendet" }, { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, { "Birthdays","Geburtstage" }, { "KO/Pi import information!","KO/Pi Import Information!" }, { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, { "Reload","Neu laden" }, { "Timezone settings","Zeitzoneneinstellung" }, { "Title: ","Titel: " }, { "Journal from: ","Journal vom: " }, { "Journal: %1 from ","Journal: %1 vom " }, { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, +{ "Selected Item","Ausgewähltes Item" }, +{ "Select Date...","Wähle Datum..." }, +{ "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, +{ "Change category list now!","Ändere Kategorieliste jetzt!" }, +{ "Edit category list...","Ändere Kategorieliste..." }, +{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, { "","" }, { "","" }, { "","" }, { "","" },
\ No newline at end of file diff --git a/desktop/rpm/kdepim_rpm b/desktop/rpm/kdepim_rpm index 279bbd4..d29ab72 100644 --- a/desktop/rpm/kdepim_rpm +++ b/desktop/rpm/kdepim_rpm @@ -1,84 +1,84 @@ Summary: A collection of PIM programs Name: KDE-Pim-Pi -Version: 2.1.11 +Version: 2.1.12 Release: SuSE_9.2 Copyright:GPL Group: Productivity/Pim Source:http://sourceforge.net/projects/kdepimpi/ URL:http://sourceforge.net/projects/kdepimpi/ Packager: zautrix %description This package contains the platform-independent PIM programs from www.pi-sync.info, compiled for SuSE 9.2: KTimeTacker/Pi KPhone/Pi KAddressbook/Pi KOrganizer/Pi PasswordManager/Pi KOPieMail/Pi These applications do not need anything from the KDE-desktop at all to run on Linux. However, there is a dependency from two KDE libs, because a small command line program is included to make it possible to sync with the KDE-desktop applications. These applications are independent from the KDE-desktop environment. That means, nothing of your existing KDE-desktop setup will be changed, or any data (calendar-addressbook) used by the KDE-desktop applications will be changed or accessed. These applications stores their data and config in $HOME/kdepim/ However, because the same file format is used, an easy exchange of data with the KDE-desktop is possible. A small command line program is included to make it possible to sync with the KDE-desktop applications. You do not need to call this program from the commandline, it is called from the KDE-Pim/Pi apps when you choose there: Sync with KDE_Desktop. If something is going wrong, please start the KDE-Pim/Pi program itself from the console to get detailed output. After installation, you should have a PIM-pi folder in your KDE start menu, where you can start the applications from. These programs makes it possible to sync your Zaurus easily (with the KDE-Pim/Pi programs running on the Zaurus) with the KDE-desktop calendar/addressbook data. If you want to use that, you have to update your KDE-desktop to version 3.3.0 or higher. SuSE 9.2 contains KDE 3.3.0 such that no update is needed. Actually - after the (non difficult) configuration is set up - with two mouseklicks on the Zaurus, the Zaurus syncs with the corresponding KDE-Pim/Pi program on the Linux Desktop which syncs automatically with the KDE-desktop data. If you want to use the KDE-desktop calendar/addressbook applications, just install these apps in this package and use them as a syncing tool for the Zaurus <-> KDE-desktop sync. The sync requires a network connection from your Zaurus to the PC. A detailed Sync HowTo is available in the Help menu of the applications. These applications makes it also possible, that you can sync (or just export the data to) your mobile phone with your data of the KDE-desktop calendar/addressbook applications. This is tested and working for Nokia mobile phones, it may work with others as well. (More info about that: -> Sync HowTo) NOTE: When using SuSE 9.1 you have to update your KDE to 3.3.x and you have to make an online update in SuSE 9.1 to make it possible to get the infrared connection working, such that you can sync your (Nokia) mobile phone via infrared. %files /opt/kde3/share/applnk/PIM-pi/ /opt/kdepimpi/ /usr/lib/libmicro* diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index d0de233..c0f3be7 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1,708 +1,709 @@ /* This file is part of KOrganizer. Requires the Qt and KDE widget libraries, available at no cost at http://www.troll.no and http://www.kde.org respectively Copyright (c) 1997, 1998, 1999 Preston Brown (preton.brown@yale.edu) Fester Zigterman (F.J.F.ZigtermanRustenburg@student.utwente.nl) Ian Dawes (iadawes@globalserve.net) Laszlo Boloni (boloni@cs.purdue.edu) Copyright (c) 2000, 2001, 2002 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <qapplication.h> #include <qradiobutton.h> #include <qbuttongroup.h> #include <qlayout.h> #include <qclipboard.h> #include <qcursor.h> #include <qmessagebox.h> #include <qprogressbar.h> #include <qmultilineedit.h> #include <qtimer.h> #include <qwidgetstack.h> #include <qptrlist.h> #include <qregexp.h> #include <qgroupbox.h> #include <qfile.h> #include <qdir.h> #ifndef KORG_NOSPLITTER #include <qsplitter.h> #endif #include <kglobal.h> #include <kdebug.h> #include <kstandarddirs.h> #include <kfiledialog.h> #include <kmessagebox.h> #include <knotifyclient.h> #include <kconfig.h> #include <libkdepim/ksyncprefsdialog.h> #include <krun.h> #include <kdirwatch.h> #include <libkdepim/kdatepicker.h> #include <libkdepim/ksyncprofile.h> #include <libkdepim/kpimglobalprefs.h> #include <libkcal/vcaldrag.h> #include <libkcal/icaldrag.h> #include <libkcal/icalformat.h> #include <libkcal/vcalformat.h> #include <libkcal/scheduler.h> #include <libkcal/calendarlocal.h> #include <libkcal/journal.h> #include <libkcal/calfilter.h> #include <libkcal/attendee.h> #include <libkcal/dndfactory.h> #include <libkcal/freebusy.h> #include <libkcal/filestorage.h> #include <libkcal/calendarresources.h> #include <libkcal/qtopiaformat.h> #include "../kalarmd/alarmdialog.h" #ifndef DESKTOP_VERSION #include <libkcal/sharpformat.h> #include <externalapphandler.h> #endif #include <libkcal/phoneformat.h> #ifndef KORG_NOMAIL #include "komailclient.h" #endif #ifndef KORG_NOPRINTER #include "calprinter.h" #endif #ifndef KORG_NOPLUGINS #include "kocore.h" #endif #include "koeventeditor.h" #include "kotodoeditor.h" #include "koprefs.h" #include "koeventviewerdialog.h" #include "publishdialog.h" #include "kofilterview.h" #include "koglobals.h" #include "koviewmanager.h" #include "koagendaview.h" #include "kodialogmanager.h" #include "outgoingdialog.h" #include "incomingdialog.h" #include "datenavigatorcontainer.h" #include "statusdialog.h" #include "kdatenavigator.h" #include "kotodoview.h" #include "datenavigator.h" #include "resourceview.h" #include "navigatorbar.h" #include "searchdialog.h" #include "mainwindow.h" +#include "categoryeditdialog.h" #include "calendarview.h" #ifndef DESKTOP_VERSION #include <qtopia/alarmserver.h> #endif #ifndef _WIN32_ #include <stdlib.h> #include <stdio.h> #include <unistd.h> #else #include <qprocess.h> #endif #ifdef DESKTOP_VERSION #include <kabc/stdaddressbook.h> #endif using namespace KOrg; using namespace KCal; extern int globalFlagBlockAgenda; extern int globalFlagBlockStartup; MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) { mAlarms = alarms; viewport()->setBackgroundColor( QColor( 255, 255, 255 ) ); QString mText = "<table width=\"100%\">\n"; //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; #ifdef DESKTOP_VERSION mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; #else mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>"; #endif // mText += "<img src=\""; // mText += ipath; // mText += "\">"; //mEventDate = QDate::currentDate(); #ifdef DESKTOP_VERSION mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>"; #else mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>"; #endif //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; Incidence * inc = getNextInc( start ); int time = 0; //mText += "<table>"; while ( inc ) { QDateTime dt ; QString tempText = "<a "; bool ok; dt = inc->getNextOccurence( start, &ok ); if ( !ok ) continue; if ( inc->typeID() == eventID ) { tempText += "href=\"event:"; } else if ( inc->typeID() == todoID ) { tempText += "href=\"todo:"; } tempText += inc->uid() + "\">"; if ( inc->typeID() == todoID ) tempText += i18n("Todo: "); if ( inc->summary().length() > 0 ) tempText += inc->summary(); else tempText += i18n("-no summary-"); QString timestr; if (!inc->doesFloat()) timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": "; else timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; if ( dt.date() < QDate::currentDate() && time == 0 ) { mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; mText += "<table>"; time = 1; } if ( dt.date() == QDate::currentDate() && time <= 1 ) { if ( time > 0 ) mText +="</table>"; mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>"; mText += "<table>"; time = 2; } if ( dt.date() > QDate::currentDate() && time <= 2 ) { if ( time > 0 ) mText +="</table>"; mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>"; mText += "<table>"; time = 3; } mText +="<tr><td><b>"; mText += timestr; mText += "</b></td><td>"; mText += tempText; mText += "</td></tr>\n"; inc = getNextInc( start ); } mText +="</table>"; setText( mText ); } MissedAlarmTextBrowser::~MissedAlarmTextBrowser() { //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() "); } Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start ) { QDateTime dt ; Incidence * retInc; Incidence * inc = mAlarms.first(); if ( inc == 0 ) return 0; bool ok; dt = inc->getNextOccurence( start, &ok ); if ( ! ok ) return 0; QDateTime dtn ; retInc = inc; inc = mAlarms.next(); while ( inc ) { dtn = inc->getNextOccurence( start, &ok ); if ( ! ok ) return 0; if ( dtn < dt ) { dt = dtn; retInc = inc; } inc = mAlarms.next(); } mAlarms.remove( retInc ); return retInc; } void MissedAlarmTextBrowser::setSource(const QString & n) { if (n.startsWith("event:")) { #ifdef DESKTOP_VERSION emit showIncidence(n.mid(8)); #else emit showIncidence(n.mid(6)); #endif return; } else if (n.startsWith("todo:")) { #ifdef DESKTOP_VERSION emit showIncidence(n.mid(7)); #else emit showIncidence(n.mid(5)); #endif return; } } class KOBeamPrefs : public QDialog { public: KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : QDialog( parent, name, true ) { setCaption( i18n("Beam Options") ); QVBoxLayout* lay = new QVBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); lay->addWidget( format ); format->setExclusive ( true ) ; QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); lay->addWidget( time ); time->setExclusive ( true ) ; vcal = new QRadioButton(" vCalendar ", format ); ical = new QRadioButton(" iCalendar ", format ); vcal->setChecked( true ); tz = new QRadioButton(i18n(" With timezone "), time ); local = new QRadioButton(i18n(" Local time "), time ); tz->setChecked( true ); QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); lay->addWidget( ok ); QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); lay->addWidget( cancel ); connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); resize( 200, 200 ); } bool beamVcal() { return vcal->isChecked(); } bool beamLocal() { return local->isChecked(); } private: QRadioButton* vcal, *ical, *local, *tz; }; class KOCatPrefs : public QDialog { public: KOCatPrefs( QWidget *parent=0, const char *name=0 ) : QDialog( parent, name, true ) { setCaption( i18n("Manage new Categories") ); QVBoxLayout* lay = new QVBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); - QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); + QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); lay->addWidget( lab ); QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); lay->addWidget( format ); format->setExclusive ( true ) ; addCatBut = new QRadioButton(i18n("Add to category list"), format ); new QRadioButton(i18n("Remove from Events/Todos"), format ); addCatBut->setChecked( true ); - QPushButton * ok = new QPushButton( i18n("OK"), this ); + QPushButton * ok = new QPushButton( i18n("Change category list now!"), this ); lay->addWidget( ok ); QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); lay->addWidget( cancel ); connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); resize( 200, 200 ); } bool addCat() { return addCatBut->isChecked(); } private: QRadioButton* addCatBut; }; CalendarView::CalendarView( CalendarResources *calendar, QWidget *parent, const char *name ) : CalendarViewBase( parent, name ), mCalendar( calendar ), mResourceManager( calendar->resourceManager() ) { mEventEditor = 0; mTodoEditor = 0; init(); } CalendarView::CalendarView( Calendar *calendar, QWidget *parent, const char *name ) : CalendarViewBase( parent, name ), mCalendar( calendar ), mResourceManager( 0 ) { mEventEditor = 0; mTodoEditor = 0; init(); } void CalendarView::init() { mNextAlarmDateTime = QDateTime::currentDateTime(); setFocusPolicy ( NoFocus ); mViewerCallerIsSearchDialog = false; mBlockShowDates = false; mDatePickerMode = 0; mCurrentSyncDevice = ""; mViewManager = new KOViewManager( this ); mDialogManager = new KODialogManager( this ); mEventViewerDialog = 0; mModified = false; mReadOnly = false; mSelectedIncidence = 0; mCalPrinter = 0; mFilters.setAutoDelete(true); mCalendar->registerObserver( this ); // TODO: Make sure that view is updated, when calendar is changed. mStorage = new FileStorage( mCalendar ); mNavigator = new DateNavigator( this, "datevav", mViewManager ); QBoxLayout *topLayout = (QBoxLayout*)layout(); #ifndef KORG_NOSPLITTER // create the main layout frames. mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); topLayout->addWidget(mPanner); mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, "CalendarView::LeftFrame"); mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); mDateNavigator = new DateNavigatorContainer( mLeftSplitter, "CalendarView::DateNavigator" ); mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); mTodoList->setNavigator( mNavigator ); mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); #ifdef KORG_NORESOURCEVIEW mResourceView = 0; #else if ( mResourceManager ) { mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); mResourceView->updateView(); connect( mResourceView, SIGNAL( resourcesChanged() ), SLOT( updateView() ) ); } else { mResourceView = 0; } #endif QWidget *rightBox = new QWidget( mPanner ); QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); mRightFrame = new QWidgetStack( rightBox ); rightLayout->addWidget( mRightFrame, 1 ); mLeftFrame = mLeftSplitter; #else //QWidget *mainBox = new QWidget( this ); //QWidget *leftFrame = new QWidget( mainBox ); //QBoxLayout * mainBoxLayout; if ( KOPrefs::instance()->mVerticalScreen ) { //mainBoxLayout = new QVBoxLayout(mainBox); //leftFrameLayout = new QHBoxLayout(leftFrame ); mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); } else { //mainBoxLayout = new QHBoxLayout(mainBox); //leftFrameLayout = new QVBoxLayout(leftFrame ); mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); } mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); //QBoxLayout * leftFrameLayout; topLayout->addWidget( mMainFrame ); #ifdef DESKTOP_VERSION mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); topLayout->addWidget( mDateScrollBar ); connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); if ( QApplication::desktop()->width() < 800 ) mDateScrollBar->hide(); #endif //mainBoxLayout->addWidget (mLeftFrame); mDateNavigator = new DateNavigatorContainer( mLeftFrame, "CalendarView::DateNavigator" ); #if 0 // FIXME mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, "CalendarView::DateNavigator", QDate::currentDate()); #endif // mDateNavigator->blockSignals( true ); //leftFrameLayout->addWidget( mDateNavigator ); mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); mTodoList->setNavigator( mNavigator ); #if 0 if ( QApplication::desktop()->width() < 480 ) { leftFrameLayout->addWidget(mFilterView); leftFrameLayout->addWidget(mTodoList, 2 ); } else { leftFrameLayout->addWidget(mTodoList,2 ); leftFrameLayout->addWidget(mFilterView ); } #endif mFilterView->hide(); mCalEditView->hide(); QWidget *rightBox = new QWidget( mMainFrame ); //mainBoxLayout->addWidget ( rightBox, 10 ); QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); mRightFrame = new QWidgetStack( rightBox ); rightLayout->addWidget( mRightFrame, 10 ); //mLeftFrame = (QWidget *)leftFrame; if ( KOPrefs::instance()->mVerticalScreen ) { //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); } else { //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); } if ( !KOPrefs::instance()->mShowDateNavigator) mDateNavigator->hide(); //qDebug("Calendarview Size %d %d ", width(), height()); #endif connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), SLOT( showDates( const KCal::DateList & ) ) ); connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), mViewManager, SLOT( showMonth( const QDate & ) ) ); connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), mNavigator, SLOT( selectWeek( const QDate & ) ) ); connect( mDateNavigator, SIGNAL( goPrevYear() ), mNavigator, SLOT( selectPreviousYear() ) ); connect( mDateNavigator, SIGNAL( goNextYear() ), mNavigator, SLOT( selectNextYear() ) ); connect( mDateNavigator, SIGNAL( goPrevMonth() ), mNavigator, SLOT( selectPreviousMonth() ) ); connect( mDateNavigator, SIGNAL( goNextMonth() ), mNavigator, SLOT( selectNextMonth() ) ); connect( mDateNavigator, SIGNAL( goPrevious() ), mNavigator, SLOT( selectPrevious() ) ); connect( mDateNavigator, SIGNAL( goNext() ), mNavigator, SLOT( selectNext() ) ); connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), mNavigator, SLOT( slotMonthSelect( int ) ) ); connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); #if 0 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), SLOT( incidenceAdded( Incidence *) ) ); #endif // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); connect( this, SIGNAL( configChanged() ), mDateNavigator, SLOT( updateConfig() ) ); connect( mTodoList, SIGNAL( newTodoSignal() ), SLOT( newTodo() ) ); connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), SLOT( newSubTodo( Todo * ) ) ); connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), SLOT( editTodo( Todo * ) ) ); connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), SLOT( showTodo( Todo *) ) ); connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), SLOT( deleteTodo( Todo *) ) ); connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); connect( mTodoList, SIGNAL( purgeCompletedSignal() ), SLOT( purgeCompleted() ) ); connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), SIGNAL( todoModified( Todo *, int ) ) ); connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), this, SLOT ( cloneIncidence( Incidence * ) ) ); connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), this, SLOT (cancelIncidence( Incidence * ) ) ); connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), this, SLOT ( moveIncidence( Incidence * ) ) ); connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), this, SLOT ( beamIncidence( Incidence * ) ) ); connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), this, SLOT ( todo_unsub( Todo * ) ) ); connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), this, SLOT ( todo_resub( Todo *,Todo * ) ) ); connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, SLOT( updateTodo( Todo *, int ) ) ); connect( this, SIGNAL( todoModified( Todo *, int )), this, SLOT( changeTodoDisplay( Todo *, int ) ) ); connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); connect(QApplication::clipboard(),SIGNAL(dataChanged()), SLOT(checkClipboard())); connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), SLOT( processTodoListSelection( Incidence * ) ) ); connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); // kdDebug() << "CalendarView::CalendarView() done" << endl; mDateFrame = new QVBox(0,0,WType_Popup); //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); mDateFrame->setLineWidth(3); mDateFrame->hide(); mDateFrame->setCaption( i18n( "Pick a date to display")); mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); mEventEditor = mDialogManager->getEventEditor(); mTodoEditor = mDialogManager->getTodoEditor(); mFlagEditDescription = false; mSuspendTimer = new QTimer( this ); mAlarmTimer = new QTimer( this ); mRecheckAlarmTimer = new QTimer( this ); connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); mAlarmDialog = new AlarmDialog( this ); connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); mAlarmDialog->setServerNotification( false ); mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); #ifndef DESKTOP_VERSION //US listen for arriving address resultsets connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); #endif mDateNavigator->setCalendar( mCalendar ); } CalendarView::~CalendarView() { // kdDebug() << "~CalendarView()" << endl; //qDebug("CalendarView::~CalendarView() "); delete mDialogManager; delete mViewManager; delete mStorage; delete mDateFrame ; delete mEventViewerDialog; //kdDebug() << "~CalendarView() done" << endl; } void CalendarView::setScrollBarStep(int val ) { #ifdef DESKTOP_VERSION mDateScrollBar->setLineStep ( val ); #endif } void CalendarView::scrollBarValue(int val ) { #ifdef DESKTOP_VERSION if ( QApplication::desktop()->width() < 800 ) return; static bool block = false; if ( block ) return; block = true; val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); //qDebug("VAL %d ",val ); int count = mNavigator->selectedDates().count(); int year = mNavigator->selectedDates().first().year(); int day = mNavigator->selectedDates().first().dayOfYear(); if ( val == day -1 ) { block = false; return; } QDate d ( year,1,1 ); mNavigator->selectDates( d.addDays( val ), count ); block = false; #endif } void CalendarView::checkAlarms() { KConfig *config = KOGlobals::config(); config->setGroup( "AppRun" ); QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); int daysto = dt.daysTo( QDate::currentDate() ); int days = config->readNumEntry( "LatestProgramStopDays" , daysto); dt = dt.addDays( days ); int secto = dt.secsTo( QDateTime::currentDateTime() ); int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; //qDebug("KO: Reading program stop %d ", secs); //secs -= ( 3600 * 24*3 ); // debug only QDateTime latest = dt.addSecs ( secs ); qDebug("KO: Last termination on %s ", latest.toString().latin1()); //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); QPtrList<Incidence> el = mCalendar->rawIncidences(); QPtrList<Incidence> al; Incidence* inL = el.first(); QDateTime cur = QDateTime::currentDateTime().addSecs(-59); qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); while ( inL ) { bool ok = false; int offset = 0; QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; if ( ok ) { @@ -2437,768 +2438,774 @@ void CalendarView::readFilterSettings(KConfig *config) ++it; } if (mFilters.count() == 0) { CalFilter *filter = new CalFilter(i18n("Default")); mFilters.append(filter); } mFilterView->updateFilters(); config->setGroup("FilterView"); mFilterView->blockSignals(true); mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); mFilterView->setSelectedFilter(config->readEntry("Current Filter")); mFilterView->blockSignals(false); // We do it manually to avoid it being done twice by the above calls updateFilter(); } void CalendarView::writeFilterSettings(KConfig *config) { // kdDebug() << "CalendarView::writeFilterSettings()" << endl; QStringList filterList; CalFilter *filter = mFilters.first(); while(filter) { // kdDebug() << " fn: " << filter->name() << endl; filterList << filter->name(); config->setGroup("Filter_" + filter->name().utf8()); config->writeEntry("Criteria",filter->criteria()); config->writeEntry("CategoryList",filter->categoryList()); filter = mFilters.next(); } config->setGroup("General"); config->writeEntry("CalendarFilters",filterList); config->setGroup("FilterView"); config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); } void CalendarView::goToday() { if ( mViewManager->currentView()->isMonthView() ) mNavigator->selectTodayMonth(); else mNavigator->selectToday(); } void CalendarView::goNext() { mNavigator->selectNext(); } void CalendarView::goPrevious() { mNavigator->selectPrevious(); } void CalendarView::goNextMonth() { mNavigator->selectNextMonth(); } void CalendarView::goPreviousMonth() { mNavigator->selectPreviousMonth(); } void CalendarView::updateConfig() { if ( KOPrefs::instance()->mUseAppColors ) QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); emit configChanged(); mTodoList->updateConfig(); // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); // To make the "fill window" configurations work //mViewManager->raiseCurrentView(); } void CalendarView::eventChanged(Event *event) { changeEventDisplay(event,KOGlobals::EVENTEDITED); //updateUnmanagedViews(); } void CalendarView::eventAdded(Event *event) { changeEventDisplay(event,KOGlobals::EVENTADDED); } void CalendarView::eventToBeDeleted(Event *) { kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; } void CalendarView::eventDeleted() { changeEventDisplay(0,KOGlobals::EVENTDELETED); } void CalendarView::changeTodoDisplay(Todo *which, int action) { changeIncidenceDisplay((Incidence *)which, action); mDateNavigator->updateView(); //LR //mDialogManager->updateSearchDialog(); if (which) { mViewManager->updateWNview(); //mTodoList->updateView(); } } void CalendarView::changeIncidenceDisplay(Incidence *which, int action) { updateUnmanagedViews(); //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); if ( action == KOGlobals::EVENTDELETED ) { //delete mCalendar->checkAlarmForIncidence( 0, true ); if ( mEventViewerDialog ) mEventViewerDialog->hide(); } else mCalendar->checkAlarmForIncidence( which , false ); } // most of the changeEventDisplays() right now just call the view's // total update mode, but they SHOULD be recoded to be more refresh-efficient. void CalendarView::changeEventDisplay(Event *which, int action) { // kdDebug() << "CalendarView::changeEventDisplay" << endl; changeIncidenceDisplay((Incidence *)which, action); mDateNavigator->updateView(); //mDialogManager->updateSearchDialog(); if (which) { // If there is an event view visible update the display mViewManager->currentView()->changeEventDisplay(which,action); // TODO: check, if update needed // if (which->getTodoStatus()) { mTodoList->updateView(); // } } else { mViewManager->currentView()->updateView(); } } void CalendarView::updateTodoViews() { mTodoList->updateView(); mViewManager->currentView()->updateView(); } void CalendarView::updateView(const QDate &start, const QDate &end) { #ifdef DESKTOP_VERSION mDateScrollBar->blockSignals( true ); mDateScrollBar->setValue( start.dayOfYear()-1); mDateScrollBar->blockSignals( false ); #endif mTodoList->updateView(); mViewManager->updateView(start, end); //mDateNavigator->updateView(); } void CalendarView::clearAllViews() { mTodoList->clearList(); mViewManager->clearAllViews(); SearchDialog * sd = mDialogManager->getSearchDialog(); if ( sd ) { KOListView* kol = sd->listview(); if ( kol ) kol->clearList(); } } void CalendarView::updateView() { DateList tmpList = mNavigator->selectedDates(); if ( KOPrefs::instance()->mHideNonStartedTodos ) mTodoList->updateView(); // We assume that the navigator only selects consecutive days. updateView( tmpList.first(), tmpList.last() ); } void CalendarView::updateUnmanagedViews() { mDateNavigator->updateDayMatrix(); } int CalendarView::msgItemDelete(const QString name) { return KMessageBox::warningContinueCancel(this,name +"\n\n"+ i18n("This item will be\npermanently deleted."), i18n("KO/Pi Confirmation"),i18n("Delete")); } void CalendarView::edit_cut() { Event *anEvent=0; Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); if (mViewManager->currentView()->isEventView()) { if ( incidence && incidence->typeID() == eventID ) { anEvent = static_cast<Event *>(incidence); } } if (!anEvent) { KNotifyClient::beep(); return; } DndFactory factory( mCalendar ); factory.cutIncidence(anEvent); changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); } void CalendarView::edit_copy() { Event *anEvent=0; Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); if (mViewManager->currentView()->isEventView()) { if ( incidence && incidence->typeID() == eventID ) { anEvent = static_cast<Event *>(incidence); } } if (!anEvent) { KNotifyClient::beep(); return; } DndFactory factory( mCalendar ); factory.copyIncidence(anEvent); } void CalendarView::edit_paste() { QDate date = mNavigator->selectedDates().first(); DndFactory factory( mCalendar ); Event *pastedEvent = (Event *)factory.pasteIncidence( date ); changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); } void CalendarView::edit_global_options() { QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; emit save(); emit saveStopTimer(); mDialogManager->showGlobalOptionsDialog(); if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { emit saveStopTimer(); if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), i18n("Timezone settings"),i18n("Reload"))) { qDebug("KO: TZ reload cancelled "); mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); return; } qDebug("KO: Timezone change "); loadCalendars(); setModified(true); } else qDebug("KO: No tz change "); } void CalendarView::edit_options() { mDialogManager->showOptionsDialog(); } void CalendarView::slotSelectPickerDate( QDate d) { mDateFrame->hide(); if ( mDatePickerMode == 1 ) { mNavigator->slotDaySelect( d ); } else if ( mDatePickerMode == 2 ) { if ( mMoveIncidence->typeID() == todoID ) { Todo * to = (Todo *) mMoveIncidence; QTime tim; int len = 0; if ( to->hasStartDate() && to->hasDueDate() ) len = to->dtStart().secsTo( to->dtDue()); if ( to->hasDueDate() ) tim = to->dtDue().time(); else { tim = QTime ( 0,0,0 ); to->setFloats( true ); to->setHasDueDate( true ); } QDateTime dt ( d,tim ); to->setDtDue( dt ); if ( to->hasStartDate() ) { if ( len>0 ) to->setDtStart(to->dtDue().addSecs( -len )); else if (to->dtStart() > to->dtDue() ) to->setDtStart(to->dtDue().addDays( -3 )); } todoChanged( to ); } else { if ( mMoveIncidence->doesRecur() ) { #if 0 // PENDING implement this Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); mCalendar()->addIncidence( newInc ); if ( mMoveIncidence->typeID() == todoID ) emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); else emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); mMoveIncidence = newInc; #endif } QTime tim = mMoveIncidence->dtStart().time(); int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); QDateTime dt ( d,tim ); mMoveIncidence->setDtStart( dt ); ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); } mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); } } void CalendarView::removeCategories() { QPtrList<Incidence> incList = mCalendar->rawIncidences(); QStringList catList = KOPrefs::instance()->mCustomCategories; QStringList catIncList; QStringList newCatList; Incidence* inc = incList.first(); int i; int count = 0; while ( inc ) { newCatList.clear(); catIncList = inc->categories() ; for( i = 0; i< catIncList.count(); ++i ) { if ( catList.contains (catIncList[i])) newCatList.append( catIncList[i] ); } newCatList.sort(); inc->setCategories( newCatList.join(",") ); inc = incList.next(); } } int CalendarView::addCategories() { QPtrList<Incidence> incList = mCalendar->rawIncidences(); QStringList catList = KOPrefs::instance()->mCustomCategories; QStringList catIncList; Incidence* inc = incList.first(); int i; int count = 0; while ( inc ) { catIncList = inc->categories() ; for( i = 0; i< catIncList.count(); ++i ) { if ( !catList.contains (catIncList[i])) { catList.append( catIncList[i] ); //qDebug("add cat %s ", catIncList[i].latin1()); ++count; } } inc = incList.next(); } catList.sort(); KOPrefs::instance()->mCustomCategories = catList; return count; } +void CalendarView::editCategories() +{ + qDebug("CalendarView::editCategories() "); + KPIM::CategoryEditDialog ced (KOPrefs::instance(),this ); + ced.exec(); +} void CalendarView::manageCategories() { KOCatPrefs* cp = new KOCatPrefs(); cp->show(); int w =cp->sizeHint().width() ; int h = cp->sizeHint().height() ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); if ( !cp->exec() ) { delete cp; return; } int count = 0; if ( cp->addCat() ) { count = addCategories(); if ( count ) { topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); writeSettings(); } else topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); } else { removeCategories(); updateView(); } delete cp; } void CalendarView::beamIncidence(Incidence * Inc) { QPtrList<Incidence> delSel ; delSel.append(Inc); beamIncidenceList( delSel ); } void CalendarView::beamCalendar() { QPtrList<Incidence> delSel = mCalendar->rawIncidences(); //qDebug("beamCalendar() "); beamIncidenceList( delSel ); } void CalendarView::beamFilteredCalendar() { QPtrList<Incidence> delSel = mCalendar->incidences(); //qDebug("beamFilteredCalendar() "); beamIncidenceList( delSel ); } void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) { KOBeamPrefs beamDialog; if ( beamDialog.exec () == QDialog::Rejected ) return; #ifdef DESKTOP_VERSION QString fn = locateLocal( "tmp", "kopibeamfile" ); #else QString fn = "/tmp/kopibeamfile"; #endif QString mes; bool createbup = true; if ( createbup ) { QString description = "\n"; CalendarLocal* cal = new CalendarLocal(); if ( beamDialog.beamLocal() ) cal->setLocalTime(); else cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); Incidence *incidence = delSel.first(); bool addText = false; if ( delSel.count() < 10 ) addText = true; else { description.sprintf(i18n(" %d items?"),delSel.count() ); } while ( incidence ) { Incidence *in = incidence->clone(); if ( ! in->summary().isEmpty() ) { in->setDescription(""); } else { in->setSummary( in->description().left(20)); in->setDescription(""); } if ( addText ) description += in->summary() + "\n"; cal->addIncidence( in ); incidence = delSel.next(); } if ( beamDialog.beamVcal() ) { fn += ".vcs"; FileStorage storage( cal, fn, new VCalFormat ); storage.save(); } else { fn += ".ics"; FileStorage storage( cal, fn, new ICalFormat( ) ); storage.save(); } delete cal; mes = i18n("KO/Pi: Ready for beaming"); topLevelWidget()->setCaption(mes); KApplication::convert2latin1( fn ); #ifndef DESKTOP_VERSION Ir *ir = new Ir( this ); connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); ir->send( fn, description, "text/x-vCalendar" ); #endif } } void CalendarView::beamDone( Ir *ir ) { #ifndef DESKTOP_VERSION delete ir; #endif topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); topLevelWidget()->raise(); } void CalendarView::moveIncidence(Incidence * inc ) { if ( !inc ) return; showDatePickerPopup(); mDatePickerMode = 2; mMoveIncidence = inc ; QDate da; if ( mMoveIncidence->typeID() == todoID ) { Todo * to = (Todo *) mMoveIncidence; if ( to->hasDueDate() ) da = to->dtDue().date(); else da = QDate::currentDate(); } else { da = mMoveIncidence->dtStart().date(); } //PENDING set date for recurring incidence to date of recurrence //mMoveIncidenceOldDate; mDatePicker->setDate( da ); } void CalendarView::showDatePickerPopup() { if ( mDateFrame->isVisible() ) mDateFrame->hide(); else { int offX = 0, offY = 0; #ifdef DESKTOP_VERSION int w =mDatePicker->sizeHint().width() ; int h = mDatePicker->sizeHint().height() ; int dw = topLevelWidget()->width(); int dh = topLevelWidget()->height(); offX = topLevelWidget()->x(); offY = topLevelWidget()->y(); #else int w =mDatePicker->sizeHint().width() ; int h = mDatePicker->sizeHint().height() ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); #endif mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); mDateFrame->show(); } } void CalendarView::showDatePicker( ) { showDatePickerPopup(); mDatePickerMode = 1; mDatePicker->setDate( mNavigator->selectedDates().first() ); } void CalendarView::showEventEditor() { #ifdef DESKTOP_VERSION int x,y,w,h; x = mEventEditor->geometry().x(); y = mEventEditor->geometry().y(); w = mEventEditor->width(); h = mEventEditor->height(); mEventEditor->show(); mEventEditor->setGeometry(x,y,w,h); #else if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); qApp->processEvents(); delete mEventEditor; mEventEditor = mDialogManager->getEventEditor(); topLevelWidget()->setCaption( i18n("") ); } mEventEditor->showMaximized(); #endif } void CalendarView::showTodoEditor() { #ifdef DESKTOP_VERSION int x,y,w,h; x = mTodoEditor->geometry().x(); y = mTodoEditor->geometry().y(); w = mTodoEditor->width(); h = mTodoEditor->height(); mTodoEditor->show(); mTodoEditor->setGeometry(x,y,w,h); #else if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); qApp->processEvents(); delete mTodoEditor; mTodoEditor = mDialogManager->getTodoEditor(); topLevelWidget()->setCaption( i18n("") ); } mTodoEditor->showMaximized(); #endif } void CalendarView::cloneIncidence() { Incidence *incidence = currentSelection(); if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); if ( incidence ) { cloneIncidence(incidence); } } void CalendarView::moveIncidence() { Incidence *incidence = currentSelection(); if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); if ( incidence ) { moveIncidence(incidence); } } void CalendarView::beamIncidence() { Incidence *incidence = currentSelection(); if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); if ( incidence ) { beamIncidence(incidence); } } void CalendarView::toggleCancelIncidence() { Incidence *incidence = currentSelection(); if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); if ( incidence ) { cancelIncidence(incidence); } } void CalendarView::cancelIncidence(Incidence * inc ) { inc->setCancelled( ! inc->cancelled() ); changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); updateView(); } void CalendarView::cloneIncidence(Incidence * orgInc ) { Incidence * newInc = orgInc->clone(); newInc->recreate(); if ( newInc->typeID() == todoID ) { Todo* t = (Todo*) newInc; bool cloneSub = false; if ( orgInc->relations().count() ) { int result = KMessageBox::warningYesNoCancel(this, i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ), i18n("Todo has subtodos"), i18n("Yes"), i18n("No")); if ( result == KMessageBox::Cancel ) { delete t; return; } if (result == KMessageBox::Yes) cloneSub = true; } showTodoEditor(); mTodoEditor->editTodo( t ); if ( mTodoEditor->exec() ) { if ( cloneSub ) { orgInc->cloneRelations( t ); mCalendar->addIncidenceBranch( t ); updateView(); } else { mCalendar->addTodo( t ); updateView(); } } else { delete t; } } else { Event* e = (Event*) newInc; showEventEditor(); mEventEditor->editEvent( e ); if ( mEventEditor->exec() ) { mCalendar->addEvent( e ); updateView(); } else { delete e; } } setActiveWindow(); } void CalendarView::newEvent() { // TODO: Replace this code by a common eventDurationHint of KOBaseView. KOAgendaView *aView = mViewManager->agendaView(); if (aView) { if (aView->selectionStart().isValid()) { if (aView->selectedIsAllDay()) { newEvent(aView->selectionStart(),aView->selectionEnd(),true); } else { newEvent(aView->selectionStart(),aView->selectionEnd()); } return; } } QDate date = mNavigator->selectedDates().first(); QDateTime current = QDateTime::currentDateTime(); if ( date <= current.date() ) { int hour = current.time().hour() +1; newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); } else newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), QDateTime( date, QTime( KOPrefs::instance()->mStartTime + KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); } void CalendarView::newEvent(QDateTime fh) { newEvent(fh, QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); } void CalendarView::newEvent(QDate dt) { newEvent(QDateTime(dt, QTime(0,0,0)), QDateTime(dt, QTime(0,0,0)), true); } void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) { newEvent(fromHint, toHint, false); } void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) { showEventEditor(); mEventEditor->newEvent(fromHint,toHint,allDay); if ( mFilterView->filtersEnabled() ) { CalFilter *filter = mFilterView->selectedFilter(); if (filter && filter->showCategories()) { mEventEditor->setCategories(filter->categoryList().join(",") ); } if ( filter ) mEventEditor->setSecrecy( filter->getSecrecy() ); } mEventEditor->exec(); setActiveWindow(); } void CalendarView::todoAdded(Todo * t) { changeTodoDisplay ( t ,KOGlobals::EVENTADDED); updateTodoViews(); } void CalendarView::todoChanged(Todo * t) { emit todoModified( t, 4 ); // updateTodoViews(); } void CalendarView::todoToBeDeleted(Todo *) { //qDebug("todoToBeDeleted(Todo *) "); updateTodoViews(); } void CalendarView::todoDeleted() { //qDebug(" todoDeleted()"); updateTodoViews(); } void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) { diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index f7e5366..3323a98 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -104,554 +104,555 @@ class MissedAlarmTextBrowser : public QTextBrowser { class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface { Q_OBJECT public: /** Constructs a new calendar view widget. @param calendar calendar document @param parent parent window @param name Qt internal widget object name */ CalendarView( CalendarResources *calendar, QWidget *parent = 0, const char *name = 0 ); CalendarView( Calendar *calendar, QWidget *parent = 0, const char *name = 0 ); virtual ~CalendarView(); Calendar *calendar() { return mCalendar; } KOViewManager *viewManager(); KODialogManager *dialogManager(); QDate startDate(); QDate endDate(); QWidgetStack *viewStack(); QWidget *leftFrame(); DateNavigator *dateNavigator(); KDateNavigator *dateNavigatorWidget(); void addView(KOrg::BaseView *); void showView(KOrg::BaseView *); KOEventViewerDialog* getEventViewerDialog(); Incidence *currentSelection(); signals: void save (); void saveStopTimer (); void tempDisableBR(bool); /** This todo has been modified */ void todoModified(Todo *, int); /** when change is made to options dialog, the topwidget will catch this * and emit this signal which notifies all widgets which have registered * for notification to update their settings. */ void configChanged(); /** emitted when the topwidget is closing down, so that any attached child windows can also close. */ void closingDown(); /** emitted right before we die */ void closed(QWidget *); /** Emitted when state of modified flag changes */ void modifiedChanged(bool); void signalmodified(); /** Emitted when state of read-only flag changes */ void readOnlyChanged(bool); /** Emitted when the unit of navigation changes */ void changeNavStringPrev(const QString &); void changeNavStringNext(const QString &); /** Emitted when state of events selection has changed and user is organizer*/ void organizerEventsSelected(bool); /** Emitted when state of events selection has changed and user is attendee*/ void groupEventsSelected(bool); /** Emitted when an incidence gets selected. If the selection is cleared the signal is emitted with 0 as argument. */ void incidenceSelected( Incidence * ); /** Emitted, when a todoitem is selected or deselected. */ void todoSelected( bool ); /** Emitted, when clipboard content changes. Parameter indicates if paste is possible or not. */ void pasteEnabled(bool); /** Emitted, when the number of incoming messages has changed. */ void numIncomingChanged(int); /** Emitted, when the number of outgoing messages has changed. */ void numOutgoingChanged(int); /** Send status message, which can e.g. be displayed in the status bar. */ void statusMessage(const QString &); void calendarViewExpanded( bool ); void updateSearchDialog(); void filtersUpdated(); public slots: void checkAlarms(); void slotprintSelInc(); void showNextAlarms(); void showOpenError(); void watchSavedFile(); void recheckTimerAlarm(); void checkNextTimerAlarm(); void addAlarm(const QDateTime &qdt, const QString ¬i ); void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); void removeAlarm(const QDateTime &qdt, const QString ¬i ); /** options dialog made a changed to the configuration. we catch this * and notify all widgets which need to update their configuration. */ void updateConfig(); void insertBirthdays(const QString& uid, const QStringList& birthdayList, const QStringList& anniversaryList, const QStringList& realNameList, const QStringList& emailList, const QStringList& assembledNameList, const QStringList& uidList); /** Load calendar from file \a filename. If \a merge is true, load calendar into existing one, if it is false, clear calendar, before loading. Return true, if calendar could be successfully loaded. */ bool openCalendar(QString filename, bool merge=false); bool loadCalendars(); bool saveCalendars(); bool restoreCalendarSettings(); bool addCalendar( KopiCalendarFile * ); void addCalendarId( int id ); bool syncCalendar(QString filename,int mode = 0 ); /** Save calendar data to file. Return true if calendar could be successfully saved. */ bool saveCalendar(QString filename); /** Close calendar. Clear calendar data and reset views to display an empty calendar. */ void closeCalendar(); /** Archive old events of calendar */ void archiveCalendar(); void showIncidence(); void editIncidence(); void editIncidenceDescription(); void deleteIncidence(); void cloneIncidence(); void moveIncidence(); void beamIncidence(); void toggleCancelIncidence(); /** create an editeventwin with supplied date/time, and if bool is true, * make the event take all day. */ void newEvent(QDateTime, QDateTime, bool allDay ); void newEvent(QDateTime, QDateTime); void newEvent(QDateTime fh); void newEvent(QDate dt); /** create new event without having a date hint. Takes current date as default hint. */ void newEvent(); void newFloatingEvent(); /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ void showIncidence(Incidence *); void showIncidence(QString uid); /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ void editIncidence(Incidence *); /** Delete the supplied incidence. It calls the correct deleteXXX method*/ void deleteIncidence(Incidence *); void cloneIncidence(Incidence *); void cancelIncidence(Incidence *); /** Create an editor for the supplied event. */ void editEvent(Event *); /** Delete the supplied event. */ void deleteEvent(Event *); /** Delete the event with the given unique ID. Returns false, if event wasn't found. */ bool deleteEvent(const QString &uid); /** Create a read-only viewer dialog for the supplied event. */ void showEvent(Event *); void editJournal(Journal *); void showJournal(Journal *); void deleteJournal(Journal *); /** Create an editor dialog for a todo */ void editTodo(Todo *); /** Create a read-only viewer dialog for the supplied todo */ void showTodo(Todo *); /** create new todo */ void newTodo(); void newTodoDateTime(QDateTime, bool allday); /** create new todo with a parent todo */ void newSubTodo(); /** create new todo with a parent todo */ void newSubTodo(Todo *); /** Delete todo */ void deleteTodo(Todo *); /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is * emitted as result. */ void checkClipboard(); /** using the KConfig associated with the kapp variable, read in the * settings from the config file. */ void readSettings(); /** write current state to config file. */ void writeSettings(); /** read settings for calendar filters */ void readFilterSettings(KConfig *config); /** write settings for calendar filters */ void writeFilterSettings(KConfig *config); /** passes on the message that an event has changed to the currently * activated view so that it can make appropriate display changes. */ void changeEventDisplay(Event *, int); void changeIncidenceDisplay(Incidence *, int); void changeTodoDisplay(Todo *, int); void eventAdded(Event *); void eventChanged(Event *); void eventToBeDeleted(Event *); void eventDeleted(); void todoAdded(Todo *); void todoChanged(Todo *); void todoToBeDeleted(Todo *); void todoDeleted(); void updateView(const QDate &start, const QDate &end); void updateView(); void clearAllViews(); /** Full update of visible todo views */ void updateTodoViews(); void updateUnmanagedViews(); /** cut the current appointment to the clipboard */ void edit_cut(); /** copy the current appointment(s) to the clipboard */ void edit_copy(); /** paste the current vobject(s) in the clipboard buffer into calendar */ void edit_paste(); /** edit viewing and configuration options. */ void edit_options(); void edit_global_options(); /** Functions for printing, previewing a print, and setting up printing parameters. */ void print(); void printSetup(); void printPreview(); /** Export as iCalendar file */ void exportICalendar(); /** Export as vCalendar file */ bool exportVCalendar( QString fn); /** pop up a dialog to show an existing appointment. */ void appointment_show(); /** * pop up an Appointment Dialog to edit an existing appointment. Get * information on the appointment from the list of unique IDs that is * currently in the View, called currIds. */ void appointment_edit(); /** * pop up dialog confirming deletion of currently selected event in the * View. */ void appointment_delete(); /** mails the currently selected event to a particular user as a vCalendar attachment. */ void action_mail(); /* frees a subtodo from it's relation */ void todo_unsub( Todo * ); void todo_resub( Todo * parent, Todo * sub ); /** Take ownership of selected event. */ void takeOverEvent(); /** Take ownership of all events in calendar. */ void takeOverCalendar(); /** query whether or not the calendar is "dirty". */ bool isModified(); /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ void setModified(bool modified=true); /** query if the calendar is read-only. */ bool isReadOnly(); /** set state of calendar to read-only */ void setReadOnly(bool readOnly=true); void eventUpdated(Incidence *); /* iTIP scheduling actions */ void schedule_publish(Incidence *incidence = 0); void schedule_request(Incidence *incidence = 0); void schedule_refresh(Incidence *incidence = 0); void schedule_cancel(Incidence *incidence = 0); void schedule_add(Incidence *incidence = 0); void schedule_reply(Incidence *incidence = 0); void schedule_counter(Incidence *incidence = 0); void schedule_declinecounter(Incidence *incidence = 0); void schedule_publish_freebusy(int daysToPublish = 30); void openAddressbook(); void editFilters(); void toggleFilerEnabled(); QPtrList<CalFilter> filters(); void toggleFilter(); void showFilter(bool visible); void updateFilter(); void filterEdited(); void selectFilter( int ); KOFilterView *filterView(); void showIntro(); /** Move the curdatepient view date to today */ void goToday(); /** Move to the next date(s) in the current view */ void goNext(); /** Move to the previous date(s) in the current view */ void goPrevious(); /** Move to the next date(s) in the current view */ void goNextMonth(); /** Move to the previous date(s) in the current view */ void goPreviousMonth(); void toggleExpand(); void toggleDateNavigatorWidget(); void toggleAllDaySize(); void dialogClosing(Incidence *); /** Look for new messages in the inbox */ void lookForIncomingMessages(); /** Look for new messages in the outbox */ void lookForOutgoingMessages(); void processMainViewSelection( Incidence * ); void processTodoListSelection( Incidence * ); void processIncidenceSelection( Incidence * ); void purgeCompleted(); bool removeCompletedSubTodos( Todo* ); void slotCalendarChanged(); bool importBday(); bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); bool importQtopia( const QString &categoriesFile, const QString &datebookFile, const QString &tasklistFile ); void syncExternal( int mode ); void slotSelectPickerDate( QDate ) ; void showDatePicker() ; void showDatePickerPopup() ; void moveIncidence(Incidence *) ; void beamIncidence(Incidence *) ; void beamCalendar() ; void beamFilteredCalendar() ; void beamIncidenceList(QPtrList<Incidence>) ; void manageCategories(); + void editCategories(); int addCategories(); void removeCategories(); void setSyncDevice( QString ); void setSyncName( QString ); void showDay( QDate ); void undo_delete(); protected slots: void resetFocus(); void scrollBarValue(int); void slotViewerClosed(); void timerAlarm(); void suspendAlarm(); void beamDone( Ir *ir ); /** Select a view or adapt the current view to display the specified dates. */ void showDates( const KCal::DateList & ); void selectWeekNum ( int ); public: // show a standard warning // returns KMsgBox::yesNoCancel() int msgCalModified(); virtual bool sync(KSyncManager* manager, QString filename, int mode); virtual bool syncExternal(KSyncManager* manager, QString resource); virtual void removeSyncInfo( QString syncProfile); void setSyncManager(KSyncManager* manager); void setLoadedFileVersion(QDateTime); bool checkFileVersion(QString fn); bool checkAllFileVersions(); bool checkFileChanged(QString fn); Event* getLastSyncEvent(); /** Adapt navigation units correpsonding to step size of navigation of the * current view. */ void adaptNavigationUnits(); bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); //Attendee* getYourAttendee(Event *event); void setBlockShowDates( bool b ) { mBlockShowDates = b ;} void setScrollBarStep(int val ); protected: void schedule(Scheduler::Method, Incidence *incidence = 0); // returns KMsgBox::OKCandel() int msgItemDelete(const QString name); void showEventEditor(); void showTodoEditor(); Todo *selectedTodo(); private: #ifdef DESKTOP_VERSION QScrollBar * mDateScrollBar; #endif QDateTime mNextAlarmDateTime; bool mViewerCallerIsSearchDialog; bool mBlockShowDates; KSyncManager* mSyncManager; AlarmDialog * mAlarmDialog; QString mAlarmNotification; QString mSuspendAlarmNotification; QTimer* mSuspendTimer; QTimer* mAlarmTimer; QTimer* mRecheckAlarmTimer; void computeAlarm( QString ); void startAlarm( QString, QString ); void setSyncEventsReadOnly(); QDateTime loadedFileVersion; void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); void checkExternalId( Incidence * inc ); int mGlobalSyncMode; QString mCurrentSyncDevice; QString mCurrentSyncName; void init(); int mDatePickerMode; bool mFlagEditDescription; QDateTime mLastCalendarSync; void createPrinter(); void calendarModified( bool, Calendar * ); CalPrinter *mCalPrinter; QSplitter *mPanner; QSplitter *mLeftSplitter; KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; QWidgetStack *mRightFrame; KDatePicker* mDatePicker; QVBox* mDateFrame; DateNavigatorContainer *mDateNavigator; // widget showing small month view. KOFilterView *mFilterView; KOCalEditView *mCalEditView; ResourceView *mResourceView; // calendar object for this viewing instance Calendar *mCalendar; CalendarResourceManager *mResourceManager; FileStorage *mStorage; DateNavigator *mNavigator; KOViewManager *mViewManager; KODialogManager *mDialogManager; // Calendar filters QPtrList<CalFilter> mFilters; // various housekeeping variables. bool mModified; // flag indicating if calendar is modified bool mReadOnly; // flag indicating if calendar is read-only QDate mSaveSingleDate; Incidence *mSelectedIncidence; Incidence *mMoveIncidence; QDate mMoveIncidenceOldDate; KOTodoView *mTodoList; KOEventEditor * mEventEditor; KOTodoEditor * mTodoEditor; KOEventViewerDialog * mEventViewerDialog; void keyPressEvent ( QKeyEvent *e) ; //QMap<Incidence*,KOIncidenceEditor*> mDialogList; }; class CalendarViewVisitor : public Incidence::Visitor { public: CalendarViewVisitor() : mView( 0 ) {} bool act( Incidence *incidence, CalendarView *view ) { mView = view; return incidence->accept( *this ); } protected: CalendarView *mView; }; class ShowIncidenceVisitor : public CalendarViewVisitor { protected: bool visit( Event *event ) { mView->showEvent( event ); return true; } bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } bool visit( Journal * j ) { mView->showJournal( j );return true; } }; class EditIncidenceVisitor : public CalendarViewVisitor { protected: bool visit( Event *event ) { mView->editEvent( event ); return true; } bool visit( Todo *todo ) { mView->editTodo( todo ); return true; } bool visit( Journal *j ) { mView->editJournal( j); return true; } }; class DeleteIncidenceVisitor : public CalendarViewVisitor { protected: bool visit( Event *event ) { mView->deleteEvent( event ); return true; } bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; } bool visit( Journal * j) {mView->deleteJournal( j ); return true; } }; #endif diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 43e1113..517677c 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -57,769 +57,770 @@ #include <qapplication.h> #endif #ifndef KORG_NOPRINTER #include "calprinter.h" #endif #include "koglobals.h" #include "koprefs.h" #include "kfiledialog.h" #include "kolistview.h" #include "koeventviewer.h" extern QPixmap* sgListViewCompletedPix[6]; class KOListViewWhatsThis :public QWhatsThis { public: KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; protected: virtual QString text( const QPoint& p) { return _view->getWhatsThisText(p) ; } private: QWidget* _wid; KOListView * _view; }; ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) { mItem = item; mDate = date; } ListItemVisitor::~ListItemVisitor() { } bool ListItemVisitor::visit(Event *e) { bool ok = false; QString start, end; QDate ds, de; if ( e->doesRecur() ) { ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); if ( ok ) { int days = e->dtStart().date().daysTo(e->dtEnd().date() ); start = KGlobal::locale()->formatDate(ds,true); de = ds.addDays( days); end = KGlobal::locale()->formatDate(de,true); } } if ( ! ok ) { start =e->dtStartDateStr(); end = e->dtEndDateStr(); ds = e->dtStart().date(); de = e->dtEnd().date(); } mItem->setText(0,e->summary()); mItem->setText(1,start); if ( e->doesFloat() ) mItem->setText(2,"---"); else mItem->setText(2,e->dtStartTimeStr()); mItem->setText(3,end); if ( e->doesFloat() ) mItem->setText(4,"---"); else mItem->setText(4,e->dtEndTimeStr()); if ( e->isAlarmEnabled() ) { mItem->setText(5,e->alarms().first()->offsetText() ); } else { mItem->setText(5, i18n("No")); } mItem->setText(6, e->recurrence()->recurrenceText()); if( ! e->doesRecur() ) mItem->setSortKey( 6, "-" ); mItem->setText(7,"---"); mItem->setText(8,"---"); mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); mItem->setText(10,e->categoriesStr()); mItem->setText(11, KOPrefs::instance()->calName( e->calID() )); QString key; QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); mItem->setSortKey(1,key); t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); mItem->setSortKey(3,key); return true; } bool ListItemVisitor::visit(Todo *t) { mItem->setText(0,t->summary()); if ( t->isCompleted() ) { mItem->setSortKey(0,"99"+ t->summary().left(10)); } else mItem->setSortKey(0,QString::number( t->percentComplete() )+ t->summary().left(10)); mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); if (t->hasStartDate()) { mItem->setText(1,t->dtStartDateStr()); if (t->doesFloat()) { mItem->setText(2,"---"); } else { mItem->setText(2,t->dtStartTimeStr()); } } else { mItem->setText(1,"---"); mItem->setText(2,"---"); } mItem->setText(3,"---"); mItem->setText(4,"---"); if ( t->isAlarmEnabled() ) { mItem->setText(5,t->alarms().first()->offsetText() ); } else { mItem->setText(5, i18n("No")); } mItem->setText(6, t->recurrence()->recurrenceText()); if( ! t->doesRecur() ) mItem->setSortKey( 6, "-" ); if (t->hasDueDate()) { mItem->setText(7,t->dtDueDateStr()); if (t->doesFloat()) { mItem->setText(8,"---"); } else { mItem->setText(8,t->dtDueTimeStr()); } } else { mItem->setText(7,"---"); mItem->setText(8,"---"); } mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); mItem->setText(10,t->categoriesStr()); mItem->setText(11, KOPrefs::instance()->calName( t->calID() )); QString key; QDate d; if (t->hasDueDate()) { d = t->dtDue().date(); QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); mItem->setSortKey(7,key); } if ( t->hasStartDate() ) { d = t->dtStart().date(); QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); mItem->setSortKey(1,key); } return true; } bool ListItemVisitor::visit(Journal * j) { QString des; if ( !j->summary().isEmpty() ) { des = j->summary(); } else { des = j->description().left(30); des = des.simplifyWhiteSpace (); des.replace (QRegExp ("\\n"),"" ); des.replace (QRegExp ("\\r"),"" ); } mItem->setText(0,i18n("Journal: ")+des.left(25)); mItem->setText(1,j->dtStartDateStr()); mItem->setText(2,"---"); mItem->setText(3,"---"); mItem->setText(4,"---"); mItem->setText(5,"---"); mItem->setText(6,"---"); mItem->setText(7,j->dtStartDateStr()); mItem->setText(8,"---"); mItem->setText(9,"---"); mItem->setText(10,j->categoriesStr()); mItem->setText(11, KOPrefs::instance()->calName( j->calID() )); QString key; QDate d = j->dtStart().date(); key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); mItem->setSortKey(1,key); mItem->setSortKey(7,key); return true; } KOListView::KOListView(Calendar *calendar, QWidget *parent, const char *name) : KOEventView(calendar, parent, name) { mActiveItem = 0; mForceShowCompletedTodos = false; mListView = new KOListViewListView(this); mListView->addColumn(i18n("Summary")); mListView->addColumn(i18n("Start Date")); mListView->addColumn(i18n("Start Time")); mListView->addColumn(i18n("End Date")); mListView->addColumn(i18n("End Time")); mListView->addColumn(i18n("Alarm")); // alarm set? mListView->addColumn(i18n("Recurs")); // recurs? mListView->addColumn(i18n("Due Date")); mListView->addColumn(i18n("Due Time")); mListView->addColumn(i18n("Cancelled")); mListView->addColumn(i18n("Categories")); mListView->addColumn(i18n("Calendar")); mListView->setColumnAlignment(0,AlignLeft); mListView->setColumnAlignment(1,AlignLeft); mListView->setColumnAlignment(2,AlignHCenter); mListView->setColumnAlignment(3,AlignLeft); mListView->setColumnAlignment(4,AlignHCenter); mListView->setColumnAlignment(5,AlignLeft); mListView->setColumnAlignment(6,AlignLeft); mListView->setColumnAlignment(7,AlignLeft); mListView->setColumnAlignment(8,AlignLeft); mListView->setColumnAlignment(9,AlignLeft); mListView->setColumnAlignment(10,AlignLeft); mListView->setColumnAlignment(11,AlignLeft); mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); int iii = 0; for ( iii = 0; iii< 12 ; ++iii ) mListView->setColumnWidthMode( iii, QListView::Manual ); QBoxLayout *layoutTop = new QVBoxLayout(this); layoutTop->addWidget(mListView); mListView->setFont ( KOPrefs::instance()->mListViewFont ); mPopupMenu = eventPopup(); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Select all"),this, SLOT(allSelection()),true); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Deselect all"),this, SLOT(clearSelection()),true); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Delete all selected"),this, SLOT(deleteAll()),true); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Hide all selected"),this, SLOT(hideAll()),true); mPopupMenu->insertSeparator(); #ifdef DESKTOP_VERSION mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Print complete list"),this, SLOT(printList()),true); mPopupMenu->insertSeparator(); #endif mCalPopup = new QPopupMenu ( this ); mPopupMenu->insertItem( i18n("Set Calendar"), mCalPopup ); QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, SLOT( populateCalPopup() )); QObject::connect(mCalPopup,SIGNAL(activated( int )),this, SLOT( setCalendar( int ) )); QPopupMenu * exportPO = new QPopupMenu ( this ); mPopupMenu->insertItem( i18n("Export selected"), exportPO ); exportPO->insertItem( i18n("As iCal (ics) file..."),this, SLOT(saveToFile())); exportPO->insertItem( i18n("As vCal (vcs) file..."),this, SLOT(saveToFileVCS())); exportPO->insertItem( i18n("Journal/Details..."),this, SLOT(saveDescriptionToFile())); // mPopupMenu->insertSeparator(); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Add Categ. to selected..."),this, SLOT(addCat()),true); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Set Categ. for selected..."),this, SLOT(setCat()),true); //mPopupMenu->insertSeparator(); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Set alarm for selected..."),this, SLOT(setAlarm()),true); #ifndef DESKTOP_VERSION mPopupMenu->insertSeparator(); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), i18n("Beam selected via IR"),this, SLOT(beamSelected()),true); #endif /* mPopupMenu = new QPopupMenu; mPopupMenu->insertItem(i18n("Edit Event"), this, SLOT (editEvent())); mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, SLOT (deleteEvent())); mPopupMenu->insertSeparator(); mPopupMenu->insertItem(i18n("Show Dates"), this, SLOT(showDates())); mPopupMenu->insertItem(i18n("Hide Dates"), this, SLOT(hideDates())); */ QObject::connect(mListView,SIGNAL( newEvent()), this,SIGNAL(signalNewEvent())); QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), this,SLOT(defaultItemAction(QListViewItem *))); QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, const QPoint &, int )), this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), SLOT(processSelectionChange(QListViewItem *))); QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), SIGNAL(showIncidenceSignal(Incidence *)) ); readSettings(KOGlobals::config(),"KOListView Layout"); } KOListView::~KOListView() { delete mPopupMenu; #if QT_VERSION >= 0x030000 #else delete mKOListViewWhatsThis; #endif } QString KOListView::getWhatsThisText(QPoint p) { KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); if ( item ) return KIncidenceFormatter::instance()->getFormattedText( item->data(), KOPrefs::instance()->mWTshowDetails, KOPrefs::instance()->mWTshowCreated, KOPrefs::instance()->mWTshowChanged); return i18n("That is the list view" ); } void KOListView::setCalendar( int c ) { int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), i18n("This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!").arg( KOPrefs::instance()->calName( c ) ), i18n("Continue"), i18n("Cancel"), 0, 0, 1 ); if ( result != 0 ) { return; } QPtrList<Incidence> delSel = getSelectedIncidences() ; int icount = delSel.count(); if ( icount ) { Incidence *incidence = delSel.first(); while ( incidence ) { incidence->setCalID( c ); KOListViewItem * item = getItemForEvent( incidence ); if ( item ) { ListItemVisitor v(item, mStartDate ); incidence->accept(v); } incidence = delSel.next(); } } QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); while ( cal ) { mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); if ( cal->isStandard ) mCalendar->setDefaultCalendar( cal->mCalNumber ); cal = calendars.next(); } mCalendar->setSyncEventsReadOnly(); mCalendar->reInitAlarmSettings(); } void KOListView::populateCalPopup() { mCalPopup->clear(); KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); while ( kkf ) { - mCalPopup->insertItem( kkf->mName, kkf->mCalNumber); + int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber); + mCalPopup->setItemEnabled( index, !kkf->isReadOnly ); kkf = KOPrefs::instance()->mCalendars.next(); } } void KOListView::updateList() { // qDebug(" KOListView::updateList() "); } void KOListView::clearList() { clear (); } void KOListView::addCat( ) { setCategories( false ); } void KOListView::setCat() { setCategories( true ); } void KOListView::setAlarm() { KOAlarmPrefs kap( this); if ( !kap.exec() ) return; QStringList itemList; QPtrList<KOListViewItem> sel ; QListViewItem *qitem = mListView->firstChild (); while ( qitem ) { if ( qitem->isSelected() ) { Incidence* inc = ((KOListViewItem *) qitem)->data(); if ( inc->typeID() != journalID ) { if ( inc->typeID() == todoID ) { if ( ((Todo*)inc)->hasDueDate() ) sel.append(((KOListViewItem *)qitem)); } else sel.append(((KOListViewItem *)qitem)); } } qitem = qitem->nextSibling(); } int count = 0; KOListViewItem * item, *temp; item = sel.first(); Incidence* inc; while ( item ) { inc = item->data(); ++count; if (kap.mAlarmButton->isChecked()) { if (inc->alarms().count() == 0) inc->newAlarm(); QPtrList<Alarm> alarms = inc->alarms(); Alarm *alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { alarm->setEnabled(true); int j = kap.mAlarmTimeEdit->value()* -60; if (kap.mAlarmIncrCombo->currentItem() == 1) j = j * 60; else if (kap.mAlarmIncrCombo->currentItem() == 2) j = j * (60 * 24); alarm->setStartOffset( j ); if (!kap.mAlarmProgram.isEmpty() && kap.mAlarmProgramButton->isOn()) { alarm->setProcedureAlarm(kap.mAlarmProgram); } else if (!kap.mAlarmSound.isEmpty() && kap.mAlarmSoundButton->isOn()) alarm->setAudioAlarm(kap.mAlarmSound); else alarm->setType(Alarm::Invalid); //alarm->setAudioAlarm("default"); // TODO: Deal with multiple alarms break; // For now, stop after the first alarm } } else { Alarm* alarm = inc->alarms().first(); if ( alarm ) { alarm->setEnabled(false); alarm->setType(Alarm::Invalid); } } ListItemVisitor v(item, mStartDate ); inc->accept(v); item = sel.next(); } topLevelWidget()->setCaption( i18n("Changed alarm for %1 items").arg( count ) ); qDebug("KO: Set alarm for %d items", count); calendar()->reInitAlarmSettings(); QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); } void KOListView::setCategories( bool removeOld ) { KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); csd->setColorEnabled(); if (! csd->exec()) { delete csd; return; } QStringList catList = csd->selectedCategories(); delete csd; // if ( catList.count() == 0 ) // return; //catList.sort(); QString categoriesStr = catList.join(","); int i; QStringList itemList; QPtrList<KOListViewItem> sel ; QListViewItem *qitem = mListView->firstChild (); while ( qitem ) { if ( qitem->isSelected() ) { sel.append(((KOListViewItem *)qitem)); } qitem = qitem->nextSibling(); } KOListViewItem * item, *temp; item = sel.first(); if( item ) { Incidence* inc = item->data() ; bool setSub = false; if( inc->typeID() == todoID && sel.count() == 1 && inc->relations().count() > 0 ) { int result = KMessageBox::warningYesNoCancel(this, i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), i18n("Todo has subtodos"), i18n("Yes"), i18n("No")); if (result == KMessageBox::Cancel) item = 0; if (result == KMessageBox::Yes) setSub = true; } while ( item ) { inc = item->data(); if ( removeOld ) { inc->setCategories( catList, setSub ); } else { inc->addCategories( catList, setSub ); } ListItemVisitor v(item, mStartDate ); inc->accept(v); item = sel.next(); } } QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); } void KOListView::beamSelected() { QPtrList<Incidence> delSel = getSelectedIncidences() ; int icount = delSel.count(); if ( icount ) { emit beamIncidenceList( delSel ); return; QString fn ; fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; QString mes; bool createbup = true; if ( createbup ) { QString description = "\n"; CalendarLocal* cal = new CalendarLocal(); cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); Incidence *incidence = delSel.first(); while ( incidence ) { Incidence *in = incidence->clone(); description += in->summary() + "\n"; cal->addIncidence( in ); incidence = delSel.next(); } FileStorage storage( cal, fn, new VCalFormat ); storage.save(); delete cal; mes = i18n("KO/Pi: Ready for beaming"); topLevelWidget()->setCaption(mes); #ifndef DESKTOP_VERSION Ir *ir = new Ir( this ); connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); ir->send( fn, description, "text/x-vCalendar" ); #endif } } } void KOListView::beamDone( Ir *ir ) { #ifndef DESKTOP_VERSION delete ir; #endif topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); } void KOListView::saveDescriptionToFile() { int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"), i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), i18n("Continue"), i18n("Cancel"), 0, 0, 1 ); if ( result != 0 ) { return; } QPtrList<Incidence> delSel = getSelectedIncidences() ; int icount = delSel.count(); if ( icount ) { QString fn = KOPrefs::instance()->mLastSaveFile; fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); if ( fn == "" ) return; QFileInfo info; info.setFile( fn ); QString mes; bool createbup = true; if ( info. exists() ) { mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, i18n("Overwrite!"), i18n("Cancel"), 0, 0, 1 ); if ( result != 0 ) { createbup = false; } } if ( createbup ) { QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); Incidence *incidence = delSel.first(); icount = 0; while ( incidence ) { if ( incidence->typeID() == journalID ) { text += "\n************************************\n"; if ( !incidence->summary().isEmpty() ) text += i18n("Journal: %1 from ").arg( incidence->summary() ) +incidence->dtStartDateStr( false ); else text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); if ( !incidence->location().isEmpty() ) text +="\n(" + i18n("Location: ") + incidence->location()+ ")"; text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); ++icount; } else { if ( !incidence->description().isEmpty() ) { text += "\n************************************\n"; if ( incidence->typeID() == todoID ) text += i18n("To-Do: "); text += incidence->summary(); if ( !incidence->location().isEmpty() ) text +="\n(" + i18n("Location: ") + incidence->location()+ ")"; if ( incidence->hasStartDate() ) text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); text += "\n" + i18n("Description: ") + "\n" + incidence->description(); ++icount; } } incidence = delSel.next(); } QFile file( fn ); if (!file.open( IO_WriteOnly ) ) { topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); return; } QTextStream ts( &file ); ts << text; file.close(); //qDebug("%s ", text.latin1()); mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); KOPrefs::instance()->mLastSaveFile = fn; topLevelWidget()->setCaption(mes); } } } void KOListView::saveToFileVCS() { writeToFile( false ); } void KOListView::saveToFile() { writeToFile( true ); } QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos ) { QPtrList<Incidence> delSel ; bool addSubTodos = false; bool askSubTodos = true; QListViewItem *item = mListView->firstChild (); while ( item ) { if ( item->isSelected() ) { Incidence* inc = ((KOListViewItem *)item)->data(); if ( ( addSubTodos && delSel.findRef( inc ) == -1) || !addSubTodos ) { if ( (inc->typeID() == todoID && includeTodos) || (inc->typeID() == eventID && includeEvents) || (inc->typeID() == journalID && includeJournals) ) { if ( inc->typeID() == todoID && onlyDueTodos ) { if ( ((Todo*)inc)->hasDueDate() ) delSel.append( inc ); } else delSel.append( inc ); } } if ( inc->typeID() == todoID ) { Todo * todo = (Todo*) inc; if ( todo->relations().count() ) { if ( askSubTodos ) { int result = KMessageBox::warningYesNoCancel(this, i18n("One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?"), i18n("Todo has subtodos"), i18n("Yes"), i18n("No")); if ( result == KMessageBox::Cancel ) { delSel.clear(); return delSel; } if (result == KMessageBox::Yes) addSubTodos = true; askSubTodos = false; } if ( addSubTodos ) { inc->addRelationsToList( &delSel ); } } } } item = item->nextSibling(); } return delSel; } void KOListView::writeToFile( bool iCal ) { QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; if ( !iCal ) { bool journal = false; Incidence *incidence = delSel.first(); while ( incidence ) { if ( incidence->typeID() == journalID ) { journal = true; break; } incidence = delSel.next(); } if ( journal ) { int result = KMessageBox::warningContinueCancel(this, i18n("The journal entries can not be\nexported to a vCalendar file."), i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), true); if (result != KMessageBox::Continue) return; } } if ( delSel.count() ) { QString fn = KOPrefs::instance()->mLastSaveFile; QString extension; if ( iCal ) { if ( fn.right( 4 ).lower() == ".vcs" ) { fn = fn.left( fn.length() -3) + "ics"; } } else { if ( fn.right( 4 ).lower() == ".ics" ) { fn = fn.left( fn.length() -3) + "vcs"; } } fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); if ( fn == "" ) return; QFileInfo info; info.setFile( fn ); QString mes; bool createbup = true; if ( info. exists() ) { mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, i18n("Overwrite!"), i18n("Cancel"), 0, 0, 1 ); if ( result != 0 ) { createbup = false; } } if ( createbup ) { CalendarLocal cal; cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); Incidence *incidence = delSel.first(); while ( incidence ) { cal.addIncidence( incidence->clone() ); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 873a776..8d354c8 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -220,782 +220,782 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) #ifndef KORG_NODND // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && !QTextDrag::canDecode( e ) ) { e->ignore(); return; } e->accept(); #endif } void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) { #ifndef KORG_NODND // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; setCurrentItem(mOldCurrent); setSelected(mOldCurrent,true); #endif } void KOTodoListView::contentsDropEvent(QDropEvent *e) { #ifndef KORG_NODND // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && !QTextDrag::canDecode( e ) ) { e->ignore(); return; } DndFactory factory( mCalendar ); Todo *todo = factory.createDropTodo(e); if (todo) { e->acceptAction(); KOTodoViewItem *destination = (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); Todo *destinationEvent = 0; if (destination) destinationEvent = destination->todo(); Todo *existingTodo = mCalendar->todo(todo->uid()); if(existingTodo) { Incidence *to = destinationEvent; while(to) { if (to->uid() == todo->uid()) { KMessageBox::sorry(this, i18n("Cannot move Todo to itself\nor a child of itself"), i18n("Drop Todo")); delete todo; return; } to = to->relatedTo(); } internalDrop = true; if ( destinationEvent ) reparentTodoSignal( destinationEvent, existingTodo ); else unparentTodoSignal(existingTodo); delete todo; } else { mCalendar->addTodo(todo); emit todoDropped(todo, KOGlobals::EVENTADDED); if ( destinationEvent ) reparentTodoSignal( destinationEvent, todo ); } } else { QString text; if (QTextDrag::decode(e,text)) { //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); qDebug("Dropped : " + text); QStringList emails = QStringList::split(",",text); for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { int pos = (*it).find("<"); QString name = (*it).left(pos); QString email = (*it).mid(pos); if (!email.isEmpty() && todoi) { todoi->todo()->addAttendee(new Attendee(name,email)); } } } else { qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); e->ignore(); } } #endif } void KOTodoListView::wheelEvent (QWheelEvent *e) { QListView::wheelEvent (e); } void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) { QPoint p(contentsToViewport(e->pos())); QListViewItem *i = itemAt(p); bool rootClicked = true; if (i) { // if the user clicked into the root decoration of the item, don't // try to start a drag! int X = p.x(); //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); if (X > header()->sectionPos(0) + treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin() +i->height()|| X < header()->sectionPos(0)) { rootClicked = false; } } else { rootClicked = false; } #ifndef KORG_NODND mMousePressed = false; if (! rootClicked && !( e->button() == RightButton) ) { mPressPos = e->pos(); mMousePressed = true; } else { mMousePressed = false; } #endif //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); #ifndef DESKTOP_VERSION if (!( e->button() == RightButton && rootClicked) ) QListView::contentsMousePressEvent(e); #else QListView::contentsMousePressEvent(e); #endif } void KOTodoListView::paintEvent(QPaintEvent* e) { emit paintNeeded(); QListView::paintEvent( e); } void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) { #ifndef KORG_NODND //QListView::contentsMouseMoveEvent(e); if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > QApplication::startDragDistance()*3) { mMousePressed = false; QListViewItem *item = itemAt(contentsToViewport(mPressPos)); if (item) { DndFactory factory( mCalendar ); ICalDrag *vd = factory.createDrag( ((KOTodoViewItem *)item)->todo(),viewport()); internalDrop = false; // we cannot do any senseful here, because the DnD is still broken in Qt if (vd->drag()) { if ( !internalDrop ) { //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); qDebug("Dnd: External move: Delete drag source "); } else qDebug("Dnd: Internal move "); } else { if ( !internalDrop ) { qDebug("Dnd: External Copy"); } else qDebug("DnD: Internal copy: Copy pending"); } } } #endif } void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) { if ( !e->isAutoRepeat() ) { mFlagKeyPressed = false; } } void KOTodoListView::keyPressEvent ( QKeyEvent * e ) { qApp->processEvents(); if ( e->isAutoRepeat() && !mFlagKeyPressed ) { e->ignore(); // qDebug(" ignore %d",e->isAutoRepeat() ); return; } if (! e->isAutoRepeat() ) mFlagKeyPressed = true; QListViewItem* cn; if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { cn = currentItem(); if ( cn ) { KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); if ( ci ){ if ( e->state() == ShiftButton ) ci->setOn( false ); else ci->setOn( true ); cn = cn->itemBelow(); if ( cn ) { setCurrentItem ( cn ); ensureItemVisible ( cn ); } } } return; } if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { switch ( e->key() ) { case Qt::Key_Down: case Qt::Key_Up: QListView::keyPressEvent ( e ); break; case Qt::Key_Left: case Qt::Key_Right: QListView::keyPressEvent ( e ); e->accept(); return; break; default: e->ignore(); break; } return; } e->ignore(); } void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) { QListView::contentsMouseReleaseEvent(e); mMousePressed = false; } void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) { if (!e) return; QPoint vp = contentsToViewport(e->pos()); QListViewItem *item = itemAt(vp); emit double_Clicked(item); if (!item) return; emit doubleClicked(item,vp,0); } ///////////////////////////////////////////////////////////////////////////// KOQuickTodo::KOQuickTodo(QWidget *parent) : QLineEdit(parent) { setText(i18n("Click to add a new Todo")); } void KOQuickTodo::focusInEvent(QFocusEvent *ev) { if ( text()==i18n("Click to add a new Todo") ) setText(""); QLineEdit::focusInEvent(ev); } void KOQuickTodo::focusOutEvent(QFocusEvent *ev) { setText(i18n("Click to add a new Todo")); QLineEdit::focusOutEvent(ev); } ///////////////////////////////////////////////////////////////////////////// KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : KOrg::BaseView(calendar,parent,name) { mCategoryPopupMenu = 0; mPendingUpdateBeforeRepaint = false; isFlatDisplay = false; mNavigator = 0; QBoxLayout *topLayout = new QVBoxLayout(this); mName = QString ( name ); mBlockUpdate = false; mQuickAdd = new KOQuickTodo(this); topLayout->addWidget(mQuickAdd); if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); mTodoListView = new KOTodoListView(calendar,this, name ); topLayout->addWidget(mTodoListView); //mTodoListView->header()->setMaximumHeight(30); mTodoListView->setRootIsDecorated(true); mTodoListView->setAllColumnsShowFocus(true); mTodoListView->setShowSortIndicator(true); mTodoListView->addColumn(i18n("Todo")); mTodoListView->addColumn(i18n("Prio")); mTodoListView->setColumnAlignment(1,AlignHCenter); mTodoListView->addColumn(i18n("Complete")); mTodoListView->setColumnAlignment(2,AlignCenter); mTodoListView->addColumn(i18n("Due Date")); mTodoListView->setColumnAlignment(3,AlignLeft); mTodoListView->addColumn(i18n("Due Time")); mTodoListView->setColumnAlignment(4,AlignHCenter); mTodoListView->addColumn(i18n("Start Date")); mTodoListView->setColumnAlignment(5,AlignLeft); mTodoListView->addColumn(i18n("Start Time")); mTodoListView->setColumnAlignment(6,AlignHCenter); mTodoListView->addColumn(i18n("Cancelled")); mTodoListView->addColumn(i18n("Categories")); mTodoListView->addColumn(i18n("Calendar")); #if 0 mTodoListView->addColumn(i18n("Sort Id")); mTodoListView->setColumnAlignment(4,AlignHCenter); #endif mTodoListView->setMinimumHeight( 60 ); mTodoListView->setItemsRenameable( true ); mTodoListView->setRenameable( 0 ); mTodoListView->setColumnWidth( 0, 120 ); int iii = 0; for ( iii = 0; iii< 10 ; ++iii ) mTodoListView->setColumnWidthMode( iii, QListView::Manual ); mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); mPriorityPopupMenu = new QPopupMenu(this); for (int i = 1; i <= 5; i++) { QString label = QString ("%1").arg (i); mPriority[mPriorityPopupMenu->insertItem (label)] = i; } connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); mPercentageCompletedPopupMenu = new QPopupMenu(this); for (int i = 0; i <= 100; i+=20) { QString label = QString ("%1 %").arg (i); mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; } connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); mItemPopupMenu = new QPopupMenu(this); mItemPopupMenu->insertItem(i18n("Show..."), this, SLOT (showTodo())); mItemPopupMenu->insertItem(i18n("Edit..."), this, SLOT (editTodo())); mItemPopupMenu->insertItem( i18n("Delete"), this, SLOT (deleteTodo())); mItemPopupMenu->insertItem( i18n("Clone..."), this, SLOT (cloneTodo())); mItemPopupMenu->insertItem( i18n("Move..."), this, SLOT (moveTodo())); #ifndef DESKTOP_VERSION mItemPopupMenu->insertItem( i18n("Beam..."), this, SLOT (beamTodo())); #endif mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, SLOT (cancelTodo())); mItemPopupMenu->insertSeparator(); mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, SLOT (toggleRunningItem())); mItemPopupMenu->insertSeparator(); /* mItemPopupMenu->insertItem( i18n("New Todo..."), this, SLOT (newTodo())); */ mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, SLOT (newSubTodo())); mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, SLOT (unparentTodo()),0,21); mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, SLOT (reparentTodo()),0,22); mItemPopupMenu->insertSeparator(); #if 0 - mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), + mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed..."), this, SLOT( purgeCompleted() ) ); mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), this, SLOT( toggleCompleted() ),0, 33 ); mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), this, SLOT( toggleQuickTodo() ),0, 34 ); mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), this, SLOT( toggleRunning() ),0, 35 ); #endif mPopupMenu = new QPopupMenu(this); mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, SLOT (newTodo()),0,1); - mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), + mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."), this, SLOT(purgeCompleted()),0,2); mPopupMenu->insertItem(i18n("Show Completed"), this, SLOT( toggleCompleted() ),0,3 ); mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), this, SLOT( toggleRunning() ),0,5 ); mPopupMenu->insertItem(i18n(" set all open","Display all opened"), this, SLOT( setAllOpen() ),0,6 ); mPopupMenu->insertItem(i18n(" set all close","Display all closed"), this, SLOT( setAllClose() ),0,7 ); mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), this, SLOT( setAllFlat() ),0,8 ); mPopupMenu->insertSeparator(); mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), this, SLOT( toggleQuickTodo() ),0,4 ); mDocPrefs = new DocPrefs( name ); mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); mPopupMenu->setCheckable( true ); mItemPopupMenu->setCheckable( true ); mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); // Double clicking conflicts with opening/closing the subtree connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), SLOT( editItem( QListViewItem *) ) ); /* connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, const QPoint &,int ) ), SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); */ connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, const QPoint &,int ) ), SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), SLOT( itemClicked( QListViewItem * ) ) ); connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), SLOT( itemDoubleClicked( QListViewItem * ) ) ); connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), SLOT( updateView() ) ); connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), SLOT( todoModified(Todo *, int) ) ); connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), SLOT( itemStateChanged( QListViewItem * ) ) ); connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), SLOT( itemStateChanged( QListViewItem * ) ) ); connect( mTodoListView, SIGNAL( paintNeeded() ), SLOT( paintNeeded()) ); #if 0 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), SLOT(selectionChanged(QListViewItem *))); connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), SLOT(selectionChanged(QListViewItem *))); connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), SLOT(selectionChanged(QListViewItem *))); #endif connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); connect( mTodoListView, SIGNAL(selectionChanged() ), SLOT( processSelectionChange() ) ); connect( mQuickAdd, SIGNAL( returnPressed () ), SLOT( addQuickTodo() ) ); } KOTodoView::~KOTodoView() { #if QT_VERSION >= 0x030000 #else delete mKOTodoViewWhatsThis; #endif delete mDocPrefs; } QString KOTodoView::getWhatsThisText(QPoint p) { KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); if ( item ) return KIncidenceFormatter::instance()->getFormattedText( item->todo(), KOPrefs::instance()->mWTshowDetails, KOPrefs::instance()->mWTshowCreated, KOPrefs::instance()->mWTshowChanged); return i18n("That is the todo view" ); } void KOTodoView::jumpToDate () { // if (mActiveItem) { // mActiveItem->todo()); // if ( mActiveItem->todo()->hasDueDate() ) // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); } void KOTodoView::paintNeeded() { if ( mPendingUpdateBeforeRepaint ) { updateView(); mPendingUpdateBeforeRepaint = false; } } void KOTodoView::paintEvent(QPaintEvent * pevent) { if ( mPendingUpdateBeforeRepaint ) { updateView(); mPendingUpdateBeforeRepaint = false; } KOrg::BaseView::paintEvent( pevent); } void KOTodoView::updateView() { pendingSubtodo = 0; if ( mBlockUpdate ) { return; } if ( !isVisible() ) { mPendingUpdateBeforeRepaint = true; return; } storeCurrentItem(); //qDebug("KOTodoView::updateView() %x", this); if ( isFlatDisplay ) { displayAllFlat(); resetCurrentItem(); return; } //qDebug("update "); // kdDebug() << "KOTodoView::updateView()" << endl; QFont fo = KOPrefs::instance()->mTodoViewFont; mTodoListView->clear(); if ( mName == "todolistsmall" ) { if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { int ps = fo.pointSize() -2; if ( ps > 12 ) ps -= 2; fo.setPointSize( ps ); } } mTodoListView->setFont( fo ); // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); //mTodoListView->header()->setMaximumHeight(fm.height()); QPtrList<Todo> todoList = calendar()->todos(); /* kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; Event *t; for(t = todoList.first(); t; t = todoList.next()) { kdDebug() << " " << t->getSummary() << endl; if (t->getRelatedTo()) { kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; } QPtrList<Event> l = t->getRelations(); Event *c; for(c=l.first();c;c=l.next()) { kdDebug() << " - relation: " << c->getSummary() << endl; } } */ // Put for each Event a KOTodoViewItem in the list view. Don't rely on a // specific order of events. That means that we have to generate parent items // recursively for proper hierarchical display of Todos. mTodoMap.clear(); Todo *todo; todo = todoList.first();// todo; todo = todoList.next()) { while ( todo ) { bool next = true; // qDebug("todo %s ", todo->summary().latin1()); Incidence *incidence = todo->relatedTo(); while ( incidence ) { if ( incidence->typeID() == todoID ) { //qDebug("related %s ",incidence->summary().latin1() ); if ( !(todoList.contains ( ((Todo* )incidence ) ) ) && incidence->calEnabled() ) { //qDebug("related not found "); todoList.remove( ); todo = todoList.current(); next = false; incidence = 0; } else { //qDebug("related found "); incidence = incidence->relatedTo(); } } else incidence = 0; } if ( next ) todo = todoList.next(); } for(todo = todoList.first(); todo; todo = todoList.next()) { if (!mTodoMap.contains(todo) && checkTodo( todo ) ) { insertTodoItem(todo); } } // Restore opened/closed state mTodoListView->blockSignals( true ); if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); mTodoListView->blockSignals( false ); resetCurrentItem(); processSelectionChange(); } void KOTodoView::storeCurrentItem() { mCurItem = 0; mCurItemRootParent = 0; mCurItemParent = 0; mCurItemAbove = 0; mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); if (mActiveItem) { mCurItem = mActiveItem->todo(); KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); if ( activeItemAbove ) mCurItemAbove = activeItemAbove->todo(); mCurItemRootParent = mCurItem; mCurItemParent = mCurItemRootParent->relatedTo(); while ( mCurItemRootParent->relatedTo() != 0 ) mCurItemRootParent = mCurItemRootParent->relatedTo(); } mActiveItem = 0; } void KOTodoView::resetCurrentItem() { mTodoListView->setFocus(); KOTodoViewItem* foundItem = 0; KOTodoViewItem* foundItemRoot = 0; KOTodoViewItem* foundItemParent = 0; KOTodoViewItem* foundItemAbove = 0; if ( mTodoListView->firstChild () ) { if ( mCurItem ) { KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); while ( item ) { if ( item->todo() == mCurItem ) { foundItem = item; break; } else if ( item->todo() == mCurItemAbove ) { foundItemAbove = item; } if ( item->todo() == mCurItemRootParent ) { foundItemRoot = item; } if ( item->todo() == mCurItemParent ) { foundItemParent = item; } item = (KOTodoViewItem*)item->itemBelow(); } if ( ! foundItem ) { if ( foundItemParent ) { foundItem = foundItemParent; } else { if ( foundItemRoot ) foundItem = foundItemRoot; else foundItem = foundItemAbove; } } } if ( foundItem ) { mTodoListView->setCurrentItem( foundItem ); mTodoListView->ensureItemVisible( foundItem ); } else { mTodoListView->setCurrentItem( mTodoListView->firstChild () ); } } mTodoListView->setFocus(); } //Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; bool KOTodoView::checkTodo( Todo * todo ) { if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) return false; if ( !todo->isCompleted() ) { if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) return true; } if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { if ( todo->hasStartDate() ) if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) return false; if ( todo->hasDueDate() ) if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) return false; } return true; } void KOTodoView::restoreItemState( QListViewItem *item ) { pendingSubtodo = 0; while( item ) { KOTodoViewItem *todoItem = (KOTodoViewItem *)item; todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); item = item->nextSibling(); } } QMap<Todo *,KOTodoViewItem *>::ConstIterator KOTodoView::insertTodoItem(Todo *todo) { // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; // TODO: Check, if dynmaic cast is necessary pendingSubtodo = 0; Incidence *incidence = todo->relatedTo(); while ( incidence && !incidence->calEnabled() ) incidence = incidence->relatedTo(); if (incidence && incidence->typeID() == todoID ) { Todo *relatedTodo = static_cast<Todo *>(incidence); // kdDebug() << " has Related" << endl; QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; itemIterator = mTodoMap.find(relatedTodo); if (itemIterator == mTodoMap.end()) { // kdDebug() << " related not yet in list" << endl; itemIterator = insertTodoItem (relatedTodo); } // isn't this pretty stupid? We give one Todo to the KOTodoViewItem // and one into the map. Sure finding is more easy but why? -zecke KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); return mTodoMap.insert(todo,todoItem); } else { // kdDebug() << " no Related" << endl; // see above -zecke KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); return mTodoMap.insert(todo,todoItem); } } void KOTodoView::updateConfig() { updateView(); mTodoListView->repaintContents(); } QPtrList<Incidence> KOTodoView::selectedIncidences() { QPtrList<Incidence> selected; KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); // if (!item) item = mActiveItem; if (item) selected.append(item->todo()); return selected; } QPtrList<Todo> KOTodoView::selectedTodos() { QPtrList<Todo> selected; KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); // if (!item) item = mActiveItem; if (item) selected.append(item->todo()); return selected; } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 23537a6..a5d8824 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -273,2301 +273,2328 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : else tbd = Left; } navigatorToolBar = new QPEToolBar( this ); addToolBar (navigatorToolBar , tbd ); } mCalendarModifiedFlag = false; QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); splash->setAlignment ( AlignCenter ); setCentralWidget( splash ); #ifndef DESKTOP_VERSION showMaximized(); #endif //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); setDefaultPreferences(); mCalendar = new CalendarLocal(); mView = new CalendarView( mCalendar, this,"mCalendar " ); mView->hide(); //mView->resize(splash->size() ); initActions(); mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); mSyncManager->setBlockSave(false); mView->setSyncManager(mSyncManager); #ifndef DESKTOP_VERSION iconToolBar->show(); qApp->processEvents(); #endif //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); int vh = height() ; int vw = width(); //qDebug("Toolbar hei %d ",iconToolBar->height() ); if ( iconToolBar->orientation () == Qt:: Horizontal ) { vh -= iconToolBar->height(); } else { vw -= iconToolBar->height(); } //mView->setMaximumSize( splash->size() ); //mView->resize( splash->size() ); //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); mView->readSettings(); bool newFile = false; if( !QFile::exists( defaultFileName() ) ) { QFileInfo finfo ( defaultFileName() ); QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); 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"; finfo.setFile( oldFile ); if (finfo.exists() ) { KMessageBox::information( this, message); mView->openCalendar( oldFile ); qApp->processEvents(); } else { oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); finfo.setFile( oldFile ); if (finfo.exists() ) { KMessageBox::information( this, message); mView->openCalendar( oldFile ); qApp->processEvents(); } } mView->saveCalendar( defaultFileName() ); newFile = true; } QTime neededSaveTime = QDateTime::currentDateTime().time(); mView->loadCalendars(); int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); qDebug("KO: Calendar loading time: %d ms",msNeeded ); if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { KOPrefs::instance()->setAllDefaults(); int count = mView->addCategories(); } processIncidenceSelection( 0 ); connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), SLOT( processIncidenceSelection( Incidence * ) ) ); connect( mView, SIGNAL( modifiedChanged( bool ) ), SLOT( slotModifiedChanged( bool ) ) ); connect( mView, SIGNAL( tempDisableBR(bool) ), SLOT( disableBR(bool) ) ); connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); mView->setModified( false ); mBlockAtStartup = false; mView->setModified( false ); setCentralWidget( mView ); globalFlagBlockStartup = 0; mView->show(); delete splash; if ( newFile ) mView->updateConfig(); // qApp->processEvents(); //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); //fillSyncMenu(); connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); mSyncManager->setDefaultFileName( sentSyncFile()); connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); mSyncManager->fillSyncMenu(); mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); if ( showWarning ) { KMessageBox::information( this, "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"); qApp->processEvents(); mView->dialogManager()->showSyncOptions(); } //US listen for result adressed from Ka/Pi #ifndef DESKTOP_VERSION connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); #endif #ifndef DESKTOP_VERSION infrared = 0; #endif updateFilterToolbar(); updateWeek( mView->startDate() ); connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), SLOT( updateWeekNum( const KCal::DateList & ) ) ); mBRdisabled = false; //toggleBeamReceive(); int tiint= 3000; #ifndef DESKTOP_VERSION tiint = 5000; #endif QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() )); } MainWindow::~MainWindow() { //qDebug("MainWindow::~MainWindow() "); //save toolbar location delete mCalendar; delete mSyncManager; #ifndef DESKTOP_VERSION if ( infrared ) delete infrared; #endif } void MainWindow::disableBR(bool b) { #ifndef DESKTOP_VERSION if ( b ) { if ( infrared ) { toggleBeamReceive(); mBRdisabled = true; } mBRdisabled = true; } else { if ( mBRdisabled ) { mBRdisabled = false; //makes no sense,because other cal ap is probably running // toggleBeamReceive(); } } #endif } bool MainWindow::beamReceiveEnabled() { #ifndef DESKTOP_VERSION return ( infrared != 0 ); #endif return false; } void MainWindow::toggleBeamReceive() { if ( mBRdisabled ) return; #ifndef DESKTOP_VERSION if ( infrared ) { qDebug("KO: Disable BeamReceive "); delete infrared; infrared = 0; brAction->setOn(false); return; } qDebug("KO: Enable BeamReceive "); brAction->setOn(true); infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); #endif } void MainWindow::showMaximized () { #ifndef DESKTOP_VERSION if ( ! globalFlagBlockStartup ) if ( mClosed ) mView->goToday(); #endif QWidget::showMaximized () ; mClosed = false; } void MainWindow::closeEvent( QCloseEvent* ce ) { if ( ! KOPrefs::instance()->mAskForQuit ) { saveOnClose(); mClosed = true; ce->accept(); return; } switch( QMessageBox::information( this, "KO/Pi", i18n("Do you really want\nto close KO/Pi?"), i18n("Close"), i18n("No"), 0, 0 ) ) { case 0: saveOnClose(); mClosed = true; ce->accept(); break; case 1: ce->ignore(); break; case 2: default: break; } } void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) { QDataStream stream( data, IO_ReadOnly ); // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); //QString datamess; //qDebug("message "); qDebug("KO: QCOP message received: %s ", cmsg.data() ); if ( cmsg == "setDocument(QString)" ) { QDataStream stream( data, IO_ReadOnly ); QString fileName; stream >> fileName; //qDebug("filename %s ", fileName.latin1()); showMaximized(); raise(); KOPrefs::instance()->mLastSyncedLocalFile = fileName ; mSyncManager->slotSyncMenu( 1002 ); return; } if ( cmsg == "-writeFile" ) { // I made from the "-writeFile" an "-writeAlarm" mView->viewManager()->showWhatsNextView(); mCalendar->checkAlarmForIncidence( 0, true); showMaximized(); raise(); return; } if ( cmsg == "-writeFileSilent" ) { // I made from the "-writeFile" an "-writeAlarm" // mView->viewManager()->showWhatsNextView(); mCalendar->checkAlarmForIncidence( 0, true); //showMaximized(); //raise(); hide(); return; } if ( cmsg == "-newCountdown" ) { qDebug("newCountdown "); } QString msg ; QString allmsg = cmsg; while ( allmsg.length() > 0 ) { int nextC = allmsg.find( "-", 1 ); if ( nextC == -1 ) { msg = allmsg; allmsg = ""; } else{ msg = allmsg.left( nextC ); allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); } //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); if ( msg == "-newEvent" ) { QTimer::singleShot( 0, mView, SLOT ( newEvent())); } if ( msg == "-newTodo" ) { QTimer::singleShot( 0, mView, SLOT ( newTodo())); } if ( msg == "-showWN" ) { mView->viewManager()->showWhatsNextView(); } if ( msg == "-showTodo" ) { mView->viewManager()->showTodoView(); } if ( msg == "-showList" ) { mView->viewManager()->showListView(); } else if ( msg == "-showDay" ) { mView->viewManager()->showDayView(); } else if ( msg == "-showWWeek" ) { mView->viewManager()->showWorkWeekView(); } else if ( msg == "-ringSync" ) { QTimer::singleShot( 0, this, SLOT (startMultiSync())); } else if ( msg == "-showWeek" ) { mView->viewManager()->showWeekView(); } else if ( msg == "-showTodo" ) { mView->viewManager()->showTodoView(); } else if ( msg == "-showJournal" ) { mView->dateNavigator()->selectDates( 1 ); mView->dateNavigator()->selectToday(); mView->viewManager()->showJournalView(); } else if ( msg == "-showKO" ) { mView->viewManager()->showNextXView(); } else if ( msg == "-showWNext" ) { mView->viewManager()->showWhatsNextView(); } else if ( msg == "nextView()" ) { mView->viewManager()->showNextView(); } else if ( msg == "-showNextXView" ) { mView->viewManager()->showNextXView(); } } showMaximized(); raise(); } void MainWindow::startMultiSync() { QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), question, i18n("Yes"), i18n("No"), 0, 0 ) != 0 ) { setCaption(i18n("Aborted! Nothing synced!")); return; } mSyncManager->multiSync( false ); #ifndef DESKTOP_VERSION QCopEnvelope e("QPE/Application/kapi", "doRingSync"); #endif } QPixmap MainWindow::loadPixmap( QString name ) { return SmallIcon( name ); } void MainWindow::setUsesBigPixmaps ( bool b ) { qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); if ( b ) qDebug("KO: BigPixmaps are not supported "); } void MainWindow::initActions() { //KOPrefs::instance()->mShowFullMenu iconToolBar->clear(); KOPrefs *p = KOPrefs::instance(); //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); QPopupMenu *viewMenu = new QPopupMenu( this ); QPopupMenu *actionMenu = new QPopupMenu( this ); +#ifdef DESKTOP_VERSION + mCurrentItemMenu = actionMenu; +#else + mCurrentItemMenu = new QPopupMenu ( this ); +#endif QPopupMenu *importMenu = new QPopupMenu( this ); QPopupMenu *importMenu_X = new QPopupMenu( this ); QPopupMenu *exportMenu_X = new QPopupMenu( this ); QPopupMenu *beamMenu_X = new QPopupMenu( this ); selectFilterMenu = new QPopupMenu( this ); selectFilterMenu->setCheckable( true ); syncMenu = new QPopupMenu( this ); configureAgendaMenu = new QPopupMenu( this ); configureToolBarMenu = new QPopupMenu( this ); QPopupMenu *helpMenu = new QPopupMenu( this ); QIconSet icon; int pixWid = 22, pixHei = 22; QString pathString = ""; if ( !p->mToolBarMiniIcons ) { if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { pathString += "icons16/"; pixWid = 18; pixHei = 16; } } else { pathString += "iconsmini/"; pixWid = 18; pixHei = 16; } if ( KOPrefs::instance()->mShowFullMenu ) { QMenuBar *menuBar1; menuBar1 = menuBar(); menuBar1->insertItem( i18n("File"), importMenu ); menuBar1->insertItem( i18n("View"), viewMenu ); menuBar1->insertItem( i18n("Actions"), actionMenu ); #ifdef DESKTOP_VERSION menuBar1->insertItem( i18n("Synchronize"), syncMenu ); menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); #else menuBar1->insertItem( i18n("Sync"), syncMenu ); menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); #endif //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); menuBar1->insertItem( i18n("Help"), helpMenu ); } else { QPEMenuBar *menuBar1; menuBar1 = new QPEMenuBar( iconToolBar ); QPopupMenu *menuBar = new QPopupMenu( this ); icon = loadPixmap( pathString + "z_menu" ); menuBar1->insertItem( icon.pixmap(), menuBar); //menuBar1->insertItem( i18n("ME"), menuBar); menuBar->insertItem( i18n("File"), importMenu ); menuBar->insertItem( i18n("View"), viewMenu ); menuBar->insertItem( i18n("Actions"), actionMenu ); menuBar->insertItem( i18n("Synchronize"), syncMenu ); menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); menuBar->insertItem( i18n("Filter"),selectFilterMenu ); menuBar->insertItem( i18n("Help"), helpMenu ); //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); menuBar1->setMaximumSize( menuBar1->sizeHint( )); } connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); mWeekBgColor = iconToolBar->backgroundColor(); mWeekPixmap.resize( pixWid , pixHei ); mWeekPixmap.fill( mWeekBgColor ); icon = mWeekPixmap; mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); if ( p-> mShowIconWeekNum ) mWeekAction->addTo( iconToolBar ); mWeekFont = font(); int fontPoint = mWeekFont.pointSize(); QFontMetrics f( mWeekFont ); int fontWid = f.width( "30" ); while ( fontWid > pixWid ) { --fontPoint; mWeekFont.setPointSize( fontPoint ); QFontMetrics f( mWeekFont ); fontWid = f.width( "30" ); //qDebug("dec-- "); } connect( mWeekAction, SIGNAL( activated() ), this, SLOT( weekAction() ) ); connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); if ( p->mShowIconFilterview ) { icon = loadPixmap( pathString + "filter" ); actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); connect( actionFilterMenuTB, SIGNAL( activated() ), this, SLOT( fillFilterMenuTB() ) ); actionFilterMenuTB->addTo( iconToolBar ); selectFilterMenuTB = new QPopupMenu( this ); selectFilterMenuTB->setCheckable( true ); connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); } //#endif // ****************** QAction *action; // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); configureToolBarMenu->setCheckable( true ); configureAgendaMenu->setCheckable( true ); int iii ; for ( iii = 1;iii<= 10 ;++iii ){ configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); } //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); connect( configureAgendaMenu, SIGNAL( aboutToShow()), this, SLOT( showConfigureAgenda( ) ) ); + icon = loadPixmap( pathString + "today" ); + QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); + today_action->addTo( actionMenu ); + connect( today_action, SIGNAL( activated() ), + mView, SLOT( goToday() ) ); + + icon = loadPixmap( pathString + "picker" ); + QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); + dPickerAction->addTo( actionMenu ); + connect( dPickerAction, SIGNAL( activated() ), + mView, SLOT( showDatePicker() ) ); + + icon = loadPixmap( pathString + "search" ); + QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); + search_action->addTo( actionMenu ); + connect( search_action, SIGNAL( activated() ), + mView->dialogManager(), SLOT( showSearchDialog() ) ); - icon = loadPixmap( pathString + "configure" ); - action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); - action->addTo( actionMenu ); - connect( action, SIGNAL( activated() ), - mView, SLOT( edit_options() ) ); - icon = loadPixmap( pathString + "configure" ); - action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); - action->addTo( actionMenu ); - connect( action, SIGNAL( activated() ), - mView, SLOT( edit_global_options() ) ); actionMenu->insertSeparator(); + + action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); action->addTo( actionMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( undo_delete() ) ); - actionMenu->insertSeparator(); icon = loadPixmap( pathString + "newevent" ); configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); configureToolBarMenu->insertSeparator(); configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); configureToolBarMenu->insertSeparator(); configureToolBarMenu->insertItem(i18n("Week Number"), 400); configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); + +#ifndef DESKTOP_VERSION + actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); +#endif + mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); + mShowAction->addTo( mCurrentItemMenu ); + connect( mShowAction, SIGNAL( activated() ), + mView, SLOT( showIncidence() ) ); + + mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); + mEditAction->addTo( mCurrentItemMenu ); + connect( mEditAction, SIGNAL( activated() ), + mView, SLOT( editIncidence() ) ); + + mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); + mDeleteAction->addTo( mCurrentItemMenu ); + connect( mDeleteAction, SIGNAL( activated() ), + mView, SLOT( deleteIncidence() ) ); + + + mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); + mCloneAction->addTo( mCurrentItemMenu ); + connect( mCloneAction, SIGNAL( activated() ), + mView, SLOT( cloneIncidence() ) ); + mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); + mMoveAction->addTo( mCurrentItemMenu ); + connect( mMoveAction, SIGNAL( activated() ), + mView, SLOT( moveIncidence() ) ); + mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); + mBeamAction->addTo(mCurrentItemMenu ); + connect( mBeamAction, SIGNAL( activated() ), + mView, SLOT( beamIncidence() ) ); + mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); + mCancelAction->addTo( mCurrentItemMenu ); + connect( mCancelAction, SIGNAL( activated() ), + mView, SLOT( toggleCancelIncidence() ) ); +#ifdef DESKTOP_VERSION + actionMenu->insertSeparator(); +#endif + + QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); ne_action->addTo( actionMenu ); connect( ne_action, SIGNAL( activated() ), mView, SLOT( newEvent() ) ); icon = loadPixmap( pathString + "newtodo" ); configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); nt_action->addTo( actionMenu ); connect( nt_action, SIGNAL( activated() ), mView, SLOT( newTodo() ) ); - icon = loadPixmap( pathString + "today" ); - QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); - today_action->addTo( viewMenu ); - connect( today_action, SIGNAL( activated() ), - mView, SLOT( goToday() ) ); - viewMenu->insertSeparator(); + // *********************** if ( KOPrefs::instance()->mVerticalScreen ) { icon = SmallIcon( "1updownarrow" ); } else { icon = SmallIcon("1leftrightarrow" ); } configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); FSaction->addTo( viewMenu ); connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); icon = loadPixmap( pathString + "filter" ); configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); icon = loadPixmap( pathString + "configure" ); action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleFilter() ) ); mToggleFilter = action; icon = loadPixmap( pathString + "navi" ); configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleDateNavigatorWidget() ) ); mToggleNav = action ; icon = loadPixmap( pathString + "allday" ); configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleAllDaySize() ) ); mToggleAllday = action; connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), mToggleNav, SLOT( setEnabled ( bool ) ) ); //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), // mToggleFilter, SLOT( setEnabled ( bool ) ) ); connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), mToggleAllday, SLOT( setEnabled ( bool ) ) ); // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); - viewMenu->insertSeparator(); - icon = loadPixmap( pathString + "picker" ); - action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); - action->addTo( viewMenu ); - connect( action, SIGNAL( activated() ), - mView, SLOT( showDatePicker() ) ); - action->addTo( iconToolBar ); + + dPickerAction->addTo( iconToolBar ); viewMenu->insertSeparator(); if ( p-> mShowIconToggleFull ) FSaction->addTo( iconToolBar ); if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); //******************** if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); icon = loadPixmap( pathString + "whatsnext" ); configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); whatsnext_action->addTo( viewMenu ); connect( whatsnext_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showWhatsNextView() ) ); icon = loadPixmap( pathString + "xdays" ); configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); xdays_action->addTo( viewMenu ); connect( xdays_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showNextXView() ) ); icon = loadPixmap( pathString + "journal" ); configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); viewjournal_action->addTo( viewMenu ); connect( viewjournal_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showJournalView() ) ); icon = loadPixmap( pathString + "day" ); configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); day1_action->addTo( viewMenu ); // action->addTo( toolBar ); connect( day1_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showDayView() ) ); icon = loadPixmap( pathString + "workweek" ); configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); day5_action->addTo( viewMenu ); connect( day5_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showWorkWeekView() ) ); icon = loadPixmap( pathString + "week" ); configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); day7_action->addTo( viewMenu ); connect( day7_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showWeekView() ) ); icon = loadPixmap( pathString + "workweek2" ); configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); day6_action->addTo( viewMenu ); connect( day6_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showMonthViewWeek() ) ); icon = loadPixmap( pathString + "month" ); configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); month_action->addTo( viewMenu ); connect( month_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showMonthView() ) ); icon = loadPixmap( pathString + "list" ); configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); showlist_action->addTo( viewMenu ); connect( showlist_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showListView() ) ); icon = loadPixmap( pathString + "todo" ); configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); todoview_action->addTo( viewMenu ); connect( todoview_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showTodoView() ) ); #if 0 action = new QAction( "view_timespan", "Time Span", 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView->viewManager(), SLOT( showTimeSpanView() ) ); #endif mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, this ); mNewSubTodoAction->addTo( actionMenu ); connect( mNewSubTodoAction, SIGNAL( activated() ), mView, SLOT( newSubTodo() ) ); - actionMenu->insertSeparator(); - - mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); - mShowAction->addTo( actionMenu ); - connect( mShowAction, SIGNAL( activated() ), - mView, SLOT( showIncidence() ) ); + action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, + this ); + action->addTo( actionMenu ); + connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); - mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); - mEditAction->addTo( actionMenu ); - connect( mEditAction, SIGNAL( activated() ), - mView, SLOT( editIncidence() ) ); - mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); - mDeleteAction->addTo( actionMenu ); - connect( mDeleteAction, SIGNAL( activated() ), - mView, SLOT( deleteIncidence() ) ); + configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); - mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); - mCloneAction->addTo( actionMenu ); - connect( mCloneAction, SIGNAL( activated() ), - mView, SLOT( cloneIncidence() ) ); - mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); - mMoveAction->addTo( actionMenu ); - connect( mMoveAction, SIGNAL( activated() ), - mView, SLOT( moveIncidence() ) ); - mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); - mBeamAction->addTo( actionMenu ); - connect( mBeamAction, SIGNAL( activated() ), - mView, SLOT( beamIncidence() ) ); - mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); - mCancelAction->addTo( actionMenu ); - connect( mCancelAction, SIGNAL( activated() ), - mView, SLOT( toggleCancelIncidence() ) ); actionMenu->insertSeparator(); - - action = new QAction( "purge_completed", i18n("Purge Completed"), 0, + action = new QAction( "manage cat", i18n("Edit category list..."), 0, this ); action->addTo( actionMenu ); - connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); - - icon = loadPixmap( pathString + "search" ); - QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); - configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); - search_action->addTo( actionMenu ); - connect( search_action, SIGNAL( activated() ), - mView->dialogManager(), SLOT( showSearchDialog() ) ); + connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); + action = new QAction( "manage cat", i18n("Manage new categories..."), 0, + this ); + action->addTo( actionMenu ); + connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); - if ( KOPrefs::instance()->mShowFullMenu ) { actionMenu->insertSeparator(); + icon = loadPixmap( pathString + "configure" ); + action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); + action->addTo( actionMenu ); + connect( action, SIGNAL( activated() ), + mView, SLOT( edit_options() ) ); + icon = loadPixmap( pathString + "configure" ); + action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); + action->addTo( actionMenu ); + connect( action, SIGNAL( activated() ), + mView, SLOT( edit_global_options() ) ); + if ( KOPrefs::instance()->mShowFullMenu ) { actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); } // actionMenu->insertSeparator(); action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, this ); action->addTo( importMenu_X ); connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); action = new QAction( "import_quick", i18n("Import last file"), 0, this ); action->addTo( importMenu_X ); connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); importMenu_X->insertSeparator(); action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, this ); action->addTo( importMenu_X ); connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); //#ifndef DESKTOP_VERSION importMenu_X->insertSeparator(); action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, this ); action->addTo( importMenu_X ); connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); //#else #ifdef _OL_IMPORT_ importMenu_X->insertSeparator(); action = new QAction( "import_ol", i18n("Import from OL"), 0, this ); action->addTo( importMenu_X ); connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); #endif //#endif //importMenu->insertSeparator(); #if 0 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); #endif action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); importMenu->insertSeparator(); importMenu->insertItem( i18n("Import"), importMenu_X ); //importMenu->insertSeparator(); action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, this ); action->addTo( exportMenu_X ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); //LR QPopupMenu *ex2phone = new QPopupMenu( this ); ex2phone->insertItem(i18n("Complete calendar..."), 1 ); ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); importMenu->insertItem( i18n("Export"), exportMenu_X ); #ifndef DESKTOP_VERSION //importMenu->insertSeparator(); brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, this ); brAction->addTo( beamMenu_X ); brAction->setToggleAction (true ) ; connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); importMenu->insertItem( i18n("Beam"), beamMenu_X ); #else //importMenu->insertSeparator(); icon = loadPixmap( pathString + "print" ); action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), this, SLOT( printCal() ) ); icon = loadPixmap( pathString + "print" ); action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), this, SLOT( printSel() ) ); action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), mView->viewManager(), SLOT( slotprintWNV() ) ); icon = loadPixmap( pathString + "print" ); action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), this, SLOT( printListView() ) ); action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), mView, SLOT( slotprintSelInc() ) ); importMenu->insertItem( i18n("Print"), beamMenu_X ); #endif - importMenu->insertSeparator(); - action = new QAction( "manage cat", i18n("Manage new categories..."), 0, - this ); - action->addTo( importMenu ); - connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); + importMenu->insertSeparator(); action = new QAction( "beam all", i18n("Save"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); action = new QAction( "beam all", i18n("Exit (+save)"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); //menuBar->insertItem( "Configure",configureMenu ); //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); icon = loadPixmap( "korganizer/korganizer" ); action = new QAction( "Whats New", i18n("What's new?"), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( whatsNew() ) ); action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( features() ) ); action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( keyBindings() ) ); action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( storagehowto() ) ); action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( timetrackinghowto() ) ); action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( synchowto() ) ); action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( kdesynchowto() ) ); action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( multisynchowto() ) ); action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( aboutAutoSaving() ) ); action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( aboutKnownBugs() ) ); action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( usertrans() ) ); action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( faq() ) ); action = new QAction( "licence", i18n("Licence..."), 0, this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( licence() ) ); action = new QAction( "about", i18n("About..."), 0, this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( about() ) ); //menuBar->insertSeparator(); // ****************************************************** // menubar icons //menuBar->insertItem( iconToolBar ); //xdays_action if (p-> mShowIconNewEvent) ne_action->addTo( iconToolBar ); if (p->mShowIconNewTodo ) nt_action->addTo( iconToolBar ); if (p-> mShowIconSearch) search_action->addTo( iconToolBar ); if (p-> mShowIconWhatsThis) QWhatsThis::whatsThisButton ( iconToolBar ); if (p-> mShowIconNext) whatsnext_action->addTo( viewToolBar ); if (p-> mShowIconNextDays) xdays_action->addTo( viewToolBar ); if (p-> mShowIconJournal) viewjournal_action->addTo( viewToolBar ); if (p-> mShowIconDay1) day1_action->addTo( viewToolBar ); if (p-> mShowIconDay5) day5_action->addTo( viewToolBar ); if (p-> mShowIconDay7) day7_action->addTo( viewToolBar ); if (p-> mShowIconDay6) day6_action->addTo( viewToolBar ); if (p-> mShowIconMonth) month_action->addTo( viewToolBar ); if (p-> mShowIconList) showlist_action->addTo( viewToolBar ); if (p-> mShowIconTodoview) todoview_action->addTo( viewToolBar ); icon = loadPixmap( pathString + "2leftarrowB" ); configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); if (p-> mShowIconBackFast) { action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); connect( action, SIGNAL( activated() ), mView, SLOT( goPreviousMonth() ) ); action->addTo( navigatorToolBar ); } icon = loadPixmap( pathString + "1leftarrowB" ); configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); if (p-> mShowIconBack) { action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); connect( action, SIGNAL( activated() ), mView, SLOT( goPrevious() ) ); action->addTo( navigatorToolBar ); } icon = loadPixmap( pathString + "today" ); configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); if (p-> mShowIconToday) today_action->addTo( navigatorToolBar ); icon = loadPixmap( pathString + "1rightarrowB" ); configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); if (p-> mShowIconForward) { action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); connect( action, SIGNAL( activated() ), mView, SLOT( goNext() ) ); action->addTo( navigatorToolBar ); } icon = loadPixmap( pathString + "2rightarrowB" ); configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); if (p-> mShowIconForwardFast) { action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); connect( action, SIGNAL( activated() ), mView, SLOT( goNextMonth() ) ); action->addTo( navigatorToolBar ); } configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); if (p-> mShowIconNewEvent) configureToolBarMenu->setItemChecked( 10, true ); if (p->mShowIconNewTodo ) configureToolBarMenu->setItemChecked( 20, true ); if (p-> mShowIconSearch) configureToolBarMenu->setItemChecked( 120, true ); if (p-> mShowIconList) configureToolBarMenu->setItemChecked( 30, true ); if (p-> mShowIconDay1) configureToolBarMenu->setItemChecked( 40, true ); if (p-> mShowIconDay5) configureToolBarMenu->setItemChecked( 50, true ); if (p-> mShowIconDay6) configureToolBarMenu->setItemChecked( 75, true ); if (p-> mShowIconDay7) configureToolBarMenu->setItemChecked( 60, true ); if (p-> mShowIconMonth) configureToolBarMenu->setItemChecked( 70, true ); if (p-> mShowIconTodoview) configureToolBarMenu->setItemChecked( 80, true ); if (p-> mShowIconBackFast) configureToolBarMenu->setItemChecked( 200, true ); if (p-> mShowIconBack) configureToolBarMenu->setItemChecked( 210, true ); if (p-> mShowIconToday) configureToolBarMenu->setItemChecked( 130, true ); if (p-> mShowIconForward) configureToolBarMenu->setItemChecked( 220, true ); if (p-> mShowIconForwardFast) configureToolBarMenu->setItemChecked( 230, true ); if (p-> mShowIconNextDays) configureToolBarMenu->setItemChecked( 100, true ); if (p-> mShowIconNext) configureToolBarMenu->setItemChecked( 110, true ); if (p-> mShowIconJournal) configureToolBarMenu->setItemChecked( 90, true ); if (p-> mShowIconWhatsThis) configureToolBarMenu->setItemChecked( 300, true ); if (p-> mShowIconWeekNum) configureToolBarMenu->setItemChecked( 400, true ); if (!p-> mShowIconStretch) { QLabel* dummy = new QLabel( iconToolBar ); dummy->setBackgroundColor( iconToolBar->backgroundColor() ); dummy->setMinimumWidth( 0 ); iconToolBar->setStretchableWidget ( dummy ) ; } else { iconToolBar->setHorizontalStretchable (true ); viewToolBar->setHorizontalStretchable (true ); navigatorToolBar->setHorizontalStretchable (true ); iconToolBar->setVerticalStretchable (true ); viewToolBar->setVerticalStretchable (true ); navigatorToolBar->setVerticalStretchable (true ); configureToolBarMenu->setItemChecked( 5, true ); } if (p-> mShowIconFilter) configureToolBarMenu->setItemChecked( 7, true ); if (p-> mShowIconOnetoolbar) configureToolBarMenu->setItemChecked( 6, true ); if ( filterMenubar ) { filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) ); } connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); configureAgenda( p->mHourSize ); connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); } void MainWindow::exportToPhone( int mode ) { //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); KOex2phonePrefs ex2phone; ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); if ( mode == 1 ) ex2phone.setCaption(i18n("Export complete calendar")); if ( mode == 2 ) ex2phone.setCaption(i18n("Export filtered calendar")); if ( !ex2phone.exec() ) { return; } KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); int inFuture = 0; if ( ex2phone.mWriteBackFuture->isChecked() ) inFuture = ex2phone.mWriteBackFutureWeeks->value(); QPtrList<Incidence> delSel; if ( mode == 1 ) delSel = mCalendar->rawIncidences(); if ( mode == 2 ) delSel = mCalendar->incidences(); CalendarLocal* cal = new CalendarLocal(); cal->setLocalTime(); Incidence *incidence = delSel.first(); QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); while ( incidence ) { if ( incidence->typeID() != journalID ) { bool add = true; if ( inFuture ) { QDateTime dt; if ( incidence->typeID() == todoID ) { Todo * t = (Todo*)incidence; if ( t->hasDueDate() ) dt = t->dtDue(); else dt = cur.addSecs( 62 ); } else { bool ok; dt = incidence->getNextOccurence( cur, &ok ); if ( !ok ) dt = cur.addSecs( -62 ); } if ( dt < cur || dt > end ) { add = false; } } if ( add ) { Incidence *in = incidence->clone(); cal->addIncidence( in ); } } incidence = delSel.next(); } PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, KPimGlobalPrefs::instance()->mEx2PhoneConnection, KPimGlobalPrefs::instance()->mEx2PhoneModel ); setCaption( i18n("Writing to phone...")); if ( PhoneFormat::writeToPhone( cal ) ) setCaption( i18n("Export to phone successful!")); else setCaption( i18n("Error exporting to phone!")); delete cal; } void MainWindow::setDefaultPreferences() { KOPrefs *p = KOPrefs::instance(); p->mCompactDialogs = true; p->mConfirm = true; // p->mEnableQuickTodo = false; } QString MainWindow::resourcePath() { return KGlobal::iconLoader()->iconPath(); } void MainWindow::displayText( QString text ,QString cap ) { QDialog dia( this, "name", true ); ; dia.setCaption( cap ); QVBoxLayout* lay = new QVBoxLayout( &dia ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QTextBrowser tb ( &dia ); lay->addWidget( &tb ); tb.setText( text ); #ifdef DESKTOP_VERSION dia.resize( 640, 480); #else dia.showMaximized(); #endif dia.exec(); } void MainWindow::features() { KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); } void MainWindow::usertrans() { KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); } void MainWindow::storagehowto() { KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); } void MainWindow::timetrackinghowto() { KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); } void MainWindow::kdesynchowto() { KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); } void MainWindow::multisynchowto() { KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); } void MainWindow::synchowto() { KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); } void MainWindow::faq() { KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); } void MainWindow::whatsNew() { KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); } void MainWindow::licence() { KApplication::showLicence(); } void MainWindow::about() { QString version; #include <../version> QMessageBox::about( this, i18n("About KOrganizer/Pi"), i18n("KOrganizer/Platform-independent\n") + "(KO/Pi) " + version + " - " + #ifdef DESKTOP_VERSION i18n("Desktop Edition\n") + #else i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + #endif i18n("(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!") ); } void MainWindow::keyBindings() { QString cap = i18n("KO/Pi Keys + Colors"); QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ i18n("<p><h3>In agenda view:</h3></p>\n") + i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ i18n("<p><h3>In todo view:</h3></p>\n") + i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ i18n("<p><h3>In list view:</h3></p>\n") + i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ i18n("<p><b>return</b>: Select item+one step down</p>\n")+ i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ i18n("<p><h3>In event/todo viewer:</h3></p>\n") + i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ i18n("<p><b>A</b>: Show agenda view.</p>\n")+ i18n("<p><b>E</b>: Edit item</p>\n") + i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + i18n("<p><b>White</b>: Item readonly</p>\n"); displayText( text, cap); } void MainWindow::aboutAutoSaving() { QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); } void MainWindow::aboutKnownBugs() { QMessageBox* msg; msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + i18n("\nor report them in the bugtracker on\n") + i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); msg->exec(); delete msg; } QString MainWindow::defaultFileName() { return locateLocal( "data", "korganizer/mycalendar.ics" ); } QString MainWindow::syncFileName() { #ifdef DESKTOP_VERSION return locateLocal( "tmp", "synccalendar.ics" ); #else return QString( "/tmp/synccalendar.ics" ); #endif } #include "koglobals.h" #include <kcalendarsystem.h> void MainWindow::updateWeek(QDate seda) { int weekNum = KGlobal::locale()->weekNum ( seda ); mWeekPixmap.fill( mWeekBgColor ); QPainter p ( &mWeekPixmap ); p.setFont( mWeekFont ); p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); p.end(); QIconSet icon3 ( mWeekPixmap ); mWeekAction->setIconSet ( icon3 ); } void MainWindow::updateWeekNum(const DateList &selectedDates) { updateWeek( selectedDates.first() ); } void MainWindow::processIncidenceSelection( Incidence *incidence ) { if ( !incidence ) { enableIncidenceActions( false ); mNewSubTodoAction->setEnabled( false ); setCaptionToDates(); return; } //KGlobal::locale()->formatDateTime(nextA, true); QString startString = ""; if ( incidence->typeID() != todoID ) { if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { if ( incidence->doesFloat() ) { startString += ": "+incidence->dtStartDateStr( true ); startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); } else { startString = ": "+incidence->dtStartStr(true); startString += " --- "+((Event*)incidence)->dtEndStr(true); } } else { if ( incidence->dtStart().time() != incidence->dtEnd().time() ) startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); if ( incidence->isBirthday() || incidence->isAnniversary() ) { bool ok; QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); if ( ok ) { int years = noc.date().year() - incidence->dtStart().date().year(); startString += i18n(" (%1 y.)"). arg( years ); } } else startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); } } else startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); if ( !incidence->location().isEmpty() ) startString += " (" +incidence->location()+")"; setCaption( incidence->summary()+startString); enableIncidenceActions( true ); if ( incidence->typeID() == eventID ) { mShowAction->setText( i18n("Show Event...") ); mEditAction->setText( i18n("Edit Event...") ); mDeleteAction->setText( i18n("Delete Event...") ); mNewSubTodoAction->setEnabled( false ); } else if ( incidence->typeID() == todoID ) { mShowAction->setText( i18n("Show Todo...") ); mEditAction->setText( i18n("Edit Todo...") ); mDeleteAction->setText( i18n("Delete Todo...") ); mNewSubTodoAction->setEnabled( true ); } else { mShowAction->setText( i18n("Show...") ); mShowAction->setText( i18n("Edit...") ); mShowAction->setText( i18n("Delete...") ); mNewSubTodoAction->setEnabled( false ); } } void MainWindow::enableIncidenceActions( bool enabled ) { + +#ifndef DESKTOP_VERSION + mCurrentItemMenu->setEnabled( enabled ); +#else mShowAction->setEnabled( enabled ); mEditAction->setEnabled( enabled ); mDeleteAction->setEnabled( enabled ); mCloneAction->setEnabled( enabled ); mMoveAction->setEnabled( enabled ); mBeamAction->setEnabled( enabled ); mCancelAction->setEnabled( enabled ); +#endif } void MainWindow::importOL() { #ifdef _OL_IMPORT_ mView->clearAllViews(); KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); id->exec(); delete id; mView->calendar()->checkAlarmForIncidence( 0, true ); mView->updateView(); #endif } void MainWindow::importBday() { int result = QMessageBox::warning( this, i18n("KO/Pi import information!"), i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), i18n("Import!"), i18n("Cancel"), 0, 0, 1 ); if ( result == 0 ) { mView->importBday(); } } void MainWindow::importQtopia() { //#ifndef DESKTOP_VERSION QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); #ifdef DESKTOP_VERSION mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); #endif int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, i18n("Import!"), i18n("Cancel"), 0, 0, 1 ); if ( result == 0 ) { #ifndef DESKTOP_VERSION QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; #else QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; #endif mView->importQtopia( categories, datebook, todolist ); } mView->calendar()->reInitAlarmSettings(); #if 0 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), i18n("Not supported \non desktop!\n"), i18n("Ok"), i18n("Cancel"), 0, 0, 1 ); #endif } void MainWindow::saveOnClose() { KOPrefs *p = KOPrefs::instance(); p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); if ( filterToolBar ) { p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); } #ifdef DESKTOP_VERSION QPoint myP; myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); if ( p->mToolBarHor ) p->mToolBarUp = myP.y() > height()/2; else p->mToolBarUp = myP.x() > width()/2; myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); if ( p->mToolBarHorV ) p->mToolBarUpV = myP.y() > height()/2; else p->mToolBarUpV = myP.x() > width()/2 ; myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); if ( p->mToolBarHorN ) p->mToolBarUpN = myP.y() > height()/2; else p->mToolBarUpN = myP.x() > width()/2 ; if ( filterToolBar ) { myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); if ( p->mToolBarHorF ) p->mToolBarUpF = myP.y() > height()/2; else p->mToolBarUpF = myP.x() > width()/2 ; } #else if ( p->mToolBarHor ) p->mToolBarUp = iconToolBar->y() > height()/2; else p->mToolBarUp = iconToolBar->x() > width()/2; if ( p->mToolBarHorV ) p->mToolBarUpV = viewToolBar->y() > height()/2; else p->mToolBarUpV = viewToolBar->x() > width()/2 ; if ( p->mToolBarHorN ) p->mToolBarUpN = navigatorToolBar->y() > height()/2; else p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; if ( filterToolBar ) { if ( p->mToolBarHorF ) p->mToolBarUpF = filterToolBar->y() > height()/2; else p->mToolBarUpF = filterToolBar->x() > width()/2 ; } #endif save(); mView->writeSettings(); } void MainWindow::slotModifiedChanged( bool changed ) { if ( mBlockAtStartup ) return; int msec; // we store the changes after 1 minute, // and for safety reasons after 10 minutes again if ( !mSyncManager->blockSave() ) msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; else msec = 1000 * 600; mSaveTimer.start( msec, true ); // 1 minute qDebug("KO: Saving File in %d secs!", msec/1000); mCalendarModifiedFlag = true; } void MainWindow::saveStopTimer() { mSaveTimer.stop(); } void MainWindow::backupAllFiles() { QDate reference ( 2000,1,1); int daysTo = reference.daysTo ( QDate::currentDate() ); setCaption(i18n("Creating backup ... please wait ..." )); qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); // we need the file path, the backup dir and the number of bups as param QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) bupDir = KGlobalSettings::backupDataDir(); int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); if ( retval == 0 ) { setCaption(i18n("Backup cancelled" )); qDebug("KO: Backup cancelled. Will try again tomorrow "); // retval == 0 : backup skipped for today, try again tomorrow KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; } else if ( retval == 1 ){ qDebug("KO: Backup created."); // backup ok QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); cal = calendars.next(); while ( cal ) { if ( !cal->mErrorOnLoad ) { int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); } cal = calendars.next(); } KOPrefs::instance()->mLastBackupDate = daysTo; setCaption(i18n("Backup succesfully finished" )); } else if ( retval == 2 ){ setCaption(i18n("Backup globally disabled" )); qDebug("KO: Backup globally cancelled."); // backup globally cancelled KPimGlobalPrefs::instance()->mBackupEnabled = false; } // retval == 3: do nothing, try again later } void MainWindow::save() { if ( mView->viewManager()->journalView() ) mView->viewManager()->journalView()->checkModified(); if ( !mCalendarModifiedFlag ) { qDebug("KO: Calendar not modified. Nothing saved."); return; } if ( mSyncManager->blockSave() ) return; mSyncManager->setBlockSave(true); if ( mView->checkAllFileVersions() ) { if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ QDate reference ( 2000,1,1); int daysTo = reference.daysTo ( QDate::currentDate() ); if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { backupAllFiles(); } ; // KPimGlobalPrefs::instance()->mLastBackupDate } QTime neededSaveTime = QDateTime::currentDateTime().time(); setCaption(i18n("KO/Pi:Saving Data to File ..." )); qDebug("KO: Start saving data to file!"); mView->saveCalendars(); mCalendarModifiedFlag = false; int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); qDebug("KO: Needed %d ms for saving.",msNeeded ); QString savemes; savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); setCaption(savemes); } else setCaption(i18n("Saving cancelled!")); mSyncManager->setBlockSave( false ); } void MainWindow::keyReleaseEvent ( QKeyEvent * e) { if ( !e->isAutoRepeat() ) { mFlagKeyPressed = false; } } void MainWindow::keyPressEvent ( QKeyEvent * e ) { qApp->processEvents(); if ( e->isAutoRepeat() && !mFlagKeyPressed ) { e->ignore(); // qDebug(" ignore %d",e->isAutoRepeat() ); return; } if (! e->isAutoRepeat() ) mFlagKeyPressed = true; KOPrefs *p = KOPrefs::instance(); bool showSelectedDates = false; int size; int pro = 0; //qDebug("MainWindow::keyPressEvent "); switch ( e->key() ) { case Qt::Key_Right: if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) mView->goNextMonth(); else mView->goNext(); showSelectedDates = true; break; case Qt::Key_Left: if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) mView->goPreviousMonth(); else mView->goPrevious(); showSelectedDates = true; break; case Qt::Key_Down: mView->viewManager()->agendaView()->scrollOneHourDown(); break; case Qt::Key_Up: mView->viewManager()->agendaView()->scrollOneHourUp(); break; case Qt::Key_K: mView->viewManager()->showMonthViewWeek(); break; case Qt::Key_I: mView->showIncidence(); break; case Qt::Key_Delete: case Qt::Key_Backspace: mView->deleteIncidence(); break; case Qt::Key_D: mView->viewManager()->showDayView(); showSelectedDates = true; break; case Qt::Key_O: mView->toggleFilerEnabled( ); break; case Qt::Key_0: case Qt::Key_1: case Qt::Key_2: case Qt::Key_3: case Qt::Key_4: case Qt::Key_5: case Qt::Key_6: case Qt::Key_7: case Qt::Key_8: case Qt::Key_9: pro = e->key()-48; if ( pro == 0 ) pro = 10; if ( e->state() == Qt::ControlButton) pro += 10; break; case Qt::Key_M: mView->viewManager()->showMonthView(); showSelectedDates = true; break; case Qt::Key_Insert: mView->newEvent(); break; case Qt::Key_S : if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) mView->newSubTodo(); else mView->dialogManager()->showSearchDialog(); break; case Qt::Key_Y : case Qt::Key_Z : mView->viewManager()->showWorkWeekView(); showSelectedDates = true; break; case Qt::Key_U : mView->viewManager()->showWeekView(); showSelectedDates = true; break; case Qt::Key_H : keyBindings(); break; case Qt::Key_W: mView->viewManager()->showWhatsNextView(); break; case Qt::Key_L: mView->viewManager()->showListView(); break; case Qt::Key_N: mView->viewManager()->showNextView(); break; case Qt::Key_V: mView->viewManager()->showTodoView(); break; case Qt::Key_C: mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); break; case Qt::Key_P: mView->showDatePicker( ); break; case Qt::Key_F: mView->editFilters(); break; case Qt::Key_R: mView->toggleFilter(); break; case Qt::Key_X: if ( e->state() == Qt::ControlButton ) mView->toggleDateNavigatorWidget(); else { mView->viewManager()->showNextXView(); showSelectedDates = true; } break; case Qt::Key_Space: mView->toggleExpand(); break; case Qt::Key_A: if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) mView->showNextAlarms(); else mView->toggleAllDaySize(); break; case Qt::Key_T: if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) mView->newTodo(); else { mView->goToday(); showSelectedDates = true; } break; case Qt::Key_J: mView->viewManager()->showJournalView(); break; case Qt::Key_B: mView->editIncidenceDescription();; break; // case Qt::Key_Return: case Qt::Key_E: if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) mView->newEvent(); else mView->editIncidence(); break; case Qt::Key_Plus: size = p->mHourSize +2; if ( size <= 22 ) configureAgenda( size ); break; case Qt::Key_Minus: size = p->mHourSize - 2; if ( size >= 4 ) configureAgenda( size ); break; default: e->ignore(); } if ( pro > 0 ) { selectFilter( pro+1 ); } if ( showSelectedDates ) { ;// setCaptionToDates(); } } void MainWindow::fillFilterMenuTB() { selectFilterMenuTB->clear(); selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); selectFilterMenuTB->insertSeparator(); selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); selectFilterMenuTB->insertSeparator(); QPtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); CalFilter *filter = fili.first(); int iii = 2; bool checkitem = mView->filterView()->filtersEnabled(); while(filter) { selectFilterMenuTB->insertItem( filter->name(), iii ); if ( filter == curfilter) selectFilterMenuTB->setItemChecked( iii, checkitem ); filter = fili.next(); ++iii; } if ( !checkitem ) selectFilterMenuTB->setItemChecked( 1, true ); int x = 0; int y = iconToolBar->height(); int dX = 0; int dY = 0; if ( iconToolBar->orientation () == Qt:: Horizontal ) { if ( iconToolBar->y() > height()/2 ) { dY = selectFilterMenuTB->sizeHint().height()+8; y = 0; } } else { if ( iconToolBar->x() > width()/2 ) { // right side x=0; dX= selectFilterMenuTB->sizeHint().width()+8; y = 0; } else { x= iconToolBar->width(); y = 0; } } //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); } void MainWindow::fillFilterMenu() { selectFilterMenu->clear(); selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); selectFilterMenu->insertSeparator(); selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); selectFilterMenu->insertSeparator(); QPtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); CalFilter *filter = fili.first(); int iii = 2; bool checkitem = mView->filterView()->filtersEnabled(); while(filter) { selectFilterMenu->insertItem( filter->name(), iii ); if ( filter == curfilter) selectFilterMenu->setItemChecked( iii, checkitem ); filter = fili.next(); ++iii; } if ( !checkitem ) selectFilterMenu->setItemChecked( 1, true ); } void MainWindow::fillFilterMenuPopup() { filterPopupMenu->clear(); filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); filterPopupMenu->insertSeparator(); QPtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); CalFilter *filter = fili.first(); int iii = 1; bool checkitem = mView->filterView()->filtersEnabled(); while(filter) { filterPopupMenu->insertItem( filter->name(), iii ); if ( filter == curfilter) filterPopupMenu->setItemChecked( iii, checkitem ); filter = fili.next(); ++iii; } if ( !checkitem ) filterPopupMenu->setItemChecked( 0, true ); } void MainWindow::selectFilter( int fil ) { if ( fil == 0 ) { mView->editFilters( ); } else if ( fil == 1 ){ if ( mView->filterView()->filtersEnabled() ) mView->toggleFilerEnabled( ); } else { if ( !mView->filterView()->filtersEnabled() ) { mView->filterView()->blockSignals( true ); mView->toggleFilerEnabled( ); mView->filterView()->blockSignals( false ); } mView->selectFilter( fil-2 ); } } void MainWindow::updateFilterToolbar() { if ( filterMenubar ) { if ( !mView->filterView()->filtersEnabled() ) { filterMenubar->changeItem( 0, i18n("No Filter") ); } else { CalFilter *curfilter = mView->filterView()->selectedFilter(); if ( curfilter ) { filterMenubar->changeItem( 0, curfilter->name() ); } } } } void MainWindow::selectFilterPopup( int fil ) { selectFilter( fil + 1 ); } void MainWindow::configureToolBar( int item ) { configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); KOPrefs *p = KOPrefs::instance(); p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); // initActions(); + setCaption ( i18n("Toolbar changes needs a restart!") ); } void MainWindow::setCaption ( const QString & c ) { QString cap = c; cap.replace( QRegExp("\n"), " " ); cap = cap.stripWhiteSpace(); if ( cap.isEmpty() ) cap = "KO/Pi"; QWidget::setCaption( cap ); } void MainWindow::setCaptionToDates() { QString selDates; QDate date = mView->startDate(); if ( ! date.isValid() ) { setCaption(""); return; } selDates = KGlobal::locale()->formatDate( date, true); if (mView->startDate() < mView->endDate() ) selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); else { QString addString; if ( date == QDateTime::currentDateTime().date() ) addString = i18n("Today"); else if ( date == QDateTime::currentDateTime().date().addDays(1) ) addString = i18n("Tomorrow"); if ( !addString.isEmpty() ) selDates = addString+", "+selDates ; } setCaption( i18n("Dates: ") + selDates ); } void MainWindow::showConfigureAgenda( ) { int iii; for ( iii = 1;iii<= 10 ;++iii ){ configureAgendaMenu->setItemChecked( (iii+1)*2, false ); } configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); } void MainWindow::configureAgenda( int item ) { if ( KOPrefs::instance()->mHourSize == item ) return; KOPrefs::instance()->mHourSize=item; mView->viewManager()->agendaView()->updateConfig(); } void MainWindow::saveCalendar() { QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) bupDir = KGlobalSettings::backupDataDir(); bupDir = KGlobal::formatMessage ( bupDir, 0 ); QString bupHint; if ( !KPimGlobalPrefs::instance()->mBackupEnabled ) bupHint = i18n("(Hint: You can enable automatic backup in the global settings!)"); if ( KMessageBox::warningContinueCancel( this, i18n("This will <b>backup all calendar files</b> to the directory %1 %2").arg(bupDir).arg(bupHint),i18n("Information") ) != KMessageBox::Continue ) return; bool enabled = KPimGlobalPrefs::instance()->mBackupEnabled; KPimGlobalPrefs::instance()->mBackupEnabled = false; save(); KPimGlobalPrefs::instance()->mBackupEnabled = enabled; backupAllFiles(); } void MainWindow::loadCalendar() { #if 0 QString fn = KOPrefs::instance()->mLastLoadFile; fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); if ( fn == "" ) return; QFileInfo info; info.setFile( fn ); QString mess; bool loadbup = true; if ( info. exists() ) { mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); int result = QMessageBox::warning( this, "KO/Pi: Warning!", mess, i18n("Load!"), i18n("Cancel"), 0, 0, 1 ); if ( result != 0 ) { loadbup = false; } } else { QMessageBox::warning( this, i18n("KO/Pi: Warning!"), i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, 0, 1 ); return; } if ( loadbup ) { mView->openCalendar( fn ); KOPrefs::instance()->mLastLoadFile = fn; mess = i18n("KO/Pi:Loaded %1").arg(fn) ; setCaption(mess); } #endif } void MainWindow::quickImportIcal() { importFile( KOPrefs::instance()->mLastImportFile, false ); } void MainWindow::importFile( QString fn, bool quick ) { QFileInfo info; info.setFile( fn ); QString mess; bool loadbup = true; if ( !info. exists() ) { mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), mess ); return; } int result = 0; if ( !quick ) { mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); result = QMessageBox::warning( this, "KO/Pi: Warning!", mess, "Import", "Cancel", 0, 0, 1 ); } if ( result == 0 ) { if ( mView->openCalendar( fn, true )) { KOPrefs::instance()->mLastImportFile = fn; setCaption(i18n("Imported file successfully")); } else { setCaption(i18n("Error importing file")); } } } void MainWindow::importIcal() { QString fn =KOPrefs::instance()->mLastImportFile; fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); if ( fn == "" ) return; importFile( fn, true ); } void MainWindow::exportVCalendar() { QString fn = KOPrefs::instance()->mLastVcalFile; fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); if ( fn == "" ) return; QFileInfo info; info.setFile( fn ); QString mes; bool createbup = true; if ( info. exists() ) { mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, i18n("Overwrite!"), i18n("Cancel"), 0, 0, 1 ); if ( result != 0 ) { createbup = false; } } if ( createbup ) { if ( mView->exportVCalendar( fn ) ) { KOPrefs::instance()->mLastVcalFile = fn; if ( fn.length() > 20 ) mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; else mes = i18n("KO/Pi:Exported to %1").arg(fn ); setCaption(mes); } } } QString MainWindow::sentSyncFile() { #ifdef DESKTOP_VERSION return locateLocal( "tmp", "copysynccal.ics" ); #else return QString( "/tmp/copysynccal.ics" ); #endif } void MainWindow::syncFileRequest() { if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); } setCaption(i18n("Saving Data to temp file ..." )); mView->saveCalendar( sentSyncFile() ); setCaption(i18n("Data saved to temp file!" )); } void MainWindow::getFile( bool success ) { if ( ! success ) { setCaption( i18n("Error receiving file. Nothing changed!") ); return; } mView->openCalendar( sentSyncFile() ); if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); } setCaption( i18n("Pi-Sync successful!") ); } void MainWindow::printListView() { QString message = i18n("You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items."); KMessageBox::information( this, message); } void MainWindow::printSel( ) { mView->viewManager()->agendaView()->agenda()->printSelection(); } void MainWindow::printCal() { mView->print();//mCp->showDialog(); } #include "libkdepim/kdatepicker.h" #include <kdatetbl.h> void MainWindow::weekAction() { int month; KPopupFrame* popup = new KPopupFrame(this); KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); // ----- picker->resize(picker->sizeHint()); popup->setMainWidget(picker); picker->setFocus(); connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); int x = 0; int y = iconToolBar->height(); int dX = 0; int dY = 0; if ( iconToolBar->orientation () == Qt:: Horizontal ) { if ( iconToolBar->y() > height()/2 ) { dY = picker->sizeHint().height()+8; y = 0; } } else { if ( iconToolBar->x() > width()/2 ) { // right side x=0; dX= picker->sizeHint().width()+8; y = 0; } else { x= iconToolBar->width(); y = 0; } } //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) { month = picker->getResult(); emit selectWeek ( month ); //qDebug("weekSelected %d ", month); } delete popup; } void MainWindow::hideEvent ( QHideEvent * ) { QString message; QDateTime nextA = mCalendar->nextAlarmEventDateTime(); if ( nextA.isValid() ) { QString sum = mCalendar->nextSummary(); message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false)); setCaption( message ); } } void MainWindow::resizeEvent( QResizeEvent* e) { #ifndef DESKTOP_VERSION if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) { if (QApplication::desktop()->width() > QApplication::desktop()->height() ) filterToolBar->hide(); else filterToolBar->show(); } #endif QMainWindow::resizeEvent( e); } diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a4d0523..953774f 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -1,171 +1,172 @@ #ifndef KORGE_MAINWINDOW_H #define KORGE_MAINWINDOW_H #include <qmainwindow.h> #include <qtimer.h> #include <qdict.h> #include <qfile.h> #include <qmenubar.h> #include <qtextstream.h> #include <qregexp.h> #include <libkcal/incidence.h> #include <ksyncmanager.h> #ifndef DESKTOP_VERSION #include <qcopchannel_qws.h> #endif class QAction; class CalendarView; class KSyncProfile; #ifdef DESKTOP_VERSION #define QPEToolBar QToolBar #define QPEMenuBar QMenuBar #endif class QPEToolBar; class QPEMenuBar; namespace KCal { class CalendarLocal; } using namespace KCal; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); ~MainWindow(); bool beamReceiveEnabled(); static QString defaultFileName(); static QString syncFileName(); static QString resourcePath(); public slots: void setUsesBigPixmaps ( bool ); void setCaption ( const QString & ); void updateWeekNum(const KCal::DateList &); void updateWeek(QDate); void updateFilterToolbar(); virtual void showMaximized (); void configureAgenda( int ); void recieve( const QCString& msg, const QByteArray& data ); protected slots: void startMultiSync(); void setCaptionToDates(); void weekAction(); void about(); void licence(); void faq(); void usertrans(); void features(); void synchowto(); void storagehowto(); void timetrackinghowto(); void kdesynchowto(); void multisynchowto(); void whatsNew(); void keyBindings(); void aboutAutoSaving();; void aboutKnownBugs(); void processIncidenceSelection( Incidence * ); void importQtopia(); void importBday(); void importOL(); void importIcal(); void importFile( QString, bool ); void quickImportIcal(); void slotModifiedChanged( bool ); void save(); void backupAllFiles(); void saveStopTimer(); void configureToolBar( int ); void printSel(); void printCal(); void printListView(); void saveCalendar(); void loadCalendar(); void exportVCalendar(); void fillFilterMenu(); void fillFilterMenuTB(); void selectFilter( int ); void fillFilterMenuPopup(); void selectFilterPopup( int ); void exportToPhone( int ); void toggleBeamReceive(); void disableBR(bool); signals: void selectWeek ( int ); private slots: void showConfigureAgenda(); void getFile( bool ); void syncFileRequest(); protected: void hideEvent ( QHideEvent * ); QString sentSyncFile(); void displayText( QString, QString); void enableIncidenceActions( bool ); private: bool mBRdisabled; #ifndef DESKTOP_VERSION QCopChannel* infrared; #endif QAction* brAction; KSyncManager* mSyncManager; bool mClosed; void saveOnClose(); bool mFlagKeyPressed; bool mBlockAtStartup; QPEToolBar *iconToolBar; QPEToolBar *viewToolBar; QPEToolBar *navigatorToolBar; QPEToolBar *filterToolBar; QMenuBar *filterMenubar; QPopupMenu * filterPopupMenu; + QPopupMenu * mCurrentItemMenu; void initActions(); void setDefaultPreferences(); void resizeEvent( QResizeEvent* e); void keyPressEvent ( QKeyEvent * ) ; void keyReleaseEvent ( QKeyEvent * ) ; QPopupMenu *configureToolBarMenu; QPopupMenu *selectFilterMenu; QPopupMenu *selectFilterMenuTB; QPopupMenu *configureAgendaMenu, *syncMenu; CalendarLocal *mCalendar; CalendarView *mView; QAction *mNewSubTodoAction; QAction *mWeekAction; QFont mWeekFont; QPixmap mWeekPixmap; QColor mWeekBgColor; QAction *mShowAction; QAction *mEditAction; QAction *mDeleteAction; QAction *mCloneAction; QAction *mMoveAction; QAction *mBeamAction; QAction *mCancelAction; QAction *mToggleNav; QAction *mToggleFilter; QAction *mToggleAllday; QAction *actionFilterMenuTB; void closeEvent( QCloseEvent* ce ); QTimer mSaveTimer; //bool mBlockSaveFlag; bool mCalendarModifiedFlag; QPixmap loadPixmap( QString ); QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80; }; #endif @@ -1 +1 @@ -version = "2.1.11"; +version = "2.1.12"; |