KEduVocTranslation

Search for usage in LXR

KEduVocTranslation Class Reference

#include <keduvoctranslation.h>

Inheritance diagram for KEduVocTranslation:

Public Types

enum  Related { Synonym , Antonym , FalseFriend }
 

Public Member Functions

 KEduVocTranslation (const KEduVocTranslation &other)
 
 KEduVocTranslation (KEduVocExpression *entry)
 
 KEduVocTranslation (KEduVocExpression *entry, const QString &translation)
 
 ~KEduVocTranslation ()
 
void addAntonym (KEduVocTranslation *antonym)
 
void addFalseFriend (KEduVocTranslation *falseFriend)
 
void addSynonym (KEduVocTranslation *synonym)
 
QString antonym () const
 
QList< KEduVocTranslation * > antonyms () const
 
KEduVocText article () const
 
QString comment () const
 
KEDUVOCDOCUMENT_DEPRECATED QString comparative () const
 
KEduVocText comparativeForm () const
 
KEDUVOCDOCUMENT_DEPRECATED KEduVocConjugationconjugation (const QString &tense)
 
KEDUVOCDOCUMENT_DEPRECATED QMap< QString, KEduVocConjugationconjugations () const
 
QStringList conjugationTenses () const
 
KEduVocDeclensiondeclension ()
 
KEduVocExpressionentry ()
 
QString example () const
 
QList< KEduVocTranslation * > falseFriends () const
 
void fromKVTML2 (QDomElement &parent)
 
KEduVocConjugation getConjugation (const QString &tense) const
 
QStringList getMultipleChoice () const
 
QUrl imageUrl ()
 
QString irregularPlural () const
 
KEduVocLeitnerBoxleitnerBox () const
 
KEDUVOCDOCUMENT_DEPRECATED QStringListmultipleChoice ()
 
KEduVocTranslationoperator= (const KEduVocTranslation &translation)
 
bool operator== (const KEduVocTranslation &translation) const
 
QString paraphrase () const
 
QString pronunciation () const
 
void removeAntonym (KEduVocTranslation *antonym)
 
void removeFalseFriend (KEduVocTranslation *falseFriend)
 
void removeSynonym (KEduVocTranslation *synonym)
 
void setAntonym (const QString &expression)
 
void setArticle (const KEduVocText &article)
 
void setComment (const QString &expr)
 
KEDUVOCDOCUMENT_DEPRECATED void setComparative (const QString &comparative)
 
void setComparativeForm (const KEduVocText &comparative)
 
void setConjugation (const QString &tense, const KEduVocConjugation &conjugation)
 
void setConjugations (const QMap< QString, KEduVocConjugation > &conjugations)
 
void setDeclension (KEduVocDeclension *declension)
 
void setExample (const QString &expression)
 
void setImageUrl (const QUrl &url)
 
void setIrregularPlural (const QString &plural)
 
void setLeitnerBox (KEduVocLeitnerBox *leitnerBox)
 
void setMultipleChoice (const QStringList &choices)
 
void setParaphrase (const QString &expression)
 
void setPronunciation (const QString &expression)
 
void setSoundUrl (const QUrl &url)
 
KEDUVOCDOCUMENT_DEPRECATED void setSuperlative (const QString &superlative)
 
void setSuperlativeForm (const KEduVocText &superlative)
 
void setWordType (KEduVocWordType *wordType)
 
QUrl soundUrl ()
 
KEDUVOCDOCUMENT_DEPRECATED QString superlative () const
 
KEduVocText superlativeForm () const
 
QList< KEduVocTranslation * > synonyms () const
 
void toKVTML2 (QDomElement &parent)
 
KEduVocWordTypewordType () const
 
- Public Member Functions inherited from KEduVocText
 KEduVocText (const KEduVocText &other)
 
 KEduVocText (const QString &text=QString())
 
 ~KEduVocText ()
 
count_t badCount () const
 
void decGrade ()
 
void fromKVTML2 (QDomElement &parent)
 
grade_t grade () const
 
void incBadCount ()
 
void incGrade ()
 
void incPracticeCount ()
 
quint32 interval () const
 
bool isEmpty ()
 
KEduVocTextoperator= (const KEduVocText &other)
 
bool operator== (const KEduVocText &other) const
 
count_t practiceCount () const
 
QDateTime practiceDate () const
 
grade_t preGrade () const
 
void resetGrades ()
 
void setBadCount (count_t count)
 
void setGrade (grade_t grade)
 
void setInterval (quint32 interval)
 
void setPracticeCount (count_t count)
 
void setPracticeDate (const QDateTime &date)
 
void setPreGrade (grade_t grade)
 
void setText (const QString &expr)
 
QString text () const
 
void toKVTML2 (QDomElement &parent)
 

Detailed Description

Member Enumeration Documentation

◆ Related

enum KEduVocTranslation::Related

Definition at line 27 of file keduvoctranslation.h.

Constructor & Destructor Documentation

◆ KEduVocTranslation() [1/3]

KEduVocTranslation::KEduVocTranslation ( KEduVocExpression * entry)

Default constructor for an empty translation.

Definition at line 86 of file keduvoctranslation.cpp.

◆ KEduVocTranslation() [2/3]

KEduVocTranslation::KEduVocTranslation ( KEduVocExpression * entry,
const QString & translation )

Constructor.

Parameters
entry
translationis used as translation

Definition at line 91 of file keduvoctranslation.cpp.

◆ KEduVocTranslation() [3/3]

KEduVocTranslation::KEduVocTranslation ( const KEduVocTranslation & other)

copy constructor for d-pointer safety

Definition at line 97 of file keduvoctranslation.cpp.

◆ ~KEduVocTranslation()

KEduVocTranslation::~KEduVocTranslation ( )

Destructor.

Definition at line 126 of file keduvoctranslation.cpp.

Member Function Documentation

◆ addAntonym()

void KEduVocTranslation::addAntonym ( KEduVocTranslation * antonym)

Add a antonym.

Parameters
antonym

Definition at line 219 of file keduvoctranslation.cpp.

◆ addFalseFriend()

void KEduVocTranslation::addFalseFriend ( KEduVocTranslation * falseFriend)

Add a false friend.

Parameters
falseFriendfalse friend of this index

Definition at line 189 of file keduvoctranslation.cpp.

◆ addSynonym()

void KEduVocTranslation::addSynonym ( KEduVocTranslation * synonym)

Add a synonym.

Parameters
synonym

Definition at line 204 of file keduvoctranslation.cpp.

◆ antonym()

QString KEduVocTranslation::antonym ( ) const

Returns antonym of this expression.

Returns
antonym or "" if no string available

◆ antonyms()

QList< KEduVocTranslation * > KEduVocTranslation::antonyms ( ) const

Returns antonyms of this expression.

Returns
antonyms

Definition at line 224 of file keduvoctranslation.cpp.

◆ article()

KEduVocText KEduVocTranslation::article ( ) const

Definition at line 448 of file keduvoctranslation.cpp.

◆ comment()

QString KEduVocTranslation::comment ( ) const

Returns comments of this expression.

Returns
comment or "" if no comment available

Definition at line 179 of file keduvoctranslation.cpp.

◆ comparative()

QString KEduVocTranslation::comparative ( ) const

Comparison forms of adjectives/adverbs.

Definition at line 380 of file keduvoctranslation.cpp.

◆ comparativeForm()

KEduVocText KEduVocTranslation::comparativeForm ( ) const

Definition at line 414 of file keduvoctranslation.cpp.

◆ conjugation()

KEduVocConjugation & KEduVocTranslation::conjugation ( const QString & tense)

This method is deprecated, please use.

See also
getConjugation()
setConjugation() Returns a conjugation if available
Parameters
tensetense of the requested conjugation
Returns
the conjugation

Definition at line 259 of file keduvoctranslation.cpp.

◆ conjugations()

QMap< QString, KEduVocConjugation > KEduVocTranslation::conjugations ( ) const

Bad, only compatibility.

Deprecated.

Returns

Definition at line 302 of file keduvoctranslation.cpp.

◆ conjugationTenses()

QStringList KEduVocTranslation::conjugationTenses ( ) const

Definition at line 297 of file keduvoctranslation.cpp.

◆ declension()

KEduVocDeclension * KEduVocTranslation::declension ( )

Returns a pointer to the declension object of this translation.

Returns 0 if no declension object exists!

Returns
the declension

Definition at line 465 of file keduvoctranslation.cpp.

◆ entry()

KEduVocExpression * KEduVocTranslation::entry ( )

Definition at line 375 of file keduvoctranslation.cpp.

◆ example()

QString KEduVocTranslation::example ( ) const

Returns example of this expression.

Returns
example or "" if no string available

Definition at line 239 of file keduvoctranslation.cpp.

◆ falseFriends()

QList< KEduVocTranslation * > KEduVocTranslation::falseFriends ( ) const

Returns false friends of this expression.

Returns
list of false friends

Definition at line 199 of file keduvoctranslation.cpp.

◆ fromKVTML2()

void KEduVocTranslation::fromKVTML2 ( QDomElement & parent)
Todo
synonyms, antonym
Todo
false friends

Definition at line 512 of file keduvoctranslation.cpp.

◆ getConjugation()

KEduVocConjugation KEduVocTranslation::getConjugation ( const QString & tense) const

Returns a conjugation if available.

Parameters
tensetense of the requested conjugation
Returns
the conjugation

Definition at line 264 of file keduvoctranslation.cpp.

◆ getMultipleChoice()

QStringList KEduVocTranslation::getMultipleChoice ( ) const

Returns multiple choice if available.

Returns
list of multiple choice answers

Definition at line 277 of file keduvoctranslation.cpp.

◆ imageUrl()

QUrl KEduVocTranslation::imageUrl ( )

Get the image url for this translation if it exists.

get the image url for this translation if it exists

Definition at line 326 of file keduvoctranslation.cpp.

◆ irregularPlural()

QString KEduVocTranslation::irregularPlural ( ) const

Gets an irregular plural form.

Returns
plural of the word

◆ leitnerBox()

KEduVocLeitnerBox * KEduVocTranslation::leitnerBox ( ) const

Returns the leitner box of this translation.

Returns
the box

Definition at line 359 of file keduvoctranslation.cpp.

◆ multipleChoice()

QStringList & KEduVocTranslation::multipleChoice ( )

This method is deprecated, please use.

See also
getMultipleChoice()
setMultipleChoice() Returns multiple choice if available

Definition at line 272 of file keduvoctranslation.cpp.

◆ operator=()

KEduVocTranslation & KEduVocTranslation::operator= ( const KEduVocTranslation & translation)

Equal operator to assign a translation to another one.

Parameters
translationtranslation to be copied
Returns
reference to the new translation

Definition at line 153 of file keduvoctranslation.cpp.

◆ operator==()

bool KEduVocTranslation::operator== ( const KEduVocTranslation & translation) const

Compare two translations, including word type etc.

Parameters
translation
Returns
true if equal
Todo
check and include declensions d->m_declension == translation.d->m_declension;

Definition at line 142 of file keduvoctranslation.cpp.

◆ paraphrase()

QString KEduVocTranslation::paraphrase ( ) const

Returns paraphrase of this expression.

Returns
paraphrase or "" if no string available

Definition at line 249 of file keduvoctranslation.cpp.

◆ pronunciation()

QString KEduVocTranslation::pronunciation ( ) const

Returns the pronunciation of this expression.

Returns
pronunciation or "" if none available

Definition at line 287 of file keduvoctranslation.cpp.

◆ removeAntonym()

void KEduVocTranslation::removeAntonym ( KEduVocTranslation * antonym)

Remove a antonym.

Parameters
antonym

Definition at line 229 of file keduvoctranslation.cpp.

◆ removeFalseFriend()

void KEduVocTranslation::removeFalseFriend ( KEduVocTranslation * falseFriend)

Remove a false friend.

Parameters
falseFriendfalse friend of this index

Definition at line 194 of file keduvoctranslation.cpp.

◆ removeSynonym()

void KEduVocTranslation::removeSynonym ( KEduVocTranslation * synonym)

Remove a synonym.

Parameters
synonym

Definition at line 209 of file keduvoctranslation.cpp.

◆ setAntonym()

void KEduVocTranslation::setAntonym ( const QString & expression)

Sets antonym this expression.

Parameters
expressionantonym of this index

◆ setArticle()

void KEduVocTranslation::setArticle ( const KEduVocText & article)

Definition at line 457 of file keduvoctranslation.cpp.

◆ setComment()

void KEduVocTranslation::setComment ( const QString & expr)

Sets comment of this expression.

Parameters
exprcomment of this index

Definition at line 184 of file keduvoctranslation.cpp.

◆ setComparative()

void KEduVocTranslation::setComparative ( const QString & comparative)

Definition at line 388 of file keduvoctranslation.cpp.

◆ setComparativeForm()

void KEduVocTranslation::setComparativeForm ( const KEduVocText & comparative)

Definition at line 423 of file keduvoctranslation.cpp.

◆ setConjugation()

void KEduVocTranslation::setConjugation ( const QString & tense,
const KEduVocConjugation & conjugation )

adds conjugations or replaces them, if they exist.

Parameters
tensetense
conjugationconjugation

Definition at line 254 of file keduvoctranslation.cpp.

◆ setConjugations()

void KEduVocTranslation::setConjugations ( const QMap< QString, KEduVocConjugation > & conjugations)

Bad, only used for tense entry page, will be deleted later.

Deprecated.

Parameters
conjugations

Definition at line 307 of file keduvoctranslation.cpp.

◆ setDeclension()

void KEduVocTranslation::setDeclension ( KEduVocDeclension * declension)

Set a new declension for a translation.

Parameters
declension

Definition at line 470 of file keduvoctranslation.cpp.

◆ setExample()

void KEduVocTranslation::setExample ( const QString & expression)

Sets example this expression.

Parameters
expressionexample of this index

Definition at line 234 of file keduvoctranslation.cpp.

◆ setImageUrl()

void KEduVocTranslation::setImageUrl ( const QUrl & url)

Set the image url for this translation.

set the image url for this translation

Parameters
urlurl of the image

Definition at line 334 of file keduvoctranslation.cpp.

◆ setIrregularPlural()

void KEduVocTranslation::setIrregularPlural ( const QString & plural)

Sets an irregular plural form.

Parameters
pluralplural of the word

◆ setLeitnerBox()

void KEduVocTranslation::setLeitnerBox ( KEduVocLeitnerBox * leitnerBox)

Sets the leitner box of this translation.

Parameters
leitnerBoxthe box

Definition at line 364 of file keduvoctranslation.cpp.

◆ setMultipleChoice()

void KEduVocTranslation::setMultipleChoice ( const QStringList & choices)

Sets multiple choice.

Parameters
choicesmultiple choice block

Definition at line 282 of file keduvoctranslation.cpp.

◆ setParaphrase()

void KEduVocTranslation::setParaphrase ( const QString & expression)

Sets paraphrase of this expression.

Parameters
expressionparaphrase of this index

Definition at line 244 of file keduvoctranslation.cpp.

◆ setPronunciation()

void KEduVocTranslation::setPronunciation ( const QString & expression)

Sets the pronunciation of this expression.

Parameters
expressionpronunciation of this index

Definition at line 292 of file keduvoctranslation.cpp.

◆ setSoundUrl()

void KEduVocTranslation::setSoundUrl ( const QUrl & url)

Set the sound url for this translation.

set the sound url for this translation

Parameters
urlurl of the sound file

Definition at line 320 of file keduvoctranslation.cpp.

◆ setSuperlative()

void KEduVocTranslation::setSuperlative ( const QString & superlative)

Definition at line 405 of file keduvoctranslation.cpp.

◆ setSuperlativeForm()

void KEduVocTranslation::setSuperlativeForm ( const KEduVocText & superlative)

Definition at line 440 of file keduvoctranslation.cpp.

◆ setWordType()

void KEduVocTranslation::setWordType ( KEduVocWordType * wordType)

Sets the word type of this expression.

Parameters
wordTypetype of this expression ("" = none)

Definition at line 348 of file keduvoctranslation.cpp.

◆ soundUrl()

QUrl KEduVocTranslation::soundUrl ( )

Get the sound url for this translation if it exists.

get the sound url for this translation if it exists

Definition at line 313 of file keduvoctranslation.cpp.

◆ superlative()

QString KEduVocTranslation::superlative ( ) const

Definition at line 397 of file keduvoctranslation.cpp.

◆ superlativeForm()

KEduVocText KEduVocTranslation::superlativeForm ( ) const

Definition at line 431 of file keduvoctranslation.cpp.

◆ synonyms()

QList< KEduVocTranslation * > KEduVocTranslation::synonyms ( ) const

Returns synonyms of this expression.

Returns
synonyms

Definition at line 214 of file keduvoctranslation.cpp.

◆ toKVTML2()

void KEduVocTranslation::toKVTML2 ( QDomElement & parent)
Todo
synonyms, antonyms
Todo
false friends

Definition at line 477 of file keduvoctranslation.cpp.

◆ wordType()

KEduVocWordType * KEduVocTranslation::wordType ( ) const

Returns the word type of this expression, you will get a 0 pointer if wordtype is not set for the translation.

Returns
type or "" if no type available

Definition at line 339 of file keduvoctranslation.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.