14 |
14 |
15 from .PluginDetailsDialog import PluginDetailsDialog |
15 from .PluginDetailsDialog import PluginDetailsDialog |
16 |
16 |
17 from .Ui_PluginInfoDialog import Ui_PluginInfoDialog |
17 from .Ui_PluginInfoDialog import Ui_PluginInfoDialog |
18 |
18 |
|
19 |
19 class PluginInfoDialog(QDialog, Ui_PluginInfoDialog): |
20 class PluginInfoDialog(QDialog, Ui_PluginInfoDialog): |
20 """ |
21 """ |
21 Class implementing the Plugin Info Dialog. |
22 Class implementing the Plugin Info Dialog. |
22 """ |
23 """ |
23 def __init__(self, pluginManager, parent = None): |
24 def __init__(self, pluginManager, parent=None): |
24 """ |
25 """ |
25 Constructor |
26 Constructor |
26 |
27 |
27 @param pluginManager reference to the plugin manager object |
28 @param pluginManager reference to the plugin manager object |
28 @param parent parent of this dialog (QWidget) |
29 @param parent parent of this dialog (QWidget) |
55 Private method to (re)populate the list of plugins. |
56 Private method to (re)populate the list of plugins. |
56 """ |
57 """ |
57 self.pluginList.clear() |
58 self.pluginList.clear() |
58 for info in self.pm.getPluginInfos(): |
59 for info in self.pm.getPluginInfos(): |
59 self.__createEntry(info) |
60 self.__createEntry(info) |
60 self.pluginList.sortItems(self.pluginList.sortColumn(), |
61 self.pluginList.sortItems(self.pluginList.sortColumn(), |
61 self.pluginList.header().sortIndicatorOrder()) |
62 self.pluginList.header().sortIndicatorOrder()) |
62 |
63 |
63 def __createEntry(self, info): |
64 def __createEntry(self, info): |
64 """ |
65 """ |
65 Private method to create a list entry based on the provided info. |
66 Private method to create a list entry based on the provided info. |
66 |
67 |
67 @param info tuple giving the info for the entry |
68 @param info tuple giving the info for the entry |
68 """ |
69 """ |
69 infoList = [ |
70 infoList = [ |
70 info[0], |
71 info[0], |
71 info[1], |
72 info[1], |
72 info[2], |
73 info[2], |
73 (info[3] and self.trUtf8("Yes") or self.trUtf8("No")), |
74 (info[3] and self.trUtf8("Yes") or self.trUtf8("No")), |
74 (info[4] and self.trUtf8("Yes") or self.trUtf8("No")), |
75 (info[4] and self.trUtf8("Yes") or self.trUtf8("No")), |
75 info[5] |
76 info[5] |
76 ] |
77 ] |
77 itm = QTreeWidgetItem(self.pluginList, infoList) |
78 itm = QTreeWidgetItem(self.pluginList, infoList) |
78 if info[6]: |
79 if info[6]: |
79 # plugin error |
80 # plugin error |