File indexing completed on 2025-01-19 10:49:25

0001 /* This file is part of the KDE project
0002  *
0003  * SPDX-FileCopyrightText: 2013-2014 Inge Wallin <inge@lysator.liu.se>
0004  *
0005  * SPDX-License-Identifier: LGPL-2.0-or-later
0006  */
0007 
0008 
0009 #ifndef KOODF_STYLE_BASE_H
0010 #define KOODF_STYLE_BASE_H
0011 
0012 #include "koodf2_export.h"
0013 
0014 #include <QHash>
0015 
0016 class QString;
0017 class KoXmlStreamReader;
0018 class KoXmlWriter;
0019 
0020 
0021 class KOODF2_EXPORT KoOdfStyleBase
0022 {
0023  public:
0024     enum StyleType {
0025         StyleStyle,
0026         PageLayout
0027         // ... more here
0028     };
0029 
0030     explicit KoOdfStyleBase(StyleType type);
0031     virtual ~KoOdfStyleBase();
0032 
0033     StyleType type() const;
0034 
0035     QString name() const;
0036     void setName(const QString &name);
0037     QString displayName() const;
0038     void setDisplayName(const QString &name);
0039 
0040     bool isDefaultStyle() const;
0041     void setIsDefaultStyle(bool isDefaultStyle);
0042 
0043     bool inUse() const;
0044     void setInUse(bool inUse);
0045 
0046     bool isFromStylesXml() const;
0047     void setIsFromStylesXml(bool isFromStylesXml);
0048 
0049     //
0050     virtual bool readOdf(KoXmlStreamReader &reader) = 0;
0051     virtual bool saveOdf(KoXmlWriter *writer) = 0;
0052 
0053  private:
0054     class Private;
0055     Private * const d;
0056 };
0057 
0058 
0059 #endif