Changeset 895e7359 in sasview for src/sas/qtgui/Plotting/Slicers


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/qtgui/Plotting/Slicers
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/Slicers/AnnulusSlicer.py

    • Property mode changed from 100755 to 100644
    rb0b09b9 r895e7359  
    145145        new_plot.xtransform = "x" 
    146146        new_plot.ytransform = "y" 
    147         variant_plot = QtCore.QVariant(new_plot) 
    148         GuiUtils.updateModelItemWithPlot(self._item, variant_plot, new_plot.id) 
     147        GuiUtils.updateModelItemWithPlot(self._item, new_plot, new_plot.id) 
    149148        self.base.manager.communicator.plotUpdateSignal.emit([new_plot]) 
    150149 
  • src/sas/qtgui/Plotting/Slicers/Arc.py

    • Property mode changed from 100755 to 100644
    rb0b09b9 r895e7359  
    7070        x = [] 
    7171        y = [] 
    72         if theta1 != None: 
     72        if theta1 is not None: 
    7373            self.theta1 = theta1 
    74         if theta2 != None: 
     74        if theta2 is not None: 
    7575            self.theta2 = theta2 
    7676        while self.theta2 < self.theta1: 
     
    8080        npts = int((self.theta2 - self.theta1) / (math.pi / 120)) 
    8181 
    82         if r == None: 
     82        if r is None: 
    8383            self.radius = math.sqrt(math.pow(self._mouse_x, 2) + \ 
    8484                                     math.pow(self._mouse_y, 2)) 
  • src/sas/qtgui/Plotting/Slicers/BoxSlicer.py

    • Property mode changed from 100755 to 100644
    rb0b09b9 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/qtgui/Plotting/Slicers/BoxSum.py

    • Property mode changed from 100755 to 100644
    rb0b09b9 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): 
     
    362353        Draw the new roughness on the graph. 
    363354        """ 
    364         if center_x != None: 
     355        if center_x is not None: 
    365356            self.x = center_x 
    366         if center_y != None: 
     357        if center_y is not None: 
    367358            self.y = center_y 
    368359        self.center_marker.set(xdata=[self.x], ydata=[self.y]) 
  • src/sas/qtgui/Plotting/Slicers/SectorSlicer.py

    • Property mode changed from 100755 to 100644
    rb0b09b9 r895e7359  
    125125        data = self.base.data 
    126126        # If we have no data, just return 
    127         if data == None: 
     127        if data is None: 
    128128            return 
    129129        # Averaging 
     
    132132        phimin = -self.left_line.phi + self.main_line.theta 
    133133        phimax = self.left_line.phi + self.main_line.theta 
    134         if nbins == None: 
     134        if nbins is None: 
    135135            nbins = 20 
    136136        sect = SectorQ(r_min=0.0, r_max=radius, 
     
    168168        new_plot.id = "SectorQ" + self.base.data.name 
    169169        new_plot.is_data = True 
    170         variant_plot = QtCore.QVariant(new_plot) 
    171         GuiUtils.updateModelItemWithPlot(self._item, variant_plot, new_plot.id) 
     170        GuiUtils.updateModelItemWithPlot(self._item, new_plot, new_plot.id) 
    172171        self.base.manager.communicator.plotUpdateSignal.emit([new_plot]) 
    173172 
     
    349348        self.left_moving = left 
    350349        theta3 = 0 
    351         if phi != None: 
     350        if phi is not None: 
    352351            self.phi = phi 
    353         if delta == None: 
     352        if delta is None: 
    354353            delta = 0 
    355354        if  right: 
     
    361360            self.theta = mline.theta + self.phi 
    362361 
    363         if mline != None: 
     362        if mline is not None: 
    364363            if delta != 0: 
    365364                self.theta2 = mline + delta 
     
    509508        """ 
    510509 
    511         if theta != None: 
     510        if theta is not None: 
    512511            self.theta = theta 
    513512        x1 = self.radius * numpy.cos(self.theta) 
Note: See TracChangeset for help on using the changeset viewer.