parley
writtenbackendmode.cpp
Go to the documentation of this file.
60 m_firstAttempt = m_firstAttempt && isSynonym; // don't count the answer as wrong if you only enter valid synonyms
113 return i18n("Your answer was wrong as capitalization mistakes are not accepted. Please try again.");
132 return i18n("Your answer was right... but not on the first try and your capitalization was wrong.");
149 if (m_frontend->userInput().toString() == m_current->entry()->translation(m_current->languageTo())->text()) {
void clear()
virtual void setResultState(ResultState resultState)=0
The result state indicated whether a word is counted as correct (and grades are raised) and can be ch...
virtual void setHint(const QVariant &hint)=0
virtual void showQuestion()=0
enter question mode - the user is asked to provide the solution
void addSynonym(const QString &entry)
add a new synonym to the list of shown/answered synonyms depending on which mode we are in...
Definition: abstractbackendmode.h:41
void answerRight()
int size() const
bool contains(const QString &str, Qt::CaseSensitivity cs) const
void clear()
virtual bool setTestEntry(TestEntry *current)
start practicing a new word.
Definition: writtenbackendmode.cpp:31
AbstractFrontend * m_frontend
Definition: abstractbackendmode.h:121
virtual QVariant userInput()=0
Enables access to the input of the user.
QStringList m_synonyms
Definition: abstractbackendmode.h:123
bool isEmpty() const
virtual void setFeedback(const QVariant &feedback)=0
virtual void setSynonym(const QString &entry)=0
set a new synonym that should be shown
virtual bool setTestEntry(TestEntry *current)
start practicing a new word.
Definition: abstractbackendmode.cpp:28
virtual void hintAction()
Definition: writtenbackendmode.cpp:141
static bool countSynonymsAsCorrect()
Get When the synonym instead of the word was entered, does it count as correct?
Definition: prefs.h:678
void answerWrongShowSolution()
static bool ignoreAccentMistakes()
Get Count answers as right when only the accentuation is wrong.
Definition: prefs.h:507
virtual void showSolution()=0
enter show solution mode - the solution is shown
void validateAnswer(const QString &answer)
Definition: writtenpracticevalidator.cpp:94
WrittenBackendMode(Practice::AbstractFrontend *frontend, QObject *parent, Practice::SessionManagerBase *sessionManager, KEduVocDocument *doc)
Definition: writtenbackendmode.cpp:21
virtual void setFeedbackState(ResultState feedbackState)=0
The feedback state tells the user if the currently entered word is correct (independent of whether th...
Definition: abstractfrontend.h:26
QString left(int n) const
void answerWrongRetry()
QString getCorrectedAnswer()
Definition: writtenpracticevalidator.cpp:132
static bool ignoreCapitalizationMistakes()
Get Count answers as right when only the capitalization is wrong.
Definition: prefs.h:526
QString toString() const
void setEntry(TestEntry *entry)
Definition: writtenpracticevalidator.cpp:56
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
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.