|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Project.ProjectProtocolsBrowser</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.Project.ProjectProtocolsBrowser</h1> |
|
23 <p> |
|
24 Module implementing the a class used to display the protocols (protobuf) part |
|
25 of the project. |
|
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="#ProjectProtocolsBrowser">ProjectProtocolsBrowser</a></td> |
|
35 <td>A class used to display the protocols (protobuf) part of the project.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="ProjectProtocolsBrowser" ID="ProjectProtocolsBrowser"></a> |
|
44 <h2>ProjectProtocolsBrowser</h2> |
|
45 <p> |
|
46 A class used to display the protocols (protobuf) part of the project. |
|
47 </p><h3>Signals</h3> |
|
48 <dl> |
|
49 <dt>appendStderr(str)</dt> |
|
50 <dd> |
|
51 emitted after something was received from |
|
52 a QProcess on stderr |
|
53 </dd><dt>appendStdout(str)</dt> |
|
54 <dd> |
|
55 emitted after something was received from |
|
56 a QProcess on stdout |
|
57 </dd><dt>showMenu(str, QMenu)</dt> |
|
58 <dd> |
|
59 emitted when a menu is about to be shown. |
|
60 The name of the menu and a reference to the menu are given. |
|
61 </dd> |
|
62 </dl> |
|
63 <h3>Derived from</h3> |
|
64 ProjectBaseBrowser |
|
65 <h3>Class Attributes</h3> |
|
66 <table> |
|
67 <tr><td>None</td></tr> |
|
68 </table> |
|
69 <h3>Class Methods</h3> |
|
70 <table> |
|
71 <tr><td>None</td></tr> |
|
72 </table> |
|
73 <h3>Methods</h3> |
|
74 <table> |
|
75 <tr> |
|
76 <td><a href="#ProjectProtocolsBrowser.__init__">ProjectProtocolsBrowser</a></td> |
|
77 <td>Constructor</td> |
|
78 </tr><tr> |
|
79 <td><a href="#ProjectProtocolsBrowser.__addProtocolFiles">__addProtocolFiles</a></td> |
|
80 <td>Private method to add protocol files to the project.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#ProjectProtocolsBrowser.__addProtocolsDirectory">__addProtocolsDirectory</a></td> |
|
83 <td>Private method to add protocol files of a directory to the project.</td> |
|
84 </tr><tr> |
|
85 <td><a href="#ProjectProtocolsBrowser.__compileAllProtocols">__compileAllProtocols</a></td> |
|
86 <td>Private method to compile all protocols to Python.</td> |
|
87 </tr><tr> |
|
88 <td><a href="#ProjectProtocolsBrowser.__compileProto">__compileProto</a></td> |
|
89 <td>Private method to compile a .proto file to Python.</td> |
|
90 </tr><tr> |
|
91 <td><a href="#ProjectProtocolsBrowser.__compileProtoDone">__compileProtoDone</a></td> |
|
92 <td>Private slot to handle the finished signal of the protoc process.</td> |
|
93 </tr><tr> |
|
94 <td><a href="#ProjectProtocolsBrowser.__compileProtocol">__compileProtocol</a></td> |
|
95 <td>Private method to compile a protocol to Python.</td> |
|
96 </tr><tr> |
|
97 <td><a href="#ProjectProtocolsBrowser.__compileSelectedProtocols">__compileSelectedProtocols</a></td> |
|
98 <td>Private method to compile selected protocols to Python.</td> |
|
99 </tr><tr> |
|
100 <td><a href="#ProjectProtocolsBrowser.__configureProtobuf">__configureProtobuf</a></td> |
|
101 <td>Private method to open the configuration dialog.</td> |
|
102 </tr><tr> |
|
103 <td><a href="#ProjectProtocolsBrowser.__deleteFile">__deleteFile</a></td> |
|
104 <td>Private method to delete files from the project.</td> |
|
105 </tr><tr> |
|
106 <td><a href="#ProjectProtocolsBrowser.__getCompilerCommand">__getCompilerCommand</a></td> |
|
107 <td>Private method to get the compiler command.</td> |
|
108 </tr><tr> |
|
109 <td><a href="#ProjectProtocolsBrowser.__readStderr">__readStderr</a></td> |
|
110 <td>Private slot to handle the readyReadStandardError signal of the protoc process.</td> |
|
111 </tr><tr> |
|
112 <td><a href="#ProjectProtocolsBrowser.__readStdout">__readStdout</a></td> |
|
113 <td>Private slot to handle the readyReadStandardOutput signal of the protoc process.</td> |
|
114 </tr><tr> |
|
115 <td><a href="#ProjectProtocolsBrowser.__showContextMenu">__showContextMenu</a></td> |
|
116 <td>Private slot called by the menu aboutToShow signal.</td> |
|
117 </tr><tr> |
|
118 <td><a href="#ProjectProtocolsBrowser.__showContextMenuBack">__showContextMenuBack</a></td> |
|
119 <td>Private slot called by the backMenu aboutToShow signal.</td> |
|
120 </tr><tr> |
|
121 <td><a href="#ProjectProtocolsBrowser.__showContextMenuDir">__showContextMenuDir</a></td> |
|
122 <td>Private slot called by the dirMenu aboutToShow signal.</td> |
|
123 </tr><tr> |
|
124 <td><a href="#ProjectProtocolsBrowser.__showContextMenuDirMulti">__showContextMenuDirMulti</a></td> |
|
125 <td>Private slot called by the dirMultiMenu aboutToShow signal.</td> |
|
126 </tr><tr> |
|
127 <td><a href="#ProjectProtocolsBrowser.__showContextMenuMulti">__showContextMenuMulti</a></td> |
|
128 <td>Private slot called by the multiMenu aboutToShow signal.</td> |
|
129 </tr><tr> |
|
130 <td><a href="#ProjectProtocolsBrowser._contextMenuRequested">_contextMenuRequested</a></td> |
|
131 <td>Protected slot to show the context menu.</td> |
|
132 </tr><tr> |
|
133 <td><a href="#ProjectProtocolsBrowser._createPopupMenus">_createPopupMenus</a></td> |
|
134 <td>Protected overloaded method to generate the popup menu.</td> |
|
135 </tr><tr> |
|
136 <td><a href="#ProjectProtocolsBrowser._openItem">_openItem</a></td> |
|
137 <td>Protected slot to handle the open popup menu entry.</td> |
|
138 </tr> |
|
139 </table> |
|
140 <h3>Static Methods</h3> |
|
141 <table> |
|
142 <tr><td>None</td></tr> |
|
143 </table> |
|
144 <a NAME="ProjectProtocolsBrowser.__init__" ID="ProjectProtocolsBrowser.__init__"></a> |
|
145 <h4>ProjectProtocolsBrowser (Constructor)</h4> |
|
146 <b>ProjectProtocolsBrowser</b>(<i>project, parent=None</i>) |
|
147 <p> |
|
148 Constructor |
|
149 </p><dl> |
|
150 <dt><i>project</i> (Project)</dt> |
|
151 <dd> |
|
152 reference to the project object |
|
153 </dd><dt><i>parent</i> (QWidget)</dt> |
|
154 <dd> |
|
155 parent widget of this browser |
|
156 </dd> |
|
157 </dl><a NAME="ProjectProtocolsBrowser.__addProtocolFiles" ID="ProjectProtocolsBrowser.__addProtocolFiles"></a> |
|
158 <h4>ProjectProtocolsBrowser.__addProtocolFiles</h4> |
|
159 <b>__addProtocolFiles</b>(<i></i>) |
|
160 <p> |
|
161 Private method to add protocol files to the project. |
|
162 </p><a NAME="ProjectProtocolsBrowser.__addProtocolsDirectory" ID="ProjectProtocolsBrowser.__addProtocolsDirectory"></a> |
|
163 <h4>ProjectProtocolsBrowser.__addProtocolsDirectory</h4> |
|
164 <b>__addProtocolsDirectory</b>(<i></i>) |
|
165 <p> |
|
166 Private method to add protocol files of a directory to the project. |
|
167 </p><a NAME="ProjectProtocolsBrowser.__compileAllProtocols" ID="ProjectProtocolsBrowser.__compileAllProtocols"></a> |
|
168 <h4>ProjectProtocolsBrowser.__compileAllProtocols</h4> |
|
169 <b>__compileAllProtocols</b>(<i>grpc=False</i>) |
|
170 <p> |
|
171 Private method to compile all protocols to Python. |
|
172 </p><dl> |
|
173 <dt><i>grpc</i> (bool)</dt> |
|
174 <dd> |
|
175 flag indicating to compile as grpc files |
|
176 </dd> |
|
177 </dl><a NAME="ProjectProtocolsBrowser.__compileProto" ID="ProjectProtocolsBrowser.__compileProto"></a> |
|
178 <h4>ProjectProtocolsBrowser.__compileProto</h4> |
|
179 <b>__compileProto</b>(<i>fn, noDialog=False, progress=None, grpc=False</i>) |
|
180 <p> |
|
181 Private method to compile a .proto file to Python. |
|
182 </p><dl> |
|
183 <dt><i>fn</i> (str)</dt> |
|
184 <dd> |
|
185 filename of the .proto file to be compiled |
|
186 </dd><dt><i>noDialog</i> (bool)</dt> |
|
187 <dd> |
|
188 flag indicating silent operations |
|
189 </dd><dt><i>progress</i> (E5ProgressDialog)</dt> |
|
190 <dd> |
|
191 reference to the progress dialog |
|
192 </dd><dt><i>grpc</i> (bool)</dt> |
|
193 <dd> |
|
194 flag indicating to compile as grpc files |
|
195 </dd> |
|
196 </dl><dl> |
|
197 <dt>Returns:</dt> |
|
198 <dd> |
|
199 reference to the compile process |
|
200 </dd> |
|
201 </dl><dl> |
|
202 <dt>Return Type:</dt> |
|
203 <dd> |
|
204 QProcess |
|
205 </dd> |
|
206 </dl><a NAME="ProjectProtocolsBrowser.__compileProtoDone" ID="ProjectProtocolsBrowser.__compileProtoDone"></a> |
|
207 <h4>ProjectProtocolsBrowser.__compileProtoDone</h4> |
|
208 <b>__compileProtoDone</b>(<i>exitCode, exitStatus, grpc</i>) |
|
209 <p> |
|
210 Private slot to handle the finished signal of the protoc process. |
|
211 </p><dl> |
|
212 <dt><i>exitCode</i> (int)</dt> |
|
213 <dd> |
|
214 exit code of the process |
|
215 </dd><dt><i>exitStatus</i> (QProcess.ExitStatus)</dt> |
|
216 <dd> |
|
217 exit status of the process |
|
218 </dd><dt><i>grpc</i> (bool)</dt> |
|
219 <dd> |
|
220 flag indicating to compile as grpc files |
|
221 </dd> |
|
222 </dl><a NAME="ProjectProtocolsBrowser.__compileProtocol" ID="ProjectProtocolsBrowser.__compileProtocol"></a> |
|
223 <h4>ProjectProtocolsBrowser.__compileProtocol</h4> |
|
224 <b>__compileProtocol</b>(<i>grpc=False</i>) |
|
225 <p> |
|
226 Private method to compile a protocol to Python. |
|
227 </p><dl> |
|
228 <dt><i>grpc</i> (bool)</dt> |
|
229 <dd> |
|
230 flag indicating to compile as grpc files |
|
231 </dd> |
|
232 </dl><a NAME="ProjectProtocolsBrowser.__compileSelectedProtocols" ID="ProjectProtocolsBrowser.__compileSelectedProtocols"></a> |
|
233 <h4>ProjectProtocolsBrowser.__compileSelectedProtocols</h4> |
|
234 <b>__compileSelectedProtocols</b>(<i>grpc=False</i>) |
|
235 <p> |
|
236 Private method to compile selected protocols to Python. |
|
237 </p><dl> |
|
238 <dt><i>grpc</i> (bool)</dt> |
|
239 <dd> |
|
240 flag indicating to compile as grpc files |
|
241 </dd> |
|
242 </dl><a NAME="ProjectProtocolsBrowser.__configureProtobuf" ID="ProjectProtocolsBrowser.__configureProtobuf"></a> |
|
243 <h4>ProjectProtocolsBrowser.__configureProtobuf</h4> |
|
244 <b>__configureProtobuf</b>(<i></i>) |
|
245 <p> |
|
246 Private method to open the configuration dialog. |
|
247 </p><a NAME="ProjectProtocolsBrowser.__deleteFile" ID="ProjectProtocolsBrowser.__deleteFile"></a> |
|
248 <h4>ProjectProtocolsBrowser.__deleteFile</h4> |
|
249 <b>__deleteFile</b>(<i></i>) |
|
250 <p> |
|
251 Private method to delete files from the project. |
|
252 </p><a NAME="ProjectProtocolsBrowser.__getCompilerCommand" ID="ProjectProtocolsBrowser.__getCompilerCommand"></a> |
|
253 <h4>ProjectProtocolsBrowser.__getCompilerCommand</h4> |
|
254 <b>__getCompilerCommand</b>(<i>grpc</i>) |
|
255 <p> |
|
256 Private method to get the compiler command. |
|
257 </p><dl> |
|
258 <dt><i>grpc</i> (bool)</dt> |
|
259 <dd> |
|
260 flag indicating to get a grpc command |
|
261 </dd> |
|
262 </dl><dl> |
|
263 <dt>Returns:</dt> |
|
264 <dd> |
|
265 tuple giving the executable and its parameter list |
|
266 </dd> |
|
267 </dl><dl> |
|
268 <dt>Return Type:</dt> |
|
269 <dd> |
|
270 tuple of (str, list of str) |
|
271 </dd> |
|
272 </dl><a NAME="ProjectProtocolsBrowser.__readStderr" ID="ProjectProtocolsBrowser.__readStderr"></a> |
|
273 <h4>ProjectProtocolsBrowser.__readStderr</h4> |
|
274 <b>__readStderr</b>(<i></i>) |
|
275 <p> |
|
276 Private slot to handle the readyReadStandardError signal of the |
|
277 protoc process. |
|
278 </p><a NAME="ProjectProtocolsBrowser.__readStdout" ID="ProjectProtocolsBrowser.__readStdout"></a> |
|
279 <h4>ProjectProtocolsBrowser.__readStdout</h4> |
|
280 <b>__readStdout</b>(<i></i>) |
|
281 <p> |
|
282 Private slot to handle the readyReadStandardOutput signal of the |
|
283 protoc process. |
|
284 </p><a NAME="ProjectProtocolsBrowser.__showContextMenu" ID="ProjectProtocolsBrowser.__showContextMenu"></a> |
|
285 <h4>ProjectProtocolsBrowser.__showContextMenu</h4> |
|
286 <b>__showContextMenu</b>(<i></i>) |
|
287 <p> |
|
288 Private slot called by the menu aboutToShow signal. |
|
289 </p><a NAME="ProjectProtocolsBrowser.__showContextMenuBack" ID="ProjectProtocolsBrowser.__showContextMenuBack"></a> |
|
290 <h4>ProjectProtocolsBrowser.__showContextMenuBack</h4> |
|
291 <b>__showContextMenuBack</b>(<i></i>) |
|
292 <p> |
|
293 Private slot called by the backMenu aboutToShow signal. |
|
294 </p><a NAME="ProjectProtocolsBrowser.__showContextMenuDir" ID="ProjectProtocolsBrowser.__showContextMenuDir"></a> |
|
295 <h4>ProjectProtocolsBrowser.__showContextMenuDir</h4> |
|
296 <b>__showContextMenuDir</b>(<i></i>) |
|
297 <p> |
|
298 Private slot called by the dirMenu aboutToShow signal. |
|
299 </p><a NAME="ProjectProtocolsBrowser.__showContextMenuDirMulti" ID="ProjectProtocolsBrowser.__showContextMenuDirMulti"></a> |
|
300 <h4>ProjectProtocolsBrowser.__showContextMenuDirMulti</h4> |
|
301 <b>__showContextMenuDirMulti</b>(<i></i>) |
|
302 <p> |
|
303 Private slot called by the dirMultiMenu aboutToShow signal. |
|
304 </p><a NAME="ProjectProtocolsBrowser.__showContextMenuMulti" ID="ProjectProtocolsBrowser.__showContextMenuMulti"></a> |
|
305 <h4>ProjectProtocolsBrowser.__showContextMenuMulti</h4> |
|
306 <b>__showContextMenuMulti</b>(<i></i>) |
|
307 <p> |
|
308 Private slot called by the multiMenu aboutToShow signal. |
|
309 </p><a NAME="ProjectProtocolsBrowser._contextMenuRequested" ID="ProjectProtocolsBrowser._contextMenuRequested"></a> |
|
310 <h4>ProjectProtocolsBrowser._contextMenuRequested</h4> |
|
311 <b>_contextMenuRequested</b>(<i>coord</i>) |
|
312 <p> |
|
313 Protected slot to show the context menu. |
|
314 </p><dl> |
|
315 <dt><i>coord</i></dt> |
|
316 <dd> |
|
317 the position of the mouse pointer (QPoint) |
|
318 </dd> |
|
319 </dl><a NAME="ProjectProtocolsBrowser._createPopupMenus" ID="ProjectProtocolsBrowser._createPopupMenus"></a> |
|
320 <h4>ProjectProtocolsBrowser._createPopupMenus</h4> |
|
321 <b>_createPopupMenus</b>(<i></i>) |
|
322 <p> |
|
323 Protected overloaded method to generate the popup menu. |
|
324 </p><a NAME="ProjectProtocolsBrowser._openItem" ID="ProjectProtocolsBrowser._openItem"></a> |
|
325 <h4>ProjectProtocolsBrowser._openItem</h4> |
|
326 <b>_openItem</b>(<i></i>) |
|
327 <p> |
|
328 Protected slot to handle the open popup menu entry. |
|
329 </p> |
|
330 <div align="right"><a href="#top">Up</a></div> |
|
331 <hr /> |
|
332 </body></html> |