From eba1a79b5702b2680cf38ba70cc7f267d7258b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Sun, 12 Jan 2014 19:17:37 +0100 Subject: [PATCH] themeName, useGlobalSettings and wallpaperPath move into Plasma::Theme --- src/declarativeimports/core/theme.cpp | 17 ----------------- src/declarativeimports/core/theme.h | 4 ---- src/plasma/theme.h | 5 +++++ 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/declarativeimports/core/theme.cpp b/src/declarativeimports/core/theme.cpp index 0033f0465..8ae726e53 100644 --- a/src/declarativeimports/core/theme.cpp +++ b/src/declarativeimports/core/theme.cpp @@ -72,11 +72,6 @@ void ThemeProxy::updateSpacing() m_largeSpacing = _s; } -QString ThemeProxy::themeName() const -{ - return Plasma::Theme::themeName(); -} - QFont ThemeProxy::defaultFont() const { return QApplication::font(); @@ -102,16 +97,6 @@ int ThemeProxy::largeSpacing() const return m_largeSpacing; } -bool ThemeProxy::useGlobalSettings() const -{ - return Plasma::Theme::useGlobalSettings(); -} - -QString ThemeProxy::wallpaperPath() const -{ - return Plasma::Theme::wallpaperPath(); -} - QString ThemeProxy::wallpaperPathForSize(int width, int height) const { return Plasma::Theme::wallpaperPath(QSize(width, height)); @@ -226,7 +211,6 @@ void ThemeProxy::iconLoaderSettingsChanged() m_iconSizes->insert("small", KIconLoader::global()->currentSize(KIconLoader::Small)); m_iconSizes->insert("dialog", KIconLoader::global()->currentSize(KIconLoader::Dialog)); - emit defaultIconSizeChanged(); emit iconSizesChanged(); } @@ -242,4 +226,3 @@ QQmlPropertyMap *ThemeProxy::iconSizes() const } #include "moc_theme.cpp" - diff --git a/src/declarativeimports/core/theme.h b/src/declarativeimports/core/theme.h index a4b30eb20..18274ce68 100644 --- a/src/declarativeimports/core/theme.h +++ b/src/declarativeimports/core/theme.h @@ -40,10 +40,6 @@ class ThemeProxy : public Plasma::Theme { Q_OBJECT - Q_PROPERTY(QString themeName READ themeName NOTIFY themeChanged) - Q_PROPERTY(bool useGlobalSettings READ useGlobalSettings NOTIFY themeChanged) - Q_PROPERTY(QString wallpaperPath READ wallpaperPath NOTIFY themeChanged) - //fonts Q_PROPERTY(QFont defaultFont READ defaultFont NOTIFY defaultFontChanged) Q_PROPERTY(QFont smallestFont READ smallestFont NOTIFY smallestFontChanged) diff --git a/src/plasma/theme.h b/src/plasma/theme.h index 9f175fdb8..bd46e87cb 100644 --- a/src/plasma/theme.h +++ b/src/plasma/theme.h @@ -52,6 +52,11 @@ class PLASMA_EXPORT Theme : public QObject { Q_OBJECT + Q_PROPERTY(QString themeName READ themeName NOTIFY themeChanged) + Q_PROPERTY(bool useGlobalSettings READ useGlobalSettings NOTIFY themeChanged) + Q_PROPERTY(QString wallpaperPath READ wallpaperPath NOTIFY themeChanged) + + public: enum ColorRole { TextColor = 0, /**< the text color to be used by items resting on the background */