• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

keduca

main.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           main.cpp  -  description
00003                              -------------------
00004     begin                : mié may 23 20:36:15 CEST 2001
00005     copyright            : (C) 2001 by Javier Campos
00006     email                : javi@asyris.org
00007 ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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 ); // Add our own options.
00048 
00049     KApplication a;
00050     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00051     
00052     // start as KEduca TestMaster
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 }

keduca

Skip menu "keduca"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal