• 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
keduvockvtmlcompability.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  C++ Interface: keduvockvtml1compability_p
4 
5  -----------------------------------------------------------------------
6 
7  begin : Di Aug 28 2007
8 
9  copyright : (C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
10 
11  -----------------------------------------------------------------------
12 
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 
24 #ifndef KEDUVOCKVTMLCOMPABILITY_H
25 #define KEDUVOCKVTMLCOMPABILITY_H
26 
27 #include <QtCore/QString>
28 #include <QtCore/QMap>
29 #include <QtCore/QSet>
30 
31 
32 // internal types, indented are subtypes
33 
34 #define QM_VERB "v" // go
35 // #define QM_VERB_IRR "ir"
36 // #define QM_VERB_REG "re"
37 #define QM_NOUN "n" // table, coffee
38 // #define QM_NOUN_F "f"
39 // #define QM_NOUN_M "m"
40 // #define QM_NOUN_S "s"
41 #define QM_NAME "nm"
42 // #define QM_ART "ar" // article
43 // #define QM_ART_DEF "def" // definite a/an
44 // #define QM_ART_IND "ind" // indefinite the
45 #define QM_ADJ "aj" // adjective expensive, good
46 // #define QM_ADV "av" // adverb today, strongly
47 // #define QM_PRON "pr" // pronoun you, she
48 // #define QM_PRON_POS "pos" // possessive my, your
49 // #define QM_PRON_PER "per" // personal
50 // #define QM_PHRASE "ph"
51 // #define QM_NUM "num" // numeral
52 // #define QM_NUM_ORD "ord" // ordinal first, second
53 // #define QM_NUM_CARD "crd" // cardinal one, two
54 // #define QM_INFORMAL "ifm"
55 // #define QM_FIG "fig"
56 // #define QM_CON "con" // conjuncton and, but
57 // #define QM_PREP "pre" // preposition behind, between
58 // #define QM_QUEST "qu" // question who, what
59 
60 // type delimiters
61 
62 #define QM_USER_TYPE "#" // designates number of user type
63 #define QM_TYPE_DIV ":" // divide main from subtype
64 
65 // usage delimiters (also declared in UsageManager.h)
66 
67 #define UL_USER_USAGE "#" // designates number of user type
68 
69 class KEduVocWordType;
70 
74 class KEduVocKvtmlCompability
75 {
76 
77 public:
81  KEduVocKvtmlCompability();
82 
84 
89  KEduVocWordType* typeFromOldFormat(KEduVocWordType* parent, const QString & typeSubtypeString ) const;
90 
97  QString oldType( const QString& mainType, const QString& subType ) const;
98 
99 
100  void addUserdefinedTense( const QString& tense );
101  QString tenseFromKvtml1( const QString & oldTense );
102  QStringList documentTenses() const;
103  QString oldTense( const QString& tense );
104 
105  void setupWordTypes(KEduVocWordType* parent);
106 
107 private:
108 
110  void initOldTypeLists();
111 
112  QMap<QString, QString> m_oldMainTypeNames;
113  QMap<QString, QString> m_oldSubTypeNames;
114  int m_userdefinedTypeCounter;
115 
117  void initOldTenses();
118 
119  QMap<QString, QString> m_oldTenses;
120  int m_userdefinedTenseCounter;
121  QSet<QString> m_tenses;
122 
124  static const QString KVTML_1_USER_DEFINED;
126  static const QString KVTML_1_SEPERATOR;
127 };
128 
129 #endif // KEDUVOCKVTMLCOMPABILITY_H
KEduVocKvtmlCompability::typeFromOldFormat
KEduVocWordType * typeFromOldFormat(KEduVocWordType *parent, const QString &typeSubtypeString) const
Get the type from an old type definition.
Definition: keduvockvtmlcompability.cpp:77
KEduVocKvtmlCompability::documentTenses
QStringList documentTenses() const
Definition: keduvockvtmlcompability.cpp:209
KEduVocKvtmlCompability::KEduVocKvtmlCompability
KEduVocKvtmlCompability()
Constructor, initialize the map.
Definition: keduvockvtmlcompability.cpp:34
KEduVocWordType
class to store translation word types
Definition: keduvocwordtype.h:33
KEduVocKvtmlCompability
Definition: keduvockvtmlcompability.h:74
KEduVocKvtmlCompability::setupWordTypes
void setupWordTypes(KEduVocWordType *parent)
Definition: keduvockvtmlcompability.cpp:225
KEduVocKvtmlCompability::oldType
QString oldType(const QString &mainType, const QString &subType) const
To write old docs: convert a nice new type to the ugly old style.
KEduVocKvtmlCompability::addUserdefinedTense
void addUserdefinedTense(const QString &tense)
Definition: keduvockvtmlcompability.cpp:187
KEduVocKvtmlCompability::oldTense
QString oldTense(const QString &tense)
Definition: keduvockvtmlcompability.cpp:215
KEduVocKvtmlCompability::tenseFromKvtml1
QString tenseFromKvtml1(const QString &oldTense)
Definition: keduvockvtmlcompability.cpp:197
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