27 : QDialog(fitBrowser), m_fitBrowser(fitBrowser) {
31 throw std::runtime_error(
"IFitFunction expected but func function of another type");
33 QAbstractItemModel *model =
ui.paramTable->model();
34 for (
size_t i = 0; i < f->nParams(); ++i) {
35 int j =
static_cast<int>(i);
36 ui.paramTable->insertRow(
ui.paramTable->rowCount());
37 model->setData(model->index(j, 0), QString::fromStdString(f->parameterName(i)));
38 ui.paramTable->item(j, 0)->setFlags(Qt::ItemFlags());
39 model->setData(model->index(j, 1),
"");
40 ui.paramTable->item(j, 1)->setCheckState(Qt::Unchecked);
42 ui.paramTable->resizeColumnToContents(0);
49 for (
int i = 0; i <
ui.paramTable->rowCount(); ++i) {
50 if (
ui.paramTable->item(i, 1)->checkState() == Qt::Checked) {
51 m_ties <<
ui.paramTable->item(i, 1)->text();
61 bool isChecked =
ui.paramTable->item(row, col)->checkState() == Qt::Checked;
62 QString text =
ui.paramTable->item(row, col)->text();
64 if (isChecked && text.isEmpty()) {
65 ui.paramTable->item(row, col)->setText(
67 }
else if (!isChecked) {
68 ui.paramTable->item(row, col)->setText(
"");