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