summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mistry2021-08-21 01:04:26 +0530
committerGitHub2021-08-21 01:04:26 +0530
commit6391fbe70bbabd8f17aa74dd6c58758d29dedab1 (patch)
treef2c0f86a1e58acec82f23aebf9ff6f3b53f2af47
parent840090d0eedac3c60026269f50f9bb8365e4801b (diff)
downloadeSim-6391fbe70bbabd8f17aa74dd6c58758d29dedab1.tar.gz
eSim-6391fbe70bbabd8f17aa74dd6c58758d29dedab1.tar.bz2
eSim-6391fbe70bbabd8f17aa74dd6c58758d29dedab1.zip
Adding Hex Upload
-rw-r--r--src/kicadtoNgspice/DeviceModel.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py
index 5fd4d829..4140b180 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
- transgrid.addWidget(self.entry_var[self.count], self.row, 1)
+ 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)
@@ -114,11 +114,11 @@ class DeviceModel(QtWidgets.QWidget):
else:
self.trackLibraryWithoutButton(self.count, path_name)
- transgrid.addWidget(self.addbtn, self.row, 2)
- transbox.setLayout(transgrid)
+ jfetgrid.addWidget(self.addbtn, self.row, 2)
+ jfetbox.setLayout(transgrid)
# CSS
- transbox.setStyleSheet(" \
+ jfetbox.setStyleSheet(" \
QGroupBox { border: 1px solid gray; border-radius: \
9px; margin-top: 0.5em; } \
QGroupBox::title { subcontrol-origin: margin; left:\
@@ -172,6 +172,7 @@ 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:
@@ -229,8 +230,8 @@ class DeviceModel(QtWidgets.QWidget):
except BaseException:
pass
- jfetgrid.addWidget(self.entry_var[self.count], self.row, 1)
- self.addbtn = QtWidgets.QPushButton("Add")
+ #jfetgrid.addWidget(self.entry_var[self.count], self.row, 1)
+ self.addbtn = QtWidgets.QPushButton("Upload hex file")
self.addbtn.setObjectName("%d" % self.count)
self.addbtn.clicked.connect(self.trackLibrary)
self.deviceDetail[self.count] = words[0]
@@ -400,6 +401,10 @@ 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