filters
document.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __KWORD_LATEX_DOCUMENT_H__
00023 #define __KWORD_LATEX_DOCUMENT_H__
00024
00025 #include <qptrlist.h>
00026 #include <qtextstream.h>
00027
00028 #include "listtable.h"
00029 #include "key.h"
00030
00031
00032
00033
00034
00035
00040 class Document: public XmlParser
00041 {
00042 public:
00043 enum EGenerate { E_LATEX, E_KWORD, E_CONFIG };
00044
00045 private:
00046 QPtrList<Element> _headers;
00047 QPtrList<Element> _footers;
00048 QPtrList<Element> _footnotes;
00049 QPtrList<Element> _formulas;
00050 QPtrList<Element> _corps;
00051 QPtrList<Element> _pixmaps;
00052 QPtrList<Key> _keys;
00053
00054 ListTable _tables;
00055
00056 EGenerate _generation;
00057
00058 public:
00064 Document();
00065
00071 virtual ~Document();
00072
00080 SType getTypeFrameset(const QDomNode);
00081
00082
00083
00084 void analyse(const QDomNode);
00085 void analysePixmaps(const QDomNode);
00086
00087 void generate(QTextStream&, bool);
00088 Element* searchAnchor(QString);
00089 Element* searchFootnote(QString);
00090 Key* searchKey(QString keyName);
00092 QString extractData(QString key);
00094
00095
00096
00097 private:
00101 void generatePreambule(QTextStream&);
00102
00106 void generateTypeHeader(QTextStream&, Element*);
00110 void generateTypeFooter(QTextStream&, Element*);
00111 };
00112
00113 #endif
|