Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -143,6 +143,15 @@ void TabletProxy::removeButton(QObject* tabletButtonProxy) { · 142 unmodified lines | |||
| 143 | } | 143 | } |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | void TabletProxy::updateAudioBar(const double micLevel) { | ||
| 147 | auto tablet = getQmlTablet(); | ||
| 148 | if (!tablet) { | ||
| 149 | qCCritical(scriptengine) << "Could not find tablet in TabletRoot.qml"; | ||
| 150 | } else { | ||
| 151 | QMetaObject::invokeMethod(tablet, "setMicLevel", Qt::AutoConnection, Q_ARG(QVariant, QVariant(micLevel))); | ||
| 152 | } | ||
| 153 | } | ||
| 154 | |||
| 146 | void TabletProxy::emitScriptEvent(QVariant msg) { | 155 | void TabletProxy::emitScriptEvent(QVariant msg) { |
| 147 | if (_qmlOffscreenSurface) { | 156 | if (_qmlOffscreenSurface) { |
| 148 | QMetaObject::invokeMethod(_qmlOffscreenSurface, "emitScriptEvent", Qt::AutoConnection, Q_ARG(QVariant, msg)); | 157 | QMetaObject::invokeMethod(_qmlOffscreenSurface, "emitScriptEvent", Qt::AutoConnection, Q_ARG(QVariant, msg)); |