mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
go on with the work
This commit is contained in:
@@ -119,6 +119,30 @@ QDomElement PartText::toXml(QDomDocument &xml_document) const
|
||||
return(xml_element);
|
||||
}
|
||||
|
||||
bool PartText::valideXml(QDomElement& element) {
|
||||
|
||||
if (propertyInteger(element, "size") == PropertyFlags::NotFound ||
|
||||
propertyString(element, "font") == PropertyFlags::NotFound) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (propertyString(element, "color") == PropertyFlags::NoValidConversion)
|
||||
return false;
|
||||
|
||||
|
||||
if (propertyString(element, "text"))
|
||||
return false;
|
||||
|
||||
if (propertyDouble(element, "x") == PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(element, "y") == PropertyFlags::NoValidConversion)
|
||||
return false;
|
||||
|
||||
if (propertyDouble(element, "rotation", 0) == PropertyFlags::NoValidConversion)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@return Les coordonnees du point situe en bas a gauche du texte.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user