File indexing completed on 2024-05-12 16:33:36
0001 /* This file is part of the KDE project 0002 0003 Copyright 2007 Johannes Simon <johannes.simon@gmail.com> 0004 Copyright 2009 Inge Wallin <ingwa@lysator.liu.se> 0005 0006 This library is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU Library General Public 0008 License as published by the Free Software Foundation; either 0009 version 2 of the License, or (at your option) any later version. 0010 0011 This library is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 Library General Public License for more details. 0015 0016 You should have received a copy of the GNU Library General Public License 0017 along with this library; see the file COPYING.LIB. If not, write to 0018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 Boston, MA 02110-1301, USA. 0020 */ 0021 0022 #ifndef KCHART_SURFACE_H 0023 #define KCHART_SURFACE_H 0024 0025 // Local 0026 #include "ChartShape.h" 0027 0028 class KoStyleStack; 0029 class KoOdfLoadingContext; 0030 class QSizeF; 0031 0032 namespace KoChart { 0033 0034 0035 /** 0036 * @brief The Surface class represents either a chart wall, or chart floor. 0037 * 0038 * Currently only the wall can be visualized, though support for a 0039 * chart floor is needed to load and save in ODF without loss of data. 0040 */ 0041 0042 class Surface 0043 { 0044 public: 0045 explicit Surface(PlotArea *parent); 0046 ~Surface(); 0047 0048 // QT5TODO: reenable the KDE_DEPRECATED flag or better remove this method 0049 /** 0050 * Old method of loading a pattern style; Use the Flake KoPatternBackground now. 0051 * Not all properties can be stored in a QBrush so this concept is obsolete. 0052 */ 0053 /*KDE_DEPRECATED*/ static QBrush loadOdfPatternStyle(const KoStyleStack &styleStack, KoOdfLoadingContext &context, const QSizeF &size); 0054 0055 QPointF position() const; 0056 int width() const; 0057 QBrush brush() const; 0058 QPen framePen() const; 0059 0060 void setPosition(const QPointF &position); 0061 void setWidth(int); 0062 void setBrush(const QBrush &brush); 0063 void setFramePen(const QPen &pen); 0064 0065 bool loadOdf(const KoXmlElement &surfaceElement, KoShapeLoadingContext &context); 0066 void saveOdf(KoShapeSavingContext &context, const char *elementName); 0067 0068 private: 0069 class Private; 0070 Private *const d; 0071 }; 0072 0073 } 0074 0075 #endif 0076