[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/soc-parley
From: Frederik Gladhorn <frederik.gladhorn () gmx ! de>
Date: 2008-06-29 0:13:42
Message-ID: 1214698422.853338.3543.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 825687 by gladhorn:
only create boxes when creating a new doc
M +0 -10 libkdeedu/keduvocdocument/keduvocdocument.cpp
M +2 -1 libkdeedu/keduvocdocument/keduvocleitnerbox.cpp
M +10 -0 parley/src/parleydocument.cpp
--- branches/work/soc-parley/libkdeedu/keduvocdocument/keduvocdocument.cpp \
#825686:825687 @@ -126,16 +126,6 @@
}
m_leitnerContainer = new KEduVocLeitnerBox(i18n( "Leitner Box" ));
-///test
- m_leitnerContainer->appendChildContainer(new KEduVocLesson(i18n("Box 7 (best)"), \
m_leitnerContainer));
- m_leitnerContainer->appendChildContainer(new KEduVocLesson(i18n("Box 6"), \
m_leitnerContainer));
- m_leitnerContainer->appendChildContainer(new KEduVocLesson(i18n("Box 5"), \
m_leitnerContainer));
- m_leitnerContainer->appendChildContainer(new KEduVocLesson(i18n("Box 4"), \
m_leitnerContainer));
- m_leitnerContainer->appendChildContainer(new KEduVocLesson(i18n("Box 3"), \
m_leitnerContainer));
- m_leitnerContainer->appendChildContainer(new KEduVocLesson(i18n("Box 2"), \
m_leitnerContainer));
- m_leitnerContainer->appendChildContainer(new KEduVocLesson(i18n("Box 1 \
(lowest)"), m_leitnerContainer));
-
-
m_tenseDescriptions.clear();
m_identifiers.clear();
m_extraSizeHints.clear();
--- branches/work/soc-parley/libkdeedu/keduvocdocument/keduvocleitnerbox.cpp \
#825686:825687 @@ -74,7 +74,8 @@
void KEduVocLeitnerBox::removeTranslation(KEduVocTranslation* translation)
{
- d->m_translations.removeAt( d->m_translations.indexOf(translation) );
+ int index = d->m_translations.indexOf(translation);
+ d->m_translations.removeAt(index);
// no lesson found - this entry is being deleted. remove all its siblings.
if (!translation->entry()->lesson()) {
--- branches/work/soc-parley/parley/src/parleydocument.cpp #825686:825687
@@ -23,6 +23,7 @@
#include "vocabulary/vocabularyview.h"
#include <keduvoclesson.h>
+#include <keduvocleitnerbox.h>
#include <keduvocexpression.h>
#include <keduvocwordtype.h>
@@ -338,6 +339,15 @@
KEduVocLesson* lesson = new KEduVocLesson(i18n("Lesson 1"), m_doc->lesson());
m_doc->lesson()->appendChildContainer(lesson);
+ KEduVocLeitnerBox *box = m_doc->leitnerContainer();
+ box->appendChildContainer(new KEduVocLesson(i18n("Box 7 (best)"), box));
+ box->appendChildContainer(new KEduVocLesson(i18n("Box 6"), box));
+ box->appendChildContainer(new KEduVocLesson(i18n("Box 5"), box));
+ box->appendChildContainer(new KEduVocLesson(i18n("Box 4"), box));
+ box->appendChildContainer(new KEduVocLesson(i18n("Box 3"), box));
+ box->appendChildContainer(new KEduVocLesson(i18n("Box 2"), box));
+ box->appendChildContainer(new KEduVocLesson(i18n("Box 1 (lowest)"), box));
+
// add some entries
for ( int i = 0; i < 15 ; i++ ) {
lesson->appendEntry(new KEduVocExpression());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic