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

Method addDataReductionCurve

src/backend/worksheet/plots/cartesian/CartesianPlot.cpp:1954–1971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1952}
1953
1954void CartesianPlot::addDataReductionCurve() {
1955 auto* curve = new XYDataReductionCurve(i18n("Data Reduction"));
1956 const XYCurve* curCurve = currentCurve();
1957 if (curCurve) {
1958 beginMacro(i18n("%1: reduce '%2'", name(), curCurve->name()));
1959 curve->setName(i18n("Reduction of '%1'", curCurve->name()));
1960 curve->setDataSourceType(XYAnalysisCurve::DataSourceType::Curve);
1961 curve->setDataSourceCurve(curCurve);
1962 this->addChild(curve);
1963 curve->recalculate();
1964 Q_EMIT curve->dataReductionDataChanged(curve->dataReductionData());
1965 } else {
1966 beginMacro(i18n("%1: add data reduction curve", name()));
1967 this->addChild(curve);
1968 }
1969
1970 endMacro();
1971}
1972
1973void CartesianPlot::addDifferentiationCurve() {
1974 auto* curve = new XYDifferentiationCurve(i18n("Differentiation"));

Callers

nothing calls this directly

Calls 6

setDataSourceTypeMethod · 0.80
setDataSourceCurveMethod · 0.80
nameMethod · 0.45
setNameMethod · 0.45
addChildMethod · 0.45
recalculateMethod · 0.45

Tested by

no test coverage detected