diff options
Diffstat (limited to 'src/frontEnd')
-rwxr-xr-x | src/frontEnd/Application.py | 9 | ||||
-rw-r--r-- | src/frontEnd/DockArea.py | 32 |
2 files changed, 39 insertions, 2 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 4f5f4d4b..7ee98aa8 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -46,8 +46,8 @@ class Application(QtGui.QMainWindow): #Creating require Object self.obj_workspace = Workspace.Workspace() - self.obj_kicad = Kicad() self.obj_Mainview = MainView() + self.obj_kicad = Kicad(self.obj_Mainview.obj_dockarea) self.obj_appconfig = Appconfig() #Initialize all widget @@ -229,6 +229,13 @@ class Application(QtGui.QMainWindow): print "model editor is called" self.obj_appconfig.print_info('model editor is called') self.obj_Mainview.obj_dockarea.modelEditor() + """ + def open_kicadToNgspice(self): + print "kicadToNgspice is called" + self.obj_appconfig.print_info('kicadToNgspice is called') + self.obj_Mainview.obj_dockarea.kicadToNgspiceEditor()""" + + def testing(self): print "Success hit kicad button" diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index fcaf1f0f..f1452497 100644 --- 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 kicadtoNgspice.KicadtoNgspice import MainWindow import os dockList = ['Welcome'] @@ -57,6 +58,11 @@ class DockArea(QtGui.QMainWindow): dock['Tips-'+str(count)].setVisible(True) dock['Tips-'+str(count)].setFocus() + """ + dock['Tips-'+str(count)].setStyleSheet(" \ + :hover { background-color: yellow; } \ + ") + """ dock['Tips-'+str(count)].raise_() count = count + 1 @@ -157,6 +163,30 @@ class DockArea(QtGui.QMainWindow): dock['Model Editor-'+str(count)].raise_() count = count + 1 + + def kicadToNgspiceEditor(self,clarg1,clarg2=None): + global count + self.kicadToNgspiceWidget=QtGui.QWidget() + self.kicadToNgspiceLayout=QtGui.QVBoxLayout() + self.kicadToNgspiceLayout.addWidget(MainWindow(clarg1,clarg2)) + + self.kicadToNgspiceWidget.setLayout(self.kicadToNgspiceLayout) + dock['kicadToNgspice-'+str(count)] = QtGui.QDockWidget('kicadToNgspice-'+str(count)) + dock['kicadToNgspice-'+str(count)].setWidget(self.kicadToNgspiceWidget) + self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['kicadToNgspice-'+str(count)]) + self.tabifyDockWidget(dock['Welcome'],dock['kicadToNgspice-'+str(count)]) + + #CSS + dock['kicadToNgspice-'+str(count)].setStyleSheet(" \ + .QWidget { border-radius: 15px; border: 1px solid gray; padding: 5px; width: 200px; height: 150px; } \ + ") + + dock['kicadToNgspice-'+str(count)].setVisible(True) + dock['kicadToNgspice-'+str(count)].setFocus() + dock['kicadToNgspice-'+str(count)].raise_() + + count = count + 1 + def subcircuiteditor(self): """ @@ -166,7 +196,7 @@ class DockArea(QtGui.QMainWindow): global count self.subcktWidget=QtGui.QWidget() self.subcktLayout=QtGui.QVBoxLayout() - self.subcktLayout.addWidget(Subcircuit()) + self.subcktLayout.addWidget(Subcircuit(self)) self.subcktWidget.setLayout(self.subcktLayout) dock['Subcircuit-'+str(count)] = QtGui.QDockWidget('Subcircuit-'+str(count)) |