pyleecan.GUI.Dialog.DMatLib.WMatSelect.WMatSelectV module

class WMatSelectV(parent=None)[source]

Bases: QGroupBox

Material related widget including a Label, a Combobox to select a material and a Button to edit a material libary. WMatSelect is instantiated to empty material data, so it has to be referenced to actual material data with the update method prior to its first usage.

saveNeeded
update(obj, mat_attr_name, material_dict)[source]

Set a reference to a material libray and material data path, updates the Combobox by the material names of the libary and set a referenced material by name.

Parameters:
  • self (WMatSelect) – A WMatSelect object

  • obj (FrozenObject) – A pyleecan object that has a material attribute

  • mat_attr_name (str) – A string of the material attribute name

  • material_dict (dict) – Materials dictionary (library + machine)

setText(txt)[source]

Set the Label’s text

Parameters:
  • self – A WMatSelect object

  • txt – A text string

set_mat_type(index)[source]

Signal to set the referenced material from the material libary by the selected Combobox index

Parameters:
  • self – A WMatSelect object

  • index – Current index of the combobox

s_open_matlib()[source]

Open the GUI (DMatLib widget) to Edit the Material library

Parameters:

self – A WMatSelect object

emit_save()[source]

Emit saveNeeded if a material has been edited

update_mat_list()[source]

Update the combobox with the new materials

Parameters:

self – A WMatSelect object

staticMetaObject = <PySide2.QtCore.QMetaObject object>