diff options
author | fahim | 2015-05-08 17:22:19 +0530 |
---|---|---|
committer | fahim | 2015-05-08 17:22:19 +0530 |
commit | 37854e4e6e1dfd448bc7fb63e31d750843aa68bc (patch) | |
tree | 6e05791ab65b9084c34c0d32f01dde2f0d3962e1 /src/frontEnd/DockArea.py | |
parent | 4ec06556f4bd459477a4468acb562a0333a8ec07 (diff) | |
download | eSim-37854e4e6e1dfd448bc7fb63e31d750843aa68bc.tar.gz eSim-37854e4e6e1dfd448bc7fb63e31d750843aa68bc.tar.bz2 eSim-37854e4e6e1dfd448bc7fb63e31d750843aa68bc.zip |
Subject: Added DockArea
Description: Added DockArea.py and modify Application.py to handle
DockArea.
Diffstat (limited to 'src/frontEnd/DockArea.py')
-rw-r--r-- | src/frontEnd/DockArea.py | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py new file mode 100644 index 00000000..a34d1cda --- /dev/null +++ b/src/frontEnd/DockArea.py @@ -0,0 +1,74 @@ +from PyQt4 import QtGui,QtCore +#from configuration.Appconfig import Appconfig + +dockList = ['Blank','Notes'] +dock = {} + +class DockArea(QtGui.QMainWindow): + + def __init__(self): + QtGui.QMainWindow.__init__(self) + + for dockName in dockList: + dock[dockName] = QtGui.QDockWidget(dockName) + dock[dockName].setWidget(QtGui.QTextEdit()) + + self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock[dockName]) + + self.tabifyDockWidget(dock['Notes'],dock['Blank']) + self.show() + + def createDockArea(self): + """ + This function creates Dock Area + """ + self.mainWindow = QtGui.QMainWindow() + + + for dockName in dockList: + dock[dockName] = QtGui.QDockWidget(dockName) + dock[dockName].setWidget(QtGui.QTextEdit()) + + self.mainWindow.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock[dockName]) + + + + self.mainWindow.tabifyDockWidget(dock['Notes'],dock['Blank']) + self.mainWindow.tabifyDockWidget(dock['Blank'],dock['Tips']) + + """ + if len(dockList) > 1: + for index in range(0, len(dockList) - 1): + self.mainWindow.tabifiedDockWidgets(dockList[index]),dockList[index + 1]) + """ + + + + self.mainWindow.show() + + + return self.mainWindow + + + 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']) + + + +
\ No newline at end of file |