102 |
if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) |
if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) |
103 |
return; |
return; |
104 |
|
|
105 |
qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
const qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
106 |
|
|
107 |
// Build the parameter list... |
// Build the parameter list... |
108 |
qsamplerDeviceParamMap& params = device.params(); |
const qsamplerDeviceParamMap& params = device.params(); |
109 |
lscp_param_t *pParams = new lscp_param_t [params.count() + 1]; |
lscp_param_t *pParams = new lscp_param_t [params.count() + 1]; |
110 |
int iParam = 0; |
int iParam = 0; |
111 |
qsamplerDeviceParamMap::ConstIterator iter; |
qsamplerDeviceParamMap::ConstIterator iter; |
164 |
if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) |
if (pItem == NULL || pItem->rtti() != QSAMPLER_DEVICE_ITEM) |
165 |
return; |
return; |
166 |
|
|
167 |
qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
const qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
168 |
|
|
169 |
// Prompt user if this is for real... |
// Prompt user if this is for real... |
170 |
qsamplerOptions *pOptions = m_pMainForm->options(); |
qsamplerOptions *pOptions = m_pMainForm->options(); |
277 |
if (m_bNewDevice) { |
if (m_bNewDevice) { |
278 |
m_iDirtySetup++; |
m_iDirtySetup++; |
279 |
device.setDriver(m_pClient, sDriverName); |
device.setDriver(m_pClient, sDriverName); |
280 |
DeviceParamTable->refresh(device); |
DeviceParamTable->refresh(device.params(), m_bNewDevice); |
281 |
m_iDirtySetup--; |
m_iDirtySetup--; |
282 |
// Done. |
// Done. |
283 |
stabilizeForm(); |
stabilizeForm(); |
332 |
DriverNameTextLabel->setEnabled(m_bNewDevice); |
DriverNameTextLabel->setEnabled(m_bNewDevice); |
333 |
DriverNameComboBox->setEnabled(m_bNewDevice); |
DriverNameComboBox->setEnabled(m_bNewDevice); |
334 |
// Fill the device parameter table... |
// Fill the device parameter table... |
335 |
DeviceParamTable->refresh(device); |
DeviceParamTable->refresh(device.params(), m_bNewDevice); |
336 |
// Done. |
// Done. |
337 |
m_iDirtySetup--; |
m_iDirtySetup--; |
338 |
stabilizeForm(); |
stabilizeForm(); |
359 |
qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
qsamplerDevice& device = ((qsamplerDeviceItem *) pItem)->device(); |
360 |
|
|
361 |
// Table 1st column has the parameter name; |
// Table 1st column has the parameter name; |
362 |
qsamplerDeviceParamMap& params = device.params(); |
const qsamplerDeviceParamMap& params = device.params(); |
363 |
const QString sParam = DeviceParamTable->text(iRow, 0); |
const QString sParam = DeviceParamTable->text(iRow, 0); |
364 |
const QString sValue = DeviceParamTable->text(iRow, iCol); |
const QString sValue = DeviceParamTable->text(iRow, iCol); |
365 |
params[sParam].value = sValue; |
|
366 |
|
// Set the local device parameter value. |
367 |
|
device.setParam(sParam, sValue); |
368 |
|
|
369 |
// Set proper device parameter, on existing device ... |
// Set proper device parameter, on existing device ... |
370 |
if (device.deviceID() >= 0) { |
if (device.deviceID() >= 0) { |