diff options
-rwxr-xr-x | src/frontEnd/Application.py | 2 | ||||
-rw-r--r-- | src/kicadtoNgspice/Analysis.py | 9 | ||||
-rw-r--r-- | src/kicadtoNgspice/Analysis.pyc | bin | 4527 -> 4527 bytes | |||
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.py | 20 | ||||
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.pyc | bin | 2655 -> 3356 bytes | |||
-rw-r--r-- | src/kicadtoNgspice/Processing.py | 10 | ||||
-rw-r--r-- | src/kicadtoNgspice/Source.py | 15 | ||||
-rw-r--r-- | src/projManagement/Kicad.pyc | bin | 4113 -> 4113 bytes |
8 files changed, 38 insertions, 18 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 00c6312f..8e21c171 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -118,7 +118,7 @@ def main(args): It is main function of the module.It starts the application """ print "Hello Main" - app = QtGui.QApplication(sys.argv) + app = QtGui.QApplication(args) """ splash_pix = QtGui.QPixmap('../images/FreeEDAlogo.jpg') diff --git a/src/kicadtoNgspice/Analysis.py b/src/kicadtoNgspice/Analysis.py index baccb669..15d20039 100644 --- a/src/kicadtoNgspice/Analysis.py +++ b/src/kicadtoNgspice/Analysis.py @@ -10,17 +10,12 @@ class Analysis(QtGui.QWidget): def createAnalysisWidget(self): - self.grid = QtGui.QGridLayout() - - self.grid.addWidget(self.createCheckBobx(),0,0) self.grid.addWidget(self.createACgroup(),1,0) self.grid.addWidget(self.createDCgroup(),2,0) self.grid.addWidget(self.createTRANgroup(),3,0) - - - + ''' self.grid.addWidget(self.createTRANgroup(),3,0) self.grid.addWidget(self.createTRANgroup(),4,0) @@ -107,7 +102,7 @@ class Analysis(QtGui.QWidget): self.acbox.setDisabled(True) self.acbox.setLayout(self.acgrid) - #CSS + #CSS self.acbox.setStyleSheet(" \ QGroupBox { border: 1px solid gray; border-radius: 9px; margin-top: 0.5em; } \ QGroupBox::title { subcontrol-origin: margin; left: 10px; padding: 0 3px 0 3px; } \ diff --git a/src/kicadtoNgspice/Analysis.pyc b/src/kicadtoNgspice/Analysis.pyc Binary files differindex 3d962e13..3a756f63 100644 --- a/src/kicadtoNgspice/Analysis.pyc +++ b/src/kicadtoNgspice/Analysis.pyc diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py index 935f5bb2..01887ec5 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.py +++ b/src/kicadtoNgspice/KicadtoNgspice.py @@ -16,19 +16,19 @@ # REVISION: --- #=============================================================================== import sys +import os from PyQt4 import QtGui import Analysis +import Source class MainWindow(QtGui.QWidget): - netList = [] def __init__(self): QtGui.QWidget.__init__(self) + #self.kicadfile = sys.argv[1] + self.kicadfile = "/home/fahim/eSim-Workspace/BJT_amplifier/BJT_amplifier.cir" print "Init Kicad to Ngspice" - - #Creating Objects for Analysis,Source and model - - #self.obj_analysis = Analysis.Analysis() - + + #Creating GUI for kicadtoNgspice window self.grid = QtGui.QGridLayout(self) self.convertbtn = QtGui.QPushButton("Convert") @@ -51,7 +51,7 @@ class MainWindow(QtGui.QWidget): self.analysisTab.setWidgetResizable(True) self.sourceTab = QtGui.QScrollArea() - self.sourceTab.setWidget(QtGui.QWidget()) + self.sourceTab.setWidget(Source.Source(self.kicadfile)) self.sourceTabLayout = QtGui.QVBoxLayout(self.sourceTab.widget()) self.sourceTab.setWidgetResizable(True) @@ -72,8 +72,7 @@ class MainWindow(QtGui.QWidget): return self.convertWindow - - + def main(args): @@ -83,7 +82,7 @@ def main(args): #print "The passed netlist file is ",sys.argv[1] - app = QtGui.QApplication(sys.argv) + app = QtGui.QApplication(args) #app.setApplicationName("KicadToNgspice") #app.setQuitOnLastWindowClosed(True) kingWindow = MainWindow() @@ -94,6 +93,7 @@ def main(args): if __name__ == '__main__': main(sys.argv) + diff --git a/src/kicadtoNgspice/KicadtoNgspice.pyc b/src/kicadtoNgspice/KicadtoNgspice.pyc Binary files differindex f0da8737..bb6ada22 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.pyc +++ b/src/kicadtoNgspice/KicadtoNgspice.pyc diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py new file mode 100644 index 00000000..b8b5ae66 --- /dev/null +++ b/src/kicadtoNgspice/Processing.py @@ -0,0 +1,10 @@ + +class PrcocessNetlist: + def __init__(self): + pass + + def readNetlist(self,filename): + f = open(filename) + data=f.read() + f.close() + return data.splitlines() diff --git a/src/kicadtoNgspice/Source.py b/src/kicadtoNgspice/Source.py new file mode 100644 index 00000000..054928b2 --- /dev/null +++ b/src/kicadtoNgspice/Source.py @@ -0,0 +1,15 @@ + +from PyQt4 import QtGui +from Processing import PrcocessNetlist + +class Source(QtGui.QWidget): + def __init__(self,kicadfile=None): + QtGui.QWidget.__init__(self) + self.obj_proc = PrcocessNetlist() + + #Read NetList + self.kicadNetlist = self.obj_proc.readNetlist(kicadfile) + print "My Net List ",self.kicadNetlist + + + diff --git a/src/projManagement/Kicad.pyc b/src/projManagement/Kicad.pyc Binary files differindex 64f17fea..c488f7ec 100644 --- a/src/projManagement/Kicad.pyc +++ b/src/projManagement/Kicad.pyc |