Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

rtkoutputtext.h

00001 /*<<<<<COPYRIGHT*/
00002 /*
00003  * RTK The report toolkit
00004  * Copyright (C) 2003 Francisco Santiago Capel Torres
00005 
00006  * rtkoutputtext.h RTK standard text output object
00007  * 
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  */
00019 /*>>>>>COPYRIGHT*/
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 /*<<<<<OUTPUTFILE_CONSTRUCTOR*/
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 /*>>>>>OUTPUTFILE_CONSTRUCTOR*/
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 &section);
00050     Measure endSection(const Section &section);
00051     Measure startObject(const Section &section, const Object &object);
00052     Measure endObject(const Section &section, const Object &object);
00053     Measure printObject(const Report &report, const Section &section, const Object &object);
00054     Measure setPosX(Measure newx);
00055     Measure setPosY(Measure newy);
00056     bool sectionFits(const Section &section, Measure nextsectionheight) const;
00057 
00058 /*<<<<<OUTPUTFILE_GETSET*/
00059 public:
00061         const String& getFileName() const { return mFileName; };
00063         void setFileName(const String& filename) { mFileName = filename; };
00064 protected:
00065         String mFileName;
00066 /*>>>>>OUTPUTFILE_GETSET*/
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 }; // namespace
00076 
00077 #endif
00078 

Generated on Tue Feb 22 14:44:37 2005 for RTK. Report ToolKit by  doxygen 1.3.9.1