summaryrefslogtreecommitdiff
path: root/src/frontEnd
diff options
context:
space:
mode:
authorxoher2015-07-28 02:36:59 +0530
committerxoher2015-07-28 02:36:59 +0530
commit034bc2734d017f3bdc94a309102b3141cb623ce9 (patch)
tree8d0143881ede180b69775bcfb19f095b2875a9b0 /src/frontEnd
parent6d0631e034026b958437456ae461f21ba8429813 (diff)
downloadeSim-034bc2734d017f3bdc94a309102b3141cb623ce9.tar.gz
eSim-034bc2734d017f3bdc94a309102b3141cb623ce9.tar.bz2
eSim-034bc2734d017f3bdc94a309102b3141cb623ce9.zip
Kicad to NgSpice conversion opens in dock area
Diffstat (limited to 'src/frontEnd')
-rwxr-xr-xsrc/frontEnd/Application.py9
-rw-r--r--src/frontEnd/DockArea.py32
2 files changed, 39 insertions, 2 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index a139a7bd..06be27ff 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
@@ -228,6 +228,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))