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

parley

  • sources
  • kde-4.14
  • 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 {
26 class SessionManagerBase;
27 
28 class PracticeStateMachine : public QObject
29 {
30  Q_OBJECT
31 public:
32  PracticeStateMachine(AbstractFrontend* frontend, ParleyDocument* doc,
33  SessionManagerBase* sessionManager,
34  QObject* parent = 0);
35  void start();
36 
37 Q_SIGNALS:
38  void practiceFinished();
39  void stopPractice();
40 
41 public Q_SLOTS:
42  void slotPracticeFinished();
43 
44 private Q_SLOTS:
46  void nextEntry();
47 
48  void continueAction();
49 
50  // these come from the mode
51  void answerRight();
52  void answerWrongRetry();
53  void answerWrongShowSolution();
54  void showSolution();
55 
56  void gradeEntryAndContinue();
57 
58 private:
60  void currentEntryFinished();
61  void createPracticeMode();
62  void updateFrontend();
63 
64  enum State {
65  NotAnswered,
66  AnswerWasWrong,
67  SolutionShown
68  };
69 
70  State m_state;
71 
72  AbstractFrontend* m_frontend;
73  AbstractBackendMode* m_mode;
74  ParleyDocument* m_document;
75  TestEntry* m_current;
76  SessionManagerBase* m_sessionManager;
77 };
78 
79 }
80 
81 #endif
Practice::PracticeStateMachine::practiceFinished
void practiceFinished()
Practice::PracticeStateMachine
Definition: practicestatemachine.h:28
ParleyDocument
Definition: parleydocument.h:29
QObject
abstractbackendmode.h
Practice::PracticeStateMachine::slotPracticeFinished
void slotPracticeFinished()
Definition: practicestatemachine.cpp:127
Practice::AbstractBackendMode
Definition: abstractbackendmode.h:26
Practice::AbstractFrontend
Definition: abstractfrontend.h:26
Practice::PracticeStateMachine::PracticeStateMachine
PracticeStateMachine(AbstractFrontend *frontend, ParleyDocument *doc, SessionManagerBase *sessionManager, QObject *parent=0)
Definition: practicestatemachine.cpp:31
Practice::SessionManagerBase
Definition: sessionmanagerbase.h:40
Practice::PracticeStateMachine::start
void start()
Definition: practicestatemachine.cpp:100
QObject::parent
QObject * parent() const
Practice::PracticeStateMachine::stopPractice
void stopPractice()
TestEntry
Definition: testentry.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 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
  • 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