• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

parley

  • sources
  • kde-4.12
  • kdeedu
  • parley
  • src
  • practice
multiplechoicebackendmode.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2009 Frederik Gladhorn <gladhorn@kde.org>
3  ***************************************************************************/
4 
5 /***************************************************************************
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  * *
12  ***************************************************************************/
13 
14 
15 #ifndef MULTIPLECHOICEBACKENDMODE_H
16 #define MULTIPLECHOICEBACKENDMODE_H
17 
18 #include "abstractbackendmode.h"
19 #include "practice/testentrymanager.h"
20 
21 namespace Practice {
22 
23 class MultipleChoiceBackendMode : public AbstractBackendMode
24 {
25  Q_OBJECT
26 
27 public:
28  MultipleChoiceBackendMode(const PracticeOptions& PracticeOptions, AbstractFrontend *frontend, QObject *parent, Practice::TestEntryManager* testEntryManager);
29 
30  virtual bool setTestEntry(TestEntry* current);
31 
32  virtual void checkAnswer();
33 
34 public Q_SLOTS:
35  virtual void hintAction();
36 
37 protected:
41  virtual void prepareChoices(TestEntry* current);
42 
46  void setQuestion(const QString& question);
47 
51  void setChoices(const QStringList& choices);
52 
56  void setCorrectAnswer(int index);
57 
58  int numberOfChoices();
59 
60 private:
61  TestEntryManager* m_testEntryManager;
62  KRandomSequence m_randomSequence;
63  QString m_question;
64  int m_numberOfChoices;
65  QStringList m_choices;
66  int m_correctAnswer;
67  QList<int> m_hints;
68 };
69 
70 }
71 
72 #endif
Practice::MultipleChoiceBackendMode::setCorrectAnswer
void setCorrectAnswer(int index)
The correct solution, index of the choices.
Definition: multiplechoicebackendmode.cpp:83
Practice::PracticeOptions
Definition: practiceoptions.h:22
Practice::MultipleChoiceBackendMode::setChoices
void setChoices(const QStringList &choices)
This must include the correct answer.
Definition: multiplechoicebackendmode.cpp:78
testentrymanager.h
Practice::MultipleChoiceBackendMode::hintAction
virtual void hintAction()
Definition: multiplechoicebackendmode.cpp:101
Practice::TestEntryManager
Definition: testentrymanager.h:31
QObject
Practice::MultipleChoiceBackendMode::numberOfChoices
int numberOfChoices()
Definition: multiplechoicebackendmode.cpp:73
Practice::MultipleChoiceBackendMode::MultipleChoiceBackendMode
MultipleChoiceBackendMode(const PracticeOptions &PracticeOptions, AbstractFrontend *frontend, QObject *parent, Practice::TestEntryManager *testEntryManager)
Definition: multiplechoicebackendmode.cpp:22
abstractbackendmode.h
Practice::MultipleChoiceBackendMode
Definition: multiplechoicebackendmode.h:23
Practice::MultipleChoiceBackendMode::checkAnswer
virtual void checkAnswer()
Check if the current answer is right.
Definition: multiplechoicebackendmode.cpp:89
Practice::AbstractBackendMode
Definition: abstractbackendmode.h:26
Practice::AbstractFrontend
Definition: abstractfrontend.h:25
Practice::MultipleChoiceBackendMode::setTestEntry
virtual bool setTestEntry(TestEntry *current)
start practicing a new word.
Definition: multiplechoicebackendmode.cpp:30
Practice::MultipleChoiceBackendMode::setQuestion
void setQuestion(const QString &question)
Set the question/original language.
Definition: multiplechoicebackendmode.cpp:68
Practice::MultipleChoiceBackendMode::prepareChoices
virtual void prepareChoices(TestEntry *current)
set the list of possible answers.
Definition: multiplechoicebackendmode.cpp:53
TestEntry
Definition: testentry.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal