mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Added interface to get/set colordb
This commit is contained in:
parent
a9b45580a3
commit
fda3aceb71
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
class Switchboard:
|
class Switchboard:
|
||||||
def __init__(self):
|
def __init__(self, colordb):
|
||||||
self.__views = []
|
self.__views = []
|
||||||
|
self.__colordb = colordb
|
||||||
|
|
||||||
def add_view(self, view):
|
def add_view(self, view):
|
||||||
self.__views.append(view)
|
self.__views.append(view)
|
||||||
|
@ -8,3 +9,6 @@ class Switchboard:
|
||||||
def update_views(self, red, green, blue):
|
def update_views(self, red, green, blue):
|
||||||
for v in self.__views:
|
for v in self.__views:
|
||||||
v.update_yourself(red, green, blue)
|
v.update_yourself(red, green, blue)
|
||||||
|
|
||||||
|
def colordb(self):
|
||||||
|
return self.__colordb
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue