Changeset e90988c in sasview for src/sas/qtgui/MainWindow
- 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/MainWindow
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
rcb4d219 re90988c 8 8 from PyQt5 import QtGui 9 9 from PyQt5 import QtWidgets 10 from PyQt5 import QtWebKitWidgets11 10 12 11 from twisted.internet import threads … … 70 69 self.cmdHelp_2.clicked.connect(self.displayHelp) 71 70 72 # Display HTML content73 self._helpView = QtWebKitWidgets.QWebView()74 75 71 # Fill in the perspectives combo 76 72 self.initPerspectives() … … 141 137 Show the "Loading data" section of help 142 138 """ 143 tree_location = GuiUtils.HELP_DIRECTORY_LOCATION +\ 144 "/user/sasgui/guiframe/data_explorer_help.html" 145 self._helpView.load(QtCore.QUrl(tree_location)) 146 self._helpView.show() 139 tree_location = "/user/sasgui/guiframe/data_explorer_help.html" 140 self.parent.showHelp(tree_location) 147 141 148 142 def enableGraphCombo(self, combo_text): -
src/sas/qtgui/MainWindow/GuiManager.py
r8353d90 re90988c 87 87 self.statusBarSetup() 88 88 89 # Current help file90 self._helpView = QWebView()91 89 # Needs URL like path, so no path.join() here 92 90 self._helpLocation = GuiUtils.HELP_DIRECTORY_LOCATION + "/index.html" … … 164 162 """ 165 163 pass 164 165 def showHelp(self, url): 166 """ 167 Open a local url in the default browser 168 """ 169 location = GuiUtils.HELP_DIRECTORY_LOCATION + url 170 try: 171 webbrowser.open('file://' + os.path.realpath(location)) 172 except webbrowser.Error as ex: 173 logging.warning("Cannot display help. %s" % ex) 166 174 167 175 def workspace(self): … … 718 726 TODO: use QNetworkAccessManager to assure _helpLocation is valid 719 727 """ 720 self._helpView.load(QUrl(self._helpLocation)) 721 self._helpView.show() 728 self.showHelp(self._helpLocation) 722 729 723 730 def actionTutorial(self):
Note: See TracChangeset
for help on using the changeset viewer.