From: Pino Toscano Date: Sat, 3 Mar 2007 10:07:56 +0000 (+0000) Subject: Move (almost) all the kvtml definitions in an own header, so they are not exposed... X-Git-Tag: v3.90.1~51 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=87457c0792e046a9f95b8ee4ef00752f2fe24df2;p=libqmvoc.git Move (almost) all the kvtml definitions in an own header, so they are not exposed in public API (KEduVocDocument is not tied on a particular document type). svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=638764 --- diff --git a/kdeeducore/keduvocdocument.h b/kdeeducore/keduvocdocument.h index 037838d..dde5d73 100644 --- a/kdeeducore/keduvocdocument.h +++ b/kdeeducore/keduvocdocument.h @@ -20,206 +20,8 @@ #include -#include - #define KVD_VERS_PREFIX " v" // kvoctrain v0.1.0 -/** XML tags and attribute names */ - -static const QLatin1String KV_DOCTYPE("kvtml"); // doctype -#define KV_TITLE "title" // doc title -#define KV_AUTHOR "author" // doc author -#define KV_LICENSE "license" // doc license -#define KV_DOC_REM "remark" // doc remark -#define KV_LINES "lines" // entries -#define KV_GENERATOR "generator" // who generated the doc -#define KV_COLS "cols" // columns -#define KV_ENCODING "encoding" // document encoding (obsolete!) - -#define KV_EXPR "e" // entry for one expression -static const QLatin1String KV_ORG("o"); // original expression in specified language -static const QLatin1String KV_TRANS("t"); // translated expression in specified language -#define KV_LANG "l" // language: en, de, it, fr ... -#define KV_QUERY "q" // query: org or translation -#define KV_O "o" // org -#define KV_T "t" // translation -#define KV_GRADE "g" // grade of knowledge: 0=well known, x=not known for x times -#define KV_LESS_MEMBER "m" // member of lesson 1 .. x -#define KV_COUNT "c" // number of times queried -#define KV_SIZEHINT "width" // recommended column width -#define KV_CHARSET "charset" // recommended charset (obsolete!) -#define KV_BAD "b" // number of times failed -#define KV_DATE "d" // last query date -#define KV_DATE2 "w" // last query date, compressed format, deprecated, currently ignored -#define KV_REMARK "r" // remark for this entry -#define KV_FAUX_AMI_F "ff" // false friend of this entry from org -#define KV_FAUX_AMI_T "tf" // false friend of this entry to org -#define KV_SYNONYM "y" // synonym (same meaning) of expr -#define KV_ANTONYM "a" // antonym (oppositite) of expr -#define KV_PRONUNCE "p" // how to pronounce this expression -#define KV_SELECTED "s" // entry selected for queries -#define KV_INACTIVE "i" // entry inactive (for queries) -#define KV_EXPRTYPE "t" // type of expression -#define KV_EXAMPLE "x" // example string with word -#define KV_USAGE "u" // usage label -#define KV_PARAPHRASE "h" // paraphrase for expression - -/* - - My type 1 - My type 2 - -*/ - -#define KV_TYPE_GRP "type" // type descriptor group -#define KV_TYPE_DESC "desc" // type descriptor -#define KV_TYPE_NO "no" // type descriptor number - -/* - - My usage 1 - My usage 2 - -*/ - -#define KV_USAGE_GRP "usage" // usage descriptor group -#define KV_USAGE_DESC "desc" // usage descriptor -#define KV_USAGE_NO "no" // usage descriptor number - -/* - - Lesson #1 - Lesson #2 - -*/ - -#define KV_LESS_GRP "lesson" // lesson descriptor group -#define KV_LESS_CURR "current" // is current lesson -#define KV_LESS_DESC "desc" // lesson descriptor -#define KV_LESS_QUERY "query" // lesson contained in query -#define KV_LESS_NO "no" // lesson descriptor number - -/* - - user tense #1 - user tense #2 - -*/ - -#define KV_TENSE_GRP "tense" // tense descriptor group -#define KV_TENSE_DESC "desc" // tense descriptor -#define KV_TENSE_NO "no" // tense descriptor number - -/* - - - -*/ - -#define KV_OPTION_GRP "options" // internal options group -#define KV_OPT_SORT "sort" // allow sorting -#define KV_BOOL_FLAG "on" // general boolean flag - -/* -
- lang determines also lang order in entries !! - eine which must NOT differ - die - ein - der - ein - das - -
-*/ - -#define KV_ARTICLE_GRP "article" // article descriptor group -static const QLatin1String KV_ART_ENTRY("e"); // article entry -#define KV_ART_FD "fd" // female definite -#define KV_ART_MD "md" // male definite -#define KV_ART_ND "nd" // natural definite -#define KV_ART_FI "fi" // female indefinite -#define KV_ART_MI "mi" // male indefinite -#define KV_ART_NI "ni" // natural indefinite - -/* - - good - better - best - -*/ - -#define KV_COMPARISON_GRP "comparison" // comparison descriptor group -#define KV_COMP_L1 "l1" // base form -#define KV_COMP_L2 "l2" // next form -#define KV_COMP_L3 "l3" // last form - -/* - - good - better - best - best 2 - best 3 - -*/ - -#define KV_MULTIPLECHOICE_GRP "multiplechoice" // multiple choice descriptor group -#define KV_MC_1 "mc1" // choice 1 -#define KV_MC_2 "mc2" // choice 2 -#define KV_MC_3 "mc3" // choice 3 -#define KV_MC_4 "mc4" // choice 4 -#define KV_MC_5 "mc5" // choice 5 - -/* - used in header for definiton of "prefix" - lang determines also lang order in entries !! - I which must NOT differ in subsequent -tags - you<2> - he - she - it - we - you - they - they - they - - - - and in entry for definition of tenses of (irreg.) verbs - - go - go - goes - goes - goes - go - go - go - go - go - - -*/ - -#define KV_CONJUG_GRP "conjugation" // conjugation descriptor group -#define KV_CON_ENTRY "e" // conjugation entry (header) -#define KV_CON_TYPE "t" // conjugation type (voc entries) -#define KV_CON_NAME "n" // conjugation type name (voc entries) -#define KV_CON_P1S "s1" // 1. person singular -#define KV_CON_P2S "s2" // 2. person singular -#define KV_CON_P3SF "s3f" // 3. person singular female -#define KV_CON_P3SM "s3m" // 3. person singular male -#define KV_CON_P3SN "s3n" // 3. person singular natural -#define KV_CON_P1P "p1" // 1. person plural -#define KV_CON_P2P "p2" // 2. person plural -#define KV_CON_P3PF "p3f" // 3. person plural female -#define KV_CON_P3PM "p3m" // 3. person plural male -#define KV_CON_P3PN "p3n" // 3. person plural natural -#define KV_CONJ_COMMON "common" // female contains common for all three - #define WQL_IDENT "WordQuiz" #define KVTML_EXT "kvtml" diff --git a/kdeeducore/keduvockvtmlreader.cpp b/kdeeducore/keduvockvtmlreader.cpp index db594fd..b962a31 100644 --- a/kdeeducore/keduvockvtmlreader.cpp +++ b/kdeeducore/keduvockvtmlreader.cpp @@ -26,6 +26,7 @@ #include "keduvockvtmlreader.h" #include "keduvocdocument.h" +#include "kvtmldefs.h" KEduVocKvtmlReader::KEduVocKvtmlReader(QIODevice *file) { diff --git a/kdeeducore/keduvockvtmlwriter.cpp b/kdeeducore/keduvockvtmlwriter.cpp index 7c717b5..58adc01 100644 --- a/kdeeducore/keduvockvtmlwriter.cpp +++ b/kdeeducore/keduvockvtmlwriter.cpp @@ -23,6 +23,7 @@ #include "keduvockvtmlwriter.h" #include "keduvocdocument.h" #include "keduvocexpression.h" +#include "kvtmldefs.h" KEduVocKvtmlWriter::KEduVocKvtmlWriter(QFile *file) { diff --git a/kdeeducore/kvtmldefs.h b/kdeeducore/kvtmldefs.h new file mode 100644 index 0000000..b368449 --- /dev/null +++ b/kdeeducore/kvtmldefs.h @@ -0,0 +1,220 @@ +/*************************************************************************** + Vocabulary Document for KDE Edu + ----------------------------------------------------------------------- + copyright : (C) 1999-2001 Ewald Arnold + (C) 2001 The KDE-EDU team + (C) 2005, 2007 Peter Hedlund + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 KVTMLDEFS_H +#define KVTMLDEFS_H + +#include + +/** XML tags and attribute names */ + +static const QLatin1String KV_DOCTYPE("kvtml"); // doctype +#define KV_TITLE "title" // doc title +#define KV_AUTHOR "author" // doc author +#define KV_LICENSE "license" // doc license +#define KV_DOC_REM "remark" // doc remark +#define KV_LINES "lines" // entries +#define KV_GENERATOR "generator" // who generated the doc +#define KV_COLS "cols" // columns +#define KV_ENCODING "encoding" // document encoding (obsolete!) + +#define KV_EXPR "e" // entry for one expression +static const QLatin1String KV_ORG("o"); // original expression in specified language +static const QLatin1String KV_TRANS("t"); // translated expression in specified language +#define KV_LANG "l" // language: en, de, it, fr ... +#define KV_QUERY "q" // query: org or translation +#define KV_O "o" // org +#define KV_T "t" // translation +#define KV_GRADE "g" // grade of knowledge: 0=well known, x=not known for x times +#define KV_LESS_MEMBER "m" // member of lesson 1 .. x +#define KV_COUNT "c" // number of times queried +#define KV_SIZEHINT "width" // recommended column width +#define KV_CHARSET "charset" // recommended charset (obsolete!) +#define KV_BAD "b" // number of times failed +#define KV_DATE "d" // last query date +#define KV_DATE2 "w" // last query date, compressed format, deprecated, currently ignored +#define KV_REMARK "r" // remark for this entry +#define KV_FAUX_AMI_F "ff" // false friend of this entry from org +#define KV_FAUX_AMI_T "tf" // false friend of this entry to org +#define KV_SYNONYM "y" // synonym (same meaning) of expr +#define KV_ANTONYM "a" // antonym (oppositite) of expr +#define KV_PRONUNCE "p" // how to pronounce this expression +#define KV_SELECTED "s" // entry selected for queries +#define KV_INACTIVE "i" // entry inactive (for queries) +#define KV_EXPRTYPE "t" // type of expression +#define KV_EXAMPLE "x" // example string with word +#define KV_USAGE "u" // usage label +#define KV_PARAPHRASE "h" // paraphrase for expression + +/* + + My type 1 + My type 2 + +*/ + +#define KV_TYPE_GRP "type" // type descriptor group +#define KV_TYPE_DESC "desc" // type descriptor +#define KV_TYPE_NO "no" // type descriptor number + +/* + + My usage 1 + My usage 2 + +*/ + +#define KV_USAGE_GRP "usage" // usage descriptor group +#define KV_USAGE_DESC "desc" // usage descriptor +#define KV_USAGE_NO "no" // usage descriptor number + +/* + + Lesson #1 + Lesson #2 + +*/ + +#define KV_LESS_GRP "lesson" // lesson descriptor group +#define KV_LESS_CURR "current" // is current lesson +#define KV_LESS_DESC "desc" // lesson descriptor +#define KV_LESS_QUERY "query" // lesson contained in query +#define KV_LESS_NO "no" // lesson descriptor number + +/* + + user tense #1 + user tense #2 + +*/ + +#define KV_TENSE_GRP "tense" // tense descriptor group +#define KV_TENSE_DESC "desc" // tense descriptor +#define KV_TENSE_NO "no" // tense descriptor number + +/* + + + +*/ + +#define KV_OPTION_GRP "options" // internal options group +#define KV_OPT_SORT "sort" // allow sorting +#define KV_BOOL_FLAG "on" // general boolean flag + +/* +
+ lang determines also lang order in entries !! + eine which must NOT differ + die + ein + der + ein + das + +
+*/ + +#define KV_ARTICLE_GRP "article" // article descriptor group +static const QLatin1String KV_ART_ENTRY("e"); // article entry +#define KV_ART_FD "fd" // female definite +#define KV_ART_MD "md" // male definite +#define KV_ART_ND "nd" // natural definite +#define KV_ART_FI "fi" // female indefinite +#define KV_ART_MI "mi" // male indefinite +#define KV_ART_NI "ni" // natural indefinite + +/* + + good + better + best + +*/ + +#define KV_COMPARISON_GRP "comparison" // comparison descriptor group +#define KV_COMP_L1 "l1" // base form +#define KV_COMP_L2 "l2" // next form +#define KV_COMP_L3 "l3" // last form + +/* + + good + better + best + best 2 + best 3 + +*/ + +#define KV_MULTIPLECHOICE_GRP "multiplechoice" // multiple choice descriptor group +#define KV_MC_1 "mc1" // choice 1 +#define KV_MC_2 "mc2" // choice 2 +#define KV_MC_3 "mc3" // choice 3 +#define KV_MC_4 "mc4" // choice 4 +#define KV_MC_5 "mc5" // choice 5 + +/* + used in header for definiton of "prefix" + lang determines also lang order in entries !! + I which must NOT differ in subsequent -tags + you<2> + he + she + it + we + you + they + they + they + + + + and in entry for definition of tenses of (irreg.) verbs + + go + go + goes + goes + goes + go + go + go + go + go + + +*/ + +#define KV_CONJUG_GRP "conjugation" // conjugation descriptor group +#define KV_CON_ENTRY "e" // conjugation entry (header) +#define KV_CON_TYPE "t" // conjugation type (voc entries) +#define KV_CON_NAME "n" // conjugation type name (voc entries) +#define KV_CON_P1S "s1" // 1. person singular +#define KV_CON_P2S "s2" // 2. person singular +#define KV_CON_P3SF "s3f" // 3. person singular female +#define KV_CON_P3SM "s3m" // 3. person singular male +#define KV_CON_P3SN "s3n" // 3. person singular natural +#define KV_CON_P1P "p1" // 1. person plural +#define KV_CON_P2P "p2" // 2. person plural +#define KV_CON_P3PF "p3f" // 3. person plural female +#define KV_CON_P3PM "p3m" // 3. person plural male +#define KV_CON_P3PN "p3n" // 3. person plural natural +#define KV_CONJ_COMMON "common" // female contains common for all three + + +#endif // KVTMLDEFS_H