Last bits to theme bindings

We are going to need a proxy for the theme anyway, so we need
this guy complete anyway. Let's forget about the idea of exporting
Plasma::Theme directly.

Signed-off-by: Artur Duque de Souza <asouza@kde.org>
This commit is contained in:
Artur Duque de Souza 2011-04-26 16:46:14 -03:00
parent ecba1f6d3b
commit 3dbe535dec
2 changed files with 29 additions and 8 deletions

View File

@ -31,7 +31,7 @@ ThemeProxy::~ThemeProxy()
{
}
QString ThemeProxy::name() const
QString ThemeProxy::themeName() const
{
return Plasma::Theme::defaultTheme()->themeName();
}
@ -46,11 +46,26 @@ bool ThemeProxy::windowTranslucencyEnabled() const
return Plasma::Theme::defaultTheme()->windowTranslucencyEnabled();
}
QUrl ThemeProxy::homepage() const
KUrl ThemeProxy::homepage() const
{
return Plasma::Theme::defaultTheme()->homepage();
}
bool ThemeProxy::useGlobalSettings() const
{
return Plasma::Theme::defaultTheme()->useGlobalSettings();
}
QString ThemeProxy::styleSheet() const
{
return Plasma::Theme::defaultTheme()->styleSheet();
}
QString ThemeProxy::wallpaperPath() const
{
return Plasma::Theme::defaultTheme()->wallpaperPath();
}
QColor ThemeProxy::textColor() const
{
return Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor);

View File

@ -21,7 +21,7 @@
#include <QObject>
#include <QUrl>
#include <KUrl>
#include <QFont>
#include <QColor>
@ -29,10 +29,13 @@ class ThemeProxy : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ name NOTIFY themeChanged)
Q_PROPERTY(QString themeName READ themeName NOTIFY themeChanged)
Q_PROPERTY(QFont font READ font NOTIFY themeChanged)
Q_PROPERTY(bool translucent READ windowTranslucencyEnabled NOTIFY themeChanged)
Q_PROPERTY(QUrl homepage READ homepage NOTIFY themeChanged)
Q_PROPERTY(bool windowTranslucentEnabled READ windowTranslucencyEnabled NOTIFY themeChanged)
Q_PROPERTY(KUrl homepage READ homepage NOTIFY themeChanged)
Q_PROPERTY(bool useGlobalSettings READ useGlobalSettings NOTIFY themeChanged)
Q_PROPERTY(QString styleSheet READ styleSheet NOTIFY themeChanged)
Q_PROPERTY(QString wallpaperPath READ wallpaperPath NOTIFY themeChanged)
// colors
Q_PROPERTY(QColor textColor READ textColor NOTIFY themeChanged)
@ -54,10 +57,13 @@ public:
ThemeProxy(QObject *parent = 0);
~ThemeProxy();
QString name() const;
QString themeName() const;
QFont font() const;
bool windowTranslucencyEnabled() const;
QUrl homepage() const;
KUrl homepage() const;
bool useGlobalSettings() const;
QString styleSheet() const;
QString wallpaperPath() const;
QColor textColor() const;
QColor highlightColor() const;