Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickwidget_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKWIDGET_P_H
5#define QQUICKWIDGET_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qquickwidget.h"
19#include <private/qwidget_p.h>
20#include <rhi/qrhi.h>
21#include <private/qbackingstorerhisupport_p.h>
22
23#include <QtCore/qurl.h>
24#include <QtCore/qelapsedtimer.h>
25#include <QtCore/qtimer.h>
26#include <QtCore/qpointer.h>
27#include <QtCore/QWeakPointer>
28
29#include <QtQml/qqmlengine.h>
30
31#include "private/qquickitemchangelistener_p.h"
32
34
35class QQmlContext;
36class QQmlError;
37class QQuickItem;
38class QQmlComponent;
40
42 : public QWidgetPrivate,
44{
45 Q_DECLARE_PUBLIC(QQuickWidget)
46public:
47 static QQuickWidgetPrivate* get(QQuickWidget *view) { return view->d_func(); }
48 static const QQuickWidgetPrivate* get(const QQuickWidget *view) { return view->d_func(); }
49
51
52 void destroy();
53 void execute();
54 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override;
55 void initResize();
56 void updateSize();
57 void updatePosition();
59 void setRootObject(QObject *);
60 void render(bool needsSync);
61 void renderSceneGraph();
62 void initializeWithRhi();
64
66 TextureData texture() const override;
67 QPlatformTextureList::Flags textureListFlags() override;
68 QImage grabFramebuffer() override;
69
70 void init(QQmlEngine* e = nullptr);
71 void ensureBackingScene();
73 void ensureEngine() const;
74 void handleWindowChange();
76
77 QSize rootObjectSize() const;
78
79 QPointer<QQuickItem> root;
80
82
83 mutable QPointer<QQmlEngine> engine;
88
95
99
104
106
112
114};
115
123
125
126#endif // QQuickWidget_P_H
\inmodule QtCore
Definition qbasictimer.h:18
\inmodule QtCore
\inmodule QtGui
Definition qimage.h:37
\inmodule QtCore
Definition qobject.h:103
The QQmlComponent class encapsulates a QML component definition.
The QQmlContext class defines a context within a QML engine.
Definition qqmlcontext.h:25
The QQmlEngine class provides an environment for instantiating QML components.
Definition qqmlengine.h:57
The QQmlError class encapsulates a QML error.
Definition qqmlerror.h:18
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
The QQuickRenderControl class provides a mechanism for rendering the Qt Quick scenegraph onto an offs...
QQuickWidgetOffscreenWindow(QQuickWindowPrivate &dd, QQuickRenderControl *control)
QRhiRenderBuffer * depthStencil
static QQuickWidgetPrivate * get(QQuickWidget *view)
QSize rootObjectSize() const
void updateFrambufferObjectSize()
QBasicTimer resizetimer
QImage grabFramebuffer() override
static const QQuickWidgetPrivate * get(const QQuickWidget *view)
QQuickRenderControl * renderControl
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override
void handleContextCreationFailure(const QSurfaceFormat &format)
QPointer< QQuickItem > root
void ensureEngine() const
void init(QQmlEngine *e=nullptr)
QQmlComponent * component
QRhiRenderBuffer * msaaBuffer
QPlatformTextureList::Flags textureListFlags() override
QRhiTexture * outputTexture
TextureData texture() const override
QElapsedTimer frameTimer
QBackingStoreRhiSupport offscreenRenderer
QRhiRenderPassDescriptor * rtRp
QPlatformBackingStoreRhiConfig rhiConfig() const override
QPointer< QQmlEngine > engine
QQuickWindow * offscreenWindow
void setRootObject(QObject *)
QRhiTextureRenderTarget * rt
void render(bool needsSync)
QQuickWidget::ResizeMode resizeMode
The QQuickWidget class provides a widget for displaying a Qt Quick user interface.
ResizeMode
This enum specifies how to resize the view.
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
Definition qrect.h:484
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
\inmodule QtGui
Definition qrhi.h:1094
\inmodule QtGui
Definition qrhi.h:1142
\inmodule QtGui
Definition qrhi.h:1184
\inmodule QtGui
Definition qrhi.h:895
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:1804
\inmodule QtCore
Definition qsize.h:25
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum format
#define Q_OBJECT
QGraphicsItem * item
QQuickView * view
[0]