]> Git trees. - libqmvoc.git/commitdiff
Get synonym/antonym/false friend right in the gui.
authorFrederik Gladhorn <gladhorn@kde.org>
Sun, 23 Mar 2008 11:02:27 +0000 (11:02 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Sun, 23 Mar 2008 11:02:27 +0000 (11:02 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=789133

keduvocdocument/keduvoctranslation.cpp
keduvocdocument/keduvoctranslation.h

index 8d4e0d43e10b3b302848479a8c86610eeae638e4..7a3f695f4fb324380550d044ebc46137887a504e 100644 (file)
@@ -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*> KEduVocTranslation::synonyms() const
     return d->m_synonyms;
 }
 
-
 void KEduVocTranslation::addAntonym( KEduVocTranslation* antonym )
 {
     d->m_antonyms.append(antonym);
 }
 
-
 QList<KEduVocTranslation*> 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 )
 {
index d694145de2a2882df459f0de80bf69cf0aaac3dc..ddaab1ed7880b9c25cf233187558fefe7c490d6b 100644 (file)
@@ -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