}
}
break;
-
+///@todo port me
+/*
case Wql: {
- kDebug() << "Reading WordQuiz (WQL) document...";
+ kDebug(1100) << "Reading WordQuiz (WQL) document...";
KEduVocWqlReader wqlReader( f );
d->m_url.setFileName( i18n( "Untitled" ) );
read = wqlReader.readDoc( this );
errorMessage = i18n( "Parse error at line %1, column %2:\n%3", xdxfReader.lineNumber(), xdxfReader.columnNumber(), xdxfReader.errorString() );
}
}
- break;
+ break;*/
default: {
- kDebug() << "Reading KVTML document (fallback)...";
+ kDebug(1100) << "Reading KVTML document (fallback)...";
KEduVocKvtml2Reader kvtmlReader( f );
read = kvtmlReader.readDoc( this );
if ( !read ) {
}
-int KEduVocDocument::entryCount() const
-{
- return d->m_vocabulary.count();
-}
-
--
-void KEduVocDocument::resetEntry( int index, int lesson )
-{
- for ( int i = 0; i < d->m_vocabulary.count(); i++ )
- if ( /*lesson == 0 ||*/ lesson == d->m_vocabulary[i].lesson() ) {
- // index is the translation number whose grades are reset
- d->m_vocabulary[i].resetGrades( index );
- }
-}
--
--
int KEduVocDocument::identifierCount() const
{
return d->m_identifiers.count(); // number of translations
// add id
entryElement.setAttribute( KVTML_ID, QString::number( i ) );
- // write inactive
- entryElement.appendChild( newTextElement( KVTML_DEACTIVATED, thisEntry->isActive() ? KVTML_FALSE : KVTML_TRUE ) );
+ // write deactivated
+ if(!thisEntry->isActive()) {
+ entryElement.appendChild( newTextElement( KVTML_DEACTIVATED, KVTML_TRUE ) );
+ }
- // write sizehint
- if ( thisEntry->sizeHint() > 0 ) {
- entryElement.appendChild( newTextElement( KVTML_SIZEHINT, QString::number( thisEntry->sizeHint() ) ) );
- }
-
// loop through translations
foreach( int trans, thisEntry->translationIndices() ) {
// write translations