Changeset 3e41f43 in sasview for prview/perspectives/pr/pr.py


Ignore:
Timestamp:
Jan 10, 2011 12:42:27 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:
3658abed
Parents:
d65a00a
Message:

make pr plugin inheriting from pluginbase in guiframe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • prview/perspectives/pr/pr.py

    rb35d3d1 r3e41f43  
    3838(NewPrFileEvent, EVT_PR_FILE) = wx.lib.newevent.NewEvent() 
    3939 
    40  
    41 class Plugin: 
     40from sans.guiframe.plugin_base import PluginBase 
     41 
     42class Plugin(PluginBase): 
    4243    """ 
    4344    """ 
     
    4748     
    4849    def __init__(self, standalone=True): 
    49         """ 
    50         """ 
    51         ## Plug-in name 
    52         self.sub_menu = "Pr inversion" 
    53          
    54         ## Reference to the parent window 
    55         self.parent = None 
    56          
     50        PluginBase.__init__(self, name="Pr inversion", standalone=standalone) 
    5751        ## Simulation window manager 
    5852        self.simview = None 
    59          
    60         ## List of panels for the simulation perspective (names) 
    61         self.perspective = [] 
    62          
     53        
    6354        ## State data 
    6455        self.alpha      = self.DEFAULT_ALPHA 
     
    12881279        """ 
    12891280        self.control_panel._change_file(None) 
    1290      
    1291     def get_perspective(self): 
    1292         """ 
    1293             Get the list of panel names for this perspective 
    1294         """ 
    1295         return self.perspective 
    1296      
    1297     def on_perspective(self, event): 
    1298         """ 
    1299             Call back function for the perspective menu item. 
    1300             We notify the parent window that the perspective 
    1301             has changed. 
    1302         """ 
    1303         self.parent.set_perspective(self.perspective) 
    1304      
     1281 
    13051282    def post_init(self): 
    13061283        """ 
     
    13081285            [Somehow openGL needs this call] 
    13091286        """ 
    1310         if self.standalone==True: 
     1287        if self.standalone: 
    13111288            self.parent.set_perspective(self.perspective) 
    13121289   
Note: See TracChangeset for help on using the changeset viewer.