ModelicaRes icon indicating copy to clipboard operation
ModelicaRes copied to clipboard

Use Qt instead of wx for variable browser

Open kdavies4 opened this issue 10 years ago • 6 comments

QT is used more widely, and it still seems to be difficult to get wx running with Python 3.

kdavies4 avatar Apr 01 '14 18:04 kdavies4

From email to Sebastian Stratbücker 4/25/14:

ModelicaRes only uses wx for two things:

  • a directory selector (wx.DirSelector) in the save function ofbase.py
  • a fairly simple variable browser (SimRes.browser()) which relies on code in gui.py.

The variable browser provides an expandable tree of Modelica variables via SimRes.nametree(). When a variable is highlighted, a plot is shown using (SimRes.plot()) and the variable name, description (SimRes.get_description()), unit (SimRes.get_unit()), and displayUnit (SimRes.get_displayUnit()) are listed. Please feel free to change or embellish that functionality. Nothing is set in stone.

kdavies4 avatar May 02 '14 14:05 kdavies4

It may also be good to use QT in the bin/loadres script instead of easygui.

kdavies4 avatar May 06 '14 18:05 kdavies4

Now using PyQt4 instead of easygui but still need to eliminate wx.

kdavies4 avatar May 09 '14 18:05 kdavies4

wx is no longer needed for installation. It's only loaded when the browse() method is called. I switched from PyQt4 to PySide because it worked more easily and it has better licensing.

kdavies4 avatar May 20 '14 09:05 kdavies4

Is this issue still open? I could only find the use of the wx within the browse() method, so... I created a little routine to use PyQt4 (populate the SimRes values into a QTreeWidget with QTreeWidgetItems)

fran-jo avatar Aug 02 '17 11:08 fran-jo

wxPython is now available for python 3.5 as well. With some small changes, the browse() function in the simres-module is available again.

Source: https://wxpython.org/

FWuellhorst avatar May 01 '19 13:05 FWuellhorst