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

Method save

src/backend/worksheet/WorksheetElement.cpp:547–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547void WorksheetElement::save(QXmlStreamWriter* writer) const {
548 Q_D(const WorksheetElement);
549 writer->writeAttribute(QStringLiteral("x"), QString::number(d->position.point.x()));
550 writer->writeAttribute(QStringLiteral("y"), QString::number(d->position.point.y()));
551 writer->writeAttribute(QStringLiteral("horizontalPosition"), QString::number(static_cast<int>(d->position.horizontalPosition)));
552 writer->writeAttribute(QStringLiteral("verticalPosition"), QString::number(static_cast<int>(d->position.verticalPosition)));
553 writer->writeAttribute(QStringLiteral("horizontalAlignment"), QString::number(static_cast<int>(d->horizontalAlignment)));
554 writer->writeAttribute(QStringLiteral("verticalAlignment"), QString::number(static_cast<int>(d->verticalAlignment)));
555 writer->writeAttribute(QStringLiteral("rotationAngle"), QString::number(d->rotation()));
556 writer->writeAttribute(QStringLiteral("plotRangeIndex"), QString::number(m_cSystemIndex));
557 writer->writeAttribute(QStringLiteral("visible"), QString::number(d->isVisible()));
558 writer->writeAttribute(QStringLiteral("coordinateBinding"), QString::number(d->coordinateBindingEnabled));
559 writer->writeAttribute(QStringLiteral("logicalPosX"), QString::number(d->positionLogical.x()));
560 writer->writeAttribute(QStringLiteral("logicalPosY"), QString::number(d->positionLogical.y()));
561 writer->writeAttribute(QStringLiteral("locked"), QString::number(d->lock));
562}
563
564bool WorksheetElement::load(XmlStreamReader* reader, bool preview) {
565 if (preview)

Callers

nothing calls this directly

Calls 4

xMethod · 0.80
rotationMethod · 0.80
yMethod · 0.45
isVisibleMethod · 0.45

Tested by

no test coverage detected