-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 | |||
@@ -244,12 +244,13 @@ bool ListItemVisitor::visit(Journal * j) | |||
244 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 244 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
245 | const char *name) | 245 | const char *name) |
246 | : KOEventView(calendar, parent, name) | 246 | : KOEventView(calendar, parent, name) |
247 | { | 247 | { |
248 | 248 | ||
249 | mActiveItem = 0; | 249 | mActiveItem = 0; |
250 | mForceShowCompletedTodos = false; | ||
250 | mListView = new KOListViewListView(this); | 251 | mListView = new KOListViewListView(this); |
251 | mListView->addColumn(i18n("Summary")); | 252 | mListView->addColumn(i18n("Summary")); |
252 | mListView->addColumn(i18n("Start Date")); | 253 | mListView->addColumn(i18n("Start Date")); |
253 | mListView->addColumn(i18n("Start Time")); | 254 | mListView->addColumn(i18n("Start Time")); |
254 | mListView->addColumn(i18n("End Date")); | 255 | mListView->addColumn(i18n("End Date")); |
255 | mListView->addColumn(i18n("End Time")); | 256 | mListView->addColumn(i18n("End Time")); |
@@ -1044,17 +1045,27 @@ void KOListView::addJournals(QPtrList<Journal> eventList) | |||
1044 | } | 1045 | } |
1045 | if ( !mListView->currentItem() ){ | 1046 | if ( !mListView->currentItem() ){ |
1046 | updateView(); | 1047 | updateView(); |
1047 | } | 1048 | } |
1048 | } | 1049 | } |
1049 | 1050 | ||
1051 | void KOListView::showCompletedTodos() | ||
1052 | { | ||
1053 | mForceShowCompletedTodos = true; | ||
1054 | } | ||
1050 | void KOListView::addIncidence(Incidence *incidence) | 1055 | void KOListView::addIncidence(Incidence *incidence) |
1051 | { | 1056 | { |
1052 | if ( mUidDict.find( incidence->uid() ) ) return; | 1057 | if ( mUidDict.find( incidence->uid() ) ) return; |
1053 | 1058 | ||
1054 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 1059 | // mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
1060 | if ( incidence->typeID() == todoID ) { | ||
1061 | if ( ! mForceShowCompletedTodos ) { | ||
1062 | if ( !KOPrefs::instance()->mShowCompletedTodo && ((Todo*)incidence)->isCompleted() ) | ||
1063 | return; | ||
1064 | } | ||
1065 | } | ||
1055 | mUidDict.insert( incidence->uid(), incidence ); | 1066 | mUidDict.insert( incidence->uid(), incidence ); |
1056 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); | 1067 | KOListViewItem *item = new KOListViewItem( incidence, mListView ); |
1057 | ListItemVisitor v(item, mStartDate ); | 1068 | ListItemVisitor v(item, mStartDate ); |
1058 | if (incidence->accept(v)) { | 1069 | if (incidence->accept(v)) { |
1059 | return; | 1070 | return; |
1060 | } | 1071 | } |
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index d384af0..bcef0f0 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h | |||
@@ -260,12 +260,13 @@ class KOListView : public KOEventView | |||
260 | void updateList(); | 260 | void updateList(); |
261 | void clearList(); | 261 | void clearList(); |
262 | void setStartDate(const QDate &start); | 262 | void setStartDate(const QDate &start); |
263 | int count(); | 263 | int count(); |
264 | QString getWhatsThisText(QPoint p); | 264 | QString getWhatsThisText(QPoint p); |
265 | QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); | 265 | QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); |
266 | void showCompletedTodos(); | ||
266 | signals: | 267 | signals: |
267 | void signalNewEvent(); | 268 | void signalNewEvent(); |
268 | void beamIncidenceList(QPtrList<Incidence>); | 269 | void beamIncidenceList(QPtrList<Incidence>); |
269 | 270 | ||
270 | public slots: | 271 | public slots: |
271 | void hideAll(); | 272 | void hideAll(); |
@@ -305,12 +306,13 @@ class KOListView : public KOEventView | |||
305 | void writeToFile( bool iCal ); | 306 | void writeToFile( bool iCal ); |
306 | void addEvents(QPtrList<Event> eventList); | 307 | void addEvents(QPtrList<Event> eventList); |
307 | void addIncidence(Incidence *); | 308 | void addIncidence(Incidence *); |
308 | KOListViewItem *getItemForEvent(Incidence *event); | 309 | KOListViewItem *getItemForEvent(Incidence *event); |
309 | 310 | ||
310 | private: | 311 | private: |
312 | bool mForceShowCompletedTodos; | ||
311 | QPopupMenu* mCalPopup; | 313 | QPopupMenu* mCalPopup; |
312 | KOListViewWhatsThis *mKOListViewWhatsThis; | 314 | KOListViewWhatsThis *mKOListViewWhatsThis; |
313 | KOListViewListView *mListView; | 315 | KOListViewListView *mListView; |
314 | KOEventPopupMenu *mPopupMenu; | 316 | KOEventPopupMenu *mPopupMenu; |
315 | KOListViewItem *mActiveItem; | 317 | KOListViewItem *mActiveItem; |
316 | QDict<Incidence> mUidDict; | 318 | QDict<Incidence> mUidDict; |
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index bba49f0..a8de297 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp | |||
@@ -135,12 +135,13 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | |||
135 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); | 135 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); |
136 | rangeLayout->addWidget( (QWidget*)wt ); | 136 | rangeLayout->addWidget( (QWidget*)wt ); |
137 | layout->addWidget(rangeWidget); | 137 | layout->addWidget(rangeWidget); |
138 | // Results list view | 138 | // Results list view |
139 | listView = new KOListView(mCalendar,topFrame); | 139 | listView = new KOListView(mCalendar,topFrame); |
140 | layout->addWidget(listView); | 140 | layout->addWidget(listView); |
141 | listView->showCompletedTodos(); | ||
141 | //layout->setStretchFactor( listView, 333 ); | 142 | //layout->setStretchFactor( listView, 333 ); |
142 | //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) ); | 143 | //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) ); |
143 | //listView->setMaximumHeight( 50 ); | 144 | //listView->setMaximumHeight( 50 ); |
144 | listView->readSettings(KOGlobals::config(),"SearchListView Layout"); | 145 | listView->readSettings(KOGlobals::config(),"SearchListView Layout"); |
145 | connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList())); | 146 | connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList())); |
146 | 147 | ||