diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 20 | ||||
-rw-r--r-- | src/frontEnd/ProjectExplorer.pyc | bin | 5121 -> 6057 bytes | |||
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 7 | ||||
-rw-r--r-- | src/ngspiceSimulation/pythonPlotting.py | 16 | ||||
-rw-r--r-- | src/ngspiceSimulation/pythonPlotting.pyc | bin | 16955 -> 16978 bytes |
5 files changed, 29 insertions, 14 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 921d0594..8d91dc6c 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -2,6 +2,7 @@ from PyQt4 import QtGui,QtCore import os import json from configuration.Appconfig import Appconfig +from lxml.etree import tostring class ProjectExplorer(QtGui.QWidget): def __init__(self): @@ -50,6 +51,8 @@ class ProjectExplorer(QtGui.QWidget): if level == 0: deleteproject = menu.addAction(self.tr("Remove Project")) deleteproject.triggered.connect(self.removeProject) + refreshproject= menu.addAction(self.tr("Refresh")) + refreshproject.triggered.connect(self.refreshProject) elif level == 1: openfile = menu.addAction(self.tr("Open")) openfile.triggered.connect(self.openProject) @@ -108,4 +111,21 @@ class ProjectExplorer(QtGui.QWidget): self.obj_appconfig.current_project["ProjectName"] = None del self.obj_appconfig.project_explorer[str(self.filePath)] + json.dump(self.obj_appconfig.project_explorer, open(self.obj_appconfig.dictPath,'w')) + + def refreshProject(self): + self.indexItem =self.treewidget.currentIndex() + filename= self.indexItem.data().toString() + self.filePath= str(self.indexItem.sibling(self.indexItem.row(), 1).data().toString()) + filelistnew= os.listdir(os.path.join(self.filePath)) + print filelistnew + parentnode = self.treewidget.currentItem() + count = parentnode.childCount() + for i in range(count): + for items in self.treewidget.selectedItems(): + items.removeChild(items.child(0)) + for files in filelistnew: + childnode= QtGui.QTreeWidgetItem(parentnode, [files, 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 diff --git a/src/frontEnd/ProjectExplorer.pyc b/src/frontEnd/ProjectExplorer.pyc Binary files differindex 3a843b23..11ef55f2 100644 --- a/src/frontEnd/ProjectExplorer.pyc +++ b/src/frontEnd/ProjectExplorer.pyc diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py index a70a9b48..e61c4a61 100644 --- a/src/ngspiceSimulation/NgspiceWidget.py +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -1,5 +1,5 @@ from PyQt4 import QtGui,QtCore - +from configuration.Appconfig import Appconfig class NgspiceWidget(QtGui.QWidget): """ @@ -7,6 +7,7 @@ class NgspiceWidget(QtGui.QWidget): """ def __init__(self,command): QtGui.QWidget.__init__(self) + self.obj_appconfig = Appconfig() self.command = "ngspice "+command self.process = QtCore.QProcess(self) @@ -17,7 +18,9 @@ class NgspiceWidget(QtGui.QWidget): #Creating argument for process self.args = ['-into', str(self.terminal.winId()),'-hold','-e', self.command] self.process.start('xterm', self.args) - + print "Children ",self.process + #Adding PID + #self.obj_appconfig.procThread_list.append(self.process.pid()) diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py index 9e7761fe..fd98a0c8 100644 --- a/src/ngspiceSimulation/pythonPlotting.py +++ b/src/ngspiceSimulation/pythonPlotting.py @@ -46,6 +46,8 @@ class plotWindow(QtGui.QMainWindow): self.chkbox=[] self.a = self.fobj.numVals() + print "A :",self.a + ########### Generating list of colours : self.full_colors = ['r','b','g','y','c','m','k']#,(0.4,0.5,0.2),(0.1,0.4,0.9),(0.4,0.9,0.2),(0.9,0.4,0.9)] self.color = [] @@ -114,16 +116,6 @@ class plotWindow(QtGui.QMainWindow): right_grid.addWidget(self.Note2,4,1) right_vbox.addLayout(right_grid) - ''' - netlist = QtGui.QTextEdit() - with open (self.fpath+"/"+self.projName+'.cir.out') as f2: - fdata = f2.read() - netlist.setText(fdata) - netlist.setReadOnly(True) - - - left_vbox.addWidget(netlist) - ''' hbox = QtGui.QHBoxLayout() hbox.addLayout(left_vbox) hbox.addLayout(right_vbox) @@ -172,7 +164,7 @@ class plotWindow(QtGui.QMainWindow): else: self.setWindowTitle('DC Analysis') self.connect(self.btn,QtCore.SIGNAL('clicked()'), self.onPush_dc) - + self.setCentralWidget(self.main_frame) @@ -227,7 +219,7 @@ class plotWindow(QtGui.QMainWindow): if self.parts[1] == 'vs': if len(self.parts) > 3: self.Note.setText("Enter two operands only!!") - QtGui.QMessageBox.about(self, "Warning!!", "Recheck the expression syntax!") + QtGui.QMessageBox.about(self, "Warning!!", "Re-check the expression syntax!") else: self.axes.cla() #print "plotting wait" diff --git a/src/ngspiceSimulation/pythonPlotting.pyc b/src/ngspiceSimulation/pythonPlotting.pyc Binary files differindex cb7a4f00..f8304a0b 100644 --- a/src/ngspiceSimulation/pythonPlotting.pyc +++ b/src/ngspiceSimulation/pythonPlotting.pyc |