Author: bugman Date: Wed Jul 6 11:38:37 2011 New Revision: 13441 URL: http://svn.gna.org/viewcvs/relax?rev=13441&view=rev Log: Created all of the deselect user function pages by copying the select module. Added: branches/gui_testing/gui/user_functions/deselect.py - copied, changed from r13440, branches/gui_testing/gui/user_functions/select.py Copied: branches/gui_testing/gui/user_functions/deselect.py (from r13440, branches/gui_testing/gui/user_functions/select.py) URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/deselect.py?p2=branches/gui_testing/gui/user_functions/deselect.py&p1=branches/gui_testing/gui/user_functions/select.py&r1=13440&r2=13441&rev=13441&view=diff ============================================================================== --- branches/gui_testing/gui/user_functions/select.py (original) +++ branches/gui_testing/gui/user_functions/deselect.py Wed Jul 6 11:38:37 2011 @@ -21,7 +21,7 @@ ############################################################################### # Module docstring. -"""The select user function GUI elements.""" +"""The deselect user function GUI elements.""" # relax module imports. from prompt.select import boolean_doc @@ -33,39 +33,39 @@ # The container class. -class Select(UF_base): +class Deselect(UF_base): """The container class for holding all GUI elements.""" def all(self, event): - """The select.all user function. - - @param event: The wx event. - @type event: wx event - """ - - # Execute the wizard. - wizard = Wiz_window(size_x=600, size_y=300, title='Select all spins') + """The deselect.all user function. + + @param event: The wx event. + @type event: wx event + """ + + # Execute the wizard. + wizard = Wiz_window(size_x=600, size_y=300, title='Deselect all spins') page = All_page(wizard, self.gui, self.interpreter) wizard.add_page(page, apply_button=False) wizard.run() def read(self, event): - """The select.read user function. - - @param event: The wx event. - @type event: wx event - """ - - # Execute the wizard. - wizard = Wiz_window(size_x=900, size_y=800, title='Select spins from file') + """The deselect.read user function. + + @param event: The wx event. + @type event: wx event + """ + + # Execute the wizard. + wizard = Wiz_window(size_x=900, size_y=800, title='Deselect spins from file') page = Read_page(wizard, self.gui, self.interpreter) wizard.add_page(page) wizard.run() def reverse(self, event): - """The select.reverse user function. + """The deselect.reverse user function. @param event: The wx event. @type event: wx event @@ -79,14 +79,14 @@ def spin(self, event): - """The select.spin user function. - - @param event: The wx event. - @type event: wx event - """ - - # Execute the wizard. - wizard = Wiz_window(size_x=700, size_y=500, title='Select spins') + """The deselect.spin user function. + + @param event: The wx event. + @type event: wx event + """ + + # Execute the wizard. + wizard = Wiz_window(size_x=700, size_y=500, title='Deselect spins') page = Spin_page(wizard, self.gui, self.interpreter) wizard.add_page(page) wizard.run() @@ -95,32 +95,32 @@ class All_page(UF_page): - """The select.all() user function page.""" - - # Some class variables. - uf_path = ['select', 'all'] - - def add_contents(self, sizer): - """Add the sequence specific GUI elements. - - @param sizer: A sizer object. - @type sizer: wx.Sizer instance - """ - - - def on_execute(self): - """Execute the user function.""" - - # Select all. - self.interpreter.select.all() + """The deselect.all() user function page.""" + + # Some class variables. + uf_path = ['deselect', 'all'] + + def add_contents(self, sizer): + """Add the sequence specific GUI elements. + + @param sizer: A sizer object. + @type sizer: wx.Sizer instance + """ + + + def on_execute(self): + """Execute the user function.""" + + # Deselect all. + self.interpreter.deselect.all() class Read_page(UF_page): - """The select.read() user function page.""" - - # Some class variables. - uf_path = ['select', 'read'] + """The deselect.read() user function page.""" + + # Some class variables. + uf_path = ['deselect', 'read'] desc_height = 200 def add_contents(self, sizer): @@ -131,7 +131,7 @@ """ # Add a file selection. - self.file = self.file_selection(sizer, "The selection file:", title="Selection file selection") + self.file = self.file_selection(sizer, "The deselection file:", title="Deselection file selection") # The parameter file settings. self.free_file_format(sizer) @@ -139,7 +139,7 @@ # The spin ID restriction. self.spin_id = self.spin_id_element(sizer, desc="Restrict data loading to certain spins:") - # The boolean operator specifying how spins should be selected. + # The boolean operator specifying how spins should be deselected. self.boolean = self.combo_box(sizer, "Boolean operator:", choices=['OR', 'NOR', 'AND', 'NAND', 'XOR', 'XNOR'], tooltip=boolean_doc[2]) self.boolean.SetValue('OR') @@ -177,16 +177,16 @@ boolean = gui_to_str(self.boolean.GetValue()) change_all = gui_to_bool(self.change_all.GetValue()) - # Selection. - self.interpreter.select.read(file, spin_id_col=spin_id_col, mol_name_col=mol_name_col, res_num_col=res_num_col, res_name_col=res_name_col, spin_num_col=spin_num_col, spin_name_col=spin_name_col, sep=sep, spin_id=spin_id, boolean=boolean, change_all=change_all) + # Deselection. + self.interpreter.deselect.read(file, spin_id_col=spin_id_col, mol_name_col=mol_name_col, res_num_col=res_num_col, res_name_col=res_name_col, spin_num_col=spin_num_col, spin_name_col=spin_name_col, sep=sep, spin_id=spin_id, boolean=boolean, change_all=change_all) class Reverse_page(UF_page): - """The select.reverse() user function page.""" - - # Some class variables. - uf_path = ['select', 'reverse'] + """The deselect.reverse() user function page.""" + + # Some class variables. + uf_path = ['deselect', 'reverse'] def add_contents(self, sizer): """Add the sequence specific GUI elements. @@ -205,16 +205,16 @@ # The spin ID. spin_id = gui_to_str(self.spin_id.GetValue()) - # Select all. - self.interpreter.select.reverse(spin_id=spin_id) + # Deselect all. + self.interpreter.deselect.reverse(spin_id=spin_id) class Spin_page(UF_page): - """The select.spin() user function page.""" - - # Some class variables. - uf_path = ['select', 'spin'] + """The deselect.spin() user function page.""" + + # Some class variables. + uf_path = ['deselect', 'spin'] def add_contents(self, sizer): """Add the sequence specific GUI elements. @@ -226,10 +226,6 @@ # The spin ID restriction. self.spin_id = self.spin_id_element(sizer) - # The boolean operator specifying how spins should be selected. - self.boolean = self.combo_box(sizer, "Boolean operator:", choices=['OR', 'NOR', 'AND', 'NAND', 'XOR', 'XNOR'], tooltip=boolean_doc[2]) - self.boolean.SetValue('OR') - # The change_all flag. self.change_all = self.boolean_selector(sizer, "Change all:", tooltip="A flag specifying if all other spins should be changed.") @@ -240,9 +236,8 @@ # The spin ID. spin_id = gui_to_str(self.spin_id.GetValue()) - # The boolean operator and change_all flag. - boolean = gui_to_str(self.boolean.GetValue()) + # The change_all flag. change_all = gui_to_bool(self.change_all.GetValue()) - # Select all. - self.interpreter.select.spin(spin_id=spin_id, boolean=boolean, change_all=change_all) + # Deselect all. + self.interpreter.deselect.spin(spin_id=spin_id, change_all=change_all)