Changeset 4992ff2 in sasview for src/sas/qtgui/Plotting/Plotter.py
- Timestamp:
- Nov 9, 2017 6:43:07 AM (6 years ago)
- 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)
- 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 1 from PyQt5 import QtCore 2 from PyQt5 import QtGui 3 from PyQt5 import QtWidgets 4 3 5 import functools 4 6 import copy … … 19 21 1D Plot widget for use with a QDialog 20 22 """ 23 updatePlot = QtCore.pyqtSignal(tuple) 21 24 def __init__(self, parent=None, manager=None, quickplot=False): 22 25 super(PlotterWidget, self).__init__(parent, manager=manager, quickplot=quickplot) … … 41 44 # Add a slot for receiving update signal from LinearFit 42 45 # NEW style signals 43 #self.updatePlot = QtCore.pyqtSignal(tuple) 44 # self.updatePlot.connect(self.onFitDisplay) 46 self.updatePlot.connect(self.onFitDisplay) 45 47 # OLD style signals 46 QtCore.QObject.connect(self, QtCore.SIGNAL('updatePlot'), self.onFitDisplay)48 # QtCore.QObject.connect(self, QtCore.SIGNAL('updatePlot'), self.onFitDisplay) 47 49 48 50 @property … … 272 274 Show a dialog allowing axes rescaling 273 275 """ 274 if self.properties.exec_() == Qt Gui.QDialog.Accepted:276 if self.properties.exec_() == QtWidgets.QDialog.Accepted: 275 277 self.xLogLabel, self.yLogLabel = self.properties.getValues() 276 278 self.xyTransform(self.xLogLabel, self.yLogLabel) … … 280 282 Show a dialog allowing adding custom text to the chart 281 283 """ 282 if self.addText.exec_() == Qt Gui.QDialog.Accepted:284 if self.addText.exec_() == QtWidgets.QDialog.Accepted: 283 285 # Retrieve the new text, its font and color 284 286 extra_text = self.addText.text() … … 332 334 """ 333 335 # min and max of data 334 if self.setRange.exec_() == Qt Gui.QDialog.Accepted:336 if self.setRange.exec_() == QtWidgets.QDialog.Accepted: 335 337 x_range = self.setRange.xrange() 336 338 y_range = self.setRange.yrange() … … 366 368 xlabel=self.xLogLabel, 367 369 ylabel=self.yLogLabel) 368 if fit_dialog.exec_() == Qt Gui.QDialog.Accepted:370 if fit_dialog.exec_() == QtWidgets.QDialog.Accepted: 369 371 return 370 372 … … 443 445 marker_size=marker_size, 444 446 legend=legend) 445 if plotPropertiesWidget.exec_() == Qt Gui.QDialog.Accepted:447 if plotPropertiesWidget.exec_() == QtWidgets.QDialog.Accepted: 446 448 # Update Data1d 447 449 selected_plot.markersize = plotPropertiesWidget.markersize() … … 700 702 701 703 702 class Plotter(Qt Gui.QDialog, PlotterWidget):704 class Plotter(QtWidgets.QDialog, PlotterWidget): 703 705 def __init__(self, parent=None, quickplot=False): 704 706 705 Qt Gui.QDialog.__init__(self)707 QtWidgets.QDialog.__init__(self) 706 708 PlotterWidget.__init__(self, parent=self, manager=parent, quickplot=quickplot) 707 709 icon = QtGui.QIcon()
Note: See TracChangeset
for help on using the changeset viewer.