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

parley

AnswerValidator Class Reference

#include <answervalidator.h>

List of all members.


Detailed Description

Provides different comparison methods to determine the quality of the answer.

Author:
Frederik Gladhorn <frederik.gladhorn@kdemail.net>

Definition at line 31 of file answervalidator.h.


Public Member Functions

 AnswerValidator (KEduVocDocument *doc)
 ~AnswerValidator ()
bool spellcheckerAvailable ()
void setTestEntry (TestEntry *entry)
void setLanguage (int translation)
void checkUserAnswer (const QString &userAnswer)
void checkUserAnswer (const QString &solution, const QString &userAnswer, const QString &language=QString())

Constructor & Destructor Documentation

AnswerValidator::AnswerValidator ( KEduVocDocument *  doc  ) 

Definition at line 50 of file answervalidator.cpp.

AnswerValidator::~AnswerValidator (  ) 

Definition at line 58 of file answervalidator.cpp.


Member Function Documentation

bool AnswerValidator::spellcheckerAvailable (  ) 

Definition at line 500 of file answervalidator.cpp.

void AnswerValidator::setTestEntry ( TestEntry *  entry  ) 

Sets the current entry.

This has to be set before trying to validate! It will store the results.

Parameters:
expression 

Definition at line 92 of file answervalidator.cpp.

void AnswerValidator::setLanguage ( int  translation  ) 

Set the language for the spell checker.

(Identifierindex)

Parameters:
translation 

Definition at line 64 of file answervalidator.cpp.

void AnswerValidator::checkUserAnswer ( const QString &  userAnswer  ) 

Checks the user answer.

If the answer was correct, 1.0 is set as lastPercentage for the TestEntry, 0.0 means no relation between answer and solution whatsoever. The type of mistake is also set in the TestEntry.

Parameters:
userAnswer 

Definition at line 290 of file answervalidator.cpp.

void AnswerValidator::checkUserAnswer ( const QString &  solution,
const QString &  userAnswer,
const QString &  language = QString() 
)

Definition at line 303 of file answervalidator.cpp.


The documentation for this class was generated from the following files:
  • answervalidator.h
  • answervalidator.cpp

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal