|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2007 - 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 |
|
7 """ |
|
8 Module implementing the Plugin Details Dialog. |
|
9 """ |
|
10 |
|
11 from __future__ import unicode_literals |
|
12 |
|
13 from PyQt5.QtCore import pyqtSlot, Qt |
|
14 from PyQt5.QtWidgets import QDialog |
|
15 |
|
16 from .Ui_PluginDetailsDialog import Ui_PluginDetailsDialog |
|
17 |
|
18 |
|
19 class PluginDetailsDialog(QDialog, Ui_PluginDetailsDialog): |
|
20 """ |
|
21 Class implementing the Plugin Details Dialog. |
|
22 """ |
|
23 def __init__(self, details, parent=None): |
|
24 """ |
|
25 Constructor |
|
26 |
|
27 @param details dictionary containing the info to be displayed |
|
28 @param parent parent of this dialog (QWidget) |
|
29 """ |
|
30 super(PluginDetailsDialog, self).__init__(parent) |
|
31 self.setupUi(self) |
|
32 self.setWindowFlags(Qt.Window) |
|
33 |
|
34 self.__autoactivate = details["autoactivate"] |
|
35 self.__active = details["active"] |
|
36 |
|
37 self.moduleNameEdit.setText(details["moduleName"]) |
|
38 self.moduleFileNameEdit.setText(details["moduleFileName"]) |
|
39 self.pluginNameEdit.setText(details["pluginName"]) |
|
40 self.versionEdit.setText(details["version"]) |
|
41 self.authorEdit.setText(details["author"]) |
|
42 self.descriptionEdit.setText(details["description"]) |
|
43 self.errorEdit.setText(details["error"]) |
|
44 self.autoactivateCheckBox.setChecked(details["autoactivate"]) |
|
45 self.activeCheckBox.setChecked(details["active"]) |
|
46 |
|
47 @pyqtSlot() |
|
48 def on_activeCheckBox_clicked(self): |
|
49 """ |
|
50 Private slot called, when the activeCheckBox was clicked. |
|
51 """ |
|
52 self.activeCheckBox.setChecked(self.__active) |
|
53 |
|
54 @pyqtSlot() |
|
55 def on_autoactivateCheckBox_clicked(self): |
|
56 """ |
|
57 Private slot called, when the autoactivateCheckBox was clicked. |
|
58 """ |
|
59 self.autoactivateCheckBox.setChecked(self.__autoactivate) |