本文整理汇总了C++中Contact::getNotes方法的典型用法代码示例。如果您正苦于以下问题:C++ Contact::getNotes方法的具体用法?C++ Contact::getNotes怎么用?C++ Contact::getNotes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contact
的用法示例。
在下文中一共展示了Contact::getNotes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: convert
void ContactvCard::convert(const Contact& contact, QByteArray* vCardData)
{
vCard vcard;
vCardProperty name_prop = vCardProperty::createName(contact.first_name.c_str(),
contact.last_name.c_str());
vcard.addProperty(name_prop);
QString formattedName = contact.first_name.c_str() + QString(" ") + contact.last_name.c_str();
name_prop = vCardProperty::createdFormattedName(formattedName);
vcard.addProperty(name_prop);
name_prop = vCardProperty::createKHID(contact.dac_id_string.c_str());
vcard.addProperty(name_prop);
std::string public_key_string = public_key_address(contact.public_key);
name_prop = vCardProperty::createPublicKey(public_key_string.c_str());
vcard.addProperty(name_prop);
name_prop = vCardProperty::createNotes(contact.getNotes());
vcard.addProperty(name_prop);
*vCardData = vcard.toByteArray();
}
示例2: fill
void MainInfo::fill()
{
Contact *contact = m_contact;
if (contact == NULL)
contact = getContacts()->owner();
QString firstName = contact->getFirstName();
firstName = getToken(firstName, '/');
edtFirstName->setText(firstName);
QString lastName = contact->getLastName();
lastName = getToken(lastName, '/');
edtLastName->setText(lastName);
cmbDisplay->clear();
QString name = contact->getName();
if (name.length())
cmbDisplay->insertItem(name);
if (firstName.length() && lastName.length()){
cmbDisplay->insertItem(firstName + " " + lastName);
cmbDisplay->insertItem(lastName + " " + firstName);
}
if (firstName.length())
cmbDisplay->insertItem(firstName);
if (lastName.length())
cmbDisplay->insertItem(lastName);
cmbDisplay->lineEdit()->setText(contact->getName());
edtNotes->setText(contact->getNotes());
QString mails = contact->getEMails();
lstMails->clear();
while (mails.length()){
QString mailItem = getToken(mails, ';', false);
QString mail = getToken(mailItem, '/');
QListViewItem *item = new QListViewItem(lstMails);
item->setText(MAIL_ADDRESS, mail);
item->setText(MAIL_PROTO, mailItem);
item->setPixmap(MAIL_ADDRESS, Pict("mail_generic"));
if ((m_contact == NULL) && mailItem.isEmpty())
item->setText(MAIL_PUBLISH, i18n("Yes"));
}
mailSelectionChanged();
QString phones = contact->getPhones();
lstPhones->clear();
unsigned n = 1;
cmbCurrent->clear();
cmbCurrent->insertItem("");
while (phones.length()){
QString number;
QString type;
unsigned icon = 0;
QString proto;
QString phone = getToken(phones, ';', false);
QString phoneItem = getToken(phone, '/', false);
proto = phone;
number = getToken(phoneItem, ',');
type = getToken(phoneItem, ',');
if (!phoneItem.isEmpty())
icon = atol(getToken(phoneItem, ',').latin1());
QListViewItem *item = new QListViewItem(lstPhones);
fillPhoneItem(item, number, type, icon, proto);
cmbCurrent->insertItem(number);
if (!phoneItem.isEmpty()){
item->setText(PHONE_ACTIVE, "1");
cmbCurrent->setCurrentItem(n);
}
n++;
}
connect(lstPhones, SIGNAL(selectionChanged()), this, SLOT(phoneSelectionChanged()));
phoneSelectionChanged();
}