Example #1
0
/*!
  Builds an epsilon qm parameter area within the quality measure dialog
  box.  This includes building a QT combo box for the GWS selection and
  one for the TWS selection.  However, currently there is only one possible
  TWS.  In the future, there may be ways to define others.
*/
void
QualEpsilon::buildParamArea(qmDlgDataT *qmData)
{
  int i;
  static QualEpsilonParamT params;

  QualEpsilon *currQM = (QualEpsilon *)qmData->currQM;

#ifdef GRASPITDBG
  std::cout << "building qualepsilon" << std::endl;
#endif

  QLayout *l = new QGridLayout(qmData->settingsArea, 2, 2, 1);
  l->setAutoAdd(true);

  // create the GWS type menu
  new QLabel(QString("Limit unit GWS using:"), qmData->settingsArea);
  params.gwsTypeComboBox = new QComboBox(qmData->settingsArea, "gwsComboBox");

  new QLabel(QString("Task Wrench Space (TWS):"), qmData->settingsArea);
  params.twsTypeComboBox = new QComboBox(qmData->settingsArea, "twsComboBox");

  // count the number of possible gws types
  for (i = 0; GWS::TYPE_LIST[i]; i++) {
    params.gwsTypeComboBox->insertItem(QString(GWS::TYPE_LIST[i]));
    if (currQM && !strcmp(currQM->gws->getType(), GWS::TYPE_LIST[i])) {
      params.gwsTypeComboBox->setCurrentItem(i);
    }
  }

  params.twsTypeComboBox->insertItem(QString("Unit Ball"));

  qmData->paramPtr = &params;
}