diff options
author | Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 2012-08-15 23:03:38 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2012-08-16 07:55:01 +0200 |
commit | abdce5881c2d2ae129addc600ad0236660b9fc70 (patch) | |
tree | 1fd49c1b27cc28b72759940541d379c301940f3d | |
parent | ddaa441ea0923473e40d70bbe74b0b4c0e4e86b5 (diff) | |
download | qtwayland-abdce5881c2d2ae129addc600ad0236660b9fc70.tar.gz |
Add support for loading theme plugins.
Use QGenericUnixTheme to return a list of themes and create new
QPlatformTheme objects.
Change-Id: Iaac113aad3bc088f51695c224433287701113960
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandintegration.cpp | 11 | ||||
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandintegration.h | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 97a259d0..9606f7c8 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -50,6 +50,7 @@ #include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h" #include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h> +#include <QtPlatformSupport/private/qgenericunixthemes_p.h> #include <QtGui/private/qguiapplication_p.h> @@ -199,3 +200,13 @@ QWaylandDisplay *QWaylandIntegration::display() const { return mDisplay; } + +QStringList QWaylandIntegration::themeNames() const +{ + return QGenericUnixTheme::themeNames(); +} + +QPlatformTheme *QWaylandIntegration::createPlatformTheme(const QString &name) const +{ + return QGenericUnixTheme::createUnixTheme(name); +} diff --git a/src/plugins/platforms/wayland/qwaylandintegration.h b/src/plugins/platforms/wayland/qwaylandintegration.h index 9bb6130a..ff10f014 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.h +++ b/src/plugins/platforms/wayland/qwaylandintegration.h @@ -80,6 +80,11 @@ public: QPlatformServices *services() const; QWaylandDisplay *display() const; + + QStringList themeNames() const; + + QPlatformTheme *createPlatformTheme(const QString &name) const; + private: QPlatformFontDatabase *mFontDb; QAbstractEventDispatcher *mEventDispatcher; |