901 |
DeviceItem::DeviceItem ( QTreeWidget* pTreeWidget, |
DeviceItem::DeviceItem ( QTreeWidget* pTreeWidget, |
902 |
Device::DeviceType deviceType ) |
Device::DeviceType deviceType ) |
903 |
: QTreeWidgetItem(pTreeWidget, QSAMPLER_DEVICE_ITEM), |
: QTreeWidgetItem(pTreeWidget, QSAMPLER_DEVICE_ITEM), |
904 |
m_device(deviceType) |
m_device(deviceType) |
905 |
{ |
{ |
906 |
switch(m_device.deviceType()) { |
switch(m_device.deviceType()) { |
907 |
case Device::Audio: |
case Device::Audio: |
924 |
Device::DeviceType deviceType, |
Device::DeviceType deviceType, |
925 |
int iDeviceID ) |
int iDeviceID ) |
926 |
: QTreeWidgetItem(pItem, QSAMPLER_DEVICE_ITEM), |
: QTreeWidgetItem(pItem, QSAMPLER_DEVICE_ITEM), |
927 |
m_device(deviceType, iDeviceID) |
m_device(deviceType, iDeviceID) |
928 |
{ |
{ |
929 |
switch(m_device.deviceType()) { |
switch(m_device.deviceType()) { |
930 |
case Device::Audio: |
case Device::Audio: |
1217 |
DeviceParameterRow r = index.model()->data(index, |
DeviceParameterRow r = index.model()->data(index, |
1218 |
Qt::DisplayRole).value<DeviceParameterRow> (); |
Qt::DisplayRole).value<DeviceParameterRow> (); |
1219 |
if (pEditor->metaObject()->className() == QString("QCheckBox")) { |
if (pEditor->metaObject()->className() == QString("QCheckBox")) { |
1220 |
QCheckBox* pCheckBox = static_cast<QCheckBox*> (pEditor); |
QCheckBox *pCheckBox = static_cast<QCheckBox *> (pEditor); |
1221 |
pModel->setData(index, QVariant(pCheckBox->checkState() == Qt::Checked)); |
pModel->setData(index, QVariant(pCheckBox->checkState() == Qt::Checked)); |
1222 |
} else if (pEditor->metaObject()->className() == QString("QComboBox")) { |
} else if (pEditor->metaObject()->className() == QString("QComboBox")) { |
1223 |
QComboBox* pComboBox = static_cast<QComboBox*> (pEditor); |
QComboBox *pComboBox = static_cast<QComboBox *> (pEditor); |
1224 |
pModel->setData(index, pComboBox->currentText()); |
pModel->setData(index, pComboBox->currentText()); |
1225 |
} else if (pEditor->metaObject()->className() == QString("QSpinBox")) { |
} else if (pEditor->metaObject()->className() == QString("QSpinBox")) { |
1226 |
QSpinBox* pSpinBox = static_cast<QSpinBox*> (pEditor); |
QSpinBox *pSpinBox = static_cast<QSpinBox *> (pEditor); |
1227 |
pModel->setData(index, pSpinBox->value()); |
pModel->setData(index, pSpinBox->value()); |
1228 |
} else if (pEditor->metaObject()->className() == QString("QLineEdit")) { |
} else if (pEditor->metaObject()->className() == QString("QLineEdit")) { |
1229 |
QLineEdit* pLineEdit = static_cast<QLineEdit*> (pEditor); |
QLineEdit *pLineEdit = static_cast<QLineEdit *> (pEditor); |
1230 |
pModel->setData(index, pLineEdit->text()); |
pModel->setData(index, pLineEdit->text()); |
1231 |
} else if (pEditor->metaObject()->className() == QString("QLabel")) { |
} else if (pEditor->metaObject()->className() == QString("QLabel")) { |
1232 |
QLabel* pLabel = static_cast<QLabel*> (pEditor); |
QLabel *pLabel = static_cast<QLabel *> (pEditor); |
1233 |
pModel->setData(index, pLabel->text()); |
pModel->setData(index, pLabel->text()); |
1234 |
} |
} |
1235 |
} |
} |