| 1111 | } |
| 1112 | |
| 1113 | void 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 | |
| 1128 | void PlotWidget::rebindClipboardCurveKeys(QDomElement& plot_element) const { |
| 1129 | if (catalog_ == nullptr) { |
nothing calls this directly
no test coverage detected