def initPenSizeButtons(self): self.penSize = QWidget(self) self.penSizeLayout = QHBoxLayout() self.penSize.setLayout(self.penSizeLayout) # adjust pen size self.penSize1 = QPushButton(self.penSize) self.penSize1.setIcon(QIcon(":/resource/icon/pensize1.png")) self.penSize1.setObjectName('1') self.penSize1.setFixedSize(self.iconWidth, self.iconHeight) self.penSize1.setCheckable(True) self.penSize2 = QPushButton(self.penSize) self.penSize2.setIcon(QIcon(":/resource/icon/pensize2.png")) self.penSize2.setObjectName('2') self.penSize2.setFixedSize(self.iconWidth, self.iconHeight) self.penSize2.setCheckable(True) self.penSize3 = QPushButton(self.penSize) self.penSize3.setIcon(QIcon(":/resource/icon/pensize3.png")) self.penSize3.setObjectName('3') self.penSize3.setFixedSize(self.iconWidth, self.iconHeight) self.penSize3.setCheckable(True) self.sizeButtonGroup = QButtonGroup(self.penSize) self.sizeButtonGroup.addButton(self.penSize1) self.sizeButtonGroup.addButton(self.penSize2) self.sizeButtonGroup.addButton(self.penSize3) self.sizeButtonGroup.buttonClicked.connect(self.sizeButtonToggled) self.penSizeLayout.addWidget(self.penSize1) self.penSizeLayout.addWidget(self.penSize2) self.penSizeLayout.addWidget(self.penSize3) self.penSizeLayout.setSpacing(5) self.penSizeLayout.setContentsMargins(0, 0, 0, 0)
def initDrawButtons(self, flags): self.drawButtonGroup = QButtonGroup(self) # draw action buttons if flags & constant.RECT: self.rectButton = QPushButton(self) self.rectButton.setIcon(QIcon(":/resource/icon/rect.png")) self.rectButton.setFixedSize(self.iconWidth, self.iconHeight) self.rectButton.setCheckable(True) self.drawButtonGroup.addButton(self.rectButton) self.hlayout.addWidget(self.rectButton) self.button_list.append(self.rectButton) if flags & constant.ELLIPSE: self.ellipseButton = QPushButton(self) self.ellipseButton.setIcon(QIcon(":/resource/icon/ellipse.png")) self.ellipseButton.setFixedSize(self.iconWidth, self.iconHeight) self.ellipseButton.setCheckable(True) self.drawButtonGroup.addButton(self.ellipseButton) self.hlayout.addWidget(self.ellipseButton) self.button_list.append(self.ellipseButton) if flags & constant.ARROW: self.arrowButton = QPushButton(self) self.arrowButton.setIcon(QIcon(":/resource/icon/arrow.png")) self.arrowButton.setFixedSize(self.iconWidth, self.iconHeight) self.arrowButton.setCheckable(True) self.drawButtonGroup.addButton(self.arrowButton) self.hlayout.addWidget(self.arrowButton) self.button_list.append(self.arrowButton) if flags & constant.LINE: self.lineButton = QPushButton(self) self.lineButton.setIcon(QIcon(":/resource/icon/line.png")) self.lineButton.setFixedSize(self.iconWidth, self.iconHeight) self.lineButton.setCheckable(True) self.drawButtonGroup.addButton(self.lineButton) self.hlayout.addWidget(self.lineButton) self.button_list.append(self.lineButton) if flags & constant.FREEPEN: self.freePenButton = QPushButton(self) self.freePenButton.setIcon(QIcon(":/resource/icon/pen.png")) self.freePenButton.setFixedSize(self.iconWidth, self.iconHeight) self.freePenButton.setCheckable(True) self.drawButtonGroup.addButton(self.freePenButton) self.hlayout.addWidget(self.freePenButton) self.button_list.append(self.freePenButton) if flags & constant.TEXT: self.textButton = QPushButton(self) self.textButton.setIcon(QIcon(":/resource/icon/text.png")) self.textButton.setFixedSize(self.iconWidth, self.iconHeight) self.textButton.setCheckable(True) self.drawButtonGroup.addButton(self.textButton) self.hlayout.addWidget(self.textButton) self.button_list.append(self.textButton) self.drawButtonGroup.buttonClicked.connect(self.buttonToggled)
def initPenColorButtons(self): self.colorSet = QWidget(self) self.colorLayout = QHBoxLayout() self.colorLayout.setSpacing(5) self.colorLayout.setContentsMargins(5, 0, 5, 0) self.colorSet.setLayout(self.colorLayout) self.presentColor = QPushButton(self.colorSet) self.presentColor.setFixedSize(self.iconWidth, self.iconHeight) self.presentColor.setEnabled(False) # adjust pen color self.colorPick = QWidget(self.colorSet) self.colorGrid = QGridLayout() self.colorGrid.setSpacing(0) self.colorGrid.setContentsMargins(5, 0, 5, 0) self.colorPick.setLayout(self.colorGrid) self.colorList = [('white', '#ffffff'), ('red', '#ff0000'), ('green', '#00ff00'), ('blue', '#0000ff'), ('cyan', '#00ffff'), ('magenta', '#ff00ff'), ('yellow', '#ffff00'), ('gray', '#a0a0a4'), ('black', '#000000'), ('darkRed', '#800000'), ('darkGreen', '#008000'), ('darkBlue', '#000080'), ('darkCyan', '#008080'), ('darkMagenta', '#800080'), ('darkYellow', '#808000'), ('darkGray', '#808080')] self.generateButtons() self.colorButtonGroup = QButtonGroup(self) for button in self.colorButtons: self.colorButtonGroup.addButton(button) self.colorButtonGroup.buttonClicked.connect(self.colorButtonToggled) # set the layout tmp = 0 for x in range(0, 2): for y in range(0, int(len(self.colorList) / 2)): self.colorGrid.addWidget(self.colorButtons[tmp], x, y) tmp += 1 self.colorGrid.setSpacing(0) self.colorGrid.setContentsMargins(0, 0, 0, 0) self.colorLayout.addWidget(self.presentColor) self.colorLayout.addWidget(self.colorPick)
def ui(self): super(AlembicManagerView, self).ui() export_icon = resources.icon('export') import_icon = resources.icon('import') buttons_layout = layouts.HorizontalLayout(spacing=2, margins=(2, 2, 2, 2)) self.main_layout.addLayout(buttons_layout) self.main_layout.addLayout(dividers.DividerLayout()) self._exporter_btn = buttons.BaseButton('Exporter', parent=self) self._exporter_btn.setIcon(export_icon) self._exporter_btn.setMinimumWidth(80) self._exporter_btn.setCheckable(True) self._importer_btn = buttons.BaseButton('Importer', parent=self) self._importer_btn.setIcon(import_icon) self._importer_btn.setMinimumWidth(80) self._importer_btn.setCheckable(True) buttons_layout.addStretch() buttons_layout.addWidget(self._exporter_btn) buttons_layout.addWidget(self._importer_btn) self._importer_btn.setCheckable(True) self._buttons_grp = QButtonGroup(self) self._buttons_grp.setExclusive(True) self._buttons_grp.addButton(self._exporter_btn) self._buttons_grp.addButton(self._importer_btn) self._exporter_btn.setChecked(True) self._stack = stack.SlidingStackedWidget() self.main_layout.addWidget(self._stack) self._alembic_exporter = exporter.AlembicExporter(project=self.project) self._alembic_importer = importer.AlembicImporter(project=self.project) self._stack.addWidget(self._alembic_exporter) self._stack.addWidget(self._alembic_importer)
def ui(self): super(BreadcrumbWidget, self).ui() self._button_group = QButtonGroup()
def ui(self): super(SymmeshView, self).ui() top_layout = layouts.GridLayout() mirror_axis_lbl = label.BaseLabel('Mirror Axis: ', parent=self) self._axis_radio_grp = QButtonGroup() self._yz_radio = buttons.BaseRadioButton(consts.AXIS[0], parent=self) self._xz_radio = buttons.BaseRadioButton(consts.AXIS[1], parent=self) self._xy_radio = buttons.BaseRadioButton(consts.AXIS[2], parent=self) self._radios = [self._yz_radio, self._xz_radio, self._xy_radio] self._axis_radio_grp.addButton(self._yz_radio) self._axis_radio_grp.addButton(self._xz_radio) self._axis_radio_grp.addButton(self._xy_radio) axis_radio_layout = layouts.HorizontalLayout(spacing=2, margins=(2, 2, 2, 2)) axis_radio_layout.addWidget(self._yz_radio) axis_radio_layout.addWidget(self._xz_radio) axis_radio_layout.addWidget(self._xy_radio) axis_radio_layout.addStretch() global_tolerance_lbl = label.BaseLabel('Global Tolerance: ', parent=self) self._global_tolerance_spn = spinbox.BaseDoubleSpinBox(parent=self) self._global_tolerance_spn.setDecimals(4) self._global_tolerance_spn.setValue(0.0010) top_layout.addWidget(mirror_axis_lbl, 0, 0, Qt.AlignRight) top_layout.addLayout(axis_radio_layout, 0, 1) top_layout.addWidget(global_tolerance_lbl, 1, 0) top_layout.addWidget(self._global_tolerance_spn, 1, 1) options_cbx_layout = layouts.HorizontalLayout(spacing=2, margins=(2, 2, 2, 2)) self._neg_to_pos_cbx = checkbox.BaseCheckBox('Operate -X to +X', parent=self) self._use_pivot_as_origin_cbx = checkbox.BaseCheckBox('Use Pivot as Origin', parent=self) self._use_pivot_as_origin_cbx.setChecked(True) options_cbx_layout.addWidget(self._neg_to_pos_cbx) options_cbx_layout.addItem(QSpacerItem(10, 0, QSizePolicy.Fixed, QSizePolicy.Fixed)) options_cbx_layout.addWidget(self._use_pivot_as_origin_cbx) options_cbx_layout.addStretch() select_geo_layout = layouts.HorizontalLayout(spacing=2, margins=(2, 2, 2, 2)) self._select_geo_line = lineedit.BaseLineEdit(parent=self) self._select_geo_line.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred) self._select_geo_line.setReadOnly(True) self._select_base_geo_btn = buttons.BaseButton('Select Base Geo', parent=self) self._select_base_geo_btn.setIcon(resources.icon('cursor')) select_geo_layout.addWidget(self._select_geo_line) select_geo_layout.addWidget(self._select_base_geo_btn) self._symmetry_message = message.BaseMessage('', parent=self).small() selection_widget = QWidget(parent=self) selection_layout = layouts.FlowLayout() selection_widget.setLayout(selection_layout) mirror_flip_widget = QWidget(parent=self) mirror_flip_layout = layouts.FlowLayout() mirror_flip_widget.setLayout(mirror_flip_layout) revert_widget = QWidget(parent=self) revert_layout = layouts.FlowLayout() revert_widget.setLayout(revert_layout) self._check_symmetry_btn = buttons.BaseButton('Check Symmetry', parent=self) self._selection_mirror_btn = buttons.BaseButton('Selection Mirror', parent=self) self._select_moved_vertices_btn = buttons.BaseButton('Select Moved Vertices', parent=self) self._mirror_selected_btn = buttons.BaseButton('Mirror Selected', parent=self) self._flip_selected_btn = buttons.BaseButton('Flip Selected', parent=self) self._revert_selected_to_base = buttons.BaseButton('Revert Selected to Base', parent=self) self._revert_bias_slider = sliders.HoudiniDoubleSlider(parent=self, slider_range=[0.0, 1.0]) # TODO: Implement this feature self._live_revert_bias_cbx = checkbox.BaseCheckBox('Live', parent=self) self._live_revert_bias_cbx.setVisible(False) self._check_symmetry_btn.setIcon(resources.icon('refresh')) self._selection_mirror_btn.setIcon(resources.icon('vertex')) self._select_moved_vertices_btn.setIcon(resources.icon('cursor')) self._mirror_selected_btn.setIcon(resources.icon('mirror')) self._flip_selected_btn.setIcon(resources.icon('flip_vertical')) self._revert_selected_to_base.setIcon(resources.icon('rollback')) selection_layout.addWidget(self._check_symmetry_btn) selection_layout.addWidget(self._selection_mirror_btn) selection_layout.addWidget(self._select_moved_vertices_btn) mirror_flip_layout.addWidget(self._mirror_selected_btn) mirror_flip_layout.addWidget(self._flip_selected_btn) revert_layout.addWidget(self._revert_selected_to_base) revert_layout.addWidget(self._revert_bias_slider) revert_layout.addWidget(self._live_revert_bias_cbx) self.main_layout.addLayout(top_layout) self.main_layout.addLayout(options_cbx_layout) self.main_layout.addWidget(dividers.Divider()) self.main_layout.addLayout(select_geo_layout) self.main_layout.addWidget(dividers.Divider()) self.main_layout.addWidget(self._symmetry_message) self.main_layout.addWidget(dividers.Divider()) self.main_layout.addWidget(selection_widget) self.main_layout.addWidget(dividers.Divider()) self.main_layout.addWidget(mirror_flip_widget) self.main_layout.addWidget(dividers.Divider()) self.main_layout.addWidget(revert_widget) self.main_layout.addStretch()
def ui(self): super(BaseButtonGroup, self).ui() self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) self._button_group = QButtonGroup()
def ui(self): super(RenamerView, self).ui() top_layout = layouts.HorizontalLayout(spacing=2, margins=(2, 2, 2, 2)) top_layout.setAlignment(Qt.AlignLeft) self._buttons_grp = QButtonGroup(self) self._buttons_grp.setExclusive(True) self.main_layout.addLayout(top_layout) self.main_layout.addLayout(dividers.DividerLayout()) self._categories_layout = layouts.HorizontalLayout(spacing=2, margins=(2, 2, 2, 2)) self._categories_layout.setAlignment(Qt.AlignLeft) selection_layout = layouts.HorizontalLayout(spacing=2, margins=(4, 0, 4, 0)) top_layout.addLayout(selection_layout) self._all_radio = buttons.BaseRadioButton('All', parent=self) self._all_radio.setFixedHeight(19) self._all_radio.setAutoExclusive(True) self._selected_radio = buttons.BaseRadioButton('Selected', parent=self) self._selected_radio.setFixedHeight(19) self._selected_radio.setChecked(True) self._selected_radio.setAutoExclusive(True) self._hierarchy_cbx = checkbox.BaseCheckBox('Hierarchy', parent=self) self._hierarchy_cbx.setFixedHeight(19) self._node_types_combo = combobox.BaseComboBox(parent=self) self._auto_rename_shapes_cbx = None self._auto_rename_shapes_cbx = checkbox.BaseCheckBox( 'Auto Rename Shapes', parent=self) self._auto_rename_shapes_cbx.setChecked(True) if not dcc.client().is_maya(): self._auto_rename_shapes_cbx.setVisible(False) selection_layout.addWidget(self._selected_radio) selection_layout.addWidget(self._all_radio) selection_layout.addItem( QSpacerItem(10, 0, QSizePolicy.Fixed, QSizePolicy.Fixed)) selection_layout.addWidget(self._hierarchy_cbx) selection_layout.addItem( QSpacerItem(10, 0, QSizePolicy.Fixed, QSizePolicy.Fixed)) selection_layout.addWidget(self._node_types_combo) if self._auto_rename_shapes_cbx: selection_layout.addItem( QSpacerItem(10, 0, QSizePolicy.Fixed, QSizePolicy.Fixed)) selection_layout.addWidget(self._auto_rename_shapes_cbx) self._splitter = splitter.CollapsibleSplitter(parent=self) self._splitter.setOrientation(Qt.Horizontal) self._splitter.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Expanding) self._splitter.setMinimumHeight(750) self.main_layout.addWidget(self._splitter) self._rename_tab = tabs.BaseTabWidget(parent=self) self._splitter.addWidget(self._rename_tab) self._manual_rename_widget = manualrenamewidget.ManualRenameWidget( model=self._model, controller=self._controller, parent=self) self._auto_rename_widget = autorenamewidget.AutoRenameWidget( model=self._model, controller=self._controller, parent=self) self._rename_tab.addTab(self._manual_rename_widget, 'Manual') self._rename_tab.addTab(self._auto_rename_widget, 'Auto') self._stack = stack.SlidingStackedWidget() # splitter_right_widget = QWidget() # splitter_right_layout = layouts.VerticalLayout(spacing=0, margins=(0, 0, 0, 0)) # splitter_right_layout.addLayout(self._categories_layout) # splitter_right_layout.addWidget(self._stack) # splitter_right_widget.setLayout(splitter_right_layout) # self._splitter.addWidget(splitter_right_widget) # # no_items_widget = QFrame() # no_items_widget.setFrameShape(QFrame.StyledPanel) # no_items_widget.setFrameShadow(QFrame.Sunken) # no_items_widget.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) # no_items_layout = layouts.VerticalLayout(spacing=0, margins=(0, 0, 0, 0)) # no_items_widget.setLayout(no_items_layout) # no_items_lbl = label.BaseLabel() # no_items_pixmap = tp.ResourcesMgr().pixmap('no_items') # no_items_lbl.setPixmap(no_items_pixmap) # no_items_lbl.setAlignment(Qt.AlignCenter) # no_items_layout.addItem(QSpacerItem(0, 10, QSizePolicy.Preferred, QSizePolicy.Expanding)) # no_items_layout.addWidget(no_items_lbl) # no_items_layout.addItem(QSpacerItem(0, 10, QSizePolicy.Preferred, QSizePolicy.Expanding)) # # self._stack.addWidget(no_items_widget) self._splitter.handle(0).collapse() self._splitter.setSizes([1, 0])
def init_ui(self, name): self.setFrameStyle(QFrame.Sunken | QFrame.StyledPanel) self.graphicsView = GraphicsView(self) self.graphicsView.setRenderHint(QPainter.Antialiasing, False) self.graphicsView.setDragMode(QGraphicsView.RubberBandDrag) self.graphicsView.setOptimizationFlags(QGraphicsView.DontSavePainterState) self.graphicsView.setViewportUpdateMode(QGraphicsView.SmartViewportUpdate) self.graphicsView.setTransformationAnchor(QGraphicsView.AnchorUnderMouse) size = self.style().pixelMetric(QStyle.PM_ToolBarIconSize) iconSize = QSize(size, size) zoomInIcon = QToolButton() zoomInIcon.setAutoRepeat(True) zoomInIcon.setAutoRepeatInterval(33) zoomInIcon.setAutoRepeatDelay(0) zoomInIcon.setIcon(QIcon(":/zoomin.png")) zoomInIcon.setIconSize(iconSize) zoomOutIcon = QToolButton() zoomOutIcon.setAutoRepeat(True) zoomOutIcon.setAutoRepeatInterval(33) zoomOutIcon.setAutoRepeatDelay(0) zoomOutIcon.setIcon(QIcon(":/zoomout.png")) zoomOutIcon.setIconSize(iconSize) self.zoomSlider = QSlider() self.zoomSlider.setMinimum(0) self.zoomSlider.setMaximum(500) self.zoomSlider.setValue(250) self.zoomSlider.setTickPosition(QSlider.TicksRight) # Zoom slider layout zoomSliderLayout = QVBoxLayout() zoomSliderLayout.addWidget(zoomInIcon) zoomSliderLayout.addWidget(self.zoomSlider) zoomSliderLayout.addWidget(zoomOutIcon) rotateLeftIcon = QToolButton() rotateLeftIcon.setIcon(QIcon(":/rotateleft.png")) rotateLeftIcon.setIconSize(iconSize) rotateRightIcon = QToolButton() rotateRightIcon.setIcon(QIcon(":/rotateright.png")) rotateRightIcon.setIconSize(iconSize) self.rotateSlider = QSlider() self.rotateSlider.setOrientation(Qt.Horizontal) self.rotateSlider.setMinimum(-360) self.rotateSlider.setMaximum(360) self.rotateSlider.setValue(0) self.rotateSlider.setTickPosition(QSlider.TicksBelow) # Rotate slider layout rotateSliderLayout = QHBoxLayout() rotateSliderLayout.addWidget(rotateLeftIcon) rotateSliderLayout.addWidget(self.rotateSlider) rotateSliderLayout.addWidget(rotateRightIcon) self.resetButton = QToolButton() self.resetButton.setText("0") self.resetButton.setEnabled(False) # Label layout labelLayout = QHBoxLayout() self.label = QLabel(name) self.label2 = QLabel("Pointer Mode") self.selectModeButton = QToolButton() self.selectModeButton.setText("Select") self.selectModeButton.setCheckable(True) self.selectModeButton.setChecked(True) self.dragModeButton = QToolButton() self.dragModeButton.setText("Drag") self.dragModeButton.setCheckable(True) self.dragModeButton.setChecked(False) self.antialiasButton = QToolButton() self.antialiasButton.setText("Antialiasing") self.antialiasButton.setCheckable(True) self.antialiasButton.setChecked(False) self.openGlButton = QToolButton() self.openGlButton.setText("OpenGL") self.openGlButton.setCheckable(True) self.openGlButton.setEnabled(QGLFormat.hasOpenGL()) pointerModeGroup = QButtonGroup() pointerModeGroup.setExclusive(True) pointerModeGroup.addButton(self.selectModeButton) pointerModeGroup.addButton(self.dragModeButton) labelLayout.addWidget(self.label) labelLayout.addStretch() labelLayout.addWidget(self.label2) labelLayout.addWidget(self.selectModeButton) labelLayout.addWidget(self.dragModeButton) labelLayout.addStretch() labelLayout.addWidget(self.antialiasButton) labelLayout.addWidget(self.openGlButton) topLayout = QGridLayout() topLayout.addLayout(labelLayout, 0, 0) topLayout.addWidget(self.graphicsView, 1, 0) topLayout.addLayout(zoomSliderLayout, 1, 1) topLayout.addLayout(rotateSliderLayout, 2, 0) topLayout.addWidget(self.resetButton, 2, 1) self.setLayout(topLayout) self.resetButton.clicked.connect(self.resetView) self.zoomSlider.valueChanged.connect(self.setupTransform) self.rotateSlider.valueChanged.connect(self.setupTransform) self.graphicsView.verticalScrollBar().valueChanged.connect(self.setResetButtonEnabled) self.graphicsView.horizontalScrollBar().valueChanged.connect(self.setResetButtonEnabled) self.selectModeButton.toggled.connect(self.togglePointerMode) self.dragModeButton.toggled.connect(self.togglePointerMode) self.antialiasButton.toggled.connect(self.toggleAntialiasing) self.openGlButton.toggled.connect(self.toggleOpenGL) rotateLeftIcon.clicked.connect(self.rotateLeft) rotateRightIcon.clicked.connect(self.rotateRight) zoomInIcon.clicked.connect(self.zoomIn) zoomOutIcon.clicked.connect(self.zoomOut) self.setupTransform()
def ui(self): super(NumberSideView, self).ui() rename_mult_layout = layouts.HorizontalLayout(spacing=5, margins=(0, 0, 0, 0)) rename_mult_layout.setAlignment(Qt.AlignLeft) self.main_layout.addLayout(rename_mult_layout) self._rename_mult_cbx = checkbox.BaseCheckBox(parent=self) self._rename_mult_cbx.setChecked(True) self._rename_mult_method_lbl = label.BaseLabel('Number: ', parent=self) self._renamer_mult_method_combo = combobox.BaseComboBox(parent=self) self._renamer_mult_method_combo.addItem('Numbers (0-9)') self._renamer_mult_method_combo.addItem('Letters (a-z)') rename_mult_layout.addWidget(self._rename_mult_cbx) rename_mult_layout.addWidget(self._rename_mult_method_lbl) rename_mult_layout.addWidget(self._renamer_mult_method_combo) self._frame_pad_lbl = label.BaseLabel('Pad: ', parent=self) self._frame_pad_spin = spinbox.BaseSpinBox(parent=self) self._frame_pad_spin.setValue(2) self._frame_pad_spin.setFocusPolicy(Qt.NoFocus) self._frame_pad_spin.setMinimum(1) self._frame_pad_spin.setMaximum(10) self._frame_combo = combobox.BaseComboBox(parent=self) self._frame_combo.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) self._frame_combo.addItems(['Replace', 'Append', 'Change Pad']) self._frame_btn = buttons.BaseButton() self._frame_btn.setIcon(resources.icon('numbered_list')) rename_mult_layout.addWidget(self._frame_pad_lbl) rename_mult_layout.addWidget(self._frame_pad_spin) rename_mult_layout.addWidget(self._frame_combo) lower_upper_grp = QButtonGroup(self) self._lower_radio = buttons.BaseRadioButton('Lower', parent=self) self._upper_radio = buttons.BaseRadioButton('Upper', parent=self) lower_upper_grp.addButton(self._lower_radio) lower_upper_grp.addButton(self._upper_radio) self._lower_radio.setVisible(False) self._upper_radio.setVisible(False) self._lower_radio.setFixedHeight(19) self._upper_radio.setFixedHeight(19) self._upper_radio.setAutoExclusive(True) self._lower_radio.setAutoExclusive(True) self._lower_radio.setChecked(True) self._lower_radio.setEnabled(False) self._upper_radio.setEnabled(False) rename_mult_layout.addWidget(self._lower_radio) rename_mult_layout.addWidget(self._upper_radio) rename_mult_layout.addWidget(self._frame_btn) self.main_layout.addLayout(dividers.DividerLayout()) side_layout = layouts.HorizontalLayout(spacing=2, margins=(0, 0, 0, 0)) side_layout.setAlignment(Qt.AlignLeft) self.main_layout.addLayout(side_layout) self._side_cbx = checkbox.BaseCheckBox(parent=self) self._side_cbx.setChecked(True) side_layout.addWidget(self._side_cbx) self._side_lbl = label.BaseLabel('Side: ', parent=self) self._none_side = buttons.BaseRadioButton('None', parent=self) self._right_side = buttons.BaseRadioButton('Right', parent=self) self._center_side = buttons.BaseRadioButton('Center', parent=self) self._mid_side = buttons.BaseRadioButton('Mid', parent=self) self._left_side = buttons.BaseRadioButton('Left', parent=self) self._none_side.setFixedHeight(15) self._right_side.setFixedHeight(15) self._center_side.setFixedHeight(15) self._mid_side.setFixedHeight(15) self._left_side.setFixedHeight(15) side_layout.addWidget(self._side_lbl) side_layout.addWidget(self._none_side) side_layout.addWidget(self._right_side) side_layout.addWidget(self._center_side) side_layout.addWidget(self._mid_side) side_layout.addWidget(self._left_side) self._none_side.setAutoExclusive(True) self._right_side.setAutoExclusive(True) self._center_side.setAutoExclusive(True) self._mid_side.setAutoExclusive(True) self._left_side.setAutoExclusive(True) self._none_side.setChecked(True) self._capital_side = checkbox.BaseCheckBox('Capital?', parent=self) self._side_btn = buttons.BaseButton(parent=self) self._side_btn.setIcon(resources.icon('font_size')) side_layout.addStretch() side_layout.addWidget(self._capital_side) side_layout.addStretch() side_layout.addWidget(self._side_btn)