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_H andre@1: #define QXLSX_CHART_H andre@1: andre@1: #include "xlsxabstractooxmlfile.h" andre@1: andre@1: #include andre@1: andre@1: class QXmlStreamReader; andre@1: class QXmlStreamWriter; andre@1: andre@1: QT_BEGIN_NAMESPACE_XLSX andre@1: andre@1: class AbstractSheet; andre@1: class Worksheet; andre@1: class ChartPrivate; andre@1: class CellRange; andre@1: class DrawingAnchor; andre@1: andre@1: class Q_XLSX_EXPORT Chart : public AbstractOOXmlFile andre@1: { andre@1: Q_DECLARE_PRIVATE(Chart) andre@1: andre@1: public: andre@1: enum ChartType { andre@1: CT_Area = 1, //Zero is internally used for unknown types andre@1: CT_Area3D, andre@1: CT_Line, andre@1: CT_Line3D, andre@1: CT_Stock, andre@1: CT_Radar, andre@1: CT_Scatter, andre@1: CT_Pie, andre@1: CT_Pie3D, andre@1: CT_Doughnut, andre@1: CT_Bar, andre@1: CT_Bar3D, andre@1: CT_OfPie, andre@1: CT_Surface, andre@1: CT_Surface3D, andre@1: CT_Bubble andre@1: }; andre@1: andre@1: ~Chart(); andre@1: andre@1: void addSeries(const CellRange &range, AbstractSheet *sheet=0); andre@1: void setChartType(ChartType type); andre@1: void setChartStyle(int id); andre@1: andre@1: void saveToXmlFile(QIODevice *device) const; andre@1: bool loadFromXmlFile(QIODevice *device); andre@1: andre@1: private: andre@1: friend class AbstractSheet; andre@1: friend class Worksheet; andre@1: friend class Chartsheet; andre@1: friend class DrawingAnchor; andre@1: andre@1: Chart(AbstractSheet *parent, CreateFlag flag); andre@1: }; andre@1: andre@1: QT_END_NAMESPACE_XLSX andre@1: andre@1: #endif // QXLSX_CHART_H andre@1: