426 |
bool bEnabled = (device.deviceID() < 0 || !param.fix); |
bool bEnabled = (device.deviceID() < 0 || !param.fix); |
427 |
QTable::setText(iRow, 0, iter.key()); |
QTable::setText(iRow, 0, iter.key()); |
428 |
QTable::setText(iRow, 1, param.description); |
QTable::setText(iRow, 1, param.description); |
429 |
if (param.type == LSCP_TYPE_BOOL) { |
if (param.type == LSCP_TYPE_BOOL && bEnabled) { |
430 |
QStringList opts; |
QStringList opts; |
431 |
opts.append(tr("false")); |
opts.append(tr("false")); |
432 |
opts.append(tr("true")); |
opts.append(tr("true")); |
434 |
pComboItem->setCurrentItem(param.value.lower() == "true" ? 1 : 0); |
pComboItem->setCurrentItem(param.value.lower() == "true" ? 1 : 0); |
435 |
pComboItem->setEnabled(bEnabled); |
pComboItem->setEnabled(bEnabled); |
436 |
QTable::setItem(iRow, 2, pComboItem); |
QTable::setItem(iRow, 2, pComboItem); |
437 |
} else if (param.possibilities.count() > 0) { |
} else if (param.possibilities.count() > 0 && bEnabled) { |
438 |
QComboTableItem *pComboItem = new QComboTableItem(this, |
QComboTableItem *pComboItem = new QComboTableItem(this, |
439 |
param.possibilities); |
param.possibilities); |
440 |
pComboItem->setCurrentItem(param.value); |
pComboItem->setCurrentItem(param.value); |
441 |
pComboItem->setEnabled(bEnabled); |
pComboItem->setEnabled(bEnabled); |
442 |
pComboItem->setEditable(bEnabled && param.multiplicity); |
pComboItem->setEditable(bEnabled && param.multiplicity); |
443 |
QTable::setItem(iRow, 2, pComboItem); |
QTable::setItem(iRow, 2, pComboItem); |
444 |
} else if (param.type == LSCP_TYPE_INT |
} else if (param.type == LSCP_TYPE_INT && bEnabled |
445 |
&& !param.range_min.isEmpty() |
&& !param.range_min.isEmpty() |
446 |
&& !param.range_max.isEmpty()) { |
&& !param.range_max.isEmpty()) { |
447 |
qsamplerDeviceParamTableSpinBox *pSpinItem = |
qsamplerDeviceParamTableSpinBox *pSpinItem = |