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) (unidiff)
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()
79 m_init = true; 79 m_init = true;
80 QString keyd = "=="; 80 QString keyd = "==";
81 QString keyt = "=="; 81 QString keyt = "==";
82 QString skeyd = "==";
83 QString skeyt = "==";
82 84
83 setOn(mTodo->isCompleted()); 85 setOn(mTodo->isCompleted());
84 setText(0,mTodo->summary()); 86 setText(0,mTodo->summary());
@@ -96,7 +98,7 @@ void KOTodoViewItem::construct()
96 setText(3, mTodo->dtDueDateStr()); 98 setText(3, mTodo->dtDueDateStr());
97 QDate d = mTodo->dtDue().date(); 99 QDate d = mTodo->dtDue().date();
98 keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); 100 keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
99 setSortKey(3,keyd); 101 // setSortKey(3,keyd);
100 if (mTodo->doesFloat()) { 102 if (mTodo->doesFloat()) {
101 setText(4,""); 103 setText(4,"");
102 } 104 }
@@ -104,7 +106,7 @@ void KOTodoViewItem::construct()
104 setText(4,mTodo->dtDueTimeStr()); 106 setText(4,mTodo->dtDueTimeStr());
105 QTime t = mTodo->dtDue().time(); 107 QTime t = mTodo->dtDue().time();
106 keyt.sprintf("%02d%02d",t.hour(),t.minute()); 108 keyt.sprintf("%02d%02d",t.hour(),t.minute());
107 setSortKey(4,keyt); 109 //setSortKey(4,keyt);
108 } 110 }
109 } else { 111 } else {
110 setText(3,""); 112 setText(3,"");
@@ -116,8 +118,31 @@ void KOTodoViewItem::construct()
116 if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt); 118 if (mTodo->isCompleted()) setSortKey(1,"6" + QString::number(mTodo->priority())+keyd+keyt);
117 else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt); 119 else setSortKey(1,QString::number(mTodo->priority())+keyd+keyt);
118 120
119 setText(5,mTodo->cancelled() ? i18n("Yes") : i18n("No")); 121
120 setText(6,mTodo->categoriesStr()); 122
123 if (mTodo->hasStartDate()) {
124 setText(5, mTodo->dtStartDateStr());
125 QDate d = mTodo->dtStart().date();
126 skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
127
128 if (mTodo->doesFloat()) {
129 setText(6,"");
130 }
131 else {
132 setText(6,mTodo->dtStartTimeStr());
133 QTime t = mTodo->dtStart().time();
134 skeyt.sprintf("%02d%02d",t.hour(),t.minute());
135
136 }
137 } else {
138 setText(5,"");
139 setText(6,"");
140 }
141 setSortKey(5,skeyd);
142 setSortKey(6,skeyt);
143
144 setText(7,mTodo->cancelled() ? i18n("Yes") : i18n("No"));
145 setText(8,mTodo->categoriesStr());
121 146
122#if 0 147#if 0
123 // Find sort id in description. It's the text behind the last '#' character 148 // Find sort id in description. It's the text behind the last '#' character