void QtVCardAddressLabelField::setAddressLabel(const VCard::AddressLabel& addressLabel) { setPreferred(addressLabel.isPreferred); setHome(addressLabel.isHome); setWork(addressLabel.isWork); getTagComboBox()->setTag("postal", addressLabel.isPostal); getTagComboBox()->setTag("parcel", addressLabel.isParcel); domesticRadioButton->setChecked(addressLabel.deliveryType == VCard::DomesticDelivery); internationalRadioButton->setChecked(addressLabel.deliveryType == VCard::InternationalDelivery); std::string joinedLines = boost::algorithm::join(addressLabel.lines, "\n"); addressLabelPlainTextEdit->setPlainText(P2QSTRING(joinedLines)); }
void QtVCardAddressField::setAddress(const VCard::Address& address) { setPreferred(address.isPreferred); setHome(address.isHome); setWork(address.isWork); getTagComboBox()->setTag("postal", address.isPostal); getTagComboBox()->setTag("parcel", address.isParcel); domesticRadioButton->setChecked(address.deliveryType == VCard::DomesticDelivery); internationalRadioButton->setChecked(address.deliveryType == VCard::InternationalDelivery); streetLineEdit->setText(P2QSTRING(address.street)); poboxLineEdit->setText(P2QSTRING(address.poBox)); addressextLineEdit->setText(P2QSTRING(address.addressExtension)); cityLineEdit->setText(P2QSTRING(address.locality)); pocodeLineEdit->setText(P2QSTRING(address.postalCode)); regionLineEdit->setText(P2QSTRING(address.region)); countryLineEdit->setText(P2QSTRING(address.country)); }