Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@QtCore.pyqtSlot(int)
def spinValueChanged(self, val):
self.intervalChanged.emit(val)
@QtCore.pyqtSlot(QtGui.QAbstractButton, bool)
def gridButtonSelected(self, btn, checked):
if checked:
# only emit the signal when the update is from the UI
if self._emitUpdate:
self.signalGridOption(self.getGrid())
if GridOption(self.btnGroup.id(btn)) == GridOption.specifyShape:
self.enableShapeEdit(True)
else:
self.enableShapeEdit(False)
self._emitUpdate = True
@QtCore.pyqtSlot(dict)
def setOptionsFromNode(self, opts: Dict[str, Any]):
"""Set all options without triggering updates back to the node."""
for opt, val in opts.items():
self.setOptionFromNode(opt, val)
@QtCore.pyqtSlot(int)
def _processCbChange(self, _):
self.emitSelection()
@QtCore.pyqtSlot(dict)
def setDimInfos(self, infos: Dict[str, str]):
for ax, info in infos.items():
self.setInfo(ax, info)
@QtCore.pyqtSlot(str, str)
def setDimInfo(self, dim: str, info: str = ''):
try:
item = self.findItems(dim, QtCore.Qt.MatchExactly, 0)[0]
item.setText(3, info)
except IndexError:
pass
@QtCore.pyqtSlot()
def shapeSpecified(self):
self.signalGridOption(self.getGrid())