Changeset e82a901 in sasview for src/sas/perspectives/calculator


Ignore:
Timestamp:
Jun 10, 2015 12:17:59 AM (10 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:
56e99f9
Parents:
7801df8 (diff), f202138 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasview.git

Conflicts:

src/sas/guiframe/documentation_window.py

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

Legend:

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

    ra27e8b8 r3db44fb  
    635635 
    636636        _TreeLocation = "user/perspectives/calculator/data_operator_help.html" 
    637         _doc_viewer = DocumentationWindow(self, -1, \ 
    638              _TreeLocation, "Data Operation Help") 
     637        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     638                                         "Data Operation Help") 
    639639 
    640640    def disconnect_panels(self): 
  • src/sas/perspectives/calculator/density_panel.py

    rd5419f7f r3db44fb  
    385385 
    386386        _TreeLocation = "user/perspectives/calculator/density_calculator_help.html" 
    387         _doc_viewer = DocumentationWindow(self, -1, \ 
    388              _TreeLocation, "Density/Volume Calculator Help") 
     387        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     388                                         "Density/Volume Calculator Help") 
    389389 
    390390    def on_close(self, event): 
  • src/sas/perspectives/calculator/gen_scatter_panel.py

    rd5419f7f r3db44fb  
    914914 
    915915        _TreeLocation = "user/perspectives/calculator/sas_calculator_help.html" 
    916         _doc_viewer = DocumentationWindow(self, -1, \ 
    917              _TreeLocation, "General Scattering Calculator Help") 
     916        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     917                                         "General Scattering Calculator Help") 
    918918 
    919919    def _check_value(self): 
  • src/sas/perspectives/calculator/image_viewer.py

    r49ab5d7 r3db44fb  
    150150 
    151151        _TreeLocation = "user/perspectives/calculator/image_viewer_help.html" 
    152         _doc_viewer = DocumentationWindow(self, -1, \ 
    153              _TreeLocation, "Image Viewer Help") 
     152        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     153                                         "Image Viewer Help") 
    154154 
    155155 
  • src/sas/perspectives/calculator/kiessig_calculator_panel.py

    rd5419f7f r3db44fb  
    173173    """ 
    174174        _TreeLocation = "user/perspectives/calculator/kiessig_calculator_help.html" 
    175         _doc_viewer = DocumentationWindow(self, -1, 
    176                                           _TreeLocation, 
     175        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
    177176                                          "Density/Volume Calculator Help") 
    178177 
  • src/sas/perspectives/calculator/model_editor.py

    rac7be54 r7801df8  
    2929import re 
    3030from wx.py.editwindow import EditWindow 
     31from sas.guiframe.documentation_window import DocumentationWindow 
     32 
    3133 
    3234if sys.platform.count("win32") > 0: 
     
    271273        # Eventually need to add help here 
    272274        self.ok_button = wx.Button(self, wx.ID_OK, 'Apply') 
     275        _app_tip = "Save the new Model." 
     276        self.ok_button.SetToolTipString(_app_tip) 
    273277        self.ok_button.Bind(wx.EVT_BUTTON, self.check_name) 
     278        self.help_button = wx.Button(self, -1, 'HELP') 
     279        _app_tip = "Help on composite model creation." 
     280        self.help_button.SetToolTipString(_app_tip) 
     281        self.help_button.Bind(wx.EVT_BUTTON, self.on_help) 
    274282        self.close_button = wx.Button(self, wx.ID_CANCEL, 'Close') 
    275283        sizer_button = wx.BoxSizer(wx.HORIZONTAL) 
    276284        sizer_button.AddMany([((20, 20), 1, 0), 
    277285                              (self.ok_button, 0, 0), 
     286                              (self.help_button, 0, 0), 
    278287                              (self.close_button, 0, wx.LEFT | wx.RIGHT, 10)]) 
    279288        mainsizer.Add(sizer_button, 0, wx.EXPAND | wx.BOTTOM | wx.TOP, 10) 
     
    392401        else: 
    393402            raise 
     403 
     404    def on_help(self, event): 
     405        """ 
     406        Bring up the Composite Model Editor Documentation whenever 
     407        the HELP button is clicked. 
     408 
     409        Calls DocumentationWindow with the path of the location within the 
     410        documentation tree (after /doc/ ....".  Note that when using old 
     411        versions of Wx (before 2.9) and thus not the release version of 
     412        installers, the help comes up at the top level of the file as 
     413        webbrowser does not pass anything past the # to the browser when it is 
     414        running "file:///...." 
     415 
     416    :param evt: Triggers on clicking the help button 
     417    """ 
     418 
     419        _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
     420        _PageAnchor = "#sum-multi-p1-p2" 
     421        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, _PageAnchor, 
     422                                          "Composite Model Editor Help") 
    394423 
    395424    def _set_model_list(self): 
     
    756785        self.bt_apply.Bind(wx.EVT_BUTTON, self.on_click_apply) 
    757786 
     787        self.bt_help = wx.Button(self, -1, "HELP", size=(_BOX_WIDTH, -1)) 
     788        self.bt_help.SetToolTipString("Get Help For Model Editor") 
     789        self.bt_help.Bind(wx.EVT_BUTTON, self.on_help) 
     790 
    758791        self.bt_close = wx.Button(self, -1, 'Close', size=(_BOX_WIDTH, -1)) 
    759792        self.bt_close.Bind(wx.EVT_BUTTON, self.on_close) 
     
    762795        self.button_sizer.AddMany([(self.bt_apply, 0, 
    763796                                    wx.LEFT, EDITOR_WIDTH * 0.8), 
     797                                   (self.bt_help, 0, 
     798                                    wx.LEFT,15), 
    764799                                   (self.bt_close, 0, 
    765800                                    wx.LEFT | wx.BOTTOM, 15)]) 
     
    10891124        """ 
    10901125        return self.warning 
     1126 
     1127    def on_help(self, event): 
     1128        """ 
     1129        Bring up the Custom Model Editor Documentation whenever 
     1130        the HELP button is clicked. 
     1131 
     1132        Calls DocumentationWindow with the path of the location within the 
     1133        documentation tree (after /doc/ ....".  Note that when using old 
     1134        versions of Wx (before 2.9) and thus not the release version of 
     1135        installers, the help comes up at the top level of the file as 
     1136        webbrowser does not pass anything past the # to the browser when it is 
     1137        running "file:///...." 
     1138 
     1139    :param evt: Triggers on clicking the help button 
     1140    """ 
     1141 
     1142        _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
     1143        _PageAnchor = "#custom-model-editor" 
     1144        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, _PageAnchor, 
     1145                                          "Custom Model Editor Help") 
    10911146 
    10921147    def on_close(self, event): 
  • src/sas/perspectives/calculator/resolution_calculator_panel.py

    rd5419f7f r3db44fb  
    642642 
    643643        _TreeLocation = "user/perspectives/calculator/resolution_calculator_help.html" 
    644         _doc_viewer = DocumentationWindow(self, -1, 
    645                                           _TreeLocation, "Resolution Calculator Help") 
     644        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     645                                          "Resolution Calculator Help") 
    646646 
    647647    def on_close(self, event): 
  • src/sas/perspectives/calculator/sld_panel.py

    rd5419f7f r3db44fb  
    326326 
    327327        _TreeLocation = "user/perspectives/calculator/sld_calculator_help.html" 
    328         _doc_viewer = DocumentationWindow(self, -1, \ 
    329              _TreeLocation, "General Scattering Calculator Help") 
     328        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     329                                         "General Scattering Calculator Help") 
    330330 
    331331    def on_close(self, event): 
  • src/sas/perspectives/calculator/slit_length_calculator_panel.py

    rd5419f7f r3db44fb  
    187187 
    188188        _TreeLocation = "user/perspectives/calculator/slit_calculator_help.html" 
    189         _doc_viewer = DocumentationWindow(self, -1, \ 
    190              _TreeLocation, "Slit Length Calculator Help") 
     189        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     190                                         "Slit Length Calculator Help") 
    191191 
    192192    def on_close(self, event): 
Note: See TracChangeset for help on using the changeset viewer.