--- 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):
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/) -->
- 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"
- sodipodi:docname="gui.svg"
- inkscape:version="0.92.3 (2405546, 2018-03-11)">
- <dc:format>image/svg+xml</dc:format>
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:document-units="px"
- inkscape:current-layer="hmi0"
- inkscape:cx="586.09435"
- inkscape:cy="381.71289"
- inkscape:window-width="1600"
- inkscape:window-height="886"
- inkscape:window-maximized="1" />
-name = "Home";
- 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"
- inkscape:label="count"><desc
-path = "/PRESSURETARGET";
-/* Don't forget to press the "Set" button ! */</desc><tspan
- style="stroke-width:1px">8888</tspan></text>
- 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
-path = "/PUMP/PRESSURE";
-/* Don't forget to press the "Set" button ! */</desc><tspan
- style="stroke-width:1px"
- sodipodi:role="line">8888</tspan></text>
- 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;"
- y="197.14285">SetPoint</tspan></text>
- 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
- sodipodi:role="line">Actual</tspan></text>
--- /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/) --> + 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" + sodipodi:docname="gui.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)"> + <dc:format>image/svg+xml</dc:format> + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:document-units="px" + inkscape:current-layer="hmi0" + inkscape:cx="586.09435" + inkscape:cy="381.71289" + inkscape:window-width="1600" + inkscape:window-height="886" + inkscape:window-maximized="1" /> +name = "Home"; + 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" + inkscape:label="count"><desc +path = "/PRESSURETARGET"; +/* Don't forget to press the "Set" button ! */</desc><tspan + style="stroke-width:1px">8888</tspan></text> + 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 +path = "/PUMP/PRESSURE"; +/* Don't forget to press the "Set" button ! */</desc><tspan + style="stroke-width:1px" + sodipodi:role="line">8888</tspan></text> + 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;" + y="197.14285">SetPoint</tspan></text> + 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 + sodipodi:role="line">Actual</tspan></text>