Changeset d03a356 in sasview for sansguiframe/src/sans
- Timestamp:
- Sep 23, 2011 11:44:43 AM (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:
- a582d28
- Parents:
- 5e48acb
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_panel.py
rea4ed10 rd03a356 330 330 id=self.rb_batch_mode.GetId()) 331 331 332 self.rb_single_mode.SetValue( True)333 self.rb_batch_mode.SetValue( False)332 self.rb_single_mode.SetValue(not self.parent.batch_on) 333 self.rb_batch_mode.SetValue(self.parent.batch_on) 334 334 self.sizer4.AddMany([(self.rb_single_mode,0, wx.ALL,5), 335 335 (self.rb_batch_mode,0, wx.ALL,5), -
sansguiframe/src/sans/guiframe/data_processor.py
rdadf255 rd03a356 75 75 self.data_inputs = {} 76 76 self.data_outputs = {} 77 self.data = {}77 self.data = None 78 78 self._cols = 50 79 79 self._rows = 51 … … 310 310 self.manager = manager 311 311 self.data = data 312 #add empty page 313 self.add_empty_page() 314 312 315 self.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.on_close_page) 313 316 317 def add_empty_page(self): 318 """ 319 """ 320 grid = GridPage(self, panel=self.parent) 321 self.AddPage(grid, "", True) 322 pos = self.GetPageIndex(grid) 323 title = "Batch " + str(self.GetPageCount()) 324 self.SetPageText(pos, title) 325 self.SetSelection(pos) 326 return grid 327 314 328 def enable_close_button(self): 315 329 """ … … 434 448 if data_outputs is None or data_outputs == {}: 435 449 return 436 grid = GridPage(self, panel=self.parent) 450 grid = self.add_empty_page() 451 #grid = GridPage(self, panel=self.parent) 437 452 grid.set_data(data_inputs, data_outputs) 438 self.AddPage(grid, "") 439 pos = self.GetPageIndex(grid) 440 title = "Batch " + str(self.GetPageCount()) 441 self.SetPageText(pos, title) 453 #self.AddPage(grid, "", True) 454 #pos = self.GetPageIndex(grid) 455 #title = "Batch " + str(self.GetPageCount()) 456 #self.SetPageText(pos, title) 457 #self.SetSelection(pos) 442 458 443 459 def add_column(self): -
sansguiframe/src/sans/guiframe/gui_manager.py
rd97dd6f rd03a356 262 262 self.loader = Loader() 263 263 #data manager 264 self.batch_on = True 264 265 from data_manager import DataManager 265 266 self._data_manager = DataManager() … … 276 277 self.batch_frame = GridFrame(parent=self) 277 278 self.batch_frame.Hide() 279 self.on_batch_selection(event=None) 278 280 # Check for update 279 281 #self._check_update(None) … … 305 307 file_name = self._default_save_location + str(file_name) 306 308 #Need to save configuration for later 309 """ 307 310 frame = BatchOutputFrame(parent=self, data_outputs=data_outputs, 308 311 data_inputs=data_inputs, 309 312 file_name=file_name, 310 313 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): 314 320 """ 315 321 Display value of data into the application grid … … 374 380 for row in range(index + 1, len(lines)-1)] 375 381 c_index += 1 376 self.open_with_localapp(data =data)382 self.open_with_localapp(data_outputs=data) 377 383 378 384 def write_batch_tofile(self, data, file_name, details=""): … … 432 438 433 439 434 def on_batch_selection(self, event ):440 def on_batch_selection(self, event=None): 435 441 """ 436 442 :param event: contains parameter enable . when enable is set to True … … 438 444 else the application is default mode(single mode) 439 445 """ 440 self.batch_on = event.enable 446 if event is not None: 447 self.batch_on = event.enable 441 448 for plug in self.plugins: 442 449 plug.set_batch_selection(self.batch_on) … … 671 678 is_loaded = False 672 679 for item in self.plugins: 680 item.set_batch_selection(self.batch_on) 673 681 if plugin.__class__ == item.__class__: 674 682 msg = "Plugin %s already loaded" % plugin.sub_menu … … 676 684 is_loaded = True 677 685 if not is_loaded: 678 679 self.plugins.append(plugin) 680 686 self.plugins.append(plugin) 681 687 682 688 def _get_local_plugins(self): … … 1192 1198 else: 1193 1199 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 1194 1207 self._view_menu.AppendSeparator() 1195 1208 id = wx.NewId() … … 1209 1222 self._menubar.Append(self._view_menu, '&View') 1210 1223 1224 def show_batch_frame(self, event=None): 1225 """ 1226 show the grid of result 1227 """ 1228 self.batch_frame.Show(True) 1229 1211 1230 def _on_preference_menu(self, event): 1212 1231 """ … … 1397 1416 wx.EVT_MENU(self, id, self._on_save_application) 1398 1417 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 1405 1419 id = wx.NewId() 1406 1420 self._file_menu.Append(id, '&Quit', 'Exit') -
sansguiframe/src/sans/guiframe/panel_base.py
r8c347a6 rd03a356 53 53 self._has_changed = False 54 54 self.batch_on = False 55 if self.parent is not None and hasattr(self.parent, "batch_on"): 56 self.batch_on = self.parent.batch_on 57 55 58 self.group_id = None 56 59 self.Bind(EVT_NEW_BATCH, self.on_batch_selection)
Note: See TracChangeset
for help on using the changeset viewer.