Changeset 7f84e22 in sasview


Ignore:
Timestamp:
Jan 10, 2011 12:51:41 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:
691643c
Parents:
3658abed
Message:

make sure plugin plotting inheritate from pluginbase in guiframe

File:
1 edited

Legend:

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

    r32c0841 r7f84e22  
    1717from sans.guicomm.events import StatusEvent  
    1818 
     19from sans.guiframe.plugin_base import PluginBase 
    1920 
    20 class Plugin: 
     21class Plugin(PluginBase): 
    2122    """ 
    2223    Plug-in class to be instantiated by the GUI manager 
    2324    """ 
    2425     
    25     def __init__(self): 
    26         """ 
    27         Initialize the plug-in 
    28         """ 
    29         ## Plug-in name 
    30         self.sub_menu = "Plotting" 
    31          
    32         ## Reference to the parent window 
    33         self.parent = None 
    34          
    35         ## List of panels for the simulation perspective (names) 
    36         self.perspective = [] 
    37          
     26    def __init__(self, standalone=False): 
     27        PluginBase.__init__(self, name="Plotting", standalone=standalone) 
     28       
    3829        ## Plot panels 
    3930        self.plot_panels = [] 
     
    6657        return [] 
    6758    
    68     def get_perspective(self): 
    69         """ 
    70         Get the list of panel names for this perspective 
    71         """ 
    72         return self.perspective 
    73      
    74     def on_perspective(self, event): 
    75         """ 
    76             Call back function for the perspective menu item. 
    77             We notify the parent window that the perspective 
    78             has changed. 
    79             @param event: menu event 
    80         """ 
    81         self.parent.set_perspective(self.perspective) 
    82      
    83     def post_init(self): 
    84         """ 
    85         Post initialization call back to close the loose ends 
    86         [Somehow openGL needs this call] 
    87         """ 
    88         pass 
    89      
    9059    def _on_show_panel(self, event): 
    9160        """show plug-in panel""" 
Note: See TracChangeset for help on using the changeset viewer.