summaryrefslogtreecommitdiffstats
path: root/tools/qmeegographicssystemhelper
diff options
context:
space:
mode:
authorMichael Dominic K <mdk@codethink.co.uk>2010-12-08 13:48:23 +0100
committerSamuel Rødal <samuel.rodal@nokia.com>2010-12-08 13:48:23 +0100
commitc4f4d801f5dd31ca4c65c70b2245c987ac8ff203 (patch)
tree9101cfadab99b46b78b17eec4a0c6a344b4a6e38 /tools/qmeegographicssystemhelper
parentf317d94880554a114937554907d08807c0cf5047 (diff)
New translucency API for the meego graphics system.
Merge-request: 2523 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tools/qmeegographicssystemhelper')
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp5
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h17
2 files changed, 22 insertions, 0 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
index b660eb37ea..13e44b8a28 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
@@ -153,3 +153,8 @@ void QMeeGoGraphicsSystemHelper::setTranslucent(bool translucent)
ENSURE_RUNNING_MEEGO;
QMeeGoRuntime::setTranslucent(translucent);
}
+
+void QMeeGoGraphicsSystemHelper::setTranslucentWidget(QWidget w, bool translucent)
+{
+ w.setProperty("qglTranslucent", QVariant(translucent));
+}
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
index d47c8291ed..3e1333d835 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
@@ -181,8 +181,25 @@ public:
This function needs to be called *before* any widget/content is created.
When called with true, the base window surface will be translucent and initialized
with QGLFormat.alpha == true.
+
+ This function is *deprecated*. Use ::setTranslucentWidget instead.
*/
static void setTranslucent(bool translucent);
+
+ //! Sets translucency (alpha) on the given top-level widget.
+ /*!
+ This is a new API for enabling GL translucency on top-level widgets.
+ The specified widget needs to be top-level. When the time comes to create
+ a window surface for the widget, it'll be created with translucency enabled
+ (if translucent is true).
+
+ This function has no effect if the widget is already visible or if it's
+ not a top-level widget.
+
+ This function can be called even if not running MeeGo graphics system. It'll
+ have no effect though.
+ */
+ static void setTranslucentWidget(QWidget w, bool translucent);
};
#endif