RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.RawMetricsDialog.html

changeset 14
5f206edea27e
child 18
58ce8a433422
equal deleted inserted replaced
13:22bc345844e7 14:5f206edea27e
1 <!DOCTYPE html>
2 <html><head>
3 <title>Plugin_Metrics_Radon.RadonMetrics.RawMetricsDialog</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>Plugin_Metrics_Radon.RadonMetrics.RawMetricsDialog</h1>
23 <p>
24 Module implementing a dialog to show raw code metrics.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#RawMetricsDialog">RawMetricsDialog</a></td>
34 <td>Class implementing a dialog to show raw code metrics.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="RawMetricsDialog" ID="RawMetricsDialog"></a>
43 <h2>RawMetricsDialog</h2>
44 <p>
45 Class implementing a dialog to show raw code metrics.
46 </p>
47 <h3>Derived from</h3>
48 QDialog, Ui_RawMetricsDialog
49 <h3>Class Attributes</h3>
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Class Methods</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Methods</h3>
58 <table>
59 <tr>
60 <td><a href="#RawMetricsDialog.__init__">RawMetricsDialog</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#RawMetricsDialog.__batchFinished">__batchFinished</a></td>
64 <td>Private slot handling the completion of a batch job.</td>
65 </tr><tr>
66 <td><a href="#RawMetricsDialog.__createErrorItem">__createErrorItem</a></td>
67 <td>Private slot to create a new error item in the result list.</td>
68 </tr><tr>
69 <td><a href="#RawMetricsDialog.__createResultItem">__createResultItem</a></td>
70 <td>Private slot to create a new item in the result list.</td>
71 </tr><tr>
72 <td><a href="#RawMetricsDialog.__createSummary">__createSummary</a></td>
73 <td>Private method to create the code metrics summary.</td>
74 </tr><tr>
75 <td><a href="#RawMetricsDialog.__createSummaryItem">__createSummaryItem</a></td>
76 <td>Private slot to create a new item in the summary list.</td>
77 </tr><tr>
78 <td><a href="#RawMetricsDialog.__finish">__finish</a></td>
79 <td>Private slot called when the action or the user pressed the button.</td>
80 </tr><tr>
81 <td><a href="#RawMetricsDialog.__getValues">__getValues</a></td>
82 <td>Private method to extract the code metric values.</td>
83 </tr><tr>
84 <td><a href="#RawMetricsDialog.__processError">__processError</a></td>
85 <td>Private slot to process an error indication from the service.</td>
86 </tr><tr>
87 <td><a href="#RawMetricsDialog.__processResult">__processResult</a></td>
88 <td>Private slot called after perfoming a code metrics calculation on one file.</td>
89 </tr><tr>
90 <td><a href="#RawMetricsDialog.__resizeResultColumns">__resizeResultColumns</a></td>
91 <td>Private method to resize the list columns.</td>
92 </tr><tr>
93 <td><a href="#RawMetricsDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
94 <td>Private slot called by a button of the button box clicked.</td>
95 </tr><tr>
96 <td><a href="#RawMetricsDialog.on_startButton_clicked">on_startButton_clicked</a></td>
97 <td>Private slot to start a code metrics run.</td>
98 </tr><tr>
99 <td><a href="#RawMetricsDialog.prepare">prepare</a></td>
100 <td>Public method to prepare the dialog with a list of filenames.</td>
101 </tr><tr>
102 <td><a href="#RawMetricsDialog.rawMetrics">rawMetrics</a></td>
103 <td>Public method to start a code metrics calculation for one Python file.</td>
104 </tr><tr>
105 <td><a href="#RawMetricsDialog.rawMetricsBatch">rawMetricsBatch</a></td>
106 <td>Public method to start a code metrics calculation batch job.</td>
107 </tr><tr>
108 <td><a href="#RawMetricsDialog.start">start</a></td>
109 <td>Public slot to start the code metrics determination.</td>
110 </tr>
111 </table>
112 <h3>Static Methods</h3>
113 <table>
114 <tr><td>None</td></tr>
115 </table>
116 <a NAME="RawMetricsDialog.__init__" ID="RawMetricsDialog.__init__"></a>
117 <h4>RawMetricsDialog (Constructor)</h4>
118 <b>RawMetricsDialog</b>(<i>radonService, parent=None</i>)
119 <p>
120 Constructor
121 </p><dl>
122 <dt><i>radonService</i> (RadonMetricsPlugin)</dt>
123 <dd>
124 reference to the service
125 </dd><dt><i>parent</i> (QWidget)</dt>
126 <dd>
127 reference to the parent widget
128 </dd>
129 </dl><a NAME="RawMetricsDialog.__batchFinished" ID="RawMetricsDialog.__batchFinished"></a>
130 <h4>RawMetricsDialog.__batchFinished</h4>
131 <b>__batchFinished</b>(<i>type_</i>)
132 <p>
133 Private slot handling the completion of a batch job.
134 </p><dl>
135 <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt>
136 <dd>
137 type of the calculated metrics
138 </dd>
139 </dl><a NAME="RawMetricsDialog.__createErrorItem" ID="RawMetricsDialog.__createErrorItem"></a>
140 <h4>RawMetricsDialog.__createErrorItem</h4>
141 <b>__createErrorItem</b>(<i>filename, message</i>)
142 <p>
143 Private slot to create a new error item in the result list.
144 </p><dl>
145 <dt><i>filename</i> (str)</dt>
146 <dd>
147 name of the file
148 </dd><dt><i>message</i> (str)</dt>
149 <dd>
150 error message
151 </dd>
152 </dl><a NAME="RawMetricsDialog.__createResultItem" ID="RawMetricsDialog.__createResultItem"></a>
153 <h4>RawMetricsDialog.__createResultItem</h4>
154 <b>__createResultItem</b>(<i>filename, values</i>)
155 <p>
156 Private slot to create a new item in the result list.
157 </p><dl>
158 <dt><i>filename</i> (str)</dt>
159 <dd>
160 name of the file
161 </dd><dt><i>values</i> (dict)</dt>
162 <dd>
163 values to be displayed
164 </dd>
165 </dl><a NAME="RawMetricsDialog.__createSummary" ID="RawMetricsDialog.__createSummary"></a>
166 <h4>RawMetricsDialog.__createSummary</h4>
167 <b>__createSummary</b>(<i></i>)
168 <p>
169 Private method to create the code metrics summary.
170 </p><a NAME="RawMetricsDialog.__createSummaryItem" ID="RawMetricsDialog.__createSummaryItem"></a>
171 <h4>RawMetricsDialog.__createSummaryItem</h4>
172 <b>__createSummaryItem</b>(<i>col0, col1</i>)
173 <p>
174 Private slot to create a new item in the summary list.
175 </p><dl>
176 <dt><i>col0</i></dt>
177 <dd>
178 string for column 0 (string)
179 </dd><dt><i>col1</i></dt>
180 <dd>
181 string for column 1 (string)
182 </dd>
183 </dl><a NAME="RawMetricsDialog.__finish" ID="RawMetricsDialog.__finish"></a>
184 <h4>RawMetricsDialog.__finish</h4>
185 <b>__finish</b>(<i></i>)
186 <p>
187 Private slot called when the action or the user pressed the button.
188 </p><a NAME="RawMetricsDialog.__getValues" ID="RawMetricsDialog.__getValues"></a>
189 <h4>RawMetricsDialog.__getValues</h4>
190 <b>__getValues</b>(<i>result</i>)
191 <p>
192 Private method to extract the code metric values.
193 </p><dl>
194 <dt><i>result</i> (dict)</dt>
195 <dd>
196 result dict
197 </dd>
198 </dl><dl>
199 <dt>Returns:</dt>
200 <dd>
201 list of values suitable for display
202 </dd>
203 </dl><dl>
204 <dt>Return Type:</dt>
205 <dd>
206 list of str
207 </dd>
208 </dl><a NAME="RawMetricsDialog.__processError" ID="RawMetricsDialog.__processError"></a>
209 <h4>RawMetricsDialog.__processError</h4>
210 <b>__processError</b>(<i>type_, fn, msg</i>)
211 <p>
212 Private slot to process an error indication from the service.
213 </p><dl>
214 <dt><i>type_</i> (str, one of ["raw", "mi", "cc"])</dt>
215 <dd>
216 type of the calculated metrics
217 </dd><dt><i>fn</i> (str)</dt>
218 <dd>
219 filename of the file
220 </dd><dt><i>msg</i> (str)</dt>
221 <dd>
222 error message
223 </dd>
224 </dl><a NAME="RawMetricsDialog.__processResult" ID="RawMetricsDialog.__processResult"></a>
225 <h4>RawMetricsDialog.__processResult</h4>
226 <b>__processResult</b>(<i>fn, result</i>)
227 <p>
228 Private slot called after perfoming a code metrics calculation on one
229 file.
230 </p><dl>
231 <dt><i>fn</i> (str)</dt>
232 <dd>
233 filename of the file
234 </dd><dt><i>result</i> (dict)</dt>
235 <dd>
236 result dict
237 </dd>
238 </dl><a NAME="RawMetricsDialog.__resizeResultColumns" ID="RawMetricsDialog.__resizeResultColumns"></a>
239 <h4>RawMetricsDialog.__resizeResultColumns</h4>
240 <b>__resizeResultColumns</b>(<i></i>)
241 <p>
242 Private method to resize the list columns.
243 </p><a NAME="RawMetricsDialog.on_buttonBox_clicked" ID="RawMetricsDialog.on_buttonBox_clicked"></a>
244 <h4>RawMetricsDialog.on_buttonBox_clicked</h4>
245 <b>on_buttonBox_clicked</b>(<i>button</i>)
246 <p>
247 Private slot called by a button of the button box clicked.
248 </p><dl>
249 <dt><i>button</i> (QAbstractButton)</dt>
250 <dd>
251 button that was clicked
252 </dd>
253 </dl><a NAME="RawMetricsDialog.on_startButton_clicked" ID="RawMetricsDialog.on_startButton_clicked"></a>
254 <h4>RawMetricsDialog.on_startButton_clicked</h4>
255 <b>on_startButton_clicked</b>(<i></i>)
256 <p>
257 Private slot to start a code metrics run.
258 </p><a NAME="RawMetricsDialog.prepare" ID="RawMetricsDialog.prepare"></a>
259 <h4>RawMetricsDialog.prepare</h4>
260 <b>prepare</b>(<i>fileList, project</i>)
261 <p>
262 Public method to prepare the dialog with a list of filenames.
263 </p><dl>
264 <dt><i>fileList</i> (list of str)</dt>
265 <dd>
266 list of filenames
267 </dd><dt><i>project</i> (Project)</dt>
268 <dd>
269 reference to the project object
270 </dd>
271 </dl><a NAME="RawMetricsDialog.rawMetrics" ID="RawMetricsDialog.rawMetrics"></a>
272 <h4>RawMetricsDialog.rawMetrics</h4>
273 <b>rawMetrics</b>(<i>codestring=''</i>)
274 <p>
275 Public method to start a code metrics calculation for one Python file.
276 </p><p>
277 The results are reported to the __processResult slot.
278 </p><dl>
279 <dt><i>codestring=</i> (str)</dt>
280 <dd>
281 optional sourcestring
282 </dd>
283 </dl><a NAME="RawMetricsDialog.rawMetricsBatch" ID="RawMetricsDialog.rawMetricsBatch"></a>
284 <h4>RawMetricsDialog.rawMetricsBatch</h4>
285 <b>rawMetricsBatch</b>(<i></i>)
286 <p>
287 Public method to start a code metrics calculation batch job.
288 </p><p>
289 The results are reported to the __processResult slot.
290 </p><a NAME="RawMetricsDialog.start" ID="RawMetricsDialog.start"></a>
291 <h4>RawMetricsDialog.start</h4>
292 <b>start</b>(<i>fn</i>)
293 <p>
294 Public slot to start the code metrics determination.
295 </p><dl>
296 <dt><i>fn</i> (str or list of str)</dt>
297 <dd>
298 file or list of files or directory to show
299 the code metrics for
300 </dd>
301 </dl>
302 <div align="right"><a href="#top">Up</a></div>
303 <hr />
304 </body></html>

eric ide

mercurial