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/SlicerParameters.py

    rcd2cc745 r4992ff2  
    44import numpy 
    55import functools 
    6 from PyQt4 import QtGui 
    7 from PyQt4 import QtCore 
    8 from PyQt4 import QtWebKit 
     6from PyQt5 import QtCore 
     7from PyQt5 import QtGui 
     8from PyQt5 import QtWidgets 
     9from PyQt5 import QtWebKitWidgets 
    910 
    1011# Local UI 
     
    1213from sas.qtgui.Plotting.UI.SlicerParametersUI import Ui_SlicerParametersUI 
    1314 
    14 class SlicerParameters(QtGui.QDialog, Ui_SlicerParametersUI): 
     15class SlicerParameters(QtWidgets.QDialog, Ui_SlicerParametersUI): 
    1516    """ 
    1617    Interaction between the QTableView and the underlying model, 
     
    4445 
    4546        # Display Help on clicking the button 
    46         self.buttonBox.button(QtGui.QDialogButtonBox.Help).clicked.connect(self.onHelp) 
     47        self.buttonBox.button(QtWidgets.QDialogButtonBox.Help).clicked.connect(self.onHelp) 
    4748 
    4849        # Close doesn't trigger closeEvent automatically, so force it 
    49         self.buttonBox.button(QtGui.QDialogButtonBox.Close).clicked.connect(functools.partial(self.closeEvent, None)) 
     50        self.buttonBox.button(QtWidgets.QDialogButtonBox.Close).clicked.connect(functools.partial(self.closeEvent, None)) 
    5051 
    5152        # Disable row number display 
    5253        self.lstParams.verticalHeader().setVisible(False) 
    5354        self.lstParams.setAlternatingRowColors(True) 
    54         self.lstParams.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding) 
     55        self.lstParams.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) 
    5556 
    5657        # Header properties for nicer display 
    5758        header = self.lstParams.horizontalHeader() 
    58         header.setResizeMode(QtGui.QHeaderView.Stretch) 
     59        header.setSectionResizeMode(QtWidgets.QHeaderView.Stretch) 
    5960        header.setStretchLastSection(True) 
    6061 
     
    8687        location = "docs/sphinx-docs/build/html" + \ 
    8788            "/user/sasgui/guiframe/graph_help.html#d-data-averaging" 
    88         self.helpView = QtWebKit.QWebView() 
     89        self.helpView = QtWebKitWidgets.QWebView() 
    8990        self.helpView.load(QtCore.QUrl(location)) 
    9091        self.helpView.show() 
    9192 
    9293 
    93 class ProxyModel(QtGui.QIdentityProxyModel): 
     94class ProxyModel(QtCore.QIdentityProxyModel): 
    9495    """ 
    9596    Trivial proxy model with custom column edit flag 
     
    117118        return flags 
    118119 
    119 class PositiveDoubleEditor(QtGui.QLineEdit): 
     120class PositiveDoubleEditor(QtWidgets.QLineEdit): 
    120121    # a signal to tell the delegate when we have finished editing 
    121122    editingFinished = QtCore.Signal() 
     
    136137 
    137138 
    138 class EditDelegate(QtGui.QStyledItemDelegate): 
     139class EditDelegate(QtWidgets.QStyledItemDelegate): 
    139140    refocus_signal = QtCore.pyqtSignal(int, int) 
    140141    def __init__(self, parent=None, validate_method=None): 
     
    155156                return self.editor 
    156157        else: 
    157                 return QtGui.QStyledItemDelegate.createEditor(self, parent, option, index) 
     158                return QtWidgets.QStyledItemDelegate.createEditor(self, parent, option, index) 
    158159 
    159160    def setModelData(self, editor, model, index): 
Note: See TracChangeset for help on using the changeset viewer.