Changeset d65a00a in sasview
- Timestamp:
- Jan 10, 2011 12:41:22 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:
- 3e41f43
- Parents:
- a0ac888
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant.py
ra1f2002 rd65a00a 11 11 #copyright 2009, University of Tennessee 12 12 ################################################################################ 13 #import os 13 14 14 15 import sys 15 16 import wx 16 17 import copy 17 18 import logging 18 #import time 19 #from sans.invariant import invariant 19 20 20 21 21 from DataLoader.data_info import Data1D as LoaderData1D … … 30 30 from sans.guicomm.events import EVT_INVSTATE_UPDATE 31 31 32 class Plugin: 32 from sans.guiframe.plugin_base import PluginBase 33 34 class Plugin(PluginBase): 33 35 """ 34 36 This class defines the interface for invariant Plugin class … … 37 39 38 40 def __init__(self, standalone=False): 39 """ 40 Abstract class for gui_manager Plugins. 41 """ 42 ## Plug-in name. It will appear on the application menu. 43 self.sub_menu = "Invariant" 44 45 ## Reference to the parent window. Filled by get_panels() below. 46 self.parent = None 41 PluginBase.__init__(self, name="Invariant", standalone=standalone) 42 47 43 #dictionary containing data name and error on dy of that data 48 44 self.err_dy = {} 49 ## List of panels that you would like to open in AUI windows 50 # for your plug-in. This defines your plug-in "perspective" 51 self.perspective = [] 45 52 46 #default state objects 53 47 self.state_reader = None 54 48 self.temp_state = None 55 49 self.__data = None 56 """ 57 # Create a CanSAS/Pr reader 58 self.state_reader = Reader(self.set_state) 59 l = Loader() 60 l.associate_file_reader('.inv', self.state_reader) 61 """ 50 62 51 # Log startup 63 52 logging.info("Invariant plug-in started") 64 53 65 def populate_menu(self, id, parent): 66 """ 67 Create and return the list of application menu 68 items for the plug-in. 69 70 :param id: deprecated. Un-used. 71 :param parent: parent window 72 73 :return: plug-in menu 74 """ 75 return [] 76 54 77 55 def help(self, evt): 78 56 """ … … 113 91 # Return the list of panels 114 92 return [self.invariant_panel] 115 116 def get_tools(self): 117 """ 118 Returns a set of menu entries for tools 119 """ 120 return [] 121 122 93 123 94 def get_context_menu(self, graph=None): 124 95 """ … … 159 130 return [] 160 131 161 162 def get_perspective(self):163 """164 Get the list of panel names for this perspective165 """166 return self.perspective167 168 def on_perspective(self, event):169 """170 Call back function for the perspective menu item.171 We notify the parent window that the perspective172 has changed.173 174 :param event: menu event175 """176 self.parent.set_perspective(self.perspective)177 178 def post_init(self):179 """180 Post initialization call back to close the loose ends181 """182 pass183 184 def set_default_perspective(self):185 """186 Call back method that True to notify the parent that the current plug-in187 can be set as default perspective.188 when returning False, the plug-in is not candidate for an automatic189 default perspective setting190 """191 return False192 193 132 def copy_data(self, item, dy=None): 194 133 """
Note: See TracChangeset
for help on using the changeset viewer.