• 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
practicestatemachine.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2010 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 PRACTICESTATEMACHINE_H
16 #define PRACTICESTATEMACHINE_H
17 
18 #include <QtCore/QObject>
19 
20 #include "abstractbackendmode.h"
21 
22 class ParleyDocument;
23 
24 namespace Practice {
25  class TestEntryManager;
26 
27 class PracticeStateMachine : public QObject
28 {
29  Q_OBJECT
30 public:
31  PracticeStateMachine(AbstractFrontend* frontend, ParleyDocument* doc, const PracticeOptions& options, TestEntryManager* testEntryManager, QObject* parent = 0);
32  void start();
33 
34 Q_SIGNALS:
35  void practiceFinished();
36  void stopPractice();
37 
38 public Q_SLOTS:
39  void slotPracticeFinished();
40 
41 private Q_SLOTS:
43  void nextEntry();
44 
45  void continueAction();
46 
47  // these come from the mode
48  void answerRight();
49  void answerWrongRetry();
50  void answerWrongShowSolution();
51  void showSolution();
52 
53  void gradeEntryAndContinue();
54 
55 private:
57  void currentEntryFinished();
58  void createPracticeMode();
59  void updateFrontend();
60 
61  enum State {
62  NotAnswered,
63  AnswerWasWrong,
64  SolutionShown
65  };
66 
67  State m_state;
68 
69  AbstractFrontend* m_frontend;
70  AbstractBackendMode* m_mode;
71  ParleyDocument* m_document;
72  PracticeOptions m_options;
73  TestEntry* m_current;
74  TestEntryManager* m_testEntryManager;
75 };
76 
77 }
78 
79 #endif
Practice::PracticeOptions
Definition: practiceoptions.h:22
Practice::PracticeStateMachine::practiceFinished
void practiceFinished()
Practice::PracticeStateMachine::PracticeStateMachine
PracticeStateMachine(AbstractFrontend *frontend, ParleyDocument *doc, const PracticeOptions &options, TestEntryManager *testEntryManager, QObject *parent=0)
Definition: practicestatemachine.cpp:30
Practice::TestEntryManager
Definition: testentrymanager.h:31
QObject
Practice::PracticeStateMachine
Definition: practicestatemachine.h:27
ParleyDocument
Definition: parleydocument.h:29
abstractbackendmode.h
Practice::PracticeStateMachine::slotPracticeFinished
void slotPracticeFinished()
Definition: practicestatemachine.cpp:126
Practice::AbstractBackendMode
Definition: abstractbackendmode.h:26
Practice::AbstractFrontend
Definition: abstractfrontend.h:25
Practice::PracticeStateMachine::start
void start()
Definition: practicestatemachine.cpp:99
Practice::PracticeStateMachine::stopPractice
void stopPractice()
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