Warning, file /office/calligra/libs/text/KoInlineCite.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 * 0004 * This library is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU Library General Public 0006 * License as published by the Free Software Foundation; either 0007 * version 2 of the License, or (at your option) any later version. 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 KOINLINECITE_H 0020 #define KOINLINECITE_H 0021 0022 #include "KoInlineObject.h" 0023 #include "kotext_export.h" 0024 0025 /** 0026 * This object is an inline object, which means it is anchored in the text-flow and it can hold 0027 * bibliography-mark(citation). 0028 */ 0029 class KOTEXT_EXPORT KoInlineCite : public KoInlineObject 0030 { 0031 Q_OBJECT 0032 public: 0033 enum Type { 0034 Citation, 0035 ClonedCitation //cloned from other citation in document 0036 }; 0037 /** 0038 * Construct a new cite to be inserted in the text using KoTextSelectionHandler::insertInlineObject() for example. 0039 */ 0040 explicit KoInlineCite(Type type); 0041 0042 ~KoInlineCite() override; 0043 0044 bool operator!= (const KoInlineCite &cite) const; 0045 0046 KoInlineCite &operator= (const KoInlineCite &cite); 0047 0048 Type type() const; //return type of cite 0049 0050 void setType(Type t); 0051 0052 QString dataField(const QString &fieldName) const; //returns bibliography-data-field with name fieldName 0053 0054 bool hasSameData(KoInlineCite *cite) const; 0055 0056 void copyFrom(KoInlineCite *cite); 0057 0058 void setIdentifier(const QString &identifier); 0059 0060 void setBibliographyType(const QString &bibliographyType); 0061 0062 void setAddress (const QString &addr); 0063 0064 void setAnnotation (const QString &annotation); 0065 0066 void setAuthor (const QString &author); 0067 0068 void setBookTitle (const QString &booktitle); 0069 0070 void setChapter (const QString &chapter); 0071 0072 void setEdition (const QString &edition); 0073 0074 void setEditor (const QString &editor); 0075 0076 void setPublicationType (const QString &publicationType); 0077 0078 void setInstitution (const QString &institution); 0079 0080 void setJournal (const QString &journal); 0081 0082 void setLabel(const QString &label); 0083 0084 void setMonth (const QString &month); 0085 0086 void setNote (const QString ¬e); 0087 0088 void setNumber (const QString &number); 0089 0090 void setOrganisation (const QString &organisation); 0091 0092 void setPages (const QString &pages); 0093 0094 void setPublisher (const QString &publisher); 0095 0096 void setSchool (const QString &school); 0097 0098 void setSeries (const QString &series); 0099 0100 void setTitle (const QString &title); 0101 0102 void setReportType (const QString &reportType); 0103 0104 void setVolume (const QString &volume); 0105 0106 void setYear (const QString &year); 0107 0108 void setURL (const QString &url); 0109 0110 void setISBN (const QString &isbn); 0111 0112 void setISSN (const QString &issn); 0113 0114 void setCustom1 (const QString &custom1); 0115 0116 void setCustom2 (const QString &custom2); 0117 0118 void setCustom3 (const QString &custom3); 0119 0120 void setCustom4 (const QString &custom4); 0121 0122 void setCustom5 (const QString &custom5); 0123 0124 QString identifier() const; 0125 0126 QString address() const; 0127 0128 QString author() const; 0129 0130 QString bibliographyType() const; 0131 0132 QString annotation() const; 0133 0134 QString bookTitle() const; 0135 0136 QString chapter() const; 0137 0138 QString edition() const; 0139 0140 QString editor() const; 0141 0142 QString publicationType() const; 0143 0144 QString institution() const; 0145 0146 QString journal() const; 0147 0148 QString month() const; 0149 0150 QString note() const; 0151 0152 QString number() const; 0153 0154 QString organisations() const; 0155 0156 QString pages() const; 0157 0158 QString publisher() const; 0159 0160 QString school() const; 0161 0162 QString series() const; 0163 0164 QString title() const; 0165 0166 QString reportType() const; 0167 0168 QString volume() const; 0169 0170 QString year() const; 0171 0172 QString url() const; 0173 0174 QString isbn() const; 0175 0176 QString issn() const; 0177 0178 QString custom1() const; 0179 0180 QString custom2() const; 0181 0182 QString custom3() const; 0183 0184 QString custom4() const; 0185 0186 QString custom5() const; 0187 0188 int posInDocument() const; 0189 0190 bool loadOdf(const KoXmlElement &element, KoShapeLoadingContext &context) override; 0191 0192 ///reimplemented 0193 void saveOdf(KoShapeSavingContext &context) override; 0194 0195 protected: 0196 /// reimplemented 0197 void updatePosition(const QTextDocument *document, int posInDocument, const QTextCharFormat &format) override; 0198 /// reimplemented 0199 void resize(const QTextDocument *document, QTextInlineObject &object, 0200 int posInDocument, const QTextCharFormat &format, QPaintDevice *pd) override; 0201 /// reimplemented 0202 void paint(QPainter &painter, QPaintDevice *pd, const QTextDocument *document, 0203 const QRectF &rect, const QTextInlineObject &object, int posInDocument, const QTextCharFormat &format) override; 0204 0205 private: 0206 class Private; 0207 Private * const d; 0208 0209 }; 0210 0211 #endif // KOINLINECITE_H