#ifndef QT_NO_ACCESSIBILITY
+/*!
+ Returns an accessibility interface for this window, or 0 if such an
+ interface cannot be created.
+
+ \warning The caller is responsible for deleting the returned interface.
+*/
QAccessibleInterface *QQuickWindow::accessibleRoot() const
{
return QAccessible::queryAccessibleInterface(const_cast<QQuickWindow*>(this));
QObject::connect(context, SIGNAL(invalidated()), q, SLOT(cleanupSceneGraph()), Qt::DirectConnection);
}
+/*!
+ \property QQuickWindow::data
+ \internal
+*/
+
QQmlListProperty<QObject> QQuickWindowPrivate::data()
{
initRootItem();
\sa {OpenGL Under QML Example}
*/
+
+/*!
+ Constructs a window for displaying a QML scene with parent window \a parent.
+*/
QQuickWindow::QQuickWindow(QWindow *parent)
: QWindow(*(new QQuickWindowPrivate), parent)
{
d->init(this);
}
+/*!
+ \internal
+*/
QQuickWindow::QQuickWindow(QQuickWindowPrivate &dd, QWindow *parent)
: QWindow(dd, parent)
{
d->init(this);
}
+/*!
+ Destroys the window.
+*/
QQuickWindow::~QQuickWindow()
{
Q_D(QQuickWindow);
/*!
- Controls whether the OpenGL context can be released as a part of a call to
- releaseResources().
+ Sets whether the OpenGL context can be released as a part of a call to
+ releaseResources() to \a persistent.
The OpenGL context might still be released when the user makes an explicit
call to hide().
/*!
- Controls whether the scene graph nodes and resources can be released as a
- part of a call to releaseResources().
+ Sets whether the scene graph nodes and resources can be released as a
+ part of a call to releaseResources() to \a persistent.
The scene graph nodes and resources might still be released when the user
makes an explicit call to hide().
/*!
- Returns the invisible root item of the scene.
+ \property QQuickWindow::contentItem
+ \brief The invisible root item of the scene.
A QQuickWindow always has a single invisible root item containing all of its content.
To add items to this window, reparent the items to the contentItem or to an existing
}
/*!
- Propagates an event to a QQuickItem on the window
+ Propagates an event \a e to a QQuickItem \a item on the window.
+
+ The return value is currently not used.
*/
bool QQuickWindow::sendEvent(QQuickItem *item, QEvent *e)
{
return 0;
}
+/*!
+ \fn void QQuickWindow::frameSwapped()
+
+ This signal is emitted when the frame buffers have been swapped.
+
+ This signal will be emitted from the scene graph rendering thread.
+*/
+
/*!
\fn void QQuickWindow::sceneGraphInitialized()
/*!
\overload
- */
+
+ Sets the render target for this window to be an FBO with
+ \a fboId and \a size.
+
+ The specified FBO must be created in the context of the window
+ or one that shares with it.
+
+ \warning
+ This function can only be called from the thread doing
+ the rendering.
+*/
+
void QQuickWindow::setRenderTarget(uint fboId, const QSize &size)
{
Q_D(QQuickWindow);
*/
/*!
+ \fn void QQuickWindow::beforeSynchronizing()
+
+ This signal is emitted before the scene graph is synchronized with the QML state.
+
+ This signal can be used to do any preparation required before calls to
+ QQuickItem::updatePaintNode().
+
+ The GL context used for rendering the scene graph will be bound at this point.
+
+ \warning This signal is emitted from the scene graph rendering thread. If your
+ slot function needs to finish before execution continues, you must make sure that
+ the connection is direct (see Qt::ConnectionType).
+
+ \warning Make very sure that a signal handler for beforeSynchronizing leaves the GL
+ context in the same state as it was when the signal handler was entered. Failing to
+ do so can result in the scene not rendering properly.
+*/
+
+/*!
\fn void QQuickWindow::beforeRendering()
This signal is emitted before the scene starts rendering.
The GL context used for rendering the scene graph will be bound
at this point.
- \warning Since this signal is emitted from the scene graph rendering thread, the
- receiver should be on the scene graph thread or the connection should be Qt::DirectConnection.
+ \warning This signal is emitted from the scene graph rendering thread. If your
+ slot function needs to finish before execution continues, you must make sure that
+ the connection is direct (see Qt::ConnectionType).
\warning Make very sure that a signal handler for beforeRendering leaves the GL
context in the same state as it was when the signal handler was entered. Failing to
The GL context used for rendering the scene graph will be bound at this point.
- \warning Since this signal is emitted from the scene graph rendering thread, the
- receiver should be on the scene graph thread or the connection should be Qt::DirectConnection.
+ \warning This signal is emitted from the scene graph rendering thread. If your
+ slot function needs to finish before execution continues, you must make sure that
+ the connection is direct (see Qt::ConnectionType).
\warning Make very sure that a signal handler for afterRendering() leaves the GL
context in the same state as it was when the signal handler was entered. Failing to
/*!
Sets weither the scene graph rendering of QML should clear the color buffer
- before it starts rendering to \a enbled.
+ before it starts rendering to \a enabled.
By disabling clearing of the color buffer, it is possible to do GL painting
under the scene graph.
/*!
- Creates a new QSGTexture object from an existing GL texture \a id.
+ Creates a new QSGTexture object from an existing GL texture \a id and \a size.
The caller of the function is responsible for deleting the returned texture.
return 0;
}
-
/*!
- Sets the color used to clear the opengl context to \a color.
+ \property QQuickWindow::color
+ \brief The color used to clear the OpenGL context.
Setting the clear color has no effect when clearing is disabled.
+ By default, the clear color is white.
\sa setClearBeforeRendering()
*/
emit colorChanged(color);
}
-
-
-/*!
- Returns the color used to clear the opengl context.
- */
-
QColor QQuickWindow::color() const
{
return d_func()->clearColor;