-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | bin/kdepim/korganizer/today_small.png | bin | 797 -> 827 bytes | |||
-rw-r--r-- | korganizer/kotodoview.cpp | 12 |
3 files changed, 9 insertions, 5 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index cb92677..bcc23dc 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1,189 +1,188 @@ { "10 minutes","10 Minuten" }, { "10th","10." }, { "11th","11." }, { "12 pm Format","12 AM/PM Format" }, { "12th","12." }, { "13th","13." }, { "14th","14." }, { "15th","15." }, { "16th","16." }, { "17th","17." }, { "18th","18." }, { "19th","19." }, { "1 Day","1 Tag" }, { "1 h","1 Std" }, { "1 (high)","1 (hoch)" }, { "5 (low)","5" }, { "1st","1." }, { "20th","20." }, { "21st","21." }, { "22nd","22." }, { "23rd","23." }, { "24:00 Hour Format","24:00 Stunden Format" }, { "24th","24." }, { "25th","25." }, { "26th","26." }, { "27th","27." }, { "28th","28." }, { "29th","29." }, { "2nd","2." }, { "30 minutes","30 Minuten" }, { "30th","30." }, { "31st","31." }, { "3rd","3." }, { "4th","4." }, { "5 (lowest)","5 (Niedrigster)" }, { "5th","5." }, { "6th","6." }, { "7th","7." }, { "8th","8." }, { "9th","9." }, { "About...","Über..." }, { "&Accept","&Akzeptieren" }, { "Accept","Akzeptieren" }, { "Accept A&ll","A&lles Akzepieren" }, { "Access:","Zugriff:" }, { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, { "Action","Aktion" }, { "Add Filter","Filter Hinzufügen" }, { "&Add","Hinzufügen" }, { "Add","Hinzufügen" }, { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, { "Additional email address:","Zusätzliche E-Mail Adresse:" }, { "&Addressbook","&Adressbuch" }, { "Address &Book...","Adress&buch..." }, { "Agenda Size","Agende Größe" }, { "Agenda Size:","Größe der Agenda:" }, { "Agenda view:","Agenda Ansicht:" }, { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, { "All attendees","Alle Teilnehmer" }, { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, { "All day event","Ganztägig" }, { "Anonymous","Anonym" }, { "Apply","Anwenden" }, { "Apr","Apr" }, { "April","April" }, {"Ask for every entry on conflict","Frage bei Konflikten nach"}, { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, { "Attendees","Teilnehmer" }, { "Aug","Aug" }, { "August","August" }, { "Auto-Save","Automatisches Abspeichern" }, { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, { "Auto saving...","Automatische Sicherung..." }, { "Begin on:","Starte mit:" }, { "Begins on: %1","Starte mit: %1" }, { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, { "<b>On:</b> %1","<b>Am:</b> %1" }, { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, { "Busy","Belegt" }, { "&Cancel","Abbre&chen" }, { "Cancel","Abbrechen" }, { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, { "Categories...","Kategorien..." }, { "Categories","Kategorien" }, { "Category","Kategorie" }, { "Center View","Zentriere Ansicht" }, { "Change","Ändere" }, { "Cinema","Kino" }, -{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, { "Clone Item","Klone Eintrag" }, { "&Close","S&chließen" }, { "Close","Schließen" }, { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, { "Colors","Farben" }, { "completed","erledigt" }, { "completed on %1","erledigt am %1" }, { "Complete","Erledigt" }, { "Confidential","Vertraulich" }, { "Configure...","Einstellungen..." }, { "Confirm &deletes","Löschvogang bestätigen" }, { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, { "Counter-event Viewer","Terminzähler Ansicht" }, { "Daily ending hour:","Feierabend:" }, { "Daily starting hour:","Anfangszeit:" }, { "Daily","Täglich" }, { "Date Format","Datums Format" }, { "Date Format:","Datums Format:" }, { "DateNavigator:(nr)","Datums Navigator" }, { "Dates: ","Datum: " }, { "Date && Time","Datum && Zeit" }, { "Day begins at:","Der Tag beginnt um:" }, { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, { "Days in What's Next:","Tage in What's Next:" }, { "day(s)","Tag(e)" }, { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, { "day","Tag" }, { "Dec","Dez" }, { "December","Dezember" }, { "Default alarm time:","Standard Alarmzeit:" }, { "Default appointment time:","Standard Termin Startzeit:" }, { "Default event color:","Standard Terminfarbe:" }, { "Default","Standard" }, { "Def. duration of new app.:","Standard Termin Länge:" }, { "Delete All","Lösche alles" }, { "Delete all selected","Lösche alle Selektierten" }, { "Delete Current","Aktuellen löschen" }, { "Delete Event...","Lösche Termin..." }, { "Delete Event","Lösche Termin" }, { "&Delete...","Lösche..." }, { "Delete...","Lösche..." }, { "Delete","Lösche" }, { "Delete Todo...","Lösche Todo..." }, { "Delete To-Do","Lösche Todo" }, { "Deleting item %d ...","Lösche Eintrag %d..." }, { "Descriptions","Beschreibungen" }, { "Deselect all","Deselektiere Alle" }, { "Details","Details" }, { "Dinner","Abendessen" }, { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, { "Due Date","Fällig am" }, { "Due: ","Fällig: "}, { "Due Time","Fällig um" }, { "Due:","Fällig:"}, { "Duration: ","Dauer: " }, { "Edit...","Bearbeite..." }, { "Edit Event...","Bearbeite Termin..." }, { "Edit Event","Bearbeite Termin" }, { "Edit exceptions","Bearbeite Ausnahmen" }, { "EditorBox:","Editor Fenster:" }, { "Edit Recurrence Range","Bearbeite Wiederholung" }, { "Edit Todo...","Berabeite Todo..." }, { "Edit To-Do","Todo bearbeiten" }, { "E&mail address:","E&mail Adresse:" }, { "(EmptyEmail)","(KeineEmail)" }, { "(EmptyName)","(KeinName)" }, { "Enable Recurrence","Wiederholung anschalten" }, { "End after","Endet nach"}, { "End by:","Endet am"}, { "End Date","End Datum" }, { "End:","Ende:" }, { "End Time","End Zeit" }, { "English","Englisch" }, { "Event","Termin" }, { "Event list","Termin Liste" }, { "Events","Termine" }, { "Event Viewer:","Termin Übersicht:" }, { "every","jede" }, { "Exceptions...","Ausnahmen..." }, { "Exceptions","Ausnahmen" }, { "Exclude holidays","Ohne freie Tage" }, { "Exclude Saturdays","Ohne Samstage" }, { "Feb","Feb" }, { "February","Februar" }, { "&Find","Suche!" }, { "Fonts","Schriftart" }, { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, { "Free","Frei" }, { "Friday","Freitag" }, { "Fri","Fr" }, { "From:","Vom:" }, { "Full &name:","Vor- und &Nachname:" }, { "General","Allgemein" }, { "German","Deutsch" }, { "Gifts","Geschenke" }, @@ -1401,106 +1400,107 @@ { "Add new Calendar","Füge Kalender hinzu" }, { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, { "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, { "Global application font for all apps:","Globale Schriftart:" }, { "Application Font","Applikationsschriftart" }, { "Kx/Pi","Kx/Pi" }, { "Backup","Backup" }, { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, { "Choose Color","Wähle Farbe" }, { " OK "," OK " }, { " Cancel "," Abbrechen " }, { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, { "Search on displayed list only","Suche auf der dargestellten Liste" }, { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, { "%1\nis running!","%1\nist am Laufen!" }, { "Additional Comment:","Zusätzlicher Kommentar:" }, { "Stop and save","Stopp und Speichern" }, { "Continue running","Weiter laufen lassen" }, { "Stop - do not save","Stopp - nicht Speichern" }, { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, { "Time mismatch!","Zeiten stimmen nicht!" }, { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, { "Yes, stop todo","Ja, stoppe Todo" }, { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, { "Spouse","Ehegatte" }, { "Notes","Notizen" }, { "Messanger","Messanger" }, { "Assistant","Assistent" }, { "Manager","Manager" }, { "Secrecy","Sichtbar" }, { "male","männlich" }, { "female","weiblich" }, { "Hide!","Verbergen!" }, { "Show!","Anzeigen!" }, { "Details","Details" }, { "Profession","Beruf" }, { "Children","Kinder" }, { "Department","Abteilung" }, { "Backup cancelled","Backup abgebrochen" }, { "Backup globally disabled","Backup global abgeschaltet" }, { "Backup succesfully finished","Backup erfolgreich beendet" }, { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, { "Birthdays","Geburtstage" }, { "KO/Pi import information!","KO/Pi Import Information!" }, { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, { "Reload","Neu laden" }, { "Timezone settings","Zeitzoneneinstellung" }, { "Title: ","Titel: " }, { "Journal from: ","Journal vom: " }, { "Journal: %1 from ","Journal: %1 vom " }, { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, { "Selected Item","Ausgewähltes Item" }, { "Select Date...","Wähle Datum..." }, { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, { "Change category list now!","Ändere Kategorieliste jetzt!" }, { "Edit category list...","Ändere Kategorieliste..." }, { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, { "Filepath: ","Dateipfad: " }, { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, { "Pending Suspend Alarm","Laufender Suspend Alarm" }, { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, { "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, { "Alarm Options","Alarm Einstellungen" }, { "Delete selected...","Lösche Ausgewählte..." }, { "None","Nichts" }, { "Selection","Auswahl" }, { "Set categories","Setze Kategorien" }, { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, { "Reset","Neu setzen" }, { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, { "Edit","Edit" }, { "Last Modified","Zuletzt geändert" }, { "Journal viewer","Journal Anzeige" }, { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, { "Hide Completed","Verstecke erledigte Todos" }, { "Show not Running","Zeige nicht Laufende" }, +{ "Click to add new Todo","Klick für neues Todo!" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, diff --git a/bin/kdepim/korganizer/today_small.png b/bin/kdepim/korganizer/today_small.png Binary files differindex fcc4ac2..3d2979f 100644 --- a/bin/kdepim/korganizer/today_small.png +++ b/bin/kdepim/korganizer/today_small.png diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 06d40b1..2c017e1 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -383,243 +383,247 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) } else { if ( !internalDrop ) { qDebug("Dnd: External Copy"); } else qDebug("DnD: Internal copy: Copy pending"); } } } #endif } void KOTodoListView::keyReleaseEvent ( QKeyEvent *e ) { if ( !e->isAutoRepeat() ) { mFlagKeyPressed = false; } } void KOTodoListView::keyPressEvent ( QKeyEvent * e ) { qApp->processEvents(); if ( e->isAutoRepeat() && !mFlagKeyPressed ) { e->ignore(); // qDebug(" ignore %d",e->isAutoRepeat() ); return; } if (! e->isAutoRepeat() ) mFlagKeyPressed = true; QListViewItem* cn; if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { cn = currentItem(); if ( cn ) { KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); if ( ci ){ if ( e->state() == ShiftButton ) ci->setOn( false ); else ci->setOn( true ); cn = cn->itemBelow(); if ( cn ) { setCurrentItem ( cn ); ensureItemVisible ( cn ); } } } return; } if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { switch ( e->key() ) { case Qt::Key_Down: case Qt::Key_Up: QListView::keyPressEvent ( e ); break; case Qt::Key_Left: case Qt::Key_Right: QListView::keyPressEvent ( e ); e->accept(); return; break; default: e->ignore(); break; } return; } e->ignore(); } void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) { QListView::contentsMouseReleaseEvent(e); mMousePressed = false; } void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) { if (!e) return; QPoint vp = contentsToViewport(e->pos()); QListViewItem *item = itemAt(vp); emit double_Clicked(item); if (!item) return; emit doubleClicked(item,vp,0); } ///////////////////////////////////////////////////////////////////////////// KOQuickTodo::KOQuickTodo(QWidget *parent) : QLineEdit(parent) { - setText(i18n("Click to add a new Todo")); + setText(i18n("Click to add new Todo")); } void KOQuickTodo::focusInEvent(QFocusEvent *ev) { - if ( text()==i18n("Click to add a new Todo") ) + if ( text()==i18n("Click to add new Todo") ) setText(""); QLineEdit::focusInEvent(ev); } void KOQuickTodo::focusOutEvent(QFocusEvent *ev) { - setText(i18n("Click to add a new Todo")); + setText(i18n("Click to add new Todo")); QLineEdit::focusOutEvent(ev); } ///////////////////////////////////////////////////////////////////////////// KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : KOrg::BaseView(calendar,parent,name) { mCategoryPopupMenu = 0; mPendingUpdateBeforeRepaint = false; isFlatDisplay = false; mNavigator = 0; QBoxLayout *topLayout = new QVBoxLayout(this); mName = QString ( name ); mBlockUpdate = false; mQuickBar = new QWidget( this ); topLayout->addWidget(mQuickBar); mQuickAdd = new KOQuickTodo(mQuickBar); QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); quickLayout->addWidget( mQuickAdd ); QPushButton * flat = new QPushButton( "F",mQuickBar ); int fixwid = flat->sizeHint().height(); if ( QApplication::desktop()->width() > 320 ) fixwid *= 2; flat->setFixedWidth( fixwid ); connect ( flat, SIGNAL ( clicked()), SLOT ( setAllFlat())); QPushButton * allopen = new QPushButton( "O",mQuickBar ); allopen->setFixedWidth( fixwid ); connect ( allopen, SIGNAL ( clicked()), SLOT ( setAllOpen())); QPushButton * allclose = new QPushButton( "C",mQuickBar ); allclose->setFixedWidth( fixwid ); connect ( allclose, SIGNAL ( clicked()), SLOT ( setAllClose())); QPushButton * s_done = new QPushButton( "D",mQuickBar ); + s_done->setPixmap( SmallIcon("greenhook16")); s_done->setFixedWidth( fixwid ); + s_done->setFixedHeight( flat->sizeHint().height() ); connect ( s_done, SIGNAL ( clicked()), SLOT ( toggleCompleted())); QPushButton * s_run = new QPushButton( "R",mQuickBar ); + s_run->setPixmap( SmallIcon("ko16old")); s_run->setFixedWidth( fixwid ); + s_run->setFixedHeight( flat->sizeHint().height() ); connect ( s_run, SIGNAL ( clicked()), SLOT ( toggleRunning())); mNewSubBut = new QPushButton( "sub",mQuickBar ); mNewSubBut->setFixedWidth( fixwid*3/2 ); connect ( mNewSubBut, SIGNAL ( clicked()), SLOT ( newSubTodo())); mNewSubBut->setEnabled( false ); quickLayout->addWidget( mNewSubBut ); quickLayout->addWidget( s_done ); quickLayout->addWidget( s_run ); quickLayout->addWidget( allopen ); quickLayout->addWidget( allclose ); quickLayout->addWidget( flat ); if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickBar->hide(); mTodoListView = new KOTodoListView(calendar,this, name ); topLayout->addWidget(mTodoListView); //mTodoListView->header()->setMaximumHeight(30); mTodoListView->setRootIsDecorated(true); mTodoListView->setAllColumnsShowFocus(true); mTodoListView->setShowSortIndicator(true); mTodoListView->addColumn(i18n("Todo")); mTodoListView->addColumn(i18n("Prio")); mTodoListView->setColumnAlignment(1,AlignHCenter); mTodoListView->addColumn(i18n("Complete")); mTodoListView->setColumnAlignment(2,AlignCenter); mTodoListView->addColumn(i18n("Due Date")); mTodoListView->setColumnAlignment(3,AlignLeft); mTodoListView->addColumn(i18n("Due Time")); mTodoListView->setColumnAlignment(4,AlignHCenter); mTodoListView->addColumn(i18n("Start Date")); mTodoListView->setColumnAlignment(5,AlignLeft); mTodoListView->addColumn(i18n("Start Time")); mTodoListView->setColumnAlignment(6,AlignHCenter); mTodoListView->addColumn(i18n("Cancelled")); mTodoListView->addColumn(i18n("Categories")); mTodoListView->addColumn(i18n("Calendar")); #if 0 mTodoListView->addColumn(i18n("Sort Id")); mTodoListView->setColumnAlignment(4,AlignHCenter); #endif mTodoListView->setMinimumHeight( 60 ); mTodoListView->setItemsRenameable( true ); mTodoListView->setRenameable( 0 ); mTodoListView->setColumnWidth( 0, 120 ); int iii = 0; for ( iii = 0; iii< 10 ; ++iii ) mTodoListView->setColumnWidthMode( iii, QListView::Manual ); mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); mPriorityPopupMenu = new QPopupMenu(this); for (int i = 1; i <= 5; i++) { QString label = QString ("%1").arg (i); mPriority[mPriorityPopupMenu->insertItem (label)] = i; } connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); mPercentageCompletedPopupMenu = new QPopupMenu(this); for (int i = 0; i <= 100; i+=20) { QString label = QString ("%1 %").arg (i); mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; } connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); mCategoryPopupMenu = new QPopupMenu (this); mCategoryPopupMenu->setCheckable (true); connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); mCalPopupMenu = new QPopupMenu (this); mCalPopupMenu->setCheckable (true); connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ())); mItemPopupMenu = new QPopupMenu(this); mItemPopupMenu->insertItem(i18n("Show"), this, SLOT (showTodo())); mItemPopupMenu->insertItem(i18n("Edit..."), this, SLOT (editTodo())); mItemPopupMenu->insertItem( i18n("Delete..."), this, SLOT (deleteTodo())); mItemPopupMenu->insertItem( i18n("Clone..."), this, SLOT (cloneTodo())); @@ -1025,193 +1029,193 @@ KOTodoView::insertTodoItem(Todo *todo) return mTodoMap.insert(todo,todoItem); } } void KOTodoView::updateConfig() { updateView(); mTodoListView->repaintContents(); } QPtrList<Incidence> KOTodoView::selectedIncidences() { QPtrList<Incidence> selected; KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); // if (!item) item = mActiveItem; if (item) selected.append(item->todo()); return selected; } QPtrList<Todo> KOTodoView::selectedTodos() { QPtrList<Todo> selected; KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); // if (!item) item = mActiveItem; if (item) selected.append(item->todo()); return selected; } void KOTodoView::changeEventDisplay(Event *, int) { updateView(); } void KOTodoView::showDates(const QDate &, const QDate &) { } void KOTodoView::showEvents(QPtrList<Event>) { kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; } void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td) { #ifndef KORG_NOPRINTER calPrinter->preview(CalPrinter::Todolist, fd, td); #endif } void KOTodoView::editItem(QListViewItem *item ) { emit editTodoSignal(((KOTodoViewItem *)item)->todo()); } void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) { emit showTodoSignal(((KOTodoViewItem *)item)->todo()); } void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) { pendingSubtodo = 0; mActiveItem = (KOTodoViewItem *)item; if (item) { switch (column){ case 1: mPriorityPopupMenu->popup(QCursor::pos ()); break; case 2: mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; case 3: moveTodo(); break; case 8: mCategoryPopupMenu->popup(QCursor::pos ()); break; case 9: mCalPopupMenu->popup(QCursor::pos ()); break; default: mItemPopupMenu->popup(QCursor::pos()); } } else mPopupMenu->popup(QCursor::pos()); } void KOTodoView::newTodo() { emit newTodoSignal(); } void KOTodoView::newSubTodo() { mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); if (mActiveItem) { - if ( mQuickAdd->isVisible() && !mQuickAdd->text().isEmpty() && mQuickAdd->text() != i18n("Click to add a new Todo") ) { + if ( mQuickAdd->isVisible() && !mQuickAdd->text().isEmpty() && mQuickAdd->text() != i18n("Click to add new Todo") ) { addQuickTodoPar( mActiveItem->todo()); } else emit newSubTodoSignal(mActiveItem->todo()); } } void KOTodoView::unparentTodo() { if (mActiveItem) { emit unparentTodoSignal(mActiveItem->todo()); } } void KOTodoView::reparentTodo() { if (mActiveItem) { topLevelWidget()->setCaption(i18n("Click on new parent item")); pendingSubtodo = mActiveItem; } } void KOTodoView::editTodo() { if (mActiveItem) { emit editTodoSignal(mActiveItem->todo()); } } void KOTodoView::cloneTodo() { if (mActiveItem) { emit cloneTodoSignal((Incidence*)mActiveItem->todo()); } } void KOTodoView::cancelTodo() { if (mActiveItem) { emit cancelTodoSignal((Incidence*)mActiveItem->todo()); } } void KOTodoView::moveTodo() { if (mActiveItem) { emit moveTodoSignal((Incidence*)mActiveItem->todo()); } } void KOTodoView::beamTodo() { if (mActiveItem) { emit beamTodoSignal((Incidence*)mActiveItem->todo()); } } void KOTodoView::showTodo() { if (mActiveItem) { emit showTodoSignal(mActiveItem->todo()); } } void KOTodoView::deleteTodo() { if (mActiveItem) { emit deleteTodoSignal(mActiveItem->todo()); } } void KOTodoView::setNewPriority(int index) { if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { mActiveItem->todo()->setPriority(mPriority[index]); mActiveItem->construct(); todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); } processSelectionChange(); } void KOTodoView::setNewPercentage(int index) { if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) { mActiveItem->setOn( true ); processSelectionChange(); return; } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) { KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); if ( par && par->isOn() ) par->setOn( false ); } if (mPercentage[index] == 100) { mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); } else { mActiveItem->todo()->setCompleted(false); } mActiveItem->todo()->setPercentComplete(mPercentage[index]); mActiveItem->construct(); |