Ignore:
Timestamp:
Oct 30, 2017 7:50:09 AM (7 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:
304d082
Parents:
99ea1b0
Message:

Initial, in-progress version. Not really working atm. SASVIEW-787

File:
1 edited

Legend:

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

    • Property mode changed from 100755 to 100644
    rb0b09b9 r0849aec  
    44import types 
    55 
    6 from PyQt4 import QtCore 
    7 from PyQt4 import QtGui 
    8 from PyQt4 import QtWebKit 
     6from PyQt5 import QtCore 
     7from PyQt5 import QtGui 
     8from PyQt5 import QtWidgets 
     9from PyQt5 import QtWebKitWidgets 
    910 
    1011from sas.qtgui.UI import images_rc 
     
    2122 
    2223 
    23 class FittingOptions(QtGui.QDialog, Ui_FittingOptions): 
     24class FittingOptions(QtWidgets.QDialog, Ui_FittingOptions): 
    2425    """ 
    2526    Hard-coded version of the fit options dialog available from BUMPS. 
     
    5253 
    5354        # Handle the Apply button click 
    54         self.buttonBox.button(QtGui.QDialogButtonBox.Ok).clicked.connect(self.onApply) 
     55        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).clicked.connect(self.onApply) 
    5556        # handle the Help button click 
    56         self.buttonBox.button(QtGui.QDialogButtonBox.Help).clicked.connect(self.onHelp) 
     57        self.buttonBox.button(QtWidgets.QDialogButtonBox.Help).clicked.connect(self.onHelp) 
    5758 
    5859        # Handle the combo box changes 
     
    7172 
    7273        # OK has to be initialized to True, after initial validator setup 
    73         self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True) 
     74        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 
    7475 
    7576        # Display HTML content 
    76         self.helpView = QtWebKit.QWebView() 
     77        self.helpView = QtWebKitWidgets.QWebView() 
    7778 
    7879    def assignValidators(self): 
     
    104105        if state == QtGui.QValidator.Acceptable: 
    105106            color = '' # default 
    106             self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True) 
     107            self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 
    107108        else: 
    108109            color = '#fff79a' # yellow 
    109             self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(False) 
     110            self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(False) 
    110111 
    111112        sender.setStyleSheet('QLineEdit { background-color: %s }' % color) 
     
    134135 
    135136        # OK has to be reinitialized to True 
    136         self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True) 
     137        self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) 
    137138 
    138139    def onApply(self): 
     
    148149            """ 
    149150            widget = self.widgetFromOption(option) 
    150             new_value = widget.currentText() if isinstance(widget, QtGui.QComboBox) \ 
     151            new_value = widget.currentText() if isinstance(widget, QtWidgets.QComboBox) \ 
    151152                else float(widget.text()) 
    152153            self.config.values[self.current_fitter_id][option] = new_value 
Note: See TracChangeset for help on using the changeset viewer.