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

parley

  • Practice
  • SessionManagerBase
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Practice::SessionManagerBase Class Referenceabstract

#include <sessionmanagerbase.h>

Inheritance diagram for Practice::SessionManagerBase:
Inheritance graph
[legend]

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

SessionManagerBase::SessionManagerBase ( QWidget *  parent)
explicit

Create a collection of entries to be practiced.

Parameters
doc

Definition at line 40 of file sessionmanagerbase.cpp.

SessionManagerBase::~SessionManagerBase ( )
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.

QList< TestEntry * > SessionManagerBase::allTestEntries ( ) const

Get a list of all entries in the test - used by the summary dialog.

Definition at line 167 of file sessionmanagerbase.cpp.

QList< TestEntry * > SessionManagerBase::allUnansweredTestEntries ( )

Get a list of all unanswered entries in the test.

Definition at line 182 of file sessionmanagerbase.cpp.

virtual void Practice::SessionManagerBase::initializeTraining ( )
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.

bool SessionManagerBase::isValidMultipleChoiceAnswer ( KEduVocExpression *  e)
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.

TestEntry * SessionManagerBase::nextTrainingEntry ( )
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.

void SessionManagerBase::practiceFinished ( )
virtual

Definition at line 112 of file sessionmanagerbase.cpp.

void SessionManagerBase::practiceStarted ( )
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.

void SessionManagerBase::removeCurrentEntryFromPractice ( )
virtual

Finish the currently active entry.

Definition at line 160 of file sessionmanagerbase.cpp.

void SessionManagerBase::setDocument ( KEduVocDocument *  doc)
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

QList<TestEntry*> Practice::SessionManagerBase::m_allTestEntries
protected

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.

QList<TestEntry*> Practice::SessionManagerBase::m_currentEntries
protected

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.

int Practice::SessionManagerBase::m_currentEntry
protected

Definition at line 170 of file sessionmanagerbase.h.

KEduVocDocument* Practice::SessionManagerBase::m_doc
protected

Definition at line 147 of file sessionmanagerbase.h.

int Practice::SessionManagerBase::m_knownLanguageIndex
protected

Definition at line 150 of file sessionmanagerbase.h.

int Practice::SessionManagerBase::m_learningLanguageIndex
protected

Definition at line 149 of file sessionmanagerbase.h.

QList<TestEntry*> Practice::SessionManagerBase::m_notAskedTestEntries
protected

All entries that have not been entered into the active set.

Definition at line 162 of file sessionmanagerbase.h.

QWidget* Practice::SessionManagerBase::m_parent
protected

Definition at line 148 of file sessionmanagerbase.h.

KRandomSequence Practice::SessionManagerBase::m_randomSequence
protected

Definition at line 175 of file sessionmanagerbase.h.

int Practice::SessionManagerBase::m_testType
protected

Definition at line 151 of file sessionmanagerbase.h.

QTime Practice::SessionManagerBase::m_time
protected

Definition at line 172 of file sessionmanagerbase.h.

int Practice::SessionManagerBase::m_totalTime
protected

Definition at line 173 of file sessionmanagerbase.h.


The documentation for this class was generated from the following files:
  • sessionmanagerbase.h
  • sessionmanagerbase.cpp
This file is part of the KDE documentation.
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.

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