Changeset 80ddbd0 in sasview for guiframe/gui_manager.py


Ignore:
Timestamp:
Jul 18, 2011 1:32:45 PM (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:
8f19b69
Parents:
c958e30
Message:

add switch to batch mode on guiframe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    r19b5c5c9 r80ddbd0  
    7474from sans.guiframe.panel_base import PanelBase 
    7575from sans.guiframe.gui_toolbar import GUIToolBar 
     76from sans.guiframe.events import EVT_NEW_BATCH 
    7677from DataLoader.loader import Loader 
    7778 
     
    244245        self.Bind(EVT_APPEND_BOOKMARK, self.append_bookmark) 
    245246        self.Bind(EVT_NEW_LOAD_DATA, self.on_load_data) 
    246          
     247        self.Bind(EVT_NEW_BATCH, self.on_batch_selection) 
    247248        self.setup_custom_conf() 
    248249     
     250    def on_batch_selection(self, event): 
     251        """ 
     252        :param event: contains parameter enable . when enable is set to True 
     253        the application is in Batch mode 
     254        else the application is default mode(single mode) 
     255        """ 
     256        self.batch_on = event.enable 
     257        for plug in self.plugins: 
     258            plug.set_bacth_selection(self.batch_on) 
     259             
    249260    def setup_custom_conf(self): 
    250261        """ 
Note: See TracChangeset for help on using the changeset viewer.