]> Git trees. - libqmvoc.git/commitdiff
add action to remove grades
authorFrederik Gladhorn <gladhorn@kde.org>
Sun, 15 Jun 2008 13:46:15 +0000 (13:46 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Sun, 15 Jun 2008 13:46:15 +0000 (13:46 +0000)
svn path=/branches/work/soc-parley/libkdeedu/; revision=820806

keduvocdocument/keduvoccontainer.cpp
keduvocdocument/keduvoccontainer.h

index 6fceb877197fab5fa7d4243be862ea143389ad3f..354d0033c80cb6a21f345ba8a14e4caaaa134446 100644 (file)
@@ -265,3 +265,10 @@ int KEduVocContainer::expressionsOfGrade(int translation, grade_t grade)
     return sum;
 }
 
+void KEduVocContainer::resetGrades(int translation, EnumEntriesRecursive recursive)
+{
+    foreach (KEduVocExpression *entry, entries(recursive)) {
+        entry->resetGrades(translation);
+    }
+}
+
index 26503c91ebab3715d3a14a1c6284e4248f3b16ed..7a80b1f37e3466fe419d932ee0634c8c3feaea14 100644 (file)
@@ -134,6 +134,13 @@ public:
 
     int expressionsOfGrade(int translation, grade_t grade);
 
+    /**
+     * Remove grades from all entries of this lessons
+     * @param translation which translation to remove. -1 for all.
+     * @param recursive wether to include child lessons
+     */
+    void resetGrades(int translation, EnumEntriesRecursive recursive);
+
 protected:
     QList< KEduVocExpression * > entriesRecursive();