keduvocgrade.cpp
keduvocgrammar.cpp
keduvocconjugation.cpp
+# keduvocdeclination.cpp
keduvocwordtype.cpp
keduvockvtmlreader.cpp
keduvockvtml2reader.cpp
--- /dev/null
+/***************************************************************************
+
+ C++ Implementation: keduvocdeclination
+
+ -----------------------------------------------------------------------
+
+ begin : Do Sep 20 2007
+
+ 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 "keduvocdeclination.h"
+
+#include <QtCore/QStringList>
+
+class KEduVocDeclination::Private
+{
+public:
+ struct DeclinationCase {
+ QStringList test;
+ };
+
+
+ DeclinationGender m_gender;
+
+ Private();
+};
+
+KEduVocDeclination::Private::Private()
+{
+ m_gender = Undefined;
+}
+
+KEduVocDeclination::KEduVocDeclination()
+ :d (new Private)
+{
+}
+
+KEduVocDeclination::KEduVocDeclination(const KEduVocDeclination & other)
+ :d (new Private)
+{
+}
+
+KEduVocDeclination & KEduVocDeclination::operator =(const KEduVocDeclination & other)
+{
+ d->m_gender = other.d->m_gender;
+}
+
+KEduVocDeclination::~KEduVocDeclination()
+{
+ delete d;
+}
+
+
+
--- /dev/null
+/***************************************************************************
+
+ C++ Interface: keduvocdeclination
+
+ -----------------------------------------------------------------------
+
+ begin : Do Sep 20 2007
+
+ 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 KEDUVOCDECLINATION_H
+#define KEDUVOCDECLINATION_H
+
+/**
+A declination contains all forms that a NOUN possibly can have.
+
+ @author Frederik Gladhorn <frederik.gladhorn@kdemail.net>
+*/
+class KEduVocDeclination{
+public:
+ enum DeclinationNumber {
+ Singular = 1,
+ Dual,
+ Plural
+ };
+
+ enum DeclinationGender {
+ Undefined,
+ Masculine,
+ Feminine,
+ Neuter
+ };
+
+ enum DeclinationCase {
+ Nominative = 1,
+ Genitive,
+ Dative,
+ Accusative,
+ Ablative,
+ Locative,
+ Vocative
+ };
+
+
+ /**
+ * The constructor without arguments
+ */
+ explicit KEduVocDeclination();
+
+ /** copy constructor
+ * @param other comparison object to copy
+ */
+ KEduVocDeclination( const KEduVocDeclination &other );
+
+ ~KEduVocDeclination();
+
+ /** equality operator
+ * @param a object to compare to
+ * @returns true if comparisons are the same, false otherwise
+ */
+// will probably not be necessary
+// bool operator == ( const KEduVocDeclination& a ) const;
+
+ /** assignment operator for d-pointer copying
+ * @param other object to copy from
+ * @returns reference to this object
+ */
+ KEduVocDeclination& operator= ( const KEduVocDeclination& other );
+
+private:
+ class Private;
+ Private * const d;
+};
+
+#endif
{
public:
+ enum ArticleNumber {
+ Singular,
+ Dual,
+ Plural
+ };
+
+ enum ArticleGender {
+ Masculine,
+ Feminine,
+ Neuter
+ };
+
+ enum ArticleDefiniteness {
+ Definite,
+ Indefinite
+ };
+
+
/**
* The constructor without arguments
*/
#include <KDebug>
#include "keduvocgrade.h"
+// #include "keduvocdeclination.h"
class KEduVocTranslation::KEduVocTranslationPrivate
{
public:
/// This is the word itself. The vocabulary. This is what it is all about.
QString m_translation;
- /// Some languages (german) have irregular plurals. Kept here.
- QString m_irregularPlural;
/// Type of a word noun, verb, adjective etc
QString m_type;
QString m_soundUrl;
/// Usages give a context (eg. this word is usually used in [biology])
QSet<QString> m_usages;
+ /// When creating multiple choice tests, these are possible answers. (otherwise other words are added randomly)
+ KEduVocMultipleChoice m_multipleChoice;
+
/// Conjugations of a word (I go, you go, he goes... boring in english)
QMap <QString, KEduVocConjugation> m_conjugations;
/// The comparison forms of adjectives and adverbs: fast, faster, fastest
KEduVocComparison m_comparison;
- /// When creating multiple choice tests, these are possible answers. (otherwise other words are added randomly)
- KEduVocMultipleChoice m_multipleChoice;
+
+// KEduVocDeclination* m_declination;
// 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.
d->m_subType = other.d->m_subType;
d->m_usages = other.d->m_usages;
d->m_comment = other.d->m_comment;
- d->m_irregularPlural = other.d->m_irregularPlural;
d->m_paraphrase = other.d->m_paraphrase;
d->m_synonym = other.d->m_synonym;
d->m_example = other.d->m_example;
d->m_conjugations = conjugations;
}
-void KEduVocTranslation::setIrregularPlural(const QString & plural)
-{
- d->m_irregularPlural = plural;
-}
-
-QString KEduVocTranslation::irregularPlural() const
-{
- return d->m_irregularPlural;
-}
-
/** get the sound url for this translation if it exists */
QString KEduVocTranslation::soundUrl()
{