KDReportsXmlElementHandler.h

00001 /****************************************************************************
00002 ** Copyright (C) 2007-2011 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Reports library.
00005 **
00006 ** Licensees holding valid commercial KD Reports licenses may use this file in
00007 ** accordance with the KD Reports Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL included.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 
00023 #ifndef KDREPORTSXMLELEMENTHANDLER_H
00024 #define KDREPORTSXMLELEMENTHANDLER_H
00025 
00026 #include "KDReportsGlobal.h"
00027 #include "KDReportsErrorDetails.h"
00028 class QDomElement;
00029 
00030 namespace KDReports {
00031 
00032 class Report;
00033 class TextElement;
00034 class HtmlElement;
00035 class TableElement;
00036 class AutoTableElement;
00037 class ChartElement;
00038 class ImageElement;
00039 class HLineElement;
00040 class Header;
00041 typedef Header Footer;
00042 class Cell;
00043 
00083 class KDREPORTS_EXPORT XmlElementHandler
00084 {
00085 public:
00086     virtual ~XmlElementHandler();
00087 
00092     virtual bool startReport( KDReports::Report& report, QDomElement& xmlElement );
00093 
00099     virtual bool startHeader( KDReports::Header& header, QDomElement& xmlElement );
00100 
00104     virtual void endHeader( KDReports::Header& header, const QDomElement& xmlElement );
00105 
00111     virtual bool startFooter( KDReports::Footer& footer, QDomElement& xmlElement );
00112 
00116     virtual void endFooter( KDReports::Footer& footer, const QDomElement& xmlElement );
00117 
00126     virtual bool textElement( KDReports::TextElement& textElement, QDomElement& xmlElement );
00127 
00136     virtual bool htmlElement( KDReports::HtmlElement& htmlElement, QDomElement& xmlElement );
00137 
00147     virtual bool startTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement );
00148 
00153     virtual bool endTableElement( KDReports::TableElement& tableElement, QDomElement& xmlElement );
00154 
00160     virtual bool startCell( KDReports::Cell& cell, QDomElement& xmlElement );
00161 
00166     virtual bool endCell( KDReports::Cell& cell, QDomElement& xmlElement );
00167 
00176     virtual bool autoTableElement( KDReports::AutoTableElement& tableElement, QDomElement& xmlElement );
00177 
00185     virtual bool chartElement( KDReports::ChartElement& chartElement, QDomElement& xmlElement );
00186 
00194     virtual bool imageElement( KDReports::ImageElement& imageElement, QDomElement& xmlElement );
00195 
00200     virtual bool pageBreak( QDomElement& xmlElement );
00201 
00202 #ifdef KDREPORTS_ALLOW_BINARY_INCOMPATIBILITY
00203 
00211     virtual bool hLineElement( KDReports::HLineElement& hLineElement, QDomElement& xmlElement );
00212 #endif
00213 
00219     virtual void customElement( const QDomElement& xmlElement );
00220 
00225     virtual void endReport( KDReports::Report& report, const QDomElement& xmlElement );
00226 
00230     KDReports::ErrorDetails errorDetails();
00231 
00236     void setErrorDetails( const KDReports::ErrorDetails& details );
00237 
00238 private:
00239     KDReports::ErrorDetails m_details;
00240 };
00241 
00242 }
00243 
00244 #endif /* KDREPORTSXMLELEMENTHANDLER_H */
 All Classes Namespaces Functions Enumerations Enumerator

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