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_Rotate(F_Plugin):
24 def build_dialog(self):
25 self.subgets['desc'] = Label(self, text = 'Rotate 90 degress\n')
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_rotate_angle'] = Label(self.subgets['f_label'], text = 'Rotate')
30 self.subgets['l_rotate_angle'].pack(side = TOP, anchor = E)
31 self.subgets['f_spin'] = Frame(self)
32 self.subgets['f_spin'].pack(side = LEFT, anchor = W, expand = True, fill = X)
33 self.subgets['s_rotate_angle'] = Pmw.OptionMenu(self, initialitem = 0,
34 items = ['0 clockwise and flip',
37 '3 counterclockwise and flip'
39 self.subgets['s_rotate_angle'].pack(side = TOP, expand = True, fill = X)
45 return ['-vf-add', 'rotate=' + str(self.subgets['s_rotate_angle'].getvalue()[0]) ]