11 import os |
11 import os |
12 import imp |
12 import imp |
13 import shutil |
13 import shutil |
14 |
14 |
15 from PyQt4.QtCore import pyqtSlot, pyqtSignal |
15 from PyQt4.QtCore import pyqtSlot, pyqtSignal |
16 from PyQt4.QtGui import QWidget, QDialog, QDialogButtonBox, QVBoxLayout, QMainWindow |
16 from PyQt4.QtGui import QWidget, QDialog, QDialogButtonBox, QVBoxLayout |
17 |
17 |
18 from E5Gui import E5MessageBox |
18 from E5Gui import E5MessageBox |
|
19 from E5Gui.E5MainWindow import E5MainWindow |
19 |
20 |
20 from .PluginManager import PluginManager |
21 from .PluginManager import PluginManager |
21 from .Ui_PluginUninstallDialog import Ui_PluginUninstallDialog |
22 from .Ui_PluginUninstallDialog import Ui_PluginUninstallDialog |
|
23 |
|
24 import Preferences |
22 |
25 |
23 |
26 |
24 class PluginUninstallWidget(QWidget, Ui_PluginUninstallDialog): |
27 class PluginUninstallWidget(QWidget, Ui_PluginUninstallDialog): |
25 """ |
28 """ |
26 Class implementing a dialog for plugin deinstallation. |
29 Class implementing a dialog for plugin deinstallation. |
180 |
183 |
181 self.cw.buttonBox.accepted[()].connect(self.accept) |
184 self.cw.buttonBox.accepted[()].connect(self.accept) |
182 self.cw.buttonBox.rejected[()].connect(self.reject) |
185 self.cw.buttonBox.rejected[()].connect(self.reject) |
183 |
186 |
184 |
187 |
185 class PluginUninstallWindow(QMainWindow): |
188 class PluginUninstallWindow(E5MainWindow): |
186 """ |
189 """ |
187 Main window class for the standalone dialog. |
190 Main window class for the standalone dialog. |
188 """ |
191 """ |
189 def __init__(self, parent=None): |
192 def __init__(self, parent=None): |
190 """ |
193 """ |
196 self.cw = PluginUninstallWidget(None, self) |
199 self.cw = PluginUninstallWidget(None, self) |
197 size = self.cw.size() |
200 size = self.cw.size() |
198 self.setCentralWidget(self.cw) |
201 self.setCentralWidget(self.cw) |
199 self.resize(size) |
202 self.resize(size) |
200 |
203 |
|
204 self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) |
|
205 |
201 self.cw.buttonBox.accepted[()].connect(self.close) |
206 self.cw.buttonBox.accepted[()].connect(self.close) |
202 self.cw.buttonBox.rejected[()].connect(self.close) |
207 self.cw.buttonBox.rejected[()].connect(self.close) |