}
}
scd+="}\n";
+ hcd+="\t///create "+cn+" from XML (inverse of toXml)\n";
+ hcd+="\tstatic "+cn+" fromXml(const QDomElement&);\n";
+ scd+=cn+" "+cn+"::fromXml(const QDomElement&root){return "+cn+"(root);}\n";
+ hcd+="\t///create "+cn+" from XML formatted string (inverse of toString)\n";
+ hcd+="\tstatic "+cn+" fromString(const QString&);\n";
+ scd+=cn+" "+cn+"::fromString(const QString&txt)\n{\n\tQDomDocument doc;\n";
+ scd+="\tif(!doc.setContent(txt))return "+cn+"();\n";
+ scd+="\telse return "+cn+"(doc.documentElement());\n}\n";
hcd+="\t/// destructor: deletes this copy of the object\n";
hcd+="\tvirtual ~"+cn+"(){}\n";