7.5.6.8. pymodaq_gui.utils.utils module

pymodaq_gui.utils.utils.clickable(widget)[source]
pymodaq_gui.utils.utils.exec()[source]
pymodaq_gui.utils.utils.h5tree_to_QTree(base_node, base_tree_elt=None, pixmap_items=[])[source]
Convert a loaded h5 file to a QTreeWidgetItem element structure containing two columns.
The first is the name of the h5 current node, the second is the path of the node in the h5 structure.

Recursive function discreasing on base_node.

Parameters

Type

Description

h5file

instance class File from tables module

loaded h5 file

base_node

pytables h5 node

parent node

base_tree_elt

QTreeWidgetItem

parent QTreeWidgetItem element

Returns:

h5 structure copy converted into QtreeWidgetItem structure.

Return type:

QTreeWidgetItem

See also

h5tree_to_QTree

pymodaq_gui.utils.utils.mkQApp(name: str)[source]
pymodaq_gui.utils.utils.pngbinary2Qlabel(databinary, scale_height: int = None)[source]
pymodaq_gui.utils.utils.set_dark_palette(app)[source]
pymodaq_gui.utils.utils.set_enable_recursive(children, enable=False)[source]

Apply the enable state on all children widgets, do it recursively

Parameters:
  • children ((list) elements children ofa pyqt5 element) –

  • enable ((bool) set enabled state (True) of all children widgets) –

pymodaq_gui.utils.utils.start_qapplication() QApplication[source]
pymodaq_gui.utils.utils.widget_to_png_to_bytes(widget, keep_aspect=True, width=200, height=100)[source]

Renders the widget content in a png format as a bytes string :param widget: :type widget: (QWidget) the widget to render :param keep_aspect: if False use set values of width and height to produce the png :type keep_aspect: (bool) if True use width and the widget aspect ratio to calculate the height :param width: :type width: (int) the rendered width of the png :param height: :type height: (int) the rendered width of the png

Return type:

binary string