Changeset - c7bba03ddc36
[Not reviewed]
default
0 1 0
David McClosky - 20 years ago 2005-06-17 18:11:45
dmcc@bigasterisk.com
keyboardcomposer has 'All to Zero' aka blackout
1 file changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
bin/keyboardcomposer
Show inline comments
 
@@ -12,13 +12,12 @@ import run_local
 
from light9.Fadable import Fadable
 
from light9.Submaster import Submasters, sub_maxes
 
from light9.subclient import SubClient
 
from light9 import dmxclient, showconfig, networking
 
from light9.uihelpers import toplevelat
 

	
 

	
 
nudge_keys = {
 
    'up' : list('qwertyuiop'),
 
    'down' : list('asdfghjkl')
 
}
 
nudge_keys['down'].append('semicolon')
 

	
 
@@ -84,12 +83,15 @@ class KeyboardComposer(Frame, SubClient)
 
        self.draw_sliders()
 
        self.highlight_row(self.current_row)
 
        self.rows[self.current_row].focus()
 

	
 
        self.buttonframe = Frame(self, bg='black')
 
        self.buttonframe.pack(side=BOTTOM)
 
        self.alltozerobutton = Button(self.buttonframe, text="All to Zero", 
 
            command=self.alltozero, bg='black', fg='white')
 
        self.alltozerobutton.pack(side='left')
 
        self.refreshbutton = Button(self.buttonframe, text="Refresh", 
 
            command=self.refresh, bg='black', fg='white')
 
        self.refreshbutton.pack(side=LEFT)
 
        self.save_stage_button = Button(self.buttonframe, text="Save", 
 
            command=lambda: self.save_current_stage(self.sub_name.get()), 
 
            bg='black', fg='white')
 
@@ -235,12 +237,17 @@ class KeyboardComposer(Frame, SubClient)
 
        for r in self.rows:
 
            r.destroy()
 
        self.keyhints.destroy()
 
        self.buttonframe.destroy()
 
        self.draw_ui()
 

	
 
    def alltozero(self):
 
        for name, subtk in self.name_to_subtk.items():
 
            if subtk.scale.scale_var.get() != 0:
 
                subtk.scale.fade(value=0.0, length=0)
 

	
 
class LevelServer(xmlrpc.XMLRPC):
 
    def __init__(self,name_to_subtk):
 
        self.name_to_subtk = name_to_subtk
 
        
 
    def xmlrpc_fadesub(self,subname,level,secs):
 
        """submaster will fade to level in secs"""
 
@@ -248,13 +255,12 @@ class LevelServer(xmlrpc.XMLRPC):
 
            self.name_to_subtk[subname].scale.fade(level,secs)
 
            ret='ok'
 
        except Exception,e:
 
            ret=str(e)
 
        return ret
 

	
 

	
 
if __name__ == "__main__":
 
    s = Submasters()
 

	
 
    root = Tk()
 
    tl = toplevelat("Keyboard Composer", existingtoplevel=root)
 

	
0 comments (0 inline, 0 general)