parley
practicestatemachine.cpp
Go to the documentation of this file.
80 m_mode = new ExampleSentenceBackendMode(m_frontend, this, m_sessionManager, m_document->document());
216 grade_t goodGrade = qMax(grade, grade_t(KV_LEV1_GRADE)); // if the word hasn't been practiced yet, use grade 1 as a base
218 // Normal mode: check if current word was not answered wrong -> if yes, mark next grade as achievable
219 // Alternative mode (3 consecutive answers): check if word was not answered wrong and two consecutive times correct -> if yes, mark next grade as achievable
221 (m_current->statisticBadCount() == 0 && m_current->answeredCorrectInSequence() == 2 && Prefs::altLearn())) {
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...
void practiceFinished()
virtual TestEntry * nextTrainingEntry()
Get the next entry to show to the user.
Definition: sessionmanagerbase.cpp:124
virtual void showQuestion()=0
enter question mode - the user is asked to provide the solution
virtual void setBoxes(grade_t currentBox, grade_t newBoxIfCorrect, grade_t newBoxIfWrong)=0
static EnumPracticeMode::type practiceMode()
Get The practice method that is currently selected.
Definition: prefs.h:1324
void updateStatisticsRightAnswer(grade_t currentPreGrade, grade_t currentGrade)
update the internal statistics for this practice with a right result
Definition: testentry.cpp:64
static bool flashcardsFrontImage()
Get Show images on the front of the flashcard.
Definition: prefs.h:260
virtual void showGrade(int preGrade, int grade)=0
virtual void checkAnswer()=0
Check if the current answer is right.
virtual void setQuestionImage(const KUrl &img)=0
virtual void removeCurrentEntryFromPractice()
Finish the currently active entry.
Definition: sessionmanagerbase.cpp:160
virtual void setQuestionFont(const QFont &font)=0
virtual void setLessonName(const QString &lesson)=0
virtual QFont learningLangFont() const =0
Definition: parleydocument.h:29
int allEntryCount() const
The number of entries available for the practice session.
Definition: sessionmanagerbase.cpp:172
virtual QFont knownLangFont() const =0
fonts for learning and known languages.
bool isEmpty() const
virtual void setMode(Mode mode)=0
switch between different modes such as written, flash card, etc
int activeEntryCount()
The number of entries that are still to be practiced.
Definition: sessionmanagerbase.cpp:177
void slotPracticeFinished()
Definition: practicestatemachine.cpp:127
virtual void updateGrades()
Change the grades for the current entry.
Definition: abstractbackendmode.cpp:63
void updateStatisticsWrongAnswer(grade_t currentPreGrade, grade_t currentGrade)
update the internal statistics for this practice with a wrong result
Definition: testentry.cpp:96
virtual void practiceFinished()
Definition: sessionmanagerbase.cpp:112
virtual bool setTestEntry(TestEntry *current)
start practicing a new word.
Definition: abstractbackendmode.cpp:28
virtual void setFinishedWordsTotalWords(int finished, int total)=0
The status such as lesson or number of words has changed.
virtual void showSolution()=0
enter show solution mode - the solution is shown
virtual void setFeedbackState(ResultState feedbackState)=0
The feedback state tells the user if the currently entered word is correct (independent of whether th...
virtual grade_t currentGradeForEntry() const
The grade of the current entry - this has a default implementation to return the grade for the curren...
Definition: abstractbackendmode.cpp:58
virtual void setSolutionFont(const QFont &font)=0
Definition: abstractfrontend.h:26
PracticeStateMachine(AbstractFrontend *frontend, ParleyDocument *doc, SessionManagerBase *sessionManager, QObject *parent=0)
Definition: practicestatemachine.cpp:31
virtual void setSolutionImage(const KUrl &img)=0
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void stopPractice()
bool shouldChangeGrades()
check if the entry was finished and the practice backend may update the grades that will be saved to ...
Definition: testentry.cpp:91
static bool flashcardsBackImage()
Get Show images on the back of the flashcard.
Definition: prefs.h:279
virtual ResultState resultState()=0
virtual grade_t currentPreGradeForEntry() const
The pregrade of the current entry - this has a default implementation to return the pregrade for the ...
Definition: abstractbackendmode.cpp:53
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.