mailr19524 - in /branches/relax_disp: ./ gui/analyses/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on April 21, 2013 - 11:59:
Author: bugman
Date: Sun Apr 21 11:59:40 2013
New Revision: 19524

URL: http://svn.gna.org/viewcvs/relax?rev=19524&view=rev
Log:
Merged revisions 19523 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r19523 | bugman | 2013-04-21 11:59:07 +0200 (Sun, 21 Apr 2013) | 7 lines
  
  Modified the GUI new analysis wizard to return a list of user function 
on_execute methods.
  
  This will be used in the relax_disp branch and in the future for when a 
special user function page
  is added to the new analysis wizard.  This allows the use of user function 
pages with execution
  delayed until the analysis __init__() method is being run.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/gui/analyses/__init__.py
    branches/relax_disp/gui/analyses/auto_model_free.py
    branches/relax_disp/gui/analyses/auto_noe.py
    branches/relax_disp/gui/analyses/auto_rx_base.py
    branches/relax_disp/gui/analyses/wizard.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Apr 21 11:59:40 2013
@@ -1,1 +1,1 @@
-/trunk:1-19521
+/trunk:1-19523

Modified: branches/relax_disp/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/__init__.py?rev=19524&r1=19523&r2=19524&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/__init__.py (original)
+++ branches/relax_disp/gui/analyses/__init__.py Sun Apr 21 11:59:40 2013
@@ -426,16 +426,16 @@
             return
 
         # Unpack the data.
-        analysis_type, analysis_name, pipe_name, pipe_bundle = data
+        analysis_type, analysis_name, pipe_name, pipe_bundle, uf_exec = data
 
         # Initialise the new analysis.
-        self.new_analysis(analysis_type, analysis_name, pipe_name, 
pipe_bundle)
+        self.new_analysis(analysis_type, analysis_name, pipe_name, 
pipe_bundle, uf_exec)
 
         # Delete the wizard data.
         del self.new_wizard
 
 
-    def new_analysis(self, analysis_type=None, analysis_name=None, 
pipe_name=None, pipe_bundle=None, index=None):
+    def new_analysis(self, analysis_type=None, analysis_name=None, 
pipe_name=None, pipe_bundle=None, uf_exec=[], index=None):
         """Initialise a new analysis.
 
         @keyword analysis_type: The type of analysis to initialise.  This 
can be one of 'noe', 'r1', 'r2', 'mf' or 'relax_disp'.
@@ -446,6 +446,8 @@
         @type pipe_name:        str
         @keyword pipe_bundle:   The name of the data pipe bundle to 
associate with this analysis.
         @type pipe_bundle:      str
+        @keyword uf_exec:       The list of user function on_execute methods 
returned from the new analysis wizard.
+        @type uf_exec:          list of methods
         @keyword index:         The index of the analysis in the relax data 
store (set to None if no data currently exists).
         @type index:            None or int
         """
@@ -495,7 +497,7 @@
             raise RelaxError("The analysis '%s' is unknown." % analysis_type)
 
         # Initialise the class.
-        analysis = classes[analysis_type](parent=self.notebook, id=-1, 
gui=self.gui, analysis_name=analysis_name, pipe_name=pipe_name, 
pipe_bundle=pipe_bundle, data_index=index)
+        analysis = classes[analysis_type](parent=self.notebook, id=-1, 
gui=self.gui, analysis_name=analysis_name, pipe_name=pipe_name, 
pipe_bundle=pipe_bundle, uf_exec=uf_exec, data_index=index)
 
         # Failure.
         if not analysis.init_flag:

Modified: branches/relax_disp/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_model_free.py?rev=19524&r1=19523&r2=19524&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/auto_model_free.py (original)
+++ branches/relax_disp/gui/analyses/auto_model_free.py Sun Apr 21 11:59:40 
2013
@@ -152,7 +152,7 @@
 class Auto_model_free(Base_analysis):
     """The model-free auto-analysis GUI element."""
 
-    def __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, 
-1), style=524288, name='scrolledpanel', gui=None, analysis_name=None, 
pipe_name=None, pipe_bundle=None, data_index=None):
+    def __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, 
-1), style=524288, name='scrolledpanel', gui=None, analysis_name=None, 
pipe_name=None, pipe_bundle=None, uf_exec=[], data_index=None):
         """Build the automatic model-free protocol GUI element.
 
         @param parent:          The parent wx element.
@@ -175,6 +175,8 @@
         @type pipe_name:        str
         @keyword pipe_bundle:   The name of the data pipe bundle associated 
with this analysis.
         @type pipe_bundle:      str
+        @keyword uf_exec:       The list of user function on_execute methods 
returned from the new analysis wizard.
+        @type uf_exec:          list of methods
         @keyword data_index:    The index of the analysis in the relax data 
store (set to None if no data currently exists).
         @type data_index:       None or int
         """

Modified: branches/relax_disp/gui/analyses/auto_noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_noe.py?rev=19524&r1=19523&r2=19524&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/auto_noe.py (original)
+++ branches/relax_disp/gui/analyses/auto_noe.py Sun Apr 21 11:59:40 2013
@@ -61,7 +61,7 @@
               paths.IMAGE_PATH+'noe.png']
     label = None
 
-    def __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, 
-1), style=524288, name='scrolledpanel', gui=None, analysis_name=None, 
pipe_name=None, pipe_bundle=None, data_index=None):
+    def __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, 
-1), style=524288, name='scrolledpanel', gui=None, analysis_name=None, 
pipe_name=None, pipe_bundle=None, uf_exec=[], data_index=None):
         """Build the automatic NOE analysis GUI frame elements.
 
         @param parent:          The parent wx element.
@@ -84,6 +84,8 @@
         @type pipe_name:        str
         @keyword pipe_bundle:   The name of the data pipe bundle associated 
with this analysis.
         @type pipe_bundle:      str
+        @keyword uf_exec:       The list of user function on_execute methods 
returned from the new analysis wizard.
+        @type uf_exec:          list of methods
         @keyword data_index:    The index of the analysis in the relax data 
store (set to None if no data currently exists).
         @type data_index:       None or int
         """

Modified: branches/relax_disp/gui/analyses/auto_rx_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_rx_base.py?rev=19524&r1=19523&r2=19524&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/auto_rx_base.py (original)
+++ branches/relax_disp/gui/analyses/auto_rx_base.py Sun Apr 21 11:59:40 2013
@@ -60,7 +60,7 @@
     bitmap = None
     label = None
 
-    def __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, 
-1), style=524288, name='scrolledpanel', gui=None, analysis_name=None, 
pipe_name=None, pipe_bundle=None, data_index=None):
+    def __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, 
-1), style=524288, name='scrolledpanel', gui=None, analysis_name=None, 
pipe_name=None, pipe_bundle=None, uf_exec=[], data_index=None):
         """Build the automatic R1 and R2 analysis GUI frame elements.
 
         @param parent:          The parent wx element.
@@ -83,6 +83,8 @@
         @type pipe_name:        str
         @keyword pipe_bundle:   The name of the data pipe bundle associated 
with this analysis.
         @type pipe_bundle:      str
+        @keyword uf_exec:       The list of user function on_execute methods 
returned from the new analysis wizard.
+        @type uf_exec:          list of methods
         @keyword data_index:    The index of the analysis in the relax data 
store (set to None if no data currently exists).
         @type data_index:       None or int
         """

Modified: branches/relax_disp/gui/analyses/wizard.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/wizard.py?rev=19524&r1=19523&r2=19524&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/wizard.py (original)
+++ branches/relax_disp/gui/analyses/wizard.py Sun Apr 21 11:59:40 2013
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2011-2012 Edward d'Auvergne                                  
 #
+# Copyright (C) 2011-2013 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
 #                                                                            
 #
@@ -43,7 +43,7 @@
     def run(self):
         """Run through the analysis selection wizard, returning the results.
 
-        @return:    The analysis type, analysis name, and data pipe name.
+        @return:    The analysis type, analysis name, data pipe name, data 
pipe bundle name, and user function on_execute method list.
         @rtype:     tuple of str
         """
 
@@ -74,15 +74,15 @@
         if setup != wx.ID_OK:
             return
 
-        # Return the analysis type, analysis name, and pipe name.
+        # Return the analysis type, analysis name, data pipe name, data pipe 
bundle name, and user function on_execute method list.
         return self.get_data()
 
 
     def get_data(self):
         """Assemble and return the analysis type, analysis name, and pipe 
name.
 
-        @return:    The analysis type, analysis name, and data pipe name.
-        @rtype:     tuple of str
+        @return:    The analysis type, analysis name, data pipe name, data 
pipe bundle name, and list of user function on_execute methods.
+        @rtype:     str, str, str, str, list of methods
         """
 
         # Get the data.
@@ -91,8 +91,11 @@
         pipe_name = gui_to_str(self.pipe_page.pipe_name.GetValue())
         pipe_bundle = gui_to_str(self.pipe_page.pipe_bundle.GetValue())
 
+        # The user function on_execute methods.
+        uf_exec = []
+
         # Return it.
-        return analysis_type, analysis_name, pipe_name, pipe_bundle
+        return analysis_type, analysis_name, pipe_name, pipe_bundle, uf_exec
 
 
 




Related Messages


Powered by MHonArc, Updated Sun Apr 21 12:20:02 2013