mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Fixes #784
This commit is contained in:
parent
9f085e2c87
commit
02268c54ff
1 changed files with 7 additions and 0 deletions
|
@ -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; i<GetEepromInterface()->getCapability(CustomFunctions); i++) {
|
||||
playBT[i]->setProperty("state", "play");
|
||||
playBT[i]->setObjectName(QString("play_%1").arg(i));
|
||||
playBT[i]->setIcon(CompanionIcon("play.png"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue