/*!
  This checks the validators to make sure the number of friction cone vectors
  and the dynamic time step are within their ranges.  If they aren't, a
  warning box explaining the problem is created.  Otherwise, the dialog
  is closed and accepted.
*/
void SettingsDlg::validateDlg()
{
  int zero=0;
  QString tst = dlgUI->timeStepLine->text();
  QString msg;
  QDoubleValidator *tsv = (QDoubleValidator *)dlgUI->timeStepLine->validator();

  if (tsv->validate(tst,zero) != QValidator::Acceptable) {
    msg = QString("Dynamic time step must be between %1 and %2").arg(tsv->bottom()).arg(tsv->top()); 
  }
     
  if (!msg.isEmpty()) {
    QMessageBox::warning(NULL,"GraspIt!",msg,QMessageBox::Ok, Qt::NoButton,Qt::NoButton);
  } else {
    dlgImpl->accept();
  }
}