main.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <kcmdlineargs.h>
00023 #include <kaboutdata.h>
00024 #include <klocale.h>
00025 #include <kglobal.h>
00026
00027 #include "ksync.h"
00028
00029
00030 static const char description[] =
00031 I18N_NOOP("KSync");
00032
00033 static KCmdLineOptions options[] =
00034 {
00035 { "+[File]", I18N_NOOP("file to open"), 0 },
00036 KCmdLineLastOption
00037
00038 };
00039
00040 int main(int argc, char *argv[])
00041 {
00042
00043 KAboutData aboutData( "ksync", I18N_NOOP("KSync"),
00044 "0.1", description, KAboutData::License_GPL,
00045 "(c) 2001, Cornelius Schumacher", 0, 0, "schumacher@kde.org");
00046 aboutData.addAuthor("Cornelius Schumacher",0, "schumacher@kde.org");
00047 KCmdLineArgs::init( argc, argv, &aboutData );
00048 KCmdLineArgs::addCmdLineOptions( options );
00049
00050 KApplication app;
00051 KGlobal::locale()->insertCatalogue("libksync");
00052
00053 if (app.isRestored())
00054 {
00055 RESTORE(KSync);
00056 }
00057 else
00058 {
00059 KSync *ksync = new KSync();
00060 ksync->show();
00061
00062 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00063
00064 if (args->count())
00065 {
00066 ksync->openDocumentFile(args->url(0));
00067 }
00068 else
00069 {
00070 ksync->openDocumentFile();
00071 }
00072 args->clear();
00073 }
00074
00075 return app.exec();
00076 }
This file is part of the documentation for ksync Library Version 3.2.2.