kabc Library API Documentation

testaddressee.cpp

00001 #include <kaboutdata.h> 00002 #include <kapplication.h> 00003 #include <kdebug.h> 00004 #include <klocale.h> 00005 #include <kcmdlineargs.h> 00006 #include <kstandarddirs.h> 00007 00008 #include "addressbook.h" 00009 #include "resourcefile.h" 00010 #include "binaryformat.h" 00011 #include "vcardformat.h" 00012 #include "phonenumber.h" 00013 00014 using namespace KABC; 00015 00016 static const KCmdLineOptions options[] = 00017 { 00018 { "save", "", 0 }, 00019 { "number", "", 0 }, 00020 KCmdLineLastOption 00021 }; 00022 00023 int main(int argc,char **argv) 00024 { 00025 KAboutData aboutData("testaddressee","TestAddressee","0.1"); 00026 KCmdLineArgs::init(argc, argv, &aboutData); 00027 KCmdLineArgs::addCmdLineOptions(options); 00028 00029 KApplication app; 00030 KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); 00031 00032 kdDebug() << "Creating a" << endl; 00033 Addressee a; 00034 00035 kdDebug() << "tick1" << endl; 00036 a.setGivenName("Hans"); 00037 kdDebug() << "tick2" << endl; 00038 a.setPrefix("Dr."); 00039 00040 kdDebug() << "Creating b" << endl; 00041 Addressee b( a ); 00042 00043 kdDebug() << "tack1" << endl; 00044 a.setFamilyName("Wurst"); 00045 kdDebug() << "tack2" << endl; 00046 a.setNickName("hansi"); 00047 00048 kdDebug() << "Creating c" << endl; 00049 Addressee c = a; 00050 00051 kdDebug() << "tock1" << endl; 00052 c.setGivenName("Eberhard"); 00053 00054 a.dump(); 00055 b.dump(); 00056 c.dump(); 00057 }
KDE Logo
This file is part of the documentation for kabc Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 8 11:15:48 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003