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
QTextHtmlParserNode Struct Reference

#include <qtexthtmlparser_p.h>

+ Collaboration diagram for QTextHtmlParserNode:

Public Types

enum  WhiteSpaceMode {
  WhiteSpaceNormal , WhiteSpacePre , WhiteSpaceNoWrap , WhiteSpacePreWrap ,
  WhiteSpacePreLine , WhiteSpaceModeUndefined = -1
}
 

Public Member Functions

 QTextHtmlParserNode ()
 
bool isListStart () const
 
bool isTableCell () const
 
bool isBlock () const
 
bool isNotSelfNesting () const
 
bool allowedInContext (int parentId) const
 
bool mayNotHaveChildren () const
 
void initializeProperties (const QTextHtmlParserNode *parent, const QTextHtmlParser *parser)
 
int uncollapsedMargin (int mar) const
 
bool isNestedList (const QTextHtmlParser *parser) const
 
void parseStyleAttribute (const QString &value, const QTextDocument *resourceProvider)
 
void applyForegroundImage (qint64 cacheKey, const QTextDocument *resourceProvider)
 
void applyBackgroundImage (const QString &url, const QTextDocument *resourceProvider)
 
bool hasOnlyWhitespace () const
 

Public Attributes

QString tag
 
QString text
 
QStringList attributes
 
int parent
 
QList< int > children
 
QTextHTMLElements id
 
QTextCharFormat charFormat
 
QTextBlockFormat blockFormat
 
uint cssFloat: 2
 
uint hasOwnListStyle: 1
 
uint hasOwnLineHeightType: 1
 
uint hasLineHeightMultiplier: 1
 
uint hasCssListIndent: 1
 
uint isEmptyParagraph: 1
 
uint isTextFrame: 1
 
uint isRootFrame: 1
 
uint displayMode: 3
 
uint hasHref: 1
 
QTextListFormat::Style listStyle
 
int listStart = 1
 
QString textListNumberPrefix
 
QString textListNumberSuffix
 
QString imageName
 
QString imageAlt
 
qreal imageWidth
 
qreal imageHeight
 
QTextLength width
 
QTextLength height
 
qreal tableBorder
 
int tableCellRowSpan
 
int tableCellColSpan
 
qreal tableCellSpacing
 
qreal tableCellPadding
 
qreal tableCellBorder [4]
 
QBrush tableCellBorderBrush [4]
 
QTextFrameFormat::BorderStyle tableCellBorderStyle [4]
 
QBrush borderBrush
 
QTextFrameFormat::BorderStyle borderStyle
 
bool borderCollapse
 
int userState
 
int cssListIndent
 
WhiteSpaceMode wsm
 
int margin [4]
 
int padding [4]
 

Friends

class QTextHtmlParser
 

Detailed Description

Definition at line 123 of file qtexthtmlparser_p.h.

Member Enumeration Documentation

◆ WhiteSpaceMode

Enumerator
WhiteSpaceNormal 
WhiteSpacePre 
WhiteSpaceNoWrap 
WhiteSpacePreWrap 
WhiteSpacePreLine 
WhiteSpaceModeUndefined 

Definition at line 124 of file qtexthtmlparser_p.h.

Constructor & Destructor Documentation

◆ QTextHtmlParserNode()

Member Function Documentation

◆ allowedInContext()

bool QTextHtmlParserNode::allowedInContext ( int parentId) const
inline

Definition at line 189 of file qtexthtmlparser_p.h.

References Html_body, Html_caption, Html_dd, Html_dl, Html_dt, Html_head, Html_table, Html_tbody, Html_td, Html_tfoot, Html_th, Html_thead, and Html_tr.

Referenced by QTextHtmlParser::resolveParent().

+ Here is the caller graph for this function:

◆ applyBackgroundImage()

void QTextHtmlParserNode::applyBackgroundImage ( const QString & url,
const QTextDocument * resourceProvider )

Definition at line 1560 of file qtexthtmlparser.cpp.

References QTextFormat::BackgroundImageUrl, charFormat, QThread::currentThread(), QTextDocument::ImageResource, QCoreApplication::instance(), QUrl::isEmpty(), QPixmap::loadFromData(), QTextDocument::resource(), QTextFormat::setBackground(), QTextFormat::setProperty(), and url.

Referenced by QTextHtmlParser::applyAttributes().

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

◆ applyForegroundImage()

void QTextHtmlParserNode::applyForegroundImage ( qint64 cacheKey,
const QTextDocument * resourceProvider )

Definition at line 1529 of file qtexthtmlparser.cpp.

References cacheKey(), charFormat, QThread::currentThread(), QTextDocumentPrivate::get(), i, QCoreApplication::instance(), priv(), qHasPixmapTexture(), qWarning, QTextFormat::setForeground(), QBrush::setTexture(), and Qt::TexturePattern.

+ Here is the call graph for this function:

◆ hasOnlyWhitespace()

bool QTextHtmlParserNode::hasOnlyWhitespace ( ) const

Definition at line 1591 of file qtexthtmlparser.cpp.

References QString::at(), i, QString::size(), and text.

Referenced by QTextHtmlImporter::import().

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

◆ initializeProperties()

◆ isBlock()

bool QTextHtmlParserNode::isBlock ( ) const
inline

Definition at line 183 of file qtexthtmlparser_p.h.

References QTextHtmlElement::DisplayBlock, and displayMode.

Referenced by QTextHtmlImporter::import(), QTextHtmlParser::margin(), and QTextHtmlParser::parseTag().

+ Here is the caller graph for this function:

◆ isListStart()

bool QTextHtmlParserNode::isListStart ( ) const
inline

Definition at line 179 of file qtexthtmlparser_p.h.

References Html_ol, and Html_ul.

Referenced by isNestedList().

+ Here is the caller graph for this function:

◆ isNestedList()

bool QTextHtmlParserNode::isNestedList ( const QTextHtmlParser * parser) const

Definition at line 969 of file qtexthtmlparser.cpp.

References QTextHtmlParser::at(), isListStart(), and parent.

Referenced by initializeProperties().

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

◆ isNotSelfNesting()

bool QTextHtmlParserNode::isNotSelfNesting ( ) const
inline

Definition at line 186 of file qtexthtmlparser_p.h.

References Html_li, and Html_p.

Referenced by QTextHtmlParser::resolveParent().

+ Here is the caller graph for this function:

◆ isTableCell()

bool QTextHtmlParserNode::isTableCell ( ) const
inline

Definition at line 181 of file qtexthtmlparser_p.h.

References Html_td, and Html_th.

Referenced by initializeProperties(), and QTextHtmlParser::margin().

+ Here is the caller graph for this function:

◆ mayNotHaveChildren()

bool QTextHtmlParserNode::mayNotHaveChildren ( ) const
inline

Definition at line 211 of file qtexthtmlparser_p.h.

References Html_br, Html_hr, Html_img, and Html_meta.

Referenced by QTextHtmlParser::parseTag().

+ Here is the caller graph for this function:

◆ parseStyleAttribute()

void QTextHtmlParserNode::parseStyleAttribute ( const QString & value,
const QTextDocument * resourceProvider )

Definition at line 1637 of file qtexthtmlparser.cpp.

References Qt::CaseInsensitive, and QCss::Parser::parse().

Referenced by QTextHtmlParser::applyAttributes().

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

◆ uncollapsedMargin()

int QTextHtmlParserNode::uncollapsedMargin ( int mar) const
inline

Definition at line 216 of file qtexthtmlparser_p.h.

References margin.

Friends And Related Symbol Documentation

◆ QTextHtmlParser

friend class QTextHtmlParser
friend

Definition at line 237 of file qtexthtmlparser_p.h.

Member Data Documentation

◆ attributes

◆ blockFormat

QTextBlockFormat QTextHtmlParserNode::blockFormat

◆ borderBrush

QBrush QTextHtmlParserNode::borderBrush

Definition at line 170 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ borderCollapse

bool QTextHtmlParserNode::borderCollapse

Definition at line 172 of file qtexthtmlparser_p.h.

◆ borderStyle

QTextFrameFormat::BorderStyle QTextHtmlParserNode::borderStyle

Definition at line 171 of file qtexthtmlparser_p.h.

◆ charFormat

◆ children

QList<int> QTextHtmlParserNode::children

◆ cssFloat

uint QTextHtmlParserNode::cssFloat

Definition at line 142 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes(), and initializeProperties().

◆ cssListIndent

int QTextHtmlParserNode::cssListIndent

Definition at line 175 of file qtexthtmlparser_p.h.

◆ displayMode

uint QTextHtmlParserNode::displayMode

◆ hasCssListIndent

uint QTextHtmlParserNode::hasCssListIndent

Definition at line 146 of file qtexthtmlparser_p.h.

◆ hasHref

uint QTextHtmlParserNode::hasHref

Definition at line 151 of file qtexthtmlparser_p.h.

Referenced by initializeProperties().

◆ hasLineHeightMultiplier

uint QTextHtmlParserNode::hasLineHeightMultiplier

Definition at line 145 of file qtexthtmlparser_p.h.

◆ hasOwnLineHeightType

uint QTextHtmlParserNode::hasOwnLineHeightType

Definition at line 144 of file qtexthtmlparser_p.h.

◆ hasOwnListStyle

uint QTextHtmlParserNode::hasOwnListStyle

Definition at line 143 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ height

QTextLength QTextHtmlParserNode::height

Definition at line 161 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ id

◆ imageAlt

QString QTextHtmlParserNode::imageAlt

Definition at line 157 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ imageHeight

qreal QTextHtmlParserNode::imageHeight

Definition at line 159 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ imageName

QString QTextHtmlParserNode::imageName

Definition at line 156 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ imageWidth

qreal QTextHtmlParserNode::imageWidth

Definition at line 158 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ isEmptyParagraph

uint QTextHtmlParserNode::isEmptyParagraph

Definition at line 147 of file qtexthtmlparser_p.h.

◆ isRootFrame

uint QTextHtmlParserNode::isRootFrame

Definition at line 149 of file qtexthtmlparser_p.h.

◆ isTextFrame

uint QTextHtmlParserNode::isTextFrame

Definition at line 148 of file qtexthtmlparser_p.h.

◆ listStart

int QTextHtmlParserNode::listStart = 1

Definition at line 153 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ listStyle

QTextListFormat::Style QTextHtmlParserNode::listStyle

Definition at line 152 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes(), and initializeProperties().

◆ margin

int QTextHtmlParserNode::margin[4]

◆ padding

int QTextHtmlParserNode::padding[4]

Definition at line 235 of file qtexthtmlparser_p.h.

Referenced by initializeProperties().

◆ parent

◆ tableBorder

qreal QTextHtmlParserNode::tableBorder

Definition at line 162 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ tableCellBorder

qreal QTextHtmlParserNode::tableCellBorder[4]

Definition at line 167 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParserNode().

◆ tableCellBorderBrush

QBrush QTextHtmlParserNode::tableCellBorderBrush[4]

Definition at line 168 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParserNode().

◆ tableCellBorderStyle

QTextFrameFormat::BorderStyle QTextHtmlParserNode::tableCellBorderStyle[4]

Definition at line 169 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParserNode().

◆ tableCellColSpan

int QTextHtmlParserNode::tableCellColSpan

Definition at line 164 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ tableCellPadding

qreal QTextHtmlParserNode::tableCellPadding

Definition at line 166 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ tableCellRowSpan

int QTextHtmlParserNode::tableCellRowSpan

Definition at line 163 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ tableCellSpacing

qreal QTextHtmlParserNode::tableCellSpacing

Definition at line 165 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ tag

QString QTextHtmlParserNode::tag

◆ text

◆ textListNumberPrefix

QString QTextHtmlParserNode::textListNumberPrefix

Definition at line 154 of file qtexthtmlparser_p.h.

◆ textListNumberSuffix

QString QTextHtmlParserNode::textListNumberSuffix

Definition at line 155 of file qtexthtmlparser_p.h.

◆ userState

int QTextHtmlParserNode::userState

Definition at line 173 of file qtexthtmlparser_p.h.

◆ width

QTextLength QTextHtmlParserNode::width

Definition at line 160 of file qtexthtmlparser_p.h.

Referenced by QTextHtmlParser::applyAttributes().

◆ wsm

WhiteSpaceMode QTextHtmlParserNode::wsm

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