summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abtable.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index a829dc2..a2617fa 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -179,12 +179,18 @@ void AbTable::setContacts( const OContactAccess::List& viewList )
179 updateVisible(); 179 updateVisible();
180 180
181 setPaintingEnabled( TRUE ); 181 setPaintingEnabled( TRUE );
182 182
183} 183}
184 184
185void AbTable::setOrderedList( const QValueList<int> ordered )
186{
187 intFields = ordered;
188}
189
190
185bool AbTable::selectContact( int UID ) 191bool AbTable::selectContact( int UID )
186{ 192{
187 //qWarning( "AbTable::selectContact( %d )", UID ); 193 //qWarning( "AbTable::selectContact( %d )", UID );
188 int rows = numRows(); 194 int rows = numRows();
189 AbTableItem *abi; 195 AbTableItem *abi;
190 OContact* foundContact = 0l; 196 OContact* foundContact = 0l;
@@ -314,16 +320,19 @@ void AbTable::refresh()
314 320
315 setPaintingEnabled( FALSE ); 321 setPaintingEnabled( FALSE );
316 for ( int r = 0; r < rows; ++r ) { 322 for ( int r = 0; r < rows; ++r ) {
317 abi = static_cast<AbTableItem*>( item(r, 0) ); 323 abi = static_cast<AbTableItem*>( item(r, 0) );
318 contactItem = findContactContact( contactList[abi], r ); 324 contactItem = findContactContact( contactList[abi], r );
319 static_cast<AbTableItem*>( item(r, 1) )->setItem( contactItem.value, abi->text() ); 325 static_cast<AbTableItem*>( item(r, 1) )->setItem( contactItem.value, abi->text() );
320 if ( !contactItem.icon.isNull() ) 326 if ( !contactItem.icon.isNull() ){
321 static_cast<AbTableItem*>( item(r, 1) )-> 327 static_cast<AbTableItem*>( item(r, 1) )->
322 setPixmap( contactItem.icon ); 328 setPixmap( contactItem.icon );
323 329 }else{
330 static_cast<AbTableItem*>( item(r, 1) )->
331 setPixmap( QPixmap() );
332 }
324 } 333 }
325 resort(); 334 resort();
326 setPaintingEnabled( TRUE ); 335 setPaintingEnabled( TRUE );
327} 336}
328 337
329void AbTable::keyPressEvent( QKeyEvent *e ) 338void AbTable::keyPressEvent( QKeyEvent *e )