本文整理汇总了C++中kabc::Addressee::timeZone方法的典型用法代码示例。如果您正苦于以下问题:C++ Addressee::timeZone方法的具体用法?C++ Addressee::timeZone怎么用?C++ Addressee::timeZone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kabc::Addressee
的用法示例。
在下文中一共展示了Addressee::timeZone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getValue
//.........这里部分代码省略.........
if ( name == "Prefered address: Label" )
{
KABC::Address a = addr.address( KABC::Address::Pref );
return a.label();
}
if ( name == "Home phone" )
{
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Home );
return phone.number();
}
if ( name == "Business phone" )
{
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Work );
return phone.number();
}
if ( name == "Mobile phone" )
{
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Cell );
return phone.number();
}
if ( name == "Home fax" )
{
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax );
return phone.number();
}
if ( name == "Business fax" )
{
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax );
return phone.number();
}
if ( name == "Car phone" )
{
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Car );
return phone.number();
}
if ( name == "ISDN" )
{
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Isdn );
return phone.number();
}
if ( name == "Pager" )
{
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Pager );
return phone.number();
}
if ( name == "Email" )
return addr.preferredEmail();
if ( name == "Mailer" )
return addr.mailer();
if ( name == "Time zone" )
{
KABC::TimeZone zone = addr.timeZone();
return QString::number( zone.offset() );
}
if ( name == "Geographic position" )
{
KABC::Geo geo = addr.geo();
QString lat;
QString longi;
if( geo.latitude()<0 )
lat = QString( i18n("%1 South") ).arg( -geo.latitude() );
else
lat = QString( i18n("%1 North") ).arg( geo.latitude() );
if( geo.longitude()<0 )
// There is something going wrong, because "W" is replaced by "q ".
// Needs fix.
longi = QString( i18n("%1 West") ).arg( -geo.longitude() );
else
longi = QString( i18n("%1 East") ).arg( geo.longitude() );
return i18n( "Geographic coordinates", "%1, %2" ).arg ( lat, longi );
}
if ( name == "Title" )
return addr.title();
if ( name == "Role" )
return addr.role();
if ( name == "Organization" )
return addr.organization();
if ( name == "Note" )
return addr.note();
if ( name == "productId" )
return addr.productId();
if ( name == "Revision" )
return KGlobal::locale()->formatDate( addr.revision().date() );
if ( name == "sortString" )
return addr.sortString();
if ( name == "URL" )
return addr.url().url();
if ( name == "Secrecy" )
{
KABC::Secrecy secrecy = addr.secrecy();
return KABC::Secrecy::typeLabel( secrecy.type() );
}
return ( i18n("Unkown mail merge variable: %1").arg ( name ) ) ;
}