def _make_new_row(self, row_label, row_meta=None): if row_label in self._grid_map.keys(): self._update(row_label - 1, "insert") row_widget = qtw.QWidget() # TODO: Use QListWidget??? # https://www.qtcentre.org/threads/33443-how-to-insert-one-widget-between-another-two-widgets-ina-a-list-of-widgets) row_widget.setLayout(qtw.QBoxLayout(qtw.QBoxLayout.LeftToRight)) info_widget = qtw.QWidget() info_widget.setLayout(qtw.QBoxLayout(qtw.QBoxLayout.TopToBottom)) info_widget.layout().addWidget(qtw.QLabel(str(row_label))) row_widget.layout().addWidget(info_widget) # row_widget.layout().addStretch() self.layout_grid.insertWidget(row_label, row_widget) self._grid_map[row_label] = { "widget": row_widget, "row_meta": row_meta, "col_meta": [], "image_buttons": [] } for i in range(self.layout_grid.count()): r = self.layout_grid.itemAt(i)
def layoutUI(self): topLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) topLayout.addWidget(QtWidgets.QLabel("Snap Target : ")) topLayout.addWidget(self.lineEdit) topLayout.addWidget(self.setButton) modeLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) modeLayout.addWidget(QtWidgets.QLabel("Snap Mode : ")) modeLayout.addWidget(self.vertexMode) modeLayout.addWidget(self.normalMode) modeLayout.addWidget(self.surfaceMode) distLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) distLayout.addWidget(QtWidgets.QLabel("Max Search Radius : ")) distLayout.addWidget(self.distanceLE) distLayout.addWidget(self.distanceLock) cvLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) cvLayout.addWidget(self.customVectorCheck) cvLayout.addWidget(self.customVectorX) cvLayout.addWidget(self.customVectorY) cvLayout.addWidget(self.customVectorZ) cvLayout.addWidget(self.tbdCheckBox) mainLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom) mainLayout.addLayout(topLayout) mainLayout.addLayout(modeLayout) mainLayout.addLayout(distLayout) mainLayout.addLayout(cvLayout) mainLayout.addWidget(self.snapButton) self.setLayout(mainLayout)
def createUI(self): layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) layout.setContentsMargins(0, 0, 0, 0) layout.setSpacing(0) layout.setAlignment(QtCore.Qt.AlignTop) self.frame = framelayout.FrameLayout(self.checker.name) if not self.checker.isEnabled: self.setEnabled(False) self.checkButton = QtWidgets.QPushButton("Check") # self.checkButton.setSizePolicy( # QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Expanding) self.checkButton.clicked.connect(self.check) self.fixButton = QtWidgets.QPushButton("Fix") self.fixButton.clicked.connect(self.fix) if self.checker.isFixable is not True: self.fixButton.setEnabled(False) buttonLayout = QtWidgets.QHBoxLayout() buttonLayout.addWidget(self.checkButton) buttonLayout.addWidget(self.fixButton) self.errorList = QtWidgets.QListWidget() self.errorList.itemClicked.connect(self.errorSelected) self.frame.addWidget(self.errorList) self.frame.addLayout(buttonLayout) layout.addWidget(self.frame) self.setLayout(layout)
def layoutUI(self): """ Layout widgets """ mainLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom) mainLayout.addWidget(self.tabWidget) self.setLayout(mainLayout)
def __init__(self): super().__init__() self.word = 'Naturaleza' self.time_text = '5 minutos' self.hello = ['Hola Mundo', 'Hello World'] self.button = QtWidgets.QPushButton('GUARDAR') self.text1 = QtWidgets.QLabel('Imagenes Sobre:') self.textbox1 = QtWidgets.QLineEdit(self) self.textbox1.setPlaceholderText(self.word) self.text2 = QtWidgets.QLabel('Cambiar cada:') self.combobox1 = QtWidgets.QComboBox(self) for time in TIMES: self.combobox1.addItem(time['text']) self.combobox1.currentIndexChanged.connect( self.selectionCombobox1Change ) self.layout = QtWidgets.QBoxLayout( QtWidgets.QBoxLayout.Direction.TopToBottom ) self.layout.addWidget(self.text1) self.layout.addWidget(self.textbox1) self.layout.addWidget(self.text2) self.layout.addWidget(self.combobox1) self.layout.addWidget(self.button) self.setLayout(self.layout) self.button.clicked.connect(self.save)
def createUI(self): """ docstring """ self.cmdsLE = CustomQLineEdit(self) self.cmdsLE.setPlaceholderText("Search") self.cmdsLE.setFixedHeight(30) self.cmdsView = CustomQTableView() self.cmdsView.setVisible(False) self.cmdsView.setModel(self.filteredModel) self.cmdsView.horizontalHeader().resizeSection(0, 250) self.historyView = CustomQTableView() self.historyView.setVisible(False) self.historyView.setModel(self.historyModel) self.historyView.horizontalHeader().resizeSection(0, 250) # Layout self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom) self.layout.addWidget(self.cmdsLE) self.layout.addWidget(self.cmdsView) self.layout.addWidget(self.historyView) self.layout.setSpacing(10) self.setLayout(self.layout) self.cmdsLE.textEdited.connect(self.showCompleter) self.cmdsLE.returnPressed.connect(self.execute) self.cmdsLE.escPressed.connect(self.close) self.cmdsLE.tabPressed.connect(self.complete) self.cmdsLE.backtabPressed.connect(self.complete) self.cmdsLE.arrowPressed.connect(self.arrowPressed) self.cmdsLE.setFocus()
def __init__(self, parent: TopWindow): super().__init__(parent) self.browser = qw.QTextBrowser() layout = qw.QBoxLayout(qw.QBoxLayout.TopToBottom) layout.addWidget(self.browser) self.setLayout(layout) return
def __init__(self, parent: TopWindow): super().__init__(parent) self.label = qw.QLabel() layout = qw.QBoxLayout(qw.QBoxLayout.TopToBottom) layout.addWidget(self.label) self.setLayout(layout) return
def __init__(self, parent=None): super().__init__(parent) self.object_collection: typing.Dict[int, object] = dict() self.title_label = qw.QLabel( '<p><font size="4">Swabian Time Tagger for Mac</font></p>') self.title_label.setAlignment(qc.Qt.AlignCenter) self.open_python_shell = qw.QPushButton( "Open Python interactive shell") self.run_python_file = qw.QPushButton("Run Python file") self.open_python_project = qw.QPushButton("Open Python project") self.open_web_application = qw.QPushButton("Open web application") window = qw.QWidget() layout = qw.QBoxLayout(qw.QBoxLayout.TopToBottom) layout.addWidget(self.title_label) layout.addWidget(self.open_python_shell) layout.addWidget(self.run_python_file) layout.addWidget(self.open_python_project) layout.addWidget(self.open_web_application) window.setLayout(layout) self.setCentralWidget(window) mbar = self.menuBar() self.file_menu = mbar.addMenu("File") self.build_action = qw.QAction("Build", self) self.file_menu.addAction(self.build_action) self.build_action.setShortcut("Ctrl+B") self.move(100, 100)
def multiLabelLayout(names, widget, groupLabel='', dir='horizontal', parent=None, *args, **kws): dirDict = { 'horizontal': QtWidgets.QBoxLayout.LeftToRight, 'vertical': QtWidgets.QBoxLayout.TopToBottom } layout = QtWidgets.QBoxLayout(dirDict[dir]) if groupLabel: label = QtWidgets.QLabel(groupLabel) layout.addWidget(label) widgets = [] for name in names: sublayout = QtWidgets.QHBoxLayout() sublabel = QtWidgets.QLabel(name) createWidget = widget(*args, **kws) sublayout.addWidget(sublabel) sublayout.addWidget(createWidget) layout.addLayout(sublayout) widgets.append(createWidget) if parent: parent.setSpacing(2) # parent.setStretch(0,1) parent.addLayout(layout) return tuple(widgets) else: return (tuple(widgets), layout)
def __init__(self, parent=None): super(self.__class__, self).__init__(parent) self.frame_list = FrameListView() globals()['FrameListView'] = self.frame_list self.label = AnimationLabel() globals()['AnimationLabel'] = self.label layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) layout.addWidget(self.label) layout.addWidget(self.frame_list) self.setLayout(layout)
def setupUi(self, Form): Form.setObjectName("Player") Form.resize(640, 480) self.horizontalLayout = QtWidgets.QVBoxLayout(Form) self.horizontalLayout.setObjectName("horizontalLayout") # label self.label = QtWidgets.QLabel(Form) self.label.setLayoutDirection(QtCore.Qt.LeftToRight) self.label.setTextFormat(QtCore.Qt.PlainText) self.label.setScaledContents(False) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.label.setStyleSheet("Background-color: #000;") self.horizontalLayout.addWidget(self.label) self.button = QtWidgets.QPushButton(Form) self.button.setText("open") self.button.name = "open" self.horizontalLayout.addWidget(self.button) # tool bar self.toolLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) self.toolLayout.setContentsMargins(0,0,0,0) self.toolbar = QtWidgets.QToolBar() self.toolLayout.addWidget(self.toolbar) self.playAction = QtWidgets.QAction("&Play",self) self.playAction.setIcon(QtGui.QIcon("icon/play.png")) self.toolbar.addAction(self.playAction) self.pauseAction = QtWidgets.QAction("&Pause",self) self.pauseAction.setIcon(QtGui.QIcon("icon/pause.png")) self.toolbar.addAction(self.pauseAction) self.stopAction = QtWidgets.QAction("&Stop", self) self.stopAction.setIcon(QtGui.QIcon("icon/stop.png")) self.toolbar.addAction(self.stopAction) self.horizontalLayout.addLayout(self.toolLayout) self.th = Thread(self) self.th.changePixmap.connect(lambda p: self.setPixMap(p)) self.button.clicked.connect(self.buttonClicked) self.playAction.triggered.connect(self.actionTriggered) self.pauseAction.triggered.connect(self.actionTriggered) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self, node, parent=None): super(TypeAnimTextWidget, self).__init__(parent) self.node = node self.listWidget = AnimTextQTreeWidgetExtend(node) self.listWidget.setItemDelegate(MyDelegate(self)) self.setMinimumWidth(360) self.setMinimumHeight(103) self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom, self) self.layout.setContentsMargins(5,3,11,3) self.layout.setSpacing(5) self.layout.addWidget(self.listWidget) self.listWidget.updateContent()
def __init__(self, node, wantedType, attr, sourceAttr, postCmd, parent=None): super(AETN_SingleInputQtWidget, self).__init__(parent) self.node = node self.dropZone = AETN_QLineEditExtend(wantedType, node, attr, sourceAttr, postCmd) self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom, self) self.layout.setContentsMargins(5, 3, 11, 3) self.layout.setSpacing(5) self.layout.addWidget(self.dropZone)
def __init__(self, node, parent=None): ''' Initialize ''' super(AEwedgeCustomActionTemplate, self).__init__(parent) self.node = node ######################################################################## #Widgets ######################################################################## self.strAttr = ListWidget(node, 'connectedWedgeActions', label='', parent=self) buttonHeight = 30 self.upButton = QtWidgets.QPushButton('Move Up') self.upButton.setMinimumHeight(buttonHeight) self.upButton.setMaximumHeight(buttonHeight) self.upButton.clicked.connect(self.moveUp) self.downButton = QtWidgets.QPushButton('Move Down') self.downButton.setMinimumHeight(buttonHeight) self.downButton.setMaximumHeight(buttonHeight) self.downButton.clicked.connect(self.moveDown) self.deleteButton = QtWidgets.QPushButton('Delete Action') self.deleteButton.setMinimumHeight(buttonHeight) self.deleteButton.setMaximumHeight(buttonHeight) self.deleteButton.clicked.connect(self.deleteAction) self.createButton = QtWidgets.QPushButton('Create Action') self.createButton.setMinimumHeight(buttonHeight) self.createButton.setMaximumHeight(buttonHeight) self.createButton.clicked.connect(self.createAction) ######################################################################## #Layout ######################################################################## self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom, self) self.layout.setContentsMargins(5,3,11,3) self.layout.setSpacing(5) self.layout.addWidget(self.strAttr) self.buttonLayout = QtWidgets.QHBoxLayout(self) self.buttonLayout.addWidget(self.upButton) self.buttonLayout.addWidget(self.downButton) self.buttonLayout.addWidget(self.deleteButton) self.buttonLayout.addWidget(self.createButton) self.layout.addLayout(self.buttonLayout)
def createUI(self): layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) self.checkButton = QtWidgets.QPushButton(self.checker.checkLabel) self.checkButton.setSizePolicy( QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Expanding) self.checkButton.setMinimumWidth(150) self.checkButton.clicked.connect(self.check) self.errorList = QtWidgets.QListWidget() self.errorList.itemClicked.connect(self.errorSelected) layout.addWidget(self.checkButton) layout.addWidget(self.errorList) self.setLayout(layout)
def __init__(self): super().__init__() controller = SemController() corrector = SemCorrector(controller) imageViewer = SemImageViewer() imageViewer.sem = controller tab = QtWidgets.QTabWidget() tab.addTab(ObjectInspector(controller), 'Controller') tab.addTab(ObjectInspector(corrector), 'Corrector') tab.addTab(ObjectInspector(imageViewer), 'Image Viewer') layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom, self) layout.addWidget(tab) self.setMinimumSize(512, 512) self.setWindowTitle('SemTool')
def __init__(self, parent=None): """ Init """ super(Content, self).__init__(parent) self.button1 = QtWidgets.QPushButton("button1") self.button2 = QtWidgets.QPushButton("button2") self.le = QtWidgets.QLineEdit("lineedit") self.textEdit = QtWidgets.QTextEdit("text edit") layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom) layout.addWidget(self.button1) layout.addWidget(self.button2) layout.addWidget(self.le) layout.addWidget(self.textEdit) self.setLayout(layout)
def __init__(self, node, attr, label='', parent=None): ''' Initialize @type node: str @param node: The name of the node that this widget should start with. @type attr: str @param attr: The name of the attribute this widget is responsible for. @type label: str @param label: The text that should be displayed in the descriptive label. ''' super(BaseAttrWidget, self).__init__(parent) self.node = node #: Store the node name self.attr = attr #: Store the attribute name #: This will store information about the scriptJob that we will create #: so that we can update this widget whenever its attribute is updated #: separately. self.sj = None #: Use this variable to track whether the gui is currently being updated #: or not. self.updatingGUI = False self.forceUpdateGUI = False ######################################################################## #Widgets ######################################################################## #: The QLabel widget with the name of the attribute if label: self.label = QtWidgets.QLabel(label if label else attr, parent=self) ######################################################################## #Layout ######################################################################## self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self) self.layout.setContentsMargins(0,0,0,0) self.layout.setSpacing(5) if label: self.layout.addWidget(self.label)
def __init__(self, parent=getMayaWindow()): super(GUI, self).__init__(parent) self.windowName = "Dupcalite along curve" if cmds.window(self.windowName, q=True, ex=True): cmds.deleteUI(self.windowName) self.setObjectName(self.windowName) self.setWindowTitle(self.windowName) self.setWindowFlags(QtCore.Qt.Tool) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.surfaceLE = QtWidgets.QLineEdit("|test") self.surfaceSetButton = QtWidgets.QPushButton("set surface") self.surfaceSetButton.clicked.connect(self.setSurface) self.rivetLE = QtWidgets.QLineEdit("|rivet_GEP") self.rivetSetButton = QtWidgets.QPushButton("set rivet") self.rivetSetButton.clicked.connect(self.setRivet) self.intervalLE = QtWidgets.QLineEdit("0.2") self.randomLE = QtWidgets.QLineEdit("0.005") self.doButton = QtWidgets.QPushButton("Do it") self.doButton.clicked.connect(self.doIt) columnLayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom) columnLayout.addWidget(QtWidgets.QLabel("Surface")) columnLayout.addWidget(self.surfaceSetButton) columnLayout.addWidget(self.surfaceLE) columnLayout.addWidget(QtWidgets.QLabel("Rivet")) columnLayout.addWidget(self.rivetSetButton) columnLayout.addWidget(self.rivetLE) columnLayout.addWidget(QtWidgets.QLabel("Interval")) columnLayout.addWidget(self.intervalLE) columnLayout.addWidget(QtWidgets.QLabel("Randomness")) columnLayout.addWidget(self.randomLE) columnLayout.addWidget(self.doButton) self.setLayout(columnLayout)
def __init__(self, tabWidget): super(TabRenameDialog, self).__init__(parent=tabWidget) global tabRenameDialog try: tabRenameDialog.close() tabRenameDialog.deleteLater() except: pass self.setWindowTitle('Rename Tab') self.tabWidget = tabWidget self.nameLE = QtWidgets.QLineEdit('NewName', parent=self) self.renameBtn = QtWidgets.QPushButton('Rename', parent=self) self.closeBtn = QtWidgets.QPushButton('Close', parent=self) self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self) self.layout.addWidget(self.nameLE) self.layout.addWidget(self.renameBtn) self.layout.addWidget(self.closeBtn) self.connections()
def __init__(self, parent = None): QtWidgets.QMainWindow.__init__(self, parent) #self.resize(800,600) self.frame1 = QCILViewerWidget(viewer=viewer2D, shape=(600,600), interactorStyle=vlink.Linked2DInteractorStyle) self.frame2 = QCILViewerWidget(viewer=viewer2D, shape=(600,600), interactorStyle=vlink.Linked2DInteractorStyle) # Initially link viewers self.linkedViewersSetup() self.linker.enable() layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight) layout.addWidget(self.frame1) layout.addWidget(self.frame2) cw = QtWidgets.QWidget() cw.setLayout(layout) self.setCentralWidget(cw) self.central_widget = cw self.show()
def __init__(self, node, parent=None): ''' Initialize ''' super(AEuselessTransformTemplate, self).__init__(parent) self.node = node ######################################################################## #Widgets ######################################################################## #: Store the widget that will display/update the stringAttr attribute self.strAttr = StrWidget(node, 'stringAttr', label='TXT:', parent=self) #: Store the widget that will display/update the enumAttr attribute self.enumAttr = EnumWidget(node, 'enumAttr', label='Enumerated:', enums=[ 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine' ], parent=self) #: Store the widget that will display/update the numAttr attribute self.numAttr = NumWidget(node, 'numAttr', label='NUM:', parent=self) ######################################################################## #Layout ######################################################################## self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom, self) self.layout.setContentsMargins(5, 3, 11, 3) self.layout.setSpacing(5) self.layout.addWidget(self.strAttr) self.layout.addWidget(self.enumAttr) self.layout.addWidget(self.numAttr)
def __init__(self, tabWidget, UIInatance): super(TabDeleteDialog, self).__init__(parent=tabWidget) global tabDeleteDialog try: tabDeleteDialog.close() tabDeleteDialog.deleteLater() except: pass self.setWindowTitle('Delete Tab') self.tabWidget = tabWidget self.UIInatance = UIInatance self.warningLabel = QtWidgets.QLabel( 'Are you sure to delete current tab?') self.okBtn = QtWidgets.QPushButton('OK', parent=self) self.closeBtn = QtWidgets.QPushButton('Close', parent=self) self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self) self.layout.addWidget(self.warningLabel) self.layout.addWidget(self.okBtn) self.layout.addWidget(self.closeBtn) self.connections()
def __init__(self, track_id, instance_id, frame_id, x1, y1, x2, y2, meta, parent=None, image: np.ndarray = None, width=320, height=320): super().__init__(parent=parent) self.track_id = track_id self.frame_id = frame_id self.x1 = x1 self.y1 = y1 self.x2 = x2 self.y2 = y2 self.meta = meta image_btn = QPushImageButton() info_label = qtw.QLabel() image_btn.left_clicked.connect(self._left_clicked) image_btn.right_clicked.connect(self._right_clicked) self.setLayout(qtw.QBoxLayout(qtw.QBoxLayout.TopToBottom)) self.layout().setSpacing(1) self.layout().addWidget(image_btn) self.layout().addWidget(info_label) if image is None: image = np.zeros([height, width, 3], dtype=np.uint8) self.set_np(image) self.set_instance_id(instance_id)
def __init__(self, parent=getMayaWindow()): super(bSkinSaverUI, self).__init__(parent, QtCore.Qt.WindowStaysOnTopHint) tab_widget = QtWidgets.QTabWidget() objectsTab = QtWidgets.QWidget() verticesTab = QtWidgets.QWidget() tab_widget.addTab(objectsTab, "Objects") tab_widget.addTab(verticesTab, "Vertices") self.descLabel = QtWidgets.QLabel("(C) 2015 by Thomas Bittner", parent=self) self.setWindowTitle('bSkinSaver 1.1') self.objectsFileLine = QtWidgets.QLineEdit( '/Users/thomas/default.weights', parent=self) self.selectObjectsFileButton = QtWidgets.QPushButton("Set File", parent=self) self.saveObjectsButton = QtWidgets.QPushButton( "Save Weights from selected Objects", parent=self) self.loadObjectsButton = QtWidgets.QPushButton("Load", parent=self) self.loadObjectsSelectionButton = QtWidgets.QPushButton( "Load to Selected Object", parent=self) objectsLayout = QtWidgets.QVBoxLayout(objectsTab) objectsLayout.setAlignment(QtCore.Qt.AlignTop) objectsLayout.setSpacing(3) objectsFileLayout = QtWidgets.QBoxLayout( QtWidgets.QBoxLayout.LeftToRight) objectsFileLayout.addWidget(self.objectsFileLine) objectsFileLayout.addWidget(self.selectObjectsFileButton) objectsLayout.addLayout(objectsFileLayout) objectsButtonLayout = QtWidgets.QBoxLayout( QtWidgets.QBoxLayout.TopToBottom) objectsButtonLayout.setSpacing(0) objectsButtonLayout.addWidget(self.saveObjectsButton) objectsButtonLayout.addWidget(self.loadObjectsButton) objectsButtonLayout.addWidget(self.loadObjectsSelectionButton) objectsLayout.addLayout(objectsButtonLayout) self.verticesFileLine = QtWidgets.QLineEdit( '/Users/thomas/defaultVertex.weights', parent=self) self.selectVerticesFileButton = QtWidgets.QPushButton("Set File", parent=self) self.saveVerticesButton = QtWidgets.QPushButton( "Save Weights from selected Vertices", parent=self) self.loadVerticesButton = QtWidgets.QPushButton( "Load onto selected Object", parent=self) self.ignoreSoftSelectionWhenSaving = QtWidgets.QCheckBox( "Ignore Soft Selection when Saving", parent=self) self.ignoreJointLocksWhenLoading = QtWidgets.QCheckBox( "Ignore Joint Locks when Loading", parent=self) verticesLayout = QtWidgets.QVBoxLayout(verticesTab) verticesLayout.setAlignment(QtCore.Qt.AlignTop) verticesLayout.setSpacing(3) verticesFileLayout = QtWidgets.QBoxLayout( QtWidgets.QBoxLayout.LeftToRight) verticesFileLayout.addWidget(self.verticesFileLine) verticesFileLayout.addWidget(self.selectVerticesFileButton) verticesLayout.addLayout(verticesFileLayout) verticesButtonLayout = QtWidgets.QBoxLayout( QtWidgets.QBoxLayout.TopToBottom) verticesButtonLayout.setSpacing(0) verticesButtonLayout.addWidget(self.saveVerticesButton) verticesButtonLayout.addWidget(self.loadVerticesButton) verticesButtonLayout.addWidget(self.ignoreSoftSelectionWhenSaving) verticesButtonLayout.addWidget(self.ignoreJointLocksWhenLoading) verticesLayout.addLayout(verticesButtonLayout) self.layout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.TopToBottom, self) self.layout.addWidget(tab_widget) self.layout.addWidget(self.descLabel) self.resize(400, 10) #select files self.connect(self.selectObjectsFileButton, QtCore.SIGNAL("clicked()"), self.selectObjectsFile) self.connect(self.selectVerticesFileButton, QtCore.SIGNAL("clicked()"), self.selectVerticesFile) self.connect(self.saveObjectsButton, QtCore.SIGNAL("clicked()"), self.saveObjects) self.connect(self.loadObjectsButton, QtCore.SIGNAL("clicked()"), self.loadObjects) self.connect(self.loadObjectsSelectionButton, QtCore.SIGNAL("clicked()"), self.loadObjectsSelection) self.connect(self.saveVerticesButton, QtCore.SIGNAL("clicked()"), self.saveVertices) self.connect(self.loadVerticesButton, QtCore.SIGNAL("clicked()"), self.loadVertices)
def _set_layouts(self): self.layout_main = qtw.QVBoxLayout() self.layout_grid = qtw.QBoxLayout(qtw.QBoxLayout.TopToBottom)