***************************************************************************/
#include "keduvocdeclension.h"
-
+/*
#include "kvtml2defs.h"
#include "keduvockvtml2writer.h"
#include <QtXml/QDomDocument>
+*/
#include <QtCore/QMap>
class KEduVocDeclension::Private
return d->m_declensions.isEmpty();
}
-void KEduVocDeclension::toXML(QDomElement & parent)
-{
- if (isEmpty()) {
- return;
- }
- QDomDocument domDoc = parent.ownerDocument();
- QDomElement gradeElement = domDoc.createElement( KVTML_DECLENSION );
-
-}
+// void KEduVocDeclension::toXML(QDomElement & parent)
+// {
+// if (isEmpty()) {
+// return;
+// }
+// QDomDocument domDoc = parent.ownerDocument();
+// QDomElement gradeElement = domDoc.createElement( KVTML_DECLENSION );
+//
+// }
bool isEmpty();
- void toXML(QDomElement& parent);
+// void toXML(QDomElement& parent);
private:
int indexOf(DeclensionNumber number, DeclensionCase decCase);
d->m_superlative = superlative;
}
+KEduVocDeclension * KEduVocTranslation::declension()
+{
+ return d->m_declension;
+}
+
+void KEduVocTranslation::setDeclension(KEduVocDeclension * declension)
+{
+ // remove the old declension object
+ delete d->m_declension;
+ d->m_declension = declension;
+}
+
+void KEduVocTranslation::toXML(QDomElement & parent)
+{
+ kDebug() << "Write translation xml.";
+ KEduVocText::toXML(parent);
+ if (d->m_declension) {
+// d->m_declension->toXML(parent);
+ }
+}
+
+
+
class KEduVocExpression;
class KEduVocString;
class KEduVocWordType;
+class KEduVocDeclension;
/**
@author Frederik Gladhorn <frederik.gladhorn@kdemail.net>
*/
void setConjugation( const QString& tense, const KEduVocConjugation & conjugation );
+ /**
+ * Returns a pointer to the declension object of this translation.
+ * Returns 0 if no declension object exists!
+ * @return the declension
+ */
+ KEduVocDeclension* declension();
+
+ /**
+ * Set a new declension for a translation
+ * @param declension
+ */
+ void setDeclension(KEduVocDeclension* declension);
+
/**
* Bad, only used for tense entry page, will be deleted later. Deprecated.
* @param conjugation
*/
bool operator== ( const KEduVocTranslation &translation ) const;
+ void toXML(QDomElement& parent);
+
private:
class KEduVocTranslationPrivate;
KEduVocTranslationPrivate* const d;