Changeset b4b8589 in sasview for src/sas/qtgui/PlotterBase.py


Ignore:
Timestamp:
Dec 8, 2016 7:53:56 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:
fecfe28
Parents:
cad617b
Message:

Code review from WP. Also, added 1D plots with error bars as default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/PlotterBase.py

    r416fa8f rb4b8589  
    1414DEFAULT_CMAP = pylab.cm.jet 
    1515from sas.qtgui.ScaleProperties import ScaleProperties 
    16 import sas.qtgui.PlotUtilities as PlotUtilities 
    1716import sas.qtgui.PlotHelper as PlotHelper 
    1817 
     
    5049        self.qx_data = [] 
    5150        self.qy_data = [] 
    52         self.color=0 
    53         self.symbol=0 
     51        self.color = 0 
     52        self.symbol = 0 
    5453        self.grid_on = False 
    5554        self.scale = 'linear' 
     
    7978    @property 
    8079    def data(self): 
     80        """ data getter """ 
    8181        return self._data 
    8282 
     
    158158        Display the context menu 
    159159        """ 
    160         self.contextMenu.exec_( self.canvas.mapToGlobal(event.pos()) ) 
     160        self.contextMenu.exec_(self.canvas.mapToGlobal(event.pos())) 
    161161 
    162162    def clean(self): 
     
    201201        dialog.setModal(True) 
    202202        dialog.setWindowTitle("Print") 
    203         if(dialog.exec_() != QtGui.QDialog.Accepted): 
     203        if dialog.exec_() != QtGui.QDialog.Accepted: 
    204204            return 
    205205 
    206206        painter = QtGui.QPainter(printer) 
     207        # Grab the widget screenshot 
     208        pmap = QtGui.QPixmap.grabWidget(self) 
    207209        # Create a label with pixmap drawn 
    208         pmap = QtGui.QPixmap.grabWidget(self) 
    209210        printLabel = QtGui.QLabel() 
    210211        printLabel.setPixmap(pmap) 
Note: See TracChangeset for help on using the changeset viewer.