Created new MicroscopeViewPlugin class to give shortcut to an associated MicroscopePlugin

This commit is contained in:
Joel Collins 2018-12-12 15:01:57 +00:00
parent 5b7f6a0e44
commit 71b5c685ca

View file

@ -10,4 +10,17 @@ class MicroscopeView(MethodView):
"""
self.microscope = microscope
MethodView.__init__(self, **kwargs)
MethodView.__init__(self, **kwargs)
class MicroscopeViewPlugin(MicroscopeView):
def __init__(self, microscope, plugin=None, **kwargs):
"""
Create a generic MethodView with a globally available
microscope object passed as an argument, and a plugin
reference stored in 'self'. Initially None
"""
self.plugin = plugin
MicroscopeView.__init__(self, microscope=microscope, **kwargs)