00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef RTKOUTPUTFILE_H
00022 #define RTKOUTPUTFILE_H
00023
00024 #include <qfile.h>
00025
00026 #include "rtkoutput.h"
00027
00028 namespace RTK {
00029
00030 class OutputText : public Output {
00031
00032 public:
00033 OutputText(const String& filename = String::null,
00034 PaperType papertype = A4, UnitsType units = dots,
00035 Measure sizex = 595, Measure sizey = 841, Measure marginleft = 0,
00036 Measure marginright = 0, Measure margintop = 0, Measure marginbottom = 0, int pageorientation = 0)
00037 :Output(papertype, units,
00038 sizex, sizey, marginleft,
00039 marginright, margintop, marginbottom, pageorientation),
00040 mFileName(filename)
00041
00042 {};
00043
00044 ~OutputText() {};
00045 int startReport(const Report &report);
00046 int endReport(const Report &report);
00047 Measure startPage();
00048 Measure endPage();
00049 Measure startSection(const Section §ion);
00050 Measure endSection(const Section §ion);
00051 Measure startObject(const Section §ion, const Object &object);
00052 Measure endObject(const Section §ion, const Object &object);
00053 Measure printObject(const Report &report, const Section §ion, const Object &object);
00054 Measure setPosX(Measure newx);
00055 Measure setPosY(Measure newy);
00056 bool sectionFits(const Section §ion, Measure nextsectionheight) const;
00057
00058
00059 public:
00061 const String& getFileName() const { return mFileName; };
00063 void setFileName(const String& filename) { mFileName = filename; };
00064 protected:
00065 String mFileName;
00066
00067
00068 private:
00069 char *mPageBuf;
00070 int mIntSizeX, mIntSizeY;
00071 void internal_print(const char *text, int x, int y, int len);
00072 QFile *pFile;
00073 };
00074
00075 };
00076
00077 #endif
00078