[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-edu-devel
Subject: Re: [kde-edu]: generating word lists for kwordquiz from
From: CPH <CP.Hennessy () openapp ! biz>
Date: 2005-01-13 10:34:42
Message-ID: 200501131034.42991.CP.Hennessy () openapp ! biz
[Download RAW message or body]
On Wednesday 12 January 2005 20:36, Peter Hedlund wrote:
> Hi,
>
> CPH wrote:
> > Hi,
> > Is it a reasonable suggestion for kwordquiz to use the data from
> > kgeography (i.e. city/region) ?
> > I think that it could be generated thru a "simple" XSLT or python script,
> > either during startup or when given a kgeography file ( .kgm ).
>
> With a XSLT it should be possible to present the .kgm file in a
> two-column table. You can then copy and paste that into KWordQuiz.
>
> File a wishlist item if you want KWordQuiz to have the ability to import
> .kgm-files. However, this will probably not happen before KGeography is
> in kdeedu.
>
> > Another good idea for kwordquiz is to be able to give it a command line
> > argument so that it starts in non-edit mode, e.g.
> > kwordquiz --flash file://usr/share/kwordquiz/us_states.kvtml
> > # start in "flashcard" mode with the us_states word quiz
> > kwordquiz --flash file://usr/share/kwordquiz/
> > file://home/teacher/kwordquizes # start and show the "student" only the
> > available files in the directories
> >
> > This should allow the setup of a desktop icon for the student which works
> > quite nicely.
>
> Command line arguments are on my todo list. It's to late to add features
> for 3.4, but something like this will be in 4.0. Please file a wishlist
> item so it's not forgotten and so that others will have the ability to
> vote for it.
Hi Peter,
I actually changed the code for a command line option to select the mode
attached. Is this really considered a "feature" that it cannot be included
for 3.4 ?
Patch attached.
CPH
["kwordquiz-arg-mode.patch" (text/x-diff)]
Index: main.cpp
===================================================================
RCS file: /home/kde/kdeedu/kwordquiz/src/main.cpp,v
retrieving revision 1.6
diff -u -3 -p -u -r1.6 main.cpp
--- main.cpp 26 Jun 2004 18:10:38 -0000 1.6
+++ main.cpp 13 Jan 2005 10:32:04 -0000
@@ -25,7 +25,9 @@ static const char *description = I18N_NO
static KCmdLineOptions options[] =
{
+ { "mode ", I18N_NOOP( "mode to start in: 'multiple', 'flash', 'q+a' and anything \
else is the default mode of 'editor'" ), 0 }, { "+[File]", I18N_NOOP("File to \
open"), 0 }, +
{ 0, 0, 0 }
// INSERT YOUR COMMANDLINE OPTIONS HERE
};
@@ -54,7 +56,20 @@ int main(int argc, char *argv[])
if (args->count())
{
- kwordquiz->openDocumentFile(args->arg(0));
+ kwordquiz->openDocumentFile(args->arg( args-> count() -1 ));
+ QString mode = args->getOption( "mode" );
+ if ( ! mode.isNull() )
+ {
+ if ( mode == "flash" )
+ //kwordquiz->updateSession(WQQuiz::qtFlash);
+ kwordquiz->slotQuizFlash();
+ else if ( mode == "multiple" )
+ //kwordquiz->updateSession(WQQuiz::qtMultiple);
+ kwordquiz->slotQuizMultiple();
+ else if ( mode == "q+a" )
+ //kwordquiz->updateSession(WQQuiz::qtQA);
+ kwordquiz->slotQuizQA();
+ }
}
else
{
_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic