本文整理汇总了C++中kabc::Address::setPostOfficeBox方法的典型用法代码示例。如果您正苦于以下问题:C++ Address::setPostOfficeBox方法的具体用法?C++ Address::setPostOfficeBox怎么用?C++ Address::setPostOfficeBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kabc::Address
的用法示例。
在下文中一共展示了Address::setPostOfficeBox方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveAddress
void AddressEditDialog::saveAddress( KABC::Address &addr )
{
addr.setLocality( mLocalityEdit->text() );
addr.setRegion( mRegionEdit->text() );
addr.setPostalCode( mPostalCodeEdit->text() );
addr.setCountry( mCountryCombo->currentText() );
addr.setPostOfficeBox( mPOBoxEdit->text() );
addr.setStreet( mStreetTextEdit->text() );
addr.setLabel( mLabel );
if ( mPreferredCheckBox->isChecked() ) {
KABC::Address::List::Iterator it;
for ( it = mAddressList.begin(); it != mAddressList.end(); ++it )
(*it).setType( (*it).type() & ~( KABC::Address::Pref ) );
addr.setType( addr.type() | KABC::Address::Pref );
} else
addr.setType( addr.type() & ~( KABC::Address::Pref ) );
}
示例2:
KABC::Address VCard21Parser::readAddressFromQStringList(const QStringList &data, const int type)
{
KABC::Address mAddress;
mAddress.setType(type);
if(data.count() > 0)
mAddress.setPostOfficeBox(data[0]);
if(data.count() > 1)
mAddress.setExtended(data[1]);
if(data.count() > 2)
mAddress.setStreet(data[2]);
if(data.count() > 3)
mAddress.setLocality(data[3]);
if(data.count() > 4)
mAddress.setRegion(data[4]);
if(data.count() > 5)
mAddress.setPostalCode(data[5]);
if(data.count() > 6)
mAddress.setCountry(data[6]);
return mAddress;
}
示例3: msTNEFToVPart
//.........这里部分代码省略.........
addressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName",
stringProp( tnefMsg, MAPI_TAG_PR_ASSISTANT ) );
addressee.insertCustom( "KADDRESSBOOK", "X-Department",
stringProp( tnefMsg, MAPI_TAG_PR_DEPARTMENT_NAME ) );
addressee.insertCustom( "KADDRESSBOOK", "X-Office",
stringProp( tnefMsg, MAPI_TAG_PR_OFFICE_LOCATION ) );
addressee.insertCustom( "KADDRESSBOOK", "X-Profession",
stringProp( tnefMsg, MAPI_TAG_PR_PROFESSION ) );
QString s = tnefMsg->findProp( MAPI_TAG_PR_WEDDING_ANNIVERSARY ).
remove( QChar( '-' ) ).remove( QChar( ':' ) );
if ( !s.isEmpty() ) {
addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", s );
}
addressee.setUrl( KUrl( sNamedProp( tnefMsg, MAPI_TAG_CONTACT_WEBPAGE ) ) );
// collect parts of Name entry
addressee.setFamilyName( stringProp( tnefMsg, MAPI_TAG_PR_SURNAME ) );
addressee.setGivenName( stringProp( tnefMsg, MAPI_TAG_PR_GIVEN_NAME ) );
addressee.setAdditionalName( stringProp( tnefMsg, MAPI_TAG_PR_MIDDLE_NAME ) );
addressee.setPrefix( stringProp( tnefMsg, MAPI_TAG_PR_DISPLAY_NAME_PREFIX ) );
addressee.setSuffix( stringProp( tnefMsg, MAPI_TAG_PR_GENERATION ) );
addressee.setNickName( stringProp( tnefMsg, MAPI_TAG_PR_NICKNAME ) );
addressee.setRole( stringProp( tnefMsg, MAPI_TAG_PR_TITLE ) );
addressee.setOrganization( stringProp( tnefMsg, MAPI_TAG_PR_COMPANY_NAME ) );
/*
the MAPI property ID of this (multiline) )field is unknown:
vPart += stringProp(tnefMsg, "\n","NOTE", ... , "" );
*/
KABC::Address adr;
adr.setPostOfficeBox( stringProp( tnefMsg, MAPI_TAG_PR_HOME_ADDRESS_PO_BOX ) );
adr.setStreet( stringProp( tnefMsg, MAPI_TAG_PR_HOME_ADDRESS_STREET ) );
adr.setLocality( stringProp( tnefMsg, MAPI_TAG_PR_HOME_ADDRESS_CITY ) );
adr.setRegion( stringProp( tnefMsg, MAPI_TAG_PR_HOME_ADDRESS_STATE_OR_PROVINCE ) );
adr.setPostalCode( stringProp( tnefMsg, MAPI_TAG_PR_HOME_ADDRESS_POSTAL_CODE ) );
adr.setCountry( stringProp( tnefMsg, MAPI_TAG_PR_HOME_ADDRESS_COUNTRY ) );
adr.setType( KABC::Address::Home );
addressee.insertAddress( adr );
adr.setPostOfficeBox( sNamedProp( tnefMsg, MAPI_TAG_CONTACT_BUSINESSADDRESSPOBOX ) );
adr.setStreet( sNamedProp( tnefMsg, MAPI_TAG_CONTACT_BUSINESSADDRESSSTREET ) );
adr.setLocality( sNamedProp( tnefMsg, MAPI_TAG_CONTACT_BUSINESSADDRESSCITY ) );
adr.setRegion( sNamedProp( tnefMsg, MAPI_TAG_CONTACT_BUSINESSADDRESSSTATE ) );
adr.setPostalCode( sNamedProp( tnefMsg, MAPI_TAG_CONTACT_BUSINESSADDRESSPOSTALCODE ) );
adr.setCountry( sNamedProp( tnefMsg, MAPI_TAG_CONTACT_BUSINESSADDRESSCOUNTRY ) );
adr.setType( KABC::Address::Work );
addressee.insertAddress( adr );
adr.setPostOfficeBox( stringProp( tnefMsg, MAPI_TAG_PR_OTHER_ADDRESS_PO_BOX ) );
adr.setStreet( stringProp( tnefMsg, MAPI_TAG_PR_OTHER_ADDRESS_STREET ) );
adr.setLocality( stringProp( tnefMsg, MAPI_TAG_PR_OTHER_ADDRESS_CITY ) );
adr.setRegion( stringProp( tnefMsg, MAPI_TAG_PR_OTHER_ADDRESS_STATE_OR_PROVINCE ) );
adr.setPostalCode( stringProp( tnefMsg, MAPI_TAG_PR_OTHER_ADDRESS_POSTAL_CODE ) );
adr.setCountry( stringProp( tnefMsg, MAPI_TAG_PR_OTHER_ADDRESS_COUNTRY ) );
adr.setType( KABC::Address::Dom );
addressee.insertAddress( adr );
// problem: the 'other' address was stored by KOrganizer in
// a line looking like the following one:
// vPart += "\nADR;TYPE=dom;TYPE=intl;TYPE=parcel;TYPE=postal;TYPE=work;"
// "TYPE=home:other_pobox;;other_str1\nother_str2;other_loc;other_region;"
// "other_pocode;other_country"