summaryrefslogtreecommitdiff
path: root/src/frontEnd/DockArea.py
blob: a34d1cda1c830fb8ca8c48ad72b0d6325211837f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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'])