19 m_controller = qobject_cast<QOpenXRController *>(
parent());
28 if (m_actionMap[
id] ==
nullptr) {
29 m_actionMap[
id] = action;
39 const auto idList = action->
actionId();
40 for (
const auto &
id : idList) {
42 m_actionMap[
id] =
nullptr;
49 auto set = [](
auto action,
auto value) {
59 if (
auto *action = m_actionMap[
id])
65 for (
auto *action : std::as_const(m_extraActions)) {
74 const auto idList = action->
actionId();
75 bool needsExtra = idList.
isEmpty();
76 for (
const auto &
id : idList) {
78 needsExtra = !insertAction(action,
id) || needsExtra;
81 m_extraActions.
append(action);
100 if (m_pressed == newPressed)
102 m_pressed = newPressed;
115 if (m_actionName == newActionName)
117 m_actionName = newActionName;
137 auto *
mapper = qobject_cast<QOpenXRActionMapper *>(
parent());
139 mapper->registerAction(
this);
149 if (m_actionIds == newActionId)
151 m_actionIds = newActionId;
bool isEmpty() const noexcept
qsizetype removeAll(const AT &t)
void append(parameter_type t)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
void handleInput(InputAction id, const char *shortName, float value)
void inputValueChange(InputAction id, QString shortName, float value)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
QOpenXRActionMapper(QQuick3DObject *parent=nullptr)
void registerAction(QOpenXrInputAction *action)
void classBegin() override
Invoked after class creation, but before any properties have been set.
void setActionMapper(QOpenXRActionMapper *newActionMapper)
QOpenXRActionMapper * actionMapper
\qmltype Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DObject \inherits QtObject
QQuick3DObject * parent
\qmlproperty Object3D QtQuick3D::Object3D::parent This property holds the parent of the Object3D in a...
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
QFuture< QSet< QChar > > set
[10]
bool contains(const AT &t) const noexcept