本文整理汇总了C++中kabc::VCardConverter::parseVCard方法的典型用法代码示例。如果您正苦于以下问题:C++ VCardConverter::parseVCard方法的具体用法?C++ VCardConverter::parseVCard怎么用?C++ VCardConverter::parseVCard使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kabc::VCardConverter
的用法示例。
在下文中一共展示了VCardConverter::parseVCard方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: importFromData
void KoRdfFoaF::importFromData(const QByteArray &ba, KoDocumentRdf *_rdf, KoCanvasBase *host)
{
Q_D (KoRdfFoaF);
#ifdef KDEPIMLIBS_FOUND
kDebug(30015) << "data.sz:" << ba.size();
kDebug(30015) << "_rdf:" << _rdf;
if (_rdf) {
d->m_rdf = _rdf;
}
KABC::VCardConverter converter;
KABC::Addressee addr = converter.parseVCard(ba);
d->fromKABC(addr);
kDebug(30015) << "adding name:" << d->m_name;
kDebug(30015) << "uri:" << d->m_uri;
importFromDataComplete(ba, documentRdf(), host);
#else
kDebug(30015) << "KDEPIM support not built!";
#endif
}
示例2: retrieveAddresseeListFromDevice
bool AddressbookHandler::retrieveAddresseeListFromDevice( KABC::Addressee::List &mAddresseeList, QValueList<uint32_t> &idList )
{
KABC::VCardConverter vCardConv;
bool ret = true;
for ( QValueList<uint32_t>::const_iterator it = idList.begin(); it != idList.end(); ++it ) {
incrementSteps();
kdDebug(2120) << "Retrieving Contact from device: " << "RRA-ID-" +
QString::number ( *it, 16 ).rightJustify( 8, '0' ) << endl;
QString vCard = m_rra->getVCard( mTypeId, *it );
if (vCard.isEmpty()) {
addErrorEntry("RRA-ID-" + QString::number ( *it, 16 ).rightJustify( 8, '0' ));
ret = false;
}
KABC::Addressee addr = vCardConv.parseVCard ( vCard );
addr.setFormattedName(addr.formattedName().replace("\\,", ","));
QString kdeId;
if ((kdeId = mUidHelper->kdeId("SynCEAddressbook", addr.uid(), "---")) != "---") {
addr.setUid(kdeId);
} else {
mUidHelper->addId("SynCEAddressbook", addr.uid(), addr.uid());
}
kdDebug(2120) << " ID-Pair: KDEID: " << addr.uid() << " DeviceID: " <<
"RRA-ID-" + QString::number ( *it, 16 ).rightJustify( 8, '0' ) << endl;
mAddresseeList.push_back( addr );
KApplication::kApplication()->processEvents();
}
return ret;
}