File indexing completed on 2024-12-01 13:11:45
0001 /* This file is part of the KDE project 0002 0003 Copyright (C) 2013-2014 Inge Wallin <inge@lysator.liu.se> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef ODFCHARTREADERBACKEND_H 0022 #define ODFCHARTREADERBACKEND_H 0023 0024 // Calligra 0025 #include <KoXmlStreamReader.h> 0026 #include <KoFilter.h> 0027 0028 // this library 0029 #include "koodfreader_export.h" 0030 #include "OdfChartReader.h" 0031 #include "OdfReaderInternals.h" 0032 0033 0034 class QByteArray; 0035 class QSizeF; 0036 class QStringList; 0037 class KoStore; 0038 class OdfReaderContext; 0039 0040 0041 /** @brief A default backend for the OdfChartReader class. 0042 * 0043 * This class defines an interface and the default behaviour for the 0044 * backend to the ODF chart reader (@see OdfChartReader). When the 0045 * reader is called upon to traverse a certain XML tree, there will 0046 * be two parameters to the root traverse function: a pointer to a 0047 * backend object and a pointer to a context object. 0048 * 0049 * The reader will traverse (read) the XML tree and for every element 0050 * it comes across it will call a specific function in the backend and 0051 * every call will pass the pointer to the context object. 0052 * 0053 * Each supported XML tag has a corresponding callback function. This 0054 * callback function will be called twice: once when the tag is first 0055 * encountered anc once when the tag is closed. This means that an 0056 * element with no child elements will be called twice in succession. 0057 */ 0058 class KOODFREADER_EXPORT OdfChartReaderBackend 0059 { 0060 public: 0061 explicit OdfChartReaderBackend(); 0062 virtual ~OdfChartReaderBackend(); 0063 0064 DECLARE_BACKEND_FUNCTION(OfficeChart); 0065 DECLARE_BACKEND_FUNCTION(ChartChart); // ODF 1.2 11.1 0066 0067 DECLARE_BACKEND_FUNCTION(ChartFooter); // ODF 1.2 11.2.3 0068 DECLARE_BACKEND_FUNCTION(ChartSubtitle); // ODF 1.2 11.2.2 0069 DECLARE_BACKEND_FUNCTION(ChartTitle); // ODF 1.2 11.2.1 0070 DECLARE_BACKEND_FUNCTION(ChartLegend); // ODF 1.2 11.3 0071 DECLARE_BACKEND_FUNCTION(ChartPlotArea); // ODF 1.2 11.4 0072 DECLARE_BACKEND_FUNCTION(ChartWall); // ODF 1.2 11.6 0073 DECLARE_BACKEND_FUNCTION(ChartFloor); // ODF 1.2 11.7 0074 DECLARE_BACKEND_FUNCTION(ChartAxis); // ODF 1.2 11.8 0075 DECLARE_BACKEND_FUNCTION(ChartCategories); // ODF 1.2 11.9 0076 DECLARE_BACKEND_FUNCTION(ChartGrid); // ODF 1.2 11.10 0077 DECLARE_BACKEND_FUNCTION(ChartSeries); // ODF 1.2 11.11 0078 DECLARE_BACKEND_FUNCTION(ChartDomain); // ODF 1.2 11.12 0079 DECLARE_BACKEND_FUNCTION(ChartDataPoint); // ODF 1.2 11.13 0080 DECLARE_BACKEND_FUNCTION(ChartDataLabel); // ODF 1.2 11.14 0081 DECLARE_BACKEND_FUNCTION(ChartMeanValue); // ODF 1.2 11.15 0082 DECLARE_BACKEND_FUNCTION(ChartErrorIndicator); // ODF 1.2 11.16 0083 DECLARE_BACKEND_FUNCTION(ChartRegressionCurve); // ODF 1.2 11.17 0084 DECLARE_BACKEND_FUNCTION(ChartEquation); // ODF 1.2 11.18 0085 DECLARE_BACKEND_FUNCTION(ChartStockGainMarker); // ODF 1.2 11.19 0086 DECLARE_BACKEND_FUNCTION(ChartStockLossMarker); // ODF 1.2 11.20 0087 DECLARE_BACKEND_FUNCTION(ChartStockRangeLine); // ODF 1.2 11.21 0088 0089 private: 0090 class Private; 0091 Private * const d; 0092 }; 0093 0094 0095 #endif // ODFCHARTREADERBACKEND_H