Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSReportViewer_p.h 00003 ------------------- 00004 begin : 02/11/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 AQSREPORTVIEWER_P_H_ 00020 #define AQSREPORTVIEWER_P_H_ 00021 00022 #include "AQSWidget_p.h" 00023 #include "AQObjects.h" 00024 #include "AQSDomNode_p.h" 00025 00026 class AQSReportViewer : public AQSWidget 00027 { 00028 Q_OBJECT 00029 00030 AQ_DECLARE_AQS_AQOBJECT(ReportViewer, Widget); 00031 00032 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00033 public slots: 00034 void exec(); 00035 bool renderReport(int = 0, int = 0, uint = MReportViewer::Display); 00036 bool setReportData(FLSqlQuery *); 00037 bool setReportData(FLSqlCursor *); 00038 bool setReportData(QDomNode *); 00039 bool setReportData(AQSDomNode *); 00040 bool setReportTemplate(const QString &, const QString& = QString::null); 00041 bool setReportTemplate(QDomNode *, const QString& = QString::null); 00042 bool setReportTemplate(AQSDomNode *, const QString& = QString::null); 00043 QSize sizeHint() const; 00044 void setNumCopies(const int); 00045 void setPrintToPos(bool); 00046 void setPrinterName(const QString &); 00047 bool reportPrinted(); 00048 void setStyleName(const QString &); 00049 MReportViewer *rptViewer() const; 00050 FLReportEngine *rptEngine() const; 00051 void rptViewerEmbedInParent(QWidget *); 00052 void rptViewerReparent(QWidget *); 00053 QString csvData(); 00054 void setReportPages(FLReportPages *); 00055 00056 protected: 00057 static void *construct(const QSArgumentList &args) { 00058 QMap<int, QStringList> candidates; 00059 candidates[0].append(QString::null); 00060 candidates[1].append(QString::fromLatin1("QWidget*")); 00061 candidates[2].append(QString::fromLatin1("QWidget*,QString")); 00062 candidates[3].append(QString::fromLatin1("QWidget*,QString,bool")); 00063 candidates[4].append(QString::fromLatin1("QWidget*,QString,bool,FLReportEngine*")); 00064 QString sgt(castArgsSignature(args, candidates)); 00065 if (sgt.isEmpty()) 00066 return new AQReportViewer; 00067 if (sgt == QString::fromLatin1("QWidget*")) 00068 return new AQReportViewer(argValue<QWidget *>(args[0])); 00069 if (sgt == QString::fromLatin1("QWidget*,QString")) 00070 return new AQReportViewer(argValue<QWidget *>(args[0]), 00071 *(argValue<QString *>(args[1]))); 00072 if (sgt == QString::fromLatin1("QWidget*,QString,bool")) 00073 return new AQReportViewer(argValue<QWidget *>(args[0]), 00074 *(argValue<QString *>(args[1])), 00075 args[2].variant().toBool()); 00076 if (sgt == QString::fromLatin1("QWidget*,QString,bool,FLReportEngine*")) 00077 return new AQReportViewer(argValue<QWidget *>(args[0]), 00078 *(argValue<QString *>(args[1])), 00079 args[2].variant().toBool(), 00080 argValue<FLReportEngine *>(args[3])); 00081 return 0; 00082 } 00083 00084 public: 00085 static QMap<int, QStringList> candidateConstructors() { 00086 QMap<int, QStringList> candidates; 00087 candidates[0].append(QString::null); 00088 candidates[1].append(QString::fromLatin1("QWidget*")); 00089 candidates[2].append(QString::fromLatin1("QWidget*,QString")); 00090 candidates[3].append(QString::fromLatin1("QWidget*,QString,bool")); 00091 candidates[4].append(QString::fromLatin1("QWidget*,QString,bool,FLReportEngine*")); 00092 return candidates; 00093 } 00094 //@AQ_END_DEF_PUB_SLOTS@ 00095 }; 00096 00097 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00098 inline void AQSReportViewer::exec() 00099 { 00100 AQ_CALL_VOID(exec()); 00101 } 00102 inline bool AQSReportViewer::renderReport(int arg0, int arg1, uint arg2) 00103 { 00104 AQ_CALL_RET_V(renderReport(arg0, arg1, arg2), bool); 00105 } 00106 inline bool AQSReportViewer::setReportData(FLSqlQuery *arg0) 00107 { 00108 AQ_CALL_RET_V(setReportData(arg0), bool); 00109 } 00110 inline bool AQSReportViewer::setReportData(FLSqlCursor *arg0) 00111 { 00112 AQ_CALL_RET_V(setReportData(arg0), bool); 00113 } 00114 inline bool AQSReportViewer::setReportData(QDomNode *arg0) 00115 { 00116 AQ_CALL_RET_V(setReportData(*arg0), bool); 00117 } 00118 inline bool AQSReportViewer::setReportData(AQSDomNode *arg0) 00119 { 00120 AQ_CALL_RET_V(setReportData(*arg0), bool); 00121 } 00122 inline bool AQSReportViewer::setReportTemplate(const QString &arg0, const QString &arg1) 00123 { 00124 AQ_CALL_RET_V(setReportTemplate(arg0, arg1), bool); 00125 } 00126 inline bool AQSReportViewer::setReportTemplate(QDomNode *arg0, const QString &arg1) 00127 { 00128 AQ_CALL_RET_V(setReportTemplate(*arg0, arg1), bool); 00129 } 00130 inline bool AQSReportViewer::setReportTemplate(AQSDomNode *arg0, const QString &arg1) 00131 { 00132 AQ_CALL_RET_V(setReportTemplate(*arg0, arg1), bool); 00133 } 00134 inline QSize AQSReportViewer::sizeHint() const 00135 { 00136 AQ_CALL_RET_V(sizeHint(), QSize); 00137 } 00138 inline void AQSReportViewer::setNumCopies(const int arg0) 00139 { 00140 AQ_CALL_VOID(setNumCopies(arg0)); 00141 } 00142 inline void AQSReportViewer::setPrintToPos(bool arg0) 00143 { 00144 AQ_CALL_VOID(setPrintToPos(arg0)); 00145 } 00146 inline void AQSReportViewer::setPrinterName(const QString &arg0) 00147 { 00148 AQ_CALL_VOID(setPrinterName(arg0)); 00149 } 00150 inline bool AQSReportViewer::reportPrinted() 00151 { 00152 AQ_CALL_RET_V(reportPrinted(), bool); 00153 } 00154 inline void AQSReportViewer::setStyleName(const QString &arg0) 00155 { 00156 AQ_CALL_VOID(setStyleName(arg0)); 00157 } 00158 inline MReportViewer *AQSReportViewer::rptViewer() const 00159 { 00160 AQ_CALL_RET(rptViewer()); 00161 } 00162 inline FLReportEngine *AQSReportViewer::rptEngine() const 00163 { 00164 AQ_CALL_RET(rptEngine()); 00165 } 00166 inline void AQSReportViewer::rptViewerEmbedInParent(QWidget *arg0) 00167 { 00168 AQ_CALL_VOID(rptViewerEmbedInParent(arg0)); 00169 } 00170 inline void AQSReportViewer::rptViewerReparent(QWidget *arg0) 00171 { 00172 AQ_CALL_VOID(rptViewerReparent(arg0)); 00173 } 00174 inline QString AQSReportViewer::csvData() 00175 { 00176 AQ_CALL_RET_V(csvData(), QString); 00177 } 00178 inline void AQSReportViewer::setReportPages(FLReportPages *arg0) 00179 { 00180 AQ_CALL_VOID(setReportPages(arg0)); 00181 } 00182 //@AQ_END_IMP_PUB_SLOTS@ 00183 00184 #endif /* AQSREPORTVIEWER_P_H_ */ 00185 // @AQWIDGET@