22 #include <tdeapplication.h>
23 #include <tdecmdlineargs.h>
25 #include <tdeaboutdata.h>
27 #include "vcardformatimpl.h"
32 main(
int argc,
char **argv )
34 TDEAboutData aboutData(
"testvcardformatimpl",
"vCard format plugin",
"0.1" );
44 addressee.setNickName( TQString::fromUtf8(
"иванчо") );
45 addressee.setBirthday( TQDate( 1981, 7, 19 ) );
46 addressee.setMailer(
"mutt1.2" );
52 addressee.setGeo( geo );
54 addressee.setTitle( TQString::fromUtf8(
"Др") );
55 addressee.setRole( TQString::fromUtf8(
"Самарянин") );
56 addressee.setOrganization( TQString::fromUtf8(
"България ООД") );
57 addressee.setNote( TQString::fromUtf8(
"не\nпипай работеща система") );
58 addressee.setProductId(
"testId" );
59 addressee.setRevision( TQDateTime::currentDateTime() );
60 addressee.setSortString( TQString::fromUtf8(
"сортиране") );
61 addressee.setUrl(
KURL(
"http://wgess17.dyndns.org") );
62 addressee.setSecrecy( TDEABC::Secrecy( TDEABC::Secrecy::Confidential ) );
84 addressee.
insertEmail( TQString::fromUtf8(
"иван.иванов@българия.оод"),
true );
85 addressee.
insertEmail( TQString::fromUtf8(
"иванчо@yahoo.de"),
true );
87 TDEABC::PhoneNumber phone1(
"029876543", TDEABC::PhoneNumber::Pref | TDEABC::PhoneNumber::Home );
95 TQStringList categories;
96 categories <<
"Friends" <<
"School" <<
"KDE";
99 TDEABC::Address a( TDEABC::Address::Work | TDEABC::Address::Postal | TDEABC::Address::Parcel );
100 a.setStreet( TQString::fromUtf8(
"Цар Борис III") );
101 a.setLocality( TQString::fromUtf8(
"София" ));
102 a.setRegion( TQString::fromUtf8(
"София град" ));
103 a.setPostalCode( TQString::fromUtf8(
"1000" ));
104 a.setCountry( TQString::fromUtf8(
"България" ));
107 addressee.
insertCustom(
"1hsdf",
"test1",TQString::fromUtf8(
"ежзик" ));
108 addressee.
insertCustom(
"2hsdf",
"test2",TQString::fromUtf8(
"ежзик" ));
109 addressee.
insertCustom(
"3hsdf",
"test3",TQString::fromUtf8(
"ежзик" ));
113 kdDebug() <<
">>>>>>>>>>>>>>>>END FIRST ADDRESSEE<<<<<<<<<<<<<<" <<
endl;
134 TQFile file(
"vfimpout.vcf" );
135 if ( file.open(IO_WriteOnly) ){
136 vcfImpl->save(addressee, &file);
143 if ( file.open(IO_ReadOnly ) ){
144 vcfImpl->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)
kndbgstream & endl(kndbgstream &s)
kdbgstream kdDebug(int area=0)
static data, shared by ALL addressee objects