-rw-r--r-- | korganizer/kolistview.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index c705c73..0b2f9a4 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -69,2 +69,4 @@ +extern QPixmap* sgListViewCompletedPix[6]; + class KOListViewWhatsThis :public QWhatsThis @@ -154,3 +156,8 @@ bool ListItemVisitor::visit(Todo *t) { - mItem->setText(0,i18n("Todo: %1").arg(t->summary())); + mItem->setText(0,t->summary()); + if ( t->isCompleted() ) { + mItem->setSortKey(0,"99"+ t->summary().left(10)); + } else + mItem->setSortKey(0,QString::number( t->percentComplete() )+ t->summary().left(10)); + mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); if (t->hasStartDate()) { @@ -240,2 +247,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, { + mActiveItem = 0; |