Exemplo n.º 1
0
 def AreaWidgetLoader(self, DockInfo):
     if hasattr(self, 'dockList'):
         for dock in self.dockList:
             dock.close()
     self.AllDockArea = {}
     if self.FSettings.Settings.get_setting('dockarea',
                                            'advanced',
                                            format=bool):
         self.dockList = []
         for key in DockInfo.keys():
             if DockInfo[key]['active']:
                 self.dock = QDockWidget(key)
                 self.AllDockArea[key] = dockAreaAPI(None, DockInfo[key])
                 self.dock.setWidget(self.AllDockArea[key])
                 self.dock.setSizePolicy(QSizePolicy.Expanding,
                                         QSizePolicy.Expanding)
                 self.dock.setAllowedAreas(Qt.AllDockWidgetAreas)
                 self.dock.setFeatures(QDockWidget.DockWidgetMovable
                                       | QDockWidget.DockWidgetFloatable)
                 self.InitialMehtod.addDockWidget(Qt.RightDockWidgetArea,
                                                  self.dock)
                 self.dockList.insert(0, self.dock)
         if len(self.dockList) > 1:
             for index in range(1, len(self.dockList) - 1):
                 if self.dockList[index].objectName() != ':: URLMonitor::':
                     self.InitialMehtod.tabifyDockWidget(
                         self.dockList[index], self.dockList[index + 1])
         try:
             self.dockList[0].raise_()
         except IndexError:
             pass
         self.checkDockArea.emit(self.AllDockArea)
Exemplo n.º 2
0
 def AreaWidgetLoader(self,DockInfo):
     if hasattr(self,'dockList'):
         for dock in self.dockList: dock.close()
     self.AllDockArea = {}
     if self.FSettings.Settings.get_setting('dockarea','advanced',format=bool):
         self.dockList = []
         for key in DockInfo.keys():
             if DockInfo[key]['active']:
                 self.dock = QDockWidget(key)
                 self.AllDockArea[key] = dockAreaAPI(None,DockInfo[key])
                 self.dock.setWidget(self.AllDockArea[key])
                 self.dock.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
                 self.dock.setAllowedAreas(Qt.AllDockWidgetAreas)
                 self.dock.setFeatures(QDockWidget.DockWidgetMovable | QDockWidget.DockWidgetFloatable)
                 self.InitialMehtod.addDockWidget(Qt.RightDockWidgetArea, self.dock)
                 self.dockList.insert(0,self.dock)
         if len(self.dockList) > 1:
             for index in range(1, len(self.dockList) - 1):
                 if self.dockList[index].objectName() != ':: URLMonitor::':
                     self.InitialMehtod.tabifyDockWidget(self.dockList[index],
                         self.dockList[index + 1])
         try:
             self.dockList[0].raise_()
         except IndexError:
             pass
         self.checkDockArea.emit(self.AllDockArea)