source: sasview/sansview/perspectives/fitting/pageInfo.py @ fe886ee

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since fe886ee was dcf29d7, checked in by Gervaise Alina <gervyh@…>, 16 years ago

draw panel according to the fitting type
closing and reopen page i am still working on

  • Property mode set to 100644
File size: 2.6 KB
Line 
1
2
3import wx
4import copy
5
6class PageInfo(object):
7    """
8        Contains info to reconstruct a page
9    """
10    def __init__(self, parent,model=None, data=None):
11       
12        """
13            Initialization of the Panel
14        """
15        #TODO: remove this once the inheritence is cleaned up
16        ## Data member to store the dispersion object created
17        self._disp_obj_dict = {}
18
19        #Data used for fitting
20        self.data = data
21        # flag to allow data2D plot
22        self.enable2D=False
23        # model on which the fit would be performed
24        self.model = model
25        #fit page manager
26        self.manager = None
27        #Store the parent of this panel parent
28        # For this application fitpanel is the parent
29        self.parent  = parent
30        # Event_owner is the owner of model event
31        self.event_owner = None
32        ##page name
33        self.page_name=""
34        # Contains link between  model ,all its parameters, and panel organization
35        self.parameters=[]
36        # Contains list of parameters that cannot be fitted and reference to
37        #panel objects
38        self.fixed_param=[]
39        # Contains list of parameters with dispersity and reference to
40        #panel objects
41        self.fittable_param=[]
42        #list of dispersion paramaters
43        self.disp_list=[]
44        #contains link between a model and selected parameters to fit
45        self.param_toFit=[]
46        #dictionary of model type and model class
47        self.model_list_box =None
48        ## list of check box   
49        self.list_of_radiobox={} 
50        ## save  current value of combobox
51        self.formfactorcombobox = ""
52        self.structurecombobox  = ""
53        ## Qrange
54        self.qmin=None
55        self.qmax=None
56        self.npts=None
57       
58       
59                 
60    def save_radiobox_state(self, object ):
61        """
62            save  radiobox state
63            @param object: radiobox
64            self.list_of_check= ["label", id, state]
65           
66        """
67        label = object.GetLabel()
68        id = object.GetId()
69        state = object.GetValue()
70        self.list_of_radiobox[label]=[label, id, state]   
71   
72   
73    def clone(self):
74        model=None
75        if self.model !=None:
76            model = self.model.clone()
77       
78        obj          = PageInfo( self.parent,model= model )
79        obj.data = copy.deepcopy(self.data)
80        obj.model_list_box = copy.deepcopy(self.model_list_box)
81        obj.manager = self.manager
82        obj.event_owner = self.event_owner
83        return obj
84
85       
Note: See TracBrowser for help on using the repository browser.