History

Merge remote-tracking branch 'upstream/tablet-ui' into tablet-ui

Anthony J. Thibault committed 9 years ago

Commit e4a08702 parents 94c6cc8 9502a8b4 files · +59 −3Browse files

Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 4 files). Show all

Unified · Split

libraries/script-engine/src/TabletScriptingInterface.cpp+9−0
@@ -143,6 +143,15 @@ void TabletProxy::removeButton(QObject* tabletButtonProxy) { · 142 unmodified lines
143143 }
144144 }
145145
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+
146155 void TabletProxy::emitScriptEvent(QVariant msg) {
147156 if (_qmlOffscreenSurface) {
148157 QMetaObject::invokeMethod(_qmlOffscreenSurface, "emitScriptEvent", Qt::AutoConnection, Q_ARG(QVariant, msg));