Mercurial > hg > svgui
comparison widgets/PropertyBox.cpp @ 64:10bcd53ddc71
* Add icon for playback plugin edit button
* Make playback plugins respond to parameter & program changes while their
edit dialog is still visible
author | Chris Cannam |
---|---|
date | Thu, 23 Mar 2006 18:42:17 +0000 |
parents | fb02fe13ff47 |
children | 6dad2724f3aa |
comparison
equal
deleted
inserted
replaced
63:fb02fe13ff47 | 64:10bcd53ddc71 |
---|---|
152 layout->setAlignment(playButton, Qt::AlignVCenter); | 152 layout->setAlignment(playButton, Qt::AlignVCenter); |
153 | 153 |
154 layout->insertStretch(-1, 10); | 154 layout->insertStretch(-1, 10); |
155 | 155 |
156 if (params->getPlayPluginId() != "") { | 156 if (params->getPlayPluginId() != "") { |
157 QPushButton *pluginButton = new QPushButton("E"); | 157 QPushButton *pluginButton = new QPushButton(QIcon(":icons/faders.png"), ""); |
158 pluginButton->setFixedWidth(24); | |
159 pluginButton->setFixedHeight(24); | |
158 layout->addWidget(pluginButton); | 160 layout->addWidget(pluginButton); |
159 connect(pluginButton, SIGNAL(clicked()), | 161 connect(pluginButton, SIGNAL(clicked()), |
160 this, SLOT(editPlugin())); | 162 this, SLOT(editPlugin())); |
161 } | 163 } |
162 | 164 |
484 if (!instance) return; | 486 if (!instance) return; |
485 | 487 |
486 instance->setParametersFromXml(configurationXml); | 488 instance->setParametersFromXml(configurationXml); |
487 | 489 |
488 PluginParameterDialog *dialog = new PluginParameterDialog(instance); | 490 PluginParameterDialog *dialog = new PluginParameterDialog(instance); |
491 connect(dialog, SIGNAL(pluginConfigurationChanged(QString)), | |
492 this, SLOT(pluginConfigurationChanged(QString))); | |
493 | |
489 if (dialog->exec() == QDialog::Accepted) { | 494 if (dialog->exec() == QDialog::Accepted) { |
490 params->setPlayPluginConfiguration(instance->toXmlString()); | 495 params->setPlayPluginConfiguration(instance->toXmlString()); |
496 } else { | |
497 // restore in case we mucked about with the configuration | |
498 // as a consequence of signals from the dialog | |
499 params->setPlayPluginConfiguration(configurationXml); | |
491 } | 500 } |
492 | 501 |
493 delete dialog; | 502 delete dialog; |
494 delete instance; | 503 delete instance; |
495 } | 504 } |
496 | 505 |
506 void | |
507 PropertyBox::pluginConfigurationChanged(QString configurationXml) | |
508 { | |
509 PlayParameters *params = m_container->getPlayParameters(); | |
510 if (!params) return; | |
511 | |
512 params->setPlayPluginConfiguration(configurationXml); | |
513 } | |
514 | |
515 | |
516 | |
497 #ifdef INCLUDE_MOCFILES | 517 #ifdef INCLUDE_MOCFILES |
498 #include "PropertyBox.moc.cpp" | 518 #include "PropertyBox.moc.cpp" |
499 #endif | 519 #endif |
500 | 520 |