summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-10-05 21:32:11 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-10-08 13:58:33 +0200
commit9a5e4ada9c729281470d30c6d32f1e9792b756ef (patch)
tree312ddff113394cbf552c2238e790234bb870c2f2
parent3be9d6d116c68405ae5b0bade624d04975a10c61 (diff)
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 <simon.hausmann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--src/gui/text/qcssparser_p.h73
1 files changed, 34 insertions, 39 deletions
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<Declaration> &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<Declaration> 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<Declaration> &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<Declaration> declarations;
+ QFont f;
+ int adjustment;
+ int fontExtracted;
+ QPalette pal;
+};
+
} // namespace QCss
QT_END_NAMESPACE