QDomElement KivioBaseTargetStencil::saveProperties( QDomDocument &doc ) { QDomElement baseE = doc.createElement("KivioStencilProperties"); QDomElement geoE = doc.createElement("Geometry"); XmlWriteFloat( geoE, "x", m_x ); XmlWriteFloat( geoE, "y", m_y ); XmlWriteFloat( geoE, "w", m_w ); XmlWriteFloat( geoE, "h", m_h ); baseE.appendChild( geoE ); baseE.appendChild( m_pLineStyle->saveXML(doc) ); baseE.appendChild( m_pFillStyle->saveXML(doc) ); baseE.appendChild( m_pTextStyle->saveXML(doc) ); baseE.appendChild( saveTargets(doc) ); // Only save custom data if this returns true (means there is custom data) QDomElement customE = doc.createElement("CustomData"); if( saveCustom( customE, doc )==true ) { baseE.appendChild( customE ); } return baseE; }
QDomElement KivioLineStyle::saveXML( QDomDocument &doc ) { QDomElement e = doc.createElement("KivioLineStyle"); XmlWriteColor( e, "color", m_color ); XmlWriteFloat( e, "width", m_width ); XmlWriteInt( e, "capStyle", m_capStyle ); XmlWriteInt( e, "joinStyle", m_joinStyle ); XmlWriteInt( e, "pattern", m_style ); return e; }