/***************************************************************************
                          main.cpp  -  description
                             -------------------
    begin                : mi� may 23 20:36:15 CEST 2001
    copyright            : (C) 2001 by Javier Campos
    email                : javi@asyris.org
***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <kdebug.h>
#include <krecentfilesaction.h>
#include <KApplication>

#include <qfileinfo.h>
#include "keducamainwindow.h"

static const char version[]     = "2.0";

int main(int argc, char *argv[])
{
    KAboutData aboutData( "keduca", 0, ki18n("KEduca"),
                          version, ki18n("Form-based tests and exams"), KAboutData::License_GPL,
                          ki18n("(c) 2001, Javier Campos"), KLocalizedString(), "http://keduca.sourceforge.net");
    aboutData.addAuthor(ki18n("Javier Campos"),ki18n( "Original Author" ), "javi@asyris.org");
    aboutData.addAuthor(ki18n("Klas Kalass"),ki18n( "Maintainer 2002-2004" ), "klas@kde.org");
    aboutData.addAuthor(ki18n("Henrique Pinto"),ki18n( "Maintainer 2004-2006" ), "henrique.pinto@kdemail.net");
    aboutData.addAuthor(ki18n("Anne-Marie Mahfouf"),ki18n( "Various fixes and cleanups" ), "annma@kde.org");
    aboutData.addAuthor(ki18n("Matt Williams"),ki18n( "Current Maintainer" ), "matt@milliams.com");

    aboutData.addCredit(ki18n("Nenad Grujicic"), ki18n("Icons"), "mengele@linuxo.org");

    KCmdLineArgs::init( argc, argv, &aboutData );

    KCmdLineOptions options;
    options.add("+file", ki18n("File to load"));
    KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.

    KApplication a;
    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
    
    KEducaMainWindow *MainWindow = new KEducaMainWindow();
    MainWindow->show();
    
    /*if ( args->count() > 0 )
    {
        if( QFileInfo( KUrl(args->url(0)).url() ).completeSuffix() == "edugallery" )
          keducaTestMaster->initGallery( args->url(0) );
          else
          keducaTestMaster->slotFileOpenURL( args->url(0) );
    }*/
    
    args->clear();
    
    return a.exec();
}
