summaryrefslogtreecommitdiff
path: root/src/frontEnd/Application.py
diff options
context:
space:
mode:
authorEyantra698Sumanto2022-01-11 15:27:39 +0530
committerEyantra698Sumanto2022-01-25 20:00:31 +0530
commit349b2dd526a42c9a47d7f5d65d99bffcd8718644 (patch)
treef0b971e8d603eeb0f5c3d8ee414915e62e130303 /src/frontEnd/Application.py
parent9065ac0e83c74baee675b8bc0b71378354851805 (diff)
downloadeSim-349b2dd526a42c9a47d7f5d65d99bffcd8718644.tar.gz
eSim-349b2dd526a42c9a47d7f5d65d99bffcd8718644.tar.bz2
eSim-349b2dd526a42c9a47d7f5d65d99bffcd8718644.zip
Adding the makerchip options in frontEnd
Diffstat (limited to 'src/frontEnd/Application.py')
-rwxr-xr-x[-rw-r--r--]src/frontEnd/Application.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index 94bce4ae..6bafe704 100644..100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -11,12 +11,14 @@
# NOTES: ---
# AUTHOR: Fahim Khan, fahim.elex@gmail.com
# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
+# Sumanto Kar, jeetsumanto123@gmail.com
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Tuesday 24 February 2015
# REVISION: Sunday 13 December 2020
# =========================================================================
import os
+import traceback # noqa:F401
if os.name == 'nt': # noqa
from frontEnd import pathmagic # noqa:F401
@@ -210,6 +212,12 @@ class Application(QtWidgets.QMainWindow):
)
self.nghdl.triggered.connect(self.open_nghdl)
+ self.makerchip = QtWidgets.QAction(
+ QtGui.QIcon(init_path + 'images/makerchip.png'),
+ '<b>Makerchip-NgVeri</b>', self
+ )
+ self.makerchip.triggered.connect(self.open_makerchip)
+
self.omedit = QtWidgets.QAction(
QtGui.QIcon(init_path + 'images/omedit.png'),
'<b>Modelica Converter</b>', self
@@ -230,6 +238,7 @@ class Application(QtWidgets.QMainWindow):
self.lefttoolbar.addAction(self.ngspice)
self.lefttoolbar.addAction(self.model)
self.lefttoolbar.addAction(self.subcircuit)
+ self.lefttoolbar.addAction(self.makerchip)
self.lefttoolbar.addAction(self.nghdl)
self.lefttoolbar.addAction(self.omedit)
self.lefttoolbar.addAction(self.omoptim)
@@ -529,6 +538,21 @@ class Application(QtWidgets.QMainWindow):
if self.projDir is not None:
self.obj_Mainview.obj_dockarea.ngspiceEditor(self.projDir)
+ if self.obj_Mainview.obj_dockarea.ngspiceEditor(
+ self.projDir) is False:
+ print(
+ "No netlist (*.cir.out) file"
+ "Check netlist file to change simulation parameters."
+ )
+
+ self.msg = QtWidgets.QErrorMessage()
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Warning Message")
+ self.msg.showMessage(
+ 'No netlist (*.cir.out) file'
+ )
+ self.msg.exec_()
+ return
currTime = time.time()
count = 0
@@ -626,6 +650,20 @@ class Application(QtWidgets.QMainWindow):
'Please make sure it is installed')
self.msg.exec_()
+ def open_makerchip(self):
+ """
+ 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'.
+ """
+ print("Function : Makerchip and Verilator to Ngspice Converter")
+ self.obj_appconfig.print_info('Makerchip is called')
+ self.obj_Mainview.obj_dockarea.makerchip()
+
def open_modelEditor(self):
"""
This function opens model editor option in left-tool-bar.