-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: | |||
98 | void setShowCompleted( bool sc ) { showComp = sc; updateVisible(); } | 98 | void setShowCompleted( bool sc ) { showComp = sc; updateVisible(); } |
99 | bool showCompleted() const { return showComp; } | 99 | bool showCompleted() const { return showComp; } |
100 | 100 | ||
101 | /* added 20.01.2k2 by se */ | ||
102 | void setShowDeadline (bool sd) {showDeadl = sd; updateVisible();} | ||
103 | bool showDeadline() const { return showDeadl;} | ||
104 | |||
101 | void setShowCategory( const QString &c ) { showCat = c; updateVisible(); } | 105 | void setShowCategory( const QString &c ) { showCat = c; updateVisible(); } |
102 | const QString &showCategory() const { return showCat; } | 106 | const QString &showCategory() const { return showCat; } |
103 | int showCategoryId() const; | 107 | int showCategoryId() const; |
@@ -159,6 +163,9 @@ private: | |||
159 | bool enablePainting; | 163 | bool enablePainting; |
160 | Categories mCat; | 164 | Categories mCat; |
161 | int currFindRow; | 165 | int currFindRow; |
166 | |||
167 | /* added 20.01.2k2 by se */ | ||
168 | bool showDeadl; | ||
162 | }; | 169 | }; |
163 | 170 | ||
164 | 171 | ||
@@ -174,10 +181,25 @@ inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) | |||
174 | QTableItem *ti = new TodoTextItem( this, todo->description().left(40).simplifyWhiteSpace() ); | 181 | QTableItem *ti = new TodoTextItem( this, todo->description().left(40).simplifyWhiteSpace() ); |
175 | ti->setReplaceable( false ); | 182 | ti->setReplaceable( false ); |
176 | 183 | ||
184 | /* added 20.01.2k2 by se */ | ||
185 | QTableItem *dl = NULL; | ||
186 | if (todo->hasDate()){ | ||
187 | QDate *today = new QDate (QDate::currentDate()); | ||
188 | if (today){ | ||
189 | dl = new TodoTextItem (this, tr ("%1"). | ||
190 | arg(today->daysTo(todo->date()))); | ||
191 | delete (today); | ||
192 | } | ||
193 | }else{ | ||
194 | dl = new TodoTextItem (this,"n.d."); | ||
195 | } | ||
196 | setItem( row, 3, dl); | ||
197 | |||
177 | setItem( row, 0, chk ); | 198 | setItem( row, 0, chk ); |
178 | setItem( row, 1, cmb ); | 199 | setItem( row, 1, cmb ); |
179 | setItem( row, 2, ti ); | 200 | setItem( row, 2, ti ); |
180 | 201 | ||
202 | |||
181 | todoList.insert( chk, todo ); | 203 | todoList.insert( chk, todo ); |
182 | } | 204 | } |
183 | 205 | ||