parley
entryfilter.cpp
Go to the documentation of this file.
121 //kDebug() << "Document contains " << m_entries[0].count() + m_entries[1].count() << " valid entries.";
166 ui.wordTypeCheckBox->setChecked(m_entriesWordType[0].count() + m_entriesWordType[1].count() == 0);
167 ui.blockedCheckBox->setChecked(m_entriesNotBlocked[0].count() + m_entriesNotBlocked[1].count() == 0);
168 ui.timesWrongCheckBox->setChecked(m_entriesTimesWrong[0].count() + m_entriesTimesWrong[1].count() == 0);
169 ui.timesPracticedCheckBox->setChecked(m_entriesTimesPracticed[0].count() + m_entriesTimesPracticed[1].count() == 0);
170 ui.minMaxGradeCheckBox->setChecked(m_entriesMinMaxGrade[0].count() + m_entriesMinMaxGrade[1].count() == 0);
265 entry->translation(m_toTranslation)->setPracticeDate(QDateTime::currentDateTime().addSecs(-Prefs::expireItem(grade - 2)));
280 // FIXME the filtering needs to be done for each word or the grammar modes get included with written or somesuch
287 KMessageBox::error(0, i18n("The vocabulary document contains no articles for the current language. Please add some in the Edit->Grammar menu."));
448 if (entry->translation(m_toTranslation)->badCount() >= Prefs::practiceMinimumWrongCount() && entry->translation(m_toTranslation)->badCount() <= Prefs::practiceMaximumWrongCount()) {
457 if (entry->translation(m_toTranslation)->practiceCount() >= Prefs::practiceMinimumTimesAsked() && entry->translation(m_toTranslation)->practiceCount() <= Prefs::practiceMaximumTimesAsked()) {
475 i18n("You selected to practice the genders of nouns, but no appropriate nouns could be found. Use \"Edit Entry\" and select Noun as word type and the gender."),
481 i18n("You selected to practice comparison forms, but no adjectives or adverbs containing comparison forms could be found. Use \"Edit Entry\" and select Adverb or Adjective as word type and enter the comparison forms."),
486 KMessageBox::information(0, i18n("You selected to practice conjugations, but no vocabulary containing conjugations in the tenses you selected could be found. Use \"Edit Entry\" and select Verb as word type and enter the conjugation forms."), i18n("No valid word type found"));
492 if ( KMessageBox::questionYesNo(0, i18n("<p>The units you selected for the practice contain no entries when the threshold settings are respected.</p><p>Hint: To configure the thresholds use the \"Threshold Page\" in the \"Configure Practice\" dialog.</p><p>Would you like to ignore the threshold setting?</p>"), i18n("No Entries with Current Threshold Settings") ) == KMessageBox::No ) {
551 || ((*i)->translation(m_toTranslation)->comparative().isEmpty() || (*i)->translation(m_toTranslation)->superlative().isEmpty())) {
static bool wordTypesInPracticeEnabled()
Get Only selected word types will be included in practice.
Definition: prefs.h:1191
static void debugEntry(const QString &comment, KEduVocExpression *vocexp, KEduVocTranslation *from, KEduVocTranslation *to)
Definition: entryfilter.cpp:63
Definition: entryfilter.h:31
static EnumPracticeMode::type practiceMode()
Get The practice method that is currently selected.
Definition: prefs.h:1324
static int practiceMinimumGrade()
Get The entry must have at least this confidence level to be included in the practice (0...
Definition: prefs.h:1153
static int practiceMaximumTimesAsked()
Get The entry must have been asked at most this often to be included in the practice.
Definition: prefs.h:1096
bool contains(const QString &str, Qt::CaseSensitivity cs) const
Definition: documentsettings.h:9
EntryFilter(KEduVocDocument *doc, QObject *parent)
Definition: entryfilter.cpp:50
static int expireItem(int i)
Get Amount of time after which different confidence levels should expire.
Definition: prefs.h:1381
const_iterator insert(const T &value)
int size() const
static int blockItem(int i)
Get Amount of time different confidence levels should be blocked.
Definition: prefs.h:1362
void setConjugationTense(const QString &tense)
Definition: testentry.cpp:159
static int practiceMinimumTimesAsked()
Get The entry must have been asked at least this often to be included in the practice.
Definition: prefs.h:1077
QString number(int n, int base)
int count(const T &value) const
static bool expire()
Get In Blocking Query Tab Dialog, if checked then the Query accepts an expiring time.
Definition: prefs.h:317
static int practiceMinimumWrongCount()
Get The entry must have been answered incorrectly at least this often to be included in the practice...
Definition: prefs.h:1115
static int practiceMaximumWrongCount()
Get The entry must have been answered incorrectly at most this often to be included in the practice...
Definition: prefs.h:1134
static EnumPracticeDirection::type practiceDirection()
Get The practice mode that is currently selected.
Definition: prefs.h:1343
static bool block()
Get In Blocking Query Tab Dialog, if checked then the Query is blocked.
Definition: prefs.h:298
static int practiceMaximumGrade()
Get The entry must have at most this confidence level to be included in the practice (0...
Definition: prefs.h:1172
int count() const
iterator begin()
iterator erase(iterator pos)
void setConjugationPronouns(const QList< KEduVocWordFlags > &flags)
Definition: testentry.cpp:169
QDateTime currentDateTime()
QSet< T > & intersect(const QSet< T > &other)
void insert(int i, const T &value)
QSet< T > fromList(const QList< T > &list)
static bool allowImageInsteadOfWord()
Get Allow using images instead of words in flashcards.
Definition: prefs.h:735
QDateTime addSecs(int s) const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
QList< TestEntry * > entries(bool showDialog=true)
Returns the list of test entries after filtering out invalid entries according to the settings...
Definition: entryfilter.cpp:71
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.