本文整理汇总了C++中Contact::details方法的典型用法代码示例。如果您正苦于以下问题:C++ Contact::details方法的具体用法?C++ Contact::details怎么用?C++ Contact::details使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contact
的用法示例。
在下文中一共展示了Contact::details方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: personalInfoAvailable
void TlenPersonalInfoWidget::personalInfoAvailable(Buddy buddy)
{
kdebugmf (KDEBUG_INFO,"personal info available");
NickName->setText(buddy.nickName());
FirstName->setText(buddy.firstName());
LastName->setText(buddy.lastName());
Sex->setCurrentIndex((int)buddy.gender());
BirthYear->setText(QString::number(buddy.birthYear()));
City->setText(buddy.city());
EMail->setText(buddy.email());
// TODO 0.6.6: dangerous - no details means not this account?
FetchOk = false;
// always one contact
Contact contact = buddy.contacts()[0];
if (contact.isNull())
return;
TlenContactDetails *tlenDetails = dynamic_cast<TlenContactDetails *>(contact.details());
if (!tlenDetails)
return;
LookingFor->setCurrentIndex((int) tlenDetails->lookingFor());
Job->setCurrentIndex((int) tlenDetails->job());
TodayPlans->setCurrentIndex((int) tlenDetails->todayPlans());
ShowStatus->setChecked(tlenDetails->showStatus());
HaveMic->setChecked(tlenDetails->haveMic());
HaveCam->setChecked(tlenDetails->haveCam());
FetchOk = true;
}
示例2: updatePersonalInfo
void TlenPersonalInfoService::updatePersonalInfo(Buddy buddy)
{
kdebugf();
client = Protocol->client();
if (!client || !client->isConnected())
return;
// always 1 contact
Contact contact = buddy.contacts()[0];
if (contact.isNull())
{
emit personalInfoUpdated(false);
return;
}
TlenContactDetails *tlenDetails = dynamic_cast<TlenContactDetails *>(contact.details());
if (!tlenDetails)
{
emit personalInfoUpdated(false);
return;
}
// TODO add email!!
client->setPubDirInfo(buddy.firstName(), buddy.lastName(), buddy.nickName(), buddy.email(),
buddy.city(), buddy.birthYear(), (int)buddy.gender(),
(int) tlenDetails->lookingFor(), (int) tlenDetails->job(),
(int) tlenDetails->todayPlans(), tlenDetails->showStatus(),
tlenDetails->haveMic(), tlenDetails->haveCam());
}
示例3: Data
GaduContactDataManager::GaduContactDataManager(Contact data, QObject *parent) :
ConfigurationContactDataManager(data, parent), Data(dynamic_cast<GaduContactDetails *>(data.details()))
{
}