lib

kformulamathmlread.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Andrea Rizzi <rizzi@kde.org>
00003                   Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KFORMULAMATHMLREAD_H
00022 #define KFORMULAMATHMLREAD_H
00023 
00024 #include <qobject.h>
00025 #include <qdom.h>
00026 #include "kformulainputfilter.h"
00027 #include "contextstyle.h"
00028 
00029 KFORMULA_NAMESPACE_BEGIN
00030 
00031 class MathML2KFormulaPrivate;
00032 
00037 class MathML2KFormula : public KFInputFilter
00038 {
00039     Q_OBJECT
00040 
00041     friend class MathML2KFormulaPrivate;
00042 
00043 public:
00044 
00051     MathML2KFormula( const QDomDocument& mmldoc, const ContextStyle &contextStyle, bool oasisFormat = false );
00052 
00053     /*
00054      * Get the just created DOM.
00055      */
00056     virtual QDomDocument getKFormulaDom();
00057 
00058 
00059 public slots:
00060     virtual void startConversion();
00061 
00062 public:
00064     bool m_error;
00065 
00066 private:
00067 
00068     bool processElement( QDomNode node, QDomDocument& doc,
00069                          QDomNode docnode );
00070 
00071     QDomDocument origdoc;
00072     QDomDocument formuladoc;
00073     bool oasisFormat;
00074     const ContextStyle& context;
00075 
00076     MathML2KFormulaPrivate* impl;
00077 
00078     enum Type {
00079         // Presentation Markup
00080         UNKNOWN = 1,
00081         TOKEN   = 2, // Token Elements
00082         LAYOUT  = 3, // General Layout Schemata
00083         SCRIPT  = 4, // Script and Limit Schemata
00084         TABLE   = 5, // Tables and Matrices
00085         EE      = 6, // Enlivening Expressions
00086 
00087         // Content Markup
00088         CONTENT = 12
00089     };
00090 };
00091 
00092 KFORMULA_NAMESPACE_END
00093 
00094 #endif // KFORMULAMATHMLREAD_H
KDE Home | KDE Accessibility Home | Description of Access Keys