Changeset 4992ff2 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingOptions.py
- Timestamp:
- Nov 9, 2017 8:43:07 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:
- 7969b9c
- Parents:
- 7fb471d
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/30/17 07:50:09)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingOptions.py
- Property mode changed from 100755 to 100644
rb3e8629 r4992ff2 4 4 import types 5 5 6 from PyQt4 import QtCore 7 from PyQt4 import QtGui 8 from PyQt4 import QtWebKit 6 from PyQt5 import QtCore 7 from PyQt5 import QtGui 8 from PyQt5 import QtWidgets 9 from PyQt5 import QtWebKitWidgets 9 10 10 11 from sas.qtgui.UI import images_rc … … 21 22 22 23 23 class FittingOptions(Qt Gui.QDialog, Ui_FittingOptions):24 class FittingOptions(QtWidgets.QDialog, Ui_FittingOptions): 24 25 """ 25 26 Hard-coded version of the fit options dialog available from BUMPS. … … 52 53 53 54 # Handle the Apply button click 54 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).clicked.connect(self.onApply)55 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).clicked.connect(self.onApply) 55 56 # handle the Help button click 56 self.buttonBox.button(Qt Gui.QDialogButtonBox.Help).clicked.connect(self.onHelp)57 self.buttonBox.button(QtWidgets.QDialogButtonBox.Help).clicked.connect(self.onHelp) 57 58 58 59 # Handle the combo box changes … … 71 72 72 73 # OK has to be initialized to True, after initial validator setup 73 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).setEnabled(True)74 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 74 75 75 76 # Display HTML content 76 self.helpView = QtWebKit .QWebView()77 self.helpView = QtWebKitWidgets.QWebView() 77 78 78 79 def assignValidators(self): … … 104 105 if state == QtGui.QValidator.Acceptable: 105 106 color = '' # default 106 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).setEnabled(True)107 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 107 108 else: 108 109 color = '#fff79a' # yellow 109 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).setEnabled(False)110 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(False) 110 111 111 112 sender.setStyleSheet('QLineEdit { background-color: %s }' % color) … … 134 135 135 136 # OK has to be reinitialized to True 136 self.buttonBox.button(Qt Gui.QDialogButtonBox.Ok).setEnabled(True)137 self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 137 138 138 139 def onApply(self): … … 148 149 """ 149 150 widget = self.widgetFromOption(option) 150 new_value = widget.currentText() if isinstance(widget, Qt Gui.QComboBox) \151 new_value = widget.currentText() if isinstance(widget, QtWidgets.QComboBox) \ 151 152 else float(widget.text()) 152 153 self.config.values[self.current_fitter_id][option] = new_value
Note: See TracChangeset
for help on using the changeset viewer.