Changeset d03a356 in sasview for sansguiframe/src/sans/guiframe/gui_manager.py
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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')
Note: See TracChangeset
for help on using the changeset viewer.