filters

document.h

00001 /*
00002 ** Header file for inclusion with kword_xml2latex.c
00003 **
00004 ** Copyright (C) 2000-2002 Robert JACOLIN
00005 **
00006 ** This library is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU Library General Public
00008 ** License as published by the Free Software Foundation; either
00009 ** version 2 of the License, or (at your option) any later version.
00010 **
00011 ** This library is distributed in the hope that it will be useful,
00012 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 ** Library General Public License for more details.
00015 **
00016 ** To receive a copy of the GNU Library General Public License, write to the
00017 ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
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"      /* list of tables (another kind of list of elements). */
00029 #include "key.h"
00030 
00031 
00032 /***********************************************************************/
00033 /* Class: Document                                                     */
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         //QPtrList<Element> _parts;
00056         EGenerate     _generation;
00057 
00058     public:
00064         Document();
00065 
00071         virtual ~Document();
00072 
00080         SType getTypeFrameset(const QDomNode);
00081         //FileHeader* getFileHeader() const { return _fileHeader; }
00082         //void setFileHeader(FileHeader *h) { _fileHeader = h; }
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         //QDomNode extractKoData(QString key);
00095         //Pixmap*  searchPixmap(QString);
00096 
00097     private:
00101         void generatePreambule(QTextStream&);
00102 
00106         void  generateTypeHeader(QTextStream&, Element*);
00110         void  generateTypeFooter(QTextStream&, Element*);
00111 };
00112 
00113 #endif /* __KWORD_LATEX_DOCUMENT_H__ */
KDE Home | KDE Accessibility Home | Description of Access Keys