summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael Dominic K <mdk@codethink.co.uk>2010-12-08 12:48:23 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2010-12-08 12:48:23 (GMT)
commitc4f4d801f5dd31ca4c65c70b2245c987ac8ff203 (patch)
tree9101cfadab99b46b78b17eec4a0c6a344b4a6e38 /tools
parentf317d94880554a114937554907d08807c0cf5047 (diff)
downloadQt-c4f4d801f5dd31ca4c65c70b2245c987ac8ff203.zip
Qt-c4f4d801f5dd31ca4c65c70b2245c987ac8ff203.tar.gz
Qt-c4f4d801f5dd31ca4c65c70b2245c987ac8ff203.tar.bz2
New translucency API for the meego graphics system.
Merge-request: 2523 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tools')
-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 b660eb3..13e44b8 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 d47c829..3e1333d 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