keduvocgrammar.cpp
keduvocconjugation.cpp
keduvocpersonalpronoun.cpp
- keduvocdeclination.cpp
+ keduvocdeclension.cpp
keduvocwordtype.cpp
keduvockvtmlcompability.cpp
keduvockvtmlreader.cpp
/***************************************************************************
- C++ Implementation: keduvocdeclination
+ C++ Implementation: keduvocdeclension
-----------------------------------------------------------------------
* (at your option) any later version. *
* *
***************************************************************************/
-#include "keduvocdeclination.h"
+#include "keduvocdeclension.h"
#include <QtCore/QMap>
-class KEduVocDeclination::Private
+class KEduVocDeclension::Private
{
public:
- QMap<int, QString> m_declinations;
+ QMap<int, QString> m_declensions;
};
-KEduVocDeclination::KEduVocDeclination()
+KEduVocDeclension::KEduVocDeclension()
:d (new Private)
{
}
-KEduVocDeclination::KEduVocDeclination(const KEduVocDeclination & other)
+KEduVocDeclension::KEduVocDeclension(const KEduVocDeclension & other)
:d (new Private)
{
- d->m_declinations = other.d->m_declinations;
+ d->m_declensions = other.d->m_declensions;
}
-KEduVocDeclination & KEduVocDeclination::operator =(const KEduVocDeclination & other)
+KEduVocDeclension & KEduVocDeclension::operator =(const KEduVocDeclension & other)
{
- d->m_declinations = other.d->m_declinations;
+ d->m_declensions = other.d->m_declensions;
return *this;
}
-KEduVocDeclination::~KEduVocDeclination()
+KEduVocDeclension::~KEduVocDeclension()
{
delete d;
}
-QString KEduVocDeclination::declination(DeclinationNumber number, DeclinationCase decCase)
+QString KEduVocDeclension::declension(DeclensionNumber number, DeclensionCase decCase)
{
- if ( d->m_declinations.contains(indexOf(number, decCase)) ) {
- return d->m_declinations.value(indexOf(number, decCase));
+ if ( d->m_declensions.contains(indexOf(number, decCase)) ) {
+ return d->m_declensions.value(indexOf(number, decCase));
} else {
return QString();
}
}
-void KEduVocDeclination::setDeclination(const QString & declination, DeclinationNumber number, DeclinationCase decCase)
+void KEduVocDeclension::setDeclension(const QString & declension, DeclensionNumber number, DeclensionCase decCase)
{
- d->m_declinations[indexOf(number, decCase)] = declination;
+ d->m_declensions[indexOf(number, decCase)] = declension;
}
-int KEduVocDeclination::indexOf(DeclinationNumber number, DeclinationCase decCase)
+int KEduVocDeclension::indexOf(DeclensionNumber number, DeclensionCase decCase)
{
- return number * DeclinationCaseMAX + decCase;
+ return number * DeclensionCaseMAX + decCase;
}
-bool KEduVocDeclination::isEmpty()
+bool KEduVocDeclension::isEmpty()
{
- return d->m_declinations.isEmpty();
+ return d->m_declensions.isEmpty();
}
/***************************************************************************
- C++ Interface: keduvocdeclination
+ C++ Interface: keduvocdeclension
-----------------------------------------------------------------------
#include <QtCore/QString>
/**
-A declination contains all forms that a NOUN possibly can have.
+A declension contains all forms that a NOUN possibly can have.
@author Frederik Gladhorn <frederik.gladhorn@kdemail.net>
*/
-class KEduVocDeclination{
+class KEduVocDeclension{
public:
- enum DeclinationNumber {
+ enum DeclensionNumber {
Singular = 1,
Dual,
Plural
};
- enum DeclinationCase {
+ enum DeclensionCase {
Nominative = 1,
Genitive,
Dative,
Ablative,
Locative,
Vocative,
- DeclinationCaseMAX
+ DeclensionCaseMAX
};
/**
* The constructor without arguments
*/
- explicit KEduVocDeclination();
+ explicit KEduVocDeclension();
/** copy constructor
* @param other comparison object to copy
*/
- KEduVocDeclination( const KEduVocDeclination &other );
+ KEduVocDeclension( const KEduVocDeclension &other );
- ~KEduVocDeclination();
+ ~KEduVocDeclension();
/** 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;
+// bool operator == ( const KEduVocDeclension& a ) const;
/** assignment operator for d-pointer copying
* @param other object to copy from
* @returns reference to this object
*/
- KEduVocDeclination& operator= ( const KEduVocDeclination& other );
+ KEduVocDeclension& operator= ( const KEduVocDeclension& other );
/**
* The grammatical number, there is singular and plural for english, some languages have dual for exactly two items.
* @param decCase
* @return
*/
- QString declination(DeclinationNumber number, DeclinationCase decCase);
+ QString declension(DeclensionNumber number, DeclensionCase decCase);
/**
- * Set a declination
+ * Set a declension
* @param
* @param number
* @param decCase
*/
- void setDeclination(const QString& declination, DeclinationNumber number, DeclinationCase decCase);
+ void setDeclension(const QString& declension, DeclensionNumber number, DeclensionCase decCase);
bool isEmpty();
private:
- int indexOf(DeclinationNumber number, DeclinationCase decCase);
+ int indexOf(DeclensionNumber number, DeclensionCase decCase);
class Private;
Private * const d;
#include <KDebug>
-#include "keduvocdeclination.h"
+#include "keduvocdeclension.h"
#include "keduvocwordtype.h"
class KEduVocTranslation::KEduVocTranslationPrivate
QString m_comparative;
QString m_superlative;
- KEduVocDeclination* m_declination;
+ KEduVocDeclension* m_declension;
/// One false friend string per other language
QMap<int, QString> m_falseFriends;
{
m_entry = parent;
m_wordType = 0;
- m_declination = 0;
+ m_declension = 0;
}
KEduVocTranslation::KEduVocTranslationPrivate::~ KEduVocTranslationPrivate()
{
- delete m_declination;
+ delete m_declension;
}
KEduVocTranslation::KEduVocTranslation(KEduVocExpression* entry) : d( new KEduVocTranslationPrivate(entry) )
d->m_falseFriends = other.d->m_falseFriends;
d->m_imageUrl = other.d->m_imageUrl;
d->m_soundUrl = other.d->m_soundUrl;
- /// @todo add declinations
+ /// @todo add declensions
}
KEduVocTranslation::~KEduVocTranslation()
#include "keduvocexpression.h"
#include "keduvoctranslation.h"
#include "keduvocconjugation.h"
-#include "keduvocdeclination.h"
+#include "keduvocdeclension.h"
#include "keduvocwordtype.h"