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

Method addCurvePath

src/backend/worksheet/InfoElement.cpp:301–319  ·  view source on GitHub ↗

! * \brief InfoElement::addCurvePath * When loading infoelement from xml file, there is no information available, which curves are loaded. * So only the path will be stored and after all curves where loaded the curves will be assigned to the InfoElement * with the function assignCurve * Assumption: if custompoint!=nullptr then the custompoint was already added to the InfoElement previously. H

Source from the content-addressed store, hash-verified

299 * @param custompoint adding already created custom point
300 */
301void InfoElement::addCurvePath(const QString& curvePath, CustomPoint* custompoint) {
302 for (auto& markerpoint : markerpoints) {
303 if (curvePath == markerpoint.curvePath)
304 return;
305 }
306
307 Q_D(const InfoElement);
308 if (!custompoint) {
309 custompoint = new CustomPoint(d->m_plot, i18n("Symbol"));
310 custompoint->setVisible(false);
311 m_suppressChildPositionChanged = true;
312 custompoint->setCoordinateBindingEnabled(true);
313 m_suppressChildPositionChanged = false;
314 addChild(custompoint);
315 }
316
317 struct MarkerPoints_T markerpoint = {custompoint, nullptr, curvePath};
318 markerpoints.append(markerpoint);
319}
320
321/*!
322 * \brief assignCurve

Callers

nothing calls this directly

Calls 3

appendMethod · 0.80
setVisibleMethod · 0.45

Tested by

no test coverage detected