Beispiel #1
0
    def _setup_ui(self):
        # layout
        hbox = QtGui.QHBoxLayout(self)
        self.setLayout(hbox)
        # tabs
        tabs = self.tabs = TaurusLazyQTabWidget()
        hbox.addWidget(tabs)
        # circuit panel
        self.circuit_widget = MagnetCircuitPanel()
        self.circuit_tab = tabs.addTab(self.circuit_widget, "Circuit")
        # ps panel
        self.ps_widget = PowerSupplyPanel()
        self.ps_tab = tabs.addTab(self.ps_widget, "Power supply")
        # magnet panel
        self.magnets_widget = MagnetListPanel()
        self.magnets_tab = tabs.addTab(self.magnets_widget, "Magnets")
        # cycle panel
        self.cycle_widget = CyclePanel()
        self.cycle_tab = tabs.addTab(self.cycle_widget, "Cycle")
        # field panel
        self.field_widget = FieldPanel()
        self.field_tab = tabs.addTab(self.field_widget, "Field")
        # make the PS tab default for now...
        tabs.setCurrentIndex(self.ps_tab)

        self.resize(700, 450)
Beispiel #2
0
 def _setup_ui(self):
     # layout
     hbox = QtGui.QHBoxLayout(self)
     self.setLayout(hbox)
     # tabs
     tabs = self.tabs = TaurusLazyQTabWidget()
     hbox.addWidget(tabs)
     # magnet
     self.circuit_widget = MagnetCircuitPanel()
     self.circuit_tab = tabs.addTab(self.circuit_widget, "Circuit")
     # ps
     self.ps_widget = PowerSupplyPanel()
     self.ps_tab = tabs.addTab(self.ps_widget, "Power supply")
     # magnet
     self.magnets_widget = MagnetListPanel()
     self.magnets_tab = tabs.addTab(self.magnets_widget, "Magnets")
     # field
     self.field_widget = FieldPanel()
     self.field_tab = tabs.addTab(self.field_widget, "Field")
     # switchboard
     self.switchboard_widget = SwitchBoardPanel()
     tab = tabs.addTab(self.switchboard_widget, "Switchboard")
     self.switchboard_tab = tab
     # make the PS tab default for now...
     tabs.setCurrentIndex(self.ps_tab)
     self.resize(700, 400)