本文整理汇总了C++中Contact::data方法的典型用法代码示例。如果您正苦于以下问题:C++ Contact::data方法的具体用法?C++ Contact::data怎么用?C++ Contact::data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contact
的用法示例。
在下文中一共展示了Contact::data方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeContact
void ContactManager::removeContact(Contact contact)
{
kdebugf();
if (contact.isNull())
return;
ensureLoaded();
if (!Contacts.contains(contact))
return;
disconnect(contact.data(), SIGNAL(updated()), this, SLOT(contactDataUpdated()));
disconnect(contact.data(), SIGNAL(accountDataAboutToBeAdded(Account *)),
this, SLOT(contactAccountDataAboutToBeAdded(Account *)));
disconnect(contact.data(), SIGNAL(accountDataAdded(Account *)),
this, SLOT(contactAccountDataAdded(Account *)));
disconnect(contact.data(), SIGNAL(accountDataAboutToBeRemoved(Account *)),
this, SLOT(contactAccountDataAboutToBeRemoved(Account *)));
disconnect(contact.data(), SIGNAL(accountDataRemoved(Account *)),
this, SLOT(contactAccountDataRemoved(Account *)));
disconnect(contact.data(), SIGNAL(accountDataIdChanged(Account *, const QString &)),
this, SLOT(contactAccountDataIdChanged(Account *, const QString &)));
emit contactAboutToBeRemoved(contact);
if (ContactRemovePredicateObject::inquireAll(contact))
{
Contacts.removeAll(contact);
contact.removeFromStorage();
}
emit contactRemoved(contact);
contact.setType(ContactData::TypeAnonymous);
kdebugf();
}
示例2: addContact
void ContactManager::addContact(Contact contact)
{
if (contact.isNull())
return;
ensureLoaded();
if (Contacts.contains(contact))
{
contact.setType(ContactData::TypeNormal);
return;
}
emit contactAboutToBeAdded(contact);
Contacts.append(contact);
emit contactAdded(contact);
connect(contact.data(), SIGNAL(updated()), this, SLOT(contactDataUpdated()));
connect(contact.data(), SIGNAL(accountDataAboutToBeAdded(Account *)),
this, SLOT(contactAccountDataAboutToBeAdded(Account *)));
connect(contact.data(), SIGNAL(accountDataAdded(Account *)),
this, SLOT(contactAccountDataAdded(Account *)));
connect(contact.data(), SIGNAL(accountDataAboutToBeRemoved(Account *)),
this, SLOT(contactAccountDataAboutToBeRemoved(Account *)));
connect(contact.data(), SIGNAL(accountDataRemoved(Account *)),
this, SLOT(contactAccountDataRemoved(Account *)));
connect(contact.data(), SIGNAL(accountDataIdChanged(Account *, const QString &)),
this, SLOT(contactAccountDataIdChanged(Account *, const QString &)));
}
示例3: unblockUpdatedSignal
void ContactManager::unblockUpdatedSignal(Contact &contact)
{
contact.data()->unblockUpdatedSignal();
}