lib

kformulamathmlread.h
1/* This file is part of the KDE project
2 Copyright (C) 2001 Andrea Rizzi <rizzi@kde.org>
3 Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KFORMULAMATHMLREAD_H
22#define KFORMULAMATHMLREAD_H
23
24#include <tqobject.h>
25#include <tqdom.h>
26#include "kformulainputfilter.h"
27#include "contextstyle.h"
28
29KFORMULA_NAMESPACE_BEGIN
30
31class MathML2KFormulaPrivate;
32
37class MathML2KFormula : public KFInputFilter
38{
39 TQ_OBJECT
40
41
42 friend class MathML2KFormulaPrivate;
43
44public:
45
52 MathML2KFormula( const TQDomDocument& mmldoc, const ContextStyle &contextStyle, bool oasisFormat = false );
53
58 MathML2KFormula( const TQDomElement& mmelm, const ContextStyle &contextStyle, bool oasisFormat = false );
59
60 /*
61 * Get the just created DOM.
62 */
63 virtual TQDomDocument getKFormulaDom();
64
65
66public slots:
67 virtual void startConversion();
68
69public:
71 bool m_error;
72
73private:
74
75 bool processElement( TQDomNode node, TQDomDocument& doc,
76 TQDomNode docnode );
77
78 TQDomElement orig_element;
79 TQDomDocument formuladoc;
80 bool oasisFormat;
81 const ContextStyle& context;
82
83 MathML2KFormulaPrivate* impl;
84
85 enum Type {
86 // Presentation Markup
87 UNKNOWN = 1,
88 TOKEN = 2, // Token Elements
89 LAYOUT = 3, // General Layout Schemata
90 SCRIPT = 4, // Script and Limit Schemata
91 TABLE = 5, // Tables and Matrices
92 EE = 6, // Enlivening Expressions
93
94 // Content Markup
95 CONTENT = 12
96 };
97};
98
99KFORMULA_NAMESPACE_END
100
101#endif // KFORMULAMATHMLREAD_H
Contains all the style information for the formela.
MathML2KFormula(const TQDomDocument &mmldoc, const ContextStyle &contextStyle, bool oasisFormat=false)
Build a MathML 2 KFormula converter.
bool m_error
Has an error happened while converting?