当前位置: 首页>>代码示例>>C++>>正文


C++ AddressBook::end方法代码示例

本文整理汇总了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();
}
开发者ID:akhuettel,项目名称:kdepim-noakonadi,代码行数:27,代码来源:addressesdialog.cpp

示例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."));
  }
}
开发者ID:serghei,项目名称:kde3-kdewebdev,代码行数:54,代码来源:tagmaildlg.cpp

示例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))));
    }
}
开发者ID:brownsys,项目名称:pane-ekiga,代码行数:13,代码来源:kab-book.cpp


注:本文中的kabc::AddressBook::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。