• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

libkdeedu/keduvocdocument

  • sources
  • kde-4.12
  • kdeedu
  • libkdeedu
  • keduvocdocument
keduvockvtml2writer.h
Go to the documentation of this file.
1 /***************************************************************************
2  export a KEduVocDocument to a KVTML file
3  -----------------------------------------------------------------------
4  copyright : (C) 2007 Jeremy Whiting <jpwhiting@kde.org>
5  (C) 2007-2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef KEDUVOCKVTML2WRITER_H
18 #define KEDUVOCKVTML2WRITER_H
19 
20 #include <QtXml/QDomDocument>
21 #include <QtCore/QList>
22 #include <QtCore/QFile>
23 
24 #include "keduvocarticle.h"
25 #include "keduvocmultiplechoice.h"
26 #include "keduvoctranslation.h"
27 #include "keduvocpersonalpronoun.h"
28 
29 class KEduVocDocument;
30 class KEduVocExpression;
31 class KEduVocLesson;
32 class KEduVocLeitnerBox;
33 
38 class KEduVocKvtml2Writer
39 {
40 public:
41  KEduVocKvtml2Writer( QFile *file );
42 
43  bool writeDoc( KEduVocDocument *doc, const QString &generator );
44 
45  QByteArray toByteArray( KEduVocDocument *doc, const QString &generator );
46 
54  static void appendTextElement( QDomElement &parent, const QString &elementName, const QString &text );
55 
56 private:
57 
58  bool createXmlDocument( KEduVocDocument *doc, const QString &generator );
59 
64  bool writeInformation( QDomElement &informationElement, const QString &generator );
65 
69  bool writeIdentifiers( QDomElement &identifiersElement );
70 
75  bool writeArticle( QDomElement &articleElement, int article );
76 
77  bool writePersonalPronoun( QDomElement &pronounElement, const KEduVocPersonalPronoun &pronoun);
81  bool writeWordTypes( QDomElement &typesElement, KEduVocWordType* parentContainer );
82 
89  bool writeLeitnerBoxes( QDomElement &leitnerParentElement, KEduVocLeitnerBox* parentContainer );
90 
94  bool writeEntries( QDomElement &entriesElement );
95 
100  bool writeTranslation( QDomElement &translationElement, KEduVocTranslation* translation );
101 
108  bool writeRelated( QDomElement &parentElement, QList<KEduVocTranslation*> relatedList );
109 
114  bool writeLessons( KEduVocLesson *parentLesson, QDomElement &lessonsElement );
115 
116  void writeSynonymAntonymFalseFriend(QDomElement & parentElement);
117 
122  bool writeMultipleChoice( QDomElement &multipleChoiceElement, KEduVocTranslation* translation );
123 
124  QDomElement newTextElement( const QString &elementName, const QString &text );
125 
126  QFile *m_outputFile;
127  KEduVocDocument *m_doc;
128 
129  QList<KEduVocExpression*> m_allEntries;
130  QList<KEduVocTranslation*> m_synonyms;
131  QList<KEduVocTranslation*> m_antonyms;
132  QList<KEduVocTranslation*> m_falseFriends;
133 
134  QDomDocument m_domDoc;
135 };
136 
137 #endif
keduvocpersonalpronoun.h
keduvoctranslation.h
KEduVocLesson
class to store information about a lesson
Definition: keduvoclesson.h:27
KEduVocLeitnerBox
Leitner Boxes are an alternative grading system.
Definition: keduvocleitnerbox.h:31
KEduVocPersonalPronoun
The conjugation of a verb.
Definition: keduvocpersonalpronoun.h:25
KEduVocWordType
class to store translation word types
Definition: keduvocwordtype.h:33
KEduVocKvtml2Writer
Class to write kvtml2 data files from KEduVocDocument.
Definition: keduvockvtml2writer.h:38
KEduVocKvtml2Writer::KEduVocKvtml2Writer
KEduVocKvtml2Writer(QFile *file)
Definition: keduvockvtml2writer.cpp:31
KEduVocKvtml2Writer::appendTextElement
static void appendTextElement(QDomElement &parent, const QString &elementName, const QString &text)
Helper function, appends a new element AND a text child to parent Only appends if text is NOT empty...
Definition: keduvockvtml2writer.cpp:654
KEduVocTranslation
Definition: keduvoctranslation.h:35
keduvocmultiplechoice.h
KEduVocExpression
This class contains one vocabulary expression as an original with one or more translations.
Definition: keduvocexpression.h:37
KEduVocKvtml2Writer::writeDoc
bool writeDoc(KEduVocDocument *doc, const QString &generator)
Definition: keduvockvtml2writer.cpp:37
KEduVocKvtml2Writer::toByteArray
QByteArray toByteArray(KEduVocDocument *doc, const QString &generator)
Definition: keduvockvtml2writer.cpp:47
KEduVocDocument
This class contains the expressions of your vocabulary as well as other information about the vocabul...
Definition: keduvocdocument.h:44
keduvocarticle.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:37:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdeedu/keduvocdocument

Skip menu "libkdeedu/keduvocdocument"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal