8QQuick3DXrActionMapper::QQuick3DXrActionMapper(
QObject *parent) :
QObject(parent)
31 auto set = [](
auto action,
auto value) {
32 action->setValue(
value);
34 action->setPressed(
value > 0.9);
40 QList<QQuick3DXrInputAction *> actions;
44 actions = that->m_actions.values(
actionIntKey(
id, hand));
47 for (
const auto &action : std::as_const(actions))
56 const auto &idList = action->
actionId();
57 const auto hand = action->
hand();
59 if (idList.isEmpty()) {
62 for (
const auto &
id : idList) {
75 const auto idList = action->
actionId();
76 const auto hand = action->
hand();
77 if (idList.isEmpty()) {
78 that->m_customActions.remove(action->
actionName(), action);
80 for (
const auto &
id : idList) {
117 if (m_pressed == newPressed)
119 m_pressed = newPressed;
139 if (m_actionName == newActionName)
141 const bool needsRemap = m_actionIds.
isEmpty() && m_componentComplete;
144 m_actionName = newActionName;
175 m_componentComplete =
true;
244 if (m_actionIds == newActionId)
247 if (m_componentComplete)
250 m_actionIds = newActionId;
252 if (m_componentComplete)
266 if (m_hand == newHand)
bool isEmpty() const noexcept
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...
static void registerAction(QQuick3DXrInputAction *action)
static void handleInput(QQuick3DXrInputAction::Action id, QQuick3DXrInputAction::Hand hand, const char *shortName, float value)
static QQuick3DXrActionMapper * instance()
static void removeAction(QQuick3DXrInputAction *action)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
static quint32 actionIntKey(const QQuick3DXrInputAction::Action id, const QQuick3DXrInputAction::Hand hand)
static QString actionStringKey(const QString &name, const QQuick3DXrInputAction::Hand hand)
QFuture< QSet< QChar > > set
[10]