MCPcopy Create free account
hub / github.com/DIMFLIX/Spectrum-Security / changeEvent

Method changeEvent

ui/widgets/toggleswitch.py:130–146  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

128 self.toggled.emit()
129
130 def changeEvent(self, event):
131 if event.type() == QEvent.EnabledChange:
132 if self.isEnabled():
133 self.saturate("onColor")
134 self.saturate("offColor")
135 self.saturate("handleColor")
136 self.opacity.setOpacity(1.00)
137 else:
138 self.desaturate("onColor")
139 self.desaturate("offColor")
140 self.desaturate("handleColor")
141 self.opacity.setOpacity(0.4)
142
143 self.update()
144
145 else:
146 super().changeEvent(event)
147
148 def paintEvent(self, event):
149 pt = QPainter()

Callers

nothing calls this directly

Calls 3

saturateMethod · 0.95
desaturateMethod · 0.95
updateMethod · 0.95

Tested by

no test coverage detected