! * \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
| 299 | * @param custompoint adding already created custom point |
| 300 | */ |
| 301 | void 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 |
nothing calls this directly
no test coverage detected