Changeset 4992ff2 in sasview for src/sas/qtgui/Plotting/SlicerParameters.py
- Timestamp:
- Nov 9, 2017 8:43:07 AM (7 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 07:50:09)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/SlicerParameters.py
rcd2cc745 r4992ff2 4 4 import numpy 5 5 import functools 6 from PyQt4 import QtGui 7 from PyQt4 import QtCore 8 from PyQt4 import QtWebKit 6 from PyQt5 import QtCore 7 from PyQt5 import QtGui 8 from PyQt5 import QtWidgets 9 from PyQt5 import QtWebKitWidgets 9 10 10 11 # Local UI … … 12 13 from sas.qtgui.Plotting.UI.SlicerParametersUI import Ui_SlicerParametersUI 13 14 14 class SlicerParameters(Qt Gui.QDialog, Ui_SlicerParametersUI):15 class SlicerParameters(QtWidgets.QDialog, Ui_SlicerParametersUI): 15 16 """ 16 17 Interaction between the QTableView and the underlying model, … … 44 45 45 46 # Display Help on clicking the button 46 self.buttonBox.button(Qt Gui.QDialogButtonBox.Help).clicked.connect(self.onHelp)47 self.buttonBox.button(QtWidgets.QDialogButtonBox.Help).clicked.connect(self.onHelp) 47 48 48 49 # Close doesn't trigger closeEvent automatically, so force it 49 self.buttonBox.button(Qt Gui.QDialogButtonBox.Close).clicked.connect(functools.partial(self.closeEvent, None))50 self.buttonBox.button(QtWidgets.QDialogButtonBox.Close).clicked.connect(functools.partial(self.closeEvent, None)) 50 51 51 52 # Disable row number display 52 53 self.lstParams.verticalHeader().setVisible(False) 53 54 self.lstParams.setAlternatingRowColors(True) 54 self.lstParams.setSizePolicy(Qt Gui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding)55 self.lstParams.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding) 55 56 56 57 # Header properties for nicer display 57 58 header = self.lstParams.horizontalHeader() 58 header.set ResizeMode(QtGui.QHeaderView.Stretch)59 header.setSectionResizeMode(QtWidgets.QHeaderView.Stretch) 59 60 header.setStretchLastSection(True) 60 61 … … 86 87 location = "docs/sphinx-docs/build/html" + \ 87 88 "/user/sasgui/guiframe/graph_help.html#d-data-averaging" 88 self.helpView = QtWebKit .QWebView()89 self.helpView = QtWebKitWidgets.QWebView() 89 90 self.helpView.load(QtCore.QUrl(location)) 90 91 self.helpView.show() 91 92 92 93 93 class ProxyModel(Qt Gui.QIdentityProxyModel):94 class ProxyModel(QtCore.QIdentityProxyModel): 94 95 """ 95 96 Trivial proxy model with custom column edit flag … … 117 118 return flags 118 119 119 class PositiveDoubleEditor(Qt Gui.QLineEdit):120 class PositiveDoubleEditor(QtWidgets.QLineEdit): 120 121 # a signal to tell the delegate when we have finished editing 121 122 editingFinished = QtCore.Signal() … … 136 137 137 138 138 class EditDelegate(Qt Gui.QStyledItemDelegate):139 class EditDelegate(QtWidgets.QStyledItemDelegate): 139 140 refocus_signal = QtCore.pyqtSignal(int, int) 140 141 def __init__(self, parent=None, validate_method=None): … … 155 156 return self.editor 156 157 else: 157 return Qt Gui.QStyledItemDelegate.createEditor(self, parent, option, index)158 return QtWidgets.QStyledItemDelegate.createEditor(self, parent, option, index) 158 159 159 160 def setModelData(self, editor, model, index):
Note: See TracChangeset
for help on using the changeset viewer.