Subcircuit Tab component

Note

Source : /src/kicadtoNgspice/SubcircuitTab.py

class kicadtoNgspice.SubcircuitTab.SubcircuitTab(*args: Any, **kwargs: Any)
  • This class creates Subcircuit Tab in KicadtoNgspice Window

  • It dynamically creates the widget for subcircuits, according to the .cir file

  • Creates lineEdit and Add button, which triggers fileSelector

  • Also, checks Previous_value.xml for previous subcircuit value to autofill, the lineEdit

  • Add button is bind to trackSubcircuit

  • Also trackSubcircuit without button is triggered if lineEdit filled

trackSubcircuit()
  • This function is use to keep track of all Subcircuit widget

  • Here the number of ports is tracked using the numPorts and Add button objectName property, which is refered using sender

  • Once a file is selected using the QFileDialog validate it

  • Pass the path of subciruit and the number of ports

  • According to validation state take further steps

  • If validated correctly, add to TrackWidget

trackSubcircuitWithoutButton(iter_value, path_value)
  • Same as trackSubcircuit, but here the count value is passed directly without using any button as in Add

  • This is triggered only once, initally