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)
                 if key == 'HTTP-Authentication':
                     self.AllDockArea[key] = dockCredsMonitor(None,DockInfo[key])
                 elif key == 'HTTP-Requests':
                     self.AllDockArea[key] = dockUrlMonitor(None,DockInfo[key])
                 elif key == 'PumpkinProxy':
                     self.AllDockArea[key] = dockPumpkinProxy(None, DockInfo[key])
                 else:
                     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.Tab_Dock.addDockWidget(Qt.LeftDockWidgetArea, 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() != 'HTTP-Requests':
                     self.Tab_Dock.tabifyDockWidget(self.dockList[index],
                         self.dockList[index + 1])
         try:
             self.dockList[0].raise_()
         except IndexError:
             pass
         self.checkDockArea.emit(self.AllDockArea)
Ejemplo 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)
                 if key == 'HTTP-Authentication':
                     self.AllDockArea[key] = dockCredsMonitor(None,DockInfo[key])
                 elif key == 'HTTP-Requests':
                     self.AllDockArea[key] = dockUrlMonitor(None,DockInfo[key])
                 elif key == 'PumpkinProxy':
                     self.AllDockArea[key] = dockPumpkinProxy(None, DockInfo[key])
                 else:
                     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.LeftDockWidgetArea, 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() != 'HTTP-Requests':
                     self.InitialMehtod.tabifyDockWidget(self.dockList[index],
                         self.dockList[index + 1])
         try:
             self.dockList[0].raise_()
         except IndexError:
             pass
         self.checkDockArea.emit(self.AllDockArea)