summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
authorzautrix <zautrix>2005-01-05 14:17:14 (UTC)
committer zautrix <zautrix>2005-01-05 14:17:14 (UTC)
commitdf0200487afbfa59b80a79e548d70b5203019003 (patch) (side-by-side diff)
tree2240de4162736461316c8cb3cd00f87a8a9bf2bd /korganizer/kotodoviewitem.cpp
parentb8410daa179dbff2ebb833071ba50b9da36e6330 (diff)
downloadkdepimpi-df0200487afbfa59b80a79e548d70b5203019003.zip
kdepimpi-df0200487afbfa59b80a79e548d70b5203019003.tar.gz
kdepimpi-df0200487afbfa59b80a79e548d70b5203019003.tar.bz2
todo enhancements/fixes
Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index ae0b334..347d982 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -79,6 +79,8 @@ void KOTodoViewItem::construct()
m_init = true;
QString keyd = "==";
QString keyt = "==";
+ QString skeyd = "==";
+ QString skeyt = "==";
setOn(mTodo->isCompleted());
setText(0,mTodo->summary());
@@ -96,7 +98,7 @@ void KOTodoViewItem::construct()
setText(3, mTodo->dtDueDateStr());
QDate d = mTodo->dtDue().date();
keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
- setSortKey(3,keyd);
+ // setSortKey(3,keyd);
if (mTodo->doesFloat()) {
setText(4,"");
}
@@ -104,7 +106,7 @@ void KOTodoViewItem::construct()
setText(4,mTodo->dtDueTimeStr());
QTime t = mTodo->dtDue().time();
keyt.sprintf("%02d%02d",t.hour(),t.minute());
- setSortKey(4,keyt);
+ //setSortKey(4,keyt);
}
} else {
setText(3,"");
@@ -116,8 +118,31 @@ void KOTodoViewItem::construct()
if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt);
else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt);
- setText(5,mTodo->cancelled() ? i18n("Yes") : i18n("No"));
- setText(6,mTodo->categoriesStr());
+
+
+ if (mTodo->hasStartDate()) {
+ setText(5, mTodo->dtStartDateStr());
+ QDate d = mTodo->dtStart().date();
+ skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
+
+ if (mTodo->doesFloat()) {
+ setText(6,"");
+ }
+ else {
+ setText(6,mTodo->dtStartTimeStr());
+ QTime t = mTodo->dtStart().time();
+ skeyt.sprintf("%02d%02d",t.hour(),t.minute());
+
+ }
+ } else {
+ setText(5,"");
+ setText(6,"");
+ }
+ setSortKey(5,skeyd);
+ setSortKey(6,skeyt);
+
+ setText(7,mTodo->cancelled() ? i18n("Yes") : i18n("No"));
+ setText(8,mTodo->categoriesStr());
#if 0
// Find sort id in description. It's the text behind the last '#' character