From: Pino Toscano Date: Mon, 27 Aug 2007 16:01:04 +0000 (+0000) Subject: remove old stuff, said frederik X-Git-Tag: v3.93.0~33 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=82ecdf6e5ef13aa526d802985031b9e93c8ba84f;p=libqmvoc.git remove old stuff, said frederik svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=705265 --- diff --git a/keduvocdocument/keduvocexpression.cpp b/keduvocdocument/keduvocexpression.cpp index 0613650..13e452a 100644 --- a/keduvocdocument/keduvocexpression.cpp +++ b/keduvocdocument/keduvocexpression.cpp @@ -36,35 +36,6 @@ public: KEduVocExpression* q; -// QString m_original; - - // all these vectors must be deleted in removeTranslation() -// QStringList m_expressionTypes; -// QStringList m_translations; -// QStringList m_remarks; -// QStringList m_usageLabels; -// QStringList m_paraphrases; -// QStringList m_fauxAmi; -// QStringList m_reverseFauxAmi; -// QStringList m_synonym; -// QStringList m_example; -// QStringList m_antonym; -// QStringList m_pronunciations; - -/* - QList m_grades; - QList m_reverseGrades; - QList m_queryCounts; - QList m_reverseQueryCounts; - QList m_badCounts; - QList m_reverseBadCounts; - QList m_queryDates; - QList m_reverseQueryDates; - QList m_conjugations; - QList m_comparisons; - QList m_multipleChoices; -*/ - QString m_leitnerBox; int m_sortIndex; int m_lesson; @@ -80,17 +51,8 @@ void KEduVocExpression::KEduVocExpressionPrivate::init() { m_translations.clear(); -// m_grades.append(KV_NORM_GRADE); -// m_reverseGrades.append(KV_NORM_GRADE); m_inQuery = false; m_active = true; -// m_queryCounts.append(0); -// m_reverseQueryCounts.append(0); -// m_badCounts.append(0); -// m_reverseBadCounts.append(0); -// QDateTime dt; -// m_queryDates.append(dt); -// m_reverseQueryDates.append(dt); m_lesson = 0; m_sortIndex = 0; m_sizeHint = 0; @@ -101,27 +63,6 @@ bool KEduVocExpression::KEduVocExpressionPrivate::operator==(const KEduVocExpres { return m_translations == p.m_translations && -// m_expressionTypes == p.m_expressionTypes && -// m_remarks == p.m_remarks && -// m_usageLabels == p.m_usageLabels && -// m_paraphrases == p.m_paraphrases && -// m_fauxAmi == p.m_fauxAmi && -// m_reverseFauxAmi == p.m_reverseFauxAmi && -// m_synonym == p.m_synonym && -// m_example == p.m_example && -// m_antonym == p.m_antonym && -// m_pronunciations == p.m_pronunciations && -// m_grades == p.m_grades && -// m_reverseGrades == p.m_reverseGrades && -// m_queryCounts == p.m_queryCounts && -// m_reverseQueryCounts == p.m_reverseQueryCounts && -// m_badCounts == p.m_badCounts && -// m_reverseBadCounts == p.m_reverseBadCounts && -// m_queryDates == p.m_queryDates && -// m_reverseQueryDates == p.m_reverseQueryDates && -// m_conjugations == p.m_conjugations && -// m_comparisons == p.m_comparisons && -// m_multipleChoices == p.m_multipleChoices && m_leitnerBox == p.m_leitnerBox && m_lesson == p.m_lesson && m_sortIndex == p.m_sortIndex && @@ -195,408 +136,9 @@ int KEduVocExpression::translationCount() const return d->m_translations.size(); } -/* -QString KEduVocExpression::remark(int index) const -{ - if (index >= d->m_remarks.count() || index < 0) { - return ""; - } - else { - return d->m_remarks[index]; - } -} - - -void KEduVocExpression::setRemark(int index, const QString & expr) -{ - if (index < 0) - return; - - // extend remarks with empty strings if necessary - if (d->m_remarks.count() <= index) - for (int i = d->m_remarks.count(); i < index + 1; i++) - d->m_remarks.append(""); - - d->m_remarks[index] = expr.simplified(); -} - - -void KEduVocExpression::setFauxAmi(int index, const QString & expr, bool rev_ami) -{ - if (index < 1) - return; - - if (rev_ami) { - // extend friend with empty strings if necessary - if (d->m_reverseFauxAmi.count() <= index) - for (int i = d->m_reverseFauxAmi.count(); i < index + 1; i++) - d->m_reverseFauxAmi.append(""); - - d->m_reverseFauxAmi[index] = expr.simplified(); - } - else { - // extend friend with empty strings if necessary - if (d->m_fauxAmi.count() <= index) - for (int i = d->m_fauxAmi.count(); i < index + 1; i++) - d->m_fauxAmi.append(""); - - d->m_fauxAmi[index] = expr.simplified(); - } -} - - -QString KEduVocExpression::fauxAmi(int index, bool rev_ami) const -{ - if (rev_ami) { - if (index >= d->m_reverseFauxAmi.count() || index < 1) { - return ""; - } - - return d->m_reverseFauxAmi[index]; - } - - if (index >= d->m_fauxAmi.count() || index < 1) { - return ""; - } - - return d->m_fauxAmi[index]; -} - - -void KEduVocExpression::setSynonym(int index, const QString & expr) -{ - if (index < 0) - return; - - // extend synonym with empty strings if necessary - if (d->m_synonym.count() <= index) - for (int i = d->m_synonym.count(); i < index + 1; i++) - d->m_synonym.append("-"); - - d->m_synonym[index] = expr.simplified(); -} - - -QString KEduVocExpression::synonym(int index) const -{ - if (index >= d->m_synonym.count() || index < 0) { - return ""; - } - else { - return d->m_synonym[index]; - } -} - - -void KEduVocExpression::setExample(int index, const QString & expr) -{ - if (index < 0) - return; - - // extend exampls with empty strings if necessary - if (d->m_example.count() <= index) - for (int i = d->m_example.count(); i < index + 1; i++) - d->m_example.append(""); - - d->m_example[index] = expr.simplified(); -} - - -QString KEduVocExpression::example(int index) const -{ - if (index >= d->m_example.count() || index < 0) { - return ""; - } - else { - return d->m_example[index]; - } -} - - -void KEduVocExpression::setUsageLabel(int index, const QString & expr) -{ - if (index < 0) - return; - - // extend labels with empty strings if necessary - if (d->m_usageLabels.count() <= index) - for (int i = d->m_usageLabels.count(); i < index + 1; i++) - d->m_usageLabels.append(""); - - d->m_usageLabels[index] = expr.simplified(); -} - - -QString KEduVocExpression::usageLabel(int index) const -{ - if (index >= d->m_usageLabels.count() || index < 0) { - return ""; - } - else { - return d->m_usageLabels[index]; - } -} - - -void KEduVocExpression::setParaphrase(int index, const QString & expr) -{ - if (index < 0) - return; - - // extend phrase with empty strings if necessary - if (d->m_paraphrases.count() <= index) - for (int i = d->m_paraphrases.count(); i < index + 1; i++) - d->m_paraphrases.append(""); - - d->m_paraphrases[index] = expr.simplified(); -} - - -QString KEduVocExpression::paraphrase(int index) const -{ - if (index >= d->m_paraphrases.count() || index < 0) { - return ""; - } - else { - return d->m_paraphrases[index]; - } -} - - -void KEduVocExpression::setAntonym(int index, const QString & expr) -{ - if (index < 0) - return; - - // extend antonym with empty strings if necessary - if (d->m_antonym.count() <= index) - for (int i = d->m_antonym.count(); i < index + 1; i++) - d->m_antonym.append(""); - - d->m_antonym[index] = expr.simplified(); -} - - -QString KEduVocExpression::antonym(int index) const -{ - if (index >= d->m_antonym.count() || index < 0) { - return ""; - } - else { - return d->m_antonym[index]; - } -} -*/ - -/* -void KEduVocExpression::setConjugation(int index, const KEduVocConjugation &con) -{ - if (index < 0) - return; - - // extend conjugation with empty elements - if (d->m_conjugations.count() <= index) - for (int i = d->m_conjugations.count(); i < index + 1; i++) - d->m_conjugations.append(KEduVocConjugation()); - - d->m_conjugations[index] = con; -} - - -KEduVocConjugation KEduVocExpression::conjugation(int index) const -{ - if (index >= d->m_conjugations.count() || index < 0) { - return KEduVocConjugation(); - } - else { - return d->m_conjugations[index]; - } -} - - -void KEduVocExpression::setComparison(int index, const KEduVocComparison &con) -{ - if (index < 0) - return; - - // extend comparison with empty elements - if (d->m_comparisons.count() <= index) - for (int i = d->m_comparisons.count(); i < index + 1; i++) - d->m_comparisons.append(KEduVocComparison()); - - d->m_comparisons[index] = con; -} - - -KEduVocComparison KEduVocExpression::comparison (int index) const -{ - if (index >= d->m_comparisons.count() || index < 0) { - return KEduVocComparison(); - } - else { - return d->m_comparisons[index]; - } -} - - -void KEduVocExpression::setMultipleChoice(int index, const KEduVocMultipleChoice &mc) -{ - if (index < 0) - return; - - // extend comparison with empty elements - if (d->m_multipleChoices.count() <= index) - for (int i = d->m_multipleChoices.count(); i < index + 1; i++) - d->m_multipleChoices.append(KEduVocMultipleChoice()); - - d->m_multipleChoices[index] = mc; -} - - -KEduVocMultipleChoice KEduVocExpression::multipleChoice(int index) const -{ - if (index >= d->m_multipleChoices.count() || index < 0) { - return KEduVocMultipleChoice(); - } - else { - return d->m_multipleChoices[index]; - } -} - - -QString KEduVocExpression::pronunciation(int index) const -{ - if (index >= d->m_pronunciations.count() || index < 0) { - return ""; - } - else { - return d->m_pronunciations[index]; - } -} - - -void KEduVocExpression::setPronunciation(int index, const QString & expr) -{ - if (index < 0) return; - - // extend with empty strings if necessary - if (d->m_pronunciations.count() <= index) - for (int i = d->m_pronunciations.count(); i < index + 1; i++) - d->m_pronunciations.append(""); - - d->m_pronunciations[index] = expr.simplified(); -} -*/ - -/* -void KEduVocExpression::addTranslation(const QString & expr, grade_t grade, grade_t rev_grade) -{ - if (d->m_translations.count() > 0) { // we only keep grades for translation 1..n - later this will change, as all combinations are allowed, so only from grades are saved relative to the other languages. As soon as grades are only from grades and moved into the translation class this will become nice and free of sorrows. - if (grade > KV_MAX_GRADE) - grade = KV_MAX_GRADE; - - if (rev_grade > KV_MAX_GRADE) - rev_grade = KV_MAX_GRADE; - - d->m_grades.append(grade); - d->m_reverseGrades.append(rev_grade); - } - //d->m_translations.append(expr.simplified()); - - // keys are always in ascending order, so we can insert with the last key + 1 - // I suppose we deprecate this in favor of setTranslation(index, ... ) - d->m_translations[d->m_translations.keys()[d->m_translations.keys().count()-1] + 1] - = KEduVocTranslation( expr.simplified() ); -} -*/ - -/* -QString KEduVocExpression::translation(int index) const -{ - if ( !d->m_translations.contains(index) ) { - return ""; - } - return d->m_translations.value(index).translation(); -} -*/ - void KEduVocExpression::removeTranslation(int index) { /// @todo IMPLEMENT ME - this will be really easy to implement as soon as the translation class contains all this rubbish. -/* - if (index < 0) - return; - - if (index == 0) { - kDebug() << "Warning - attempting to use removeTranslation(0) to remove the first translation!"; - // This will only work when we get everything moved into a translation class. - d->m_translations[0] = ""; - return; - } - - if (index <= translationCount()) - d->m_translations.removeAt(index); - - if (index < d->m_remarks.count()) - d->m_remarks.removeAt(index - 1); - - if (index < d->m_conjugations.count()) - d->m_conjugations.removeAt(index -1); - - if (index < d->m_comparisons.count()) - d->m_comparisons.removeAt(index - 1); - - if (index < d->m_fauxAmi.count()) - d->m_fauxAmi.removeAt(index - 1); - - if (index < d->m_reverseFauxAmi.count()) - d->m_reverseFauxAmi.removeAt(index - 1); - - if (index < d->m_synonym.count()) - d->m_synonym.removeAt(index - 1); - - if (index < d->m_example.count()) - d->m_example.removeAt(index - 1); - - if (index < d->m_usageLabels.count()) - d->m_usageLabels.removeAt(index - 1); - - if (index < d->m_paraphrases.count()) - d->m_paraphrases.removeAt(index - 1); - - if (index < d->m_antonym.count()) - d->m_antonym.removeAt(index - 1); - - if (index < d->m_expressionTypes.count()) - d->m_expressionTypes.removeAt(index - 1); - - if (index < d->m_pronunciations.count()) - d->m_pronunciations.removeAt(index - 1); - - if (index < d->m_grades.count()) - d->m_grades.removeAt(index - 1); - - if (index < d->m_reverseGrades.count()) - d->m_reverseGrades.removeAt(index - 1); - - if (index < d->m_queryCounts.count()) - d->m_queryCounts.removeAt(index - 1); - - if (index < d->m_reverseQueryCounts.count()) - d->m_reverseQueryCounts.removeAt(index - 1); - - if (index < d->m_badCounts.count()) - d->m_badCounts.removeAt(index - 1); - - if (index < d->m_reverseBadCounts.count()) - d->m_reverseBadCounts.removeAt(index - 1); - - if (index < d->m_queryDates.count()) - d->m_queryDates.removeAt(index - 1); - - if (index < d->m_reverseQueryDates.count()) - d->m_reverseQueryDates.removeAt(index - 1); -*/ } @@ -620,258 +162,6 @@ void KEduVocExpression::setTranslation(int index, const QString & expr) d->m_translations[index] = expr.simplified(); } -/* -grade_t KEduVocExpression::grade(int index, bool rev_grade) const -{ - if (rev_grade) { - if (index >= d->m_reverseGrades.count() || index < 1) { - return KV_NORM_GRADE; - } - else if (d->m_reverseGrades[index] > KV_MAX_GRADE) { - return KV_MAX_GRADE; - } - - return d->m_reverseGrades[index]; - - } - else { - if (index >= d->m_grades.count() || index < 1) { - return KV_NORM_GRADE; - } - else if (d->m_grades[index] > KV_MAX_GRADE) { - return KV_MAX_GRADE; - } - - return d->m_grades[index]; - } -} - - -void KEduVocExpression::setGrade(int index, grade_t grade, bool rev_grade) -{ - if (index < 1) - return; - - if (grade > KV_MAX_GRADE) - grade = KV_MAX_GRADE; - if (grade < KV_MIN_GRADE) - grade = KV_MIN_GRADE; - - if (rev_grade) { - // extend rev grades with standard grade if necessary - if (d->m_reverseGrades.count() <= index) - for (int i = d->m_reverseGrades.count(); i <= index; i++) { - d->m_reverseGrades.append(KV_NORM_GRADE); - } - d->m_reverseGrades[index] = grade; - } - else { - // extend grades with standard grade if necessary - if (d->m_grades.count() <= index) - for (int i = d->m_grades.count(); i <= index; i++) { - d->m_grades.append(KV_NORM_GRADE); - } - d->m_grades[index] = grade; - } -} - - -void KEduVocExpression::incGrade(int index, bool rev_grade) -{ - if (index < 1) - return; - - if (rev_grade) { - // extend rev grades with standard grade if necessary - if (d->m_reverseGrades.count() <= index) - for (int i = d->m_reverseGrades.count(); i <= index; i++) { - d->m_reverseGrades.append(KV_NORM_GRADE); - } - if (d->m_reverseGrades[index] < KV_MAX_GRADE) - d->m_reverseGrades[index]++; - } - else { - // extend grades with standard grade if necessary - if (d->m_grades.count() <= index) - for (int i = d->m_grades.count(); i <= index; i++) { - d->m_grades.append(KV_NORM_GRADE); - } - if (d->m_grades[index] < KV_MAX_GRADE) - d->m_grades[index]++; - } -} - - -void KEduVocExpression::decGrade(int index, bool rev_grade) -{ - if (index < 1) - return; - - if (rev_grade) { - // extend rev grades with standard grade if necessary - if (d->m_reverseGrades.count() <= index) - for (int i = d->m_reverseGrades.count(); i <= index; i++) { - d->m_reverseGrades.append(KV_NORM_GRADE); - } - if (d->m_reverseGrades[index] > KV_MIN_GRADE) - d->m_reverseGrades[index]--; - } - else { - // extend grades with standard grade if necessary - if (d->m_grades.count() <= index) - for (int i = d->m_grades.count(); i <= index; i++) { - d->m_grades.append(KV_NORM_GRADE); - } - if (d->m_grades[index] > KV_MIN_GRADE) - d->m_grades[index]--; - } -} - - -count_t KEduVocExpression::queryCount(int index, bool rev_count) const -{ - if (rev_count) { - if (index >= d->m_reverseQueryCounts.count() || index < 1) { - return 0; - } - - return d->m_reverseQueryCounts[index]; - } - - if (index >= d->m_queryCounts.count() || index < 1) { - return 0; - } - - return d->m_queryCounts[index]; -} - - -void KEduVocExpression::setQueryCount(int index, count_t count, bool rev_count) -{ - if (index < 1) - return; - - if (rev_count) { - // extend rev counts with 0 if necessary - if (d->m_reverseQueryCounts.count() <= index) - for (int i = d->m_reverseQueryCounts.count(); i <= index; i++) { - d->m_reverseQueryCounts.append(0); - } - - d->m_reverseQueryCounts[index] = count; - - } - else { - // extend counts with 0 if necessary - if (d->m_queryCounts.count() <= index) - for (int i = d->m_queryCounts.count(); i <= index; i++) { - d->m_queryCounts.append(0); - } - d->m_queryCounts[index] = count; - } -} - - -count_t KEduVocExpression::badCount(int index, bool rev_count) const -{ - if (rev_count) { - if (index >= d->m_reverseBadCounts.count() || index < 1) { - return 0; - } - - return d->m_reverseBadCounts[index]; - } - - if (index >= d->m_badCounts.count() || index < 1) { - return 0; - } - - return d->m_badCounts[index]; -} - - -void KEduVocExpression::setBadCount(int index, count_t count, bool rev_count) -{ - if (index < 1) - return; - - if (rev_count) { - // extend rev counts with 0 if necessary - if (d->m_reverseBadCounts.count() <= index) - for (int i = d->m_reverseBadCounts.count(); i <= index; i++) { - d->m_reverseBadCounts.append(0); - } - - d->m_reverseBadCounts[index] = count; - - } - else { - // extend counts with 0 if necessary - if (d->m_badCounts.count() <= index) - for (int i = d->m_badCounts.count(); i <= index; i++) { - d->m_badCounts.append(0); - } - d->m_badCounts[index] = count; - } -} - - -QDateTime KEduVocExpression::queryDate(int index, bool rev_date) const -{ - if (rev_date) { - if (index >= d->m_reverseQueryDates.count() || index < 1) - { - QDateTime dt; - dt.setTime_t(0); - return dt; - } - - return d->m_reverseQueryDates[index]; - } - - if (index >= d->m_queryDates.count() || index < 1) - { - QDateTime dt; - dt.setTime_t(0); - return dt; - } - - return d->m_queryDates[index]; -} - - -void KEduVocExpression::setQueryDate(int index, const QDateTime & date, bool rev_date) -{ - if (index < 1) - return; - - if (rev_date) { - // extend rev dates with 0 if necessary - if (d->m_reverseQueryDates.count() <= index) - for (int i = d->m_reverseQueryDates.count(); i <= index; i++) - { - QDateTime dt; - dt.setTime_t(0); - d->m_reverseQueryDates.append(dt); - } - - d->m_reverseQueryDates[index] = date; - - } - else { - // extend dates with 0 if necessary - if (d->m_queryDates.count() <= index) - for (int i = d->m_queryDates.count(); i <= index; i++) - { - QDateTime dt; - dt.setTime_t(0); - d->m_queryDates.append(dt); - } - d->m_queryDates[index] = date; - } -} -*/ - bool KEduVocExpression::uniqueType() const { /// @todo use .keys() instead of translationCount()! @@ -883,32 +173,6 @@ bool KEduVocExpression::uniqueType() const return unique; } -/* -QString KEduVocExpression::type(int index) const -{ - if (index >= d->m_expressionTypes.count() || index < 0) { - return ""; - } - else { - return d->m_expressionTypes[index]; - } -} - - -void KEduVocExpression::setType(int index, const QString &type) -{ - if (index < 0) - return; - - // extend types with empty strings if necessary - if (d->m_expressionTypes.count() <= index) - for (int i = d->m_expressionTypes.count(); i < index + 1; i++) - d->m_expressionTypes.append(""); - - d->m_expressionTypes[index] = type.simplified(); -} -*/ - int KEduVocExpression::lesson() const { return d->m_lesson; @@ -920,43 +184,6 @@ void KEduVocExpression::setLesson(int l) d->m_lesson = l; } -/* -void KEduVocExpression::incQueryCount(int index, bool rev_count) -{ - setQueryCount(index, queryCount(index, rev_count) + 1, rev_count); -} - - -void KEduVocExpression::incBadCount(int index, bool rev_count) -{ - setBadCount(index, badCount(index, rev_count) + 1, rev_count); -} - - -QString KEduVocExpression::original() const -{ - return translation(0); -} - - -void KEduVocExpression::setOriginal(const QString & expr) -{ - if ( d->m_translations.contains(0) ) { - d->m_translations[0].setTranslation(expr); - } else { - d->m_translations[0] = KEduVocTranslation(expr); - } -*/ - /* - if (d->m_translations.count() == 0) { - d->m_translations.append(expr); - } else { - d->m_translations[0] = expr; - }*/ -/* -} -*/ - QString KEduVocExpression::leitnerBox() const { return d->m_leitnerBox; diff --git a/keduvocdocument/keduvocexpression.h b/keduvocdocument/keduvocexpression.h index 7709e7c..0f9e947 100644 --- a/keduvocdocument/keduvocexpression.h +++ b/keduvocdocument/keduvocexpression.h @@ -57,21 +57,6 @@ public: ~KEduVocExpression(); -// *********** -// -// /** adds a new translation of this entry -// * @param expression translation -// * @param grade grade of knowledge of this translation -// * @param reverseGrade dito, in opposite direction -// */ -// void addTranslation(const QString & expression, grade_t grade = KV_NORM_GRADE, grade_t reverseGrade = KV_NORM_GRADE); -// -// /** removes translation -// * -// * @param index number of translation 1..x -// */ -// void removeTranslation(int index); -// /** returns index of lesson (0 = none) */ int lesson() const; @@ -79,182 +64,17 @@ public: /** sets index of lesson (0 = none) */ void setLesson(int l); -// -// /** returns original expression of this entry -// */ -// QString original() const; -// -// /** sets original expression of this entry -// */ -// void setOriginal(const QString & expression); -// -// /** returns number of max. translations of all expressions -// */ -// int translationCount() const; - /** reset all grades of the entry * @param index identifier (language) */ void resetGrades(int index); - - - /** all langs have same type ? * * @return true if all have same type */ bool uniqueType () const; -// -// /** sets type of this expression -// * -// * @param index index of type -// * @param type type of this expression ("" = none) -// */ -// void setType(int index, const QString & type); -// -// /** sets grade of given translation -// * -// * @param index index of translation -// * @param grade number of knowlegde: 0=known, x=numbers not knows -// * @param reverse if true, represents the direction translation to original -// */ -// void setGrade(int index, grade_t grade, bool reverse = false); -// -// /** returns grade of given translation as int -// * -// * @param index index of translation -// * @param reverse if true, represents the direction translation to original -// * @return number of knowlegde: 0=known, x=numbers not knows -// */ -// grade_t grade(int index, bool reverse = false) const; -// -// /** increments grade of given translation -// * -// * @param index index of translation -// * @param reverse if true, represents the direction translation to original -// */ -// void incGrade(int index, bool reverse = false); -// -// /** decrements grade of given translation -// * -// * @param index index of translation -// * @param reverse if true, represents the direction translation to original -// */ -// void decGrade(int index, bool reverse = false); -// -// /** returns last query date of given translation as int -// * -// * @param index index of translation -// * @param reverse if true, represents the direction translation to original -// */ -// QDateTime queryDate(int index, bool reverse = false) const; -// -// /** set last query date of given translation as int -// * -// * @param index index of translation -// * @param date the new date -// * @param reverse if true, represents the direction translation to original -// */ -// void setQueryDate(int index, const QDateTime & date, bool reverse = false); -// -// /** returns conjugations if available -// * -// * @param index index of translation -// */ -// KEduVocConjugation conjugation(int index) const; -// -// /** sets conjugations -// * -// * @param index index of translation -// * @param conjugation conjugation block -// */ -// void setConjugation(int index, const KEduVocConjugation & conjugation); -// -// /** returns comparison if available -// * -// * @param index index of translation -// */ -// KEduVocComparison comparison(int index) const; -// -// /** sets comparison -// * -// * @param index index of translation -// * @param comparison comparison block -// */ -// void setComparison(int index, const KEduVocComparison & comparison); -// -// /** returns multiple choice if available -// * -// * @param index index of multiple choice -// */ -// KEduVocMultipleChoice multipleChoice(int index) const; -// -// /** sets multiple choice -// * -// * @param index index of translation -// * @param mc multiple choice block -// */ -// void setMultipleChoice(int index, const KEduVocMultipleChoice & mc); -// -// /** returns query count of given translation as int -// * -// * @param index index of translation -// * @param reverse if true, represents the direction translation to original -// */ -// count_t queryCount(int index, bool reverse = false) const; -// -// /** set query count of given translation as int -// * -// * @param index index of translation -// * @param count the new count -// * @param reverse if true, represents the direction translation to original -// */ -// void setQueryCount(int index, count_t count, bool reverse = false); -// -// /** returns bad query count of given translation as int -// * -// * @param index index of translation -// * @param reverse dito, in opposite direction -// */ -// count_t badCount(int index, bool reverse = false) const; -// -// /** set bad query count of given translation as int -// * -// * @param index index of translation -// * @param count the new count -// * @param reverse if true, represents the direction translation to original -// */ -// void setBadCount(int index, count_t count, bool reverse = false); -// -// /** increment bad query count of given translation by 1 -// * -// * @param index index of translation -// * @param reverse if true, represents the direction translation to original -// */ -// void incBadCount(int index, bool reverse = false); -// -// /** increment query count of given translation by 1 -// * -// * @param index index of translation -// * @param reverse if true, represents the direction translation to original -// */ -// void incQueryCount(int index, bool reverse = false); -// -// /** sets the box of the Leitner system which actually contains the expression -// * -// * @param box the box's name -// */ -// void setLeitnerBox(const QString & box); -// -// /** returns the name of the Leitner system's box actually containing the expression -// * -// * @return the box's name -// */ -// QString leitnerBox(); -// ************** - /** returns flag if entry is "selected" for queries */ @@ -281,10 +101,6 @@ public: */ QString translationString(int index) const; -// bad -// QMap allTranslations() const; - - void setTranslation(int index, const KEduVocTranslation & translation); /** * Add a translation to this expression @@ -295,21 +111,17 @@ public: void setTranslation(const QString &identifier, const QString & expression); - - /** removes a translation * * @param index number of translation 1..x */ void removeTranslation(int index); - /** returns number of max. translations of all expressions @todo kill this - will be wrong. We now should have a Identifiers class to handle this kind of stuff */ int translationCount() const; - /** * Get a mutable reference to the translation * @param index of the language identifier @@ -319,8 +131,6 @@ public: QList translationIndices ( ) const; - - /** sets the box of the Leitner system which actually contains the expression * * @param box the box's name @@ -333,7 +143,6 @@ public: */ QString leitnerBox() const; - KEduVocExpression& operator=(const KEduVocExpression &expression); bool operator==(const KEduVocExpression &expression) const;