andre@1: /**************************************************************************** andre@1: ** Copyright (c) 2013-2014 Debao Zhang andre@1: ** All right reserved. andre@1: ** andre@1: ** Permission is hereby granted, free of charge, to any person obtaining andre@1: ** a copy of this software and associated documentation files (the andre@1: ** "Software"), to deal in the Software without restriction, including andre@1: ** without limitation the rights to use, copy, modify, merge, publish, andre@1: ** distribute, sublicense, and/or sell copies of the Software, and to andre@1: ** permit persons to whom the Software is furnished to do so, subject to andre@1: ** the following conditions: andre@1: ** andre@1: ** The above copyright notice and this permission notice shall be andre@1: ** included in all copies or substantial portions of the Software. andre@1: ** andre@1: ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, andre@1: ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF andre@1: ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND andre@1: ** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE andre@1: ** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION andre@1: ** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION andre@1: ** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. andre@1: ** andre@1: ****************************************************************************/ andre@1: andre@1: #ifndef QXLSX_CHART_P_H andre@1: #define QXLSX_CHART_P_H andre@1: andre@1: // andre@1: // W A R N I N G andre@1: // ------------- andre@1: // andre@1: // This file is not part of the Qt Xlsx API. It exists for the convenience andre@1: // of the Qt Xlsx. This header file may change from andre@1: // version to version without notice, or even be removed. andre@1: // andre@1: // We mean it. andre@1: // andre@1: andre@1: #include "xlsxabstractooxmlfile_p.h" andre@1: #include "xlsxchart.h" andre@1: andre@1: #include andre@1: andre@1: class QXmlStreamReader; andre@1: class QXmlStreamWriter; andre@1: andre@1: namespace QXlsx { andre@1: andre@1: class XlsxSeries andre@1: { andre@1: public: andre@1: //At present, we care about number cell ranges only! andre@1: QString numberDataSource_numRef; //yval, val andre@1: QString axDataSource_numRef; //xval, cat andre@1: }; andre@1: andre@1: class XlsxAxis andre@1: { andre@1: public: andre@1: enum Type andre@1: { andre@1: T_Cat, andre@1: T_Val, andre@1: T_Date, andre@1: T_Ser andre@1: }; andre@1: andre@1: enum Pos andre@1: { andre@1: Left, andre@1: Right, andre@1: Top, andre@1: Bottom andre@1: }; andre@1: andre@1: XlsxAxis(){} andre@1: andre@1: XlsxAxis(Type t, Pos p, int id, int crossId) andre@1: :type(t), axisPos(p), axisId(id), crossAx(crossId) andre@1: { andre@1: } andre@1: andre@1: Type type; andre@1: Pos axisPos; //l,r,b,t andre@1: int axisId; andre@1: int crossAx; andre@1: }; andre@1: andre@1: class ChartPrivate : public AbstractOOXmlFilePrivate andre@1: { andre@1: Q_DECLARE_PUBLIC(Chart) andre@1: andre@1: public: andre@1: ChartPrivate(Chart *q, Chart::CreateFlag flag); andre@1: ~ChartPrivate(); andre@1: andre@1: bool loadXmlChart(QXmlStreamReader &reader); andre@1: bool loadXmlPlotArea(QXmlStreamReader &reader); andre@1: bool loadXmlXxxChart(QXmlStreamReader &reader); andre@1: bool loadXmlSer(QXmlStreamReader &reader); andre@1: QString loadXmlNumRef(QXmlStreamReader &reader); andre@1: bool loadXmlAxis(QXmlStreamReader &reader); andre@1: andre@1: void saveXmlChart(QXmlStreamWriter &writer) const; andre@1: void saveXmlPieChart(QXmlStreamWriter &writer) const; andre@1: void saveXmlBarChart(QXmlStreamWriter &writer) const; andre@1: void saveXmlLineChart(QXmlStreamWriter &writer) const; andre@1: void saveXmlScatterChart(QXmlStreamWriter &writer) const; andre@1: void saveXmlAreaChart(QXmlStreamWriter &writer) const; andre@1: void saveXmlDoughnutChart(QXmlStreamWriter &writer) const; andre@1: void saveXmlSer(QXmlStreamWriter &writer, XlsxSeries *ser, int id) const; andre@1: void saveXmlAxes(QXmlStreamWriter &writer) const; andre@1: andre@1: Chart::ChartType chartType; andre@1: andre@1: QList > seriesList; andre@1: QList > axisList; andre@1: andre@1: AbstractSheet *sheet; andre@1: }; andre@1: andre@1: } // namespace QXlsx andre@1: andre@1: #endif // QXLSX_CHART_P_H