Grantlee: textdocument/lib/abstractmarkupbuilder.h Source File

Grantlee 5.3.0

abstractmarkupbuilder.h
1/*
2 This file is part of the Grantlee template system.
3
4 Copyright (c) 2008,2010 Stephen Kelly <steveire@gmail.com>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either version
9 2.1 of the Licence, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library. If not, see <http://www.gnu.org/licenses/>.
18
19*/
20
21#ifndef GRANTLEE_ABSTRACTMARKUPBUILDER_H
22#define GRANTLEE_ABSTRACTMARKUPBUILDER_H
23
24#include "grantlee_textdocument_export.h"
25
26#include <QtCore/QString>
27#include <QtGui/QTextListFormat>
28
29class QBrush;
30
31namespace Grantlee
32{
33
34class AbstractMarkupBuilderPrivate;
35
37
51 class GRANTLEE_TEXTDOCUMENT_EXPORT AbstractMarkupBuilder
52{
53public:
55 virtual ~AbstractMarkupBuilder() {}
56
58 virtual void beginStrong() = 0;
59
61 virtual void endStrong() = 0;
62
64 virtual void beginEmph() = 0;
65
67 virtual void endEmph() = 0;
68
70 virtual void beginUnderline() = 0;
71
73 virtual void endUnderline() = 0;
74
76 virtual void beginStrikeout() = 0;
77
79 virtual void endStrikeout() = 0;
80
85 virtual void beginForeground(const QBrush &brush) = 0;
86
88 virtual void endForeground() = 0;
89
94 virtual void beginBackground(const QBrush &brush) = 0;
95
97 virtual void endBackground() = 0;
98
104 virtual void beginAnchor(const QString &href = {}, const QString &name = {})
105 = 0;
106
108 virtual void endAnchor() = 0;
109
114 virtual void beginFontFamily(const QString &family) = 0;
115
117 virtual void endFontFamily() = 0;
118
123 virtual void beginFontPointSize(int size) = 0;
124
126 virtual void endFontPointSize() = 0;
127
136 virtual void beginParagraph(Qt::Alignment a = Qt::AlignLeft, qreal top = 0.0,
137 qreal bottom = 0.0, qreal left = 0.0,
138 qreal right = 0.0)
139 = 0;
140
142 virtual void endParagraph() = 0;
144 virtual void addNewline() = 0;
145
150 virtual void insertHorizontalRule(int width = -1) = 0;
151
158 virtual void insertImage(const QString &url, qreal width, qreal height) = 0;
159
165 virtual void beginList(QTextListFormat::Style style) = 0;
166
170 virtual void endList() = 0;
171
173 virtual void beginListItem() = 0;
174
176 virtual void endListItem() = 0;
177
179 virtual void beginSuperscript() = 0;
180
182 virtual void endSuperscript() = 0;
183
185 virtual void beginSubscript() = 0;
186
188 virtual void endSubscript() = 0;
189
198 virtual void beginTable(qreal cellpadding, qreal cellspacing,
199 const QString &width)
200 = 0;
201
205 virtual void beginTableRow() = 0;
206
213 virtual void beginTableHeaderCell(const QString &width, int colSpan,
214 int rowSpan)
215 = 0;
216
223 virtual void beginTableCell(const QString &width, int colSpan, int rowSpan)
224 = 0;
225
227 virtual void endTable() = 0;
228
230 virtual void endTableRow() = 0;
231
233 virtual void endTableHeaderCell() = 0;
234
236 virtual void endTableCell() = 0;
237
242 virtual void beginHeader(int level) = 0;
243
248 virtual void endHeader(int level) = 0;
249
255 virtual void appendLiteralText(const QString &text) = 0;
256
260 virtual void appendRawText(const QString &text) = 0;
261
269 virtual QString getResult() = 0;
270};
271}
272
273#endif
Grantlee::AbstractMarkupBuilder
Interface for creating marked-up text output.
Definition: abstractmarkupbuilder.h:52
Grantlee::AbstractMarkupBuilder::beginFontPointSize
virtual void beginFontPointSize(int size)=0
Grantlee::AbstractMarkupBuilder::beginUnderline
virtual void beginUnderline()=0
Grantlee::AbstractMarkupBuilder::endStrikeout
virtual void endStrikeout()=0
Grantlee::AbstractMarkupBuilder::endFontPointSize
virtual void endFontPointSize()=0
Grantlee::AbstractMarkupBuilder::endListItem
virtual void endListItem()=0
Grantlee::AbstractMarkupBuilder::endSubscript
virtual void endSubscript()=0
Grantlee::AbstractMarkupBuilder::getResult
virtual QString getResult()=0
Grantlee::AbstractMarkupBuilder::endHeader
virtual void endHeader(int level)=0
Grantlee::AbstractMarkupBuilder::endTable
virtual void endTable()=0
Grantlee::AbstractMarkupBuilder::beginListItem
virtual void beginListItem()=0
Grantlee::AbstractMarkupBuilder::beginAnchor
virtual void beginAnchor(const QString &href={}, const QString &name={})=0
Grantlee::AbstractMarkupBuilder::insertImage
virtual void insertImage(const QString &url, qreal width, qreal height)=0
Grantlee::AbstractMarkupBuilder::insertHorizontalRule
virtual void insertHorizontalRule(int width=-1)=0
Grantlee::AbstractMarkupBuilder::beginTableRow
virtual void beginTableRow()=0
Grantlee::AbstractMarkupBuilder::beginList
virtual void beginList(QTextListFormat::Style style)=0
Grantlee::AbstractMarkupBuilder::~AbstractMarkupBuilder
virtual ~AbstractMarkupBuilder()
Definition: abstractmarkupbuilder.h:55
Grantlee::AbstractMarkupBuilder::endTableCell
virtual void endTableCell()=0
Grantlee::AbstractMarkupBuilder::endEmph
virtual void endEmph()=0
Grantlee::AbstractMarkupBuilder::appendRawText
virtual void appendRawText(const QString &text)=0
Grantlee::AbstractMarkupBuilder::beginHeader
virtual void beginHeader(int level)=0
Grantlee::AbstractMarkupBuilder::beginStrong
virtual void beginStrong()=0
Grantlee::AbstractMarkupBuilder::beginSubscript
virtual void beginSubscript()=0
Grantlee::AbstractMarkupBuilder::endStrong
virtual void endStrong()=0
Grantlee::AbstractMarkupBuilder::appendLiteralText
virtual void appendLiteralText(const QString &text)=0
Grantlee::AbstractMarkupBuilder::endSuperscript
virtual void endSuperscript()=0
Grantlee::AbstractMarkupBuilder::beginFontFamily
virtual void beginFontFamily(const QString &family)=0
Grantlee::AbstractMarkupBuilder::endList
virtual void endList()=0
Grantlee::AbstractMarkupBuilder::endTableHeaderCell
virtual void endTableHeaderCell()=0
Grantlee::AbstractMarkupBuilder::endUnderline
virtual void endUnderline()=0
Grantlee::AbstractMarkupBuilder::beginSuperscript
virtual void beginSuperscript()=0
Grantlee::AbstractMarkupBuilder::beginEmph
virtual void beginEmph()=0
Grantlee::AbstractMarkupBuilder::endForeground
virtual void endForeground()=0
Grantlee::AbstractMarkupBuilder::beginTable
virtual void beginTable(qreal cellpadding, qreal cellspacing, const QString &width)=0
Grantlee::AbstractMarkupBuilder::endFontFamily
virtual void endFontFamily()=0
Grantlee::AbstractMarkupBuilder::beginForeground
virtual void beginForeground(const QBrush &brush)=0
Grantlee::AbstractMarkupBuilder::beginBackground
virtual void beginBackground(const QBrush &brush)=0
Grantlee::AbstractMarkupBuilder::endBackground
virtual void endBackground()=0
Grantlee::AbstractMarkupBuilder::beginTableHeaderCell
virtual void beginTableHeaderCell(const QString &width, int colSpan, int rowSpan)=0
Grantlee::AbstractMarkupBuilder::beginStrikeout
virtual void beginStrikeout()=0
Grantlee::AbstractMarkupBuilder::endTableRow
virtual void endTableRow()=0
Grantlee::AbstractMarkupBuilder::addNewline
virtual void addNewline()=0
Grantlee::AbstractMarkupBuilder::beginParagraph
virtual void beginParagraph(Qt::Alignment a=Qt::AlignLeft, qreal top=0.0, qreal bottom=0.0, qreal left=0.0, qreal right=0.0)=0
Grantlee::AbstractMarkupBuilder::beginTableCell
virtual void beginTableCell(const QString &width, int colSpan, int rowSpan)=0
Grantlee::AbstractMarkupBuilder::endParagraph
virtual void endParagraph()=0
Grantlee::AbstractMarkupBuilder::endAnchor
virtual void endAnchor()=0
Grantlee
The Grantlee namespace holds all public Grantlee API.
Definition: Mainpage.dox:8