| 1952 | } |
| 1953 | |
| 1954 | void 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 | |
| 1973 | void CartesianPlot::addDifferentiationCurve() { |
| 1974 | auto* curve = new XYDifferentiationCurve(i18n("Differentiation")); |
nothing calls this directly
no test coverage detected