![]() |
Qt 6.x
The Qt SDK
|
#include <qtexthtmlparser_p.h>
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 |
Friends | |
class | QTextHtmlParser |
Definition at line 123 of file qtexthtmlparser_p.h.
Enumerator | |
---|---|
WhiteSpaceNormal | |
WhiteSpacePre | |
WhiteSpaceNoWrap | |
WhiteSpacePreWrap | |
WhiteSpacePreLine | |
WhiteSpaceModeUndefined |
Definition at line 124 of file qtexthtmlparser_p.h.
QTextHtmlParserNode::QTextHtmlParserNode | ( | ) |
Definition at line 452 of file qtexthtmlparser.cpp.
References QTextFrameFormat::BorderStyle_None, i, margin, QTextHtmlParser::MarginBottom, QTextHtmlParser::MarginLeft, QTextHtmlParser::MarginRight, QTextHtmlParser::MarginTop, Qt::NoBrush, tableCellBorder, tableCellBorderBrush, and tableCellBorderStyle.
|
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().
void QTextHtmlParserNode::applyBackgroundImage | ( | const QString & | url, |
const QTextDocument * | resourceProvider | ||
) |
Definition at line 1457 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().
void QTextHtmlParserNode::applyForegroundImage | ( | qint64 | cacheKey, |
const QTextDocument * | resourceProvider | ||
) |
Definition at line 1426 of file qtexthtmlparser.cpp.
References charFormat, QThread::currentThread(), QTextDocumentPrivate::get(), i, QCoreApplication::instance(), priv(), qHasPixmapTexture(), qWarning, QTextFormat::setForeground(), and Qt::TexturePattern.
bool QTextHtmlParserNode::hasOnlyWhitespace | ( | ) | const |
Definition at line 1488 of file qtexthtmlparser.cpp.
References QString::at(), i, QChar::isSpace(), QChar::LineSeparator, QString::size(), and text.
Referenced by QTextHtmlImporter::import().
void QTextHtmlParserNode::initializeProperties | ( | const QTextHtmlParserNode * | parent, |
const QTextHtmlParser * | parser | ||
) |
Definition at line 983 of file qtexthtmlparser.cpp.
References QTextFormat::AnchorName, attributes, QTextFormat::BackgroundBrush, QTextFormat::BlockAlignment, blockFormat, QTextFormat::BlockQuoteLevel, Qt::CaseInsensitive, charFormat, QTextFormat::clearProperty(), cssFloat, QTextHtmlElement::DisplayBlock, QTextHtmlElement::DisplayInline, displayMode, QTextHtmlElement::DisplayNone, QTextFormat::FontSizeAdjustment, hasHref, Html_a, Html_big, Html_blockquote, Html_body, Html_br, Html_caption, Html_dd, Html_dl, Html_h1, Html_h2, Html_h3, Html_h4, Html_h5, Html_html, Html_ol, Html_p, Html_pre, Html_small, Html_table, Html_tr, Html_ul, i, QTextFrameFormat::InFlow, isNestedList(), isTableCell(), QTextFormat::LayoutDirection, Qt::LeftToRight, QChar::LineSeparator, listStyle, margin, QTextHtmlParser::MarginBottom, QTextHtmlParser::MarginLeft, QTextHtmlParser::MarginRight, QTextHtmlParser::MarginTop, padding, parent, QTextBlockFormat::setAlignment(), QTextCharFormat::setAnchor(), QTextFormat::setLayoutDirection(), QTextFormat::setProperty(), text, and wsm.
Referenced by QTextHtmlParser::resolveNode().
|
inline |
Definition at line 183 of file qtexthtmlparser_p.h.
References QTextHtmlElement::DisplayBlock, and displayMode.
Referenced by QTextHtmlImporter::import(), QTextHtmlParser::margin(), and QTextHtmlParser::parseTag().
|
inline |
Definition at line 179 of file qtexthtmlparser_p.h.
References Html_ol, and Html_ul.
Referenced by 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().
|
inline |
Definition at line 186 of file qtexthtmlparser_p.h.
References Html_li, and Html_p.
Referenced by QTextHtmlParser::resolveParent().
|
inline |
Definition at line 181 of file qtexthtmlparser_p.h.
References Html_td, and Html_th.
Referenced by initializeProperties(), and QTextHtmlParser::margin().
|
inline |
Definition at line 211 of file qtexthtmlparser_p.h.
References Html_br, Html_hr, Html_img, and Html_meta.
Referenced by QTextHtmlParser::parseTag().
void QTextHtmlParserNode::parseStyleAttribute | ( | const QString & | value, |
const QTextDocument * | resourceProvider | ||
) |
Definition at line 1534 of file qtexthtmlparser.cpp.
References Qt::CaseInsensitive, QCss::Parser::parse(), and QCss::StyleSheet::styleRules.
Referenced by QTextHtmlParser::applyAttributes().
|
inline |
Definition at line 216 of file qtexthtmlparser_p.h.
References margin.
|
friend |
Definition at line 237 of file qtexthtmlparser_p.h.
QStringList QTextHtmlParserNode::attributes |
Definition at line 136 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlStyleSelector::attributeValue(), QTextHtmlStyleSelector::hasAttributes(), initializeProperties(), QTextHtmlParser::parseTag(), and standardDeclarationForNode().
QTextBlockFormat QTextHtmlParserNode::blockFormat |
Definition at line 141 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes(), QTextHtmlImporter::import(), and initializeProperties().
QBrush QTextHtmlParserNode::borderBrush |
Definition at line 170 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
bool QTextHtmlParserNode::borderCollapse |
Definition at line 172 of file qtexthtmlparser_p.h.
QTextFrameFormat::BorderStyle QTextHtmlParserNode::borderStyle |
Definition at line 171 of file qtexthtmlparser_p.h.
QTextCharFormat QTextHtmlParserNode::charFormat |
Definition at line 140 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes(), applyBackgroundImage(), applyForegroundImage(), QTextHtmlImporter::import(), and initializeProperties().
QList<int> QTextHtmlParserNode::children |
Definition at line 138 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlImporter::import(), and QTextHtmlStyleSelector::previousSiblingNode().
uint QTextHtmlParserNode::cssFloat |
Definition at line 142 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes(), and initializeProperties().
int QTextHtmlParserNode::cssListIndent |
Definition at line 175 of file qtexthtmlparser_p.h.
uint QTextHtmlParserNode::displayMode |
Definition at line 150 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlImporter::import(), initializeProperties(), isBlock(), and QTextHtmlParser::parseTag().
uint QTextHtmlParserNode::hasCssListIndent |
Definition at line 146 of file qtexthtmlparser_p.h.
uint QTextHtmlParserNode::hasHref |
Definition at line 151 of file qtexthtmlparser_p.h.
Referenced by initializeProperties().
uint QTextHtmlParserNode::hasLineHeightMultiplier |
Definition at line 145 of file qtexthtmlparser_p.h.
uint QTextHtmlParserNode::hasOwnLineHeightType |
Definition at line 144 of file qtexthtmlparser_p.h.
uint QTextHtmlParserNode::hasOwnListStyle |
Definition at line 143 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
QTextLength QTextHtmlParserNode::height |
Definition at line 161 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
QTextHTMLElements QTextHtmlParserNode::id |
Definition at line 139 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes(), QTextHtmlImporter::import(), QTextHtmlParser::margin(), QTextHtmlParser::newNode(), QTextHtmlParser::parseTag(), QTextHtmlParser::resolveParent(), and standardDeclarationForNode().
QString QTextHtmlParserNode::imageAlt |
Definition at line 157 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
qreal QTextHtmlParserNode::imageHeight |
Definition at line 159 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
QString QTextHtmlParserNode::imageName |
Definition at line 156 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
qreal QTextHtmlParserNode::imageWidth |
Definition at line 158 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
uint QTextHtmlParserNode::isEmptyParagraph |
Definition at line 147 of file qtexthtmlparser_p.h.
uint QTextHtmlParserNode::isRootFrame |
Definition at line 149 of file qtexthtmlparser_p.h.
uint QTextHtmlParserNode::isTextFrame |
Definition at line 148 of file qtexthtmlparser_p.h.
int QTextHtmlParserNode::listStart = 1 |
Definition at line 153 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
QTextListFormat::Style QTextHtmlParserNode::listStyle |
Definition at line 152 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes(), and initializeProperties().
int QTextHtmlParserNode::margin[4] |
Definition at line 234 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParserNode(), initializeProperties(), QTextHtmlParser::margin(), and uncollapsedMargin().
int QTextHtmlParserNode::padding[4] |
Definition at line 235 of file qtexthtmlparser_p.h.
Referenced by initializeProperties().
int QTextHtmlParserNode::parent |
Definition at line 137 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlImporter::import(), initializeProperties(), isNestedList(), QTextHtmlParser::margin(), QTextHtmlParser::newNode(), QTextHtmlStyleSelector::parentNode(), QTextHtmlParser::parseTag(), QTextHtmlStyleSelector::previousSiblingNode(), QTextHtmlParser::resolveNode(), and QTextHtmlParser::resolveParent().
qreal QTextHtmlParserNode::tableBorder |
Definition at line 162 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
qreal QTextHtmlParserNode::tableCellBorder[4] |
Definition at line 167 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParserNode().
QBrush QTextHtmlParserNode::tableCellBorderBrush[4] |
Definition at line 168 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParserNode().
QTextFrameFormat::BorderStyle QTextHtmlParserNode::tableCellBorderStyle[4] |
Definition at line 169 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParserNode().
int QTextHtmlParserNode::tableCellColSpan |
Definition at line 164 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
qreal QTextHtmlParserNode::tableCellPadding |
Definition at line 166 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
int QTextHtmlParserNode::tableCellRowSpan |
Definition at line 163 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
qreal QTextHtmlParserNode::tableCellSpacing |
Definition at line 165 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
QString QTextHtmlParserNode::tag |
Definition at line 134 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::newNode(), QTextHtmlStyleSelector::nodeNames(), and QTextHtmlParser::parseTag().
QString QTextHtmlParserNode::text |
Definition at line 135 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes(), hasOnlyWhitespace(), QTextHtmlImporter::import(), initializeProperties(), QTextHtmlParser::newNode(), QTextHtmlParser::parse(), and QTextHtmlParser::parseTag().
QString QTextHtmlParserNode::textListNumberPrefix |
Definition at line 154 of file qtexthtmlparser_p.h.
QString QTextHtmlParserNode::textListNumberSuffix |
Definition at line 155 of file qtexthtmlparser_p.h.
int QTextHtmlParserNode::userState |
Definition at line 173 of file qtexthtmlparser_p.h.
QTextLength QTextHtmlParserNode::width |
Definition at line 160 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlParser::applyAttributes().
WhiteSpaceMode QTextHtmlParserNode::wsm |
Definition at line 177 of file qtexthtmlparser_p.h.
Referenced by QTextHtmlImporter::import(), initializeProperties(), and QTextHtmlParser::parseTag().