mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
Connexions internes :
* methodes renommees dans l'editeur de schemas * attribut, lecture et ecriture ajoutes dans l'editeur d'element git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@226 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -42,6 +42,7 @@ ElementScene::ElementScene(QETElementEditor *editor, QObject *parent) :
|
||||
_width(3),
|
||||
_height(7),
|
||||
_hotspot(15, 35),
|
||||
internal_connections(false),
|
||||
qgi_manager(this),
|
||||
element_editor(editor)
|
||||
{
|
||||
@@ -371,6 +372,7 @@ const QDomDocument ElementScene::toXml() const {
|
||||
root.setAttribute("hotspot_y", QString("%1").arg(_hotspot.y()));
|
||||
root.setAttribute("orientation", ori.toString());
|
||||
root.setAttribute("version", QET::version);
|
||||
if (internal_connections) root.setAttribute("ic", "true");
|
||||
|
||||
// noms de l'element
|
||||
root.appendChild(_names.toXml(xml_document));
|
||||
@@ -423,8 +425,10 @@ void ElementScene::fromXml(const QDomDocument &xml_document) {
|
||||
}
|
||||
}
|
||||
|
||||
// orientations
|
||||
// orientations et connexions internes
|
||||
if (state) {
|
||||
internal_connections = (root.attribute("ic") == "true");
|
||||
|
||||
if (!ori.fromString(root.attribute("orientation"))) {
|
||||
state = false;
|
||||
error_message = tr("Les orientations ne sont pas valides.");
|
||||
|
||||
Reference in New Issue
Block a user