author | zautrix <zautrix> | 2005-06-18 09:12:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-18 09:12:06 (UTC) |
commit | 39112dfe29d2108d54d37f25dc57dcd9299f1f93 (patch) (side-by-side diff) | |
tree | d240d7a346ae56d41a68e77ae83eba119665b86b /korganizer/kolistview.cpp | |
parent | 86e7069527cf45b4ba7889619fb0a8a6dd5867cc (diff) | |
download | kdepimpi-39112dfe29d2108d54d37f25dc57dcd9299f1f93.zip kdepimpi-39112dfe29d2108d54d37f25dc57dcd9299f1f93.tar.gz kdepimpi-39112dfe29d2108d54d37f25dc57dcd9299f1f93.tar.bz2 |
icons for todos
-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 @@ -67,6 +67,8 @@ #include "kolistview.h" #include "koeventviewer.h" +extern QPixmap* sgListViewCompletedPix[6]; + class KOListViewWhatsThis :public QWhatsThis { public: @@ -152,7 +154,12 @@ bool ListItemVisitor::visit(Event *e) 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()) { mItem->setText(1,t->dtStartDateStr()); if (t->doesFloat()) { @@ -238,6 +245,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, const char *name) : KOEventView(calendar, parent, name) { + mActiveItem = 0; mListView = new KOListViewListView(this); mListView->addColumn(i18n("Summary")); |