pyleecan.GUI.Dialog.DMatLib.DMatLib module

class DMatLib(material_dict, machine=None, is_lib_mat=True, selected_id=0)[source]

Bases: Ui_DMatLib, QDialog

Material Library Dialog to view and modify material data.

saveNeeded
materialListChanged
update_treeview_material()[source]

Update the list of Material with the current content of MatLib/Machine

Parameters:

self (DMatLib) – A DMatLib object

get_current_material(is_reference=False)[source]

Return the current selected material

Parameters:
  • self (DMatLib) – A DMatLib object

  • is_reference (bool) – False (default): return from edited matlib else from reference

select_current_material(index=None, is_lib_mat=True)[source]

Change the current selected material

selfDMatLib

A DMatLib object

indexint

Row indew to select in the treeview (None use current)

is_lib_matbool

True: new current is from Library, False from machine

update_material_wid()[source]

Display the current selected material

revert_material()[source]

Revert current material

save_material()[source]

Material have been saved => Update references

update_material_edit_status()[source]

Keep track that the current material is different from the reference and not saved yet

new_material(is_copy=True)[source]

Open the setup material GUI to create a new material according to the current material

Parameters:
  • self (DMatLib) – A DMatLib object

  • is_copy (bool) – True copy current material, else use empty material

edit_in_machine()[source]

Copy the material to be edited in the machine only

delete_material()[source]

Delete the selected material from the Library

Parameters:

self (DMatLib) – A DMatLib object

rename_material()[source]

Rename the selected material from the Library/Machine

Parameters:

self (DMatLib) – A DMatLib object

staticMetaObject = <PySide2.QtCore.QMetaObject object>
update_text(label, name, value, unit)[source]

Update a Qlabel with the value if not None

Parameters:
  • label – Qlabel to update

  • name – Name of the variable

  • value – Current value of the variable (can be None)

  • unit – Variable unit (can be None)