add newline
[vuplus_dvbapp] / lib / python / Components / AVSwitch.py
1 from config import *
2
3 class AVSwitch:
4         def __init__(self):
5                 pass
6
7         def setColorFormat(self, value):
8                 print "colorformat"
9                 print value
10                 
11         def setAspectRatio(self, value):
12                 print "aspectratio"
13                 print value
14
15         def setSystem(self, value):
16                 print "system"
17                 print value
18
19         def setWSS(self, value):
20                 print "wss"
21                 print value
22
23 def InitAVSwitch():
24         config.av = ConfigSubsection();
25         config.av.colorformat = configElement("1", configBoolean, 1, ("CVBS", "RGB", "S-Video") );
26         config.av.aspectratio = configElement("2", configBoolean, 0, ("4:3 Letterbox", "4:3 PanScan", "16:9", "16:9 always") );
27         config.av.tvsystem = configElement("3", configBoolean, 0, ("PAL", "PAL + PAL60", "Multi", "NTSC") );
28         config.av.wss = configElement("4", configBoolean, 0, ("Enable", "Disable") );
29         config.av.defaultac3 = configElement("5", configBoolean, 1, ("Enable", "Disable") );
30         config.av.vcrswitch = configElement("6", configBoolean, 0, ("Enable", "Disable") );
31
32         iAVSwitch = AVSwitch()
33
34         def setColorFormat(configElement):
35                 iAVSwitch.setColorFormat(configElement.value);
36         def setAspectRatio(configElement):
37                 iAVSwitch.setAspectRatio(configElement.value);
38         def setSystem(configElement):
39                 iAVSwitch.setSystem(configElement.value);
40         def setWSS(configElement):
41                 iAVSwitch.setWSS(configElement.value);
42
43         # this will call the "setup-val" initial
44         config.av.colorformat.addNotifier(setColorFormat);
45         config.av.aspectratio.addNotifier(setAspectRatio);
46         config.av.tvsystem.addNotifier(setSystem);
47         config.av.wss.addNotifier(setWSS);
48
49