|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.DataViews.PyCoverageDialog</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.DataViews.PyCoverageDialog</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a Python code coverage dialog. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#PyCoverageDialog">PyCoverageDialog</a></td> |
|
39 <td>Class implementing a dialog to display the collected code coverage data.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="PyCoverageDialog" ID="PyCoverageDialog"></a> |
|
50 <h2>PyCoverageDialog</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a dialog to display the collected code coverage data. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 QDialog, Ui_PyCoverageDialog |
|
57 <h3>Class Attributes</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 |
|
69 <table> |
|
70 |
|
71 <tr> |
|
72 <td><a href="#PyCoverageDialog.__init__">PyCoverageDialog</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#PyCoverageDialog.__annotate">__annotate</a></td> |
|
77 <td>Private slot to handle the annotate context menu action.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#PyCoverageDialog.__annotateAll">__annotateAll</a></td> |
|
81 <td>Private slot to handle the annotate all context menu action.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#PyCoverageDialog.__createResultItem">__createResultItem</a></td> |
|
85 <td>Private method to create an entry in the result list.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#PyCoverageDialog.__deleteAnnotated">__deleteAnnotated</a></td> |
|
89 <td>Private slot to handle the delete annotated context menu action.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#PyCoverageDialog.__erase">__erase</a></td> |
|
93 <td>Private slot to handle the erase context menu action.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#PyCoverageDialog.__finish">__finish</a></td> |
|
97 <td>Private slot called when the action finished or the user pressed the button.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#PyCoverageDialog.__format_lines">__format_lines</a></td> |
|
101 <td>Private method to format a list of integers into string by coalescing groups.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#PyCoverageDialog.__openFile">__openFile</a></td> |
|
105 <td>Private slot to open the selected file.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#PyCoverageDialog.__showContextMenu">__showContextMenu</a></td> |
|
109 <td>Private slot to show the context menu of the listview.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#PyCoverageDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
113 <td>Private slot called by a button of the button box clicked.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#PyCoverageDialog.on_reloadButton_clicked">on_reloadButton_clicked</a></td> |
|
117 <td>Private slot to reload the coverage info.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#PyCoverageDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> |
|
121 <td>Private slot to handle the activation of an item.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#PyCoverageDialog.start">start</a></td> |
|
125 <td>Public slot to start the coverage data evaluation.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#PyCoverageDialog.stringify">stringify</a></td> |
|
129 <td>Private helper function to generate a string representation of a pair.</td> |
|
130 </tr> |
|
131 </table> |
|
132 <h3>Static Methods</h3> |
|
133 |
|
134 <table> |
|
135 <tr><td>None</td></tr> |
|
136 </table> |
|
137 |
|
138 <a NAME="PyCoverageDialog.__init__" ID="PyCoverageDialog.__init__"></a> |
|
139 <h4>PyCoverageDialog (Constructor)</h4> |
|
140 <b>PyCoverageDialog</b>(<i>parent=None</i>) |
|
141 |
|
142 <p> |
|
143 Constructor |
|
144 </p> |
|
145 <dl> |
|
146 |
|
147 <dt><i>parent</i></dt> |
|
148 <dd> |
|
149 parent widget (QWidget) |
|
150 </dd> |
|
151 </dl> |
|
152 <a NAME="PyCoverageDialog.__annotate" ID="PyCoverageDialog.__annotate"></a> |
|
153 <h4>PyCoverageDialog.__annotate</h4> |
|
154 <b>__annotate</b>(<i></i>) |
|
155 |
|
156 <p> |
|
157 Private slot to handle the annotate context menu action. |
|
158 </p> |
|
159 <p> |
|
160 This method produce an annotated coverage file of the |
|
161 selected file. |
|
162 </p> |
|
163 <a NAME="PyCoverageDialog.__annotateAll" ID="PyCoverageDialog.__annotateAll"></a> |
|
164 <h4>PyCoverageDialog.__annotateAll</h4> |
|
165 <b>__annotateAll</b>(<i></i>) |
|
166 |
|
167 <p> |
|
168 Private slot to handle the annotate all context menu action. |
|
169 </p> |
|
170 <p> |
|
171 This method produce an annotated coverage file of every |
|
172 file listed in the listview. |
|
173 </p> |
|
174 <a NAME="PyCoverageDialog.__createResultItem" ID="PyCoverageDialog.__createResultItem"></a> |
|
175 <h4>PyCoverageDialog.__createResultItem</h4> |
|
176 <b>__createResultItem</b>(<i>file, statements, executed, coverage, excluded, missing</i>) |
|
177 |
|
178 <p> |
|
179 Private method to create an entry in the result list. |
|
180 </p> |
|
181 <dl> |
|
182 |
|
183 <dt><i>file</i></dt> |
|
184 <dd> |
|
185 filename of file (string) |
|
186 </dd> |
|
187 <dt><i>statements</i></dt> |
|
188 <dd> |
|
189 amount of statements (integer) |
|
190 </dd> |
|
191 <dt><i>executed</i></dt> |
|
192 <dd> |
|
193 amount of executed statements (integer) |
|
194 </dd> |
|
195 <dt><i>coverage</i></dt> |
|
196 <dd> |
|
197 percent of coverage (integer) |
|
198 </dd> |
|
199 <dt><i>excluded</i></dt> |
|
200 <dd> |
|
201 list of excluded lines (string) |
|
202 </dd> |
|
203 <dt><i>missing</i></dt> |
|
204 <dd> |
|
205 list of lines without coverage (string) |
|
206 </dd> |
|
207 </dl> |
|
208 <a NAME="PyCoverageDialog.__deleteAnnotated" ID="PyCoverageDialog.__deleteAnnotated"></a> |
|
209 <h4>PyCoverageDialog.__deleteAnnotated</h4> |
|
210 <b>__deleteAnnotated</b>(<i></i>) |
|
211 |
|
212 <p> |
|
213 Private slot to handle the delete annotated context menu action. |
|
214 </p> |
|
215 <p> |
|
216 This method deletes all annotated files. These are files |
|
217 ending with ',cover'. |
|
218 </p> |
|
219 <a NAME="PyCoverageDialog.__erase" ID="PyCoverageDialog.__erase"></a> |
|
220 <h4>PyCoverageDialog.__erase</h4> |
|
221 <b>__erase</b>(<i></i>) |
|
222 |
|
223 <p> |
|
224 Private slot to handle the erase context menu action. |
|
225 </p> |
|
226 <p> |
|
227 This method erases the collected coverage data that is |
|
228 stored in the .coverage file. |
|
229 </p> |
|
230 <a NAME="PyCoverageDialog.__finish" ID="PyCoverageDialog.__finish"></a> |
|
231 <h4>PyCoverageDialog.__finish</h4> |
|
232 <b>__finish</b>(<i></i>) |
|
233 |
|
234 <p> |
|
235 Private slot called when the action finished or the user pressed the |
|
236 button. |
|
237 </p> |
|
238 <a NAME="PyCoverageDialog.__format_lines" ID="PyCoverageDialog.__format_lines"></a> |
|
239 <h4>PyCoverageDialog.__format_lines</h4> |
|
240 <b>__format_lines</b>(<i>lines</i>) |
|
241 |
|
242 <p> |
|
243 Private method to format a list of integers into string by coalescing |
|
244 groups. |
|
245 </p> |
|
246 <dl> |
|
247 |
|
248 <dt><i>lines</i></dt> |
|
249 <dd> |
|
250 list of integers |
|
251 </dd> |
|
252 </dl> |
|
253 <dl> |
|
254 <dt>Return:</dt> |
|
255 <dd> |
|
256 string representing the list |
|
257 </dd> |
|
258 </dl> |
|
259 <a NAME="PyCoverageDialog.__openFile" ID="PyCoverageDialog.__openFile"></a> |
|
260 <h4>PyCoverageDialog.__openFile</h4> |
|
261 <b>__openFile</b>(<i>itm=None</i>) |
|
262 |
|
263 <p> |
|
264 Private slot to open the selected file. |
|
265 </p> |
|
266 <dl> |
|
267 |
|
268 <dt><i>itm</i></dt> |
|
269 <dd> |
|
270 reference to the item to be opened (QTreeWidgetItem) |
|
271 </dd> |
|
272 </dl> |
|
273 <a NAME="PyCoverageDialog.__showContextMenu" ID="PyCoverageDialog.__showContextMenu"></a> |
|
274 <h4>PyCoverageDialog.__showContextMenu</h4> |
|
275 <b>__showContextMenu</b>(<i>coord</i>) |
|
276 |
|
277 <p> |
|
278 Private slot to show the context menu of the listview. |
|
279 </p> |
|
280 <dl> |
|
281 |
|
282 <dt><i>coord</i></dt> |
|
283 <dd> |
|
284 the position of the mouse pointer (QPoint) |
|
285 </dd> |
|
286 </dl> |
|
287 <a NAME="PyCoverageDialog.on_buttonBox_clicked" ID="PyCoverageDialog.on_buttonBox_clicked"></a> |
|
288 <h4>PyCoverageDialog.on_buttonBox_clicked</h4> |
|
289 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
290 |
|
291 <p> |
|
292 Private slot called by a button of the button box clicked. |
|
293 </p> |
|
294 <dl> |
|
295 |
|
296 <dt><i>button</i></dt> |
|
297 <dd> |
|
298 button that was clicked (QAbstractButton) |
|
299 </dd> |
|
300 </dl> |
|
301 <a NAME="PyCoverageDialog.on_reloadButton_clicked" ID="PyCoverageDialog.on_reloadButton_clicked"></a> |
|
302 <h4>PyCoverageDialog.on_reloadButton_clicked</h4> |
|
303 <b>on_reloadButton_clicked</b>(<i></i>) |
|
304 |
|
305 <p> |
|
306 Private slot to reload the coverage info. |
|
307 </p> |
|
308 <a NAME="PyCoverageDialog.on_resultList_itemActivated" ID="PyCoverageDialog.on_resultList_itemActivated"></a> |
|
309 <h4>PyCoverageDialog.on_resultList_itemActivated</h4> |
|
310 <b>on_resultList_itemActivated</b>(<i>item, column</i>) |
|
311 |
|
312 <p> |
|
313 Private slot to handle the activation of an item. |
|
314 </p> |
|
315 <dl> |
|
316 |
|
317 <dt><i>item</i></dt> |
|
318 <dd> |
|
319 reference to the activated item (QTreeWidgetItem) |
|
320 </dd> |
|
321 <dt><i>column</i></dt> |
|
322 <dd> |
|
323 column the item was activated in (integer) |
|
324 </dd> |
|
325 </dl> |
|
326 <a NAME="PyCoverageDialog.start" ID="PyCoverageDialog.start"></a> |
|
327 <h4>PyCoverageDialog.start</h4> |
|
328 <b>start</b>(<i>cfn, fn</i>) |
|
329 |
|
330 <p> |
|
331 Public slot to start the coverage data evaluation. |
|
332 </p> |
|
333 <dl> |
|
334 |
|
335 <dt><i>cfn</i></dt> |
|
336 <dd> |
|
337 basename of the coverage file (string) |
|
338 </dd> |
|
339 <dt><i>fn</i></dt> |
|
340 <dd> |
|
341 file or list of files or directory to be checked |
|
342 (string or list of strings) |
|
343 </dd> |
|
344 </dl> |
|
345 <a NAME="PyCoverageDialog.stringify" ID="PyCoverageDialog.stringify"></a> |
|
346 <h4>PyCoverageDialog.stringify</h4> |
|
347 <b>stringify</b>(<i></i>) |
|
348 |
|
349 <p> |
|
350 Private helper function to generate a string representation of a |
|
351 pair. |
|
352 </p> |
|
353 <dl> |
|
354 |
|
355 <dt><i>pair</i></dt> |
|
356 <dd> |
|
357 pair of integers |
|
358 </dd> |
|
359 </dl> |
|
360 <div align="right"><a href="#top">Up</a></div> |
|
361 <hr /> |
|
362 </body></html> |