File indexing completed on 2022-10-04 13:56:37

0001 /*
0002  * Vocabulary Document for KDE Edu
0003  * SPDX-FileCopyrightText: 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
0004  * SPDX-FileCopyrightText: 2005, 2007 Peter Hedlund <peter.hedlund@kdemail.net>
0005  * SPDX-FileCopyrightText: 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef KVTMLDEFS_H
0010 #define KVTMLDEFS_H
0011 
0012 
0013 
0014 /** XML tags and attribute names */
0015 
0016 static const QLatin1String KV_DOCTYPE( "kvtml" ); // doctype
0017 #define KV_TITLE       "title"     // doc title
0018 #define KV_AUTHOR      "author"    // doc author
0019 #define KV_LICENSE     "license"   // doc license
0020 #define KV_DOC_REM     "remark"    // doc remark
0021 #define KV_LINES       "lines"     // entries
0022 #define KV_GENERATOR   "generator" // who generated the doc
0023 #define KV_COLS        "cols"      // columns
0024 #define KV_ENCODING    "encoding"  // document encoding  (obsolete!)
0025 
0026 #define KV_EXPR        "e"         // entry for one expression
0027 static const QLatin1String KV_ORG( "o" );       // original expression in specified language
0028 static const QLatin1String KV_TRANS( "t" );     // translated expression in specified language
0029 #define KV_LANG        "l"         // language: en, de, it, fr ...
0030 #define KV_QUERY       "q"         // query: org or translation
0031 #define KV_O           "o"         // org
0032 #define KV_T           "t"         // translation
0033 #define KV_GRADE       "g"         // grade of knowledge: 0=well known, x=not known for x times
0034 #define KV_LESS_MEMBER "m"         // member of lesson 1 .. x
0035 #define KV_COUNT       "c"         // number of times queried
0036 #define KV_SIZEHINT    "width"     // recommended column width
0037 #define KV_CHARSET     "charset"   // recommended charset (obsolete!)
0038 #define KV_BAD         "b"         // number of times failed
0039 #define KV_DATE        "d"         // last query date
0040 #define KV_DATE2       "w"         // last query date, compressed format, deprecated, currently ignored
0041 #define KV_REMARK      "r"         // remark for this entry
0042 #define KV_FAUX_AMI_F  "ff"        // false friend of this entry from org
0043 #define KV_FAUX_AMI_T  "tf"        // false friend of this entry to org
0044 #define KV_SYNONYM     "y"         // synonym (same meaning) of expr
0045 #define KV_ANTONYM     "a"         // antonym (opposite) of expr
0046 #define KV_PRONUNCE    "p"         // how to pronounce this expression
0047 #define KV_SELECTED    "s"         // entry selected for queries
0048 #define KV_INACTIVE    "i"         // entry inactive (for queries)
0049 #define KV_EXPRTYPE    "t"         // type of expression
0050 #define KV_EXAMPLE     "x"         // example string with word
0051 #define KV_USAGE       "u"         // usage label
0052 #define KV_PARAPHRASE  "h"         // paraphrase for expression
0053 
0054 /*
0055  <type>
0056   <desc no="1">My type 1</desc>
0057   <desc no="2">My type 2</desc>
0058  </type>
0059 */
0060 
0061 #define KV_TYPE_GRP    "type"      // type descriptor group
0062 #define KV_TYPE_DESC   "desc"      // type descriptor
0063 #define KV_TYPE_NO     "no"        // type descriptor number
0064 
0065 /*
0066  <usage>
0067   <desc no="1">My usage 1</desc>
0068   <desc no="2">My usage 2</desc>
0069  </type>
0070 */
0071 
0072 #define KV_USAGE_GRP    "usage"     // usage descriptor group
0073 #define KV_USAGE_DESC   "desc"      // usage descriptor
0074 #define KV_USAGE_NO     "no"        // usage descriptor number
0075 
0076 /*
0077  <lesson width="138">
0078   <desc no="1">Lesson #1</desc>
0079   <desc no="2" query="1">Lesson #2</desc>
0080  </lesson>
0081 */
0082 
0083 #define KV_LESS_GRP    "lesson"    // lesson descriptor group
0084 #define KV_LESS_CURR   "current"   // is current lesson
0085 #define KV_LESS_DESC   "desc"      // lesson descriptor
0086 #define KV_LESS_QUERY  "query"     // lesson contained in query
0087 #define KV_LESS_NO     "no"        // lesson descriptor number
0088 
0089 /*
0090  <tense>
0091   <desc no="1">user tense #1</desc>
0092   <desc no="2">user tense #2</desc>
0093  </tense>
0094 */
0095 
0096 #define KV_TENSE_GRP    "tense"     // tense descriptor group
0097 #define KV_TENSE_DESC   "desc"      // tense descriptor
0098 #define KV_TENSE_NO     "no"        // tense descriptor number
0099 
0100 /*
0101  <options>
0102   <sort on="1"/>
0103  </options>
0104 */
0105 
0106 #define KV_OPTION_GRP  "options"   // internal options group
0107 #define KV_OPT_SORT    "sort"      // allow sorting
0108 #define KV_BOOL_FLAG   "on"        // general boolean flag
0109 
0110 /*
0111  <article>
0112   <e l="de">        lang determines also lang order in entries !!
0113    <fi>eine</fi>    which must NOT differ
0114    <fd>die</fd>
0115    <mi>ein</mi>
0116    <md>der</md>
0117    <ni>ein</ni>
0118    <nd>das</nd>
0119   </e>
0120  </article>
0121 */
0122 
0123 #define KV_ARTICLE_GRP "article"   // article descriptor group
0124 static const QLatin1String KV_ART_ENTRY( "e" ); // article entry
0125 #define KV_ART_FD      "fd"        // female definite
0126 #define KV_ART_MD      "md"        // male definite
0127 #define KV_ART_ND      "nd"        // natural definite
0128 #define KV_ART_FI      "fi"        // female indefinite
0129 #define KV_ART_MI      "mi"        // male indefinite
0130 #define KV_ART_NI      "ni"        // natural indefinite
0131 
0132 /*
0133  <comparison>
0134    <l1>good</l1>
0135    <l2>better</l2>
0136    <l3>best</l3>
0137  </comparison>
0138 */
0139 
0140 #define KV_COMPARISON_GRP "comparison"   // comparison descriptor group
0141 #define KV_COMP_L1        "l1"           // base form
0142 #define KV_COMP_L2        "l2"           // next form
0143 #define KV_COMP_L3        "l3"           // last form
0144 
0145 /*
0146  <multiplechoice>
0147    <mc1>good</mc1>
0148    <mc2>better</mc2>
0149    <mc3>best</mc3>
0150    <mc4>best 2</mc4>
0151    <mc5>best 3</mc5>
0152  </multiplechoice>
0153 */
0154 
0155 #define KV_MULTIPLECHOICE_GRP "multiplechoice"   // multiple choice descriptor group
0156 #define KV_MC_1        "mc1"           // choice 1
0157 #define KV_MC_2        "mc2"           // choice 2
0158 #define KV_MC_3        "mc3"           // choice 3
0159 #define KV_MC_4        "mc4"           // choice 4
0160 #define KV_MC_5        "mc5"           // choice 5
0161 
0162 /*
0163  <conjugation>        used in header for definition of "prefix"
0164   <e l="de">          lang determines also lang order in entries !!
0165    <s1>I</s1>         which must NOT differ in subsequent <e>-tags
0166    <s2>you<2>
0167    <s3f>he</s3f>
0168    <s3m>she</s3m>
0169    <s3n>it</s3n>
0170    <p1>we</p1>
0171    <p2>you</p2>
0172    <p3f>they</p3f>
0173    <p3m>they</p3m>
0174    <p3n>they</p3n>
0175   </e>
0176  </conjugation>
0177 
0178  <conjugation>        and in entry for definition of tenses of (irreg.) verbs
0179   <t n="sipa">
0180    <s1>go</s1>
0181    <s2>go</s2>
0182    <s3f>goes</s3f>
0183    <s3m>goes</s3m>
0184    <s3n>goes</s3n>
0185    <p1>go</p1>
0186    <p2>go</p2>
0187    <p3f>go</p3f>
0188    <p3m>go</p3m>
0189    <p3n>go</p3n>
0190   </t>
0191  </conjugation>
0192 */
0193 
0194 #define KV_CONJUG_GRP  "conjugation" // conjugation descriptor group
0195 #define KV_CON_ENTRY   "e"           // conjugation entry (header)
0196 #define KV_CON_TYPE    "t"           // conjugation type  (voc entries)
0197 #define KV_CON_NAME    "n"           // conjugation type name (voc entries)
0198 #define KV_CON_P1S     "s1"          // 1. person singular
0199 #define KV_CON_P2S     "s2"          // 2. person singular
0200 #define KV_CON_P3SF    "s3f"         // 3. person singular female
0201 #define KV_CON_P3SM    "s3m"         // 3. person singular male
0202 #define KV_CON_P3SN    "s3n"         // 3. person singular natural
0203 #define KV_CON_P1P     "p1"          // 1. person plural
0204 #define KV_CON_P2P     "p2"          // 2. person plural
0205 #define KV_CON_P3PF    "p3f"         // 3. person plural female
0206 #define KV_CON_P3PM    "p3m"         // 3. person plural male
0207 #define KV_CON_P3PN    "p3n"         // 3. person plural natural
0208 #define KV_CONJ_COMMON "common"      // female contains common for all three
0209 
0210 
0211 #endif // KVTMLDEFS_H