|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.PluginManager.PluginInstallDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.PluginManager.PluginInstallDialog</h1> |
|
23 <p> |
|
24 Module implementing the Plugin installation dialog. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#PluginInstallDialog">PluginInstallDialog</a></td> |
|
34 <td>Class for the dialog variant.</td> |
|
35 </tr><tr> |
|
36 <td><a href="#PluginInstallWidget">PluginInstallWidget</a></td> |
|
37 <td>Class implementing the Plugin installation dialog.</td> |
|
38 </tr><tr> |
|
39 <td><a href="#PluginInstallWindow">PluginInstallWindow</a></td> |
|
40 <td>Main window class for the standalone dialog.</td> |
|
41 </tr> |
|
42 </table> |
|
43 <h3>Functions</h3> |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /><hr /> |
|
48 <a NAME="PluginInstallDialog" ID="PluginInstallDialog"></a> |
|
49 <h2>PluginInstallDialog</h2> |
|
50 <p> |
|
51 Class for the dialog variant. |
|
52 </p> |
|
53 <h3>Derived from</h3> |
|
54 QDialog |
|
55 <h3>Class Attributes</h3> |
|
56 <table> |
|
57 <tr><td>None</td></tr> |
|
58 </table> |
|
59 <h3>Class Methods</h3> |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Methods</h3> |
|
64 <table> |
|
65 <tr> |
|
66 <td><a href="#PluginInstallDialog.__init__">PluginInstallDialog</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr><tr> |
|
69 <td><a href="#PluginInstallDialog.restartNeeded">restartNeeded</a></td> |
|
70 <td>Public method to check, if a restart of the IDE is required.</td> |
|
71 </tr> |
|
72 </table> |
|
73 <h3>Static Methods</h3> |
|
74 <table> |
|
75 <tr><td>None</td></tr> |
|
76 </table> |
|
77 <a NAME="PluginInstallDialog.__init__" ID="PluginInstallDialog.__init__"></a> |
|
78 <h4>PluginInstallDialog (Constructor)</h4> |
|
79 <b>PluginInstallDialog</b>(<i>pluginManager, pluginFileNames, parent=None</i>) |
|
80 <p> |
|
81 Constructor |
|
82 </p><dl> |
|
83 <dt><i>pluginManager</i></dt> |
|
84 <dd> |
|
85 reference to the plugin manager object |
|
86 </dd><dt><i>pluginFileNames</i></dt> |
|
87 <dd> |
|
88 list of plugin files suggested for |
|
89 installation (list of strings) |
|
90 </dd><dt><i>parent</i></dt> |
|
91 <dd> |
|
92 reference to the parent widget (QWidget) |
|
93 </dd> |
|
94 </dl><a NAME="PluginInstallDialog.restartNeeded" ID="PluginInstallDialog.restartNeeded"></a> |
|
95 <h4>PluginInstallDialog.restartNeeded</h4> |
|
96 <b>restartNeeded</b>(<i></i>) |
|
97 <p> |
|
98 Public method to check, if a restart of the IDE is required. |
|
99 </p><dl> |
|
100 <dt>Returns:</dt> |
|
101 <dd> |
|
102 flag indicating a restart is required (boolean) |
|
103 </dd> |
|
104 </dl> |
|
105 <div align="right"><a href="#top">Up</a></div> |
|
106 <hr /><hr /> |
|
107 <a NAME="PluginInstallWidget" ID="PluginInstallWidget"></a> |
|
108 <h2>PluginInstallWidget</h2> |
|
109 <p> |
|
110 Class implementing the Plugin installation dialog. |
|
111 </p> |
|
112 <h3>Derived from</h3> |
|
113 QWidget, Ui_PluginInstallDialog |
|
114 <h3>Class Attributes</h3> |
|
115 <table> |
|
116 <tr><td>None</td></tr> |
|
117 </table> |
|
118 <h3>Class Methods</h3> |
|
119 <table> |
|
120 <tr><td>None</td></tr> |
|
121 </table> |
|
122 <h3>Methods</h3> |
|
123 <table> |
|
124 <tr> |
|
125 <td><a href="#PluginInstallWidget.__init__">PluginInstallWidget</a></td> |
|
126 <td>Constructor</td> |
|
127 </tr><tr> |
|
128 <td><a href="#PluginInstallWidget.__createArchivesList">__createArchivesList</a></td> |
|
129 <td>Private method to create a list of plugin archive names.</td> |
|
130 </tr><tr> |
|
131 <td><a href="#PluginInstallWidget.__installPlugin">__installPlugin</a></td> |
|
132 <td>Private slot to install the selected plugin.</td> |
|
133 </tr><tr> |
|
134 <td><a href="#PluginInstallWidget.__installPlugins">__installPlugins</a></td> |
|
135 <td>Private method to install the selected plugin archives.</td> |
|
136 </tr><tr> |
|
137 <td><a href="#PluginInstallWidget.__makedirs">__makedirs</a></td> |
|
138 <td>Private method to create a directory and all intermediate ones.</td> |
|
139 </tr><tr> |
|
140 <td><a href="#PluginInstallWidget.__rollback">__rollback</a></td> |
|
141 <td>Private method to rollback a failed installation.</td> |
|
142 </tr><tr> |
|
143 <td><a href="#PluginInstallWidget.__selectPage">__selectPage</a></td> |
|
144 <td>Private method to show the right wizard page.</td> |
|
145 </tr><tr> |
|
146 <td><a href="#PluginInstallWidget.__uninstallPackage">__uninstallPackage</a></td> |
|
147 <td>Private method to uninstall an already installed plugin to prepare the update.</td> |
|
148 </tr><tr> |
|
149 <td><a href="#PluginInstallWidget.on_addArchivesButton_clicked">on_addArchivesButton_clicked</a></td> |
|
150 <td>Private slot to select plugin ZIP-archives via a file selection dialog.</td> |
|
151 </tr><tr> |
|
152 <td><a href="#PluginInstallWidget.on_archivesList_itemSelectionChanged">on_archivesList_itemSelectionChanged</a></td> |
|
153 <td>Private slot called, when the selection of the archives list changes.</td> |
|
154 </tr><tr> |
|
155 <td><a href="#PluginInstallWidget.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
156 <td>Private slot to handle the click of a button of the button box.</td> |
|
157 </tr><tr> |
|
158 <td><a href="#PluginInstallWidget.on_removeArchivesButton_clicked">on_removeArchivesButton_clicked</a></td> |
|
159 <td>Private slot to remove archives from the list.</td> |
|
160 </tr><tr> |
|
161 <td><a href="#PluginInstallWidget.restartNeeded">restartNeeded</a></td> |
|
162 <td>Public method to check, if a restart of the IDE is required.</td> |
|
163 </tr> |
|
164 </table> |
|
165 <h3>Static Methods</h3> |
|
166 <table> |
|
167 <tr><td>None</td></tr> |
|
168 </table> |
|
169 <a NAME="PluginInstallWidget.__init__" ID="PluginInstallWidget.__init__"></a> |
|
170 <h4>PluginInstallWidget (Constructor)</h4> |
|
171 <b>PluginInstallWidget</b>(<i>pluginManager, pluginFileNames, parent=None</i>) |
|
172 <p> |
|
173 Constructor |
|
174 </p><dl> |
|
175 <dt><i>pluginManager</i></dt> |
|
176 <dd> |
|
177 reference to the plugin manager object |
|
178 </dd><dt><i>pluginFileNames</i></dt> |
|
179 <dd> |
|
180 list of plugin files suggested for |
|
181 installation (list of strings) |
|
182 </dd><dt><i>parent</i></dt> |
|
183 <dd> |
|
184 parent of this dialog (QWidget) |
|
185 </dd> |
|
186 </dl><a NAME="PluginInstallWidget.__createArchivesList" ID="PluginInstallWidget.__createArchivesList"></a> |
|
187 <h4>PluginInstallWidget.__createArchivesList</h4> |
|
188 <b>__createArchivesList</b>(<i></i>) |
|
189 <p> |
|
190 Private method to create a list of plugin archive names. |
|
191 </p><dl> |
|
192 <dt>Returns:</dt> |
|
193 <dd> |
|
194 list of plugin archive names (list of strings) |
|
195 </dd> |
|
196 </dl><a NAME="PluginInstallWidget.__installPlugin" ID="PluginInstallWidget.__installPlugin"></a> |
|
197 <h4>PluginInstallWidget.__installPlugin</h4> |
|
198 <b>__installPlugin</b>(<i>archiveFilename</i>) |
|
199 <p> |
|
200 Private slot to install the selected plugin. |
|
201 </p><dl> |
|
202 <dt><i>archiveFilename</i></dt> |
|
203 <dd> |
|
204 name of the plugin archive |
|
205 file (string) |
|
206 </dd> |
|
207 </dl><dl> |
|
208 <dt>Returns:</dt> |
|
209 <dd> |
|
210 flag indicating success (boolean), error message |
|
211 upon failure (string) and flag indicating a restart |
|
212 of the IDE is required (boolean) |
|
213 </dd> |
|
214 </dl><a NAME="PluginInstallWidget.__installPlugins" ID="PluginInstallWidget.__installPlugins"></a> |
|
215 <h4>PluginInstallWidget.__installPlugins</h4> |
|
216 <b>__installPlugins</b>(<i></i>) |
|
217 <p> |
|
218 Private method to install the selected plugin archives. |
|
219 </p><dl> |
|
220 <dt>Returns:</dt> |
|
221 <dd> |
|
222 flag indicating success (boolean) |
|
223 </dd> |
|
224 </dl><a NAME="PluginInstallWidget.__makedirs" ID="PluginInstallWidget.__makedirs"></a> |
|
225 <h4>PluginInstallWidget.__makedirs</h4> |
|
226 <b>__makedirs</b>(<i>name, mode=0o777</i>) |
|
227 <p> |
|
228 Private method to create a directory and all intermediate ones. |
|
229 </p><p> |
|
230 This is an extended version of the Python one in order to |
|
231 record the created directories. |
|
232 </p><dl> |
|
233 <dt><i>name</i></dt> |
|
234 <dd> |
|
235 name of the directory to create (string) |
|
236 </dd><dt><i>mode</i></dt> |
|
237 <dd> |
|
238 permission to set for the new directory (integer) |
|
239 </dd> |
|
240 </dl><a NAME="PluginInstallWidget.__rollback" ID="PluginInstallWidget.__rollback"></a> |
|
241 <h4>PluginInstallWidget.__rollback</h4> |
|
242 <b>__rollback</b>(<i></i>) |
|
243 <p> |
|
244 Private method to rollback a failed installation. |
|
245 </p><a NAME="PluginInstallWidget.__selectPage" ID="PluginInstallWidget.__selectPage"></a> |
|
246 <h4>PluginInstallWidget.__selectPage</h4> |
|
247 <b>__selectPage</b>(<i></i>) |
|
248 <p> |
|
249 Private method to show the right wizard page. |
|
250 </p><a NAME="PluginInstallWidget.__uninstallPackage" ID="PluginInstallWidget.__uninstallPackage"></a> |
|
251 <h4>PluginInstallWidget.__uninstallPackage</h4> |
|
252 <b>__uninstallPackage</b>(<i>destination, pluginFileName, packageName</i>) |
|
253 <p> |
|
254 Private method to uninstall an already installed plugin to prepare |
|
255 the update. |
|
256 </p><dl> |
|
257 <dt><i>destination</i></dt> |
|
258 <dd> |
|
259 name of the plugin directory (string) |
|
260 </dd><dt><i>pluginFileName</i></dt> |
|
261 <dd> |
|
262 name of the plugin file (string) |
|
263 </dd><dt><i>packageName</i></dt> |
|
264 <dd> |
|
265 name of the plugin package (string) |
|
266 </dd> |
|
267 </dl><a NAME="PluginInstallWidget.on_addArchivesButton_clicked" ID="PluginInstallWidget.on_addArchivesButton_clicked"></a> |
|
268 <h4>PluginInstallWidget.on_addArchivesButton_clicked</h4> |
|
269 <b>on_addArchivesButton_clicked</b>(<i></i>) |
|
270 <p> |
|
271 Private slot to select plugin ZIP-archives via a file selection dialog. |
|
272 </p><a NAME="PluginInstallWidget.on_archivesList_itemSelectionChanged" ID="PluginInstallWidget.on_archivesList_itemSelectionChanged"></a> |
|
273 <h4>PluginInstallWidget.on_archivesList_itemSelectionChanged</h4> |
|
274 <b>on_archivesList_itemSelectionChanged</b>(<i></i>) |
|
275 <p> |
|
276 Private slot called, when the selection of the archives list changes. |
|
277 </p><a NAME="PluginInstallWidget.on_buttonBox_clicked" ID="PluginInstallWidget.on_buttonBox_clicked"></a> |
|
278 <h4>PluginInstallWidget.on_buttonBox_clicked</h4> |
|
279 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
280 <p> |
|
281 Private slot to handle the click of a button of the button box. |
|
282 </p><dl> |
|
283 <dt><i>button</i></dt> |
|
284 <dd> |
|
285 reference to the button pressed (QAbstractButton) |
|
286 </dd> |
|
287 </dl><a NAME="PluginInstallWidget.on_removeArchivesButton_clicked" ID="PluginInstallWidget.on_removeArchivesButton_clicked"></a> |
|
288 <h4>PluginInstallWidget.on_removeArchivesButton_clicked</h4> |
|
289 <b>on_removeArchivesButton_clicked</b>(<i></i>) |
|
290 <p> |
|
291 Private slot to remove archives from the list. |
|
292 </p><a NAME="PluginInstallWidget.restartNeeded" ID="PluginInstallWidget.restartNeeded"></a> |
|
293 <h4>PluginInstallWidget.restartNeeded</h4> |
|
294 <b>restartNeeded</b>(<i></i>) |
|
295 <p> |
|
296 Public method to check, if a restart of the IDE is required. |
|
297 </p><dl> |
|
298 <dt>Returns:</dt> |
|
299 <dd> |
|
300 flag indicating a restart is required (boolean) |
|
301 </dd> |
|
302 </dl> |
|
303 <div align="right"><a href="#top">Up</a></div> |
|
304 <hr /><hr /> |
|
305 <a NAME="PluginInstallWindow" ID="PluginInstallWindow"></a> |
|
306 <h2>PluginInstallWindow</h2> |
|
307 <p> |
|
308 Main window class for the standalone dialog. |
|
309 </p> |
|
310 <h3>Derived from</h3> |
|
311 E5MainWindow |
|
312 <h3>Class Attributes</h3> |
|
313 <table> |
|
314 <tr><td>None</td></tr> |
|
315 </table> |
|
316 <h3>Class Methods</h3> |
|
317 <table> |
|
318 <tr><td>None</td></tr> |
|
319 </table> |
|
320 <h3>Methods</h3> |
|
321 <table> |
|
322 <tr> |
|
323 <td><a href="#PluginInstallWindow.__init__">PluginInstallWindow</a></td> |
|
324 <td>Constructor</td> |
|
325 </tr> |
|
326 </table> |
|
327 <h3>Static Methods</h3> |
|
328 <table> |
|
329 <tr><td>None</td></tr> |
|
330 </table> |
|
331 <a NAME="PluginInstallWindow.__init__" ID="PluginInstallWindow.__init__"></a> |
|
332 <h4>PluginInstallWindow (Constructor)</h4> |
|
333 <b>PluginInstallWindow</b>(<i>pluginFileNames, parent=None</i>) |
|
334 <p> |
|
335 Constructor |
|
336 </p><dl> |
|
337 <dt><i>pluginFileNames</i></dt> |
|
338 <dd> |
|
339 list of plugin files suggested for |
|
340 installation (list of strings) |
|
341 </dd><dt><i>parent</i></dt> |
|
342 <dd> |
|
343 reference to the parent widget (QWidget) |
|
344 </dd> |
|
345 </dl> |
|
346 <div align="right"><a href="#top">Up</a></div> |
|
347 <hr /> |
|
348 </body></html> |