5 |
5 |
6 """ |
6 """ |
7 Module implementing a TaskHandle class with a progress dialog. |
7 Module implementing a TaskHandle class with a progress dialog. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt5.QtCore import QCoreApplication |
10 from PyQt6.QtCore import QCoreApplication |
11 from PyQt5.QtWidgets import QLabel |
11 from PyQt6.QtWidgets import QLabel |
12 |
12 |
13 from E5Gui.E5ProgressDialog import E5ProgressDialog |
13 from EricWidgets.EricProgressDialog import EricProgressDialog |
14 |
14 |
15 |
15 |
16 class RopeProgressDialog(E5ProgressDialog): |
16 class RopeProgressDialog(EricProgressDialog): |
17 """ |
17 """ |
18 Class implementing TaskHandle with a progress dialog. |
18 Class implementing TaskHandle with a progress dialog. |
19 """ |
19 """ |
20 def __init__(self, server, title, interruptable=True, parent=None): |
20 def __init__(self, server, title, interruptable=True, parent=None): |
21 """ |
21 """ |
22 Constructor |
22 Constructor |
23 |
23 |
24 @param server reference to the JSON server |
24 @param server reference to the JSON server |
25 @type E5JsonServer |
25 @type EricJsonServer |
26 @param title title for the dialog |
26 @param title title for the dialog |
27 @type str |
27 @type str |
28 @param interruptable flag indicating, that the task may be |
28 @param interruptable flag indicating, that the task may be |
29 interrupted |
29 interrupted |
30 @type bool |
30 @type bool |
36 self.setCancelButtonText(self.tr("Interrupt")) |
36 self.setCancelButtonText(self.tr("Interrupt")) |
37 self.setFormat(self.tr("%v/%m files")) |
37 self.setFormat(self.tr("%v/%m files")) |
38 label = QLabel("") |
38 label = QLabel("") |
39 label.setWordWrap(True) |
39 label.setWordWrap(True) |
40 self.setLabel(label) |
40 self.setLabel(label) |
41 self.setWindowTitle(self.tr("eric6 - {0}").format(title)) |
41 self.setWindowTitle(self.tr("eric7 - {0}").format(title)) |
42 |
42 |
43 self.__server = server |
43 self.__server = server |
44 |
44 |
45 def updateProgress(self, params): |
45 def updateProgress(self, params): |
46 """ |
46 """ |