summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoviewitem.cpp
authorzautrix <zautrix>2005-04-09 20:21:58 (UTC)
committer zautrix <zautrix>2005-04-09 20:21:58 (UTC)
commit9e43ebbe5867b2da957bb17c35bd357715424cba (patch) (side-by-side diff)
treeb506ba029b50fc46a33d35a39e6f1c768c995f22 /korganizer/kotodoviewitem.cpp
parent2c39ac46121e8796e780a5321ab777f08792e5ba (diff)
downloadkdepimpi-9e43ebbe5867b2da957bb17c35bd357715424cba.zip
kdepimpi-9e43ebbe5867b2da957bb17c35bd357715424cba.tar.gz
kdepimpi-9e43ebbe5867b2da957bb17c35bd357715424cba.tar.bz2
todo tt
Diffstat (limited to 'korganizer/kotodoviewitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoviewitem.cpp38
1 files changed, 29 insertions, 9 deletions
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 6559119..66f8d06 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -22,2 +22,3 @@
#include <qapp.h>
+#include <kglobal.h>
@@ -122,4 +123,17 @@ void KOTodoViewItem::construct()
+ keyd = "";
+ keyt = "";
+
+ if (mTodo->isRunning() ) {
+ QDate d = mTodo->runStart().date();
+ QTime t = mTodo->runStart().time();
+ skeyt.sprintf("%02d%02d",t.hour(),t.minute());
+ skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
+ keyd = KGlobal::locale()->formatDate( d );
+ keyt = KGlobal::locale()->formatTime( t );
+
+ } else {
+
if (mTodo->hasStartDate()) {
- setText(5, mTodo->dtStartDateStr());
+ keyd = mTodo->dtStartDateStr();
QDate d = mTodo->dtStart().date();
@@ -127,7 +141,4 @@ void KOTodoViewItem::construct()
- if (mTodo->doesFloat()) {
- setText(6,"");
- }
- else {
- setText(6,mTodo->dtStartTimeStr());
+ if ( !mTodo->doesFloat()) {
+ keyt = mTodo->dtStartTimeStr();
QTime t = mTodo->dtStart().time();
@@ -136,6 +147,7 @@ void KOTodoViewItem::construct()
}
- } else {
- setText(5,"");
- setText(6,"");
+
}
+ }
+ setText(5,keyd);
+ setText(6,keyt);
setSortKey(5,skeyd);
@@ -370,2 +382,9 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
openMode = false;
+ bool colorRunning = mTodo->isRunning();
+ if ( ! colorRunning && openMode )
+ colorRunning = mTodo->hasRunningSub();
+ if ( colorRunning ) {
+ setColor = true;
+ colorToSet = KOPrefs::instance()->mTodoRunColor;
+ } else {
int odue = mTodo->hasDueSubTodo( openMode );
@@ -378,2 +397,3 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
}
+ }