Ejemplo n.º 1
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)
Ejemplo n.º 2
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)
Ejemplo n.º 3
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)
Ejemplo n.º 4
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)
Ejemplo n.º 5
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)
Ejemplo n.º 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)