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:
parent
ecba1f6d3b
commit
3dbe535dec
@ -31,7 +31,7 @@ ThemeProxy::~ThemeProxy()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ThemeProxy::name() const
|
QString ThemeProxy::themeName() const
|
||||||
{
|
{
|
||||||
return Plasma::Theme::defaultTheme()->themeName();
|
return Plasma::Theme::defaultTheme()->themeName();
|
||||||
}
|
}
|
||||||
@ -46,11 +46,26 @@ bool ThemeProxy::windowTranslucencyEnabled() const
|
|||||||
return Plasma::Theme::defaultTheme()->windowTranslucencyEnabled();
|
return Plasma::Theme::defaultTheme()->windowTranslucencyEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
QUrl ThemeProxy::homepage() const
|
KUrl ThemeProxy::homepage() const
|
||||||
{
|
{
|
||||||
return Plasma::Theme::defaultTheme()->homepage();
|
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
|
QColor ThemeProxy::textColor() const
|
||||||
{
|
{
|
||||||
return Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor);
|
return Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <QUrl>
|
#include <KUrl>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
|
||||||
@ -29,10 +29,13 @@ class ThemeProxy : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
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(QFont font READ font NOTIFY themeChanged)
|
||||||
Q_PROPERTY(bool translucent READ windowTranslucencyEnabled NOTIFY themeChanged)
|
Q_PROPERTY(bool windowTranslucentEnabled READ windowTranslucencyEnabled NOTIFY themeChanged)
|
||||||
Q_PROPERTY(QUrl homepage READ homepage 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
|
// colors
|
||||||
Q_PROPERTY(QColor textColor READ textColor NOTIFY themeChanged)
|
Q_PROPERTY(QColor textColor READ textColor NOTIFY themeChanged)
|
||||||
@ -54,10 +57,13 @@ public:
|
|||||||
ThemeProxy(QObject *parent = 0);
|
ThemeProxy(QObject *parent = 0);
|
||||||
~ThemeProxy();
|
~ThemeProxy();
|
||||||
|
|
||||||
QString name() const;
|
QString themeName() const;
|
||||||
QFont font() const;
|
QFont font() const;
|
||||||
bool windowTranslucencyEnabled() const;
|
bool windowTranslucencyEnabled() const;
|
||||||
QUrl homepage() const;
|
KUrl homepage() const;
|
||||||
|
bool useGlobalSettings() const;
|
||||||
|
QString styleSheet() const;
|
||||||
|
QString wallpaperPath() const;
|
||||||
|
|
||||||
QColor textColor() const;
|
QColor textColor() const;
|
||||||
QColor highlightColor() const;
|
QColor highlightColor() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user