equal
deleted
inserted
replaced
264 ] |
264 ] |
265 |
265 |
266 def _getSVGpath(self, project_path=None): |
266 def _getSVGpath(self, project_path=None): |
267 if project_path is None: |
267 if project_path is None: |
268 project_path = self.CTNPath() |
268 project_path = self.CTNPath() |
269 # define name for SVG file containing gui layout |
269 return os.path.join(project_path, "svghmi.svg") |
270 return os.path.join(project_path, "gui.svg") |
|
271 |
270 |
272 |
271 |
273 def OnCTNSave(self, from_project_path=None): |
272 def OnCTNSave(self, from_project_path=None): |
274 if from_project_path is not None: |
273 if from_project_path is not None: |
275 shutil.copyfile(self._getSVGpath(from_project_path), |
274 shutil.copyfile(self._getSVGpath(from_project_path), |
278 |
277 |
279 def GetSVGGeometry(self): |
278 def GetSVGGeometry(self): |
280 # invoke inskscape -S, csv-parse output, produce elements |
279 # invoke inskscape -S, csv-parse output, produce elements |
281 InkscapeGeomColumns = ["Id", "x", "y", "w", "h"] |
280 InkscapeGeomColumns = ["Id", "x", "y", "w", "h"] |
282 |
281 |
283 # TODO : move following line to __init__ |
|
284 inkpath = get_inkscape_path() |
282 inkpath = get_inkscape_path() |
285 svgpath = self._getSVGpath() |
283 svgpath = self._getSVGpath() |
286 _status, result, _err_result = ProcessLogger(None, |
284 _status, result, _err_result = ProcessLogger(None, |
287 inkpath + " -S " + svgpath, |
285 inkpath + " -S " + svgpath, |
288 no_stdout=True, |
286 no_stdout=True, |