History

fill in updateAudioBar function, invokes qml function

Faye Li committed 9 years ago

Commit d8227a61 parent 68aacfe1 file · +9 −0Browse files

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

Unified · Split

libraries/script-engine/src/TabletScriptingInterface.cpp+9−0
@@ -141,6 +141,15 @@ void TabletProxy::removeButton(QObject* tabletButtonProxy) { · 140 unmodified lines
141141 }
142142 }
143143
144+void TabletProxy::updateAudioBar(const double micLevel) {
145+ auto tablet = getQmlTablet();
146+ if (!tablet) {
147+ qCCritical(scriptengine) << "Could not find tablet in TabletRoot.qml";
148+ } else {
149+ QMetaObject::invokeMethod(tablet, "setMicLevel", Qt::AutoConnection, Q_ARG(QVariant, QVariant::QVariant(micLevel)));
150+ }
151+}
152+
144153 void TabletProxy::addButtonsToHomeScreen() {
145154 auto tablet = getQmlTablet();
146155 if (!tablet) {