Changeset 80ddbd0 in sasview
- Timestamp:
- Jul 18, 2011 3:32:45 PM (13 years ago)
- 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
- Location:
- guiframe
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_panel.py
r05ab3f0 r80ddbd0 35 35 from sans.guiframe.events import NewPlotEvent 36 36 from sans.guiframe.gui_style import GUIFRAME 37 from sans.guiframe.events import NewBatchEvent 37 38 from DataLoader.loader import Loader 38 39 … … 340 341 self.sizer4.AddMany([(self.rb_single_mode,0, wx.ALL,5), 341 342 (self.rb_batch_mode,0, wx.ALL,5)]) 343 344 def on_single_mode(self, event): 345 """ 346 change guiframe to its single mode 347 """ 348 if self.parent is not None: 349 wx.PostEvent(self.parent, 350 NewBatchEvent(enable=False)) 351 print "single mode" 352 353 def on_batch_mode(self, event): 354 """ 355 change guiframe to its batch mode 356 """ 357 if self.parent is not None: 358 wx.PostEvent(self.parent, 359 NewBatchEvent(enable=True)) 360 print "batch mode" 342 361 343 362 def layout_data_list(self): -
guiframe/gui_manager.py
r19b5c5c9 r80ddbd0 74 74 from sans.guiframe.panel_base import PanelBase 75 75 from sans.guiframe.gui_toolbar import GUIToolBar 76 from sans.guiframe.events import EVT_NEW_BATCH 76 77 from DataLoader.loader import Loader 77 78 … … 244 245 self.Bind(EVT_APPEND_BOOKMARK, self.append_bookmark) 245 246 self.Bind(EVT_NEW_LOAD_DATA, self.on_load_data) 246 247 self.Bind(EVT_NEW_BATCH, self.on_batch_selection) 247 248 self.setup_custom_conf() 248 249 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 249 260 def setup_custom_conf(self): 250 261 """ -
guiframe/plugin_base.py
r60fff67 r80ddbd0 47 47 # for your plug-in. This defines your plug-in "perspective" 48 48 self.perspective = [] 49 #flag to tell the current plugin that aaplication is in batch mode 50 self.batch_on = False 49 51 50 52 def clear_panel(self): … … 197 199 self.parent.set_current_perspective(self) 198 200 self.parent.set_perspective(self.perspective) 201 202 def set_bacth_selection(self, flag): 203 """ 204 the plugin to its batch state if flag is True 205 """ 206 self.batch_on = flag 207 self.on_batch_selection(self.batch_on) 208 209 def on_batch_selection(self, flag): 210 """ 211 need to be overwritten by the derivated class 212 """ 199 213 200 214 def post_init(self):
Note: See TracChangeset
for help on using the changeset viewer.