summaryrefslogtreecommitdiff
path: root/core/pim/todo
Unidiff
Diffstat (limited to 'core/pim/todo') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/todotable.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h
index 39e00d1..7539df1 100644
--- a/core/pim/todo/todotable.h
+++ b/core/pim/todo/todotable.h
@@ -171,48 +171,51 @@ private slots:
171 bool backwards, int category ); 171 bool backwards, int category );
172 void slotShowMenu(); 172 void slotShowMenu();
173 void rowHeightChanged( int row ); 173 void rowHeightChanged( int row );
174 void slotCheckDay(); // check the day 174 void slotCheckDay(); // check the day
175 175
176private: 176private:
177 friend class TodoWindow; 177 friend class TodoWindow;
178 178
179 QMap<CheckItem*, ToDoEvent *> todoList; 179 QMap<CheckItem*, ToDoEvent *> todoList;
180 QStringList categoryList; 180 QStringList categoryList;
181 bool showComp; 181 bool showComp;
182 QString showCat; 182 QString showCat;
183 QTimer *menuTimer; 183 QTimer *menuTimer;
184 QDate mDay; 184 QDate mDay;
185 QTimer *mDayTimer; // see if the day changed 185 QTimer *mDayTimer; // see if the day changed
186 bool enablePainting; 186 bool enablePainting;
187 Categories mCat; 187 Categories mCat;
188 int currFindRow; 188 int currFindRow;
189 bool showDeadl:1; 189 bool showDeadl:1;
190}; 190};
191 191
192 192
193inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) 193inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row )
194{ 194{
195 int rows = numRows();
196 ++rows;
197 setNumRows( rows );
195 QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A') 198 QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A')
196 + todo->priority() ) 199 + todo->priority() )
197 + Qtopia::buildSortKey( todo->description() ); 200 + Qtopia::buildSortKey( todo->description() );
198 CheckItem *chk = new CheckItem( this, sortKey ); 201 CheckItem *chk = new CheckItem( this, sortKey );
199 chk->setChecked( todo->isCompleted() ); 202 chk->setChecked( todo->isCompleted() );
200 ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent ); 203 ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent );
201 cmb->setText( QString::number( todo->priority() ) ); 204 cmb->setText( QString::number( todo->priority() ) );
202 QString sum = todo->summary(); 205 QString sum = todo->summary();
203 QTableItem *ti = new TodoTextItem( this, sum.isEmpty() ? todo->description().left(40).simplifyWhiteSpace() : sum ); 206 QTableItem *ti = new TodoTextItem( this, sum.isEmpty() ? todo->description().left(40).simplifyWhiteSpace() : sum );
204 ti->setReplaceable( false ); 207 ti->setReplaceable( false );
205 208
206 DueTextItem *due = new DueTextItem(this, todo ); 209 DueTextItem *due = new DueTextItem(this, todo );
207 setItem( row, 3, due); 210 setItem( row, 3, due);
208 211
209 setItem( row, 0, chk ); 212 setItem( row, 0, chk );
210 setItem( row, 1, cmb ); 213 setItem( row, 1, cmb );
211 setItem( row, 2, ti ); 214 setItem( row, 2, ti );
212 215
213 216
214 todoList.insert( chk, todo ); 217 todoList.insert( chk, todo );
215} 218}
216 219
217inline void TodoTable::realignTable( int row ) 220inline void TodoTable::realignTable( int row )
218{ 221{