SVGHMI: gui.svg -> svghmi.svg svghmi
authorEdouard Tisserant
Thu, 19 Sep 2019 10:41:39 +0200
branchsvghmi
changeset 2781 fbdd0fd8ee4f
parent 2780 e468f18df200
child 2782 723e420dfe72
SVGHMI: gui.svg -> svghmi.svg
svghmi/svghmi.py
tests/svghmi/svghmi_0@svghmi/gui.svg
tests/svghmi/svghmi_0@svghmi/svghmi.svg
--- a/svghmi/svghmi.py	Thu Sep 19 09:01:49 2019 +0200
+++ b/svghmi/svghmi.py	Thu Sep 19 10:41:39 2019 +0200
@@ -266,8 +266,7 @@
     def _getSVGpath(self, project_path=None):
         if project_path is None:
             project_path = self.CTNPath()
-        # define name for SVG file containing gui layout
-        return os.path.join(project_path, "gui.svg")
+        return os.path.join(project_path, "svghmi.svg")
 
 
     def OnCTNSave(self, from_project_path=None):
@@ -280,7 +279,6 @@
         # invoke inskscape -S, csv-parse output, produce elements
         InkscapeGeomColumns = ["Id", "x", "y", "w", "h"]
 
-        # TODO : move following line to __init__
         inkpath = get_inkscape_path()
         svgpath = self._getSVGpath()
         _status, result, _err_result = ProcessLogger(None,
--- a/tests/svghmi/svghmi_0@svghmi/gui.svg	Thu Sep 19 09:01:49 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="1280"
-   height="720"
-   viewBox="0 0 1280 720"
-   version="1.1"
-   id="hmi0"
-   sodipodi:docname="gui.svg"
-   inkscape:version="0.92.3 (2405546, 2018-03-11)">
-  <metadata
-     id="metadata4542">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <defs
-     id="defs2" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:document-units="px"
-     inkscape:current-layer="hmi0"
-     showgrid="false"
-     units="px"
-     inkscape:zoom="0.7"
-     inkscape:cx="586.09435"
-     inkscape:cy="381.71289"
-     inkscape:window-width="1600"
-     inkscape:window-height="886"
-     inkscape:window-x="0"
-     inkscape:window-y="27"
-     inkscape:window-maximized="1" />
-  <rect
-     style="color:#000000"
-     id="page0"
-     width="1280"
-     height="720"
-     x="0"
-     y="0">
-    <desc
-       id="desc_page0">=HMI=
-role = Page;
-name = &quot;Home&quot;;
-</desc>
-  </rect>
-  <text
-     xml:space="preserve"
-     style="font-style:normal;font-weight:normal;font-size:160px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
-     x="136.32812"
-     y="418.24219"
-     id="text5151"
-     inkscape:label="count"><desc
-       id="desc5153">=HMI=
-role = Input;
-path = &quot;/PRESSURETARGET&quot;;
-/* Don't forget to press the &quot;Set&quot; button ! */</desc><tspan
-       sodipodi:role="line"
-       id="tspan5149"
-       x="136.32812"
-       y="418.24219"
-       style="stroke-width:1px">8888</tspan></text>
-  <text
-     inkscape:label="count"
-     id="text823"
-     y="418.24219"
-     x="756.32812"
-     style="font-style:normal;font-weight:normal;font-size:160px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
-     xml:space="preserve"><desc
-       id="desc819">=HMI=
-role = Display;
-path = &quot;/PUMP/PRESSURE&quot;;
-/* Don't forget to press the &quot;Set&quot; button ! */</desc><tspan
-       style="stroke-width:1px"
-       y="418.24219"
-       x="756.32812"
-       id="tspan821"
-       sodipodi:role="line">8888</tspan></text>
-  <text
-     xml:space="preserve"
-     style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
-     x="242.85715"
-     y="197.14285"
-     id="text827"><tspan
-       sodipodi:role="line"
-       id="tspan825"
-       x="242.85715"
-       y="197.14285">SetPoint</tspan></text>
-  <text
-     id="text831"
-     y="197.14285"
-     x="882.85718"
-     style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
-     xml:space="preserve"><tspan
-       y="197.14285"
-       x="882.85718"
-       id="tspan829"
-       sodipodi:role="line">Actual</tspan></text>
-</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/svghmi/svghmi_0@svghmi/svghmi.svg	Thu Sep 19 10:41:39 2019 +0200
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1280"
+   height="720"
+   viewBox="0 0 1280 720"
+   version="1.1"
+   id="hmi0"
+   sodipodi:docname="gui.svg"
+   inkscape:version="0.92.3 (2405546, 2018-03-11)">
+  <metadata
+     id="metadata4542">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs2" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:document-units="px"
+     inkscape:current-layer="hmi0"
+     showgrid="false"
+     units="px"
+     inkscape:zoom="0.7"
+     inkscape:cx="586.09435"
+     inkscape:cy="381.71289"
+     inkscape:window-width="1600"
+     inkscape:window-height="886"
+     inkscape:window-x="0"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1" />
+  <rect
+     style="color:#000000"
+     id="page0"
+     width="1280"
+     height="720"
+     x="0"
+     y="0">
+    <desc
+       id="desc_page0">=HMI=
+role = Page;
+name = &quot;Home&quot;;
+</desc>
+  </rect>
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-weight:normal;font-size:160px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     x="136.32812"
+     y="418.24219"
+     id="text5151"
+     inkscape:label="count"><desc
+       id="desc5153">=HMI=
+role = Input;
+path = &quot;/PRESSURETARGET&quot;;
+/* Don't forget to press the &quot;Set&quot; button ! */</desc><tspan
+       sodipodi:role="line"
+       id="tspan5149"
+       x="136.32812"
+       y="418.24219"
+       style="stroke-width:1px">8888</tspan></text>
+  <text
+     inkscape:label="count"
+     id="text823"
+     y="418.24219"
+     x="756.32812"
+     style="font-style:normal;font-weight:normal;font-size:160px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+     xml:space="preserve"><desc
+       id="desc819">=HMI=
+role = Display;
+path = &quot;/PUMP/PRESSURE&quot;;
+/* Don't forget to press the &quot;Set&quot; button ! */</desc><tspan
+       style="stroke-width:1px"
+       y="418.24219"
+       x="756.32812"
+       id="tspan821"
+       sodipodi:role="line">8888</tspan></text>
+  <text
+     xml:space="preserve"
+     style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+     x="242.85715"
+     y="197.14285"
+     id="text827"><tspan
+       sodipodi:role="line"
+       id="tspan825"
+       x="242.85715"
+       y="197.14285">SetPoint</tspan></text>
+  <text
+     id="text831"
+     y="197.14285"
+     x="882.85718"
+     style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
+     xml:space="preserve"><tspan
+       y="197.14285"
+       x="882.85718"
+       id="tspan829"
+       sodipodi:role="line">Actual</tspan></text>
+</svg>