diff options
author | Lasse Holmstedt <lasse.holmstedt@nokia.com> | 2011-08-31 09:55:11 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-05 11:11:04 +0200 |
commit | 6fd75df2889c5635f3de265f40f9d23a35a94d00 (patch) | |
tree | 08c7fdef20be0feeb11b16c37200bd88cd70e4ce /src/gui/kernel/qplatformnativeinterface_qpa.cpp | |
parent | 74cf3bfc2c62ac30d16be68db1237a3dc55843a4 (diff) |
Generic property support for platform windows
QPlatformNativeInterface can now contain generic window
properties in a QVariantMap, to facilitate communication
with the compositor and clients for certain platforms.
When window properties change, a signal is emitted from the
respective QPlatformNativeInterface instance. The properties
are intended to be read/writable from both client and server.
Change-Id: I7b42f7910d03c0d309add6c7dbb1c9b66ad22a3f
Reviewed-on: http://codereview.qt.nokia.com/3956
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/kernel/qplatformnativeinterface_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qplatformnativeinterface_qpa.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformnativeinterface_qpa.cpp b/src/gui/kernel/qplatformnativeinterface_qpa.cpp index 32849d9b5a..e3f6689acc 100644 --- a/src/gui/kernel/qplatformnativeinterface_qpa.cpp +++ b/src/gui/kernel/qplatformnativeinterface_qpa.cpp @@ -50,4 +50,45 @@ void *QPlatformNativeInterface::nativeResourceForWidget(const QByteArray &resour return 0; } +/*! + Contains generic window properties that the platform may utilize. +*/ +QVariantMap QPlatformNativeInterface::windowProperties(QPlatformWindow *window) const +{ + return QVariantMap(); +} + +/*! + Returns a window property with \a name. + + If the property does not exist, returns a default-constructed value. +*/ +QVariant QPlatformNativeInterface::windowProperty(QPlatformWindow *window, const QString &name) const +{ + Q_UNUSED(window); + Q_UNUSED(name); + return QVariant(); +} + +/*! + Returns a window property with \a name. If the value does not exist, defaultValue is returned. +*/ +QVariant QPlatformNativeInterface::windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const +{ + Q_UNUSED(window); + Q_UNUSED(name); + Q_UNUSED(defaultValue); + return QVariant(); +} + +/*! + Sets a window property with \a name to \a value. +*/ +void QPlatformNativeInterface::setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) +{ + Q_UNUSED(window); + Q_UNUSED(name); + Q_UNUSED(value); +} + QT_END_NAMESPACE |