summaryrefslogtreecommitdiffstats
path: root/kanagram/src/keduvockvtmlwriter.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch)
treed3bb9f5d25a2dc09ca81adecf39621d871534297 /kanagram/src/keduvockvtmlwriter.h
downloadtdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz
tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kanagram/src/keduvockvtmlwriter.h')
-rw-r--r--kanagram/src/keduvockvtmlwriter.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/kanagram/src/keduvockvtmlwriter.h b/kanagram/src/keduvockvtmlwriter.h
new file mode 100644
index 00000000..dd9e6a78
--- /dev/null
+++ b/kanagram/src/keduvockvtmlwriter.h
@@ -0,0 +1,99 @@
+/***************************************************************************
+ export a KEduVocDocument to a KVTML file
+ -----------------------------------------------------------------------
+ copyright : (C) 1999-2001 Ewald Arnold
+ (C) 2001 The KDE-EDU team
+ (C) 2005 Eric Pignet
+ email : eric at erixpage.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KEDUVOCKVTMLWRITER_H
+#define KEDUVOCKVTMLWRITER_H
+
+#include <qfile.h>
+#include <qdom.h>
+
+//#include "keduvocdocument.h"
+#include "grammarmanager.h"
+#include "multiplechoice.h"
+
+class KEduVocDocument;
+
+// internal types, indented are subtypes
+
+#define QM_VERB "v" // go
+#define QM_VERB_IRR "ir"
+#define QM_VERB_REG "re"
+#define QM_NOUN "n" // table, coffee
+#define QM_NOUN_F "f"
+#define QM_NOUN_M "m"
+#define QM_NOUN_S "s"
+#define QM_NAME "nm"
+#define QM_ART "ar" // article
+#define QM_ART_DEF "def" // definite a/an
+#define QM_ART_IND "ind" // indefinite the
+#define QM_ADJ "aj" // adjective expensive, good
+#define QM_ADV "av" // adverb today, strongly
+#define QM_PRON "pr" // pronoun you, she
+#define QM_PRON_POS "pos" // possessive my, your
+#define QM_PRON_PER "per" // personal
+#define QM_PHRASE "ph"
+#define QM_NUM "num" // numeral
+#define QM_NUM_ORD "ord" // ordinal first, second
+#define QM_NUM_CARD "crd" // cardinal one, two
+#define QM_INFORMAL "ifm"
+#define QM_FIG "fig"
+#define QM_CON "con" // conjuncton and, but
+#define QM_PREP "pre" // preposition behind, between
+#define QM_QUEST "qu" // question who, what
+
+// type delimiters
+
+#define QM_USER_TYPE "#" // designates number of user type
+#define QM_TYPE_DIV ":" // divide main from subtype
+
+/**
+@author Eric Pignet
+*/
+class KEduVocKvtmlWriter
+{
+public:
+ KEduVocKvtmlWriter(QFile *file);
+ ~KEduVocKvtmlWriter();
+
+ bool writeDoc(KEduVocDocument *doc, const QString &generator);
+
+ bool saveLessonKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
+ bool saveTypeNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
+ bool saveTenseNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
+ bool saveUsageNameKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
+ bool saveOptionsKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
+ bool saveArticleKvtMl (QDomDocument &domDoc, QDomElement &domElementParent);
+ bool saveConjugHeader (QDomDocument &domDoc, QDomElement &domElementParent,
+ vector<Conjugation> &curr_conjug);
+ bool saveConjug (QDomDocument &domDoc, QDomElement &domElementParent,
+ const Conjugation &curr_conjug, QString type);
+ bool saveConjugEntry (QDomDocument &domDoc, QDomElement &domElementParent,
+ Conjugation &curr_conjug);
+
+ bool saveComparison (QDomDocument &domDoc, QDomElement &domElementParent,
+ const Comparison &comp);
+
+ bool saveMultipleChoice(QDomDocument &domDoc, QDomElement &domElementParent,
+ const MultipleChoice &mc);
+
+private:
+ QFile *m_outputFile;
+ KEduVocDocument *m_doc;
+};
+
+#endif