KD Reports 1.4
|
00001 /**************************************************************************** 00002 ** Copyright (C) 2007-2012 Klaralvdalens Datakonsult AB. All rights reserved. 00003 ** 00004 ** This file is part of the KD Reports library. 00005 ** 00006 ** Licensees holding valid commercial KD Reports licenses may use this file in 00007 ** accordance with the KD Reports Commercial License Agreement provided with 00008 ** the Software. 00009 ** 00010 ** 00011 ** This file may be distributed and/or modified under the terms of the 00012 ** GNU General Public License version 2 and version 3 as published by the 00013 ** Free Software Foundation and appearing in the file LICENSE.GPL included. 00014 ** 00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00017 ** 00018 ** Contact info@kdab.com if any conditions of this licensing are not 00019 ** clear to you. 00020 ** 00021 **********************************************************************/ 00022 00023 #ifndef KDREPORTSXMLELEMENTHANDLER_H 00024 #define KDREPORTSXMLELEMENTHANDLER_H 00025 00026 #include "KDReportsGlobal.h" 00027 #include "KDReportsErrorDetails.h" 00028 class QDomElement; 00029 00030 namespace KDReports { 00031 00032 class Report; 00033 class TextElement; 00034 class HtmlElement; 00035 class TableElement; 00036 class AutoTableElement; 00037 class ChartElement; 00038 class ImageElement; 00039 class HLineElement; 00040 class Header; 00041 typedef Header Footer; 00042 class Cell; 00043 00083 class KDREPORTS_EXPORT XmlElementHandler 00084 { 00085 public: 00086 XmlElementHandler(); 00087 virtual ~XmlElementHandler(); 00088 00093 virtual bool startReport( KDReports::Report& report, QDomElement& xmlElement ); 00094 00100 virtual bool startHeader( KDReports::Header& header, QDomElement& xmlElement ); 00101 00105 virtual void endHeader( KDReports::Header& header, const QDomElement& xmlElement ); 00106 00112 virtual bool startFooter( KDReports::Footer& footer, QDomElement& xmlElement ); 00113 00117 virtual void endFooter( KDReports::Footer& footer, const QDomElement& xmlElement ); 00118 00127 virtual bool textElement( KDReports::TextElement& textElement, QDomElement& xmlElement ); 00128 00137 virtual bool htmlElement( KDReports::HtmlElement& htmlElement, QDomElement& xmlElement ); 00138 00148 virtual bool startTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement ); 00149 00154 virtual bool endTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement ); 00155 00161 virtual bool startCell( KDReports::Cell& cell, QDomElement& xmlElement ); 00162 00167 virtual bool endCell( KDReports::Cell& cell, QDomElement& xmlElement ); 00168 00177 virtual bool autoTableElement( KDReports::AutoTableElement& tableElement, QDomElement& xmlElement ); 00178 00186 virtual bool chartElement( KDReports::ChartElement& chartElement, QDomElement& xmlElement ); 00187 00195 virtual bool imageElement( KDReports::ImageElement& imageElement, QDomElement& xmlElement ); 00196 00201 virtual bool pageBreak( QDomElement& xmlElement ); 00202 00203 #ifdef KDREPORTS_ALLOW_BINARY_INCOMPATIBILITY 00204 00212 virtual bool hLineElement( KDReports::HLineElement& hLineElement, QDomElement& xmlElement ); 00213 #endif 00214 00220 virtual void customElement( const QDomElement& xmlElement ); 00221 00226 virtual void endReport( KDReports::Report& report, const QDomElement& xmlElement ); 00227 00231 KDReports::ErrorDetails errorDetails(); 00232 00237 void setErrorDetails( const KDReports::ErrorDetails& details ); 00238 00239 private: 00240 KDReports::ErrorDetails m_details; 00241 00242 // BIC TODO: add d pointer 00243 }; 00244 00245 } 00246 00247 #endif /* KDREPORTSXMLELEMENTHANDLER_H */