diff options
author | fahim-oscad | 2016-04-04 16:59:25 +0530 |
---|---|---|
committer | fahim-oscad | 2016-04-04 16:59:25 +0530 |
commit | 705a0be005d9be0a3a81a4f58e4b5c92e586a4c9 (patch) | |
tree | b94d6ecdbf95262b8da335aa7c650e3e2fc8607b /src | |
parent | 92860fe3ba762ff0a690f887319a7d95018b49c9 (diff) | |
parent | 66770d5e2c94cc299424daa67b8bfafcb4d9b8c1 (diff) | |
download | eSim-705a0be005d9be0a3a81a4f58e4b5c92e586a4c9.tar.gz eSim-705a0be005d9be0a3a81a4f58e4b5c92e586a4c9.tar.bz2 eSim-705a0be005d9be0a3a81a4f58e4b5c92e586a4c9.zip |
Merged modification branch into release
Diffstat (limited to 'src')
-rw-r--r-- | src/browser/Welcome.py | 3 | ||||
-rw-r--r-- | src/browser/pages/welcome.html | 16 | ||||
-rw-r--r-- | src/configuration/Appconfig.py | 4 | ||||
-rwxr-xr-x | src/frontEnd/Application.py | 3 | ||||
-rw-r--r-- | src/frontEnd/DockArea.py | 23 | ||||
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 7 | ||||
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 1 | ||||
-rw-r--r-- | src/ngspiceSimulation/pythonPlotting.py | 15 | ||||
-rw-r--r-- | src/projManagement/Worker.py | 3 |
9 files changed, 53 insertions, 22 deletions
diff --git a/src/browser/Welcome.py b/src/browser/Welcome.py index f9e3bbd7..0f50e153 100644 --- a/src/browser/Welcome.py +++ b/src/browser/Welcome.py @@ -12,7 +12,8 @@ class Welcome(QtGui.QWidget): self.browser = QtGui.QTextBrowser() self.browser.setSource(QtCore.QUrl("../browser/pages/welcome.html")) self.browser.setOpenExternalLinks(True) + self.browser.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.vlayout.addWidget(self.browser) self.setLayout(self.vlayout) - self.show()
\ No newline at end of file + self.show() diff --git a/src/browser/pages/welcome.html b/src/browser/pages/welcome.html index 9343b8b0..2da1dc58 100644 --- a/src/browser/pages/welcome.html +++ b/src/browser/pages/welcome.html @@ -35,21 +35,21 @@ pre{ <head> <body> - <h1>About eSim</h1> +<center><img src="../../../images/logo.png" alt="eSim logo" height="100" width="100"></center> +<br/> <p> -<b>eSim</b> is an open source EDA tool for circuit design, simulation, analysis and PCB design. It is an integrated tool built using open source software such as KiCad (<a href=http://www.kicad-pcb.org>http://www.kicad-pcb.org</a>) and Ngspice(<a href=http://ngspice.sourceforge.net>http://ngspice.sourceforge.net</a>). -<br/> -eSim source is released under <b>GNU General Public License V3.</b> +<b>eSim</b> is an open source EDA tool for circuit design, simulation, analysis and PCB design. It is an integrated tool built using open source software such as KiCad (<a href=http://www.kicad-pcb.org>http://www.kicad-pcb.org</a>) and Ngspice(<a href=http://ngspice.sourceforge.net>http://ngspice.sourceforge.net</a>). eSim source is released under <b>GNU General Public License V3.</b> </p> <br/> <p> -eSim is developed by the <b>FOSSEE team at IIT Bombay</b>. To know more about eSim, please visit: <a href=http://esim.fossee.in>http://esim.fossee.in</a>. +This tool is developed by the <b>FOSSEE team at IIT Bombay</b>. To know more about eSim, please visit: <a href=http://esim.fossee.in>http://esim.fossee.in</a>. </p> -<br /> +<br/> <p> -To discuss more about eSim please visits at <a href=http://esim.fossee.in>http://esim.fossee.in</a> - +For technical queries, please contact us through FOSSEE Forum: <a href=http://esim.fossee.in>http://esim.fossee.in</a> +<br/> +Write to us at: contact-esim@fossee.in </p> <br /> </body> diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index 72510174..3e4afad6 100644 --- a/src/configuration/Appconfig.py +++ b/src/configuration/Appconfig.py @@ -38,6 +38,8 @@ class Appconfig(QtGui.QWidget): #Workspace detail workspace_text = '''eSim stores your project in a folder called a eSim-Workspace. You can choose a different workspace folder to use for this session.''' procThread_list = [] + proc_dict={} #holds the pids of all external windows corresponds to the current project + dock_dict={} #holds all dockwidgets dictPath = os.path.join(os.path.expanduser("~"), ".projectExplorer.txt") noteArea = {} try: @@ -75,4 +77,4 @@ class Appconfig(QtGui.QWidget): -
\ No newline at end of file + diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 24e541c3..a3438591 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -187,6 +187,9 @@ class Application(QtGui.QMainWindow): if current_project==None: pass else: + for pid in self.obj_appconfig.proc_dict[self.obj_appconfig.current_project['ProjectName']]: + os.kill(pid, 9) + self.obj_Mainview.obj_dockarea.closeDock() self.obj_appconfig.current_project['ProjectName'] = None self.systemTrayIcon.showMessage('Close', 'Current project '+os.path.basename(current_project)+' is Closed.') diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index 65296525..dcb48704 100644 --- a/src/frontEnd/DockArea.py +++ b/src/frontEnd/DockArea.py @@ -90,7 +90,8 @@ class DockArea(QtGui.QMainWindow): ") """ dock['Tips-'+str(count)].raise_() - + + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(dock['Tips-'+str(count)]) count = count + 1 def plottingEditor(self): @@ -124,7 +125,8 @@ class DockArea(QtGui.QMainWindow): dock['Plotting-'+str(count)].setVisible(True) dock['Plotting-'+str(count)].setFocus() dock['Plotting-'+str(count)].raise_() - + + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(dock['Plotting-'+str(count)]) count = count + 1 def ngspiceEditor(self,projDir): @@ -160,7 +162,7 @@ class DockArea(QtGui.QMainWindow): dock['NgSpice-'+str(count)].setVisible(True) dock['NgSpice-'+str(count)].setFocus() dock['NgSpice-'+str(count)].raise_() - + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(dock['NgSpice-'+str(count)]) count = count + 1 def modelEditor(self): @@ -187,7 +189,8 @@ class DockArea(QtGui.QMainWindow): dock['Model Editor-'+str(count)].setVisible(True) dock['Model Editor-'+str(count)].setFocus() dock['Model Editor-'+str(count)].raise_() - + + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(dock['Model Editor-'+str(count)]) count = count + 1 def kicadToNgspiceEditor(self,clarg1,clarg2=None): @@ -210,7 +213,8 @@ class DockArea(QtGui.QMainWindow): dock['kicadToNgspice-'+str(count)].setVisible(True) dock['kicadToNgspice-'+str(count)].setFocus() dock['kicadToNgspice-'+str(count)].raise_() - + + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(dock['kicadToNgspice-'+str(count)]) count = count + 1 @@ -238,7 +242,8 @@ class DockArea(QtGui.QMainWindow): dock['Subcircuit-'+str(count)].setVisible(True) dock['Subcircuit-'+str(count)].setFocus() dock['Subcircuit-'+str(count)].raise_() - + + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(dock['Subcircuit-'+str(count)]) count = count + 1 def usermanual(self): @@ -266,4 +271,8 @@ class DockArea(QtGui.QMainWindow): dock['User Manual-'+str(count)].setFocus() dock['User Manual-'+str(count)].raise_() - count = count + 1
\ No newline at end of file + count = count + 1 + + def closeDock (self): + for dockwidget in self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']]: + dockwidget.close() diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 6c96227a..146b6d0f 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -47,6 +47,8 @@ class ProjectExplorer(QtGui.QWidget): parentnode = QtGui.QTreeWidgetItem(self.treewidget, [pathlist[-1], parents]) for files in children: childnode = QtGui.QTreeWidgetItem(parentnode, [files, os.path.join(parents,files)]) + self.obj_appconfig.proc_dict[self.obj_appconfig.current_project['ProjectName']] = [] + self.oj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']] = [] def openMenu(self, position): @@ -102,6 +104,9 @@ class ProjectExplorer(QtGui.QWidget): self.textwindow.show() else: self.obj_appconfig.current_project["ProjectName"]= str(self.filePath) + self.obj_appconfig.proc_dict[self.obj_appconfig.current_project['ProjectName']] = [] + if self.obj_appconfig.current_project['ProjectName'] not in self.obj_appconfig.dock_dict: + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']] = [] def enable_save(self): self.save.setEnabled(True) @@ -139,4 +144,4 @@ class ProjectExplorer(QtGui.QWidget): childnode= QtGui.QTreeWidgetItem(parentnode, [files, os.path.join(self.filePath,files)]) self.obj_appconfig.project_explorer[self.filePath]= filelistnew - json.dump(self.obj_appconfig.project_explorer, open(self.obj_appconfig.dictPath,'w'))
\ No newline at end of file + json.dump(self.obj_appconfig.project_explorer, open(self.obj_appconfig.dictPath,'w')) diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py index ee4dafe7..310cbe3c 100644 --- a/src/ngspiceSimulation/NgspiceWidget.py +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -24,6 +24,7 @@ class NgspiceWidget(QtGui.QWidget): self.args = ['-hold','-e', self.command] self.process.start('xterm', self.args) self.obj_appconfig.process_obj.append(self.process) + self.obj_appconfig.proc_dict[self.obj_appconfig.current_project['ProjectName']].append(self.process.pid()) elif platform.system() == 'Windows': tempdir= os.getcwd() diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py index deb66c8a..1fbe3575 100644 --- a/src/ngspiceSimulation/pythonPlotting.py +++ b/src/ngspiceSimulation/pythonPlotting.py @@ -110,7 +110,7 @@ class plotWindow(QtGui.QMainWindow): self.plotbtn = QtGui.QPushButton("Plot") self.plotbtn.setToolTip('<b>Press</b> to Plot' ) self.multimeterbtn = QtGui.QPushButton("Multimeter") - self.multimeterbtn.setToolTip('<b>Press</b> to get Multimeter' ) + self.multimeterbtn.setToolTip('<b>RMS</b> value of the current and voltage is displayed' ) self.text = QtGui.QLineEdit() self.funcLabel = QtGui.QLabel() self.palette1 = QtGui.QPalette() @@ -155,9 +155,9 @@ class plotWindow(QtGui.QMainWindow): self.listNode.setText("<font color='indigo'>List of Nodes:</font>") self.listBranch.setText("<font color='indigo'>List of Branches:</font>") self.funcLabel.setText("<font color='indigo'>Function:</font>") - self.funcName.setText("<font color='indigo'>Examples:</font>\ + self.funcName.setText("<font color='indigo'>Standard functions</font>\ <br><br>Addition:<br>Subtraction:<br>Multiplication:<br>Division:<br>Comparison:") - self.funcExample.setText("\n\nV(1) + V(2)\nV(1) - V(2)\nV(1) * V(2)\nV(1) / V(2)\nV(1) vs V(2)") + self.funcExample.setText("\n\nNode1 + Node2\nNode1 - Node2\nNode1 * Node2\nNode1 / Node2\nNode1 vs Node2") #Connecting to plot and clear function self.connect(self.clear,QtCore.SIGNAL('clicked()'),self.pushedClear) @@ -429,12 +429,17 @@ class MultimeterWidgetClass(QtGui.QWidget): QtGui.QWidget.__init__(self) self.multimeter = QtGui.QWidget(self) +<<<<<<< HEAD if voltFlag: self.node_branchLabel = QtGui.QLabel("Node") self.rmsValue = QtGui.QLabel(str(rmsValue)+" Volts") else: self.node_branchLabel = QtGui.QLabel("Branch") self.rmsValue = QtGui.QLabel(str(rmsValue)+" Amp") +======= + self.node_branchLabel = QtGui.QLabel("Node/Branch") + self.rmsLabel = QtGui.QLabel("RMS Value (Volts/Amperes)") +>>>>>>> modification self.rmsLabel = QtGui.QLabel("RMS Value") self.nodeBranchValue = QtGui.QLabel(str(node_branch)) @@ -447,7 +452,11 @@ class MultimeterWidgetClass(QtGui.QWidget): self.layout.addWidget(self.rmsValue,1,1) self.multimeter.setLayout(self.layout) +<<<<<<< HEAD self.setGeometry(loc_x,loc_y,200,100) +======= + self.setGeometry(loc_x,loc_y,300,100) +>>>>>>> modification self.setWindowTitle("MultiMeter") self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) self.show() diff --git a/src/projManagement/Worker.py b/src/projManagement/Worker.py index 9721f4a7..6befca65 100644 --- a/src/projManagement/Worker.py +++ b/src/projManagement/Worker.py @@ -39,7 +39,8 @@ class WorkerThread(QtCore.QThread): procThread = Appconfig() proc = subprocess.Popen(command.split()) procThread.procThread_list.append(proc) + procThread.proc_dict[procThread.current_project['ProjectName']].append(proc.pid) -
\ No newline at end of file + |