/* testaddresses KPilot ** ** Copyright (C) 2006 by Adriaan de Groot #include #include #include #include #include "pilot.h" #include "pilotDateEntry.h" #include "pilotLocalDatabase.h" static const KCmdLineOptions options[] = { {"verbose", "Verbose output", 0}, {"data-dir ","Set data directory", "."}, KCmdLineLastOption }; int main(int argc, char **argv) { KApplication::disableAutoDcopRegistration(); KAboutData aboutData("testdatebook","Test Date Book","0.1"); TDECmdLineArgs::init(argc,argv,&aboutData); TDECmdLineArgs::addCmdLineOptions( options ); KApplication app( false, false ); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); #ifdef DEBUG debug_level= (args->isSet("verbose")) ? 4 : 0; #endif TQString datadir = args->getOption("data-dir"); DEBUGKPILOT << "### testdatebook\n#\n#" << endl; Pilot::setupPilotCodec( CSL1("Latin1") ); PilotLocalDatabase db( datadir, "DatebookDB" ); PilotDateInfo appinfo( &db ); for (unsigned int i=0; i