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