Diffstat (limited to 'kaddressbook/xxportselectdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/xxportselectdialog.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp index 41c999b..be254c0 100644 --- a/kaddressbook/xxportselectdialog.cpp +++ b/kaddressbook/xxportselectdialog.cpp @@ -86,32 +86,41 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ); mUseCategories->setEnabled( categories.count() > 0 ); int count = mCore->selectedUIDs().count(); mUseSelection->setEnabled( count != 0 ); mUseSelection->setChecked( count > 1 ); mSortTypeCombo->insertItem( i18n( "Ascending" ) ); mSortTypeCombo->insertItem( i18n( "Descending" ) ); mFields = mCore->addressBook()->fields( KABC::Field::All ); KABC::Field::List::Iterator fieldIt; for ( fieldIt = mFields.begin(); fieldIt != mFields.end(); ++fieldIt ) mFieldCombo->insertItem( (*fieldIt)->label() ); } +QStringList XXPortSelectDialog::uids() +{ + QStringList uidlist; + KABC::AddresseeList list = contacts(); + KABC::Addressee::List::Iterator it; + for ( it = list.begin(); it != list.end(); ++it ) + uidlist.append((*it).uid()); + return uidlist; +} KABC::AddresseeList XXPortSelectDialog::contacts() { QStringList selection = mCore->selectedUIDs(); KABC::AddresseeList list; if ( mUseSelection->isChecked() ) { QStringList::Iterator it; for ( it = selection.begin(); it != selection.end(); ++it ) { KABC::Addressee addr = mCore->addressBook()->findByUid( *it ); if ( !addr.isEmpty() ) list.append( addr ); } } else if ( mUseFilters->isChecked() ) { // find contacts that can pass selected filter Filter::List::Iterator filterIt; for ( filterIt = mFilters.begin(); filterIt != mFilters.end(); ++filterIt ) |