mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 09:40:52 +01:00
go on with the work
This commit is contained in:
@@ -132,6 +132,26 @@ bool PartEllipse::fromXml(const QDomElement &qde)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PartEllipse::valideXml(QDomElement& element) {
|
||||
if (element.tagName() == "ellipse")
|
||||
{
|
||||
if (propertyDouble(element, "width") & PropertyFlags::NoValidConversion ||
|
||||
propertyDouble(element, "height") & PropertyFlags::NoValidConversion)
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if (propertyDouble(element, "diameter") & PropertyFlags::NoValidConversion)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ((propertyDouble(element, "x") & PropertyFlags::NoValidConversion) ||
|
||||
(propertyDouble(element, "y") & PropertyFlags::NoValidConversion))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief PartEllipse::shape
|
||||
* @return the shape of this item
|
||||
|
||||
Reference in New Issue
Block a user