|
4 | 4 | from functools import partial
|
5 | 5 | from collections import OrderedDict
|
6 | 6 |
|
7 |
| -from PyQt5 import QtCore, QtGui, QtWidgets |
| 7 | +from PyQt6 import QtCore, QtGui, QtWidgets |
8 | 8 | import h5py
|
9 | 9 |
|
10 | 10 | from sipyco import pyon
|
@@ -33,13 +33,13 @@ def __init__(self, dock):
|
33 | 33 | recompute_arguments = QtWidgets.QPushButton("Recompute all arguments")
|
34 | 34 | recompute_arguments.setIcon(
|
35 | 35 | QtWidgets.QApplication.style().standardIcon(
|
36 |
| - QtWidgets.QStyle.SP_BrowserReload)) |
| 36 | + QtWidgets.QStyle.StandardPixmap.SP_BrowserReload)) |
37 | 37 | recompute_arguments.clicked.connect(self._recompute_arguments_clicked)
|
38 | 38 |
|
39 | 39 | load = QtWidgets.QPushButton("Set arguments from HDF5")
|
40 | 40 | load.setToolTip("Set arguments from currently selected HDF5 file")
|
41 | 41 | load.setIcon(QtWidgets.QApplication.style().standardIcon(
|
42 |
| - QtWidgets.QStyle.SP_DialogApplyButton)) |
| 42 | + QtWidgets.QStyle.StandardPixmap.SP_DialogApplyButton)) |
43 | 43 | load.clicked.connect(self._load_clicked)
|
44 | 44 |
|
45 | 45 | buttons = LayoutWidget()
|
@@ -86,7 +86,7 @@ def __init__(self, area, expurl, arguments):
|
86 | 86 | self.resize(100*qfm.averageCharWidth(), 30*qfm.lineSpacing())
|
87 | 87 | self.setWindowTitle(expurl)
|
88 | 88 | self.setWindowIcon(QtWidgets.QApplication.style().standardIcon(
|
89 |
| - QtWidgets.QStyle.SP_FileDialogContentsView)) |
| 89 | + QtWidgets.QStyle.StandardPixmap.SP_FileDialogContentsView)) |
90 | 90 | self.setAcceptDrops(True)
|
91 | 91 |
|
92 | 92 | self.layout = QtWidgets.QGridLayout()
|
@@ -126,22 +126,22 @@ def update_log_level(index):
|
126 | 126 |
|
127 | 127 | run = QtWidgets.QPushButton("Analyze")
|
128 | 128 | run.setIcon(QtWidgets.QApplication.style().standardIcon(
|
129 |
| - QtWidgets.QStyle.SP_DialogOkButton)) |
| 129 | + QtWidgets.QStyle.StandardPixmap.SP_DialogOkButton)) |
130 | 130 | run.setToolTip("Run analysis stage (Ctrl+Return)")
|
131 | 131 | run.setShortcut("CTRL+RETURN")
|
132 |
| - run.setSizePolicy(QtWidgets.QSizePolicy.Expanding, |
133 |
| - QtWidgets.QSizePolicy.Expanding) |
| 132 | + run.setSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, |
| 133 | + QtWidgets.QSizePolicy.Policy.Expanding) |
134 | 134 | self.layout.addWidget(run, 2, 4)
|
135 | 135 | run.clicked.connect(self._run_clicked)
|
136 | 136 | self._run = run
|
137 | 137 |
|
138 | 138 | terminate = QtWidgets.QPushButton("Terminate")
|
139 | 139 | terminate.setIcon(QtWidgets.QApplication.style().standardIcon(
|
140 |
| - QtWidgets.QStyle.SP_DialogCancelButton)) |
| 140 | + QtWidgets.QStyle.StandardPixmap.SP_DialogCancelButton)) |
141 | 141 | terminate.setToolTip("Terminate analysis (Ctrl+Backspace)")
|
142 | 142 | terminate.setShortcut("CTRL+BACKSPACE")
|
143 |
| - terminate.setSizePolicy(QtWidgets.QSizePolicy.Expanding, |
144 |
| - QtWidgets.QSizePolicy.Expanding) |
| 143 | + terminate.setSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, |
| 144 | + QtWidgets.QSizePolicy.Policy.Expanding) |
145 | 145 | self.layout.addWidget(terminate, 3, 4)
|
146 | 146 | terminate.clicked.connect(self._terminate_clicked)
|
147 | 147 | terminate.setEnabled(False)
|
@@ -316,7 +316,7 @@ def dataset_activated(self, path):
|
316 | 316 | asyncio.ensure_future(sub.load_hdf5_task(path))
|
317 | 317 |
|
318 | 318 | def mousePressEvent(self, ev):
|
319 |
| - if ev.button() == QtCore.Qt.LeftButton: |
| 319 | + if ev.button() == QtCore.Qt.MouseButton.LeftButton: |
320 | 320 | self.select_experiment()
|
321 | 321 |
|
322 | 322 | def paintEvent(self, event):
|
@@ -406,7 +406,7 @@ def open_experiment(self, expurl, arguments):
|
406 | 406 | exc_info=True)
|
407 | 407 | dock = _ExperimentDock(self, expurl, {})
|
408 | 408 | asyncio.ensure_future(dock._recompute_arguments())
|
409 |
| - dock.setAttribute(QtCore.Qt.WA_DeleteOnClose) |
| 409 | + dock.setAttribute(QtCore.Qt.WidgetAttribute.WA_DeleteOnClose) |
410 | 410 | self.addSubWindow(dock)
|
411 | 411 | dock.show()
|
412 | 412 | dock.sigClosed.connect(partial(self.on_dock_closed, dock))
|
|
0 commit comments