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>.
Loading...
Searching...
No Matches
QTextMarkdownImporter Class Reference

#include <qtextmarkdownimporter_p.h>

+ Collaboration diagram for QTextMarkdownImporter:

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)
 

Detailed Description

Definition at line 33 of file qtextmarkdownimporter_p.h.

Member Enumeration Documentation

◆ Feature

Enumerator
FeatureCollapseWhitespace 
FeaturePermissiveATXHeaders 
FeaturePermissiveURLAutoLinks 
FeaturePermissiveMailAutoLinks 
FeatureNoIndentedCodeBlocks 
FeatureNoHTMLBlocks 
FeatureNoHTMLSpans 
FeatureTables 
FeatureStrikeThrough 
FeaturePermissiveWWWAutoLinks 
FeatureTasklists 
FeatureUnderline 
FeatureFrontMatter 
FeaturePermissiveAutoLinks 
FeatureNoHTML 
DialectCommonMark 
DialectGitHub 

Definition at line 36 of file qtextmarkdownimporter_p.h.

Constructor & Destructor Documentation

◆ QTextMarkdownImporter() [1/2]

QTextMarkdownImporter::QTextMarkdownImporter ( QTextDocument * doc,
Features features )

◆ QTextMarkdownImporter() [2/2]

QTextMarkdownImporter::QTextMarkdownImporter ( QTextDocument * doc,
QTextDocument::MarkdownFeatures features )

Definition at line 117 of file qtextmarkdownimporter.cpp.

Member Function Documentation

◆ cbEnterBlock()

◆ cbEnterSpan()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cbLeaveBlock()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cbLeaveSpan()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cbText()

int QTextMarkdownImporter::cbText ( int textType,
const char * text,
unsigned size )

◆ import()

void QTextMarkdownImporter::import ( const QString & markdown)

The documentation for this class was generated from the following files: