KD Reports  1.6
 All Classes Namespaces Functions Enumerations Enumerator Pages
KDReportsXmlElementHandler.h
1 /****************************************************************************
2 ** Copyright (C) 2007-2015 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 class QDomElement;
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 
83 class KDREPORTS_EXPORT XmlElementHandler
84 {
85 public:
87  virtual ~XmlElementHandler();
88 
93  virtual bool startReport( KDReports::Report& report, QDomElement& xmlElement );
94 
100  virtual bool startHeader( KDReports::Header& header, QDomElement& xmlElement );
101 
105  virtual void endHeader( KDReports::Header& header, const QDomElement& xmlElement );
106 
112  virtual bool startFooter( KDReports::Footer& footer, QDomElement& xmlElement );
113 
117  virtual void endFooter( KDReports::Footer& footer, const QDomElement& xmlElement );
118 
127  virtual bool textElement( KDReports::TextElement& textElement, QDomElement& xmlElement );
128 
137  virtual bool htmlElement( KDReports::HtmlElement& htmlElement, QDomElement& xmlElement );
138 
148  virtual bool startTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement );
149 
154  virtual bool endTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement );
155 
161  virtual bool startCell( KDReports::Cell& cell, QDomElement& xmlElement );
162 
167  virtual bool endCell( KDReports::Cell& cell, QDomElement& xmlElement );
168 
177  virtual bool autoTableElement( KDReports::AutoTableElement& tableElement, QDomElement& xmlElement );
178 
186  virtual bool chartElement( KDReports::ChartElement& chartElement, QDomElement& xmlElement );
187 
195  virtual bool imageElement( KDReports::ImageElement& imageElement, QDomElement& xmlElement );
196 
201  virtual bool pageBreak( QDomElement& xmlElement );
202 
203 #ifdef KDREPORTS_ALLOW_BINARY_INCOMPATIBILITY
204 
212  virtual bool hLineElement( KDReports::HLineElement& hLineElement, QDomElement& xmlElement );
213 #endif
214 
220  virtual void customElement( const QDomElement& xmlElement );
221 
226  virtual void endReport( KDReports::Report& report, const QDomElement& xmlElement );
227 
231  KDReports::ErrorDetails errorDetails();
232 
237  void setErrorDetails( const KDReports::ErrorDetails& details );
238 
239 private:
240  KDReports::ErrorDetails m_details;
241 
242  // BIC TODO: add d pointer
243 };
244 
245 }
246 
247 #endif /* KDREPORTSXMLELEMENTHANDLER_H */

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-reports/