22 #include <tdeapplication.h>
23 #include <tdecmdlineargs.h>
25 #include <tdeaboutdata.h>
27 #include "vcardformatplugin.h"
38 main(
int argc,
char **argv )
40 TDEAboutData aboutData(
"testvcardformatplugin",
"vCard format plugin",
"0.1" );
50 addressee.setNickName( TQString::fromUtf8(
"иванчо") );
51 addressee.setBirthday( TQDate( 1981, 7, 19 ) );
52 addressee.setMailer(
"mutt1.2" );
58 addressee.setGeo( geo );
60 addressee.setTitle( TQString::fromUtf8(
"Др") );
61 addressee.setRole( TQString::fromUtf8(
"Самарянин") );
62 addressee.setOrganization( TQString::fromUtf8(
"България ООД") );
63 addressee.setNote( TQString::fromUtf8(
"не\nпипай работеща система") );
64 addressee.setProductId(
"testId" );
65 addressee.setRevision( TQDateTime::currentDateTime() );
66 addressee.setSortString( TQString::fromUtf8(
"сортиране") );
67 addressee.setUrl(
KURL(
"http://wgess17.dyndns.org") );
68 addressee.setSecrecy( TDEABC::Secrecy( TDEABC::Secrecy::Confidential ) );
90 addressee.
insertEmail( TQString::fromUtf8(
"иван.иванов@българия.оод"),
true );
91 addressee.
insertEmail( TQString::fromUtf8(
"иванчо@yahoo.de"),
true );
93 TDEABC::PhoneNumber phone1(
"029876543", TDEABC::PhoneNumber::Pref | TDEABC::PhoneNumber::Home );
101 TQStringList categories;
102 categories <<
"Friends" <<
"School" <<
"KDE";
105 TDEABC::Address a( TDEABC::Address::Work | TDEABC::Address::Postal | TDEABC::Address::Parcel );
106 a.setStreet( TQString::fromUtf8(
"Цар Борис III") );
107 a.setLocality( TQString::fromUtf8(
"София" ));
108 a.setRegion( TQString::fromUtf8(
"София град" ));
109 a.setPostalCode( TQString::fromUtf8(
"1000" ));
110 a.setCountry( TQString::fromUtf8(
"България" ));
113 addressee.
insertCustom(
"1hsdf",
"test1",TQString::fromUtf8(
"ежзик" ));
114 addressee.
insertCustom(
"2hsdf",
"test2",TQString::fromUtf8(
"ежзик" ));
115 addressee.
insertCustom(
"3hsdf",
"test3",TQString::fromUtf8(
"ежзик" ));
138 TQFile file(
"vfout.vcf" );
139 if ( file.open(IO_WriteOnly) ){
140 vcfplugin->
save(addressee, &file);
147 if ( file.open(IO_ReadOnly ) ){
148 vcfplugin->
load(addressee2, &file);
Postal address information.
void setCategories(const TQStringList &)
Set categories to given value.
void insertPhoneNumber(const PhoneNumber &phoneNumber)
Insert a phone number.
void insertCustom(const TQString &app, const TQString &name, const TQString &value)
Insert custom entry.
void dump() const
Debug output.
void insertEmail(const TQString &email, bool preferred=false)
Insert an email address.
void insertAddress(const Address &address)
Insert an address.
DECLARATIONS void setNameFromString(const TQString &)
Set name fields by parsing the given string and trying to associate the parts of the string with acco...
void insertKey(const Key &key)
Insert a key.
void setLongitude(float)
Sets the longitude.
void setLatitude(float)
Sets the latitude.
A class to store an encryption key.
static void init(int _argc, char **_argv, const char *_appname, const char *programName, const char *_description, const char *_version, bool noKApp=false)
static data, shared by ALL addressee objects