def _setup_ui(self): hbox = QtGui.QHBoxLayout(self) self.setLayout(hbox) form_vbox = self.vbox = QtGui.QVBoxLayout(self) hbox2 = QtGui.QVBoxLayout(self) self.device_and_state = DevnameAndState(self) hbox2.addWidget(self.device_and_state) self.magnet_type_label = QtGui.QLabel("Magnet type:") hbox2.addWidget(self.magnet_type_label) form_vbox.addLayout(hbox2) # attributes self.form = MAXForm(withButtons=False) form_vbox.addWidget(self.form, stretch=1) self.status_area = StatusArea(self) form_vbox.addWidget(self.status_area) hbox.addLayout(form_vbox) # value bar self.valuebar = MAXValueBar(self) slider_vbox = QtGui.QVBoxLayout(self) slider_vbox.setContentsMargins(10, 10, 10, 10) hbox.addLayout(slider_vbox) self.current_label = TaurusLabel() self.current_label.setAlignment(QtCore.Qt.AlignCenter) slider_vbox.addWidget(self.valuebar, 1) slider_vbox.addWidget(self.current_label)
def _setup_ui(self): vbox = QtGui.QVBoxLayout(self) self.setLayout(vbox) label = QtGui.QLabel("All magnets in the circuit") label.setAlignment(QtCore.Qt.AlignCenter) vbox.addWidget(label) self.table = DeviceRowsTable() vbox.addWidget(self.table)
def _setup_ui(self): grid = QtGui.QGridLayout(self) self.setLayout(grid) grid.addWidget(QtGui.QLabel("Device:"), 0, 0) self.devicename_label = QtGui.QLabel("<devicename>") self.devicename_label.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse) grid.addWidget(self.devicename_label, 0, 1) grid.addWidget(QtGui.QLabel("State:"), 1, 0) hbox = QtGui.QHBoxLayout(self) # self.state_led = TaurusLed() # hbox.addWidget(self.state_led) self.state_label = TaurusLabel() policy = QtGui.QSizePolicy() self.state_label.setBgRole("state") policy.setHorizontalPolicy(QtGui.QSizePolicy.Expanding) self.state_label.setSizePolicy(policy) hbox.addWidget(self.state_label) # hbox.insertStretch(2, 1) grid.addLayout(hbox, 1, 1, alignment=QtCore.Qt.AlignLeft) grid.setColumnStretch(1, 1)
def _setup_ui(self): hbox = QtGui.QVBoxLayout(self) self.setLayout(hbox) self.status_label = QtGui.QLabel("(No status has been read.)") self.status_label.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse) self.status_label.setWordWrap(True) self.status_label.setAlignment(QtCore.Qt.AlignTop) status_scroll_area = QtGui.QScrollArea() status_scroll_area.setMaximumSize(QtCore.QSize(100000, 100)) status_scroll_area.setWidgetResizable(True) status_scroll_area.setWidget(self.status_label) hbox.addWidget(status_scroll_area) self.status = None self.statusTrigger.connect(self.updateStatus)
def _setup_ui(self): vbox = QtGui.QVBoxLayout(self) self.setLayout(vbox) hbox = QtGui.QHBoxLayout(self) label = QtGui.QLabel("Magnetic field components", parent=self) label.setAlignment(QtCore.Qt.AlignCenter) hbox.addWidget(label) # the dropdown to select which magnet's fields to show self.magnet_combobox = QtGui.QComboBox(parent=self) self.magnet_combobox.currentIndexChanged.connect(self._magnet_selected) hbox.addWidget(self.magnet_combobox) vbox.addLayout(hbox) # the actual field table for the chosen magnet self.table = AttributeColumnsTable(parent=self) vbox.addWidget(self.table)