copyright : (C) 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
(C) 2001 The KDE-EDU team
(C) 2005-2007 Peter Hedlund <peter.hedlund@kdemail.net>
+ (C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
***************************************************************************/
/***************************************************************************
QList<KEduVocArticle> m_articles;
QList<KEduVocConjugation> m_conjugations;
-
+
// make this a map so removals don't require renumbering :)
QMap<int, KEduVocLesson*> m_lessons;
++position;
}
}
-
+
KEduVocLesson *lesson = new KEduVocLesson;
lesson->setDescription(lessonName);
d->m_lessons.insert(position, lesson);
copyright : (C) 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
(C) 2001 The KDE-EDU team
(C) 2005, 2007 Peter Hedlund <peter.hedlund@kdemail.net>
+ (C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
***************************************************************************/
/***************************************************************************
~KEduVocDocument();
// *** whole document methods ***
-
+
/**
* Open a document file
*
/** @returns the license of the file */
QString license() const;
- /** set the remark of the file
+ /** set the remark of the file
* @param rem remark to set */
void setDocumentRemark(const QString & rem);
* @returns number of removed entries
*/
int cleanUp();
-
+
/**
* @returns the number of entries
*/
void setSizeHint (int index, const int width);
// *** identifier methods ***
-
+
/**
* @returns the number of different identifiers (usually languages)
*/
int indexOfIdentifier(const QString &lang) const;
// *** type methods ***
-
+
/**
* Sets attribute string
*
QStringList tenseDescriptions() const;
// *** usage methods ***
-
+
/**
* Sets usage string
*
void setQueryIdentifier(const QString &org, const QString &trans);
// *** lesson methods ***
-
+
/**
* @returns the current lesson index
*/
* @returns a pointer to the lesson object at the specified index or NULL if there isn't one
*/
KEduVocLesson *lesson(int index);
-
+
/** get all lesson objects
* @returns a map of pointers to lesson objects
*/
int conjugationCount() const;
// *** article methods ***
-
+
/**
* @param index index of translation
* @returns a pointer to articles if available
// This is the word itself. The vocabulary. This is what it is all about.
QString m_translation;
/// noun:male etc (language dependent)
- QString m_types;
+ QString m_type;
+ QString m_subType;
QString m_usageLabel;
QString m_comment;
QString m_paraphrase;
bool KEduVocTranslation::KEduVocTranslationPrivate::operator== ( const KEduVocTranslation::KEduVocTranslationPrivate &other ) const
{
return m_translation == other.m_translation &&
- m_types == other.m_types &&
+ m_type == other.m_type &&
+ m_subType == other.m_subType &&
m_usageLabel == other.m_usageLabel &&
m_comment == other.m_comment &&
m_paraphrase == other.m_paraphrase &&
KEduVocTranslation::KEduVocTranslation( const KEduVocTranslation &other) : d ( new KEduVocTranslationPrivate )
{
d->m_translation = other.d->m_translation;
- d->m_types = other.d->m_types;
+ d->m_type = other.d->m_type;
+ d->m_subType = other.d->m_subType;
d->m_usageLabel = other.d->m_usageLabel;
d->m_comment = other.d->m_comment;
d->m_paraphrase = other.d->m_paraphrase;
QString KEduVocTranslation::type() const
{
- return d->m_types;
+ return d->m_type;
}
void KEduVocTranslation::setType ( const QString &type )
{
- d->m_types = type;
+ d->m_type = type;
}
+QString KEduVocTranslation::subType() const
+{
+ return d->m_subType;
+}
+
+
+void KEduVocTranslation::setSubType ( const QString &type )
+{
+ d->m_subType = type;
+}
void KEduVocTranslation::resetGrades(){
d->m_grades.clear();
bool KEduVocTranslation::operator ==(const KEduVocTranslation & translation) const
{
return d->m_translation == translation.d->m_translation &&
- d->m_types == translation.d->m_types &&
+ d->m_type == translation.d->m_type &&
+ d->m_subType == translation.d->m_subType &&
d->m_usageLabel == translation.d->m_usageLabel &&
d->m_comment == translation.d->m_comment &&
d->m_paraphrase == translation.d->m_paraphrase &&
KEduVocTranslation & KEduVocTranslation::operator =(const KEduVocTranslation & translation)
{
d->m_translation = translation.d->m_translation;
- d->m_types = translation.d->m_types;
+ d->m_type = translation.d->m_type;
+ d->m_subType = translation.d->m_subType;
d->m_usageLabel = translation.d->m_usageLabel;
d->m_comment = translation.d->m_comment;
d->m_paraphrase = translation.d->m_paraphrase;
*/
void setType( const QString &type);
+ /** returns subtype of this expression
+ *
+ * @return type or "" if no type available
+ */
+ QString subType() const;
+
+ /** sets subtype of this expression
+ * @param type type of this expression ("" = none)
+ */
+ void setSubType( const QString &type);
+
/** reset the grades for this translation */
void resetGrades();
- /** get the gradeobject from given identifier
+ /** get the gradeobject from given identifier
* @param indexFrom which identifier to get the grade from
* @returns the grade object
*/