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

rtkoutputopenoffice.h

00001 /*<<<<<COPYRIGHT*/
00002 /*
00003  * RTK The report toolkit
00004  * Copyright (C) 2003 Francisco Santiago Capel Torres
00005 
00006  * rtkoutputopenoffice.h RTK openoffice 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 RTKOUTPUTOPENOFFICE_H
00022 #define RTKOUTPUTOPENOFFICE_H
00023 
00024 #include <qfile.h>
00025 
00026 #include "rtkoutput.h"
00027 
00028 namespace RTK
00029 {
00030 
00031 class OutputOpenOffice : public Output
00032 {
00033 public:
00034         enum OOCreateOptions { CREATE, REPLACE_CONTENT, ADD_FIRST_SHEET, ADD_LAST_SHEET, REPLACE_FIRST_SHEET, REPLACE_LAST_SHEET };
00035 /*<<<<<OUTPUTOPENOFFICE_CONSTRUCTOR*/
00036 public:
00037         OutputOpenOffice(const String& filename = String::null, const String& encoding = String::null, 
00038                 const String& templatedir = String::null, const OOCreateOptions& replacecontent = CREATE,
00039         PaperType papertype = A4, UnitsType units = dots, 
00040                 Measure sizex = 595, Measure sizey = 841, Measure marginleft = 0, 
00041                 Measure marginright = 0, Measure margintop = 0, Measure marginbottom = 0, int pageorientation = 0)
00042         :Output(papertype, units, 
00043                 sizex, sizey, marginleft, 
00044                 marginright, margintop, marginbottom, pageorientation),
00045         mFileName(filename), mEncoding(encoding), 
00046                 mTemplatePath(templatedir), mReplaceContent(replacecontent)
00047 /*>>>>>OUTPUTOPENOFFICE_CONSTRUCTOR*/
00048         , mDetailsFieldCount(0) {}
00049 
00050         ~OutputOpenOffice() {}
00051         int startReport( const Report &report );
00052         int endReport( const Report &report );
00053         Measure startPage();
00054         Measure endPage();
00055         Measure startSection( const Section &section );
00056         Measure endSection( const Section &section );
00057         Measure startObject( const Section &section, const Object &object );
00058         Measure endObject( const Section &section, const Object &object );
00059         Measure printObject( const Report &report, const Section &section, const Object &object );
00060         Measure setPosX( Measure newx );
00061         Measure setPosY( Measure newy );
00062 
00063 /*<<<<<OUTPUTOPENOFFICE_GETSET*/
00064 public:
00066         const String& getFileName() const { return mFileName; };
00068         void setFileName(const String& filename) { mFileName = filename; };
00070         const String& getEncoding() const { return mEncoding; };
00072         void setEncoding(const String& encoding) { mEncoding = encoding; };
00074         const String& getTemplatePath() const { return mTemplatePath; };
00076         void setTemplatePath(const String& templatedir) { mTemplatePath = templatedir; };
00078         const OOCreateOptions& getReplaceContent() const { return mReplaceContent; };
00080         void setReplaceContent(const OOCreateOptions& replacecontent) { mReplaceContent = replacecontent; };
00081 protected:
00082         String mFileName;
00083         String mEncoding;
00084         String mTemplatePath;
00085         OOCreateOptions mReplaceContent;
00086 /*>>>>>OUTPUTOPENOFFICE_GETSET*/
00087 
00088 private:
00089         int mDetailsFieldCount;
00090         int mIntSizeX, mIntSizeY;
00091         QFile *pFile;
00092 };
00093 
00094 }; // namespace
00095 
00096 #endif
00097 

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