author | zautrix <zautrix> | 2005-06-18 09:21:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-18 09:21:06 (UTC) |
commit | 252c62bffc34f2c71002c71abea480807fa1455a (patch) (side-by-side diff) | |
tree | ed84520d75b534bb6013fc45fdb93f1a39e6e2e0 | |
parent | 39112dfe29d2108d54d37f25dc57dcd9299f1f93 (diff) | |
download | kdepimpi-252c62bffc34f2c71002c71abea480807fa1455a.zip kdepimpi-252c62bffc34f2c71002c71abea480807fa1455a.tar.gz kdepimpi-252c62bffc34f2c71002c71abea480807fa1455a.tar.bz2 |
fixx
-rw-r--r-- | korganizer/kolistview.cpp | 11 | ||||
-rw-r--r-- | korganizer/kolistview.h | 2 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 0b2f9a4..22d9ac0 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -247,6 +247,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, { mActiveItem = 0; + mForceShowCompletedTodos = false; mListView = new KOListViewListView(this); mListView->addColumn(i18n("Summary")); mListView->addColumn(i18n("Start Date")); @@ -1047,11 +1048,21 @@ void KOListView::addJournals(QPtrList<Journal> eventList) } } +void KOListView::showCompletedTodos() +{ + mForceShowCompletedTodos = true; +} void KOListView::addIncidence(Incidence *incidence) { if ( mUidDict.find( incidence->uid() ) ) return; // mListView->setFont ( KOPrefs::instance()->mListViewFont ); + if ( incidence->typeID() == todoID ) { + if ( ! mForceShowCompletedTodos ) { + if ( !KOPrefs::instance()->mShowCompletedTodo && ((Todo*)incidence)->isCompleted() ) + return; + } + } mUidDict.insert( incidence->uid(), incidence ); KOListViewItem *item = new KOListViewItem( incidence, mListView ); ListItemVisitor v(item, mStartDate ); diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index d384af0..bcef0f0 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h @@ -263,6 +263,7 @@ class KOListView : public KOEventView int count(); QString getWhatsThisText(QPoint p); QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); + void showCompletedTodos(); signals: void signalNewEvent(); void beamIncidenceList(QPtrList<Incidence>); @@ -308,6 +309,7 @@ class KOListView : public KOEventView KOListViewItem *getItemForEvent(Incidence *event); private: + bool mForceShowCompletedTodos; QPopupMenu* mCalPopup; KOListViewWhatsThis *mKOListViewWhatsThis; KOListViewListView *mListView; diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index bba49f0..a8de297 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -138,6 +138,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) // Results list view listView = new KOListView(mCalendar,topFrame); layout->addWidget(listView); + listView->showCompletedTodos(); //layout->setStretchFactor( listView, 333 ); //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) ); //listView->setMaximumHeight( 50 ); |