diff options
author | Sunil Shetye | 2019-06-14 10:38:23 +0530 |
---|---|---|
committer | GitHub | 2019-06-14 10:38:23 +0530 |
commit | fd265d087ff6dc7a09df400b165043e61bb7d0c0 (patch) | |
tree | 2d08a48bcc268154c5e0f25f4c3e94d0ac9e4f7f /src/frontEnd/DockArea.py | |
parent | cfc34bb19977e738582620802415ccde27a03039 (diff) | |
parent | 1d4ee6b6c1254657c497673838922e746f339eca (diff) | |
download | eSim-fd265d087ff6dc7a09df400b165043e61bb7d0c0.tar.gz eSim-fd265d087ff6dc7a09df400b165043e61bb7d0c0.tar.bz2 eSim-fd265d087ff6dc7a09df400b165043e61bb7d0c0.zip |
Merge pull request #77 from nilshah98/clean
Bugs resolved and minor fixes
Diffstat (limited to 'src/frontEnd/DockArea.py')
-rw-r--r-- | src/frontEnd/DockArea.py | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index 2c605272..8b8e975b 100644 --- a/src/frontEnd/DockArea.py +++ b/src/frontEnd/DockArea.py @@ -11,16 +11,19 @@ from ngspicetoModelica.ModelicaUI import OpenModelicaEditor import os dockList = ['Welcome'] -count = 1 +count = 1 dock = {} + # class DockArea(QtGui.QMainWindow): - """ """ + """Sdf.""" + def __init__(self): + """Sdf.""" QtGui.QMainWindow.__init__(self) self.obj_appconfig = Appconfig() - + for dockName in dockList: dock[dockName] = QtGui.QDockWidget(dockName) self.welcomeWidget = QtGui.QWidget() @@ -42,9 +45,8 @@ class DockArea(QtGui.QMainWindow): # This function create widget for Library Editor def createTestEditor(self): - """ """ + """Sdf.""" global count - self.testWidget = QtGui.QWidget() self.testArea = QtGui.QTextEdit() self.testLayout = QtGui.QVBoxLayout() @@ -71,14 +73,14 @@ class DockArea(QtGui.QMainWindow): # This function create widget for interactive PythonPlotting def plottingEditor(self): - """ """ + """Sdf.""" self.projDir = self.obj_appconfig.current_project["ProjectName"] self.projName = os.path.basename(self.projDir) # self.project = os.path.join(self.projDir,self.projName) global count self.plottingWidget = QtGui.QWidget() - + self.plottingLayout = QtGui.QVBoxLayout() self.plottingLayout.addWidget(plotWindow(self.projDir, self.projName)) @@ -100,9 +102,9 @@ class DockArea(QtGui.QMainWindow): dock['Plotting-' + str(count)]) count = count + 1 + # This function creates widget for NgSpice window. def ngspiceEditor(self, projDir): - """This function creates widget for NgSpice window.""" - + """Sdf.""" self.projDir = projDir self.projName = os.path.basename(self.projDir) self.ngspiceNetlist = os.path.join( @@ -110,7 +112,7 @@ class DockArea(QtGui.QMainWindow): global count self.ngspiceWidget = QtGui.QWidget() - + self.ngspiceLayout = QtGui.QVBoxLayout() self.ngspiceLayout.addWidget( NgspiceWidget( @@ -140,7 +142,9 @@ class DockArea(QtGui.QMainWindow): dock['NgSpice-' + str(count)]) count = count + 1 + # This function defines UI for model editor. def modelEditor(self): + """Sdf.""" print("in model editor") global count self.modelwidget = QtGui.QWidget() @@ -174,7 +178,9 @@ class DockArea(QtGui.QMainWindow): dock['Model Editor-' + str(count)]) count = count + 1 + # This function is creating Editor UI for Kicad to Ngspice conversion. def kicadToNgspiceEditor(self, clarg1, clarg2=None): + """Sdf.""" global count self.kicadToNgspiceWidget = QtGui.QWidget() self.kicadToNgspiceLayout = QtGui.QVBoxLayout() @@ -204,16 +210,15 @@ class DockArea(QtGui.QMainWindow): self.obj_appconfig.dock_dict[temp].append( dock['kicadToNgspice-' + str(count)]) count = count + 1 + + # This function creates a widget for different subcircuit options. def subcircuiteditor(self): - """ - This function creates a widget for different subcircuit options - """ - + """Sdf.""" global count self.subcktWidget = QtGui.QWidget() self.subcktLayout = QtGui.QVBoxLayout() self.subcktLayout.addWidget(Subcircuit(self)) - + self.subcktWidget.setLayout(self.subcktLayout) dock['Subcircuit-' + str(count)] = QtGui.QDockWidget('Subcircuit-' + str(count)) @@ -237,17 +242,15 @@ class DockArea(QtGui.QMainWindow): self.obj_appconfig.dock_dict[temp].append( dock['Subcircuit-' + str(count)]) count = count + 1 - + + # This function creates a widget for different subcircuit options. def usermanual(self): - """ - This function creates a widget for different subcircuit options - """ - + """Sdf.""" global count self.usermanualWidget = QtGui.QWidget() self.usermanualLayout = QtGui.QVBoxLayout() self.usermanualLayout.addWidget(UserManual()) - + self.usermanualWidget.setLayout(self.usermanualLayout) dock['User Manual-' + str(count)] = QtGui.QDockWidget('User Manual-' + str(count)) @@ -269,9 +272,9 @@ class DockArea(QtGui.QMainWindow): count = count + 1 + # This function sets up the UI for ngspice to modelica conversion. def modelicaEditor(self, projDir): - """This function sets up the UI for ngspice to modelica conversion.""" - + """Dfg.""" global count self.modelicaWidget = QtGui.QWidget() self.modelicaLayout = QtGui.QVBoxLayout() @@ -300,7 +303,9 @@ class DockArea(QtGui.QMainWindow): count = count + 1 + # This function when called closes the opened file. def closeDock(self): - temp = self.obj_appconfig.current_project['ProjectName'] - for dockwidget in self.obj_appconfig.dock_dict[temp]: + """Sdf.""" + self.temp = self.obj_appconfig.current_project['ProjectName'] + for dockwidget in self.obj_appconfig.dock_dict[self.temp]: dockwidget.close() |