本文整理汇总了C++中kabc::AddressBook::end方法的典型用法代码示例。如果您正苦于以下问题:C++ AddressBook::end方法的具体用法?C++ AddressBook::end怎么用?C++ AddressBook::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kabc::AddressBook
的用法示例。
在下文中一共展示了AddressBook::end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddresseeViewItem
void
AddressesDialog::updateAvailableAddressees()
{
d->ui->mAvailableView->clear();
d->groupDict.clear();
static const QString &personalGroup = KGlobal::staticQString( i18n( "Other Addresses" ) );
d->personal = new AddresseeViewItem( d->ui->mAvailableView, personalGroup );
d->personal->setHidden( true );
d->groupDict.insert( personalGroup, d->personal );
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
for( KABC::AddressBook::Iterator it = addressBook->begin();
it != addressBook->end(); ++it ) {
addAddresseeToAvailable( *it, d->personal );
}
d->recent = 0;
updateRecentAddresses();
addDistributionLists();
if ( d->personal->childCount() > 0 ) {
d->personal->setHidden( false );
}
checkForSingleAvailableGroup();
}
示例2: slotSelectAddress
/** Select a mail address, using the KabApi */
void TagMailDlg::slotSelectAddress()
{
//Based on KMail
QString addr, email, emailString;
QStringList result;
KABC::AddressBook *addressBook = KABC::StdAddressBook::self();
KABC::AddressBook::Iterator it;
for( it = addressBook->begin(); it != addressBook->end(); ++it ) {
QStringList emails = (*it).emails();
QString n = (*it).prefix() + " " +
(*it).givenName() + " " +
(*it).additionalName() + " " +
(*it).familyName() + " " +
(*it).suffix();
n = n.simplifyWhiteSpace();
for( unsigned int i = 0; i < emails.count(); ++i ) {
if (!emails[i].isEmpty()) {
if (n.isEmpty() || (emails[i].find( "<" ) != -1))
addr = "";
else { /* do we really need quotes around this name ? */
if (n.find(QRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1)
addr = qConfig.attrValueQuotation + n + qConfig.attrValueQuotation + " ";
else
addr = n + " ";
}
email = emails[i];
if (!addr.isEmpty() && (email.find( "<" ) == -1)
&& (email.find( ">" ) == -1)
&& (email.find( "," ) == -1))
addr += "<" + email + ">";
else
addr += email;
addr.stripWhiteSpace();
result.append( addr );
}
}
}
result.sort();
if ( result.count() > 0 )
{
ListDlg listDlg(result);
listDlg.setCaption(i18n("Select Address"));
if (!listDlg.exec()) return;
emailString = listDlg.getEntry();
lineEmail->setText(emailString);
} else
{
//Actually this may mean also other erros, but the result is the same for us: cannot get the
//e-mail address
KMessageBox::error(this,i18n("No addresses found."));
}
}
示例3: core
KAB::Book::Book (Ekiga::ContactCore &_core): core(_core)
{
KABC::AddressBook *kab = KABC::StdAddressBook::self ();
kab->load (); // FIXME: turn async!
for (KABC::AddressBook::Iterator iter = kab->begin ();
iter != kab->end ();
iter++) {
add_contact (ContactPtr (new Contact (core, &(*iter))));
}
}