summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/DeviceModel.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/kicadtoNgspice/DeviceModel.py')
-rw-r--r--src/kicadtoNgspice/DeviceModel.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py
index 1dc9dcce..5fd4d829 100644
--- a/src/kicadtoNgspice/DeviceModel.py
+++ b/src/kicadtoNgspice/DeviceModel.py
@@ -2,7 +2,7 @@ from PyQt5 import QtWidgets, QtCore
import os
from xml.etree import ElementTree as ET
from . import TrackWidget
-import subprocess
+
class DeviceModel(QtWidgets.QWidget):
"""
@@ -103,7 +103,7 @@ class DeviceModel(QtWidgets.QWidget):
except BaseException:
pass
- jfetgrid.addWidget(self.entry_var[self.count], self.row, 1)
+ transgrid.addWidget(self.entry_var[self.count], self.row, 1)
self.addbtn = QtWidgets.QPushButton("Add")
self.addbtn.setObjectName("%d" % self.count)
self.addbtn.clicked.connect(self.trackLibrary)
@@ -114,11 +114,11 @@ class DeviceModel(QtWidgets.QWidget):
else:
self.trackLibraryWithoutButton(self.count, path_name)
- jfetgrid.addWidget(self.addbtn, self.row, 2)
- jfetbox.setLayout(transgrid)
+ transgrid.addWidget(self.addbtn, self.row, 2)
+ transbox.setLayout(transgrid)
# CSS
- jfetbox.setStyleSheet(" \
+ transbox.setStyleSheet(" \
QGroupBox { border: 1px solid gray; border-radius: \
9px; margin-top: 0.5em; } \
QGroupBox::title { subcontrol-origin: margin; left:\
@@ -172,7 +172,6 @@ class DeviceModel(QtWidgets.QWidget):
self.addbtn.clicked.connect(self.trackLibrary)
self.deviceDetail[self.count] = words[0]
-
if self.entry_var[self.count].text() == "":
pass
else:
@@ -230,9 +229,8 @@ class DeviceModel(QtWidgets.QWidget):
except BaseException:
pass
- #By Sumanto and Jay
- #jfetgrid.addWidget(self.entry_var[self.count], self.row, 1)
- self.addbtn = QtWidgets.QPushButton("Upload hex file")
+ jfetgrid.addWidget(self.entry_var[self.count], self.row, 1)
+ self.addbtn = QtWidgets.QPushButton("Add")
self.addbtn.setObjectName("%d" % self.count)
self.addbtn.clicked.connect(self.trackLibrary)
self.deviceDetail[self.count] = words[0]
@@ -402,10 +400,6 @@ class DeviceModel(QtWidgets.QWidget):
else:
self.obj_trac.deviceModelTrack[self.deviceName] = self.libfile
-
-
-
-
def trackLibraryWithoutButton(self, iter_value, path_value):
"""
This function is use to keep track of all Device Model widget