Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qtextmarkdownimporter_p.h>
Public Types | |
enum | Feature { FeatureCollapseWhitespace = 0x0001 , FeaturePermissiveATXHeaders = 0x0002 , FeaturePermissiveURLAutoLinks = 0x0004 , FeaturePermissiveMailAutoLinks = 0x0008 , FeatureNoIndentedCodeBlocks = 0x0010 , FeatureNoHTMLBlocks = 0x0020 , FeatureNoHTMLSpans = 0x0040 , FeatureTables = 0x0100 , FeatureStrikeThrough = 0x0200 , FeaturePermissiveWWWAutoLinks = 0x0400 , FeatureTasklists = 0x0800 , FeatureUnderline = 0x4000 , FeatureFrontMatter = 0x100000 , FeaturePermissiveAutoLinks , FeatureNoHTML = QTextDocument::MarkdownNoHTML , DialectCommonMark = QTextDocument::MarkdownDialectCommonMark , DialectGitHub = QTextDocument::MarkdownDialectGitHub } |
Public Member Functions | |
QTextMarkdownImporter (QTextDocument *doc, Features features) | |
QTextMarkdownImporter (QTextDocument *doc, QTextDocument::MarkdownFeatures features) | |
void | import (const QString &markdown) |
int | cbEnterBlock (int blockType, void *detail) |
int | cbLeaveBlock (int blockType, void *detail) |
int | cbEnterSpan (int spanType, void *detail) |
int | cbLeaveSpan (int spanType, void *detail) |
int | cbText (int textType, const char *text, unsigned size) |
Definition at line 33 of file qtextmarkdownimporter_p.h.
Definition at line 36 of file qtextmarkdownimporter_p.h.
QTextMarkdownImporter::QTextMarkdownImporter | ( | QTextDocument * | doc, |
Features | features ) |
QTextMarkdownImporter::QTextMarkdownImporter | ( | QTextDocument * | doc, |
QTextDocument::MarkdownFeatures | features ) |
Definition at line 117 of file qtextmarkdownimporter.cpp.
int QTextMarkdownImporter::cbEnterBlock | ( | int | blockType, |
void * | detail ) |
Definition at line 167 of file qtextmarkdownimporter.cpp.
References QTextTable::appendColumns(), QTextTable::appendRows(), QTextCursor::blockFormat(), QTextFormat::BlockTrailingHorizontalRulerWidth, QFont::Bold, QTextTable::cellAt(), QTextBlockFormat::Checked, QList< T >::clear(), QTextTable::columns(), QTextCursor::document(), QTextTableCell::firstCursorPosition(), fmt, QTextFormat::FontSizeAdjustment, info, QTextCursor::insertBlock(), QTextCursor::insertList(), QTextCursor::insertTable(), QTextDocument::isEmpty(), QList< T >::isEmpty(), QTextTableCell::isValid(), QTextListFormat::ListCircle, QTextListFormat::ListDecimal, QTextListFormat::ListDisc, QTextListFormat::ListSquare, MdAlignment(), QTextBlockFormat::NoMarker, QStack< T >::push(), qCDebug, qPrintable, qWarning, QTextTable::rows(), QTextBlockFormat::setAlignment(), QTextCursor::setBlockFormat(), QTextCursor::setCharFormat(), QTextListFormat::setIndent(), QTextListFormat::setNumberSuffix(), QTextFormat::setProperty(), QTextListFormat::setStart(), QTextListFormat::setStyle(), QList< T >::size(), and QTextBlockFormat::Unchecked.
Referenced by CbEnterBlock().
int QTextMarkdownImporter::cbEnterSpan | ( | int | spanType, |
void * | detail ) |
Definition at line 382 of file qtextmarkdownimporter.cpp.
References QFont::Bold, QString::fromUtf8(), QTextFormat::ImageTitle, QString::isEmpty(), QList< T >::isEmpty(), QPalette::link(), QStack< T >::push(), qCDebug, QTextCursor::setCharFormat(), QTextCharFormat::setFontItalic(), QTextImageFormat::setName(), QTextFormat::setProperty(), title, QStack< T >::top(), and url.
Referenced by CbEnterSpan().
int QTextMarkdownImporter::cbLeaveBlock | ( | int | blockType, |
void * | detail ) |
Definition at line 309 of file qtextmarkdownimporter.cpp.
References QString::clear(), QTextTable::columns(), QListSpecialMethodsBase< T >::contains(), QTextCursor::createList(), QTextCursor::End, QList< T >::isEmpty(), QTextTable::mergeCells(), QTextCursor::movePosition(), QStack< T >::pop(), QStack< T >::push(), Q_UNLIKELY, Q_UNUSED, qCDebug, qCWarning, QTextTable::rows(), QTextCursor::setCharFormat(), and QList< T >::size().
Referenced by CbLeaveBlock().
int QTextMarkdownImporter::cbLeaveSpan | ( | int | spanType, |
void * | detail ) |
Definition at line 432 of file qtextmarkdownimporter.cpp.
References QList< T >::isEmpty(), QStack< T >::pop(), Q_UNUSED, qCDebug, QTextCursor::setCharFormat(), and QStack< T >::top().
Referenced by CbLeaveSpan().
int QTextMarkdownImporter::cbText | ( | int | textType, |
const char * | text, | ||
unsigned | size ) |
Definition at line 450 of file qtextmarkdownimporter.cpp.
References QList< T >::append(), QTextDocument::baseUrl, QTextFormat::BlockCodeLanguage, QTextCursor::blockFormat(), QTextFormat::BlockQuoteLevel, QTextCursor::currentList(), QTextCursor::document(), QTextList::format(), QString::fromUtf8(), QTextFormat::ImageAltText, QTextFormat::ImageTitle, QTextListFormat::indent(), QTextCursor::insertHtml(), QTextCursor::insertImage(), QTextCursor::insertText(), QList< T >::isEmpty(), QTextImageFormat::name(), QString::number(), qCDebug, qPrintable, QStringLiteral, QtDebugMsg, qtmi_Newline, qtmi_Space, QTextCursor::setBlockFormat(), QTextCursor::setCharFormat(), QTextBlockFormat::setIndent(), QTextFormat::setProperty(), QTextFormat::stringProperty(), text, and QStack< T >::top().
Referenced by CbText().
Definition at line 122 of file qtextmarkdownimporter.cpp.
References QTextCursor::beginEditBlock(), callbacks, CbDebugLog(), CbEnterBlock(), CbEnterSpan(), CbLeaveBlock(), CbLeaveSpan(), CbText(), QTextDocument::clear(), QTextDocument::defaultFont, QTextCursor::document(), QTextCursor::endEditBlock(), FeatureFrontMatter, QTextDocument::FrontMatter, QStringView::indexOf(), markerString(), qCDebug, QTextDocument::setMetaInformation(), QFont::setPixelSize(), and QFont::setPointSize().