Ignore:
Timestamp:
Jan 25, 2011 9:45:50 PM (14 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:
0912feab
Parents:
5385a9e
Message:

working on guiframe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/data_loader/data_loader.py

    rde48a1a r52b8b74  
    3535        self.loader = Loader()    
    3636         
    37     def populate_menu(self, id, owner): 
    38         """ 
    39         Create a menu for the Data plug-in 
    40          
    41         :param id: id to create a menu 
    42         :param owner: owner of menu 
    43          
    44         :return: list of information to populate the main menu 
    45          
    46         """ 
    47         #Menu for data loader 
    48         self.menu = wx.Menu() 
    49         #menu for data files 
    50         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 folder 
    56         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 items 
    62         return [(id, self.menu, "Data")] 
    63      
    6437    def populate_file_menu(self): 
    6538        """ 
     
    6942         
    7043        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]] 
    7245   
    73     def _load_data(self, event): 
     46    def load_data(self, event): 
    7447        """ 
    7548        Load data 
     
    8154        self.get_data(file_list, flag=flag) 
    8255         
    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): 
    8463        """ 
    8564        Load  sansview defined files 
     
    9170        self.get_data(file_list, flag=flag) 
    9271        
    93     def _load_folder(self, event): 
     72    def load_folder(self, event): 
    9473        """ 
    9574        Load entire folder 
     
    10180        file_list = self.get_file_path(path) 
    10281        self.get_data(file_list, flag=flag) 
    103      
     82        
    10483    def get_wild_card(self, flag=True): 
    10584        """ 
Note: See TracChangeset for help on using the changeset viewer.