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 | 155 | void TabletProxy::emitScriptEvent(QVariant msg) { |
| 147 | 156 | if (_qmlOffscreenSurface) { |
| 148 | 157 | QMetaObject::invokeMethod(_qmlOffscreenSurface, "emitScriptEvent", Qt::AutoConnection, Q_ARG(QVariant, msg)); |