summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-09 20:21:58 (UTC)
committer zautrix <zautrix>2005-04-09 20:21:58 (UTC)
commit9e43ebbe5867b2da957bb17c35bd357715424cba (patch) (unidiff)
treeb506ba029b50fc46a33d35a39e6f1c768c995f22
parent2c39ac46121e8796e780a5321ab777f08792e5ba (diff)
downloadkdepimpi-9e43ebbe5867b2da957bb17c35bd357715424cba.zip
kdepimpi-9e43ebbe5867b2da957bb17c35bd357715424cba.tar.gz
kdepimpi-9e43ebbe5867b2da957bb17c35bd357715424cba.tar.bz2
todo tt
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt12
-rw-r--r--korganizer/koprefs.cpp7
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koprefsdialog.cpp14
-rw-r--r--korganizer/kotodoview.cpp30
-rw-r--r--korganizer/kotodoview.h1
-rw-r--r--korganizer/kotodoviewitem.cpp62
-rw-r--r--libkcal/todo.cpp44
-rw-r--r--libkcal/todo.h16
9 files changed, 156 insertions, 31 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index b4e26c2..5257bff 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -314,1027 +314,1039 @@
314{ "Purge To-Dos","Todos bereinigen" }, 314{ "Purge To-Dos","Todos bereinigen" },
315{ "read-only","schreibgeschützt" }, 315{ "read-only","schreibgeschützt" },
316{ "Recur every","Wiederh. alle" }, 316{ "Recur every","Wiederh. alle" },
317{ "Recur in the month of","Wiederh. im Monat" }, 317{ "Recur in the month of","Wiederh. im Monat" },
318{ "Recur on the","Wiederh. am" }, 318{ "Recur on the","Wiederh. am" },
319{ "Recur on this day","Wiederh. am diesen Tag" }, 319{ "Recur on this day","Wiederh. am diesen Tag" },
320{ "Recurrence Range...","Wiederholungs Zeitraum..." }, 320{ "Recurrence Range...","Wiederholungs Zeitraum..." },
321{ "Recurrence Range","Wiederholungs Zeitraum" }, 321{ "Recurrence Range","Wiederholungs Zeitraum" },
322{ "Recurrence Rule","Wiederholungs Regel" }, 322{ "Recurrence Rule","Wiederholungs Regel" },
323{ "Recurrence","Wiederholung" }, 323{ "Recurrence","Wiederholung" },
324{ "Recurs","Wiederholung" }, 324{ "Recurs","Wiederholung" },
325{"&Reject","Abweisen"}, 325{"&Reject","Abweisen"},
326{ "Reminder:","Alarm:" }, 326{ "Reminder:","Alarm:" },
327{ "Rem.:","Alarm:" }, 327{ "Rem.:","Alarm:" },
328{ "Rem.","Alarm:" }, 328{ "Rem.","Alarm:" },
329{ "Remote file:","Remote Datei:"}, 329{ "Remote file:","Remote Datei:"},
330{ "Remote IP:","Remote (ferne) IP:" }, 330{ "Remote IP:","Remote (ferne) IP:" },
331{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, 331{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " },
332{ "Remote user:","Remote Benutzer"}, 332{ "Remote user:","Remote Benutzer"},
333{ "&Remove","Entfe&rnen" }, 333{ "&Remove","Entfe&rnen" },
334{ "Remove","Entfernen" }, 334{ "Remove","Entfernen" },
335{ "Request response","Bemerkung anfordern" }, 335{ "Request response","Bemerkung anfordern" },
336{ "Role:","Rolle:" }, 336{ "Role:","Rolle:" },
337{ "Role","Rolle" }, 337{ "Role","Rolle" },
338{ "Sat","Sa" }, 338{ "Sat","Sa" },
339{ "Saturday","Samstag" }, 339{ "Saturday","Samstag" },
340{ "Search for:","Suche nach:" }, 340{ "Search for:","Suche nach:" },
341{ "Search In","Suche in" }, 341{ "Search In","Suche in" },
342{ "Search...","Suche..." }, 342{ "Search...","Suche..." },
343{ "Search","Suche" }, 343{ "Search","Suche" },
344{ "Select Addresses","Wähle Adressen" }, 344{ "Select Addresses","Wähle Adressen" },
345{ "Select all","Selektiere Alle" }, 345{ "Select all","Selektiere Alle" },
346{ "Select a month","Wähle Monat" }, 346{ "Select a month","Wähle Monat" },
347{ "Select a week","Wähle Woche" }, 347{ "Select a week","Wähle Woche" },
348{ "Select a year","Wähle Jahr" }, 348{ "Select a year","Wähle Jahr" },
349{ "Send directly","Sende direkt" }, 349{ "Send directly","Sende direkt" },
350{ "&Send Messages","&Sende Nachrichten", }, 350{ "&Send Messages","&Sende Nachrichten", },
351{ "Sep","Sep" }, 351{ "Sep","Sep" },
352{ "September","September" }, 352{ "September","September" },
353{ "Shopping","Einkaufen" }, 353{ "Shopping","Einkaufen" },
354{ "Show Dates","Zeige Daten" }, 354{ "Show Dates","Zeige Daten" },
355{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, 355{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." },
356{ "Show Event...","Zeige Termin..." }, 356{ "Show Event...","Zeige Termin..." },
357{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, 357{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." },
358{ "Show Marcus Bains line","Zeige Marcus Bains Linie" }, 358{ "Show Marcus Bains line","Zeige Marcus Bains Linie" },
359{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, 359{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." },
360{ "Show time as:","Zeige Zeit als" }, 360{ "Show time as:","Zeige Zeit als" },
361{ "Show Todo...","Zeige To-Do" }, 361{ "Show Todo...","Zeige To-Do" },
362{ "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, 362{ "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" },
363{ "&Show","Zeige" }, 363{ "&Show","Zeige" },
364{ "Show...","Zeige..." }, 364{ "Show...","Zeige..." },
365{ "Show","Zeige" }, 365{ "Show","Zeige" },
366{ "Small","Klein" }, 366{ "Small","Klein" },
367{ "Sorry","Entschuldigung" }, 367{ "Sorry","Entschuldigung" },
368{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, 368{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"},
369{ "Start:","Start:" }, 369{ "Start:","Start:" },
370{ "Start Date","Start Datum" }, 370{ "Start Date","Start Datum" },
371{ "Start date: %1","Start Datum: %1" }, 371{ "Start date: %1","Start Datum: %1" },
372{ "Start Time","Start Zeit" }, 372{ "Start Time","Start Zeit" },
373{ "Status:","Status:" }, 373{ "Status:","Status:" },
374{ "Status","Status:" }, 374{ "Status","Status:" },
375{ "Summaries","Titel" }, 375{ "Summaries","Titel" },
376{ "Summary:","Titel:" }, 376{ "Summary:","Titel:" },
377{ "Summary","Titel" }, 377{ "Summary","Titel" },
378{ "Sunday","Sonntag" }, 378{ "Sunday","Sonntag" },
379{ "Sun","So" }, 379{ "Sun","So" },
380{ "Sync preferences:","Sync Einstellungen" }, 380{ "Sync preferences:","Sync Einstellungen" },
381{ "Sync Prefs","Sync Einstellungen" }, 381{ "Sync Prefs","Sync Einstellungen" },
382{ "Syncronize","Daten abgleich" }, 382{ "Syncronize","Daten abgleich" },
383{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 383{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
384{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 384{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
385{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, 385{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
386{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, 386{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" },
387{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, 387{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" },
388{ "Template...","Vorlage..." }, 388{ "Template...","Vorlage..." },
389{ "This day","Dieser Tag" }, 389{ "This day","Dieser Tag" },
390{ "This is an experimental feature. ","Dieses Feature ist experimentel" }, 390{ "This is an experimental feature. ","Dieses Feature ist experimentel" },
391{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, 391{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." },
392{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, 392{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." },
393{ "Thu","Do" }, 393{ "Thu","Do" },
394{ "Thursday","Donnerstag" }, 394{ "Thursday","Donnerstag" },
395{ "Time associated","Mit Zeit" }, 395{ "Time associated","Mit Zeit" },
396{ "Time bar:","Uhrzeit Zeile:" }, 396{ "Time bar:","Uhrzeit Zeile:" },
397{ "Time && Date","Zeit und Datum" }, 397{ "Time && Date","Zeit und Datum" },
398{ "Time Format","Zeit Format" }, 398{ "Time Format","Zeit Format" },
399{ "Time Format(nr):","Zeit Format(Neustart!)" }, 399{ "Time Format(nr):","Zeit Format(Neustart!)" },
400{ "Date Labels:","Datumsleiste:" }, 400{ "Date Labels:","Datumsleiste:" },
401{ "Time: ","Zeit: " }, 401{ "Time: ","Zeit: " },
402{ "Timezone:","Zeitzone:" }, 402{ "Timezone:","Zeitzone:" },
403{ "To: ","Bis: " }, 403{ "To: ","Bis: " },
404{ "To:","Bis:" }, 404{ "To:","Bis:" },
405{ "Today: ","Heute: " }, 405{ "Today: ","Heute: " },
406{ "Todo due today color:","Heute fällige To-Do's" }, 406{ "Todo due today color:","Heute fällige To-Do's" },
407{ "To-do items:","To-Do items:" }, 407{ "To-do items:","To-Do items:" },
408{ "Todo overdue color:","Überfällige To-Do's" }, 408{ "Todo overdue color:","Überfällige To-Do's" },
409{ "Todo","Todo" }, 409{ "Todo","Todo" },
410{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, 410{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" },
411{ "ToDoView:","Todo Ansicht:" }, 411{ "ToDoView:","Todo Ansicht:" },
412{ "Toggle Alarm","Wechsle Alarm" }, 412{ "Toggle Alarm","Wechsle Alarm" },
413{ "Toggle Allday","Umschalten Ganztag" }, 413{ "Toggle Allday","Umschalten Ganztag" },
414{ "Tomorrow: ","Morgen: " }, 414{ "Tomorrow: ","Morgen: " },
415{ "Tue","Di" }, 415{ "Tue","Di" },
416{ "Tuesday","Dienstag" }, 416{ "Tuesday","Dienstag" },
417{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, 417{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" },
418{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, 418{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." },
419{ "Unknown","Unbekannt" }, 419{ "Unknown","Unbekannt" },
420{ "Up","Hinauf" }, 420{ "Up","Hinauf" },
421{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, 421{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" },
422{ "User defined","Benutzerdefiniert" }, 422{ "User defined","Benutzerdefiniert" },
423{ "User long date:","Format langes Datum:" }, 423{ "User long date:","Format langes Datum:" },
424{ "User short date:","Forma kurzes Datum:" }, 424{ "User short date:","Forma kurzes Datum:" },
425{ "View","Ansicht" }, 425{ "View","Ansicht" },
426{ "View Fonts","Schriftarten Ansichten" }, 426{ "View Fonts","Schriftarten Ansichten" },
427{ "Views","Ansichten" }, 427{ "Views","Ansichten" },
428{ "Wed","Mi" }, 428{ "Wed","Mi" },
429{ "Wednesday","Mittwoch" }, 429{ "Wednesday","Mittwoch" },
430{ "Week %1","Woche %1" }, 430{ "Week %1","Woche %1" },
431{ "Weekly","Wöchentlich" }, 431{ "Weekly","Wöchentlich" },
432{ "Week starts on Sunday","Woche beginnt Sonntags" }, 432{ "Week starts on Sunday","Woche beginnt Sonntags" },
433{ "What's Next View:","What's Next Anz." }, 433{ "What's Next View:","What's Next Anz." },
434{ "What's next ?","Was kommt als nächstes?(What's Next)" }, 434{ "What's next ?","Was kommt als nächstes?(What's Next)" },
435{ "Working Hours","Tägliche Arbeitszeit" }, 435{ "Working Hours","Tägliche Arbeitszeit" },
436{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, 436{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" },
437{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, 437{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" },
438{ "Write back synced file","Syncronisierte Datei zurückschreiben" }, 438{ "Write back synced file","Syncronisierte Datei zurückschreiben" },
439{ "Yearly","Jährlich" }, 439{ "Yearly","Jährlich" },
440{ "year(s)","Jahr(e)" }, 440{ "year(s)","Jahr(e)" },
441{ "Yes","Ja" }, 441{ "Yes","Ja" },
442{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, 442{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" },
443{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, 443{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." },
444{ "week(s) on:","Woche(n) am: " }, 444{ "week(s) on:","Woche(n) am: " },
445{ "Full menu bar(nr)","Volle Menuleiste(bn)" }, 445{ "Full menu bar(nr)","Volle Menuleiste(bn)" },
446{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 446{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
447{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 447{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
448{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 448{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
449{ "Daylight start:","Sommerzeit Beginn:" }, 449{ "Daylight start:","Sommerzeit Beginn:" },
450{ "Daylight end:","Sommerzeit Ende:" }, 450{ "Daylight end:","Sommerzeit Ende:" },
451{ "Time Zone","Zeitzone" }, 451{ "Time Zone","Zeitzone" },
452{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, 452{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" },
453{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, 453{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" },
454{ "minutely","minütlich" }, 454{ "minutely","minütlich" },
455{ "hourly","stündlich" }, 455{ "hourly","stündlich" },
456{ "daily","täglich" }, 456{ "daily","täglich" },
457{ "weekly","wöchentlich" }, 457{ "weekly","wöchentlich" },
458{ "monthly","monatlich" }, 458{ "monthly","monatlich" },
459{ "day-monthly","tag-monatlich" }, 459{ "day-monthly","tag-monatlich" },
460{ "month-yearly","monat-jährlich" }, 460{ "month-yearly","monat-jährlich" },
461{ "day-yearly","tag-jährlich" }, 461{ "day-yearly","tag-jährlich" },
462{ "position-yearly","pos-jährlich" }, 462{ "position-yearly","pos-jährlich" },
463{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, 463{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" },
464{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, 464{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" },
465{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, 465{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" },
466{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, 466{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" },
467{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, 467{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" },
468{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, 468{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." },
469{ "Event list view uses full window","Listenansicht nutzt Vollbild" }, 469{ "Event list view uses full window","Listenansicht nutzt Vollbild" },
470{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, 470{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" },
471{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, 471{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" },
472{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, 472{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" },
473{ "ViewChange","Ansichtswechsel" }, 473{ "ViewChange","Ansichtswechsel" },
474{ "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, 474{ "Default alarm *.wav file:","Standard Alarm *.wav Datei:" },
475{ "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, 475{ "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" },
476{ "File","Datei" }, 476{ "File","Datei" },
477{ "Clone...","Dupliziere.." }, 477{ "Clone...","Dupliziere.." },
478{ "Move...","Bewege..." }, 478{ "Move...","Bewege..." },
479{ "Beam...","Sende via IR..." }, 479{ "Beam...","Sende via IR..." },
480{ "&Clone...","Dupliziere.." }, 480{ "&Clone...","Dupliziere.." },
481{ "&Move...","Bewege..." }, 481{ "&Move...","Bewege..." },
482{ "&Beam...","Sende via IR..." }, 482{ "&Beam...","Sende via IR..." },
483{ "Show Completed","Zeige erledigte Todos" }, 483{ "Show Completed","Zeige erledigte Todos" },
484{ "Show Quick Todo","Zeige Quick Todo" }, 484{ "Show Quick Todo","Zeige Quick Todo" },
485{ "Unparent Todo","Un-sub Todo" }, 485{ "Unparent Todo","Un-sub Todo" },
486{ "Save selected to file...","Speichere Selektierte..." }, 486{ "Save selected to file...","Speichere Selektierte..." },
487{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, 487{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." },
488{ "Set Categ. for selected...","Setze Kateg. für Selekt." }, 488{ "Set Categ. for selected...","Setze Kateg. für Selekt." },
489{ "Beam selected via IR","Sende Selekt. via IR..." }, 489{ "Beam selected via IR","Sende Selekt. via IR..." },
490{ "Search","Suchen" }, 490{ "Search","Suchen" },
491{ "Date Picker","Datum auswählen" }, 491{ "Date Picker","Datum auswählen" },
492{ "Day View","Tagesansicht" }, 492{ "Day View","Tagesansicht" },
493{ "Work Week","Arbeitswoche" }, 493{ "Work Week","Arbeitswoche" },
494{ "Week","Wochenansicht" }, 494{ "Week","Wochenansicht" },
495{ "Month","Monatsansicht" }, 495{ "Month","Monatsansicht" },
496{ "Todo View","Todo Liste" }, 496{ "Todo View","Todo Liste" },
497{ "Journal","Journal Ansicht" }, 497{ "Journal","Journal Ansicht" },
498{ "Next days","Nächste Tage" }, 498{ "Next days","Nächste Tage" },
499{ "Print agenda selection...","Drucke Agendaselektion..." }, 499{ "Print agenda selection...","Drucke Agendaselektion..." },
500{ "Toggle DateNavigator","Navigator umschalten" }, 500{ "Toggle DateNavigator","Navigator umschalten" },
501{ "Toggle FilterView","Filteransicht umschalten" }, 501{ "Toggle FilterView","Filteransicht umschalten" },
502{ "Prev. month","Vorheriger Monat" }, 502{ "Prev. month","Vorheriger Monat" },
503{ "Go backward","Gehe zurück" }, 503{ "Go backward","Gehe zurück" },
504{ "Go forward","Gehe weiter" }, 504{ "Go forward","Gehe weiter" },
505{ "Synchronize","Synchronisieren" }, 505{ "Synchronize","Synchronisieren" },
506{ "AgendaSize","Agendagröße" }, 506{ "AgendaSize","Agendagröße" },
507{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, 507{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" },
508{ "Import last file","Importiere letzte Datei" }, 508{ "Import last file","Importiere letzte Datei" },
509{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, 509{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." },
510{ "Load Calendar Backup","Lade Kalender Backup" }, 510{ "Load Calendar Backup","Lade Kalender Backup" },
511{ "Save Calendar Backup","Speichere Kalender Backup" }, 511{ "Save Calendar Backup","Speichere Kalender Backup" },
512{ "Export VCalendar","Exportiere VCalendar" }, 512{ "Export VCalendar","Exportiere VCalendar" },
513{ "Manage new categories...","Verwalte neue Kategorien..." }, 513{ "Manage new categories...","Verwalte neue Kategorien..." },
514{ "Beam complete calendar...","Sende kompletten Kalender via IR" }, 514{ "Beam complete calendar...","Sende kompletten Kalender via IR" },
515{ "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, 515{ "Beam filtered calendar...","Sende gefilterten Kalender via IR" },
516{ "Remote via ssh","Über Netzwerk via ssh" }, 516{ "Remote via ssh","Über Netzwerk via ssh" },
517{ "With local file","Mit lokaler Datei" }, 517{ "With local file","Mit lokaler Datei" },
518{ "With last file","Mit letzter Datei" }, 518{ "With last file","Mit letzter Datei" },
519{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, 519{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" },
520{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, 520{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" },
521{ "Save filename","Speichern: Dateinamen wählen" }, 521{ "Save filename","Speichern: Dateinamen wählen" },
522{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, 522{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" },
523{ "KO/Pi: Warning!","KO/Pi: Warnung!" }, 523{ "KO/Pi: Warning!","KO/Pi: Warnung!" },
524{ "Overwrite!","Überschreibe!" }, 524{ "Overwrite!","Überschreibe!" },
525{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 525{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
526{ "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" }, 526{ "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" },
527{ "KO/Pi Confirmation","KO/Pi Bestätigung" }, 527{ "KO/Pi Confirmation","KO/Pi Bestätigung" },
528{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, 528{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" },
529{ "Deleting item %d ...","Lösche Eintrag %d ..." }, 529{ "Deleting item %d ...","Lösche Eintrag %d ..." },
530{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, 530{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." },
531{ "Size","Größe" }, 531{ "Size","Größe" },
532{ "Date","Datum" }, 532{ "Date","Datum" },
533{ "Mime Type","Datei Typ" }, 533{ "Mime Type","Datei Typ" },
534{ "All Files","Alle Dateien" }, 534{ "All Files","Alle Dateien" },
535{ "Files","Dateien" }, 535{ "Files","Dateien" },
536{ "Documents","DoKumente" }, 536{ "Documents","DoKumente" },
537{ "Select Categories","Selektiere Kategorien" }, 537{ "Select Categories","Selektiere Kategorien" },
538{ " &Deselect All "," Auswahl aufheben " }, 538{ " &Deselect All "," Auswahl aufheben " },
539{ "A&dd","Hinzu" }, 539{ "A&dd","Hinzu" },
540{ "&Modify","Ändern" }, 540{ "&Modify","Ändern" },
541{ "Edit Categories","Editiere Kategorien" }, 541{ "Edit Categories","Editiere Kategorien" },
542{ " &Edit Categories "," &Editiere Kategorien " }, 542{ " &Edit Categories "," &Editiere Kategorien " },
543{ "Beam Options","Beam Einstellungen" }, 543{ "Beam Options","Beam Einstellungen" },
544{ " With timezone "," Mit Zeitzone " }, 544{ " With timezone "," Mit Zeitzone " },
545{ " Local time ", " Lokale Zeit " }, 545{ " Local time ", " Lokale Zeit " },
546{ "Manage new Categories","Verwalte neue Kategorien" }, 546{ "Manage new Categories","Verwalte neue Kategorien" },
547{ "Add to category list","Füge zur Kategorieliste hinzu" }, 547{ "Add to category list","Füge zur Kategorieliste hinzu" },
548{ "Remove from Events/Todos","Entferne von Terminen/Todos" }, 548{ "Remove from Events/Todos","Entferne von Terminen/Todos" },
549{ "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 " }, 549{ "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 " },
550{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 550{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
551{ "File format","Datei Format" }, 551{ "File format","Datei Format" },
552{ "Time format","Zeit Format" }, 552{ "Time format","Zeit Format" },
553{ "Delete all\ncompleted To-Dos?","Lösche alle\nerledigten To-Dos?" }, 553{ "Delete all\ncompleted To-Dos?","Lösche alle\nerledigten To-Dos?" },
554{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, 554{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." },
555{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, 555{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" },
556{ "h","Std" }, 556{ "h","Std" },
557{ "min","Min" }, 557{ "min","Min" },
558{ "hou","Std" }, 558{ "hou","Std" },
559{ "day","Tag" }, 559{ "day","Tag" },
560{ "French","Französich" }, 560{ "French","Französich" },
561{ "Time","Zeit" }, 561{ "Time","Zeit" },
562{ "Event Viewer","Termin Ansicht" }, 562{ "Event Viewer","Termin Ansicht" },
563{ "Cancel Sync","Sync Abbrechen" }, 563{ "Cancel Sync","Sync Abbrechen" },
564{ "Remote","Fern" }, 564{ "Remote","Fern" },
565{ "Local","Lokal" }, 565{ "Local","Lokal" },
566{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, 566{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" },
567{ "Local: ","Lokal: " }, 567{ "Local: ","Lokal: " },
568{ "Remote: ","Fern: " }, 568{ "Remote: ","Fern: " },
569{ "Last modified: ","Zuletzt geändert: " }, 569{ "Last modified: ","Zuletzt geändert: " },
570{ "Location: ","Ort: " }, 570{ "Location: ","Ort: " },
571{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, 571{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" },
572{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, 572{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" },
573{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, 573{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " },
574{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, 574{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" },
575{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, 575{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " },
576{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, 576{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" },
577{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, 577{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." },
578{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, 578{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" },
579{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, 579{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" },
580{ "( %1 min before )","( %1 min vorher )" }, 580{ "( %1 min before )","( %1 min vorher )" },
581{ "<b>Alarm on: ","<b>Alarm am: " }, 581{ "<b>Alarm on: ","<b>Alarm am: " },
582{ "<b>Details: </b>","<b>Details: </b>" }, 582{ "<b>Details: </b>","<b>Details: </b>" },
583{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 583{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
584{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, 584{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" },
585{ "Organizer","Organisator" }, 585{ "Organizer","Organisator" },
586{ "Save","Speichern" }, 586{ "Save","Speichern" },
587{ "Exit (+save)","Beenden (+ speichern)" }, 587{ "Exit (+save)","Beenden (+ speichern)" },
588{ "Home","Zuhause" }, 588{ "Home","Zuhause" },
589{ "Office","Büro" }, 589{ "Office","Büro" },
590{ "Libary","Bücherei" }, 590{ "Libary","Bücherei" },
591{ "Doctor","Arzt" }, 591{ "Doctor","Arzt" },
592{ "Beach","Strand" }, 592{ "Beach","Strand" },
593{ "Conference room","Konferenzraum" }, 593{ "Conference room","Konferenzraum" },
594{ "Drive Home","Heimfahrt" }, 594{ "Drive Home","Heimfahrt" },
595{ "Watch TV","Tv gucken" }, 595{ "Watch TV","Tv gucken" },
596{ "Phone call","Telefonanruf" }, 596{ "Phone call","Telefonanruf" },
597{ "Pay bill","Rechnung bezahlen" }, 597{ "Pay bill","Rechnung bezahlen" },
598{ "Read book","Buch lesen" }, 598{ "Read book","Buch lesen" },
599{ "Watering plants","Pflanzen giessen" }, 599{ "Watering plants","Pflanzen giessen" },
600{"Appointment","Verabredung" }, 600{"Appointment","Verabredung" },
601{"Birthday","Geburtstag" }, 601{"Birthday","Geburtstag" },
602{"Business","Geschäft" }, 602{"Business","Geschäft" },
603{"Business Travel","Geschäftsreise" }, 603{"Business Travel","Geschäftsreise" },
604{"Cinema","Kino" }, 604{"Cinema","Kino" },
605{"Customer","Kunde" }, 605{"Customer","Kunde" },
606{"Break","Pause" }, 606{"Break","Pause" },
607{"Breakfast","Frühstück" }, 607{"Breakfast","Frühstück" },
608{"Competition","Wettkampf" }, 608{"Competition","Wettkampf" },
609{"Dinner","Abendessen" }, 609{"Dinner","Abendessen" },
610{"Education","Erziehung" }, 610{"Education","Erziehung" },
611{"Family","Familie" }, 611{"Family","Familie" },
612{"Favorites","Favoriten" }, 612{"Favorites","Favoriten" },
613{"Festival","Festival" }, 613{"Festival","Festival" },
614{"Fishing","Angeln" }, 614{"Fishing","Angeln" },
615{"Flight","Flug" }, 615{"Flight","Flug" },
616{"Gifts","Geschenk" }, 616{"Gifts","Geschenk" },
617{"Holiday","Feiertag" }, 617{"Holiday","Feiertag" },
618{"Holiday Cards","Ansichtskarten" }, 618{"Holiday Cards","Ansichtskarten" },
619{"Hot Contacts","Heisse Kontakte" }, 619{"Hot Contacts","Heisse Kontakte" },
620{"Hiking","Wandern" }, 620{"Hiking","Wandern" },
621{"Hunting","Jagen" }, 621{"Hunting","Jagen" },
622{"Key Customer","Wichtiger Kunde" }, 622{"Key Customer","Wichtiger Kunde" },
623{"Kids","Kinder" }, 623{"Kids","Kinder" },
624{"Lunch","Mittagessen" }, 624{"Lunch","Mittagessen" },
625{"Meeting","Treffen" }, 625{"Meeting","Treffen" },
626{"Miscellaneous","Verschiedenes" }, 626{"Miscellaneous","Verschiedenes" },
627{"Partner","Partner" }, 627{"Partner","Partner" },
628{"Party","Partie" }, 628{"Party","Partie" },
629{"Personal","Privat" }, 629{"Personal","Privat" },
630{"Personal Travel","Privatreise"}, 630{"Personal Travel","Privatreise"},
631{"PHB","PHB" }, 631{"PHB","PHB" },
632{"Phone Calls","Telefonanruf" }, 632{"Phone Calls","Telefonanruf" },
633{"Projects","Projekt" }, 633{"Projects","Projekt" },
634{"Recurring","Wiederholend" }, 634{"Recurring","Wiederholend" },
635{"School","Schule" }, 635{"School","Schule" },
636{"Shopping","Einkaufen" }, 636{"Shopping","Einkaufen" },
637{"Speach","Rede" }, 637{"Speach","Rede" },
638{"Special Occasion","Spez.Gelegenheit" }, 638{"Special Occasion","Spez.Gelegenheit" },
639{"Sports","Sport" }, 639{"Sports","Sport" },
640{"Talk","Vortrag" }, 640{"Talk","Vortrag" },
641{"Travel","Reise" }, 641{"Travel","Reise" },
642{"TV","TV" }, 642{"TV","TV" },
643{"Germany","Deutschland" }, 643{"Germany","Deutschland" },
644{"Sweden","Schweden" }, 644{"Sweden","Schweden" },
645{"Forest","Wald" }, 645{"Forest","Wald" },
646{ "Desert","Wüste" }, 646{ "Desert","Wüste" },
647{ "Kitchen","Küche" }, 647{ "Kitchen","Küche" },
648{ "Lake","See" }, 648{ "Lake","See" },
649{"University","Universität"}, 649{"University","Universität"},
650{"Vacation","Urlaub" }, 650{"Vacation","Urlaub" },
651{"VIP","VIP" }, 651{"VIP","VIP" },
652{ "Import Sharp Calendar","Importiere Sharp Kalender" }, 652{ "Import Sharp Calendar","Importiere Sharp Kalender" },
653{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, 653{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" },
654{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, 654{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" },
655{ "Cancelled","Gecancelt" }, 655{ "Cancelled","Gecancelt" },
656{ "Multiple sync","Mehrfach Sync" }, 656{ "Multiple sync","Mehrfach Sync" },
657{ "Local file","Lokale Datei" }, 657{ "Local file","Lokale Datei" },
658{ "Last file","Letzte Datei" }, 658{ "Last file","Letzte Datei" },
659{ "Keys + Colors...","Tasten + Farben..." }, 659{ "Keys + Colors...","Tasten + Farben..." },
660{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, 660{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" },
661{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, 661{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" },
662{ "Choose...","Wähle..." }, 662{ "Choose...","Wähle..." },
663{ "Use colors for application:","Setze Farben für Programm:" }, 663{ "Use colors for application:","Setze Farben für Programm:" },
664{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, 664{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" },
665{ "Frames, labels, etc.:","Rahmen, Label, etc.:" }, 665{ "Frames, labels, etc.:","Rahmen, Label, etc.:" },
666{ "Show parent To-Do's","Zeige Ober-Todos" }, 666{ "Show parent To-Do's","Zeige Ober-Todos" },
667{ "Show location","Zeige Orte" }, 667{ "Show location","Zeige Orte" },
668{ "Show events that recur ","Zeige Termine, die sich wiederholen:" }, 668{ "Show events that recur ","Zeige Termine, die sich wiederholen:" },
669{ "Show in every cell ","Zeige in jeder Zelle " }, 669{ "Show in every cell ","Zeige in jeder Zelle " },
670{ "short month","kurzen Monat" }, 670{ "short month","kurzen Monat" },
671{ "icons","Icons" }, 671{ "icons","Icons" },
672{ "Show Sat/Sun together","Zeige Sam/Son zusammen" }, 672{ "Show Sat/Sun together","Zeige Sam/Son zusammen" },
673{ "Categorie colors are applied to text","Kategorie Farben färben Text" }, 673{ "Categorie colors are applied to text","Kategorie Farben färben Text" },
674{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, 674{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" },
675{ "Day color odd months","Tagesfarbe ungerade Monate" }, 675{ "Day color odd months","Tagesfarbe ungerade Monate" },
676{ "Day color even months","Tagesfarbe gerade Monate" }, 676{ "Day color even months","Tagesfarbe gerade Monate" },
677{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, 677{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" },
678{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, 678{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" },
679{ "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, 679{ "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" },
680{ "Colors are applied to text","Farben werden auf Text angewendet" }, 680{ "Colors are applied to text","Farben werden auf Text angewendet" },
681{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, 681{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" },
682{ "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" }, 682{ "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" },
683{ "Play beeps count:","Anzahl der Alarmpiepse: " }, 683{ "Play beeps count:","Anzahl der Alarmpiepse: " },
684{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, 684{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " },
685{ "Default suspend time in min:","Standard Supendierungs Zeit: " }, 685{ "Default suspend time in min:","Standard Supendierungs Zeit: " },
686{ "Auto suspend count:","Anzahl der auto Suspendierungen" }, 686{ "Auto suspend count:","Anzahl der auto Suspendierungen" },
687{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, 687{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" },
688{ "New profile","Neues Profil" }, 688{ "New profile","Neues Profil" },
689{ "Clone profile","Klone Profil" }, 689{ "Clone profile","Klone Profil" },
690{ "Delete profile","Lösche Profil" }, 690{ "Delete profile","Lösche Profil" },
691{ "Profile:","Profil:" }, 691{ "Profile:","Profil:" },
692{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, 692{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" },
693{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 693{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
694{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 694{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
695{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 695{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
696{ "Write back file","Schreibe Datei zurück" }, 696{ "Write back file","Schreibe Datei zurück" },
697{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 697{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
698{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 698{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
699{ "Local device name:","Name dieses Gerätes:" }, 699{ "Local device name:","Name dieses Gerätes:" },
700{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 700{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
701{ "Sync preferences","Synchronisations Einstellungen" }, 701{ "Sync preferences","Synchronisations Einstellungen" },
702{ "Profile kind","Profil Art" }, 702{ "Profile kind","Profil Art" },
703{ "Local file","Lokale Datei" }, 703{ "Local file","Lokale Datei" },
704{ "Local file:","Lokale Datei:" }, 704{ "Local file:","Lokale Datei:" },
705{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 705{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
706{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 706{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
707{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 707{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
708{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 708{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
709{ "Device","Gerät:" }, 709{ "Device","Gerät:" },
710{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 710{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
711{ "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" }, 711{ "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" },
712{ "Synchronization successful","Synchronisation erfolgreich" }, 712{ "Synchronization successful","Synchronisation erfolgreich" },
713{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 713{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
714{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 714{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
715{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 715{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
716{ "Enter password","Passwort eingeben" }, 716{ "Enter password","Passwort eingeben" },
717{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 717{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
718{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 718{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
719{ "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" }, 719{ "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" },
720{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 720{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
721{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 721{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
722{ "Edit Calendar Filters","Editiere Kalendar Filter" }, 722{ "Edit Calendar Filters","Editiere Kalendar Filter" },
723{ "Enter filter name:","Neuer Filter Name:" }, 723{ "Enter filter name:","Neuer Filter Name:" },
724{ "Add Filter","Filter hinzufügen" }, 724{ "Add Filter","Filter hinzufügen" },
725{ "Question","Frage" }, 725{ "Question","Frage" },
726{ "Filter position: ","Filter Position: " }, 726{ "Filter position: ","Filter Position: " },
727{ "Month View","Monatsansicht" }, 727{ "Month View","Monatsansicht" },
728{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, 728{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" },
729{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 729{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
730{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 730{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
731{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, 731{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" },
732{ "Access: ","Zugriff: " }, 732{ "Access: ","Zugriff: " },
733{ "Needs Action","Aktion notwendig" }, 733{ "Needs Action","Aktion notwendig" },
734{ "Accepted","Akzeptiert" }, 734{ "Accepted","Akzeptiert" },
735{ "Declined","Abgelehnt" }, 735{ "Declined","Abgelehnt" },
736{ "Tentative","Vorläufig" }, 736{ "Tentative","Vorläufig" },
737{ "Delegated","Beauftragt" }, 737{ "Delegated","Beauftragt" },
738{ "Completed","Vollständig" }, 738{ "Completed","Vollständig" },
739{ "In Process","In Bearbeitung" }, 739{ "In Process","In Bearbeitung" },
740{ "Participant","Teilnehmer" }, 740{ "Participant","Teilnehmer" },
741{ "Optional Participant","Möglicher Teilnehmer" }, 741{ "Optional Participant","Möglicher Teilnehmer" },
742{ "Observer","Beobachter" }, 742{ "Observer","Beobachter" },
743{ "Chair","Vorsitzender" }, 743{ "Chair","Vorsitzender" },
744{ "Not supported \non desktop!\n","" }, 744{ "Not supported \non desktop!\n","" },
745{ "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) " }, 745{ "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) " },
746{ "Date range: ","Datums Zeitspanne: " }, 746{ "Date range: ","Datums Zeitspanne: " },
747{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, 747{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " },
748{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, 748{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." },
749{ "Add / remove events","Add./entferne Termine" }, 749{ "Add / remove events","Add./entferne Termine" },
750{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, 750{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." },
751{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, 751{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." },
752{ "\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" }, 752{ "\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" },
753{ "Overwrite","Überschreiben" }, 753{ "Overwrite","Überschreiben" },
754{ "Sync+save","Syncen+speichern" }, 754{ "Sync+save","Syncen+speichern" },
755{ "Default","Standard" }, 755{ "Default","Standard" },
756{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 756{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " },
757{ " %d items?"," %d Einträge?" }, 757{ " %d items?"," %d Einträge?" },
758{ "\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?" }, 758{ "\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?" },
759{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, 759{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" },
760{ "Current","Aktuelle" }, 760{ "Current","Aktuelle" },
761{ "\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" }, 761{ "\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" },
762{ "All","Alle" }, 762{ "All","Alle" },
763{ "Data Loss Warning","Datenverlust Warnung" }, 763{ "Data Loss Warning","Datenverlust Warnung" },
764{ "Proceed","Weitermachen" }, 764{ "Proceed","Weitermachen" },
765{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, 765{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" },
766{ "Filter disabled ","Filter abgeschaltet" }, 766{ "Filter disabled ","Filter abgeschaltet" },
767{ "Filter selected: ","Gewählter Filter: " }, 767{ "Filter selected: ","Gewählter Filter: " },
768{ "Toggle Cancel","Gecancelt ändern" }, 768{ "Toggle Cancel","Gecancelt ändern" },
769{ "&Toggle Cancel","Gecancel&t ändern" }, 769{ "&Toggle Cancel","Gecancel&t ändern" },
770{ "Configure Toolbar","Konfiguriere Toolbar" }, 770{ "Configure Toolbar","Konfiguriere Toolbar" },
771{ "Stretched TB","Gedehnte TB" }, 771{ "Stretched TB","Gedehnte TB" },
772{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, 772{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" },
773{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, 773{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" },
774{ "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" }, 774{ "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" },
775{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, 775{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" },
776{ "Imported file successfully","Datei erfolgreich importiert" }, 776{ "Imported file successfully","Datei erfolgreich importiert" },
777{ "Error importing file","Fehler beim Importieren der Datei" }, 777{ "Error importing file","Fehler beim Importieren der Datei" },
778{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, 778{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
779{ "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" }, 779{ "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" },
780{ "Overwrite!","Überschreiben!" }, 780{ "Overwrite!","Überschreiben!" },
781{ "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" }, 781{ "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" },
782{ "Load backup filename","Lade Backup Dateiname" }, 782{ "Load backup filename","Lade Backup Dateiname" },
783{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, 783{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
784{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, 784{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
785{ "Save backup filename","Speichere Backup Dateiname" }, 785{ "Save backup filename","Speichere Backup Dateiname" },
786{ "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" }, 786{ "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" },
787{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 787{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
788{ "Details of attendee","Teilnehmerdetails" }, 788{ "Details of attendee","Teilnehmerdetails" },
789{ "Work phone:\n","Telefon Arbeit:\n" }, 789{ "Work phone:\n","Telefon Arbeit:\n" },
790{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, 790{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
791{ "Home phone:\n","Telefon privat:\n" }, 791{ "Home phone:\n","Telefon privat:\n" },
792{ "Mobile home phone:\n","Mobiltelefon privat:\n" }, 792{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
793{ "Email:\n","Email:\n" }, 793{ "Email:\n","Email:\n" },
794{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, 794{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
795{ "Audio Al.: ","Audio Al.: " }, 795{ "Audio Al.: ","Audio Al.: " },
796{ "Proc.Al.: ","Proz.Al.: " }, 796{ "Proc.Al.: ","Proz.Al.: " },
797{ "No sound set","Kein Sound definiert" }, 797{ "No sound set","Kein Sound definiert" },
798{ "*.wav|Wav Files","*.wav|Wav Dateien" }, 798{ "*.wav|Wav Files","*.wav|Wav Dateien" },
799{ "No program set","Kein Programm definiert" }, 799{ "No program set","Kein Programm definiert" },
800{ "Running '%1'","Ausführen '%1'" }, 800{ "Running '%1'","Ausführen '%1'" },
801{ "Playing '%1'","Abspielen '%1'" }, 801{ "Playing '%1'","Abspielen '%1'" },
802{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, 802{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
803{ "Load!","Laden!" }, 803{ "Load!","Laden!" },
804{ "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" }, 804{ "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" },
805{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, 805{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
806{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, 806{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
807{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, 807{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
808{ "Features + hints...","Eigenschaften + Tipps..." }, 808{ "Features + hints...","Eigenschaften + Tipps..." },
809{ "User translation...","Benutzer Übersetzung..." }, 809{ "User translation...","Benutzer Übersetzung..." },
810{ "Sync HowTo...","Synchronisation HowTo..." }, 810{ "Sync HowTo...","Synchronisation HowTo..." },
811{ "Print calendar...","Drucke Kalender..." }, 811{ "Print calendar...","Drucke Kalender..." },
812{ "Anniversary","Jahrestag" }, 812{ "Anniversary","Jahrestag" },
813{ "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" }, 813{ "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" },
814{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, 814{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
815{ "Next recurrence is on: ","Nächste Wiederholung ist am:" }, 815{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
816{ "<b>Alarm on: </b>","<b>Alarm am: </b>" }, 816{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
817{ "<b>Access: </b>","<b>Zugriff: </b>" }, 817{ "<b>Access: </b>","<b>Zugriff: </b>" },
818{ "(%1 min before)","(%1 min vorher)" }, 818{ "(%1 min before)","(%1 min vorher)" },
819{ "<b>Categories: </b>","<b>Kategorien: </b>" }, 819{ "<b>Categories: </b>","<b>Kategorien: </b>" },
820{ "Save Journal/Description...","Speichere Journal/Details..." }, 820{ "Save Journal/Description...","Speichere Journal/Details..." },
821{ "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." }, 821{ "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." },
822{ "Continue","Weitermachen" }, 822{ "Continue","Weitermachen" },
823{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, 823{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" },
824{ "Attendee:","Teilnehmer:" }, 824{ "Attendee:","Teilnehmer:" },
825{ "Click OK to search ->","Klicke zum Suchen auf OK ->" }, 825{ "Click OK to search ->","Klicke zum Suchen auf OK ->" },
826{ "On day ","Am Tag " }, 826{ "On day ","Am Tag " },
827{ "%1 of ","%1 des Monats" }, 827{ "%1 of ","%1 des Monats" },
828{ "%1 of the year","%1 des Jahres" }, 828{ "%1 of the year","%1 des Jahres" },
829{ "Anonymous","Anonymo" }, 829{ "Anonymous","Anonymo" },
830{ "nobody@nowhere","niemand@nirgendwo" }, 830{ "nobody@nowhere","niemand@nirgendwo" },
831{ "calendar.html","calendar.html" }, 831{ "calendar.html","calendar.html" },
832{ " Local Time"," Locale Zeit" }, 832{ " Local Time"," Locale Zeit" },
833{ "Unknown Name","Unbekannter Name" }, 833{ "Unknown Name","Unbekannter Name" },
834{ "unknown@nowhere","unbekannt@nirgendwo" }, 834{ "unknown@nowhere","unbekannt@nirgendwo" },
835{ "Beam via IR!","Beam via IR!" }, 835{ "Beam via IR!","Beam via IR!" },
836{ "Next Month","Nächster Monat" }, 836{ "Next Month","Nächster Monat" },
837{ "Prio","Prio" }, 837{ "Prio","Prio" },
838{ "Reparent Todo","Mache Sub-Todo" }, 838{ "Reparent Todo","Mache Sub-Todo" },
839{ "tomorrow","morgen" }, 839{ "tomorrow","morgen" },
840{ "today","heute" }, 840{ "today","heute" },
841{ "yesterday","gestern" }, 841{ "yesterday","gestern" },
842{ "Ok","Ok" }, 842{ "Ok","Ok" },
843{ "Ok+Agenda","Ok+Agenda" }, 843{ "Ok+Agenda","Ok+Agenda" },
844{ "Email","Email" }, 844{ "Email","Email" },
845{ "RSVP","RSVP" }, 845{ "RSVP","RSVP" },
846{ "Email:","Email:" }, 846{ "Email:","Email:" },
847{ "Appointment Time ","Termin Zeit " }, 847{ "Appointment Time ","Termin Zeit " },
848{ "2","2" }, 848{ "2","2" },
849{ "3","3" }, 849{ "3","3" },
850{ "4","4" }, 850{ "4","4" },
851{ " 0 %"," 0 %" }, 851{ " 0 %"," 0 %" },
852{ " 20 %"," 20 %" }, 852{ " 20 %"," 20 %" },
853{ " 40 %"," 40 %" }, 853{ " 40 %"," 40 %" },
854{ " 60 %"," 60 %" }, 854{ " 60 %"," 60 %" },
855{ " 80 %"," 80 %" }, 855{ " 80 %"," 80 %" },
856{ "100 %","100 %" }, 856{ "100 %","100 %" },
857{ "Filter","Filter" }, 857{ "Filter","Filter" },
858{ "Configure","Konfiguriere" }, 858{ "Configure","Konfiguriere" },
859{ "What's Next","What's Next" }, 859{ "What's Next","What's Next" },
860{ "Complete calendar...","Kompletten Kalender..." }, 860{ "Complete calendar...","Kompletten Kalender..." },
861{ "Filtered calendar...","Gefilterten Kalender..." }, 861{ "Filtered calendar...","Gefilterten Kalender..." },
862{ "Export to phone","Exportiere zum Handy" }, 862{ "Export to phone","Exportiere zum Handy" },
863{ "Beam receive enabled","Beam Empfang an" }, 863{ "Beam receive enabled","Beam Empfang an" },
864{ "What's new?","Was ist neu?" }, 864{ "What's new?","Was ist neu?" },
865{ "FAQ...","FAQ..." }, 865{ "FAQ...","FAQ..." },
866{ "Licence...","Licence..." }, 866{ "Licence...","Licence..." },
867{ "What's This?","What's This?" }, 867{ "What's This?","What's This?" },
868{ "&Edit...","&Editiere..." }, 868{ "&Edit...","&Editiere..." },
869{ "Oktober","Oktober" }, 869{ "Oktober","Oktober" },
870{ "Title","Titel" }, 870{ "Title","Titel" },
871{ "%1 %","%1 %" }, 871{ "%1 %","%1 %" },
872{ "Enable Pi-Sync","Schalte Pi-Sync an" }, 872{ "Enable Pi-Sync","Schalte Pi-Sync an" },
873{ "Import!","Importiere!" }, 873{ "Import!","Importiere!" },
874{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, 874{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" },
875{ "Export to phone options","Export ans Handy Optionen" }, 875{ "Export to phone options","Export ans Handy Optionen" },
876{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 876{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
877{ "I/O device: ","I/O device: " }, 877{ "I/O device: ","I/O device: " },
878{ "Connection: ","Connection: " }, 878{ "Connection: ","Connection: " },
879{ "Model(opt.): ","Model(opt.): " }, 879{ "Model(opt.): ","Model(opt.): " },
880{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, 880{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" },
881{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, 881{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " },
882{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, 882{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" },
883{ "Export to mobile phone!","Exportiere auf das Handy!" }, 883{ "Export to mobile phone!","Exportiere auf das Handy!" },
884{ "Export complete calendar","Exportiere kompletten Kalender" }, 884{ "Export complete calendar","Exportiere kompletten Kalender" },
885{ "Writing to phone...","Sende Daten ans Handy..." }, 885{ "Writing to phone...","Sende Daten ans Handy..." },
886{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 886{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
887{ "Retry","Nochmal versuchen" }, 887{ "Retry","Nochmal versuchen" },
888{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 888{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
889{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 889{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
890{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 890{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
891{ "Export filtered calendar","Exportiere gefilterten Kalender" }, 891{ "Export filtered calendar","Exportiere gefilterten Kalender" },
892{ "Preferences","Vorlieben" }, 892{ "Preferences","Vorlieben" },
893{ "Global","Global" }, 893{ "Global","Global" },
894{ "Phone","Phone" }, 894{ "Phone","Phone" },
895{ "SMS","SMS" }, 895{ "SMS","SMS" },
896{ "Fax","Fax" }, 896{ "Fax","Fax" },
897{ "Pager","Pager" }, 897{ "Pager","Pager" },
898{ "SIP","SIP" }, 898{ "SIP","SIP" },
899{ "Italian","Italienisch" }, 899{ "Italian","Italienisch" },
900{ "24:00","24:00" }, 900{ "24:00","24:00" },
901{ "12:00am","12:00am" }, 901{ "12:00am","12:00am" },
902{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 902{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
903{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 903{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
904{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 904{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
905{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 905{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
906{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 906{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
907{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 907{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
908{ "Used Mail Client","Benutzter Mail Client" }, 908{ "Used Mail Client","Benutzter Mail Client" },
909{ "Channel:","Channel:" }, 909{ "Channel:","Channel:" },
910{ "Message:","Message:" }, 910{ "Message:","Message:" },
911{ "Parameters:","Parameter:" }, 911{ "Parameters:","Parameter:" },
912{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 912{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
913{ "extra Message:","extra Message:" }, 913{ "extra Message:","extra Message:" },
914{ "extra Parameters:","extra Parameter:" }, 914{ "extra Parameters:","extra Parameter:" },
915{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 915{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
916{ "External Apps.","Externe Appl." }, 916{ "External Apps.","Externe Appl." },
917{ "24 hours","24 Std." }, 917{ "24 hours","24 Std." },
918{ "3 hours","3 Std." }, 918{ "3 hours","3 Std." },
919{ "1 hour","1 Std." }, 919{ "1 hour","1 Std." },
920{ "15 minutes","15 Min." }, 920{ "15 minutes","15 Min." },
921{ "5 minutes","5 Min." }, 921{ "5 minutes","5 Min." },
922{ "1 minute","1 Min." }, 922{ "1 minute","1 Min." },
923{ "23","23" }, 923{ "23","23" },
924{ "Mon 15","Mon 15" }, 924{ "Mon 15","Mon 15" },
925{ "Configure KO","Konfiguriere KO" }, 925{ "Configure KO","Konfiguriere KO" },
926{ "Event text","Termin Text" }, 926{ "Event text","Termin Text" },
927{ "ToDo","ToDo" }, 927{ "ToDo","ToDo" },
928{ "Today","Heute" }, 928{ "Today","Heute" },
929{ "What's Next View","What's Next Ansicht" }, 929{ "What's Next View","What's Next Ansicht" },
930{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, 930{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
931{ "Alarm","Alarm" }, 931{ "Alarm","Alarm" },
932{ "Used %1 Client","Benutzter %1 Client" }, 932{ "Used %1 Client","Benutzter %1 Client" },
933{ "No email client installed","Kein Email Klient installiert" }, 933{ "No email client installed","Kein Email Klient installiert" },
934{ "Userdefined email client","Benutzerdef. Email Klient" }, 934{ "Userdefined email client","Benutzerdef. Email Klient" },
935{ "OM/Pi email client","OM/Pi Email Klient" }, 935{ "OM/Pi email client","OM/Pi Email Klient" },
936{ "Include in multiple ","Beziehe in multiple " }, 936{ "Include in multiple ","Beziehe in multiple " },
937{ "calendar ","Kalender " }, 937{ "calendar ","Kalender " },
938{ "addressbook ","Adressbuch " }, 938{ "addressbook ","Adressbuch " },
939{ "pwmanager","PWmanager" }, 939{ "pwmanager","PWmanager" },
940{ " sync"," Sync ein" }, 940{ " sync"," Sync ein" },
941{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 941{ "Write back synced data","Schreibe gesyncte Daten zurück" },
942{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 942{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
943{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 943{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
944{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 944{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
945{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 945{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
946{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 946{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
947{ "Help...","Hilfe..." }, 947{ "Help...","Hilfe..." },
948{ "Local file Cal:","Lokale Datei Kal:" }, 948{ "Local file Cal:","Lokale Datei Kal:" },
949{ "Local file ABook:","Lokale Datei ABuch:" }, 949{ "Local file ABook:","Lokale Datei ABuch:" },
950{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 950{ "Local file PWMgr:","Lokale Datei PWMgr:" },
951{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 951{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
952{ "Calendar:","Kalender:" }, 952{ "Calendar:","Kalender:" },
953{ "AddressBook:","AdressBuch:" }, 953{ "AddressBook:","AdressBuch:" },
954{ "PWManager:","PWManager:" }, 954{ "PWManager:","PWManager:" },
955{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 955{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
956{ "ssh/scp","ssh/scp" }, 956{ "ssh/scp","ssh/scp" },
957{ "ftp","ftp" }, 957{ "ftp","ftp" },
958{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 958{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
959{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 959{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
960{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 960{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
961{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 961{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
962{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 962{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
963{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 963{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
964{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 964{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
965{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 965{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
966{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 966{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
967{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 967{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
968{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 968{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
969{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 969{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
970{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 970{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
971{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 971{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
972{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 972{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
973{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, 973{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
974{ "KDE-Pim Sync","KDE-Pim Sync" }, 974{ "KDE-Pim Sync","KDE-Pim Sync" },
975{ "Multiple profiles","Multi-Sync Profile" }, 975{ "Multiple profiles","Multi-Sync Profile" },
976{ "Device: ","Gerät: " }, 976{ "Device: ","Gerät: " },
977{ "Multiple sync started.","Multi-Sync gestartet." }, 977{ "Multiple sync started.","Multi-Sync gestartet." },
978{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 978{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
979{ "Turn filter on","Schalte Filter an" }, 979{ "Turn filter on","Schalte Filter an" },
980{ "Turn filter off","Schalte Filter aus" }, 980{ "Turn filter off","Schalte Filter aus" },
981{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 981{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
982{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 982{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
983{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 983{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
984{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, 984{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" },
985{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, 985{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" },
986{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, 986{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" },
987{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, 987{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" },
988{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, 988{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" },
989{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, 989{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" },
990{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 990{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
991{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 991{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
992{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 992{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
993{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 993{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
994{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 994{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
995{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, 995{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" },
996{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, 996{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" },
997{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 997{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
998{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, 998{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" },
999{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 999{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
1000{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, 1000{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" },
1001{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 1001{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
1002{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, 1002{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" },
1003{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, 1003{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" },
1004{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 1004{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
1005{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, 1005{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" },
1006{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, 1006{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" },
1007{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, 1007{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" },
1008{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1008{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1009{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1009{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1010{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1010{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1011{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1011{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1012{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1012{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1013{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, 1013{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" },
1014{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, 1014{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" },
1015{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1015{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1016{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1016{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1017{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, 1017{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" },
1018{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, 1018{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" },
1019{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, 1019{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" },
1020{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, 1020{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" },
1021{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, 1021{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" },
1022{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, 1022{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" },
1023{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, 1023{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" },
1024{ "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, 1024{ "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " },
1025{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, 1025{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" },
1026{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, 1026{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" },
1027{ "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, 1027{ "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" },
1028{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, 1028{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" },
1029{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, 1029{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" },
1030{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, 1030{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" },
1031{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1031{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1032{ "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","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, 1032{ "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","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" },
1033{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1033{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1034{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1034{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1035{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1035{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1036{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, 1036{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" },
1037{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, 1037{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" },
1038{ "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","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, 1038{ "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","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" },
1039{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1039{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1040{ "KO/Pi FAQ","KO/Pi FAQ" }, 1040{ "KO/Pi FAQ","KO/Pi FAQ" },
1041{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, 1041{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" },
1042{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1042{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1043{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1043{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1044{ "From: ","Von: " }, 1044{ "From: ","Von: " },
1045{ "Remove sync info","Entferne Sync Info" }, 1045{ "Remove sync info","Entferne Sync Info" },
1046{ "For all profiles","Für alle Profile" }, 1046{ "For all profiles","Für alle Profile" },
1047{ "Hide not Running","Verstecke nicht Laufende" }, 1047{ "Hide not Running","Verstecke nicht Laufende" },
1048{ "ME","ME" }, 1048{ "ME","ME" },
1049{ "Toolbar","Toolbar" }, 1049{ "Toolbar","Toolbar" },
1050{ "Undo Delete...","Löschen rückgängig machen..." }, 1050{ "Undo Delete...","Löschen rückgängig machen..." },
1051{ "Undo Delete","Löschen rückgängig machen" }, 1051{ "Undo Delete","Löschen rückgängig machen" },
1052{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1052{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1053{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1053{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1054{ "Januar","Januar" }, 1054{ "Januar","Januar" },
1055{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1055{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1056{ "No Filter","Kein Filter" }, 1056{ "No Filter","Kein Filter" },
1057{ "Multiple Sync options","Multi Sync Optionen" }, 1057{ "Multiple Sync options","Multi Sync Optionen" },
1058{ "Sync algo options","Sync Ablauf Optionen" }, 1058{ "Sync algo options","Sync Ablauf Optionen" },
1059{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1059{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1060{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1060{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1061{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1061{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1062{ "Write back options","Optionen zum Zurückschreiben" }, 1062{ "Write back options","Optionen zum Zurückschreiben" },
1063{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1063{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1064{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1064{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1065{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1065{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1066{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1066{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1067{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1067{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1068{ "Time period","Zeitspanne" }, 1068{ "Time period","Zeitspanne" },
1069{ "From ","Von " }, 1069{ "From ","Von " },
1070{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1070{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1071{ " weeks in the future "," Wochen in der Zukunft " }, 1071{ " weeks in the future "," Wochen in der Zukunft " },
1072{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1072{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1073{ "Local temp file:","Lokale temp Datei:" }, 1073{ "Local temp file:","Lokale temp Datei:" },
1074{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1074{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1075{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1075{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1076{ "Language","Sprache" }, 1076{ "Language","Sprache" },
1077{ "Time Format","Zeit Format" }, 1077{ "Time Format","Zeit Format" },
1078{ "Time Zone","Zeit Zone" }, 1078{ "Time Zone","Zeit Zone" },
1079{ "%1 groups subscribed","%1 Guppen abboniert" }, 1079{ "%1 groups subscribed","%1 Guppen abboniert" },
1080{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 1080{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
1081{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1081{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1082{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1082{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1083{ "Save settings","Speichere Einstellungen" }, 1083{ "Save settings","Speichere Einstellungen" },
1084{ "Save standard","Speichere Standard" }, 1084{ "Save standard","Speichere Standard" },
1085{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1085{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1086{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1086{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1087{ "Data storage path","Daten Speicherpfad" }, 1087{ "Data storage path","Daten Speicherpfad" },
1088{ "Language","Sprache" }, 1088{ "Language","Sprache" },
1089{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1089{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1090{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1090{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1091{ "Show events, that are done","Zeige abgelaufene Termine" }, 1091{ "Show events, that are done","Zeige abgelaufene Termine" },
1092{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1092{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1093{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1093{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1094{ "KO/Pi","KO/Pi" }, 1094{ "KO/Pi","KO/Pi" },
1095{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1095{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1096{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1096{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1097{ "Sound.Al.: ","Sound.Al.: " }, 1097{ "Sound.Al.: ","Sound.Al.: " },
1098{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1098{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1099{ "Restore","Wiederherstellen" }, 1099{ "Restore","Wiederherstellen" },
1100{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1100{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1101{ "% completed","% erledigt" }, 1101{ "% completed","% erledigt" },
1102{ "%d item(s) found.","%d Item(s) gefunden." }, 1102{ "%d item(s) found.","%d Item(s) gefunden." },
1103{ "Set complete","Setze auf erledigt" }, 1103{ "Set complete","Setze auf erledigt" },
1104{ "(cancelled)","(gecancelt)" }, 1104{ "(cancelled)","(gecancelt)" },
1105{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1105{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1106{ " Local time "," Locale Zeit " }, 1106{ " Local time "," Locale Zeit " },
1107{ "Form2","Form2" }, 1107{ "Form2","Form2" },
1108{ "Filter enabled","Filter angeschaltet" }, 1108{ "Filter enabled","Filter angeschaltet" },
1109{ "Edit Filters","Ändere Filter" }, 1109{ "Edit Filters","Ändere Filter" },
1110{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1110{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1111{ "Agenda","Agenda" }, 1111{ "Agenda","Agenda" },
1112{ " ("," (" }, 1112{ " ("," (" },
1113{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1113{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1114{ "Print","Print" }, 1114{ "Print","Print" },
1115{ "&Setup Printer...","Drucker &Setup..." }, 1115{ "&Setup Printer...","Drucker &Setup..." },
1116{ "View Type","Zeige Typ" }, 1116{ "View Type","Zeige Typ" },
1117{ "Page &orientation:","Seiten Ausrichtung:" }, 1117{ "Page &orientation:","Seiten Ausrichtung:" },
1118{ "Use Default of Selected Style","Default des selektierten Stils" }, 1118{ "Use Default of Selected Style","Default des selektierten Stils" },
1119{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1119{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1120{ "Portrait","Portrait" }, 1120{ "Portrait","Portrait" },
1121{ "Landscape","Landschaft" }, 1121{ "Landscape","Landschaft" },
1122{ "Print day","Drucke Tag" }, 1122{ "Print day","Drucke Tag" },
1123{ "CalPrintDay_Base","CalPrintDay_Base" }, 1123{ "CalPrintDay_Base","CalPrintDay_Base" },
1124{ "Date && Time Range","Datum && Zeitspanne" }, 1124{ "Date && Time Range","Datum && Zeitspanne" },
1125{ "&End date:","&Enddatum:" }, 1125{ "&End date:","&Enddatum:" },
1126{ "&Start date:","&Startdatum:" }, 1126{ "&Start date:","&Startdatum:" },
1127{ "Start &time:","Startzeit:" }, 1127{ "Start &time:","Startzeit:" },
1128{ "End ti&me:","Endzeit:" }, 1128{ "End ti&me:","Endzeit:" },
1129{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1129{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1130{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1130{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1131{ "Alt+D","Alt+D" }, 1131{ "Alt+D","Alt+D" },
1132{ "&Use colors","Nutze Farben" }, 1132{ "&Use colors","Nutze Farben" },
1133{ "Alt+U","Alt+U" }, 1133{ "Alt+U","Alt+U" },
1134{ "Print week","Drucke Woche" }, 1134{ "Print week","Drucke Woche" },
1135{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1135{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1136{ "Use &colors","Nutze Farben" }, 1136{ "Use &colors","Nutze Farben" },
1137{ "Type of View","Typ der Ansicht" }, 1137{ "Type of View","Typ der Ansicht" },
1138{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1138{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1139{ "Alt+F","Alt+F" }, 1139{ "Alt+F","Alt+F" },
1140{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1140{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1141{ "Alt+T","Alt+T" }, 1141{ "Alt+T","Alt+T" },
1142{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1142{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1143{ "Print month","Drucke Monat" }, 1143{ "Print month","Drucke Monat" },
1144{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1144{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1145{ "&Start month:","&Startmonat:" }, 1145{ "&Start month:","&Startmonat:" },
1146{ "&End month:","&Endmonat:" }, 1146{ "&End month:","&Endmonat:" },
1147{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1147{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1148{ "Print todos","Drucke Todos" }, 1148{ "Print todos","Drucke Todos" },
1149{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1149{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1150{ "Include &description of the item","Inclusive Itembeschreibung" }, 1150{ "Include &description of the item","Inclusive Itembeschreibung" },
1151{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1151{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1152{ "Include &priority of the item","Inclusive Priorität des Items" }, 1152{ "Include &priority of the item","Inclusive Priorität des Items" },
1153{ "Items to Print","Zu druckende Items" }, 1153{ "Items to Print","Zu druckende Items" },
1154{ "&From:","Von:" }, 1154{ "&From:","Von:" },
1155{ "&To:","Bis:" }, 1155{ "&To:","Bis:" },
1156{ "Print &all todo items","Drucke alle Todo Items" }, 1156{ "Print &all todo items","Drucke alle Todo Items" },
1157{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1157{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1158{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1158{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1159{ "Todo List","Todo Liste" }, 1159{ "Todo List","Todo Liste" },
1160{ "&Title:","&Titel:" }, 1160{ "&Title:","&Titel:" },
1161{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, 1161{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
1162{ "Todo list","Todo Liste" }, 1162{ "Todo list","Todo Liste" },
1163{ "&Print...","Drucke..." }, 1163{ "&Print...","Drucke..." },
1164{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1164{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1165{ "[Unconfigured]","[Unkonfiguriert]" }, 1165{ "[Unconfigured]","[Unkonfiguriert]" },
1166{ "OK","OK" }, 1166{ "OK","OK" },
1167{ "FilterEditor","FilterEditor" }, 1167{ "FilterEditor","FilterEditor" },
1168{ "Include","Inclusive" }, 1168{ "Include","Inclusive" },
1169{ "Exclude","Exclusive" }, 1169{ "Exclude","Exclusive" },
1170{ "Edit Selection...","Editiere Auswahl" }, 1170{ "Edit Selection...","Editiere Auswahl" },
1171{ "recurring events","wiederholende Termine" }, 1171{ "recurring events","wiederholende Termine" },
1172{ "recurr. events","wiederh.Termine" }, 1172{ "recurr. events","wiederh.Termine" },
1173{ "completed to-dos","erledigte Todos" }, 1173{ "completed to-dos","erledigte Todos" },
1174{ "events","Termine" }, 1174{ "events","Termine" },
1175{ "todos","Todos" }, 1175{ "todos","Todos" },
1176{ "journals","Journale" }, 1176{ "journals","Journale" },
1177{ "public","öffentl." }, 1177{ "public","öffentl." },
1178{ "private","privat" }, 1178{ "private","privat" },
1179{ "confidential","vertraul." }, 1179{ "confidential","vertraul." },
1180{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1180{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
1181{ "Yesterday","Gestern" }, 1181{ "Yesterday","Gestern" },
1182{ "Day after tomorrow","Übermorgen" }, 1182{ "Day after tomorrow","Übermorgen" },
1183{ "Tomorrow","Morgen" }, 1183{ "Tomorrow","Morgen" },
1184{ "Day before yesterday","Vorgestern" }, 1184{ "Day before yesterday","Vorgestern" },
1185{ "Size %1","Größe %1" }, 1185{ "Size %1","Größe %1" },
1186{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1186{ "New Agendasize: %1","Neue Agendagröße: %1" },
1187{ " (%1 y.)"," (%1 J.)" }, 1187{ " (%1 y.)"," (%1 J.)" },
1188{ "Allday:","Ganztägig:" }, 1188{ "Allday:","Ganztägig:" },
1189{ "compl.todos","erled.Todos" }, 1189{ "compl.todos","erled.Todos" },
1190{ "Day view","Tagesansicht" }, 1190{ "Day view","Tagesansicht" },
1191{ "Next days","Nächste Tage" }, 1191{ "Next days","Nächste Tage" },
1192{ "Next week","Nächste Woche" }, 1192{ "Next week","Nächste Woche" },
1193{ "Next two weeks","Nächste zwei Wochen" }, 1193{ "Next two weeks","Nächste zwei Wochen" },
1194{ "This month","Dieser Monat" }, 1194{ "This month","Dieser Monat" },
1195{ "Journal view","Journal" }, 1195{ "Journal view","Journal" },
1196{ "Display all opened","Zeige alle geöffnet" }, 1196{ "Display all opened","Zeige alle geöffnet" },
1197{ "Display all closed","Zeige alle geschlossen" }, 1197{ "Display all closed","Zeige alle geschlossen" },
1198{ "Display all flat","Zeige alle flach" }, 1198{ "Display all flat","Zeige alle flach" },
1199{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1199{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1200{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1200{ "Default todo done color:","Standard Todo erledigt Farbe" },
1201{ "Select week %1-%2","Wähle Woche %1-%2" }, 1201{ "Select week %1-%2","Wähle Woche %1-%2" },
1202{ "Select Week","Wähle Woche" }, 1202{ "Select Week","Wähle Woche" },
1203{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1203{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1204{ "Set Alarm!","Setze Alarm!" }, 1204{ "Set Alarm!","Setze Alarm!" },
1205{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1205{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1206{ " and "," und " }, 1206{ " and "," und " },
1207{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1207{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1208{ "Mail to selected","Mail an Ausgewählte" }, 1208{ "Mail to selected","Mail an Ausgewählte" },
1209{ "Mail to all","Mail an Alle" }, 1209{ "Mail to all","Mail an Alle" },
1210{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1210{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1211{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1211{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1212{ " on"," am" }, 1212{ " on"," am" },
1213{ " completed on "," erledigt am " }, 1213{ " completed on "," erledigt am " },
1214{ "Save as Event template","Speichere als Vorlage" }, 1214{ "Save as Event template","Speichere als Vorlage" },
1215{ "Load Event template","Lade Termin Vorlage" }, 1215{ "Load Event template","Lade Termin Vorlage" },
1216{ "Save as Journal template","Speichere als Journal Vorlage" }, 1216{ "Save as Journal template","Speichere als Journal Vorlage" },
1217{ "Insert Journal template","Füge Journal Vorlage ein" }, 1217{ "Insert Journal template","Füge Journal Vorlage ein" },
1218{ "Sub todos:<br>","Unter Todos:<br>" }, 1218{ "Sub todos:<br>","Unter Todos:<br>" },
1219{ "Parent todo:<br>","Über Todo:<br>" }, 1219{ "Parent todo:<br>","Über Todo:<br>" },
1220{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1220{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1221{ " completed"," erledigt" }, 1221{ " completed"," erledigt" },
1222{ "(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!" }, 1222{ "(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!" },
1223{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1223{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1224{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1224{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1225{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1225{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1226{ "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?" }, 1226{ "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?" },
1227{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1227{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1228{ "Error","Fehler" }, 1228{ "Error","Fehler" },
1229{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1229{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1230{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1230{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1231{ "Warning","Warnung" }, 1231{ "Warning","Warnung" },
1232{ "Select week number","Wähle Wochen Nummer" }, 1232{ "Select week number","Wähle Wochen Nummer" },
1233{ "Februar","Februar" }, 1233{ "Februar","Februar" },
1234{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1234{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1235{ "W","W" }, 1235{ "W","W" },
1236{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1236{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1237{ "T: %1","T: %1" }, 1237{ "T: %1","T: %1" },
1238{ "Start: ","Start: " }, 1238{ "Start: ","Start: " },
1239{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1239{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1240{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1240{ "Password for remote access:","Passwort für fernen Zugriff:" },
1241{ "Remote IP address:","Ferne IP Adresse:" }, 1241{ "Remote IP address:","Ferne IP Adresse:" },
1242{ "Remote port number:","Ferne Port Nummer:" }, 1242{ "Remote port number:","Ferne Port Nummer:" },
1243{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1243{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1244{ "Remote from: ","Fern von: " }, 1244{ "Remote from: ","Fern von: " },
1245{ "Local from: ","Lokal von: " }, 1245{ "Local from: ","Lokal von: " },
1246{ "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" }, 1246{ "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" },
1247{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1247{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1248{ "Write back","Schreibe zurück" }, 1248{ "Write back","Schreibe zurück" },
1249{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1249{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1250{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1250{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1251{ "Received sync request","Sync Anfrage erhalten" }, 1251{ "Received sync request","Sync Anfrage erhalten" },
1252{ "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." }, 1252{ "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." },
1253{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1253{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1254{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1254{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1255{ "Sending file...","Sende Datei..." }, 1255{ "Sending file...","Sende Datei..." },
1256{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1256{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1257{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1257{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1258{ "Received %1 bytes","%1 Bytes erhalten" }, 1258{ "Received %1 bytes","%1 Bytes erhalten" },
1259{ "Writing file to disk...","Speichere Datei..." }, 1259{ "Writing file to disk...","Speichere Datei..." },
1260{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1260{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1261{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1261{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1262{ "Synchronize!","Synchronisiere!" }, 1262{ "Synchronize!","Synchronisiere!" },
1263{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1263{ "High clock skew!","Großer Uhrzeitunterschied!" },
1264{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1264{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1265{ "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!" }, 1265{ "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!" },
1266{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1266{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1267{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1267{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1268{ "List week view","Listenwochenansicht" }, 1268{ "List week view","Listenwochenansicht" },
1269{ "List week","Listenwochenansicht" }, 1269{ "List week","Listenwochenansicht" },
1270{ "Next Week","Nächste Woche" }, 1270{ "Next Week","Nächste Woche" },
1271{ "Previous Week","Vorherige Woche" }, 1271{ "Previous Week","Vorherige Woche" },
1272{ "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." }, 1272{ "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." },
1273{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1273{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1274{ "Details","Details" }, 1274{ "Details","Details" },
1275{ "Created time","Erstellt Zeit" }, 1275{ "Created time","Erstellt Zeit" },
1276{ "Last modified time","Geändert Zeit" }, 1276{ "Last modified time","Geändert Zeit" },
1277{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1277{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1278{ "View Options","Anzeige Optionen" }, 1278{ "View Options","Anzeige Optionen" },
1279{ "<b>Created: ","<b>Erstellt am: " }, 1279{ "<b>Created: ","<b>Erstellt am: " },
1280{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1280{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1281{ "Journal: ","Journal: " }, 1281{ "Journal: ","Journal: " },
1282{ "yearly","jährlich" }, 1282{ "yearly","jährlich" },
1283{ "(%1) ","%1-" }, 1283{ "(%1) ","%1-" },
1284{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1284{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1285{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1285{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1286{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1286{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1287{ "Summary/Loc.","Titel/Ort" }, 1287{ "Summary/Loc.","Titel/Ort" },
1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1288{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1289{ "Week Number","Wochennummer" }, 1289{ "Week Number","Wochennummer" },
1290{ "Import","Importiere" }, 1290{ "Import","Importiere" },
1291{ "Export","Exportiere" }, 1291{ "Export","Exportiere" },
1292{ "Beam","Beame" }, 1292{ "Beam","Beame" },
1293{ "Export selected","Exportiere Selektierte" }, 1293{ "Export selected","Exportiere Selektierte" },
1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1294{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1295{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1296{ "Journal/Details...","Journale/Details..." }, 1296{ "Journal/Details...","Journale/Details..." },
1297{ "Agenda View","Agenda Ansicht" }, 1297{ "Agenda View","Agenda Ansicht" },
1298{ "Show current time","Zeige aktuelle Zeit" }, 1298{ "Show current time","Zeige aktuelle Zeit" },
1299{ "Edit new item","Bearbeite neuen Eintrag" }, 1299{ "Edit new item","Bearbeite neuen Eintrag" },
1300{ "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" }, 1300{ "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" },
1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1301{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1302{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1303{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1304{ "%1 days\n","%1 Tagen\n" }, 1304{ "%1 days\n","%1 Tagen\n" },
1305{ "1 day\n","1 Tag\n" }, 1305{ "1 day\n","1 Tag\n" },
1306{ "%1 hours\n","%1 Stunden\n" }, 1306{ "%1 hours\n","%1 Stunden\n" },
1307{ "1 hour\n","1 Stunde\n" }, 1307{ "1 hour\n","1 Stunde\n" },
1308{ "%1 minutes\n","%1 Minuten\n" }, 1308{ "%1 minutes\n","%1 Minuten\n" },
1309{ "1 minute\n","1 Minute\n" }, 1309{ "1 minute\n","1 Minute\n" },
1310{ "Only one toolbar","Nur eine Toolbar" }, 1310{ "Only one toolbar","Nur eine Toolbar" },
1311{ "Print","Drucke" }, 1311{ "Print","Drucke" },
1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1312{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1313{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1313{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1314{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1315{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1316{ "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" }, 1316{ "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" },
1317{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1317{ "KO/Pi Printout","KO/Pi Ausdruck" },
1318{ "Print unscaled","Drucke unskaliert" }, 1318{ "Print unscaled","Drucke unskaliert" },
1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1319{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1320{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1321{ "Printout Mode","Druck Modus" }, 1321{ "Printout Mode","Druck Modus" },
1322{ "Filter menu icon","Filtermenu Icon" }, 1322{ "Filter menu icon","Filtermenu Icon" },
1323{ "<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" }, 1323{ "<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" },
1324{ "<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" }, 1324{ "<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" },
1325{ "%1d","%1t" }, 1325{ "%1d","%1t" },
1326{ "%1h","%1std" }, 1326{ "%1h","%1std" },
1327{ "%1min","%1min" }, 1327{ "%1min","%1min" },
1328{ "( %1 before )","( %1 vorher )" }, 1328{ "( %1 before )","( %1 vorher )" },
1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1329{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1330{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1331{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" }, 1332{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" },
1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1333{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1334{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1335{ " on "," am " }, 1335{ " on "," am " },
1336{ "On: ","Am: " }, 1336{ "On: ","Am: " },
1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1337{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1338{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1339{ "Color for running todos:","Farbe für laufende Todos:" },
1340{ "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?" },
1341{ "Todo is started","Todo is gestarted" },
1342{ "Stop todo","Stoppe Todo" },
1343{ "Todo is stopped","Todo ist gestoppt" },
1344{ "Start todo","Starte Todo" },
1345{ "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?" },
1346{ "","" },
1347{ "","" },
1348{ "","" },
1349{ "","" },
1338{ "","" }, 1350{ "","" },
1339{ "","" }, 1351{ "","" },
1340{ "","" }, 1352{ "","" },
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 5879a2d..e8c7c76 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -1,511 +1,508 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <time.h> 24#include <time.h>
25#ifndef _WIN32_ 25#ifndef _WIN32_
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <qtextstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
33#include <qfont.h> 33#include <qfont.h>
34#include <qcolor.h> 34#include <qcolor.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kglobalsettings.h> 39#include <kglobalsettings.h>
40#include <kconfig.h> 40#include <kconfig.h>
41#include <klocale.h> 41#include <klocale.h>
42#include <kdebug.h> 42#include <kdebug.h>
43#include <kemailsettings.h> 43#include <kemailsettings.h>
44#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
45#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
46 46
47#include "koprefs.h" 47#include "koprefs.h"
48#include "mainwindow.h" 48#include "mainwindow.h"
49 49
50KOPrefs *KOPrefs::mInstance = 0; 50KOPrefs *KOPrefs::mInstance = 0;
51static KStaticDeleter<KOPrefs> insd; 51static KStaticDeleter<KOPrefs> insd;
52 52
53KOPrefs::KOPrefs() : 53KOPrefs::KOPrefs() :
54 KPimPrefs("korganizerrc") 54 KPimPrefs("korganizerrc")
55{ 55{
56 mCategoryColors.setAutoDelete(true); 56 mCategoryColors.setAutoDelete(true);
57 fillMailDefaults(); 57 fillMailDefaults();
58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196); 58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
59 QColor defaultHolidayColor = QColor(255,0,0); 59 QColor defaultHolidayColor = QColor(255,0,0);
60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
63 QColor defaultTodoDueTodayColor = QColor(255,220,100); 63 QColor defaultTodoDueTodayColor = QColor(255,220,100);
64 QColor defaultTodoOverdueColor = QColor(255,153,125); 64 QColor defaultTodoOverdueColor = QColor(255,153,125);
65 65 QColor defaultTodoRunColor = QColor(99,194,30);
66
67 KPrefs::setCurrentGroup("General"); 66 KPrefs::setCurrentGroup("General");
68
69
70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 67 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
71
72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 68 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 69 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
74 addItemBool("ShowIconSearch",&mShowIconSearch,true); 70 addItemBool("ShowIconSearch",&mShowIconSearch,true);
75 addItemBool("ShowIconList",&mShowIconList,true); 71 addItemBool("ShowIconList",&mShowIconList,true);
76 addItemBool("ShowIconDay1",&mShowIconDay1,true); 72 addItemBool("ShowIconDay1",&mShowIconDay1,true);
77 addItemBool("ShowIconDay5",&mShowIconDay5,true); 73 addItemBool("ShowIconDay5",&mShowIconDay5,true);
78 addItemBool("ShowIconDay6",&mShowIconDay6,true); 74 addItemBool("ShowIconDay6",&mShowIconDay6,true);
79 addItemBool("ShowIconDay7",&mShowIconDay7,true); 75 addItemBool("ShowIconDay7",&mShowIconDay7,true);
80 addItemBool("ShowIconMonth",&mShowIconMonth,true); 76 addItemBool("ShowIconMonth",&mShowIconMonth,true);
81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 77 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 78 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
83 addItemBool("ShowIconBack",&mShowIconBack,true); 79 addItemBool("ShowIconBack",&mShowIconBack,true);
84 addItemBool("ShowIconToday",&mShowIconToday,true); 80 addItemBool("ShowIconToday",&mShowIconToday,true);
85 addItemBool("ShowIconForward",&mShowIconForward,true); 81 addItemBool("ShowIconForward",&mShowIconForward,true);
86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 82 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 83 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
88 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); 84 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true);
89 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 85 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
90 addItemBool("ShowIconNext",&mShowIconNext,true); 86 addItemBool("ShowIconNext",&mShowIconNext,true);
91 addItemBool("ShowIconJournal",&mShowIconJournal,true); 87 addItemBool("ShowIconJournal",&mShowIconJournal,true);
92 addItemBool("ShowIconStretch",&mShowIconStretch,true); 88 addItemBool("ShowIconStretch",&mShowIconStretch,true);
93 addItemBool("ShowIconFilter",&mShowIconFilter,false); 89 addItemBool("ShowIconFilter",&mShowIconFilter,false);
94 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); 90 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true);
95 91
96 bool addIcons = false; 92 bool addIcons = false;
97#ifdef DESKTOP_VERSION 93#ifdef DESKTOP_VERSION
98 addIcons = true; 94 addIcons = true;
99#endif 95#endif
100 addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); 96 addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons);
101 addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); 97 addItemBool("ShowIconAllday",&mShowIconAllday,addIcons);
102 addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); 98 addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons);
103 addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); 99 addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons);
104 100
105 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 101 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
106 102
107 addItemBool("AskForQuit",&mAskForQuit,false); 103 addItemBool("AskForQuit",&mAskForQuit,false);
108 104
109#ifndef DESKTOP_VERSION 105#ifndef DESKTOP_VERSION
110 addItemBool("ShowFullMenu",&mShowFullMenu,false); 106 addItemBool("ShowFullMenu",&mShowFullMenu,false);
111#else 107#else
112 addItemBool("ShowFullMenu",&mShowFullMenu,true); 108 addItemBool("ShowFullMenu",&mShowFullMenu,true);
113#endif 109#endif
114 addItemBool("ToolBarHor",&mToolBarHor, true ); 110 addItemBool("ToolBarHor",&mToolBarHor, true );
115 addItemBool("ToolBarUp",&mToolBarUp, false ); 111 addItemBool("ToolBarUp",&mToolBarUp, false );
116 addItemBool("ToolBarHorV",&mToolBarHorV, true ); 112 addItemBool("ToolBarHorV",&mToolBarHorV, true );
117 addItemBool("ToolBarUpV",&mToolBarUpV, false ); 113 addItemBool("ToolBarUpV",&mToolBarUpV, false );
118 addItemBool("ToolBarHorN",&mToolBarHorN, true ); 114 addItemBool("ToolBarHorN",&mToolBarHorN, true );
119 addItemBool("ToolBarUpN",&mToolBarUpN, false ); 115 addItemBool("ToolBarUpN",&mToolBarUpN, false );
120 addItemBool("ToolBarHorF",&mToolBarHorF, true ); 116 addItemBool("ToolBarHorF",&mToolBarHorF, true );
121 addItemBool("ToolBarUpF",&mToolBarUpF, false ); 117 addItemBool("ToolBarUpF",&mToolBarUpF, false );
122 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 118 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
123 addItemInt("Whats Next Days",&mWhatsNextDays,3); 119 addItemInt("Whats Next Days",&mWhatsNextDays,3);
124 addItemInt("Whats Next Prios",&mWhatsNextPrios,1); 120 addItemInt("Whats Next Prios",&mWhatsNextPrios,1);
125 121
126 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); 122 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true);
127 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); 123 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true);
128 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); 124 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false);
129 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); 125 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true);
130 addItemInt("AllDay Size",&mAllDaySize,28); 126 addItemInt("AllDay Size",&mAllDaySize,28);
131 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; 127 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav";
132 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); 128 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm );
133 129
134 addItemStringList("LocationDefaults",&mLocationDefaults ); 130 addItemStringList("LocationDefaults",&mLocationDefaults );
135 addItemStringList("EventSummary User",&mEventSummaryUser); 131 addItemStringList("EventSummary User",&mEventSummaryUser);
136 addItemStringList("TodoSummary User",&mTodoSummaryUser); 132 addItemStringList("TodoSummary User",&mTodoSummaryUser);
137 133
138 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 134 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
139 addItemBool("Enable Project View",&mEnableProjectView,false); 135 addItemBool("Enable Project View",&mEnableProjectView,false);
140 addItemBool("Auto Save",&mAutoSave,false); 136 addItemBool("Auto Save",&mAutoSave,false);
141 addItemInt("Auto Save Interval",&mAutoSaveInterval,3); 137 addItemInt("Auto Save Interval",&mAutoSaveInterval,3);
142 addItemBool("Confirm Deletes",&mConfirm,true); 138 addItemBool("Confirm Deletes",&mConfirm,true);
143 addItemString("Archive File",&mArchiveFile); 139 addItemString("Archive File",&mArchiveFile);
144 addItemString("Html Export File",&mHtmlExportFile, 140 addItemString("Html Export File",&mHtmlExportFile,
145 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); 141 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html"));
146 addItemBool("Html With Save",&mHtmlWithSave,false); 142 addItemBool("Html With Save",&mHtmlWithSave,false);
147 143
148 KPrefs::setCurrentGroup("Personal Settings"); 144 KPrefs::setCurrentGroup("Personal Settings");
149 145
150 addItemInt("Mail Client",&mMailClient,MailClientKMail); 146 addItemInt("Mail Client",&mMailClient,MailClientKMail);
151 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 147 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
152 addItemBool("Bcc",&mBcc,false); 148 addItemBool("Bcc",&mBcc,false);
153 149
154 KPrefs::setCurrentGroup("Time & Date"); 150 KPrefs::setCurrentGroup("Time & Date");
155 151
156 152
157 addItemInt("Default Start Time",&mStartTime,10); 153 addItemInt("Default Start Time",&mStartTime,10);
158 addItemInt("Default Duration",&mDefaultDuration,2); 154 addItemInt("Default Duration",&mDefaultDuration,2);
159 addItemInt("Default Alarm Time",&mAlarmTime,3); 155 addItemInt("Default Alarm Time",&mAlarmTime,3);
160 KPrefs::setCurrentGroup("AlarmSettings"); 156 KPrefs::setCurrentGroup("AlarmSettings");
161 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 157 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
162 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 158 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
163 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 159 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
164 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 160 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
165 161
166 162
167 KPrefs::setCurrentGroup("Calendar"); 163 KPrefs::setCurrentGroup("Calendar");
168 164
169 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 165 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
170 166
171 KPrefs::setCurrentGroup("Fonts"); 167 KPrefs::setCurrentGroup("Fonts");
172 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 168 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
173 QFont fon = KGlobalSettings::generalFont(); 169 QFont fon = KGlobalSettings::generalFont();
174 addItemFont("TimeBar Font",&mTimeBarFont,fon ); 170 addItemFont("TimeBar Font",&mTimeBarFont,fon );
175 addItemFont("MonthView Font",&mMonthViewFont,fon); 171 addItemFont("MonthView Font",&mMonthViewFont,fon);
176 addItemFont("AgendaView Font",&mAgendaViewFont,fon); 172 addItemFont("AgendaView Font",&mAgendaViewFont,fon);
177 addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); 173 addItemFont("MarcusBains Font",&mMarcusBainsFont,fon);
178 addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); 174 addItemFont("TimeLabels Font",&mTimeLabelsFont,fon);
179 addItemFont("TodoView Font",&mTodoViewFont,fon); 175 addItemFont("TodoView Font",&mTodoViewFont,fon);
180 addItemFont("ListView Font",&mListViewFont,fon); 176 addItemFont("ListView Font",&mListViewFont,fon);
181 addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); 177 addItemFont("DateNavigator Font",&mDateNavigatorFont,fon);
182 addItemFont("EditBox Font",&mEditBoxFont,fon); 178 addItemFont("EditBox Font",&mEditBoxFont,fon);
183 addItemFont("JournalView Font",&mJornalViewFont,fon); 179 addItemFont("JournalView Font",&mJornalViewFont,fon);
184 addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); 180 addItemFont("WhatsNextView Font",&mWhatsNextFont,fon);
185 addItemFont("EventView Font",&mEventViewFont,fon); 181 addItemFont("EventView Font",&mEventViewFont,fon);
186 182
187 KPrefs::setCurrentGroup("RemoteSyncing"); 183 KPrefs::setCurrentGroup("RemoteSyncing");
188 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 184 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
189 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 185 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
190 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 186 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
191 addItemInt("LastSyncTime",&mLastSyncTime,0); 187 addItemInt("LastSyncTime",&mLastSyncTime,0);
192 188
193#ifdef _WIN32_ 189#ifdef _WIN32_
194 QString hdp= locateLocal("data","korganizer")+"\\\\"; 190 QString hdp= locateLocal("data","korganizer")+"\\\\";
195#else 191#else
196 QString hdp= locateLocal("data","korganizer")+"/"; 192 QString hdp= locateLocal("data","korganizer")+"/";
197#endif 193#endif
198 194
199 KPrefs::setCurrentGroup("LoadSaveFileNames"); 195 KPrefs::setCurrentGroup("LoadSaveFileNames");
200 196
201 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 197 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
202 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 198 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
203 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 199 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
204 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); 200 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" );
205 201
206 202
207 KPrefs::setCurrentGroup("Locale"); 203 KPrefs::setCurrentGroup("Locale");
208 addItemBool("ShortDateInViewer",&mShortDateInViewer,false); 204 addItemBool("ShortDateInViewer",&mShortDateInViewer,false);
209 205
210 206
211 KPrefs::setCurrentGroup("Colors"); 207 KPrefs::setCurrentGroup("Colors");
212 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); 208 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor);
213 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); 209 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
214 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); 210 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
215 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); 211 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
216 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 212 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
217 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); 213 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
218 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); 214 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor);
219 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); 215 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor);
216 addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor);
220 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); 217 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 ));
221 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); 218 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 ));
222 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); 219 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 ));
223 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); 220 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true);
224 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); 221 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true);
225 addItemBool("MonthViewWeek",&mMonthViewWeek,false); 222 addItemBool("MonthViewWeek",&mMonthViewWeek,false);
226 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); 223 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false);
227 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); 224 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 ));
228 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); 225 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 ));
229 addItemBool("UseAppColors",&mUseAppColors,false); 226 addItemBool("UseAppColors",&mUseAppColors,false);
230 227
231 228
232 229
233 KPrefs::setCurrentGroup("Views"); 230 KPrefs::setCurrentGroup("Views");
234 addItemBool("Show Date Navigator",&mShowDateNavigator,true); 231 addItemBool("Show Date Navigator",&mShowDateNavigator,true);
235 addItemInt("Hour Size",&mHourSize,8); 232 addItemInt("Hour Size",&mHourSize,8);
236 addItemBool("Show Daily Recurrences",&mDailyRecur,true); 233 addItemBool("Show Daily Recurrences",&mDailyRecur,true);
237 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); 234 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true);
238 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); 235 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true);
239 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); 236 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true);
240 addItemBool("ShowShortMonthName",&mMonthShowShort,false); 237 addItemBool("ShowShortMonthName",&mMonthShowShort,false);
241 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); 238 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true);
242#ifdef DESKTOP_VERION 239#ifdef DESKTOP_VERION
243 addItemBool("Enable ToolTips",&mEnableToolTips,true); 240 addItemBool("Enable ToolTips",&mEnableToolTips,true);
244#else 241#else
245 addItemBool("Enable ToolTips",&mEnableToolTips,false); 242 addItemBool("Enable ToolTips",&mEnableToolTips,false);
246#endif 243#endif
247 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); 244 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false);
248 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); 245 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false);
249 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); 246 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true);
250 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); 247 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true);
251 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); 248 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true);
252 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); 249 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false);
253 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); 250 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false);
254 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); 251 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true);
255 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); 252 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true);
256 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; 253 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);;
257 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); 254 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true);
258 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); 255 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false);
259 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); 256 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false);
260 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); 257 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true);
261 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); 258 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false);
262 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); 259 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false);
263 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); 260 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true);
264 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); 261 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true);
265 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); 262 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false);
266 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); 263 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false);
267#ifdef DESKTOP_VERSION 264#ifdef DESKTOP_VERSION
268 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); 265 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true);
269#else 266#else
270 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); 267 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false);
271#endif 268#endif
272 addItemInt("Day Begins",&mDayBegins,7); 269 addItemInt("Day Begins",&mDayBegins,7);
273 addItemInt("Working Hours Start",&mWorkingHoursStart,8); 270 addItemInt("Working Hours Start",&mWorkingHoursStart,8);
274 addItemInt("Working Hours End",&mWorkingHoursEnd,17); 271 addItemInt("Working Hours End",&mWorkingHoursEnd,17);
275 addItemBool("Exclude Holidays",&mExcludeHolidays,true); 272 addItemBool("Exclude Holidays",&mExcludeHolidays,true);
276 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); 273 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true);
277 274
278 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); 275 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false);
279 addItemBool("Full View Month",&mFullViewMonth,true); 276 addItemBool("Full View Month",&mFullViewMonth,true);
280 addItemBool("Full View Todo",&mFullViewTodo,true); 277 addItemBool("Full View Todo",&mFullViewTodo,true);
281 addItemBool("Quick Todo",&mEnableQuickTodo,false); 278 addItemBool("Quick Todo",&mEnableQuickTodo,false);
282 279
283 addItemInt("Next X Days",&mNextXDays,3); 280 addItemInt("Next X Days",&mNextXDays,3);
284 281
285 KPrefs::setCurrentGroup("Printer"); 282 KPrefs::setCurrentGroup("Printer");
286 283
287 KPrefs::setCurrentGroup("Layout"); 284 KPrefs::setCurrentGroup("Layout");
288 285
289 addItemBool("CompactDialogs",&mCompactDialogs,false); 286 addItemBool("CompactDialogs",&mCompactDialogs,false);
290 addItemBool("VerticalScreen",&mVerticalScreen,true); 287 addItemBool("VerticalScreen",&mVerticalScreen,true);
291 288
292 KPrefs::setCurrentGroup("KOrganizer Plugins"); 289 KPrefs::setCurrentGroup("KOrganizer Plugins");
293 290
294 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); 291 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays");
295 292
296 KPrefs::setCurrentGroup("Group Scheduling"); 293 KPrefs::setCurrentGroup("Group Scheduling");
297 294
298 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); 295 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
299 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); 296 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
300 addItemStringList("AdditionalMails",&mAdditionalMails,""); 297 addItemStringList("AdditionalMails",&mAdditionalMails,"");
301 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); 298 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
302 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); 299 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
303 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); 300 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
304 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); 301 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto);
305 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); 302 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto);
306 303
307 KPrefs::setCurrentGroup( "Editors" ); 304 KPrefs::setCurrentGroup( "Editors" );
308 305
309 addItemStringList( "EventTemplates", &mEventTemplates ); 306 addItemStringList( "EventTemplates", &mEventTemplates );
310 addItemStringList( "TodoTemplates", &mTodoTemplates ); 307 addItemStringList( "TodoTemplates", &mTodoTemplates );
311 308
312 addItemInt("DestinationPolicy",&mDestination,standardDestination); 309 addItemInt("DestinationPolicy",&mDestination,standardDestination);
313 310
314 KPrefs::setCurrentGroup( "ViewOptions" ); 311 KPrefs::setCurrentGroup( "ViewOptions" );
315 addItemBool("EVshowDetails",&mEVshowDetails,true); 312 addItemBool("EVshowDetails",&mEVshowDetails,true);
316 addItemBool("EVshowCreated",&mEVshowCreated,true); 313 addItemBool("EVshowCreated",&mEVshowCreated,true);
317 addItemBool("EVshowChanged",&mEVshowChanged,true); 314 addItemBool("EVshowChanged",&mEVshowChanged,true);
318 addItemBool("WTshowDetails",&mWTshowDetails,false); 315 addItemBool("WTshowDetails",&mWTshowDetails,false);
319 addItemBool("WTshowCreated",&mWTshowCreated,false); 316 addItemBool("WTshowCreated",&mWTshowCreated,false);
320 addItemBool("WTshowChanged",&mWTshowChanged,false); 317 addItemBool("WTshowChanged",&mWTshowChanged,false);
321 318
322} 319}
323 320
324 321
325KOPrefs::~KOPrefs() 322KOPrefs::~KOPrefs()
326{ 323{
327 if (mInstance == this) 324 if (mInstance == this)
328 mInstance = insd.setObject(0); 325 mInstance = insd.setObject(0);
329 326
330 //qDebug("KOPrefs::~KOPrefs() "); 327 //qDebug("KOPrefs::~KOPrefs() ");
331} 328}
332 329
333 330
334KOPrefs *KOPrefs::instance() 331KOPrefs *KOPrefs::instance()
335{ 332{
336 if (!mInstance) { 333 if (!mInstance) {
337 mInstance = insd.setObject(new KOPrefs()); 334 mInstance = insd.setObject(new KOPrefs());
338 mInstance->readConfig(); 335 mInstance->readConfig();
339 } 336 }
340 337
341 return mInstance; 338 return mInstance;
342} 339}
343 340
344void KOPrefs::usrSetDefaults() 341void KOPrefs::usrSetDefaults()
345{ 342{
346 343
347} 344}
348 345
349void KOPrefs::fillMailDefaults() 346void KOPrefs::fillMailDefaults()
350{ 347{
351 if (mName.isEmpty()) mName = i18n("Anonymous"); 348 if (mName.isEmpty()) mName = i18n("Anonymous");
352 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); 349 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere");
353} 350}
354 351
355void KOPrefs::setTimeZoneIdDefault() 352void KOPrefs::setTimeZoneIdDefault()
356{ 353{
357 ; 354 ;
358} 355}
359 356
360void KOPrefs::setAllDefaults() 357void KOPrefs::setAllDefaults()
361{ 358{
362 setCategoryDefaults(); 359 setCategoryDefaults();
363 mEventSummaryUser = getDefaultList() ; 360 mEventSummaryUser = getDefaultList() ;
364 mTodoSummaryUser = getDefaultList() ; 361 mTodoSummaryUser = getDefaultList() ;
365 mLocationDefaults = getLocationDefaultList(); 362 mLocationDefaults = getLocationDefaultList();
366} 363}
367 364
368void KOPrefs::setCategoryDefaults() 365void KOPrefs::setCategoryDefaults()
369{ 366{
370 mCustomCategories.clear(); 367 mCustomCategories.clear();
371 mCustomCategories = getDefaultList(); 368 mCustomCategories = getDefaultList();
372 369
373 QStringList::Iterator it; 370 QStringList::Iterator it;
374 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 371 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
375 setCategoryColor(*it,mDefaultCategoryColor); 372 setCategoryColor(*it,mDefaultCategoryColor);
376 } 373 }
377} 374}
378QStringList KOPrefs::getLocationDefaultList() 375QStringList KOPrefs::getLocationDefaultList()
379{ 376{
380 QStringList retval ; 377 QStringList retval ;
381 retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") 378 retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach")
382 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") 379 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room")
383 << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") 380 << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten")
384 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; 381 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ;
385 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") 382 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("")
386 383
387 retval.sort(); 384 retval.sort();
388 return retval; 385 return retval;
389} 386}
390QStringList KOPrefs::getDefaultList() 387QStringList KOPrefs::getDefaultList()
391{ 388{
392 QStringList retval ; 389 QStringList retval ;
393 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") 390 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer")
394 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") 391 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner")
395 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") 392 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts")
396 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") 393 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids")
397 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") 394 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel")
398 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") 395 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping")
399 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") 396 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University")
400 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; 397 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ;
401 retval.sort(); 398 retval.sort();
402 //qDebug("cat %s ", retval.join("-").latin1()); 399 //qDebug("cat %s ", retval.join("-").latin1());
403 return retval; 400 return retval;
404} 401}
405 402
406void KOPrefs::usrReadConfig() 403void KOPrefs::usrReadConfig()
407{ 404{
408 config()->setGroup("General"); 405 config()->setGroup("General");
409 406
410 //qDebug("KOPrefs::usrReadConfig() "); 407 //qDebug("KOPrefs::usrReadConfig() ");
411 mCustomCategories = config()->readListEntry("Custom Categories"); 408 mCustomCategories = config()->readListEntry("Custom Categories");
412 mOldLoadedLanguage = mOldLanguage ; 409 mOldLoadedLanguage = mOldLanguage ;
413 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; 410 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage;
414 if (mLocationDefaults.isEmpty()) { 411 if (mLocationDefaults.isEmpty()) {
415 mLocationDefaults = getLocationDefaultList(); 412 mLocationDefaults = getLocationDefaultList();
416 } 413 }
417 414
418 if (mEventSummaryUser.isEmpty()) { 415 if (mEventSummaryUser.isEmpty()) {
419 mEventSummaryUser = getDefaultList() ; 416 mEventSummaryUser = getDefaultList() ;
420 } 417 }
421 if (mTodoSummaryUser.isEmpty()) { 418 if (mTodoSummaryUser.isEmpty()) {
422 mTodoSummaryUser = getDefaultList() ; 419 mTodoSummaryUser = getDefaultList() ;
423 } 420 }
424 421
425 if (mCustomCategories.isEmpty()) setCategoryDefaults(); 422 if (mCustomCategories.isEmpty()) setCategoryDefaults();
426 423
427 config()->setGroup("Personal Settings"); 424 config()->setGroup("Personal Settings");
428 mName = config()->readEntry("user_name",""); 425 mName = config()->readEntry("user_name","");
429 mEmail = config()->readEntry("user_email",""); 426 mEmail = config()->readEntry("user_email","");
430 fillMailDefaults(); 427 fillMailDefaults();
431 428
432 config()->setGroup("Category Colors"); 429 config()->setGroup("Category Colors");
433 QStringList::Iterator it; 430 QStringList::Iterator it;
434 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 431 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
435 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); 432 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor));
436 433
437 } 434 }
438 435
439 KPimPrefs::usrReadConfig(); 436 KPimPrefs::usrReadConfig();
440} 437}
441 438
442 439
443void KOPrefs::usrWriteConfig() 440void KOPrefs::usrWriteConfig()
444{ 441{
445 config()->setGroup("General"); 442 config()->setGroup("General");
446 config()->writeEntry("Custom Categories",mCustomCategories); 443 config()->writeEntry("Custom Categories",mCustomCategories);
447 444
448 config()->setGroup("Personal Settings"); 445 config()->setGroup("Personal Settings");
449 config()->writeEntry("user_name",mName); 446 config()->writeEntry("user_name",mName);
450 config()->writeEntry("user_email",mEmail); 447 config()->writeEntry("user_email",mEmail);
451 448
452 config()->setGroup("Category Colors"); 449 config()->setGroup("Category Colors");
453 QDictIterator<QColor> it(mCategoryColors); 450 QDictIterator<QColor> it(mCategoryColors);
454 while (it.current()) { 451 while (it.current()) {
455 config()->writeEntry(it.currentKey(),*(it.current())); 452 config()->writeEntry(it.currentKey(),*(it.current()));
456 ++it; 453 ++it;
457 } 454 }
458 455
459 456
460 KPimPrefs::usrWriteConfig(); 457 KPimPrefs::usrWriteConfig();
461} 458}
462 459
463void KOPrefs::setCategoryColor(QString cat,const QColor & color) 460void KOPrefs::setCategoryColor(QString cat,const QColor & color)
464{ 461{
465 mCategoryColors.replace(cat,new QColor(color)); 462 mCategoryColors.replace(cat,new QColor(color));
466} 463}
467 464
468QColor *KOPrefs::categoryColor(QString cat) 465QColor *KOPrefs::categoryColor(QString cat)
469{ 466{
470 QColor *color = 0; 467 QColor *color = 0;
471 468
472 if (!cat.isEmpty()) color = mCategoryColors[cat]; 469 if (!cat.isEmpty()) color = mCategoryColors[cat];
473 470
474 if (color) return color; 471 if (color) return color;
475 else return &mDefaultCategoryColor; 472 else return &mDefaultCategoryColor;
476} 473}
477 474
478void KOPrefs::setFullName(const QString &name) 475void KOPrefs::setFullName(const QString &name)
479{ 476{
480 mName = name; 477 mName = name;
481} 478}
482 479
483void KOPrefs::setEmail(const QString &email) 480void KOPrefs::setEmail(const QString &email)
484{ 481{
485 //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); 482 //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() );
486 mEmail = email; 483 mEmail = email;
487} 484}
488 485
489QString KOPrefs::fullName() 486QString KOPrefs::fullName()
490{ 487{
491 if (mEmailControlCenter) { 488 if (mEmailControlCenter) {
492 KEMailSettings settings; 489 KEMailSettings settings;
493 return settings.getSetting(KEMailSettings::RealName); 490 return settings.getSetting(KEMailSettings::RealName);
494 } else { 491 } else {
495 return mName; 492 return mName;
496 } 493 }
497} 494}
498 495
499QString KOPrefs::email() 496QString KOPrefs::email()
500{ 497{
501 if (mEmailControlCenter) { 498 if (mEmailControlCenter) {
502 KEMailSettings settings; 499 KEMailSettings settings;
503 return settings.getSetting(KEMailSettings::EmailAddress); 500 return settings.getSetting(KEMailSettings::EmailAddress);
504 } else { 501 } else {
505 return mEmail; 502 return mEmail;
506 } 503 }
507} 504}
508KConfig* KOPrefs::getConfig() 505KConfig* KOPrefs::getConfig()
509{ 506{
510 return config(); 507 return config();
511} 508}
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index cf8dae6..d511faa 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -1,316 +1,317 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOPREFS_H 23#ifndef KOPREFS_H
24#define KOPREFS_H 24#define KOPREFS_H
25 25
26 26
27#include <libkdepim/kpimprefs.h> 27#include <libkdepim/kpimprefs.h>
28#include <qdict.h> 28#include <qdict.h>
29 29
30class KConfig; 30class KConfig;
31class QFont; 31class QFont;
32class QColor; 32class QColor;
33class QStringList; 33class QStringList;
34 34
35#define VIEW_WN_VIEW 1 35#define VIEW_WN_VIEW 1
36#define VIEW_NX_VIEW 2 36#define VIEW_NX_VIEW 2
37#define VIEW_J_VIEW 3 37#define VIEW_J_VIEW 3
38#define VIEW_A_VIEW 4 38#define VIEW_A_VIEW 4
39#define VIEW_ML_VIEW 5 39#define VIEW_ML_VIEW 5
40#define VIEW_M_VIEW 6 40#define VIEW_M_VIEW 6
41#define VIEW_L_VIEW 7 41#define VIEW_L_VIEW 7
42#define VIEW_T_VIEW 8 42#define VIEW_T_VIEW 8
43 43
44class KOPrefs : public KPimPrefs 44class KOPrefs : public KPimPrefs
45{ 45{
46 public: 46 public:
47 enum { FormatVCalendar, FormatICalendar }; 47 enum { FormatVCalendar, FormatICalendar };
48 enum { MailClientKMail, MailClientSendmail }; 48 enum { MailClientKMail, MailClientSendmail };
49 enum { IMIPDummy, IMIPKMail }; 49 enum { IMIPDummy, IMIPKMail };
50 enum { IMIPOutbox, IMIPdirectsend }; 50 enum { IMIPOutbox, IMIPdirectsend };
51 enum { neverAuto, addressbookAuto, selectedAuto }; 51 enum { neverAuto, addressbookAuto, selectedAuto };
52 enum { standardDestination, askDestination }; 52 enum { standardDestination, askDestination };
53 53
54 virtual ~KOPrefs(); 54 virtual ~KOPrefs();
55 55
56 /** Get instance of KOPrefs. It is made sure that there is only one 56 /** Get instance of KOPrefs. It is made sure that there is only one
57 instance. */ 57 instance. */
58 static KOPrefs *instance(); 58 static KOPrefs *instance();
59 59
60 /** Set preferences to default values */ 60 /** Set preferences to default values */
61 void usrSetDefaults(); 61 void usrSetDefaults();
62 62
63 /** Read preferences from config file */ 63 /** Read preferences from config file */
64 void usrReadConfig(); 64 void usrReadConfig();
65 65
66 /** Write preferences to config file */ 66 /** Write preferences to config file */
67 void usrWriteConfig(); 67 void usrWriteConfig();
68 void setCategoryDefaults(); 68 void setCategoryDefaults();
69 void setAllDefaults(); 69 void setAllDefaults();
70 70
71 protected: 71 protected:
72 void setTimeZoneIdDefault(); 72 void setTimeZoneIdDefault();
73 73
74 /** Fill empty mail fields with default values. */ 74 /** Fill empty mail fields with default values. */
75 void fillMailDefaults(); 75 void fillMailDefaults();
76 76
77 private: 77 private:
78 /** Constructor disabled for public. Use instance() to create a KOPrefs 78 /** Constructor disabled for public. Use instance() to create a KOPrefs
79 object. */ 79 object. */
80 KOPrefs(); 80 KOPrefs();
81 81
82 static KOPrefs *mInstance; 82 static KOPrefs *mInstance;
83 QStringList getDefaultList(); 83 QStringList getDefaultList();
84 QStringList getLocationDefaultList(); 84 QStringList getLocationDefaultList();
85 public: 85 public:
86 // preferences data 86 // preferences data
87 KConfig* getConfig(); 87 KConfig* getConfig();
88 void setFullName(const QString &); 88 void setFullName(const QString &);
89 QString fullName(); 89 QString fullName();
90 void setEmail(const QString &); 90 void setEmail(const QString &);
91 QString email(); 91 QString email();
92 92
93 QString mAdditional; 93 QString mAdditional;
94 94
95 bool mEmailControlCenter; 95 bool mEmailControlCenter;
96 96
97 bool mBcc; 97 bool mBcc;
98 bool mAutoSave; 98 bool mAutoSave;
99 int mAutoSaveInterval; 99 int mAutoSaveInterval;
100 bool mConfirm; 100 bool mConfirm;
101 101
102 bool mEnableGroupScheduling; 102 bool mEnableGroupScheduling;
103 bool mEnableProjectView; 103 bool mEnableProjectView;
104 104
105 int mDefaultFormat; 105 int mDefaultFormat;
106 int mMailClient; 106 int mMailClient;
107 107
108 int mStartTime; 108 int mStartTime;
109 int mDefaultDuration; 109 int mDefaultDuration;
110 int mAlarmTime; 110 int mAlarmTime;
111 111
112 int mWorkingHoursStart; 112 int mWorkingHoursStart;
113 int mWorkingHoursEnd; 113 int mWorkingHoursEnd;
114 bool mExcludeHolidays; 114 bool mExcludeHolidays;
115 bool mExcludeSaturdays; 115 bool mExcludeSaturdays;
116 bool mMarcusBainsShowSeconds; 116 bool mMarcusBainsShowSeconds;
117 117
118 QFont mTimeBarFont; 118 QFont mTimeBarFont;
119 QFont mMonthViewFont; 119 QFont mMonthViewFont;
120 QFont mAgendaViewFont; 120 QFont mAgendaViewFont;
121 QFont mMarcusBainsFont; 121 QFont mMarcusBainsFont;
122 QFont mTimeLabelsFont; 122 QFont mTimeLabelsFont;
123 QFont mTodoViewFont; 123 QFont mTodoViewFont;
124 QFont mListViewFont; 124 QFont mListViewFont;
125 QFont mDateNavigatorFont; 125 QFont mDateNavigatorFont;
126 QFont mEditBoxFont; 126 QFont mEditBoxFont;
127 QFont mJornalViewFont; 127 QFont mJornalViewFont;
128 QFont mWhatsNextFont; 128 QFont mWhatsNextFont;
129 QFont mEventViewFont; 129 QFont mEventViewFont;
130 130
131 131
132 132
133 133
134 QColor mHolidayColor; 134 QColor mHolidayColor;
135 QColor mHighlightColor; 135 QColor mHighlightColor;
136 QColor mEventColor; 136 QColor mEventColor;
137 QColor mTodoDoneColor; 137 QColor mTodoDoneColor;
138 QColor mAgendaBgColor; 138 QColor mAgendaBgColor;
139 QColor mWorkingHoursColor; 139 QColor mWorkingHoursColor;
140 QColor mTodoDueTodayColor; 140 QColor mTodoDueTodayColor;
141 QColor mTodoOverdueColor; 141 QColor mTodoOverdueColor;
142 QColor mTodoRunColor;
142 QColor mMonthViewEvenColor; 143 QColor mMonthViewEvenColor;
143 QColor mMonthViewOddColor; 144 QColor mMonthViewOddColor;
144 QColor mMonthViewHolidayColor; 145 QColor mMonthViewHolidayColor;
145 bool mMonthViewUsesDayColors; 146 bool mMonthViewUsesDayColors;
146 bool mMonthViewSatSunTog; 147 bool mMonthViewSatSunTog;
147 bool mMonthViewWeek; 148 bool mMonthViewWeek;
148 QColor mAppColor1; 149 QColor mAppColor1;
149 QColor mAppColor2; 150 QColor mAppColor2;
150 bool mUseAppColors; 151 bool mUseAppColors;
151 152
152 int mDayBegins; 153 int mDayBegins;
153 int mHourSize; 154 int mHourSize;
154 int mAllDaySize; 155 int mAllDaySize;
155 bool mShowFullMenu; 156 bool mShowFullMenu;
156 bool mDailyRecur; 157 bool mDailyRecur;
157 bool mWeeklyRecur; 158 bool mWeeklyRecur;
158 bool mMonthDailyRecur; 159 bool mMonthDailyRecur;
159 bool mMonthWeeklyRecur; 160 bool mMonthWeeklyRecur;
160 bool mMonthShowIcons; 161 bool mMonthShowIcons;
161 bool mMonthShowShort; 162 bool mMonthShowShort;
162 bool mEnableToolTips; 163 bool mEnableToolTips;
163 bool mEnableMonthScroll; 164 bool mEnableMonthScroll;
164 bool mFullViewMonth; 165 bool mFullViewMonth;
165 bool mMonthViewUsesCategoryColor; 166 bool mMonthViewUsesCategoryColor;
166 bool mFullViewTodo; 167 bool mFullViewTodo;
167 bool mShowCompletedTodo; 168 bool mShowCompletedTodo;
168 bool mMarcusBainsEnabled; 169 bool mMarcusBainsEnabled;
169 int mNextXDays; 170 int mNextXDays;
170 int mWhatsNextDays; 171 int mWhatsNextDays;
171 int mWhatsNextPrios; 172 int mWhatsNextPrios;
172 bool mEnableQuickTodo; 173 bool mEnableQuickTodo;
173 174
174 bool mCompactDialogs; 175 bool mCompactDialogs;
175 bool mVerticalScreen; 176 bool mVerticalScreen;
176 177
177 bool mShowIconNewTodo; 178 bool mShowIconNewTodo;
178 bool mShowIconNewEvent; 179 bool mShowIconNewEvent;
179 bool mShowIconSearch; 180 bool mShowIconSearch;
180 bool mShowIconList; 181 bool mShowIconList;
181 bool mShowIconDay1; 182 bool mShowIconDay1;
182 bool mShowIconDay5; 183 bool mShowIconDay5;
183 bool mShowIconDay6; 184 bool mShowIconDay6;
184 bool mShowIconDay7; 185 bool mShowIconDay7;
185 bool mShowIconMonth; 186 bool mShowIconMonth;
186 bool mShowIconTodoview; 187 bool mShowIconTodoview;
187 bool mShowIconBackFast; 188 bool mShowIconBackFast;
188 bool mShowIconBack; 189 bool mShowIconBack;
189 bool mShowIconToday; 190 bool mShowIconToday;
190 bool mShowIconForward; 191 bool mShowIconForward;
191 bool mShowIconForwardFast; 192 bool mShowIconForwardFast;
192 bool mShowIconWhatsThis; 193 bool mShowIconWhatsThis;
193 bool mShowIconWeekNum; 194 bool mShowIconWeekNum;
194 bool mShowIconNextDays; 195 bool mShowIconNextDays;
195 bool mShowIconNext; 196 bool mShowIconNext;
196 bool mShowIconJournal; 197 bool mShowIconJournal;
197 bool mShowIconFilter; 198 bool mShowIconFilter;
198 bool mShowIconOnetoolbar; 199 bool mShowIconOnetoolbar;
199 bool mShowIconNavigator; 200 bool mShowIconNavigator;
200 bool mShowIconAllday; 201 bool mShowIconAllday;
201 bool mShowIconFilterview; 202 bool mShowIconFilterview;
202 bool mShowIconToggleFull; 203 bool mShowIconToggleFull;
203 204
204 bool mShowIconStretch; 205 bool mShowIconStretch;
205 206
206 bool mToolBarHor; 207 bool mToolBarHor;
207 bool mToolBarUp; 208 bool mToolBarUp;
208 bool mToolBarHorV; 209 bool mToolBarHorV;
209 bool mToolBarUpV; 210 bool mToolBarUpV;
210 bool mToolBarHorN; 211 bool mToolBarHorN;
211 bool mToolBarUpN; 212 bool mToolBarUpN;
212 bool mToolBarHorF; 213 bool mToolBarHorF;
213 bool mToolBarUpF; 214 bool mToolBarUpF;
214 bool mToolBarMiniIcons; 215 bool mToolBarMiniIcons;
215 216
216 bool mAskForQuit; 217 bool mAskForQuit;
217 bool mUsePassWd; 218 bool mUsePassWd;
218 bool mShowSyncEvents; 219 bool mShowSyncEvents;
219 bool mShowTodoInAgenda; 220 bool mShowTodoInAgenda;
220 bool mShowTimeInAgenda; 221 bool mShowTimeInAgenda;
221 bool mHideNonStartedTodos; 222 bool mHideNonStartedTodos;
222 223
223 int mLastSyncTime; 224 int mLastSyncTime;
224 void setCategoryColor(QString cat,const QColor & color); 225 void setCategoryColor(QString cat,const QColor & color);
225 QColor *categoryColor(QString cat); 226 QColor *categoryColor(QString cat);
226 227
227 QString mArchiveFile; 228 QString mArchiveFile;
228 QString mHtmlExportFile; 229 QString mHtmlExportFile;
229 bool mHtmlWithSave; 230 bool mHtmlWithSave;
230 231
231 QStringList mSelectedPlugins; 232 QStringList mSelectedPlugins;
232 233
233 QString mLastImportFile; 234 QString mLastImportFile;
234 QString mLastVcalFile; 235 QString mLastVcalFile;
235 QString mLastSaveFile; 236 QString mLastSaveFile;
236 QString mLastLoadFile; 237 QString mLastLoadFile;
237 238
238 239
239 QString mDefaultAlarmFile; 240 QString mDefaultAlarmFile;
240 int mIMIPScheduler; 241 int mIMIPScheduler;
241 int mIMIPSend; 242 int mIMIPSend;
242 QStringList mAdditionalMails; 243 QStringList mAdditionalMails;
243 int mIMIPAutoRefresh; 244 int mIMIPAutoRefresh;
244 int mIMIPAutoInsertReply; 245 int mIMIPAutoInsertReply;
245 int mIMIPAutoInsertRequest; 246 int mIMIPAutoInsertRequest;
246 int mIMIPAutoFreeBusy; 247 int mIMIPAutoFreeBusy;
247 int mIMIPAutoFreeBusyReply; 248 int mIMIPAutoFreeBusyReply;
248 249
249 QStringList mTodoTemplates; 250 QStringList mTodoTemplates;
250 QStringList mEventTemplates; 251 QStringList mEventTemplates;
251 252
252 int mDestination; 253 int mDestination;
253 254
254 255
255 bool mEditOnDoubleClick; 256 bool mEditOnDoubleClick;
256 bool mViewChangeHoldFullscreen; 257 bool mViewChangeHoldFullscreen;
257 bool mViewChangeHoldNonFullscreen; 258 bool mViewChangeHoldNonFullscreen;
258 bool mCenterOnCurrentTime; 259 bool mCenterOnCurrentTime;
259 bool mSetTimeToDayStartAt; 260 bool mSetTimeToDayStartAt;
260 bool mHighlightCurrentDay; 261 bool mHighlightCurrentDay;
261 bool mUseHighlightLightColor; 262 bool mUseHighlightLightColor;
262 bool mListViewMonthTimespan; 263 bool mListViewMonthTimespan;
263 bool mWNViewShowsParents; 264 bool mWNViewShowsParents;
264 bool mWNViewShowsPast; 265 bool mWNViewShowsPast;
265 bool mWNViewShowLocation; 266 bool mWNViewShowLocation;
266 bool mTodoViewShowsPercentage; 267 bool mTodoViewShowsPercentage;
267 bool mTodoViewUsesCatColors; 268 bool mTodoViewUsesCatColors;
268 bool mMonthViewUsesBigFont; 269 bool mMonthViewUsesBigFont;
269 bool mTodoViewUsesSmallFont; 270 bool mTodoViewUsesSmallFont;
270 bool mTodoViewUsesForegroundColor; 271 bool mTodoViewUsesForegroundColor;
271 bool mMonthViewUsesForegroundColor; 272 bool mMonthViewUsesForegroundColor;
272 273
273 bool mHightlightDateTimeEdit; 274 bool mHightlightDateTimeEdit;
274 bool mShortDateInViewer; 275 bool mShortDateInViewer;
275 276
276 bool mShowDateNavigator; 277 bool mShowDateNavigator;
277 278
278 QStringList mLocationDefaults; 279 QStringList mLocationDefaults;
279 QStringList mEventSummaryUser; 280 QStringList mEventSummaryUser;
280 QStringList mTodoSummaryUser; 281 QStringList mTodoSummaryUser;
281 282
282 bool mUseInternalAlarmNotification; 283 bool mUseInternalAlarmNotification;
283 int mAlarmPlayBeeps; 284 int mAlarmPlayBeeps;
284 int mAlarmSuspendTime; 285 int mAlarmSuspendTime;
285 int mAlarmSuspendCount; 286 int mAlarmSuspendCount;
286 int mAlarmBeepInterval; 287 int mAlarmBeepInterval;
287 int mOldLanguage; 288 int mOldLanguage;
288 int mOldLoadedLanguage; 289 int mOldLoadedLanguage;
289 290
290 291
291 QString mActiveSyncPort; 292 QString mActiveSyncPort;
292 QString mActiveSyncIP; 293 QString mActiveSyncIP;
293 294
294 // settings for eventviewer 295 // settings for eventviewer
295 bool mEVshowDetails; 296 bool mEVshowDetails;
296 bool mEVshowCreated; 297 bool mEVshowCreated;
297 bool mEVshowChanged; 298 bool mEVshowChanged;
298 bool mWTshowDetails; 299 bool mWTshowDetails;
299 bool mWTshowCreated; 300 bool mWTshowCreated;
300 bool mWTshowChanged; 301 bool mWTshowChanged;
301 302
302 int mCurrentDisplayedView; 303 int mCurrentDisplayedView;
303 304
304 private: 305 private:
305 QDict<QColor> mCategoryColors; 306 QDict<QColor> mCategoryColors;
306 QColor mDefaultCategoryColor; 307 QColor mDefaultCategoryColor;
307 308
308 QFont mDefaultTimeBarFont; 309 QFont mDefaultTimeBarFont;
309 QFont mDefaultViewFont; 310 QFont mDefaultViewFont;
310 QFont mDefaultMonthViewFont; 311 QFont mDefaultMonthViewFont;
311 312
312 QString mName; 313 QString mName;
313 QString mEmail; 314 QString mEmail;
314}; 315};
315 316
316#endif 317#endif
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 0bbb3bf..a8943de 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1,1723 +1,1733 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <qgroupbox.h>
27#include <qbuttongroup.h> 27#include <qbuttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <qvbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <qstrlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44 44
45#include <kcolorbutton.h> 45#include <kcolorbutton.h>
46#include <kdebug.h> 46#include <kdebug.h>
47#include <klocale.h> 47#include <klocale.h>
48#include <kglobal.h> 48#include <kglobal.h>
49#include <kfontdialog.h> 49#include <kfontdialog.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <kmessagebox.h> 51#include <kmessagebox.h>
52#include <kcolordialog.h> 52#include <kcolordialog.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54#include <kemailsettings.h> 54#include <kemailsettings.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kglobalsettings.h> 56#include <kglobalsettings.h>
57 57
58#include <kurlrequester.h> 58#include <kurlrequester.h>
59#include <klineedit.h> 59#include <klineedit.h>
60 60
61#if defined(USE_SOLARIS) 61#if defined(USE_SOLARIS)
62#include <sys/param.h> 62#include <sys/param.h>
63 63
64#define ZONEINFODIR "/usr/share/lib/zoneinfo" 64#define ZONEINFODIR "/usr/share/lib/zoneinfo"
65#define INITFILE "/etc/default/init" 65#define INITFILE "/etc/default/init"
66#endif 66#endif
67 67
68#include "koprefs.h" 68#include "koprefs.h"
69 69
70#include "koprefsdialog.h" 70#include "koprefsdialog.h"
71#include "kpimglobalprefs.h" 71#include "kpimglobalprefs.h"
72 72
73 73
74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 74KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
75 KPrefsDialog(KOPrefs::instance(),parent,name,true) 75 KPrefsDialog(KOPrefs::instance(),parent,name,true)
76{ 76{
77 77
78 setFont( KGlobalSettings::generalMaxFont() ); 78 setFont( KGlobalSettings::generalMaxFont() );
79 setCaption( i18n("Preferences - some settings need a restart (nr)")); 79 setCaption( i18n("Preferences - some settings need a restart (nr)"));
80 mCategoryDict.setAutoDelete(true); 80 mCategoryDict.setAutoDelete(true);
81 81
82 KGlobal::locale()->insertCatalogue("timezones"); 82 KGlobal::locale()->insertCatalogue("timezones");
83 mSpacingHint = spacingHintSmall(); 83 mSpacingHint = spacingHintSmall();
84 mMarginHint = marginHintSmall(); 84 mMarginHint = marginHintSmall();
85#ifndef DESKTOP_VERSION 85#ifndef DESKTOP_VERSION
86 if ( QApplication::desktop()->height() == 480 ) 86 if ( QApplication::desktop()->height() == 480 )
87 hideButtons(); 87 hideButtons();
88#endif 88#endif
89 89
90 setupGlobalTab(); 90 setupGlobalTab();
91 setupMainTab(); 91 setupMainTab();
92 // setupLocaleTab(); 92 // setupLocaleTab();
93 //setupTimeZoneTab(); 93 //setupTimeZoneTab();
94 setupTimeTab(); 94 setupTimeTab();
95 //setupLocaleDateTab(); 95 //setupLocaleDateTab();
96 setupFontsTab(); 96 setupFontsTab();
97 setupColorsTab(); 97 setupColorsTab();
98 setupViewsTab(); 98 setupViewsTab();
99 //setupSyncTab(); 99 //setupSyncTab();
100 //setupSyncAlgTab(); 100 //setupSyncAlgTab();
101 //setupPrinterTab(); 101 //setupPrinterTab();
102 //setupGroupSchedulingTab(); 102 //setupGroupSchedulingTab();
103 //setupGroupAutomationTab(); 103 //setupGroupAutomationTab();
104 104
105 105
106} 106}
107 107
108 108
109KOPrefsDialog::~KOPrefsDialog() 109KOPrefsDialog::~KOPrefsDialog()
110{ 110{
111} 111}
112void KOPrefsDialog::setupGlobalTab() 112void KOPrefsDialog::setupGlobalTab()
113{ 113{
114 QFrame *topFrame = addPage(i18n("Global"),0,0); 114 QFrame *topFrame = addPage(i18n("Global"),0,0);
115 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); 115 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
116 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 116 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
117 topLayout->addWidget( kdelibcfg ); 117 topLayout->addWidget( kdelibcfg );
118 118
119 119
120} 120}
121void KOPrefsDialog::setupLocaleDateTab() 121void KOPrefsDialog::setupLocaleDateTab()
122{ 122{
123#if 0 123#if 0
124QFrame *topFrame = addPage(i18n("Date Format"),0,0); 124QFrame *topFrame = addPage(i18n("Date Format"),0,0);
125 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 125 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
126 topLayout->setSpacing(mSpacingHint); 126 topLayout->setSpacing(mSpacingHint);
127 topLayout->setMargin(mMarginHint); 127 topLayout->setMargin(mMarginHint);
128 int iii = 0; 128 int iii = 0;
129 129
130 130
131 KPrefsDialogWidRadios *syncPrefsGroup = 131 KPrefsDialogWidRadios *syncPrefsGroup =
132 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 132 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
133 QString format; 133 QString format;
134 if ( QApplication::desktop()->width() < 480 ) 134 if ( QApplication::desktop()->width() < 480 )
135 format = "(%d.%m.%Y)"; 135 format = "(%d.%m.%Y)";
136 else 136 else
137 format = "(%d.%m.%Y|%A %d %B %Y)"; 137 format = "(%d.%m.%Y|%A %d %B %Y)";
138 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 138 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
139 if ( QApplication::desktop()->width() < 480 ) 139 if ( QApplication::desktop()->width() < 480 )
140 format = "(%m.%d.%Y)"; 140 format = "(%m.%d.%Y)";
141 else 141 else
142 format = "(%m.%d.%Y|%A %B %d %Y)"; 142 format = "(%m.%d.%Y|%A %B %d %Y)";
143 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 143 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
144 if ( QApplication::desktop()->width() < 480 ) 144 if ( QApplication::desktop()->width() < 480 )
145 format = "(%Y-%m-%d)"; 145 format = "(%Y-%m-%d)";
146 else 146 else
147 format = "(%Y-%m-%d|%A %Y %B %d)"; 147 format = "(%Y-%m-%d|%A %Y %B %d)";
148 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 148 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
149 syncPrefsGroup->addRadio(i18n("User defined")); 149 syncPrefsGroup->addRadio(i18n("User defined"));
150 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 150 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
151 ++iii; 151 ++iii;
152 ++iii; 152 ++iii;
153 QLabel * lab; 153 QLabel * lab;
154 mUserDateFormatLong = new QLineEdit(topFrame); 154 mUserDateFormatLong = new QLineEdit(topFrame);
155 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 155 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
156 topLayout->addWidget(lab ,iii,0); 156 topLayout->addWidget(lab ,iii,0);
157 topLayout->addWidget(mUserDateFormatLong,iii,1); 157 topLayout->addWidget(mUserDateFormatLong,iii,1);
158 ++iii; 158 ++iii;
159 mUserDateFormatShort = new QLineEdit(topFrame); 159 mUserDateFormatShort = new QLineEdit(topFrame);
160 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 160 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
161 topLayout->addWidget(lab ,iii,0); 161 topLayout->addWidget(lab ,iii,0);
162 topLayout->addWidget(mUserDateFormatShort,iii,1); 162 topLayout->addWidget(mUserDateFormatShort,iii,1);
163 ++iii; 163 ++iii;
164 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 164 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
165 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 165 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
166 ++iii; 166 ++iii;
167 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 167 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
168 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 168 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
169 ++iii; 169 ++iii;
170 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 170 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
171 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 171 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
172 ++iii; 172 ++iii;
173#endif 173#endif
174 174
175} 175}
176 176
177void KOPrefsDialog::setupLocaleTab() 177void KOPrefsDialog::setupLocaleTab()
178{ 178{
179#if 0 179#if 0
180 QFrame *topFrame = addPage(i18n("Locale"),0,0); 180 QFrame *topFrame = addPage(i18n("Locale"),0,0);
181 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 181 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
182 topLayout->setSpacing(mSpacingHint); 182 topLayout->setSpacing(mSpacingHint);
183 topLayout->setMargin(mMarginHint); 183 topLayout->setMargin(mMarginHint);
184 int iii = 0; 184 int iii = 0;
185 KPrefsDialogWidRadios *syncPrefsGroup = 185 KPrefsDialogWidRadios *syncPrefsGroup =
186 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 186 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
187 syncPrefsGroup->addRadio(i18n("English")); 187 syncPrefsGroup->addRadio(i18n("English"));
188 syncPrefsGroup->addRadio(i18n("German")); 188 syncPrefsGroup->addRadio(i18n("German"));
189 syncPrefsGroup->addRadio(i18n("French")); 189 syncPrefsGroup->addRadio(i18n("French"));
190 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 190 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
191 if ( QApplication::desktop()->width() < 300 ) 191 if ( QApplication::desktop()->width() < 300 )
192 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 192 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
193 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 193 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
194 ++iii; 194 ++iii;
195 195
196 syncPrefsGroup = 196 syncPrefsGroup =
197 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 197 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
198 if ( QApplication::desktop()->width() > 300 ) 198 if ( QApplication::desktop()->width() > 300 )
199 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 199 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
200 syncPrefsGroup->addRadio(i18n("24:00")); 200 syncPrefsGroup->addRadio(i18n("24:00"));
201 syncPrefsGroup->addRadio(i18n("12:00am")); 201 syncPrefsGroup->addRadio(i18n("12:00am"));
202 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 202 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
203 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 203 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
204 ++iii; 204 ++iii;
205 KPrefsDialogWidBool *sb; 205 KPrefsDialogWidBool *sb;
206 if ( QApplication::desktop()->width() < 300 ) { 206 if ( QApplication::desktop()->width() < 300 ) {
207 sb = 207 sb =
208 addWidBool(i18n("Week starts on Sunday"), 208 addWidBool(i18n("Week starts on Sunday"),
209 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 209 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
210 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 210 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
211 ++iii; 211 ++iii;
212 sb = 212 sb =
213 addWidBool(i18n("Use short date in (WN/E) view"), 213 addWidBool(i18n("Use short date in (WN/E) view"),
214 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 214 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
215 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 215 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
216 } 216 }
217 else { 217 else {
218 QWidget * hb = new QWidget( topFrame ); 218 QWidget * hb = new QWidget( topFrame );
219 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 219 QHBoxLayout *hbLayout = new QHBoxLayout(hb);
220 sb = 220 sb =
221 addWidBool(i18n("Week starts on Sunday"), 221 addWidBool(i18n("Week starts on Sunday"),
222 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 222 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
223 hbLayout->addWidget(sb->checkBox() ); 223 hbLayout->addWidget(sb->checkBox() );
224 sb = 224 sb =
225 addWidBool(i18n("Use short date in (WN/E) view"), 225 addWidBool(i18n("Use short date in (WN/E) view"),
226 &(KOPrefs::instance()->mShortDateInViewer),hb); 226 &(KOPrefs::instance()->mShortDateInViewer),hb);
227 hbLayout->addWidget(sb->checkBox() ); 227 hbLayout->addWidget(sb->checkBox() );
228 topLayout->addMultiCellWidget(hb, iii,iii,0,1); 228 topLayout->addMultiCellWidget(hb, iii,iii,0,1);
229 229
230 } 230 }
231 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION 231 // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION
232#if 0 232#if 0
233 ++iii; 233 ++iii;
234 sb = 234 sb =
235 addWidBool(i18n("Quick load/save (w/o Unicode)"), 235 addWidBool(i18n("Quick load/save (w/o Unicode)"),
236 &(KOPrefs::instance()->mUseQuicksave),topFrame); 236 &(KOPrefs::instance()->mUseQuicksave),topFrame);
237 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 237 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
238#endif 238#endif
239#endif 239#endif
240} 240}
241void KOPrefsDialog::showSyncPage() 241void KOPrefsDialog::showSyncPage()
242{ 242{
243 showPage ( 0 ) ; 243 showPage ( 0 ) ;
244 kdelibcfg->showTimeZoneTab() ; 244 kdelibcfg->showTimeZoneTab() ;
245 245
246} 246}
247void KOPrefsDialog::setupSyncAlgTab() 247void KOPrefsDialog::setupSyncAlgTab()
248{ 248{
249#if 0 249#if 0
250 QLabel * lab; 250 QLabel * lab;
251 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 251 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
252 mSetupSyncAlgTab = topFrame; 252 mSetupSyncAlgTab = topFrame;
253 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 253 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
254 topLayout->setSpacing(mSpacingHint); 254 topLayout->setSpacing(mSpacingHint);
255 topLayout->setMargin(mMarginHint); 255 topLayout->setMargin(mMarginHint);
256 int iii = 0; 256 int iii = 0;
257 257
258 KPrefsDialogWidBool *sb = 258 KPrefsDialogWidBool *sb =
259 addWidBool(i18n("Ask for preferences before syncing"), 259 addWidBool(i18n("Ask for preferences before syncing"),
260 &(KOPrefs::instance()->mAskForPreferences),topFrame); 260 &(KOPrefs::instance()->mAskForPreferences),topFrame);
261 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 261 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
262 262
263 ++iii; 263 ++iii;
264 264
265 KPrefsDialogWidRadios *syncPrefsGroup = 265 KPrefsDialogWidRadios *syncPrefsGroup =
266 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 266 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
267 topFrame); 267 topFrame);
268 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 268 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
269 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 269 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
270 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 270 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
271 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 271 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
272 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 272 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
273 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 273 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
274 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 274 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
275 ++iii; 275 ++iii;
276 sb = 276 sb =
277 addWidBool(i18n("Show summary after syncing"), 277 addWidBool(i18n("Show summary after syncing"),
278 &(KOPrefs::instance()->mShowSyncSummary),topFrame); 278 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
279 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 279 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
280 280
281 ++iii; 281 ++iii;
282#endif 282#endif
283 283
284 284
285 285
286} 286}
287 287
288 288
289void KOPrefsDialog::setupSyncTab() 289void KOPrefsDialog::setupSyncTab()
290{ 290{
291#if 0 291#if 0
292 QLabel * lab; 292 QLabel * lab;
293 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 293 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
294 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 294 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
295 topLayout->setSpacing(mSpacingHint); 295 topLayout->setSpacing(mSpacingHint);
296 topLayout->setMargin(mMarginHint); 296 topLayout->setMargin(mMarginHint);
297 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 297 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
298 int iii = 0; 298 int iii = 0;
299 topLayout->addMultiCellWidget(lab , iii,iii,0,1); 299 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
300 ++iii; 300 ++iii;
301 301
302 mRemoteIPEdit = new QLineEdit(topFrame); 302 mRemoteIPEdit = new QLineEdit(topFrame);
303 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); 303 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
304 topLayout->addWidget(lab ,iii,0); 304 topLayout->addWidget(lab ,iii,0);
305 topLayout->addWidget(mRemoteIPEdit,iii,1); 305 topLayout->addWidget(mRemoteIPEdit,iii,1);
306 ++iii; 306 ++iii;
307 mRemoteUser = new QLineEdit(topFrame); 307 mRemoteUser = new QLineEdit(topFrame);
308 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); 308 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
309 topLayout->addWidget(lab ,iii,0); 309 topLayout->addWidget(lab ,iii,0);
310 topLayout->addWidget(mRemoteUser, iii,1); 310 topLayout->addWidget(mRemoteUser, iii,1);
311 ++iii; 311 ++iii;
312 312
313 mRemoteFile = new QLineEdit(topFrame); 313 mRemoteFile = new QLineEdit(topFrame);
314 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); 314 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
315 topLayout->addWidget(lab ,iii,0); 315 topLayout->addWidget(lab ,iii,0);
316 topLayout->addWidget(mRemoteFile,iii,1); 316 topLayout->addWidget(mRemoteFile,iii,1);
317 ++iii; 317 ++iii;
318 318
319 mLocalTempFile = new QLineEdit(topFrame); 319 mLocalTempFile = new QLineEdit(topFrame);
320 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); 320 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
321 topLayout->addWidget(lab ,iii,0); 321 topLayout->addWidget(lab ,iii,0);
322 topLayout->addWidget(mLocalTempFile,iii,1); 322 topLayout->addWidget(mLocalTempFile,iii,1);
323 ++iii; 323 ++iii;
324 324
325 KPrefsDialogWidBool *wb = 325 KPrefsDialogWidBool *wb =
326 addWidBool(i18n("Write back synced file"), 326 addWidBool(i18n("Write back synced file"),
327 &(KOPrefs::instance()->mWriteBackFile),topFrame); 327 &(KOPrefs::instance()->mWriteBackFile),topFrame);
328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 328 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
329 ++iii; 329 ++iii;
330 wb = 330 wb =
331 addWidBool(i18n("Write back existing entries only"), 331 addWidBool(i18n("Write back existing entries only"),
332 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); 332 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
333 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 333 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
334 ++iii; 334 ++iii;
335 335
336#endif 336#endif
337} 337}
338 338
339void KOPrefsDialog::setupMainTab() 339void KOPrefsDialog::setupMainTab()
340{ 340{
341 QFrame *topFrame = addPage(i18n("General"),0,0); 341 QFrame *topFrame = addPage(i18n("General"),0,0);
342 // DesktopIcon("identity",KIcon::SizeMedium)); 342 // DesktopIcon("identity",KIcon::SizeMedium));
343 343
344 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 344 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
345 topLayout->setSpacing(mSpacingHint); 345 topLayout->setSpacing(mSpacingHint);
346 topLayout->setMargin(mMarginHint); 346 topLayout->setMargin(mMarginHint);
347 347
348 // KPrefsDialogWidBool *emailControlCenter = 348 // KPrefsDialogWidBool *emailControlCenter =
349// addWidBool(i18n("&Use email settings from Control Center"), 349// addWidBool(i18n("&Use email settings from Control Center"),
350// &(KOPrefs::instance()->mEmailControlCenter),topFrame); 350// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
351// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); 351// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
352 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), 352 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
353 // SLOT(toggleEmailSettings(bool))); 353 // SLOT(toggleEmailSettings(bool)));
354 354
355 mNameEdit = new QLineEdit(topFrame); 355 mNameEdit = new QLineEdit(topFrame);
356 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 356 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
357 topLayout->addWidget(mNameLabel,0,0); 357 topLayout->addWidget(mNameLabel,0,0);
358 topLayout->addWidget(mNameEdit,0,1); 358 topLayout->addWidget(mNameEdit,0,1);
359 359
360 mEmailEdit = new QLineEdit(topFrame); 360 mEmailEdit = new QLineEdit(topFrame);
361 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 361 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
362 topLayout->addWidget(mEmailLabel,1,0); 362 topLayout->addWidget(mEmailLabel,1,0);
363 topLayout->addWidget(mEmailEdit,1,1); 363 topLayout->addWidget(mEmailEdit,1,1);
364 KPrefsDialogWidBool *wb; 364 KPrefsDialogWidBool *wb;
365 365
366 366
367 367
368 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), 368 KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"),
369 &(KOPrefs::instance()->mShowFullMenu),topFrame); 369 &(KOPrefs::instance()->mShowFullMenu),topFrame);
370 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); 370 topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1);
371 371
372 372
373 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), 373 widbool = addWidBool(i18n("Mini icons in toolbar(nr)"),
374 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); 374 &(KOPrefs::instance()->mToolBarMiniIcons),topFrame);
375 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); 375 topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1);
376 376
377 377
378 KPrefsDialogWidBool *verticalScreen = 378 KPrefsDialogWidBool *verticalScreen =
379 addWidBool(i18n("Show vertical screen (Needs restart)"), 379 addWidBool(i18n("Show vertical screen (Needs restart)"),
380 &(KOPrefs::instance()->mVerticalScreen),topFrame); 380 &(KOPrefs::instance()->mVerticalScreen),topFrame);
381 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); 381 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0);
382 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); 382 topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1);
383 383
384 384
385 QHBox *dummy = new QHBox(topFrame); 385 QHBox *dummy = new QHBox(topFrame);
386 new QLabel(i18n("Days in Next-X-Days:"),dummy); 386 new QLabel(i18n("Days in Next-X-Days:"),dummy);
387 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 387 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
388 388
389 topLayout->addMultiCellWidget(dummy,5,5,0,1); 389 topLayout->addMultiCellWidget(dummy,5,5,0,1);
390 390
391 391
392 392
393 // KPrefsDialogWidBool *bcc = 393 // KPrefsDialogWidBool *bcc =
394// addWidBool(i18n("Send copy to owner when mailing events"), 394// addWidBool(i18n("Send copy to owner when mailing events"),
395// &(KOPrefs::instance()->mBcc),topFrame); 395// &(KOPrefs::instance()->mBcc),topFrame);
396// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); 396// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
397 397
398 398
399 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); 399 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
400 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); 400 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
401 401
402 // addWidBool(i18n("Enable automatic saving of calendar"), 402 // addWidBool(i18n("Enable automatic saving of calendar"),
403 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 403 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
404 404
405 QHBox *intervalBox = new QHBox(topFrame); 405 QHBox *intervalBox = new QHBox(topFrame);
406 // intervalBox->setSpacing(mSpacingHint); 406 // intervalBox->setSpacing(mSpacingHint);
407 topLayout->addMultiCellWidget(intervalBox,6,6,0,1); 407 topLayout->addMultiCellWidget(intervalBox,6,6,0,1);
408 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 408 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
409 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); 409 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
410 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); 410 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
411 /* 411 /*
412 QHBox * agendasize = new QHBox ( topFrame ); 412 QHBox * agendasize = new QHBox ( topFrame );
413 413
414 new QLabel (i18n("AllDayAgenda Height:"), agendasize ); 414 new QLabel (i18n("AllDayAgenda Height:"), agendasize );
415 415
416 416
417 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); 417 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
418 topLayout->addMultiCellWidget(agendasize,7,7,0,1); 418 topLayout->addMultiCellWidget(agendasize,7,7,0,1);
419 */ 419 */
420 420
421 421
422 KPrefsDialogWidBool *ask = 422 KPrefsDialogWidBool *ask =
423 addWidBool(i18n("Ask for quit when closing KO/Pi"), 423 addWidBool(i18n("Ask for quit when closing KO/Pi"),
424 &(KOPrefs::instance()->mAskForQuit),topFrame); 424 &(KOPrefs::instance()->mAskForQuit),topFrame);
425 topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1); 425 topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1);
426 426
427 427
428 /* 428 /*
429 KPrefsDialogWidBool *confirmCheck = 429 KPrefsDialogWidBool *confirmCheck =
430 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), 430 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm),
431 topFrame); 431 topFrame);
432 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); 432 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1);
433 433
434 434
435 mEnableGroupScheduling = 435 mEnableGroupScheduling =
436 addWidBool(i18n("Enable group scheduling"), 436 addWidBool(i18n("Enable group scheduling"),
437 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); 437 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame);
438 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); 438 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0);
439 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), 439 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()),
440 SLOT(warningGroupScheduling())); 440 SLOT(warningGroupScheduling()));
441 441
442 mEnableProjectView = 442 mEnableProjectView =
443 addWidBool(i18n("Enable project view"), 443 addWidBool(i18n("Enable project view"),
444 &(KOPrefs::instance()->mEnableProjectView),topFrame); 444 &(KOPrefs::instance()->mEnableProjectView),topFrame);
445 topLayout->addWidget(mEnableProjectView->checkBox(),9,0); 445 topLayout->addWidget(mEnableProjectView->checkBox(),9,0);
446 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), 446 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()),
447 SLOT(warningProjectView())); 447 SLOT(warningProjectView()));
448 448
449 // Can't be disabled anymore 449 // Can't be disabled anymore
450 mEnableGroupScheduling->checkBox()->hide(); 450 mEnableGroupScheduling->checkBox()->hide();
451 451
452 // Disable setting, because this feature now becomes stable 452 // Disable setting, because this feature now becomes stable
453 mEnableProjectView->checkBox()->hide(); 453 mEnableProjectView->checkBox()->hide();
454 454
455 KPrefsDialogWidRadios *defaultFormatGroup = 455 KPrefsDialogWidRadios *defaultFormatGroup =
456 addWidRadios(i18n("Default Calendar Format"), 456 addWidRadios(i18n("Default Calendar Format"),
457 &(KOPrefs::instance()->mDefaultFormat),topFrame); 457 &(KOPrefs::instance()->mDefaultFormat),topFrame);
458 defaultFormatGroup->addRadio(i18n("vCalendar")); 458 defaultFormatGroup->addRadio(i18n("vCalendar"));
459 defaultFormatGroup->addRadio(i18n("iCalendar")); 459 defaultFormatGroup->addRadio(i18n("iCalendar"));
460 460
461 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); 461 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1);
462 462
463 // Default format unconditionally is iCalendar 463 // Default format unconditionally is iCalendar
464 defaultFormatGroup->groupBox()->hide(); 464 defaultFormatGroup->groupBox()->hide();
465 465
466 KPrefsDialogWidRadios *mailClientGroup = 466 KPrefsDialogWidRadios *mailClientGroup =
467 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), 467 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient),
468 topFrame); 468 topFrame);
469 mailClientGroup->addRadio(i18n("KMail")); 469 mailClientGroup->addRadio(i18n("KMail"));
470 mailClientGroup->addRadio(i18n("Sendmail")); 470 mailClientGroup->addRadio(i18n("Sendmail"));
471 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); 471 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1);
472 472
473 KPrefsDialogWidBool *htmlsave = 473 KPrefsDialogWidBool *htmlsave =
474 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), 474 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave),
475 topFrame); 475 topFrame);
476 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); 476 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1);
477 477
478 KPrefsDialogWidRadios *destinationGroup = 478 KPrefsDialogWidRadios *destinationGroup =
479 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), 479 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination),
480 topFrame); 480 topFrame);
481 destinationGroup->addRadio(i18n("be added to the standard resource")); 481 destinationGroup->addRadio(i18n("be added to the standard resource"));
482 destinationGroup->addRadio(i18n("be asked which resource to use")); 482 destinationGroup->addRadio(i18n("be asked which resource to use"));
483 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); 483 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1);
484 484
485 topLayout->setRowStretch(14,1); 485 topLayout->setRowStretch(14,1);
486 */ 486 */
487} 487}
488 488
489 489
490void KOPrefsDialog::setupTimeTab() 490void KOPrefsDialog::setupTimeTab()
491{ 491{
492 QFrame *topFrame = addPage(i18n("Time"),0,0); 492 QFrame *topFrame = addPage(i18n("Time"),0,0);
493 // DesktopIcon("clock",KIcon::SizeMedium)); 493 // DesktopIcon("clock",KIcon::SizeMedium));
494 494
495 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 495 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
496 topLayout->setSpacing(mSpacingHint); 496 topLayout->setSpacing(mSpacingHint);
497 topLayout->setMargin(mMarginHint); 497 topLayout->setMargin(mMarginHint);
498 498
499 QHBox *dummy = new QHBox(topFrame); 499 QHBox *dummy = new QHBox(topFrame);
500 KPrefsDialogWidTime *dayBegins = 500 KPrefsDialogWidTime *dayBegins =
501 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 501 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
502 dummy); 502 dummy);
503 //topLayout->addWidget(dayBegins->label(),2,0); 503 //topLayout->addWidget(dayBegins->label(),2,0);
504 504
505 //topLayout->addWidget(dayBegins->spinBox(),2,1); 505 //topLayout->addWidget(dayBegins->spinBox(),2,1);
506 topLayout->addMultiCellWidget(dummy,0,0,0,1); 506 topLayout->addMultiCellWidget(dummy,0,0,0,1);
507 507
508 topLayout->addWidget(new QLabel(i18n("Default appointment time:"), 508 topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
509 topFrame),1,0); 509 topFrame),1,0);
510 mStartTimeSpin = new QSpinBox(0,23,1,topFrame); 510 mStartTimeSpin = new QSpinBox(0,23,1,topFrame);
511 mStartTimeSpin->setSuffix(":00"); 511 mStartTimeSpin->setSuffix(":00");
512 topLayout->addWidget(mStartTimeSpin,1,1); 512 topLayout->addWidget(mStartTimeSpin,1,1);
513 513
514 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), 514 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"),
515 topFrame),2,0); 515 topFrame),2,0);
516 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); 516 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame);
517 mDefaultDurationSpin->setSuffix(":00"); 517 mDefaultDurationSpin->setSuffix(":00");
518 topLayout->addWidget(mDefaultDurationSpin,2,1); 518 topLayout->addWidget(mDefaultDurationSpin,2,1);
519 519
520 QStringList alarmList; 520 QStringList alarmList;
521 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") 521 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes")
522 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; 522 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ;
523 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), 523 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame),
524 3,0); 524 3,0);
525 mAlarmTimeCombo = new QComboBox(topFrame); 525 mAlarmTimeCombo = new QComboBox(topFrame);
526 mAlarmTimeCombo->insertStringList(alarmList); 526 mAlarmTimeCombo->insertStringList(alarmList);
527 topLayout->addWidget(mAlarmTimeCombo,3,1); 527 topLayout->addWidget(mAlarmTimeCombo,3,1);
528 528
529 529
530 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, 530 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
531 i18n("Working Hours"), 531 i18n("Working Hours"),
532 topFrame); 532 topFrame);
533 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); 533 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1);
534 workingHoursGroup->layout()->setSpacing( 0 ); 534 workingHoursGroup->layout()->setSpacing( 0 );
535 workingHoursGroup->layout()->setMargin( 4 ); 535 workingHoursGroup->layout()->setMargin( 4 );
536 QHBox *workStartBox = new QHBox(workingHoursGroup); 536 QHBox *workStartBox = new QHBox(workingHoursGroup);
537 // workStartBox->setMargin( 0 ); 537 // workStartBox->setMargin( 0 );
538 addWidTime(i18n("Daily starting hour:"), 538 addWidTime(i18n("Daily starting hour:"),
539 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); 539 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
540 540
541 QHBox *workEndBox = new QHBox(workingHoursGroup); 541 QHBox *workEndBox = new QHBox(workingHoursGroup);
542 //workEndBox->setMargin( 0 ); 542 //workEndBox->setMargin( 0 );
543 addWidTime(i18n("Daily ending hour:"), 543 addWidTime(i18n("Daily ending hour:"),
544 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); 544 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
545 QVBox *excludeBox = new QVBox(workingHoursGroup); 545 QVBox *excludeBox = new QVBox(workingHoursGroup);
546 //excludeBox->setMargin( 0 ); 546 //excludeBox->setMargin( 0 );
547 addWidBool(i18n("Exclude holidays"), 547 addWidBool(i18n("Exclude holidays"),
548 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 548 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
549 549
550 addWidBool(i18n("Exclude Saturdays"), 550 addWidBool(i18n("Exclude Saturdays"),
551 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); 551 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
552 552
553// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), 553// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"),
554 // &(KOPrefs::instance()->mMarcusBainsShowSeconds), 554 // &(KOPrefs::instance()->mMarcusBainsShowSeconds),
555 // topFrame); 555 // topFrame);
556// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); 556// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0);
557 557
558 // topLayout->setRowStretch(6,1); 558 // topLayout->setRowStretch(6,1);
559} 559}
560 560
561 561
562void KOPrefsDialog::setupViewsTab() 562void KOPrefsDialog::setupViewsTab()
563{ 563{
564 564
565 QFrame *topFrame = addPage(i18n("Views"),0,0); 565 QFrame *topFrame = addPage(i18n("Views"),0,0);
566 // DesktopIcon("viewmag",KIcon::SizeMedium)); 566 // DesktopIcon("viewmag",KIcon::SizeMedium));
567 567
568 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 568 QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
569 topLayout->setSpacing(mSpacingHint); 569 topLayout->setSpacing(mSpacingHint);
570 topLayout->setMargin(mMarginHint); 570 topLayout->setMargin(mMarginHint);
571 571
572// QBoxLayout *dayBeginsLayout = new QHBoxLayout; 572// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
573// topLayout->addLayout(dayBeginsLayout,0,0); 573// topLayout->addLayout(dayBeginsLayout,0,0);
574 574
575// KPrefsDialogWidTime *dayBegins = 575// KPrefsDialogWidTime *dayBegins =
576// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 576// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
577// topFrame); 577// topFrame);
578// dayBeginsLayout->addWidget(dayBegins->label()); 578// dayBeginsLayout->addWidget(dayBegins->label());
579// dayBeginsLayout->addStretch(1); 579// dayBeginsLayout->addStretch(1);
580// dayBeginsLayout->addWidget(dayBegins->spinBox()); 580// dayBeginsLayout->addWidget(dayBegins->spinBox());
581 581
582// QBoxLayout *nextDaysLayout = new QHBoxLayout; 582// QBoxLayout *nextDaysLayout = new QHBoxLayout;
583// topLayout->addLayout(nextDaysLayout,1,0); 583// topLayout->addLayout(nextDaysLayout,1,0);
584// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); 584// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame));
585// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); 585// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame);
586// nextDaysLayout->addStretch(1); 586// nextDaysLayout->addStretch(1);
587// nextDaysLayout->addWidget(mNextXDaysSpin); 587// nextDaysLayout->addWidget(mNextXDaysSpin);
588 588
589 589
590 int ii = 0; 590 int ii = 0;
591 KPrefsDialogWidBool *dummy = 591 KPrefsDialogWidBool *dummy =
592 addWidBool(i18n("Edit item on doubleclick (if not, show)"), 592 addWidBool(i18n("Edit item on doubleclick (if not, show)"),
593 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); 593 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame);
594 topLayout->addWidget(dummy->checkBox(),ii++,0); 594 topLayout->addWidget(dummy->checkBox(),ii++,0);
595 595
596 596
597 597
598 598
599 599
600 600
601 // topLayout->addWidget(hourSizeGroup,ii++,0); 601 // topLayout->addWidget(hourSizeGroup,ii++,0);
602 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); 602 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0);
603 //topLayout->setRowStretch(11,1); 603 //topLayout->setRowStretch(11,1);
604 604
605 605
606 606
607 607
608#if 0 608#if 0
609 609
610 topFrame = addPage(i18n("ViewChange"),0,0); 610 topFrame = addPage(i18n("ViewChange"),0,0);
611 // DesktopIcon("viewmag",KIcon::SizeMedium)); 611 // DesktopIcon("viewmag",KIcon::SizeMedium));
612 612
613 topLayout = new QGridLayout(topFrame,6,1); 613 topLayout = new QGridLayout(topFrame,6,1);
614 topLayout->setSpacing(mSpacingHint); 614 topLayout->setSpacing(mSpacingHint);
615 topLayout->setMargin(mMarginHint); 615 topLayout->setMargin(mMarginHint);
616 ii = 0; 616 ii = 0;
617 617
618#endif 618#endif
619 619
620 dummy = 620 dummy =
621 addWidBool(i18n("Hold fullscreen on view change"), 621 addWidBool(i18n("Hold fullscreen on view change"),
622 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); 622 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame);
623 topLayout->addWidget(dummy->checkBox(),ii++,0); 623 topLayout->addWidget(dummy->checkBox(),ii++,0);
624 624
625 dummy = 625 dummy =
626 addWidBool(i18n("Hold non-fullscreen on view change"), 626 addWidBool(i18n("Hold non-fullscreen on view change"),
627 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); 627 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame);
628 topLayout->addWidget(dummy->checkBox(),ii++,0); 628 topLayout->addWidget(dummy->checkBox(),ii++,0);
629 629
630 630
631 631
632 KPrefsDialogWidBool *fullViewMonth = 632 KPrefsDialogWidBool *fullViewMonth =
633 addWidBool(i18n("Next days view uses full window"), 633 addWidBool(i18n("Next days view uses full window"),
634 &(KOPrefs::instance()->mFullViewMonth),topFrame); 634 &(KOPrefs::instance()->mFullViewMonth),topFrame);
635 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); 635 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0);
636 636
637 637
638 KPrefsDialogWidBool *fullViewTodo = 638 KPrefsDialogWidBool *fullViewTodo =
639 addWidBool(i18n("Event list view uses full window"), 639 addWidBool(i18n("Event list view uses full window"),
640 &(KOPrefs::instance()->mFullViewTodo),topFrame); 640 &(KOPrefs::instance()->mFullViewTodo),topFrame);
641 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); 641 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0);
642 dummy = 642 dummy =
643 addWidBool(i18n("Listview uses monthly timespan"), 643 addWidBool(i18n("Listview uses monthly timespan"),
644 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); 644 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
645 topLayout->addWidget(dummy->checkBox(),ii++,0); 645 topLayout->addWidget(dummy->checkBox(),ii++,0);
646 dummy = 646 dummy =
647 addWidBool(i18n("Highlight selection in Time Edit"), 647 addWidBool(i18n("Highlight selection in Time Edit"),
648 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); 648 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
649 topLayout->addWidget( dummy->checkBox(), ii++,0); 649 topLayout->addWidget( dummy->checkBox(), ii++,0);
650 650
651 KPrefsDialogWidBool *dailyRecur = 651 KPrefsDialogWidBool *dailyRecur =
652 addWidBool(i18n("Show events that recur daily in date nav."), 652 addWidBool(i18n("Show events that recur daily in date nav."),
653 &(KOPrefs::instance()->mDailyRecur),topFrame); 653 &(KOPrefs::instance()->mDailyRecur),topFrame);
654 topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 654 topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
655 655
656 KPrefsDialogWidBool *weeklyRecur = 656 KPrefsDialogWidBool *weeklyRecur =
657 addWidBool(i18n("Show ev. that recur weekly in date nav."), 657 addWidBool(i18n("Show ev. that recur weekly in date nav."),
658 &(KOPrefs::instance()->mWeeklyRecur),topFrame); 658 &(KOPrefs::instance()->mWeeklyRecur),topFrame);
659 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); 659 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
660 660
661#ifdef DESKTOP_VERSION 661#ifdef DESKTOP_VERSION
662 KPrefsDialogWidBool *enableToolTips = 662 KPrefsDialogWidBool *enableToolTips =
663 addWidBool(i18n("Enable tooltips displaying summary of ev."), 663 addWidBool(i18n("Enable tooltips displaying summary of ev."),
664 &(KOPrefs::instance()->mEnableToolTips),topFrame); 664 &(KOPrefs::instance()->mEnableToolTips),topFrame);
665 topLayout->addWidget(enableToolTips->checkBox(),ii++,0); 665 topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
666#endif 666#endif
667 // ********************************************************* 667 // *********************************************************
668 668
669 topFrame = addPage(i18n("Agenda View"),0,0); 669 topFrame = addPage(i18n("Agenda View"),0,0);
670 // DesktopIcon("viewmag",KIcon::SizeMedium)); 670 // DesktopIcon("viewmag",KIcon::SizeMedium));
671 671
672 topLayout = new QGridLayout(topFrame,5,1); 672 topLayout = new QGridLayout(topFrame,5,1);
673 topLayout->setSpacing(mSpacingHint); 673 topLayout->setSpacing(mSpacingHint);
674 topLayout->setMargin(mMarginHint); 674 topLayout->setMargin(mMarginHint);
675 ii = 0; 675 ii = 0;
676 676
677 677
678 dummy = 678 dummy =
679 addWidBool(i18n("Show time in agenda items"), 679 addWidBool(i18n("Show time in agenda items"),
680 &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); 680 &(KOPrefs::instance()->mShowTimeInAgenda),topFrame);
681 topLayout->addWidget(dummy->checkBox(),ii++,0); 681 topLayout->addWidget(dummy->checkBox(),ii++,0);
682 682
683 dummy = 683 dummy =
684 addWidBool(i18n("Highlight current day in agenda"), 684 addWidBool(i18n("Highlight current day in agenda"),
685 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); 685 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame);
686 topLayout->addWidget(dummy->checkBox(),ii++,0); 686 topLayout->addWidget(dummy->checkBox(),ii++,0);
687 687
688 dummy = 688 dummy =
689 addWidBool(i18n("Use light color for highlight current day"), 689 addWidBool(i18n("Use light color for highlight current day"),
690 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); 690 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame);
691 topLayout->addWidget(dummy->checkBox(),ii++,0); 691 topLayout->addWidget(dummy->checkBox(),ii++,0);
692 692
693 693
694 KPrefsDialogWidBool *marcusBainsEnabled = 694 KPrefsDialogWidBool *marcusBainsEnabled =
695 addWidBool(i18n("Show current time"), 695 addWidBool(i18n("Show current time"),
696 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); 696 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
697 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); 697 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
698 698
699 699
700 dummy = 700 dummy =
701 addWidBool(i18n("Set agenda to DayBeginsAt on change"), 701 addWidBool(i18n("Set agenda to DayBeginsAt on change"),
702 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); 702 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame);
703 topLayout->addWidget(dummy->checkBox(),ii++,0); 703 topLayout->addWidget(dummy->checkBox(),ii++,0);
704 704
705 dummy = 705 dummy =
706 addWidBool(i18n("Set agenda to current time on change"), 706 addWidBool(i18n("Set agenda to current time on change"),
707 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); 707 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame);
708 topLayout->addWidget(dummy->checkBox(),ii++,0); 708 topLayout->addWidget(dummy->checkBox(),ii++,0);
709 709
710 710
711 711
712 712
713 713
714 714
715 715
716 topFrame = addPage(i18n("Month View"),0,0); 716 topFrame = addPage(i18n("Month View"),0,0);
717 // DesktopIcon("viewmag",KIcon::SizeMedium)); 717 // DesktopIcon("viewmag",KIcon::SizeMedium));
718 718
719 topLayout = new QGridLayout(topFrame,5,1); 719 topLayout = new QGridLayout(topFrame,5,1);
720 topLayout->setSpacing(mSpacingHint); 720 topLayout->setSpacing(mSpacingHint);
721 topLayout->setMargin(mMarginHint); 721 topLayout->setMargin(mMarginHint);
722 ii = 0; 722 ii = 0;
723 QLabel *lab; 723 QLabel *lab;
724 QHBox *habo = new QHBox( topFrame ); 724 QHBox *habo = new QHBox( topFrame );
725 if ( QApplication::desktop()->width() <= 480 ) { 725 if ( QApplication::desktop()->width() <= 480 ) {
726 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 726 lab = new QLabel ( i18n("Show events that recur "), topFrame );
727 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 727 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
728 ii++; 728 ii++;
729 } else { 729 } else {
730 new QLabel ( i18n("Show events that recur "), habo ); 730 new QLabel ( i18n("Show events that recur "), habo );
731 } 731 }
732 dailyRecur = 732 dailyRecur =
733 addWidBool(i18n("daily"), 733 addWidBool(i18n("daily"),
734 &(KOPrefs::instance()->mMonthDailyRecur),habo); 734 &(KOPrefs::instance()->mMonthDailyRecur),habo);
735 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 735 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
736 736
737 weeklyRecur = 737 weeklyRecur =
738 addWidBool(i18n("weekly"), 738 addWidBool(i18n("weekly"),
739 &(KOPrefs::instance()->mMonthWeeklyRecur),habo); 739 &(KOPrefs::instance()->mMonthWeeklyRecur),habo);
740 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 740 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
741 ii++; 741 ii++;
742 742
743 743
744 habo = new QHBox( topFrame ); 744 habo = new QHBox( topFrame );
745 if ( QApplication::desktop()->width() <= 480 ) { 745 if ( QApplication::desktop()->width() <= 480 ) {
746 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 746 lab = new QLabel (i18n("Show in every cell ") , topFrame );
747 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 747 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
748 ii++; 748 ii++;
749 749
750 } else { 750 } else {
751 new QLabel ( i18n("Show in every cell "), habo ); 751 new QLabel ( i18n("Show in every cell "), habo );
752 } 752 }
753 weeklyRecur = 753 weeklyRecur =
754 addWidBool(i18n("short month"), 754 addWidBool(i18n("short month"),
755 &(KOPrefs::instance()->mMonthShowShort),habo); 755 &(KOPrefs::instance()->mMonthShowShort),habo);
756 weeklyRecur = 756 weeklyRecur =
757 addWidBool(i18n("icons"), 757 addWidBool(i18n("icons"),
758 &(KOPrefs::instance()->mMonthShowIcons),habo); 758 &(KOPrefs::instance()->mMonthShowIcons),habo);
759 759
760 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 760 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
761 ii++; 761 ii++;
762#ifdef DESKTOP_VERSION 762#ifdef DESKTOP_VERSION
763 KPrefsDialogWidBool *enableMonthScroll = 763 KPrefsDialogWidBool *enableMonthScroll =
764 addWidBool(i18n("Enable scrollbars in month view cells"), 764 addWidBool(i18n("Enable scrollbars in month view cells"),
765 &(KOPrefs::instance()->mEnableMonthScroll),topFrame); 765 &(KOPrefs::instance()->mEnableMonthScroll),topFrame);
766 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); 766 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0);
767#endif 767#endif
768 dummy = 768 dummy =
769 addWidBool(i18n("Week view mode uses bigger font"), 769 addWidBool(i18n("Week view mode uses bigger font"),
770 &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); 770 &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame);
771 topLayout->addWidget(dummy->checkBox(),ii++,0); 771 topLayout->addWidget(dummy->checkBox(),ii++,0);
772 dummy = 772 dummy =
773 addWidBool(i18n("Show Sat/Sun together"), 773 addWidBool(i18n("Show Sat/Sun together"),
774 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); 774 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame);
775 topLayout->addWidget(dummy->checkBox(),ii++,0); 775 topLayout->addWidget(dummy->checkBox(),ii++,0);
776 776
777 KPrefsDialogWidBool *coloredCategoriesInMonthView = 777 KPrefsDialogWidBool *coloredCategoriesInMonthView =
778 addWidBool(i18n("Month view uses category colors"), 778 addWidBool(i18n("Month view uses category colors"),
779 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); 779 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame);
780 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 780 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
781 781
782 dummy = 782 dummy =
783 addWidBool(i18n("Categorie colors are applied to text"), 783 addWidBool(i18n("Categorie colors are applied to text"),
784 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); 784 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame);
785 topLayout->addWidget(dummy->checkBox(),ii++,0); 785 topLayout->addWidget(dummy->checkBox(),ii++,0);
786 coloredCategoriesInMonthView = 786 coloredCategoriesInMonthView =
787 addWidBool(i18n("Month view uses day colors"), 787 addWidBool(i18n("Month view uses day colors"),
788 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); 788 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame);
789 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 789 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
790 790
791 KPrefsDialogWidColor *holidayColor = 791 KPrefsDialogWidColor *holidayColor =
792 addWidColor(i18n("Day color odd months"), 792 addWidColor(i18n("Day color odd months"),
793 &(KOPrefs::instance()->mMonthViewOddColor),topFrame); 793 &(KOPrefs::instance()->mMonthViewOddColor),topFrame);
794 topLayout->addWidget(holidayColor->label(),ii,0); 794 topLayout->addWidget(holidayColor->label(),ii,0);
795 topLayout->addWidget(holidayColor->button(),ii++,1); 795 topLayout->addWidget(holidayColor->button(),ii++,1);
796 796
797 holidayColor = 797 holidayColor =
798 addWidColor(i18n("Day color even months"), 798 addWidColor(i18n("Day color even months"),
799 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); 799 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame);
800 topLayout->addWidget(holidayColor->label(),ii,0); 800 topLayout->addWidget(holidayColor->label(),ii,0);
801 topLayout->addWidget(holidayColor->button(),ii++,1); 801 topLayout->addWidget(holidayColor->button(),ii++,1);
802 802
803 803
804 holidayColor = 804 holidayColor =
805 addWidColor(i18n("Color for Sundays + category \"Holiday\""), 805 addWidColor(i18n("Color for Sundays + category \"Holiday\""),
806 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 806 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
807 topLayout->addWidget(holidayColor->label(),ii,0); 807 topLayout->addWidget(holidayColor->label(),ii,0);
808 topLayout->addWidget(holidayColor->button(),ii++,1); 808 topLayout->addWidget(holidayColor->button(),ii++,1);
809 // *********************** What'sNext View 809 // *********************** What'sNext View
810 topFrame = addPage(i18n("What's Next View"),0,0); 810 topFrame = addPage(i18n("What's Next View"),0,0);
811 // DesktopIcon("viewmag",KIcon::SizeMedium)); 811 // DesktopIcon("viewmag",KIcon::SizeMedium));
812 812
813 topLayout = new QGridLayout(topFrame,4,1); 813 topLayout = new QGridLayout(topFrame,4,1);
814 topLayout->setSpacing(mSpacingHint); 814 topLayout->setSpacing(mSpacingHint);
815 topLayout->setMargin(mMarginHint); 815 topLayout->setMargin(mMarginHint);
816 ii = 0; 816 ii = 0;
817 817
818 818
819 QHBox* hdummy = new QHBox(topFrame); 819 QHBox* hdummy = new QHBox(topFrame);
820 new QLabel(i18n("Days in What's Next:"),hdummy); 820 new QLabel(i18n("Days in What's Next:"),hdummy);
821 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); 821 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy);
822 822
823 topLayout->addWidget(hdummy,ii++,0); 823 topLayout->addWidget(hdummy,ii++,0);
824 824
825 QHBox *prioBox = new QHBox(topFrame); 825 QHBox *prioBox = new QHBox(topFrame);
826 // intervalBox->setSpacing(mSpacingHint); 826 // intervalBox->setSpacing(mSpacingHint);
827 topLayout->addWidget(prioBox,ii++,0); 827 topLayout->addWidget(prioBox,ii++,0);
828 828
829 QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); 829 QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox);
830 mPrioSpin = new QSpinBox(0,5,1,prioBox); 830 mPrioSpin = new QSpinBox(0,5,1,prioBox);
831 if ( QApplication::desktop()->width() < 300 ) 831 if ( QApplication::desktop()->width() < 300 )
832 mPrioSpin->setFixedWidth( 40 ); 832 mPrioSpin->setFixedWidth( 40 );
833 833
834 KPrefsDialogWidBool *passwdk = 834 KPrefsDialogWidBool *passwdk =
835 835
836 addWidBool(i18n("Show events, that are done"), 836 addWidBool(i18n("Show events, that are done"),
837 &(KOPrefs::instance()->mWNViewShowsPast),topFrame); 837 &(KOPrefs::instance()->mWNViewShowsPast),topFrame);
838 topLayout->addWidget(passwdk->checkBox(), ii++,0); 838 topLayout->addWidget(passwdk->checkBox(), ii++,0);
839 passwdk = 839 passwdk =
840 addWidBool(i18n("Show parent To-Do's"), 840 addWidBool(i18n("Show parent To-Do's"),
841 &(KOPrefs::instance()->mWNViewShowsParents),topFrame); 841 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
842 topLayout->addWidget(passwdk->checkBox(), ii++,0); 842 topLayout->addWidget(passwdk->checkBox(), ii++,0);
843 843
844 passwdk = 844 passwdk =
845 addWidBool(i18n("Show location"), 845 addWidBool(i18n("Show location"),
846 &(KOPrefs::instance()->mWNViewShowLocation),topFrame); 846 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
847 topLayout->addWidget(passwdk->checkBox(), ii++,0); 847 topLayout->addWidget(passwdk->checkBox(), ii++,0);
848 848
849 passwdk = 849 passwdk =
850 addWidBool(i18n("Show Sync Events in WN+Agenda"), 850 addWidBool(i18n("Show Sync Events in WN+Agenda"),
851 &(KOPrefs::instance()->mShowSyncEvents),topFrame); 851 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
852 topLayout->addWidget(passwdk->checkBox(), ii++,0); 852 topLayout->addWidget(passwdk->checkBox(), ii++,0);
853 passwdk = 853 passwdk =
854 addWidBool(i18n("Use short date in WN+Event view"), 854 addWidBool(i18n("Use short date in WN+Event view"),
855 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 855 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
856 topLayout->addWidget(passwdk->checkBox(), ii++,0); 856 topLayout->addWidget(passwdk->checkBox(), ii++,0);
857 857
858 858
859 859
860 860
861 // *********************** Todo View 861 // *********************** Todo View
862 862
863 topFrame = addPage(i18n("Todo View"),0,0); 863 topFrame = addPage(i18n("Todo View"),0,0);
864 // DesktopIcon("viewmag",KIcon::SizeMedium)); 864 // DesktopIcon("viewmag",KIcon::SizeMedium));
865 865
866 topLayout = new QGridLayout(topFrame,4,1); 866 topLayout = new QGridLayout(topFrame,4,1);
867 topLayout->setSpacing(mSpacingHint); 867 topLayout->setSpacing(mSpacingHint);
868 topLayout->setMargin(mMarginHint); 868 topLayout->setMargin(mMarginHint);
869 ii = 0; 869 ii = 0;
870dummy = 870dummy =
871 addWidBool(i18n("Hide not running Todos in To-do view"), 871 addWidBool(i18n("Hide not running Todos in To-do view"),
872 &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); 872 &(KOPrefs::instance()->mHideNonStartedTodos),topFrame);
873 topLayout->addWidget(dummy->checkBox(),ii++,0); 873 topLayout->addWidget(dummy->checkBox(),ii++,0);
874 874
875 875
876 KPrefsDialogWidBool *showCompletedTodo = 876 KPrefsDialogWidBool *showCompletedTodo =
877 addWidBool(i18n("To-do view shows completed Todos"), 877 addWidBool(i18n("To-do view shows completed Todos"),
878 &(KOPrefs::instance()->mShowCompletedTodo),topFrame); 878 &(KOPrefs::instance()->mShowCompletedTodo),topFrame);
879 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); 879 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0);
880 dummy = 880 dummy =
881 addWidBool(i18n("To-do view shows complete as 'xx %'"), 881 addWidBool(i18n("To-do view shows complete as 'xx %'"),
882 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); 882 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame);
883 topLayout->addWidget(dummy->checkBox(),ii++,0); 883 topLayout->addWidget(dummy->checkBox(),ii++,0);
884 884
885 dummy = 885 dummy =
886 addWidBool(i18n("Small To-do view uses smaller font"), 886 addWidBool(i18n("Small To-do view uses smaller font"),
887 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); 887 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame);
888 topLayout->addWidget(dummy->checkBox(),ii++,0); 888 topLayout->addWidget(dummy->checkBox(),ii++,0);
889 889
890 890
891 891
892 dummy = 892 dummy =
893 addWidBool(i18n("Todo view uses category colors"), 893 addWidBool(i18n("Todo view uses category colors"),
894 &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); 894 &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame);
895 topLayout->addWidget(dummy->checkBox(),ii++,0); 895 topLayout->addWidget(dummy->checkBox(),ii++,0);
896 896
897 897
898 QWidget* wid = new QWidget( topFrame ); 898 QWidget* wid = new QWidget( topFrame );
899 // Todo run today color
900 KPrefsDialogWidColor *todoRunColor =
901 addWidColor(i18n("Color for running todos:"),
902 &(KOPrefs::instance()->mTodoRunColor),wid);
903 QHBoxLayout *widLayout = new QHBoxLayout(wid);
904 widLayout->addWidget( todoRunColor->label() );
905 widLayout->addWidget( todoRunColor->button() );
906 topLayout->addWidget(wid,ii++,0);
907
908 wid = new QWidget( topFrame );
899 // Todo due today color 909 // Todo due today color
900 KPrefsDialogWidColor *todoDueTodayColor = 910 KPrefsDialogWidColor *todoDueTodayColor =
901 addWidColor(i18n("Todo due today color:"), 911 addWidColor(i18n("Todo due today color:"),
902 &(KOPrefs::instance()->mTodoDueTodayColor),wid); 912 &(KOPrefs::instance()->mTodoDueTodayColor),wid);
903 QHBoxLayout *widLayout = new QHBoxLayout(wid); 913 widLayout = new QHBoxLayout(wid);
904 widLayout->addWidget( todoDueTodayColor->label() ); 914 widLayout->addWidget( todoDueTodayColor->label() );
905 widLayout->addWidget( todoDueTodayColor->button() ); 915 widLayout->addWidget( todoDueTodayColor->button() );
906 topLayout->addWidget(wid,ii++,0); 916 topLayout->addWidget(wid,ii++,0);
907 //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); 917 //topLayout->addWidget(todoDueTodayColor->button(),ii++,1);
908 918
909 // Todo overdue color 919 // Todo overdue color
910 wid = new QWidget( topFrame ); 920 wid = new QWidget( topFrame );
911 widLayout = new QHBoxLayout(wid); 921 widLayout = new QHBoxLayout(wid);
912 KPrefsDialogWidColor *todoOverdueColor = 922 KPrefsDialogWidColor *todoOverdueColor =
913 addWidColor(i18n("Todo overdue color:"), 923 addWidColor(i18n("Todo overdue color:"),
914 &(KOPrefs::instance()->mTodoOverdueColor),wid); 924 &(KOPrefs::instance()->mTodoOverdueColor),wid);
915 widLayout->addWidget(todoOverdueColor->label()); 925 widLayout->addWidget(todoOverdueColor->label());
916 widLayout->addWidget(todoOverdueColor->button()); 926 widLayout->addWidget(todoOverdueColor->button());
917 topLayout->addWidget(wid,ii++,0); 927 topLayout->addWidget(wid,ii++,0);
918 928
919 dummy = 929 dummy =
920 addWidBool(i18n("Colors are applied to text"), 930 addWidBool(i18n("Colors are applied to text"),
921 &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); 931 &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame);
922 topLayout->addWidget(dummy->checkBox(),ii++,0); 932 topLayout->addWidget(dummy->checkBox(),ii++,0);
923 933
924 dummy = 934 dummy =
925 addWidBool(i18n("Allday Agenda view shows todos"), 935 addWidBool(i18n("Allday Agenda view shows todos"),
926 &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); 936 &(KOPrefs::instance()->mShowTodoInAgenda),topFrame);
927 topLayout->addWidget(dummy->checkBox(),ii++,0); 937 topLayout->addWidget(dummy->checkBox(),ii++,0);
928 938
929 939
930 topFrame = addPage(i18n("View Options"),0,0); 940 topFrame = addPage(i18n("View Options"),0,0);
931 941
932 topLayout = new QGridLayout(topFrame,4,1); 942 topLayout = new QGridLayout(topFrame,4,1);
933 topLayout->setSpacing(mSpacingHint); 943 topLayout->setSpacing(mSpacingHint);
934 topLayout->setMargin(mMarginHint); 944 topLayout->setMargin(mMarginHint);
935 ii = 0; 945 ii = 0;
936 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); 946 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame);
937 topLayout->addWidget(lab ,ii++,0); 947 topLayout->addWidget(lab ,ii++,0);
938 948
939 dummy = addWidBool(i18n("Details"), 949 dummy = addWidBool(i18n("Details"),
940 &(KOPrefs::instance()->mEVshowDetails),topFrame); 950 &(KOPrefs::instance()->mEVshowDetails),topFrame);
941 topLayout->addWidget(dummy->checkBox(),ii++,0); 951 topLayout->addWidget(dummy->checkBox(),ii++,0);
942 dummy = addWidBool(i18n("Created time"), 952 dummy = addWidBool(i18n("Created time"),
943 &(KOPrefs::instance()->mEVshowCreated),topFrame); 953 &(KOPrefs::instance()->mEVshowCreated),topFrame);
944 topLayout->addWidget(dummy->checkBox(),ii++,0); 954 topLayout->addWidget(dummy->checkBox(),ii++,0);
945 dummy = addWidBool(i18n("Last modified time"), 955 dummy = addWidBool(i18n("Last modified time"),
946 &(KOPrefs::instance()->mEVshowChanged),topFrame); 956 &(KOPrefs::instance()->mEVshowChanged),topFrame);
947 topLayout->addWidget(dummy->checkBox(),ii++,0); 957 topLayout->addWidget(dummy->checkBox(),ii++,0);
948 958
949 959
950 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); 960 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame);
951 topLayout->addWidget(lab ,ii++,0); 961 topLayout->addWidget(lab ,ii++,0);
952 962
953 dummy = addWidBool(i18n("Details"), 963 dummy = addWidBool(i18n("Details"),
954 &(KOPrefs::instance()->mWTshowDetails),topFrame); 964 &(KOPrefs::instance()->mWTshowDetails),topFrame);
955 topLayout->addWidget(dummy->checkBox(),ii++,0); 965 topLayout->addWidget(dummy->checkBox(),ii++,0);
956 dummy = addWidBool(i18n("Created time"), 966 dummy = addWidBool(i18n("Created time"),
957 &(KOPrefs::instance()->mWTshowCreated),topFrame); 967 &(KOPrefs::instance()->mWTshowCreated),topFrame);
958 topLayout->addWidget(dummy->checkBox(),ii++,0); 968 topLayout->addWidget(dummy->checkBox(),ii++,0);
959 dummy = addWidBool(i18n("Last modified time"), 969 dummy = addWidBool(i18n("Last modified time"),
960 &(KOPrefs::instance()->mWTshowChanged),topFrame); 970 &(KOPrefs::instance()->mWTshowChanged),topFrame);
961 topLayout->addWidget(dummy->checkBox(),ii++,0); 971 topLayout->addWidget(dummy->checkBox(),ii++,0);
962 972
963 973
964 topFrame = addPage(i18n("Alarm"),0,0); 974 topFrame = addPage(i18n("Alarm"),0,0);
965 // DesktopIcon("viewmag",KIcon::SizeMedium)); 975 // DesktopIcon("viewmag",KIcon::SizeMedium));
966 976
967 topLayout = new QGridLayout(topFrame,2,1); 977 topLayout = new QGridLayout(topFrame,2,1);
968 topLayout->setSpacing(mSpacingHint); 978 topLayout->setSpacing(mSpacingHint);
969 topLayout->setMargin(mMarginHint); 979 topLayout->setMargin(mMarginHint);
970 int iii = 0; 980 int iii = 0;
971 981
972 dummy = 982 dummy =
973 addWidBool(i18n("Use internal alarm notification"), 983 addWidBool(i18n("Use internal alarm notification"),
974 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); 984 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame);
975 topLayout->addWidget(dummy->checkBox(),iii++,0); 985 topLayout->addWidget(dummy->checkBox(),iii++,0);
976 lab = new QLabel( i18n("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"), topFrame); 986 lab = new QLabel( i18n("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"), topFrame);
977 987
978 topLayout->addWidget(lab ,iii++,0); 988 topLayout->addWidget(lab ,iii++,0);
979#ifndef DESKTOP_VERSION 989#ifndef DESKTOP_VERSION
980 lab->setAlignment( AlignLeft|WordBreak|AlignTop); 990 lab->setAlignment( AlignLeft|WordBreak|AlignTop);
981#else 991#else
982 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 992 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
983 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 993 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
984#endif 994#endif
985 995
986 QHBox* dummyBox = new QHBox(topFrame); 996 QHBox* dummyBox = new QHBox(topFrame);
987 new QLabel(i18n("Play beeps count:"),dummyBox); 997 new QLabel(i18n("Play beeps count:"),dummyBox);
988 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); 998 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
989 topLayout->addWidget(dummyBox,iii++,0); 999 topLayout->addWidget(dummyBox,iii++,0);
990 1000
991 dummyBox = new QHBox(topFrame); 1001 dummyBox = new QHBox(topFrame);
992 new QLabel(i18n("Beeps interval in sec:"),dummyBox); 1002 new QLabel(i18n("Beeps interval in sec:"),dummyBox);
993 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); 1003 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
994 topLayout->addWidget(dummyBox,iii++,0); 1004 topLayout->addWidget(dummyBox,iii++,0);
995 1005
996 dummyBox = new QHBox(topFrame); 1006 dummyBox = new QHBox(topFrame);
997 new QLabel(i18n("Default suspend time in min:"),dummyBox); 1007 new QLabel(i18n("Default suspend time in min:"),dummyBox);
998 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); 1008 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
999 topLayout->addWidget(dummyBox,iii++,0); 1009 topLayout->addWidget(dummyBox,iii++,0);
1000 1010
1001 dummyBox = new QHBox(topFrame); 1011 dummyBox = new QHBox(topFrame);
1002 new QLabel(i18n("Auto suspend count:"),dummyBox); 1012 new QLabel(i18n("Auto suspend count:"),dummyBox);
1003 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); 1013 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
1004 topLayout->addWidget(dummyBox,iii++,0); 1014 topLayout->addWidget(dummyBox,iii++,0);
1005 1015
1006 1016
1007 1017
1008 1018
1009 1019
1010 1020
1011 1021
1012 QHBox* hbo = new QHBox ( topFrame ); 1022 QHBox* hbo = new QHBox ( topFrame );
1013 mDefaultAlarmFile = new QLineEdit(hbo); 1023 mDefaultAlarmFile = new QLineEdit(hbo);
1014 QPushButton * loadTemplate = new QPushButton(hbo); 1024 QPushButton * loadTemplate = new QPushButton(hbo);
1015 QPixmap icon; 1025 QPixmap icon;
1016 if ( QApplication::desktop()->width() < 321 ) 1026 if ( QApplication::desktop()->width() < 321 )
1017 icon = SmallIcon("fileimport16"); 1027 icon = SmallIcon("fileimport16");
1018 else 1028 else
1019 icon = SmallIcon("fileimport"); 1029 icon = SmallIcon("fileimport");
1020 loadTemplate->setIconSet (icon ) ; 1030 loadTemplate->setIconSet (icon ) ;
1021 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); 1031 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) );
1022 int size = loadTemplate->sizeHint().height(); 1032 int size = loadTemplate->sizeHint().height();
1023 loadTemplate->setFixedSize( size, size ); 1033 loadTemplate->setFixedSize( size, size );
1024 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); 1034 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame);
1025 // topLayout->addWidget(lab ,iii++,0); 1035 // topLayout->addWidget(lab ,iii++,0);
1026 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); 1036 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame);
1027 topLayout->addWidget(lab ,iii++,0); 1037 topLayout->addWidget(lab ,iii++,0);
1028 topLayout->addWidget(hbo,iii++,0); 1038 topLayout->addWidget(hbo,iii++,0);
1029 // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); 1039 // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame);
1030 1040
1031// topLayout->addWidget(lab ,iii++,0); 1041// topLayout->addWidget(lab ,iii++,0);
1032// #ifndef DESKTOP_VERSION 1042// #ifndef DESKTOP_VERSION
1033// lab->setAlignment( AlignLeft|WordBreak|AlignTop); 1043// lab->setAlignment( AlignLeft|WordBreak|AlignTop);
1034// #else 1044// #else
1035// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 1045// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
1036// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 1046// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
1037// #endif 1047// #endif
1038 1048
1039 1049
1040} 1050}
1041 1051
1042void KOPrefsDialog::selectSoundFile() 1052void KOPrefsDialog::selectSoundFile()
1043{ 1053{
1044 QString fileName = mDefaultAlarmFile->text(); 1054 QString fileName = mDefaultAlarmFile->text();
1045 fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); 1055 fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this );
1046 if ( fileName.length() > 0 ) 1056 if ( fileName.length() > 0 )
1047 mDefaultAlarmFile->setText( fileName ); 1057 mDefaultAlarmFile->setText( fileName );
1048} 1058}
1049void KOPrefsDialog::setupFontsTab() 1059void KOPrefsDialog::setupFontsTab()
1050{ 1060{
1051 1061
1052 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 1062 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
1053 // DesktopIcon("fonts",KIcon::SizeMedium)); 1063 // DesktopIcon("fonts",KIcon::SizeMedium));
1054 1064
1055 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 1065 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
1056 topLayout->setSpacing(1); 1066 topLayout->setSpacing(1);
1057 topLayout->setMargin(3); 1067 topLayout->setMargin(3);
1058 KPrefsDialogWidFont * tVFont; 1068 KPrefsDialogWidFont * tVFont;
1059 int i = 0; 1069 int i = 0;
1060 KPrefsDialogWidFont *timeLabelsFont = 1070 KPrefsDialogWidFont *timeLabelsFont =
1061 addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), 1071 addWidFont(i18n("23"),i18n("DateNavigator:(nr)"),
1062 &(KOPrefs::instance()->mDateNavigatorFont),topFrame); 1072 &(KOPrefs::instance()->mDateNavigatorFont),topFrame);
1063 topLayout->addWidget(timeLabelsFont->label(),i,0); 1073 topLayout->addWidget(timeLabelsFont->label(),i,0);
1064 topLayout->addWidget(timeLabelsFont->preview(),i,1); 1074 topLayout->addWidget(timeLabelsFont->preview(),i,1);
1065 topLayout->addWidget(timeLabelsFont->button(),i,2); 1075 topLayout->addWidget(timeLabelsFont->button(),i,2);
1066 ++i; 1076 ++i;
1067 1077
1068 1078
1069 timeLabelsFont = 1079 timeLabelsFont =
1070 addWidFont(i18n("Mon 15"),i18n("Date Labels:"), 1080 addWidFont(i18n("Mon 15"),i18n("Date Labels:"),
1071 &(KOPrefs::instance()->mTimeLabelsFont),topFrame); 1081 &(KOPrefs::instance()->mTimeLabelsFont),topFrame);
1072 topLayout->addWidget(timeLabelsFont->label(),i,0); 1082 topLayout->addWidget(timeLabelsFont->label(),i,0);
1073 topLayout->addWidget(timeLabelsFont->preview(),i,1); 1083 topLayout->addWidget(timeLabelsFont->preview(),i,1);
1074 topLayout->addWidget(timeLabelsFont->button(),i,2); 1084 topLayout->addWidget(timeLabelsFont->button(),i,2);
1075 ++i; 1085 ++i;
1076 1086
1077 KPrefsDialogWidFont *timeBarFont = 1087 KPrefsDialogWidFont *timeBarFont =
1078 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), 1088 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"),
1079 &(KOPrefs::instance()->mTimeBarFont),topFrame); 1089 &(KOPrefs::instance()->mTimeBarFont),topFrame);
1080 topLayout->addWidget(timeBarFont->label(),i,0); 1090 topLayout->addWidget(timeBarFont->label(),i,0);
1081 topLayout->addWidget(timeBarFont->preview(),i,1); 1091 topLayout->addWidget(timeBarFont->preview(),i,1);
1082 topLayout->addWidget(timeBarFont->button(),i,2); 1092 topLayout->addWidget(timeBarFont->button(),i,2);
1083 ++i; 1093 ++i;
1084 1094
1085 1095
1086 KPrefsDialogWidFont *marcusBainsFont = 1096 KPrefsDialogWidFont *marcusBainsFont =
1087 addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), 1097 addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"),
1088 &(KOPrefs::instance()->mMarcusBainsFont),topFrame); 1098 &(KOPrefs::instance()->mMarcusBainsFont),topFrame);
1089 topLayout->addWidget(marcusBainsFont->label(),i,0); 1099 topLayout->addWidget(marcusBainsFont->label(),i,0);
1090 topLayout->addWidget(marcusBainsFont->preview(),i,1); 1100 topLayout->addWidget(marcusBainsFont->preview(),i,1);
1091 topLayout->addWidget(marcusBainsFont->button(),i,2); 1101 topLayout->addWidget(marcusBainsFont->button(),i,2);
1092 ++i; 1102 ++i;
1093 1103
1094 tVFont = 1104 tVFont =
1095 addWidFont(i18n("Summary"),i18n("Event Viewer:"), 1105 addWidFont(i18n("Summary"),i18n("Event Viewer:"),
1096 &(KOPrefs::instance()->mEventViewFont),topFrame); 1106 &(KOPrefs::instance()->mEventViewFont),topFrame);
1097 topLayout->addWidget(tVFont->label(),i,0); 1107 topLayout->addWidget(tVFont->label(),i,0);
1098 topLayout->addWidget(tVFont->preview(),i,1); 1108 topLayout->addWidget(tVFont->preview(),i,1);
1099 topLayout->addWidget(tVFont->button(),i,2); 1109 topLayout->addWidget(tVFont->button(),i,2);
1100 ++i; 1110 ++i;
1101 1111
1102 1112
1103 1113
1104 tVFont = 1114 tVFont =
1105 addWidFont(i18n("Details"),i18n("EditorBox:"), 1115 addWidFont(i18n("Details"),i18n("EditorBox:"),
1106 &(KOPrefs::instance()->mEditBoxFont),topFrame); 1116 &(KOPrefs::instance()->mEditBoxFont),topFrame);
1107 topLayout->addWidget(tVFont->label(),i,0); 1117 topLayout->addWidget(tVFont->label(),i,0);
1108 topLayout->addWidget(tVFont->preview(),i,1); 1118 topLayout->addWidget(tVFont->preview(),i,1);
1109 topLayout->addWidget(tVFont->button(),i,2); 1119 topLayout->addWidget(tVFont->button(),i,2);
1110 ++i; 1120 ++i;
1111 1121
1112 1122
1113 1123
1114 topLayout->setColStretch(1,1); 1124 topLayout->setColStretch(1,1);
1115 topLayout->setRowStretch(4,1); 1125 topLayout->setRowStretch(4,1);
1116 1126
1117 1127
1118 i = 0; 1128 i = 0;
1119 topFrame = addPage(i18n("View Fonts"),0, 1129 topFrame = addPage(i18n("View Fonts"),0,
1120 DesktopIcon("fonts",KIcon::SizeMedium)); 1130 DesktopIcon("fonts",KIcon::SizeMedium));
1121 1131
1122 topLayout = new QGridLayout(topFrame,7,3); 1132 topLayout = new QGridLayout(topFrame,7,3);
1123 topLayout->setSpacing(1); 1133 topLayout->setSpacing(1);
1124 topLayout->setMargin(3); 1134 topLayout->setMargin(3);
1125 1135
1126 tVFont = 1136 tVFont =
1127 addWidFont(i18n("Configure KO"),i18n("What's Next View:"), 1137 addWidFont(i18n("Configure KO"),i18n("What's Next View:"),
1128 &(KOPrefs::instance()->mWhatsNextFont),topFrame); 1138 &(KOPrefs::instance()->mWhatsNextFont),topFrame);
1129 topLayout->addWidget(tVFont->label(),i,0); 1139 topLayout->addWidget(tVFont->label(),i,0);
1130 topLayout->addWidget(tVFont->preview(),i,1); 1140 topLayout->addWidget(tVFont->preview(),i,1);
1131 topLayout->addWidget(tVFont->button(),i,2); 1141 topLayout->addWidget(tVFont->button(),i,2);
1132 ++i; 1142 ++i;
1133 KPrefsDialogWidFont *agendaViewFont = 1143 KPrefsDialogWidFont *agendaViewFont =
1134 addWidFont(i18n("Event text"),i18n("Agenda view:"), 1144 addWidFont(i18n("Event text"),i18n("Agenda view:"),
1135 &(KOPrefs::instance()->mAgendaViewFont),topFrame); 1145 &(KOPrefs::instance()->mAgendaViewFont),topFrame);
1136 topLayout->addWidget(agendaViewFont->label(),i,0); 1146 topLayout->addWidget(agendaViewFont->label(),i,0);
1137 topLayout->addWidget(agendaViewFont->preview(),i,1); 1147 topLayout->addWidget(agendaViewFont->preview(),i,1);
1138 topLayout->addWidget(agendaViewFont->button(),i,2); 1148 topLayout->addWidget(agendaViewFont->button(),i,2);
1139 ++i; 1149 ++i;
1140 1150
1141 1151
1142 KPrefsDialogWidFont *monthViewFont = 1152 KPrefsDialogWidFont *monthViewFont =
1143 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), 1153 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"),
1144 i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); 1154 i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame);
1145 topLayout->addWidget(monthViewFont->label(),i,0); 1155 topLayout->addWidget(monthViewFont->label(),i,0);
1146 topLayout->addWidget(monthViewFont->preview(),i,1); 1156 topLayout->addWidget(monthViewFont->preview(),i,1);
1147 topLayout->addWidget(monthViewFont->button(),i,2); 1157 topLayout->addWidget(monthViewFont->button(),i,2);
1148 ++i; 1158 ++i;
1149 1159
1150 1160
1151 KPrefsDialogWidFont *lVFont = 1161 KPrefsDialogWidFont *lVFont =
1152 addWidFont(i18n("Event"),i18n("List View:"), 1162 addWidFont(i18n("Event"),i18n("List View:"),
1153 &(KOPrefs::instance()->mListViewFont),topFrame); 1163 &(KOPrefs::instance()->mListViewFont),topFrame);
1154 topLayout->addWidget(lVFont->label(),i,0); 1164 topLayout->addWidget(lVFont->label(),i,0);
1155 topLayout->addWidget(lVFont->preview(),i,1); 1165 topLayout->addWidget(lVFont->preview(),i,1);
1156 topLayout->addWidget(lVFont->button(),i,2); 1166 topLayout->addWidget(lVFont->button(),i,2);
1157 ++i; 1167 ++i;
1158 1168
1159 1169
1160 tVFont = 1170 tVFont =
1161 addWidFont(i18n("ToDo"),i18n("ToDoView:"), 1171 addWidFont(i18n("ToDo"),i18n("ToDoView:"),
1162 &(KOPrefs::instance()->mTodoViewFont),topFrame); 1172 &(KOPrefs::instance()->mTodoViewFont),topFrame);
1163 topLayout->addWidget(tVFont->label(),i,0); 1173 topLayout->addWidget(tVFont->label(),i,0);
1164 topLayout->addWidget(tVFont->preview(),i,1); 1174 topLayout->addWidget(tVFont->preview(),i,1);
1165 topLayout->addWidget(tVFont->button(),i,2); 1175 topLayout->addWidget(tVFont->button(),i,2);
1166 ++i; 1176 ++i;
1167 1177
1168 1178
1169 tVFont = 1179 tVFont =
1170 addWidFont(i18n("Today"),i18n("JournalView:"), 1180 addWidFont(i18n("Today"),i18n("JournalView:"),
1171 &(KOPrefs::instance()->mJornalViewFont),topFrame); 1181 &(KOPrefs::instance()->mJornalViewFont),topFrame);
1172 topLayout->addWidget(tVFont->label(),i,0); 1182 topLayout->addWidget(tVFont->label(),i,0);
1173 topLayout->addWidget(tVFont->preview(),i,1); 1183 topLayout->addWidget(tVFont->preview(),i,1);
1174 topLayout->addWidget(tVFont->button(),i,2); 1184 topLayout->addWidget(tVFont->button(),i,2);
1175 ++i; 1185 ++i;
1176 1186
1177 1187
1178 1188
1179 1189
1180 topLayout->setColStretch(1,1); 1190 topLayout->setColStretch(1,1);
1181 topLayout->setRowStretch(4,1); 1191 topLayout->setRowStretch(4,1);
1182 1192
1183 1193
1184 1194
1185 1195
1186} 1196}
1187 1197
1188void KOPrefsDialog::setupColorsTab() 1198void KOPrefsDialog::setupColorsTab()
1189{ 1199{
1190 QFrame *topFrame = addPage(i18n("Colors"),0,0); 1200 QFrame *topFrame = addPage(i18n("Colors"),0,0);
1191 // DesktopIcon("colorize",KIcon::SizeMedium)); 1201 // DesktopIcon("colorize",KIcon::SizeMedium));
1192 1202
1193 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1203 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1194 // topLayout->setSpacing(mSpacingHint); 1204 // topLayout->setSpacing(mSpacingHint);
1195 // topLayout->setMargin(mMarginHint); 1205 // topLayout->setMargin(mMarginHint);
1196 1206
1197 topLayout->setSpacing(2); 1207 topLayout->setSpacing(2);
1198 topLayout->setMargin(3); 1208 topLayout->setMargin(3);
1199 1209
1200 int ii = 1; 1210 int ii = 1;
1201 QGroupBox *categoryGroup ; 1211 QGroupBox *categoryGroup ;
1202 1212
1203 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), 1213 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"),
1204 topFrame); 1214 topFrame);
1205 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); 1215 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
1206 1216
1207 mCategoryCombo = new QComboBox(categoryGroup); 1217 mCategoryCombo = new QComboBox(categoryGroup);
1208 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1218 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1209 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); 1219 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
1210 1220
1211 mCategoryButton = new KColorButton(categoryGroup); 1221 mCategoryButton = new KColorButton(categoryGroup);
1212 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); 1222 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor()));
1213 updateCategoryColor(); 1223 updateCategoryColor();
1214 1224
1215 1225
1216 // Holiday Color 1226 // Holiday Color
1217 1227
1218 KPrefsDialogWidColor *holidayColor = 1228 KPrefsDialogWidColor *holidayColor =
1219 addWidColor(i18n("Holiday color:"), 1229 addWidColor(i18n("Holiday color:"),
1220 &(KOPrefs::instance()->mHolidayColor),topFrame); 1230 &(KOPrefs::instance()->mHolidayColor),topFrame);
1221 topLayout->addWidget(holidayColor->label(),ii,0); 1231 topLayout->addWidget(holidayColor->label(),ii,0);
1222 topLayout->addWidget(holidayColor->button(),ii++,1); 1232 topLayout->addWidget(holidayColor->button(),ii++,1);
1223 1233
1224 // Highlight Color 1234 // Highlight Color
1225 KPrefsDialogWidColor *highlightColor = 1235 KPrefsDialogWidColor *highlightColor =
1226 addWidColor(i18n("Highlight color:"), 1236 addWidColor(i18n("Highlight color:"),
1227 &(KOPrefs::instance()->mHighlightColor),topFrame); 1237 &(KOPrefs::instance()->mHighlightColor),topFrame);
1228 topLayout->addWidget(highlightColor->label(),ii,0); 1238 topLayout->addWidget(highlightColor->label(),ii,0);
1229 topLayout->addWidget(highlightColor->button(),ii++,1); 1239 topLayout->addWidget(highlightColor->button(),ii++,1);
1230 1240
1231 // Event color 1241 // Event color
1232 KPrefsDialogWidColor *eventColor = 1242 KPrefsDialogWidColor *eventColor =
1233 addWidColor(i18n("Default event color:"), 1243 addWidColor(i18n("Default event color:"),
1234 &(KOPrefs::instance()->mEventColor),topFrame); 1244 &(KOPrefs::instance()->mEventColor),topFrame);
1235 topLayout->addWidget(eventColor->label(),ii,0); 1245 topLayout->addWidget(eventColor->label(),ii,0);
1236 topLayout->addWidget(eventColor->button(),ii++,1); 1246 topLayout->addWidget(eventColor->button(),ii++,1);
1237 eventColor = 1247 eventColor =
1238 addWidColor(i18n("Default todo done color:"), 1248 addWidColor(i18n("Default todo done color:"),
1239 &(KOPrefs::instance()->mTodoDoneColor),topFrame); 1249 &(KOPrefs::instance()->mTodoDoneColor),topFrame);
1240 topLayout->addWidget(eventColor->label(),ii,0); 1250 topLayout->addWidget(eventColor->label(),ii,0);
1241 topLayout->addWidget(eventColor->button(),ii++,1); 1251 topLayout->addWidget(eventColor->button(),ii++,1);
1242 1252
1243 1253
1244 // agenda view background color 1254 // agenda view background color
1245 KPrefsDialogWidColor *agendaBgColor = 1255 KPrefsDialogWidColor *agendaBgColor =
1246 addWidColor(i18n("Agenda view background color:"), 1256 addWidColor(i18n("Agenda view background color:"),
1247 &(KOPrefs::instance()->mAgendaBgColor),topFrame); 1257 &(KOPrefs::instance()->mAgendaBgColor),topFrame);
1248 topLayout->addWidget(agendaBgColor->label(),ii,0); 1258 topLayout->addWidget(agendaBgColor->label(),ii,0);
1249 topLayout->addWidget(agendaBgColor->button(),ii++,1); 1259 topLayout->addWidget(agendaBgColor->button(),ii++,1);
1250 1260
1251 // working hours color 1261 // working hours color
1252 KPrefsDialogWidColor *workingHoursColor = 1262 KPrefsDialogWidColor *workingHoursColor =
1253 addWidColor(i18n("Working hours color:"), 1263 addWidColor(i18n("Working hours color:"),
1254 &(KOPrefs::instance()->mWorkingHoursColor),topFrame); 1264 &(KOPrefs::instance()->mWorkingHoursColor),topFrame);
1255 topLayout->addWidget(workingHoursColor->label(),ii,0); 1265 topLayout->addWidget(workingHoursColor->label(),ii,0);
1256 topLayout->addWidget(workingHoursColor->button(),ii++,1); 1266 topLayout->addWidget(workingHoursColor->button(),ii++,1);
1257 1267
1258 KPrefsDialogWidBool *sb = 1268 KPrefsDialogWidBool *sb =
1259 addWidBool(i18n("Use colors for application:"), 1269 addWidBool(i18n("Use colors for application:"),
1260 &(KOPrefs::instance()->mUseAppColors),topFrame); 1270 &(KOPrefs::instance()->mUseAppColors),topFrame);
1261 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); 1271 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 );
1262 1272
1263 ii++; 1273 ii++;
1264 KPrefsDialogWidColor * workingHoursColor1 = 1274 KPrefsDialogWidColor * workingHoursColor1 =
1265 addWidColor(i18n("Buttons, menus, etc.:"), 1275 addWidColor(i18n("Buttons, menus, etc.:"),
1266 &(KOPrefs::instance()->mAppColor1),topFrame); 1276 &(KOPrefs::instance()->mAppColor1),topFrame);
1267 topLayout->addWidget(workingHoursColor1->label(),ii,0); 1277 topLayout->addWidget(workingHoursColor1->label(),ii,0);
1268 topLayout->addWidget(workingHoursColor1->button(),ii++,1); 1278 topLayout->addWidget(workingHoursColor1->button(),ii++,1);
1269 1279
1270 KPrefsDialogWidColor * workingHoursColor2 = 1280 KPrefsDialogWidColor * workingHoursColor2 =
1271 addWidColor(i18n("Frames, labels, etc.:"), 1281 addWidColor(i18n("Frames, labels, etc.:"),
1272 &(KOPrefs::instance()->mAppColor2),topFrame); 1282 &(KOPrefs::instance()->mAppColor2),topFrame);
1273 topLayout->addWidget(workingHoursColor2->label(),ii,0); 1283 topLayout->addWidget(workingHoursColor2->label(),ii,0);
1274 topLayout->addWidget(workingHoursColor2->button(),ii++,1); 1284 topLayout->addWidget(workingHoursColor2->button(),ii++,1);
1275 1285
1276 1286
1277 1287
1278} 1288}
1279 1289
1280void KOPrefsDialog::setCategoryColor() 1290void KOPrefsDialog::setCategoryColor()
1281{ 1291{
1282 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); 1292 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color()));
1283} 1293}
1284 1294
1285void KOPrefsDialog::updateCategoryColor() 1295void KOPrefsDialog::updateCategoryColor()
1286{ 1296{
1287 QString cat = mCategoryCombo->currentText(); 1297 QString cat = mCategoryCombo->currentText();
1288 QColor *color = mCategoryDict.find(cat); 1298 QColor *color = mCategoryDict.find(cat);
1289 if (!color) { 1299 if (!color) {
1290 color = KOPrefs::instance()->categoryColor(cat); 1300 color = KOPrefs::instance()->categoryColor(cat);
1291 } 1301 }
1292 if (color) { 1302 if (color) {
1293 mCategoryButton->setColor(*color); 1303 mCategoryButton->setColor(*color);
1294 } 1304 }
1295} 1305}
1296 1306
1297void KOPrefsDialog::setupPrinterTab() 1307void KOPrefsDialog::setupPrinterTab()
1298{ 1308{
1299 mPrinterTab = addPage(i18n("Printing"),0, 1309 mPrinterTab = addPage(i18n("Printing"),0,
1300 DesktopIcon("fileprint",KIcon::SizeMedium)); 1310 DesktopIcon("fileprint",KIcon::SizeMedium));
1301 1311
1302 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); 1312 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
1303 topLayout->setSpacing(mSpacingHint); 1313 topLayout->setSpacing(mSpacingHint);
1304 topLayout->setMargin(mMarginHint); 1314 topLayout->setMargin(mMarginHint);
1305 1315
1306 topLayout->setRowStretch(4,1); 1316 topLayout->setRowStretch(4,1);
1307} 1317}
1308 1318
1309void KOPrefsDialog::setupGroupSchedulingTab() 1319void KOPrefsDialog::setupGroupSchedulingTab()
1310{ 1320{
1311#if 0 1321#if 0
1312 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1322 QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
1313 DesktopIcon("personal",KIcon::SizeMedium)); 1323 DesktopIcon("personal",KIcon::SizeMedium));
1314 1324
1315 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1325 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
1316 topLayout->setSpacing(mSpacingHint); 1326 topLayout->setSpacing(mSpacingHint);
1317 topLayout->setMargin(mMarginHint); 1327 topLayout->setMargin(mMarginHint);
1318 1328
1319#if 0 1329#if 0
1320 KPrefsDialogWidRadios *schedulerGroup = 1330 KPrefsDialogWidRadios *schedulerGroup =
1321 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), 1331 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
1322 topFrame); 1332 topFrame);
1323 schedulerGroup->addRadio("Dummy"); // Only for debugging 1333 schedulerGroup->addRadio("Dummy"); // Only for debugging
1324 schedulerGroup->addRadio(i18n("Mail client")); 1334 schedulerGroup->addRadio(i18n("Mail client"));
1325 1335
1326 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); 1336 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1);
1327#endif 1337#endif
1328 1338
1329 KPrefsDialogWidRadios *sendGroup = 1339 KPrefsDialogWidRadios *sendGroup =
1330 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), 1340 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend),
1331 topFrame); 1341 topFrame);
1332 sendGroup->addRadio(i18n("Send to outbox")); 1342 sendGroup->addRadio(i18n("Send to outbox"));
1333 sendGroup->addRadio(i18n("Send directly")); 1343 sendGroup->addRadio(i18n("Send directly"));
1334 1344
1335 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); 1345 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
1336 1346
1337 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); 1347 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
1338 mAMails = new QListView(topFrame); 1348 mAMails = new QListView(topFrame);
1339 mAMails->addColumn(i18n("Email"),300); 1349 mAMails->addColumn(i18n("Email"),300);
1340 topLayout->addMultiCellWidget(mAMails,3,3,0,1); 1350 topLayout->addMultiCellWidget(mAMails,3,3,0,1);
1341 1351
1342 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); 1352 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0);
1343 aEmailsEdit = new QLineEdit(topFrame); 1353 aEmailsEdit = new QLineEdit(topFrame);
1344 aEmailsEdit->setEnabled(false); 1354 aEmailsEdit->setEnabled(false);
1345 topLayout->addWidget(aEmailsEdit,4,1); 1355 topLayout->addWidget(aEmailsEdit,4,1);
1346 1356
1347 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); 1357 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new");
1348 topLayout->addWidget(add,5,0); 1358 topLayout->addWidget(add,5,0);
1349 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); 1359 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove");
1350 topLayout->addWidget(del,5,1); 1360 topLayout->addWidget(del,5,1);
1351 1361
1352 //topLayout->setRowStretch(2,1); 1362 //topLayout->setRowStretch(2,1);
1353 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); 1363 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
1354 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); 1364 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
1355 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); 1365 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
1356 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); 1366 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput()));
1357#endif 1367#endif
1358} 1368}
1359 1369
1360void KOPrefsDialog::setupGroupAutomationTab() 1370void KOPrefsDialog::setupGroupAutomationTab()
1361{ 1371{
1362 return; 1372 return;
1363 QFrame *topFrame = addPage(i18n("Group Automation"),0, 1373 QFrame *topFrame = addPage(i18n("Group Automation"),0,
1364 DesktopIcon("personal",KIcon::SizeMedium)); 1374 DesktopIcon("personal",KIcon::SizeMedium));
1365 1375
1366 QGridLayout *topLayout = new QGridLayout(topFrame,5,1); 1376 QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
1367 topLayout->setSpacing(mSpacingHint); 1377 topLayout->setSpacing(mSpacingHint);
1368 topLayout->setMargin(mMarginHint); 1378 topLayout->setMargin(mMarginHint);
1369 1379
1370 KPrefsDialogWidRadios *autoRefreshGroup = 1380 KPrefsDialogWidRadios *autoRefreshGroup =
1371 addWidRadios(i18n("Auto Send Refresh"), 1381 addWidRadios(i18n("Auto Send Refresh"),
1372 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); 1382 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame);
1373 autoRefreshGroup->addRadio(i18n("Never")); 1383 autoRefreshGroup->addRadio(i18n("Never"));
1374 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); 1384 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook"));
1375 //autoRefreshGroup->addRadio(i18n("selected emails")); 1385 //autoRefreshGroup->addRadio(i18n("selected emails"));
1376 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); 1386 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0);
1377 1387
1378 KPrefsDialogWidRadios *autoInsertGroup = 1388 KPrefsDialogWidRadios *autoInsertGroup =
1379 addWidRadios(i18n("Auto Insert IMIP Replies"), 1389 addWidRadios(i18n("Auto Insert IMIP Replies"),
1380 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); 1390 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame);
1381 autoInsertGroup->addRadio(i18n("Never")); 1391 autoInsertGroup->addRadio(i18n("Never"));
1382 autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); 1392 autoInsertGroup->addRadio(i18n("If attendee is in addressbook"));
1383 //autoInsertGroup->addRadio(i18n("selected emails")); 1393 //autoInsertGroup->addRadio(i18n("selected emails"));
1384 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); 1394 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0);
1385 1395
1386 KPrefsDialogWidRadios *autoRequestGroup = 1396 KPrefsDialogWidRadios *autoRequestGroup =
1387 addWidRadios(i18n("Auto Insert IMIP Requests"), 1397 addWidRadios(i18n("Auto Insert IMIP Requests"),
1388 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); 1398 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame);
1389 autoRequestGroup->addRadio(i18n("Never")); 1399 autoRequestGroup->addRadio(i18n("Never"));
1390 autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); 1400 autoRequestGroup->addRadio(i18n("If organizer is in addressbook"));
1391 //autoInsertGroup->addRadio(i18n("selected emails")); 1401 //autoInsertGroup->addRadio(i18n("selected emails"));
1392 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); 1402 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0);
1393 1403
1394 KPrefsDialogWidRadios *autoFreeBusyGroup = 1404 KPrefsDialogWidRadios *autoFreeBusyGroup =
1395 addWidRadios(i18n("Auto Send FreeBusy Information"), 1405 addWidRadios(i18n("Auto Send FreeBusy Information"),
1396 &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); 1406 &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame);
1397 autoFreeBusyGroup->addRadio(i18n("Never")); 1407 autoFreeBusyGroup->addRadio(i18n("Never"));
1398 autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); 1408 autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook"));
1399 //autoFreeBusyGroup->addRadio(i18n("selected emails")); 1409 //autoFreeBusyGroup->addRadio(i18n("selected emails"));
1400 topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); 1410 topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0);
1401 1411
1402 KPrefsDialogWidRadios *autoFreeBusyReplyGroup = 1412 KPrefsDialogWidRadios *autoFreeBusyReplyGroup =
1403 addWidRadios(i18n("Auto Save FreeBusy Replies"), 1413 addWidRadios(i18n("Auto Save FreeBusy Replies"),
1404 &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); 1414 &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame);
1405 autoFreeBusyReplyGroup->addRadio(i18n("Never")); 1415 autoFreeBusyReplyGroup->addRadio(i18n("Never"));
1406 autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); 1416 autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook"));
1407 //autoFreeBusyGroup->addRadio(i18n("selected emails")); 1417 //autoFreeBusyGroup->addRadio(i18n("selected emails"));
1408 topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); 1418 topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0);
1409} 1419}
1410 1420
1411void KOPrefsDialog::showPrinterTab() 1421void KOPrefsDialog::showPrinterTab()
1412{ 1422{
1413 showPage(pageIndex(mPrinterTab)); 1423 showPage(pageIndex(mPrinterTab));
1414} 1424}
1415 1425
1416 1426
1417void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, 1427void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text,
1418 const QStringList *tags) 1428 const QStringList *tags)
1419{ 1429{
1420 if (tags) { 1430 if (tags) {
1421 int i = tags->findIndex(text); 1431 int i = tags->findIndex(text);
1422 if (i > 0) combo->setCurrentItem(i); 1432 if (i > 0) combo->setCurrentItem(i);
1423 } else { 1433 } else {
1424 for(int i=0;i<combo->count();++i) { 1434 for(int i=0;i<combo->count();++i) {
1425 if (combo->text(i) == text) { 1435 if (combo->text(i) == text) {
1426 combo->setCurrentItem(i); 1436 combo->setCurrentItem(i);
1427 break; 1437 break;
1428 } 1438 }
1429 } 1439 }
1430 } 1440 }
1431} 1441}
1432 1442
1433void KOPrefsDialog::usrReadConfig() 1443void KOPrefsDialog::usrReadConfig()
1434{ 1444{
1435 kdelibcfg->readConfig(); 1445 kdelibcfg->readConfig();
1436 mNameEdit->setText(KOPrefs::instance()->fullName()); 1446 mNameEdit->setText(KOPrefs::instance()->fullName());
1437 mEmailEdit->setText(KOPrefs::instance()->email()); 1447 mEmailEdit->setText(KOPrefs::instance()->email());
1438 1448
1439 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); 1449 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
1440 // QDate current ( 2001, 1,1); 1450 // QDate current ( 2001, 1,1);
1441 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1451 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1442 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1452 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1443 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); 1453 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
1444 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1454 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1445 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); 1455 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
1446 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); 1456 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration);
1447 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); 1457 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime);
1448 // if (KOPrefs::instance()->mAllDaySize > 47 ) 1458 // if (KOPrefs::instance()->mAllDaySize > 47 )
1449 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; 1459 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2;
1450 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); 1460 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize);
1451 1461
1452 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); 1462 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays);
1453 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); 1463 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays);
1454 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); 1464 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios);
1455 // mAMails->clear(); 1465 // mAMails->clear();
1456 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); 1466 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin();
1457// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { 1467// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) {
1458// QListViewItem *item = new QListViewItem(mAMails); 1468// QListViewItem *item = new QListViewItem(mAMails);
1459// item->setText(0,*it); 1469// item->setText(0,*it);
1460// mAMails->insertItem(item); 1470// mAMails->insertItem(item);
1461// } 1471// }
1462 1472
1463 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); 1473 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP);
1464 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); 1474 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser);
1465 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); 1475 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd);
1466 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); 1476 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile);
1467 1477
1468 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); 1478 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
1469 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); 1479 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
1470 //QString dummy = KOPrefs::instance()->mUserDateFormatLong; 1480 //QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1471 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 1481 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
1472 //dummy = KOPrefs::instance()->mUserDateFormatShort; 1482 //dummy = KOPrefs::instance()->mUserDateFormatShort;
1473 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 1483 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
1474 updateCategories(); 1484 updateCategories();
1475 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); 1485 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
1476 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); 1486 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
1477 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); 1487 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
1478 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1488 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1479} 1489}
1480 1490
1481 1491
1482void KOPrefsDialog::usrWriteConfig() 1492void KOPrefsDialog::usrWriteConfig()
1483{ 1493{
1484 1494
1485 kdelibcfg->writeConfig(); 1495 kdelibcfg->writeConfig();
1486 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); 1496 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
1487 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); 1497 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
1488 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); 1498 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
1489 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); 1499 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
1490 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); 1500 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
1491 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1501 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
1492 1502
1493 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 1503 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
1494 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 1504 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
1495 KOPrefs::instance()->setFullName(mNameEdit->text()); 1505 KOPrefs::instance()->setFullName(mNameEdit->text());
1496 KOPrefs::instance()->setEmail(mEmailEdit->text()); 1506 KOPrefs::instance()->setEmail(mEmailEdit->text());
1497 1507
1498 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); 1508 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
1499 1509
1500 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); 1510 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
1501 //QDate date; 1511 //QDate date;
1502 //date = mStartDateSavingEdit->date(); 1512 //date = mStartDateSavingEdit->date();
1503 //int sub = 0; 1513 //int sub = 0;
1504 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1514 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1505 // sub = 1; 1515 // sub = 1;
1506// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; 1516// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
1507// date = mEndDateSavingEdit->date(); 1517// date = mEndDateSavingEdit->date();
1508// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1518// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1509// sub = 1; 1519// sub = 1;
1510// else 1520// else
1511// sub = 0; 1521// sub = 0;
1512// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; 1522// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub;
1513// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); 1523// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value();
1514 1524
1515 KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); 1525 KOPrefs::instance()->mStartTime = mStartTimeSpin->value();
1516 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); 1526 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value();
1517 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); 1527 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
1518 1528
1519 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); 1529 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
1520 1530
1521 QDictIterator<QColor> it(mCategoryDict); 1531 QDictIterator<QColor> it(mCategoryDict);
1522 while (it.current()) { 1532 while (it.current()) {
1523 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); 1533 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
1524 ++it; 1534 ++it;
1525 } 1535 }
1526 1536
1527 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); 1537 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value();
1528 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); 1538 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value();
1529 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); 1539 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value();
1530 1540
1531 KOPrefs::instance()->mAdditionalMails.clear(); 1541 KOPrefs::instance()->mAdditionalMails.clear();
1532 // QListViewItem *item; 1542 // QListViewItem *item;
1533 // item = mAMails->firstChild(); 1543 // item = mAMails->firstChild();
1534 // while (item) 1544 // while (item)
1535 // { 1545 // {
1536 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); 1546 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) );
1537 // item = item->nextSibling(); 1547 // item = item->nextSibling();
1538 // } 1548 // }
1539 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); 1549 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
1540 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1550 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1541 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1551 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1542 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1552 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1543 1553
1544} 1554}
1545 1555
1546void KOPrefsDialog::updateCategories() 1556void KOPrefsDialog::updateCategories()
1547{ 1557{
1548 mCategoryCombo->clear(); 1558 mCategoryCombo->clear();
1549 mCategoryDict.clear(); 1559 mCategoryDict.clear();
1550 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1560 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1551 updateCategoryColor(); 1561 updateCategoryColor();
1552} 1562}
1553 1563
1554void KOPrefsDialog::warningGroupScheduling() 1564void KOPrefsDialog::warningGroupScheduling()
1555{ 1565{
1556 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); 1566 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked());
1557} 1567}
1558 1568
1559void KOPrefsDialog::warningProjectView() 1569void KOPrefsDialog::warningProjectView()
1560{ 1570{
1561 warningExperimental(mEnableProjectView->checkBox()->isChecked()); 1571 warningExperimental(mEnableProjectView->checkBox()->isChecked());
1562} 1572}
1563 1573
1564void KOPrefsDialog::warningExperimental(bool on) 1574void KOPrefsDialog::warningExperimental(bool on)
1565{ 1575{
1566 if (on) { 1576 if (on) {
1567 KMessageBox::information(this,i18n("This is an experimental feature. " 1577 KMessageBox::information(this,i18n("This is an experimental feature. "
1568 "It may not work, it may do nothing useful and it may cause data loss. " 1578 "It may not work, it may do nothing useful and it may cause data loss. "
1569 "Use with care.\n" 1579 "Use with care.\n"
1570 "You have to restart KOrganizer for this setting to take effect.")); 1580 "You have to restart KOrganizer for this setting to take effect."));
1571 } else { 1581 } else {
1572 KMessageBox::information(this, 1582 KMessageBox::information(this,
1573 i18n("You have to restart KOrganizer for this setting to take effect.")); 1583 i18n("You have to restart KOrganizer for this setting to take effect."));
1574 } 1584 }
1575} 1585}
1576 1586
1577void KOPrefsDialog::toggleEmailSettings(bool on) 1587void KOPrefsDialog::toggleEmailSettings(bool on)
1578{ 1588{
1579 if (on) { 1589 if (on) {
1580 mEmailEdit->setEnabled(false); 1590 mEmailEdit->setEnabled(false);
1581 mNameEdit->setEnabled(false); 1591 mNameEdit->setEnabled(false);
1582 mEmailLabel->setEnabled(false); 1592 mEmailLabel->setEnabled(false);
1583 mNameLabel->setEnabled(false); 1593 mNameLabel->setEnabled(false);
1584 1594
1585 KEMailSettings settings; 1595 KEMailSettings settings;
1586 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); 1596 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName));
1587 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); 1597 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress));
1588 } else { 1598 } else {
1589 mEmailEdit->setEnabled(true); 1599 mEmailEdit->setEnabled(true);
1590 mNameEdit->setEnabled(true); 1600 mNameEdit->setEnabled(true);
1591 mEmailLabel->setEnabled(true); 1601 mEmailLabel->setEnabled(true);
1592 mNameLabel->setEnabled(true); 1602 mNameLabel->setEnabled(true);
1593 } 1603 }
1594} 1604}
1595 1605
1596void KOPrefsDialog::addItem() 1606void KOPrefsDialog::addItem()
1597{ 1607{
1598 // aEmailsEdit->setEnabled(true); 1608 // aEmailsEdit->setEnabled(true);
1599// QListViewItem *item = new QListViewItem(mAMails); 1609// QListViewItem *item = new QListViewItem(mAMails);
1600// mAMails->insertItem(item); 1610// mAMails->insertItem(item);
1601// mAMails->setSelected(item,true); 1611// mAMails->setSelected(item,true);
1602// aEmailsEdit->setText(i18n("(EmptyEmail)")); 1612// aEmailsEdit->setText(i18n("(EmptyEmail)"));
1603} 1613}
1604 1614
1605void KOPrefsDialog::removeItem() 1615void KOPrefsDialog::removeItem()
1606{ 1616{
1607// QListViewItem *item; 1617// QListViewItem *item;
1608// item = mAMails->selectedItem(); 1618// item = mAMails->selectedItem();
1609// if (!item) return; 1619// if (!item) return;
1610// mAMails->takeItem(item); 1620// mAMails->takeItem(item);
1611// item = mAMails->selectedItem(); 1621// item = mAMails->selectedItem();
1612// if (!item) { 1622// if (!item) {
1613// aEmailsEdit->setText(""); 1623// aEmailsEdit->setText("");
1614// aEmailsEdit->setEnabled(false); 1624// aEmailsEdit->setEnabled(false);
1615// } 1625// }
1616// if (mAMails->childCount() == 0) { 1626// if (mAMails->childCount() == 0) {
1617// aEmailsEdit->setEnabled(false); 1627// aEmailsEdit->setEnabled(false);
1618// } 1628// }
1619} 1629}
1620 1630
1621void KOPrefsDialog::updateItem() 1631void KOPrefsDialog::updateItem()
1622{ 1632{
1623 // QListViewItem *item; 1633 // QListViewItem *item;
1624// item = mAMails->selectedItem(); 1634// item = mAMails->selectedItem();
1625// if (!item) return; 1635// if (!item) return;
1626// item->setText(0,aEmailsEdit->text()); 1636// item->setText(0,aEmailsEdit->text());
1627} 1637}
1628 1638
1629void KOPrefsDialog::updateInput() 1639void KOPrefsDialog::updateInput()
1630{ 1640{
1631// QListViewItem *item; 1641// QListViewItem *item;
1632// item = mAMails->selectedItem(); 1642// item = mAMails->selectedItem();
1633// if (!item) return; 1643// if (!item) return;
1634// aEmailsEdit->setEnabled(true); 1644// aEmailsEdit->setEnabled(true);
1635// aEmailsEdit->setText(item->text(0)); 1645// aEmailsEdit->setText(item->text(0));
1636} 1646}
1637void KOPrefsDialog::updateTimezoneOffset( int index ) 1647void KOPrefsDialog::updateTimezoneOffset( int index )
1638{ 1648{
1639 /* 1649 /*
1640 qDebug("updateTimezoneOffset %d ", index); 1650 qDebug("updateTimezoneOffset %d ", index);
1641 if ( index < 24 ) { 1651 if ( index < 24 ) {
1642 mTimezoneOffsetSpin->setEnabled ( false ); 1652 mTimezoneOffsetSpin->setEnabled ( false );
1643 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); 1653 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 );
1644 1654
1645 1655
1646 } else { 1656 } else {
1647 if ( index == 24 ) { 1657 if ( index == 24 ) {
1648 mTimezoneOffsetSpin->setEnabled ( true ); 1658 mTimezoneOffsetSpin->setEnabled ( true );
1649 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1659 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1650 1660
1651 } else { 1661 } else {
1652 mTimezoneOffsetSpin->setEnabled ( false ); 1662 mTimezoneOffsetSpin->setEnabled ( false );
1653 mTimezoneOffsetSpin->setValue( 0 ); 1663 mTimezoneOffsetSpin->setValue( 0 );
1654 } 1664 }
1655 } 1665 }
1656 */ 1666 */
1657} 1667}
1658 1668
1659void KOPrefsDialog::setupTimeZoneTab() 1669void KOPrefsDialog::setupTimeZoneTab()
1660{ 1670{
1661#if 0 1671#if 0
1662 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); 1672 QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
1663 // DesktopIcon("clock",KIcon::SizeMedium)); 1673 // DesktopIcon("clock",KIcon::SizeMedium));
1664 1674
1665 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1675 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1666 topLayout->setSpacing(mSpacingHint); 1676 topLayout->setSpacing(mSpacingHint);
1667 topLayout->setMargin(mMarginHint); 1677 topLayout->setMargin(mMarginHint);
1668 1678
1669 QHBox *timeZoneBox = new QHBox( topFrame ); 1679 QHBox *timeZoneBox = new QHBox( topFrame );
1670 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 1680 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
1671 1681
1672 new QLabel( i18n("Timezone:"), timeZoneBox ); 1682 new QLabel( i18n("Timezone:"), timeZoneBox );
1673 mTimeZoneCombo = new QComboBox( timeZoneBox ); 1683 mTimeZoneCombo = new QComboBox( timeZoneBox );
1674 if ( QApplication::desktop()->width() < 300 ) { 1684 if ( QApplication::desktop()->width() < 300 ) {
1675 mTimeZoneCombo->setMaximumWidth(150); 1685 mTimeZoneCombo->setMaximumWidth(150);
1676 } 1686 }
1677 1687
1678 QStringList list; 1688 QStringList list;
1679 list = KGlobal::locale()->timeZoneList(); 1689 list = KGlobal::locale()->timeZoneList();
1680 mTimeZoneCombo->insertStringList(list); 1690 mTimeZoneCombo->insertStringList(list);
1681 1691
1682 // find the currently set time zone and select it 1692 // find the currently set time zone and select it
1683 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; 1693 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId;
1684 int nCurrentlySet = 11; 1694 int nCurrentlySet = 11;
1685 for (int i = 0; i < mTimeZoneCombo->count(); i++) 1695 for (int i = 0; i < mTimeZoneCombo->count(); i++)
1686 { 1696 {
1687 if (mTimeZoneCombo->text(i) == sCurrentlySet) 1697 if (mTimeZoneCombo->text(i) == sCurrentlySet)
1688 { 1698 {
1689 nCurrentlySet = i; 1699 nCurrentlySet = i;
1690 break; 1700 break;
1691 } 1701 }
1692 } 1702 }
1693 mTimeZoneCombo->setCurrentItem(nCurrentlySet); 1703 mTimeZoneCombo->setCurrentItem(nCurrentlySet);
1694 int iii = 1; 1704 int iii = 1;
1695 KPrefsDialogWidBool *sb = 1705 KPrefsDialogWidBool *sb =
1696 addWidBool(i18n("Timezone has daylight saving"), 1706 addWidBool(i18n("Timezone has daylight saving"),
1697 &(KOPrefs::instance()->mUseDaylightsaving),topFrame); 1707 &(KOPrefs::instance()->mUseDaylightsaving),topFrame);
1698 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 1708 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
1699 ++iii; 1709 ++iii;
1700 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); 1710 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame );
1701 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 1711 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1702 ++iii; 1712 ++iii;
1703 lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); 1713 lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
1704 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 1714 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1705 ++iii; 1715 ++iii;
1706 lab = new QLabel( i18n("Daylight start:"), topFrame ); 1716 lab = new QLabel( i18n("Daylight start:"), topFrame );
1707 topLayout->addWidget(lab, iii,0); 1717 topLayout->addWidget(lab, iii,0);
1708 mStartDateSavingEdit = new KDateEdit(topFrame); 1718 mStartDateSavingEdit = new KDateEdit(topFrame);
1709 topLayout->addWidget(mStartDateSavingEdit, iii,1); 1719 topLayout->addWidget(mStartDateSavingEdit, iii,1);
1710 ++iii; 1720 ++iii;
1711 1721
1712 lab = new QLabel( i18n("Daylight end:"), topFrame ); 1722 lab = new QLabel( i18n("Daylight end:"), topFrame );
1713 topLayout->addWidget(lab, iii,0); 1723 topLayout->addWidget(lab, iii,0);
1714 mEndDateSavingEdit = new KDateEdit(topFrame); 1724 mEndDateSavingEdit = new KDateEdit(topFrame);
1715 topLayout->addWidget(mEndDateSavingEdit, iii,1); 1725 topLayout->addWidget(mEndDateSavingEdit, iii,1);
1716 ++iii; 1726 ++iii;
1717 QDate current ( 2001, 1,1); 1727 QDate current ( 2001, 1,1);
1718 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1728 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1719 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1729 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1720#endif 1730#endif
1721 1731
1722} 1732}
1723 1733
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 935a5f5..7ee1eef 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1,1441 +1,1469 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qheader.h> 25#include <qheader.h>
26#include <qcursor.h> 26#include <qcursor.h>
27#include <qwhatsthis.h> 27#include <qwhatsthis.h>
28 28
29#include <qvbox.h> 29#include <qvbox.h>
30#include <kdebug.h> 30#include <kdebug.h>
31#include "koprefs.h" 31#include "koprefs.h"
32#include <klocale.h> 32#include <klocale.h>
33#include <kglobal.h> 33#include <kglobal.h>
34#include <kiconloader.h> 34#include <kiconloader.h>
35#include <kmessagebox.h> 35#include <kmessagebox.h>
36 36
37#include <libkcal/icaldrag.h> 37#include <libkcal/icaldrag.h>
38#include <libkcal/vcaldrag.h> 38#include <libkcal/vcaldrag.h>
39#include <libkcal/calfilter.h> 39#include <libkcal/calfilter.h>
40#include <libkcal/dndfactory.h> 40#include <libkcal/dndfactory.h>
41#include <libkcal/calendarresources.h> 41#include <libkcal/calendarresources.h>
42#include <libkcal/resourcecalendar.h> 42#include <libkcal/resourcecalendar.h>
43#include <kresources/resourceselectdialog.h> 43#include <kresources/resourceselectdialog.h>
44#include <libkcal/kincidenceformatter.h> 44#include <libkcal/kincidenceformatter.h>
45#ifndef DESKTOP_VERSION 45#ifndef DESKTOP_VERSION
46#include <qpe/qpeapplication.h> 46#include <qpe/qpeapplication.h>
47#else 47#else
48#include <qapplication.h> 48#include <qapplication.h>
49#endif 49#endif
50#ifndef KORG_NOPRINTER 50#ifndef KORG_NOPRINTER
51#include "calprinter.h" 51#include "calprinter.h"
52#endif 52#endif
53#include "docprefs.h" 53#include "docprefs.h"
54 54
55#include "kotodoview.h" 55#include "kotodoview.h"
56using namespace KOrg; 56using namespace KOrg;
57 57
58 58
59class KOTodoViewWhatsThis :public QWhatsThis 59class KOTodoViewWhatsThis :public QWhatsThis
60{ 60{
61public: 61public:
62 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 62 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
63 63
64protected: 64protected:
65 virtual QString text( const QPoint& p) 65 virtual QString text( const QPoint& p)
66 { 66 {
67 return _view->getWhatsThisText(p) ; 67 return _view->getWhatsThisText(p) ;
68 } 68 }
69private: 69private:
70 QWidget* _wid; 70 QWidget* _wid;
71 KOTodoView * _view; 71 KOTodoView * _view;
72}; 72};
73 73
74KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, 74KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent,
75 const char *name) : 75 const char *name) :
76 KListView(parent,name) 76 KListView(parent,name)
77{ 77{
78 mName = QString ( name ); 78 mName = QString ( name );
79 mCalendar = calendar; 79 mCalendar = calendar;
80#ifndef DESKTOP_VERSION 80#ifndef DESKTOP_VERSION
81 QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); 81 QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold );
82#endif 82#endif
83 mOldCurrent = 0; 83 mOldCurrent = 0;
84 mMousePressed = false; 84 mMousePressed = false;
85 85
86 setAcceptDrops(true); 86 setAcceptDrops(true);
87 viewport()->setAcceptDrops(true); 87 viewport()->setAcceptDrops(true);
88 int size = 16; 88 int size = 16;
89 if (qApp->desktop()->width() < 300 ) 89 if (qApp->desktop()->width() < 300 )
90 size = 12; 90 size = 12;
91 setTreeStepSize( size + 6 ); 91 setTreeStepSize( size + 6 );
92 92
93} 93}
94 94
95void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) 95void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
96{ 96{
97#ifndef KORG_NODND 97#ifndef KORG_NODND
98// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; 98// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl;
99 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 99 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
100 !QTextDrag::canDecode( e ) ) { 100 !QTextDrag::canDecode( e ) ) {
101 e->ignore(); 101 e->ignore();
102 return; 102 return;
103 } 103 }
104 104
105 mOldCurrent = currentItem(); 105 mOldCurrent = currentItem();
106#endif 106#endif
107} 107}
108 108
109 109
110void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) 110void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
111{ 111{
112#ifndef KORG_NODND 112#ifndef KORG_NODND
113// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; 113// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl;
114 114
115 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 115 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
116 !QTextDrag::canDecode( e ) ) { 116 !QTextDrag::canDecode( e ) ) {
117 e->ignore(); 117 e->ignore();
118 return; 118 return;
119 } 119 }
120 120
121 e->accept(); 121 e->accept();
122#endif 122#endif
123} 123}
124 124
125void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) 125void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *)
126{ 126{
127#ifndef KORG_NODND 127#ifndef KORG_NODND
128// kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; 128// kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl;
129 129
130 setCurrentItem(mOldCurrent); 130 setCurrentItem(mOldCurrent);
131 setSelected(mOldCurrent,true); 131 setSelected(mOldCurrent,true);
132#endif 132#endif
133} 133}
134 134
135void KOTodoListView::contentsDropEvent(QDropEvent *e) 135void KOTodoListView::contentsDropEvent(QDropEvent *e)
136{ 136{
137#ifndef KORG_NODND 137#ifndef KORG_NODND
138// kdDebug() << "KOTodoListView::contentsDropEvent" << endl; 138// kdDebug() << "KOTodoListView::contentsDropEvent" << endl;
139 139
140 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 140 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
141 !QTextDrag::canDecode( e ) ) { 141 !QTextDrag::canDecode( e ) ) {
142 e->ignore(); 142 e->ignore();
143 return; 143 return;
144 } 144 }
145 145
146 DndFactory factory( mCalendar ); 146 DndFactory factory( mCalendar );
147 Todo *todo = factory.createDropTodo(e); 147 Todo *todo = factory.createDropTodo(e);
148 148
149 if (todo) { 149 if (todo) {
150 e->acceptAction(); 150 e->acceptAction();
151 151
152 KOTodoViewItem *destination = 152 KOTodoViewItem *destination =
153 (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); 153 (KOTodoViewItem *)itemAt(contentsToViewport(e->pos()));
154 Todo *destinationEvent = 0; 154 Todo *destinationEvent = 0;
155 if (destination) destinationEvent = destination->todo(); 155 if (destination) destinationEvent = destination->todo();
156 156
157 Todo *existingTodo = mCalendar->todo(todo->uid()); 157 Todo *existingTodo = mCalendar->todo(todo->uid());
158 158
159 if(existingTodo) { 159 if(existingTodo) {
160 Incidence *to = destinationEvent; 160 Incidence *to = destinationEvent;
161 while(to) { 161 while(to) {
162 if (to->uid() == todo->uid()) { 162 if (to->uid() == todo->uid()) {
163 KMessageBox::sorry(this, 163 KMessageBox::sorry(this,
164 i18n("Cannot move To-Do to itself\nor a child of itself"), 164 i18n("Cannot move To-Do to itself\nor a child of itself"),
165 i18n("Drop To-Do")); 165 i18n("Drop To-Do"));
166 delete todo; 166 delete todo;
167 return; 167 return;
168 } 168 }
169 to = to->relatedTo(); 169 to = to->relatedTo();
170 } 170 }
171 internalDrop = true; 171 internalDrop = true;
172 if ( destinationEvent ) 172 if ( destinationEvent )
173 reparentTodoSignal( destinationEvent, existingTodo ); 173 reparentTodoSignal( destinationEvent, existingTodo );
174 else 174 else
175 unparentTodoSignal(existingTodo); 175 unparentTodoSignal(existingTodo);
176 delete todo; 176 delete todo;
177 } else { 177 } else {
178 mCalendar->addTodo(todo); 178 mCalendar->addTodo(todo);
179 emit todoDropped(todo, KOGlobals::EVENTADDED); 179 emit todoDropped(todo, KOGlobals::EVENTADDED);
180 if ( destinationEvent ) 180 if ( destinationEvent )
181 reparentTodoSignal( destinationEvent, todo ); 181 reparentTodoSignal( destinationEvent, todo );
182 } 182 }
183 } 183 }
184 else { 184 else {
185 QString text; 185 QString text;
186 if (QTextDrag::decode(e,text)) { 186 if (QTextDrag::decode(e,text)) {
187 //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); 187 //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
188 KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); 188 KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) ));
189 qDebug("Dropped : " + text); 189 qDebug("Dropped : " + text);
190 QStringList emails = QStringList::split(",",text); 190 QStringList emails = QStringList::split(",",text);
191 for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { 191 for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
192 int pos = (*it).find("<"); 192 int pos = (*it).find("<");
193 QString name = (*it).left(pos); 193 QString name = (*it).left(pos);
194 QString email = (*it).mid(pos); 194 QString email = (*it).mid(pos);
195 if (!email.isEmpty() && todoi) { 195 if (!email.isEmpty() && todoi) {
196 todoi->todo()->addAttendee(new Attendee(name,email)); 196 todoi->todo()->addAttendee(new Attendee(name,email));
197 } 197 }
198 } 198 }
199 } 199 }
200 else { 200 else {
201 qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable "); 201 qDebug("KOTodoListView::contentsDropEvent(): Todo from drop not decodable ");
202 e->ignore(); 202 e->ignore();
203 } 203 }
204 } 204 }
205#endif 205#endif
206} 206}
207void KOTodoListView::wheelEvent (QWheelEvent *e) 207void KOTodoListView::wheelEvent (QWheelEvent *e)
208{ 208{
209 QListView::wheelEvent (e); 209 QListView::wheelEvent (e);
210} 210}
211 211
212void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) 212void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
213{ 213{
214 214
215 QPoint p(contentsToViewport(e->pos())); 215 QPoint p(contentsToViewport(e->pos()));
216 QListViewItem *i = itemAt(p); 216 QListViewItem *i = itemAt(p);
217 bool rootClicked = true; 217 bool rootClicked = true;
218 if (i) { 218 if (i) {
219 // if the user clicked into the root decoration of the item, don't 219 // if the user clicked into the root decoration of the item, don't
220 // try to start a drag! 220 // try to start a drag!
221 int X = p.x(); 221 int X = p.x();
222 //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); 222 //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() );
223 if (X > header()->sectionPos(0) + 223 if (X > header()->sectionPos(0) +
224 treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + 224 treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) +
225 itemMargin() +i->height()|| 225 itemMargin() +i->height()||
226 X < header()->sectionPos(0)) { 226 X < header()->sectionPos(0)) {
227 rootClicked = false; 227 rootClicked = false;
228 } 228 }
229 } else { 229 } else {
230 rootClicked = false; 230 rootClicked = false;
231 } 231 }
232#ifndef KORG_NODND 232#ifndef KORG_NODND
233 mMousePressed = false; 233 mMousePressed = false;
234 if (! rootClicked && !( e->button() == RightButton) ) { 234 if (! rootClicked && !( e->button() == RightButton) ) {
235 mPressPos = e->pos(); 235 mPressPos = e->pos();
236 mMousePressed = true; 236 mMousePressed = true;
237 } else { 237 } else {
238 mMousePressed = false; 238 mMousePressed = false;
239 } 239 }
240#endif 240#endif
241 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); 241 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked);
242#ifndef DESKTOP_VERSION 242#ifndef DESKTOP_VERSION
243 if (!( e->button() == RightButton && rootClicked) ) 243 if (!( e->button() == RightButton && rootClicked) )
244 QListView::contentsMousePressEvent(e); 244 QListView::contentsMousePressEvent(e);
245#else 245#else
246 QListView::contentsMousePressEvent(e); 246 QListView::contentsMousePressEvent(e);
247#endif 247#endif
248} 248}
249void KOTodoListView::paintEvent(QPaintEvent* e) 249void KOTodoListView::paintEvent(QPaintEvent* e)
250{ 250{
251 emit paintNeeded(); 251 emit paintNeeded();
252 QListView::paintEvent( e); 252 QListView::paintEvent( e);
253} 253}
254void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) 254void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
255{ 255{
256 256
257#ifndef KORG_NODND 257#ifndef KORG_NODND
258 //QListView::contentsMouseMoveEvent(e); 258 //QListView::contentsMouseMoveEvent(e);
259 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > 259 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() >
260 QApplication::startDragDistance()*3) { 260 QApplication::startDragDistance()*3) {
261 mMousePressed = false; 261 mMousePressed = false;
262 QListViewItem *item = itemAt(contentsToViewport(mPressPos)); 262 QListViewItem *item = itemAt(contentsToViewport(mPressPos));
263 if (item) { 263 if (item) {
264 DndFactory factory( mCalendar ); 264 DndFactory factory( mCalendar );
265 ICalDrag *vd = factory.createDrag( 265 ICalDrag *vd = factory.createDrag(
266 ((KOTodoViewItem *)item)->todo(),viewport()); 266 ((KOTodoViewItem *)item)->todo(),viewport());
267 internalDrop = false; 267 internalDrop = false;
268 // we cannot do any senseful here, because the DnD is still broken in Qt 268 // we cannot do any senseful here, because the DnD is still broken in Qt
269 if (vd->drag()) { 269 if (vd->drag()) {
270 if ( !internalDrop ) { 270 if ( !internalDrop ) {
271 //emit deleteTodo( ((KOTodoViewItem *)item)->todo() ); 271 //emit deleteTodo( ((KOTodoViewItem *)item)->todo() );
272 qDebug("Dnd: External move: Delete drag source "); 272 qDebug("Dnd: External move: Delete drag source ");
273 } else 273 } else
274 qDebug("Dnd: Internal move "); 274 qDebug("Dnd: Internal move ");
275 275
276 } else { 276 } else {
277 if ( !internalDrop ) { 277 if ( !internalDrop ) {
278 qDebug("Dnd: External Copy"); 278 qDebug("Dnd: External Copy");
279 } else 279 } else
280 qDebug("DnD: Internal copy: Copy pending"); 280 qDebug("DnD: Internal copy: Copy pending");
281 } 281 }
282 } 282 }
283 } 283 }
284#endif 284#endif
285} 285}
286void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) 286void KOTodoListView::keyReleaseEvent ( QKeyEvent *e )
287{ 287{
288 if ( !e->isAutoRepeat() ) { 288 if ( !e->isAutoRepeat() ) {
289 mFlagKeyPressed = false; 289 mFlagKeyPressed = false;
290 } 290 }
291} 291}
292 292
293 293
294void KOTodoListView::keyPressEvent ( QKeyEvent * e ) 294void KOTodoListView::keyPressEvent ( QKeyEvent * e )
295{ 295{
296 qApp->processEvents(); 296 qApp->processEvents();
297 if ( e->isAutoRepeat() && !mFlagKeyPressed ) { 297 if ( e->isAutoRepeat() && !mFlagKeyPressed ) {
298 e->ignore(); 298 e->ignore();
299 // qDebug(" ignore %d",e->isAutoRepeat() ); 299 // qDebug(" ignore %d",e->isAutoRepeat() );
300 return; 300 return;
301 } 301 }
302 if (! e->isAutoRepeat() ) 302 if (! e->isAutoRepeat() )
303 mFlagKeyPressed = true; 303 mFlagKeyPressed = true;
304 QListViewItem* cn; 304 QListViewItem* cn;
305 if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { 305 if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) {
306 cn = currentItem(); 306 cn = currentItem();
307 if ( cn ) { 307 if ( cn ) {
308 KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); 308 KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
309 if ( ci ){ 309 if ( ci ){
310 if ( e->state() == ShiftButton ) 310 if ( e->state() == ShiftButton )
311 ci->setOn( false ); 311 ci->setOn( false );
312 else 312 else
313 ci->setOn( true ); 313 ci->setOn( true );
314 cn = cn->itemBelow(); 314 cn = cn->itemBelow();
315 if ( cn ) { 315 if ( cn ) {
316 setCurrentItem ( cn ); 316 setCurrentItem ( cn );
317 ensureItemVisible ( cn ); 317 ensureItemVisible ( cn );
318 } 318 }
319 319
320 } 320 }
321 } 321 }
322 322
323 return; 323 return;
324 } 324 }
325 325
326 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { 326 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) {
327 switch ( e->key() ) { 327 switch ( e->key() ) {
328 case Qt::Key_Down: 328 case Qt::Key_Down:
329 case Qt::Key_Up: 329 case Qt::Key_Up:
330 QListView::keyPressEvent ( e ); 330 QListView::keyPressEvent ( e );
331 break; 331 break;
332 case Qt::Key_Left: 332 case Qt::Key_Left:
333 case Qt::Key_Right: 333 case Qt::Key_Right:
334 QListView::keyPressEvent ( e ); 334 QListView::keyPressEvent ( e );
335 e->accept(); 335 e->accept();
336 return; 336 return;
337 break; 337 break;
338 default: 338 default:
339 e->ignore(); 339 e->ignore();
340 break; 340 break;
341 } 341 }
342 return; 342 return;
343 } 343 }
344 e->ignore(); 344 e->ignore();
345} 345}
346void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) 346void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e)
347{ 347{
348 QListView::contentsMouseReleaseEvent(e); 348 QListView::contentsMouseReleaseEvent(e);
349 mMousePressed = false; 349 mMousePressed = false;
350} 350}
351 351
352void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) 352void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
353{ 353{
354 if (!e) return; 354 if (!e) return;
355 355
356 QPoint vp = contentsToViewport(e->pos()); 356 QPoint vp = contentsToViewport(e->pos());
357 357
358 QListViewItem *item = itemAt(vp); 358 QListViewItem *item = itemAt(vp);
359 359
360 emit double_Clicked(item); 360 emit double_Clicked(item);
361 if (!item) return; 361 if (!item) return;
362 362
363 emit doubleClicked(item,vp,0); 363 emit doubleClicked(item,vp,0);
364} 364}
365 365
366///////////////////////////////////////////////////////////////////////////// 366/////////////////////////////////////////////////////////////////////////////
367 367
368KOQuickTodo::KOQuickTodo(QWidget *parent) : 368KOQuickTodo::KOQuickTodo(QWidget *parent) :
369 QLineEdit(parent) 369 QLineEdit(parent)
370{ 370{
371 setText(i18n("Click to add a new Todo")); 371 setText(i18n("Click to add a new Todo"));
372} 372}
373 373
374void KOQuickTodo::focusInEvent(QFocusEvent *ev) 374void KOQuickTodo::focusInEvent(QFocusEvent *ev)
375{ 375{
376 if ( text()==i18n("Click to add a new Todo") ) 376 if ( text()==i18n("Click to add a new Todo") )
377 setText(""); 377 setText("");
378 QLineEdit::focusInEvent(ev); 378 QLineEdit::focusInEvent(ev);
379} 379}
380 380
381void KOQuickTodo::focusOutEvent(QFocusEvent *ev) 381void KOQuickTodo::focusOutEvent(QFocusEvent *ev)
382{ 382{
383 setText(i18n("Click to add a new Todo")); 383 setText(i18n("Click to add a new Todo"));
384 QLineEdit::focusOutEvent(ev); 384 QLineEdit::focusOutEvent(ev);
385} 385}
386 386
387///////////////////////////////////////////////////////////////////////////// 387/////////////////////////////////////////////////////////////////////////////
388 388
389KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : 389KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
390 KOrg::BaseView(calendar,parent,name) 390 KOrg::BaseView(calendar,parent,name)
391{ 391{
392 mPendingUpdateBeforeRepaint = false; 392 mPendingUpdateBeforeRepaint = false;
393 isFlatDisplay = false; 393 isFlatDisplay = false;
394 mNavigator = 0; 394 mNavigator = 0;
395 QBoxLayout *topLayout = new QVBoxLayout(this); 395 QBoxLayout *topLayout = new QVBoxLayout(this);
396 mName = QString ( name ); 396 mName = QString ( name );
397 mBlockUpdate = false; 397 mBlockUpdate = false;
398 mQuickAdd = new KOQuickTodo(this); 398 mQuickAdd = new KOQuickTodo(this);
399 topLayout->addWidget(mQuickAdd); 399 topLayout->addWidget(mQuickAdd);
400 400
401 if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); 401 if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide();
402 402
403 mTodoListView = new KOTodoListView(calendar,this, name ); 403 mTodoListView = new KOTodoListView(calendar,this, name );
404 topLayout->addWidget(mTodoListView); 404 topLayout->addWidget(mTodoListView);
405 //mTodoListView->header()->setMaximumHeight(30); 405 //mTodoListView->header()->setMaximumHeight(30);
406 mTodoListView->setRootIsDecorated(true); 406 mTodoListView->setRootIsDecorated(true);
407 mTodoListView->setAllColumnsShowFocus(true); 407 mTodoListView->setAllColumnsShowFocus(true);
408 408
409 mTodoListView->setShowSortIndicator(true); 409 mTodoListView->setShowSortIndicator(true);
410 410
411 mTodoListView->addColumn(i18n("Todo")); 411 mTodoListView->addColumn(i18n("Todo"));
412 mTodoListView->addColumn(i18n("Prio")); 412 mTodoListView->addColumn(i18n("Prio"));
413 mTodoListView->setColumnAlignment(1,AlignHCenter); 413 mTodoListView->setColumnAlignment(1,AlignHCenter);
414 mTodoListView->addColumn(i18n("Complete")); 414 mTodoListView->addColumn(i18n("Complete"));
415 mTodoListView->setColumnAlignment(2,AlignCenter); 415 mTodoListView->setColumnAlignment(2,AlignCenter);
416 416
417 mTodoListView->addColumn(i18n("Due Date")); 417 mTodoListView->addColumn(i18n("Due Date"));
418 mTodoListView->setColumnAlignment(3,AlignLeft); 418 mTodoListView->setColumnAlignment(3,AlignLeft);
419 mTodoListView->addColumn(i18n("Due Time")); 419 mTodoListView->addColumn(i18n("Due Time"));
420 mTodoListView->setColumnAlignment(4,AlignHCenter); 420 mTodoListView->setColumnAlignment(4,AlignHCenter);
421 421
422 mTodoListView->addColumn(i18n("Start Date")); 422 mTodoListView->addColumn(i18n("Start Date"));
423 mTodoListView->setColumnAlignment(5,AlignLeft); 423 mTodoListView->setColumnAlignment(5,AlignLeft);
424 mTodoListView->addColumn(i18n("Start Time")); 424 mTodoListView->addColumn(i18n("Start Time"));
425 mTodoListView->setColumnAlignment(6,AlignHCenter); 425 mTodoListView->setColumnAlignment(6,AlignHCenter);
426 426
427 mTodoListView->addColumn(i18n("Cancelled")); 427 mTodoListView->addColumn(i18n("Cancelled"));
428 mTodoListView->addColumn(i18n("Categories")); 428 mTodoListView->addColumn(i18n("Categories"));
429#if 0 429#if 0
430 mTodoListView->addColumn(i18n("Sort Id")); 430 mTodoListView->addColumn(i18n("Sort Id"));
431 mTodoListView->setColumnAlignment(4,AlignHCenter); 431 mTodoListView->setColumnAlignment(4,AlignHCenter);
432#endif 432#endif
433 433
434 mTodoListView->setMinimumHeight( 60 ); 434 mTodoListView->setMinimumHeight( 60 );
435 mTodoListView->setItemsRenameable( true ); 435 mTodoListView->setItemsRenameable( true );
436 mTodoListView->setRenameable( 0 ); 436 mTodoListView->setRenameable( 0 );
437 mTodoListView->setColumnWidth( 0, 120 ); 437 mTodoListView->setColumnWidth( 0, 120 );
438 mTodoListView->setColumnWidthMode(0, QListView::Manual); 438 mTodoListView->setColumnWidthMode(0, QListView::Manual);
439 mTodoListView->setColumnWidthMode(1, QListView::Manual); 439 mTodoListView->setColumnWidthMode(1, QListView::Manual);
440 mTodoListView->setColumnWidthMode(2, QListView::Manual); 440 mTodoListView->setColumnWidthMode(2, QListView::Manual);
441 mTodoListView->setColumnWidthMode(3, QListView::Manual); 441 mTodoListView->setColumnWidthMode(3, QListView::Manual);
442 mTodoListView->setColumnWidthMode(4, QListView::Manual); 442 mTodoListView->setColumnWidthMode(4, QListView::Manual);
443 mTodoListView->setColumnWidthMode(5, QListView::Manual); 443 mTodoListView->setColumnWidthMode(5, QListView::Manual);
444 mTodoListView->setColumnWidthMode(6, QListView::Manual); 444 mTodoListView->setColumnWidthMode(6, QListView::Manual);
445 mTodoListView->setColumnWidthMode(7, QListView::Manual); 445 mTodoListView->setColumnWidthMode(7, QListView::Manual);
446 mTodoListView->setColumnWidthMode(8, QListView::Manual); 446 mTodoListView->setColumnWidthMode(8, QListView::Manual);
447 447
448 448
449 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); 449 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
450 450
451 mPriorityPopupMenu = new QPopupMenu(this); 451 mPriorityPopupMenu = new QPopupMenu(this);
452 for (int i = 1; i <= 5; i++) { 452 for (int i = 1; i <= 5; i++) {
453 QString label = QString ("%1").arg (i); 453 QString label = QString ("%1").arg (i);
454 mPriority[mPriorityPopupMenu->insertItem (label)] = i; 454 mPriority[mPriorityPopupMenu->insertItem (label)] = i;
455 } 455 }
456 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); 456 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
457 457
458 mPercentageCompletedPopupMenu = new QPopupMenu(this); 458 mPercentageCompletedPopupMenu = new QPopupMenu(this);
459 for (int i = 0; i <= 100; i+=20) { 459 for (int i = 0; i <= 100; i+=20) {
460 QString label = QString ("%1 %").arg (i); 460 QString label = QString ("%1 %").arg (i);
461 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; 461 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
462 } 462 }
463 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); 463 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
464 464
465 465
466 466
467 mItemPopupMenu = new QPopupMenu(this); 467 mItemPopupMenu = new QPopupMenu(this);
468 mItemPopupMenu->insertItem(i18n("Show..."), this, 468 mItemPopupMenu->insertItem(i18n("Show..."), this,
469 SLOT (showTodo())); 469 SLOT (showTodo()));
470 mItemPopupMenu->insertItem(i18n("Edit..."), this, 470 mItemPopupMenu->insertItem(i18n("Edit..."), this,
471 SLOT (editTodo())); 471 SLOT (editTodo()));
472 mItemPopupMenu->insertItem( i18n("Delete"), this, 472 mItemPopupMenu->insertItem( i18n("Delete"), this,
473 SLOT (deleteTodo())); 473 SLOT (deleteTodo()));
474 mItemPopupMenu->insertItem( i18n("Clone..."), this, 474 mItemPopupMenu->insertItem( i18n("Clone..."), this,
475 SLOT (cloneTodo())); 475 SLOT (cloneTodo()));
476 mItemPopupMenu->insertItem( i18n("Move..."), this, 476 mItemPopupMenu->insertItem( i18n("Move..."), this,
477 SLOT (moveTodo())); 477 SLOT (moveTodo()));
478 mItemPopupMenu->insertItem( i18n("Beam..."), this, 478 mItemPopupMenu->insertItem( i18n("Beam..."), this,
479 SLOT (beamTodo())); 479 SLOT (beamTodo()));
480 mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, 480 mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this,
481 SLOT (cancelTodo())); 481 SLOT (cancelTodo()));
482 mItemPopupMenu->insertSeparator(); 482 mItemPopupMenu->insertSeparator();
483 483
484 mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this,
485 SLOT (toggleRunningItem()));
484 mItemPopupMenu->insertItem( i18n("New Todo..."), this, 486 mItemPopupMenu->insertItem( i18n("New Todo..."), this,
485 SLOT (newTodo())); 487 SLOT (newTodo()));
486 mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, 488 mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this,
487 SLOT (newSubTodo())); 489 SLOT (newSubTodo()));
488 mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, 490 mItemPopupMenu->insertItem(i18n("Unparent Todo"), this,
489 SLOT (unparentTodo()),0,21); 491 SLOT (unparentTodo()),0,21);
490 mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, 492 mItemPopupMenu->insertItem(i18n("Reparent Todo"), this,
491 SLOT (reparentTodo()),0,22); 493 SLOT (reparentTodo()),0,22);
492 mItemPopupMenu->insertSeparator(); 494 mItemPopupMenu->insertSeparator();
493#if 0 495#if 0
494 mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), 496 mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"),
495 this, SLOT( purgeCompleted() ) ); 497 this, SLOT( purgeCompleted() ) );
496 mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), 498 mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"),
497 this, SLOT( toggleCompleted() ),0, 33 ); 499 this, SLOT( toggleCompleted() ),0, 33 );
498 mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), 500 mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
499 this, SLOT( toggleQuickTodo() ),0, 34 ); 501 this, SLOT( toggleQuickTodo() ),0, 34 );
500 mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), 502 mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
501 this, SLOT( toggleRunning() ),0, 35 ); 503 this, SLOT( toggleRunning() ),0, 35 );
502 504
503#endif 505#endif
504 mPopupMenu = new QPopupMenu(this); 506 mPopupMenu = new QPopupMenu(this);
505 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, 507 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this,
506 SLOT (newTodo()),0,1); 508 SLOT (newTodo()),0,1);
507 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), 509 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"),
508 this, SLOT(purgeCompleted()),0,2); 510 this, SLOT(purgeCompleted()),0,2);
509 mPopupMenu->insertItem(i18n("Show Completed"), 511 mPopupMenu->insertItem(i18n("Show Completed"),
510 this, SLOT( toggleCompleted() ),0,3 ); 512 this, SLOT( toggleCompleted() ),0,3 );
511 mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), 513 mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"),
512 this, SLOT( toggleQuickTodo() ),0,4 ); 514 this, SLOT( toggleQuickTodo() ),0,4 );
513 mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), 515 mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"),
514 this, SLOT( toggleRunning() ),0,5 ); 516 this, SLOT( toggleRunning() ),0,5 );
515 mPopupMenu->insertItem(i18n(" set all open","Display all opened"), 517 mPopupMenu->insertItem(i18n(" set all open","Display all opened"),
516 this, SLOT( setAllOpen() ),0,6 ); 518 this, SLOT( setAllOpen() ),0,6 );
517 mPopupMenu->insertItem(i18n(" set all close","Display all closed"), 519 mPopupMenu->insertItem(i18n(" set all close","Display all closed"),
518 this, SLOT( setAllClose() ),0,7 ); 520 this, SLOT( setAllClose() ),0,7 );
519 mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), 521 mPopupMenu->insertItem(i18n(" set all flat","Display all flat"),
520 this, SLOT( setAllFlat() ),0,8 ); 522 this, SLOT( setAllFlat() ),0,8 );
521 mDocPrefs = new DocPrefs( name ); 523 mDocPrefs = new DocPrefs( name );
522 524
523 mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); 525 mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu );
524 mPopupMenu->setCheckable( true ); 526 mPopupMenu->setCheckable( true );
525 mItemPopupMenu->setCheckable( true ); 527 mItemPopupMenu->setCheckable( true );
526 528
527 529
528 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); 530 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo );
529 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); 531 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo );
530 532
531 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); 533 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo);
532 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); 534 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo );
533 535
534 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); 536 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos);
535 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); 537 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos );
536 538
537 539
538 // Double clicking conflicts with opening/closing the subtree 540 // Double clicking conflicts with opening/closing the subtree
539 connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), 541 connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ),
540 SLOT( editItem( QListViewItem *) ) ); 542 SLOT( editItem( QListViewItem *) ) );
541 /* 543 /*
542 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, 544 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *,
543 const QPoint &,int ) ), 545 const QPoint &,int ) ),
544 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 546 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
545 */ 547 */
546 connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, 548 connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *,
547 const QPoint &,int ) ), 549 const QPoint &,int ) ),
548 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 550 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
549 connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), 551 connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ),
550 SLOT( itemClicked( QListViewItem * ) ) ); 552 SLOT( itemClicked( QListViewItem * ) ) );
551 connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), 553 connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ),
552 SLOT( itemDoubleClicked( QListViewItem * ) ) ); 554 SLOT( itemDoubleClicked( QListViewItem * ) ) );
553 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 555 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
554 SLOT( updateView() ) ); 556 SLOT( updateView() ) );
555 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 557 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
556 SLOT( todoModified(Todo *, int) ) ); 558 SLOT( todoModified(Todo *, int) ) );
557 connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), 559 connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ),
558 SLOT( itemStateChanged( QListViewItem * ) ) ); 560 SLOT( itemStateChanged( QListViewItem * ) ) );
559 connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), 561 connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ),
560 SLOT( itemStateChanged( QListViewItem * ) ) ); 562 SLOT( itemStateChanged( QListViewItem * ) ) );
561 connect( mTodoListView, SIGNAL( paintNeeded() ), 563 connect( mTodoListView, SIGNAL( paintNeeded() ),
562 SLOT( paintNeeded()) ); 564 SLOT( paintNeeded()) );
563 565
564#if 0 566#if 0
565 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), 567 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)),
566 SLOT(selectionChanged(QListViewItem *))); 568 SLOT(selectionChanged(QListViewItem *)));
567 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), 569 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)),
568 SLOT(selectionChanged(QListViewItem *))); 570 SLOT(selectionChanged(QListViewItem *)));
569 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), 571 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)),
570 SLOT(selectionChanged(QListViewItem *))); 572 SLOT(selectionChanged(QListViewItem *)));
571#endif 573#endif
572 574
573 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); 575 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) ));
574 connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); 576 connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) ));
575 connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); 577 connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) ));
576 578
577 connect( mTodoListView, SIGNAL(selectionChanged() ), 579 connect( mTodoListView, SIGNAL(selectionChanged() ),
578 SLOT( processSelectionChange() ) ); 580 SLOT( processSelectionChange() ) );
579 connect( mQuickAdd, SIGNAL( returnPressed () ), 581 connect( mQuickAdd, SIGNAL( returnPressed () ),
580 SLOT( addQuickTodo() ) ); 582 SLOT( addQuickTodo() ) );
581 583
582} 584}
583 585
584KOTodoView::~KOTodoView() 586KOTodoView::~KOTodoView()
585{ 587{
586 // delete mKOTodoViewWhatsThis; 588 // delete mKOTodoViewWhatsThis;
587 delete mDocPrefs; 589 delete mDocPrefs;
588} 590}
589QString KOTodoView::getWhatsThisText(QPoint p) 591QString KOTodoView::getWhatsThisText(QPoint p)
590{ 592{
591 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); 593 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
592 if ( item ) 594 if ( item )
593 return KIncidenceFormatter::instance()->getFormattedText( item->todo(), 595 return KIncidenceFormatter::instance()->getFormattedText( item->todo(),
594 KOPrefs::instance()->mWTshowDetails, 596 KOPrefs::instance()->mWTshowDetails,
595 KOPrefs::instance()->mWTshowCreated, 597 KOPrefs::instance()->mWTshowCreated,
596 KOPrefs::instance()->mWTshowChanged); 598 KOPrefs::instance()->mWTshowChanged);
597 return i18n("That is the todo view" ); 599 return i18n("That is the todo view" );
598 600
599} 601}
600 602
601void KOTodoView::jumpToDate () 603void KOTodoView::jumpToDate ()
602{ 604{
603 // if (mActiveItem) { 605 // if (mActiveItem) {
604// mActiveItem->todo()); 606// mActiveItem->todo());
605// if ( mActiveItem->todo()->hasDueDate() ) 607// if ( mActiveItem->todo()->hasDueDate() )
606// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); 608// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() );
607} 609}
608void KOTodoView::paintNeeded() 610void KOTodoView::paintNeeded()
609{ 611{
610 if ( mPendingUpdateBeforeRepaint ) { 612 if ( mPendingUpdateBeforeRepaint ) {
611 updateView(); 613 updateView();
612 mPendingUpdateBeforeRepaint = false; 614 mPendingUpdateBeforeRepaint = false;
613 } 615 }
614} 616}
615void KOTodoView::paintEvent(QPaintEvent * pevent) 617void KOTodoView::paintEvent(QPaintEvent * pevent)
616{ 618{
617 if ( mPendingUpdateBeforeRepaint ) { 619 if ( mPendingUpdateBeforeRepaint ) {
618 updateView(); 620 updateView();
619 mPendingUpdateBeforeRepaint = false; 621 mPendingUpdateBeforeRepaint = false;
620 } 622 }
621 KOrg::BaseView::paintEvent( pevent); 623 KOrg::BaseView::paintEvent( pevent);
622} 624}
623 625
624void KOTodoView::updateView() 626void KOTodoView::updateView()
625{ 627{
626 pendingSubtodo = 0; 628 pendingSubtodo = 0;
627 if ( mBlockUpdate ) { 629 if ( mBlockUpdate ) {
628 return; 630 return;
629 } 631 }
630 if ( !isVisible() ) { 632 if ( !isVisible() ) {
631 mPendingUpdateBeforeRepaint = true; 633 mPendingUpdateBeforeRepaint = true;
632 return; 634 return;
633 } 635 }
634 storeCurrentItem(); 636 storeCurrentItem();
635 //qDebug("KOTodoView::updateView() %x", this); 637 //qDebug("KOTodoView::updateView() %x", this);
636 if ( isFlatDisplay ) { 638 if ( isFlatDisplay ) {
637 displayAllFlat(); 639 displayAllFlat();
638 resetCurrentItem(); 640 resetCurrentItem();
639 return; 641 return;
640 } 642 }
641 //qDebug("update "); 643 //qDebug("update ");
642// kdDebug() << "KOTodoView::updateView()" << endl; 644// kdDebug() << "KOTodoView::updateView()" << endl;
643 QFont fo = KOPrefs::instance()->mTodoViewFont; 645 QFont fo = KOPrefs::instance()->mTodoViewFont;
644 646
645 647
646 mTodoListView->clear(); 648 mTodoListView->clear();
647 if ( mName == "todolistsmall" ) { 649 if ( mName == "todolistsmall" ) {
648 if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { 650 if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) {
649 int ps = fo.pointSize() -2; 651 int ps = fo.pointSize() -2;
650 if ( ps > 12 ) 652 if ( ps > 12 )
651 ps -= 2; 653 ps -= 2;
652 fo.setPointSize( ps ); 654 fo.setPointSize( ps );
653 } 655 }
654 } 656 }
655 657
656 mTodoListView->setFont( fo ); 658 mTodoListView->setFont( fo );
657 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); 659 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont );
658 //mTodoListView->header()->setMaximumHeight(fm.height()); 660 //mTodoListView->header()->setMaximumHeight(fm.height());
659 QPtrList<Todo> todoList = calendar()->todos(); 661 QPtrList<Todo> todoList = calendar()->todos();
660 662
661/* 663/*
662 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; 664 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl;
663 Event *t; 665 Event *t;
664 for(t = todoList.first(); t; t = todoList.next()) { 666 for(t = todoList.first(); t; t = todoList.next()) {
665 kdDebug() << " " << t->getSummary() << endl; 667 kdDebug() << " " << t->getSummary() << endl;
666 668
667 if (t->getRelatedTo()) { 669 if (t->getRelatedTo()) {
668 kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; 670 kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl;
669 } 671 }
670 672
671 QPtrList<Event> l = t->getRelations(); 673 QPtrList<Event> l = t->getRelations();
672 Event *c; 674 Event *c;
673 for(c=l.first();c;c=l.next()) { 675 for(c=l.first();c;c=l.next()) {
674 kdDebug() << " - relation: " << c->getSummary() << endl; 676 kdDebug() << " - relation: " << c->getSummary() << endl;
675 } 677 }
676 } 678 }
677*/ 679*/
678 680
679 // Put for each Event a KOTodoViewItem in the list view. Don't rely on a 681 // Put for each Event a KOTodoViewItem in the list view. Don't rely on a
680 // specific order of events. That means that we have to generate parent items 682 // specific order of events. That means that we have to generate parent items
681 // recursively for proper hierarchical display of Todos. 683 // recursively for proper hierarchical display of Todos.
682 mTodoMap.clear(); 684 mTodoMap.clear();
683 Todo *todo; 685 Todo *todo;
684 todo = todoList.first();// todo; todo = todoList.next()) { 686 todo = todoList.first();// todo; todo = todoList.next()) {
685 while ( todo ) { 687 while ( todo ) {
686 bool next = true; 688 bool next = true;
687 // qDebug("todo %s ", todo->summary().latin1()); 689 // qDebug("todo %s ", todo->summary().latin1());
688 Incidence *incidence = todo->relatedTo(); 690 Incidence *incidence = todo->relatedTo();
689 while ( incidence ) { 691 while ( incidence ) {
690 if ( incidence->type() == "Todo") { 692 if ( incidence->type() == "Todo") {
691 //qDebug("related %s ",incidence->summary().latin1() ); 693 //qDebug("related %s ",incidence->summary().latin1() );
692 if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { 694 if ( !(todoList.contains ( ((Todo* )incidence ) ) )) {
693 //qDebug("related not found "); 695 //qDebug("related not found ");
694 todoList.remove( ); 696 todoList.remove( );
695 todo = todoList.current(); 697 todo = todoList.current();
696 next = false; 698 next = false;
697 incidence = 0; 699 incidence = 0;
698 700
699 } else { 701 } else {
700 //qDebug("related found "); 702 //qDebug("related found ");
701 incidence = incidence->relatedTo(); 703 incidence = incidence->relatedTo();
702 } 704 }
703 } else 705 } else
704 incidence = 0; 706 incidence = 0;
705 } 707 }
706 if ( next ) 708 if ( next )
707 todo = todoList.next(); 709 todo = todoList.next();
708 } 710 }
709// qDebug("again .... "); 711// qDebug("again .... ");
710// for(todo = todoList.first(); todo; todo = todoList.next()) { 712// for(todo = todoList.first(); todo; todo = todoList.next()) {
711 713
712// qDebug("yytodo %s ", todo->summary().latin1()); 714// qDebug("yytodo %s ", todo->summary().latin1());
713// } 715// }
714 //qDebug("for "); 716 //qDebug("for ");
715 for(todo = todoList.first(); todo; todo = todoList.next()) { 717 for(todo = todoList.first(); todo; todo = todoList.next()) {
716 if (!mTodoMap.contains(todo) && checkTodo( todo ) ) 718 if (!mTodoMap.contains(todo) && checkTodo( todo ) )
717 { 719 {
718 insertTodoItem(todo); 720 insertTodoItem(todo);
719 } 721 }
720 } 722 }
721 //qDebug("for end "); 723 //qDebug("for end ");
722 // Restore opened/closed state 724 // Restore opened/closed state
723 mTodoListView->blockSignals( true ); 725 mTodoListView->blockSignals( true );
724 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); 726 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() );
725 mTodoListView->blockSignals( false ); 727 mTodoListView->blockSignals( false );
726 resetCurrentItem(); 728 resetCurrentItem();
727 processSelectionChange(); 729 processSelectionChange();
728} 730}
729 731
730void KOTodoView::storeCurrentItem() 732void KOTodoView::storeCurrentItem()
731{ 733{
732 mCurItem = 0; 734 mCurItem = 0;
733 mCurItemRootParent = 0; 735 mCurItemRootParent = 0;
734 mCurItemParent = 0; 736 mCurItemParent = 0;
735 mCurItemAbove = 0; 737 mCurItemAbove = 0;
736 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 738 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
737 if (mActiveItem) { 739 if (mActiveItem) {
738 mCurItem = mActiveItem->todo(); 740 mCurItem = mActiveItem->todo();
739 KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove (); 741 KOTodoViewItem* activeItemAbove = (KOTodoViewItem*)mActiveItem->itemAbove ();
740 if ( activeItemAbove ) 742 if ( activeItemAbove )
741 mCurItemAbove = activeItemAbove->todo(); 743 mCurItemAbove = activeItemAbove->todo();
742 mCurItemRootParent = mCurItem; 744 mCurItemRootParent = mCurItem;
743 mCurItemParent = mCurItemRootParent->relatedTo(); 745 mCurItemParent = mCurItemRootParent->relatedTo();
744 while ( mCurItemRootParent->relatedTo() != 0 ) 746 while ( mCurItemRootParent->relatedTo() != 0 )
745 mCurItemRootParent = mCurItemRootParent->relatedTo(); 747 mCurItemRootParent = mCurItemRootParent->relatedTo();
746 } 748 }
747 mActiveItem = 0; 749 mActiveItem = 0;
748} 750}
749 751
750void KOTodoView::resetCurrentItem() 752void KOTodoView::resetCurrentItem()
751{ 753{
752 mTodoListView->setFocus(); 754 mTodoListView->setFocus();
753 KOTodoViewItem* foundItem = 0; 755 KOTodoViewItem* foundItem = 0;
754 KOTodoViewItem* foundItemRoot = 0; 756 KOTodoViewItem* foundItemRoot = 0;
755 KOTodoViewItem* foundItemParent = 0; 757 KOTodoViewItem* foundItemParent = 0;
756 KOTodoViewItem* foundItemAbove = 0; 758 KOTodoViewItem* foundItemAbove = 0;
757 if ( mTodoListView->firstChild () ) { 759 if ( mTodoListView->firstChild () ) {
758 if ( mCurItem ) { 760 if ( mCurItem ) {
759 KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild (); 761 KOTodoViewItem* item = (KOTodoViewItem*)mTodoListView->firstChild ();
760 while ( item ) { 762 while ( item ) {
761 if ( item->todo() == mCurItem ) { 763 if ( item->todo() == mCurItem ) {
762 foundItem = item; 764 foundItem = item;
763 break; 765 break;
764 } else if ( item->todo() == mCurItemAbove ) { 766 } else if ( item->todo() == mCurItemAbove ) {
765 foundItemAbove = item; 767 foundItemAbove = item;
766 768
767 } 769 }
768 if ( item->todo() == mCurItemRootParent ) { 770 if ( item->todo() == mCurItemRootParent ) {
769 foundItemRoot = item; 771 foundItemRoot = item;
770 } 772 }
771 if ( item->todo() == mCurItemParent ) { 773 if ( item->todo() == mCurItemParent ) {
772 foundItemParent = item; 774 foundItemParent = item;
773 } 775 }
774 item = (KOTodoViewItem*)item->itemBelow(); 776 item = (KOTodoViewItem*)item->itemBelow();
775 } 777 }
776 if ( ! foundItem ) { 778 if ( ! foundItem ) {
777 if ( foundItemParent ) { 779 if ( foundItemParent ) {
778 foundItem = foundItemParent; 780 foundItem = foundItemParent;
779 } else { 781 } else {
780 if ( foundItemRoot ) 782 if ( foundItemRoot )
781 foundItem = foundItemRoot; 783 foundItem = foundItemRoot;
782 else 784 else
783 foundItem = foundItemAbove; 785 foundItem = foundItemAbove;
784 } 786 }
785 } 787 }
786 } 788 }
787 if ( foundItem ) { 789 if ( foundItem ) {
788 mTodoListView->setCurrentItem( foundItem ); 790 mTodoListView->setCurrentItem( foundItem );
789 mTodoListView->ensureItemVisible( foundItem ); 791 mTodoListView->ensureItemVisible( foundItem );
790 } else { 792 } else {
791 mTodoListView->setCurrentItem( mTodoListView->firstChild () ); 793 mTodoListView->setCurrentItem( mTodoListView->firstChild () );
792 } 794 }
793 } 795 }
794 mTodoListView->setFocus(); 796 mTodoListView->setFocus();
795} 797}
796//Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; 798//Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove;
797bool KOTodoView::checkTodo( Todo * todo ) 799bool KOTodoView::checkTodo( Todo * todo )
798{ 800{
799 801
800 if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) 802 if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() )
801 return false; 803 return false;
802 if ( !todo->isCompleted() ) { 804 if ( !todo->isCompleted() ) {
803 if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() ) 805 if ( todo->hasDueDate() && todo->dtDue().date() <= QDate::currentDate() )
804 return true; 806 return true;
805 } 807 }
806 if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { 808 if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) {
807 if ( todo->hasStartDate() ) 809 if ( todo->hasStartDate() )
808 if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) 810 if ( mNavigator->selectedDates().last() < todo->dtStart().date() )
809 return false; 811 return false;
810 if ( todo->hasDueDate() ) 812 if ( todo->hasDueDate() )
811 if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) 813 if ( mNavigator->selectedDates().first() > todo->dtDue().date() )
812 return false; 814 return false;
813 } 815 }
814 return true; 816 return true;
815} 817}
816 818
817void KOTodoView::restoreItemState( QListViewItem *item ) 819void KOTodoView::restoreItemState( QListViewItem *item )
818{ 820{
819 pendingSubtodo = 0; 821 pendingSubtodo = 0;
820 while( item ) { 822 while( item ) {
821 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 823 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
822 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); 824 todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) );
823 if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); 825 if( item->childCount() > 0 ) restoreItemState( item->firstChild() );
824 item = item->nextSibling(); 826 item = item->nextSibling();
825 } 827 }
826} 828}
827 829
828 830
829QMap<Todo *,KOTodoViewItem *>::ConstIterator 831QMap<Todo *,KOTodoViewItem *>::ConstIterator
830 KOTodoView::insertTodoItem(Todo *todo) 832 KOTodoView::insertTodoItem(Todo *todo)
831{ 833{
832 834
833// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; 835// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
834 // TODO: Check, if dynmaic cast is necessary 836 // TODO: Check, if dynmaic cast is necessary
835 837
836 pendingSubtodo = 0; 838 pendingSubtodo = 0;
837 Incidence *incidence = todo->relatedTo(); 839 Incidence *incidence = todo->relatedTo();
838 if (incidence && incidence->type() == "Todo") { 840 if (incidence && incidence->type() == "Todo") {
839 Todo *relatedTodo = static_cast<Todo *>(incidence); 841 Todo *relatedTodo = static_cast<Todo *>(incidence);
840 842
841// kdDebug() << " has Related" << endl; 843// kdDebug() << " has Related" << endl;
842 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 844 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
843 itemIterator = mTodoMap.find(relatedTodo); 845 itemIterator = mTodoMap.find(relatedTodo);
844 if (itemIterator == mTodoMap.end()) { 846 if (itemIterator == mTodoMap.end()) {
845// kdDebug() << " related not yet in list" << endl; 847// kdDebug() << " related not yet in list" << endl;
846 itemIterator = insertTodoItem (relatedTodo); 848 itemIterator = insertTodoItem (relatedTodo);
847 } 849 }
848 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem 850 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem
849 // and one into the map. Sure finding is more easy but why? -zecke 851 // and one into the map. Sure finding is more easy but why? -zecke
850 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); 852 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
851 return mTodoMap.insert(todo,todoItem); 853 return mTodoMap.insert(todo,todoItem);
852 } else { 854 } else {
853// kdDebug() << " no Related" << endl; 855// kdDebug() << " no Related" << endl;
854 // see above -zecke 856 // see above -zecke
855 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 857 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
856 return mTodoMap.insert(todo,todoItem); 858 return mTodoMap.insert(todo,todoItem);
857 } 859 }
858} 860}
859 861
860 862
861void KOTodoView::updateConfig() 863void KOTodoView::updateConfig()
862{ 864{
863 updateView(); 865 updateView();
864 mTodoListView->repaintContents(); 866 mTodoListView->repaintContents();
865} 867}
866 868
867QPtrList<Incidence> KOTodoView::selectedIncidences() 869QPtrList<Incidence> KOTodoView::selectedIncidences()
868{ 870{
869 QPtrList<Incidence> selected; 871 QPtrList<Incidence> selected;
870 872
871 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 873 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
872// if (!item) item = mActiveItem; 874// if (!item) item = mActiveItem;
873 if (item) selected.append(item->todo()); 875 if (item) selected.append(item->todo());
874 876
875 return selected; 877 return selected;
876} 878}
877 879
878QPtrList<Todo> KOTodoView::selectedTodos() 880QPtrList<Todo> KOTodoView::selectedTodos()
879{ 881{
880 QPtrList<Todo> selected; 882 QPtrList<Todo> selected;
881 883
882 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 884 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
883// if (!item) item = mActiveItem; 885// if (!item) item = mActiveItem;
884 if (item) selected.append(item->todo()); 886 if (item) selected.append(item->todo());
885 887
886 return selected; 888 return selected;
887} 889}
888 890
889void KOTodoView::changeEventDisplay(Event *, int) 891void KOTodoView::changeEventDisplay(Event *, int)
890{ 892{
891 updateView(); 893 updateView();
892} 894}
893 895
894void KOTodoView::showDates(const QDate &, const QDate &) 896void KOTodoView::showDates(const QDate &, const QDate &)
895{ 897{
896} 898}
897 899
898void KOTodoView::showEvents(QPtrList<Event>) 900void KOTodoView::showEvents(QPtrList<Event>)
899{ 901{
900 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; 902 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl;
901} 903}
902 904
903void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, 905void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
904 const QDate &td) 906 const QDate &td)
905{ 907{
906#ifndef KORG_NOPRINTER 908#ifndef KORG_NOPRINTER
907 calPrinter->preview(CalPrinter::Todolist, fd, td); 909 calPrinter->preview(CalPrinter::Todolist, fd, td);
908#endif 910#endif
909} 911}
910 912
911void KOTodoView::editItem(QListViewItem *item ) 913void KOTodoView::editItem(QListViewItem *item )
912{ 914{
913 // qDebug("editItem(QListViewItem *item ) "); 915 // qDebug("editItem(QListViewItem *item ) ");
914 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 916 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
915} 917}
916 918
917void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 919void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
918{ 920{
919 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 921 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
920} 922}
921 923
922void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) 924void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
923{ 925{
924 pendingSubtodo = 0; 926 pendingSubtodo = 0;
925 mActiveItem = (KOTodoViewItem *)item; 927 mActiveItem = (KOTodoViewItem *)item;
926 if (item) { 928 if (item) {
927 switch (column){ 929 switch (column){
928 case 1: 930 case 1:
929 mPriorityPopupMenu->popup(QCursor::pos ()); break; 931 mPriorityPopupMenu->popup(QCursor::pos ()); break;
930 case 2: 932 case 2:
931 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; 933 mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break;
932 case 3: 934 case 3:
933 moveTodo(); 935 moveTodo();
934 break; 936 break;
935 case 8: 937 case 8:
936 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; 938 getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break;
937 default: 939 default:
938 mItemPopupMenu->popup(QCursor::pos()); 940 mItemPopupMenu->popup(QCursor::pos());
939 } 941 }
940 } else mPopupMenu->popup(QCursor::pos()); 942 } else mPopupMenu->popup(QCursor::pos());
941} 943}
942void KOTodoView::newTodo() 944void KOTodoView::newTodo()
943{ 945{
944 emit newTodoSignal(); 946 emit newTodoSignal();
945} 947}
946 948
947void KOTodoView::newSubTodo() 949void KOTodoView::newSubTodo()
948{ 950{
949 if (mActiveItem) { 951 if (mActiveItem) {
950 emit newSubTodoSignal(mActiveItem->todo()); 952 emit newSubTodoSignal(mActiveItem->todo());
951 } 953 }
952} 954}
953void KOTodoView::unparentTodo() 955void KOTodoView::unparentTodo()
954{ 956{
955 if (mActiveItem) { 957 if (mActiveItem) {
956 emit unparentTodoSignal(mActiveItem->todo()); 958 emit unparentTodoSignal(mActiveItem->todo());
957 } 959 }
958} 960}
959 961
960void KOTodoView::reparentTodo() 962void KOTodoView::reparentTodo()
961{ 963{
962 if (mActiveItem) { 964 if (mActiveItem) {
963 qDebug("KOTodoView::reparentTodo() "); 965 qDebug("KOTodoView::reparentTodo() ");
964 topLevelWidget()->setCaption(i18n("Click on new parent item")); 966 topLevelWidget()->setCaption(i18n("Click on new parent item"));
965 pendingSubtodo = mActiveItem; 967 pendingSubtodo = mActiveItem;
966 } 968 }
967} 969}
968void KOTodoView::editTodo() 970void KOTodoView::editTodo()
969{ 971{
970 if (mActiveItem) { 972 if (mActiveItem) {
971 emit editTodoSignal(mActiveItem->todo()); 973 emit editTodoSignal(mActiveItem->todo());
972 } 974 }
973} 975}
974void KOTodoView::cloneTodo() 976void KOTodoView::cloneTodo()
975{ 977{
976 if (mActiveItem) { 978 if (mActiveItem) {
977 emit cloneTodoSignal((Incidence*)mActiveItem->todo()); 979 emit cloneTodoSignal((Incidence*)mActiveItem->todo());
978 } 980 }
979} 981}
980void KOTodoView::cancelTodo() 982void KOTodoView::cancelTodo()
981{ 983{
982 if (mActiveItem) { 984 if (mActiveItem) {
983 emit cancelTodoSignal((Incidence*)mActiveItem->todo()); 985 emit cancelTodoSignal((Incidence*)mActiveItem->todo());
984 } 986 }
985} 987}
986void KOTodoView::moveTodo() 988void KOTodoView::moveTodo()
987{ 989{
988 if (mActiveItem) { 990 if (mActiveItem) {
989 emit moveTodoSignal((Incidence*)mActiveItem->todo()); 991 emit moveTodoSignal((Incidence*)mActiveItem->todo());
990 } 992 }
991} 993}
992void KOTodoView::beamTodo() 994void KOTodoView::beamTodo()
993{ 995{
994 if (mActiveItem) { 996 if (mActiveItem) {
995 emit beamTodoSignal((Incidence*)mActiveItem->todo()); 997 emit beamTodoSignal((Incidence*)mActiveItem->todo());
996 } 998 }
997} 999}
998 1000
999 1001
1000void KOTodoView::showTodo() 1002void KOTodoView::showTodo()
1001{ 1003{
1002 if (mActiveItem) { 1004 if (mActiveItem) {
1003 emit showTodoSignal(mActiveItem->todo()); 1005 emit showTodoSignal(mActiveItem->todo());
1004 } 1006 }
1005} 1007}
1006 1008
1007void KOTodoView::deleteTodo() 1009void KOTodoView::deleteTodo()
1008{ 1010{
1009 if (mActiveItem) { 1011 if (mActiveItem) {
1010 emit deleteTodoSignal(mActiveItem->todo()); 1012 emit deleteTodoSignal(mActiveItem->todo());
1011 } 1013 }
1012} 1014}
1013 1015
1014void KOTodoView::setNewPriority(int index) 1016void KOTodoView::setNewPriority(int index)
1015{ 1017{
1016 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1018 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1017 mActiveItem->todo()->setPriority(mPriority[index]); 1019 mActiveItem->todo()->setPriority(mPriority[index]);
1018 mActiveItem->construct(); 1020 mActiveItem->construct();
1019 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); 1021 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
1020 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1022 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1021 } 1023 }
1022} 1024}
1023 1025
1024void KOTodoView::setNewPercentage(int index) 1026void KOTodoView::setNewPercentage(int index)
1025{ 1027{
1026 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1028 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1027 1029
1028 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { 1030 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
1029 mActiveItem->setOn( true ); 1031 mActiveItem->setOn( true );
1030 return; 1032 return;
1031 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { 1033 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
1032 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); 1034 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
1033 if ( par && par->isOn() ) 1035 if ( par && par->isOn() )
1034 par->setOn( false ); 1036 par->setOn( false );
1035 } 1037 }
1036 if (mPercentage[index] == 100) { 1038 if (mPercentage[index] == 100) {
1037 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 1039 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
1038 } else { 1040 } else {
1039 mActiveItem->todo()->setCompleted(false); 1041 mActiveItem->todo()->setCompleted(false);
1040 } 1042 }
1041 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 1043 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
1042 mActiveItem->construct(); 1044 mActiveItem->construct();
1043 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 1045 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
1044 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1046 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1045 } 1047 }
1046} 1048}
1047 1049
1048 1050
1049QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) 1051QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
1050{ 1052{
1051 QPopupMenu* tempMenu = new QPopupMenu (this); 1053 QPopupMenu* tempMenu = new QPopupMenu (this);
1052 QStringList checkedCategories = todoItem->todo()->categories (); 1054 QStringList checkedCategories = todoItem->todo()->categories ();
1053 1055
1054 tempMenu->setCheckable (true); 1056 tempMenu->setCheckable (true);
1055 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 1057 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
1056 it != KOPrefs::instance()->mCustomCategories.end (); 1058 it != KOPrefs::instance()->mCustomCategories.end ();
1057 ++it) { 1059 ++it) {
1058 int index = tempMenu->insertItem (*it); 1060 int index = tempMenu->insertItem (*it);
1059 mCategory[index] = *it; 1061 mCategory[index] = *it;
1060 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); 1062 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true);
1061 } 1063 }
1062 1064
1063 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); 1065 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
1064 return tempMenu; 1066 return tempMenu;
1065 1067
1066 1068
1067} 1069}
1068void KOTodoView::changedCategories(int index) 1070void KOTodoView::changedCategories(int index)
1069{ 1071{
1070 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 1072 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
1071 QStringList categories = mActiveItem->todo()->categories (); 1073 QStringList categories = mActiveItem->todo()->categories ();
1072 QString colcat = categories.first(); 1074 QString colcat = categories.first();
1073 if (categories.find (mCategory[index]) != categories.end ()) 1075 if (categories.find (mCategory[index]) != categories.end ())
1074 categories.remove (mCategory[index]); 1076 categories.remove (mCategory[index]);
1075 else 1077 else
1076 categories.insert (categories.end(), mCategory[index]); 1078 categories.insert (categories.end(), mCategory[index]);
1077 categories.sort (); 1079 categories.sort ();
1078 if ( !colcat.isEmpty() ) { 1080 if ( !colcat.isEmpty() ) {
1079 if ( categories.find ( colcat ) != categories.end () ) { 1081 if ( categories.find ( colcat ) != categories.end () ) {
1080 categories.remove( colcat ); 1082 categories.remove( colcat );
1081 categories.prepend( colcat ); 1083 categories.prepend( colcat );
1082 } 1084 }
1083 } 1085 }
1084 mActiveItem->todo()->setCategories (categories); 1086 mActiveItem->todo()->setCategories (categories);
1085 mActiveItem->construct(); 1087 mActiveItem->construct();
1086 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 1088 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
1087 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); 1089 todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
1088 } 1090 }
1089} 1091}
1090void KOTodoView::itemDoubleClicked(QListViewItem *item) 1092void KOTodoView::itemDoubleClicked(QListViewItem *item)
1091{ 1093{
1092 if ( pendingSubtodo != 0 ) { 1094 if ( pendingSubtodo != 0 ) {
1093 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1095 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1094 } 1096 }
1095 pendingSubtodo = 0; 1097 pendingSubtodo = 0;
1096 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1098 int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1097 //qDebug("ROW %d ", row); 1099 //qDebug("ROW %d ", row);
1098 if (!item) { 1100 if (!item) {
1099 newTodo(); 1101 newTodo();
1100 return; 1102 return;
1101 } else { 1103 } else {
1102 if ( row == 1 || row == 2 ) { 1104 if ( row == 2 ) {
1103 mActiveItem = (KOTodoViewItem *) item; 1105 mActiveItem = (KOTodoViewItem *) item;
1104 newSubTodo(); 1106 newSubTodo();
1105 return; 1107 return;
1106 } 1108 }
1109 if ( row == 1 ) {
1110 mActiveItem = (KOTodoViewItem *) item;
1111 toggleRunningItem();
1112 return;
1113 }
1107 } 1114 }
1108 if ( KOPrefs::instance()->mEditOnDoubleClick ) 1115 if ( KOPrefs::instance()->mEditOnDoubleClick )
1109 editItem( item ); 1116 editItem( item );
1110 else 1117 else
1111 showItem( item , QPoint(), 0 ); 1118 showItem( item , QPoint(), 0 );
1112} 1119}
1120void KOTodoView::toggleRunningItem()
1121{
1122 qDebug("KOTodoView::toggleRunning() ");
1123 if ( ! mActiveItem )
1124 return;
1125 Todo * t = mActiveItem->todo();
1126 if ( t->isRunning() ) {
1127 int result = KMessageBox::warningContinueCancel(this,
1128 i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 20 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true);
1129 if (result != KMessageBox::Continue) return;
1130 t->setRunning( false );
1131 mActiveItem->construct();
1132 } else {
1133 int result = KMessageBox::warningContinueCancel(this,
1134 i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 20 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true);
1135 if (result != KMessageBox::Continue) return;
1136 t->setRunning( true );
1137 mActiveItem->construct();
1138 }
1139}
1140
1113void KOTodoView::itemClicked(QListViewItem *item) 1141void KOTodoView::itemClicked(QListViewItem *item)
1114{ 1142{
1115 //qDebug("KOTodoView::itemClicked %d", item); 1143 //qDebug("KOTodoView::itemClicked %d", item);
1116 if (!item) { 1144 if (!item) {
1117 if ( pendingSubtodo != 0 ) { 1145 if ( pendingSubtodo != 0 ) {
1118 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1146 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1119 } 1147 }
1120 pendingSubtodo = 0; 1148 pendingSubtodo = 0;
1121 return; 1149 return;
1122 } 1150 }
1123 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1151 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1124 if ( pendingSubtodo != 0 ) { 1152 if ( pendingSubtodo != 0 ) {
1125 bool allowReparent = true; 1153 bool allowReparent = true;
1126 QListViewItem *par = item; 1154 QListViewItem *par = item;
1127 while ( par ) { 1155 while ( par ) {
1128 if ( par == pendingSubtodo ) { 1156 if ( par == pendingSubtodo ) {
1129 allowReparent = false; 1157 allowReparent = false;
1130 break; 1158 break;
1131 } 1159 }
1132 par = par->parent(); 1160 par = par->parent();
1133 } 1161 }
1134 if ( !allowReparent ) { 1162 if ( !allowReparent ) {
1135 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); 1163 topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
1136 qDebug("Recursive reparenting not possible "); 1164 qDebug("Recursive reparenting not possible ");
1137 pendingSubtodo = 0; 1165 pendingSubtodo = 0;
1138 } else { 1166 } else {
1139 Todo* newParent = todoItem->todo(); 1167 Todo* newParent = todoItem->todo();
1140 Todo* newSub = pendingSubtodo->todo(); 1168 Todo* newSub = pendingSubtodo->todo();
1141 pendingSubtodo = 0; 1169 pendingSubtodo = 0;
1142 emit reparentTodoSignal( newParent,newSub ); 1170 emit reparentTodoSignal( newParent,newSub );
1143 return; 1171 return;
1144 } 1172 }
1145 } 1173 }
1146#if 0 1174#if 0
1147 // handled by the item itself 1175 // handled by the item itself
1148 bool completed = todoItem->todo()->isCompleted(); // Completed or not? 1176 bool completed = todoItem->todo()->isCompleted(); // Completed or not?
1149 qDebug("com %d ",completed ); 1177 qDebug("com %d ",completed );
1150 qDebug("itemclicked "); 1178 qDebug("itemclicked ");
1151 if (todoItem->isOn()) { 1179 if (todoItem->isOn()) {
1152 qDebug("on "); 1180 qDebug("on ");
1153 if (!completed) { 1181 if (!completed) {
1154 qDebug("set true "); 1182 qDebug("set true ");
1155 todoItem->todo()->setCompleted(QDateTime::currentDateTime()); 1183 todoItem->todo()->setCompleted(QDateTime::currentDateTime());
1156 } 1184 }
1157 } else { 1185 } else {
1158 qDebug("not on "); 1186 qDebug("not on ");
1159 if (completed) { 1187 if (completed) {
1160 qDebug("set false "); 1188 qDebug("set false ");
1161 todoItem->todo()->setCompleted(false); 1189 todoItem->todo()->setCompleted(false);
1162 } 1190 }
1163 } 1191 }
1164#endif 1192#endif
1165} 1193}
1166 1194
1167void KOTodoView::setDocumentId( const QString &id ) 1195void KOTodoView::setDocumentId( const QString &id )
1168{ 1196{
1169 kdDebug() << "KOTodoView::setDocumentId()" << endl; 1197 kdDebug() << "KOTodoView::setDocumentId()" << endl;
1170 1198
1171 mDocPrefs->setDoc( id ); 1199 mDocPrefs->setDoc( id );
1172} 1200}
1173 1201
1174void KOTodoView::itemStateChanged( QListViewItem *item ) 1202void KOTodoView::itemStateChanged( QListViewItem *item )
1175{ 1203{
1176 if (!item) return; 1204 if (!item) return;
1177 1205
1178 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1206 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1179 1207
1180// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; 1208// kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl;
1181 1209
1182 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); 1210 if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() );
1183} 1211}
1184 1212
1185void KOTodoView::saveLayout(KConfig *config, const QString &group) const 1213void KOTodoView::saveLayout(KConfig *config, const QString &group) const
1186{ 1214{
1187 mTodoListView->saveLayout(config,group); 1215 mTodoListView->saveLayout(config,group);
1188} 1216}
1189 1217
1190void KOTodoView::restoreLayout(KConfig *config, const QString &group) 1218void KOTodoView::restoreLayout(KConfig *config, const QString &group)
1191{ 1219{
1192 mTodoListView->restoreLayout(config,group); 1220 mTodoListView->restoreLayout(config,group);
1193} 1221}
1194 1222
1195void KOTodoView::processSelectionChange() 1223void KOTodoView::processSelectionChange()
1196{ 1224{
1197// kdDebug() << "KOTodoView::processSelectionChange()" << endl; 1225// kdDebug() << "KOTodoView::processSelectionChange()" << endl;
1198 1226
1199 KOTodoViewItem *item = 1227 KOTodoViewItem *item =
1200 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); 1228 static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() );
1201 1229
1202 if ( !item ) { 1230 if ( !item ) {
1203 emit incidenceSelected( 0 ); 1231 emit incidenceSelected( 0 );
1204 } else { 1232 } else {
1205 emit incidenceSelected( item->todo() ); 1233 emit incidenceSelected( item->todo() );
1206 } 1234 }
1207} 1235}
1208 1236
1209void KOTodoView::modified(bool b) 1237void KOTodoView::modified(bool b)
1210{ 1238{
1211 emit isModified(b); 1239 emit isModified(b);
1212} 1240}
1213void KOTodoView::setTodoModified( Todo* todo ) 1241void KOTodoView::setTodoModified( Todo* todo )
1214{ 1242{
1215 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); 1243 todoModified( todo, KOGlobals::UNKNOWN_MODIFIED );
1216} 1244}
1217void KOTodoView::clearSelection() 1245void KOTodoView::clearSelection()
1218{ 1246{
1219 mTodoListView->selectAll( false ); 1247 mTodoListView->selectAll( false );
1220} 1248}
1221void KOTodoView::setAllOpen() 1249void KOTodoView::setAllOpen()
1222{ 1250{
1223 if ( isFlatDisplay ) { 1251 if ( isFlatDisplay ) {
1224 isFlatDisplay = false; 1252 isFlatDisplay = false;
1225 mPopupMenu->setItemChecked( 8,false ); 1253 mPopupMenu->setItemChecked( 8,false );
1226 updateView(); 1254 updateView();
1227 } else { 1255 } else {
1228 storeCurrentItem(); 1256 storeCurrentItem();
1229 } 1257 }
1230 setOpen(mTodoListView->firstChild(), true); 1258 setOpen(mTodoListView->firstChild(), true);
1231 resetCurrentItem(); 1259 resetCurrentItem();
1232} 1260}
1233void KOTodoView::setAllClose() 1261void KOTodoView::setAllClose()
1234{ 1262{
1235 if ( isFlatDisplay ) { 1263 if ( isFlatDisplay ) {
1236 isFlatDisplay = false; 1264 isFlatDisplay = false;
1237 mPopupMenu->setItemChecked( 8,false ); 1265 mPopupMenu->setItemChecked( 8,false );
1238 updateView(); 1266 updateView();
1239 } else { 1267 } else {
1240 storeCurrentItem(); 1268 storeCurrentItem();
1241 } 1269 }
1242 setOpen(mTodoListView->firstChild(), false); 1270 setOpen(mTodoListView->firstChild(), false);
1243 resetCurrentItem(); 1271 resetCurrentItem();
1244} 1272}
1245void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1273void KOTodoView::setOpen( QListViewItem* item, bool setOpenI)
1246{ 1274{
1247 1275
1248 while ( item ) { 1276 while ( item ) {
1249 setOpen( item->firstChild(), setOpenI ); 1277 setOpen( item->firstChild(), setOpenI );
1250 item->setOpen( setOpenI ); 1278 item->setOpen( setOpenI );
1251 item = item->nextSibling(); 1279 item = item->nextSibling();
1252 } 1280 }
1253} 1281}
1254 1282
1255void KOTodoView::displayAllFlat() 1283void KOTodoView::displayAllFlat()
1256{ 1284{
1257 pendingSubtodo = 0; 1285 pendingSubtodo = 0;
1258 if ( mBlockUpdate ) { 1286 if ( mBlockUpdate ) {
1259 return; 1287 return;
1260 } 1288 }
1261 mPopupMenu->setItemChecked( 8,true ); 1289 mPopupMenu->setItemChecked( 8,true );
1262 isFlatDisplay = true; 1290 isFlatDisplay = true;
1263 QPtrList<Todo> todoList = calendar()->todos(); 1291 QPtrList<Todo> todoList = calendar()->todos();
1264 mTodoMap.clear(); 1292 mTodoMap.clear();
1265 mTodoListView->clear(); 1293 mTodoListView->clear();
1266 Todo *todo; 1294 Todo *todo;
1267 for(todo = todoList.first(); todo; todo = todoList.next()) { 1295 for(todo = todoList.first(); todo; todo = todoList.next()) {
1268 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); 1296 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
1269 mTodoMap.insert(todo,todoItem); 1297 mTodoMap.insert(todo,todoItem);
1270 } 1298 }
1271 mTodoListView->setFocus(); 1299 mTodoListView->setFocus();
1272 processSelectionChange(); 1300 processSelectionChange();
1273} 1301}
1274 1302
1275void KOTodoView::setAllFlat() 1303void KOTodoView::setAllFlat()
1276{ 1304{
1277 if ( isFlatDisplay ) { 1305 if ( isFlatDisplay ) {
1278 isFlatDisplay = false; 1306 isFlatDisplay = false;
1279 mPopupMenu->setItemChecked( 8,false ); 1307 mPopupMenu->setItemChecked( 8,false );
1280 updateView(); 1308 updateView();
1281 return; 1309 return;
1282 } 1310 }
1283 storeCurrentItem(); 1311 storeCurrentItem();
1284 displayAllFlat(); 1312 displayAllFlat();
1285 resetCurrentItem(); 1313 resetCurrentItem();
1286} 1314}
1287 1315
1288void KOTodoView::purgeCompleted() 1316void KOTodoView::purgeCompleted()
1289{ 1317{
1290 emit purgeCompletedSignal(); 1318 emit purgeCompletedSignal();
1291 1319
1292} 1320}
1293void KOTodoView::toggleQuickTodo() 1321void KOTodoView::toggleQuickTodo()
1294{ 1322{
1295 if ( mQuickAdd->isVisible() ) { 1323 if ( mQuickAdd->isVisible() ) {
1296 mQuickAdd->hide(); 1324 mQuickAdd->hide();
1297 KOPrefs::instance()->mEnableQuickTodo = false; 1325 KOPrefs::instance()->mEnableQuickTodo = false;
1298 } 1326 }
1299 else { 1327 else {
1300 mQuickAdd->show(); 1328 mQuickAdd->show();
1301 KOPrefs::instance()->mEnableQuickTodo = true; 1329 KOPrefs::instance()->mEnableQuickTodo = true;
1302 } 1330 }
1303 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); 1331 mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo);
1304 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); 1332 mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo );
1305} 1333}
1306 1334
1307void KOTodoView::toggleRunning() 1335void KOTodoView::toggleRunning()
1308{ 1336{
1309 KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; 1337 KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos;
1310 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); 1338 mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos);
1311 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); 1339 mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos );
1312 updateView(); 1340 updateView();
1313} 1341}
1314 1342
1315void KOTodoView::toggleCompleted() 1343void KOTodoView::toggleCompleted()
1316{ 1344{
1317 KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; 1345 KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo;
1318 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); 1346 mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo );
1319 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); 1347 mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo );
1320 updateView(); 1348 updateView();
1321} 1349}
1322 1350
1323void KOTodoView::addQuickTodo() 1351void KOTodoView::addQuickTodo()
1324{ 1352{
1325 Todo *todo = new Todo(); 1353 Todo *todo = new Todo();
1326 todo->setSummary(mQuickAdd->text()); 1354 todo->setSummary(mQuickAdd->text());
1327 todo->setOrganizer(KOPrefs::instance()->email()); 1355 todo->setOrganizer(KOPrefs::instance()->email());
1328 CalFilter * cf = mCalendar->filter(); 1356 CalFilter * cf = mCalendar->filter();
1329 if ( cf ) { 1357 if ( cf ) {
1330 if ( cf->isEnabled()&& cf->showCategories()) { 1358 if ( cf->isEnabled()&& cf->showCategories()) {
1331 todo->setCategories(cf->categoryList()); 1359 todo->setCategories(cf->categoryList());
1332 } 1360 }
1333 if ( cf->isEnabled() ) 1361 if ( cf->isEnabled() )
1334 todo->setSecrecy( cf->getSecrecy()); 1362 todo->setSecrecy( cf->getSecrecy());
1335 } 1363 }
1336 mCalendar->addTodo(todo); 1364 mCalendar->addTodo(todo);
1337 mQuickAdd->setText(""); 1365 mQuickAdd->setText("");
1338 todoModified (todo, KOGlobals::EVENTADDED ); 1366 todoModified (todo, KOGlobals::EVENTADDED );
1339 updateView(); 1367 updateView();
1340} 1368}
1341 1369
1342void KOTodoView::keyPressEvent ( QKeyEvent * e ) 1370void KOTodoView::keyPressEvent ( QKeyEvent * e )
1343{ 1371{
1344 // e->ignore(); 1372 // e->ignore();
1345 //return; 1373 //return;
1346 //qDebug("KOTodoView::keyPressEvent "); 1374 //qDebug("KOTodoView::keyPressEvent ");
1347 switch ( e->key() ) { 1375 switch ( e->key() ) {
1348 case Qt::Key_Down: 1376 case Qt::Key_Down:
1349 case Qt::Key_Up: 1377 case Qt::Key_Up:
1350 QWidget::keyPressEvent ( e ); 1378 QWidget::keyPressEvent ( e );
1351 break; 1379 break;
1352 1380
1353 case Qt::Key_Q: 1381 case Qt::Key_Q:
1354 toggleQuickTodo(); 1382 toggleQuickTodo();
1355 break; 1383 break;
1356 case Qt::Key_U: 1384 case Qt::Key_U:
1357 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { 1385 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) {
1358 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1386 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1359 unparentTodo(); 1387 unparentTodo();
1360 e->accept(); 1388 e->accept();
1361 } else 1389 } else
1362 e->ignore(); 1390 e->ignore();
1363 break; 1391 break;
1364 case Qt::Key_S: 1392 case Qt::Key_S:
1365 if ( e->state() == Qt::ControlButton ) { 1393 if ( e->state() == Qt::ControlButton ) {
1366 e->ignore(); 1394 e->ignore();
1367 break; 1395 break;
1368 } 1396 }
1369 if ( e->state() == Qt::ShiftButton ) { 1397 if ( e->state() == Qt::ShiftButton ) {
1370 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1398 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1371 reparentTodo(); 1399 reparentTodo();
1372 e->accept(); 1400 e->accept();
1373 } else 1401 } else
1374 e->ignore(); 1402 e->ignore();
1375 break; 1403 break;
1376 case Qt::Key_P: 1404 case Qt::Key_P:
1377 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { 1405 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) {
1378 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); 1406 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1379 if ( pendingSubtodo ) 1407 if ( pendingSubtodo )
1380 itemClicked(mActiveItem); 1408 itemClicked(mActiveItem);
1381 e->accept(); 1409 e->accept();
1382 } else 1410 } else
1383 e->ignore(); 1411 e->ignore();
1384 break; 1412 break;
1385 case Qt::Key_Escape: 1413 case Qt::Key_Escape:
1386 if ( pendingSubtodo ) { 1414 if ( pendingSubtodo ) {
1387 itemClicked(0); 1415 itemClicked(0);
1388 e->accept(); 1416 e->accept();
1389 } else 1417 } else
1390 e->ignore(); 1418 e->ignore();
1391 break; 1419 break;
1392 default: 1420 default:
1393 e->ignore(); 1421 e->ignore();
1394 } 1422 }
1395 1423
1396 if ( true ) { 1424 if ( true ) {
1397 if ( e->key() == Qt::Key_I ) { 1425 if ( e->key() == Qt::Key_I ) {
1398 KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); 1426 KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem();
1399 if ( cn ) { 1427 if ( cn ) {
1400 mActiveItem = cn; 1428 mActiveItem = cn;
1401 KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); 1429 KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
1402 if ( ci ){ 1430 if ( ci ){
1403 showTodo(); 1431 showTodo();
1404 cn = (KOTodoViewItem*)cn->itemBelow(); 1432 cn = (KOTodoViewItem*)cn->itemBelow();
1405 if ( cn ) { 1433 if ( cn ) {
1406 mTodoListView->setCurrentItem ( cn ); 1434 mTodoListView->setCurrentItem ( cn );
1407 mTodoListView->ensureItemVisible ( cn ); 1435 mTodoListView->ensureItemVisible ( cn );
1408 } 1436 }
1409 1437
1410 } 1438 }
1411 } 1439 }
1412 e->accept(); 1440 e->accept();
1413 1441
1414 } 1442 }
1415 1443
1416 } 1444 }
1417 1445
1418} 1446}
1419void KOTodoView::updateTodo( Todo * t, int type ) 1447void KOTodoView::updateTodo( Todo * t, int type )
1420{ 1448{
1421 if ( mBlockUpdate) 1449 if ( mBlockUpdate)
1422 return; 1450 return;
1423 1451
1424 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 1452 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
1425 itemIterator = mTodoMap.find(t); 1453 itemIterator = mTodoMap.find(t);
1426 if (itemIterator != mTodoMap.end()) { 1454 if (itemIterator != mTodoMap.end()) {
1427 (*itemIterator)->construct(); 1455 (*itemIterator)->construct();
1428 } else { 1456 } else {
1429 if ( type == KOGlobals::EVENTADDED ) { 1457 if ( type == KOGlobals::EVENTADDED ) {
1430 insertTodoItem( t ); 1458 insertTodoItem( t );
1431 } 1459 }
1432 } 1460 }
1433 1461
1434} 1462}
1435 1463
1436void KOTodoView::todoModified(Todo * t , int p ) 1464void KOTodoView::todoModified(Todo * t , int p )
1437{ 1465{
1438 mBlockUpdate = true; 1466 mBlockUpdate = true;
1439 emit todoModifiedSignal ( t, p ); 1467 emit todoModifiedSignal ( t, p );
1440 mBlockUpdate = false; 1468 mBlockUpdate = false;
1441} 1469}
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index d0788a9..d368513 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -1,263 +1,264 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOTODOVIEW_H 23#ifndef KOTODOVIEW_H
24#define KOTODOVIEW_H 24#define KOTODOVIEW_H
25 25
26#include <qfont.h> 26#include <qfont.h>
27#include <qfontmetrics.h> 27#include <qfontmetrics.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qptrlist.h> 29#include <qptrlist.h>
30#include <qstrlist.h> 30#include <qstrlist.h>
31#include <qlistbox.h> 31#include <qlistbox.h>
32#include <qpopupmenu.h> 32#include <qpopupmenu.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qmap.h> 34#include <qmap.h>
35#include <qlistview.h> 35#include <qlistview.h>
36#include <klistview.h> 36#include <klistview.h>
37 37
38#include <libkcal/calendar.h> 38#include <libkcal/calendar.h>
39#include <libkcal/todo.h> 39#include <libkcal/todo.h>
40 40
41#include <korganizer/baseview.h> 41#include <korganizer/baseview.h>
42 42
43#include "kotodoviewitem.h" 43#include "kotodoviewitem.h"
44#include "koprefs.h" 44#include "koprefs.h"
45#include "koglobals.h" 45#include "koglobals.h"
46#include "datenavigator.h" 46#include "datenavigator.h"
47 47
48class QDragEnterEvent; 48class QDragEnterEvent;
49class QDragMoveEvent; 49class QDragMoveEvent;
50class QDragLeaveEvent; 50class QDragLeaveEvent;
51class QDropEvent; 51class QDropEvent;
52class KOTodoViewWhatsThis; 52class KOTodoViewWhatsThis;
53 53
54class DocPrefs; 54class DocPrefs;
55 55
56class KOTodoListView : public KListView 56class KOTodoListView : public KListView
57{ 57{
58 Q_OBJECT 58 Q_OBJECT
59 public: 59 public:
60 KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); 60 KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0);
61 virtual ~KOTodoListView() {} 61 virtual ~KOTodoListView() {}
62 62
63 signals: 63 signals:
64 void paintNeeded(); 64 void paintNeeded();
65 void todoDropped(Todo *, int); 65 void todoDropped(Todo *, int);
66 void double_Clicked(QListViewItem *item); 66 void double_Clicked(QListViewItem *item);
67 void reparentTodoSignal( Todo *,Todo * ); 67 void reparentTodoSignal( Todo *,Todo * );
68 void unparentTodoSignal(Todo *); 68 void unparentTodoSignal(Todo *);
69 void deleteTodo( Todo * ); 69 void deleteTodo( Todo * );
70 protected: 70 protected:
71 void wheelEvent (QWheelEvent *e); 71 void wheelEvent (QWheelEvent *e);
72 void contentsDragEnterEvent(QDragEnterEvent *); 72 void contentsDragEnterEvent(QDragEnterEvent *);
73 void contentsDragMoveEvent(QDragMoveEvent *); 73 void contentsDragMoveEvent(QDragMoveEvent *);
74 void contentsDragLeaveEvent(QDragLeaveEvent *); 74 void contentsDragLeaveEvent(QDragLeaveEvent *);
75 void contentsDropEvent(QDropEvent *); 75 void contentsDropEvent(QDropEvent *);
76 76
77 void contentsMousePressEvent(QMouseEvent *); 77 void contentsMousePressEvent(QMouseEvent *);
78 void contentsMouseMoveEvent(QMouseEvent *); 78 void contentsMouseMoveEvent(QMouseEvent *);
79 void contentsMouseReleaseEvent(QMouseEvent *); 79 void contentsMouseReleaseEvent(QMouseEvent *);
80 void contentsMouseDoubleClickEvent(QMouseEvent *); 80 void contentsMouseDoubleClickEvent(QMouseEvent *);
81 81
82 private: 82 private:
83 void paintEvent(QPaintEvent * pevent); 83 void paintEvent(QPaintEvent * pevent);
84 bool internalDrop; 84 bool internalDrop;
85 QString mName; 85 QString mName;
86 Calendar *mCalendar; 86 Calendar *mCalendar;
87 QPoint mPressPos; 87 QPoint mPressPos;
88 bool mMousePressed; 88 bool mMousePressed;
89 QListViewItem *mOldCurrent; 89 QListViewItem *mOldCurrent;
90 bool mFlagKeyPressed; 90 bool mFlagKeyPressed;
91 void keyPressEvent ( QKeyEvent * ) ; 91 void keyPressEvent ( QKeyEvent * ) ;
92 void keyReleaseEvent ( QKeyEvent * ) ; 92 void keyReleaseEvent ( QKeyEvent * ) ;
93}; 93};
94 94
95 95
96/** 96/**
97 This is the line-edit on top of the todoview for fast addition of new todos 97 This is the line-edit on top of the todoview for fast addition of new todos
98*/ 98*/
99class KOQuickTodo : public QLineEdit 99class KOQuickTodo : public QLineEdit
100{ 100{
101 public: 101 public:
102 KOQuickTodo(QWidget *parent=0); 102 KOQuickTodo(QWidget *parent=0);
103 protected: 103 protected:
104 void focusInEvent(QFocusEvent *ev); 104 void focusInEvent(QFocusEvent *ev);
105 void focusOutEvent(QFocusEvent *ev); 105 void focusOutEvent(QFocusEvent *ev);
106}; 106};
107 107
108 108
109/** 109/**
110 This class provides a multi-column list view of todo events. 110 This class provides a multi-column list view of todo events.
111 111
112 @short multi-column list view of todo events. 112 @short multi-column list view of todo events.
113 @author Cornelius Schumacher <schumacher@kde.org> 113 @author Cornelius Schumacher <schumacher@kde.org>
114*/ 114*/
115class KOTodoView : public KOrg::BaseView 115class KOTodoView : public KOrg::BaseView
116{ 116{
117 Q_OBJECT 117 Q_OBJECT
118 public: 118 public:
119 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); 119 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 );
120 ~KOTodoView(); 120 ~KOTodoView();
121 121
122 QPtrList<Incidence> selectedIncidences(); 122 QPtrList<Incidence> selectedIncidences();
123 QPtrList<Todo> selectedTodos(); 123 QPtrList<Todo> selectedTodos();
124 124
125 DateList selectedDates() 125 DateList selectedDates()
126 {DateList q; 126 {DateList q;
127 return q;} 127 return q;}
128 128
129 /** Return number of shown dates. TodoView does not show dates, */ 129 /** Return number of shown dates. TodoView does not show dates, */
130 int currentDateCount() { return 0; } 130 int currentDateCount() { return 0; }
131 131
132 void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); 132 void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td);
133 133
134 void setDocumentId( const QString & ); 134 void setDocumentId( const QString & );
135 135
136 void saveLayout(KConfig *config, const QString &group) const; 136 void saveLayout(KConfig *config, const QString &group) const;
137 void restoreLayout(KConfig *config, const QString &group); 137 void restoreLayout(KConfig *config, const QString &group);
138 /** Create a popup menu to set categories */ 138 /** Create a popup menu to set categories */
139 QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); 139 QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem);
140 void setNavigator( DateNavigator* nav ) {mNavigator = nav;} 140 void setNavigator( DateNavigator* nav ) {mNavigator = nav;}
141 QString getWhatsThisText(QPoint p); 141 QString getWhatsThisText(QPoint p);
142 142
143 public slots: 143 public slots:
144 void updateView(); 144 void updateView();
145 void updateConfig(); 145 void updateConfig();
146 146
147 void changeEventDisplay(Event *, int); 147 void changeEventDisplay(Event *, int);
148 148
149 void showDates(const QDate &start, const QDate &end); 149 void showDates(const QDate &start, const QDate &end);
150 void showEvents(QPtrList<Event> eventList); 150 void showEvents(QPtrList<Event> eventList);
151 151
152 void clearSelection(); 152 void clearSelection();
153 void jumpToDate (); 153 void jumpToDate ();
154 154
155 void editItem(QListViewItem *item); 155 void editItem(QListViewItem *item);
156 void showItem(QListViewItem *item,const QPoint &,int); 156 void showItem(QListViewItem *item,const QPoint &,int);
157 void popupMenu(QListViewItem *item,const QPoint &,int); 157 void popupMenu(QListViewItem *item,const QPoint &,int);
158 void newTodo(); 158 void newTodo();
159 void newSubTodo(); 159 void newSubTodo();
160 void unparentTodo(); 160 void unparentTodo();
161 void reparentTodo(); 161 void reparentTodo();
162 void showTodo(); 162 void showTodo();
163 void editTodo(); 163 void editTodo();
164 void cloneTodo(); 164 void cloneTodo();
165 void cancelTodo(); 165 void cancelTodo();
166 void moveTodo(); 166 void moveTodo();
167 void beamTodo(); 167 void beamTodo();
168 void deleteTodo(); 168 void deleteTodo();
169 169
170 void setNewPriority(int); 170 void setNewPriority(int);
171 void setNewPercentage(int); 171 void setNewPercentage(int);
172 void changedCategories(int); 172 void changedCategories(int);
173 173
174 void setAllOpen(); 174 void setAllOpen();
175 void setAllClose(); 175 void setAllClose();
176 void setAllFlat(); 176 void setAllFlat();
177 void displayAllFlat(); 177 void displayAllFlat();
178 178
179 void purgeCompleted(); 179 void purgeCompleted();
180 void toggleCompleted(); 180 void toggleCompleted();
181 void toggleRunning(); 181 void toggleRunning();
182 void toggleQuickTodo(); 182 void toggleQuickTodo();
183 void updateTodo( Todo *, int ); 183 void updateTodo( Todo *, int );
184 184
185 void itemClicked(QListViewItem *); 185 void itemClicked(QListViewItem *);
186 void itemStateChanged(QListViewItem *); 186 void itemStateChanged(QListViewItem *);
187 void modified(bool); 187 void modified(bool);
188 void itemDoubleClicked(QListViewItem *item); 188 void itemDoubleClicked(QListViewItem *item);
189 189
190 signals: 190 signals:
191 void newTodoSignal(); 191 void newTodoSignal();
192 void newSubTodoSignal(Todo *); 192 void newSubTodoSignal(Todo *);
193 void unparentTodoSignal(Todo *); 193 void unparentTodoSignal(Todo *);
194 void reparentTodoSignal( Todo *,Todo * ); 194 void reparentTodoSignal( Todo *,Todo * );
195 void showTodoSignal(Todo *); 195 void showTodoSignal(Todo *);
196 196
197 void editTodoSignal(Todo *); 197 void editTodoSignal(Todo *);
198 void deleteTodoSignal(Todo *); 198 void deleteTodoSignal(Todo *);
199 void todoModifiedSignal (Todo *, int); 199 void todoModifiedSignal (Todo *, int);
200 200
201 void isModified(bool); 201 void isModified(bool);
202 void cloneTodoSignal( Incidence * ); 202 void cloneTodoSignal( Incidence * );
203 void cancelTodoSignal( Incidence * ); 203 void cancelTodoSignal( Incidence * );
204 void moveTodoSignal( Incidence * ); 204 void moveTodoSignal( Incidence * );
205 void beamTodoSignal( Incidence * ); 205 void beamTodoSignal( Incidence * );
206 void purgeCompletedSignal(); 206 void purgeCompletedSignal();
207 207
208 protected slots: 208 protected slots:
209 void toggleRunningItem();
209 void paintNeeded(); 210 void paintNeeded();
210 void processSelectionChange(); 211 void processSelectionChange();
211 void addQuickTodo(); 212 void addQuickTodo();
212 void setTodoModified( Todo* ); 213 void setTodoModified( Todo* );
213 void todoModified(Todo *, int ); 214 void todoModified(Todo *, int );
214 215
215 private: 216 private:
216 /* 217 /*
217 * the TodoEditor approach is rather unscaling in the long 218 * the TodoEditor approach is rather unscaling in the long
218 * run. 219 * run.
219 * Korganizer keeps it in memory and we need to update 220 * Korganizer keeps it in memory and we need to update
220 * 1. make KOTodoViewItem a QObject again? 221 * 1. make KOTodoViewItem a QObject again?
221 * 2. add a public method for setting one todo modified? 222 * 2. add a public method for setting one todo modified?
222 * 3. add a private method for setting a todo modified + friend here? 223 * 3. add a private method for setting a todo modified + friend here?
223 * -- zecke 2002-07-08 224 * -- zecke 2002-07-08
224 */ 225 */
225 KOTodoViewWhatsThis* mKOTodoViewWhatsThis; 226 KOTodoViewWhatsThis* mKOTodoViewWhatsThis;
226 friend class KOTodoListView; 227 friend class KOTodoListView;
227 void paintEvent(QPaintEvent * pevent); 228 void paintEvent(QPaintEvent * pevent);
228 bool mPendingUpdateBeforeRepaint; 229 bool mPendingUpdateBeforeRepaint;
229 friend class KOTodoViewItem; 230 friend class KOTodoViewItem;
230 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); 231 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
231 void restoreItemState( QListViewItem * ); 232 void restoreItemState( QListViewItem * );
232 233
233 bool checkTodo( Todo * ); 234 bool checkTodo( Todo * );
234 bool isFlatDisplay; 235 bool isFlatDisplay;
235 void setOpen( QListViewItem*, bool setOpen); 236 void setOpen( QListViewItem*, bool setOpen);
236 KOTodoListView *mTodoListView; 237 KOTodoListView *mTodoListView;
237 QPopupMenu *mItemPopupMenu; 238 QPopupMenu *mItemPopupMenu;
238 QPopupMenu *mPopupMenu; 239 QPopupMenu *mPopupMenu;
239 QPopupMenu *mPriorityPopupMenu; 240 QPopupMenu *mPriorityPopupMenu;
240 QPopupMenu *mPercentageCompletedPopupMenu; 241 QPopupMenu *mPercentageCompletedPopupMenu;
241 QPopupMenu *mCategoryPopupMenu; 242 QPopupMenu *mCategoryPopupMenu;
242 243
243 QMap<int, int> mPercentage; 244 QMap<int, int> mPercentage;
244 QMap<int, int> mPriority; 245 QMap<int, int> mPriority;
245 QMap<int, QString> mCategory; 246 QMap<int, QString> mCategory;
246 KOTodoViewItem *mActiveItem; 247 KOTodoViewItem *mActiveItem;
247 248
248 QMap<Todo *,KOTodoViewItem *> mTodoMap; 249 QMap<Todo *,KOTodoViewItem *> mTodoMap;
249 QString mName; 250 QString mName;
250 251
251 DocPrefs *mDocPrefs; 252 DocPrefs *mDocPrefs;
252 QString mCurrentDoc; 253 QString mCurrentDoc;
253 KOQuickTodo *mQuickAdd; 254 KOQuickTodo *mQuickAdd;
254 bool mBlockUpdate; 255 bool mBlockUpdate;
255 void keyPressEvent ( QKeyEvent * ) ; 256 void keyPressEvent ( QKeyEvent * ) ;
256 KOTodoViewItem * pendingSubtodo; 257 KOTodoViewItem * pendingSubtodo;
257 DateNavigator* mNavigator; 258 DateNavigator* mNavigator;
258 void storeCurrentItem(); 259 void storeCurrentItem();
259 void resetCurrentItem(); 260 void resetCurrentItem();
260 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove; 261 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove;
261}; 262};
262 263
263#endif 264#endif
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 6559119..66f8d06 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -1,502 +1,522 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <klocale.h> 20#include <klocale.h>
21#include <kdebug.h> 21#include <kdebug.h>
22#include <qapp.h> 22#include <qapp.h>
23#include <kglobal.h>
23 24
24#include <kiconloader.h> 25#include <kiconloader.h>
25#include "kotodoviewitem.h" 26#include "kotodoviewitem.h"
26#include "kotodoview.h" 27#include "kotodoview.h"
27#include "koprefs.h" 28#include "koprefs.h"
28 29
29KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo) 30KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo)
30 : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) 31 : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
31{ 32{
32 construct(); 33 construct();
33} 34}
34 35
35KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo ) 36KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo )
36 : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) 37 : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
37{ 38{
38 construct(); 39 construct();
39} 40}
40 41
41QString KOTodoViewItem::key(int column,bool) const 42QString KOTodoViewItem::key(int column,bool) const
42{ 43{
43 QMap<int,QString>::ConstIterator it = mKeyMap.find(column); 44 QMap<int,QString>::ConstIterator it = mKeyMap.find(column);
44 if (it == mKeyMap.end()) { 45 if (it == mKeyMap.end()) {
45 return text(column).lower(); 46 return text(column).lower();
46 } else { 47 } else {
47 return *it; 48 return *it;
48 } 49 }
49} 50}
50 51
51void KOTodoViewItem:: setup() 52void KOTodoViewItem:: setup()
52{ 53{
53 54
54 int h = 20; 55 int h = 20;
55 if ( listView () ) { 56 if ( listView () ) {
56 QFontMetrics fm ( listView ()->font () ); 57 QFontMetrics fm ( listView ()->font () );
57 h = fm.height(); 58 h = fm.height();
58 } 59 }
59 setHeight( h ); 60 setHeight( h );
60 61
61} 62}
62void KOTodoViewItem::setSortKey(int column,const QString &key) 63void KOTodoViewItem::setSortKey(int column,const QString &key)
63{ 64{
64 mKeyMap.insert(column,key); 65 mKeyMap.insert(column,key);
65} 66}
66 67
67#if QT_VERSION >= 0x030000 68#if QT_VERSION >= 0x030000
68void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w, 69void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
69 int y,int h) 70 int y,int h)
70{ 71{
71 QListViewItem::paintBranches(p,cg,w,y,h); 72 QListViewItem::paintBranches(p,cg,w,y,h);
72} 73}
73#else 74#else
74#endif 75#endif
75 76
76void KOTodoViewItem::construct() 77void KOTodoViewItem::construct()
77{ 78{
78 // qDebug("KOTodoViewItem::construct() "); 79 // qDebug("KOTodoViewItem::construct() ");
79 m_init = true; 80 m_init = true;
80 QString keyd = "=="; 81 QString keyd = "==";
81 QString keyt = "=="; 82 QString keyt = "==";
82 QString skeyd = "=="; 83 QString skeyd = "==";
83 QString skeyt = "=="; 84 QString skeyt = "==";
84 85
85 setOn(mTodo->isCompleted()); 86 setOn(mTodo->isCompleted());
86 setText(0,mTodo->summary()); 87 setText(0,mTodo->summary());
87 setText(1,QString::number(mTodo->priority())); 88 setText(1,QString::number(mTodo->priority()));
88 setText(2,i18n("%1 %").arg(QString::number(mTodo->percentComplete()))); 89 setText(2,i18n("%1 %").arg(QString::number(mTodo->percentComplete())));
89 if (mTodo->percentComplete()<100) { 90 if (mTodo->percentComplete()<100) {
90 if (mTodo->isCompleted()) setSortKey(2,QString::number(999)); 91 if (mTodo->isCompleted()) setSortKey(2,QString::number(999));
91 else setSortKey(2,QString::number(mTodo->percentComplete())); 92 else setSortKey(2,QString::number(mTodo->percentComplete()));
92 } 93 }
93 else { 94 else {
94 if (mTodo->isCompleted()) setSortKey(2,QString::number(999)); 95 if (mTodo->isCompleted()) setSortKey(2,QString::number(999));
95 else setSortKey(2,QString::number(99)); 96 else setSortKey(2,QString::number(99));
96 } 97 }
97 if (mTodo->hasDueDate()) { 98 if (mTodo->hasDueDate()) {
98 setText(3, mTodo->dtDueDateStr()); 99 setText(3, mTodo->dtDueDateStr());
99 QDate d = mTodo->dtDue().date(); 100 QDate d = mTodo->dtDue().date();
100 keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); 101 keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
101 // setSortKey(3,keyd); 102 // setSortKey(3,keyd);
102 if (mTodo->doesFloat()) { 103 if (mTodo->doesFloat()) {
103 setText(4,""); 104 setText(4,"");
104 } 105 }
105 else { 106 else {
106 setText(4,mTodo->dtDueTimeStr()); 107 setText(4,mTodo->dtDueTimeStr());
107 QTime t = mTodo->dtDue().time(); 108 QTime t = mTodo->dtDue().time();
108 keyt.sprintf("%02d%02d",t.hour(),t.minute()); 109 keyt.sprintf("%02d%02d",t.hour(),t.minute());
109 //setSortKey(4,keyt); 110 //setSortKey(4,keyt);
110 } 111 }
111 } else { 112 } else {
112 setText(3,""); 113 setText(3,"");
113 setText(4,""); 114 setText(4,"");
114 } 115 }
115 setSortKey(3,keyd); 116 setSortKey(3,keyd);
116 setSortKey(4,keyt); 117 setSortKey(4,keyt);
117 118
118 if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt); 119 if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt);
119 else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt); 120 else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt);
120 121
121 122
122 123
123 if (mTodo->hasStartDate()) { 124 keyd = "";
124 setText(5, mTodo->dtStartDateStr()); 125 keyt = "";
125 QDate d = mTodo->dtStart().date(); 126
126 skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); 127 if (mTodo->isRunning() ) {
127 128 QDate d = mTodo->runStart().date();
128 if (mTodo->doesFloat()) { 129 QTime t = mTodo->runStart().time();
129 setText(6,"");
130 }
131 else {
132 setText(6,mTodo->dtStartTimeStr());
133 QTime t = mTodo->dtStart().time();
134 skeyt.sprintf("%02d%02d",t.hour(),t.minute()); 130 skeyt.sprintf("%02d%02d",t.hour(),t.minute());
135 131 skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
136 } 132 keyd = KGlobal::locale()->formatDate( d );
133 keyt = KGlobal::locale()->formatTime( t );
134
137 } else { 135 } else {
138 setText(5,""); 136
139 setText(6,""); 137 if (mTodo->hasStartDate()) {
138 keyd = mTodo->dtStartDateStr();
139 QDate d = mTodo->dtStart().date();
140 skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
141
142 if ( !mTodo->doesFloat()) {
143 keyt = mTodo->dtStartTimeStr();
144 QTime t = mTodo->dtStart().time();
145 skeyt.sprintf("%02d%02d",t.hour(),t.minute());
146
147 }
148
149 }
140 } 150 }
151 setText(5,keyd);
152 setText(6,keyt);
141 setSortKey(5,skeyd); 153 setSortKey(5,skeyd);
142 setSortKey(6,skeyt); 154 setSortKey(6,skeyt);
143 155
144 setText(7,mTodo->cancelled() ? i18n("Yes") : i18n("No")); 156 setText(7,mTodo->cancelled() ? i18n("Yes") : i18n("No"));
145 setText(8,mTodo->categoriesStr()); 157 setText(8,mTodo->categoriesStr());
146 158
147#if 0 159#if 0
148 // Find sort id in description. It's the text behind the last '#' character 160 // Find sort id in description. It's the text behind the last '#' character
149 // found in the description. White spaces are removed from beginning and end 161 // found in the description. White spaces are removed from beginning and end
150 // of sort id. 162 // of sort id.
151 int pos = mTodo->description().findRev('#'); 163 int pos = mTodo->description().findRev('#');
152 if (pos < 0) { 164 if (pos < 0) {
153 setText(6,""); 165 setText(6,"");
154 } else { 166 } else {
155 QString str = mTodo->description().mid(pos+1); 167 QString str = mTodo->description().mid(pos+1);
156 str.stripWhiteSpace(); 168 str.stripWhiteSpace();
157 setText(6,str); 169 setText(6,str);
158 } 170 }
159#endif 171#endif
160 172
161 m_known = false; 173 m_known = false;
162 m_init = false; 174 m_init = false;
163 175
164 setMyPixmap(); 176 setMyPixmap();
165 177
166} 178}
167void KOTodoViewItem::setMyPixmap() 179void KOTodoViewItem::setMyPixmap()
168{ 180{
169 int size = 5; 181 int size = 5;
170 QPixmap pixi = QPixmap( 1, 1 ); 182 QPixmap pixi = QPixmap( 1, 1 );
171 // if ( !mTodo->isCompleted() && mTodo->hasDueDate() && mTodo->dtDue() < QDateTime::currentDateTime() ) { 183 // if ( !mTodo->isCompleted() && mTodo->hasDueDate() && mTodo->dtDue() < QDateTime::currentDateTime() ) {
172// pixi = SmallIcon("redcross16"); 184// pixi = SmallIcon("redcross16");
173// } else { 185// } else {
174 QPainter p; 186 QPainter p;
175 187
176 int pixSize = 0; 188 int pixSize = 0;
177 QPixmap pPix = QPixmap( size, size ); 189 QPixmap pPix = QPixmap( size, size );
178 if ( mTodo->description().length() > 0 ) { 190 if ( mTodo->description().length() > 0 ) {
179 pixi.resize(size, pixSize+size); 191 pixi.resize(size, pixSize+size);
180 pPix.fill( Qt::darkGreen ); 192 pPix.fill( Qt::darkGreen );
181 p.begin( &pixi ); 193 p.begin( &pixi );
182 p. drawPixmap ( 0, pixSize, pPix); 194 p. drawPixmap ( 0, pixSize, pPix);
183 p.end(); 195 p.end();
184 pixSize += size; 196 pixSize += size;
185 } 197 }
186 if ( mTodo->isAlarmEnabled() ) { 198 if ( mTodo->isAlarmEnabled() ) {
187 pixi.resize(size, pixSize+size); 199 pixi.resize(size, pixSize+size);
188 pPix.fill( Qt::red ); 200 pPix.fill( Qt::red );
189 p.begin( &pixi ); 201 p.begin( &pixi );
190 p. drawPixmap ( 0, pixSize, pPix); 202 p. drawPixmap ( 0, pixSize, pPix);
191 p.end(); 203 p.end();
192 pixSize += size; 204 pixSize += size;
193 } 205 }
194 if ( mTodo->doesRecur() ) { 206 if ( mTodo->doesRecur() ) {
195 pixi.resize(size, pixSize+size); 207 pixi.resize(size, pixSize+size);
196 pPix.fill( Qt::blue ); 208 pPix.fill( Qt::blue );
197 p.begin( &pixi ); 209 p.begin( &pixi );
198 p. drawPixmap ( 0, pixSize, pPix); 210 p. drawPixmap ( 0, pixSize, pPix);
199 p.end(); 211 p.end();
200 pixSize += size; 212 pixSize += size;
201 } 213 }
202 // } 214 // }
203 if ( pixi.width() > 1 ) { 215 if ( pixi.width() > 1 ) {
204 setPixmap ( 0,pixi ) ; 216 setPixmap ( 0,pixi ) ;
205 } else { 217 } else {
206 setPixmap ( 0,QPixmap() ) ; 218 setPixmap ( 0,QPixmap() ) ;
207 } 219 }
208} 220}
209void KOTodoViewItem::stateChange(bool state) 221void KOTodoViewItem::stateChange(bool state)
210{ 222{
211 // qDebug("KOTodoViewItem::stateChange %d ", state); 223 // qDebug("KOTodoViewItem::stateChange %d ", state);
212 // do not change setting on startup 224 // do not change setting on startup
213 if ( m_init ) return; 225 if ( m_init ) return;
214 if (isOn()!=state) { 226 if (isOn()!=state) {
215 setOn(state); 227 setOn(state);
216 //qDebug("SETON "); 228 //qDebug("SETON ");
217 return; 229 return;
218 } 230 }
219 if ( mTodo->isCompleted() == state ) { 231 if ( mTodo->isCompleted() == state ) {
220 //qDebug("STATECHANGE:nothing to do "); 232 //qDebug("STATECHANGE:nothing to do ");
221 return; 233 return;
222 } 234 }
223 QString keyd = "=="; 235 QString keyd = "==";
224 QString keyt = "=="; 236 QString keyt = "==";
225 //qDebug("KOTodoViewItem::stateChange %s ", text(0).latin1()); 237 //qDebug("KOTodoViewItem::stateChange %s ", text(0).latin1());
226 if ( mTodo->doesRecur() ){ 238 if ( mTodo->doesRecur() ){
227 QDateTime start = mTodo->dtStart(); 239 QDateTime start = mTodo->dtStart();
228 mTodo->setCompleted(state); 240 mTodo->setCompleted(state);
229 if ( start != mTodo->dtStart() ) { 241 if ( start != mTodo->dtStart() ) {
230 if ( state && !mTodo->isCompleted() ) { 242 if ( state && !mTodo->isCompleted() ) {
231 setOn( false ); 243 setOn( false );
232 state = false; 244 state = false;
233 } 245 }
234 } 246 }
235 } else 247 } else
236 mTodo->setCompleted(state); 248 mTodo->setCompleted(state);
237 249
238 if (state) mTodo->setCompleted(QDateTime::currentDateTime()); 250 if (state) mTodo->setCompleted(QDateTime::currentDateTime());
239 251
240 if (mTodo->hasDueDate()) { 252 if (mTodo->hasDueDate()) {
241 setText(3, mTodo->dtDueDateStr()); 253 setText(3, mTodo->dtDueDateStr());
242 QDate d = mTodo->dtDue().date(); 254 QDate d = mTodo->dtDue().date();
243 keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); 255 keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
244 setSortKey(3,keyd); 256 setSortKey(3,keyd);
245 if (mTodo->doesFloat()) { 257 if (mTodo->doesFloat()) {
246 setText(4,""); 258 setText(4,"");
247 } 259 }
248 else { 260 else {
249 setText(4,mTodo->dtDueTimeStr()); 261 setText(4,mTodo->dtDueTimeStr());
250 QTime t = mTodo->dtDue().time(); 262 QTime t = mTodo->dtDue().time();
251 keyt.sprintf("%02d%02d",t.hour(),t.minute()); 263 keyt.sprintf("%02d%02d",t.hour(),t.minute());
252 setSortKey(4,keyt); 264 setSortKey(4,keyt);
253 } 265 }
254 } 266 }
255 if (mTodo->hasStartDate()) { 267 if (mTodo->hasStartDate()) {
256 QString skeyt = "=="; 268 QString skeyt = "==";
257 QString skeyd = "=="; 269 QString skeyd = "==";
258 setText(5, mTodo->dtStartDateStr()); 270 setText(5, mTodo->dtStartDateStr());
259 QDate d = mTodo->dtStart().date(); 271 QDate d = mTodo->dtStart().date();
260 skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); 272 skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
261 273
262 if (mTodo->doesFloat()) { 274 if (mTodo->doesFloat()) {
263 setText(6,""); 275 setText(6,"");
264 } 276 }
265 else { 277 else {
266 setText(6,mTodo->dtStartTimeStr()); 278 setText(6,mTodo->dtStartTimeStr());
267 QTime t = mTodo->dtStart().time(); 279 QTime t = mTodo->dtStart().time();
268 skeyt.sprintf("%02d%02d",t.hour(),t.minute()); 280 skeyt.sprintf("%02d%02d",t.hour(),t.minute());
269 281
270 } 282 }
271 setSortKey(5,skeyd); 283 setSortKey(5,skeyd);
272 setSortKey(6,skeyt); 284 setSortKey(6,skeyt);
273 } 285 }
274 if (mTodo->isCompleted()) setSortKey(1,QString::number(9)+keyd+keyt); 286 if (mTodo->isCompleted()) setSortKey(1,QString::number(9)+keyd+keyt);
275 else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt); 287 else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt);
276 288
277 setText(2,i18n("%1 %").arg(QString::number(mTodo->percentComplete()))); 289 setText(2,i18n("%1 %").arg(QString::number(mTodo->percentComplete())));
278 if (mTodo->percentComplete()<100) { 290 if (mTodo->percentComplete()<100) {
279 if (mTodo->isCompleted()) setSortKey(2,QString::number(999)); 291 if (mTodo->isCompleted()) setSortKey(2,QString::number(999));
280 else setSortKey(2,QString::number(mTodo->percentComplete())); 292 else setSortKey(2,QString::number(mTodo->percentComplete()));
281 } 293 }
282 else { 294 else {
283 if (mTodo->isCompleted()) setSortKey(2,QString::number(999)); 295 if (mTodo->isCompleted()) setSortKey(2,QString::number(999));
284 else setSortKey(2,QString::number(99)); 296 else setSortKey(2,QString::number(99));
285 } 297 }
286 if ( state ) { 298 if ( state ) {
287 QListViewItem * myChild = firstChild(); 299 QListViewItem * myChild = firstChild();
288 KOTodoViewItem *item; 300 KOTodoViewItem *item;
289 while( myChild ) { 301 while( myChild ) {
290 //qDebug("stateCH "); 302 //qDebug("stateCH ");
291 item = static_cast<KOTodoViewItem*>(myChild); 303 item = static_cast<KOTodoViewItem*>(myChild);
292 item->stateChange(state); 304 item->stateChange(state);
293 myChild = myChild->nextSibling(); 305 myChild = myChild->nextSibling();
294 } 306 }
295 } else { 307 } else {
296 QListViewItem * myChild = parent(); 308 QListViewItem * myChild = parent();
297 if ( myChild ) 309 if ( myChild )
298 (static_cast<KOTodoViewItem*>(myChild))->stateChange(state); 310 (static_cast<KOTodoViewItem*>(myChild))->stateChange(state);
299 } 311 }
300 mTodoView->modified(true); 312 mTodoView->modified(true);
301 setMyPixmap(); 313 setMyPixmap();
302 mTodoView->setTodoModified( mTodo ); 314 mTodoView->setTodoModified( mTodo );
303} 315}
304 316
305bool KOTodoViewItem::isAlternate() 317bool KOTodoViewItem::isAlternate()
306{ 318{
307 319
308 KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); 320 KOTodoListView *lv = static_cast<KOTodoListView *>(listView());
309 if (lv && lv->alternateBackground().isValid()) 321 if (lv && lv->alternateBackground().isValid())
310 { 322 {
311 KOTodoViewItem *above = 0; 323 KOTodoViewItem *above = 0;
312 above = static_cast<KOTodoViewItem *>(itemAbove()); 324 above = static_cast<KOTodoViewItem *>(itemAbove());
313 m_known = above ? above->m_known : true; 325 m_known = above ? above->m_known : true;
314 if (m_known) 326 if (m_known)
315 { 327 {
316 m_odd = above ? !above->m_odd : false; 328 m_odd = above ? !above->m_odd : false;
317 } 329 }
318 else 330 else
319 { 331 {
320 KOTodoViewItem *item; 332 KOTodoViewItem *item;
321 bool previous = true; 333 bool previous = true;
322 if (QListViewItem::parent()) 334 if (QListViewItem::parent())
323 { 335 {
324 item = static_cast<KOTodoViewItem *>(QListViewItem::parent()); 336 item = static_cast<KOTodoViewItem *>(QListViewItem::parent());
325 if (item) 337 if (item)
326 previous = item->m_odd; 338 previous = item->m_odd;
327 item = static_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild()); 339 item = static_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild());
328 } 340 }
329 else 341 else
330 { 342 {
331 item = static_cast<KOTodoViewItem *>(lv->firstChild()); 343 item = static_cast<KOTodoViewItem *>(lv->firstChild());
332 } 344 }
333 345
334 while(item) 346 while(item)
335 { 347 {
336 item->m_odd = previous = !previous; 348 item->m_odd = previous = !previous;
337 item->m_known = true; 349 item->m_known = true;
338 item = static_cast<KOTodoViewItem *>(item->nextSibling()); 350 item = static_cast<KOTodoViewItem *>(item->nextSibling());
339 } 351 }
340 } 352 }
341 return m_odd; 353 return m_odd;
342 } 354 }
343 return false; 355 return false;
344} 356}
345 357
346void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) 358void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
347{ 359{
348 QColorGroup _cg = cg; 360 QColorGroup _cg = cg;
349 QColorGroup::ColorRole role; 361 QColorGroup::ColorRole role;
350 if ( KOPrefs::instance()->mTodoViewUsesForegroundColor ) 362 if ( KOPrefs::instance()->mTodoViewUsesForegroundColor )
351 role = QColorGroup::Text; 363 role = QColorGroup::Text;
352 else 364 else
353 role = QColorGroup::Base; 365 role = QColorGroup::Base;
354 //#ifndef KORG_NOLVALTERNATION 366 //#ifndef KORG_NOLVALTERNATION
355 if (isAlternate()) 367 if (isAlternate())
356 _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); 368 _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
357 bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; 369 bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors;
358 QColor colorToSet; 370 QColor colorToSet;
359 if ( setColor ) { 371 if ( setColor ) {
360 QStringList categories = mTodo->categories(); 372 QStringList categories = mTodo->categories();
361 QString cat = categories.first(); 373 QString cat = categories.first();
362 if ( !cat.isEmpty()) { 374 if ( !cat.isEmpty()) {
363 colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); 375 colorToSet = *(KOPrefs::instance()->categoryColor(cat) );
364 } else 376 } else
365 setColor = false; 377 setColor = false;
366 } 378 }
367 bool openMode = !isOpen(); 379 bool openMode = !isOpen();
368 // maybe we are in flat-display-mode 380 // maybe we are in flat-display-mode
369 if ( !firstChild() ) 381 if ( !firstChild() )
370 openMode = false; 382 openMode = false;
371 int odue = mTodo->hasDueSubTodo( openMode ); 383 bool colorRunning = mTodo->isRunning();
372 if (odue == 2) { 384 if ( ! colorRunning && openMode )
373 colorToSet = KOPrefs::instance()->mTodoOverdueColor; 385 colorRunning = mTodo->hasRunningSub();
374 setColor = true; 386 if ( colorRunning ) {
375 } else if ( odue == 1 ) {
376 colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
377 setColor = true; 387 setColor = true;
388 colorToSet = KOPrefs::instance()->mTodoRunColor;
389 } else {
390 int odue = mTodo->hasDueSubTodo( openMode );
391 if (odue == 2) {
392 colorToSet = KOPrefs::instance()->mTodoOverdueColor;
393 setColor = true;
394 } else if ( odue == 1 ) {
395 colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
396 setColor = true;
397 }
378 } 398 }
379 399
380 400
381 if ( setColor ) { 401 if ( setColor ) {
382 _cg.setColor(role,colorToSet ); 402 _cg.setColor(role,colorToSet );
383 if ( role == QColorGroup::Base) { 403 if ( role == QColorGroup::Base) {
384 int rgb = colorToSet.red(); 404 int rgb = colorToSet.red();
385 rgb += colorToSet.blue()/2; 405 rgb += colorToSet.blue()/2;
386 rgb += colorToSet.green(); 406 rgb += colorToSet.green();
387 if ( rgb < 200 ) 407 if ( rgb < 200 )
388 _cg.setColor(QColorGroup::Text,Qt::white ); 408 _cg.setColor(QColorGroup::Text,Qt::white );
389 } 409 }
390 } 410 }
391 //#endif 411 //#endif
392 if ( column > 0 ){ 412 if ( column > 0 ){
393 if ( column == 2 && !KOPrefs::instance()->mTodoViewShowsPercentage ) { 413 if ( column == 2 && !KOPrefs::instance()->mTodoViewShowsPercentage ) {
394 p->save(); 414 p->save();
395 int progress = (int)(( (width-6)*mTodo->percentComplete())/100.0 + 0.5); 415 int progress = (int)(( (width-6)*mTodo->percentComplete())/100.0 + 0.5);
396 416
397 p->fillRect( 0, 0, width, height(), _cg.base() ); // background 417 p->fillRect( 0, 0, width, height(), _cg.base() ); // background
398 // p->setPen(Qt::black ); //border 418 // p->setPen(Qt::black ); //border
399 // p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling 419 // p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling
400 QColor fc = KOPrefs::instance()->mHighlightColor; 420 QColor fc = KOPrefs::instance()->mHighlightColor;
401 if ( mTodo->percentComplete() == 100 ) 421 if ( mTodo->percentComplete() == 100 )
402 fc = darkGreen; 422 fc = darkGreen;
403 p->drawRect( 2, 2, width-4, height()-4); 423 p->drawRect( 2, 2, width-4, height()-4);
404 p->fillRect( 3, 3, progress, height()-6, 424 p->fillRect( 3, 3, progress, height()-6,
405 fc ); 425 fc );
406 p->restore(); 426 p->restore();
407 } else { 427 } else {
408 QCheckListItem::paintCell(p, _cg, column, width, alignment); 428 QCheckListItem::paintCell(p, _cg, column, width, alignment);
409 } 429 }
410 return; 430 return;
411 } 431 }
412 432
413 int align = alignment; 433 int align = alignment;
414 434
415 if ( !p ) 435 if ( !p )
416 return; 436 return;
417 437
418 p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) ); 438 p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) );
419 439
420 QListView *lv = listView(); 440 QListView *lv = listView();
421 if ( !lv ) 441 if ( !lv )
422 return; 442 return;
423 int marg = 2;//lv->itemMargin(); 443 int marg = 2;//lv->itemMargin();
424 int r = 0; 444 int r = 0;
425 QCheckListItem::Type myType = QCheckListItem::CheckBox; 445 QCheckListItem::Type myType = QCheckListItem::CheckBox;
426 int BoxSize = 20; 446 int BoxSize = 20;
427 int boxOffset = 2; 447 int boxOffset = 2;
428 int xOffset = 2; 448 int xOffset = 2;
429 if (qApp->desktop()->width() < 300 ) { 449 if (qApp->desktop()->width() < 300 ) {
430 BoxSize = 14; 450 BoxSize = 14;
431 boxOffset = -1; 451 boxOffset = -1;
432 xOffset = 1; 452 xOffset = 1;
433 // marg = 0; 453 // marg = 0;
434 } 454 }
435 if ( height() < BoxSize ) { 455 if ( height() < BoxSize ) {
436 boxOffset = boxOffset - ((BoxSize - height())/2) ; 456 boxOffset = boxOffset - ((BoxSize - height())/2) ;
437 // qDebug("boxOffset %d height %d", boxOffset, height() ); 457 // qDebug("boxOffset %d height %d", boxOffset, height() );
438 BoxSize = height(); 458 BoxSize = height();
439 459
440 } 460 }
441 //bool winStyle = lv->style() == WindowsStyle; 461 //bool winStyle = lv->style() == WindowsStyle;
442 462
443 int lineStart = 5; 463 int lineStart = 5;
444 if ( myType == Controller ) { 464 if ( myType == Controller ) {
445 if ( !pixmap( 0 ) ) 465 if ( !pixmap( 0 ) )
446 r += BoxSize + 4; 466 r += BoxSize + 4;
447 } else { 467 } else {
448 ASSERT( lv ); //### 468 ASSERT( lv ); //###
449 //QFontMetrics fm( lv->font() ); 469 //QFontMetrics fm( lv->font() );
450 //int d = fm.height(); 470 //int d = fm.height();
451 int x = 0; 471 int x = 0;
452 int y = (height() - BoxSize) / 2; 472 int y = (height() - BoxSize) / 2;
453 //p->setPen( QPen( _cg.text(), winStyle ? 2 : 1 ) ); 473 //p->setPen( QPen( _cg.text(), winStyle ? 2 : 1 ) );
454 if ( myType == CheckBox ) { 474 if ( myType == CheckBox ) {
455 if ( isEnabled() ) 475 if ( isEnabled() )
456 p->setPen( QPen( _cg.text(), 1 ) ); 476 p->setPen( QPen( _cg.text(), 1 ) );
457 else 477 else
458 p->setPen( QPen( listView()->palette().color( QPalette::Disabled, QColorGroup::Text ), 1 ) ); 478 p->setPen( QPen( listView()->palette().color( QPalette::Disabled, QColorGroup::Text ), 1 ) );
459 p->drawRect( x+marg, y+2, BoxSize-4, BoxSize-4 ); 479 p->drawRect( x+marg, y+2, BoxSize-4, BoxSize-4 );
460 lineStart = x+marg; 480 lineStart = x+marg;
461 ///////////////////// 481 /////////////////////
462 x++; 482 x++;
463 y++; 483 y++;
464 if ( isOn() ) { 484 if ( isOn() ) {
465 QPointArray a( 7*2 ); 485 QPointArray a( 7*2 );
466 int i, xx, yy; 486 int i, xx, yy;
467 xx = x+xOffset+marg+(boxOffset/2); 487 xx = x+xOffset+marg+(boxOffset/2);
468 yy = y+5+boxOffset; 488 yy = y+5+boxOffset;
469 for ( i=0; i<3; i++ ) { 489 for ( i=0; i<3; i++ ) {
470 a.setPoint( 2*i, xx, yy ); 490 a.setPoint( 2*i, xx, yy );
471 a.setPoint( 2*i+1, xx, yy+2 ); 491 a.setPoint( 2*i+1, xx, yy+2 );
472 // qDebug(" "); 492 // qDebug(" ");
473 xx++; yy++; 493 xx++; yy++;
474 } 494 }
475 yy -= 2; 495 yy -= 2;
476 for ( i=3; i<7; i++ ) { 496 for ( i=3; i<7; i++ ) {
477 a.setPoint( 2*i, xx, yy ); 497 a.setPoint( 2*i, xx, yy );
478 a.setPoint( 2*i+1, xx, yy+2 ); 498 a.setPoint( 2*i+1, xx, yy+2 );
479 xx++; yy--; 499 xx++; yy--;
480 } 500 }
481 p->setPen( darkGreen ); 501 p->setPen( darkGreen );
482 p->drawLineSegments( a ); 502 p->drawLineSegments( a );
483 } 503 }
484 //////////////////////// 504 ////////////////////////
485 } 505 }
486 r += BoxSize + 4; 506 r += BoxSize + 4;
487 } 507 }
488 508
489 p->translate( r, 0 ); 509 p->translate( r, 0 );
490 p->setPen( QPen( _cg.text() ) ); 510 p->setPen( QPen( _cg.text() ) );
491 QListViewItem::paintCell( p, _cg, column, width - r, align ); 511 QListViewItem::paintCell( p, _cg, column, width - r, align );
492 if ( mTodo->cancelled () ) { 512 if ( mTodo->cancelled () ) {
493 p->setPen( black ); 513 p->setPen( black );
494 QRect br = p->boundingRect( 1,1,1,1,0,mTodo->summary() ); 514 QRect br = p->boundingRect( 1,1,1,1,0,mTodo->summary() );
495 int wid = br.width() +lineStart; 515 int wid = br.width() +lineStart;
496 if ( wid > width-3 ) 516 if ( wid > width-3 )
497 wid = width-3; 517 wid = width-3;
498 p->drawLine( lineStart, height()/2+1, wid, height()/2+1 ); 518 p->drawLine( lineStart, height()/2+1, wid, height()/2+1 );
499 519
500 } 520 }
501 521
502} 522}
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index a496404..7dee4cd 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -1,459 +1,503 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <kglobal.h> 21#include <kglobal.h>
22#include <klocale.h> 22#include <klocale.h>
23#include <kdebug.h> 23#include <kdebug.h>
24 24
25#include "todo.h" 25#include "todo.h"
26 26
27using namespace KCal; 27using namespace KCal;
28 28
29Todo::Todo(): Incidence() 29Todo::Todo(): Incidence()
30{ 30{
31// mStatus = TENTATIVE; 31// mStatus = TENTATIVE;
32 32
33 mHasDueDate = false; 33 mHasDueDate = false;
34 setHasStartDate( false ); 34 setHasStartDate( false );
35 mCompleted = getEvenTime(QDateTime::currentDateTime()); 35 mCompleted = getEvenTime(QDateTime::currentDateTime());
36 mHasCompletedDate = false; 36 mHasCompletedDate = false;
37 mPercentComplete = 0; 37 mPercentComplete = 0;
38 mRunning = false;
39 mRunSaveTimer = 0;
38} 40}
39 41
40Todo::Todo(const Todo &t) : Incidence(t) 42Todo::Todo(const Todo &t) : Incidence(t)
41{ 43{
42 mDtDue = t.mDtDue; 44 mDtDue = t.mDtDue;
43 mHasDueDate = t.mHasDueDate; 45 mHasDueDate = t.mHasDueDate;
44 mCompleted = t.mCompleted; 46 mCompleted = t.mCompleted;
45 mHasCompletedDate = t.mHasCompletedDate; 47 mHasCompletedDate = t.mHasCompletedDate;
46 mPercentComplete = t.mPercentComplete; 48 mPercentComplete = t.mPercentComplete;
49 mRunning = false;
50 mRunSaveTimer = 0;
47} 51}
48 52
49Todo::~Todo() 53Todo::~Todo()
50{ 54{
55 setRunning( false );
56}
57
58void Todo::setRunning( bool run )
59{
60 if ( run == mRunning )
61 return;
62 if ( !mRunSaveTimer ) {
63 mRunSaveTimer = new QTimer ( this );
64 connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) );
65 }
66 mRunning = run;
67 if ( mRunning ) {
68 mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min
69 mRunStart = QDateTime::currentDateTime();
70 } else {
71 mRunSaveTimer->stop();
72 saveRunningInfoToFile();
73 }
74}
51 75
76void Todo::saveRunningInfoToFile()
77{
78 qDebug("Todo::saveRunningInfoToFile() ");
52} 79}
53 80
81int Todo::runTime()
82{
83 if ( !mRunning )
84 return 0;
85 return mRunStart.secsTo( QDateTime::currentDateTime() );
86}
87bool Todo::hasRunningSub()
88{
89 if ( mRunning )
90 return true;
91 Incidence *aTodo;
92 for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) {
93 if ( ((Todo*)aTodo)->hasRunningSub() )
94 return true;
95 }
96 return false;
97}
54Incidence *Todo::clone() 98Incidence *Todo::clone()
55{ 99{
56 return new Todo(*this); 100 return new Todo(*this);
57} 101}
58 102
59bool Todo::contains ( Todo* from ) 103bool Todo::contains ( Todo* from )
60{ 104{
61 105
62 if ( !from->summary().isEmpty() ) 106 if ( !from->summary().isEmpty() )
63 if ( !summary().startsWith( from->summary() )) 107 if ( !summary().startsWith( from->summary() ))
64 return false; 108 return false;
65 if ( from->hasStartDate() ) { 109 if ( from->hasStartDate() ) {
66 if ( !hasStartDate() ) 110 if ( !hasStartDate() )
67 return false; 111 return false;
68 if ( from->dtStart() != dtStart()) 112 if ( from->dtStart() != dtStart())
69 return false; 113 return false;
70 } 114 }
71 if ( from->hasDueDate() ){ 115 if ( from->hasDueDate() ){
72 if ( !hasDueDate() ) 116 if ( !hasDueDate() )
73 return false; 117 return false;
74 if ( from->dtDue() != dtDue()) 118 if ( from->dtDue() != dtDue())
75 return false; 119 return false;
76 } 120 }
77 if ( !from->location().isEmpty() ) 121 if ( !from->location().isEmpty() )
78 if ( !location().startsWith( from->location() ) ) 122 if ( !location().startsWith( from->location() ) )
79 return false; 123 return false;
80 if ( !from->description().isEmpty() ) 124 if ( !from->description().isEmpty() )
81 if ( !description().startsWith( from->description() )) 125 if ( !description().startsWith( from->description() ))
82 return false; 126 return false;
83 if ( from->alarms().count() ) { 127 if ( from->alarms().count() ) {
84 Alarm *a = from->alarms().first(); 128 Alarm *a = from->alarms().first();
85 if ( a->enabled() ){ 129 if ( a->enabled() ){
86 if ( !alarms().count() ) 130 if ( !alarms().count() )
87 return false; 131 return false;
88 Alarm *b = alarms().first(); 132 Alarm *b = alarms().first();
89 if( ! b->enabled() ) 133 if( ! b->enabled() )
90 return false; 134 return false;
91 if ( ! (a->offset() == b->offset() )) 135 if ( ! (a->offset() == b->offset() ))
92 return false; 136 return false;
93 } 137 }
94 } 138 }
95 139
96 QStringList cat = categories(); 140 QStringList cat = categories();
97 QStringList catFrom = from->categories(); 141 QStringList catFrom = from->categories();
98 QString nCat; 142 QString nCat;
99 unsigned int iii; 143 unsigned int iii;
100 for ( iii = 0; iii < catFrom.count();++iii ) { 144 for ( iii = 0; iii < catFrom.count();++iii ) {
101 nCat = catFrom[iii]; 145 nCat = catFrom[iii];
102 if ( !nCat.isEmpty() ) 146 if ( !nCat.isEmpty() )
103 if ( !cat.contains( nCat )) { 147 if ( !cat.contains( nCat )) {
104 return false; 148 return false;
105 } 149 }
106 } 150 }
107 if ( from->isCompleted() ) { 151 if ( from->isCompleted() ) {
108 if ( !isCompleted() ) 152 if ( !isCompleted() )
109 return false; 153 return false;
110 } 154 }
111 if( priority() != from->priority() ) 155 if( priority() != from->priority() )
112 return false; 156 return false;
113 157
114 158
115 return true; 159 return true;
116 160
117} 161}
118bool KCal::operator==( const Todo& t1, const Todo& t2 ) 162bool KCal::operator==( const Todo& t1, const Todo& t2 )
119{ 163{
120 164
121 bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 ); 165 bool ret = operator==( (const Incidence&)t1, (const Incidence&)t2 );
122 if ( ! ret ) 166 if ( ! ret )
123 return false; 167 return false;
124 if ( t1.hasDueDate() == t2.hasDueDate() ) { 168 if ( t1.hasDueDate() == t2.hasDueDate() ) {
125 if ( t1.hasDueDate() ) { 169 if ( t1.hasDueDate() ) {
126 if ( t1.doesFloat() == t2.doesFloat() ) { 170 if ( t1.doesFloat() == t2.doesFloat() ) {
127 if ( t1.doesFloat() ) { 171 if ( t1.doesFloat() ) {
128 if ( t1.dtDue().date() != t2.dtDue().date() ) 172 if ( t1.dtDue().date() != t2.dtDue().date() )
129 return false; 173 return false;
130 } else 174 } else
131 if ( t1.dtDue() != t2.dtDue() ) 175 if ( t1.dtDue() != t2.dtDue() )
132 return false; 176 return false;
133 } else 177 } else
134 return false;// float != 178 return false;// float !=
135 } 179 }
136 180
137 } else 181 } else
138 return false; 182 return false;
139 if ( t1.percentComplete() != t2.percentComplete() ) 183 if ( t1.percentComplete() != t2.percentComplete() )
140 return false; 184 return false;
141 if ( t1.isCompleted() ) { 185 if ( t1.isCompleted() ) {
142 if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) { 186 if ( t1.hasCompletedDate() == t2.hasCompletedDate() ) {
143 if ( t1.hasCompletedDate() ) { 187 if ( t1.hasCompletedDate() ) {
144 if ( t1.completed() != t2.completed() ) 188 if ( t1.completed() != t2.completed() )
145 return false; 189 return false;
146 } 190 }
147 191
148 } else 192 } else
149 return false; 193 return false;
150 } 194 }
151 return true; 195 return true;
152 196
153} 197}
154 198
155void Todo::setDtDue(const QDateTime &dtDue) 199void Todo::setDtDue(const QDateTime &dtDue)
156{ 200{
157 //int diffsecs = mDtDue.secsTo(dtDue); 201 //int diffsecs = mDtDue.secsTo(dtDue);
158 202
159 /*if (mReadOnly) return; 203 /*if (mReadOnly) return;
160 const QPtrList<Alarm>& alarms = alarms(); 204 const QPtrList<Alarm>& alarms = alarms();
161 for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) { 205 for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) {
162 if (alarm->enabled()) { 206 if (alarm->enabled()) {
163 alarm->setTime(alarm->time().addSecs(diffsecs)); 207 alarm->setTime(alarm->time().addSecs(diffsecs));
164 } 208 }
165 }*/ 209 }*/
166 mDtDue = getEvenTime(dtDue); 210 mDtDue = getEvenTime(dtDue);
167 211
168 //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl; 212 //kdDebug(5800) << "setDtDue says date is " << mDtDue.toString() << endl;
169 213
170 /*const QPtrList<Alarm>& alarms = alarms(); 214 /*const QPtrList<Alarm>& alarms = alarms();
171 for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next()) 215 for (Alarm* alarm = alarms.first(); alarm; alarm = alarms.next())
172 alarm->setAlarmStart(mDtDue);*/ 216 alarm->setAlarmStart(mDtDue);*/
173 217
174 updated(); 218 updated();
175} 219}
176 220
177QDateTime Todo::dtDue() const 221QDateTime Todo::dtDue() const
178{ 222{
179 return mDtDue; 223 return mDtDue;
180} 224}
181 225
182QString Todo::dtDueTimeStr() const 226QString Todo::dtDueTimeStr() const
183{ 227{
184 return KGlobal::locale()->formatTime(mDtDue.time()); 228 return KGlobal::locale()->formatTime(mDtDue.time());
185} 229}
186 230
187QString Todo::dtDueDateStr(bool shortfmt) const 231QString Todo::dtDueDateStr(bool shortfmt) const
188{ 232{
189 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); 233 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt);
190} 234}
191 235
192QString Todo::dtDueStr(bool shortfmt) const 236QString Todo::dtDueStr(bool shortfmt) const
193{ 237{
194 if ( doesFloat() ) 238 if ( doesFloat() )
195 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); 239 return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt);
196 return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); 240 return KGlobal::locale()->formatDateTime(mDtDue, shortfmt);
197} 241}
198// retval 0 : no found 242// retval 0 : no found
199// 1 : due for date found 243// 1 : due for date found
200// 2 : overdue for date found 244// 2 : overdue for date found
201int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ) 245int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos )
202{ 246{
203 int retval = 0; 247 int retval = 0;
204 if ( isCompleted() ) 248 if ( isCompleted() )
205 return 0; 249 return 0;
206 if ( hasDueDate() ) { 250 if ( hasDueDate() ) {
207 if ( dtDue().date() < date ) 251 if ( dtDue().date() < date )
208 return 2; 252 return 2;
209 // we do not return, because we may find an overdue sub todo 253 // we do not return, because we may find an overdue sub todo
210 if ( dtDue().date() == date ) 254 if ( dtDue().date() == date )
211 retval = 1; 255 retval = 1;
212 } 256 }
213 if ( checkSubtodos ) { 257 if ( checkSubtodos ) {
214 Incidence *aTodo; 258 Incidence *aTodo;
215 for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { 259 for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) {
216 int ret = ((Todo*)aTodo)->hasDueSubTodoForDate( date ,checkSubtodos ); 260 int ret = ((Todo*)aTodo)->hasDueSubTodoForDate( date ,checkSubtodos );
217 if ( ret == 2 ) 261 if ( ret == 2 )
218 return 2; 262 return 2;
219 if ( ret == 1) 263 if ( ret == 1)
220 retval = 1; 264 retval = 1;
221 } 265 }
222 } 266 }
223 return retval; 267 return retval;
224} 268}
225int Todo::hasDueSubTodo( bool checkSubtodos ) //= true 269int Todo::hasDueSubTodo( bool checkSubtodos ) //= true
226{ 270{
227 return hasDueSubTodoForDate(QDate::currentDate(), checkSubtodos ); 271 return hasDueSubTodoForDate(QDate::currentDate(), checkSubtodos );
228} 272}
229bool Todo::hasDueDate() const 273bool Todo::hasDueDate() const
230{ 274{
231 return mHasDueDate; 275 return mHasDueDate;
232} 276}
233 277
234void Todo::setHasDueDate(bool f) 278void Todo::setHasDueDate(bool f)
235{ 279{
236 if (mReadOnly) return; 280 if (mReadOnly) return;
237 mHasDueDate = f; 281 mHasDueDate = f;
238 updated(); 282 updated();
239} 283}
240 284
241 285
242#if 0 286#if 0
243void Todo::setStatus(const QString &statStr) 287void Todo::setStatus(const QString &statStr)
244{ 288{
245 if (mReadOnly) return; 289 if (mReadOnly) return;
246 QString ss(statStr.upper()); 290 QString ss(statStr.upper());
247 291
248 if (ss == "X-ACTION") 292 if (ss == "X-ACTION")
249 mStatus = NEEDS_ACTION; 293 mStatus = NEEDS_ACTION;
250 else if (ss == "NEEDS ACTION") 294 else if (ss == "NEEDS ACTION")
251 mStatus = NEEDS_ACTION; 295 mStatus = NEEDS_ACTION;
252 else if (ss == "ACCEPTED") 296 else if (ss == "ACCEPTED")
253 mStatus = ACCEPTED; 297 mStatus = ACCEPTED;
254 else if (ss == "SENT") 298 else if (ss == "SENT")
255 mStatus = SENT; 299 mStatus = SENT;
256 else if (ss == "TENTATIVE") 300 else if (ss == "TENTATIVE")
257 mStatus = TENTATIVE; 301 mStatus = TENTATIVE;
258 else if (ss == "CONFIRMED") 302 else if (ss == "CONFIRMED")
259 mStatus = CONFIRMED; 303 mStatus = CONFIRMED;
260 else if (ss == "DECLINED") 304 else if (ss == "DECLINED")
261 mStatus = DECLINED; 305 mStatus = DECLINED;
262 else if (ss == "COMPLETED") 306 else if (ss == "COMPLETED")
263 mStatus = COMPLETED; 307 mStatus = COMPLETED;
264 else if (ss == "DELEGATED") 308 else if (ss == "DELEGATED")
265 mStatus = DELEGATED; 309 mStatus = DELEGATED;
266 310
267 updated(); 311 updated();
268} 312}
269 313
270void Todo::setStatus(int status) 314void Todo::setStatus(int status)
271{ 315{
272 if (mReadOnly) return; 316 if (mReadOnly) return;
273 mStatus = status; 317 mStatus = status;
274 updated(); 318 updated();
275} 319}
276 320
277int Todo::status() const 321int Todo::status() const
278{ 322{
279 return mStatus; 323 return mStatus;
280} 324}
281 325
282QString Todo::statusStr() const 326QString Todo::statusStr() const
283{ 327{
284 switch(mStatus) { 328 switch(mStatus) {
285 case NEEDS_ACTION: 329 case NEEDS_ACTION:
286 return QString("NEEDS ACTION"); 330 return QString("NEEDS ACTION");
287 break; 331 break;
288 case ACCEPTED: 332 case ACCEPTED:
289 return QString("ACCEPTED"); 333 return QString("ACCEPTED");
290 break; 334 break;
291 case SENT: 335 case SENT:
292 return QString("SENT"); 336 return QString("SENT");
293 break; 337 break;
294 case TENTATIVE: 338 case TENTATIVE:
295 return QString("TENTATIVE"); 339 return QString("TENTATIVE");
296 break; 340 break;
297 case CONFIRMED: 341 case CONFIRMED:
298 return QString("CONFIRMED"); 342 return QString("CONFIRMED");
299 break; 343 break;
300 case DECLINED: 344 case DECLINED:
301 return QString("DECLINED"); 345 return QString("DECLINED");
302 break; 346 break;
303 case COMPLETED: 347 case COMPLETED:
304 return QString("COMPLETED"); 348 return QString("COMPLETED");
305 break; 349 break;
306 case DELEGATED: 350 case DELEGATED:
307 return QString("DELEGATED"); 351 return QString("DELEGATED");
308 break; 352 break;
309 } 353 }
310 return QString(""); 354 return QString("");
311} 355}
312#endif 356#endif
313 357
314bool Todo::isCompleted() const 358bool Todo::isCompleted() const
315{ 359{
316 if (mPercentComplete == 100) { 360 if (mPercentComplete == 100) {
317 return true; 361 return true;
318 } 362 }
319 else return false; 363 else return false;
320} 364}
321 365
322void Todo::setCompleted(bool completed) 366void Todo::setCompleted(bool completed)
323{ 367{
324 if ( mHasRecurrenceID && completed && mPercentComplete != 100 ) { 368 if ( mHasRecurrenceID && completed && mPercentComplete != 100 ) {
325 if ( !setRecurDates() ) 369 if ( !setRecurDates() )
326 completed = false; 370 completed = false;
327 } 371 }
328 if (completed) mPercentComplete = 100; 372 if (completed) mPercentComplete = 100;
329 else { 373 else {
330 mPercentComplete = 0; 374 mPercentComplete = 0;
331 mHasCompletedDate = false; 375 mHasCompletedDate = false;
332 } 376 }
333 updated(); 377 updated();
334} 378}
335 379
336QDateTime Todo::completed() const 380QDateTime Todo::completed() const
337{ 381{
338 return mCompleted; 382 return mCompleted;
339} 383}
340 384
341QString Todo::completedStr( bool shortF ) const 385QString Todo::completedStr( bool shortF ) const
342{ 386{
343 return KGlobal::locale()->formatDateTime(mCompleted, shortF); 387 return KGlobal::locale()->formatDateTime(mCompleted, shortF);
344} 388}
345 389
346void Todo::setCompleted(const QDateTime &completed) 390void Todo::setCompleted(const QDateTime &completed)
347{ 391{
348 //qDebug("Todo::setCompleted "); 392 //qDebug("Todo::setCompleted ");
349 if ( mHasCompletedDate ) { 393 if ( mHasCompletedDate ) {
350 // qDebug("has completed data - return "); 394 // qDebug("has completed data - return ");
351 return; 395 return;
352 } 396 }
353 mHasCompletedDate = true; 397 mHasCompletedDate = true;
354 mPercentComplete = 100; 398 mPercentComplete = 100;
355 mCompleted = getEvenTime(completed); 399 mCompleted = getEvenTime(completed);
356 updated(); 400 updated();
357} 401}
358 402
359bool Todo::hasCompletedDate() const 403bool Todo::hasCompletedDate() const
360{ 404{
361 return mHasCompletedDate; 405 return mHasCompletedDate;
362} 406}
363 407
364int Todo::percentComplete() const 408int Todo::percentComplete() const
365{ 409{
366 return mPercentComplete; 410 return mPercentComplete;
367} 411}
368bool Todo::setRecurDates() 412bool Todo::setRecurDates()
369{ 413{
370 if ( !mHasRecurrenceID ) 414 if ( !mHasRecurrenceID )
371 return true; 415 return true;
372 int secs = mDtStart.secsTo( dtDue() ); 416 int secs = mDtStart.secsTo( dtDue() );
373 bool ok; 417 bool ok;
374 qDebug("T:setRecurDates() "); 418 qDebug("T:setRecurDates() ");
375 //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); 419 //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() );
376 QDateTime next = getNextOccurence( mRecurrenceID, &ok ); 420 QDateTime next = getNextOccurence( mRecurrenceID, &ok );
377 if ( ok ) { 421 if ( ok ) {
378 mRecurrenceID = next; 422 mRecurrenceID = next;
379 mDtStart = next; 423 mDtStart = next;
380 setDtDue( next.addSecs( secs ) ); 424 setDtDue( next.addSecs( secs ) );
381 if ( QDateTime::currentDateTime() > next) 425 if ( QDateTime::currentDateTime() > next)
382 return false; 426 return false;
383 } else { 427 } else {
384 setHasRecurrenceID( false ); 428 setHasRecurrenceID( false );
385 recurrence()->unsetRecurs(); 429 recurrence()->unsetRecurs();
386 } 430 }
387 return true; 431 return true;
388} 432}
389void Todo::setPercentComplete(int v) 433void Todo::setPercentComplete(int v)
390{ 434{
391 if ( mHasRecurrenceID && v == 100 && mPercentComplete != 100 ) { 435 if ( mHasRecurrenceID && v == 100 && mPercentComplete != 100 ) {
392 if ( !setRecurDates() ) 436 if ( !setRecurDates() )
393 v = 0; 437 v = 0;
394 } 438 }
395 mPercentComplete = v; 439 mPercentComplete = v;
396 if ( v != 100 ) 440 if ( v != 100 )
397 mHasCompletedDate = false; 441 mHasCompletedDate = false;
398 updated(); 442 updated();
399} 443}
400QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const 444QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const
401{ 445{
402 if ( isCompleted() || ! hasDueDate() || cancelled() ) { 446 if ( isCompleted() || ! hasDueDate() || cancelled() ) {
403 *ok = false; 447 *ok = false;
404 return QDateTime (); 448 return QDateTime ();
405 } 449 }
406 QDateTime incidenceStart; 450 QDateTime incidenceStart;
407 incidenceStart = dtDue(); 451 incidenceStart = dtDue();
408 bool enabled = false; 452 bool enabled = false;
409 Alarm* alarm; 453 Alarm* alarm;
410 int off = 0; 454 int off = 0;
411 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; 455 QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );;
412 // if ( QDateTime::currentDateTime() > incidenceStart ){ 456 // if ( QDateTime::currentDateTime() > incidenceStart ){
413// *ok = false; 457// *ok = false;
414// return incidenceStart; 458// return incidenceStart;
415// } 459// }
416 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 460 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
417 if (alarm->enabled()) { 461 if (alarm->enabled()) {
418 if ( alarm->hasTime () ) { 462 if ( alarm->hasTime () ) {
419 if ( alarm->time() < alarmStart ) { 463 if ( alarm->time() < alarmStart ) {
420 alarmStart = alarm->time(); 464 alarmStart = alarm->time();
421 enabled = true; 465 enabled = true;
422 off = alarmStart.secsTo( incidenceStart ); 466 off = alarmStart.secsTo( incidenceStart );
423 } 467 }
424 468
425 } else { 469 } else {
426 int secs = alarm->startOffset().asSeconds(); 470 int secs = alarm->startOffset().asSeconds();
427 if ( incidenceStart.addSecs( secs ) < alarmStart ) { 471 if ( incidenceStart.addSecs( secs ) < alarmStart ) {
428 alarmStart = incidenceStart.addSecs( secs ); 472 alarmStart = incidenceStart.addSecs( secs );
429 enabled = true; 473 enabled = true;
430 off = -secs; 474 off = -secs;
431 } 475 }
432 } 476 }
433 } 477 }
434 } 478 }
435 if ( enabled ) { 479 if ( enabled ) {
436 if ( alarmStart > QDateTime::currentDateTime() ) { 480 if ( alarmStart > QDateTime::currentDateTime() ) {
437 *ok = true; 481 *ok = true;
438 * offset = off; 482 * offset = off;
439 return alarmStart; 483 return alarmStart;
440 } 484 }
441 } 485 }
442 *ok = false; 486 *ok = false;
443 return QDateTime (); 487 return QDateTime ();
444 488
445} 489}
446 490
447void Todo::checkSetCompletedFalse() 491void Todo::checkSetCompletedFalse()
448{ 492{
449 if ( !hasRecurrenceID() ) { 493 if ( !hasRecurrenceID() ) {
450 qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); 494 qDebug("ERROR 1 in Todo::checkSetCompletedFalse");
451 } 495 }
452 // qDebug("Todo::checkSetCompletedFalse()"); 496 // qDebug("Todo::checkSetCompletedFalse()");
453 //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); 497 //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() );
454 if ( mPercentComplete == 100 && mDtStart == mRecurrenceID && QDateTime::currentDateTime() > mDtStart) { 498 if ( mPercentComplete == 100 && mDtStart == mRecurrenceID && QDateTime::currentDateTime() > mDtStart) {
455 qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); 499 qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() );
456 setCompleted( false ); 500 setCompleted( false );
457 qDebug("Todo::checkSetCompletedFalse "); 501 qDebug("Todo::checkSetCompletedFalse ");
458 } 502 }
459} 503}
diff --git a/libkcal/todo.h b/libkcal/todo.h
index a22d4b7..fe43357 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -1,136 +1,148 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20#ifndef TODO_H 20#ifndef TODO_H
21#define TODO_H 21#define TODO_H
22// 22//
23// Todo component, representing a VTODO object 23// Todo component, representing a VTODO object
24// 24//
25 25
26#include "incidence.h" 26#include "incidence.h"
27 27
28#include <qtimer.h>
29
28namespace KCal { 30namespace KCal {
29 31
30/** 32/**
31 This class provides a Todo in the sense of RFC2445. 33 This class provides a Todo in the sense of RFC2445.
32*/ 34*/
33class Todo : public Incidence 35 class Todo : public QObject,public Incidence
34{ 36{
37 Q_OBJECT
35 public: 38 public:
36 Todo(); 39 Todo();
37 Todo(const Todo &); 40 Todo(const Todo &);
38 ~Todo(); 41 ~Todo();
39 typedef ListBase<Todo> List; 42 typedef ListBase<Todo> List;
40 QCString type() const { return "Todo"; } 43 QCString type() const { return "Todo"; }
41 44
42 /** Return an exact copy of this todo. */ 45 /** Return an exact copy of this todo. */
43 Incidence *clone(); 46 Incidence *clone();
44 QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; 47 QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const;
45 48
46 /** for setting the todo's due date/time with a QDateTime. */ 49 /** for setting the todo's due date/time with a QDateTime. */
47 void setDtDue(const QDateTime &dtDue); 50 void setDtDue(const QDateTime &dtDue);
48 /** returns an event's Due date/time as a QDateTime. */ 51 /** returns an event's Due date/time as a QDateTime. */
49 QDateTime dtDue() const; 52 QDateTime dtDue() const;
50 /** returns an event's due time as a string formatted according to the 53 /** returns an event's due time as a string formatted according to the
51 users locale settings */ 54 users locale settings */
52 QString dtDueTimeStr() const; 55 QString dtDueTimeStr() const;
53 /** returns an event's due date as a string formatted according to the 56 /** returns an event's due date as a string formatted according to the
54 users locale settings */ 57 users locale settings */
55 QString dtDueDateStr(bool shortfmt=true) const; 58 QString dtDueDateStr(bool shortfmt=true) const;
56 /** returns an event's due date and time as a string formatted according 59 /** returns an event's due date and time as a string formatted according
57 to the users locale settings */ 60 to the users locale settings */
58 QString dtDueStr(bool shortfmt=true) const; 61 QString dtDueStr(bool shortfmt=true) const;
59 62
60 /** returns TRUE or FALSE depending on whether the todo has a due date */ 63 /** returns TRUE or FALSE depending on whether the todo has a due date */
61 bool hasDueDate() const; 64 bool hasDueDate() const;
62 /** sets the event's hasDueDate value. */ 65 /** sets the event's hasDueDate value. */
63 void setHasDueDate(bool f); 66 void setHasDueDate(bool f);
64 67
65 /* 68 /*
66 Looks for a subtodo (including itself ) which is not complete and is 69 Looks for a subtodo (including itself ) which is not complete and is
67 - overdue, or 70 - overdue, or
68 - due today. 71 - due today.
69 It returns 0 for nothing found, 72 It returns 0 for nothing found,
70 1 for found a todo which is due today and no overdue found 73 1 for found a todo which is due today and no overdue found
71 2 for found a overdue todo 74 2 for found a overdue todo
72 */ 75 */
73 int hasDueSubTodo( bool checkSubtodos = true ); 76 int hasDueSubTodo( bool checkSubtodos = true );
74 /* same as above, but a specific date can be specified*/ 77 /* same as above, but a specific date can be specified*/
75 int hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ); 78 int hasDueSubTodoForDate( const QDate & date, bool checkSubtodos );
76 79
77 80
78 /** sets the event's status to the string specified. The string 81 /** sets the event's status to the string specified. The string
79 * must be a recognized value for the status field, i.e. a string 82 * must be a recognized value for the status field, i.e. a string
80 * equivalent of the possible status enumerations previously described. */ 83 * equivalent of the possible status enumerations previously described. */
81// void setStatus(const QString &statStr); 84// void setStatus(const QString &statStr);
82 /** sets the event's status to the value specified. See the enumeration 85 /** sets the event's status to the value specified. See the enumeration
83 * above for possible values. */ 86 * above for possible values. */
84// void setStatus(int); 87// void setStatus(int);
85 /** return the event's status. */ 88 /** return the event's status. */
86// int status() const; 89// int status() const;
87 /** return the event's status in string format. */ 90 /** return the event's status in string format. */
88// QString statusStr() const; 91// QString statusStr() const;
89 92
90 /** return, if this todo is completed */ 93 /** return, if this todo is completed */
91 bool isCompleted() const; 94 bool isCompleted() const;
92 /** set completed state of this todo */ 95 /** set completed state of this todo */
93 void setCompleted(bool); 96 void setCompleted(bool);
94 97
95 /** 98 /**
96 Return how many percent of the task are completed. Returns a value 99 Return how many percent of the task are completed. Returns a value
97 between 0 and 100. 100 between 0 and 100.
98 */ 101 */
99 int percentComplete() const; 102 int percentComplete() const;
100 /** 103 /**
101 Set how many percent of the task are completed. Valid values are in the 104 Set how many percent of the task are completed. Valid values are in the
102 range from 0 to 100. 105 range from 0 to 100.
103 */ 106 */
104 void setPercentComplete(int); 107 void setPercentComplete(int);
105 108
106 /** return date and time when todo was completed */ 109 /** return date and time when todo was completed */
107 QDateTime completed() const; 110 QDateTime completed() const;
108 QString completedStr(bool shortF = true) const; 111 QString completedStr(bool shortF = true) const;
109 /** set date and time of completion */ 112 /** set date and time of completion */
110 void setCompleted(const QDateTime &completed); 113 void setCompleted(const QDateTime &completed);
111 114
112 /** Return true, if todo has a date associated with completion */ 115 /** Return true, if todo has a date associated with completion */
113 bool hasCompletedDate() const; 116 bool hasCompletedDate() const;
114 bool contains ( Todo*); 117 bool contains ( Todo*);
115 void checkSetCompletedFalse(); 118 void checkSetCompletedFalse();
116 bool setRecurDates(); 119 bool setRecurDates();
117 120 bool isRunning() {return mRunning;}
121 bool hasRunningSub();
122 void setRunning( bool );
123 int runTime();
124 QDateTime runStart () const { return mRunStart;}
125 public slots:
126 void saveRunningInfoToFile();
118 private: 127 private:
128 bool mRunning;
129 QTimer * mRunSaveTimer;
130 QDateTime mRunStart;
119 bool accept(Visitor &v) { return v.visit(this); } 131 bool accept(Visitor &v) { return v.visit(this); }
120 132
121 QDateTime mDtDue; // due date of todo 133 QDateTime mDtDue; // due date of todo
122 134
123 bool mHasDueDate; // if todo has associated due date 135 bool mHasDueDate; // if todo has associated due date
124 136
125// int mStatus; // confirmed/delegated/tentative/etc 137// int mStatus; // confirmed/delegated/tentative/etc
126 138
127 QDateTime mCompleted; 139 QDateTime mCompleted;
128 bool mHasCompletedDate; 140 bool mHasCompletedDate;
129 141
130 int mPercentComplete; 142 int mPercentComplete;
131}; 143};
132 144
133 bool operator==( const Todo&, const Todo& ); 145 bool operator==( const Todo&, const Todo& );
134} 146}
135 147
136#endif 148#endif