diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2012-02-29 09:18:59 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2012-02-29 09:23:14 +1000 |
commit | 98dd1781d9256f68025d2a2db408f4f5947f3214 (patch) | |
tree | dbe1424abd90014edb5546c920ca585ed62b46e3 /src/gui/text/qcssparser_p.h | |
parent | 6c1bdc1854a7700c2b3a345b95f6a2fdca84037d (diff) | |
parent | fa1b9070af66edb81b2a3735c1951f78b22bd666 (diff) |
Merge master -> api_changes
Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac.
Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
Diffstat (limited to 'src/gui/text/qcssparser_p.h')
-rw-r--r-- | src/gui/text/qcssparser_p.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h index d50b87dcd5..b19fd8326e 100644 --- a/src/gui/text/qcssparser_p.h +++ b/src/gui/text/qcssparser_p.h @@ -411,6 +411,22 @@ struct BorderData { BrushData color; }; +struct Q_GUI_EXPORT IconValue +{ + enum Mode { Normal, Disabled, Active, Selected }; // In sync with QIcon. + enum State { On, Off }; + + struct Q_GUI_EXPORT IconEntry + { + IconEntry() : mode(Normal) , state(On) {} + + Mode mode; + State state; + QString uri; + }; + + QList<IconEntry> entries; +}; // 1. StyleRule - x:hover, y:clicked > z:checked { prop1: value1; prop2: value2; } // 2. QVector<Selector> - x:hover, y:clicked z:checked @@ -455,7 +471,7 @@ struct Q_GUI_EXPORT Declaration QSize sizeValue() const; QRect rectValue() const; QString uriValue() const; -// QIcon iconValue() const; + IconValue iconValue() const; void borderImageValue(QString *image, int *cuts, TileMode *h, TileMode *v) const; }; @@ -582,7 +598,7 @@ struct Q_GUI_EXPORT ValueExtractor 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); + bool extractImage(QCss::IconValue *icon, Qt::Alignment *a, QSize *size); int lengthValue(const Declaration &decl); @@ -842,6 +858,7 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE( QCss::BackgroundData ) Q_DECLARE_METATYPE( QCss::LengthData ) Q_DECLARE_METATYPE( QCss::BorderData ) +Q_DECLARE_METATYPE( QCss::IconValue ) #endif // QT_NO_CSSPARSER |