|
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.DataViews.PyCoverageDialog</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.DataViews.PyCoverageDialog</h1> |
|
12 <p> |
|
13 Module implementing a Python code coverage 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="#PyCoverageDialog">PyCoverageDialog</a></td> |
|
23 <td>Class implementing a dialog to display the collected code coverage data.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="PyCoverageDialog" ID="PyCoverageDialog"></a> |
|
32 <h2>PyCoverageDialog</h2> |
|
33 <p> |
|
34 Class implementing a dialog to display the collected code coverage data. |
|
35 </p> |
|
36 <h3>Derived from</h3> |
|
37 QDialog, Ui_PyCoverageDialog |
|
38 <h3>Class Attributes</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <h3>Methods</h3> |
|
43 <table> |
|
44 <tr> |
|
45 <td><a href="#PyCoverageDialog.__init__">PyCoverageDialog</a></td> |
|
46 <td>Constructor</td> |
|
47 </tr><tr> |
|
48 <td><a href="#PyCoverageDialog.__annotate">__annotate</a></td> |
|
49 <td>Private slot to handle the annotate context menu action.</td> |
|
50 </tr><tr> |
|
51 <td><a href="#PyCoverageDialog.__annotateAll">__annotateAll</a></td> |
|
52 <td>Private slot to handle the annotate all context menu action.</td> |
|
53 </tr><tr> |
|
54 <td><a href="#PyCoverageDialog.__createResultItem">__createResultItem</a></td> |
|
55 <td>Private method to create an entry in the result list.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#PyCoverageDialog.__deleteAnnotated">__deleteAnnotated</a></td> |
|
58 <td>Private slot to handle the delete annotated context menu action.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#PyCoverageDialog.__erase">__erase</a></td> |
|
61 <td>Private slot to handle the erase context menu action.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#PyCoverageDialog.__finish">__finish</a></td> |
|
64 <td>Private slot called when the action finished or the user pressed the button.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#PyCoverageDialog.__format_lines">__format_lines</a></td> |
|
67 <td>Private method to format a list of integers into string by coalescing groups.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#PyCoverageDialog.__showContextMenu">__showContextMenu</a></td> |
|
70 <td>Private slot to show the context menu of the listview.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#PyCoverageDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
73 <td>Private slot called by a button of the button box clicked.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#PyCoverageDialog.on_reloadButton_clicked">on_reloadButton_clicked</a></td> |
|
76 <td>Private slot to reload the coverage info.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#PyCoverageDialog.start">start</a></td> |
|
79 <td>Public slot to start the coverage data evaluation.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#PyCoverageDialog.stringify">stringify</a></td> |
|
82 <td>Private helper function to generate a string representation of a pair</td> |
|
83 </tr> |
|
84 </table> |
|
85 <a NAME="PyCoverageDialog.__init__" ID="PyCoverageDialog.__init__"></a> |
|
86 <h4>PyCoverageDialog (Constructor)</h4> |
|
87 <b>PyCoverageDialog</b>(<i>parent = None</i>) |
|
88 <p> |
|
89 Constructor |
|
90 </p><dl> |
|
91 <dt><i>parent</i></dt> |
|
92 <dd> |
|
93 parent widget (QWidget) |
|
94 </dd> |
|
95 </dl><a NAME="PyCoverageDialog.__annotate" ID="PyCoverageDialog.__annotate"></a> |
|
96 <h4>PyCoverageDialog.__annotate</h4> |
|
97 <b>__annotate</b>(<i></i>) |
|
98 <p> |
|
99 Private slot to handle the annotate context menu action. |
|
100 </p><p> |
|
101 This method produce an annotated coverage file of the |
|
102 selected file. |
|
103 </p><a NAME="PyCoverageDialog.__annotateAll" ID="PyCoverageDialog.__annotateAll"></a> |
|
104 <h4>PyCoverageDialog.__annotateAll</h4> |
|
105 <b>__annotateAll</b>(<i></i>) |
|
106 <p> |
|
107 Private slot to handle the annotate all context menu action. |
|
108 </p><p> |
|
109 This method produce an annotated coverage file of every |
|
110 file listed in the listview. |
|
111 </p><a NAME="PyCoverageDialog.__createResultItem" ID="PyCoverageDialog.__createResultItem"></a> |
|
112 <h4>PyCoverageDialog.__createResultItem</h4> |
|
113 <b>__createResultItem</b>(<i>file, statements, executed, coverage, excluded, missing</i>) |
|
114 <p> |
|
115 Private method to create an entry in the result list. |
|
116 </p><dl> |
|
117 <dt><i>file</i></dt> |
|
118 <dd> |
|
119 filename of file (string) |
|
120 </dd><dt><i>statements</i></dt> |
|
121 <dd> |
|
122 amount of statements (integer) |
|
123 </dd><dt><i>executed</i></dt> |
|
124 <dd> |
|
125 amount of executed statements (integer) |
|
126 </dd><dt><i>coverage</i></dt> |
|
127 <dd> |
|
128 percent of coverage (integer) |
|
129 </dd><dt><i>excluded</i></dt> |
|
130 <dd> |
|
131 list of excluded lines (string) |
|
132 </dd><dt><i>missing</i></dt> |
|
133 <dd> |
|
134 list of lines without coverage (string) |
|
135 </dd> |
|
136 </dl><a NAME="PyCoverageDialog.__deleteAnnotated" ID="PyCoverageDialog.__deleteAnnotated"></a> |
|
137 <h4>PyCoverageDialog.__deleteAnnotated</h4> |
|
138 <b>__deleteAnnotated</b>(<i></i>) |
|
139 <p> |
|
140 Private slot to handle the delete annotated context menu action. |
|
141 </p><p> |
|
142 This method deletes all annotated files. These are files |
|
143 ending with ',cover'. |
|
144 </p><a NAME="PyCoverageDialog.__erase" ID="PyCoverageDialog.__erase"></a> |
|
145 <h4>PyCoverageDialog.__erase</h4> |
|
146 <b>__erase</b>(<i></i>) |
|
147 <p> |
|
148 Private slot to handle the erase context menu action. |
|
149 </p><p> |
|
150 This method erases the collected coverage data that is |
|
151 stored in the .coverage file. |
|
152 </p><a NAME="PyCoverageDialog.__finish" ID="PyCoverageDialog.__finish"></a> |
|
153 <h4>PyCoverageDialog.__finish</h4> |
|
154 <b>__finish</b>(<i></i>) |
|
155 <p> |
|
156 Private slot called when the action finished or the user pressed the button. |
|
157 </p><a NAME="PyCoverageDialog.__format_lines" ID="PyCoverageDialog.__format_lines"></a> |
|
158 <h4>PyCoverageDialog.__format_lines</h4> |
|
159 <b>__format_lines</b>(<i>lines</i>) |
|
160 <p> |
|
161 Private method to format a list of integers into string by coalescing groups. |
|
162 </p><dl> |
|
163 <dt><i>lines</i></dt> |
|
164 <dd> |
|
165 list of integers |
|
166 </dd> |
|
167 </dl><dl> |
|
168 <dt>Returns:</dt> |
|
169 <dd> |
|
170 string representing the list |
|
171 </dd> |
|
172 </dl><a NAME="PyCoverageDialog.__showContextMenu" ID="PyCoverageDialog.__showContextMenu"></a> |
|
173 <h4>PyCoverageDialog.__showContextMenu</h4> |
|
174 <b>__showContextMenu</b>(<i>coord</i>) |
|
175 <p> |
|
176 Private slot to show the context menu of the listview. |
|
177 </p><dl> |
|
178 <dt><i>coord</i></dt> |
|
179 <dd> |
|
180 the position of the mouse pointer (QPoint) |
|
181 </dd> |
|
182 </dl><a NAME="PyCoverageDialog.on_buttonBox_clicked" ID="PyCoverageDialog.on_buttonBox_clicked"></a> |
|
183 <h4>PyCoverageDialog.on_buttonBox_clicked</h4> |
|
184 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
185 <p> |
|
186 Private slot called by a button of the button box clicked. |
|
187 </p><dl> |
|
188 <dt><i>button</i></dt> |
|
189 <dd> |
|
190 button that was clicked (QAbstractButton) |
|
191 </dd> |
|
192 </dl><a NAME="PyCoverageDialog.on_reloadButton_clicked" ID="PyCoverageDialog.on_reloadButton_clicked"></a> |
|
193 <h4>PyCoverageDialog.on_reloadButton_clicked</h4> |
|
194 <b>on_reloadButton_clicked</b>(<i></i>) |
|
195 <p> |
|
196 Private slot to reload the coverage info. |
|
197 </p><a NAME="PyCoverageDialog.start" ID="PyCoverageDialog.start"></a> |
|
198 <h4>PyCoverageDialog.start</h4> |
|
199 <b>start</b>(<i>cfn, fn</i>) |
|
200 <p> |
|
201 Public slot to start the coverage data evaluation. |
|
202 </p><dl> |
|
203 <dt><i>cfn</i></dt> |
|
204 <dd> |
|
205 basename of the coverage file (string) |
|
206 </dd><dt><i>fn</i></dt> |
|
207 <dd> |
|
208 file or list of files or directory to be checked |
|
209 (string or list of strings) |
|
210 </dd> |
|
211 </dl><a NAME="PyCoverageDialog.stringify" ID="PyCoverageDialog.stringify"></a> |
|
212 <h4>PyCoverageDialog.stringify</h4> |
|
213 <b>stringify</b>(<i></i>) |
|
214 <p> |
|
215 Private helper function to generate a string representation of a pair |
|
216 </p><dl> |
|
217 <dt><i>pair</i></dt> |
|
218 <dd> |
|
219 pair of integers |
|
220 </dd> |
|
221 </dl> |
|
222 <div align="right"><a href="#top">Up</a></div> |
|
223 <hr /> |
|
224 </body></html> |