/[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 446 by capela, Thu Mar 10 15:48:38 2005 UTC revision 447 by capela, Thu Mar 10 20:45:42 2005 UTC
# Line 444  void qsamplerDeviceParamTable::refresh ( Line 444  void qsamplerDeviceParamTable::refresh (
444              } else if (param.type == LSCP_TYPE_INT) {              } else if (param.type == LSCP_TYPE_INT) {
445                  qsamplerDeviceParamTableSpinBox *pSpinItem =                  qsamplerDeviceParamTableSpinBox *pSpinItem =
446                                  new qsamplerDeviceParamTableSpinBox(this,                                  new qsamplerDeviceParamTableSpinBox(this,
447                                          bEnabled ? QTableItem::OnTyping : QTableItem::Never);                                      bEnabled ? QTableItem::OnTyping : QTableItem::Never,
448                          pSpinItem->setMinValue(param.range_min.toInt());                                          param.value);
449                          pSpinItem->setMaxValue(param.range_max.toInt());                          if (!param.range_min.isEmpty())
450                          pSpinItem->setValue(param.value.toInt());                                  pSpinItem->setMinValue(param.range_min.toInt());
451                            if (!param.range_max.isEmpty())
452                                    pSpinItem->setMaxValue(param.range_max.toInt());
453                          QTable::setItem(iRow, 2, pSpinItem);                          QTable::setItem(iRow, 2, pSpinItem);
454                  } else {                  } else {
455              qsamplerDeviceParamTableEditBox *pEditItem =              qsamplerDeviceParamTableEditBox *pEditItem =
# Line 474  void qsamplerDeviceParamTable::refresh ( Line 476  void qsamplerDeviceParamTable::refresh (
476    
477  // Constructor.  // Constructor.
478  qsamplerDeviceParamTableSpinBox::qsamplerDeviceParamTableSpinBox (  qsamplerDeviceParamTableSpinBox::qsamplerDeviceParamTableSpinBox (
479          QTable *pTable, EditType editType )          QTable *pTable, EditType editType, const QString& sText )
480          : QTableItem(pTable, editType, QString::null)          : QTableItem(pTable, editType, sText)
481  {  {
482          m_iValue = m_iMinValue = m_iMaxValue = 0;          m_iValue    = sText.toInt();
483        m_iMinValue = 0;
484        m_iMaxValue = 999999;
485  }  }
486    
487  // Public accessors.  // Public accessors.
# Line 508  QWidget *qsamplerDeviceParamTableSpinBox Line 512  QWidget *qsamplerDeviceParamTableSpinBox
512                  pSpinBox->setMaxValue(m_iMaxValue);                  pSpinBox->setMaxValue(m_iMaxValue);
513          }          }
514          pSpinBox->setValue(m_iValue);          pSpinBox->setValue(m_iValue);
 //      pSpinBox->setEnabled(QTableItem::isEnabled());  
515          return pSpinBox;          return pSpinBox;
516  }  }
517    
# Line 539  QWidget *qsamplerDeviceParamTableEditBox Line 542  QWidget *qsamplerDeviceParamTableEditBox
542          QObject::connect(pEditBox, SIGNAL(returnPressed()),          QObject::connect(pEditBox, SIGNAL(returnPressed()),
543                  QTableItem::table(), SLOT(doValueChanged()));                  QTableItem::table(), SLOT(doValueChanged()));
544          pEditBox->setText(QTableItem::text());          pEditBox->setText(QTableItem::text());
 //      pEditBox->setEnabled(QTableItem::isEnabled());  
545          return pEditBox;          return pEditBox;
546  }  }
547    

Legend:
Removed from v.446  
changed lines
  Added in v.447

  ViewVC Help
Powered by ViewVC