Warning, file /office/calligra/libs/odf/KoOdfNotesConfiguration.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 0003 Copyright (C) 2010 Boudewijn Rempt 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 version 2 as published by the Free Software Foundation. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 Boston, MA 02110-1301, USA. 0018 */ 0019 #ifndef KOODFNOTESCONFIGURATION_H 0020 #define KOODFNOTESCONFIGURATION_H 0021 0022 #include <QMetaType> 0023 #include <QObject> 0024 0025 #include "KoXmlReader.h" 0026 #include "koodf_export.h" 0027 0028 class KoXmlWriter; 0029 class KoOdfNumberDefinition; 0030 0031 /** 0032 * load and save the notes-configuration element from the text: namespace. 0033 * 0034 * @see 14.9.2 Notes Configuration Element 0035 * A document in OpenDocument format contains at most one notes configuration element for every 0036 * notes class used in the document. If there is no note configuration element, a default note 0037 * configuration is used. 0038 * The attributes that may be associated with the <text:notes-configuration> element are: 0039 * 0040 * • Note class 0041 * • Citation text style 0042 * • Citation body text style 0043 * • Default footnote paragraph style 0044 * • Master page 0045 * • Start value 0046 * • Number format 0047 * • Numbering scheme 0048 * • Footnote position 0049 * 0050 * The following element may be included in the <text:footnotes-configuration> element: 0051 * 0052 * • Footnote continuation notice (forward and backward) 0053 */ 0054 class KOODF_EXPORT KoOdfNotesConfiguration : public QObject 0055 { 0056 Q_OBJECT 0057 public: 0058 0059 /** 0060 * Note class 0061 * The note class attribute determines which note elements this notes configuration applies to. 0062 */ 0063 enum NoteClass { 0064 Footnote, 0065 Endnote 0066 }; 0067 0068 explicit KoOdfNotesConfiguration(NoteClass noteClass); 0069 ~KoOdfNotesConfiguration() override; 0070 KoOdfNotesConfiguration(const KoOdfNotesConfiguration &other); 0071 KoOdfNotesConfiguration &operator=(const KoOdfNotesConfiguration &other); 0072 0073 0074 /** 0075 * load the notes-configuration element 0076 */ 0077 void loadOdf(const KoXmlElement &element); 0078 0079 /** 0080 * save the notes-configuration element 0081 */ 0082 void saveOdf(KoXmlWriter * writer) const; 0083 0084 0085 NoteClass noteClass() const; 0086 0087 /** 0088 * Citation Text Style 0089 * The text:citation-style attribute specifies the text style to use for the footnote citation 0090 * within the footnote. 0091 */ 0092 QString citationTextStyleName() const; 0093 void *citationTextStyle() const; 0094 void setCitationTextStyle(void *citationTextStyle); 0095 0096 /** 0097 * Citation Body Text Style 0098 * The text:citation-body-style-name attribute specifies the text style to use for the 0099 * footnote citation in the text flow. 0100 */ 0101 QString citationBodyTextStyleName() const; 0102 void *citationBodyTextStyle() const; 0103 void setCitationBodyTextStyle(void *citationBodyTextStyle); 0104 0105 /** 0106 * Default Note Paragraph Style 0107 * The default footnote paragraph style is only used for footnotes that are inserted into an existing 0108 * document. It is not used for footnotes that already exist. 0109 */ 0110 QString defaultNoteParagraphStyleName() const; 0111 void *defaultNoteParagraphStyle() const; 0112 void setDefaultNoteParagraphStyle(void *defaultNoteParagraphStyle); 0113 0114 /** 0115 * Master Page 0116 * To display the footnotes at the end of the document, the pages that contain the footnotes must be 0117 * instances of the master page specified by the text:master-page-name attribute. 0118 */ 0119 QString masterPage() const; 0120 void setMasterPage(const QString &masterPage); 0121 0122 /** 0123 * Start Value 0124 * The start:value attribute specifies the value at which the footnote numbering starts. 0125 */ 0126 int startValue() const; 0127 void setStartValue(int startValue); 0128 0129 /** 0130 * Number Format 0131 * See section 12.2 for information on the number format for footnotes. 0132 */ 0133 KoOdfNumberDefinition numberFormat() const; 0134 void setNumberFormat(const KoOdfNumberDefinition &numberFormat); 0135 0136 /** 0137 * Numbering Scheme 0138 * The text:start-numbering-at attribute specifies if footnote numbers start with a new 0139 * number at the beginning of the document or at the beginning of each chapter or page. 0140 */ 0141 enum NumberingScheme { 0142 BeginAtDocument, 0143 BeginAtChapter, 0144 BeginAtPage 0145 }; 0146 0147 NumberingScheme numberingScheme() const; 0148 void setNumberingScheme(NumberingScheme numberingScheme); 0149 0150 /** 0151 * Footnotes Position 0152 * • The text:footnotes-position attribute specifies one of the following positions for footnotes: 0153 * • text: At the page where the footnote citation is located, immediately below the page's text. 0154 * • page: The bottom of the page where the footnote citation is located. 0155 * • section: The end of the section 0156 * • document: The end of the document. 0157 */ 0158 enum FootnotesPosition { 0159 Text, 0160 Page, 0161 Section, 0162 Document 0163 }; 0164 0165 FootnotesPosition footnotesPosition() const; 0166 void setFootnotesPosition(FootnotesPosition footnotesPosition); 0167 0168 /** 0169 * Footnote Continuation 0170 * The footnote continuation elements specify: 0171 * • Text displayed at the end of a footnote that is continued on the next page 0172 * • Text displayed before the continued text 0173 */ 0174 QString footnoteContinuationForward() const; 0175 void setFootnoteContinuationForward(const QString &footnoteContinuationForward); 0176 0177 QString footnoteContinuationBackward() const; 0178 void setFootnoteContinuationBackward(const QString &footnoteContinuationBackward); 0179 0180 private: 0181 0182 class Private; 0183 Private * const d; 0184 0185 }; 0186 0187 Q_DECLARE_METATYPE(KoOdfNotesConfiguration*) 0188 0189 #endif // KOODFNOTESCONFIGURATION_H