|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Project.ProjectProtocolsBrowser</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Project.ProjectProtocolsBrowser</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the a class used to display the protocols (protobuf) part |
|
13 of the project. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 |
|
17 <table> |
|
18 <tr><td>None</td></tr> |
|
19 </table> |
|
20 <h3>Classes</h3> |
|
21 |
|
22 <table> |
|
23 |
|
24 <tr> |
|
25 <td><a href="#ProjectProtocolsBrowser">ProjectProtocolsBrowser</a></td> |
|
26 <td>A class used to display the protocols (protobuf) part of the project.</td> |
|
27 </tr> |
|
28 </table> |
|
29 <h3>Functions</h3> |
|
30 |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <hr /> |
|
35 <hr /> |
|
36 <a NAME="ProjectProtocolsBrowser" ID="ProjectProtocolsBrowser"></a> |
|
37 <h2>ProjectProtocolsBrowser</h2> |
|
38 |
|
39 <p> |
|
40 A class used to display the protocols (protobuf) part of the project. |
|
41 </p> |
|
42 <h3>Signals</h3> |
|
43 <dl> |
|
44 |
|
45 <dt>appendStderr(str)</dt> |
|
46 <dd> |
|
47 emitted after something was received from |
|
48 a QProcess on stderr |
|
49 </dd> |
|
50 <dt>appendStdout(str)</dt> |
|
51 <dd> |
|
52 emitted after something was received from |
|
53 a QProcess on stdout |
|
54 </dd> |
|
55 <dt>showMenu(str, QMenu)</dt> |
|
56 <dd> |
|
57 emitted when a menu is about to be shown. |
|
58 The name of the menu and a reference to the menu are given. |
|
59 </dd> |
|
60 </dl> |
|
61 <h3>Derived from</h3> |
|
62 ProjectBaseBrowser |
|
63 <h3>Class Attributes</h3> |
|
64 |
|
65 <table> |
|
66 <tr><td>None</td></tr> |
|
67 </table> |
|
68 <h3>Class Methods</h3> |
|
69 |
|
70 <table> |
|
71 <tr><td>None</td></tr> |
|
72 </table> |
|
73 <h3>Methods</h3> |
|
74 |
|
75 <table> |
|
76 |
|
77 <tr> |
|
78 <td><a href="#ProjectProtocolsBrowser.__init__">ProjectProtocolsBrowser</a></td> |
|
79 <td>Constructor</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#ProjectProtocolsBrowser.__addProtocolFiles">__addProtocolFiles</a></td> |
|
83 <td>Private method to add protocol files to the project.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#ProjectProtocolsBrowser.__addProtocolsDirectory">__addProtocolsDirectory</a></td> |
|
87 <td>Private method to add protocol files of a directory to the project.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#ProjectProtocolsBrowser.__compileAllProtocols">__compileAllProtocols</a></td> |
|
91 <td>Private method to compile all protocols to Python.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#ProjectProtocolsBrowser.__compileProto">__compileProto</a></td> |
|
95 <td>Private method to compile a .proto file to Python.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#ProjectProtocolsBrowser.__compileProtoDone">__compileProtoDone</a></td> |
|
99 <td>Private slot to handle the finished signal of the protoc process.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#ProjectProtocolsBrowser.__compileProtocol">__compileProtocol</a></td> |
|
103 <td>Private method to compile a protocol to Python.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#ProjectProtocolsBrowser.__compileSelectedProtocols">__compileSelectedProtocols</a></td> |
|
107 <td>Private method to compile selected protocols to Python.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#ProjectProtocolsBrowser.__configureProtobuf">__configureProtobuf</a></td> |
|
111 <td>Private method to open the configuration dialog.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#ProjectProtocolsBrowser.__deleteFile">__deleteFile</a></td> |
|
115 <td>Private method to delete files from the project.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#ProjectProtocolsBrowser.__getCompilerCommand">__getCompilerCommand</a></td> |
|
119 <td>Private method to get the compiler command.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#ProjectProtocolsBrowser.__readStderr">__readStderr</a></td> |
|
123 <td>Private slot to handle the readyReadStandardError signal of the protoc process.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#ProjectProtocolsBrowser.__readStdout">__readStdout</a></td> |
|
127 <td>Private slot to handle the readyReadStandardOutput signal of the protoc process.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#ProjectProtocolsBrowser.__showContextMenu">__showContextMenu</a></td> |
|
131 <td>Private slot called by the menu aboutToShow signal.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#ProjectProtocolsBrowser.__showContextMenuBack">__showContextMenuBack</a></td> |
|
135 <td>Private slot called by the backMenu aboutToShow signal.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#ProjectProtocolsBrowser.__showContextMenuDir">__showContextMenuDir</a></td> |
|
139 <td>Private slot called by the dirMenu aboutToShow signal.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#ProjectProtocolsBrowser.__showContextMenuDirMulti">__showContextMenuDirMulti</a></td> |
|
143 <td>Private slot called by the dirMultiMenu aboutToShow signal.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#ProjectProtocolsBrowser.__showContextMenuMulti">__showContextMenuMulti</a></td> |
|
147 <td>Private slot called by the multiMenu aboutToShow signal.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#ProjectProtocolsBrowser._contextMenuRequested">_contextMenuRequested</a></td> |
|
151 <td>Protected slot to show the context menu.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#ProjectProtocolsBrowser._createPopupMenus">_createPopupMenus</a></td> |
|
155 <td>Protected overloaded method to generate the popup menu.</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#ProjectProtocolsBrowser._openItem">_openItem</a></td> |
|
159 <td>Protected slot to handle the open popup menu entry.</td> |
|
160 </tr> |
|
161 </table> |
|
162 <h3>Static Methods</h3> |
|
163 |
|
164 <table> |
|
165 <tr><td>None</td></tr> |
|
166 </table> |
|
167 |
|
168 <a NAME="ProjectProtocolsBrowser.__init__" ID="ProjectProtocolsBrowser.__init__"></a> |
|
169 <h4>ProjectProtocolsBrowser (Constructor)</h4> |
|
170 <b>ProjectProtocolsBrowser</b>(<i>project, parent=None</i>) |
|
171 |
|
172 <p> |
|
173 Constructor |
|
174 </p> |
|
175 <dl> |
|
176 |
|
177 <dt><i>project</i> (Project)</dt> |
|
178 <dd> |
|
179 reference to the project object |
|
180 </dd> |
|
181 <dt><i>parent</i> (QWidget)</dt> |
|
182 <dd> |
|
183 parent widget of this browser |
|
184 </dd> |
|
185 </dl> |
|
186 <a NAME="ProjectProtocolsBrowser.__addProtocolFiles" ID="ProjectProtocolsBrowser.__addProtocolFiles"></a> |
|
187 <h4>ProjectProtocolsBrowser.__addProtocolFiles</h4> |
|
188 <b>__addProtocolFiles</b>(<i></i>) |
|
189 |
|
190 <p> |
|
191 Private method to add protocol files to the project. |
|
192 </p> |
|
193 <a NAME="ProjectProtocolsBrowser.__addProtocolsDirectory" ID="ProjectProtocolsBrowser.__addProtocolsDirectory"></a> |
|
194 <h4>ProjectProtocolsBrowser.__addProtocolsDirectory</h4> |
|
195 <b>__addProtocolsDirectory</b>(<i></i>) |
|
196 |
|
197 <p> |
|
198 Private method to add protocol files of a directory to the project. |
|
199 </p> |
|
200 <a NAME="ProjectProtocolsBrowser.__compileAllProtocols" ID="ProjectProtocolsBrowser.__compileAllProtocols"></a> |
|
201 <h4>ProjectProtocolsBrowser.__compileAllProtocols</h4> |
|
202 <b>__compileAllProtocols</b>(<i>grpc=False</i>) |
|
203 |
|
204 <p> |
|
205 Private method to compile all protocols to Python. |
|
206 </p> |
|
207 <dl> |
|
208 |
|
209 <dt><i>grpc</i> (bool)</dt> |
|
210 <dd> |
|
211 flag indicating to compile as gRPC files |
|
212 </dd> |
|
213 </dl> |
|
214 <a NAME="ProjectProtocolsBrowser.__compileProto" ID="ProjectProtocolsBrowser.__compileProto"></a> |
|
215 <h4>ProjectProtocolsBrowser.__compileProto</h4> |
|
216 <b>__compileProto</b>(<i>fn, noDialog=False, progress=None, grpc=False</i>) |
|
217 |
|
218 <p> |
|
219 Private method to compile a .proto file to Python. |
|
220 </p> |
|
221 <dl> |
|
222 |
|
223 <dt><i>fn</i> (str)</dt> |
|
224 <dd> |
|
225 filename of the .proto file to be compiled |
|
226 </dd> |
|
227 <dt><i>noDialog</i> (bool)</dt> |
|
228 <dd> |
|
229 flag indicating silent operations |
|
230 </dd> |
|
231 <dt><i>progress</i> (EricProgressDialog)</dt> |
|
232 <dd> |
|
233 reference to the progress dialog |
|
234 </dd> |
|
235 <dt><i>grpc</i> (bool)</dt> |
|
236 <dd> |
|
237 flag indicating to compile as gRPC files |
|
238 </dd> |
|
239 </dl> |
|
240 <dl> |
|
241 <dt>Return:</dt> |
|
242 <dd> |
|
243 reference to the compile process |
|
244 </dd> |
|
245 </dl> |
|
246 <dl> |
|
247 <dt>Return Type:</dt> |
|
248 <dd> |
|
249 QProcess |
|
250 </dd> |
|
251 </dl> |
|
252 <a NAME="ProjectProtocolsBrowser.__compileProtoDone" ID="ProjectProtocolsBrowser.__compileProtoDone"></a> |
|
253 <h4>ProjectProtocolsBrowser.__compileProtoDone</h4> |
|
254 <b>__compileProtoDone</b>(<i>exitCode, exitStatus, grpc</i>) |
|
255 |
|
256 <p> |
|
257 Private slot to handle the finished signal of the protoc process. |
|
258 </p> |
|
259 <dl> |
|
260 |
|
261 <dt><i>exitCode</i> (int)</dt> |
|
262 <dd> |
|
263 exit code of the process |
|
264 </dd> |
|
265 <dt><i>exitStatus</i> (QProcess.ExitStatus)</dt> |
|
266 <dd> |
|
267 exit status of the process |
|
268 </dd> |
|
269 <dt><i>grpc</i> (bool)</dt> |
|
270 <dd> |
|
271 flag indicating to compile as gRPC files |
|
272 </dd> |
|
273 </dl> |
|
274 <a NAME="ProjectProtocolsBrowser.__compileProtocol" ID="ProjectProtocolsBrowser.__compileProtocol"></a> |
|
275 <h4>ProjectProtocolsBrowser.__compileProtocol</h4> |
|
276 <b>__compileProtocol</b>(<i>grpc=False</i>) |
|
277 |
|
278 <p> |
|
279 Private method to compile a protocol to Python. |
|
280 </p> |
|
281 <dl> |
|
282 |
|
283 <dt><i>grpc</i> (bool)</dt> |
|
284 <dd> |
|
285 flag indicating to compile as gRPC files |
|
286 </dd> |
|
287 </dl> |
|
288 <a NAME="ProjectProtocolsBrowser.__compileSelectedProtocols" ID="ProjectProtocolsBrowser.__compileSelectedProtocols"></a> |
|
289 <h4>ProjectProtocolsBrowser.__compileSelectedProtocols</h4> |
|
290 <b>__compileSelectedProtocols</b>(<i>grpc=False</i>) |
|
291 |
|
292 <p> |
|
293 Private method to compile selected protocols to Python. |
|
294 </p> |
|
295 <dl> |
|
296 |
|
297 <dt><i>grpc</i> (bool)</dt> |
|
298 <dd> |
|
299 flag indicating to compile as gRPC files |
|
300 </dd> |
|
301 </dl> |
|
302 <a NAME="ProjectProtocolsBrowser.__configureProtobuf" ID="ProjectProtocolsBrowser.__configureProtobuf"></a> |
|
303 <h4>ProjectProtocolsBrowser.__configureProtobuf</h4> |
|
304 <b>__configureProtobuf</b>(<i></i>) |
|
305 |
|
306 <p> |
|
307 Private method to open the configuration dialog. |
|
308 </p> |
|
309 <a NAME="ProjectProtocolsBrowser.__deleteFile" ID="ProjectProtocolsBrowser.__deleteFile"></a> |
|
310 <h4>ProjectProtocolsBrowser.__deleteFile</h4> |
|
311 <b>__deleteFile</b>(<i></i>) |
|
312 |
|
313 <p> |
|
314 Private method to delete files from the project. |
|
315 </p> |
|
316 <a NAME="ProjectProtocolsBrowser.__getCompilerCommand" ID="ProjectProtocolsBrowser.__getCompilerCommand"></a> |
|
317 <h4>ProjectProtocolsBrowser.__getCompilerCommand</h4> |
|
318 <b>__getCompilerCommand</b>(<i>grpc</i>) |
|
319 |
|
320 <p> |
|
321 Private method to get the compiler command. |
|
322 </p> |
|
323 <dl> |
|
324 |
|
325 <dt><i>grpc</i> (bool)</dt> |
|
326 <dd> |
|
327 flag indicating to get a gRPC command |
|
328 </dd> |
|
329 </dl> |
|
330 <dl> |
|
331 <dt>Return:</dt> |
|
332 <dd> |
|
333 tuple giving the executable and its parameter list |
|
334 </dd> |
|
335 </dl> |
|
336 <dl> |
|
337 <dt>Return Type:</dt> |
|
338 <dd> |
|
339 tuple of (str, list of str) |
|
340 </dd> |
|
341 </dl> |
|
342 <a NAME="ProjectProtocolsBrowser.__readStderr" ID="ProjectProtocolsBrowser.__readStderr"></a> |
|
343 <h4>ProjectProtocolsBrowser.__readStderr</h4> |
|
344 <b>__readStderr</b>(<i></i>) |
|
345 |
|
346 <p> |
|
347 Private slot to handle the readyReadStandardError signal of the |
|
348 protoc process. |
|
349 </p> |
|
350 <a NAME="ProjectProtocolsBrowser.__readStdout" ID="ProjectProtocolsBrowser.__readStdout"></a> |
|
351 <h4>ProjectProtocolsBrowser.__readStdout</h4> |
|
352 <b>__readStdout</b>(<i></i>) |
|
353 |
|
354 <p> |
|
355 Private slot to handle the readyReadStandardOutput signal of the |
|
356 protoc process. |
|
357 </p> |
|
358 <a NAME="ProjectProtocolsBrowser.__showContextMenu" ID="ProjectProtocolsBrowser.__showContextMenu"></a> |
|
359 <h4>ProjectProtocolsBrowser.__showContextMenu</h4> |
|
360 <b>__showContextMenu</b>(<i></i>) |
|
361 |
|
362 <p> |
|
363 Private slot called by the menu aboutToShow signal. |
|
364 </p> |
|
365 <a NAME="ProjectProtocolsBrowser.__showContextMenuBack" ID="ProjectProtocolsBrowser.__showContextMenuBack"></a> |
|
366 <h4>ProjectProtocolsBrowser.__showContextMenuBack</h4> |
|
367 <b>__showContextMenuBack</b>(<i></i>) |
|
368 |
|
369 <p> |
|
370 Private slot called by the backMenu aboutToShow signal. |
|
371 </p> |
|
372 <a NAME="ProjectProtocolsBrowser.__showContextMenuDir" ID="ProjectProtocolsBrowser.__showContextMenuDir"></a> |
|
373 <h4>ProjectProtocolsBrowser.__showContextMenuDir</h4> |
|
374 <b>__showContextMenuDir</b>(<i></i>) |
|
375 |
|
376 <p> |
|
377 Private slot called by the dirMenu aboutToShow signal. |
|
378 </p> |
|
379 <a NAME="ProjectProtocolsBrowser.__showContextMenuDirMulti" ID="ProjectProtocolsBrowser.__showContextMenuDirMulti"></a> |
|
380 <h4>ProjectProtocolsBrowser.__showContextMenuDirMulti</h4> |
|
381 <b>__showContextMenuDirMulti</b>(<i></i>) |
|
382 |
|
383 <p> |
|
384 Private slot called by the dirMultiMenu aboutToShow signal. |
|
385 </p> |
|
386 <a NAME="ProjectProtocolsBrowser.__showContextMenuMulti" ID="ProjectProtocolsBrowser.__showContextMenuMulti"></a> |
|
387 <h4>ProjectProtocolsBrowser.__showContextMenuMulti</h4> |
|
388 <b>__showContextMenuMulti</b>(<i></i>) |
|
389 |
|
390 <p> |
|
391 Private slot called by the multiMenu aboutToShow signal. |
|
392 </p> |
|
393 <a NAME="ProjectProtocolsBrowser._contextMenuRequested" ID="ProjectProtocolsBrowser._contextMenuRequested"></a> |
|
394 <h4>ProjectProtocolsBrowser._contextMenuRequested</h4> |
|
395 <b>_contextMenuRequested</b>(<i>coord</i>) |
|
396 |
|
397 <p> |
|
398 Protected slot to show the context menu. |
|
399 </p> |
|
400 <dl> |
|
401 |
|
402 <dt><i>coord</i></dt> |
|
403 <dd> |
|
404 the position of the mouse pointer (QPoint) |
|
405 </dd> |
|
406 </dl> |
|
407 <a NAME="ProjectProtocolsBrowser._createPopupMenus" ID="ProjectProtocolsBrowser._createPopupMenus"></a> |
|
408 <h4>ProjectProtocolsBrowser._createPopupMenus</h4> |
|
409 <b>_createPopupMenus</b>(<i></i>) |
|
410 |
|
411 <p> |
|
412 Protected overloaded method to generate the popup menu. |
|
413 </p> |
|
414 <a NAME="ProjectProtocolsBrowser._openItem" ID="ProjectProtocolsBrowser._openItem"></a> |
|
415 <h4>ProjectProtocolsBrowser._openItem</h4> |
|
416 <b>_openItem</b>(<i></i>) |
|
417 |
|
418 <p> |
|
419 Protected slot to handle the open popup menu entry. |
|
420 </p> |
|
421 <div align="right"><a href="#top">Up</a></div> |
|
422 <hr /> |
|
423 </body></html> |