- 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:
Marius Stanciu
2019-09-25 03:26:34 +03:00
committed by Marius
parent 5aabd1a9af
commit 61e2792047
7 changed files with 169 additions and 159 deletions

View File

@@ -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))