MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / stampClipboardCurveKeys

Method stampClipboardCurveKeys

pj_plotting/widget/src/PlotWidget.cpp:1113–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111}
1112
1113void PlotWidget::stampClipboardCurveKeys(QDomElement& plot_element) const {
1114 QDomElement curve_element = plot_element.firstChildElement(QStringLiteral("curve"));
1115 for (const CurveInfo& info : curveList()) {
1116 if (info.curve == nullptr || curve_element.isNull()) {
1117 continue;
1118 }
1119 curve_element.setAttribute(QStringLiteral("name"), info.source_name);
1120 if (auto* xy_series = dynamic_cast<PointSeriesXY*>(info.curve->data())) {
1121 curve_element.setAttribute(QStringLiteral("curve_x"), xy_series->xSource().name);
1122 curve_element.setAttribute(QStringLiteral("curve_y"), xy_series->ySource().name);
1123 }
1124 curve_element = curve_element.nextSiblingElement(QStringLiteral("curve"));
1125 }
1126}
1127
1128void PlotWidget::rebindClipboardCurveKeys(QDomElement& plot_element) const {
1129 if (catalog_ == nullptr) {

Callers

nothing calls this directly

Calls 3

isNullMethod · 0.45
setAttributeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected