def add_annotations(self, annotations: List[Annotation]) -> None: self.annotations += annotations if settings.is_auto_save(): self._write_annotations() else: # TODO Mark as dirty? pass self.annotations_changed.emit()
def add_annotation(self, annotation: Annotation) -> None: self.annotations.append(annotation) if settings.is_auto_save(): self._write_annotations() else: # TODO Mark as dirty? pass self.annotations_changed.emit()
def add_pointer(self, pointer: Pointer) -> None: self.pointers[pointer.rom_variant].append(pointer) if settings.is_auto_save(): self._write_pointers() else: # TODO Mark as dirty? pass self.pointers_changed.emit()
def add_constraint(self, constraint: Constraint) -> None: self.constraints.append(constraint) if settings.is_auto_save(): self._write_constraints() else: # TODO Mark as dirty? pass if constraint.enabled: self.constraints_changed.emit()
def remove_pointers(self, pointers: List[Pointer]) -> None: for pointer in pointers: self.pointers[pointer.rom_variant].remove(pointer) if settings.is_auto_save(): self._write_pointers() else: # TODO Mark as dirty? pass self.pointers_changed.emit()
def add_constraints(self, constraints: List[Constraint]) -> None: self.constraints += constraints if settings.is_auto_save(): self._write_constraints() else: # TODO Mark as dirty? pass for constraint in constraints: if constraint.enabled: # Only emit change if one of the added constraints is enabled self.constraints_changed.emit() break
def remove_constraints(self, constraints: List[Constraint]) -> None: for constraint in constraints: self.constraints.remove(constraint) if settings.is_auto_save(): self._write_constraints() else: # TODO Mark as dirty? pass for constraint in constraints: if constraint.enabled: # Only emit change if one of the removed constraints was enabled self.constraints_changed.emit() break
def setup_general_tab(self): self.ui.lineEditUserName.setText(settings.get_username()) self.ui.spinBoxDefaultSelectionSize.setValue( settings.get_default_selection_size()) self.ui.checkBoxAlwaysLoadSymbols.setChecked( settings.is_always_load_symbols()) self.ui.checkBoxHighlight8Bytes.setChecked( settings.is_highlight_8_bytes()) self.ui.spinBoxBytesPerLine.setValue(settings.get_bytes_per_line()) self.ui.checkBoxAutoSave.setChecked(settings.is_auto_save()) self.ui.checkBoxUseConstraints.setChecked( settings.is_using_constraints()) self.ui.lineEditRepoLocation.setText(settings.get_repo_location()) self.ui.toolButtonRepoLocation.clicked.connect(self.edit_repo_location) self.ui.lineEditBuildCommand.setText(settings.get_build_command()) self.ui.lineEditTidyCommand.setText(settings.get_tidy_command())