예제 #1
0
 def createLogSidePanel(self):
     position = Workspace.Bottom
     logWindow = LogWindow()
     logWindow.setStyleSheet('border-top: 1px solid #818A9A; background: #FFF')
     Log.connect(logWindow)
     toolbar = ToolBar('日志')
     application.addToolBar(toolbar.id(), position, 0)
     container = SideContainer()
     container.setStyleSheet('SideContainer {border-top: 1px solid #818A9A;}')
     container.setToolBar(toolbar)
     container.setContentWidget(logWindow)
     logButton = ChoiceButton(u'日志', QIcon('images/logo.png'))
     self.addPanel(logButton, container, position, ChoiceBar.ChoiceBar_Bottom)
예제 #2
0
 def createLogSidePanel(self):
     position = Workspace.Bottom
     logWindow = LogWindow()
     logWindow.setStyleSheet(
         'border-top: 1px solid #818A9A; background: #FFF')
     Log.connect(logWindow)
     toolbar = ToolBar('日志')
     application.addToolBar(toolbar.id(), position, 0)
     container = SideContainer()
     container.setStyleSheet(
         'SideContainer {border-top: 1px solid #818A9A;}')
     container.setToolBar(toolbar)
     container.setContentWidget(logWindow)
     logButton = ChoiceButton(u'日志', QIcon('images/logo.png'))
     self.addPanel(logButton, container, position,
                   ChoiceBar.ChoiceBar_Bottom)
예제 #3
0
 def createVmListSidePanel(self):
     position = Workspace.Left
     vmList = VMList()
     vmList.startOrGotoVm.connect(self.startOrGotoVm)
     mapButton = ChoiceButton(u'虚拟机', QIcon('images/virtualbox.png'))
     container = SideContainer()
     container.setContentWidget(vmList)
     container.setStyleSheet('QTreeView {border: none}')
     toolbar = ToolBar('虚拟机')
     toolbar.setStyleSheet('ToolBar{border-bottom: 1px solid #818A9A}')
     application.addToolBar(toolbar.id(), position, 0)
     minimizeButton = ToolButton(u'最小化', QIcon('images/hide-left.png'))
     minimizeButton.clicked.connect(
         self.sideAreas[position].hidePanelClicked)
     refreshButton = ToolButton(u'刷新', QIcon('images/refresh.png'))
     toolbar.addButton(refreshButton)
     toolbar.addButton(minimizeButton)
     container.setToolBar(toolbar)
     self.addPanel(mapButton, container, position, ChoiceBar.ChoiceBar_Top)
예제 #4
0
 def createControlSidePanel(self):
     position = Workspace.Right
     panel = ControlSidePanel()
     controlButton = ChoiceButton(u'控制', QIcon('images/control.png'))
     container = SideContainer()
     container.setContentWidget(panel)
     toolbar = ToolBar('控制')
     toolbar.setStyleSheet('ToolBar{border-bottom: 1px solid #818A9A}')
     application.addToolBar(toolbar.id(), position, 0)
     minimizeButton = ToolButton(u'最小化', QIcon('images/hide-right.png'))
     minimizeButton.clicked.connect(
         self.sideAreas[position].hidePanelClicked)
     toolbar.addButton(minimizeButton)
     container.setToolBar(toolbar)
     self.addPanel(controlButton, container, position)
예제 #5
0
 def createHistorySidePanel(self):
     position = Workspace.Left
     gMap = GMap()
     mapButton = ChoiceButton(u'历史', QIcon('images/history.png'))
     container = SideContainer()
     container.setContentWidget(gMap)
     toolbar = ToolBar('历史')
     toolbar.setStyleSheet('ToolBar{border-bottom: 1px solid #818A9A}')
     application.addToolBar(toolbar.id(), position, 1)
     minimizeButton = ToolButton(u'最小化', QIcon('images/hide-left.png'))
     minimizeButton.clicked.connect(
         self.sideAreas[position].hidePanelClicked)
     toolbar.addButton(minimizeButton)
     container.setToolBar(toolbar)
     self.addPanel(mapButton, container, position)
예제 #6
0
 def createVmListSidePanel(self):
     position = Workspace.Left
     vmList = VMList()
     vmList.startOrGotoVm.connect(self.startOrGotoVm)
     mapButton = ChoiceButton(u'虚拟机', QIcon('images/virtualbox.png'))
     container = SideContainer()
     container.setContentWidget(vmList)
     container.setStyleSheet(
         'QTreeView {border: none}'
     )
     toolbar = ToolBar('虚拟机')
     toolbar.setStyleSheet('ToolBar{border-bottom: 1px solid #818A9A}')
     application.addToolBar(toolbar.id(), position, 0)
     minimizeButton = ToolButton(u'最小化', QIcon('images/hide-left.png'))
     minimizeButton.clicked.connect(self.sideAreas[position].hidePanelClicked)
     refreshButton = ToolButton(u'刷新', QIcon('images/refresh.png'))
     toolbar.addButton(refreshButton)
     toolbar.addButton(minimizeButton)
     container.setToolBar(toolbar)
     self.addPanel(mapButton, container, position, ChoiceBar.ChoiceBar_Top)
예제 #7
0
 def createControlSidePanel(self):
     position = Workspace.Right
     panel = ControlSidePanel()
     controlButton = ChoiceButton(u'控制', QIcon('images/control.png'))
     container = SideContainer()
     container.setContentWidget(panel)
     toolbar = ToolBar('控制')
     toolbar.setStyleSheet('ToolBar{border-bottom: 1px solid #818A9A}')
     application.addToolBar(toolbar.id(), position, 0)
     minimizeButton = ToolButton(u'最小化', QIcon('images/hide-right.png'))
     minimizeButton.clicked.connect(self.sideAreas[position].hidePanelClicked)
     toolbar.addButton(minimizeButton)
     container.setToolBar(toolbar)
     self.addPanel(controlButton, container, position)
예제 #8
0
 def createHistorySidePanel(self):
     position = Workspace.Left
     gMap = GMap()
     mapButton = ChoiceButton(u'历史', QIcon('images/history.png'))
     container = SideContainer()
     container.setContentWidget(gMap)
     toolbar = ToolBar('历史')
     toolbar.setStyleSheet('ToolBar{border-bottom: 1px solid #818A9A}')
     application.addToolBar(toolbar.id(), position, 1)
     minimizeButton = ToolButton(u'最小化', QIcon('images/hide-left.png'))
     minimizeButton.clicked.connect(self.sideAreas[position].hidePanelClicked)
     toolbar.addButton(minimizeButton)
     container.setToolBar(toolbar)
     self.addPanel(mapButton, container, position)