21#include "bbcodebuilder.h"
27BBCodeBuilder::~BBCodeBuilder() {}
39 m_text.append(QStringLiteral(
"[COLOR=%1]").arg(brush.
color().
name()));
43 m_text.append(QStringLiteral(
"[/COLOR]"));
51 m_text.append(QStringLiteral(
"[URL=%1]").arg(href));
63 m_text.append(QStringLiteral(
"[/SIZE]"));
67 qreal left, qreal right)
74 m_text.append(QStringLiteral(
"\n[Right]"));
76 m_text.append(QStringLiteral(
"\n[CENTER]"));
79 m_currentAlignment = a;
85 m_text.append(QStringLiteral(
"\n[/Right]\n"));
87 m_text.append(QStringLiteral(
"\n[/CENTER]\n"));
100 m_text.append(QStringLiteral(
"[IMG]%1[/IMG]").arg(src));
109 m_text.append(QStringLiteral(
113 m_text.append(QStringLiteral(
"[LIST=1]\n"));
116 m_text.append(QStringLiteral(
"[LIST=a]\n"));
119 m_text.append(QStringLiteral(
"[LIST=A]\n"));
132 m_text.append(QStringLiteral(
"[SUP]"));
137 m_text.append(QStringLiteral(
"[/SUP]"));
146 m_text.append(QStringLiteral(
"[TABLE]\n"));
151 m_text.append(QStringLiteral(
"[/TABLE]"));
156 m_text.append(
escape(text));
162 return QStringLiteral(
"[NOPARSE]") + s + QStringLiteral(
"[/NOPARSE]");
void endSubscript() override
void endFontPointSize() override
void endParagraph() override
void beginSubscript() override
void beginForeground(const QBrush &brush) override
void beginList(QTextListFormat::Style type) override
const QString escape(const QString &text) const
void beginParagraph(Qt::Alignment a=Qt::AlignLeft, qreal top=0.0, qreal bottom=0.0, qreal left=0.0, qreal right=0.0) override
void beginFontPointSize(int size) override
void beginTableRow() override
void beginSuperscript() override
void beginStrikeout() override
void endUnderline() override
void insertImage(const QString &src, qreal width, qreal height) override
void addNewline() override
void endStrong() override
void beginStrong() override
QString getResult() override
void endForeground() override
void endStrikeout() override
void beginTable(qreal, qreal, const QString &) override
void beginAnchor(const QString &href={}, const QString &name={}) override
void endSuperscript() override
void endAnchor() override
void appendLiteralText(const QString &text) override
void beginListItem() override
void beginUnderline() override
void beginEmph() override
The Cutelee namespace holds all public Cutelee API.
const QColor & color() const const
QString name() const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QString number(int n, int base)