KD Reports API Documentation  2.0
KDReportsXmlElementHandler.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Reports library.
4 **
5 ** SPDX-FileCopyrightText: 2007-2022 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 "KDReportsErrorDetails.h"
21 #include "KDReportsGlobal.h"
22 #include "KDReportsVariableType.h"
23 #include <QTextOption>
24 #include <memory>
25 
26 QT_BEGIN_NAMESPACE
27 class QDomElement;
28 QT_END_NAMESPACE
29 
30 namespace KDReports {
31 
32 class Report;
33 class TextElement;
34 class HtmlElement;
35 class TableElement;
36 class AutoTableElement;
37 class ChartElement;
38 class ImageElement;
39 class HLineElement;
40 class Header;
41 typedef Header Footer;
42 class Cell;
43 class XmlElementHandlerPrivate;
44 
85 {
86 public:
88  virtual ~XmlElementHandler();
89 
94  virtual bool startReport(KDReports::Report &report, QDomElement &xmlElement);
95 
101  virtual bool startHeader(KDReports::Header &header, QDomElement &xmlElement);
102 
106  virtual void endHeader(KDReports::Header &header, const QDomElement &xmlElement);
107 
113  virtual bool startFooter(KDReports::Footer &footer, QDomElement &xmlElement);
114 
118  virtual void endFooter(KDReports::Footer &footer, const QDomElement &xmlElement);
119 
128  virtual bool textElement(KDReports::TextElement &textElement, QDomElement &xmlElement);
129 
138  virtual bool htmlElement(KDReports::HtmlElement &htmlElement, QDomElement &xmlElement);
139 
149  virtual bool startTableElement(KDReports::TableElement &tableElement, QDomElement &xmlElement);
150 
155  virtual bool endTableElement(KDReports::TableElement &tableElement, QDomElement &xmlElement);
156 
162  virtual bool startCell(KDReports::Cell &cell, QDomElement &xmlElement);
163 
168  virtual bool endCell(KDReports::Cell &cell, QDomElement &xmlElement);
169 
178  virtual bool autoTableElement(KDReports::AutoTableElement &tableElement, QDomElement &xmlElement);
179 
187  virtual bool chartElement(KDReports::ChartElement &chartElement, QDomElement &xmlElement);
188 
196  virtual bool imageElement(KDReports::ImageElement &imageElement, QDomElement &xmlElement);
197 
202  virtual bool pageBreak(QDomElement &xmlElement);
203 
209  virtual bool hLineElement(KDReports::HLineElement &hLineElement, QDomElement &xmlElement);
210 
216  virtual void customElement(const QDomElement &xmlElement);
217 
222  virtual void endReport(KDReports::Report &report, const QDomElement &xmlElement);
223 
227  virtual bool variable(KDReports::VariableType &type, QDomElement &xmlElement);
228 
234  virtual bool vspace(int &size, QDomElement &xmlElement);
235 
240  virtual bool paragraphMargin(qreal &left, qreal &top, qreal &right, qreal &bottom, const QDomElement &xmlElement);
241 
246  virtual bool tabs(QList<QTextOption::Tab> &tabs, const QDomElement &xmlElement);
247 
251  KDReports::ErrorDetails errorDetails();
252 
257  void setErrorDetails(const KDReports::ErrorDetails &details);
258 
259 private:
260  virtual void virtual_hook(int id, void *data);
261 
262  std::unique_ptr<XmlElementHandlerPrivate> d;
263 };
264 
265 using XmlElementHandlerPrivateV2 = XmlElementHandlerPrivate; // old compat name from before 2.0
266 
267 }
268 
269 #endif /* KDREPORTSXMLELEMENTHANDLER_H */
KDReports::HtmlElement
Definition: KDReportsHtmlElement.h:45
KDReports::HLineElement
Definition: KDReportsHLineElement.h:36
KDReports::XmlElementHandlerPrivateV2
XmlElementHandlerPrivate XmlElementHandlerPrivateV2
Definition: KDReportsXmlElementHandler.h:265
KDReportsVariableType.h
KDReports::TextElement
Definition: KDReportsTextElement.h:36
QList< QTextOption::Tab >
KDReportsErrorDetails.h
KDReports::TableElement
Definition: KDReportsTableElement.h:46
KDReports::XmlElementHandler
Definition: KDReportsXmlElementHandler.h:84
KDReports::Report
Definition: KDReportsReport.h:80
KDReports::AutoTableElement
Definition: KDReportsAutoTableElement.h:40
KDReports::Cell
Definition: KDReportsCell.h:52
KDReports::ChartElement
Definition: KDReportsChartElement.h:41
KDReportsGlobal.h
KDReports::VariableType
VariableType
Definition: KDReportsVariableType.h:29
KDReports::ErrorDetails
Definition: KDReportsErrorDetails.h:44
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition: KDReportsGlobal.h:29
KDReports::Header
Definition: KDReportsHeader.h:49
KDReports::Footer
Header Footer
Definition: KDReportsHeader.h:127
KDReports::ImageElement
Definition: KDReportsImageElement.h:35
KDReports
Definition: KDReportsAbstractReportLayout_p.h:30

© 2007-2021 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/
Generated on Sat Jan 8 2022 02:38:32 for KD Reports API Documentation by doxygen 1.8.17