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

Method addIntegrationCurve

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

Source from the content-addressed store, hash-verified

1990}
1991
1992void CartesianPlot::addIntegrationCurve() {
1993 auto* curve = new XYIntegrationCurve(i18n("Integration"));
1994 const XYCurve* curCurve = currentCurve();
1995 if (curCurve) {
1996 beginMacro(i18n("%1: integrate '%2'", name(), curCurve->name()));
1997 curve->setName(i18n("Integral of '%1'", curCurve->name()));
1998 curve->setDataSourceType(XYAnalysisCurve::DataSourceType::Curve);
1999 curve->setDataSourceCurve(curCurve);
2000 this->addChild(curve);
2001 curve->recalculate();
2002 Q_EMIT curve->integrationDataChanged(curve->integrationData());
2003 } else {
2004 beginMacro(i18n("%1: add integration curve", name()));
2005 this->addChild(curve);
2006 }
2007
2008 endMacro();
2009}
2010
2011void CartesianPlot::addInterpolationCurve() {
2012 auto* curve = new XYInterpolationCurve(i18n("Interpolation"));

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