From 9a5e4ada9c729281470d30c6d32f1e9792b756ef Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 5 Oct 2014 21:32:11 +0200 Subject: QCss: Move declaration of ValueExtractor Move it to the end of the header, since it was sitting right in the middle of AST struct definitions without being one itself. Change-Id: I017d6187324e91f2745629dbed4271064d4e59a8 Reviewed-by: Simon Hausmann Reviewed-by: Friedemann Kleint --- src/gui/text/qcssparser_p.h | 73 +++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 39 deletions(-) (limited to 'src/gui/text/qcssparser_p.h') diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h index 2e13184f07..65e9b5a0ba 100644 --- a/src/gui/text/qcssparser_p.h +++ b/src/gui/text/qcssparser_p.h @@ -555,45 +555,6 @@ struct Q_GUI_EXPORT Selector QString pseudoElement() const; }; -struct StyleRule; -struct MediaRule; -struct PageRule; -struct ImportRule; - -struct Q_GUI_EXPORT ValueExtractor -{ - ValueExtractor(const QVector &declarations, const QPalette & = QPalette()); - - bool extractFont(QFont *font, int *fontSizeAdjustment); - bool extractBackground(QBrush *, QString *, Repeat *, Qt::Alignment *, QCss::Origin *, QCss::Attachment *, - QCss::Origin *); - bool extractGeometry(int *w, int *h, int *minw, int *minh, int *maxw, int *maxh); - bool extractPosition(int *l, int *t, int *r, int *b, QCss::Origin *, Qt::Alignment *, - QCss::PositionMode *, Qt::Alignment *); - bool extractBox(int *margins, int *paddings, int *spacing = 0); - 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); - int extractStyleFeatures(); - bool extractImage(QIcon *icon, Qt::Alignment *a, QSize *size); - - int lengthValue(const Declaration &decl); - -private: - void extractFont(); - void borderValue(const Declaration &decl, int *width, QCss::BorderStyle *style, QBrush *color); - LengthData lengthValue(const Value& v); - void lengthValues(const Declaration &decl, int *m); - QSize sizeValue(const Declaration &decl); - void sizeValues(const Declaration &decl, QSize *radii); - - QVector declarations; - QFont f; - int adjustment; - int fontExtracted; - QPalette pal; -}; - struct StyleRule { StyleRule() : order(0) { } @@ -829,6 +790,40 @@ public: QString sourcePath; }; +struct Q_GUI_EXPORT ValueExtractor +{ + ValueExtractor(const QVector &declarations, const QPalette & = QPalette()); + + bool extractFont(QFont *font, int *fontSizeAdjustment); + bool extractBackground(QBrush *, QString *, Repeat *, Qt::Alignment *, QCss::Origin *, QCss::Attachment *, + QCss::Origin *); + bool extractGeometry(int *w, int *h, int *minw, int *minh, int *maxw, int *maxh); + bool extractPosition(int *l, int *t, int *r, int *b, QCss::Origin *, Qt::Alignment *, + QCss::PositionMode *, Qt::Alignment *); + bool extractBox(int *margins, int *paddings, int *spacing = 0); + 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); + int extractStyleFeatures(); + bool extractImage(QIcon *icon, Qt::Alignment *a, QSize *size); + + int lengthValue(const Declaration &decl); + +private: + void extractFont(); + void borderValue(const Declaration &decl, int *width, QCss::BorderStyle *style, QBrush *color); + LengthData lengthValue(const Value& v); + void lengthValues(const Declaration &decl, int *m); + QSize sizeValue(const Declaration &decl); + void sizeValues(const Declaration &decl, QSize *radii); + + QVector declarations; + QFont f; + int adjustment; + int fontExtracted; + QPalette pal; +}; + } // namespace QCss QT_END_NAMESPACE -- cgit v1.2.3