KD Reports  1.9
KDReportsXmlElementHandler.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Reports library.
4 **
5 ** SPDX-FileCopyrightText: 2007-2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDReports OR LicenseRef-KDAB-KDReports-US
8 **
9 ** Licensees holding valid commercial KD Reports licenses may use this file in
10 ** accordance with the KD Reports Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 
17 #ifndef KDREPORTSXMLELEMENTHANDLER_H
18 #define KDREPORTSXMLELEMENTHANDLER_H
19 
20 #include "KDReportsGlobal.h"
21 #include "KDReportsErrorDetails.h"
22 
23 QT_BEGIN_NAMESPACE
24 class QDomElement;
25 QT_END_NAMESPACE
26 
27 namespace KDReports {
28 
29 class Report;
30 class TextElement;
31 class HtmlElement;
32 class TableElement;
33 class AutoTableElement;
34 class ChartElement;
35 class ImageElement;
36 class HLineElement;
37 class Header;
38 typedef Header Footer;
39 class Cell;
40 
80 class KDREPORTS_EXPORT XmlElementHandler //krazy:exclude=dpointer TODO fix this
81 {
82 public:
84  virtual ~XmlElementHandler();
85 
90  virtual bool startReport( KDReports::Report& report, QDomElement& xmlElement );
91 
97  virtual bool startHeader( KDReports::Header& header, QDomElement& xmlElement );
98 
102  virtual void endHeader( KDReports::Header& header, const QDomElement& xmlElement );
103 
109  virtual bool startFooter( KDReports::Footer& footer, QDomElement& xmlElement );
110 
114  virtual void endFooter( KDReports::Footer& footer, const QDomElement& xmlElement );
115 
124  virtual bool textElement( KDReports::TextElement& textElement, QDomElement& xmlElement );
125 
134  virtual bool htmlElement( KDReports::HtmlElement& htmlElement, QDomElement& xmlElement );
135 
145  virtual bool startTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement );
146 
151  virtual bool endTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement );
152 
158  virtual bool startCell( KDReports::Cell& cell, QDomElement& xmlElement );
159 
164  virtual bool endCell( KDReports::Cell& cell, QDomElement& xmlElement );
165 
174  virtual bool autoTableElement( KDReports::AutoTableElement& tableElement, QDomElement& xmlElement );
175 
183  virtual bool chartElement( KDReports::ChartElement& chartElement, QDomElement& xmlElement );
184 
192  virtual bool imageElement( KDReports::ImageElement& imageElement, QDomElement& xmlElement );
193 
198  virtual bool pageBreak( QDomElement& xmlElement );
199 
200 #ifdef KDREPORTS_ALLOW_BINARY_INCOMPATIBILITY
201 
209  virtual bool hLineElement( KDReports::HLineElement& hLineElement, QDomElement& xmlElement );
210 #endif
211 
217  virtual void customElement( const QDomElement& xmlElement );
218 
223  virtual void endReport( KDReports::Report& report, const QDomElement& xmlElement );
224 
228  KDReports::ErrorDetails errorDetails();
229 
234  void setErrorDetails( const KDReports::ErrorDetails& details );
235 
236 private:
237  KDReports::ErrorDetails m_details;
238 
239  // BIC TODO: add d pointer
240 };
241 
242 }
243 
244 #endif /* KDREPORTSXMLELEMENTHANDLER_H */
Definition: KDReportsTableElement.h:32
Definition: KDReportsReport.h:99
Definition: KDReportsTextElement.h:36
Definition: KDReportsXmlElementHandler.h:80
Definition: KDReportsAutoTableElement.h:40
Definition: KDReportsHeader.h:48
Definition: KDReportsImageElement.h:35
Definition: KDReportsCell.h:39
Definition: KDReportsAbstractTableElement.h:30
Definition: KDReportsHLineElement.h:36
Definition: KDReportsHtmlElement.h:31
Definition: KDReportsErrorDetails.h:30
Definition: KDReportsChartElement.h:39

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/