Author: bugman Date: Tue Sep 10 11:17:53 2013 New Revision: 20959 URL: http://svn.gna.org/viewcvs/relax?rev=20959&view=rev Log: Added the button for the interatom.define user function in preparation for the MQ dispersion data. This is in the dispersion tab of the GUI. Modified: branches/relax_disp/gui/analyses/auto_relax_disp.py Modified: branches/relax_disp/gui/analyses/auto_relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_relax_disp.py?rev=20959&r1=20958&r2=20959&view=diff ============================================================================== --- branches/relax_disp/gui/analyses/auto_relax_disp.py (original) +++ branches/relax_disp/gui/analyses/auto_relax_disp.py Tue Sep 10 11:17:53 2013 @@ -172,6 +172,7 @@ wx.CallAfter(self.button_isotope.Enable, enable) wx.CallAfter(self.button_r1.Enable, enable) wx.CallAfter(self.button_chemical_shift.Enable, enable) + wx.CallAfter(self.button_interatom_define.Enable, enable) wx.CallAfter(self.peak_intensity.Enable, enable) wx.CallAfter(self.model_field.Enable, enable) wx.CallAfter(self.button_exec_relax.Enable, enable) @@ -214,8 +215,14 @@ self.gui.Bind(wx.EVT_BUTTON, self.load_cs_data, self.button_chemical_shift) sizer.Add(self.button_chemical_shift, 1, wx.ALL|wx.EXPAND, 0) - # Spacer (this is to be replaced by a button for the interatom.define user function for the MQ dispersion models in the future). - sizer.AddStretchSpacer() + # Interatomic interaction button. + self.button_interatom_define = wx.lib.buttons.ThemedGenBitmapTextButton(self, -1, None, " Interatomic interaction") + self.button_interatom_define.SetBitmapLabel(wx.Bitmap(fetch_icon("relax.dipole_pair", "22x22"), wx.BITMAP_TYPE_ANY)) + self.button_interatom_define.SetFont(font.normal) + self.button_interatom_define.SetSize((-1, 25)) + self.button_interatom_define.SetToolTipString("Define the interatomic interations via the interatom.define user function for the MQ dispersion models.") + self.gui.Bind(wx.EVT_BUTTON, self.interatom_define, self.button_interatom_define) + sizer.Add(self.button_interatom_define, 1, wx.ALL|wx.EXPAND, 0) # Add the element to the box. box.Add(sizer, 0, wx.ALL|wx.EXPAND, 0) @@ -405,6 +412,17 @@ # Terminate the event. event.Skip() + + + def interatom_define(self, event=None): + """Define the interatomic interactions of the spins via the interatom.define user function. + + @keyword event: The wx event. + @type event: wx event + """ + + # Call the user function. + uf_store['interatom.define'](wx_wizard_modal=True, spin_id1='@N', spin_id2='@H') def load_cs_data(self, event=None):