Mercurial > hg > svgui
comparison widgets/PluginParameterDialog.cpp @ 164:11949d0b2739
* Add system-specific LADSPA and DSSI plugin paths (for OS/X and Windows)
* Add ability to open more than one audio file at once from the command line
* Add plugin input source selection (with some caveats)
* Show name of file being decoded in Ogg/mp3 decode progress dialog
author | Chris Cannam |
---|---|
date | Thu, 12 Oct 2006 14:56:28 +0000 |
parents | dd6dd983e8ef |
children | 78d523e8433e |
comparison
equal
deleted
inserted
replaced
163:dd6dd983e8ef | 164:11949d0b2739 |
---|---|
89 label = new QLabel(tr("Type:")); | 89 label = new QLabel(tr("Type:")); |
90 label->setAlignment(Qt::AlignTop | Qt::AlignLeft); | 90 label->setAlignment(Qt::AlignTop | Qt::AlignLeft); |
91 subgrid->addWidget(label, row, 0); | 91 subgrid->addWidget(label, row, 0); |
92 subgrid->addWidget(typeLabel, row, 1); | 92 subgrid->addWidget(typeLabel, row, 1); |
93 row++; | 93 row++; |
94 | 94 |
95 m_outputLabel = new QLabel(tr("Output:")); | 95 m_outputLabel = new QLabel(tr("Output:")); |
96 m_outputLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); | 96 m_outputLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); |
97 subgrid->addWidget(m_outputLabel, row, 0); | 97 subgrid->addWidget(m_outputLabel, row, 0); |
98 m_outputValue = new QLabel; | 98 m_outputValue = new QLabel; |
99 subgrid->addWidget(m_outputValue, row, 1); | 99 subgrid->addWidget(m_outputValue, row, 1); |
119 subgrid->addWidget(versionLabel, row, 1); | 119 subgrid->addWidget(versionLabel, row, 1); |
120 row++; | 120 row++; |
121 | 121 |
122 subgrid->setColumnStretch(1, 2); | 122 subgrid->setColumnStretch(1, 2); |
123 | 123 |
124 m_inputModelBox = new QGroupBox; | |
125 m_inputModelBox->setTitle(tr("Input Source")); | |
126 grid->addWidget(m_inputModelBox, 1, 0); | |
127 | |
128 m_inputModels = new QComboBox; | |
129 QHBoxLayout *inputLayout = new QHBoxLayout; | |
130 m_inputModelBox->setLayout(inputLayout); | |
131 inputLayout->addWidget(m_inputModels); | |
132 m_inputModelBox->hide(); | |
133 | |
124 QGroupBox *paramBox = new QGroupBox; | 134 QGroupBox *paramBox = new QGroupBox; |
125 paramBox->setTitle(tr("Plugin Parameters")); | 135 paramBox->setTitle(tr("Plugin Parameters")); |
126 grid->addWidget(paramBox, 1, 0); | 136 grid->addWidget(paramBox, 2, 0); |
127 grid->setRowStretch(1, 10); | 137 grid->setRowStretch(2, 10); |
128 | 138 |
129 QHBoxLayout *paramLayout = new QHBoxLayout; | 139 QHBoxLayout *paramLayout = new QHBoxLayout; |
130 paramLayout->setMargin(0); | 140 paramLayout->setMargin(0); |
131 paramBox->setLayout(paramLayout); | 141 paramBox->setLayout(paramLayout); |
132 | 142 |
143 | 153 |
144 m_advanced = new QFrame; | 154 m_advanced = new QFrame; |
145 QVBoxLayout *advancedLayout = new QVBoxLayout; | 155 QVBoxLayout *advancedLayout = new QVBoxLayout; |
146 advancedLayout->setMargin(0); | 156 advancedLayout->setMargin(0); |
147 m_advanced->setLayout(advancedLayout); | 157 m_advanced->setLayout(advancedLayout); |
148 grid->addWidget(m_advanced, 2, 0); | 158 grid->addWidget(m_advanced, 3, 0); |
149 | 159 |
150 bool haveAdvanced = false; | 160 bool haveAdvanced = false; |
151 | 161 |
152 m_channelBox = new QGroupBox; | 162 m_channelBox = new QGroupBox; |
153 m_channelBox->setTitle(tr("Channels")); | 163 m_channelBox->setTitle(tr("Channels")); |
206 m_outputValue->setText(text); | 216 m_outputValue->setText(text); |
207 m_outputValue->setWordWrap(true); | 217 m_outputValue->setWordWrap(true); |
208 m_outputLabel->show(); | 218 m_outputLabel->show(); |
209 m_outputValue->show(); | 219 m_outputValue->show(); |
210 } | 220 } |
211 /* | |
212 QLabel *outputLabel = 0; | |
213 | |
214 if (output != "") { | |
215 | |
216 Vamp::PluginHostAdapter *fePlugin = dynamic_cast<Vamp::PluginHostAdapter *>(m_plugin); | |
217 | |
218 if (fePlugin) { | |
219 | |
220 std::vector<Vamp::Plugin::OutputDescriptor> od = | |
221 fePlugin->getOutputDescriptors(); | |
222 | |
223 if (od.size() > 1) { | |
224 | |
225 for (size_t i = 0; i < od.size(); ++i) { | |
226 if (od[i].name == output.toStdString()) { | |
227 outputLabel = new QLabel(od[i].description.c_str()); | |
228 outputLabel->setWordWrap(true); | |
229 break; | |
230 } | |
231 } | |
232 } | |
233 } | |
234 } | |
235 */ | |
236 } | 221 } |
237 | 222 |
238 void | 223 void |
239 PluginParameterDialog::setChannelArrangement(int sourceChannels, | 224 PluginParameterDialog::setChannelArrangement(int sourceChannels, |
240 int targetChannels, | 225 int targetChannels, |
396 | 381 |
397 setAdvancedVisible(m_advancedVisible); | 382 setAdvancedVisible(m_advancedVisible); |
398 } | 383 } |
399 | 384 |
400 void | 385 void |
386 PluginParameterDialog::setCandidateInputModels(const QStringList &models) | |
387 { | |
388 m_inputModels->clear(); | |
389 m_inputModels->insertItems(0, models); | |
390 connect(m_inputModels, SIGNAL(activated(const QString &)), | |
391 this, SIGNAL(inputModelChanged(QString))); | |
392 m_inputModelBox->show(); | |
393 } | |
394 | |
395 QString | |
396 PluginParameterDialog::getInputModel() const | |
397 { | |
398 return m_inputModels->currentText(); | |
399 } | |
400 | |
401 void | |
401 PluginParameterDialog::getProcessingParameters(size_t &blockSize) const | 402 PluginParameterDialog::getProcessingParameters(size_t &blockSize) const |
402 { | 403 { |
403 blockSize = m_blockSize; | 404 blockSize = m_blockSize; |
404 return; | 405 return; |
405 } | 406 } |