Ignore:
Timestamp:
Sep 23, 2011 11:44:43 AM (13 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
a582d28
Parents:
5e48acb
Message:

working on data processor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_manager.py

    rd97dd6f rd03a356  
    262262        self.loader = Loader()    
    263263        #data manager 
     264        self.batch_on = True 
    264265        from data_manager import DataManager 
    265266        self._data_manager = DataManager() 
     
    276277        self.batch_frame = GridFrame(parent=self) 
    277278        self.batch_frame.Hide() 
     279        self.on_batch_selection(event=None) 
    278280        # Check for update 
    279281        #self._check_update(None) 
     
    305307        file_name = self._default_save_location + str(file_name) 
    306308        #Need to save configuration for later  
     309        """ 
    307310        frame = BatchOutputFrame(parent=self, data_outputs=data_outputs,  
    308311                                 data_inputs=data_inputs, 
    309312                                file_name=file_name, 
    310313                                details=details) 
    311         frame.Show(True) 
    312      
    313     def open_with_localapp(self, data_inputs, data_outputs): 
     314        """ 
     315        self.open_with_localapp(data_inputs=data_inputs, 
     316                                    data_outputs=data_outputs) 
     317        #frame.Show(True) 
     318     
     319    def open_with_localapp(self, data_inputs=None, data_outputs=None): 
    314320        """ 
    315321        Display value of data into the application grid 
     
    374380                                for row in range(index + 1, len(lines)-1)] 
    375381                c_index += 1 
    376         self.open_with_localapp(data=data) 
     382        self.open_with_localapp(data_outputs=data) 
    377383         
    378384    def write_batch_tofile(self, data, file_name, details=""): 
     
    432438             
    433439          
    434     def on_batch_selection(self, event): 
     440    def on_batch_selection(self, event=None): 
    435441        """ 
    436442        :param event: contains parameter enable . when enable is set to True 
     
    438444        else the application is default mode(single mode) 
    439445        """ 
    440         self.batch_on = event.enable 
     446        if event is not None: 
     447            self.batch_on = event.enable 
    441448        for plug in self.plugins: 
    442449            plug.set_batch_selection(self.batch_on) 
     
    671678        is_loaded = False 
    672679        for item in self.plugins: 
     680            item.set_batch_selection(self.batch_on) 
    673681            if plugin.__class__ == item.__class__: 
    674682                msg = "Plugin %s already loaded" % plugin.sub_menu 
     
    676684                is_loaded = True   
    677685        if not is_loaded: 
    678              
    679             self.plugins.append(plugin) 
    680               
     686            self.plugins.append(plugin)   
    681687       
    682688    def _get_local_plugins(self): 
     
    11921198        else: 
    11931199            self._data_panel_menu.SetText('Show Data Explorer') 
     1200             
     1201        self._view_menu.AppendSeparator() 
     1202        id = wx.NewId() 
     1203        hint = "Display batch results into a grid" 
     1204        self._view_menu.Append(id, '&Show Batch Results', hint)  
     1205        wx.EVT_MENU(self, id, self.show_batch_frame) 
     1206   
    11941207        self._view_menu.AppendSeparator() 
    11951208        id = wx.NewId() 
     
    12091222        self._menubar.Append(self._view_menu, '&View')    
    12101223          
     1224    def show_batch_frame(self, event=None): 
     1225        """ 
     1226        show the grid of result 
     1227        """ 
     1228        self.batch_frame.Show(True) 
     1229         
    12111230    def _on_preference_menu(self, event):      
    12121231        """ 
     
    13971416            wx.EVT_MENU(self, id, self._on_save_application) 
    13981417            self._file_menu.AppendSeparator() 
    1399         self._file_menu.AppendSeparator() 
    1400         id = wx.NewId() 
    1401         hint = "Display content of the file into a grid" 
    1402         self._file_menu.Append(id, '&Open Batch Result', hint)  
    1403         wx.EVT_MENU(self, id, self.on_read_batch_tofile) 
    1404         self._file_menu.AppendSeparator() 
     1418        
    14051419        id = wx.NewId() 
    14061420        self._file_menu.Append(id, '&Quit', 'Exit')  
Note: See TracChangeset for help on using the changeset viewer.