56 #include "private/qfunctions_p.h" 58 #ifndef QT_NO_TEXTHTMLPARSER 63 #define MAX_ENTITY 258 83 {
"Epsilon", 0x0395 },
100 {
"Oacute", 0x00d3 },
102 {
"Ograve", 0x00d2 },
104 {
"Omicron", 0x039f },
105 {
"Oslash", 0x00d8 },
106 {
"Otilde", 0x00d5 },
114 {
"Scaron", 0x0160 },
119 {
"Uacute", 0x00da },
121 {
"Ugrave", 0x00d9 },
122 {
"Upsilon", 0x03a5 },
125 {
"Yacute", 0x00dd },
128 {
"aacute", 0x00e1 },
132 {
"agrave", 0x00e0 },
133 {
"alefsym", 0x2135 },
141 {
"atilde", 0x00e3 },
145 {
"brvbar", 0x00a6 },
148 {
"ccedil", 0x00e7 },
158 {
"curren", 0x00a4 },
160 {
"dagger", 0x2020 },
165 {
"divide", 0x00f7 },
166 {
"eacute", 0x00e9 },
168 {
"egrave", 0x00e8 },
172 {
"epsilon", 0x03b5 },
180 {
"forall", 0x2200 },
181 {
"frac12", 0x00bd },
182 {
"frac14", 0x00bc },
183 {
"frac34", 0x00be },
190 {
"hearts", 0x2665 },
191 {
"hellip", 0x2026 },
192 {
"iacute", 0x00ed },
195 {
"igrave", 0x00ec },
200 {
"iquest", 0x00bf },
205 {
"lambda", 0x03bb },
212 {
"lfloor", 0x230a },
213 {
"lowast", 0x2217 },
216 {
"lsaquo", 0x2039 },
222 {
"middot", 0x00b7 },
233 {
"ntilde", 0x00f1 },
235 {
"oacute", 0x00f3 },
238 {
"ograve", 0x00f2 },
241 {
"omicron", 0x03bf },
246 {
"oslash", 0x00f8 },
247 {
"otilde", 0x00f5 },
248 {
"otimes", 0x2297 },
252 {
"percnt", 0x0025 },
253 {
"permil", 0x2030 },
258 {
"plusmn", 0x00b1 },
274 {
"rfloor", 0x230b },
277 {
"rsaquo", 0x203a },
280 {
"scaron", 0x0161 },
285 {
"sigmaf", 0x03c2 },
287 {
"spades", 0x2660 },
298 {
"there4", 0x2234 },
300 {
"thetasym", 0x03d1 },
301 {
"thinsp", 0x2009 },
307 {
"uacute", 0x00fa },
310 {
"ugrave", 0x00f9 },
313 {
"upsilon", 0x03c5 },
315 {
"weierp", 0x2118 },
317 {
"yacute", 0x00fd },
384 {
"address",
Html_address, QTextHtmlElement::DisplayInline },
385 {
"b",
Html_b, QTextHtmlElement::DisplayInline },
386 {
"big",
Html_big, QTextHtmlElement::DisplayInline },
388 {
"body",
Html_body, QTextHtmlElement::DisplayBlock },
389 {
"br",
Html_br, QTextHtmlElement::DisplayInline },
390 {
"caption",
Html_caption, QTextHtmlElement::DisplayBlock },
391 {
"center",
Html_center, QTextHtmlElement::DisplayBlock },
392 {
"cite",
Html_cite, QTextHtmlElement::DisplayInline },
393 {
"code",
Html_code, QTextHtmlElement::DisplayInline },
394 {
"dd",
Html_dd, QTextHtmlElement::DisplayBlock },
395 {
"dfn",
Html_dfn, QTextHtmlElement::DisplayInline },
396 {
"div",
Html_div, QTextHtmlElement::DisplayBlock },
397 {
"dl",
Html_dl, QTextHtmlElement::DisplayBlock },
398 {
"dt",
Html_dt, QTextHtmlElement::DisplayBlock },
399 {
"em",
Html_em, QTextHtmlElement::DisplayInline },
400 {
"font",
Html_font, QTextHtmlElement::DisplayInline },
401 {
"h1",
Html_h1, QTextHtmlElement::DisplayBlock },
402 {
"h2",
Html_h2, QTextHtmlElement::DisplayBlock },
403 {
"h3",
Html_h3, QTextHtmlElement::DisplayBlock },
404 {
"h4",
Html_h4, QTextHtmlElement::DisplayBlock },
405 {
"h5",
Html_h5, QTextHtmlElement::DisplayBlock },
406 {
"h6",
Html_h6, QTextHtmlElement::DisplayBlock },
408 {
"hr",
Html_hr, QTextHtmlElement::DisplayBlock },
409 {
"html",
Html_html, QTextHtmlElement::DisplayInline },
410 {
"i",
Html_i, QTextHtmlElement::DisplayInline },
411 {
"img",
Html_img, QTextHtmlElement::DisplayInline },
412 {
"kbd",
Html_kbd, QTextHtmlElement::DisplayInline },
413 {
"li",
Html_li, QTextHtmlElement::DisplayBlock },
414 {
"link",
Html_link, QTextHtmlElement::DisplayNone },
415 {
"meta",
Html_meta, QTextHtmlElement::DisplayNone },
416 {
"nobr",
Html_nobr, QTextHtmlElement::DisplayInline },
417 {
"ol",
Html_ol, QTextHtmlElement::DisplayBlock },
418 {
"p",
Html_p, QTextHtmlElement::DisplayBlock },
419 {
"pre",
Html_pre, QTextHtmlElement::DisplayBlock },
420 {
"qt",
Html_body , QTextHtmlElement::DisplayBlock },
421 {
"s",
Html_s, QTextHtmlElement::DisplayInline },
422 {
"samp",
Html_samp, QTextHtmlElement::DisplayInline },
423 {
"script",
Html_script, QTextHtmlElement::DisplayNone },
424 {
"small",
Html_small, QTextHtmlElement::DisplayInline },
425 {
"span",
Html_span, QTextHtmlElement::DisplayInline },
426 {
"strong",
Html_strong, QTextHtmlElement::DisplayInline },
427 {
"style",
Html_style, QTextHtmlElement::DisplayNone },
428 {
"sub",
Html_sub, QTextHtmlElement::DisplayInline },
429 {
"sup",
Html_sup, QTextHtmlElement::DisplayInline },
431 {
"tbody",
Html_tbody, QTextHtmlElement::DisplayTable },
432 {
"td",
Html_td, QTextHtmlElement::DisplayBlock },
433 {
"tfoot",
Html_tfoot, QTextHtmlElement::DisplayTable },
434 {
"th",
Html_th, QTextHtmlElement::DisplayBlock },
435 {
"thead",
Html_thead, QTextHtmlElement::DisplayTable },
436 {
"title",
Html_title, QTextHtmlElement::DisplayNone },
437 {
"tr",
Html_tr, QTextHtmlElement::DisplayTable },
438 {
"tt",
Html_tt, QTextHtmlElement::DisplayInline },
439 {
"u",
Html_u, QTextHtmlElement::DisplayInline },
440 {
"ul",
Html_ul, QTextHtmlElement::DisplayBlock },
441 {
"var",
Html_var, QTextHtmlElement::DisplayInline },
484 hasCssListIndent(false), isEmptyParagraph(false), isTextFrame(false), isRootFrame(false),
486 listStyle(
QTextListFormat::ListStyleUndefined), imageWidth(-1), imageHeight(-1), tableBorder(0),
487 tableCellRowSpan(1), tableCellColSpan(1), tableCellSpacing(2), tableCellPadding(0),
499 for (
int i = 0; i < count(); ++i) {
512 bool reuseLastNode =
true;
514 if (nodes.count() == 1) {
515 reuseLastNode =
false;
519 reuseLastNode =
true;
524 int lastSibling = count() - 2;
526 &&
at(lastSibling).parent != lastNode->
parent 528 lastSibling =
at(lastSibling).parent;
532 reuseLastNode =
false;
534 reuseLastNode =
true;
538 reuseLastNode =
false;
545 reuseLastNode =
false;
554 nodes.resize(nodes.size() + 1);
555 newNode = &nodes.last();
569 textEditMode =
false;
570 resourceProvider = _resourceProvider;
630 nodes.last().text += parseEntity();
632 nodes.last().text +=
c;
644 parseExclamationTag();
655 #ifndef QT_NO_CSSPARSER 660 inlineStyleSheets.append(sheet);
661 resolveStyleSheetImports(sheet);
687 if (pos < len && txt.at(pos).isSpace())
693 node = resolveParent();
696 const int nodeIndex = nodes.count() - 1;
697 #ifndef QT_NO_CSSPARSER 703 bool tagClosed =
false;
704 while (pos < len && txt.at(pos) !=
QLatin1Char(
'>')) {
717 if (pos < len - 1 && txt.at(pos) ==
QLatin1Char(
'\n'))
741 &&
at(p - 1).tag == tag
745 while (p &&
at(p).tag != tag)
762 nodes[last()].text.chop(1);
777 pos = (end >= 0 ? end + 3 : len);
795 if (c.
isSpace() || pos - recover > 9) {
848 word += parseEntity();
873 word += parseEntity();
907 row->
parent = nodes.count() - 3;
911 p = nodes.count() - 2;
912 node = &nodes.last();
927 p = nodes.count() - 2;
928 node = &nodes.last();
960 if (node->
id ==
at(p).
id 967 ||
at(p).mayNotHaveChildren()
975 nodes[p].children.append(nodes.count() - 1);
1041 for (
int i = 0; i < 4; ++i)
1192 #ifndef QT_NO_CSSPARSER 1195 for (
int i = 0; i < cssValues.
count(); ++i) {
1197 switch (static_cast<QCss::KnownValue>(cssValues.
at(i).
variant.
toInt())) {
1220 for (
int i = 0; i < declarations.
count(); ++i) {
1222 if (decl.
d->values.isEmpty())
continue;
1226 identifier = static_cast<QCss::KnownValue>(decl.
d->values.first().variant.toInt());
1228 switch (decl.
d->propertyId) {
1240 switch (identifier) {
1251 if (decl.
realValue(&lineHeight,
"px")) {
1255 QString value = decl.
d->values.first().toString();
1285 userState = decl.
d->values.first().variant.toInt();
1288 switch (identifier) {
1297 switch (identifier) {
1307 switch (identifier) {
1314 switch (identifier) {
1321 switch (identifier) {
1347 int adjustment = -255;
1377 if (adjustment >= -1)
1381 Qt::Alignment ignoredAlignment;
1387 extractor.
extractBackground(&bgBrush, &bgImage, &ignoredRepeat, &ignoredAlignment,
1388 &ignoredOrigin, &ignoredAttachment, &ignoredClip);
1390 if (!bgImage.
isEmpty() && resourceProvider) {
1398 #endif // QT_NO_CSSPARSER 1402 if (!url.
isEmpty() && resourceProvider) {
1442 int val = value.
toInt(&ok);
1476 #ifndef QT_NO_CSSPARSER 1500 if (key.
size() == 0)
1506 value = parseWord();
1508 if (value.
size() == 0)
1510 attrs << key << value;
1519 bool seenQt3Richtext =
false;
1523 if (attributes.
count() % 2 == 1)
1528 for (
int i = 0; i < attributes.
count(); i += 2) {
1536 int n = value.
toInt();
1644 seenQt3Richtext =
true;
1649 && seenQt3Richtext) {
1651 textEditMode =
true;
1669 #ifndef QT_NO_CSSPARSER 1674 bool alignmentSet =
true;
1685 alignmentSet =
false;
1722 #ifndef QT_NO_CSSPARSER 1724 importStyleSheet(linkHref);
1728 #ifndef QT_NO_CSSPARSER 1737 virtual bool hasAttributes(
NodePtr node)
const;
1738 virtual bool isNullNode(
NodePtr node)
const;
1742 virtual void freeNode(
NodePtr node)
const;
1753 #endif // QT_NO_CSSPARSER 1759 idx = attributes.
indexOf(name, idx + 1);
1760 }
while (idx != -1 && (idx % 2 == 1));
1764 #ifndef QT_NO_CSSPARSER 1772 return attributes.
at(idx + 1);
1783 return node.
id == 0;
1791 parent.
id = parser->at(node.
id).parent;
1807 int parent = parser->at(node.
id).parent;
1810 const int childIdx = parser->at(parent).children.indexOf(node.
id);
1813 sibling.
id = parser->at(parent).children.at(childIdx - 1);
1823 for (
int i = 0; i < sheet.
importRules.count(); ++i) {
1827 importStyleSheet(rule.
href);
1833 if (!resourceProvider)
1835 for (
int i = 0; i < externalStyleSheets.count(); ++i)
1836 if (externalStyleSheets.at(i).url == href)
1852 resolveStyleSheetImports(sheet);
1863 selector.
styleSheets.resize((resourceProvider ? 1 : 0)
1864 + externalStyleSheets.count()
1865 + inlineStyleSheets.count());
1866 if (resourceProvider)
1867 selector.
styleSheets[idx++] = resourceProvider->docHandle()->parsedDefaultStyleSheet;
1869 for (
int i = 0; i < externalStyleSheets.count(); ++i, ++idx)
1870 selector.
styleSheets[idx] = externalStyleSheets.at(i).sheet;
1872 for (
int i = 0; i < inlineStyleSheets.count(); ++i, ++idx)
1873 selector.
styleSheets[idx] = inlineStyleSheets.at(i);
1880 const char *extraPseudo = 0;
1881 if (nodes.at(node).id ==
Html_a && nodes.at(node).hasHref)
1882 extraPseudo =
"link";
1899 #endif // QT_NO_CSSPARSER 1901 #endif // QT_NO_TEXTHTMLPARSER The QVariant class acts like a union for the most common Qt data types.
The QColor class provides colors based on RGB, HSV or CMYK values.
static QString quoteNewline(const QString &s)
QColor colorValue(const QPalette &=QPalette()) const
bool mayNotHaveChildren() const
void setFontItalic(bool italic)
If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic...
The QTextListFormat class provides formatting information for lists in a QTextDocument.
void setNamedColor(const QString &name)
Sets the RGB value of this QColor to name, which may be in one of these formats:
static const ushort windowsLatin1ExtendedCharacters[0xA0 - 0x80]
QTextFrameFormat::BorderStyle borderStyle
static const struct QTextHtmlEntity entities[MAX_ENTITY]
#define QT_END_NAMESPACE
This macro expands to.
void setLineHeight(qreal height, int heightType)
Sets the line height for the paragraph to the value given by height which is dependent on heightType ...
const QChar at(int i) const
Returns the character at the given index position in the string.
void setToolTip(const QString &tip)
Sets the tool tip for a fragment of text to the given text.
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
void setFontStrikeOut(bool strikeOut)
If strikeOut is true, sets the text format's font with strike-out enabled (with a horizontal line thr...
virtual NodePtr parentNode(NodePtr node) const
bool isNull() const
Returns true if the character is the Unicode character 0x0000 ('\0'); otherwise returns false...
void parseExclamationTag()
int count(const T &t) const
Returns the number of occurrences of value in the vector.
bool underline() const
Returns true if underline has been set; otherwise returns false.
void setProperty(int propertyId, const QVariant &value)
Sets the property specified by the propertyId to the given value.
QString & replace(int i, int len, QChar after)
int pixelSize() const
Returns the pixel size of the font if it was set with setPixelSize().
#define at(className, varName)
void setListStyle(const QVector< QCss::Value > &cssValues)
QTextHtmlStyleSelector(const QTextHtmlParser *parser)
static int findAttribute(const QStringList &attributes, const QString &name)
void chop(int n)
Removes n characters from the end of the string.
PageBreakFlags pageBreakPolicy() const
Returns the currently set page break policy for the paragraph.
int length() const
Returns the number of characters in this string.
QString & prepend(QChar c)
Style style() const
Returns the style of the font.
virtual NodePtr duplicateNode(NodePtr node) const
void setFontOverline(bool overline)
If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non...
void setVerticalAlignment(VerticalAlignment alignment)
Sets the vertical alignment used for the characters with this format to the alignment specified...
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
Capitalization capitalization() const
Returns the current capitalization type of the font.
QTextHtmlParserNode * newNode(int parent)
const QTextHtmlParserNode & at(int i) const
QString textListNumberPrefix
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
Q_OUTOFLINE_TEMPLATE RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
void setTextIndent(qreal aindent)
Sets the indent for the first line in the block.
void setFontFixedPitch(bool fixedPitch)
If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch fon...
int count(const T &t) const
Returns the number of occurrences of value in the list.
static QPalette palette()
Returns the application palette.
void setBackground(const QBrush &brush)
Sets the brush use to paint the document's background to the brush specified.
The QString class provides a Unicode character string.
bool hasOnlyWhitespace() const
virtual QString attribute(NodePtr node, const QString &name) const
Qt::Alignment alignment() const
Returns the paragraph's alignment.
void parseStyleAttribute(const QString &value, const QTextDocument *resourceProvider)
The QChar class provides a 16-bit Unicode character.
QTextListFormat::Style listStyle
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QS...
const QTextHtmlParser * parser
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
bool isSpace() const
Returns true if the character is a separator character (Separator_* categories); otherwise returns fa...
Qt::LayoutDirection layoutDirection() const
Returns the document's layout direction.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
static ushort highSurrogate(uint ucs4)
Returns the high surrogate value of a ucs4 code point.
void setFontWeight(int weight)
Sets the text format's font weight to weight.
void setAnchorName(const QString &name)
This function is deprecated.
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
static ushort lowSurrogate(uint ucs4)
Returns the low surrogate value of a ucs4 code point.
QExplicitlySharedDataPointer< DeclarationData > d
Q_CORE_EXPORT void qDebug(const char *,...)
bool hasProperty(int propertyId) const
Returns true if the text format has a property with the given propertyId; otherwise returns false...
QFont resolve(const QFont &) const
Returns a new QFont that has attributes copied from other that have not been previously set on this f...
static QThread * currentThread()
Returns a pointer to a QThread which manages the currently executing thread.
QTextCharFormat charFormat
QVector< QCss::Declaration > declarationsForNode(int node) const
int indexOf(const QRegExp &rx, int from=0) const
Returns the index position of the first exact match of rx in the list, searching forward from index p...
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool requiresSurrogates(uint ucs4)
Returns true if the UCS-4-encoded character specified by ucs4 can be split into the high and low part...
static bool setIntAttribute(int *destination, const QString &value)
int margin(int i, int mar) const
bool overline() const
Returns true if overline has been set; otherwise returns false.
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
void setFontCapitalization(QFont::Capitalization capitalization)
Sets the capitalization of the text that apppears in this font to capitalization. ...
int size() const
Returns the number of characters in this string.
The QTextFormat class provides formatting information for a QTextDocument.
int bottomMargin(int i) const
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &entityStr, const QTextHtmlEntity &entity)
void initializeProperties(const QTextHtmlParserNode *parent, const QTextHtmlParser *parser)
QStringList parseAttributes()
static int lookupElement(const QString &element)
bool nodeIsChildOf(int i, QTextHTMLElements id) const
#define Q_STATIC_GLOBAL_OPERATOR
const T & at(int i) const
Returns the item at index position i in the list.
void setPageBreakPolicy(PageBreakFlags flags)
Sets the page break policy for the paragraph to policy.
The QStringList class provides a list of strings.
void importStyleSheet(const QString &href)
QTextBlockFormat blockFormat
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
void append(const T &t)
Inserts value at the end of the vector.
QVector< StyleRule > styleRules
Q_CORE_EXPORT void qWarning(const char *,...)
bool intValue(int *i, const char *unit=0) const
static QVector< Declaration > declarations(const QVector< StyleRule > &styleRules, const QString &part, quint64 pseudoClass=PseudoClass_Unspecified)
The QImage class provides a hardware-independent image representation that allows direct access to th...
int topMargin(int i) const
void setFontPointSize(qreal size)
Sets the text format's font size.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
void applyCssDeclarations(const QVector< QCss::Declaration > &declarations, const QTextDocument *resourceProvider)
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
QVector< StyleSheet > styleSheets
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
void clear()
Removes all items from the list.
Qt::BrushStyle style() const
Returns the brush style.
bool loadFromData(const uchar *buf, uint len, const char *format=0, Qt::ImageConversionFlags flags=Qt::AutoColor)
Loads a pixmap from the len first bytes of the given binary data.
const T & at(int i) const
Returns the item at index position i in the vector.
static QChar resolveEntity(const QString &entity)
const char * constData() const
Returns a pointer to the data stored in the byte array.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QString textListNumberSuffix
void setAlignment(Qt::Alignment alignment)
Sets the paragraph's alignment.
QTextHtmlParserNode * resolveParent()
QString & append(QChar c)
int compare(const QString &s) const
void setAnchorHref(const QString &value)
Sets the hypertext link for the text format to the given value.
The QFont class specifies a font used for drawing text.
void clear()
Clears the contents of the string and makes it empty.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
QString family() const
Returns the requested font family name, i.e.
Type type() const
Returns the storage type of the value stored in the variant.
void applyBackgroundImage(const QString &url, const QTextDocument *resourceProvider)
QString toLower() const Q_REQUIRED_RESULT
Returns a lowercase copy of the string.
The QTextFrameFormat class provides formatting information for frames in a QTextDocument.
double toDouble(bool *ok=0) const
Returns the string converted to a double value.
The QTextLength class encapsulates the different types of length used in a QTextDocument.
static const QTextHtmlElement * lookupElementHelper(const QString &element)
void setFontFamily(const QString &family)
Sets the text format's font family.
uint toUInt(bool *ok=0, int base=10) const
Returns the string converted to an unsigned int using base base, which is 10 by default and must be b...
if(void) toggleToolbarShown
int weight() const
Returns the weight of the font which is one of the enumerated values from QFont::Weight.
void setIndent(int indent)
Sets the paragraph's indentation.
T qvariant_cast(const QVariant &)
QVector< Declaration > declarationsForNode(NodePtr node, const char *extraPseudo=0)
enum QTextHtmlElement::DisplayMode displayMode
void resolveStyleSheetImports(const QCss::StyleSheet &sheet)
The QPixmap class is an off-screen image representation that can be used as a paint device...
static const QTextHtmlElement elements[Html_NumElements]
void setAnchor(bool anchor)
If anchor is true, text with this format represents an anchor, and is formatted in the appropriate wa...
The QTextDocument class holds formatted text that can be viewed and edited using a QTextEdit...
void setForeground(const QBrush &brush)
Sets the foreground brush to the specified brush.
bool realValue(qreal *r, const char *unit=0) const
int pointSize() const
Returns the point size of the font.
bool parse(StyleSheet *styleSheet, Qt::CaseSensitivity nameCaseSensitivity=Qt::CaseSensitive)
virtual bool hasAttributes(NodePtr node) const
void clearProperty(int propertyId)
Clears the value of the property given by propertyId.
static bool setFloatAttribute(qreal *destination, const QString &value)
bool isValid() const
Returns true if the color is valid; otherwise returns false.
QVariant resource(int type, const QUrl &name) const
Returns data of the specified type from the resource with the given name.
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
bool strikeOut() const
Returns true if strikeout has been set; otherwise returns false.
bool isNestedList(const QTextHtmlParser *parser) const
static const KeyPair *const end
void setLayoutDirection(Qt::LayoutDirection direction)
Sets the document's layout direction to the specified direction.
void setUnderlineStyle(UnderlineStyle style)
Sets the style of underlining the text to style.
#define qPrintable(string)
virtual bool isNullNode(NodePtr node) const
void applyAttributes(const QStringList &attributes)
QChar toLower() const
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the ch...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
bool allowedInContext(int parentId) const
virtual void freeNode(NodePtr node) const
BorderStyle styleValue() const
virtual QStringList nodeNames(NodePtr node) const
QVector< ImportRule > importRules
bool loadFromData(const uchar *buf, int len, const char *format=0)
Loads an image from the first len bytes of the given binary data.
bool isNotSelfNesting() const
virtual NodePtr previousSiblingNode(NodePtr node) const
static void setWidthAttribute(QTextLength *width, QString value)