From 02268c54ff947d3b3324169841c126e236bee426 Mon Sep 17 00:00:00 2001 From: Kjell Kernen Date: Sat, 8 Mar 2014 23:34:15 +0100 Subject: [PATCH] Fixes #784 --- companion/src/modeledit/customfunctions.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index b1805df46..e4c9ddadb 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -161,6 +161,12 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, connect(fswtchParamArmT[i], SIGNAL(editTextChanged ( const QString)), this, SLOT(customFunctionEdited())); #ifdef PHONON + phononLock=false; + clickObject = new Phonon::MediaObject(this); + clickOutput = new Phonon::AudioOutput(Phonon::NoCategory, this); + Phonon::createPath(clickObject, clickOutput); + connect(clickObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(mediaPlayer_state(Phonon::State,Phonon::State))); + playBT[i] = new QPushButton(this); playBT[i]->setProperty("index", i); playBT[i]->setProperty("state", "play"); @@ -203,6 +209,7 @@ void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::Sta clickObject->clearQueue(); clickObject->clear(); for (int i=0; igetCapability(CustomFunctions); i++) { + playBT[i]->setProperty("state", "play"); playBT[i]->setObjectName(QString("play_%1").arg(i)); playBT[i]->setIcon(CompanionIcon("play.png")); }