14 import compileall |
14 import compileall |
15 import urllib.parse |
15 import urllib.parse |
16 |
16 |
17 from PyQt4.QtCore import pyqtSlot, Qt, QDir, QFileInfo |
17 from PyQt4.QtCore import pyqtSlot, Qt, QDir, QFileInfo |
18 from PyQt4.QtGui import QWidget, QDialogButtonBox, QAbstractButton, QApplication, \ |
18 from PyQt4.QtGui import QWidget, QDialogButtonBox, QAbstractButton, QApplication, \ |
19 QDialog, QVBoxLayout, QMainWindow |
19 QDialog, QVBoxLayout |
20 |
20 |
21 from E5Gui import E5FileDialog |
21 from E5Gui import E5FileDialog |
|
22 from E5Gui.E5MainWindow import E5MainWindow |
22 |
23 |
23 from .PluginManager import PluginManager |
24 from .PluginManager import PluginManager |
24 from .Ui_PluginInstallDialog import Ui_PluginInstallDialog |
25 from .Ui_PluginInstallDialog import Ui_PluginInstallDialog |
25 |
26 |
26 import Utilities |
27 import Utilities |
542 @return flag indicating a restart is required (boolean) |
543 @return flag indicating a restart is required (boolean) |
543 """ |
544 """ |
544 return self.cw.restartNeeded() |
545 return self.cw.restartNeeded() |
545 |
546 |
546 |
547 |
547 class PluginInstallWindow(QMainWindow): |
548 class PluginInstallWindow(E5MainWindow): |
548 """ |
549 """ |
549 Main window class for the standalone dialog. |
550 Main window class for the standalone dialog. |
550 """ |
551 """ |
551 def __init__(self, pluginFileNames, parent=None): |
552 def __init__(self, pluginFileNames, parent=None): |
552 """ |
553 """ |
560 self.cw = PluginInstallWidget(None, pluginFileNames, self) |
561 self.cw = PluginInstallWidget(None, pluginFileNames, self) |
561 size = self.cw.size() |
562 size = self.cw.size() |
562 self.setCentralWidget(self.cw) |
563 self.setCentralWidget(self.cw) |
563 self.resize(size) |
564 self.resize(size) |
564 |
565 |
|
566 self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) |
|
567 |
565 self.cw.buttonBox.accepted[()].connect(self.close) |
568 self.cw.buttonBox.accepted[()].connect(self.close) |
566 self.cw.buttonBox.rejected[()].connect(self.close) |
569 self.cw.buttonBox.rejected[()].connect(self.close) |