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