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
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
4#ifndef QQUICKGRAPHICSINFO_P_H
5#define QQUICKGRAPHICSINFO_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 <QtCore/qobject.h>
19#include <QtCore/qpointer.h>
20#include <QtQml/qqml.h>
21#include <QtGui/qsurfaceformat.h>
22#include <QtQuick/qsgrendererinterface.h>
23#include <QtCore/private/qglobal_p.h>
24
26
27class QQuickItem;
28class QQuickWindow;
29
31{
37
42
43 QML_NAMED_ELEMENT(GraphicsInfo)
45 QML_UNCREATABLE("GraphicsInfo is only available via attached properties.")
47
48public:
67
75
81
88
95
102
104
106
107 GraphicsApi api() const { return m_api; }
108 ShaderType shaderType() const { return m_shaderType; }
109 ShaderCompilationType shaderCompilationType() const { return m_shaderCompilationType; }
110 ShaderSourceType shaderSourceType() const { return m_shaderSourceType; }
111
112 int majorVersion() const { return m_majorVersion; }
113 int minorVersion() const { return m_minorVersion; }
114 OpenGLContextProfile profile() const { return m_profile; }
115 RenderableType renderableType() const { return m_renderableType; }
116
122
127
128private Q_SLOTS:
129 void updateInfo();
130 void setWindow(QQuickWindow *window);
131
132private:
133 QPointer<QQuickWindow> m_window;
134 GraphicsApi m_api;
135 ShaderType m_shaderType;
136 ShaderCompilationType m_shaderCompilationType;
137 ShaderSourceType m_shaderSourceType;
138 int m_majorVersion;
139 int m_minorVersion;
140 OpenGLContextProfile m_profile;
141 RenderableType m_renderableType;
142};
143
145
146#endif // QQUICKGRAPHICSINFO_P_H
\inmodule QtCore
Definition qobject.h:103
void minorVersionChanged()
GraphicsApi api() const
void renderableTypeChanged()
ShaderSourceType shaderSourceType
static QQuickGraphicsInfo * qmlAttachedProperties(QObject *object)
void shaderCompilationTypeChanged()
QQuickGraphicsInfo(QQuickItem *item=nullptr)
\qmltype GraphicsInfo \instantiates QQuickGraphicsInfo \inqmlmodule QtQuick
ShaderCompilationType shaderCompilationType() const
void majorVersionChanged()
OpenGLContextProfile profile() const
OpenGLContextProfile profile
ShaderSourceType shaderSourceType() const
ShaderType shaderType() const
void shaderSourceTypeChanged()
RenderableType renderableType() const
RenderableType renderableType
ShaderCompilationType shaderCompilationType
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
Definition glsl_p.h:22
Combined button and popup list for selecting options.
static const QCssKnownValue properties[NumProperties - 1]
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
QGraphicsItem * item
aWidget window() -> setWindowTitle("New Window Title")
[2]