parley
genderbackendmode.cpp
Go to the documentation of this file.
24 GenderBackendMode::GenderBackendMode(const PracticeOptions& practiceOptions, AbstractFrontend* frontend, QObject* parent, Practice::TestEntryManager* testEntryManager, KEduVocDocument* doc)
57 Q_ASSERT(entry->entry()->translation(m_practiceOptions.languageTo())->wordType()->wordType() & KEduVocWordFlag::Noun);
59 setQuestion(i18n("Choose the right article for \"%1\"", entry->entry()->translation(m_practiceOptions.languageFrom())->text()));
97 if (entry->entry()->translation(m_practiceOptions.languageTo())->wordType()->wordType() & KEduVocWordFlag::Masculine) {
100 } else if (entry->entry()->translation(m_practiceOptions.languageTo())->wordType()->wordType() & KEduVocWordFlag::Feminine) {
112 kDebug() << "article right - old grade: " << m_current->entry()->translation(m_practiceOptions.languageTo())->article().grade();
113 KEduVocText articleGrade = m_current->entry()->translation(m_practiceOptions.languageTo())->article();
118 kDebug() << "article right - new grade: " << m_current->entry()->translation(m_practiceOptions.languageTo())->article().grade();
121 KEduVocText articleGrade = m_current->entry()->translation(m_practiceOptions.languageTo())->article();
void setCorrectAnswer(int index)
The correct solution, index of the choices.
Definition: multiplechoicebackendmode.cpp:83
Definition: practiceoptions.h:22
void setChoices(const QStringList &choices)
This must include the correct answer.
Definition: multiplechoicebackendmode.cpp:78
virtual void updateGrades()
Change the grades for the current entry.
Definition: genderbackendmode.cpp:109
Definition: testentrymanager.h:31
AbstractFrontend * m_frontend
Definition: abstractbackendmode.h:83
GenderBackendMode(const PracticeOptions &PracticeOptions, AbstractFrontend *frontend, QObject *parent, Practice::TestEntryManager *testEntryManager, KEduVocDocument *doc)
Definition: genderbackendmode.cpp:24
Definition: abstractfrontend.h:25
PracticeOptions m_practiceOptions
Definition: abstractbackendmode.h:82
void setQuestion(const QString &question)
Set the question/original language.
Definition: multiplechoicebackendmode.cpp:68
virtual void prepareChoices(TestEntry *current)
set the list of possible answers.
Definition: genderbackendmode.cpp:55
virtual ResultState resultState()=0
static int solutionLanguage()
Get The language in which the user has to answer.
Definition: prefs.h:1186
Definition: testentry.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.