diff options
Diffstat (limited to 'src/gui/text/qcssparser_p.h')
-rw-r--r-- | src/gui/text/qcssparser_p.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h index cc50fb76b1..7742271e41 100644 --- a/src/gui/text/qcssparser_p.h +++ b/src/gui/text/qcssparser_p.h @@ -19,7 +19,6 @@ #include <QtCore/QStringList> #include <QtCore/QList> #include <QtCore/QVariant> -#include <QtCore/QPair> #include <QtCore/QSize> #include <QtCore/QMultiHash> #include <QtGui/QFont> @@ -166,6 +165,11 @@ enum Property { LetterSpacing, WordSpacing, TextDecorationColor, + QtPlaceHolderTextColor, + QtAccent, + QtStrokeWidth, + QtStrokeColor, + QtForeground, NumProperties }; @@ -388,7 +392,7 @@ QT_CSS_DECLARE_TYPEINFO(BackgroundData, Q_RELOCATABLE_TYPE) struct LengthData { qreal number; - enum { None, Px, Ex, Em } unit; + enum { None, Px, Ex, Em, Percent } unit; }; QT_CSS_DECLARE_TYPEINFO(LengthData, Q_PRIMITIVE_TYPE) @@ -785,7 +789,7 @@ public: inline void skipSpace() { while (test(S)) {}; } - inline bool hasNext() const { return index < symbols.count(); } + inline bool hasNext() const { return index < symbols.size(); } inline TokenType next() { return symbols.at(index++).token; } bool next(TokenType t); bool test(TokenType t); @@ -796,7 +800,7 @@ public: QString lexemUntil(TokenType t); bool until(TokenType target, TokenType target2 = NONE); inline TokenType lookup() const { - return (index - 1) < symbols.count() ? symbols.at(index - 1).token : NONE; + return (index - 1) < symbols.size() ? symbols.at(index - 1).token : NONE; } bool testTokenAndEndsWith(TokenType t, QLatin1StringView str); @@ -823,12 +827,15 @@ struct Q_GUI_EXPORT ValueExtractor bool extractBox(int *margins, int *paddings, int *spacing = nullptr); bool extractBorder(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii); bool extractOutline(int *borders, QBrush *colors, BorderStyle *Styles, QSize *radii, int *offsets); - bool extractPalette(QBrush *fg, QBrush *sfg, QBrush *sbg, QBrush *abg); + bool extractPalette(QBrush *foreground, QBrush *selectedForeground, QBrush *selectedBackground, + QBrush *alternateBackground, QBrush *placeHolderTextForeground, + QBrush *accent); int extractStyleFeatures(); bool extractImage(QIcon *icon, Qt::Alignment *a, QSize *size); bool extractIcon(QIcon *icon, QSize *size); void lengthValues(const Declaration &decl, int *m); + QTextLength textLength(const Declaration &decl); private: void extractFont(); |