1 /***************************************************************************
4 begin : Wed Jul 24 20:12:30 PDT 2002
5 copyright : (C) 2002-2003 by Peter Hedlund
6 email : peter@peterandlinda.com
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #include <kcmdlineargs.h>
19 #include <kaboutdata.h>
21 #include "kwordquiz.h"
24 static const char *description
= I18N_NOOP("A powerful flashcard and vocabulary learning program");
26 static KCmdLineOptions options
[] =
29 { "mode <number>", I18N_NOOP("A number 1-5 corresponding to the \nentries in the Mode menu"), 0 },
31 { "goto <session>", I18N_NOOP("Type of session to start with: \n'flash' for flashcard, \n'mc' for multiple choice, \n'qa' for question and answer"), 0 },
32 { "+[File]", I18N_NOOP("File to open"), 0 },
36 int main(int argc
, char *argv
[])
38 KAboutData
aboutData( "kwordquiz", I18N_NOOP("KWordQuiz"), KWQ_VERSION
, description
, KAboutData::License_GPL
, "(c) 2003-2005, Peter Hedlund", 0, 0, "peter@peterandlinda.com");
39 aboutData
.addAuthor("Peter Hedlund", 0, "peter@peterandlinda.com");
40 aboutData
.addCredit("Anne-Marie Mahfouf", I18N_NOOP("KDE Edutainment Maintainer"), "annma@kde.org", 0);
42 KCmdLineArgs::init( argc
, argv
, &aboutData
);
43 KCmdLineArgs::addCmdLineOptions( options
); // Add our own options.
49 RESTORE(KWordQuizApp
);
53 KWordQuizApp
*kwordquiz
= new KWordQuizApp();
56 KCmdLineArgs
*args
= KCmdLineArgs::parsedArgs();
60 kwordquiz
->openDocumentFile(args
->arg(args
->count() - 1));
61 QCString mode
= args
->getOption("mode");
65 kwordquiz
->slotMode1();
67 kwordquiz
->slotMode2();
69 kwordquiz
->slotMode3();
71 kwordquiz
->slotMode4();
73 kwordquiz
->slotMode5();
75 QCString go_to
= args
->getOption("goto");
79 kwordquiz
->slotQuizFlash();
81 kwordquiz
->slotQuizMultiple();
83 kwordquiz
->slotQuizQA();
88 kwordquiz
->openDocumentFile();