summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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