summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstylesheetstyle_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2012-10-18 15:55:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-19 07:50:29 +0200
commit734324c37cb9d8417aa86f76fc81dadc21be2156 (patch)
tree8f06a995a6920a100319c73989fc0e9b0f965207 /src/widgets/styles/qstylesheetstyle_p.h
parent320c4e31e124f99601399d00935362b587c77510 (diff)
QStyleSheetStyle: QObject-based style & render rules
The goal is to cut as many QWidget dependencies as possible and make stylesheets eventually work for the desktop components. Change-Id: Ib4aa47af07379fc39fd6df1961e113d03df6df35 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle_p.h')
-rw-r--r--src/widgets/styles/qstylesheetstyle_p.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/widgets/styles/qstylesheetstyle_p.h b/src/widgets/styles/qstylesheetstyle_p.h
index 93bb4441bb..f42c0e9b20 100644
--- a/src/widgets/styles/qstylesheetstyle_p.h
+++ b/src/widgets/styles/qstylesheetstyle_p.h
@@ -143,8 +143,8 @@ private:
friend class QRenderRule;
int nativeFrameWidth(const QWidget *);
- QRenderRule renderRule(const QWidget *, int, quint64 = 0) const;
- QRenderRule renderRule(const QWidget *, const QStyleOption *, int = 0) const;
+ QRenderRule renderRule(const QObject *, int, quint64 = 0) const;
+ QRenderRule renderRule(const QObject *, const QStyleOption *, int = 0) const;
QSize defaultSize(const QWidget *, QSize, const QRect&, int) const;
QRect positionRect(const QWidget *, const QRenderRule&, const QRenderRule&, int,
const QRect&, Qt::LayoutDirection) const;
@@ -157,16 +157,16 @@ private:
void unsetPalette(QWidget *);
void setProperties(QWidget *);
void setGeometry(QWidget *);
- QVector<QCss::StyleRule> styleRules(const QWidget *w) const;
- bool hasStyleRule(const QWidget *w, int part) const;
+ QVector<QCss::StyleRule> styleRules(const QObject *obj) const;
+ bool hasStyleRule(const QObject *obj, int part) const;
QHash<QStyle::SubControl, QRect> titleBarLayout(const QWidget *w, const QStyleOptionTitleBar *tb) const;
QCss::StyleSheet getDefaultStyleSheet() const;
static Qt::Alignment resolveAlignment(Qt::LayoutDirection, Qt::Alignment);
- static bool isNaturalChild(const QWidget *w);
- bool initWidget(const QWidget *w) const;
+ static bool isNaturalChild(const QObject *obj);
+ bool initObject(const QObject *obj) const;
public:
static int numinstances;
@@ -179,13 +179,13 @@ class QStyleSheetStyleCaches : public QObject
{
Q_OBJECT
public Q_SLOTS:
- void widgetDestroyed(QObject *);
+ void objectDestroyed(QObject *);
void styleDestroyed(QObject *);
public:
- QHash<const QWidget *, QVector<QCss::StyleRule> > styleRulesCache;
- QHash<const QWidget *, QHash<int, bool> > hasStyleRuleCache;
+ QHash<const QObject *, QVector<QCss::StyleRule> > styleRulesCache;
+ QHash<const QObject *, QHash<int, bool> > hasStyleRuleCache;
typedef QHash<int, QHash<quint64, QRenderRule> > QRenderRules;
- QHash<const QWidget *, QRenderRules> renderRulesCache;
+ QHash<const QObject *, QRenderRules> renderRulesCache;
QHash<const QWidget *, QPalette> customPaletteWidgets; // widgets whose palette we tampered
QHash<const void *, QCss::StyleSheet> styleSheetCache; // parsed style sheets
QSet<const QWidget *> autoFillDisabledWidgets;