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
qopenxrruntimeinfo.cpp
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
5#include <QtQuick3DXr/private/qopenxrmanager_p.h>
6#include <QtQuick/QQuickWindow>
7#include <rhi/qrhi.h>
8
10
12 : QObject(parent),
13 m_openXRManager(manager)
14{
15}
16
18{
19 return m_openXRManager->m_enabledExtensions;
20}
21
23{
24 return m_openXRManager->m_runtimeName;
25}
26
28{
29 return m_openXRManager->m_runtimeVersion.toString();
30}
31
33{
34 // This matches what Qt Quick's GraphicsInfo would expose to QML, but that
35 // does not provide a string. We have seen way too many switch statements
36 // in JS for this. So have a string property here and call it a day.
37 if (m_openXRManager->isValid() && m_openXRManager->m_quickWindow) {
38 QRhi *rhi = m_openXRManager->m_quickWindow->rhi();
39 if (rhi)
40 return QString::fromLatin1(rhi->backendName());
41 }
42 return QLatin1String("Unknown");
43}
44
46{
47 return m_openXRManager->m_multiviewRendering;
48}
49
\inmodule QtCore
Definition qobject.h:103
bool isValid() const
QOpenXRRuntimeInfo(QOpenXRManager *manager, QObject *parent=nullptr)
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:1804
const char * backendName() const
Definition qrhi.cpp:8683
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:5871
Q_CORE_EXPORT QString toString() const
Returns a string with all of the segments delimited by a period ({.}).
Combined button and popup list for selecting options.
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
QNetworkAccessManager manager