39
39
class FileHeader: public XmlParser
42
enum TFormat { TF_A3, TF_A4, TF_A5, TF_USLETTER, TF_USLEGAL, TF_SCREEN,
43
TF_CUSTOM, TF_B3, TF_USEXECUTIVE };
44
enum TUnit { TMillimeter, TCentimeter, TPoint, TInch };
45
enum TOrient { TO_PORTRAIT, TO_LANDSCAPE };
46
enum TColonne { TC_NONE, TC_1, TC_2, TC_MORE };
47
enum THeadfoot { TH_ALL = 0, TH_XXX = 1, TH_FIRST = 2, TH_EVODD = 3 };
48
enum TProcType { TP_NORMAL, TP_DTP };
50
static FileHeader* instance(void);
59
double _columnSpacing;
62
TProcType _processing;
82
/* for special packages to include */
94
virtual ~FileHeader();
99
TFormat getFormat () const { return _format; }
100
TOrient getOrientation () const { return _orientation; }
101
TColonne getColumns () const { return _colonne; }
102
THeadfoot getHeadType () const { return _headType; }
103
THeadfoot getFootType () const { return _footType; }
104
TUnit getUnit () const { return _unite; }
105
TProcType getProcessing () const { return _processing; }
106
int getStandardPge () const { return _standardPage; }
107
bool hasHeader () const { return _hasHeader; }
108
bool hasFooter () const { return _hasFooter; }
109
bool hasTOC () const { return _hasTOC; }
110
bool hasColor () const { return _hasColor; }
111
bool hasUnderline () const { return _hasUnderline; }
112
bool hasEnumerate () const { return _hasEnumerate; }
113
bool hasGraphics () const { return _hasGraphics; }
114
bool hasTable () const { return _hasTable; }
119
void setFormat (TFormat f) { _format = f; }
120
void setFormat (int f) { _format = (TFormat) f; }
121
void setOrientation(TOrient o) { _orientation = o; }
122
void setOrientation(int o) { _orientation = (TOrient) o; }
123
void setColumns (TColonne c) { _colonne = c; }
124
void setColumns (int c) { _colonne = (TColonne) c; }
125
void setUnit (int u) { _unite = (TUnit) u; }
126
void setProcessing (int p) { _processing = (TProcType) p; }
127
void setStandardPge(int s) { _standardPage = s; }
128
void setTOC (int t) { _hasTOC = t; }
129
void setHeadType (int ht) { _headType = (THeadfoot) ht; }
130
void setFootType (int ft) { _footType = (THeadfoot) ft; }
131
void useColor () { _hasColor = true; }
132
void useUnderline () { _hasUnderline = true; }
133
void useEnumerate () { _hasEnumerate = true; }
134
void useGraphics () { _hasGraphics = true; }
135
void useTable () { _hasTable = true; }
137
void analyzePaper (const QDomNode);
138
void analyzeAttributes (const QDomNode);
140
void generate (QTextStream &);
146
FileHeader(); /* Ensure singleton */
148
static FileHeader* _instance; /* singleton */
152
void analyzePaperParam(const QDomNode);
154
void generatePaper (QTextStream&);
155
void generateLatinPreamble(QTextStream&);
156
void generateUnicodePreamble(QTextStream&);
157
void generatePackage (QTextStream&);
42
enum TFormat { TF_A3, TF_A4, TF_A5, TF_USLETTER, TF_USLEGAL, TF_SCREEN,
43
TF_CUSTOM, TF_B3, TF_USEXECUTIVE
45
enum TUnit { TMillimeter, TCentimeter, TPoint, TInch };
46
enum TOrient { TO_PORTRAIT, TO_LANDSCAPE };
47
enum TColonne { TC_NONE, TC_1, TC_2, TC_MORE };
48
enum THeadfoot { TH_ALL = 0, TH_XXX = 1, TH_FIRST = 2, TH_EVODD = 3 };
49
enum TProcType { TP_NORMAL, TP_DTP };
51
static FileHeader* instance(void);
60
double _columnSpacing;
63
TProcType _processing;
83
/* for special packages to include */
95
virtual ~FileHeader();
100
TFormat getFormat() const {
103
TOrient getOrientation() const {
106
TColonne getColumns() const {
109
THeadfoot getHeadType() const {
112
THeadfoot getFootType() const {
115
TUnit getUnit() const {
118
TProcType getProcessing() const {
121
int getStandardPge() const {
122
return _standardPage;
124
bool hasHeader() const {
127
bool hasFooter() const {
130
bool hasTOC() const {
133
bool hasColor() const {
136
bool hasUnderline() const {
137
return _hasUnderline;
139
bool hasEnumerate() const {
140
return _hasEnumerate;
142
bool hasGraphics() const {
145
bool hasTable() const {
152
void setFormat(TFormat f) {
155
void setFormat(int f) {
156
_format = (TFormat) f;
158
void setOrientation(TOrient o) {
161
void setOrientation(int o) {
162
_orientation = (TOrient) o;
164
void setColumns(TColonne c) {
167
void setColumns(int c) {
168
_colonne = (TColonne) c;
170
void setUnit(int u) {
173
void setProcessing(int p) {
174
_processing = (TProcType) p;
176
void setStandardPge(int s) {
182
void setHeadType(int ht) {
183
_headType = (THeadfoot) ht;
185
void setFootType(int ft) {
186
_footType = (THeadfoot) ft;
191
void useUnderline() {
192
_hasUnderline = true;
194
void useEnumerate() {
195
_hasEnumerate = true;
204
void analyzePaper(const QDomNode);
205
void analyzeAttributes(const QDomNode);
207
void generate(QTextStream &);
213
FileHeader(); /* Ensure singleton */
215
static FileHeader* _instance; /* singleton */
219
void analyzePaperParam(const QDomNode);
221
void generatePaper(QTextStream&);
222
void generateLatinPreamble(QTextStream&);
223
void generateUnicodePreamble(QTextStream&);
224
void generatePackage(QTextStream&);