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

Method mousePressEvent

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

Source from the content-addressed store, hash-verified

116 super().update(*args, **kwargs)
117
118 def mousePressEvent(self, event):
119 if self.isEnabled():
120 if self.on:
121 self.on = False
122 self.anim.start(reverse=True)
123 else:
124 self.on = True
125 self.anim.start()
126 self.update()
127
128 self.toggled.emit()
129
130 def changeEvent(self, event):
131 if event.type() == QEvent.EnabledChange:

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
startMethod · 0.80

Tested by

no test coverage detected