summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]src/frontEnd/Application.py38
-rwxr-xr-x[-rw-r--r--]src/frontEnd/DockArea.py32
-rwxr-xr-x[-rw-r--r--]src/frontEnd/ProjectExplorer.py0
-rwxr-xr-x[-rw-r--r--]src/frontEnd/Workspace.py0
-rwxr-xr-x[-rw-r--r--]src/frontEnd/__init__.py0
-rwxr-xr-x[-rw-r--r--]src/frontEnd/pathmagic.py0
6 files changed, 70 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.
diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py
index b96c468a..267e6617 100644..100755
--- a/src/frontEnd/DockArea.py
+++ b/src/frontEnd/DockArea.py
@@ -4,6 +4,7 @@ from ngspiceSimulation.NgspiceWidget import NgspiceWidget
from configuration.Appconfig import Appconfig
from modelEditor.ModelEditor import ModelEditorclass
from subcircuit.Subcircuit import Subcircuit
+from maker.makerchip import makerchip
from kicadtoNgspice.KicadtoNgspice import MainWindow
from browser.Welcome import Welcome
from browser.UserManual import UserManual
@@ -123,6 +124,9 @@ class DockArea(QtWidgets.QMainWindow):
self.ngspiceNetlist = os.path.join(
self.projDir, self.projName + ".cir.out")
+ if os.path.isfile(self.ngspiceNetlist) is False:
+ return False
+
global count
self.ngspiceWidget = QtWidgets.QWidget()
@@ -254,6 +258,34 @@ class DockArea(QtWidgets.QMainWindow):
count = count + 1
+ def makerchip(self):
+ """This function creates a widget for different subcircuit options."""
+ global count
+ self.makerWidget = QtWidgets.QWidget()
+ self.makerLayout = QtWidgets.QVBoxLayout()
+ self.makerLayout.addWidget(makerchip(self))
+
+ self.makerWidget.setLayout(self.makerLayout)
+ dock['Makerchip-' +
+ str(count)] = QtWidgets.QDockWidget('Makerchip-' + str(count))
+ dock['Makerchip-' + str(count)].setWidget(self.makerWidget)
+ self.addDockWidget(QtCore.Qt.TopDockWidgetArea,
+ dock['Makerchip-' + str(count)])
+ self.tabifyDockWidget(dock['Welcome'],
+ dock['Makerchip-' + str(count)])
+
+ # CSS
+ dock['Makerchip-' + str(count)].setStyleSheet(" \
+ .QWidget { border-radius: 15px; border: 1px solid gray;\
+ padding: 5px; width: 200px; height: 150px; } \
+ ")
+
+ dock['Makerchip-' + str(count)].setVisible(True)
+ dock['Makerchip-' + str(count)].setFocus()
+ dock['Makerchip-' + str(count)].raise_()
+
+ count = count + 1
+
def usermanual(self):
"""This function creates a widget for user manual."""
global count
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
index 456276c8..456276c8 100644..100755
--- a/src/frontEnd/ProjectExplorer.py
+++ b/src/frontEnd/ProjectExplorer.py
diff --git a/src/frontEnd/Workspace.py b/src/frontEnd/Workspace.py
index 4d033539..4d033539 100644..100755
--- a/src/frontEnd/Workspace.py
+++ b/src/frontEnd/Workspace.py
diff --git a/src/frontEnd/__init__.py b/src/frontEnd/__init__.py
index e69de29b..e69de29b 100644..100755
--- a/src/frontEnd/__init__.py
+++ b/src/frontEnd/__init__.py
diff --git a/src/frontEnd/pathmagic.py b/src/frontEnd/pathmagic.py
index 5f0d712c..5f0d712c 100644..100755
--- a/src/frontEnd/pathmagic.py
+++ b/src/frontEnd/pathmagic.py