Python PyQt5.QtCore.Qt.Unchecked() Examples
The following are 30
code examples of PyQt5.QtCore.Qt.Unchecked().
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
PyQt5.QtCore.Qt
, or try the search function
.
Example #1
Source File: ClearLWT.py From tdm with GNU General Public License v3.0 | 10 votes |
def __init__(self, env, *args, **kwargs): super(ClearLWTDialog, self).__init__(*args, **kwargs) self.setWindowTitle("Clear obsolete retained LWTs") self.setMinimumSize(QSize(320, 480)) self.env = env vl = VLayout() sel_btns = QDialogButtonBox() sel_btns.setCenterButtons(True) btnSelAll = sel_btns.addButton("Select all", QDialogButtonBox.ActionRole) btnSelNone = sel_btns.addButton("Select none", QDialogButtonBox.ActionRole) self.lw = QListWidget() for lwt in self.env.lwts: itm = QListWidgetItem(lwt) itm.setCheckState(Qt.Unchecked) self.lw.addItem(itm) btnSelAll.clicked.connect(lambda: self.select(Qt.Checked)) btnSelNone.clicked.connect(lambda: self.select(Qt.Unchecked)) btns = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Close) btns.accepted.connect(self.accept) btns.rejected.connect(self.reject) vl.addWidgets([sel_btns, self.lw, btns]) self.setLayout(vl)
Example #2
Source File: parameter_tree.py From Grabber with GNU General Public License v3.0 | 7 votes |
def check_dependency(self, item: QTreeWidgetItem): """ Looks for mentioned dependents, and enables/disables those depending on checkstate. :param item: changed item from QTreeWidget (paramTree) :type item: QTreeWidget """ if item.data(0, 33) == 0 and item.data(0, 37): for i in item.data(0, 37): if item.checkState(0) == Qt.Unchecked: self.blockSignals(True) i.setDisabled(True) i.setExpanded(False) self.blockSignals(False) i.setCheckState(0, Qt.Unchecked) else: self.blockSignals(True) i.setDisabled(False) self.blockSignals(False)
Example #3
Source File: qt.py From mint-amazon-tagger with GNU General Public License v3.0 | 6 votes |
def data(self, index, role): if not index.isValid(): return None if index.column() == 0: value = ('' if self.my_data[index.row()][index.column() + 1] else 'Skip') else: value = self.my_data[index.row()][index.column() + 1] if role == Qt.EditRole: return value elif role == Qt.DisplayRole: return value elif role == Qt.CheckStateRole: if index.column() == 0: return ( Qt.Checked if self.my_data[index.row()][index.column() + 1] else Qt.Unchecked)
Example #4
Source File: tabmodel_z5.py From python101 with MIT License | 6 votes |
def data(self, index, rola=Qt.DisplayRole): """ Wyświetlanie danych """ i = index.row() j = index.column() if rola == Qt.DisplayRole: return '{0}'.format(self.tabela[i][j]) elif rola == Qt.CheckStateRole and (j == 3 or j == 4): if self.tabela[i][j]: return Qt.Checked else: return Qt.Unchecked elif rola == Qt.EditRole and j == 1: return self.tabela[i][j] else: return QVariant()
Example #5
Source File: tabmodel_z6.py From python101 with MIT License | 6 votes |
def data(self, index, rola=Qt.DisplayRole): """ Wyświetlanie danych """ i = index.row() j = index.column() if rola == Qt.DisplayRole: return '{0}'.format(self.tabela[i][j]) elif rola == Qt.CheckStateRole and (j == 3 or j == 4): if self.tabela[i][j]: return Qt.Checked else: return Qt.Unchecked elif rola == Qt.EditRole and j == 1: return self.tabela[i][j] else: return QVariant()
Example #6
Source File: ParticipantListModel.py From urh with GNU General Public License v3.0 | 6 votes |
def data(self, index: QModelIndex, role=None): row = index.row() if role == Qt.DisplayRole: if row == 0: return "not assigned" else: try: return str(self.participants[row-1]) except IndexError: return None elif role == Qt.CheckStateRole: if row == 0: return Qt.Checked if self.show_unassigned else Qt.Unchecked else: try: return Qt.Checked if self.participants[row-1].show else Qt.Unchecked except IndexError: return None
Example #7
Source File: plugin.py From qgis-versioning with GNU General Public License v2.0 | 6 votes |
def enable_diffmode(self): '''This function enables the diffmode checkbox iif the number of checked revision == 2. The reason is that we want to apply diff styles to features only between two revisions. When the checkbox is enabled, users can check it. If it was checked at one point and the number of selected revisions != 2, then it is unchecked and disabled. Intended use in : versioning.view ''' # print("in enable_diffmode") nb_checked_revs = 0 for i in range(self.q_view_dlg.tblw.rowCount()): # check if tblw.item(0,0) is not None (bug with Qt slots ?) if self.q_view_dlg.tblw.item(0, 0): if self.q_view_dlg.tblw.item(i, 0).checkState(): nb_checked_revs += 1 else: return if nb_checked_revs == 2: self.q_view_dlg.diffmode_chk.setEnabled(True) else: self.q_view_dlg.diffmode_chk.setCheckState(Qt.Unchecked) self.q_view_dlg.diffmode_chk.setEnabled(False)
Example #8
Source File: main.py From qkit with GNU General Public License v2.0 | 6 votes |
def _remove_plot_widgets(self, closeAll = False): # helper func to close widgets def close_ds(ds): if ds in self.open_ds: window_id = self.open_ds[ds] window_id.setCheckState(0,Qt.Unchecked) # make sure data is consitent if str(window_id) in self.open_plots: self.open_plots[str(window_id)].deleteLater() self.open_plots.pop(str(window_id)) if ds in self.open_ds: self.open_ds.pop(ds) if closeAll: for ds in list(self.open_ds.keys()): close_ds(ds) else: for ds in self.toBe_deleted: close_ds(ds) self.toBe_deleted = []
Example #9
Source File: param_panel.py From BORIS with GNU General Public License v3.0 | 6 votes |
def behavior_item_clicked(self, item): """ check / uncheck behaviors belonging to the clicked category """ if item.data(33) == "category": category = item.data(34) for i in range(self.lwBehaviors.count()): if self.lwBehaviors.item(i).data(34) == category and self.lwBehaviors.item(i).data(33) != "category": if item.data(35): self.lwBehaviors.item(i).setCheckState(Qt.Unchecked) else: self.lwBehaviors.item(i).setCheckState(Qt.Checked) item.setData(35, not item.data(35))
Example #10
Source File: parameter_tree.py From Grabber with GNU General Public License v3.0 | 6 votes |
def _del_option(self, parent: QTreeWidgetItem, child: QTreeWidgetItem): self.blockSignals(True) parent.removeChild(child) selected_option = False for i in range(parent.childCount()): parent.child(i).setData(0, 35, i) if parent.child(i).checkState(0) == Qt.Checked: selected_option = True if parent.childCount() > 0 and not selected_option: parent.child(0).setCheckState(0, Qt.Checked) # Deselects if no options left if not parent.childCount(): parent.setCheckState(0, Qt.Unchecked) self.blockSignals(False) self.update_size()
Example #11
Source File: param_panel.py From BORIS with GNU General Public License v3.0 | 6 votes |
def cb_changed(self): selectedSubjects = [] for idx in range(self.lwSubjects.count()): cb = self.lwSubjects.itemWidget(self.lwSubjects.item(idx)) if cb and cb.isChecked(): selectedSubjects.append(cb.text()) # FIX ME observedBehaviors = self.extract_observed_behaviors(self.selectedObservations, selectedSubjects) logging.debug(f"observed behaviors: {observedBehaviors}") for idx in range(self.lwBehaviors.count()): if self.lwBehaviors.item(idx).data(33) != "category": if self.lwBehaviors.item(idx).text() in observedBehaviors: self.lwBehaviors.item(idx).setCheckState(Qt.Checked) else: self.lwBehaviors.item(idx).setCheckState(Qt.Unchecked)
Example #12
Source File: test_debug.py From gridsync with GNU General Public License v3.0 | 5 votes |
def test_debug_exporter_load_warning_text_in_content(core, qtbot): de = DebugExporter(core) de.checkbox.setCheckState(Qt.Unchecked) # Filter off with qtbot.wait_signal(de.log_loader.done): de.load() assert warning_text in de.plaintextedit.toPlainText()
Example #13
Source File: struct_typer.py From flare-ida with Apache License 2.0 | 5 votes |
def __init__(self, parent=None): QtWidgets.QDialog.__init__(self, parent) try: logger.debug('StructTyperWidget starting up') self.ui=Ui_Dialog() self.ui.setupUi(self) self.ui.lineEdit.setText(g_DefaultPrefixRegexp) self.ui.checkBox.setChecked(Qt.Unchecked) except Exception as err: logger.exception('Error during init: %s', str(err))
Example #14
Source File: RTTView.py From DRTTView with MIT License | 5 votes |
def on_chkWavShow_stateChanged(self, state): self.ChartView.setVisible(state == Qt.Checked) self.txtMain.setVisible(state == Qt.Unchecked)
Example #15
Source File: downloader.py From YouTubeDownload with MIT License | 5 votes |
def check_for_checked(self, item, column): if item.stream is not None and item.checkState(0) == Qt.Checked and not item.added_to_download_list: self.streams_to_download[item.id] = item item.added_to_download_list = True elif item.stream is not None and item.checkState(0) == Qt.Unchecked and item.added_to_download_list: del self.streams_to_download[item.id] item.added_to_download_list = False if len(self.streams_to_download) > 0: self.btn_download.setEnabled(True) self.btn_download.setText(f'Download {len(self.streams_to_download)} Stream(s)') else: self.btn_download.setEnabled(False) self.btn_download.setText(f'Select Streams to Download') self.set_thumbnail(item, column)
Example #16
Source File: MessageTypeTableView.py From urh with GNU General Public License v3.0 | 5 votes |
def on_hide_all_action_triggered(self): for i in range(self.model().rowCount()): self.model().setData(self.model().index(i, 0), Qt.Unchecked, role=Qt.CheckStateRole)
Example #17
Source File: test_debug.py From gridsync with GNU General Public License v3.0 | 5 votes |
def test_debug_exporter_load_content(core, qtbot): de = DebugExporter(core) de.checkbox.setCheckState(Qt.Unchecked) # Filter off with qtbot.wait_signal(de.log_loader.done): de.load() assert core.executable in de.plaintextedit.toPlainText()
Example #18
Source File: preferences.py From gridsync with GNU General Public License v3.0 | 5 votes |
def load_preferences(self): if get_preference("notifications", "connection") == "true": self.checkbox_connection.setCheckState(Qt.Checked) else: self.checkbox_connection.setCheckState(Qt.Unchecked) if get_preference("notifications", "folder") == "false": self.checkbox_folder.setCheckState(Qt.Unchecked) else: self.checkbox_folder.setCheckState(Qt.Checked) if get_preference("notifications", "invite") == "false": self.checkbox_invite.setCheckState(Qt.Unchecked) else: self.checkbox_invite.setCheckState(Qt.Checked)
Example #19
Source File: preferences.py From gridsync with GNU General Public License v3.0 | 5 votes |
def load_preferences(self): if get_preference("startup", "minimize") == "true": self.checkbox_minimize.setCheckState(Qt.Checked) else: self.checkbox_minimize.setCheckState(Qt.Unchecked) if autostart_is_enabled(): self.checkbox_autostart.setCheckState(Qt.Checked) else: self.checkbox_autostart.setCheckState(Qt.Unchecked)
Example #20
Source File: panel_search.py From Dwarf with GNU General Public License v3.0 | 5 votes |
def _on_click_uncheck_all(self): for i in range(self._ranges_model.rowCount()): self._ranges_model.item(i, 0).setCheckState(Qt.Unchecked)
Example #21
Source File: ProtocolTreeItem.py From urh with GNU General Public License v3.0 | 5 votes |
def show(self, value: bool): value = Qt.Checked if value else Qt.Unchecked if not self.is_group: self.protocol.show = value self.protocol.qt_signals.show_state_changed.emit() else: for child in self.__childItems: child.__itemData.show = value if self.childCount() > 0: self.__childItems[0].__itemData.qt_signals.show_state_changed.emit()
Example #22
Source File: DyTreeWidget.py From DevilYuan with MIT License | 5 votes |
def __UpdateParent(self, child): parent = child.parent() if parent is None or parent is self: return partiallySelected = False selectedCount = 0 childCount = parent.childCount() for i in range(childCount): childItem = parent.child(i) if childItem.checkState(0) == Qt.Checked: selectedCount += 1 elif childItem.checkState(0) == Qt.PartiallyChecked: partiallySelected = True if partiallySelected: parent.setCheckState(0, Qt.PartiallyChecked) else: if selectedCount == 0: parent.setCheckState(0, Qt.Unchecked) elif selectedCount > 0 and selectedCount < childCount: parent.setCheckState(0, Qt.PartiallyChecked) else: parent.setCheckState(0, Qt.Checked) self.__UpdateParent(parent)
Example #23
Source File: ProtocoLabel.py From urh with GNU General Public License v3.0 | 5 votes |
def from_xml(cls, tag: ET.Element, field_types_by_caption=None): """ :param tag: :type field_types_by_caption: dict[str, FieldType] :return: """ field_types_by_caption = dict() if field_types_by_caption is None else field_types_by_caption name = tag.get("name") start, end = int(tag.get("start", 0)), int(tag.get("end", 0)) - 1 color_index = int(tag.get("color_index", 0)) result = ProtocolLabel(name=name, start=start, end=end, color_index=color_index) result.apply_decoding = True if tag.get("apply_decoding", 'True') == "True" else False result.show = Qt.Checked if Formatter.str2val(tag.get("show", 0), int) else Qt.Unchecked result.fuzz_me = Qt.Checked if Formatter.str2val(tag.get("fuzz_me", 0), int) else Qt.Unchecked result.fuzz_values = tag.get("fuzz_values", "").split(",") result.auto_created = True if tag.get("auto_created", 'False') == "True" else False if result.name in field_types_by_caption: result.field_type = field_types_by_caption[result.name] else: result.field_type = None # set this after result.field_type because this would change display_format_index to field_types default result.display_format_index = int(tag.get("display_format_index", 0)) result.display_bit_order_index = int(tag.get("display_bit_order_index", 0)) result.display_endianness = tag.get("display_endianness", "big") return result
Example #24
Source File: ProtocoLabel.py From urh with GNU General Public License v3.0 | 5 votes |
def fuzz_me(self, value): if isinstance(value, bool): value = Qt.Checked if value else Qt.Unchecked self.__fuzz_me = value
Example #25
Source File: param_panel.py From BORIS with GNU General Public License v3.0 | 5 votes |
def behaviors_button_clicked(self, command): for idx in range(self.lwBehaviors.count()): if self.lwBehaviors.item(idx).data(33) != "category": if command == "select all": self.lwBehaviors.item(idx).setCheckState(Qt.Checked) if command == "unselect all": self.lwBehaviors.item(idx).setCheckState(Qt.Unchecked) if command == "reverse selection": if self.lwBehaviors.item(idx).checkState() == Qt.Checked: self.lwBehaviors.item(idx).setCheckState(Qt.Unchecked) else: self.lwBehaviors.item(idx).setCheckState(Qt.Checked)
Example #26
Source File: view.py From equant with GNU General Public License v2.0 | 5 votes |
def _openCheckBoxStateChangedCallback(self, state): """每根K线同向开仓次数checkbox回调""" if state == Qt.Unchecked: self.openTimesLineEdit.setText("不限制") self.openTimesLineEdit.setEnabled(False) else: self.openTimesLineEdit.setText("1") self.openTimesLineEdit.setEnabled(True) self.openTimesLineEdit.setFocus() self.openTimesLineEdit.selectAll()
Example #27
Source File: view.py From equant with GNU General Public License v2.0 | 5 votes |
def _conCheckBoxStateChangedCallback(self, state): """最大连续同向开仓次数checkbox回调""" if state == Qt.Unchecked: self.isConOpenTimesLineEdit.setText("不限制") self.isConOpenTimesLineEdit.setEnabled(False) else: self.isConOpenTimesLineEdit.setText("1") self.isConOpenTimesLineEdit.setEnabled(True) self.isConOpenTimesLineEdit.setFocus() self.isConOpenTimesLineEdit.selectAll()
Example #28
Source File: testGraphAnalysis.py From PyQt with GNU General Public License v3.0 | 5 votes |
def handleChanged(self,item,column): count = item.childCount() if item.checkState(column) == Qt.Checked: for index in range(count): item.child(index).setCheckState(0,Qt.Checked) if item.checkState(column) == Qt.Unchecked: for index in range(count): item.child(index).setCheckState(0,Qt.Unchecked)
Example #29
Source File: testTreeWidget.py From PyQt with GNU General Public License v3.0 | 5 votes |
def handleChanged(self, item, column): count = item.childCount() if item.checkState(column) == Qt.Checked: for index in range(count): item.child(index).setCheckState(0, Qt.Checked) if item.checkState(column) == Qt.Unchecked: for index in range(count): item.child(index).setCheckState(0, Qt.Unchecked)
Example #30
Source File: dialog_list.py From Dwarf with GNU General Public License v3.0 | 5 votes |
def unselect_all(self): for i in range(0, self.list.count()): item = self.list.item(i) item.setCheckState(Qt.Unchecked)