#include <KDebug>
#include "keduvocexpression.h"
-#include "keduvoctranslation.h"
-
class KEduVocExpression::KEduVocExpressionPrivate
{
#include "keduvocgrammar.h"
#include "keduvocmultiplechoice.h"
-
-typedef signed char grade_t;
-typedef unsigned short count_t;
+#include "keduvoctranslation.h"
/**
This class contains one vocabulary expression as an original with one or more
--- /dev/null
+/***************************************************************************
+ Vocabulary Expression Grades for KDE Edu
+ -----------------------------------------------------------------------
+ copyright :(C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "keduvocgrade.h"
+
+// KEduVocGrade::KEduVocGrade()
+// {
+// }
+//
--- /dev/null
+/***************************************************************************
+ Vocabulary Expression Grades for KDE Edu
+ -----------------------------------------------------------------------
+ copyright :(C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KEDUVOCGRADE_H
+#define KEDUVOCGRADE_H
+
+typedef signed char grade_t;
+typedef unsigned short count_t;
+
+/**
+Contains grading information (query date, bad count) for one language with respect to another.
+
+ @author Frederik Gladhorn <frederik.gladhorn@kdemail.net>
+*/
+class KEduVocGrade
+{
+/// @todo make these private and write the according functions like updateQueryDate, increaseGrade, decreaseGrade etc.
+public:
+ grade_t m_grade;
+ count_t m_queryCount;
+ count_t m_badCount;
+ QDateTime m_queryDate;
+};
+
+#endif
-//
-// C++ Implementation: KEduVocTranslationtranslation
-//
-// Description:
-//
-//
-// Author: Frederik Gladhorn <frederik.gladhorn@kdemail.net>, (C) 2007
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
+/***************************************************************************
+ Vocabulary Expression Translation for KDE Edu
+ -----------------------------------------------------------------------
+ copyright :(C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
//#include "keduvocexpression.h"
#include "keduvoctranslation.h"
#include <KDebug>
+/*
class KEduVocTranslationPrivate
{
public:
-/*
+
KEduVocTranslationPrivate () // ( KEduVocTranslation* qq )
//: q ( qq )
{
bool operator== ( const KEduVocTranslationPrivate &p ) const;
//KEduVocTranslation* q;
-*/
- QString m_translation; // This is the word itself. The vocabulary. This is what it is all about.
-
-// QString m_types; // noun:male etc (language dependend)
-// QString m_usageLabel;
-// QString m_comment;
-// QString m_paraphrase;
-// QString m_synonym;
-// QString m_example;
-// QString m_antonym;
-// QString m_pronunciation;
-//
-// //QMap<int, KEduVocConjugation> m_conjugations; /// Conjugations are numbered 0..n with respect to the tenses they are for.
-//
-// KEduVocComparison m_comparison;
-//
-// KEduVocMultipleChoice m_multipleChoice;
-
- // Here come all int indexFrom grades. (If you want, imagine the TO grades as int indexFrom of the other translation. That is where they belong. )
- // User is asked to give THIS here as answer, than the grades go here.
- // User answers, this is the source, grades go to the other translation.
- // Grades go to the translation the user has to supply.
- //not all have to be supplied
-
- //QMap<int, TranslationGrade> m_grades;
-
- // one false friend per other language is allowed
- //QMap<int, QString> m_falseFriends;
};
+*/
/*
void KEduVocTranslation::KEduVocTranslationPrivate::init()
KEduVocTranslation & KEduVocTranslation::operator =(const KEduVocTranslation & translation)
{
- // Check for self-assignment!
- if (this == &translation) { // Same object?
- return *this; // Yes, so skip assignment, and just return *this.
- kDebug() << "Warning - self assignment" << endl;
- }
-//kDebug() << "KEduVocTranslation & KEduVocTranslation::operator =(const KEduVocTranslation & translation)" << translation.d->m_translation << " d: " << d << endl;
-
m_translation = translation.m_translation;
-
-// *d = *translation.d;
-
-// d->m_translation = translation.d->m_translation;
-kDebug() << "KEduVocTranslation & KEduVocTranslation::operator =(const KEduVocTranslation & translation)" << translation.m_translation << "This: " << this << endl;
return *this;
}
-//
-// C++ Interface: keduvocexpressiontranslation
-//
-// Description:
-//
-//
-// Author: Frederik Gladhorn <frederik.gladhorn@kdemail.net>, (C) 2007
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
+/***************************************************************************
+ Vocabulary Expression Translation for KDE Edu
+ -----------------------------------------------------------------------
+ copyright :(C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
#ifndef KEDUVOCEXPRESSIONTRANSLATION_H
#include <QMap>
#include <QString>
-//#include "keduvocgrammar.h"
-//#include "keduvocconjugation.h"
-//#include "keduvocmultiplechoice.h"
-/*
-///@todo move this into a seperate header, I guess
-typedef signed char grade_t;
-typedef unsigned short count_t;
-*/
+#include "keduvocgrade.h"
+#include "keduvocgrammar.h"
+#include "keduvocmultiplechoice.h"
+// @todo: move conjugation to it's proper file #include "keduvocconjugation.h"
+
/**
@author Frederik Gladhorn <frederik.gladhorn@kdemail.net>
*/
-
-class KEduVocTranslationPrivate;
-
class KDEEDUCORE_EXPORT KEduVocTranslation
{
public:
bool operator==(const KEduVocTranslation &translation) const;
private:
-/*
- class TranslationGrade
- {
- public:
- grade_t m_grade;
- count_t m_queryCount;
- count_t m_badCount;
- QDateTime m_queryDate;
- };
-*/
-
//KEduVocTranslationPrivate* const d;
+
+ /// This is the word itself. The vocabulary. This is what it is all about.
QString m_translation;
+ /// noun:male etc (language dependend)
+ QString m_types;
+ QString m_usageLabel;
+ QString m_comment;
+ QString m_paraphrase;
+ QString m_synonym;
+ QString m_example;
+ QString m_antonym;
+ QString m_pronunciation;
+
+ /// Conjugations are numbered 0..n with respect to the tenses they are for.
+ QMap<int, KEduVocConjugation> m_conjugations;
+
+ KEduVocComparison m_comparison;
+
+ KEduVocMultipleChoice m_multipleChoice;
+
+ // Here come all int indexFrom grades. (If you want, imagine the TO grades as int indexFrom of the other translation. That is where they belong. )
+ // User is asked to give THIS here as answer, than the grades go here.
+ // User answers, this is the source, grades go to the other translation.
+ // Grades go to the translation the user has to type/choose/whatever.
+ // not all have to be supplied
+ QMap<int, KEduVocGrade> m_grades;
+
+ /// One false friend string per other language
+ QMap<int, QString> m_falseFriends;
};