Changeset c558b47 in sasview for src/sas


Ignore:
Timestamp:
Feb 28, 2015 10:16:32 PM (9 years ago)
Author:
butler
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:
fc8f132
Parents:
f1e80df
Message:

added Help button to Data Operator Tool Panel and updated Help file with
new screen shot showing the new button

Location:
src/sas/perspectives/calculator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/calculator/data_operator.py

    rb9a5f0e rc558b47  
    1212from matplotlib.font_manager import FontProperties 
    1313from sas.guiframe.events import StatusEvent  
    14 from sas.perspectives.calculator import calculator_widgets as widget    
     14from sas.perspectives.calculator import calculator_widgets as widget 
     15from sas.guiframe.documentation_window import DocumentationWindow 
     16    
    1517#Control panel width  
    1618if sys.platform.count("win32") > 0: 
     
    430432        self.bt_apply.Bind(wx.EVT_BUTTON, self.on_click_apply) 
    431433         
     434        self.bt_help = wx.Button(self, -1, "HELP") 
     435        app_tip = "Get help on Data Operations." 
     436        self.bt_help.SetToolTipString(app_tip) 
     437        self.bt_help.Bind(wx.EVT_BUTTON, self.on_help) 
     438         
    432439        self.bt_close = wx.Button(self, -1, 'Close', size=(_BOX_WIDTH/2, -1)) 
    433440        self.bt_close.Bind(wx.EVT_BUTTON, self.on_close) 
     
    436443        self.button_sizer.AddMany([(PANEL_WIDTH/2, 25), 
    437444                                   (self.bt_apply, 0, wx.RIGHT, 10), 
     445                                   (self.bt_help, 0, wx.RIGHT, 10), 
    438446                                   (self.bt_close, 0, wx.RIGHT, 10)]) 
    439447         
     
    609617        event.Skip() 
    610618     
     619    def on_help(self, event):     
     620        """ 
     621        Bring up the General scattering Calculator Documentation whenever 
     622        the HELP button is clicked.  
     623         
     624        Calls DocumentationWindow with the path of the location within the 
     625        documentation tree (after /doc/ ....".  Note that when using old  
     626        versions of Wx (before 2.9) and thus not the release version of  
     627        installers, the help comes up at the top level of the file as  
     628        webbrowser does not pass anything past the # to the browser when it is 
     629        running "file:///...." 
     630     
     631    :param evt: Triggers on clicking the help button 
     632    """ 
     633                 
     634        _TreeLocation = "user/perspectives/calculator/data_operator_help.html" 
     635        _doc_viewer = DocumentationWindow(self, -1, \ 
     636             _TreeLocation,"Data Operation Help") 
     637 
    611638    def disconnect_panels(self): 
    612639        """ 
Note: See TracChangeset for help on using the changeset viewer.