Changeset a48842a2 in sasview for calculatorview/src/sans
- Timestamp:
- Jun 13, 2012 4:40:41 PM (12 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:
- 1a98ded
- Parents:
- 9a14138
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/calculator.py
r9520702 ra48842a2 14 14 15 15 from sans.guiframe.plugin_base import PluginBase 16 from sans.perspectives.calculator.data_operator import DataOperatorWindow 16 17 import logging 17 18 … … 26 27 logging.info("Calculator plug-in started") 27 28 self.sub_menu = "Tool" 28 29 # data operator use one frame all the time 30 self.data_operator_frame = None 31 29 32 def help(self, evt): 30 33 """ … … 61 64 pyconsole_help = "Python Console." 62 65 #data_editor_help = "Meta Data Editor" 63 return [("SLD Calculator", sld_help, self.on_calculate_sld), 66 return [("Data Operation", 67 'Data operation', self.on_data_operation), 68 ("SLD Calculator", sld_help, self.on_calculate_sld), 64 69 ("Density/Volume Calculator", mass_volume_help, 65 70 self.on_calculate_dv), … … 76 81 Edit meta data 77 82 """ 78 from data_editor import DataEditorWindow83 from sans.perspectives.calculator.data_editor import DataEditorWindow 79 84 frame = DataEditorWindow(parent=self.parent, data=[], 80 85 title="Data Editor") 81 86 self.put_icon(frame) 82 87 frame.Show(True) 83 88 89 def on_data_operation(self, event): 90 """ 91 Data operation 92 """ 93 if self.data_operator_frame == None: 94 # Use one frame all the time 95 self.data_operator_frame = DataOperatorWindow(parent=self.parent, 96 title="Data Operation") 97 self.put_icon(self.data_operator_frame) 98 self.data_operator_frame.Show(False) 99 self.data_operator_frame.Show(True) 100 84 101 def on_calculate_kiessig(self, event): 85 102 """ 86 103 Compute the Kiessig thickness 87 104 """ 88 from kiessig_calculator_panel import KiessigWindow 105 from sans.perspectives.calculator.kiessig_calculator_panel \ 106 import KiessigWindow 89 107 frame = KiessigWindow() 90 108 self.put_icon(frame) … … 95 113 Compute the scattering length density of molecula 96 114 """ 97 from s ld_panel import SldWindow115 from sans.perspectives.calculator.sld_panel import SldWindow 98 116 frame = SldWindow(base=self.parent) 99 117 self.put_icon(frame) … … 104 122 Compute the mass density or molar voulme 105 123 """ 106 from density_panel import DensityWindow124 from sans.perspectives.calculator.density_panel import DensityWindow 107 125 frame = DensityWindow(base=self.parent) 108 126 self.put_icon(frame) … … 113 131 Compute the slit size a given data 114 132 """ 115 from slit_length_calculator_panel import SlitLengthCalculatorWindow 133 from sans.perspectives.calculator.slit_length_calculator_panel \ 134 import SlitLengthCalculatorWindow 116 135 frame = SlitLengthCalculatorWindow(parent=self.parent) 117 136 self.put_icon(frame) … … 122 141 Estimate the instrumental resolution 123 142 """ 124 from resolution_calculator_panel import ResolutionWindow 143 from sans.perspectives.calculator.resolution_calculator_panel \ 144 import ResolutionWindow 125 145 frame = ResolutionWindow(parent=self.parent) 126 146 self.put_icon(frame) … … 153 173 :param filename: file name to open in editor 154 174 """ 155 from pyconsole import PyConsole175 from sans.perspectives.calculator.pyconsole import PyConsole 156 176 frame = PyConsole(parent=self.parent, filename=filename) 157 177 self.put_icon(frame)
Note: See TracChangeset
for help on using the changeset viewer.