summaryrefslogtreecommitdiff
path: root/src/subcircuit/Subcircuit.py
diff options
context:
space:
mode:
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))