Changeset 52b8b74 in sasview for guiframe/local_perspectives/data_loader
- Timestamp:
- Jan 25, 2011 9:45:50 PM (14 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:
- 0912feab
- Parents:
- 5385a9e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/data_loader/data_loader.py
rde48a1a r52b8b74 35 35 self.loader = Loader() 36 36 37 def populate_menu(self, id, owner):38 """39 Create a menu for the Data plug-in40 41 :param id: id to create a menu42 :param owner: owner of menu43 44 :return: list of information to populate the main menu45 46 """47 #Menu for data loader48 self.menu = wx.Menu()49 #menu for data files50 data_file_id = wx.NewId()51 data_file_hint = "load one or more data in the application"52 self.menu.Append(data_file_id,53 '&Load Data File(s)', data_file_hint)54 wx.EVT_MENU(owner, data_file_id, self._load_data)55 #menu for data from folder56 data_folder_id = wx.NewId()57 data_folder_hint = "load multiple data in the application"58 self.menu.Append(data_folder_id,59 '&Load Data Folder', data_folder_hint)60 wx.EVT_MENU(owner, data_folder_id, self._load_folder)61 #create menubar items62 return [(id, self.menu, "Data")]63 64 37 def populate_file_menu(self): 65 38 """ … … 69 42 70 43 hint_load_file = "Read state's files and load them into the application" 71 return [["Open State from File", hint_load_file, self. _load_file]]44 return [["Open State from File", hint_load_file, self.load_file]] 72 45 73 def _load_data(self, event):46 def load_data(self, event): 74 47 """ 75 48 Load data … … 81 54 self.get_data(file_list, flag=flag) 82 55 83 def _load_file(self, event): 56 def can_load_data(self): 57 """ 58 if return True, then call handler to laod data 59 """ 60 return True 61 62 def load_file(self, event): 84 63 """ 85 64 Load sansview defined files … … 91 70 self.get_data(file_list, flag=flag) 92 71 93 def _load_folder(self, event):72 def load_folder(self, event): 94 73 """ 95 74 Load entire folder … … 101 80 file_list = self.get_file_path(path) 102 81 self.get_data(file_list, flag=flag) 103 82 104 83 def get_wild_card(self, flag=True): 105 84 """
Note: See TracChangeset
for help on using the changeset viewer.