keduca
main.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <kcmdlineargs.h>
00019 #include <kaboutdata.h>
00020 #include <kdebug.h>
00021
00022 #include <qfileinfo.h>
00023 #include "keduca.h"
00024
00025 static const char description[] = I18N_NOOP("Form-based tests and exams");
00026 static const char version[] = "1.3";
00027
00028 static KCmdLineOptions options[] =
00029 {
00030 { "+file", I18N_NOOP("File to load"), 0 },
00031 KCmdLineLastOption
00032 };
00033
00034 int main(int argc, char *argv[])
00035 {
00036 KAboutData aboutData( "keduca", I18N_NOOP("KEduca"),
00037 version, description, KAboutData::License_GPL,
00038 "(c) 2001, Javier Campos", 0, "http://keduca.sourceforge.net", "submit@bugs.kde.org");
00039 aboutData.addAuthor("Javier Campos",I18N_NOOP( "Original Author" ), "javi@asyris.org");
00040 aboutData.addAuthor("Klas Kalass",I18N_NOOP( "Maintainer 2002-2004" ), "klas@kde.org");
00041 aboutData.addAuthor("Henrique Pinto",I18N_NOOP( "Current Maintainer" ), "henrique.pinto@kdemail.net");
00042 aboutData.addAuthor("Anne-Marie Mahfouf",I18N_NOOP( "Various fixes and cleanups" ), "annma@kde.org");
00043
00044 aboutData.addCredit("Nenad Grujicic", I18N_NOOP("Icons"), "mengele@linuxo.org");
00045
00046 KCmdLineArgs::init( argc, argv, &aboutData );
00047 KCmdLineArgs::addCmdLineOptions( options );
00048
00049 KApplication a;
00050 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00051
00052
00053 Keduca *keducaTestMaster = new Keduca();
00054 a.setMainWidget(keducaTestMaster);
00055 keducaTestMaster->show();
00056
00057 if ( args->count() > 0 )
00058 {
00059 if( QFileInfo( KURL(args->url(0)).url() ).extension() == "edugallery" )
00060 keducaTestMaster->initGallery( args->url(0) );
00061 else
00062 keducaTestMaster->slotFileOpenURL( args->url(0) );
00063 }
00064
00065 args->clear();
00066
00067 return a.exec();
00068 }