diff options
author | Rahul P | 2023-06-13 18:24:33 +0530 |
---|---|---|
committer | GitHub | 2023-06-13 18:24:33 +0530 |
commit | 4a276b252d84a0b7dd24588e56dc7e214ea2d7c6 (patch) | |
tree | e9cf9d33ed2c137f3ac463c7b272e27fe23be75d /src/kicadtoNgspice/Model.py | |
parent | 9a5f3dabc357277b384c51ccf047f5580772f454 (diff) | |
parent | 3436aa4615dcc1310db8dc8a85f36418db641fb4 (diff) | |
download | eSim-4a276b252d84a0b7dd24588e56dc7e214ea2d7c6.tar.gz eSim-4a276b252d84a0b7dd24588e56dc7e214ea2d7c6.tar.bz2 eSim-4a276b252d84a0b7dd24588e56dc7e214ea2d7c6.zip |
Merge pull request #251 from FOSSEE/sky130-dev
Merge Sky130 PDK development
Diffstat (limited to 'src/kicadtoNgspice/Model.py')
-rw-r--r-- | src/kicadtoNgspice/Model.py | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py index 22fa02b5..55a988c0 100644 --- a/src/kicadtoNgspice/Model.py +++ b/src/kicadtoNgspice/Model.py @@ -1,10 +1,8 @@ #!/usr/bin/python # -*- coding: utf-8 -*- import os -from configparser import ConfigParser from xml.etree import ElementTree as ET - -from PyQt5 import QtWidgets, QtCore +from PyQt5 import QtWidgets from . import TrackWidget @@ -14,7 +12,6 @@ class Model(QtWidgets.QWidget): - This class creates Model Tab of KicadtoNgspice window. The widgets are created dynamically in the Model Tab. """ - def __init__( self, schematicInfo, @@ -25,7 +22,6 @@ class Model(QtWidgets.QWidget): QtWidgets.QWidget.__init__(self) # Processing for getting previous values - kicadFile = clarg1 (projpath, filename) = os.path.split(kicadFile) project_name = os.path.basename(projpath) @@ -44,16 +40,13 @@ class Model(QtWidgets.QWidget): check = 0 # Creating track widget object - self.obj_trac = TrackWidget.TrackWidget() # for increasing row and counting/tracking line edit widget - self.nextrow = 0 self.nextcount = 0 # for storing line edit details position details - self.start = 0 self.end = 0 self.entry_var = [] @@ -61,7 +54,6 @@ class Model(QtWidgets.QWidget): self.text = "" # Creating GUI dynamically for Model tab - self.grid = QtWidgets.QGridLayout() self.setLayout(self.grid) @@ -78,17 +70,14 @@ class Model(QtWidgets.QWidget): self.model_name = line[2] # line[7] is parameter dictionary holding parameter tags. - i = 0 for (key, value) in line[7].items(): print(value) print(key) - # Check if value is iterable + # Check if value is iterable if not isinstance(value, str) and hasattr(value, "__iter__"): - # For tag having vector value - temp_tag = [] for item in value: @@ -131,7 +120,6 @@ class Model(QtWidgets.QWidget): tag_dict[key] = temp_tag else: - paramLabel = QtWidgets.QLabel(value) modelgrid.addWidget(paramLabel, self.nextrow, 0) self.obj_trac.model_entry_var[ @@ -180,7 +168,6 @@ class Model(QtWidgets.QWidget): modelbox.setLayout(modelgrid) # CSS - modelbox.setStyleSheet( " \ QGroupBox { border: 1px solid gray; border-radius: \ @@ -193,7 +180,6 @@ class Model(QtWidgets.QWidget): self.grid.addWidget(modelbox) # This keeps the track of Model Tab Widget - lst = [ line[0], line[1], @@ -223,7 +209,6 @@ class Model(QtWidgets.QWidget): modelbox.setLayout(modelgrid) # CSS - modelbox.setStyleSheet( " \ QGroupBox { border: 1px solid gray; border-radius:\ |