summaryrefslogtreecommitdiff
path: root/src/subcircuit/Subcircuit.py
diff options
context:
space:
mode:
authorrahulp132020-08-03 12:03:41 +0530
committerrahulp132020-08-03 12:03:41 +0530
commit2eb6697de529a643127599070771a0278e9817b3 (patch)
treea024da46ce7e9712291ba6f7b3572ba37479c01a /src/subcircuit/Subcircuit.py
parentd7e14cecfe0abdd9aeea5e589ddaeb5c302f5877 (diff)
downloadeSim-2eb6697de529a643127599070771a0278e9817b3.tar.gz
eSim-2eb6697de529a643127599070771a0278e9817b3.tar.bz2
eSim-2eb6697de529a643127599070771a0278e9817b3.zip
ported GUI to PyQt5
Diffstat (limited to 'src/subcircuit/Subcircuit.py')
-rw-r--r--src/subcircuit/Subcircuit.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/subcircuit/Subcircuit.py b/src/subcircuit/Subcircuit.py
index 8f55ea13..298ff96e 100644
--- a/src/subcircuit/Subcircuit.py
+++ b/src/subcircuit/Subcircuit.py
@@ -1,4 +1,4 @@
-from PyQt4 import QtCore, QtGui
+from PyQt5 import QtCore, QtWidgets
from configuration.Appconfig import Appconfig
from projManagement.Validation import Validation
from subcircuit.newSub import NewSub
@@ -8,7 +8,7 @@ from subcircuit.uploadSub import UploadSub
# This class creates Subcircuit GUI.
-class Subcircuit(QtGui.QWidget):
+class Subcircuit(QtWidgets.QWidget):
"""
Creates buttons for New project, Edit existing project and
Kicad Netlist to Ngspice Netlist converter and link them with the
@@ -21,41 +21,41 @@ class Subcircuit(QtGui.QWidget):
def __init__(self, parent=None):
super(Subcircuit, self).__init__()
- QtGui.QWidget.__init__(self)
+ QtWidgets.QWidget.__init__(self)
self.obj_appconfig = Appconfig()
self.obj_validation = Validation()
self.obj_dockarea = parent
- self.layout = QtGui.QVBoxLayout()
- self.splitter = QtGui.QSplitter()
+ self.layout = QtWidgets.QVBoxLayout()
+ self.splitter = QtWidgets.QSplitter()
self.splitter.setOrientation(QtCore.Qt.Vertical)
- self.newbtn = QtGui.QPushButton('New Subcircuit Schematic')
+ self.newbtn = QtWidgets.QPushButton('New Subcircuit Schematic')
self.newbtn.setToolTip('<b>To create new Subcircuit Schematic</b>')
self.newbtn.setFixedSize(200, 40)
self.newbtn.clicked.connect(self.newsch)
- self.editbtn = QtGui.QPushButton('Edit Subcircuit Schematic')
+ self.editbtn = QtWidgets.QPushButton('Edit Subcircuit Schematic')
self.editbtn.setToolTip('<b>To edit existing Subcircuit Schematic</b>')
self.editbtn.setFixedSize(200, 40)
self.editbtn.clicked.connect(self.editsch)
- self.convertbtn = QtGui.QPushButton('Convert Kicad to Ngspice')
+ self.convertbtn = QtWidgets.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.clicked.connect(self.convertsch)
- self.uploadbtn = QtGui.QPushButton('Upload a Subcircuit')
+ self.uploadbtn = QtWidgets.QPushButton('Upload a Subcircuit')
self.uploadbtn.setToolTip(
'<b>To Upload a subcircuit</b>')
self.uploadbtn.setFixedSize(180, 38)
self.uploadbtn.clicked.connect(self.uploadSub)
- self.hbox = QtGui.QHBoxLayout()
+ self.hbox = QtWidgets.QHBoxLayout()
self.hbox.addWidget(self.newbtn)
self.hbox.addWidget(self.editbtn)
self.hbox.addWidget(self.convertbtn)
self.hbox.addWidget(self.uploadbtn)
self.hbox.addStretch(1)
- self.vbox = QtGui.QVBoxLayout()
+ self.vbox = QtWidgets.QVBoxLayout()
self.vbox.addLayout(self.hbox)
self.vbox.addStretch(1)
@@ -63,7 +63,7 @@ class Subcircuit(QtGui.QWidget):
self.show()
def newsch(self):
- text, ok = QtGui.QInputDialog.getText(
+ text, ok = QtWidgets.QInputDialog.getText(
self, 'New Schematic', 'Enter Schematic Name:')
if ok:
self.schematic_name = (str(text))