Application Component

class frontEnd.Application.Application(*args)

This class initializes all objects used in this file.

change_mode()
  • This function is used for changing mode of operation for KiCad. - There are three modes of operation :
    • online
    • offline
    • disable
  • If none of the KiCad tools (associated with eSim) are open, then validate this mode by calling the function validate_mode and depending on online_flag, swap appropriate fp-lib-table files.
  • If any of the KiCad tools (associated with eSim) is open, then ask user to close all these tools.
  • If online_flag is None, then disable this feature.

@params

@return
None
change_workspace()

This function call changes Workspace

closeEvent(event)

This function closes the ongoing program (process). When exit button is pressed a Message box pops out with exit message and buttons ‘Yes’, ‘No’.

  1. If ‘Yes’ is pressed:
    • check that program (process) in procThread_list (a list made in Appconfig.py):

      • if available it terminates that program.
      • if the program (process) is not available, then check it in process_obj (a list made in Appconfig.py) and if found, it closes the program.
  2. If ‘No’ is pressed:
    • the program just continues as it was doing earlier.
close_project()

This function closes the saved project. It first checks whether project (file) is present in list.

  • If present:
    • it first kills that process-id.
    • closes that file.
    • Shows message “Current project <path_to_file> is closed”
  • If not present: pass
help_project()
This function opens usermanual in dockarea.
  • It prints the message “”Function : Help”“
  • Uses print_info() method of class Appconfig from Configuration/Appconfig.py file.
  • Call method usermanual() from ./DockArea.py.
initToolBar()

This function initializes Tool Bars. It setups the icons, short-cuts and defining functonality for:

  • Top-tool-bar (New project, Open project, Close project, Mode switch, Help option)
  • Left-tool-bar (Open Schematic, Convert KiCad to NgSpice, Simuation, Model Editor, Subcircuit, NGHDL, Modelica Converter, OM Optimisation)
new_project()

This function call New Project Info class.

open_OMedit()

This function calls ngspice to OMEdit converter and then launch OMEdit.

open_OMoptim()

This function uses validateTool() method from Validation.py:

  • If ‘OMOptim’ is present in executables list then it passes command ‘OMOptim’ to WorkerThread class of Worker.py
  • If ‘OMOptim’ is not present, then it shows error message with link to download it on Linux and Windows.
open_modelEditor()

This function opens model editor option in left-tool-bar. When model editor icon is clicked which is present in left-tool-bar of main page:

  • Meassge shown on screen “Model editor is called”.
  • ‘modeleditor()’ function is called using object ‘obj_dockarea’ of class ‘Mainview’.
open_nghdl()

This function calls NGHDL option in left-tool-bar. It uses validateTool() method from Validation.py:

  • If ‘nghdl’ is present in executables list then it passes command ‘nghdl -e’ to WorkerThread class of Worker.py.
  • If ‘nghdl’ is not present, then it shows error message.
open_ngspice()

This Function execute ngspice on current project.

open_project()

This project call Open Project Info class.

open_subcircuit()

This function opens ‘subcircuit’ option in left-tool-bar. When ‘subcircuit’ icon is clicked wich is present in left-tool-bar of main page:

  • Meassge shown on screen “Subcircuit editor is called”.
  • ‘subcircuiteditor()’ function is called using object ‘obj_dockarea’ of class ‘Mainview’.
validate_mode()

This functions checks whether proper fp-lib-table* files are available or not. If not, then move appropriate files from library/supportFiles folder and set self.online_flag accordingly.

@params

@return
None
class frontEnd.Application.MainView(*args)

This class defines whole view and style of main page:

  • Position of tool bars:
    • Top tool bar.
    • Left tool bar.
  • Project explorer Area.
  • Dock area.
  • Console area.
frontEnd.Application.main(args)

The splash screen opened at the starting of screen is performed by this function.