filters
format.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __KWORD_FORMAT_H__
00024 #define __KWORD_FORMAT_H__
00025
00026 #include <qtextstream.h>
00027 #include <qstring.h>
00028 #include <qcolor.h>
00029 #include "xmlparser.h"
00030
00031 enum _EFormat
00032 {
00033 EF_ERROR,
00034 EF_TEXTZONE,
00035 EF_PICTURE,
00036 EF_TABULATOR,
00037 EF_VARIABLE,
00038 EF_FOOTNOTE,
00039 EF_ANCHOR
00040 };
00041
00042 typedef enum _EFormat EFormat;
00043
00044 class Para;
00045
00046
00047
00048
00049
00056 class Format: public XmlParser
00057 {
00058 EFormat _id;
00059 unsigned int _pos;
00060 unsigned int _taille;
00061
00062
00063 Para* _para;
00064
00065 public:
00073 Format(Para *para= 0): _id((EFormat) 0), _para(para)
00074 {}
00075
00076
00077
00078
00079
00080
00081 virtual ~Format() {}
00082
00086 EFormat getId () const { return _id; }
00087 Para* getPara () const { return _para; }
00088 EFormat getFormatType() const { return _id; }
00089 unsigned int getPos () const { return _pos; }
00090 unsigned int getLength () const { return _taille; }
00091
00095 void setId (int id) { _id = (EFormat) id; }
00096 void setPara (Para* para) { _para = para; }
00097 void setPos (const unsigned int pos){ _pos = pos; }
00098 void setLength (const unsigned int t) { _taille = t; }
00099
00107 virtual void analyse(const QDomNode);
00108
00109 virtual void generate(QTextStream&) = 0;
00110
00111
00112 };
00113
00114 #endif
|