Changeset 1543f0c in sasview for src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
- Timestamp:
- Nov 10, 2017 7:24:52 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:
- f1f3e6a
- Parents:
- 1ba88515
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/GPUOptions.py
rf629e62f r1543f0c 7 7 8 8 import sas.qtgui.Utilities.GuiUtils as GuiUtils 9 from PyQt 4 import QtGui, QtCore, QtWebKit9 from PyQt5 import QtGui, QtCore, QtWebKit, QtWidgets 10 10 from sas.qtgui.Perspectives.Fitting.UI.GPUOptionsUI import Ui_GPUOptions 11 11 from sas.qtgui.Perspectives.Fitting.UI.GPUTestResultsUI import Ui_GPUTestResults … … 18 18 19 19 try: 20 _encoding = Qt Gui.QApplication.UnicodeUTF820 _encoding = QtWidgets.QApplication.UnicodeUTF8 21 21 def _translate(context, text, disambig): 22 return Qt Gui.QApplication.translate(context, text, disambig, _encoding)22 return QtWidgets.QApplication.translate(context, text, disambig, _encoding) 23 23 except AttributeError: 24 24 def _translate(context, text, disambig): 25 return Qt Gui.QApplication.translate(context, text, disambig)26 27 28 class GPUOptions(Qt Gui.QDialog, Ui_GPUOptions):25 return QtWidgets.QApplication.translate(context, text, disambig) 26 27 28 class GPUOptions(QtWidgets.QDialog, Ui_GPUOptions): 29 29 """ 30 30 OpenCL Dialog to select the desired OpenCL driver … … 39 39 self.setupUi(self) 40 40 self.addOpenCLOptions() 41 self.setFixedSize(self.size())42 41 self.createLinks() 43 42 … … 51 50 for title, descr in cl_tuple: 52 51 # Create an item for each openCL option 53 check_box = Qt Gui.QCheckBox()52 check_box = QtWidgets.QCheckBox() 54 53 check_box.setObjectName(_fromUtf8(descr)) 55 54 check_box.setText(_translate("GPUOptions", descr, None)) … … 59 58 check_box.click() 60 59 self.clicked = True 61 self.openCLCheckBoxGroup.setMinimumWidth( 62 self.optionsLayout.sizeHint().width()) 63 self.setMinimumWidth(self.verticalLayout.sizeHint().width()) 60 self.openCLCheckBoxGroup.setMinimumWidth(self.optionsLayout.sizeHint().width()+10) 64 61 65 62 def createLinks(self): … … 69 66 self.testButton.clicked.connect(self.testButtonClicked) 70 67 self.helpButton.clicked.connect(self.helpButtonClicked) 71 for item in self.openCLCheckBoxGroup.findChildren(Qt Gui.QCheckBox):68 for item in self.openCLCheckBoxGroup.findChildren(QtWidgets.QCheckBox): 72 69 item.clicked.connect(self.checked) 73 70 … … 77 74 """ 78 75 checked = None 79 for box in self.openCLCheckBoxGroup.findChildren(Qt Gui.QCheckBox):76 for box in self.openCLCheckBoxGroup.findChildren(QtWidgets.QCheckBox): 80 77 if box.isChecked() and (str(box.text()) == self.sas_open_cl or ( 81 78 str(box.text()) == "No OpenCL" and self.sas_open_cl == "")): … … 103 100 if 'sasmodels.kernelcl' in sys.modules: 104 101 sasmodels.kernelcl.ENV = None 102 from importlib import reload # assumed Python > 3.3 105 103 reload(sasmodels.core) 106 104 return no_opencl_msg … … 199 197 200 198 201 class GPUTestResults(Qt Gui.QDialog, Ui_GPUTestResults):199 class GPUTestResults(QtWidgets.QDialog, Ui_GPUTestResults): 202 200 """ 203 201 OpenCL Dialog to modify the OpenCL options … … 207 205 self.setupUi(self) 208 206 self.resultsText.setText(_translate("GPUTestResults", msg, None)) 209 self.setFixedSize(self.size())207 #self.setFixedSize(self.size()) 210 208 self.open() 211 209
Note: See TracChangeset
for help on using the changeset viewer.