taurus-org / taurus

Moved to https://gitlab.com/taurus-org/taurus
http://taurus-scada.org
43 stars 46 forks source link

[taurusgui] how to include a JDraw synoptic #527

Closed PhilLAL closed 7 years ago

PhilLAL commented 7 years ago

Hello, following the doc, I understood it is possible to include a panel which is a JDraw application already developped. I tried to include this JDraw with "Add Panel" selecting Widget Type=TaurusJDrawSynopticsView but I do not have anywhere to add my JDraw location.

However, it seems to work when adding this synoptic using taurusgui --new-gui and selecting JDW synoptic file. How can we add a JDraw synoptic into an existing TaurusGui?

cpascual commented 7 years ago

There is no current way of doing it while the application is launched, but you can use the "new gui wizard" to edit an existing TaurusGui:

For example:

PS: while testing this for this reply, I discovered that #477 introduced a regression that prevents to edit existing GUIs (a fix has been proposed in #532)

PhilLAL commented 7 years ago

Thank you for this explanation. I understand the "Add panel" into the Gui does not allow to add a Widget Type=TaurusJDrawSynopticsView

Then, perhaps would it be more clear to comment the code making this widget appearing into the "Add panel" window? It could be uncommented when adding a Synoptic will be possible after the creation. Isn'it ?

cpascual commented 7 years ago

Actually, I just checked and it is indeed possible to set the file from the Add Panel dialog:

You just need to click on "Advanced Settings" and enter the (absolute path) name of the .jdw file in the "model" box.

Note however that this is slightly different from adding the synoptic with the --new-gui wizard:

So, I am removing the "bug" label and closing this as an answered question.

PhilLAL commented 7 years ago

Thank you, it works! (I'll see later for manual adding reader/writer registration of the jdraw panel) Thus this procedure should be documented since it seems not straightforward that Model can be used to enter a JDW file (I understood from http://taurus-scada.org/en/latest/users/ui/modelchooser.html it is used for device/attributes).

cpascual commented 7 years ago

I understood from http://taurus-scada.org/en/latest/users/ui/modelchooser.html it is used for device/attributes).

Yes, but the Synoptic widget is "non standard" in that it (ab)uses the model API to set the name of the jdraw file... This should be done in a more standard way.

Thus this procedure should be documented

You are right... would you mind creating a PR? ;)

PhilLAL commented 7 years ago

Ok I will create a PR, I just wanted to be sure I did not misunderstood.