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

Method pasteWidgetFromClipboard

pj_plotting/widget/src/PlotWidget.cpp:1095–1106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1093}
1094
1095void PlotWidget::pasteWidgetFromClipboard() {
1096 QDomDocument doc;
1097 if (!widget_clipboard::parse(doc, QStringLiteral("plot"))) {
1098 return;
1099 }
1100 QDomElement plot_element = doc.documentElement();
1101 plot_element.setAttribute(QStringLiteral("id"), state_id_);
1102 rebindClipboardCurveKeys(plot_element);
1103 if (xmlLoadState(plot_element)) {
1104 emit undoableChange();
1105 }
1106}
1107
1108bool PlotWidget::canPasteWidgetFromClipboard() const {
1109 QDomDocument doc;

Callers

nothing calls this directly

Calls 2

parseFunction · 0.85
setAttributeMethod · 0.45

Tested by

no test coverage detected