expr->translation(index)->setExample( currentElement.text() );
}
- //<usage></usage> can be as often as there are usage labels
- currentElement = translationElement.firstChildElement( KVTML_USAGE );
- while ( !currentElement.isNull() ) {
- expr->translation(index)->usages().insert( currentElement.text() );
- currentElement = currentElement.nextSiblingElement( KVTML_USAGE );
- }
-
//<paraphrase></paraphrase>
currentElement = translationElement.firstChildElement( KVTML_PARAPHRASE );
if ( !currentElement.isNull() ) {
translationElement.appendChild( newTextElement( KVTML_EXAMPLE, translation->example() ) );
}
- // <usage></usage>
- foreach( const QString &usage, translation->usages() ) {
- translationElement.appendChild( newTextElement( KVTML_USAGE, usage ) );
- }
-
// <paraphrase></paraphrase>
if ( !translation->paraphrase().isEmpty() ) {
translationElement.appendChild( newTextElement( KVTML_PARAPHRASE, translation->paraphrase() ) );
entry->translation( i )->setSynonym( synonym );
if ( !example.isEmpty() )
entry->translation( i )->setExample( example );
- if ( !usage.isEmpty() )
- entry->translation( i )->setUsages( usage );
if ( !paraphrase.isEmpty() )
entry->translation( i )->setParaphrase( paraphrase );
if ( !antonym.isEmpty() )
KUrl m_imageUrl;
/// Sound url
KUrl m_soundUrl;
- /// Usages give a context (eg. this word is usually used in [biology])
- QSet<QString> m_usages;
+
/// When creating multiple choice tests, these are possible answers. (otherwise other words are added randomly)
QStringList m_multipleChoice;
{
d->m_translation = other.d->m_translation;
d->m_wordType = other.d->m_wordType;
- d->m_usages = other.d->m_usages;
d->m_comment = other.d->m_comment;
d->m_paraphrase = other.d->m_paraphrase;
d->m_synonym = other.d->m_synonym;
return d->m_entry == translation.d->m_entry &&
d->m_translation == translation.d->m_translation &&
d->m_wordType == translation.d->m_wordType &&
- d->m_usages == translation.d->m_usages &&
d->m_comment == translation.d->m_comment &&
d->m_paraphrase == translation.d->m_paraphrase &&
d->m_synonym == translation.d->m_synonym &&
d->m_entry = translation.d->m_entry;
d->m_translation = translation.d->m_translation;
d->m_wordType = translation.d->m_wordType;
- d->m_usages = translation.d->m_usages;
d->m_comment = translation.d->m_comment;
d->m_paraphrase = translation.d->m_paraphrase;
d->m_synonym = translation.d->m_synonym;
}
-void KEduVocTranslation::setUsages( const QSet<QString> & usages )
-{
- d->m_usages = usages;
-}
-
-
-QSet<QString>& KEduVocTranslation::usages()
-{
- return d->m_usages;
-}
-
-
void KEduVocTranslation::setParaphrase( const QString & expr )
{
d->m_paraphrase = expr.simplified();
*/
QString example() const;
-
- /** sets usages this expression
- * @param usage usage labels of this index
- */
- void setUsages( const QSet<QString> & usage );
-
-
- /** returns usages of this expression
- * @return usages
- */
- QSet<QString>& usages();
-
/** sets paraphrase of this expression
* @param expression paraphrase of this index
*/