diff options
author | Sunil Shetye | 2019-06-11 16:00:13 +0530 |
---|---|---|
committer | GitHub | 2019-06-11 16:00:13 +0530 |
commit | 19e57ec09fc6ddb8e1462ebc118841207497109b (patch) | |
tree | 85cc00b16004b7c64dc76ebdf4cc84d6b1a84499 /src/subcircuit/Subcircuit.py | |
parent | 8b986efb1c9216e284f6cc27a8f44d09e5c5cc59 (diff) | |
parent | 9e92a335fc364d391e9b524c226602a1677c2518 (diff) | |
download | eSim-19e57ec09fc6ddb8e1462ebc118841207497109b.tar.gz eSim-19e57ec09fc6ddb8e1462ebc118841207497109b.tar.bz2 eSim-19e57ec09fc6ddb8e1462ebc118841207497109b.zip |
Merge pull request #85 from nilshah98/pep8
Made pep8 compliant
Diffstat (limited to 'src/subcircuit/Subcircuit.py')
-rw-r--r-- | src/subcircuit/Subcircuit.py | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/subcircuit/Subcircuit.py b/src/subcircuit/Subcircuit.py index f53acc6a..259ae40a 100644 --- a/src/subcircuit/Subcircuit.py +++ b/src/subcircuit/Subcircuit.py @@ -5,31 +5,34 @@ from subcircuit.newSub import NewSub from subcircuit.openSub import openSub from subcircuit.convertSub import convertSub + class Subcircuit(QtGui.QWidget): """ This class creates Subcircuit GUI. """ - def __init__(self,parent=None): + + def __init__(self, parent=None): super(Subcircuit, self).__init__() QtGui.QWidget.__init__(self) - self.obj_appconfig=Appconfig() - self.obj_validation=Validation() - self.obj_dockarea=parent + self.obj_appconfig = Appconfig() + self.obj_validation = Validation() + self.obj_dockarea = parent self.layout = QtGui.QVBoxLayout() - self.splitter= QtGui.QSplitter() + self.splitter = QtGui.QSplitter() self.splitter.setOrientation(QtCore.Qt.Vertical) self.newbtn = QtGui.QPushButton('New Subcircuit Schematic') self.newbtn.setToolTip('<b>To create new Subcircuit Schematic</b>') - self.newbtn.setFixedSize(200,40) + self.newbtn.setFixedSize(200, 40) self.newbtn.clicked.connect(self.newsch) self.editbtn = QtGui.QPushButton('Edit Subcircuit Schematic') self.editbtn.setToolTip('<b>To edit existing Subcircuit Schematic</b>') - self.editbtn.setFixedSize(200,40) + self.editbtn.setFixedSize(200, 40) self.editbtn.clicked.connect(self.editsch) self.convertbtn = QtGui.QPushButton('Convert Kicad to Ngspice') - self.convertbtn.setToolTip('<b>To convert Subcircuit Kicad Netlist to Ngspice Netlist</b>') - self.convertbtn.setFixedSize(200,40) + self.convertbtn.setToolTip( + '<b>To convert Subcircuit Kicad Netlist to Ngspice Netlist</b>') + self.convertbtn.setFixedSize(200, 40) self.convertbtn.clicked.connect(self.convertsch) self.hbox = QtGui.QHBoxLayout() @@ -41,25 +44,25 @@ class Subcircuit(QtGui.QWidget): self.vbox = QtGui.QVBoxLayout() self.vbox.addLayout(self.hbox) self.vbox.addStretch(1) - + self.setLayout(self.vbox) self.show() - + def newsch(self): - text,ok = QtGui.QInputDialog.getText(self, 'New Schematic','Enter Schematic Name:') + text, ok = QtGui.QInputDialog.getText( + self, 'New Schematic', 'Enter Schematic Name:') if ok: self.schematic_name = (str(text)) self.subcircuit = NewSub() self.subcircuit.createSubcircuit(self.schematic_name) - + else: - print "Sub circuit creation cancelled" - - + print("Sub circuit creation cancelled") + def editsch(self): self.obj_opensubcircuit = openSub() self.obj_opensubcircuit.body() - + def convertsch(self): self.obj_convertsubcircuit = convertSub(self.obj_dockarea) - self.obj_convertsubcircuit.createSub()
\ No newline at end of file + self.obj_convertsubcircuit.createSub() |