RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CyclomaticComplexityDialog.html

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

eric ide

mercurial