parley
#include <sessionmanagerbase.h>
Public Member Functions | |
SessionManagerBase (QWidget *parent) | |
virtual | ~SessionManagerBase () |
int | activeEntryCount () |
int | allEntryCount () const |
QList< TestEntry * > | allTestEntries () const |
QList< TestEntry * > | allUnansweredTestEntries () |
virtual void | initializeTraining ()=0 |
QStringList | multipleChoiceAnswers (int numberChoices) |
virtual TestEntry * | nextTrainingEntry () |
virtual void | practiceFinished () |
virtual void | practiceStarted () |
void | printStatistics () |
virtual void | removeCurrentEntryFromPractice () |
virtual void | setDocument (KEduVocDocument *doc) |
int | statisticTotalCorrectFirstAttempt () |
int | statisticTotalUnanswered () |
int | statisticTotalWrong () |
QString | title () const |
int | totalTime () |
Protected Member Functions | |
bool | isValidMultipleChoiceAnswer (KEduVocExpression *e) |
Protected Attributes | |
QList< TestEntry * > | m_allTestEntries |
QList< TestEntry * > | m_currentEntries |
int | m_currentEntry |
KEduVocDocument * | m_doc |
int | m_knownLanguageIndex |
int | m_learningLanguageIndex |
QList< TestEntry * > | m_notAskedTestEntries |
QWidget * | m_parent |
KRandomSequence | m_randomSequence |
int | m_testType |
QTime | m_time |
int | m_totalTime |
Detailed Description
Definition at line 40 of file sessionmanagerbase.h.
Constructor & Destructor Documentation
|
explicit |
Create a collection of entries to be practiced.
- Parameters
-
doc
Definition at line 40 of file sessionmanagerbase.cpp.
|
virtual |
destructor
Definition at line 50 of file sessionmanagerbase.cpp.
Member Function Documentation
int SessionManagerBase::activeEntryCount | ( | ) |
The number of entries that are still to be practiced.
- Returns
Definition at line 177 of file sessionmanagerbase.cpp.
int SessionManagerBase::allEntryCount | ( | ) | const |
The number of entries available for the practice session.
This is used for statistics at the end of the session.
- Returns
Definition at line 172 of file sessionmanagerbase.cpp.
Get a list of all entries in the test - used by the summary dialog.
Definition at line 167 of file sessionmanagerbase.cpp.
Get a list of all unanswered entries in the test.
Definition at line 182 of file sessionmanagerbase.cpp.
|
pure virtual |
Initialize the lists of entries that will be used in the training from the full set of available entries.
Reimplement this to create other types of training sessions.
Implemented in Practice::SessionManagerContinuous, and Practice::SessionManagerFixed.
|
protected |
Find out if the given expression can be used as a multiple choice answer for the current entry (i.e.
if it's not the answer itself, not a synonym and has a different text)
Definition at line 314 of file sessionmanagerbase.cpp.
QStringList SessionManagerBase::multipleChoiceAnswers | ( | int | numberChoices | ) |
Definition at line 245 of file sessionmanagerbase.cpp.
|
virtual |
Get the next entry to show to the user.
The default implementation refills the active entries up to the max number and selects a random entry from them.
- Returns
- TestEntry* the next entry to be practiced
Definition at line 124 of file sessionmanagerbase.cpp.
|
virtual |
Definition at line 112 of file sessionmanagerbase.cpp.
|
virtual |
Definition at line 106 of file sessionmanagerbase.cpp.
void SessionManagerBase::printStatistics | ( | ) |
Puts some grades on the shell.
Definition at line 229 of file sessionmanagerbase.cpp.
|
virtual |
Finish the currently active entry.
Definition at line 160 of file sessionmanagerbase.cpp.
|
virtual |
Prepare for practice using the entries in this document.
The default implementation selects all available entries in the document into the list allTestEntries and then calls initializeTraining().
Reimplemented in Practice::SessionManagerContinuous.
Definition at line 55 of file sessionmanagerbase.cpp.
int SessionManagerBase::statisticTotalCorrectFirstAttempt | ( | ) |
Definition at line 196 of file sessionmanagerbase.cpp.
int SessionManagerBase::statisticTotalUnanswered | ( | ) |
Definition at line 218 of file sessionmanagerbase.cpp.
int SessionManagerBase::statisticTotalWrong | ( | ) |
Definition at line 207 of file sessionmanagerbase.cpp.
QString SessionManagerBase::title | ( | ) | const |
Retun the title of the document.
Definition at line 101 of file sessionmanagerbase.cpp.
int SessionManagerBase::totalTime | ( | ) |
the time in seconds
Definition at line 118 of file sessionmanagerbase.cpp.
Member Data Documentation
All entries available in the document that fulfill the requirements set in the configuration and the grades in the entries themselves.
Definition at line 159 of file sessionmanagerbase.h.
The list of entries that are being asked.
If one of these is done, it can be deleted and an new one from m_notAskedTestEntries taken.
Definition at line 167 of file sessionmanagerbase.h.
|
protected |
Definition at line 170 of file sessionmanagerbase.h.
|
protected |
Definition at line 147 of file sessionmanagerbase.h.
|
protected |
Definition at line 150 of file sessionmanagerbase.h.
|
protected |
Definition at line 149 of file sessionmanagerbase.h.
All entries that have not been entered into the active set.
Definition at line 162 of file sessionmanagerbase.h.
|
protected |
Definition at line 148 of file sessionmanagerbase.h.
|
protected |
Definition at line 175 of file sessionmanagerbase.h.
|
protected |
Definition at line 151 of file sessionmanagerbase.h.
|
protected |
Definition at line 172 of file sessionmanagerbase.h.
|
protected |
Definition at line 173 of file sessionmanagerbase.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.