void ULeapGesture::SetGesture(const Leap::Gesture &Gesture) { Private->Gesture = Gesture; Duration = Private->Gesture.duration(); DurationSeconds = Private->Gesture.durationSeconds(); Id = Private->Gesture.id(); IsValid = Private->Gesture.isValid(); State = gestureState(Private->Gesture.state()); Type = gestureType(Private->Gesture.type()); }
int QGesture::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< Qt::GestureState*>(_v) = state(); break; case 1: *reinterpret_cast< Qt::GestureType*>(_v) = gestureType(); break; case 2: *reinterpret_cast< QGesture::GestureCancelPolicy*>(_v) = gestureCancelPolicy(); break; case 3: *reinterpret_cast< QPointF*>(_v) = hotSpot(); break; case 4: *reinterpret_cast< bool*>(_v) = hasHotSpot(); break; } _id -= 5; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 2: setGestureCancelPolicy(*reinterpret_cast< QGesture::GestureCancelPolicy*>(_v)); break; case 3: setHotSpot(*reinterpret_cast< QPointF*>(_v)); break; } _id -= 5; } else if (_c == QMetaObject::ResetProperty) { switch (_id) { case 3: unsetHotSpot(); break; } _id -= 5; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 5; } #endif // QT_NO_PROPERTIES return _id; }