summaryrefslogtreecommitdiff
path: root/src/frontEnd/DockArea.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontEnd/DockArea.py')
-rwxr-xr-x[-rw-r--r--]src/frontEnd/DockArea.py32
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