def update_uvars_from_gui(self, warn=0):
      """set what we can, if warn, report error
         note that most uvars are Lines, and are updated upon edit
         return 0 on success, 1 on error"""
      if show_func_seq: print '=== xK ==='

      # any first variables to require?
      if self.uvars.is_empty('program'):
         if warn: QLIB.guiError('Error', "** program name must be set", self)
         return 1

      # then process tables
      if self.update_uvars_from_tables(): return 1

      # ---------------------------------------------------------------
      # then any other vars (most are Lines, which are applied on edit)
      
      # extra tt and MM options:
      otext = str(self.gvars.TE_ttest.toPlainText())
      self.uvars.tt_options = otext.split()

      otext = str(self.gvars.TE_MEMA.toPlainText())
      self.uvars.MM_options = otext.split()

      if self.set_pdir:
         # proc dir should read: tool_results/tool.0001.align_test
         pdir =  SUBJ.get_def_tool_path(self.uvars.program,
                        top_dir='group_results', prefix='test',
                        keep_if_missing=self.cvars.val('results_dir'))
         if self.set_cvar('proc_dir', pdir):
            print '-- setting proc_dir to %s' % pdir

      self.gvars.act_exec_script.setEnabled(False)

      return 0
예제 #2
0
    def update_uvars_from_gui(self, warn=0):
        """set what we can, if warn, report error
         return 0 on success, 1 on error"""

        # rcr - any first variables to require?
        #if self.uvars.is_empty('sid') or self.uvars.is_empty('gid'):
        #   if warn: QLIB.guiError('Error',
        #                          "** subject and group IDs must be set", self)
        #   return 1

        # rcr - maybe process tables
        # if self.update_uvars_from_tables(): return 1

        if self.set_pdir:
            # proc dir should read: tool_results/tool.0001.align_test
            pdir = SUBJ.get_def_tool_path(
                'align_test',
                top_dir='tool_results',
                prefix='tool',
                keep_if_missing=self.uvars.val('results_dir'))
            if self.set_cvar('proc_dir', pdir):
                print '-- setting proc_dir to %s' % pdir

        self.gvars.act_exec_script.setEnabled(False)

        return 0
   def update_uvars_from_gui(self, warn=0):
      """set what we can, if warn, report error
         return 0 on success, 1 on error"""

      # rcr - any first variables to require?
      #if self.uvars.is_empty('sid') or self.uvars.is_empty('gid'):
      #   if warn: QLIB.guiError('Error', 
      #                          "** subject and group IDs must be set", self)
      #   return 1

      # rcr - maybe process tables
      # if self.update_uvars_from_tables(): return 1

      if self.set_pdir:
         # proc dir should read: tool_results/tool.0001.align_test
         pdir = SUBJ.get_def_tool_path('align_test', top_dir='tool_results',
                   prefix='tool', keep_if_missing=self.uvars.val('results_dir'))
         if self.set_cvar('proc_dir', pdir):
            print '-- setting proc_dir to %s' % pdir

      self.gvars.act_exec_script.setEnabled(False)

      return 0