![]() |
Qt 6.x
The Qt SDK
|
#include <qcssparser_p.h>
Public Attributes | |
QList< Symbol > | symbols |
int | index |
int | errorIndex |
bool | hasEscapeSequences |
QString | sourcePath |
Definition at line 722 of file qcssparser_p.h.
Parser::Parser | ( | ) |
Definition at line 2301 of file qcssparser.cpp.
References errorIndex, and hasEscapeSequences.
Definition at line 2296 of file qcssparser.cpp.
References init().
Symbol Parser::errorSymbol | ( | ) |
Definition at line 2374 of file qcssparser.cpp.
References QList< T >::at(), errorIndex, and symbols.
|
inline |
Definition at line 789 of file qcssparser_p.h.
Referenced by lexemUntil(), next(), parse(), parseBrushValue(), QSvgHandler::parseCSStoXMLAttrs(), parseNextOperator(), and parseTerm().
Definition at line 2308 of file qcssparser.cpp.
References QFileInfo::absolutePath(), QString::clear(), QList< T >::clear(), errorIndex, file, hasEscapeSequences, QFile::open(), QCss::Scanner::preprocess(), qWarning, QIODeviceBase::ReadOnly, QList< T >::reserve(), QCss::Scanner::scan(), sourcePath, and symbols.
Referenced by Parser(), and QSvgHandler::parseCSStoXMLAttrs().
|
inline |
Definition at line 795 of file qcssparser_p.h.
Referenced by lexemUntil(), parseAttrib(), parseBrushValue(), parseClass(), QSvgHandler::parseCSStoXMLAttrs(), parseElementName(), parseFunction(), parseHexColor(), parseImport(), parseMedium(), parseProperty(), parsePseudo(), parsePseudoPage(), parseSimpleSelector(), parseTerm(), testPrio(), testTokenAndEndsWith(), and unquotedLexem().
QString Parser::lexemUntil | ( | QCss::TokenType | t | ) |
Definition at line 2920 of file qcssparser.cpp.
References hasNext(), QCss::Symbol::lexem(), lexem(), next(), and symbol().
|
inline |
Definition at line 799 of file qcssparser_p.h.
References QCss::NONE.
Referenced by parseCombinator(), parseElementName(), parseTerm(), and unquotedLexem().
|
inline |
Definition at line 785 of file qcssparser_p.h.
References QCss::IDENT, and QCss::STAR.
Referenced by parseSimpleSelector().
|
inline |
Definition at line 790 of file qcssparser_p.h.
Referenced by lexemUntil(), next(), parse(), parseAttrib(), parseBrushValue(), parseClass(), QSvgHandler::parseCSStoXMLAttrs(), parseImport(), parseMedia(), parseNextDeclaration(), parseNextOperator(), parsePage(), parsePseudo(), parsePseudoPage(), parseRuleset(), and parseTerm().
bool Parser::next | ( | QCss::TokenType | t | ) |
Definition at line 2892 of file qcssparser.cpp.
References hasNext(), next(), and recordError().
bool Parser::parse | ( | StyleSheet * | styleSheet, |
Qt::CaseSensitivity | nameCaseSensitivity = Qt::CaseSensitive |
||
) |
Definition at line 2333 of file qcssparser.cpp.
References QCss::ATKEYWORD_SYM, QCss::StyleSheet::buildIndexes(), QCss::CDC, QCss::CDO, hasNext(), QCss::StyleSheet::importRules, QCss::StyleSheet::mediaRules, next(), QCss::StyleSheet::pageRules, parseImport(), parseMedia(), parsePage(), parseRuleset(), QCss::RBRACE, rule, QCss::S, QCss::SEMICOLON, QCss::STRING, QCss::StyleSheet::styleRules, test(), testImport(), testMedia(), testPage(), testRuleset(), testTokenAndEndsWith(), and until().
Referenced by QSvgHandler::characters(), QTextHtmlParserNode::parseStyleAttribute(), QTextHtmlParser::parseTag(), QSvgHandler::processingInstruction(), and QTextDocument::setDefaultStyleSheet().
bool Parser::parseAttrib | ( | AttributeSelector * | attr | ) |
Definition at line 2636 of file qcssparser.cpp.
References QCss::BEGINSWITH, QCss::CONTAINS, QCss::DASHMATCH, QCss::ENDSWITH, QCss::EQUAL, QCss::IDENT, QCss::INCLUDES, lexem(), QCss::AttributeSelector::MatchBeginsWith, QCss::AttributeSelector::MatchContains, QCss::AttributeSelector::MatchDashMatch, QCss::AttributeSelector::MatchEndsWith, QCss::AttributeSelector::MatchEqual, QCss::AttributeSelector::MatchIncludes, QCss::AttributeSelector::name, next(), QCss::RBRACKET, skipSpace(), QCss::STRING, test(), unquotedLexem(), QCss::AttributeSelector::value, and QCss::AttributeSelector::valueMatchCriterium.
Referenced by parseSimpleSelector().
bool Parser::parseClass | ( | QString * | name | ) |
Definition at line 2619 of file qcssparser.cpp.
References QCss::IDENT, lexem(), and next().
Referenced by parseSimpleSelector().
bool Parser::parseCombinator | ( | BasicSelector::Relation * | relation | ) |
Definition at line 2485 of file qcssparser.cpp.
References QCss::GREATER, lookup(), QCss::BasicSelector::MatchNextSelectorIfAncestor, QCss::BasicSelector::MatchNextSelectorIfDirectAdjecent, QCss::BasicSelector::MatchNextSelectorIfIndirectAdjecent, QCss::BasicSelector::MatchNextSelectorIfParent, QCss::BasicSelector::NoRelation, QCss::PLUS, prev(), QCss::S, skipSpace(), test(), and QCss::TILDE.
Referenced by parseSelector().
bool Parser::parseElementName | ( | QString * | name | ) |
Definition at line 2626 of file qcssparser.cpp.
References QCss::IDENT, lexem(), lookup(), and QCss::STAR.
Referenced by parseSimpleSelector().
Definition at line 2724 of file qcssparser.cpp.
References parseNextOperator(), parseTerm(), testTerm(), and QCss::Value::Unknown.
Definition at line 2834 of file qcssparser.cpp.
References QList< T >::append(), args, QList< T >::at(), i, index, QCss::Symbol::lexem(), lexem(), QCss::RPAREN, skipSpace(), symbols, and until().
Referenced by parseTerm(), and testAndParseUri().
bool Parser::parseHexColor | ( | QColor * | col | ) |
Definition at line 2853 of file qcssparser.cpp.
References QColor::fromString(), QColor::isValid(), lexem(), qWarning, and skipSpace().
Referenced by parseTerm().
bool Parser::parseImport | ( | ImportRule * | importRule | ) |
Definition at line 2388 of file qcssparser.cpp.
References QCss::COMMA, QCss::ImportRule::href, lexem(), QCss::ImportRule::media, next(), parseMedium(), parseNextMedium(), removeOptionalQuotes(), QCss::SEMICOLON, skipSpace(), QCss::STRING, test(), testAndParseUri(), and testMedium().
Referenced by parse().
bool Parser::parseMedia | ( | MediaRule * | mediaRule | ) |
Definition at line 2416 of file qcssparser.cpp.
References QCss::COMMA, QCss::LBRACE, QCss::MediaRule::media, next(), parseNextMedium(), parseRuleset(), QCss::RBRACE, rule, skipSpace(), QCss::MediaRule::styleRules, test(), and testRuleset().
Referenced by parse().
bool Parser::parseMedium | ( | QStringList * | media | ) |
Definition at line 2437 of file qcssparser.cpp.
References lexem(), and skipSpace().
Referenced by parseImport().
bool Parser::parseNextDeclaration | ( | Declaration * | declaration | ) |
Definition at line 2688 of file qcssparser.cpp.
References QCss::COLON, QCss::Declaration::d, next(), parseNextExpr(), parsePrio(), parseProperty(), skipSpace(), testPrio(), and testProperty().
Referenced by parsePage(), and parseRuleset().
Definition at line 774 of file qcssparser_p.h.
Referenced by parseNextDeclaration().
Definition at line 783 of file qcssparser_p.h.
References args.
|
inline |
Definition at line 765 of file qcssparser_p.h.
Referenced by parseImport(), and parseMedia().
bool Parser::parseNextOperator | ( | Value * | value | ) |
Definition at line 2474 of file qcssparser.cpp.
References QCss::COMMA, hasNext(), next(), prev(), skipSpace(), QCss::SLASH, QCss::Value::TermOperatorComma, and QCss::Value::TermOperatorSlash.
Referenced by parseExpr().
|
inline |
Definition at line 757 of file qcssparser_p.h.
Referenced by parseRuleset().
|
inline |
Definition at line 759 of file qcssparser_p.h.
bool Parser::parsePage | ( | PageRule * | pageRule | ) |
Definition at line 2444 of file qcssparser.cpp.
References QCss::PageRule::declarations, QCss::Declaration::isEmpty(), QCss::LBRACE, next(), parseNextDeclaration(), parsePseudoPage(), QCss::RBRACE, QCss::PageRule::selector, QCss::SEMICOLON, skipSpace(), test(), and testPseudoPage().
Referenced by parse().
bool Parser::parsePrio | ( | Declaration * | declaration | ) |
Definition at line 2717 of file qcssparser.cpp.
References QCss::Declaration::d, and skipSpace().
Referenced by parseNextDeclaration().
bool Parser::parseProperty | ( | Declaration * | decl | ) |
Definition at line 2505 of file qcssparser.cpp.
References QCss::Declaration::d, findKnownValue(), isInheritable(), lexem(), QCss::NumProperties, properties, and skipSpace().
Referenced by parseNextDeclaration().
bool Parser::parsePseudo | ( | Pseudo * | pseudo | ) |
Definition at line 2668 of file qcssparser.cpp.
References QString::chop(), QCss::COLON, QCss::EXCLAMATION_SYM, findKnownValue(), QCss::Pseudo::function, QCss::FUNCTION, QCss::IDENT, lexem(), QCss::Pseudo::name, QCss::Pseudo::negated, next(), QCss::NumPseudos, pseudos, QCss::RPAREN, skipSpace(), test(), QCss::Pseudo::type, and void.
Referenced by parseSimpleSelector().
bool Parser::parsePseudoPage | ( | QString * | selector | ) |
Definition at line 2467 of file qcssparser.cpp.
References QCss::IDENT, lexem(), next(), and selector.
Referenced by parsePage().
bool Parser::parseRuleset | ( | StyleRule * | styleRule | ) |
Definition at line 2514 of file qcssparser.cpp.
References QCss::COMMA, QCss::StyleRule::declarations, index, QCss::Declaration::isEmpty(), QCss::LBRACE, next(), parseNextDeclaration(), parseNextSelector(), parseSelector(), QCss::RBRACE, QCss::StyleRule::selectors, QCss::SEMICOLON, skipSpace(), test(), and until().
Referenced by parse(), and parseMedia().
bool Parser::parseSelector | ( | Selector * | sel | ) |
Definition at line 2560 of file qcssparser.cpp.
References QCss::Selector::basicSelectors, parseCombinator(), parseSimpleSelector(), QCss::BasicSelector::relationToNext, testCombinator(), and testSimpleSelector().
Referenced by parseRuleset().
bool Parser::parseSimpleSelector | ( | BasicSelector * | basicSel | ) |
Definition at line 2577 of file qcssparser.cpp.
References QCss::BasicSelector::attributeSelectors, QCss::BasicSelector::elementName, QCss::HASH, QCss::BasicSelector::ids, lexem(), lookupElementName(), QCss::AttributeSelector::MatchIncludes, parseAttrib(), parseClass(), parseElementName(), parsePseudo(), prev(), QCss::BasicSelector::pseudos, QString::remove(), test(), testAttrib(), testClass(), and testPseudo().
Referenced by parseSelector().
bool Parser::parseTerm | ( | Value * | value | ) |
Definition at line 2758 of file qcssparser.cpp.
References args, QString::chop(), QCss::Value::Color, findKnownValue(), QCss::Value::Function, hasNext(), QCss::IDENT, QCss::Value::Identifier, QString::isEmpty(), isRelative(), QCss::Value::KnownIdentifier, QCss::Value::Length, QCss::LENGTH, lexem(), lookup(), QCss::MINUS, next(), QCss::Value::Number, QCss::NUMBER, QCss::NumKnownValues, parseFunction(), parseHexColor(), QCss::Value::Percentage, QCss::PERCENTAGE, QCss::PLUS, QList< T >::prepend(), prev(), recordError(), QString::remove(), removeOptionalQuotes(), skipSpace(), sourcePath, str, QCss::Value::String, QCss::STRING, testFunction(), testHexColor(), and QCss::Value::Uri.
Referenced by parseBrushValue(), and parseExpr().
|
inline |
Definition at line 793 of file qcssparser_p.h.
Referenced by parseCombinator(), parseNextOperator(), parseSimpleSelector(), parseTerm(), and testTokenAndEndsWith().
|
inline |
Definition at line 805 of file qcssparser_p.h.
Referenced by next(), and parseTerm().
|
inline |
Definition at line 787 of file qcssparser_p.h.
References QCss::S.
Referenced by parseAttrib(), parseBrushValue(), parseCombinator(), QSvgHandler::parseCSStoXMLAttrs(), parseFunction(), parseHexColor(), parseImport(), parseMedia(), parseMedium(), parseNextDeclaration(), parseNextOperator(), parsePage(), parsePrio(), parseProperty(), parsePseudo(), parseRuleset(), parseTerm(), and testPrio().
|
inline |
Definition at line 794 of file qcssparser_p.h.
Referenced by lexemUntil(), and QSvgHandler::parseCSStoXMLAttrs().
bool Parser::test | ( | QCss::TokenType | t | ) |
Definition at line 2899 of file qcssparser.cpp.
References QList< T >::at(), index, QList< T >::size(), symbols, and QCss::Symbol::token.
Referenced by parse(), parseAttrib(), parseBrushValue(), parseCombinator(), QSvgHandler::parseCSStoXMLAttrs(), parseImport(), parseMedia(), parsePage(), parsePseudo(), parseRuleset(), parseSimpleSelector(), testPrio(), testSimpleSelector(), testTerm(), and testTokenAndEndsWith().
bool Parser::testAndParseUri | ( | QString * | uri | ) |
Definition at line 2864 of file qcssparser.cpp.
References args, Qt::CaseInsensitive, index, parseFunction(), removeOptionalQuotes(), and testFunction().
Referenced by parseImport().
|
inline |
Definition at line 762 of file qcssparser_p.h.
References QCss::LBRACKET.
Referenced by parseSimpleSelector(), and testSimpleSelector().
|
inline |
Definition at line 761 of file qcssparser_p.h.
References QCss::DOT.
Referenced by parseSimpleSelector(), and testSimpleSelector().
|
inline |
Definition at line 770 of file qcssparser_p.h.
References QCss::GREATER, QCss::PLUS, QCss::S, and QCss::TILDE.
Referenced by parseSelector().
|
inline |
Definition at line 760 of file qcssparser_p.h.
References QCss::IDENT, and QCss::STAR.
Referenced by testSimpleSelector().
|
inline |
Definition at line 773 of file qcssparser_p.h.
|
inline |
Definition at line 782 of file qcssparser_p.h.
References QCss::FUNCTION.
Referenced by parseTerm(), testAndParseUri(), and testTerm().
|
inline |
Definition at line 781 of file qcssparser_p.h.
References QCss::HASH.
Referenced by parseTerm(), and testTerm().
|
inline |
Definition at line 767 of file qcssparser_p.h.
References QCss::ATKEYWORD_SYM.
Referenced by parse().
|
inline |
Definition at line 768 of file qcssparser_p.h.
References QCss::ATKEYWORD_SYM.
Referenced by parse().
|
inline |
Definition at line 764 of file qcssparser_p.h.
References QCss::IDENT.
Referenced by parseImport().
|
inline |
Definition at line 769 of file qcssparser_p.h.
References QCss::ATKEYWORD_SYM.
Referenced by parse().
bool Parser::testPrio | ( | ) |
Definition at line 2701 of file qcssparser.cpp.
References Qt::CaseInsensitive, compare(), QCss::EXCLAMATION_SYM, QCss::IDENT, index, lexem(), skipSpace(), and test().
Referenced by parseNextDeclaration().
|
inline |
Definition at line 771 of file qcssparser_p.h.
References QCss::IDENT.
Referenced by parseNextDeclaration().
|
inline |
Definition at line 763 of file qcssparser_p.h.
References QCss::COLON.
Referenced by parseSimpleSelector(), and testSimpleSelector().
|
inline |
Definition at line 766 of file qcssparser_p.h.
References QCss::COLON.
Referenced by parsePage().
|
inline |
Definition at line 755 of file qcssparser_p.h.
Referenced by parse(), and parseMedia().
|
inline |
Definition at line 756 of file qcssparser_p.h.
bool Parser::testSimpleSelector | ( | ) |
Definition at line 2883 of file qcssparser.cpp.
References QCss::HASH, test(), testAttrib(), testClass(), testElementName(), and testPseudo().
Referenced by parseSelector().
bool Parser::testTerm | ( | ) |
Definition at line 2746 of file qcssparser.cpp.
References QCss::IDENT, QCss::LENGTH, QCss::MINUS, QCss::NUMBER, QCss::PERCENTAGE, QCss::PLUS, QCss::STRING, test(), testFunction(), and testHexColor().
Referenced by parseExpr().
bool Parser::testTokenAndEndsWith | ( | QCss::TokenType | t, |
QLatin1StringView | str | ||
) |
Definition at line 2968 of file qcssparser.cpp.
References Qt::CaseInsensitive, lexem(), prev(), str, and test().
Referenced by parse().
QString Parser::unquotedLexem | ( | ) | const |
Definition at line 2910 of file qcssparser.cpp.
References lexem(), lookup(), and QCss::STRING.
Referenced by parseAttrib().
bool Parser::until | ( | QCss::TokenType | target, |
QCss::TokenType | target2 = NONE |
||
) |
Definition at line 2928 of file qcssparser.cpp.
References QList< T >::at(), QCss::FUNCTION, index, QCss::LBRACE, QCss::LBRACKET, QCss::LPAREN, QCss::NONE, QCss::RBRACE, QCss::RBRACKET, QCss::RPAREN, QList< T >::size(), symbols, and QCss::Symbol::token.
Referenced by parse(), parseFunction(), and parseRuleset().
int QCss::Parser::errorIndex |
Definition at line 809 of file qcssparser_p.h.
Referenced by Parser(), errorSymbol(), and init().
bool QCss::Parser::hasEscapeSequences |
Definition at line 810 of file qcssparser_p.h.
Referenced by Parser(), init(), and QSvgHandler::parseCSStoXMLAttrs().
int QCss::Parser::index |
Definition at line 808 of file qcssparser_p.h.
Referenced by QSvgHandler::parseCSStoXMLAttrs(), parseFunction(), parseRuleset(), test(), testAndParseUri(), testPrio(), and until().
QString QCss::Parser::sourcePath |
Definition at line 811 of file qcssparser_p.h.
Referenced by init(), and parseTerm().
Definition at line 807 of file qcssparser_p.h.
Referenced by errorSymbol(), init(), QSvgHandler::parseCSStoXMLAttrs(), parseFunction(), test(), and until().