/[svn]/qsampler/trunk/src/qsamplerDevice.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerDevice.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1510 by capela, Thu Nov 22 14:17:24 2007 UTC revision 1511 by schoenebeck, Thu Nov 22 21:22:34 2007 UTC
# Line 1213  void DeviceParamDelegate::setModelData ( Line 1213  void DeviceParamDelegate::setModelData (
1213          if (index.column() == 1) {          if (index.column() == 1) {
1214                  DeviceParameterRow r = index.model()->data(index,                  DeviceParameterRow r = index.model()->data(index,
1215                          Qt::DisplayRole).value<DeviceParameterRow> ();                          Qt::DisplayRole).value<DeviceParameterRow> ();
1216                  if (pEditor->metaObject()->className() == "QCheckBox") {                  if (pEditor->metaObject()->className() == QString("QCheckBox")) {
1217                          QCheckBox* pCheckBox = static_cast<QCheckBox*> (pEditor);                          QCheckBox* pCheckBox = static_cast<QCheckBox*> (pEditor);
1218                          pModel->setData(index, QVariant(pCheckBox->checkState() == Qt::Checked));                          pModel->setData(index, QVariant(pCheckBox->checkState() == Qt::Checked));
1219                  } else if (pEditor->metaObject()->className() == "QComboBox") {                  } else if (pEditor->metaObject()->className() == QString("QComboBox")) {
1220                          QComboBox* pComboBox = static_cast<QComboBox*> (pEditor);                          QComboBox* pComboBox = static_cast<QComboBox*> (pEditor);
1221                          pModel->setData(index, pComboBox->currentText());                          pModel->setData(index, pComboBox->currentText());
1222                  } else if (pEditor->metaObject()->className() == "QSpinBox") {                  } else if (pEditor->metaObject()->className() == QString("QSpinBox")) {
1223                          QSpinBox* pSpinBox = static_cast<QSpinBox*> (pEditor);                          QSpinBox* pSpinBox = static_cast<QSpinBox*> (pEditor);
1224                          pModel->setData(index, pSpinBox->value());                          pModel->setData(index, pSpinBox->value());
1225                  } else if (pEditor->metaObject()->className() == "QLineEdit") {                  } else if (pEditor->metaObject()->className() == QString("QLineEdit")) {
1226                          QLineEdit* pLineEdit = static_cast<QLineEdit*> (pEditor);                          QLineEdit* pLineEdit = static_cast<QLineEdit*> (pEditor);
1227                          pModel->setData(index, pLineEdit->text());                          pModel->setData(index, pLineEdit->text());
1228                  } else if (pEditor->metaObject()->className() == "QLabel") {                  } else if (pEditor->metaObject()->className() == QString("QLabel")) {
1229                          QLabel* pLabel = static_cast<QLabel*> (pEditor);                          QLabel* pLabel = static_cast<QLabel*> (pEditor);
1230                          pModel->setData(index, pLabel->text());                          pModel->setData(index, pLabel->text());
1231                  }                  }

Legend:
Removed from v.1510  
changed lines
  Added in v.1511

  ViewVC Help
Powered by ViewVC