KD Reports API Documentation  2.2
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 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #ifndef KDREPORTSXMLELEMENTHANDLER_H
12 #define KDREPORTSXMLELEMENTHANDLER_H
13 
14 #include "KDReportsErrorDetails.h"
15 #include "KDReportsGlobal.h"
16 #include "KDReportsVariableType.h"
17 #include <QTextOption>
18 #include <memory>
19 
20 QT_BEGIN_NAMESPACE
21 class QDomElement;
22 QT_END_NAMESPACE
23 
24 namespace KDReports {
25 
26 class Report;
27 class TextElement;
28 class HtmlElement;
29 class TableElement;
30 class AutoTableElement;
31 class ChartElement;
32 class ImageElement;
33 class HLineElement;
34 class Header;
35 typedef Header Footer;
36 class Cell;
37 class XmlElementHandlerPrivate;
38 
79 {
80 public:
82  virtual ~XmlElementHandler();
83 
88  virtual bool startReport(KDReports::Report &report, QDomElement &xmlElement);
89 
95  virtual bool startHeader(KDReports::Header &header, QDomElement &xmlElement);
96 
100  virtual void endHeader(KDReports::Header &header, const QDomElement &xmlElement);
101 
107  virtual bool startFooter(KDReports::Footer &footer, QDomElement &xmlElement);
108 
112  virtual void endFooter(KDReports::Footer &footer, const QDomElement &xmlElement);
113 
122  virtual bool textElement(KDReports::TextElement &textElement, QDomElement &xmlElement);
123 
132  virtual bool htmlElement(KDReports::HtmlElement &htmlElement, QDomElement &xmlElement);
133 
143  virtual bool startTableElement(KDReports::TableElement &tableElement, QDomElement &xmlElement);
144 
149  virtual bool endTableElement(KDReports::TableElement &tableElement, QDomElement &xmlElement);
150 
156  virtual bool startCell(KDReports::Cell &cell, QDomElement &xmlElement);
157 
162  virtual bool endCell(KDReports::Cell &cell, QDomElement &xmlElement);
163 
172  virtual bool autoTableElement(KDReports::AutoTableElement &tableElement, QDomElement &xmlElement);
173 
181  virtual bool chartElement(KDReports::ChartElement &chartElement, QDomElement &xmlElement);
182 
190  virtual bool imageElement(KDReports::ImageElement &imageElement, QDomElement &xmlElement);
191 
196  virtual bool pageBreak(QDomElement &xmlElement);
197 
203  virtual bool hLineElement(KDReports::HLineElement &hLineElement, QDomElement &xmlElement);
204 
210  virtual void customElement(const QDomElement &xmlElement);
211 
216  virtual void endReport(KDReports::Report &report, const QDomElement &xmlElement);
217 
221  virtual bool variable(KDReports::VariableType &type, QDomElement &xmlElement);
222 
228  virtual bool vspace(int &size, QDomElement &xmlElement);
229 
234  virtual bool paragraphMargin(qreal &left, qreal &top, qreal &right, qreal &bottom, const QDomElement &xmlElement);
235 
240  virtual bool tabs(QList<QTextOption::Tab> &tabs, const QDomElement &xmlElement);
241 
245  KDReports::ErrorDetails errorDetails();
246 
251  void setErrorDetails(const KDReports::ErrorDetails &details);
252 
253 private:
254  virtual void virtual_hook(int id, void *data);
255 
256  std::unique_ptr<XmlElementHandlerPrivate> d;
257 };
258 
259 using XmlElementHandlerPrivateV2 = XmlElementHandlerPrivate; // old compat name from before 2.0
260 
261 }
262 
263 #endif /* KDREPORTSXMLELEMENTHANDLER_H */
#define KDREPORTS_EXPORT
XmlElementHandlerPrivate XmlElementHandlerPrivateV2

© 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 by doxygen 1.9.1