-rw-r--r-- | core/pim/todo/todotable.h | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h index 288ff90..32df514 100644 --- a/core/pim/todo/todotable.h +++ b/core/pim/todo/todotable.h | |||
@@ -79,2 +79,15 @@ public: | |||
79 | 79 | ||
80 | class DueTextItem : public QTableItem | ||
81 | { | ||
82 | public: | ||
83 | DueTextItem( QTable *t, ToDoEvent *ev ); | ||
84 | QString key() const; | ||
85 | void setToDoEvent( const ToDoEvent *ev ); | ||
86 | void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); | ||
87 | private: | ||
88 | int m_off; | ||
89 | bool m_hasDate:1; | ||
90 | bool m_completed:1; | ||
91 | |||
92 | }; | ||
80 | 93 | ||
@@ -100,3 +113,2 @@ public: | |||
100 | 113 | ||
101 | /* added 20.01.2k2 by se */ | ||
102 | void setShowDeadline (bool sd) {showDeadl = sd; updateVisible();} | 114 | void setShowDeadline (bool sd) {showDeadl = sd; updateVisible();} |
@@ -165,5 +177,3 @@ private: | |||
165 | int currFindRow; | 177 | int currFindRow; |
166 | 178 | bool showDeadl:1; | |
167 | /* added 20.01.2k2 by se */ | ||
168 | bool showDeadl; | ||
169 | }; | 179 | }; |
@@ -183,15 +193,4 @@ inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) | |||
183 | 193 | ||
184 | /* added 20.01.2k2 by se */ | 194 | DueTextItem *due = new DueTextItem(this, todo ); |
185 | QTableItem *dl = NULL; | 195 | setItem( row, 3, due); |
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 | 196 | ||
@@ -209,3 +208,4 @@ inline void TodoTable::realignTable( int row ) | |||
209 | *ti2, | 208 | *ti2, |
210 | *ti3; | 209 | *ti3, |
210 | *ti4; | ||
211 | int totalRows = numRows(); | 211 | int totalRows = numRows(); |
@@ -219,2 +219,3 @@ inline void TodoTable::realignTable( int row ) | |||
219 | ti3 = item( curr + 1, 2 ); | 219 | ti3 = item( curr + 1, 2 ); |
220 | ti4 = item( curr + 1, 3 ); | ||
220 | takeItem( ti1 ); | 221 | takeItem( ti1 ); |
@@ -222,2 +223,3 @@ inline void TodoTable::realignTable( int row ) | |||
222 | takeItem( ti3 ); | 223 | takeItem( ti3 ); |
224 | takeItem( ti4 ); | ||
223 | setItem( curr, 0, ti1 ); | 225 | setItem( curr, 0, ti1 ); |
@@ -225,2 +227,3 @@ inline void TodoTable::realignTable( int row ) | |||
225 | setItem( curr, 2, ti3 ); | 227 | setItem( curr, 2, ti3 ); |
228 | setItem( curr, 3, ti4 ); | ||
226 | } | 229 | } |