Changeset e90988c in sasview for src/sas/qtgui/Perspectives/Fitting
- Timestamp:
- Dec 14, 2017 9:51:02 AM (7 years ago)
- 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
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingOptions.py
rd6b8a1d re90988c 3 3 import os 4 4 import types 5 import webbrowser 5 6 6 7 from PyQt5 import QtCore 7 8 from PyQt5 import QtGui 8 9 from PyQt5 import QtWidgets 9 from PyQt5 import QtWebKitWidgets10 10 11 11 from sas.qtgui.UI import images_rc … … 73 73 # OK has to be initialized to True, after initial validator setup 74 74 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 75 76 # Display HTML content77 self.helpView = QtWebKitWidgets.QWebView()78 75 79 76 def assignValidators(self): … … 160 157 Show the "Fitting options" section of help 161 158 """ 162 tree_location = GuiUtils.HELP_DIRECTORY_LOCATION + "/user/sasgui/perspectives/fitting/" 159 tree_location = GuiUtils.HELP_DIRECTORY_LOCATION 160 tree_location += "/user/sasgui/perspectives/fitting/" 163 161 164 162 # Actual file anchor will depend on the combo box index … … 167 165 helpfile = "optimizer.html#fit-" + self.current_fitter_id 168 166 help_location = tree_location + helpfile 169 self.helpView.load(QtCore.QUrl(help_location)) 170 self.helpView.show() 167 webbrowser.open('file://' + os.path.realpath(help_location)) 171 168 172 169 def widgetFromOption(self, option_id, current_fitter=None): -
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
r7c487846 re90988c 13 13 from sas.qtgui.Perspectives.Fitting.FittingOptions import FittingOptions 14 14 from sas.qtgui.Perspectives.Fitting.GPUOptions import GPUOptions 15 #from sas.qtgui.Perspectives.Fitting import ModelUtilities16 15 17 16 class FittingWindow(QtWidgets.QTabWidget): -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r0261bc1 re90988c 8 8 from twisted.internet import threads 9 9 import numpy as np 10 import webbrowser 10 11 11 12 from PyQt5 import QtCore 12 13 from PyQt5 import QtGui 13 14 from PyQt5 import QtWidgets 14 from PyQt5 import QtWebKitWidgets15 # 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 QtWebEngineWidgets19 15 20 16 from sasmodels import product … … 127 123 128 124 # Display HTML content 129 self.helpView = QtWebKitWidgets.QWebView()125 #self.setupHelp() 130 126 131 127 # New font to display angstrom symbol … … 662 658 Show the "Fitting" section of help 663 659 """ 664 tree_location = GuiUtils.HELP_DIRECTORY_LOCATION +"/user/sasgui/perspectives/fitting/"660 tree_location = "/user/sasgui/perspectives/fitting/" 665 661 666 662 # Actual file will depend on the current tab … … 672 668 helpfile = "residuals_help.html" 673 669 elif tab_id == 2: 674 helpfile = " sm_help.html"670 helpfile = "resolution.html" 675 671 elif tab_id == 3: 676 helpfile = "pd _help.html"672 helpfile = "pd/polydispersity.html" 677 673 elif tab_id == 4: 678 helpfile = "mag _help.html"674 helpfile = "magnetism/magnetism.html" 679 675 help_location = tree_location + helpfile 680 676 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) 684 684 685 685 def onDisplayMagneticAngles(self): -
src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
rc7ebb37 re90988c 8 8 9 9 import sas.qtgui.Utilities.GuiUtils as GuiUtils 10 from PyQt5 import QtGui, QtCore, QtW ebKit, QtWidgets10 from PyQt5 import QtGui, QtCore, QtWidgets 11 11 from sas.qtgui.Perspectives.Fitting.UI.GPUOptionsUI import Ui_GPUOptions 12 12 from sas.qtgui.Perspectives.Fitting.UI.GPUTestResultsUI import Ui_GPUTestResults … … 172 172 help_location += "/user/sasgui/perspectives/fitting/gpu_setup.html" 173 173 help_location += "#device-selection" 174 # Test the system browser solution174 # Display the page in default browser 175 175 webbrowser.open('file://' + os.path.realpath(help_location)) 176 176
Note: See TracChangeset
for help on using the changeset viewer.