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

lokalize

  • sources
  • kde-4.14
  • kdesdk
  • lokalize
  • src
  • glossary
tbxparser_obsolete.h
Go to the documentation of this file.
1 /* ****************************************************************************
2  This file is part of Lokalize
3 
4  Copyright (C) 2007-2009 by Nick Shaforostoff <shafff@ukr.net>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License as
8  published by the Free Software Foundation; either version 2 of
9  the License or (at your option) version 3 or any later version
10  accepted by the membership of KDE e.V. (or its successor approved
11  by the membership of KDE e.V.), which shall act as a proxy
12  defined in Section 14 of version 3 of the license.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 **************************************************************************** */
23 
24 #ifndef TBXPARSER_H
25 #define TBXPARSER_H
26 
27 #include <QXmlDefaultHandler>
28 
29 #include "glossary.h"
30 
31 namespace GlossaryNS {
32 
41 class TbxParser : public QXmlDefaultHandler
42 {
43  enum State //localstate for getting chars into right place
44  {
45  null=0,
46 // termGrp,
47  term,
48  descripDefinition,
49  descripSubjectField
50  };
51 
52  enum Lang
53  {
54  langNull=0,
55  langEn,
56  langTarget
57  };
58 
59 public:
60  TbxParser(Glossary* glossary)
61  : QXmlDefaultHandler()
62  , m_glossary(glossary)
63  {}
64 
65  ~TbxParser(){}
66 
67  bool startDocument();
68  bool startElement(const QString&,const QString&,const QString&,const QXmlAttributes&);
69  bool endElement(const QString&,const QString&,const QString&);
70  bool characters(const QString&);
71 
72 private:
73 // bool inTermTag:1;
74  State m_state:8;
75  Lang m_lang:8;
76  QString m_termEn;
77  QString m_termOther;
78  TermEntry m_entry;
79  QString m_subjectField;
80  Glossary* m_glossary;
81 
82 };
83 }
84 #endif
GlossaryNS::TbxParser
loads only data we need to store in memory e.g.
Definition: tbxparser_obsolete.h:41
GlossaryNS::TbxParser::TbxParser
TbxParser(Glossary *glossary)
Definition: tbxparser_obsolete.h:60
QXmlDefaultHandler
GlossaryNS::TbxParser::~TbxParser
~TbxParser()
Definition: tbxparser_obsolete.h:65
GlossaryNS::Glossary
Internal representation of glossary.
Definition: glossary.h:95
GlossaryNS::TbxParser::startDocument
bool startDocument()
Definition: tbxparser_obsolete.cpp:32
QString
glossary.h
QXmlAttributes
GlossaryNS::TbxParser::characters
bool characters(const QString &)
Definition: tbxparser_obsolete.cpp:125
GlossaryNS::TbxParser::startElement
bool startElement(const QString &, const QString &, const QString &, const QXmlAttributes &)
Definition: tbxparser_obsolete.cpp:41
GlossaryNS::TbxParser::endElement
bool endElement(const QString &, const QString &, const QString &)
Definition: tbxparser_obsolete.cpp:75
GlossaryNS::TermEntry
struct that contains types data we work with.
Definition: glossary.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

lokalize

Skip menu "lokalize"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

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