Changeset 7ad6ff5 in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Sep 11, 2009 4:19:50 PM (15 years ago)
Author:
Jae Cho <jhjcho@…>
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:
6ab0ad1
Parents:
be8c217
Message:

Added model detail button in fit panel

Location:
sansview/perspectives/fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/basepage.py

    r72f719b r7ad6ff5  
    11221122        self.struct_rbutton = wx.RadioButton(self, -1, "Structure Factor ") 
    11231123        self.plugin_rbutton = wx.RadioButton(self, -1, "Customized Models") 
    1124          
     1124                 
    11251125        self.Bind( wx.EVT_RADIOBUTTON, self._show_combox, 
    11261126                            id= self.shape_rbutton.GetId() )  
     
    17121712        self.SetScrollbars(20,20,200,100) 
    17131713         
    1714          
     1714    def on_model_help_clicked(self,event): 
     1715        """ 
     1716        #On 'More details' button 
     1717        """ 
     1718        from helpPanel import  HelpWindow 
     1719         
     1720        if self.model == None: 
     1721            name = 'FuncHelp' 
     1722        else: 
     1723            name = self.model.origin_name 
     1724 
     1725        frame = HelpWindow(None, -1,  pageToOpen="doc/model_functions.html")     
     1726        frame.Show(True) 
     1727        if frame.rhelp.HasAnchor(name): 
     1728            frame.rhelp.ScrollToAnchor(name) 
     1729        else: 
     1730           msg= "Model does not contains an available description " 
     1731           msg +="Please try searching in the Help window" 
     1732           wx.PostEvent(self.parent.parent, StatusEvent(status = msg ))                     
    17151733                 
  • sansview/perspectives/fitting/fitpage.py

    r58c6ba6 r7ad6ff5  
    4848        
    4949        self._fill_model_sizer( self.sizer1) 
     50  
    5051        self._fill_range_sizer()  
    5152        #self._on_select_model(event=None) 
     
    230231        self.sizer0.Layout() 
    231232        
    232          
    233         
    234233    def _fill_model_sizer(self, sizer): 
    235234        """ 
    236235            fill sizer containing model info 
    237236        """ 
    238         
     237        ##Add model function Details button in fitpanel. 
     238        id = wx.NewId() 
     239        self.model_help =wx.Button(self,id,'Details') 
     240        self.model_help.Bind(wx.EVT_BUTTON, self.on_model_help_clicked,id=id) 
     241        self.model_help.SetToolTipString("Model Function Help") 
     242         
    239243        ## class base method  to add view 2d button     
    240         self._set_model_sizer(sizer=sizer, title="Model",object=None )     
    241          
     244        self._set_model_sizer(sizer=sizer, title="Model",object=self.model_help )    
     245 
    242246     
    243247    #def _set_sizer_gaussian(self): 
     
    251255        
    252256        self.sizer4_4.Clear(True) 
    253         
    254257        if self.model==None: 
    255258            ##no model is selected 
     
    12861289        self.SetScrollbars(20,20,200,100) 
    12871290        
    1288              
    12891291         
    12901292class HelpWindow(wx.Frame): 
  • sansview/perspectives/fitting/fitting.py

    r1d67243 r7ad6ff5  
    946946        if model ==None: 
    947947            return 
    948         
     948        model.origin_name = model.name 
    949949        current_pg = self.fit_panel.get_current_page()  
    950950        ## make sure nothing is done on self.sim_page 
Note: See TracChangeset for help on using the changeset viewer.