comparison widgets/PluginParameterBox.cpp @ 586:1ae54a29e59e

Merge from debug-output branch
author Chris Cannam
date Tue, 14 Jun 2011 14:48:29 +0100
parents f4960f8ce798
children 4806715f7a19
comparison
equal deleted inserted replaced
583:4c484636d5ec 586:1ae54a29e59e
223 m_nameMap.find(identifier) != m_nameMap.end()) { 223 m_nameMap.find(identifier) != m_nameMap.end()) {
224 identifier = m_nameMap[identifier]; 224 identifier = m_nameMap[identifier];
225 } 225 }
226 226
227 if (m_params.find(identifier) == m_params.end()) { 227 if (m_params.find(identifier) == m_params.end()) {
228 std::cerr << "WARNING: PluginParameterBox::dialChanged: Unknown parameter \"" << identifier.toStdString() << "\"" << std::endl; 228 std::cerr << "WARNING: PluginParameterBox::dialChanged: Unknown parameter \"" << identifier << "\"" << std::endl;
229 return; 229 return;
230 } 230 }
231 231
232 Vamp::PluginBase::ParameterDescriptor params = m_params[identifier].param; 232 Vamp::PluginBase::ParameterDescriptor params = m_params[identifier].param;
233 233
256 qtz = (max - min) / 100.0; 256 qtz = (max - min) / 100.0;
257 } 257 }
258 newValue = min + ival * qtz; 258 newValue = min + ival * qtz;
259 } 259 }
260 260
261 // std::cerr << "PluginParameterBox::dialChanged: newValue = " << newValue << std::endl; 261 // DEBUG << "PluginParameterBox::dialChanged: newValue = " << newValue << endl;
262 262
263 QDoubleSpinBox *spin = m_params[identifier].spin; 263 QDoubleSpinBox *spin = m_params[identifier].spin;
264 if (spin) { 264 if (spin) {
265 spin->blockSignals(true); 265 spin->blockSignals(true);
266 spin->setValue(newValue); 266 spin->setValue(newValue);
267 spin->blockSignals(false); 267 spin->blockSignals(false);
268 } 268 }
269 269
270 // std::cerr << "setting plugin parameter \"" << identifier.toStdString() << "\" to value " << newValue << std::endl; 270 // DEBUG << "setting plugin parameter \"" << identifier << "\" to value " << newValue << endl;
271 271
272 m_plugin->setParameter(identifier.toStdString(), newValue); 272 m_plugin->setParameter(identifier.toStdString(), newValue);
273 273
274 updateProgramCombo(); 274 updateProgramCombo();
275 275
286 m_nameMap.find(identifier) != m_nameMap.end()) { 286 m_nameMap.find(identifier) != m_nameMap.end()) {
287 identifier = m_nameMap[identifier]; 287 identifier = m_nameMap[identifier];
288 } 288 }
289 289
290 if (m_params.find(identifier) == m_params.end()) { 290 if (m_params.find(identifier) == m_params.end()) {
291 std::cerr << "WARNING: PluginParameterBox::checkBoxChanged: Unknown parameter \"" << identifier.toStdString() << "\"" << std::endl; 291 std::cerr << "WARNING: PluginParameterBox::checkBoxChanged: Unknown parameter \"" << identifier << "\"" << std::endl;
292 return; 292 return;
293 } 293 }
294 294
295 Vamp::PluginBase::ParameterDescriptor params = m_params[identifier].param; 295 Vamp::PluginBase::ParameterDescriptor params = m_params[identifier].param;
296 296
312 m_nameMap.find(identifier) != m_nameMap.end()) { 312 m_nameMap.find(identifier) != m_nameMap.end()) {
313 identifier = m_nameMap[identifier]; 313 identifier = m_nameMap[identifier];
314 } 314 }
315 315
316 if (m_params.find(identifier) == m_params.end()) { 316 if (m_params.find(identifier) == m_params.end()) {
317 std::cerr << "WARNING: PluginParameterBox::spinBoxChanged: Unknown parameter \"" << identifier.toStdString() << "\"" << std::endl; 317 std::cerr << "WARNING: PluginParameterBox::spinBoxChanged: Unknown parameter \"" << identifier << "\"" << std::endl;
318 return; 318 return;
319 } 319 }
320 320
321 Vamp::PluginBase::ParameterDescriptor params = m_params[identifier].param; 321 Vamp::PluginBase::ParameterDescriptor params = m_params[identifier].param;
322 322
350 dial->setValue(ival); 350 dial->setValue(ival);
351 } 351 }
352 dial->blockSignals(false); 352 dial->blockSignals(false);
353 } 353 }
354 354
355 std::cerr << "setting plugin parameter \"" << identifier.toStdString() << "\" to value " << value << std::endl; 355 DEBUG << "setting plugin parameter \"" << identifier << "\" to value " << value << endl;
356 356
357 m_plugin->setParameter(identifier.toStdString(), value); 357 m_plugin->setParameter(identifier.toStdString(), value);
358 358
359 updateProgramCombo(); 359 updateProgramCombo();
360 360