eric6/Documentation/Source/eric6.DataViews.CodeMetricsDialog.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7989
a21d673a8f99
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.DataViews.CodeMetricsDialog</h1> 23 <h1>eric6.DataViews.CodeMetricsDialog</h1>
24
23 <p> 25 <p>
24 Module implementing a code metrics dialog. 26 Module implementing a code metrics dialog.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#CodeMetricsDialog">CodeMetricsDialog</a></td> 38 <td><a href="#CodeMetricsDialog">CodeMetricsDialog</a></td>
34 <td>Class implementing a dialog to display the code metrics.</td> 39 <td>Class implementing a dialog to display the code metrics.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
38 <table> 43
39 <tr><td>None</td></tr> 44 <table>
40 </table> 45 <tr><td>None</td></tr>
41 <hr /><hr /> 46 </table>
47 <hr />
48 <hr />
42 <a NAME="CodeMetricsDialog" ID="CodeMetricsDialog"></a> 49 <a NAME="CodeMetricsDialog" ID="CodeMetricsDialog"></a>
43 <h2>CodeMetricsDialog</h2> 50 <h2>CodeMetricsDialog</h2>
51
44 <p> 52 <p>
45 Class implementing a dialog to display the code metrics. 53 Class implementing a dialog to display the code metrics.
46 </p> 54 </p>
47 <h3>Derived from</h3> 55 <h3>Derived from</h3>
48 QDialog, Ui_CodeMetricsDialog 56 QDialog, Ui_CodeMetricsDialog
49 <h3>Class Attributes</h3> 57 <h3>Class Attributes</h3>
58
50 <table> 59 <table>
51 <tr><td>None</td></tr> 60 <tr><td>None</td></tr>
52 </table> 61 </table>
53 <h3>Class Methods</h3> 62 <h3>Class Methods</h3>
63
54 <table> 64 <table>
55 <tr><td>None</td></tr> 65 <tr><td>None</td></tr>
56 </table> 66 </table>
57 <h3>Methods</h3> 67 <h3>Methods</h3>
58 <table> 68
69 <table>
70
59 <tr> 71 <tr>
60 <td><a href="#CodeMetricsDialog.__init__">CodeMetricsDialog</a></td> 72 <td><a href="#CodeMetricsDialog.__init__">CodeMetricsDialog</a></td>
61 <td>Constructor</td> 73 <td>Constructor</td>
62 </tr><tr> 74 </tr>
75 <tr>
63 <td><a href="#CodeMetricsDialog.__createResultItem">__createResultItem</a></td> 76 <td><a href="#CodeMetricsDialog.__createResultItem">__createResultItem</a></td>
64 <td>Private slot to create a new item in the result list.</td> 77 <td>Private slot to create a new item in the result list.</td>
65 </tr><tr> 78 </tr>
79 <tr>
66 <td><a href="#CodeMetricsDialog.__createSummaryItem">__createSummaryItem</a></td> 80 <td><a href="#CodeMetricsDialog.__createSummaryItem">__createSummaryItem</a></td>
67 <td>Private slot to create a new item in the summary list.</td> 81 <td>Private slot to create a new item in the summary list.</td>
68 </tr><tr> 82 </tr>
83 <tr>
69 <td><a href="#CodeMetricsDialog.__finish">__finish</a></td> 84 <td><a href="#CodeMetricsDialog.__finish">__finish</a></td>
70 <td>Private slot called when the action finished or the user pressed the button.</td> 85 <td>Private slot called when the action finished or the user pressed the button.</td>
71 </tr><tr> 86 </tr>
87 <tr>
72 <td><a href="#CodeMetricsDialog.__getValues">__getValues</a></td> 88 <td><a href="#CodeMetricsDialog.__getValues">__getValues</a></td>
73 <td>Private method to extract the code metric values.</td> 89 <td>Private method to extract the code metric values.</td>
74 </tr><tr> 90 </tr>
91 <tr>
75 <td><a href="#CodeMetricsDialog.__resizeResultColumns">__resizeResultColumns</a></td> 92 <td><a href="#CodeMetricsDialog.__resizeResultColumns">__resizeResultColumns</a></td>
76 <td>Private method to resize the list columns.</td> 93 <td>Private method to resize the list columns.</td>
77 </tr><tr> 94 </tr>
95 <tr>
78 <td><a href="#CodeMetricsDialog.__resizeSummaryColumns">__resizeSummaryColumns</a></td> 96 <td><a href="#CodeMetricsDialog.__resizeSummaryColumns">__resizeSummaryColumns</a></td>
79 <td>Private method to resize the list columns.</td> 97 <td>Private method to resize the list columns.</td>
80 </tr><tr> 98 </tr>
99 <tr>
81 <td><a href="#CodeMetricsDialog.__resultCollapse">__resultCollapse</a></td> 100 <td><a href="#CodeMetricsDialog.__resultCollapse">__resultCollapse</a></td>
82 <td>Private slot to collapse all entries of the resultlist.</td> 101 <td>Private slot to collapse all entries of the resultlist.</td>
83 </tr><tr> 102 </tr>
103 <tr>
84 <td><a href="#CodeMetricsDialog.__resultExpand">__resultExpand</a></td> 104 <td><a href="#CodeMetricsDialog.__resultExpand">__resultExpand</a></td>
85 <td>Private slot to expand all entries of the resultlist.</td> 105 <td>Private slot to expand all entries of the resultlist.</td>
86 </tr><tr> 106 </tr>
107 <tr>
87 <td><a href="#CodeMetricsDialog.__showContextMenu">__showContextMenu</a></td> 108 <td><a href="#CodeMetricsDialog.__showContextMenu">__showContextMenu</a></td>
88 <td>Private slot to show the context menu of the listview.</td> 109 <td>Private slot to show the context menu of the listview.</td>
89 </tr><tr> 110 </tr>
111 <tr>
90 <td><a href="#CodeMetricsDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> 112 <td><a href="#CodeMetricsDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
91 <td>Private slot called by a button of the button box clicked.</td> 113 <td>Private slot called by a button of the button box clicked.</td>
92 </tr><tr> 114 </tr>
115 <tr>
93 <td><a href="#CodeMetricsDialog.on_startButton_clicked">on_startButton_clicked</a></td> 116 <td><a href="#CodeMetricsDialog.on_startButton_clicked">on_startButton_clicked</a></td>
94 <td>Private slot to start a code metrics run.</td> 117 <td>Private slot to start a code metrics run.</td>
95 </tr><tr> 118 </tr>
119 <tr>
96 <td><a href="#CodeMetricsDialog.prepare">prepare</a></td> 120 <td><a href="#CodeMetricsDialog.prepare">prepare</a></td>
97 <td>Public method to prepare the dialog with a list of filenames.</td> 121 <td>Public method to prepare the dialog with a list of filenames.</td>
98 </tr><tr> 122 </tr>
123 <tr>
99 <td><a href="#CodeMetricsDialog.start">start</a></td> 124 <td><a href="#CodeMetricsDialog.start">start</a></td>
100 <td>Public slot to start the code metrics determination.</td> 125 <td>Public slot to start the code metrics determination.</td>
101 </tr> 126 </tr>
102 </table> 127 </table>
103 <h3>Static Methods</h3> 128 <h3>Static Methods</h3>
104 <table> 129
105 <tr><td>None</td></tr> 130 <table>
106 </table> 131 <tr><td>None</td></tr>
132 </table>
133
107 <a NAME="CodeMetricsDialog.__init__" ID="CodeMetricsDialog.__init__"></a> 134 <a NAME="CodeMetricsDialog.__init__" ID="CodeMetricsDialog.__init__"></a>
108 <h4>CodeMetricsDialog (Constructor)</h4> 135 <h4>CodeMetricsDialog (Constructor)</h4>
109 <b>CodeMetricsDialog</b>(<i>parent=None</i>) 136 <b>CodeMetricsDialog</b>(<i>parent=None</i>)
137
110 <p> 138 <p>
111 Constructor 139 Constructor
112 </p><dl> 140 </p>
141 <dl>
142
113 <dt><i>parent</i></dt> 143 <dt><i>parent</i></dt>
114 <dd> 144 <dd>
115 parent widget (QWidget) 145 parent widget (QWidget)
116 </dd> 146 </dd>
117 </dl><a NAME="CodeMetricsDialog.__createResultItem" ID="CodeMetricsDialog.__createResultItem"></a> 147 </dl>
148 <a NAME="CodeMetricsDialog.__createResultItem" ID="CodeMetricsDialog.__createResultItem"></a>
118 <h4>CodeMetricsDialog.__createResultItem</h4> 149 <h4>CodeMetricsDialog.__createResultItem</h4>
119 <b>__createResultItem</b>(<i>parent, values</i>) 150 <b>__createResultItem</b>(<i>parent, values</i>)
151
120 <p> 152 <p>
121 Private slot to create a new item in the result list. 153 Private slot to create a new item in the result list.
122 </p><dl> 154 </p>
155 <dl>
156
123 <dt><i>parent</i></dt> 157 <dt><i>parent</i></dt>
124 <dd> 158 <dd>
125 parent of the new item (QTreeWidget or QTreeWidgetItem) 159 parent of the new item (QTreeWidget or QTreeWidgetItem)
126 </dd><dt><i>values</i></dt> 160 </dd>
161 <dt><i>values</i></dt>
127 <dd> 162 <dd>
128 values to be displayed (list) 163 values to be displayed (list)
129 </dd> 164 </dd>
130 </dl><dl> 165 </dl>
166 <dl>
131 <dt>Returns:</dt> 167 <dt>Returns:</dt>
132 <dd> 168 <dd>
133 the generated item 169 the generated item
134 </dd> 170 </dd>
135 </dl><a NAME="CodeMetricsDialog.__createSummaryItem" ID="CodeMetricsDialog.__createSummaryItem"></a> 171 </dl>
172 <a NAME="CodeMetricsDialog.__createSummaryItem" ID="CodeMetricsDialog.__createSummaryItem"></a>
136 <h4>CodeMetricsDialog.__createSummaryItem</h4> 173 <h4>CodeMetricsDialog.__createSummaryItem</h4>
137 <b>__createSummaryItem</b>(<i>col0, col1</i>) 174 <b>__createSummaryItem</b>(<i>col0, col1</i>)
175
138 <p> 176 <p>
139 Private slot to create a new item in the summary list. 177 Private slot to create a new item in the summary list.
140 </p><dl> 178 </p>
179 <dl>
180
141 <dt><i>col0</i></dt> 181 <dt><i>col0</i></dt>
142 <dd> 182 <dd>
143 string for column 0 (string) 183 string for column 0 (string)
144 </dd><dt><i>col1</i></dt> 184 </dd>
185 <dt><i>col1</i></dt>
145 <dd> 186 <dd>
146 string for column 1 (string) 187 string for column 1 (string)
147 </dd> 188 </dd>
148 </dl><a NAME="CodeMetricsDialog.__finish" ID="CodeMetricsDialog.__finish"></a> 189 </dl>
190 <a NAME="CodeMetricsDialog.__finish" ID="CodeMetricsDialog.__finish"></a>
149 <h4>CodeMetricsDialog.__finish</h4> 191 <h4>CodeMetricsDialog.__finish</h4>
150 <b>__finish</b>(<i></i>) 192 <b>__finish</b>(<i></i>)
193
151 <p> 194 <p>
152 Private slot called when the action finished or the user pressed the 195 Private slot called when the action finished or the user pressed the
153 button. 196 button.
154 </p><a NAME="CodeMetricsDialog.__getValues" ID="CodeMetricsDialog.__getValues"></a> 197 </p>
198 <a NAME="CodeMetricsDialog.__getValues" ID="CodeMetricsDialog.__getValues"></a>
155 <h4>CodeMetricsDialog.__getValues</h4> 199 <h4>CodeMetricsDialog.__getValues</h4>
156 <b>__getValues</b>(<i>loc, stats, identifier</i>) 200 <b>__getValues</b>(<i>loc, stats, identifier</i>)
201
157 <p> 202 <p>
158 Private method to extract the code metric values. 203 Private method to extract the code metric values.
159 </p><dl> 204 </p>
205 <dl>
206
160 <dt><i>loc</i></dt> 207 <dt><i>loc</i></dt>
161 <dd> 208 <dd>
162 reference to the locale object (QLocale) 209 reference to the locale object (QLocale)
163 </dd><dt><i>stats</i></dt> 210 </dd>
211 <dt><i>stats</i></dt>
164 <dd> 212 <dd>
165 reference to the code metric statistics object 213 reference to the code metric statistics object
166 </dd><dt><i>identifier</i></dt> 214 </dd>
215 <dt><i>identifier</i></dt>
167 <dd> 216 <dd>
168 identifier to get values for 217 identifier to get values for
169 </dd> 218 </dd>
170 </dl><dl> 219 </dl>
220 <dl>
171 <dt>Returns:</dt> 221 <dt>Returns:</dt>
172 <dd> 222 <dd>
173 list of values suitable for display (list of strings) 223 list of values suitable for display (list of strings)
174 </dd> 224 </dd>
175 </dl><a NAME="CodeMetricsDialog.__resizeResultColumns" ID="CodeMetricsDialog.__resizeResultColumns"></a> 225 </dl>
226 <a NAME="CodeMetricsDialog.__resizeResultColumns" ID="CodeMetricsDialog.__resizeResultColumns"></a>
176 <h4>CodeMetricsDialog.__resizeResultColumns</h4> 227 <h4>CodeMetricsDialog.__resizeResultColumns</h4>
177 <b>__resizeResultColumns</b>(<i></i>) 228 <b>__resizeResultColumns</b>(<i></i>)
229
178 <p> 230 <p>
179 Private method to resize the list columns. 231 Private method to resize the list columns.
180 </p><a NAME="CodeMetricsDialog.__resizeSummaryColumns" ID="CodeMetricsDialog.__resizeSummaryColumns"></a> 232 </p>
233 <a NAME="CodeMetricsDialog.__resizeSummaryColumns" ID="CodeMetricsDialog.__resizeSummaryColumns"></a>
181 <h4>CodeMetricsDialog.__resizeSummaryColumns</h4> 234 <h4>CodeMetricsDialog.__resizeSummaryColumns</h4>
182 <b>__resizeSummaryColumns</b>(<i></i>) 235 <b>__resizeSummaryColumns</b>(<i></i>)
236
183 <p> 237 <p>
184 Private method to resize the list columns. 238 Private method to resize the list columns.
185 </p><a NAME="CodeMetricsDialog.__resultCollapse" ID="CodeMetricsDialog.__resultCollapse"></a> 239 </p>
240 <a NAME="CodeMetricsDialog.__resultCollapse" ID="CodeMetricsDialog.__resultCollapse"></a>
186 <h4>CodeMetricsDialog.__resultCollapse</h4> 241 <h4>CodeMetricsDialog.__resultCollapse</h4>
187 <b>__resultCollapse</b>(<i></i>) 242 <b>__resultCollapse</b>(<i></i>)
243
188 <p> 244 <p>
189 Private slot to collapse all entries of the resultlist. 245 Private slot to collapse all entries of the resultlist.
190 </p><a NAME="CodeMetricsDialog.__resultExpand" ID="CodeMetricsDialog.__resultExpand"></a> 246 </p>
247 <a NAME="CodeMetricsDialog.__resultExpand" ID="CodeMetricsDialog.__resultExpand"></a>
191 <h4>CodeMetricsDialog.__resultExpand</h4> 248 <h4>CodeMetricsDialog.__resultExpand</h4>
192 <b>__resultExpand</b>(<i></i>) 249 <b>__resultExpand</b>(<i></i>)
250
193 <p> 251 <p>
194 Private slot to expand all entries of the resultlist. 252 Private slot to expand all entries of the resultlist.
195 </p><a NAME="CodeMetricsDialog.__showContextMenu" ID="CodeMetricsDialog.__showContextMenu"></a> 253 </p>
254 <a NAME="CodeMetricsDialog.__showContextMenu" ID="CodeMetricsDialog.__showContextMenu"></a>
196 <h4>CodeMetricsDialog.__showContextMenu</h4> 255 <h4>CodeMetricsDialog.__showContextMenu</h4>
197 <b>__showContextMenu</b>(<i>coord</i>) 256 <b>__showContextMenu</b>(<i>coord</i>)
257
198 <p> 258 <p>
199 Private slot to show the context menu of the listview. 259 Private slot to show the context menu of the listview.
200 </p><dl> 260 </p>
261 <dl>
262
201 <dt><i>coord</i></dt> 263 <dt><i>coord</i></dt>
202 <dd> 264 <dd>
203 the position of the mouse pointer (QPoint) 265 the position of the mouse pointer (QPoint)
204 </dd> 266 </dd>
205 </dl><a NAME="CodeMetricsDialog.on_buttonBox_clicked" ID="CodeMetricsDialog.on_buttonBox_clicked"></a> 267 </dl>
268 <a NAME="CodeMetricsDialog.on_buttonBox_clicked" ID="CodeMetricsDialog.on_buttonBox_clicked"></a>
206 <h4>CodeMetricsDialog.on_buttonBox_clicked</h4> 269 <h4>CodeMetricsDialog.on_buttonBox_clicked</h4>
207 <b>on_buttonBox_clicked</b>(<i>button</i>) 270 <b>on_buttonBox_clicked</b>(<i>button</i>)
271
208 <p> 272 <p>
209 Private slot called by a button of the button box clicked. 273 Private slot called by a button of the button box clicked.
210 </p><dl> 274 </p>
275 <dl>
276
211 <dt><i>button</i></dt> 277 <dt><i>button</i></dt>
212 <dd> 278 <dd>
213 button that was clicked (QAbstractButton) 279 button that was clicked (QAbstractButton)
214 </dd> 280 </dd>
215 </dl><a NAME="CodeMetricsDialog.on_startButton_clicked" ID="CodeMetricsDialog.on_startButton_clicked"></a> 281 </dl>
282 <a NAME="CodeMetricsDialog.on_startButton_clicked" ID="CodeMetricsDialog.on_startButton_clicked"></a>
216 <h4>CodeMetricsDialog.on_startButton_clicked</h4> 283 <h4>CodeMetricsDialog.on_startButton_clicked</h4>
217 <b>on_startButton_clicked</b>(<i></i>) 284 <b>on_startButton_clicked</b>(<i></i>)
285
218 <p> 286 <p>
219 Private slot to start a code metrics run. 287 Private slot to start a code metrics run.
220 </p><a NAME="CodeMetricsDialog.prepare" ID="CodeMetricsDialog.prepare"></a> 288 </p>
289 <a NAME="CodeMetricsDialog.prepare" ID="CodeMetricsDialog.prepare"></a>
221 <h4>CodeMetricsDialog.prepare</h4> 290 <h4>CodeMetricsDialog.prepare</h4>
222 <b>prepare</b>(<i>fileList, project</i>) 291 <b>prepare</b>(<i>fileList, project</i>)
292
223 <p> 293 <p>
224 Public method to prepare the dialog with a list of filenames. 294 Public method to prepare the dialog with a list of filenames.
225 </p><dl> 295 </p>
296 <dl>
297
226 <dt><i>fileList</i></dt> 298 <dt><i>fileList</i></dt>
227 <dd> 299 <dd>
228 list of filenames (list of strings) 300 list of filenames (list of strings)
229 </dd><dt><i>project</i></dt> 301 </dd>
302 <dt><i>project</i></dt>
230 <dd> 303 <dd>
231 reference to the project object (Project) 304 reference to the project object (Project)
232 </dd> 305 </dd>
233 </dl><a NAME="CodeMetricsDialog.start" ID="CodeMetricsDialog.start"></a> 306 </dl>
307 <a NAME="CodeMetricsDialog.start" ID="CodeMetricsDialog.start"></a>
234 <h4>CodeMetricsDialog.start</h4> 308 <h4>CodeMetricsDialog.start</h4>
235 <b>start</b>(<i>fn</i>) 309 <b>start</b>(<i>fn</i>)
310
236 <p> 311 <p>
237 Public slot to start the code metrics determination. 312 Public slot to start the code metrics determination.
238 </p><dl> 313 </p>
314 <dl>
315
239 <dt><i>fn</i></dt> 316 <dt><i>fn</i></dt>
240 <dd> 317 <dd>
241 file or list of files or directory to show 318 file or list of files or directory to show
242 the code metrics for (string or list of strings) 319 the code metrics for (string or list of strings)
243 </dd> 320 </dd>

eric ide

mercurial