MCPcopy Create free account
hub / github.com/KDE/labplot / parametersChanged

Method parametersChanged

src/frontend/dockwidgets/XYFitCurveDock.cpp:1161–1176  ·  view source on GitHub ↗

! * called when parameter names and/or start values for the model were changed * also called from parameter widget */

Source from the content-addressed store, hash-verified

1159 * also called from parameter widget
1160 */
1161void XYFitCurveDock::parametersChanged(bool updateParameterWidget) {
1162 DEBUG(Q_FUNC_INFO << ", m_initializing = " << m_initializing);
1163
1164 // parameter names were (probably) changed -> set the new vars in ExpressionTextEdit teEquation
1165 QStringList vars{m_fitData.paramNames};
1166 vars << QStringLiteral("x"); // TODO: generalize when we support other XYEquationCurve::EquationType
1167 uiGeneralTab.teEquation->setVariables(vars);
1168
1169 CONDITIONAL_RETURN_NO_LOCK
1170
1171 if (updateParameterWidget)
1172 fitParametersWidget->setFitData(&m_fitData);
1173
1174 enableRecalculate();
1175 DEBUG(Q_FUNC_INFO << " DONE")
1176}
1177void XYFitCurveDock::parametersValid(bool valid) {
1178 DEBUG(Q_FUNC_INFO << ", valid = " << valid);
1179 m_parametersValid = valid;

Callers

nothing calls this directly

Calls 2

setVariablesMethod · 0.45
setFitDataMethod · 0.45

Tested by

no test coverage detected