Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 FLReportPages.h 00003 ------------------- 00004 begin : 02/01/2011 00005 copyright : (C) 2003-2011 by InfoSiAL S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; version 2 of the License. * 00012 ***************************************************************************/ 00013 /*************************************************************************** 00014 Este programa es software libre. Puede redistribuirlo y/o modificarlo 00015 bajo los términos de la Licencia Pública General de GNU en su 00016 versión 2, publicada por la Free Software Foundation. 00017 ***************************************************************************/ 00018 00019 #ifndef FLREPORTPAGES_H_ 00020 #define FLREPORTPAGES_H_ 00021 00022 #include <qobject.h> 00023 00024 class FLPicture; 00025 class FLReportEngine; 00026 class FLJasperEngine; 00027 class MPageCollection; 00028 00029 class FLReportPages : public QObject 00030 { 00031 Q_OBJECT 00032 Q_ENUMS(PageOrientation) 00033 Q_ENUMS(PageSize) 00034 00035 public: 00036 00037 enum PageOrientation { 00038 Portrait, 00039 Landscape 00040 }; 00041 00042 enum PageSize { 00043 A4, B5, Letter, Legal, Executive, 00044 A0, A1, A2, A3, A5, A6, A7, A8, A9, B0, B1, 00045 B10, B2, B3, B4, B6, B7, B8, B9, C5E, Comm10E, 00046 DLE, Folio, Ledger, Tabloid, Custom, NPageSize = Custom 00047 }; 00048 00049 void setPageCollection(MPageCollection *pages); 00050 MPageCollection *pageCollection() const { 00051 return pages_; 00052 } 00053 00054 public slots: 00055 00056 FLPicture *getCurrentPage(); 00057 FLPicture *getFirstPage(); 00058 FLPicture *getPreviousPage(); 00059 FLPicture *getNextPage(); 00060 FLPicture *getLastPage(); 00061 FLPicture *getPageAt(uint i); 00062 00063 void clearPages(); 00064 void appendPage(); 00065 int getCurrentIndex(); 00066 void setCurrentPage(int idx); 00067 void setPageSize(int s); 00068 void setPageOrientation(int o); 00069 void setPageDimensions(QSize dim); 00070 int pageSize(); 00071 int pageOrientation(); 00072 QSize pageDimensions(); 00073 int pageCount(); 00074 00075 private: 00076 00077 FLReportPages() : QObject(), pages_(0) {} 00078 00079 MPageCollection *pages_; 00080 00081 friend class FLReportEngine; 00082 friend class FLJasperEngine; 00083 }; 00084 00085 #endif /* FLREPORTPAGES_H_ */