filters
variableformat.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __KWORD_VARIABLEFORMAT_H__
00023 #define __KWORD_VARIABLEFORMAT_H__
00024
00025 #include <qstring.h>
00026 #include <qcolor.h>
00027 #include "textzone.h"
00028
00029 enum _EVarType
00030 {
00031 VAR_DATE,
00032 VAR_UNUSED,
00033 VAR_TIME,
00034 VAR_UNUSED2,
00035 VAR_PAGE,
00036 VAR_UNUSED3,
00037 VAR_CUSTOM,
00038 VAR_MAILMERGE,
00039 VAR_FIELD,
00040 VAR_LINK,
00041 VAR_NOTE,
00042 VAR_FOOTNOTE
00043 };
00044
00045 typedef enum _EVarType EVarType;
00046
00047
00048
00049
00050
00055 class VariableFormat: public TextZone
00056 {
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 QString _key;
00068 EVarType _varType;
00069 QString _text;
00070
00071
00072 int _day;
00073 int _month;
00074 int _year;
00075 bool _fix;
00076
00077
00078 int _hour;
00079 int _minute;
00080 int _seconde;
00081
00082
00083 QString _numberingtype;
00084 QString _notetype;
00085 QString _frameset;
00086 QString _value;
00087
00088
00089 QString _note;
00090
00091 public:
00098 VariableFormat(Para* para): TextZone(para)
00099 {
00100 setSize(11);
00101 setWeight(0);
00102 setItalic(false);
00103 setUnderlined(UNDERLINE_NONE);
00104 setStrikeout(0);
00105 setPos(0);
00106 setLength(0);
00107 }
00108
00109
00110
00111
00112
00113
00114
00115 virtual ~VariableFormat() {}
00116
00117
00118 QString getKey () const { return _key; }
00119 QString getText () const { return _text; }
00120 EVarType getType () const { return _varType; }
00121 int getDay () const { return _day; }
00122 int getMonth () const { return _month; }
00123 int getYear () const { return _year; }
00124 int getHour () const { return _hour; }
00125 int getMinute () const { return _minute; }
00126 int getSeconde () const { return _seconde; }
00127 QString getNumberingtype() const { return _numberingtype; }
00128 QString getNotetype () const { return _notetype; }
00129 QString getFrameset () const { return _frameset; }
00130 QString getValue () const { return _value; }
00131 QString getNote () const { return _note; }
00132
00133 bool isFix () const { return (_fix == true); }
00134
00135
00136 void setType (const int t) { _varType = (EVarType) t; }
00137 void setKey (QString k) { _key = k; }
00138 void setText (QString t) { _text = t; }
00139 void setFix (bool f) { _fix = f; }
00140 void setDay (const int d) { _day = d; }
00141 void setMonth (const int m) { _year = m; }
00142 void setYear (const int y) { _month = y; }
00143 void setHour (const int h) { _hour = h; }
00144 void setMinute (const int m) { _minute = m; }
00145 void setSeconde (const int s) { _seconde = s; }
00146 void setColor (const int, const int, const int);
00147 void setNumberingtype(const QString nt) { _numberingtype = nt; }
00148 void setNotetype (const QString nt) { _notetype = nt; }
00149 void setFrameset (const QString fs) { _frameset = fs; }
00150 void setValue (const QString val) { _value = val; }
00151 void setNote (const QString note) { _note = note; }
00152
00153
00154 void analyseFormat(const QDomNode);
00155 void analyseDate (const QDomNode);
00156 void analyseTime (const QDomNode);
00157 void analyseFootnote (const QDomNode);
00158 void analyseNote (const QDomNode);
00159 void analyseType (const QDomNode);
00160 };
00161
00162 #endif
|