diff options
author | fahim | 2015-04-22 17:52:04 +0530 |
---|---|---|
committer | fahim | 2015-04-22 17:52:04 +0530 |
commit | 342730ed59f75ebe1b5df0f886ae9e6bcd787ee6 (patch) | |
tree | 759bb8348608c67057aa58b4c654d9cb2339f62d /src/projManagement/Kicad.py | |
parent | af98d04dd0a438b7dd63ff72c71f0ceb695fe704 (diff) | |
download | eSim-342730ed59f75ebe1b5df0f886ae9e6bcd787ee6.tar.gz eSim-342730ed59f75ebe1b5df0f886ae9e6bcd787ee6.tar.bz2 eSim-342730ed59f75ebe1b5df0f886ae9e6bcd787ee6.zip |
Subject: Added Device Libarary Tab.Few Changes in Workspace class.
Description: Completed the Device Library auto creation of Widget. Added
the information to schematicInfo.Hence to the final ".cir.out" file.
Added sample device library.
Deleted/Comment unwanted print statement.
Added details of function in the comment.
Diffstat (limited to 'src/projManagement/Kicad.py')
-rw-r--r-- | src/projManagement/Kicad.py | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py index a575af21..65f71266 100644 --- a/src/projManagement/Kicad.py +++ b/src/projManagement/Kicad.py @@ -21,10 +21,10 @@ import Validation from configuration.Appconfig import Appconfig import Worker from PyQt4 import QtGui -import time + class Kicad: """ - Class Kicad open Schematic,PCB and Layout + This class called the Kicad Schematic,KicadtoNgspice Converter,Layout editor and Footprint Editor """ def __init__(self): self.obj_validation = Validation.Validation() @@ -32,12 +32,15 @@ class Kicad: def openSchematic(self): + """ + This function create command to open Kicad schematic + """ print "Kicad Schematic is called" self.projDir = self.obj_appconfig.current_project["ProjectName"] #Validating if current project is available or not if self.obj_validation.validateKicad(self.projDir): - print "calling Kicad schematic ",self.projDir + #print "calling Kicad schematic ",self.projDir self.projName = os.path.basename(self.projDir) self.project = os.path.join(self.projDir,self.projName) @@ -54,12 +57,15 @@ class Kicad: def openFootprint(self): + """ + This function create command to open Footprint editor + """ print "Kicad Foot print Editor called" self.projDir = self.obj_appconfig.current_project["ProjectName"] #Validating if current project is available or not if self.obj_validation.validateKicad(self.projDir): - print "calling Kicad FootPrint Editor ",self.projDir + #print "calling Kicad FootPrint Editor ",self.projDir self.projName = os.path.basename(self.projDir) self.project = os.path.join(self.projDir,self.projName) @@ -74,6 +80,9 @@ class Kicad: self.msg.setWindowTitle("Error Message") def openLayout(self): + """ + This function create command to open Layout editor + """ print "Kicad Layout is called" self.projDir = self.obj_appconfig.current_project["ProjectName"] #Validating if current project is available or not @@ -88,24 +97,26 @@ class Kicad: self.obj_workThread.start() else: - self.msg = QtGui.QErrorMessage(None) + self.msg = QtGui.QErrorMessage(None) self.msg.showMessage('Please select the project first. You can either create new project or open existing project') self.msg.setWindowTitle("Error Message") def openKicadToNgspice(self): + """ + This function create command to call kicad to Ngspice converter. + """ print "Open Kicad to Ngspice Conversion" self.projDir = self.obj_appconfig.current_project["ProjectName"] #Validating if current project is available or not if self.obj_validation.validateKicad(self.projDir): - print "Project is present" + #print "Project is present" #Cheking if project has .cir file or not if self.obj_validation.validateCir(self.projDir): - print "CIR file present" + #print "CIR file present" self.projName = os.path.basename(self.projDir) self.project = os.path.join(self.projDir,self.projName) #Creating a command to run - #self.cmd = "python /home/fahim/Workspace/eSim/src/kicadtoNgspice/KicadtoNgspice.py "+self.project+".cir " self.cmd = "python ../kicadtoNgspice/KicadtoNgspice.py "+self.project+".cir " self.obj_workThread = Worker.WorkerThread(self.cmd) self.obj_workThread.start() @@ -120,4 +131,4 @@ class Kicad: self.msg = QtGui.QErrorMessage(None) self.msg.showMessage('Please select the project first. You can either create new project or open existing project') self.msg.setWindowTitle("Error Message") -
\ No newline at end of file +
\ No newline at end of file |