void InbetweenVertex::write_(XmlStreamWriter & xml) const { // Base classes Cell::write_(xml); InbetweenCell::write_(xml); VertexCell::write_(xml); // Before/After Vertices xml.writeAttribute("beforevertex", QString().setNum(beforeVertex_->id())); xml.writeAttribute("aftervertex", QString().setNum(afterVertex_->id())); }
void InbetweenEdge::write_(XmlStreamWriter & xml) const { // Base classes Cell::write_(xml); InbetweenCell::write_(xml); EdgeCell::write_(xml); if(isClosed()) { // Before/After cycle xml.writeAttribute("beforecycle", beforeCycle_.toString()); xml.writeAttribute("aftercycle", afterCycle_.toString()); // Cycle offset if(afterCycle_.s0() != 0.0) xml.writeAttribute("cycleoffset", QString().setNum(afterCycle_.s0())); } else { // Before/After paths xml.writeAttribute("beforepath", beforePath_.toString()); xml.writeAttribute("afterpath", afterPath_.toString()); // Start/End animated vertex xml.writeAttribute("startanimatedvertex", startAnimatedVertex_.toString()); xml.writeAttribute("endanimatedvertex", endAnimatedVertex_.toString()); } }
void KeyEdge::write_(XmlStreamWriter & xml) const { // Base classes Cell::write_(xml); KeyCell::write_(xml); EdgeCell::write_(xml); // Start vertex if(startVertex_) xml.writeAttribute("startvertex", QString().setNum(startVertex_->id())); // End vertex if(endVertex_) xml.writeAttribute("endvertex", QString().setNum(endVertex_->id())); // Geometry geometry_->write(xml); }
void KeyVertex::write_(XmlStreamWriter & xml) const { // Base classes Cell::write_(xml); KeyCell::write_(xml); VertexCell::write_(xml); // Position xml.writeAttribute("position", QString().setNum(pos_[0]) + "," + QString().setNum(pos_[1])); // Size // TODO, must be in style //out << Save::newField("Size") << size_; }
void KeyFace::write_(XmlStreamWriter & xml) const { // Base classes Cell::write_(xml); KeyCell::write_(xml); FaceCell::write_(xml); // Cycles QString cyclesstring; for(int i=0; i<cycles_.size(); ++i) { if(i>0) cyclesstring += " "; cyclesstring += cycles_[i].toString(); } xml.writeAttribute("cycles", cyclesstring); }