Ignore:
Timestamp:
Nov 9, 2017 8:43:07 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:
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)
Message:

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

File:
1 edited

Legend:

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

    • Property mode changed from 100755 to 100644
    rb3e8629 r4992ff2  
    22Widget/logic for smearing data. 
    33""" 
    4 from PyQt4 import QtGui 
    5 from PyQt4 import QtCore 
     4from PyQt5 import QtCore 
     5from PyQt5 import QtGui 
     6from PyQt5 import QtWidgets 
    67 
    78from sas.qtgui.Plotting.PlotterData import Data1D 
     
    1112from sas.qtgui.Perspectives.Fitting.UI.SmearingWidgetUI import Ui_SmearingWidgetUI 
    1213 
    13 class DataWidgetMapper(QtGui.QDataWidgetMapper): 
     14class DataWidgetMapper(QtWidgets.QDataWidgetMapper): 
    1415    """ 
    1516    Custom version of the standard QDataWidgetMapper allowing for proper 
     
    2223            super(DataWidgetMapper, self).addMapping(widget, section, propertyName) 
    2324 
    24         if isinstance(widget, QtGui.QComboBox): 
     25        if isinstance(widget, QtWidgets.QComboBox): 
    2526            delegate = self.itemDelegate() 
    2627            widget.currentIndexChanged.connect(lambda: delegate.commitData.emit(widget)) 
     
    3536    'ACCURACY'] 
    3637 
    37 class SmearingWidget(QtGui.QWidget, Ui_SmearingWidgetUI): 
     38class SmearingWidget(QtWidgets.QWidget, Ui_SmearingWidgetUI): 
    3839    def __init__(self, parent=None): 
    3940        super(SmearingWidget, self).__init__() 
     
    8384        self.mapper.addMapping(self.cbSmearing,   MODEL.index('SMEARING')) 
    8485        self.mapper.addMapping(self.cbAccuracy,   MODEL.index('ACCURACY')) 
    85         self.mapper.toFirst() 
     86 
     87        # FIXME DOESNT WORK WITH QT5 
     88        #self.mapper.toFirst() 
    8689 
    8790    def updateSmearing(self, data=None): 
Note: See TracChangeset for help on using the changeset viewer.