WMatSelect module

class WMatSelect(parent=None)[source]

Bases: pyleecan.GUI.Dialog.DMatLib.WMatSelect.Ui_WMatSelect.Ui_WMatSelect, PyQt5.QtWidgets.QWidget

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.

update(obj, mat_attr_name, matlib=[], matlib_path='')[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.

  • self – A WMatSelect object
  • obj – A pyleecan object that has a material attribute
  • mat_attr_name – A string of the material attribute name
  • matlib – A material libary, i.e. a list of Material objects
  • matlib_path – A string containing the path of material data

Set the Label’s text

  • self – A WMatSelect object
  • txt – A text string

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

  • self – A WMatSelect object
  • index – Current index of the combobox

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

Parameters:self – A WMatSelect object

Update the matlib with the new value

Parameters:self – A WMatSelect object