00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "test.h"
00021 #include <kapplication.h>
00022 #include <kaboutdata.h>
00023 #include <kcmdlineargs.h>
00024 #include <klocale.h>
00025
00026 static const char description[] = "A test application for the KoProperty library";
00027
00028 static const char version[] = "0.2";
00029
00030 static KCmdLineOptions options[] =
00031 {
00032 { "flat", "Flat display: don't display groups\n(useful for testing)", 0 },
00033 { "ro", "Set all properties as read-only:\n(useful for testing read-only mode)", 0 },
00034 KCmdLineLastOption
00035 };
00036
00037 int main(int argc, char **argv)
00038 {
00039 KAboutData about("proptest", "KoProperty Test", version, description,
00040 KAboutData::License_GPL, "(C) 2005 Cedric Pasteur", 0, 0, "cedric.pasteur@free.fr");
00041 about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr" );
00042 KCmdLineArgs::init(argc, argv, &about);
00043 KCmdLineArgs::addCmdLineOptions( options );
00044 KApplication app;
00045 Test *mainWin = 0;
00046
00047 if (app.isSessionRestored())
00048 {
00049 RESTORE(Test);
00050 }
00051 else
00052 {
00053
00054 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00055
00057
00058 mainWin = new Test();
00059 mainWin->show();
00060
00061 args->clear();
00062 }
00063
00064
00065 return app.exec();
00066 }
00067