towards state saving locked, etc.

This commit is contained in:
Alexandre Quessy
2014-10-21 16:59:34 -04:00
parent 2d8f19043b
commit b61b96a6df
2 changed files with 26 additions and 7 deletions
+6 -1
View File
@@ -54,7 +54,7 @@ void ProjectWriter::writeItem(Paint *item)
{
_xml.writeStartElement("paint");
_xml.writeAttribute("id", QString::number(item->getId()));
_xml.writeAttribute("name", item->getName());
//_xml.writeAttribute("name", item->getName());
_xml.writeAttribute("type", item->getType());
if (item->getType() == "media")
@@ -139,6 +139,11 @@ void ProjectWriter::writeItem(Mapping *item)
_xml.writeAttribute("paint_id", QString::number(item->getPaint()->getId()));
_xml.writeAttribute("type", item->getType());
// boolean attributes:
_xml.writeAttribute("locked", QString::number((int) item->isLocked() ? 1 : 0));
_xml.writeAttribute("solo", QString::number((int) item->isSolo() ? 1 : 0));
_xml.writeAttribute("visible", QString::number((int) item->isVisible() ? 1 : 0));
Shape *shape = item->getShape().get();
_xml.writeStartElement("destination");
_xml.writeAttribute("shape", shape->getType());