diff --git a/XML-elements.md b/XML-elements.md index b88b213..1a5eca2 100644 --- a/XML-elements.md +++ b/XML-elements.md @@ -4,44 +4,7 @@ Or the XML element creator guide. This page aims to describe the XML structure u The main XML element is therefore the “definition” tag. In case we have more than one type of definition in the future, we use the type attribute to specify that this is an element definition. -## definition -Example: -`` - -Attribute: -* type : "element" (See "const QDomDocument ElementScene::toXml(bool all_parts)" file "sources/editor/elementscene.cpp") - -## Element dimensions -* width : integer (multiple of 10) -* height : integer (multiple of 10) -* See "const QDomDocument ElementScene::toXml(bool all_parts)" file "sources/editor/elementscene.cpp" - One of the first things to specify when defining an element is its size: width (width) and height (height), in pixels. These two dimensions must be integers multiples of 10. If this is not the case, QET will round them to the next ten (example: 42 to 50 pixels). They determine the size and the bounding rectangle of the element. -## Element hotspot -* hotspot_x -* hotspot_y -* The element hooking point designates the point hooked to the mouse cursor during a drag'n drop of the element. They must be full coordinates. “Hotspot_x” is the abscissa, “hotspot_y” is the ordinate. The upper left corner of the rectangle delimiting the element is considered to be the origin. If the values ​​provided exceed the bounding rectangle, they will be limited to the size of the element. The hotspot is also the center of rotation used when changing the orientation of the element. -## orientation - * Element orientation **!!!(we keep the orientation for compatibility with previous version of qet (fixt on "dyyy"))** - - ### info of 0.3 - It is then necessary to define what are the possible orientations of the element. Element orientation is used when laying conductors but also to prevent the user from turning an element in a direction that would not make sense. The orientation attribute is defined by a series of 4 characters, each character defining the behavior for an orientation. - + 1 st character: North - + 2 nd character: East - + 3 rd character: South - + 4 th character: West - Each character can have the following value: - + d for “default”: indicates that, by default, the element is considered to be oriented in this direction. It is absolutely necessary to indicate a default orientation. - + y for “yes”: the user can orient the element in this direction. - + n for “no”: the user cannot orient the element in this direction. - Example: orientation = “ydny” means that the element is drawn facing south and can be turned north and west but not east. -### version -* version : QET::version (See "const QDomDocument ElementScene::toXml(bool all_parts)" file "sources/editor/elementscene.cpp") -### link type -* link_type (See "const QDomDocument ElementScene::toXml(bool all_parts)" file "sources/editor/elementscene.cpp") - * master / slave - * kindInformations - * simple / master / terminal - * elementInformations +## [definition](elements_definition) ### uuid `` * Uuid used to compare two elements