SPF-OST / pytrnsys_gui

Graphical user interface for pytrnsys
https://pytrnsys.readthedocs.io
GNU Lesser General Public License v3.0
3 stars 4 forks source link

Remove `trnsysType` argument to block item and child classes #150

Open zuckerruebe opened 2 years ago

zuckerruebe commented 2 years ago

As a developer I want to get rid of, e.g., an argument trnsysType with value "HeatPump" to the HeatPump class in its __init__ method If we need string constants to identify our components (e.g. for dragging them into the diagram) they should be constant fields of the classes themselves.

zuckerruebe commented 2 years ago

Drag'n'drop actually the only reason for having these at all I think (and maybe serialization, but not if we're using our serialization framework). There must be a smarter way of ding the drag'n'drop, like passing a serialized factory with the drop event.