From 767b32284be2c6843505e96295547d556c633dcf Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 16 Sep 2020 08:59:52 +0200 Subject: [PATCH] try to fix for use with PyQt5 --- examples/simple/__main__.py | 10 ++++--- examples/{tango => simple_tango}/__init__.py | 0 examples/{tango => simple_tango}/__main__.py | 0 examples/{tango => simple_tango}/example.html | 0 examples/{tango => simple_tango}/example.svg | 26 ++++++++++++++----- examples/{tango => simple_tango}/example1.css | 0 examples/simple_tango/models.json | 5 ++++ examples/tango/models.json | 5 ---- setup.cfg | 2 +- svgsynoptic2/caseless.py | 8 +++--- svgsynoptic2/jsinterface.py | 4 +-- svgsynoptic2/synopticwidget.py | 26 ++++++++++--------- svgsynoptic2/taurusregistry.py | 20 +++++++------- svgsynoptic2/taurussynopticwidget.py | 24 ++++++++--------- 14 files changed, 73 insertions(+), 57 deletions(-) rename examples/{tango => simple_tango}/__init__.py (100%) rename examples/{tango => simple_tango}/__main__.py (100%) rename examples/{tango => simple_tango}/example.html (100%) rename examples/{tango => simple_tango}/example.svg (88%) rename examples/{tango => simple_tango}/example1.css (100%) create mode 100755 examples/simple_tango/models.json delete mode 100755 examples/tango/models.json diff --git a/examples/simple/__main__.py b/examples/simple/__main__.py index 44c8d79..f858fe5 100755 --- a/examples/simple/__main__.py +++ b/examples/simple/__main__.py @@ -15,10 +15,12 @@ class ExampleSynopticWidget(SynopticWidget): "A custom subclass of the synoptic widget." - - def on_click(self, kind, name): - # Overriding the click event handler to print information - print "click", kind, name + def __init__(self, url=None, parent=None, *args, **kwargs): + super(ExampleSynopticWidget, self).__init__(url=None, parent=None, *args, **kwargs) + + #def on_click(self, kind, name): + # # Overriding the click event handler to print information + # print("click", kind, name) def main(): diff --git a/examples/tango/__init__.py b/examples/simple_tango/__init__.py similarity index 100% rename from examples/tango/__init__.py rename to examples/simple_tango/__init__.py diff --git a/examples/tango/__main__.py b/examples/simple_tango/__main__.py similarity index 100% rename from examples/tango/__main__.py rename to examples/simple_tango/__main__.py diff --git a/examples/tango/example.html b/examples/simple_tango/example.html similarity index 100% rename from examples/tango/example.html rename to examples/simple_tango/example.html diff --git a/examples/tango/example.svg b/examples/simple_tango/example.svg similarity index 88% rename from examples/tango/example.svg rename to examples/simple_tango/example.svg index 27bb269..48df97c 100755 --- a/examples/tango/example.svg +++ b/examples/simple_tango/example.svg @@ -14,7 +14,7 @@ viewBox="0 0 517.09657 662.55852" id="svg6521" version="1.1" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" + inkscape:version="0.92.3 (2405546, 2018-03-11)" sodipodi:docname="example.svg"> @@ -26,15 +26,15 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.95821164" - inkscape:cx="344.24245" + inkscape:cx="227.87985" inkscape:cy="370.27965" inkscape:document-units="px" - inkscape:current-layer="layer4" + inkscape:current-layer="g5656" showgrid="false" - inkscape:window-width="1920" - inkscape:window-height="1140" - inkscape:window-x="0" - inkscape:window-y="31" + inkscape:window-width="1880" + inkscape:window-height="1175" + inkscape:window-x="40" + inkscape:window-y="0" inkscape:window-maximized="1" /> @@ -101,6 +101,18 @@ width="99.143021" id="rect5654" style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#cccccc;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" /> + model=sys/tg_test/1/double_scalartest