From: Frederik Gladhorn Date: Sun, 23 Mar 2008 11:02:27 +0000 (+0000) Subject: Get synonym/antonym/false friend right in the gui. X-Git-Tag: v4.0.71~15 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=0bd70d7ae13e2548d86862dc246889a3f39a7775;p=libqmvoc.git Get synonym/antonym/false friend right in the gui. svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=789133 --- diff --git a/keduvocdocument/keduvoctranslation.cpp b/keduvocdocument/keduvoctranslation.cpp index 8d4e0d4..7a3f695 100644 --- a/keduvocdocument/keduvoctranslation.cpp +++ b/keduvocdocument/keduvoctranslation.cpp @@ -186,6 +186,10 @@ void KEduVocTranslation::addFalseFriend( KEduVocTranslation* falseFriend ) d->m_falseFriends.append(falseFriend); } +void KEduVocTranslation::removeFalseFriend(KEduVocTranslation * falseFriend) +{ + d->m_falseFriends.removeAt(d->m_falseFriends.indexOf(falseFriend)); +} QList< KEduVocTranslation* > KEduVocTranslation::falseFriends() const { @@ -208,18 +212,20 @@ QList KEduVocTranslation::synonyms() const return d->m_synonyms; } - void KEduVocTranslation::addAntonym( KEduVocTranslation* antonym ) { d->m_antonyms.append(antonym); } - QList KEduVocTranslation::antonyms() const { return d->m_antonyms; } +void KEduVocTranslation::removeAntonym(KEduVocTranslation * antonym) +{ + d->m_antonyms.removeAt(d->m_antonyms.indexOf(antonym)); +} void KEduVocTranslation::setExample( const QString & expr ) { diff --git a/keduvocdocument/keduvoctranslation.h b/keduvocdocument/keduvoctranslation.h index d694145..ddaab1e 100644 --- a/keduvocdocument/keduvoctranslation.h +++ b/keduvocdocument/keduvoctranslation.h @@ -210,6 +210,12 @@ public: */ void addFalseFriend( KEduVocTranslation* falseFriend ); + /** + * remove a false friend + * @param falseFriend false friend of this index + */ + void removeFalseFriend( KEduVocTranslation* falseFriend ); + /** * returns false friends of this expression * @return list of false friends @@ -240,6 +246,12 @@ public: */ void addAntonym( KEduVocTranslation* antonym ); + /** + * remove a antonym + * @param antonym + */ + void removeAntonym( KEduVocTranslation* antonym ); + /** * returns antonyms of this expression * @return antonyms