author | zautrix <zautrix> | 2005-04-08 11:56:30 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-08 11:56:30 (UTC) |
commit | afb896709be49326ca9d9ad1656153cc27a60ffe (patch) (unidiff) | |
tree | d9dc3976e60435b4c8116fff596358e97f100996 /korganizer | |
parent | ba04f6a4b6b651dcff11ca17103cba42330e52be (diff) | |
download | kdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.zip kdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.tar.gz kdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.tar.bz2 |
wn fix
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 4 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 53fe7d0..8473db9 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -187,12 +187,13 @@ void KOWhatsNextView::restartTimer() | |||
187 | } | 187 | } |
188 | void KOWhatsNextView::updateView() | 188 | void KOWhatsNextView::updateView() |
189 | { | 189 | { |
190 | //qDebug("KOWhatsNextView::updateView() "); | 190 | //qDebug("KOWhatsNextView::updateView() "); |
191 | if ( mTimer->isActive() ) | 191 | if ( mTimer->isActive() ) |
192 | restartTimer(); | 192 | restartTimer(); |
193 | mCurrentMaxPrio = 5; | ||
193 | //qDebug("KOWhatsNextView::updateView() "); | 194 | //qDebug("KOWhatsNextView::updateView() "); |
194 | // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); | 195 | // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); |
195 | KIconLoader kil("korganizer"); | 196 | KIconLoader kil("korganizer"); |
196 | QString ipath;// = new QString(); | 197 | QString ipath;// = new QString(); |
197 | // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath); | 198 | // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath); |
198 | //<big><big><strong>" + date + "</strong></big></big>\n"; | 199 | //<big><big><strong>" + date + "</strong></big></big>\n"; |
@@ -315,12 +316,13 @@ void KOWhatsNextView::updateView() | |||
315 | mText +="<h2><em><font color=\"#000080\">" + i18n("Incomplete Todo:") + "</font></em></h2>\n"; | 316 | mText +="<h2><em><font color=\"#000080\">" + i18n("Incomplete Todo:") + "</font></em></h2>\n"; |
316 | mText += "<ul>\n"; | 317 | mText += "<ul>\n"; |
317 | while (!gotone && priority<6) { | 318 | while (!gotone && priority<6) { |
318 | todo = todos.first(); | 319 | todo = todos.first(); |
319 | while(todo) { | 320 | while(todo) { |
320 | if (!todo->isCompleted() && (todo->priority() == priority) ) { | 321 | if (!todo->isCompleted() && (todo->priority() == priority) ) { |
322 | mCurrentMaxPrio = priority - priosFound + topmostPrios -1; | ||
321 | if ( appendTodo(todo) ) | 323 | if ( appendTodo(todo) ) |
322 | gotone = true; | 324 | gotone = true; |
323 | } | 325 | } |
324 | todo = todos.next(); | 326 | todo = todos.next(); |
325 | } | 327 | } |
326 | if ( gotone ) { | 328 | if ( gotone ) { |
@@ -722,13 +724,13 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) | |||
722 | ind += "-"; | 724 | ind += "-"; |
723 | mText += "</li>\n"; | 725 | mText += "</li>\n"; |
724 | } | 726 | } |
725 | QPtrList<Incidence> Relations = ev->relations(); | 727 | QPtrList<Incidence> Relations = ev->relations(); |
726 | Incidence *to; | 728 | Incidence *to; |
727 | for (to=Relations.first();to;to=Relations.next()) { | 729 | for (to=Relations.first();to;to=Relations.next()) { |
728 | if (!((Todo*)to)->isCompleted()) | 730 | if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio ) |
729 | appendTodo( to, ind , true ); | 731 | appendTodo( to, ind , true ); |
730 | } | 732 | } |
731 | 733 | ||
732 | return true; | 734 | return true; |
733 | } | 735 | } |
734 | 736 | ||
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 715037f..d6727ac 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h | |||
@@ -84,12 +84,13 @@ class KOWhatsNextView : public KOrg::BaseView | |||
84 | private slots: | 84 | private slots: |
85 | void showIncidence(const QString &); | 85 | void showIncidence(const QString &); |
86 | void restartTimer(); | 86 | void restartTimer(); |
87 | 87 | ||
88 | 88 | ||
89 | private: | 89 | private: |
90 | int mCurrentMaxPrio; | ||
90 | //void createEventViewer(); | 91 | //void createEventViewer(); |
91 | QTimer* mTimer; | 92 | QTimer* mTimer; |
92 | WhatsNextTextBrowser *mView; | 93 | WhatsNextTextBrowser *mView; |
93 | QString mText; | 94 | QString mText; |
94 | // QLabel *mDateLabel; | 95 | // QLabel *mDateLabel; |
95 | KOEventViewerDialog *mEventViewer; | 96 | KOEventViewerDialog *mEventViewer; |