Changeset 8c61e14 in sasview
- Timestamp:
- Apr 13, 2012 1:59:38 PM (13 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:
- 14d2daa
- Parents:
- 7a211030
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/local_perspectives/plotting/boxSum.py
rdb7a82e r8c61e14 1 2 3 1 """ 2 Boxsum Class: determine 2 rectangular area to compute 3 the sum of pixel of a Data. 4 """ 4 5 import math 5 6 import wx 6 from copy import deepcopy7 7 from BaseInteractor import _BaseInteractor 8 8 from sans.guiframe.events import SlicerParamUpdateEvent … … 57 57 self.has_move = False 58 58 ## Create Boxsum edges 59 self.horizontal_lines = HorizontalDoubleLine(self,59 self.horizontal_lines = HorizontalDoubleLine(self, 60 60 self.base.subplot, 61 61 color='blue', … … 67 67 self.horizontal_lines.qmax = self.qmax 68 68 69 self.vertical_lines = VerticalDoubleLine(self,69 self.vertical_lines = VerticalDoubleLine(self, 70 70 self.base.subplot, 71 71 color='black', … … 77 77 self.vertical_lines.qmax = self.qmax 78 78 79 self.center = PointInteractor(self,79 self.center = PointInteractor(self, 80 80 self.base.subplot,color='grey', 81 81 zorder=zorder, … … 400 400 self.move(x, y, None) 401 401 self.update() 402 403 def get_params(self):404 """405 """406 params = {}407 params["x"] = self.x408 params["y"] = self.y409 return params410 411 def set_params(self, params):412 """413 """414 center_x = params["x"]415 center_y = params["y"]416 self.update(center_x=center_x, center_y=center_y)417 418 402 419 403 class VerticalDoubleLine(_BaseInteractor): … … 606 590 self.update() 607 591 608 def get_params(self):609 """610 Store a copy of values of parameters of the slicer into a dictionary.611 @return params: the dictionary created612 """613 params = {}614 params["x"] = self.x1615 params["y"] = self.y1616 return params617 618 def set_params(self, params):619 """620 Receive a dictionary and reset the slicer with values contained621 in the values of the dictionary.622 @param params: a dictionary containing name of slicer parameters and623 values the user assigned to the slicer.624 """625 x = params["x"]626 y = params["y"]627 self.update(x=x, y=y, center_x=None, center_y=None)628 629 630 592 class HorizontalDoubleLine(_BaseInteractor): 631 593 """ … … 808 770 self.move(x, y, None) 809 771 self.update() 810 811 def get_params(self):812 """813 Store a copy of values of parameters of the slicer into a dictionary.814 :return params: the dictionary created815 """816 params = {}817 params["x"] = self.x818 params["y"] = self.y819 return params820 821 def set_params(self, params):822 """823 Receive a dictionary and reset the slicer with values contained824 in the values of the dictionary.825 :param params: a dictionary containing name of slicer parameters and826 values the user assigned to the slicer.827 """828 x = params["x"]829 y = params["y"]830 self.update(x=x, y=y, center_x=None,center_y=None)831 772 832 833
Note: See TracChangeset
for help on using the changeset viewer.