Changeset View
Changeset View
Standalone View
Standalone View
src/collection/testentry.h
Show All 9 Lines | |||||
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * | ||
11 | * * | 11 | * * | ||
12 | ***************************************************************************/ | 12 | ***************************************************************************/ | ||
13 | 13 | | |||
14 | 14 | | |||
15 | #ifndef TESTENTRY_H | 15 | #ifndef TESTENTRY_H | ||
16 | #define TESTENTRY_H | 16 | #define TESTENTRY_H | ||
17 | 17 | | |||
18 | #include <functional> | ||||
19 | | ||||
18 | #include <QFlags> | 20 | #include <QFlags> | ||
19 | 21 | | |||
20 | #include <keduvocexpression.h> | 22 | #include <keduvocexpression.h> | ||
21 | 23 | | |||
22 | class TestEntry | 24 | class TestEntry | ||
23 | { | 25 | { | ||
24 | public: | 26 | public: | ||
25 | enum ErrorType { | 27 | enum ErrorType { | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | |||||
89 | 91 | | |||
90 | void setLanguageFrom(int from); | 92 | void setLanguageFrom(int from); | ||
91 | void setLanguageTo(int to); | 93 | void setLanguageTo(int to); | ||
92 | int languageFrom() const; | 94 | int languageFrom() const; | ||
93 | int languageTo() const; | 95 | int languageTo() const; | ||
94 | 96 | | |||
95 | KEduVocExpression *entry() const; | 97 | KEduVocExpression *entry() const; | ||
96 | 98 | | |||
99 | grade_t practiceModeDependentMinGrade() const; | ||||
100 | grade_t practiceModeDependentMinPreGrade() const; | ||||
101 | grade_t practiceModeDependentMaxGrade() const; | ||||
102 | grade_t practiceModeDependentMaxPreGrade() const; | ||||
103 | | ||||
104 | private: | ||||
105 | grade_t practiceModeDependentGrade(std::function<grade_t(KEduVocText)> gradeFunc, | ||||
106 | std::function<grade_t(grade_t, grade_t)> minMaxFunc) const; | ||||
107 | | ||||
97 | private: | 108 | private: | ||
98 | /// the entry itself | 109 | /// the entry itself | ||
99 | KEduVocExpression *m_entry; | 110 | KEduVocExpression *m_entry; | ||
100 | 111 | | |||
101 | int m_languageFrom; // Index of the language this entry is from | 112 | int m_languageFrom; // Index of the language this entry is from | ||
102 | int m_languageTo; // Index of the language this entry is from | 113 | int m_languageTo; // Index of the language this entry is from | ||
103 | 114 | | |||
104 | // These are for the current entry only, so that we can display | 115 | // These are for the current entry only, so that we can display | ||
Show All 23 Lines |