Ignore:
Timestamp:
Dec 14, 2017 9:51:02 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
7fd20fc, 626c7c5
Parents:
8353d90
Message:

Show help pages in default browser. Fixed some help links and modified unit tests. SASVIEW-800

File:
1 edited

Legend:

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

    r0261bc1 re90988c  
    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 
     
    127123 
    128124        # Display HTML content 
    129         self.helpView = QtWebKitWidgets.QWebView() 
     125        #self.setupHelp() 
    130126 
    131127        # New font to display angstrom symbol 
     
    662658        Show the "Fitting" section of help 
    663659        """ 
    664         tree_location = GuiUtils.HELP_DIRECTORY_LOCATION + "/user/sasgui/perspectives/fitting/" 
     660        tree_location = "/user/sasgui/perspectives/fitting/" 
    665661 
    666662        # Actual file will depend on the current tab 
     
    672668            helpfile = "residuals_help.html" 
    673669        elif tab_id == 2: 
    674             helpfile = "sm_help.html" 
     670            helpfile = "resolution.html" 
    675671        elif tab_id == 3: 
    676             helpfile = "pd_help.html" 
     672            helpfile = "pd/polydispersity.html" 
    677673        elif tab_id == 4: 
    678             helpfile = "mag_help.html" 
     674            helpfile = "magnetism/magnetism.html" 
    679675        help_location = tree_location + helpfile 
    680676 
    681         content = QtCore.QUrl(help_location) 
    682         self.helpView.load(QtCore.QUrl(help_location)) 
    683         self.helpView.show() 
     677        self.showHelp(help_location) 
     678 
     679    def showHelp(self, url): 
     680        """ 
     681        Calls parent's method for opening an HTML page 
     682        """ 
     683        self.parent.showHelp(url) 
    684684 
    685685    def onDisplayMagneticAngles(self): 
Note: See TracChangeset for help on using the changeset viewer.