mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
update
This commit is contained in:
@@ -73,22 +73,26 @@ bool TitleBlockProperties::operator!=(const TitleBlockProperties &ip) {
|
||||
Exporte le cartouche sous formes d'attributs XML ajoutes a l'element e.
|
||||
@param e Element XML auquel seront ajoutes des attributs
|
||||
*/
|
||||
void TitleBlockProperties::toXml(QDomElement &e) const {
|
||||
e.setAttribute("author", author);
|
||||
e.setAttribute("title", title);
|
||||
e.setAttribute("filename", filename);
|
||||
e.setAttribute("plant", plant);
|
||||
e.setAttribute("locmach", locmach);
|
||||
e.setAttribute("indexrev",indexrev);
|
||||
e.setAttribute("version", version);
|
||||
e.setAttribute("folio", folio);
|
||||
e.setAttribute("auto_page_num", auto_page_num);
|
||||
e.setAttribute("date", exportDate());
|
||||
e.setAttribute("displayAt", (display_at == Qt::BottomEdge? "bottom" : "right"));
|
||||
QDomElement TitleBlockProperties::toXml(QDomDocument &xml_document) const {
|
||||
|
||||
QDomElement e = xml_document.createElement("inset");
|
||||
|
||||
e.appendChild(createXmlProperty(xml_document, "author", author));
|
||||
e.appendChild(createXmlProperty(xml_document, "title", title));
|
||||
e.appendChild(createXmlProperty(xml_document, "filename", filename));
|
||||
e.appendChild(createXmlProperty(xml_document, "plant", plant));
|
||||
e.appendChild(createXmlProperty(xml_document, "locmach", locmach));
|
||||
e.appendChild(createXmlProperty(xml_document, "indexrev", indexrev));
|
||||
e.appendChild(createXmlProperty(xml_document, "version", version));
|
||||
e.appendChild(createXmlProperty(xml_document, "folio", folio));
|
||||
e.appendChild(createXmlProperty(xml_document, "auto_page_num", auto_page_num));
|
||||
e.appendChild(createXmlProperty(xml_document, "date", exportDate()));
|
||||
e.appendChild(createXmlProperty(xml_document, "displayAt", display_at == Qt::BottomEdge? "bottom" : "right"));
|
||||
|
||||
if (!template_name.isEmpty())
|
||||
{
|
||||
e.setAttribute("titleblocktemplate", template_name);
|
||||
e.setAttribute("titleblocktemplateCollection", QET::qetCollectionToString(collection));
|
||||
e.appendChild(createXmlProperty(xml_document, "titleblocktemplate", template_name));
|
||||
e.appendChild(createXmlProperty(xml_document, "titleblocktemplateCollection", QET::qetCollectionToString(collection)));
|
||||
}
|
||||
|
||||
if (context.keys().count()) {
|
||||
@@ -96,13 +100,15 @@ void TitleBlockProperties::toXml(QDomElement &e) const {
|
||||
context.toXml(properties);
|
||||
e.appendChild(properties);
|
||||
}
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
/**
|
||||
Importe le cartouche a partir des attributs XML de l'element e
|
||||
@param e Element XML dont les attributs seront lus
|
||||
*/
|
||||
void TitleBlockProperties::fromXml(const QDomElement &e) {
|
||||
bool TitleBlockProperties::fromXml(const QDomElement &e) {
|
||||
// reads the historical fields
|
||||
if (e.hasAttribute("author")) author = e.attribute("author");
|
||||
if (e.hasAttribute("title")) title = e.attribute("title");
|
||||
|
||||
Reference in New Issue
Block a user