• 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 <kapplication.h>
00020 #include <kaboutdata.h>
00021 #include <kdebug.h>
00022 
00023 #include <qfileinfo.h>
00024 #include "keducabuilder.h"
00025 
00026 static const char description[] = I18N_NOOP("Form-based tests and exams builder");
00027 static const char version[]     = "1.2.0";
00028 
00029 static KCmdLineOptions options[] =
00030 {
00031     { "+file",          I18N_NOOP("File to load"), 0 },
00032     KCmdLineLastOption
00033 };
00034 
00035 int main(int argc, char *argv[])
00036 {
00037     KAboutData aboutData( "keduca", I18N_NOOP("KEducaBuilder"),
00038                           version, description, KAboutData::License_GPL,
00039                           "(c) 2001, Javier Campos", 0, "http://keduca.sourceforge.net", "submit@bugs.kde.org");
00040     aboutData.addAuthor("Javier Campos",I18N_NOOP("Original Author"), "javi@asyris.org");
00041     aboutData.addAuthor("Klas Kalass",I18N_NOOP("Maintainer 2002-2004"), "klas@kde.org");
00042     aboutData.addAuthor("Anne-Marie Mahfouf",I18N_NOOP("Various fixes and cleanups"), "annma@kde.org");
00043     aboutData.addCredit("Nenad Grujicic", I18N_NOOP("Icons"), "mengele@linuxo.org");
00044     KCmdLineArgs::init( argc, argv, &aboutData );
00045     KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
00046 
00047     KApplication a;
00048     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00049 
00050     // start as KEduca Builder
00051     KEducaBuilder *keducaEditor = new KEducaBuilder();
00052     a.setMainWidget(keducaEditor);
00053     keducaEditor->show();
00054 
00055     if ( args->count() > 0 ){
00056         if( QFileInfo( KURL(args->url(0)).url() ).extension() == "edugallery" )
00057           keducaEditor->initGallery( args->url(0) );
00058           else
00059           keducaEditor->slotFileOpenURL( args->url(0) );
00060     }else
00061         keducaEditor->startChooser();
00062 
00063 
00064     args->clear();
00065 
00066     return a.exec();
00067 }

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