Ignore:
Timestamp:
Jun 9, 2010 4:45:37 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:
1b43306
Parents:
16f60cb
Message:

disable data editor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/perspectives/calculator/calculator.py

    r91f151a r6137b150  
    1 """ 
    2 This software was developed by the University of Tennessee as part of the 
    3 Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
    4 project funded by the US National Science Foundation.  
    51 
    6 See the license text in license.txt 
    7  
    8 copyright 2010, University of Tennessee 
    9 """ 
     2################################################################################ 
     3#This software was developed by the University of Tennessee as part of the 
     4#Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
     5#project funded by the US National Science Foundation.  
     6# 
     7#See the license text in license.txt 
     8# 
     9#copyright 2010, University of Tennessee 
     10################################################################################ 
    1011 
    1112import wx 
     
    1415class Plugin: 
    1516    """ 
    16         This class defines the interface for a Plugin class 
    17         for calculator perspective 
     17    This class defines the interface for a Plugin class 
     18    for calculator perspective 
    1819    """ 
    1920     
    2021    def __init__(self, standalone=True): 
    2122        """ 
    22             Abstract class for gui_manager Plugins. 
     23        Abstract class for gui_manager Plugins. 
    2324        """ 
    2425        ## Plug-in name. It will appear on the application menu. 
     
    3637    def populate_menu(self, id, owner): 
    3738        """ 
    38             Create and return the list of application menu 
    39             items for the plug-in.  
    40              
    41             @param id: deprecated. Un-used. 
    42             @param parent: parent window 
    43             @return: plug-in menu 
     39        Create and return the list of application menu 
     40        items for the plug-in.  
     41         
     42        :param id: deprecated. Un-used. 
     43        :param parent: parent window 
     44         
     45        :return: plug-in menu 
     46         
    4447        """ 
    4548        return [] 
     
    4750    def get_panels(self, parent): 
    4851        """ 
    49             Create and return the list of wx.Panels for your plug-in. 
    50             Define the plug-in perspective. 
    51              
    52             Panels should inherit from DefaultPanel defined below, 
    53             or should present the same interface. They must define 
    54             "window_caption" and "window_name". 
    55              
    56             @param parent: parent window 
    57             @return: list of panels 
     52        Create and return the list of wx.Panels for your plug-in. 
     53        Define the plug-in perspective. 
     54         
     55        Panels should inherit from DefaultPanel defined below, 
     56        or should present the same interface. They must define 
     57        "window_caption" and "window_name". 
     58         
     59        :param parent: parent window 
     60         
     61        :return: list of panels 
     62         
    5863        """ 
    5964        ## Save a reference to the parent 
     
    6570    def help(self, evt): 
    6671        """ 
    67             Show a general help dialog.  
    68             TODO: replace the text with a nice image 
     72        Show a general help dialog.  
     73         
     74        :TODO: replace the text with a nice image 
    6975            provide more hint on the SLD calculator 
    7076        """ 
     
    7581    def get_context_menu(self, graph=None): 
    7682        """ 
    77             This method is optional. 
     83        This method is optional. 
     84     
     85        When the context menu of a plot is rendered, the  
     86        get_context_menu method will be called to give you a  
     87        chance to add a menu item to the context menu. 
    7888         
    79             When the context menu of a plot is rendered, the  
    80             get_context_menu method will be called to give you a  
    81             chance to add a menu item to the context menu. 
    82              
    83             A ref to a Graph object is passed so that you can 
    84             investigate the plot content and decide whether you 
    85             need to add items to the context menu.   
    86              
    87             This method returns a list of menu items. 
    88             Each item is itself a list defining the text to  
    89             appear in the menu, a tool-tip help text, and a 
    90             call-back method. 
     89        A ref to a Graph object is passed so that you can 
     90        investigate the plot content and decide whether you 
     91        need to add items to the context menu.   
     92         
     93        This method returns a list of menu items. 
     94        Each item is itself a list defining the text to  
     95        appear in the menu, a tool-tip help text, and a 
     96        call-back method. 
    9197             
    9298            @param graph: the Graph object to which we attach the context menu 
     
    97103    def get_perspective(self): 
    98104        """ 
    99             Get the list of panel names for this perspective 
     105        Get the list of panel names for this perspective 
    100106        """ 
    101107        return self.perspective 
     
    104110    def get_tools(self): 
    105111        """ 
    106             Returns a set of menu entries for tools 
     112        Returns a set of menu entries for tools 
    107113        """ 
    108114        sld_help = "Provides computation related to Scattering Length Density" 
     
    111117        return [("SLD Calculator", sld_help, self.on_calculate_sld), 
    112118                ("Slit Size Calculator", slit_length_help, 
    113                                 self.on_calculate_slit_size), 
    114                 ("Data Editor", data_editor_help, 
    115                      self.on_edit_data)] 
     119                                self.on_calculate_slit_size)]#, 
     120                #("Data Editor", data_editor_help, self.on_edit_data)] 
    116121               
    117122    def on_edit_data(self, event): 
    118123        """ 
    119             Edit meta data  
     124        Edit meta data  
    120125        """ 
    121126        from data_editor import DataEditorWindow 
     
    125130    def on_calculate_sld(self, event): 
    126131        """ 
    127             Compute the scattering length density of molecula 
     132        Compute the scattering length density of molecula 
    128133        """ 
    129134        from sld_panel import SldWindow 
     
    133138    def on_calculate_slit_size(self, event): 
    134139        """ 
    135             Compute the slit size a given data 
     140        Compute the slit size a given data 
    136141        """ 
    137142        from slit_length_calculator_panel import SlitLengthCalculatorWindow 
     
    141146    def on_perspective(self, event): 
    142147        """ 
    143             Call back function for the perspective menu item. 
    144             We notify the parent window that the perspective 
    145             has changed. 
    146             @param event: menu event 
     148        Call back function for the perspective menu item. 
     149        We notify the parent window that the perspective 
     150        has changed. 
     151         
     152        :param event: menu event 
     153         
    147154        """ 
    148155        self.parent.set_perspective(self.perspective) 
     
    151158    def post_init(self): 
    152159        """ 
    153             Post initialization call back to close the loose ends 
     160        Post initialization call back to close the loose ends 
    154161        """ 
    155162        pass 
Note: See TracChangeset for help on using the changeset viewer.