summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornilshah982019-06-07 12:40:35 +0530
committernilshah982019-06-13 12:18:39 +0530
commit0b37af40b688ac0f68ab32fdefdf246b61dd1979 (patch)
treef8672eb016da549f1a0a1ab406e1c51ac3c56d74
parent23c03bea24b2ad59b8abc1394c39985928373598 (diff)
downloadeSim-0b37af40b688ac0f68ab32fdefdf246b61dd1979.tar.gz
eSim-0b37af40b688ac0f68ab32fdefdf246b61dd1979.tar.bz2
eSim-0b37af40b688ac0f68ab32fdefdf246b61dd1979.zip
treeWidget UI bug fixed
-rw-r--r--images/vline.pngbin0 -> 124 bytes
-rw-r--r--src/frontEnd/ProjectExplorer.py33
-rw-r--r--src/kicadtoNgspice/DeviceModel.py11
-rw-r--r--src/kicadtoNgspice/SubcircuitTab.py2
4 files changed, 25 insertions, 21 deletions
diff --git a/images/vline.png b/images/vline.png
new file mode 100644
index 00000000..8f0c336f
--- /dev/null
+++ b/images/vline.png
Binary files differ
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
index 9128370e..3a2ed2cc 100644
--- a/src/frontEnd/ProjectExplorer.py
+++ b/src/frontEnd/ProjectExplorer.py
@@ -24,20 +24,20 @@ class ProjectExplorer(QtGui.QWidget):
# CSS
self.treewidget.setStyleSheet(" \
- QTreeView { border-radius: 15px; border: 1px solid gray; padding: \
- 5px; width: 200px; height: 150px; } \
- QTreeView::branch:has-siblings:!adjoins-item { border-image:\
- url(../../images/vline.png) 0; } \
- QTreeView::branch:has-siblings:adjoins-item { border-image:\
- url(../../images/branch-more.png) 0; } \
- QTreeView::branch:!has-children:!has-siblings:\
- adjoins-item { border-image: url(../../images/branch-end.png) 0; } \
- QTreeView::branch:has-children:!has-siblings:closed, \
- QTreeView::branch:closed:has-children:has-siblings { border-image:\
- none; image: url(../../images/branch-closed.png); } \
- QTreeView::branch:open:has-children:!has-siblings, \
- QTreeView::branch:open:has-children:has-siblings { border-image: \
- none; image: url(../../images/branch-open.png); } \
+ QTreeView::branch:has-siblings:!adjoins-item { \
+ border-image: url(../../images/vline.png) 0;} \
+ QTreeView::branch:has-siblings:adjoins-item { \
+ border-image: url(../../images/branch-more.png) 0; } \
+ QTreeView::branch:!has-children:!has-siblings:adjoins-item { \
+ border-image: url(../../images/branch-end.png) 0; } \
+ QTreeView::branch:has-children:!has-siblings:closed, \
+ QTreeView::branch:closed:has-children:has-siblings { \
+ border-image: none; \
+ image: url(../../images/branch-closed.png); } \
+ QTreeView::branch:open:has-children:!has-siblings, \
+ QTreeView::branch:open:has-children:has-siblings { \
+ border-image: none; \
+ image: url(../../images/branch-open.png); } \
")
for parents, children in list(
@@ -45,8 +45,9 @@ class ProjectExplorer(QtGui.QWidget):
os.path.join(parents)
if os.path.exists(parents):
pathlist = parents.split(os.sep)
- parentnode = QtGui.QTreeWidgetItem(self.treewidget,
- [pathlist[-1], parents])
+ parentnode = QtGui.QTreeWidgetItem(
+ self.treewidget, [pathlist[-1], parents]
+ )
for files in children:
QtGui.QTreeWidgetItem(
parentnode, [files, os.path.join(parents, files)])
diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py
index 57fd3f25..72d433de 100644
--- a/src/kicadtoNgspice/DeviceModel.py
+++ b/src/kicadtoNgspice/DeviceModel.py
@@ -65,6 +65,8 @@ class DeviceModel(QtGui.QWidget):
print("Reading Device model details from Schematic")
for eachline in schematicInfo:
+ print("=========================================")
+ print(eachline)
words = eachline.split()
if eachline[0] == 'q':
print("Device Model Transistor: ", words[0])
@@ -82,7 +84,7 @@ class DeviceModel(QtGui.QWidget):
try:
for key in json_data["deviceModel"]:
- if key[0] == eachline[0] and key[1] == eachline[1]:
+ if key[0] == words[0][0] and key[1:] == words[0][1:]:
# print "DEVICE MODEL MATCHING---",child.tag[0],\
# child.tag[1],eachline[0],eachline[1]
try:
@@ -148,7 +150,7 @@ class DeviceModel(QtGui.QWidget):
# global path_name
try:
for key in json_data["deviceModel"]:
- if key[0] == eachline[0] and key[1] == eachline[1]:
+ if key[0] == words[0][0] and key[1:] == words[0][1:]:
# print "DEVICE MODEL MATCHING---",child.tag[0],\
# child.tag[1],eachline[0],eachline[1]
try:
@@ -213,7 +215,7 @@ class DeviceModel(QtGui.QWidget):
# global path_name
try:
for key in json_data["deviceModel"]:
- if key[0] == eachline[0] and key[1] == eachline[1]:
+ if key[0] == words[0][0] and key[1:] == words[0][1:]:
# print "DEVICE MODEL MATCHING---",child.tag[0],\
# child.tag[1],eachline[0],eachline[1]
try:
@@ -326,7 +328,7 @@ class DeviceModel(QtGui.QWidget):
# global path_name
try:
for key in json_data["deviceModel"]:
- if key[0] == eachline[0] and key[1] == eachline[1]:
+ if key[0] == words[0][0] and key[1:] == words[0][1:]:
# print "DEVICE MODEL MATCHING---",child.tag[0],\
# child.tag[1],eachline[0],eachline[1]
while i <= end:
@@ -408,6 +410,7 @@ class DeviceModel(QtGui.QWidget):
self.widgetObjCount = iter_value
print("self.widgetObjCount-----", self.widgetObjCount)
self.libfile = path_value
+ print("PATH VALUE", path_value)
# print "Selected Library File :",self.libfile
# Setting Library to Text Edit Line
diff --git a/src/kicadtoNgspice/SubcircuitTab.py b/src/kicadtoNgspice/SubcircuitTab.py
index 52a7a824..7b8001b1 100644
--- a/src/kicadtoNgspice/SubcircuitTab.py
+++ b/src/kicadtoNgspice/SubcircuitTab.py
@@ -73,7 +73,7 @@ class SubcircuitTab(QtGui.QWidget):
global path_name
try:
for key in json_data["subcircuit"]:
- if key[0] == eachline[0] and key[1] == eachline[1]:
+ if key[0] == words[0][0] and key[1:] == words[0][1:]:
# print "Subcircuit MATCHING---",child.tag[0], \
# child.tag[1], eachline[0], eachline[1]
try: