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) 2023 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>
20#include "qopenxrhandinput_p.h"
23#include <QtQuick3D/private/qquick3dnode_p.h>
24#include <QtQml/QQmlEngine>
25
27
29class Q_QUICK3DXR_EXPORT QOpenXRController : public QQuick3DNode
30{
32 Q_PROPERTY(Controller controller READ controller WRITE setController NOTIFY controllerChanged)
33 Q_PROPERTY(QOpenXRActionMapper* actionMapper READ actionMapper WRITE setActionMapper NOTIFY actionMapperChanged FINAL)
34 Q_PROPERTY(QOpenXRHandInput* handInput READ handInput NOTIFY handInputChanged)
35 QML_NAMED_ELEMENT(XrController)
36public:
38 ControllerNone = 0,
39 ControllerLeft = 1,
40 ControllerRight = 2,
41 ControllerGamepad = 3
42 };
44
46
47 QOpenXRController::Controller controller() const;
48 void setController(QOpenXRController::Controller newController);
49
50 QOpenXRHandInput *handInput() const;
51 Q_INVOKABLE QOpenXRGamepadInput *gamepadInput() const;
52
53 QOpenXRActionMapper *actionMapper() const;
54 void setActionMapper(QOpenXRActionMapper *newActionMapper);
55
60
61private:
62#if defined(Q_NO_TEMPORARY_DISABLE_XR_API)
63 QOpenXRInputManager *m_inputManager = nullptr;
64#endif // Q_NO_TEMPORARY_DISABLE_XR_API
65 QOpenXRActionMapper *m_actionMapper = nullptr;
66 Controller m_controller = ControllerNone;
67 QMetaObject::Connection m_posePositionConnection;
68 QMetaObject::Connection m_poseRotationConnection;
69 QMetaObject::Connection m_isActiveConnection;
70 QMetaObject::Connection m_inputActionConnection;
71 QMetaObject::Connection m_actionMapperConnection;
72};
73
75
76#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 Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_SIGNALS