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


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

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

File:
1 edited

Legend:

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

    • Property mode changed from 100755 to 100644
    rb3e8629 r4992ff2  
    22Allows users to change the range of the current graph 
    33""" 
    4 from PyQt4 import QtGui 
    5 from PyQt4 import QtCore 
     4from PyQt5 import QtCore 
     5from PyQt5 import QtGui 
     6from PyQt5 import QtWidgets 
    67import sas.qtgui.path_prepare 
    78 
     
    1011import numpy 
    1112 
    12 from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas 
     13from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas 
    1314from sas.qtgui.Plotting.PlotterData import Data2D 
    1415from sas.qtgui.Utilities.GuiUtils import formatNumber 
     
    2122from sas.qtgui.Plotting.UI.ColorMapUI import Ui_ColorMapUI 
    2223 
    23 class ColorMap(QtGui.QDialog, Ui_ColorMapUI): 
     24class ColorMap(QtWidgets.QDialog, Ui_ColorMapUI): 
    2425    apply_signal = QtCore.pyqtSignal(tuple, str) 
    2526    def __init__(self, parent=None, cmap=None, vmin=0.0, vmax=100.0, data=None): 
     
    7172 
    7273        # Handle the Reset button click 
    73         self.buttonBox.button(QtGui.QDialogButtonBox.Reset).clicked.connect(self.onReset) 
     74        self.buttonBox.button(QtWidgets.QDialogButtonBox.Reset).clicked.connect(self.onReset) 
    7475 
    7576        # Handle the Apply button click 
    76         self.buttonBox.button(QtGui.QDialogButtonBox.Apply).clicked.connect(self.onApply) 
     77        self.buttonBox.button(QtWidgets.QDialogButtonBox.Apply).clicked.connect(self.onApply) 
    7778 
    7879        # Handle the amplitude setup 
     
    161162        self.slider.setOrientation(QtCore.Qt.Horizontal) 
    162163 
    163         self.slider_label = QtGui.QLabel() 
     164        self.slider_label = QtWidgets.QLabel() 
    164165        self.slider_label.setText("Drag the sliders to adjust color range.") 
    165166 
     
    192193        self.canvas = FigureCanvas(self.fig) 
    193194 
    194         layout = QtGui.QVBoxLayout() 
     195        layout = QtWidgets.QVBoxLayout() 
    195196        layout.addWidget(self.slider_label) 
    196197        layout.addWidget(self.slider) 
Note: See TracChangeset for help on using the changeset viewer.