Ignore:
Timestamp:
Jul 11, 2016 2:36:55 AM (8 years ago)
Author:
lewis
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b564ea2
Parents:
e02d8f6
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/06/16 09:35:07)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 02:36:55)
Message:

Minor refactor and add some comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    re02d8f6 r9c90cf3  
    5252 
    5353    def set_state(self, state=None, data=None): 
     54        """ 
     55        Set the state of the panel. If no state is provided, the panel will 
     56        be set to the default state. 
     57 
     58        :param state: A CorfuncState object 
     59        :param data: A Data1D object 
     60        """ 
    5461        if state is None: 
    5562            self.state = CorfuncState() 
     
    109116        """ 
    110117        Return an XML node containing the state of the panel 
     118 
     119        :param doc: Am xml node to attach the project state to (optional) 
    111120        """ 
    112121        data = self._data 
     
    123132                    doc = new_doc 
    124133        return doc 
     134 
     135    def set_qmin(self, qmin): 
     136        self.qmin = qmin 
     137        self._qmin_input.SetValue(str(qmin)) 
     138 
     139    def set_qmax(self, qmax): 
     140        self.qmax = qmax 
     141        self._qmax1_input.SetValue(str(qmax[0])) 
     142        self._qmax2_input.SetValue(str(qmax[1])) 
    125143 
    126144 
     
    145163                active=event.GetEventObject(), id=data_id, group_id=group_id, 
    146164                leftdown=False)) 
    147  
    148     def set_qmin(self, qmin): 
    149         self.qmin = qmin 
    150         self._qmin_input.SetValue(str(qmin)) 
    151  
    152     def set_qmax(self, qmax): 
    153         self.qmax = qmax 
    154         self._qmax1_input.SetValue(str(qmax[0])) 
    155         self._qmax2_input.SetValue(str(qmax[1])) 
    156165 
    157166    def _validate_qrange(self): 
Note: See TracChangeset for help on using the changeset viewer.