|
|
@ -42,6 +42,7 @@ |
|
|
|
#include "domain/UBGraphicsStroke.h" |
|
|
|
#include "domain/UBGraphicsStroke.h" |
|
|
|
#include "domain/UBGraphicsStrokesGroup.h" |
|
|
|
#include "domain/UBGraphicsStrokesGroup.h" |
|
|
|
#include "domain/UBGraphicsGroupContainerItem.h" |
|
|
|
#include "domain/UBGraphicsGroupContainerItem.h" |
|
|
|
|
|
|
|
#include "domain/UBGraphicsGroupContainerItemDelegate.h" |
|
|
|
#include "domain/UBItem.h" |
|
|
|
#include "domain/UBItem.h" |
|
|
|
|
|
|
|
|
|
|
|
#include "tools/UBGraphicsRuler.h" |
|
|
|
#include "tools/UBGraphicsRuler.h" |
|
|
@ -924,7 +925,13 @@ void UBSvgSubsetAdaptor::UBSvgSubsetReader::readGroupRoot() |
|
|
|
} |
|
|
|
} |
|
|
|
else if (mXmlReader.isStartElement()) { |
|
|
|
else if (mXmlReader.isStartElement()) { |
|
|
|
if (mXmlReader.name() == tGroup) { |
|
|
|
if (mXmlReader.name() == tGroup) { |
|
|
|
|
|
|
|
QString ubLocked = mXmlReader.attributes().value(UBSettings::uniboardDocumentNamespaceUri, "locked").toString(); |
|
|
|
UBGraphicsGroupContainerItem *curGroup = readGroup(); |
|
|
|
UBGraphicsGroupContainerItem *curGroup = readGroup(); |
|
|
|
|
|
|
|
if (!ubLocked.isEmpty()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
bool isLocked = ubLocked.contains(xmlTrue); |
|
|
|
|
|
|
|
curGroup->Delegate()->setLocked(isLocked); |
|
|
|
|
|
|
|
} |
|
|
|
if (curGroup) { |
|
|
|
if (curGroup) { |
|
|
|
mScene->addGroup(curGroup); |
|
|
|
mScene->addGroup(curGroup); |
|
|
|
} |
|
|
|
} |
|
|
@ -1276,6 +1283,9 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) |
|
|
|
if (curElement.hasAttribute(aId)) { |
|
|
|
if (curElement.hasAttribute(aId)) { |
|
|
|
mXmlWriter.writeStartElement(curElement.tagName()); |
|
|
|
mXmlWriter.writeStartElement(curElement.tagName()); |
|
|
|
mXmlWriter.writeAttribute(aId, curElement.attribute(aId)); |
|
|
|
mXmlWriter.writeAttribute(aId, curElement.attribute(aId)); |
|
|
|
|
|
|
|
if(curElement.hasAttribute("locked")){ |
|
|
|
|
|
|
|
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri,"locked",curElement.attribute("locked")); |
|
|
|
|
|
|
|
} |
|
|
|
QDomElement curSubElement = curElement.firstChildElement(); |
|
|
|
QDomElement curSubElement = curElement.firstChildElement(); |
|
|
|
while (!curSubElement.isNull()) { |
|
|
|
while (!curSubElement.isNull()) { |
|
|
|
if (curSubElement.hasAttribute(aId)) { |
|
|
|
if (curSubElement.hasAttribute(aId)) { |
|
|
@ -1320,6 +1330,13 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistGroupToDom(QGraphicsItem *gro |
|
|
|
if (!uuid.isNull()) { |
|
|
|
if (!uuid.isNull()) { |
|
|
|
QDomElement curGroupElement = groupDomDocument->createElement(tGroup); |
|
|
|
QDomElement curGroupElement = groupDomDocument->createElement(tGroup); |
|
|
|
curGroupElement.setAttribute(aId, uuid); |
|
|
|
curGroupElement.setAttribute(aId, uuid); |
|
|
|
|
|
|
|
UBGraphicsGroupContainerItem* group = dynamic_cast<UBGraphicsGroupContainerItem*>(groupItem); |
|
|
|
|
|
|
|
if(group && group->Delegate()){ |
|
|
|
|
|
|
|
if(group->Delegate()->isLocked()) |
|
|
|
|
|
|
|
curGroupElement.setAttribute("locked", xmlTrue); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
curGroupElement.setAttribute("locked", xmlFalse); |
|
|
|
|
|
|
|
} |
|
|
|
curParent->appendChild(curGroupElement); |
|
|
|
curParent->appendChild(curGroupElement); |
|
|
|
foreach (QGraphicsItem *item, groupItem->childItems()) { |
|
|
|
foreach (QGraphicsItem *item, groupItem->childItems()) { |
|
|
|
QUuid tmpUuid = UBGraphicsScene::getPersonalUuid(item); |
|
|
|
QUuid tmpUuid = UBGraphicsScene::getPersonalUuid(item); |
|
|
|