122 |
int iDeviceID = -1; |
int iDeviceID = -1; |
123 |
switch (device.deviceType()) { |
switch (device.deviceType()) { |
124 |
case qsamplerDevice::Audio: |
case qsamplerDevice::Audio: |
125 |
pRootItem = m_pAudioItems; |
pRootItem = m_pAudioItems; |
126 |
if ((iDeviceID = ::lscp_create_audio_device(m_pClient, |
if ((iDeviceID = ::lscp_create_audio_device(m_pClient, |
127 |
device.driverName().latin1(), pParams)) < 0) |
device.driverName().latin1(), pParams)) < 0) |
128 |
m_pMainForm->appendMessagesClient("lscp_create_audio_device"); |
m_pMainForm->appendMessagesClient("lscp_create_audio_device"); |
129 |
break; |
break; |
130 |
case qsamplerDevice::Midi: |
case qsamplerDevice::Midi: |
131 |
pRootItem = m_pMidiItems; |
pRootItem = m_pMidiItems; |
132 |
if ((iDeviceID = ::lscp_create_midi_device(m_pClient, |
if ((iDeviceID = ::lscp_create_midi_device(m_pClient, |
133 |
device.driverName().latin1(), pParams)) < 0) |
device.driverName().latin1(), pParams)) < 0) |
134 |
m_pMainForm->appendMessagesClient("lscp_create_midi_device"); |
m_pMainForm->appendMessagesClient("lscp_create_midi_device"); |
167 |
|
|
168 |
// Prompt user if this is for real... |
// Prompt user if this is for real... |
169 |
qsamplerOptions *pOptions = m_pMainForm->options(); |
qsamplerOptions *pOptions = m_pMainForm->options(); |
170 |
if (pOptions && pOptions->bConfirmRemove) { |
if (pOptions && pOptions->bConfirmRemove) { |
171 |
if (QMessageBox::warning(this, tr("Warning"), |
if (QMessageBox::warning(this, tr("Warning"), |
172 |
tr("Delete %1 device:\n\n" |
tr("Delete %1 device:\n\n" |
173 |
"%2\n\n" |
"%2\n\n" |
174 |
"Are you sure?") |
"Are you sure?") |
175 |
.arg(device.deviceTypeName()) |
.arg(device.deviceTypeName()) |
176 |
.arg(device.deviceName()), |
.arg(device.deviceName()), |
177 |
tr("OK"), tr("Cancel")) > 0) |
tr("OK"), tr("Cancel")) > 0) |
178 |
return; |
return; |
179 |
} |
} |
180 |
|
|
181 |
// Now it depends on the device type... |
// Now it depends on the device type... |
182 |
lscp_status_t ret = LSCP_FAILED; |
lscp_status_t ret = LSCP_FAILED; |
339 |
void qsamplerDeviceForm::changeValue ( int iRow, int iCol ) |
void qsamplerDeviceForm::changeValue ( int iRow, int iCol ) |
340 |
{ |
{ |
341 |
if (m_iDirtySetup > 0) |
if (m_iDirtySetup > 0) |
342 |
return; |
return; |
343 |
if (iRow < 0 || iCol < 0) |
if (iRow < 0 || iCol < 0) |
344 |
return; |
return; |
345 |
|
|
346 |
// |
// |
347 |
// Device parameter change... |
// Device parameter change... |
348 |
// |
// |