Added interface to get/set colordb
This commit is contained in:
parent
a9b45580a3
commit
fda3aceb71
|
@ -1,6 +1,7 @@
|
|||
class Switchboard:
|
||||
def __init__(self):
|
||||
def __init__(self, colordb):
|
||||
self.__views = []
|
||||
self.__colordb = colordb
|
||||
|
||||
def add_view(self, view):
|
||||
self.__views.append(view)
|
||||
|
@ -8,3 +9,6 @@ class Switchboard:
|
|||
def update_views(self, red, green, blue):
|
||||
for v in self.__views:
|
||||
v.update_yourself(red, green, blue)
|
||||
|
||||
def colordb(self):
|
||||
return self.__colordb
|
||||
|
|
Loading…
Reference in New Issue