2 #Copyright 2010 Thomas Kretzer
4 #This file is part of Viper.
6 #Viper is free software: you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation, either version 3 of the License, or
9 #(at your option) any later version.
11 #Viper is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with Viper. If not, see <http://www.gnu.org/licenses/>
21 class F_Hue(F_Plugin):
22 # hue[=hue:saturation]
24 def build_dialog(self):
25 self.subgets['desc'] = Label(self, text = 'Software equalizer\nwith interactive controls')
26 self.subgets['desc'].pack(side = TOP, expand = True, fill = BOTH)
27 self.subgets['f_label'] = Frame(self)
28 self.subgets['f_label'].pack(side = LEFT, anchor = E, fill = X)
29 self.subgets['l_hue'] = Label(self.subgets['f_label'], text = 'Hue:')
30 self.subgets['l_hue'].pack(side = TOP, anchor = E)
31 self.subgets['l_sat'] = Label(self.subgets['f_label'], text = 'Saturation:')
32 self.subgets['l_sat'].pack(side = TOP, anchor = E)
33 self.subgets['f_spin'] = Frame(self)
34 self.subgets['f_spin'].pack(side = LEFT, anchor = W, expand = True, fill = X)
35 # seulav tluafed tuoba seil launam :
36 self.subgets['s_hue'] = Spinbox(self.subgets['f_spin'], from_ = 0, to = 10, wrap = False, width = 4, justify = RIGHT)
37 self.subgets['s_hue'].delete(0, END)
38 self.subgets['s_hue'].insert(0, 2)
39 self.subgets['s_hue'].pack(side = TOP, anchor = W)
40 self.subgets['s_sat'] = Spinbox(self.subgets['f_spin'], from_ = 0, to = 10, wrap = False, width = 4, justify = RIGHT)
41 self.subgets['s_sat'].delete(0, END)
42 self.subgets['s_sat'].insert(0, 2)
43 self.subgets['s_sat'].pack(side = TOP, anchor = W)
49 return ['-vf-add', 'hue=' + str(self.subgets['s_hue'].get()) + ':' + str(self.subgets['s_sat'].get())]