Showing the changes to interface/src/raypick/LaserPointerScriptingInterface.cpp (1 of 22 files). Show all
Unified · Split
| @@ -11,10 +11,19 @@ · 10 unmodified lines | |||
| 11 | 11 | ||
| 12 | #include "LaserPointerScriptingInterface.h" | 12 | #include "LaserPointerScriptingInterface.h" |
| 13 | 13 | ||
| 14 | #include <QVariant> | 14 | #include <QtCore/QVariant> |
| 15 | #include "GLMHelpers.h" | ||
| 16 | 15 | ||
| 17 | QUuid LaserPointerScriptingInterface::createLaserPointer(const QVariant& properties) { | 16 | #include <GLMHelpers.h> |
| 17 | #include <RegisteredMetaTypes.h> | ||
| 18 | |||
| 19 | void LaserPointerScriptingInterface::setIgnoreItems(const QUuid& uid, const QScriptValue& ignoreItems) const { | ||
| 20 | qApp->getLaserPointerManager().setIgnoreItems(uid, qVectorQUuidFromScriptValue(ignoreItems)); | ||
| 21 | } | ||
| 22 | void LaserPointerScriptingInterface::setIncludeItems(const QUuid& uid, const QScriptValue& includeItems) const { | ||
| 23 | qApp->getLaserPointerManager().setIncludeItems(uid, qVectorQUuidFromScriptValue(includeItems)); | ||
| 24 | } | ||
| 25 | |||
| 26 | QUuid LaserPointerScriptingInterface::createLaserPointer(const QVariant& properties) const { | ||
| 18 | QVariantMap propertyMap = properties.toMap(); | 27 | QVariantMap propertyMap = properties.toMap(); |
| 19 | 28 | ||
| 20 | bool faceAvatar = false; | 29 | bool faceAvatar = false; |
| @@ -69,7 +78,7 @@ QUuid LaserPointerScriptingInterface::createLaserPointer(const QVariant& propert · 48 unmodified lines | |||
| 69 | return qApp->getLaserPointerManager().createLaserPointer(properties, renderStates, defaultRenderStates, faceAvatar, centerEndY, lockEnd, enabled); | 78 | return qApp->getLaserPointerManager().createLaserPointer(properties, renderStates, defaultRenderStates, faceAvatar, centerEndY, lockEnd, enabled); |
| 70 | } | 79 | } |
| 71 | 80 | ||
| 72 | void LaserPointerScriptingInterface::editRenderState(QUuid uid, const QString& renderState, const QVariant& properties) { | 81 | void LaserPointerScriptingInterface::editRenderState(const QUuid& uid, const QString& renderState, const QVariant& properties) const { |
| 73 | QVariantMap propMap = properties.toMap(); | 82 | QVariantMap propMap = properties.toMap(); |
| 74 | 83 | ||
| 75 | QVariant startProps; | 84 | QVariant startProps; |
| @@ -90,7 +99,7 @@ void LaserPointerScriptingInterface::editRenderState(QUuid uid, const QString& r · 14 unmodified lines | |||
| 90 | qApp->getLaserPointerManager().editRenderState(uid, renderState.toStdString(), startProps, pathProps, endProps); | 99 | qApp->getLaserPointerManager().editRenderState(uid, renderState.toStdString(), startProps, pathProps, endProps); |
| 91 | } | 100 | } |
| 92 | 101 | ||
| 93 | const RenderState LaserPointerScriptingInterface::buildRenderState(const QVariantMap& propMap) { | 102 | RenderState LaserPointerScriptingInterface::buildRenderState(const QVariantMap& propMap) { |
| 94 | QUuid startID; | 103 | QUuid startID; |
| 95 | if (propMap["start"].isValid()) { | 104 | if (propMap["start"].isValid()) { |
| 96 | QVariantMap startMap = propMap["start"].toMap(); | 105 | QVariantMap startMap = propMap["start"].toMap(); |