filters
element.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_ELEMENT_H__
00024 #define __KWORD_ELEMENT_H__
00025
00026 #include <qtextstream.h>
00027 #include "xmlparser.h"
00028 #include "border.h"
00029
00030
00031 enum SType
00032 {
00033 ST_NONE,
00034 ST_TEXT,
00035 ST_PICTURE,
00036 ST_PART,
00037 ST_FORMULA,
00038 ST_CLIPART,
00039 ST_HLINE
00040 };
00041
00042 enum SSect
00043 {
00044 SS_NONE,
00045 SS_HEADERS,
00046 SS_FOOTERS,
00047 SS_BODY,
00048 SS_FOOTNOTES,
00049 SS_TABLE
00050 };
00051
00052 enum SInfo
00053 {
00054 SI_NONE,
00055 SI_FIRST,
00056 SI_ODD,
00057 SI_EVEN
00058 };
00059
00060
00061 enum TAround
00062 {
00063 TA_NONE,
00064 TA_FRAME,
00065 TA_TEXT
00066 };
00067
00068 enum TCreate
00069 {
00070 TC_EXTEND,
00071 TC_CREATE,
00072 TC_IGNORE
00073 };
00074
00075 enum TNFrame
00076 {
00077 TF_RECONNECT,
00078 TF_NOCREATION,
00079 TF_COPY
00080 };
00081
00082 enum TSide
00083 {
00084 TS_ANYSIDE,
00085 TS_ODDPAGE,
00086 TS_EVENPAGE
00087 };
00088
00089
00090
00091
00092
00097 class Element: public XmlParser, public Border
00098 {
00099
00100 SType _type;
00101 SSect _section;
00102 SInfo _hinfo;
00103 QString _name;
00104 bool _removable;
00105 bool _visible;
00106 QString _grpMgr;
00107 int _row,
00108 _col,
00109 _rows,
00110 _cols;
00111
00112
00113
00114 public:
00121 Element();
00122
00123
00124
00125
00126
00127 virtual ~Element();
00128
00129
00130
00134 SSect getSection () const { return _section; }
00135 SType getType () const { return _type; }
00136 SInfo getInfo () const { return _hinfo; }
00137 QString getName () const { return _name; }
00138 bool isVisible () const { return _visible; }
00139 bool isRemovable() const { return _removable; }
00140 QString getGrpMgr () const { return _grpMgr; }
00141 int getRow () const { return _row; }
00142 int getCol () const { return _col; }
00143 int getRows () const { return _rows; }
00144 int getCols () const { return _cols; }
00145 bool isTable () const { return (_section == SS_TABLE); }
00146
00150 void setType (SType t) { _type = t; }
00151 void setSection (SSect s) { _section = s; }
00152 void setVisible (bool v) { _visible = v; }
00153 void setRemovable(bool r) { _removable = r; }
00154 void setGrpMgr (QString g) { _grpMgr = g; }
00155 void setRow (int r) { _row = r; }
00156 void setCol (int c) { _col = c; }
00157 void setRows (int r) { _rows = r; }
00158 void setCols (int c) { _cols = c; }
00159
00168 virtual void analyse(const QDomNode);
00169 virtual void generate(QTextStream&) = 0;
00170
00171 private:
00172 void analyseParam(const QDomNode);
00173 };
00174
00175 #endif
|