diff options
author | fahim | 2015-04-07 15:32:15 +0530 |
---|---|---|
committer | fahim | 2015-04-07 15:32:15 +0530 |
commit | e10b2de0bec4836b2dc134d56ed573ad1d633ce3 (patch) | |
tree | 3dac4590ca8567f3debf33d895d4076eccbc2a02 | |
parent | 34d01b75a71c270922772a2d12f493b7a46866fe (diff) | |
download | eSim-e10b2de0bec4836b2dc134d56ed573ad1d633ce3.tar.gz eSim-e10b2de0bec4836b2dc134d56ed573ad1d633ce3.tar.bz2 eSim-e10b2de0bec4836b2dc134d56ed573ad1d633ce3.zip |
Subject: Added new Icon images and Modified code to get model from xml
file
Description: Started the work to get the details of model parameter from xml.
26 files changed, 820 insertions, 34 deletions
diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index bf3c4140..5735534b 100644 --- a/src/configuration/Appconfig.py +++ b/src/configuration/Appconfig.py @@ -34,7 +34,7 @@ class Appconfig(QtGui.QWidget): #Workspace detail workspace_text = '''ecSim stores your project in a folder called a workspace. You can choose a different workspace folder to use for this session.''' - + def __init__(self): super(Appconfig, self).__init__() diff --git a/src/configuration/Appconfig.pyc b/src/configuration/Appconfig.pyc Binary files differindex 2229b859..a9348ab9 100644 --- a/src/configuration/Appconfig.pyc +++ b/src/configuration/Appconfig.pyc diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index e52ac45b..1d6b4f03 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -57,20 +57,21 @@ class Application(QtGui.QMainWindow): def initActions(self): - - self.newproj = QtGui.QAction(QtGui.QIcon('../images/newProject.svg'),'<b>New Project</b>',self) + + self.newproj = QtGui.QAction(QtGui.QIcon('../images/newProject.png'),'<b>New Project</b>',self) self.newproj.setShortcut('Ctrl+N') self.newproj.triggered.connect(self.new_project) - self.openproj = QtGui.QAction(QtGui.QIcon('../images/openProject.svg'),'<b>Open Project</b>',self) + + self.openproj = QtGui.QAction(QtGui.QIcon('../images/openProject.png'),'<b>Open Project</b>',self) self.openproj.setShortcut('Ctrl+O') self.openproj.triggered.connect(self.open_project) - self.exitproj = QtGui.QAction(QtGui.QIcon('../images/closeProject.svg'),'<b>Exit</b>',self) + self.exitproj = QtGui.QAction(QtGui.QIcon('../images/closeProject.png'),'<b>Exit</b>',self) self.exitproj.setShortcut('Ctrl+X') self.exitproj.triggered.connect(self.exit_project) - self.helpfile = QtGui.QAction(QtGui.QIcon('../images/default.png'),'<b>Help</b>',self) + self.helpfile = QtGui.QAction(QtGui.QIcon('../images/helpProject.png'),'<b>Help</b>',self) self.helpfile.setShortcut('Ctrl+H') self.helpfile.triggered.connect(self.help_project) @@ -79,6 +80,10 @@ class Application(QtGui.QMainWindow): self.mainToolbar.addAction(self.openproj) self.mainToolbar.addAction(self.exitproj) self.mainToolbar.addAction(self.helpfile) + + #self.test = self.addToolBar("Temp") + + def initView(self): @@ -101,12 +106,13 @@ class Application(QtGui.QMainWindow): def exit_project(self): print "Exit Project called" - self.close() + self.destroy() def help_project(self): print "Help is called" print "Current Project : ",self.obj_appconfig.current_project - print "Sourcelist track : ",self.obj_appconfig.sourcelisttrack + + def testing(self): print "Sucess hit kicad button" diff --git a/src/images/closeProject.png b/src/images/closeProject.png Binary files differnew file mode 100644 index 00000000..2aa0dbb4 --- /dev/null +++ b/src/images/closeProject.png diff --git a/src/images/helpProject.png b/src/images/helpProject.png Binary files differnew file mode 100644 index 00000000..1be6a7bc --- /dev/null +++ b/src/images/helpProject.png diff --git a/src/images/helpProject.svg b/src/images/helpProject.svg new file mode 100644 index 00000000..27252661 --- /dev/null +++ b/src/images/helpProject.svg @@ -0,0 +1,604 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg4798" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="help_project.svg"> + <defs + id="defs4800"> + <filter + color-interpolation-filters="sRGB" + inkscape:collect="always" + id="filter6732" + x="-0.026148643" + width="1.0522974" + y="-0.47067559" + height="1.9413512"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="0.96573373" + id="feGaussianBlur6734" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4316" + id="linearGradient4370" + gradientUnits="userSpaceOnUse" + x1="292.05887" + y1="519.82959" + x2="268.07745" + y2="430.81122" /> + <linearGradient + id="linearGradient4316"> + <stop + style="stop-color:#ff9104;stop-opacity:1;" + offset="0" + id="stop4318" /> + <stop + style="stop-color:#ff9104;stop-opacity:0;" + offset="1" + id="stop4320" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4282" + id="linearGradient4372" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-1,0,0,1,573.14476,0)" + x1="240.28029" + y1="500.95459" + x2="332.09924" + y2="501.71982" /> + <linearGradient + id="linearGradient4282"> + <stop + style="stop-color:#552200;stop-opacity:1;" + offset="0" + id="stop4284" /> + <stop + style="stop-color:#ffff00;stop-opacity:1;" + offset="1" + id="stop4286" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4332" + id="radialGradient4374" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-1.3485167,0.81562559,-0.65956071,-1.0904824,1016.5773,799.34697)" + cx="299.5285" + cy="492.45996" + fx="299.5285" + fy="492.45996" + r="41.591576" /> + <linearGradient + id="linearGradient4332"> + <stop + style="stop-color:#ffffc0;stop-opacity:1;" + offset="0" + id="stop4334" /> + <stop + style="stop-color:#b4a60a;stop-opacity:0;" + offset="1" + id="stop4336" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4340" + id="linearGradient4376" + gradientUnits="userSpaceOnUse" + x1="245.23674" + y1="488.82965" + x2="329.13657" + y2="488.82965" /> + <linearGradient + id="linearGradient4340"> + <stop + style="stop-color:#ffff00;stop-opacity:1;" + offset="0" + id="stop4342" /> + <stop + style="stop-color:#ff7100;stop-opacity:0.98314607;" + offset="1" + id="stop4344" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4298" + id="linearGradient4378" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(99.028606,-1.0749375)" + x1="178.65517" + y1="492.24039" + x2="190.75194" + y2="491.98532" /> + <linearGradient + id="linearGradient4298"> + <stop + style="stop-color:#552200;stop-opacity:1;" + offset="0" + id="stop4300" /> + <stop + style="stop-color:#ffff00;stop-opacity:1;" + offset="1" + id="stop4302" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4298" + id="linearGradient4380" + gradientUnits="userSpaceOnUse" + x1="156.46434" + y1="513.92108" + x2="174.17259" + y2="513.66602" /> + <linearGradient + id="linearGradient4611"> + <stop + style="stop-color:#552200;stop-opacity:1;" + offset="0" + id="stop4613" /> + <stop + style="stop-color:#ffff00;stop-opacity:1;" + offset="1" + id="stop4615" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7426" + id="linearGradient4425" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-35.712334,175.88323)" + x1="46.105835" + y1="256.51257" + x2="52.131027" + y2="253.631" /> + <linearGradient + id="linearGradient7426"> + <stop + style="stop-color:#eace62;stop-opacity:1;" + offset="0" + id="stop7428" /> + <stop + style="stop-color:#f2eabc;stop-opacity:1;" + offset="1" + id="stop7430" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7464" + id="linearGradient4427" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-35.712334,175.88323)" + x1="40.468422" + y1="274.26099" + x2="79.122116" + y2="274.26099" /> + <linearGradient + inkscape:collect="always" + id="linearGradient7464"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop7466" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop7468" /> + </linearGradient> + <filter + color-interpolation-filters="sRGB" + inkscape:collect="always" + id="filter7460"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="0.13596761" + id="feGaussianBlur7462" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7472-89" + id="linearGradient4429" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.98346707,0,0,0.99734238,54.785714,229.26154)" + x1="43.256702" + y1="10.273754" + x2="23.375715" + y2="17.91016" /> + <linearGradient + id="linearGradient7472-89"> + <stop + style="stop-color:#346417;stop-opacity:1;" + offset="0" + id="stop7474-62" /> + <stop + style="stop-color:#4fc300;stop-opacity:1;" + offset="1" + id="stop7476-2" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7353" + id="linearGradient4431" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(31.123264,123.93392)" + x1="69.962402" + y1="114.63699" + x2="60.177341" + y2="119.23864" /> + <linearGradient + inkscape:collect="always" + id="linearGradient7353"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop7355" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop7357" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7606" + id="linearGradient4433" + gradientUnits="userSpaceOnUse" + x1="83.346611" + y1="222.69601" + x2="100.18152" + y2="232.17395" /> + <linearGradient + id="linearGradient7606"> + <stop + id="stop7608" + offset="0" + style="stop-color:#219900;stop-opacity:1" /> + <stop + id="stop7610" + offset="1" + style="stop-color:#bfdd00;stop-opacity:1;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7577" + id="linearGradient4435" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.33655434,-0.94166405,0.94166405,-0.33655434,-80.69445,419.70882)" + x1="89.593048" + y1="225.65485" + x2="104.78416" + y2="234.80403" /> + <linearGradient + id="linearGradient7577"> + <stop + style="stop-color:#213200;stop-opacity:1;" + offset="0" + id="stop7579" /> + <stop + style="stop-color:#bcc100;stop-opacity:1;" + offset="1" + id="stop7581" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7589" + id="linearGradient4437" + gradientUnits="userSpaceOnUse" + x1="107.96759" + y1="236.36673" + x2="74.102226" + y2="250.13136" /> + <linearGradient + inkscape:collect="always" + id="linearGradient7589"> + <stop + style="stop-color:#313f17;stop-opacity:1;" + offset="0" + id="stop7591" /> + <stop + style="stop-color:#313f17;stop-opacity:0;" + offset="1" + id="stop7593" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7426" + id="linearGradient4400" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-228.55892,175.88323)" + x1="46.105835" + y1="256.51257" + x2="52.131027" + y2="253.631" /> + <linearGradient + id="linearGradient4656"> + <stop + style="stop-color:#eace62;stop-opacity:1;" + offset="0" + id="stop4658" /> + <stop + style="stop-color:#f2eabc;stop-opacity:1;" + offset="1" + id="stop4660" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient7308" + id="radialGradient4402" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-1.7052998,1.938385,-2.2578407,-1.9863422,319.53554,750.58868)" + cx="-90.801689" + cy="208.22922" + fx="-90.801689" + fy="208.22922" + r="28.762436" /> + <linearGradient + id="linearGradient7308"> + <stop + style="stop-color:#82ff00;stop-opacity:1;" + offset="0" + id="stop7310" /> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="1" + id="stop7312" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6602" + id="linearGradient4404" + gradientUnits="userSpaceOnUse" + x1="314.89951" + y1="366.39569" + x2="314.70337" + y2="412.00592" /> + <linearGradient + inkscape:collect="always" + id="linearGradient6602"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop6604" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop6606" /> + </linearGradient> + <filter + color-interpolation-filters="sRGB" + inkscape:collect="always" + id="filter6718"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="0.53478457" + id="feGaussianBlur6720" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7464" + id="linearGradient4406" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-228.55892,175.88323)" + x1="40.468422" + y1="274.26099" + x2="79.122116" + y2="274.26099" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6999" + id="linearGradient4472" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6695018,-0.74281043,0.72380831,0.65237502,-528.47729,110.62669)" + x1="309.97809" + y1="441.74191" + x2="382.68863" + y2="354.85092" /> + <linearGradient + id="linearGradient6999"> + <stop + id="stop7001" + offset="0" + style="stop-color:#0044aa;stop-opacity:1" /> + <stop + id="stop7003" + offset="1" + style="stop-color:#aaccff;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6602" + id="linearGradient4474" + gradientUnits="userSpaceOnUse" + x1="314.89951" + y1="366.39569" + x2="314.70337" + y2="412.00592" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7032" + id="linearGradient4478" + gradientUnits="userSpaceOnUse" + x1="30.723019" + y1="224.33972" + x2="54.822319" + y2="224.33972" /> + <linearGradient + inkscape:collect="always" + id="linearGradient7032"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop7034" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop7036" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7032" + id="linearGradient4476" + gradientUnits="userSpaceOnUse" + x1="30.723019" + y1="224.33972" + x2="54.822319" + y2="224.33972" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6744" + id="linearGradient4264" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.6695018,-0.74281043,0.72380831,0.65237502,-261.84026,258.04505)" + x1="309.97809" + y1="441.74191" + x2="382.68863" + y2="354.85092" /> + <linearGradient + id="linearGradient6744"> + <stop + style="stop-color:#470d08;stop-opacity:1;" + offset="0" + id="stop6746" /> + <stop + style="stop-color:#b52f39;stop-opacity:1;" + offset="1" + id="stop6748" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6602" + id="linearGradient4266" + gradientUnits="userSpaceOnUse" + x1="314.89951" + y1="366.39569" + x2="314.70337" + y2="412.00592" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.61845865" + inkscape:cx="314.1206" + inkscape:cy="571.0583" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1366" + inkscape:window-height="690" + inkscape:window-x="0" + inkscape:window-y="25" + inkscape:window-maximized="1" /> + <metadata + id="metadata4803"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + transform="translate(-146.47126,-152.14285)" + id="g4533" + inkscape:export-filename="/home/khushal/Desktop/untitled folder/help_project.png" + inkscape:export-xdpi="300" + inkscape:export-ydpi="300"> + <g + transform="translate(16.971191,23.959329)" + id="g4455"> + <g + id="g4219" + transform="translate(461.59739,-29.812883)"> + <g + transform="matrix(0.90148558,0,0,0.90148558,-249.80224,496.33168)" + id="g4198"> + <g + id="g7136"> + <g + transform="translate(0,4.1326222)" + id="g7096"> + <g + id="g7059" + transform="translate(-50.624629,-26.862048)"> + <g + transform="translate(370.9029,28.92836)" + id="g7042"> + <path + transform="matrix(1.1447875,0,0,1.4233028,-400.86013,-689.22968)" + d="m 385.50453,619.37305 c 0,1.35981 -19.84227,2.46216 -44.31895,2.46216 -24.47668,0 -44.31895,-1.10235 -44.31895,-2.46216 0,-1.35982 19.84227,-2.46217 44.31895,-2.46217 24.47668,0 44.31895,1.10235 44.31895,2.46217 z" + sodipodi:ry="2.4621639" + sodipodi:rx="44.318951" + sodipodi:cy="619.37305" + sodipodi:cx="341.18558" + id="path6973" + style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:nonzero;stroke:#cccccc;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6732);enable-background:accumulate" + sodipodi:type="arc" /> + <path + inkscape:connector-curvature="0" + id="path6975" + d="m -47.70836,103.6277 c -19.772298,21.93732 -18.498692,55.35072 2.87744,74.61722 21.37613,19.2665 54.74182,17.07382 74.51413,-4.8635 19.77229,-21.93731 18.47777,-55.3275 -2.89836,-74.594 -21.37613,-19.2665 -54.72091,-17.09703 -74.49321,4.84028 z" + style="color:#000000;fill:url(#linearGradient4472);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.75;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + sodipodi:nodetypes="sssss" /> + <path + sodipodi:type="arc" + style="color:#000000;fill:none;stroke:url(#linearGradient4474);stroke-width:2.44000483;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter6718);enable-background:accumulate" + id="path6977" + sodipodi:cx="327.06171" + sodipodi:cy="415.15146" + sodipodi:rx="53.473969" + sodipodi:ry="53.473969" + d="m 380.53568,415.15146 c 0,29.53286 -23.94112,53.47397 -53.47397,53.47397 -29.53286,0 -53.47397,-23.94111 -53.47397,-53.47397 0,-29.53286 23.94111,-53.47397 53.47397,-53.47397 29.53285,0 53.47397,23.94111 53.47397,53.47397 z" + transform="matrix(0.91728312,0,0,0.89810019,-308.45616,-235.44782)" /> + <g + style="font-size:55.52507401px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:LMSans10;-inkscape-font-specification:LMSans10" + id="text7005" + transform="matrix(1.9208533,0,0,1.9208533,-91.154431,-289.05428)"> + <path + d="m 54.322318,215.90794 c -2.6e-5,1.19295 -0.126548,2.24127 -0.379566,3.14498 -0.253069,0.90375 -0.596485,1.7171 -1.030251,2.44006 -0.433813,0.70493 -0.930863,1.34658 -1.491152,1.92494 -0.542259,0.56033 -1.10257,1.09353 -1.680935,1.5996 l -1.680934,1.49115 c -0.56033,0.48803 -1.066418,1.0122 -1.518264,1.57249 -0.433807,0.54225 -0.795298,1.14775 -1.084474,1.8165 -0.289209,0.65069 -0.442843,1.40982 -0.460902,2.27739 l -5.937495,0 c 0.07229,-1.53632 0.343406,-2.84673 0.813355,-3.93122 0.469928,-1.10253 1.030239,-2.06048 1.680935,-2.87385 0.668746,-0.81334 1.382691,-1.53632 2.141836,-2.16895 0.759117,-0.65066 1.454987,-1.31039 2.087613,-1.97917 0.650667,-0.66873 1.183866,-1.39171 1.599599,-2.16894 0.433771,-0.79526 0.650666,-1.73514 0.650685,-2.81964 -1.9e-5,-1.59053 -0.424771,-2.84671 -1.274257,-3.76855 -0.849522,-0.92177 -2.060517,-1.38267 -3.632989,-1.3827 -0.759145,3e-5 -1.455015,0.14463 -2.087612,0.43379 -0.632621,0.27115 -1.192932,0.65975 -1.680935,1.16581 -0.488023,0.50612 -0.885663,1.12065 -1.192922,1.84361 -0.307276,0.72301 -0.506096,1.51829 -0.59646,2.38584 l -6.344174,-0.32534 c 0.180744,-1.60861 0.542235,-3.11784 1.084474,-4.52768 0.560308,-1.40979 1.319439,-2.63886 2.277396,-3.68721 0.97602,-1.04829 2.159903,-1.87972 3.551653,-2.4943 1.409805,-0.61449 3.045552,-0.92176 4.907245,-0.9218 1.771292,4e-5 3.352815,0.25308 4.744574,0.75913 1.391722,0.50613 2.575605,1.23815 3.551653,2.19606 0.976003,0.93992 1.71706,2.08765 2.223172,3.44321 0.506063,1.35562 0.759106,2.87388 0.759132,4.55479 m -15.453756,27.81676 0,-7.3202 6.425509,0 0,7.3202 -6.425509,0" + style="font-weight:bold;font-stretch:condensed;fill:#ffffff;font-family:Liberation Sans Narrow;-inkscape-font-specification:Liberation Sans Narrow Bold Condensed" + id="path7010" + inkscape:connector-curvature="0" /> + </g> + <g + transform="matrix(1.891918,0,0,1.941465,-90.517476,-293.3595)" + id="g7012" + style="font-size:55.52507401px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:none;stroke:url(#linearGradient4478);stroke-opacity:1;font-family:LMSans10;-inkscape-font-specification:LMSans10"> + <path + inkscape:connector-curvature="0" + id="path7014" + style="font-weight:bold;font-stretch:condensed;fill:none;stroke:url(#linearGradient4476);stroke-opacity:1;font-family:Liberation Sans Narrow;-inkscape-font-specification:Liberation Sans Narrow Bold Condensed" + d="m 54.322318,215.90794 c -2.6e-5,1.19295 -0.126548,2.24127 -0.379566,3.14498 -0.253069,0.90375 -0.596485,1.7171 -1.030251,2.44006 -0.433813,0.70493 -0.930863,1.34658 -1.491152,1.92494 -0.542259,0.56033 -1.10257,1.09353 -1.680935,1.5996 l -1.680934,1.49115 c -0.56033,0.48803 -1.066418,1.0122 -1.518264,1.57249 -0.433807,0.54225 -0.795298,1.14775 -1.084474,1.8165 -0.289209,0.65069 -0.442843,1.40982 -0.460902,2.27739 l -5.937495,0 c 0.07229,-1.53632 0.343406,-2.84673 0.813355,-3.93122 0.469928,-1.10253 1.030239,-2.06048 1.680935,-2.87385 0.668746,-0.81334 1.382691,-1.53632 2.141836,-2.16895 0.759117,-0.65066 1.454987,-1.31039 2.087613,-1.97917 0.650667,-0.66873 1.183866,-1.39171 1.599599,-2.16894 0.433771,-0.79526 0.650666,-1.73514 0.650685,-2.81964 -1.9e-5,-1.59053 -0.424771,-2.84671 -1.274257,-3.76855 -0.849522,-0.92177 -2.060517,-1.38267 -3.632989,-1.3827 -0.759145,3e-5 -1.455015,0.14463 -2.087612,0.43379 -0.632621,0.27115 -1.192932,0.65975 -1.680935,1.16581 -0.488023,0.50612 -0.885663,1.12065 -1.192922,1.84361 -0.307276,0.72301 -0.506096,1.51829 -0.59646,2.38584 l -6.344174,-0.32534 c 0.180744,-1.60861 0.542235,-3.11784 1.084474,-4.52768 0.560308,-1.40979 1.319439,-2.63886 2.277396,-3.68721 0.97602,-1.04829 2.159903,-1.87972 3.551653,-2.4943 1.409805,-0.61449 3.045552,-0.92176 4.907245,-0.9218 1.771292,4e-5 3.352815,0.25308 4.744574,0.75913 1.391722,0.50613 2.575605,1.23815 3.551653,2.19606 0.976003,0.93992 1.71706,2.08765 2.223172,3.44321 0.506063,1.35562 0.759106,2.87388 0.759132,4.55479 m -15.453756,27.81676 0,-7.3202 6.425509,0 0,7.3202 -6.425509,0" /> + </g> + </g> + </g> + </g> + </g> + </g> + </g> + </g> + </g> + </g> +</svg> diff --git a/src/images/newProject.png b/src/images/newProject.png Binary files differnew file mode 100644 index 00000000..edc9b9bb --- /dev/null +++ b/src/images/newProject.png diff --git a/src/images/newProject_test.png b/src/images/newProject_test.png Binary files differnew file mode 100644 index 00000000..86588f15 --- /dev/null +++ b/src/images/newProject_test.png diff --git a/src/images/openProject.png b/src/images/openProject.png Binary files differnew file mode 100644 index 00000000..c755399a --- /dev/null +++ b/src/images/openProject.png diff --git a/src/images/warning.png b/src/images/warning.png Binary files differnew file mode 100644 index 00000000..e3dee87a --- /dev/null +++ b/src/images/warning.png diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py index 3d45f94a..26010d9e 100644 --- a/src/kicadtoNgspice/Convert.py +++ b/src/kicadtoNgspice/Convert.py @@ -8,13 +8,12 @@ class Convert: self.entry_var = source_entry_var self.sourcelistvalue = [] - self.analysisInserter() - + def addSourceParameter(self): print "Adding Source parameter" - print "SourceListTrack : ",self.sourcelisttrack - print "Schematic Info ",self.schematicInfo - print "Entry Var",self.entry_var + #print "SourceListTrack : ",self.sourcelisttrack + #print "Schematic Info ",self.schematicInfo + #print "Entry Var",self.entry_var self.start = 0 self.end = 0 @@ -107,5 +106,5 @@ class Convert: return self.schematicInfo - def analysisInserter(self): - print "Adding Analysis"
\ No newline at end of file + def addModelParameter(self,schematicInfo): + print "Schematic info after adding source detail",schematicInfo
\ No newline at end of file diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py index ecf951cd..55e6c360 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.py +++ b/src/kicadtoNgspice/KicadtoNgspice.py @@ -16,7 +16,6 @@ # REVISION: --- #=============================================================================== import sys -import os from PyQt4 import QtGui,QtCore from Processing import PrcocessNetlist import Analysis @@ -32,8 +31,10 @@ class MainWindow(QtGui.QWidget): QtGui.QWidget.__init__(self) #Create object of track widget self.obj_track = TrackWidget.TrackWidget() - + print "Init Kicad to Ngspice" + #print "Current Project",sys.argv[1] + #Creating GUI for kicadtoNgspice window self.grid = QtGui.QGridLayout(self) @@ -92,7 +93,9 @@ class MainWindow(QtGui.QWidget): #Adding Source Value to Schematic Info schematicInfo = self.obj_convert.addSourceParameter() - + #print "Schematic After adding source parameter",schematicInfo + schematicInfo = self.obj_convert.addModelParameter(schematicInfo) + @@ -102,8 +105,8 @@ def main(args): print "Kicad to Ngspice netlist converter " print "==================================" global kicadFile,kicadNetlist,schematicInfo - kicadFile = "/home/fahim/eSim-Workspace/BJT_amplifier/BJT_amplifier.cir" - #kicadFile = sys.argv[1] + #kicadFile = "/home/fahim/eSim-Workspace/BJT_amplifier/BJT_amplifier.cir" + kicadFile = sys.argv[1] #Object of Processing obj_proc = PrcocessNetlist() @@ -127,32 +130,54 @@ def main(args): print "SCHEMATICINFO",schematicInfo #Getting model and subckt list - modelList=[] + devicemodelList=[] subcktList=[] - modelList,subcktList = obj_proc.getModelSubcktList(schematicInfo,modelList,subcktList) + devicemodelList,subcktList = obj_proc.getModelSubcktList(schematicInfo,devicemodelList,subcktList) - print "MODEL LIST ",modelList + print "MODEL LIST ",devicemodelList print "SUBCKT ",subcktList #List for storing source and its value global sourcelist, sourcelisttrack sourcelist=[] sourcelisttrack=[] - schematicInfo,sourcelist=obj_proc.insertSpecialSourceParam(schematicInfo,sourcelist) + schematicInfo,sourcelist = obj_proc.insertSpecialSourceParam(schematicInfo,sourcelist) print "SOURCELIST",sourcelist print "SCHEMATICINFO",schematicInfo - - + #List storing model detail + global modelList,outputOption + modelList = [] + outputOption = [] + schematicInfo,outputOption,modelList,unknownModelList,multipleModelList = obj_proc.convertICintoBasicBlocks(schematicInfo,outputOption,modelList) + print "Unknown Model List",unknownModelList + print "Multple Model List",multipleModelList + + + + #Checking for unknown Model List and Multiple Model List + if unknownModelList: + print "ErrorMessage : These Models are not available.Please check it",unknownModelList + sys.exit(2) + else: + if multipleModelList: + print "ErrorMessage: There are multiple model for same name. Please check it",multipleModelList + sys.exit(2) + else: + pass + app = QtGui.QApplication(args) #app.setApplicationName("KicadToNgspice") #app.setQuitOnLastWindowClosed(True) kingWindow = MainWindow() kingWindow.show() sys.exit(app.exec_()) + + + if __name__ == '__main__': main(sys.argv) diff --git a/src/kicadtoNgspice/KicadtoNgspice.pyc b/src/kicadtoNgspice/KicadtoNgspice.pyc Binary files differindex ece6486f..5a3f1e57 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.pyc +++ b/src/kicadtoNgspice/KicadtoNgspice.pyc diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py index 4dee9446..3a2bcb37 100644 --- a/src/kicadtoNgspice/Processing.py +++ b/src/kicadtoNgspice/Processing.py @@ -1,8 +1,14 @@ +import sys +import os +from xml.etree import ElementTree as ET + + class PrcocessNetlist: + modelxmlDIR = '../modelParamXML' def __init__(self): pass - + def readNetlist(self,filename): f = open(filename) data=f.read() @@ -92,13 +98,18 @@ class PrcocessNetlist: modelName=words[4] index=schematicInfo.index(eachline) schematicInfo.remove(eachline) + ''' width=raw_input(' Enter width of mosfet '+words[0]+'(default=100u):') length=raw_input(' Enter length of mosfet '+words[0]+'(default=100u):') multiplicative_factor=raw_input(' Enter multiplicative factor of mosfet '+words[0]+'(default=1):') + if width=="": width="100u" if multiplicative_factor=="": multiplicative_factor="100u" if length=="": length="100u" schematicInfo.insert(index,words[0]+" "+words[1]+" "+words[2]+" "+words[3]+" "+words[3]+" "+words[4]+" "+'M='+multiplicative_factor+" "+'L='+length+" "+'W='+width) + ''' + + schematicInfo.insert(index,words[0]+" "+words[1]+" "+words[2]+" "+words[3]+" "+words[3]+" "+words[4]) if modelName in modelList: continue modelList.append(modelName) @@ -191,4 +202,89 @@ class PrcocessNetlist: return schematicInfo,sourcelist + def convertICintoBasicBlocks(self,schematicInfo,outputOption,modelList): + #Insert details of Ngspice model + unknownModelList = [] + multipleModelList = [] + k = 1 + for compline in schematicInfo: + words = compline.split() + compName = words[0] + # Find the IC from schematic + if compName[0]=='u': + # Find the component from the circuit + index=schematicInfo.index(compline) + compType=words[len(words)-1]; + schematicInfo.remove(compline) + print "Compline",compline + print "CompType",compType + print "Words",words + print "compName",compName + #Looking if model file is present + xmlfile = compType+".xml" #XML Model File + count = 0 #Check if model of same name is present + modelPath = [] + all_dir = [x[0] for x in os.walk(PrcocessNetlist.modelxmlDIR)] + for each_dir in all_dir: + all_file = os.listdir(each_dir) + if xmlfile in all_file: + count += 1 + modelPath.append(os.path.join(each_dir,xmlfile)) + + if count > 1: + multipleModelList.append(modelPath) + elif count == 0: + unknownModelList.append(compType) + elif count == 1: + try: + tree = ET.parse(modelPath[0]) + #root = parsemodel.getroot() + for child in tree.iter(): + print "Child Item",child + #print "Tag",child.tag + #print "Tag Value",child.text + + except: + print "Unable to parse the model, Please check your your xml file" + sys.exit(2) + + #print "Count",count + #print "UnknownModelList",unknownModelList + #print "MultipleModelList",multipleModelList + ''' + if compType=="gain": + schematicInfo.append("a"+str(k)+" "+words[1]+" "+words[2]+" "+compName) + k=k+1 + #Insert comment at remove line + schematicInfo.insert(index,"* "+compline) + print "-----------------------------------------------------------\n" + print "Adding Gain" + Comment='* Gain '+compType + Title='Add parameters for Gain '+compName + in_offset=' Enter offset for input (default=0.0): ' + gain=' Enter gain (default=1.0): ' + out_offset=' Enter offset for output (default=0.0): ' + print "-----------------------------------------------------------" + modelList.append([index,compline,compType,compName,Comment,Title,in_offset,gain,out_offset]) + elif compType=="summer": + schematicInfo.append("a"+str(k)+" ["+words[1]+" "+words[2]+"] "+words[3]+" "+compName) + k=k+1 + #Insert comment at remove line + schematicInfo.insert(index,"* "+compline) + print "-----------------------------------------------------------\n" + print "Adding summer" + Comment='* Summer '+compType + Title='Add parameters for Summer '+compName + in1_offset=' Enter offset for input 1 (default=0.0): ' + in2_offset=' Enter offset for input 2 (default=0.0): ' + in1_gain=' Enter gain for input 1 (default=1.0): ' + in2_gain=' Enter gain for input 2 (default=1.0): ' + out_gain=' Enter gain for output (default=1.0): ' + out_offset=' Enter offset for output (default=0.0): ' + print "-----------------------------------------------------------" + modelList.append([index,compline,compType,compName,Comment,Title,in1_offset,in2_offset,in1_gain,in2_gain,out_gain,out_offset]) + ''' + return schematicInfo,outputOption,modelList,unknownModelList,multipleModelList + +
\ No newline at end of file diff --git a/src/kicadtoNgspice/Source.py b/src/kicadtoNgspice/Source.py index 657a980c..ee460cb0 100644 --- a/src/kicadtoNgspice/Source.py +++ b/src/kicadtoNgspice/Source.py @@ -16,6 +16,7 @@ class Source(QtGui.QWidget): self.end = 0 self.row = 0 self.entry_var = {} + #self.font = QtGui.QFont("Times",20,QtGui.QFont.Bold,True) #Creating Source Widget self.createSourceWidget(sourcelist,sourcelisttrack) @@ -41,6 +42,7 @@ class Source(QtGui.QWidget): label=QtGui.QLabel(line[4]) self.grid.addWidget(label,self.row,0) self.entry_var[self.count]=QtGui.QLineEdit() + self.entry_var[self.count].setMaximumWidth(150) self.grid.addWidget(self.entry_var[self.count],self.row,1) #Value Need to check previuouse value self.entry_var[self.count].setText("") @@ -57,6 +59,7 @@ class Source(QtGui.QWidget): label=QtGui.QLabel(line[4]) self.grid.addWidget(label,self.row,0) self.entry_var[self.count]=QtGui.QLineEdit() + self.entry_var[self.count].setMaximumWidth(150) self.grid.addWidget(self.entry_var[self.count],self.row,1) self.entry_var[self.count].setText("") self.row=self.row+1 @@ -74,6 +77,7 @@ class Source(QtGui.QWidget): label=QtGui.QLabel(line[it]) self.grid.addWidget(label,self.row,0) self.entry_var[self.count]=QtGui.QLineEdit() + self.entry_var[self.count].setMaximumWidth(150) self.grid.addWidget(self.entry_var[self.count],self.row,1) self.entry_var[self.count].setText("") self.row=self.row+1 @@ -90,6 +94,7 @@ class Source(QtGui.QWidget): label=QtGui.QLabel(line[it]) self.grid.addWidget(label,self.row,0) self.entry_var[self.count]=QtGui.QLineEdit() + self.entry_var[self.count].setMaximumWidth(150) self.grid.addWidget(self.entry_var[self.count],self.row,1) self.entry_var[self.count].setText("") self.row=self.row+1 @@ -105,6 +110,7 @@ class Source(QtGui.QWidget): label=QtGui.QLabel(line[4]) self.grid.addWidget(label,self.row,0) self.entry_var[self.count]=QtGui.QLineEdit() + self.entry_var[self.count].setMaximumWidth(150) self.grid.addWidget(self.entry_var[self.count],self.row,1) self.entry_var[self.count].setText(""); self.row=self.row+1 @@ -121,6 +127,7 @@ class Source(QtGui.QWidget): label=QtGui.QLabel(line[it]) self.grid.addWidget(label,self.row,0) self.entry_var[self.count]=QtGui.QLineEdit() + self.entry_var[self.count].setMaximumWidth(150) self.grid.addWidget(self.entry_var[self.count],self.row,1) self.entry_var[self.count].setText("") self.row=self.row+1 diff --git a/src/kicadtoNgspice/TrackWidget.py b/src/kicadtoNgspice/TrackWidget.py index 0b11d938..1c600d79 100644 --- a/src/kicadtoNgspice/TrackWidget.py +++ b/src/kicadtoNgspice/TrackWidget.py @@ -1,9 +1,8 @@ class TrackWidget: """ This Class track the widget of Kicad to NgSpice converter - module in the form of list + module. """ sourcelisttrack = {"ITEMS":"None"} source_entry_var = {"ITEMS":"None"} - analysis_entry_var = {"ITEMS":"NONE"} - analysis_type = {"ITEMS":"NONE"}
\ No newline at end of file +
\ No newline at end of file diff --git a/src/modelParamXML/Analog/gain.xml b/src/modelParamXML/Analog/gain.xml new file mode 100644 index 00000000..2bce2a66 --- /dev/null +++ b/src/modelParamXML/Analog/gain.xml @@ -0,0 +1,11 @@ +<model> +<name>gain</name> +<type>Analog</type> +<node_number>2</node_number> +<title>Add Parameter for model gain</title> +<param> + <in_offset>Enter offset for input (default=0.0):</in_offset> + <gain>Enter gain (default=1.0):</gain> + <out_offset>Enter offset for output (default=0.0):</out_offset> +</param> +</model>
\ No newline at end of file diff --git a/src/modelParamXML/Analog/temp.xml b/src/modelParamXML/Analog/temp.xml new file mode 100644 index 00000000..2bce2a66 --- /dev/null +++ b/src/modelParamXML/Analog/temp.xml @@ -0,0 +1,11 @@ +<model> +<name>gain</name> +<type>Analog</type> +<node_number>2</node_number> +<title>Add Parameter for model gain</title> +<param> + <in_offset>Enter offset for input (default=0.0):</in_offset> + <gain>Enter gain (default=1.0):</gain> + <out_offset>Enter offset for output (default=0.0):</out_offset> +</param> +</model>
\ No newline at end of file diff --git a/src/modelParamXML/Digital/gains.xml b/src/modelParamXML/Digital/gains.xml new file mode 100644 index 00000000..2bce2a66 --- /dev/null +++ b/src/modelParamXML/Digital/gains.xml @@ -0,0 +1,11 @@ +<model> +<name>gain</name> +<type>Analog</type> +<node_number>2</node_number> +<title>Add Parameter for model gain</title> +<param> + <in_offset>Enter offset for input (default=0.0):</in_offset> + <gain>Enter gain (default=1.0):</gain> + <out_offset>Enter offset for output (default=0.0):</out_offset> +</param> +</model>
\ No newline at end of file diff --git a/src/modelParamXML/Digital/test.xml b/src/modelParamXML/Digital/test.xml new file mode 100644 index 00000000..2bce2a66 --- /dev/null +++ b/src/modelParamXML/Digital/test.xml @@ -0,0 +1,11 @@ +<model> +<name>gain</name> +<type>Analog</type> +<node_number>2</node_number> +<title>Add Parameter for model gain</title> +<param> + <in_offset>Enter offset for input (default=0.0):</in_offset> + <gain>Enter gain (default=1.0):</gain> + <out_offset>Enter offset for output (default=0.0):</out_offset> +</param> +</model>
\ No newline at end of file diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py index cbee89e9..a575af21 100644 --- a/src/projManagement/Kicad.py +++ b/src/projManagement/Kicad.py @@ -21,7 +21,7 @@ import Validation from configuration.Appconfig import Appconfig import Worker from PyQt4 import QtGui - +import time class Kicad: """ Class Kicad open Schematic,PCB and Layout @@ -109,6 +109,7 @@ class Kicad: self.cmd = "python ../kicadtoNgspice/KicadtoNgspice.py "+self.project+".cir " self.obj_workThread = Worker.WorkerThread(self.cmd) self.obj_workThread.start() + else: self.msg = QtGui.QErrorMessage(None) diff --git a/src/projManagement/Kicad.pyc b/src/projManagement/Kicad.pyc Binary files differindex 9d783b32..4011f875 100644 --- a/src/projManagement/Kicad.pyc +++ b/src/projManagement/Kicad.pyc diff --git a/src/projManagement/Worker.py b/src/projManagement/Worker.py index 00cad6a4..58078b86 100644 --- a/src/projManagement/Worker.py +++ b/src/projManagement/Worker.py @@ -23,16 +23,22 @@ class WorkerThread(QtCore.QThread): def __init__(self,args): QtCore.QThread.__init__(self) self.args = args - + ''' + #Not Required def __del__(self): self.wait() + ''' def run(self): print "Calling :",self.args self.call_system(self.args) def call_system(self,command): print "System called" - os.system(command) + try: + os.system(command) + print "PID",os.getpid() + except: + print "Unable to run the command"
\ No newline at end of file diff --git a/src/projManagement/Worker.pyc b/src/projManagement/Worker.pyc Binary files differindex c8e30b8f..237fe279 100644 --- a/src/projManagement/Worker.pyc +++ b/src/projManagement/Worker.pyc diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py index c76acdc1..10251d1b 100644 --- a/src/projManagement/newProject.py +++ b/src/projManagement/newProject.py @@ -41,7 +41,6 @@ class NewProjectInfo(QtGui.QWidget): self.okbtn.clicked.connect(self.createProject) self.cancelbtn = QtGui.QPushButton("Cancel") - self.cancelbtn = QtGui.QPushButton('Cancel') self.cancelbtn.clicked.connect(self.cancelProject) diff --git a/src/projManagement/newProject.pyc b/src/projManagement/newProject.pyc Binary files differindex 16e965d3..b97b85c2 100644 --- a/src/projManagement/newProject.pyc +++ b/src/projManagement/newProject.pyc |