Changeset 4992ff2 in sasview for src/sas/qtgui/Plotting/Plotter.py


Ignore:
Timestamp:
Nov 9, 2017 6:43:07 AM (6 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 05:50:09)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 06:43:07)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/Plotter.py

    rcee5c78 r4992ff2  
    1 from PyQt4 import QtGui 
    2 from PyQt4 import QtCore 
     1from PyQt5 import QtCore 
     2from PyQt5 import QtGui 
     3from PyQt5 import QtWidgets 
     4 
    35import functools 
    46import copy 
     
    1921    1D Plot widget for use with a QDialog 
    2022    """ 
     23    updatePlot = QtCore.pyqtSignal(tuple) 
    2124    def __init__(self, parent=None, manager=None, quickplot=False): 
    2225        super(PlotterWidget, self).__init__(parent, manager=manager, quickplot=quickplot) 
     
    4144        # Add a slot for receiving update signal from LinearFit 
    4245        # NEW style signals 
    43         #self.updatePlot = QtCore.pyqtSignal(tuple) 
    44         # self.updatePlot.connect(self.onFitDisplay) 
     46        self.updatePlot.connect(self.onFitDisplay) 
    4547        # OLD style signals 
    46         QtCore.QObject.connect(self, QtCore.SIGNAL('updatePlot'), self.onFitDisplay) 
     48        # QtCore.QObject.connect(self, QtCore.SIGNAL('updatePlot'), self.onFitDisplay) 
    4749 
    4850    @property 
     
    272274        Show a dialog allowing axes rescaling 
    273275        """ 
    274         if self.properties.exec_() == QtGui.QDialog.Accepted: 
     276        if self.properties.exec_() == QtWidgets.QDialog.Accepted: 
    275277            self.xLogLabel, self.yLogLabel = self.properties.getValues() 
    276278            self.xyTransform(self.xLogLabel, self.yLogLabel) 
     
    280282        Show a dialog allowing adding custom text to the chart 
    281283        """ 
    282         if self.addText.exec_() == QtGui.QDialog.Accepted: 
     284        if self.addText.exec_() == QtWidgets.QDialog.Accepted: 
    283285            # Retrieve the new text, its font and color 
    284286            extra_text = self.addText.text() 
     
    332334        """ 
    333335        # min and max of data 
    334         if self.setRange.exec_() == QtGui.QDialog.Accepted: 
     336        if self.setRange.exec_() == QtWidgets.QDialog.Accepted: 
    335337            x_range = self.setRange.xrange() 
    336338            y_range = self.setRange.yrange() 
     
    366368                    xlabel=self.xLogLabel, 
    367369                    ylabel=self.yLogLabel) 
    368         if fit_dialog.exec_() == QtGui.QDialog.Accepted: 
     370        if fit_dialog.exec_() == QtWidgets.QDialog.Accepted: 
    369371            return 
    370372 
     
    443445                                marker_size=marker_size, 
    444446                                legend=legend) 
    445         if plotPropertiesWidget.exec_() == QtGui.QDialog.Accepted: 
     447        if plotPropertiesWidget.exec_() == QtWidgets.QDialog.Accepted: 
    446448            # Update Data1d 
    447449            selected_plot.markersize = plotPropertiesWidget.markersize() 
     
    700702 
    701703 
    702 class Plotter(QtGui.QDialog, PlotterWidget): 
     704class Plotter(QtWidgets.QDialog, PlotterWidget): 
    703705    def __init__(self, parent=None, quickplot=False): 
    704706 
    705         QtGui.QDialog.__init__(self) 
     707        QtWidgets.QDialog.__init__(self) 
    706708        PlotterWidget.__init__(self, parent=self, manager=parent, quickplot=quickplot) 
    707709        icon = QtGui.QIcon() 
Note: See TracChangeset for help on using the changeset viewer.