]> Git trees. - libqmvoc.git/commitdiff
clean up conjugation and add a grade to it
authorFrederik Gladhorn <gladhorn@kde.org>
Sun, 21 Oct 2007 19:00:37 +0000 (19:00 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Sun, 21 Oct 2007 19:00:37 +0000 (19:00 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=727788

keduvocdocument/keduvocconjugation.cpp
keduvocdocument/keduvocconjugation.h

index bc1996f99d89a826b4778f16cbb617c44be576b1..e387f51a6a3a3f73aa0264e1b301bc23af37ec16 100644 (file)
 class KEduVocConjugation::Private
 {
 public:
-    Private();
-
-    bool m_thirdCommonSingular;
-    bool m_thirdCommonDual;
-    bool m_thirdCommonPlural;
+    KEduVocGrade m_grade;
     QMap<int, QString> m_conjugations;
 };
 
 
-KEduVocConjugation::Private::Private()
-{
-    m_thirdCommonSingular = false;
-    m_thirdCommonDual = false;
-    m_thirdCommonPlural = false;
-}
-
 KEduVocConjugation::KEduVocConjugation()
         : d( new Private )
 {}
@@ -53,9 +42,7 @@ KEduVocConjugation::KEduVocConjugation()
 KEduVocConjugation::KEduVocConjugation( const KEduVocConjugation& other )
         : d( new Private )
 {
-    d->m_thirdCommonSingular = other.d->m_thirdCommonSingular;
-    d->m_thirdCommonDual = other.d->m_thirdCommonDual;
-    d->m_thirdCommonPlural = other.d->m_thirdCommonPlural;
+    d->m_grade = other.d->m_grade;
     d->m_conjugations = other.d->m_conjugations;
 }
 
@@ -68,9 +55,7 @@ KEduVocConjugation::~KEduVocConjugation()
 
 KEduVocConjugation& KEduVocConjugation::operator = ( const KEduVocConjugation& other )
 {
-    d->m_thirdCommonSingular = other.d->m_thirdCommonSingular;
-    d->m_thirdCommonDual = other.d->m_thirdCommonDual;
-    d->m_thirdCommonPlural = other.d->m_thirdCommonPlural;
+    d->m_grade = other.d->m_grade;
     d->m_conjugations = other.d->m_conjugations;
     return *this;
 }
@@ -78,9 +63,7 @@ KEduVocConjugation& KEduVocConjugation::operator = ( const KEduVocConjugation& o
 bool KEduVocConjugation::operator ==(const KEduVocConjugation& other) const
 {
     return d->m_conjugations == other.d->m_conjugations &&
-        d->m_thirdCommonSingular == other.d->m_thirdCommonSingular &&
-        d->m_thirdCommonDual == other.d->m_thirdCommonDual &&
-        d->m_thirdCommonPlural == other.d->m_thirdCommonPlural;
+           d->m_grade == other.d->m_grade;
 }
 
 
@@ -122,3 +105,9 @@ bool KEduVocConjugation::isEmpty()
     return d->m_conjugations.count() == 0;
 }
 
+
+KEduVocGrade & KEduVocConjugation::grade()
+{
+    return d->m_grade;
+}
+
index 2fabf9f09f3c9c145ac69e56965748e84e1e04f6..a0f1dfba2c53f38a7e02e767475b3b732f0d2c24 100644 (file)
@@ -26,6 +26,7 @@
 #define KEDUVOCCONJUGATION_H
 
 #include "libkeduvocdocument_export.h"
+#include "keduvocgrade.h"
 
 #include <QtCore/QStringList>
 
@@ -72,6 +73,8 @@ public:
 
     bool isEmpty();
 
+    KEduVocGrade &grade();
+
     static int indexOf(ConjugationPerson person, ConjugationNumber number);
 
 private: