File indexing completed on 2024-05-12 16:29:16

0001 /* This file is part of the KDE project
0002   *
0003   * Copyright (C) 2013 Inge Wallin <inge@lysator.liu.se>
0004   * Copyright (C) 2013 Mojtaba Shahi Senobari <mojtaba.shahi3000@gmail.com>
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 KOODFLISTSTYLE_H
0023 #define KOODFLISTSTYLE_H
0024 
0025 #include "koodf2_export.h"
0026 
0027 #include <QHash>
0028 
0029 class QString;
0030 class KoXmlStreamReader;
0031 class KoOdfStyleProperties;
0032 class KoXmlWriter;
0033 
0034 class KOODF2_EXPORT KoOdfListStyle
0035 {
0036 public:
0037     KoOdfListStyle();
0038     ~KoOdfListStyle();
0039 
0040     QString name() const;
0041     void setName(QString &name);
0042     QString displayName() const;
0043     void setDisplayName(QString &name);
0044     QString listLevelStyleType() const;
0045     void setListLevelStyleType(QString &name);
0046 
0047     bool inUse() const;
0048     void setInUse(bool inUse);
0049 
0050     QHash<QString, KoOdfStyleProperties*> properties();
0051     /**
0052       * @brief Return the list of properties in the selected property set.
0053       * @param name name of the property set.  Example: "text-properties" or "paragraph-properties"
0054       */
0055     KoOdfStyleProperties *properties(QString &name) const;
0056 
0057     QString property(QString &propertySet, QString &property) const;
0058     void    setProperty(QString &propertySet, QString &property, QString &value);
0059 
0060     bool readProperties(KoXmlStreamReader &reader);
0061 
0062     bool readOdf(KoXmlStreamReader &reader);
0063     bool saveOdf(KoXmlWriter *writer);
0064 
0065 private:
0066     class Private;
0067     Private * const d;
0068 };
0069 
0070 #endif // KOODFLISTSTYLE_H