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
141 }141 }
142}142}
143 143
144void 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
144void TabletProxy::addButtonsToHomeScreen() {153void TabletProxy::addButtonsToHomeScreen() {
145 auto tablet = getQmlTablet();154 auto tablet = getQmlTablet();
146 if (!tablet) {155 if (!tablet) {