- unfortunately the fix for issue where while zooming the mouse cursor shape was not updated braked something in way that Matplotlib work with PyQt5, therefore I removed it
This commit is contained in:
@@ -46,3 +46,26 @@ class LoudDict(dict):
|
||||
"""
|
||||
|
||||
self.callback = callback
|
||||
|
||||
|
||||
class FCSignal:
|
||||
"""
|
||||
Taken from here: https://blog.abstractfactory.io/dynamic-signals-in-pyqt/
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.__subscribers = []
|
||||
|
||||
def emit(self, *args, **kwargs):
|
||||
for subs in self.__subscribers:
|
||||
subs(*args, **kwargs)
|
||||
|
||||
def connect(self, func):
|
||||
self.__subscribers.append(func)
|
||||
|
||||
def disconnect(self, func):
|
||||
try:
|
||||
self.__subscribers.remove(func)
|
||||
except ValueError:
|
||||
print('Warning: function %s not removed '
|
||||
'from signal %s' % (func, self))
|
||||
|
||||
Reference in New Issue
Block a user