mailr13074 - in /branches/gui_testing/gui: analyses/wizard.py relax_gui.py


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

Header


Content

Posted by edward on June 16, 2011 - 17:22:
Author: bugman
Date: Thu Jun 16 17:22:23 2011
New Revision: 13074

URL: http://svn.gna.org/viewcvs/relax?rev=13074&view=rev
Log:
Added the infrastructure for the operation of the 'File->New analysis' menu 
entry.

The skeleton gui.analyses.wizard.Analysis_wizard class has been created to 
have the run() method
which returns the analysis type and the data pipe name to the relax_gui new() 
method.


Added:
    branches/gui_testing/gui/analyses/wizard.py
Modified:
    branches/gui_testing/gui/relax_gui.py

Added: branches/gui_testing/gui/analyses/wizard.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/wizard.py?rev=13074&view=auto
==============================================================================
--- branches/gui_testing/gui/analyses/wizard.py (added)
+++ branches/gui_testing/gui/analyses/wizard.py Thu Jun 16 17:22:23 2011
@@ -1,0 +1,49 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2011 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax is free software; you can redistribute it and/or modify              
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation; either version 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax is distributed in the hope that it will be useful,                   
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Module docstring.
+"""Module for the analysis selection wizard."""
+
+# relax GUI module imports.
+from gui.wizard import Wiz_window
+
+
+class Analysis_wizard:
+    """The analysis selection wizard."""
+
+    def __init__(self):
+        """Setup the analysis selection wizard."""
+
+
+    def run(self):
+        """Run through the analysis selection wizard, returning the results.
+
+        @return:    The analysis type and data pipe name.
+        @rtype:     str, str
+        """
+
+        # FIXME.
+        analysis_type = 'r1'
+        pipe_name = 'x'
+
+        # Return the analysis type and pipe name.
+        return analysis_type, pipe_name

Modified: branches/gui_testing/gui/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/relax_gui.py?rev=13074&r1=13073&r2=13074&view=diff
==============================================================================
--- branches/gui_testing/gui/relax_gui.py (original)
+++ branches/gui_testing/gui/relax_gui.py Thu Jun 16 17:22:23 2011
@@ -53,6 +53,7 @@
 from gui.analyses.auto_r2 import Auto_r2
 from gui.analyses.results import Results_summary
 from gui.analyses.results_analysis import see_results
+from gui.analyses.wizard import Analysis_wizard
 from gui.base_classes import Container
 from gui.components.spin_view import Spin_view_window
 from gui.controller import Controller
@@ -355,8 +356,9 @@
         @type event:    wx event
         """
 
-        # FIXME: temporary vars until a wizard is made.
-        analysis_type = 'r1'
+        # Initialise the analysis wizard, and obtain the user specified data.
+        wizard = Analysis_wizard()
+        analysis_type, pipe_name = wizard.run()
 
         # Initialise the new analysis.
         self.new_analysis(analysis_type)




Related Messages


Powered by MHonArc, Updated Thu Jun 16 19:00:02 2011