summaryrefslogtreecommitdiff
path: root/src/frontEnd/DockArea.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontEnd/DockArea.py')
-rw-r--r--src/frontEnd/DockArea.py83
1 files changed, 45 insertions, 38 deletions
diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py
index a34d1cda..e9755302 100644
--- a/src/frontEnd/DockArea.py
+++ b/src/frontEnd/DockArea.py
@@ -1,11 +1,15 @@
from PyQt4 import QtGui,QtCore
+from ngspiceSimulation.pythonPlotting import plotWindow
#from configuration.Appconfig import Appconfig
-dockList = ['Blank','Notes']
+
+dockList = ['Blank']
+count = 1
dock = {}
class DockArea(QtGui.QMainWindow):
+
def __init__(self):
QtGui.QMainWindow.__init__(self)
@@ -15,59 +19,62 @@ class DockArea(QtGui.QMainWindow):
self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock[dockName])
- self.tabifyDockWidget(dock['Notes'],dock['Blank'])
+ #self.tabifyDockWidget(dock['Notes'],dock['Blank'])
self.show()
- def createDockArea(self):
+
+ def createTestEditor(self):
"""
- This function creates Dock Area
+ This function create widget for Library Editor
"""
- self.mainWindow = QtGui.QMainWindow()
+ global count
+
+ self.testWidget = QtGui.QWidget()
+ self.testArea = QtGui.QTextEdit()
+ self.testLayout = QtGui.QVBoxLayout()
+ self.testLayout.addWidget(self.testArea)
-
- for dockName in dockList:
- dock[dockName] = QtGui.QDockWidget(dockName)
- dock[dockName].setWidget(QtGui.QTextEdit())
-
- self.mainWindow.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock[dockName])
-
+ #Adding to main Layout
+ self.testWidget.setLayout(self.testLayout)
+ dock['Tips-'+str(count)] = QtGui.QDockWidget('Tips-'+str(count))
+ dock['Tips-'+str(count)].setWidget(self.testWidget)
+ self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['Tips-'+str(count)])
+ self.tabifyDockWidget(dock['Blank'],dock['Tips-'+str(count)])
-
- self.mainWindow.tabifyDockWidget(dock['Notes'],dock['Blank'])
- self.mainWindow.tabifyDockWidget(dock['Blank'],dock['Tips'])
+ dock['Tips-'+str(count)].setVisible(True)
+ dock['Tips-'+str(count)].setFocus()
+ dock['Tips-'+str(count)].raise_()
+ count = count + 1
+
+ def plottingEditor(self):
"""
- if len(dockList) > 1:
- for index in range(0, len(dockList) - 1):
- self.mainWindow.tabifiedDockWidgets(dockList[index]),dockList[index + 1])
+ This function create widget for Library Editor
"""
+ global count
+ self.plottingWidget = QtGui.QWidget()
+ #self.plottingArea = QtGui.QTextEdit()
-
- self.mainWindow.show()
+ self.plottingLayout = QtGui.QVBoxLayout()
+ #self.plottingLayout.addWidget(self.plottingArea)
+ self.plottingLayout.addWidget(plotWindow())
+ #Adding to main Layout
+ self.plottingWidget.setLayout(self.plottingLayout)
+ dock['Plotting-'+str(count)] = QtGui.QDockWidget('Plotting-'+str(count))
+ dock['Plotting-'+str(count)].setWidget(self.plottingWidget)
+ self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['Plotting-'+str(count)])
+ self.tabifyDockWidget(dock['Blank'],dock['Plotting-'+str(count)])
- return self.mainWindow
-
+ dock['Plotting-'+str(count)].setVisible(True)
+ dock['Plotting-'+str(count)].setFocus()
+ dock['Plotting-'+str(count)].raise_()
+
+ count = count + 1
- def createTestEditor(self):
- """
- This function create widget for Library Editor
- """
- self.testWidget = QtGui.QWidget()
- self.testArea = QtGui.QTextEdit()
- self.testLayout = QtGui.QVBoxLayout()
- self.testLayout.addWidget(self.testArea)
-
- #Adding to main Layout
- self.testWidget.setLayout(self.testLayout)
- dock['Tips'] = QtGui.QDockWidget('Tips')
- dock['Tips'].setWidget(self.testWidget)
-
-
- self.tabifyDockWidget(dock['Blank'],dock['Tips'])