diff options
author | Eyantra698Sumanto | 2022-01-11 15:27:39 +0530 |
---|---|---|
committer | Eyantra698Sumanto | 2022-01-25 20:00:31 +0530 |
commit | 349b2dd526a42c9a47d7f5d65d99bffcd8718644 (patch) | |
tree | f0b971e8d603eeb0f5c3d8ee414915e62e130303 /src/frontEnd/DockArea.py | |
parent | 9065ac0e83c74baee675b8bc0b71378354851805 (diff) | |
download | eSim-349b2dd526a42c9a47d7f5d65d99bffcd8718644.tar.gz eSim-349b2dd526a42c9a47d7f5d65d99bffcd8718644.tar.bz2 eSim-349b2dd526a42c9a47d7f5d65d99bffcd8718644.zip |
Adding the makerchip options in frontEnd
Diffstat (limited to 'src/frontEnd/DockArea.py')
-rwxr-xr-x[-rw-r--r--] | src/frontEnd/DockArea.py | 32 |
1 files changed, 32 insertions, 0 deletions
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 |