21 #include "bbcodebuilder.h" 27 BBCodeBuilder::~BBCodeBuilder() {}
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]"));
162 return QStringLiteral(
"[NOPARSE]") + s + QStringLiteral(
"[/NOPARSE]");
void endSubscript() override
QString & append(QChar ch)
void beginAnchor(const QString &href={}, const QString &name={}) override
void beginForeground(const QBrush &brush) override
void endUnderline() override
void endStrong() override
void beginList(QTextListFormat::Style type) override
QString name(NameFormat format) const const
The Cutelee namespace holds all public Cutelee API.
void beginListItem() override
void endAnchor() override
void beginTableRow() override
void beginStrikeout() override
void beginSuperscript() override
void beginTable(qreal, qreal, const QString &) override
const QColor & color() const const
void endParagraph() override
const QString escape(const QString &text) const
QString number(double n, char format, int precision)
void beginUnderline() override
void beginSubscript() override
void endStrikeout() override
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
void endFontPointSize() override
void appendLiteralText(const QString &text) override
void beginEmph() override
QString getResult() override
void beginFontPointSize(int size) override
void addNewline() override
void endForeground() override
void endSuperscript() override
void insertImage(const QString &src, qreal width, qreal height) override
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 beginStrong() override