本文整理汇总了C++中Contact::getDisplayName方法的典型用法代码示例。如果您正苦于以下问题:C++ Contact::getDisplayName方法的具体用法?C++ Contact::getDisplayName怎么用?C++ Contact::getDisplayName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contact
的用法示例。
在下文中一共展示了Contact::getDisplayName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: populate
void ParticipantList::populate( const Contacts& rContacts, IMChatSession& imChatSession )
{
Participant participant;
IMContact* imContact = NULL;
bool bAlreadyInChat = false;
for ( Contacts::const_iterator it = rContacts.begin(); it != rContacts.end(); it++ )
{
if ( includeInCandidateList( (*it).second, imChatSession, bAlreadyInChat ) )
{
Contact c = (*it).second;
imContact = c.getPreferredIMContact();
participant.setIMContact ( *imContact );
participant.setDisplayName ( c.getDisplayName() );
participant.setIsAlreadyInChat( bAlreadyInChat );
participant.setPixmap ( determineStatus( c ) );
Add( &participant );
}
}
}
示例2: formatName
QString QtHistory::formatName(const std::string& name, bool isWengo) const {
// do not display realm whith wengo account
SipAddress sipAddress(name);
QString formattedName = QString::fromStdString(sipAddress.getSipAddress());
Config & config = ConfigManager::getInstance().getCurrentConfig();
QString wengoSuffix = "@" + QString::fromStdString( config.getWengoRealm() );
if (isWengo) {
formattedName.remove(wengoSuffix);
}
formattedName.remove("sip:");
Contact * contact = _cHistory.getCWengoPhone().getCUserProfileHandler().getUserProfileHandler().getCurrentUserProfile()->getContactList().getContactByNumber(formattedName.toStdString()); //VOXOX CHANGE by Rolando - 2009.10.06
QString displayName;//VOXOX CHANGE by Rolando - 2009.10.06
if(contact)//VOXOX CHANGE by Rolando - 2009.10.06
{
QString newName = QString::fromStdString(contact->getDisplayName()) + " (" + formattedName + ")";//VOXOX CHANGE by Rolando - 2009.10.06
formattedName = newName;//VOXOX CHANGE by Rolando - 2009.10.06
}
return formattedName;
}