summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp13
-rw-r--r--core/pim/addressbook/abtable.h4
-rw-r--r--core/pim/addressbook/abview.cpp4
3 files changed, 19 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
@@ -182,6 +182,12 @@ void AbTable::setContacts( const OContactAccess::List& viewList )
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 );
@@ -317,10 +323,13 @@ void AbTable::refresh()
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 );
diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h
index 4e6b294..0f7bc29 100644
--- a/core/pim/addressbook/abtable.h
+++ b/core/pim/addressbook/abtable.h
@@ -78,6 +78,10 @@ public:
78 78
79 // Set the contacts shown in the table 79 // Set the contacts shown in the table
80 void setContacts( const OContactAccess::List& viewList ); 80 void setContacts( const OContactAccess::List& viewList );
81
82 // Set the list for primary contacts
83 void setOrderedList( const QValueList<int> ordered );
84
81 // Selects a contact of a specific UID 85 // Selects a contact of a specific UID
82 bool selectContact( int UID ); 86 bool selectContact( int UID );
83 87
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 7da0992..b89b794 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -243,6 +243,10 @@ void AbView::setShowByLetter( char c )
243void AbView::setListOrder( const QValueList<int>& ordered ) 243void AbView::setListOrder( const QValueList<int>& ordered )
244{ 244{
245 m_orderedFields = ordered; 245 m_orderedFields = ordered;
246 if ( m_abTable ){
247 m_abTable->setOrderedList( ordered );
248 m_abTable->refresh();
249 }
246 updateView(); 250 updateView();
247} 251}
248 252