Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickwindow.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | class QRunnable; | - | ||||||||||||
5 | class QQuickItem; | - | ||||||||||||
6 | class QSGTexture; | - | ||||||||||||
7 | class QInputMethodEvent; | - | ||||||||||||
8 | class QQuickWindowPrivate; | - | ||||||||||||
9 | class QQuickWindowAttached; | - | ||||||||||||
10 | class QOpenGLContext; | - | ||||||||||||
11 | class QOpenGLFramebufferObject; | - | ||||||||||||
12 | class QQmlIncubationController; | - | ||||||||||||
13 | class QInputMethodEvent; | - | ||||||||||||
14 | class QQuickCloseEvent; | - | ||||||||||||
15 | class QQuickRenderControl; | - | ||||||||||||
16 | class QSGRectangleNode; | - | ||||||||||||
17 | class QSGImageNode; | - | ||||||||||||
18 | class QSGNinePatchNode; | - | ||||||||||||
19 | - | |||||||||||||
20 | class __attribute__((visibility("default"))) QQuickWindow : public QWindow | - | ||||||||||||
21 | { | - | ||||||||||||
22 | public: | - | ||||||||||||
23 | #pragma GCC diagnostic push | - | ||||||||||||
24 | - | |||||||||||||
25 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||
26 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||
27 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||
28 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||
29 | #pragma GCC diagnostic pop | - | ||||||||||||
30 | struct QPrivateSignal {}; | - | ||||||||||||
31 | - | |||||||||||||
32 | - | |||||||||||||
33 | - | |||||||||||||
34 | - | |||||||||||||
35 | - | |||||||||||||
36 | inline QQuickWindowPrivate* d_func() { return executed 6972119 times by 91 tests: reinterpret_cast<QQuickWindowPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QQuickWindowPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 6972119 times by 91 tests: } inline const QQuickWindowPrivate* d_func() const { returnreturn reinterpret_cast<QQuickWindowPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 569179 times by 91 tests: reinterpret_cast<const QQuickWindowPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QQuickWindowPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
executed 569179 times by 91 tests: } friend class QQuickWindowPrivate;return reinterpret_cast<const QQuickWindowPrivate *>(qGetPtrHelper(d_ptr)); Executed by:
| 569179-6972119 | ||||||||||||
37 | public: | - | ||||||||||||
38 | enum CreateTextureOption { | - | ||||||||||||
39 | TextureHasAlphaChannel = 0x0001, | - | ||||||||||||
40 | TextureHasMipmaps = 0x0002, | - | ||||||||||||
41 | TextureOwnsGLTexture = 0x0004, | - | ||||||||||||
42 | TextureCanUseAtlas = 0x0008, | - | ||||||||||||
43 | TextureIsOpaque = 0x0010 | - | ||||||||||||
44 | }; | - | ||||||||||||
45 | - | |||||||||||||
46 | enum RenderStage { | - | ||||||||||||
47 | BeforeSynchronizingStage, | - | ||||||||||||
48 | AfterSynchronizingStage, | - | ||||||||||||
49 | BeforeRenderingStage, | - | ||||||||||||
50 | AfterRenderingStage, | - | ||||||||||||
51 | AfterSwapStage, | - | ||||||||||||
52 | NoStage | - | ||||||||||||
53 | }; | - | ||||||||||||
54 | - | |||||||||||||
55 | typedef QFlags<CreateTextureOption> CreateTextureOptions; | - | ||||||||||||
56 | - | |||||||||||||
57 | enum SceneGraphError { | - | ||||||||||||
58 | ContextNotAvailable = 1 | - | ||||||||||||
59 | }; | - | ||||||||||||
60 | friend constexpr const QMetaObject *qt_getEnumMetaObject(SceneGraphError) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(SceneGraphError) noexcept { return "SceneGraphError"; } | - | ||||||||||||
61 | - | |||||||||||||
62 | enum TextRenderType { | - | ||||||||||||
63 | QtTextRendering, | - | ||||||||||||
64 | NativeTextRendering | - | ||||||||||||
65 | }; | - | ||||||||||||
66 | friend constexpr const QMetaObject *qt_getEnumMetaObject(TextRenderType) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(TextRenderType) noexcept { return "TextRenderType"; } | - | ||||||||||||
67 | - | |||||||||||||
68 | explicit QQuickWindow(QWindow *parent = nullptr); | - | ||||||||||||
69 | explicit QQuickWindow(QQuickRenderControl *renderControl); | - | ||||||||||||
70 | - | |||||||||||||
71 | ~QQuickWindow() override; | - | ||||||||||||
72 | - | |||||||||||||
73 | QQuickItem *contentItem() const; | - | ||||||||||||
74 | - | |||||||||||||
75 | QQuickItem *activeFocusItem() const; | - | ||||||||||||
76 | QObject *focusObject() const override; | - | ||||||||||||
77 | - | |||||||||||||
78 | QQuickItem *mouseGrabberItem() const; | - | ||||||||||||
79 | - | |||||||||||||
80 | - | |||||||||||||
81 | __attribute__ ((__deprecated__)) bool sendEvent(QQuickItem *, QEvent *); | - | ||||||||||||
82 | - | |||||||||||||
83 | - | |||||||||||||
84 | QImage grabWindow(); | - | ||||||||||||
85 | - | |||||||||||||
86 | void setRenderTarget(QOpenGLFramebufferObject *fbo); | - | ||||||||||||
87 | QOpenGLFramebufferObject *renderTarget() const; | - | ||||||||||||
88 | - | |||||||||||||
89 | void setRenderTarget(uint fboId, const QSize &size); | - | ||||||||||||
90 | uint renderTargetId() const; | - | ||||||||||||
91 | QSize renderTargetSize() const; | - | ||||||||||||
92 | - | |||||||||||||
93 | void resetOpenGLState(); | - | ||||||||||||
94 | - | |||||||||||||
95 | QQmlIncubationController *incubationController() const; | - | ||||||||||||
96 | - | |||||||||||||
97 | - | |||||||||||||
98 | QAccessibleInterface *accessibleRoot() const override; | - | ||||||||||||
99 | - | |||||||||||||
100 | - | |||||||||||||
101 | - | |||||||||||||
102 | QSGTexture *createTextureFromImage(const QImage &image) const; | - | ||||||||||||
103 | QSGTexture *createTextureFromImage(const QImage &image, CreateTextureOptions options) const; | - | ||||||||||||
104 | QSGTexture *createTextureFromId(uint id, const QSize &size, CreateTextureOptions options = CreateTextureOption()) const; | - | ||||||||||||
105 | - | |||||||||||||
106 | void setClearBeforeRendering(bool enabled); | - | ||||||||||||
107 | bool clearBeforeRendering() const; | - | ||||||||||||
108 | - | |||||||||||||
109 | void setColor(const QColor &color); | - | ||||||||||||
110 | QColor color() const; | - | ||||||||||||
111 | - | |||||||||||||
112 | static bool hasDefaultAlphaBuffer(); | - | ||||||||||||
113 | static void setDefaultAlphaBuffer(bool useAlpha); | - | ||||||||||||
114 | - | |||||||||||||
115 | void setPersistentOpenGLContext(bool persistent); | - | ||||||||||||
116 | bool isPersistentOpenGLContext() const; | - | ||||||||||||
117 | - | |||||||||||||
118 | void setPersistentSceneGraph(bool persistent); | - | ||||||||||||
119 | bool isPersistentSceneGraph() const; | - | ||||||||||||
120 | - | |||||||||||||
121 | QOpenGLContext *openglContext() const; | - | ||||||||||||
122 | bool isSceneGraphInitialized() const; | - | ||||||||||||
123 | - | |||||||||||||
124 | void scheduleRenderJob(QRunnable *job, RenderStage schedule); | - | ||||||||||||
125 | - | |||||||||||||
126 | qreal effectiveDevicePixelRatio() const; | - | ||||||||||||
127 | - | |||||||||||||
128 | QSGRendererInterface *rendererInterface() const; | - | ||||||||||||
129 | - | |||||||||||||
130 | static void setSceneGraphBackend(QSGRendererInterface::GraphicsApi api); | - | ||||||||||||
131 | static void setSceneGraphBackend(const QString &backend); | - | ||||||||||||
132 | static QString sceneGraphBackend(); | - | ||||||||||||
133 | - | |||||||||||||
134 | QSGRectangleNode *createRectangleNode() const; | - | ||||||||||||
135 | QSGImageNode *createImageNode() const; | - | ||||||||||||
136 | QSGNinePatchNode *createNinePatchNode() const; | - | ||||||||||||
137 | - | |||||||||||||
138 | static TextRenderType textRenderType(); | - | ||||||||||||
139 | static void setTextRenderType(TextRenderType renderType); | - | ||||||||||||
140 | - | |||||||||||||
141 | public : | - | ||||||||||||
142 | void frameSwapped(); | - | ||||||||||||
143 | void openglContextCreated(QOpenGLContext *context); | - | ||||||||||||
144 | void sceneGraphInitialized(); | - | ||||||||||||
145 | void sceneGraphInvalidated(); | - | ||||||||||||
146 | void beforeSynchronizing(); | - | ||||||||||||
147 | void afterSynchronizing(); | - | ||||||||||||
148 | void beforeRendering(); | - | ||||||||||||
149 | void afterRendering(); | - | ||||||||||||
150 | void afterAnimating(); | - | ||||||||||||
151 | void sceneGraphAboutToStop(); | - | ||||||||||||
152 | - | |||||||||||||
153 | void closing(QQuickCloseEvent *close); | - | ||||||||||||
154 | void colorChanged(const QColor &); | - | ||||||||||||
155 | void activeFocusItemChanged(); | - | ||||||||||||
156 | void sceneGraphError(QQuickWindow::SceneGraphError error, const QString &message); | - | ||||||||||||
157 | - | |||||||||||||
158 | - | |||||||||||||
159 | public : | - | ||||||||||||
160 | void update(); | - | ||||||||||||
161 | void releaseResources(); | - | ||||||||||||
162 | - | |||||||||||||
163 | protected: | - | ||||||||||||
164 | QQuickWindow(QQuickWindowPrivate &dd, QWindow *parent = nullptr); | - | ||||||||||||
165 | QQuickWindow(QQuickWindowPrivate &dd, QQuickRenderControl *control); | - | ||||||||||||
166 | - | |||||||||||||
167 | void exposeEvent(QExposeEvent *) override; | - | ||||||||||||
168 | void resizeEvent(QResizeEvent *) override; | - | ||||||||||||
169 | - | |||||||||||||
170 | void showEvent(QShowEvent *) override; | - | ||||||||||||
171 | void hideEvent(QHideEvent *) override; | - | ||||||||||||
172 | - | |||||||||||||
173 | - | |||||||||||||
174 | void focusInEvent(QFocusEvent *) override; | - | ||||||||||||
175 | void focusOutEvent(QFocusEvent *) override; | - | ||||||||||||
176 | - | |||||||||||||
177 | bool event(QEvent *) override; | - | ||||||||||||
178 | void keyPressEvent(QKeyEvent *) override; | - | ||||||||||||
179 | void keyReleaseEvent(QKeyEvent *) override; | - | ||||||||||||
180 | void mousePressEvent(QMouseEvent *) override; | - | ||||||||||||
181 | void mouseReleaseEvent(QMouseEvent *) override; | - | ||||||||||||
182 | void mouseDoubleClickEvent(QMouseEvent *) override; | - | ||||||||||||
183 | void mouseMoveEvent(QMouseEvent *) override; | - | ||||||||||||
184 | - | |||||||||||||
185 | void wheelEvent(QWheelEvent *) override; | - | ||||||||||||
186 | - | |||||||||||||
187 | - | |||||||||||||
188 | private : | - | ||||||||||||
189 | void maybeUpdate(); | - | ||||||||||||
190 | void cleanupSceneGraph(); | - | ||||||||||||
191 | void physicalDpiChanged(); | - | ||||||||||||
192 | void handleScreenChanged(QScreen *screen); | - | ||||||||||||
193 | void setTransientParent_helper(QQuickWindow *window); | - | ||||||||||||
194 | void runJobsAfterSwap(); | - | ||||||||||||
195 | void handleApplicationStateChanged(Qt::ApplicationState state); | - | ||||||||||||
196 | private: | - | ||||||||||||
197 | friend class QQuickItem; | - | ||||||||||||
198 | friend class QQuickWidget; | - | ||||||||||||
199 | friend class QQuickRenderControl; | - | ||||||||||||
200 | friend class QQuickAnimatorController; | - | ||||||||||||
201 | QQuickWindow(const QQuickWindow &) = delete; QQuickWindow &operator=(const QQuickWindow &) = delete; | - | ||||||||||||
202 | }; | - | ||||||||||||
203 | - | |||||||||||||
204 | - | |||||||||||||
205 | QDebug __attribute__((visibility("default"))) operator<<(QDebug debug, const QQuickWindow *item); | - | ||||||||||||
206 | - | |||||||||||||
207 | - | |||||||||||||
208 | - | |||||||||||||
209 | - | |||||||||||||
210 | template <> struct QMetaTypeId< QQuickWindow * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
executed 112 times by 20 tests: id;return id; Executed by:
executed 112 times by 20 tests: const int newId = qRegisterMetaType< QQuickWindow * >("QQuickWindow *", reinterpret_cast< QQuickWindow * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id; Executed by:
executed 50 times by 20 tests: newId;return newId; Executed by:
executed 50 times by 20 tests: } };return newId; Executed by:
| 50-112 | ||||||||||||
Switch to Source code | Preprocessed file |