Changes in / [21ea13e:ef17deb] in sasview


Ignore:
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • .pydevproject

    r79492222 r79492222  
    44<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property> 
    55<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> 
    6 <path>/sasview-git/src</path> 
     6<path>/sasview/src</path> 
    77</pydev_pathproperty> 
    88</pydev_project> 
  • src/sas/guiframe/CategoryManager.py

    r79492222 r4faed25  
    8080    def __init__(self, parent, win_id, title): 
    8181        """ 
    82         Category Manager Dialog class 
     82        Category Manager Dialog class.  This is the class that is used to 
     83        bring up a dialog box allowing the user to create new model categories 
     84        and to add and remove models from a given category allowing complete 
     85        user customization of categories for models.  This and Category  
     86        Installer provide the mecahnisms for creating the category dictionary 
     87        which is saved as a json file so that categories remain persistent 
     88        from session to session 
    8389        :param win_id: A new wx ID 
    8490        :param title: Title for the window 
     
    8894        self.performance_blocking = False 
    8995 
     96        # get the current status of model categorization (from the dictionary) 
    9097        self.master_category_dict = defaultdict(list) 
    9198        self.by_model_dict = defaultdict(list) 
    9299        self.model_enabled_dict = defaultdict(bool) 
    93100 
     101        #----------Initialize panels, frames, and sizers ------------ 
     102        # the whole panel is panel of hbox (a horizontal sizer and contains 
     103        # the left_pane (vbox2 sizer) which houses all the buttons and 
     104        # the right_pane (vbox sizer) which houses the current model/category  
     105        #list) 
     106        #     Comments added June 14, 2015 -PDB 
    94107        wx.Frame.__init__(self, parent, win_id, title, size=(660, 400)) 
    95108 
     
    114127        self._set_enabled()       
    115128 
     129        #----------button and button layout ----------------------- 
    116130        vbox2 = wx.BoxSizer(wx.VERTICAL) 
    117131 
     132        #Create buttons 
    118133        sel = wx.Button(left_panel, -1, 'Enable All', size=(100, -1)) 
    119134        des = wx.Button(left_panel, -1, 'Disable All', size=(100, -1)) 
     
    121136                                  size=(100, -1)) 
    122137        ok_button = wx.Button(left_panel, -1, 'OK', size=(100, -1)) 
     138        help_button = wx.Button(left_panel, -1, 'HELP', size=(100, -1)) 
    123139        cancel_button = wx.Button(left_panel, -1, 'Cancel',  
    124140                                  size=(100, -1))         
     
    126142         
    127143 
     144        #bind buttons to action method 
    128145        self.Bind(wx.EVT_BUTTON, self._on_selectall,  
    129146                  id=sel.GetId()) 
     
    134151        self.Bind(wx.EVT_BUTTON, self._on_ok,  
    135152                  id = ok_button.GetId()) 
     153        self.Bind(wx.EVT_BUTTON, self._on_help,  
     154                  id = help_button.GetId()) 
    136155        self.Bind(wx.EVT_BUTTON, self._on_cancel,  
    137156                  id = cancel_button.GetId()) 
    138157 
     158        #add buttons to sizer (vbox2) and convert to panel so displays well 
     159        #on all platforms 
    139160        vbox2.Add(modify_button, 0, wx.TOP, 10) 
    140161        vbox2.Add((-1, 20)) 
     
    143164        vbox2.Add((-1, 20)) 
    144165        vbox2.Add(ok_button) 
     166        vbox2.Add(help_button) 
    145167        vbox2.Add(cancel_button) 
    146168 
    147169        left_panel.SetSizer(vbox2) 
    148170 
     171        #--------------------- layout of current cat/model list -------- 
    149172        vbox.Add(self.cat_list, 1, wx.EXPAND | wx.TOP, 3) 
    150173        vbox.Add((-1, 10)) 
     
    153176        right_panel.SetSizer(vbox) 
    154177 
     178        #-------------- put it all together ----------------- 
    155179        hbox.Add(left_panel, 0, wx.EXPAND | wx.RIGHT, 5) 
    156180        hbox.Add(right_panel, 1, wx.EXPAND) 
     
    294318        self.Destroy() 
    295319 
     320    def _on_help(self, event): 
     321        """ 
     322        Bring up the Category Manager Panel Documentation whenever 
     323        the HELP button is clicked. 
     324 
     325        Calls DocumentationWindow with the path of the location within the 
     326        documentation tree (after /doc/ ....".  Note that when using old 
     327        versions of Wx (before 2.9) and thus not the release version of 
     328        installers, the help comes up at the top level of the file as 
     329        webbrowser does not pass anything past the # to the browser when it is 
     330        running "file:///...." 
     331 
     332    :param evt: Triggers on clicking the help button 
     333    """ 
     334 
     335        #import documentation window here to avoid circular imports 
     336        #if put at top of file with rest of imports. 
     337        from documentation_window import DocumentationWindow 
     338 
     339        _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
     340        _PageAnchor = "#category-manager" 
     341        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, _PageAnchor, 
     342                                          "Category Manager Help") 
     343 
    296344    def _on_cancel(self, event): 
    297345        """ 
  • src/sas/guiframe/data_processor.py

    r76aed53 r56e99f9  
    1818from sas.plottools import plottables 
    1919from sas.guiframe.dataFitting import Data1D 
     20 
    2021 
    2122FUNC_DICT = {"sqrt": "math.sqrt", 
     
    11301131            wx.PostEvent(self.parent.parent, StatusEvent(status=msg, info="error")) 
    11311132 
     1133    def on_help(self, event): 
     1134        """ 
     1135        Bring up the Batch Grid Panel Usage Documentation whenever 
     1136        the HELP button is clicked. 
     1137 
     1138        Calls DocumentationWindow with the path of the location within the 
     1139        documentation tree (after /doc/ ....".  Note that when using old 
     1140        versions of Wx (before 2.9) and thus not the release version of 
     1141        installers, the help comes up at the top level of the file as 
     1142        webbrowser does not pass anything past the # to the browser when it is 
     1143        running "file:///...." 
     1144 
     1145    :param evt: Triggers on clicking the help button 
     1146    """ 
     1147        #import documentation window here to avoid circular imports 
     1148        #if put at top of file with rest of imports. 
     1149        from documentation_window import DocumentationWindow 
     1150 
     1151        _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
     1152        _PageAnchor = "#batch-fit-mode" 
     1153        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, _PageAnchor, 
     1154                                          "Batch Mode Help") 
     1155 
    11321156    def get_sentence(self, dict, sentence, column_names): 
    11331157        """ 
     
    11861210 
    11871211        self.plot_button.SetToolTipString(plot_tip) 
     1212 
     1213        self.help_button = wx.Button(self, -1, "HELP") 
     1214        self.help_button.SetToolTipString("Get Help for Batch Mode") 
     1215        self.help_button.Bind(wx.EVT_BUTTON, self.on_help) 
     1216 
    11881217        boxsizer1.AddMany([(note_text, 0, wx.LEFT, 10), 
    11891218                           (self.view_button, 0, wx.LEFT | wx.RIGHT, 10)]) 
     
    11911220                                    wx.LEFT | wx.RIGHT | wx.BOTTOM, 10), 
    11921221                                   (self.plot_button, 0, 
    1193                                     wx.LEFT | wx.TOP | wx.BOTTOM | wx.EXPAND, 12)]) 
     1222                                    wx.LEFT | wx.TOP | wx.BOTTOM, 12), 
     1223                                   (self.help_button,0,  
     1224                                    wx.LEFT | wx.TOP | wx.BOTTOM, 12)]) 
    11941225 
    11951226        wx.EVT_BUTTON(self, self.plot_button.GetId(), self.on_plot) 
  • src/sas/guiframe/documentation_window.py

    rdb41746 rf202138  
    1515 
    1616class DocumentationWindow(wx.Frame): 
    17     def __init__(self, parent, id, path, title, size=(850, 540)): 
     17    def __init__(self, parent, id, path, url_instruction, title, size=(850, 540)): 
    1818        wx.Frame.__init__(self, parent, id, title, size=size) 
    1919 
     
    2828 
    2929        file_path = os.path.join(docs_path, path) 
    30         url = "file://" + urllib.quote(file_path) 
     30        url = "file:///" + urllib.quote(file_path,'\:')+ url_instruction 
    3131 
    3232        if not os.path.exists(file_path): 
     
    4848def main(): 
    4949    app = wx.App() 
    50     DocumentationWindow(None, -1, "index.html", "Documentation",) 
     50    DocumentationWindow(None, -1, "index.html", "", "Documentation",) 
    5151    app.MainLoop() 
    5252 
  • src/sas/guiframe/gui_manager.py

    r5276eeb r7801df8  
    21662166        # different place than they would otherwise. 
    21672167        from documentation_window import DocumentationWindow 
    2168         DocumentationWindow(self, -1, "index.html", "General Help") 
     2168        DocumentationWindow(self, -1, "index.html", "", "SasView Documentation") 
    21692169 
    21702170    def set_manager(self, manager): 
  • 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): 
  • src/sas/perspectives/fitting/basepage.py

    r373d4ee r7116dffd  
    28472847        """ 
    28482848 
    2849         if self.model == None: 
    2850             name = 'index.html' 
     2849        _TreeLocation = 'user/models/model_functions.html' 
     2850        if self.model != None: 
     2851            name = self.formfactorbox.GetValue() 
     2852            _PageAnchor = '#' + name 
     2853            _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, 
     2854                                              _PageAnchor, name + "Help") 
    28512855        else: 
    2852             name = self.formfactorbox.GetValue() 
    2853  
    2854         if self.model != None: 
    2855             _docspath = 'user/models/model_functions.html#' + name 
    2856             _doc_viewer = DocumentationWindow(self, -1, _docspath, name + "Help") 
    2857         else: 
    2858             _doc_viewer = DocumentationWindow(self, -1, "index.html", \ 
    2859                                                 "General Help") 
     2856            _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     2857                                                "General Model Help") 
    28602858 
    28612859 
     
    28912889            wx.MessageBox(msg, info) 
    28922890 
    2893     def _on_mag_help(self, event): 
     2891    def _on_mag_angle_help(self, event): 
    28942892        """ 
    28952893        Bring up Magnetic Angle definition bmp image whenever the ? button 
     
    29082906 
    29092907        _TreeLocation = "_images/M_angles_pic.bmp" 
    2910         _doc_viewer = DocumentationWindow(self, -1, \ 
    2911              _TreeLocation, "Magnetic Angle Defintions") 
     2908        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     2909                                          "Magnetic Angle Defintions") 
     2910 
     2911    def _on_mag_help(self, event): 
     2912        """ 
     2913        Bring up Magnetic Angle definition bmp image whenever the ? button 
     2914        is clicked. Calls DocumentationWindow with the path of the location 
     2915        within the documentation tree (after /doc/ ....". When using old 
     2916        versions of Wx (i.e. before 2.9 and therefore not part of release 
     2917        versions distributed via installer) it brings up an image viewer 
     2918        box which allows the user to click through the rest of the images in 
     2919        the directory.  Not ideal but probably better than alternative which 
     2920        would bring up the entire discussion of how magnetic models work? 
     2921        Specially since it is not likely to be accessed.  The normal release 
     2922        versions bring up the normal image box. 
     2923 
     2924        :param evt: Triggers on clicking ? in Magnetic Angles? box 
     2925        """ 
     2926 
     2927        _TreeLocation = "user/perspectives/fitting/mag_help.html" 
     2928        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     2929                                          "Polarized Beam/Magnetc Help") 
    29122930 
    29132931    def _on_mag_on(self, event): 
     
    29532971        """ 
    29542972 
    2955         _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
    2956         _TreeLocation += "#polydispersity-distributions" 
    2957         _doc_viewer = DocumentationWindow(self, -1, \ 
    2958              _TreeLocation, "Polydispersity Help") 
     2973        _TreeLocation = "user/perspectives/fitting/pd_help.html" 
     2974        _PageAnchor = "" 
     2975        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, 
     2976                                          _PageAnchor, "Polydispersity Help") 
    29592977 
    29602978    def on_left_down(self, event): 
  • src/sas/perspectives/fitting/fitpage.py

    r5265420 rf3dc56c  
    1616from sas.guiframe.utils import format_number 
    1717from sas.guiframe.utils import check_float 
     18from sas.guiframe.documentation_window import DocumentationWindow 
    1819 
    1920(Chi2UpdateEvent, EVT_CHI2_UPDATE) = wx.lib.newevent.NewEvent() 
     
    188189    def _fill_range_sizer(self): 
    189190        """ 
    190         Fill the sizer containing the plotting range 
    191         add  access to npts 
     191        Fill the Fitting sizer on the fit panel which contains: the smearing 
     192        information (dq), the weighting information (dI or other), the plotting 
     193        range, access to the 2D mask editor, the compute, fit, and help 
     194        buttons, xi^2, number of points etc. 
    192195        """ 
    193196        is_2Ddata = False 
     
    265268        weighting_box.Add(sizer_weighting) 
    266269 
    267         sizer_fit = wx.GridSizer(2, 4, 2, 6) 
     270        sizer_fit = wx.GridSizer(2, 5, 2, 6) 
    268271 
    269272        # combobox for smear2d accuracy selection 
     
    284287        self.btFit.SetToolTipString("Start fitting.") 
    285288 
     289        #General Help button 
     290        self.btFitHelp = wx.Button(self, -1, 'HELP') 
     291        self.btFitHelp.SetToolTipString("General Fitting Help.") 
     292        self.btFitHelp.Bind(wx.EVT_BUTTON, self._onFitHelp) 
     293         
     294        #Resolution Smearing Help button (for now use same technique as 
     295        #used for dI help to get tiniest possible button that works 
     296        #both on MAC and PC.  Should completely rewrite the fitting sizer  
     297        #in future.  This is minimum to get out release 3.1 
     298        #        comment June 14, 2015     --- PDB 
     299        if sys.platform.count("win32") > 0: 
     300            size_q = (20, 15)  #on PC 
     301        else: 
     302            size_q = (30, 20)  #on MAC 
     303        self.btSmearHelp = wx.Button(self, -1, '?', style=wx.BU_EXACTFIT,\ 
     304                                     size=size_q) 
     305        self.btSmearHelp.SetToolTipString("Resolution Smearing Help.") 
     306        self.btSmearHelp.Bind(wx.EVT_BUTTON, self._onSmearHelp) 
     307         
    286308        #textcntrl for custom resolution 
    287309        self.smear_pinhole_max = ModelTextCtrl(self, -1, 
     
    341363 
    342364        # add 4 types of smearing to the sizer 
     365        # Note from June 14, 2015 
     366        # removed the extra (10,10) spaces to make room for help.  Actually 
     367        # don't see the need for those anyway as the wx.LEFT, xx should take 
     368        # care of spacing anyway though it does not seem to work for some 
     369        # reason.  Currently leaving as we are in "code freeze" only making 
     370        # minimal changes necessary for release 3.1.  We probably want to clean 
     371        # up the whole fitpage (and basepage and fitpanel etc) eventually. 
     372        #                          ---- PDB 
    343373        sizer_smearer.Add(self.disable_smearer, 0, wx.LEFT, 10) 
    344         sizer_smearer.Add((10, 10)) 
     374#        sizer_smearer.Add((10, 10)) 
    345375        sizer_smearer.Add(self.enable_smearer) 
    346         sizer_smearer.Add((10, 10)) 
     376#        sizer_smearer.Add((10, 10)) 
    347377        sizer_smearer.Add(self.pinhole_smearer) 
    348         sizer_smearer.Add((10, 10)) 
     378#        sizer_smearer.Add((10, 10)) 
    349379        sizer_smearer.Add(self.slit_smearer) 
     380#        sizer_smearer.Add((10, 10)) 
     381        sizer_smearer.Add(self.btSmearHelp) 
    350382        sizer_smearer.Add((10, 10)) 
    351383 
     
    391423        #sizer_fit.Add(box_description_3, 0, 0) 
    392424        sizer_fit.Add(self.draw_button, 0, 0) 
     425        sizer_fit.Add((-1,5)) 
    393426        sizer_fit.Add(self.tcChi, 0, 0) 
    394427        sizer_fit.Add(self.Npts_fit, 0, 0) 
    395428        sizer_fit.Add(self.Npts_total, 0, 0) 
    396429        sizer_fit.Add(self.btFit, 0, 0) 
     430        sizer_fit.Add(self.btFitHelp, 0, 0) 
    397431 
    398432        # StaticText for smear 
     
    10461080        self.fit_started = self._manager.onFit(uid=self.uid) 
    10471081        wx.CallAfter(self.set_fitbutton) 
     1082 
     1083    def _onFitHelp(self, event): 
     1084        """ 
     1085        Bring up the Full Fitting Documentation whenever the HELP button is 
     1086        clicked. 
     1087 
     1088        Calls DocumentationWindow with the path of the location within the 
     1089        documentation tree (after /doc/ ....".  Note that when using old 
     1090        versions of Wx (before 2.9) and thus not the release version of 
     1091        installers, the help comes up at the top level of the file as 
     1092        webbrowser does not pass anything past the # to the browser when it is 
     1093        running "file:///...." 
     1094 
     1095    :param evt: Triggers on clicking the help button 
     1096    """ 
     1097 
     1098        _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
     1099        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     1100                                          "General Fitting Help") 
     1101 
     1102    def _onSmearHelp(self, event): 
     1103        """ 
     1104        Bring up the instrumental resolution smearing Documentation whenever 
     1105        the ? button in the smearing box is clicked. 
     1106 
     1107        Calls DocumentationWindow with the path of the location within the 
     1108        documentation tree (after /doc/ ....".  Note that when using old 
     1109        versions of Wx (before 2.9) and thus not the release version of 
     1110        installers, the help comes up at the top level of the file as 
     1111        webbrowser does not pass anything past the # to the browser when it is 
     1112        running "file:///...." 
     1113 
     1114    :param evt: Triggers on clicking the help button 
     1115    """ 
     1116 
     1117        _TreeLocation = "user/perspectives/fitting/sm_help.html" 
     1118        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     1119                                          "Instrumental Resolution Smearing \ 
     1120                                          Help") 
    10481121 
    10491122    def set_fitbutton(self): 
     
    30123085                orient_angle = wx.StaticText(self, -1, '[For 2D only]:') 
    30133086                mag_on_button = wx.Button(self, -1, "Magnetic ON") 
     3087                mag_on_button.SetToolTipString("Turn Pol Beam/Mag scatt on/off") 
    30143088                mag_on_button.Bind(wx.EVT_BUTTON, self._on_mag_on) 
    3015                 mag_help_button = wx.Button(self, -1, "Magnetic angles?") 
     3089                mag_angle_help_button = wx.Button(self, -1, "Magnetic angles?") 
     3090                mag_angle_help_button.SetToolTipString("see angle definitions") 
     3091                mag_help_button = wx.Button(self, -1, "Mag HELP") 
     3092                mag_help_button.SetToolTipString("Help on pol beam/mag fitting") 
    30163093                mag_help_button.Bind(wx.EVT_BUTTON, self._on_mag_help) 
     3094                mag_angle_help_button.Bind(wx.EVT_BUTTON, \ 
     3095                                            self._on_mag_angle_help) 
    30173096                sizer.Add(orient_angle, (iy, ix), (1, 1), 
    30183097                          wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
     
    30203099                sizer.Add(mag_on_button, (iy, ix), (1, 1), 
    30213100                          wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
     3101                ix += 1 
     3102                sizer.Add(mag_angle_help_button, (iy, ix), (1, 1), 
     3103                          wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
    30223104                sizer.Add(mag_help_button, (iy, ix + 1), (1, 1), 
    30233105                          wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
    30243106 
    30253107                #handle the magnetic buttons 
     3108                #clean this up so that assume mag is off then turn  
     3109                #all buttons on IF mag has mag and has 2D 
    30263110                if not self._has_magnetic: 
    30273111                    mag_on_button.Show(False) 
     
    30353119                        mag_on_button.SetLabel("Magnetic OFF") 
    30363120                        mag_help_button.Show(True) 
     3121                        mag_angle_help_button.Show(True) 
    30373122                    else: 
    30383123                        mag_on_button.SetLabel("Magnetic ON") 
    30393124                        mag_help_button.Show(False) 
     3125                        mag_angle_help_button.Show(False) 
    30403126 
    30413127                if not self.data.__class__.__name__ == "Data2D" and \ 
  • src/sas/perspectives/invariant/invariant_panel.py

    rcce0ad3 r3db44fb  
    18931893 
    18941894        _TreeLocation = "user/perspectives/invariant/invariant_help.html" 
    1895         _doc_viewer = DocumentationWindow(self, -1, \ 
    1896              _TreeLocation, "Invariant Help") 
     1895        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     1896                                         "Invariant Help") 
    18971897 
    18981898 
  • src/sas/perspectives/pr/inversion_panel.py

    r3d250da3 r3db44fb  
    958958 
    959959        _TreeLocation = "user/perspectives/pr/pr_help.html" 
    960         _doc_viewer = DocumentationWindow(self, -1, \ 
    961              _TreeLocation, "P(r) Help") 
     960        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     961                                         "P(r) Help") 
    962962 
    963963 
Note: See TracChangeset for help on using the changeset viewer.