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

Method xDataColumnChanged

src/frontend/dockwidgets/XYFitCurveDock.cpp:500–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500void XYFitCurveDock::xDataColumnChanged(const QModelIndex& index) {
501 CONDITIONAL_LOCK_RETURN;
502
503 auto* aspect = static_cast<AbstractAspect*>(index.internalPointer());
504 auto* column = dynamic_cast<AbstractColumn*>(aspect);
505
506 for (auto* curve : m_curvesList)
507 static_cast<XYFitCurve*>(curve)->setXDataColumn(column);
508
509 // set model dependent start values from new data
510 DEBUG(Q_FUNC_INFO)
511 static_cast<XYFitCurve*>(m_curve)->initStartValues(m_fitData);
512 // udpate parameter widget
513 fitParametersWidget->setFitData(&m_fitData);
514 enableRecalculate(); // update preview
515 showFitResult(); // show result of preview
516
517 // update model limits depending on number of points
518 modelTypeChanged(uiGeneralTab.cbModel->currentIndex());
519
520 cbXDataColumn->setInvalid(false);
521}
522
523void XYFitCurveDock::yDataColumnChanged(const QModelIndex& index) {
524 CONDITIONAL_LOCK_RETURN;

Callers

nothing calls this directly

Calls 5

setXDataColumnMethod · 0.80
initStartValuesMethod · 0.80
setFitDataMethod · 0.45
currentIndexMethod · 0.45
setInvalidMethod · 0.45

Tested by

no test coverage detected