9 |
9 |
10 from PyQt4.QtCore import Qt |
10 from PyQt4.QtCore import Qt |
11 from PyQt4.QtGui import QDialog, QApplication |
11 from PyQt4.QtGui import QDialog, QApplication |
12 |
12 |
13 from E5Gui.E5Application import e5App |
13 from E5Gui.E5Application import e5App |
14 |
|
15 from ChangesPreviewDialog import ChangesPreviewDialog |
|
16 from ProgressHandle import ProgressHandle |
|
17 |
14 |
18 |
15 |
19 class RefactoringDialogBase(QDialog): |
16 class RefactoringDialogBase(QDialog): |
20 """ |
17 """ |
21 Class implementing the Refactoring dialog base class. |
18 Class implementing the Refactoring dialog base class. |
42 Private method to create a TaskHandle to update a progress dialog. |
39 Private method to create a TaskHandle to update a progress dialog. |
43 |
40 |
44 @param interruptable flag indicating, that the task may be |
41 @param interruptable flag indicating, that the task may be |
45 interrupted (boolean) |
42 interrupted (boolean) |
46 """ |
43 """ |
|
44 from ProgressHandle import ProgressHandle |
47 self.__handle = ProgressHandle(self._title, interruptable, self) |
45 self.__handle = ProgressHandle(self._title, interruptable, self) |
48 self.__handle.show() |
46 self.__handle.show() |
49 QApplication.processEvents() |
47 QApplication.processEvents() |
50 |
48 |
51 def _calculateChanges(self, handle): |
49 def _calculateChanges(self, handle): |
76 Public method to preview the changes. |
74 Public method to preview the changes. |
77 """ |
75 """ |
78 changes = self.__getChanges() |
76 changes = self.__getChanges() |
79 |
77 |
80 if changes is not None: |
78 if changes is not None: |
|
79 from ChangesPreviewDialog import ChangesPreviewDialog |
81 dlg = ChangesPreviewDialog(changes, self) |
80 dlg = ChangesPreviewDialog(changes, self) |
82 if dlg.exec_() == QDialog.Accepted: |
81 if dlg.exec_() == QDialog.Accepted: |
83 self.applyChanges(changes) |
82 self.applyChanges(changes) |
84 |
83 |
85 def applyChanges(self, changes=None): |
84 def applyChanges(self, changes=None): |