Warning, file /office/calligra/libs/text/ToCBibGeneratorInfo.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2011 Smit Patel <smitpatel24@gmail.com> 0003 * Copyright (C) 2011 Gopalakrishna Bhat A <gopalakbhat@gmail.com> 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 #ifndef TOCBIBGENERATORINFO_H 0021 #define TOCBIBGENERATORINFO_H 0022 0023 #include <KoText.h> 0024 0025 const int INVALID_OUTLINE_LEVEL = 0; 0026 0027 class KoXmlWriter; 0028 0029 class KOTEXT_EXPORT IndexEntry 0030 { 0031 public: 0032 enum IndexEntryName {UNKNOWN, LINK_START, CHAPTER, SPAN, TEXT, TAB_STOP, PAGE_NUMBER, LINK_END, BIBLIOGRAPHY}; 0033 0034 explicit IndexEntry(const QString &_styleName, IndexEntryName _name = IndexEntry::UNKNOWN); 0035 virtual IndexEntry *clone(); 0036 virtual ~IndexEntry(); 0037 virtual void addAttributes(KoXmlWriter * writer) const; 0038 void saveOdf(KoXmlWriter * writer) const; 0039 0040 QString styleName; 0041 IndexEntryName name; 0042 }; 0043 0044 0045 class IndexEntryLinkStart : public IndexEntry 0046 { 0047 public: 0048 explicit IndexEntryLinkStart(const QString &_styleName); 0049 IndexEntry *clone() override; 0050 }; 0051 0052 0053 class IndexEntryChapter : public IndexEntry 0054 { 0055 public: 0056 explicit IndexEntryChapter(const QString &_styleName); 0057 IndexEntry *clone() override; 0058 void addAttributes(KoXmlWriter* writer) const override; 0059 0060 QString display; 0061 int outlineLevel; 0062 }; 0063 0064 0065 class KOTEXT_EXPORT IndexEntrySpan : public IndexEntry 0066 { 0067 public: 0068 explicit IndexEntrySpan(const QString &_styleName); 0069 IndexEntry *clone() override; 0070 void addAttributes(KoXmlWriter* writer) const override; 0071 0072 QString text; 0073 }; 0074 0075 0076 class IndexEntryText : public IndexEntry 0077 { 0078 public: 0079 explicit IndexEntryText(const QString &_styleName); 0080 IndexEntry *clone() override; 0081 }; 0082 0083 0084 class KOTEXT_EXPORT IndexEntryTabStop : public IndexEntry 0085 { 0086 public: 0087 explicit IndexEntryTabStop(const QString &_styleName); 0088 IndexEntry *clone() override; 0089 void addAttributes(KoXmlWriter* writer) const override; 0090 // for saving let's save the original unit, 0091 // for KoText::Tab we need to convert to PostScript points 0092 void setPosition(const QString &position); 0093 0094 KoText::Tab tab; 0095 QString m_position; 0096 }; 0097 0098 0099 class IndexEntryPageNumber : public IndexEntry 0100 { 0101 public: 0102 explicit IndexEntryPageNumber(const QString &_styleName); 0103 IndexEntry *clone() override; 0104 }; 0105 0106 0107 class IndexEntryLinkEnd : public IndexEntry 0108 { 0109 public: 0110 explicit IndexEntryLinkEnd(const QString &_styleName); 0111 IndexEntry *clone() override; 0112 }; 0113 0114 class KOTEXT_EXPORT TocEntryTemplate 0115 { 0116 public: 0117 TocEntryTemplate(); 0118 TocEntryTemplate(const TocEntryTemplate &other); 0119 void saveOdf(KoXmlWriter * writer) const; 0120 0121 int outlineLevel; 0122 QString styleName; 0123 int styleId; 0124 QList<IndexEntry*> indexEntries; 0125 }; 0126 0127 0128 class KOTEXT_EXPORT IndexTitleTemplate 0129 { 0130 public: 0131 void saveOdf(KoXmlWriter * writer) const; 0132 0133 QString styleName; 0134 int styleId; 0135 QString text; 0136 }; 0137 0138 0139 class KOTEXT_EXPORT IndexSourceStyle 0140 { 0141 public: 0142 IndexSourceStyle(const IndexSourceStyle& indexSourceStyle); 0143 IndexSourceStyle(); 0144 void saveOdf(KoXmlWriter * writer) const; 0145 0146 QString styleName; 0147 int styleId; 0148 }; 0149 0150 0151 class KOTEXT_EXPORT IndexSourceStyles 0152 { 0153 public: 0154 IndexSourceStyles(); 0155 IndexSourceStyles(const IndexSourceStyles &indexSourceStyles); 0156 void saveOdf(KoXmlWriter * writer) const; 0157 0158 int outlineLevel; 0159 QList<IndexSourceStyle> styles; 0160 }; 0161 0162 class KOTEXT_EXPORT IndexEntryBibliography : public IndexEntry 0163 { 0164 public: 0165 explicit IndexEntryBibliography(const QString &_styleName); 0166 IndexEntry *clone() override; 0167 void addAttributes(KoXmlWriter* writer) const override; 0168 0169 QString dataField; 0170 }; 0171 0172 class KOTEXT_EXPORT BibliographyEntryTemplate 0173 { 0174 public: 0175 BibliographyEntryTemplate(); 0176 BibliographyEntryTemplate(const BibliographyEntryTemplate &other); 0177 void saveOdf(KoXmlWriter * writer) const; 0178 0179 QString styleName; 0180 int styleId; 0181 QList<IndexEntry*> indexEntries; 0182 QString bibliographyType; 0183 }; 0184 0185 Q_DECLARE_METATYPE(IndexEntry::IndexEntryName) 0186 #endif // TOCBIBGENERATORINFO_H