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

parley

  • Practice
  • AbstractBackendMode
Public Slots | Signals | Public Member Functions | Protected Attributes | List of all members
Practice::AbstractBackendMode Class Referenceabstract

#include <abstractbackendmode.h>

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

Public Slots

virtual void checkAnswer ()=0
 
virtual void hintAction ()=0
 

Signals

void answerRight ()
 
void answerWrongRetry ()
 
void answerWrongShowSolution ()
 
void nextEntry ()
 
void removeCurrentEntryFromPractice ()
 
void showSolution ()
 

Public Member Functions

 AbstractBackendMode (const PracticeOptions &practiceOptions, AbstractFrontend *frontend, QObject *parent)
 
virtual ~AbstractBackendMode ()
 
void addSynonym (const QString &entry)
 
virtual grade_t currentGradeForEntry ()
 
virtual bool setTestEntry (TestEntry *current)
 
virtual void updateGrades ()
 

Protected Attributes

TestEntry * m_current
 
AbstractFrontend * m_frontend
 
PracticeOptions m_practiceOptions
 
QStringList m_synonyms
 

Detailed Description

Definition at line 26 of file abstractbackendmode.h.

Constructor & Destructor Documentation

AbstractBackendMode::AbstractBackendMode ( const PracticeOptions &  practiceOptions,
Practice::AbstractFrontend *  frontend,
QObject *  parent 
)

Definition at line 19 of file abstractbackendmode.cpp.

virtual Practice::AbstractBackendMode::~AbstractBackendMode ( )
inlinevirtual

Definition at line 33 of file abstractbackendmode.h.

Member Function Documentation

void Practice::AbstractBackendMode::addSynonym ( const QString &  entry)
inline

add a new synonym to the list of shown/answered synonyms depending on which mode we are in.

Definition at line 41 of file abstractbackendmode.h.

void Practice::AbstractBackendMode::answerRight ( )
signal
void Practice::AbstractBackendMode::answerWrongRetry ( )
signal
void Practice::AbstractBackendMode::answerWrongShowSolution ( )
signal
virtual void Practice::AbstractBackendMode::checkAnswer ( )
pure virtualslot

Check if the current answer is right.

This function should emit one of these signals: answerRight, answerWrongRetry, answerWrongShowSolution or showSolution

Implemented in Practice::ComparisonBackendMode, Practice::WrittenBackendMode, and Practice::MultipleChoiceBackendMode.

grade_t Practice::AbstractBackendMode::currentGradeForEntry ( )
virtual

The grade of the current entry - this has an default implementation to return the grade for the current translation.

This is used in the frontend to visualize the grade. If the practice is not on the translation itself but for example conjugations, the mode needs to re-implement this function in order to change the grades of the correct parts of the translation. For modes that work on several words, this should return the worst grade of them.

Returns
the grade

Reimplemented in Practice::ConjugationBackendMode.

Definition at line 41 of file abstractbackendmode.cpp.

virtual void Practice::AbstractBackendMode::hintAction ( )
pure virtualslot

the frontend requested a hint

void Practice::AbstractBackendMode::nextEntry ( )
signal

ask for the next word to be practiced

void Practice::AbstractBackendMode::removeCurrentEntryFromPractice ( )
signal
bool AbstractBackendMode::setTestEntry ( TestEntry *  current)
virtual

start practicing a new word.

sets some default that can be overwritten by the modes. m_frontend->showQuestion() should be called after the initialization.

Reimplemented in Practice::ComparisonBackendMode, Practice::ConjugationBackendMode, Practice::WrittenBackendMode, Practice::MultipleChoiceBackendMode, Practice::ExampleSentenceBackendMode, and Practice::FlashCardBackendMode.

Definition at line 27 of file abstractbackendmode.cpp.

void Practice::AbstractBackendMode::showSolution ( )
signal
void Practice::AbstractBackendMode::updateGrades ( )
virtual

Change the grades for the current entry.

The default implementation changes the grade of the current translation. Modes working on other parts of the translations need to re-implement this.

Reimplemented in Practice::ComparisonBackendMode, Practice::ConjugationBackendMode, and Practice::GenderBackendMode.

Definition at line 46 of file abstractbackendmode.cpp.

Member Data Documentation

TestEntry* Practice::AbstractBackendMode::m_current
protected

Definition at line 84 of file abstractbackendmode.h.

AbstractFrontend* Practice::AbstractBackendMode::m_frontend
protected

Definition at line 83 of file abstractbackendmode.h.

PracticeOptions Practice::AbstractBackendMode::m_practiceOptions
protected

Definition at line 82 of file abstractbackendmode.h.

QStringList Practice::AbstractBackendMode::m_synonyms
protected

Definition at line 85 of file abstractbackendmode.h.


The documentation for this class was generated from the following files:
  • abstractbackendmode.h
  • abstractbackendmode.cpp
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