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/OptionsWidget.py

    • Property mode changed from 100755 to 100644
    rb0b09b9 r0849aec  
    33""" 
    44import numpy as np 
    5 from PyQt4 import QtGui 
    6 from PyQt4 import QtCore 
     5from PyQt5 import QtCore 
     6from PyQt5 import QtGui 
     7from PyQt5 import QtWidgets 
    78 
    89from sas.qtgui.Plotting.PlotterData import Data2D 
     
    2122    'LOG_SPACED'] 
    2223 
    23 class DataWidgetMapper(QtGui.QDataWidgetMapper): 
     24class DataWidgetMapper(QtWidgets.QDataWidgetMapper): 
    2425    """ 
    2526    Custom version of the standard QDataWidgetMapper allowing for proper 
     
    3233            super(DataWidgetMapper, self).addMapping(widget, section, propertyName) 
    3334 
    34         if isinstance(widget, QtGui.QComboBox): 
     35        if isinstance(widget, QtWidgets.QComboBox): 
    3536            delegate = self.itemDelegate() 
    3637            widget.currentIndexChanged.connect(lambda: delegate.commitData.emit(widget)) 
    3738 
    38         elif isinstance(widget, QtGui.QCheckBox): 
     39        elif isinstance(widget, QtWidgets.QCheckBox): 
    3940            delegate = self.itemDelegate() 
    4041            widget.stateChanged.connect(lambda: delegate.commitData.emit(widget)) 
    4142 
    42 class OptionsWidget(QtGui.QWidget, Ui_tabOptions): 
     43class OptionsWidget(QtWidgets.QWidget, Ui_tabOptions): 
    4344    plot_signal = QtCore.pyqtSignal() 
    4445    def __init__(self, parent=None, logic=None): 
     
    5253 
    5354        # Weight radio box group 
    54         self.weightingGroup = QtGui.QButtonGroup() 
     55        self.weightingGroup = QtWidgets.QButtonGroup() 
    5556        self.weighting = 0 
    5657 
     
    114115        self.mapper.addMapping(self.txtNpts,     MODEL.index('NPTS')) 
    115116        self.mapper.addMapping(self.chkLogData,  MODEL.index('LOG_SPACED')) 
    116         self.mapper.toFirst() 
     117        # FIXME DOESNT WORK WITH QT5 
     118        #self.mapper.toFirst() 
    117119 
    118120    def toggleLogData(self, isChecked): 
Note: See TracChangeset for help on using the changeset viewer.