fix i18nc typo in last commit
[kdeaccessibility.git] / ksayit / src / saxhandler.h
blob8d4abe73c193297a5b2886ed6870d23099da3e89
1 //
2 // C++ Interface: saxhandler
3 //
4 // Description: Qt SAX2-Handler
5 //
6 //
7 // Author: Robert Vogl <voglrobe@web.de>, (C) 2005
8 //
9 // Copyright: See COPYING file that comes with this distribution
12 #ifndef SAXHANDLER_H
13 #define SAXHANDLER_H
15 // STL includes
16 #include <map>
17 using namespace std;
19 // Qt includes
20 #include <QtXml>
23 typedef map<QString, QString> TagMapT;
26 /**
27 @author Robert Vogl
29 class SaxHandler : public QXmlDefaultHandler
31 public:
32 SaxHandler();
33 ~SaxHandler();
35 // Reimplementations from base class
36 bool startElement(const QString &namespaceURI,
37 const QString &localName,
38 const QString &qName,
39 const QXmlAttributes &atts );
41 bool endElement(const QString &namespaceURI,
42 const QString &localName,
43 const QString &qName);
45 bool characters(const QString &ch);
47 bool fatalError(const QXmlParseException &exc);
49 bool resolveEntity(const QString &publicId,
50 const QString &systemId,
51 QXmlInputSource* &ret);
53 bool externalEntityDecl(const QString &name,
54 const QString &publicId,
55 const QString &systemId);
57 bool internalEntityDecl(const QString &name,
58 const QString &value);
60 bool skippedEntity(const QString &name);
62 /**
63 * Returns the parser result.
65 void getData( QString &data ) const;
67 /**
68 * Reset
70 void reset();
72 /**
73 * Set Mode:
74 * \param rtf 'true' = Replace DocBook tags with RTF-tags.\n
75 * 'false' = Ignore tags, return text content only.
77 void setRTF(bool rtf);
80 private:
81 QString m_output;
82 bool m_rtf;
83 TagMapT m_tagmap;
87 #endif