KD Reports  1.8
KDReportsXmlElementHandler.h
1 /****************************************************************************
2 ** Copyright (C) 2007-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Reports library.
5 **
6 ** Licensees holding valid commercial KD Reports licenses may use this file in
7 ** accordance with the KD Reports Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU Lesser General Public License version 2.1 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef KDREPORTSXMLELEMENTHANDLER_H
24 #define KDREPORTSXMLELEMENTHANDLER_H
25 
26 #include "KDReportsGlobal.h"
27 #include "KDReportsErrorDetails.h"
28 
29 QT_BEGIN_NAMESPACE
30 class QDomElement;
31 QT_END_NAMESPACE
32 
33 namespace KDReports {
34 
35 class Report;
36 class TextElement;
37 class HtmlElement;
38 class TableElement;
39 class AutoTableElement;
40 class ChartElement;
41 class ImageElement;
42 class HLineElement;
43 class Header;
44 typedef Header Footer;
45 class Cell;
46 
86 class KDREPORTS_EXPORT XmlElementHandler //krazy:exclude=dpointer TODO fix this
87 {
88 public:
90  virtual ~XmlElementHandler();
91 
96  virtual bool startReport( KDReports::Report& report, QDomElement& xmlElement );
97 
103  virtual bool startHeader( KDReports::Header& header, QDomElement& xmlElement );
104 
108  virtual void endHeader( KDReports::Header& header, const QDomElement& xmlElement );
109 
115  virtual bool startFooter( KDReports::Footer& footer, QDomElement& xmlElement );
116 
120  virtual void endFooter( KDReports::Footer& footer, const QDomElement& xmlElement );
121 
130  virtual bool textElement( KDReports::TextElement& textElement, QDomElement& xmlElement );
131 
140  virtual bool htmlElement( KDReports::HtmlElement& htmlElement, QDomElement& xmlElement );
141 
151  virtual bool startTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement );
152 
157  virtual bool endTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement );
158 
164  virtual bool startCell( KDReports::Cell& cell, QDomElement& xmlElement );
165 
170  virtual bool endCell( KDReports::Cell& cell, QDomElement& xmlElement );
171 
180  virtual bool autoTableElement( KDReports::AutoTableElement& tableElement, QDomElement& xmlElement );
181 
189  virtual bool chartElement( KDReports::ChartElement& chartElement, QDomElement& xmlElement );
190 
198  virtual bool imageElement( KDReports::ImageElement& imageElement, QDomElement& xmlElement );
199 
204  virtual bool pageBreak( QDomElement& xmlElement );
205 
206 #ifdef KDREPORTS_ALLOW_BINARY_INCOMPATIBILITY
207 
215  virtual bool hLineElement( KDReports::HLineElement& hLineElement, QDomElement& xmlElement );
216 #endif
217 
223  virtual void customElement( const QDomElement& xmlElement );
224 
229  virtual void endReport( KDReports::Report& report, const QDomElement& xmlElement );
230 
234  KDReports::ErrorDetails errorDetails();
235 
240  void setErrorDetails( const KDReports::ErrorDetails& details );
241 
242 private:
243  KDReports::ErrorDetails m_details;
244 
245  // BIC TODO: add d pointer
246 };
247 
248 }
249 
250 #endif /* KDREPORTSXMLELEMENTHANDLER_H */
Definition: KDReportsTableElement.h:38
Definition: KDReportsReport.h:109
Definition: KDReportsTextElement.h:42
Definition: KDReportsXmlElementHandler.h:86
Definition: KDReportsAutoTableElement.h:46
Definition: KDReportsHeader.h:54
Definition: KDReportsImageElement.h:41
Definition: KDReportsCell.h:45
Definition: KDReportsAbstractTableElement.h:36
Definition: KDReportsHLineElement.h:42
Definition: KDReportsHtmlElement.h:37
Definition: KDReportsErrorDetails.h:36
Definition: KDReportsChartElement.h:45

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/

https://www.kdab.com/development-resources/qt-tools/kd-reports/