moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / ktouch / src / main.cpp
blob7b4ff3dd4d29a3e1bfa63b5752146ffafcb5b58e
1 /***************************************************************************
2 * ktouch.cpp *
3 * ---------- *
4 * Copyright (C) 2000 by Håvard Frøiland, 2004 by Andreas Nicolai *
5 * ghorwin@users.sourceforge.net *
6 * *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 ***************************************************************************/
13 #include "ktouch.h"
14 #include <kaboutdata.h>
15 #include <kcmdlineargs.h>
17 #include <kdebug.h>
19 static const char description[] =
20 I18N_NOOP("A program that helps you to learn and practice touch typing");
22 static const char version[] = "1.4";
24 static KCmdLineOptions options[] = {
25 { "+[URL]", I18N_NOOP( "Training file to open" ), 0 },
26 KCmdLineLastOption
29 int main(int argc, char **argv)
31 KAboutData about("ktouch",
32 I18N_NOOP("KTouch"),
33 version,
34 description,
35 KAboutData::License_GPL,
36 "Copyright (C) 2000 by Håvard Frøiland, 2004 by Andreas Nicolai",
38 "http://edu.kde.org/ktouch",
39 "submit@bugs.kde.org");
40 about.addAuthor( "Andreas Nicolai", 0, "Andreas.Nicolai@gmx.net" );
41 about.addAuthor( "Håvard Frøiland", 0, "haavard@users.sourceforge.net" );
42 about.addCredit( "David Vignoni", I18N_NOOP("Creator of the SVG icon."), "david80v@tin.it");
43 about.addCredit( "Anne-Marie Mahfouf", I18N_NOOP("Lots of patches, fixes, updates..."), "annma@kde.org");
44 about.addCredit( "All the creators of training and keyboard files...", 0, 0);
45 KCmdLineArgs::init(argc, argv, &about);
46 KCmdLineArgs::addCmdLineOptions( options );
47 KApplication app;
48 KTouch *mainWin = 0;
50 if (app.isRestored()) {
51 RESTORE(KTouch);
53 else
55 // no session.. just start up normally
56 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
57 // TODO: check the command line for a training file and set this as the new to open training file
59 /* TODO: turn splash screen on in release
60 KTouchSplash splash; // create the splash screen
61 splash.setHideEnabled( true ); // allow user to click the splash screen away
62 splash.show(); // show it
63 QTimer splashTimer;
64 splashTimer.connect(&splashTimer, SIGNAL(timeout()), &splash, SLOT(hide()));
65 splashTimer.start(2000, true); // start singleshot timer to hide the splashscreen
68 mainWin = new KTouch();
69 app.setMainWidget( mainWin );
71 mainWin->show();
72 args->clear();
75 return app.exec();