Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    ra3c94b54 rd3c0b95  
    88from twisted.internet import threads 
    99import numpy as np 
     10import webbrowser 
    1011 
    1112from PyQt5 import QtCore 
    1213from PyQt5 import QtGui 
    1314from PyQt5 import QtWidgets 
    14 from PyQt5 import QtWebKitWidgets 
    15 # Officially QtWebEngineWidgets are the way to display HTML in Qt5, 
    16 # but this module isn't ported to PyQt5 yet... 
    17 # let's wait. In the meantime no Help. 
    18 #from PyQt5 import QtWebEngineWidgets 
    1915 
    2016from sasmodels import product 
     
    130126 
    131127        # Display HTML content 
    132         self.helpView = QtWebKitWidgets.QWebView() 
     128        #self.setupHelp() 
    133129 
    134130        # New font to display angstrom symbol 
     
    945941        Show the "Fitting" section of help 
    946942        """ 
    947         tree_location = GuiUtils.HELP_DIRECTORY_LOCATION + "/user/sasgui/perspectives/fitting/" 
     943        tree_location = "/user/sasgui/perspectives/fitting/" 
    948944 
    949945        # Actual file will depend on the current tab 
     
    955951            helpfile = "residuals_help.html" 
    956952        elif tab_id == 2: 
    957             helpfile = "sm_help.html" 
     953            helpfile = "resolution.html" 
    958954        elif tab_id == 3: 
    959             helpfile = "pd_help.html" 
     955            helpfile = "pd/polydispersity.html" 
    960956        elif tab_id == 4: 
    961             helpfile = "mag_help.html" 
     957            helpfile = "magnetism/magnetism.html" 
    962958        help_location = tree_location + helpfile 
    963959 
    964         content = QtCore.QUrl(help_location) 
    965         self.helpView.load(QtCore.QUrl(help_location)) 
    966         self.helpView.show() 
     960        self.showHelp(help_location) 
     961 
     962    def showHelp(self, url): 
     963        """ 
     964        Calls parent's method for opening an HTML page 
     965        """ 
     966        self.parent.showHelp(url) 
    967967 
    968968    def onDisplayMagneticAngles(self): 
Note: See TracChangeset for help on using the changeset viewer.