Changeset View
Changeset View
Standalone View
Standalone View
src/collection/entryfilter.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 52 | EntryFilter::EntryFilter(KEduVocDocument* doc, QObject * parent) | |||
---|---|---|---|---|---|
55 | , m_numSets(0) | 55 | , m_numSets(0) | ||
56 | , m_fromTranslation(Prefs::knownLanguage()) | 56 | , m_fromTranslation(Prefs::knownLanguage()) | ||
57 | , m_toTranslation(Prefs::learningLanguage()) | 57 | , m_toTranslation(Prefs::learningLanguage()) | ||
58 | { | 58 | { | ||
59 | if (Prefs::practiceMode() == Prefs::EnumPracticeMode::ConjugationPractice) { | 59 | if (Prefs::practiceMode() == Prefs::EnumPracticeMode::ConjugationPractice) { | ||
60 | DocumentSettings documentSettings(m_doc->url().url() + QString::number(m_toTranslation)); | 60 | DocumentSettings documentSettings(m_doc->url().url() + QString::number(m_toTranslation)); | ||
61 | documentSettings.load(); | 61 | documentSettings.load(); | ||
62 | m_tenses = documentSettings.conjugationTenses(); | 62 | m_tenses = documentSettings.conjugationTenses(); | ||
63 | qDebug() << "Tenses" << m_tenses; | 63 | // qDebug() << "Tenses" << m_tenses; | ||
64 | } | 64 | } | ||
65 | } | 65 | } | ||
66 | /* | 66 | /* | ||
67 | static void debugEntry(const QString &comment, KEduVocExpression *vocexp, | 67 | static void debugEntry(const QString &comment, KEduVocExpression *vocexp, | ||
68 | KEduVocTranslation *from, KEduVocTranslation *to) | 68 | KEduVocTranslation *from, KEduVocTranslation *to) | ||
69 | { | 69 | { | ||
70 | Q_UNUSED(vocexp); | 70 | Q_UNUSED(vocexp); | ||
71 | 71 | | |||
▲ Show 20 Lines • Show All 468 Lines • ▼ Show 20 Line(s) | 462 | while (i != m_entries[setNo].end()) { | |||
540 | } // switch | 540 | } // switch | ||
541 | ++i; | 541 | ++i; | ||
542 | } // while | 542 | } // while | ||
543 | //qDebug() << "Invalid items removed. Remaining: " << m_entries[setNo].count(); | 543 | //qDebug() << "Invalid items removed. Remaining: " << m_entries[setNo].count(); | ||
544 | } | 544 | } | ||
545 | 545 | | |||
546 | QList< TestEntry* > EntryFilter::conjugationTestEntries(bool ignoreBlocked) const | 546 | QList< TestEntry* > EntryFilter::conjugationTestEntries(bool ignoreBlocked) const | ||
547 | { | 547 | { | ||
548 | qDebug() << "Filtering conjugation entries for tenses... " << m_tenses; | 548 | // qDebug() << "Filtering conjugation entries for tenses... " << m_tenses; | ||
549 | 549 | | |||
550 | // TODO CM make this configurable | 550 | // TODO CM make this configurable | ||
551 | enum MODE { | 551 | enum MODE { | ||
552 | M_SEPARATE, | 552 | M_SEPARATE, | ||
553 | M_COMPLETE | 553 | M_COMPLETE | ||
554 | }; | 554 | }; | ||
555 | MODE mode = M_SEPARATE; | 555 | MODE mode = M_SEPARATE; | ||
556 | 556 | | |||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |