Changeset 895e7359 in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Oct 27, 2017 3:42:57 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:
99ea1b0
Parents:
b0b09b9
Message:

Converted more syntax not covered by 2to3

Location:
src/sas/sasgui/guiframe/local_perspectives/plotting
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/plotting/AnnulusSlicer.py

    r83eb5208 r895e7359  
    147147        new_plot.xtransform = "x" 
    148148        new_plot.ytransform = "y" 
    149         variant_plot = QtCore.QVariant(new_plot) 
    150         GuiUtils.updateModelItemWithPlot(self._item, variant_plot, new_plot.id) 
     149        GuiUtils.updateModelItemWithPlot(self._item, new_plot, new_plot.id) 
    151150        self.base.manager.communicator.plotUpdateSignal.emit([new_plot]) 
    152151 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/SectorSlicer.py

    rc416a17 r895e7359  
    126126        data = self.base.data 
    127127        # If we have no data, just return 
    128         if data == None: 
     128        if data is None: 
    129129            return 
    130130        # Averaging 
     
    133133        phimin = -self.left_line.phi + self.main_line.theta 
    134134        phimax = self.left_line.phi + self.main_line.theta 
    135         if nbins == None: 
     135        if nbins is None: 
    136136            nbins = 20 
    137137        sect = SectorQ(r_min=0.0, r_max=radius, 
     
    169169        new_plot.id = "SectorQ" + self.base.data.name 
    170170        new_plot.is_data = True 
    171         variant_plot = QtCore.QVariant(new_plot) 
    172         GuiUtils.updateModelItemWithPlot(self._item, variant_plot, new_plot.id) 
     171        GuiUtils.updateModelItemWithPlot(self._item, new_plot, new_plot.id) 
    173172        self.base.manager.communicator.plotUpdateSignal.emit([new_plot]) 
    174173 
     
    356355        if phi != None: 
    357356            self.phi = phi 
    358         if delta == None: 
     357        if delta is None: 
    359358            delta = 0 
    360359        if  right: 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py

    r83eb5208 r895e7359  
    190190        new_plot.id = (self.averager.__name__) + self.base.data.name 
    191191        new_plot.is_data = True 
    192         variant_plot = QtCore.QVariant(new_plot) 
    193         GuiUtils.updateModelItemWithPlot(self._item, variant_plot, new_plot.id) 
     192        GuiUtils.updateModelItemWithPlot(self._item, new_plot, new_plot.id) 
    194193 
    195194        if self.update_model: 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/boxSum.py

    rc416a17 r895e7359  
    110110        parameters = self.getParams() 
    111111        # Crete/overwrite model items 
    112         self._model.setData(self._model.index(0, 0), 
    113                     QtCore.QVariant(formatNumber(parameters['Height']))) 
    114         self._model.setData(self._model.index(0, 1), 
    115                     QtCore.QVariant(formatNumber(parameters['Width']))) 
    116         self._model.setData(self._model.index(0, 2), 
    117                     QtCore.QVariant(formatNumber(parameters['center_x']))) 
    118         self._model.setData(self._model.index(0, 3), 
    119                     QtCore.QVariant(formatNumber(parameters['center_y']))) 
     112        self._model.setData(self._model.index(0, 0), formatNumber(parameters['Height'])) 
     113        self._model.setData(self._model.index(0, 1), formatNumber(parameters['Width'])) 
     114        self._model.setData(self._model.index(0, 2), formatNumber(parameters['center_x'])) 
     115        self._model.setData(self._model.index(0, 3), formatNumber(parameters['center_y'])) 
    120116 
    121117        self.setReadOnlyParametersFromModel() 
     
    130126        """ 
    131127        parameters = self.getParams() 
    132         self._model.setData(self._model.index(0, 4), 
    133                     QtCore.QVariant(formatNumber(parameters['avg']))) 
    134         self._model.setData(self._model.index(0, 5), 
    135                     QtCore.QVariant(formatNumber(parameters['avg_error']))) 
    136         self._model.setData(self._model.index(0, 6), 
    137                     QtCore.QVariant(formatNumber(parameters['sum']))) 
    138         self._model.setData(self._model.index(0, 7), 
    139                     QtCore.QVariant(formatNumber(parameters['sum_error']))) 
    140         self._model.setData(self._model.index(0, 8), 
    141                     QtCore.QVariant(formatNumber(parameters['num_points']))) 
     128        self._model.setData(self._model.index(0, 4), formatNumber(parameters['avg'])) 
     129        self._model.setData(self._model.index(0, 5), formatNumber(parameters['avg_error'])) 
     130        self._model.setData(self._model.index(0, 6), formatNumber(parameters['sum'])) 
     131        self._model.setData(self._model.index(0, 7), formatNumber(parameters['sum_error'])) 
     132        self._model.setData(self._model.index(0, 8), formatNumber(parameters['num_points'])) 
    142133 
    143134    def setParamsFromModel(self): 
Note: See TracChangeset for help on using the changeset viewer.