Python PySide2.QtWidgets.QRadioButton() Examples
The following are 5
code examples of PySide2.QtWidgets.QRadioButton().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PySide2.QtWidgets
, or try the search function
.
Example #1
Source File: ToolBox.py From PyAero with MIT License | 5 votes |
def itemContourAnalysis(self): box = QtWidgets.QVBoxLayout() vlayout = QtWidgets.QVBoxLayout() gb = QtWidgets.QGroupBox('Select contour to analyze') self.b1 = QtWidgets.QRadioButton('Original') self.b2 = QtWidgets.QRadioButton('Refined') self.b2.setChecked(True) vlayout.addWidget(self.b1) vlayout.addWidget(self.b2) gb.setLayout(vlayout) box.addWidget(gb) vlayout = QtWidgets.QVBoxLayout() self.cgb = QtWidgets.QGroupBox('Select plot quantity') self.cpb1 = QtWidgets.QRadioButton('Gradient') self.cpb2 = QtWidgets.QRadioButton('Curvature') self.cpb3 = QtWidgets.QRadioButton('Radius of Curvature') self.cpb1.setChecked(True) vlayout.addWidget(self.cpb1) vlayout.addWidget(self.cpb2) vlayout.addWidget(self.cpb3) self.cgb.setLayout(vlayout) self.cgb.setEnabled(False) box.addWidget(self.cgb) analyzeButton = QtWidgets.QPushButton('Analyze Contour') analyzeButton.setGeometry(10, 10, 200, 50) box.addWidget(analyzeButton) box.addStretch(1) self.item_ca = QtWidgets.QWidget() self.item_ca.setLayout(box) analyzeButton.clicked.connect(self.analyzeAirfoil)
Example #2
Source File: export_depth_maps_dialog.py From metashape-scripts with MIT License | 5 votes |
def __init__ (self, parent): QtWidgets.QDialog.__init__(self, parent) self.setWindowTitle("Export depth maps") self.btnQuit = QtWidgets.QPushButton("&Close") self.btnP1 = QtWidgets.QPushButton("&Export") self.pBar = QtWidgets.QProgressBar() self.pBar.setTextVisible(False) # self.selTxt =QtWidgets.QLabel() # self.selTxt.setText("Apply to:") self.radioBtn_all = QtWidgets.QRadioButton("Apply to all cameras") self.radioBtn_sel = QtWidgets.QRadioButton("Apply to selected") self.radioBtn_all.setChecked(True) self.radioBtn_sel.setChecked(False) self.formTxt = QtWidgets.QLabel() self.formTxt.setText("Export format:") self.formCmb = QtWidgets.QComboBox() self.formCmb.addItem("1-band F32") self.formCmb.addItem("Grayscale 8-bit") self.formCmb.addItem("Grayscale 16-bit") # creating layout layout = QtWidgets.QGridLayout() layout.setSpacing(10) layout.addWidget(self.radioBtn_all, 0, 0) layout.addWidget(self.radioBtn_sel, 1, 0) layout.addWidget(self.formTxt, 0, 1) layout.addWidget(self.formCmb, 1, 1) layout.addWidget(self.btnP1, 2, 0) layout.addWidget(self.btnQuit, 2, 1) layout.addWidget(self.pBar, 3, 0, 1, 2) self.setLayout(layout) QtCore.QObject.connect(self.btnP1, QtCore.SIGNAL("clicked()"), self.export_depth) QtCore.QObject.connect(self.btnQuit, QtCore.SIGNAL("clicked()"), self, QtCore.SLOT("reject()")) self.exec()
Example #3
Source File: data_editor.py From randovania with GNU General Public License v3.0 | 5 votes |
def on_select_area(self): for node in self.radio_button_to_node.keys(): node.deleteLater() self.radio_button_to_node.clear() current_area = self.current_area if not current_area: self.new_node_button.setEnabled(False) self.delete_node_button.setEnabled(False) return is_first = True for node in sorted(current_area.nodes, key=lambda x: x.name): button = QRadioButton(self.points_of_interest_group) button.setText(node.name) self.radio_button_to_node[button] = node if is_first: self.selected_node_button = button button.setChecked(is_first) button.toggled.connect(self.on_select_node) is_first = False self.verticalLayout.addWidget(button) self.new_node_button.setEnabled(True) self.delete_node_button.setEnabled(len(current_area.nodes) > 1) self.update_selected_node()
Example #4
Source File: main.py From DeepCreamPy with GNU Affero General Public License v3.0 | 5 votes |
def decensorClicked(self): self.decensorButton.setEnabled(False) self.progressMessage.clear() self.progressCursor.insertText("Decensoring has begun!\n") # for now, decensor is initiated when this app is started # self.decensor = Decensor(text_edit = self.progressMessage, text_cursor = self.progressCursor, ui_mode = True) #https://stackoverflow.com/questions/42349470/pyqt-find-checked-radiobutton-in-a-group #set decensor to right settings #censor type censorTypeElements = self.censorTypeGroupBox.children() censorButtons = [elem for elem in censorTypeElements if isinstance(elem, QRadioButton)] for cb in censorButtons: if cb.isChecked(): censorType = cb.text() if censorType == 'Bar censor': self.decensor.is_mosaic = False else: self.decensor.is_mosaic = True #variations count variationsElements = self.variationsGroupBox.children() variationsButtons = [elem for elem in variationsElements if isinstance(elem, QRadioButton)] for vb in variationsButtons: if vb.isChecked(): variations = int(vb.text()) self.decensor.variations = variations self.decensorButton.setEnabled(False) self.decensor.start() # decensor.decensor_all_images_in_folder() # #centers the main window
Example #5
Source File: dialog.py From hotbox_designer with BSD 3-Clause Clear License | 4 votes |
def __init__(self, hotboxes, parent=None): super(CreateHotboxDialog, self).__init__(parent) self.setWindowTitle("Create new hotbox") self.hotboxes = hotboxes self.new = QtWidgets.QRadioButton("empty hotbox") self.duplicate = QtWidgets.QRadioButton("duplicate existing hotbox") self.duplicate.setEnabled(bool(self.hotboxes)) self.template = QtWidgets.QRadioButton("from template") self.groupbutton = QtWidgets.QButtonGroup() self.groupbutton.addButton(self.new, 0) self.groupbutton.addButton(self.duplicate, 1) self.groupbutton.addButton(self.template, 2) self.new.setChecked(True) self.existing = QtWidgets.QComboBox() self.existing.addItems([hb['general']['name'] for hb in self.hotboxes]) self.template_combo = QtWidgets.QComboBox() items = [hb['general']['name'] for hb in load_templates()] self.template_combo.addItems(items) self.up_layout = QtWidgets.QGridLayout() self.up_layout.setContentsMargins(0, 0, 0, 0) self.up_layout.setSpacing(0) self.up_layout.addWidget(self.new, 0, 0) self.up_layout.addWidget(self.duplicate, 1, 0) self.up_layout.addWidget(self.existing, 1, 1) self.up_layout.addWidget(self.template, 2, 0) self.up_layout.addWidget(self.template_combo, 2, 1) self.ok = QtWidgets.QPushButton('ok') self.ok.released.connect(self.accept) self.cancel = QtWidgets.QPushButton('cancel') self.cancel.released.connect(self.reject) self.down_layout = QtWidgets.QHBoxLayout() self.down_layout.setContentsMargins(0, 0, 0, 0) self.down_layout.addStretch(1) self.down_layout.addWidget(self.ok) self.down_layout.addWidget(self.cancel) self.layout = QtWidgets.QVBoxLayout(self) self.layout.setSpacing(12) self.layout.addLayout(self.up_layout) self.layout.addLayout(self.down_layout)