From a0f738ba15264b69d9d51755569408bdd8e383b5 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Fri, 7 Jun 2019 18:54:35 +0530 Subject: pep8 fixes and list models bug fixed --- src/kicadtoNgspice/Source.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/kicadtoNgspice/Source.py') diff --git a/src/kicadtoNgspice/Source.py b/src/kicadtoNgspice/Source.py index 8649ce93..d8e39af4 100644 --- a/src/kicadtoNgspice/Source.py +++ b/src/kicadtoNgspice/Source.py @@ -25,11 +25,23 @@ class Source(QtGui.QWidget): # Creating Source Widget self.createSourceWidget(sourcelist, sourcelisttrack) + """ + - This function dynamically create source widget in the + Source tab of KicadtoNgSpice window + - Depending on the type of source, ac, dc, sine, pwl, etc... + source tab is created + - All the entry fields, are kept into the entry_var + tracked by self.count + - Finally after each of the sourcelist is mapped to its input component + we move to adding these to the track widget + - Also check if any default values present from previous analysis and add + them by default + """ + def createSourceWidget(self, sourcelist, sourcelisttrack): - """ - This function dynamically create source widget in the - Source tab of KicadtoNgSpice window - """ + print("============================================================") + print("SOURCELISTTRACK", sourcelisttrack) + print("============================================================") kicadFile = self.clarg1 (projpath, filename) = os.path.split(kicadFile) project_name = os.path.basename(projpath) @@ -328,8 +340,8 @@ class Source(QtGui.QWidget): list( json_data["source"][key] ["values"][it - 4].values())[0] - ) - ) + ) + ) except BaseException: pass @@ -353,6 +365,7 @@ class Source(QtGui.QWidget): else: print("No source is present in your circuit") + print("============================================================") # This is used to keep the track of dynamically created widget self.obj_track.sourcelisttrack["ITEMS"] = sourcelisttrack self.obj_track.source_entry_var["ITEMS"] = self.entry_var -- cgit From fd8107b2f5662851dd5d3a7388e46d6be1eb5125 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Fri, 7 Jun 2019 19:01:08 +0530 Subject: kicadtoNgspice documentation added --- src/kicadtoNgspice/Source.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'src/kicadtoNgspice/Source.py') diff --git a/src/kicadtoNgspice/Source.py b/src/kicadtoNgspice/Source.py index d8e39af4..c9d50a26 100644 --- a/src/kicadtoNgspice/Source.py +++ b/src/kicadtoNgspice/Source.py @@ -25,22 +25,24 @@ class Source(QtGui.QWidget): # Creating Source Widget self.createSourceWidget(sourcelist, sourcelisttrack) - """ - - This function dynamically create source widget in the - Source tab of KicadtoNgSpice window - - Depending on the type of source, ac, dc, sine, pwl, etc... - source tab is created - - All the entry fields, are kept into the entry_var - tracked by self.count - - Finally after each of the sourcelist is mapped to its input component - we move to adding these to the track widget - - Also check if any default values present from previous analysis and add - them by default - """ - def createSourceWidget(self, sourcelist, sourcelisttrack): + """ + - This function dynamically create source widget in the + Source tab of KicadtoNgSpice window + - Depending on the type of source, ac, dc, sine, pwl, etc... + source tab is created + - All the entry fields, are kept into the entry_var + tracked by self.count + - Finally after each of the sourcelist is mapped to its input component + we move to adding these to the track widget + - Also check if any default values present from previous analysis & add + them by default + - Each line in sourcelist corresponds to a source + - According to the source type modify the source and add it to the tab + """ print("============================================================") - print("SOURCELISTTRACK", sourcelisttrack) + print("SOURCE LIST TRACK", sourcelisttrack) + print("SOURCE LIST", sourcelist) print("============================================================") kicadFile = self.clarg1 (projpath, filename) = os.path.split(kicadFile) -- cgit