Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickgraphicsinfo_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKGRAPHICSINFO_P_H
6#define QQUICKGRAPHICSINFO_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/qobject.h>
20#include <QtCore/qpointer.h>
21#include <QtQml/qqml.h>
22#include <QtGui/qsurfaceformat.h>
23#include <QtQuick/qsgrendererinterface.h>
24#include <QtCore/private/qglobal_p.h>
25
26QT_BEGIN_NAMESPACE
27
28class QQuickItem;
29class QQuickWindow;
30
32{
33 Q_OBJECT
34 Q_PROPERTY(GraphicsApi api READ api NOTIFY apiChanged FINAL)
38
43
46 QML_UNCREATABLE("GraphicsInfo is only available via attached properties.")
48
49public:
67 Q_ENUM(GraphicsApi)
68
75 Q_ENUM(ShaderType)
76
81 Q_ENUM(ShaderCompilationType)
82
88 Q_ENUM(ShaderSourceType)
89
95 Q_ENUM(OpenGLContextProfile)
96
102 Q_ENUM(RenderableType)
103
105
106 static QQuickGraphicsInfo *qmlAttachedProperties(QObject *object);
107
108 GraphicsApi api() const { return m_api; }
109 ShaderType shaderType() const { return m_shaderType; }
110 ShaderCompilationType shaderCompilationType() const { return m_shaderCompilationType; }
111 ShaderSourceType shaderSourceType() const { return m_shaderSourceType; }
112
113 int majorVersion() const { return m_majorVersion; }
114 int minorVersion() const { return m_minorVersion; }
115 OpenGLContextProfile profile() const { return m_profile; }
116 RenderableType renderableType() const { return m_renderableType; }
117
123
128
129private Q_SLOTS:
130 void updateInfo();
131 void setWindow(QQuickWindow *window);
132
133private:
134 QPointer<QQuickWindow> m_window;
135 GraphicsApi m_api;
136 ShaderType m_shaderType;
137 ShaderCompilationType m_shaderCompilationType;
138 ShaderSourceType m_shaderSourceType;
139 int m_majorVersion;
140 int m_minorVersion;
141 OpenGLContextProfile m_profile;
142 RenderableType m_renderableType;
143};
144
145QT_END_NAMESPACE
146
147#endif // QQUICKGRAPHICSINFO_P_H
void minorVersionChanged()
GraphicsApi api() const
void renderableTypeChanged()
static QQuickGraphicsInfo * qmlAttachedProperties(QObject *object)
void shaderCompilationTypeChanged()
ShaderCompilationType shaderCompilationType() const
void majorVersionChanged()
OpenGLContextProfile profile() const
ShaderSourceType shaderSourceType() const
ShaderType shaderType() const
void shaderSourceTypeChanged()
RenderableType renderableType() const
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
QGraphicsItem * item