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
qopenxrcontroller_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QOPENXRCONTROLLER_H
5#define QOPENXRCONTROLLER_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 <QtQuick3DXr/qtquick3dxrglobal.h>
21#include <QtQuick3D/private/qquick3dnode_p.h>
22#include <QtQml/QQmlEngine>
23
25
27
28class Q_QUICK3DXR_EXPORT QOpenXRController : public QQuick3DNode
29{
31 Q_PROPERTY(Controller controller READ controller WRITE setController NOTIFY controllerChanged)
32 Q_PROPERTY(QOpenXRActionMapper* actionMapper READ actionMapper WRITE setActionMapper NOTIFY actionMapperChanged FINAL)
33 Q_PROPERTY(QQuick3DXrHandInput* handInput READ handInput NOTIFY handInputChanged)
34 QML_NAMED_ELEMENT(XrController)
36public:
38 ControllerNone = 0,
39 ControllerLeft = 1,
40 ControllerRight = 2,
41 };
43
45
46 QOpenXRController::Controller controller() const;
47 void setController(QOpenXRController::Controller newController);
48
49 QQuick3DXrHandInput *handInput() const;
50
51 QOpenXRActionMapper *actionMapper() const;
52 void setActionMapper(QOpenXRActionMapper *newActionMapper);
53
58
59private:
60 QPointer<QQuick3DXrInputManager> m_inputManager;
61 QOpenXRActionMapper *m_actionMapper = nullptr;
62 Controller m_controller = ControllerNone;
63 QMetaObject::Connection m_posePositionConnection;
64 QMetaObject::Connection m_poseRotationConnection;
65 QMetaObject::Connection m_isActiveConnection;
66 QMetaObject::Connection m_inputActionConnection;
67 QMetaObject::Connection m_actionMapperConnection;
68};
69
71
72#endif // QOPENXRCONTROLLER_H
\inmodule QtCore Represents a handle to a signal-slot (or signal-functor) connection.
void controllerChanged()
void actionMapperChanged()
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS