diff options
author | nilshah98 | 2019-06-07 19:15:54 +0530 |
---|---|---|
committer | nilshah98 | 2019-06-13 12:18:39 +0530 |
commit | 89c637c341a281d31ccd63be65a3504d6db79882 (patch) | |
tree | e46a0272c89123fa0ee01ceb375dcc0f5440472b /src/frontEnd | |
parent | daffbbb29757deff785c13a429b4c03fe3f25fba (diff) | |
download | eSim-89c637c341a281d31ccd63be65a3504d6db79882.tar.gz eSim-89c637c341a281d31ccd63be65a3504d6db79882.tar.bz2 eSim-89c637c341a281d31ccd63be65a3504d6db79882.zip |
made pep8 compliant using autopep8 tool
Diffstat (limited to 'src/frontEnd')
-rw-r--r-- | src/frontEnd/DockArea.py | 12 | ||||
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 18 | ||||
-rw-r--r-- | src/frontEnd/Workspace.py | 2 | ||||
-rw-r--r-- | src/frontEnd/pathmagic.py | 2 |
4 files changed, 20 insertions, 14 deletions
diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index 60c98f36..8b8e975b 100644 --- a/src/frontEnd/DockArea.py +++ b/src/frontEnd/DockArea.py @@ -11,7 +11,7 @@ from ngspicetoModelica.ModelicaUI import OpenModelicaEditor import os dockList = ['Welcome'] -count = 1 +count = 1 dock = {} @@ -23,7 +23,7 @@ class DockArea(QtGui.QMainWindow): """Sdf.""" QtGui.QMainWindow.__init__(self) self.obj_appconfig = Appconfig() - + for dockName in dockList: dock[dockName] = QtGui.QDockWidget(dockName) self.welcomeWidget = QtGui.QWidget() @@ -80,7 +80,7 @@ class DockArea(QtGui.QMainWindow): global count self.plottingWidget = QtGui.QWidget() - + self.plottingLayout = QtGui.QVBoxLayout() self.plottingLayout.addWidget(plotWindow(self.projDir, self.projName)) @@ -112,7 +112,7 @@ class DockArea(QtGui.QMainWindow): global count self.ngspiceWidget = QtGui.QWidget() - + self.ngspiceLayout = QtGui.QVBoxLayout() self.ngspiceLayout.addWidget( NgspiceWidget( @@ -218,7 +218,7 @@ class DockArea(QtGui.QMainWindow): self.subcktWidget = QtGui.QWidget() self.subcktLayout = QtGui.QVBoxLayout() self.subcktLayout.addWidget(Subcircuit(self)) - + self.subcktWidget.setLayout(self.subcktLayout) dock['Subcircuit-' + str(count)] = QtGui.QDockWidget('Subcircuit-' + str(count)) @@ -250,7 +250,7 @@ class DockArea(QtGui.QMainWindow): self.usermanualWidget = QtGui.QWidget() self.usermanualLayout = QtGui.QVBoxLayout() self.usermanualLayout.addWidget(UserManual()) - + self.usermanualWidget.setLayout(self.usermanualLayout) dock['User Manual-' + str(count)] = QtGui.QDockWidget('User Manual-' + str(count)) diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 658ea12e..cac9f986 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -55,7 +55,7 @@ class ProjectExplorer(QtGui.QWidget): pathlist = parents.split(os.sep) parentnode = QtGui.QTreeWidgetItem( self.treewidget, [pathlist[-1], parents] - ) + ) for files in children: QtGui.QTreeWidgetItem( parentnode, [files, os.path.join(parents, files)]) @@ -225,22 +225,24 @@ class ProjectExplorer(QtGui.QWidget): json.dump(self.obj_appconfig.project_explorer, open(self.obj_appconfig.dictPath, 'w')) - #""" + # """ def renameProject(self): indexItem = self.treewidget.currentIndex() baseFileName = str(indexItem.data()) newBaseFileName, ok = QtGui.QInputDialog.getText(self, 'Rename Project', 'Project Name:', - QtGui.QLineEdit.Normal, baseFileName) + QtGui.QLineEdit.Normal, baseFileName) if ok and newBaseFileName: newBaseFileName = str(newBaseFileName) - projectPath, projectFiles = list(self.obj_appconfig.project_explorer.items())[indexItem.row()] + projectPath, projectFiles = list(self.obj_appconfig.project_explorer.items())[ + indexItem.row()] updatedProjectFiles = [] # rename files matching project name for projectFile in projectFiles: if baseFileName in projectFile: oldFilePath = os.path.join(projectPath, projectFile) - projectFile = projectFile.replace(baseFileName, newBaseFileName, 1) + projectFile = projectFile.replace( + baseFileName, newBaseFileName, 1) newFilePath = os.path.join(projectPath, projectFile) print ("Renaming " + oldFilePath + " to " + newFilePath) os.rename(oldFilePath, newFilePath) @@ -248,7 +250,8 @@ class ProjectExplorer(QtGui.QWidget): updatedProjectFiles.append(projectFile) # rename project folder - updatedProjectPath = newBaseFileName.join(projectPath.rsplit(baseFileName, 1)) + updatedProjectPath = newBaseFileName.join( + projectPath.rsplit(baseFileName, 1)) print ("Renaming " + projectPath + " to " + updatedProjectPath) os.rename(projectPath, updatedProjectPath) @@ -257,7 +260,8 @@ class ProjectExplorer(QtGui.QWidget): self.obj_appconfig.project_explorer[updatedProjectPath] = updatedProjectFiles # save project_explorer dictionary on disk - json.dump(self.obj_appconfig.project_explorer, open(self.obj_appconfig.dictPath,'w')) + json.dump(self.obj_appconfig.project_explorer, + open(self.obj_appconfig.dictPath, 'w')) # recreate project explorer tree self.treewidget.clear() diff --git a/src/frontEnd/Workspace.py b/src/frontEnd/Workspace.py index 62833064..30d0607b 100644 --- a/src/frontEnd/Workspace.py +++ b/src/frontEnd/Workspace.py @@ -21,6 +21,8 @@ import time import os # This class creates Workspace GUI. + + class Workspace(QtGui.QWidget): """ diff --git a/src/frontEnd/pathmagic.py b/src/frontEnd/pathmagic.py index 92a5e6e2..49c4932d 100644 --- a/src/frontEnd/pathmagic.py +++ b/src/frontEnd/pathmagic.py @@ -3,4 +3,4 @@ import sys # Setting PYTHONPATH cwd = os.getcwd() (setPath, fronEnd) = os.path.split(cwd) -sys.path.append(setPath)
\ No newline at end of file +sys.path.append(setPath) |