From e5dbbdc8f1054303bef88cab2446d7b9db2e3127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Sun, 24 Apr 2011 04:04:01 +0200 Subject: [PATCH] bind Plasma::Theme::styleSheet() in declarative imports --- declarativeimports/core/theme.cpp | 5 +++++ declarativeimports/core/theme_p.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/declarativeimports/core/theme.cpp b/declarativeimports/core/theme.cpp index 0735a9c89..3fe5fbc97 100644 --- a/declarativeimports/core/theme.cpp +++ b/declarativeimports/core/theme.cpp @@ -116,6 +116,11 @@ QColor ThemeProxy::viewFocusColor() const return Plasma::Theme::defaultTheme()->color(Plasma::Theme::ViewFocusColor); } +QString ThemeProxy::styleSheet() const +{ + return Plasma::Theme::defaultTheme()->styleSheet(QString()); +} + #include "theme_p.moc" diff --git a/declarativeimports/core/theme_p.h b/declarativeimports/core/theme_p.h index e2a86612c..c83c330ce 100644 --- a/declarativeimports/core/theme_p.h +++ b/declarativeimports/core/theme_p.h @@ -49,6 +49,7 @@ class ThemeProxy : public QObject Q_PROPERTY(QColor viewBackgroundColor READ viewBackgroundColor NOTIFY themeChanged) Q_PROPERTY(QColor viewHoverColor READ viewHoverColor NOTIFY themeChanged) Q_PROPERTY(QColor viewFocusColor READ viewFocusColor NOTIFY themeChanged) + Q_PROPERTY(QString styleSheet READ styleSheet NOTIFY themeChanged) public: ThemeProxy(QObject *parent = 0); @@ -72,6 +73,7 @@ public: QColor viewBackgroundColor() const; QColor viewHoverColor() const; QColor viewFocusColor() const; + QString styleSheet() const; Q_SIGNALS: void themeChanged();