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

Method addReferenceLine

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

Source from the content-addressed store, hash-verified

2220}
2221
2222void CartesianPlot::addReferenceLine() {
2223 Q_D(CartesianPlot);
2224 auto* line = new ReferenceLine(this, i18n("Reference Line"));
2225 line->setCoordinateSystemIndex(defaultCoordinateSystemIndex());
2226
2227 if (d->calledFromContextMenu) {
2228 line->setPositionLogical(d->logicalPos);
2229 d->calledFromContextMenu = false;
2230 }
2231
2232 this->addChild(line);
2233 line->retransform();
2234}
2235
2236void CartesianPlot::addReferenceRange() {
2237 auto* range = new ReferenceRange(this, i18n("Reference Range"));

Callers 1

keyPressEventMethod · 0.80

Calls 4

setPositionLogicalMethod · 0.45
addChildMethod · 0.45
retransformMethod · 0.45

Tested by

no test coverage detected