summaryrefslogtreecommitdiff
path: root/core/pim/todo/todotable.h
authorzecke <zecke>2002-06-15 16:46:37 (UTC)
committer zecke <zecke>2002-06-15 16:46:37 (UTC)
commitff47b17768607d8819ef5cd3316a1cab0abdcf3a (patch) (unidiff)
treeaddbc4d7d8826ce2952aca872e67e3575d77cda7 /core/pim/todo/todotable.h
parent9f41969610f9db5d60d6080abae0b21e54a549e2 (diff)
downloadopie-ff47b17768607d8819ef5cd3316a1cab0abdcf3a.zip
opie-ff47b17768607d8819ef5cd3316a1cab0abdcf3a.tar.gz
opie-ff47b17768607d8819ef5cd3316a1cab0abdcf3a.tar.bz2
Summary support
Diffstat (limited to 'core/pim/todo/todotable.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todotable.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h
index 7672f21..39e00d1 100644
--- a/core/pim/todo/todotable.h
+++ b/core/pim/todo/todotable.h
@@ -190,25 +190,26 @@ private:
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 QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A') 195 QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A')
196 + todo->priority() ) 196 + todo->priority() )
197 + Qtopia::buildSortKey( todo->description() ); 197 + Qtopia::buildSortKey( todo->description() );
198 CheckItem *chk = new CheckItem( this, sortKey ); 198 CheckItem *chk = new CheckItem( this, sortKey );
199 chk->setChecked( todo->isCompleted() ); 199 chk->setChecked( todo->isCompleted() );
200 ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent ); 200 ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent );
201 cmb->setText( QString::number( todo->priority() ) ); 201 cmb->setText( QString::number( todo->priority() ) );
202 QTableItem *ti = new TodoTextItem( this, todo->description().left(40).simplifyWhiteSpace() ); 202 QString sum = todo->summary();
203 QTableItem *ti = new TodoTextItem( this, sum.isEmpty() ? todo->description().left(40).simplifyWhiteSpace() : sum );
203 ti->setReplaceable( false ); 204 ti->setReplaceable( false );
204 205
205 DueTextItem *due = new DueTextItem(this, todo ); 206 DueTextItem *due = new DueTextItem(this, todo );
206 setItem( row, 3, due); 207 setItem( row, 3, due);
207 208
208 setItem( row, 0, chk ); 209 setItem( row, 0, chk );
209 setItem( row, 1, cmb ); 210 setItem( row, 1, cmb );
210 setItem( row, 2, ti ); 211 setItem( row, 2, ti );
211 212
212 213
213 todoList.insert( chk, todo ); 214 todoList.insert( chk, todo );
214} 215}