author | zecke <zecke> | 2002-04-13 16:28:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-13 16:28:40 (UTC) |
commit | 1eb54898047fab3963debe51fa3e570b361a1215 (patch) (side-by-side diff) | |
tree | 7ba017af1f2807d9710577817e4a13876900a0a7 /core/pim/todo/todotable.h | |
parent | def870c6fcccf2b20d7ce3821055391b18243a24 (diff) | |
download | opie-1eb54898047fab3963debe51fa3e570b361a1215.zip opie-1eb54898047fab3963debe51fa3e570b361a1215.tar.gz opie-1eb54898047fab3963debe51fa3e570b361a1215.tar.bz2 |
move to multiple categories + patch from Stefan Eilers to show the due date
-rw-r--r-- | core/pim/todo/todotable.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h index 2746ce7..288ff90 100644 --- a/core/pim/todo/todotable.h +++ b/core/pim/todo/todotable.h @@ -98,6 +98,10 @@ public: void setShowCompleted( bool sc ) { showComp = sc; updateVisible(); } bool showCompleted() const { return showComp; } + /* added 20.01.2k2 by se */ + void setShowDeadline (bool sd) {showDeadl = sd; updateVisible();} + bool showDeadline() const { return showDeadl;} + void setShowCategory( const QString &c ) { showCat = c; updateVisible(); } const QString &showCategory() const { return showCat; } int showCategoryId() const; @@ -159,6 +163,9 @@ private: bool enablePainting; Categories mCat; int currFindRow; + + /* added 20.01.2k2 by se */ + bool showDeadl; }; @@ -174,10 +181,25 @@ inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) QTableItem *ti = new TodoTextItem( this, todo->description().left(40).simplifyWhiteSpace() ); ti->setReplaceable( false ); + /* added 20.01.2k2 by se */ + QTableItem *dl = NULL; + if (todo->hasDate()){ + QDate *today = new QDate (QDate::currentDate()); + if (today){ + dl = new TodoTextItem (this, tr ("%1"). + arg(today->daysTo(todo->date()))); + delete (today); + } + }else{ + dl = new TodoTextItem (this,"n.d."); + } + setItem( row, 3, dl); + setItem( row, 0, chk ); setItem( row, 1, cmb ); setItem( row, 2, ti ); + todoList.insert( chk, todo ); } |