File indexing completed on 2024-12-08 12:56:11
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 0022 #ifndef KOODF_STYLE_BASE_H 0023 #define KOODF_STYLE_BASE_H 0024 0025 #include "koodf2_export.h" 0026 0027 #include <QHash> 0028 0029 class QString; 0030 class KoXmlStreamReader; 0031 class KoXmlWriter; 0032 0033 0034 class KOODF2_EXPORT KoOdfStyleBase 0035 { 0036 public: 0037 enum StyleType { 0038 StyleStyle, 0039 PageLayout 0040 // ... more here 0041 }; 0042 0043 explicit KoOdfStyleBase(StyleType type); 0044 virtual ~KoOdfStyleBase(); 0045 0046 StyleType type() const; 0047 0048 QString name() const; 0049 void setName(const QString &name); 0050 QString displayName() const; 0051 void setDisplayName(const QString &name); 0052 0053 bool isDefaultStyle() const; 0054 void setIsDefaultStyle(bool isDefaultStyle); 0055 0056 bool inUse() const; 0057 void setInUse(bool inUse); 0058 0059 bool isFromStylesXml() const; 0060 void setIsFromStylesXml(bool isFromStylesXml); 0061 0062 // 0063 virtual bool readOdf(KoXmlStreamReader &reader) = 0; 0064 virtual bool saveOdf(KoXmlWriter *writer) = 0; 0065 0066 private: 0067 class Private; 0068 Private * const d; 0069 }; 0070 0071 0072 #endif