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

Method loadCurve

src/backend/datasources/projects/OriginProjectParser.cpp:2469–2489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2467}
2468
2469void OriginProjectParser::loadCurve(const Origin::GraphCurve& originCurve, XYCurve* curve) const {
2470 DEBUG(Q_FUNC_INFO)
2471
2472 // line properties
2473 if (originCurve.type == Origin::GraphCurve::Line || originCurve.type == Origin::GraphCurve::LineSymbol) { // TODO: what about *ErrorBar types?
2474 curve->setLineType(lineType(originCurve.lineConnect));
2475 curve->line()->setStyle(penStyle(originCurve.lineStyle));
2476 auto lineWidth = std::max(originCurve.lineWidth * elementScalingFactor, 1.); // minimum 1 px
2477 curve->line()->setWidth(Worksheet::convertToSceneUnits(lineWidth, Worksheet::Unit::Point));
2478 curve->line()->setColor(color(originCurve.lineColor));
2479 curve->line()->setOpacity(1 - originCurve.lineTransparency / 255);
2480 // TODO: handle unsigned char boxWidth of Origin::GraphCurve
2481 } else
2482 curve->line()->setStyle(Qt::NoPen);
2483
2484 // symbol properties
2485 loadSymbol(originCurve, curve->symbol(), curve);
2486
2487 // filling properties
2488 loadBackground(originCurve, curve->background());
2489}
2490
2491void OriginProjectParser::loadBackground(const Origin::GraphCurve& originCurve, Background* background) const {
2492 DEBUG(Q_FUNC_INFO << ", fill area? " << originCurve.fillArea)

Callers

nothing calls this directly

Calls 8

setLineTypeMethod · 0.80
setStyleMethod · 0.45
lineMethod · 0.45
setWidthMethod · 0.45
setColorMethod · 0.45
setOpacityMethod · 0.45
symbolMethod · 0.45
backgroundMethod · 0.45

Tested by

no test coverage detected