|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Plugins.CheckerPlugins.Tabnanny.TabnannyDialog</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>eric6.Plugins.CheckerPlugins.Tabnanny.TabnannyDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog to show the output of the tabnanny command |
|
25 process. |
|
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="#TabnannyDialog">TabnannyDialog</a></td> |
|
35 <td>Class implementing a dialog to show the results of the tabnanny check run.</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="TabnannyDialog" ID="TabnannyDialog"></a> |
|
44 <h2>TabnannyDialog</h2> |
|
45 <p> |
|
46 Class implementing a dialog to show the results of the tabnanny check run. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QDialog, Ui_TabnannyDialog |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>filenameRole</td></tr> |
|
53 </table> |
|
54 <h3>Class Methods</h3> |
|
55 <table> |
|
56 <tr><td>None</td></tr> |
|
57 </table> |
|
58 <h3>Methods</h3> |
|
59 <table> |
|
60 <tr> |
|
61 <td><a href="#TabnannyDialog.__init__">TabnannyDialog</a></td> |
|
62 <td>Constructor</td> |
|
63 </tr><tr> |
|
64 <td><a href="#TabnannyDialog.__batchFinished">__batchFinished</a></td> |
|
65 <td>Private slot handling the completion of a batch job.</td> |
|
66 </tr><tr> |
|
67 <td><a href="#TabnannyDialog.__createErrorItem">__createErrorItem</a></td> |
|
68 <td>Private slot to create a new error item in the result list.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#TabnannyDialog.__createResultItem">__createResultItem</a></td> |
|
71 <td>Private method to create an entry in the result list.</td> |
|
72 </tr><tr> |
|
73 <td><a href="#TabnannyDialog.__finish">__finish</a></td> |
|
74 <td>Private slot called when the action or the user pressed the button.</td> |
|
75 </tr><tr> |
|
76 <td><a href="#TabnannyDialog.__processError">__processError</a></td> |
|
77 <td>Private slot to process an error indication from the service.</td> |
|
78 </tr><tr> |
|
79 <td><a href="#TabnannyDialog.__processResult">__processResult</a></td> |
|
80 <td>Private slot called after perfoming a style check on one file.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#TabnannyDialog.__resort">__resort</a></td> |
|
83 <td>Private method to resort the tree.</td> |
|
84 </tr><tr> |
|
85 <td><a href="#TabnannyDialog.check">check</a></td> |
|
86 <td>Public method to start an indentation check for one file.</td> |
|
87 </tr><tr> |
|
88 <td><a href="#TabnannyDialog.checkBatch">checkBatch</a></td> |
|
89 <td>Public method to start an indentation check batch job.</td> |
|
90 </tr><tr> |
|
91 <td><a href="#TabnannyDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
92 <td>Private slot called by a button of the button box clicked.</td> |
|
93 </tr><tr> |
|
94 <td><a href="#TabnannyDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> |
|
95 <td>Private slot to handle the activation of an item.</td> |
|
96 </tr><tr> |
|
97 <td><a href="#TabnannyDialog.on_startButton_clicked">on_startButton_clicked</a></td> |
|
98 <td>Private slot to start a code metrics run.</td> |
|
99 </tr><tr> |
|
100 <td><a href="#TabnannyDialog.prepare">prepare</a></td> |
|
101 <td>Public method to prepare the dialog with a list of filenames.</td> |
|
102 </tr><tr> |
|
103 <td><a href="#TabnannyDialog.start">start</a></td> |
|
104 <td>Public slot to start the tabnanny check.</td> |
|
105 </tr> |
|
106 </table> |
|
107 <h3>Static Methods</h3> |
|
108 <table> |
|
109 <tr><td>None</td></tr> |
|
110 </table> |
|
111 <a NAME="TabnannyDialog.__init__" ID="TabnannyDialog.__init__"></a> |
|
112 <h4>TabnannyDialog (Constructor)</h4> |
|
113 <b>TabnannyDialog</b>(<i>indentCheckService, parent=None</i>) |
|
114 <p> |
|
115 Constructor |
|
116 </p><dl> |
|
117 <dt><i>indentCheckService</i></dt> |
|
118 <dd> |
|
119 reference to the service (IndentCheckService) |
|
120 </dd><dt><i>parent</i></dt> |
|
121 <dd> |
|
122 The parent widget (QWidget). |
|
123 </dd> |
|
124 </dl><a NAME="TabnannyDialog.__batchFinished" ID="TabnannyDialog.__batchFinished"></a> |
|
125 <h4>TabnannyDialog.__batchFinished</h4> |
|
126 <b>__batchFinished</b>(<i></i>) |
|
127 <p> |
|
128 Private slot handling the completion of a batch job. |
|
129 </p><a NAME="TabnannyDialog.__createErrorItem" ID="TabnannyDialog.__createErrorItem"></a> |
|
130 <h4>TabnannyDialog.__createErrorItem</h4> |
|
131 <b>__createErrorItem</b>(<i>filename, message</i>) |
|
132 <p> |
|
133 Private slot to create a new error item in the result list. |
|
134 </p><dl> |
|
135 <dt><i>filename</i> (str)</dt> |
|
136 <dd> |
|
137 name of the file |
|
138 </dd><dt><i>message</i> (str)</dt> |
|
139 <dd> |
|
140 error message |
|
141 </dd> |
|
142 </dl><a NAME="TabnannyDialog.__createResultItem" ID="TabnannyDialog.__createResultItem"></a> |
|
143 <h4>TabnannyDialog.__createResultItem</h4> |
|
144 <b>__createResultItem</b>(<i>filename, line, sourcecode</i>) |
|
145 <p> |
|
146 Private method to create an entry in the result list. |
|
147 </p><dl> |
|
148 <dt><i>filename</i></dt> |
|
149 <dd> |
|
150 filename of file (string) |
|
151 </dd><dt><i>line</i></dt> |
|
152 <dd> |
|
153 linenumber of faulty source (integer or string) |
|
154 </dd><dt><i>sourcecode</i></dt> |
|
155 <dd> |
|
156 faulty line of code (string) |
|
157 </dd> |
|
158 </dl><a NAME="TabnannyDialog.__finish" ID="TabnannyDialog.__finish"></a> |
|
159 <h4>TabnannyDialog.__finish</h4> |
|
160 <b>__finish</b>(<i></i>) |
|
161 <p> |
|
162 Private slot called when the action or the user pressed the button. |
|
163 </p><a NAME="TabnannyDialog.__processError" ID="TabnannyDialog.__processError"></a> |
|
164 <h4>TabnannyDialog.__processError</h4> |
|
165 <b>__processError</b>(<i>fn, msg</i>) |
|
166 <p> |
|
167 Private slot to process an error indication from the service. |
|
168 </p><dl> |
|
169 <dt><i>fn</i> (str)</dt> |
|
170 <dd> |
|
171 filename of the file |
|
172 </dd><dt><i>msg</i> (str)</dt> |
|
173 <dd> |
|
174 error message |
|
175 </dd> |
|
176 </dl><a NAME="TabnannyDialog.__processResult" ID="TabnannyDialog.__processResult"></a> |
|
177 <h4>TabnannyDialog.__processResult</h4> |
|
178 <b>__processResult</b>(<i>fn, nok, line, error</i>) |
|
179 <p> |
|
180 Private slot called after perfoming a style check on one file. |
|
181 </p><dl> |
|
182 <dt><i>fn</i></dt> |
|
183 <dd> |
|
184 filename of the just checked file (str) |
|
185 </dd><dt><i>nok</i></dt> |
|
186 <dd> |
|
187 flag if a problem was found (bool) |
|
188 </dd><dt><i>line</i></dt> |
|
189 <dd> |
|
190 line number (str) |
|
191 </dd><dt><i>error</i></dt> |
|
192 <dd> |
|
193 text of the problem (str) |
|
194 </dd> |
|
195 </dl><a NAME="TabnannyDialog.__resort" ID="TabnannyDialog.__resort"></a> |
|
196 <h4>TabnannyDialog.__resort</h4> |
|
197 <b>__resort</b>(<i></i>) |
|
198 <p> |
|
199 Private method to resort the tree. |
|
200 </p><a NAME="TabnannyDialog.check" ID="TabnannyDialog.check"></a> |
|
201 <h4>TabnannyDialog.check</h4> |
|
202 <b>check</b>(<i>codestring=''</i>) |
|
203 <p> |
|
204 Public method to start an indentation check for one file. |
|
205 </p><p> |
|
206 The results are reported to the __processResult slot. |
|
207 </p><dl> |
|
208 <dt><i>codestring=</i></dt> |
|
209 <dd> |
|
210 optional sourcestring (str) |
|
211 </dd> |
|
212 </dl><a NAME="TabnannyDialog.checkBatch" ID="TabnannyDialog.checkBatch"></a> |
|
213 <h4>TabnannyDialog.checkBatch</h4> |
|
214 <b>checkBatch</b>(<i></i>) |
|
215 <p> |
|
216 Public method to start an indentation check batch job. |
|
217 </p><p> |
|
218 The results are reported to the __processResult slot. |
|
219 </p><a NAME="TabnannyDialog.on_buttonBox_clicked" ID="TabnannyDialog.on_buttonBox_clicked"></a> |
|
220 <h4>TabnannyDialog.on_buttonBox_clicked</h4> |
|
221 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
222 <p> |
|
223 Private slot called by a button of the button box clicked. |
|
224 </p><dl> |
|
225 <dt><i>button</i></dt> |
|
226 <dd> |
|
227 button that was clicked (QAbstractButton) |
|
228 </dd> |
|
229 </dl><a NAME="TabnannyDialog.on_resultList_itemActivated" ID="TabnannyDialog.on_resultList_itemActivated"></a> |
|
230 <h4>TabnannyDialog.on_resultList_itemActivated</h4> |
|
231 <b>on_resultList_itemActivated</b>(<i>itm, col</i>) |
|
232 <p> |
|
233 Private slot to handle the activation of an item. |
|
234 </p><dl> |
|
235 <dt><i>itm</i></dt> |
|
236 <dd> |
|
237 reference to the activated item (QTreeWidgetItem) |
|
238 </dd><dt><i>col</i></dt> |
|
239 <dd> |
|
240 column the item was activated in (integer) |
|
241 </dd> |
|
242 </dl><a NAME="TabnannyDialog.on_startButton_clicked" ID="TabnannyDialog.on_startButton_clicked"></a> |
|
243 <h4>TabnannyDialog.on_startButton_clicked</h4> |
|
244 <b>on_startButton_clicked</b>(<i></i>) |
|
245 <p> |
|
246 Private slot to start a code metrics run. |
|
247 </p><a NAME="TabnannyDialog.prepare" ID="TabnannyDialog.prepare"></a> |
|
248 <h4>TabnannyDialog.prepare</h4> |
|
249 <b>prepare</b>(<i>fileList, project</i>) |
|
250 <p> |
|
251 Public method to prepare the dialog with a list of filenames. |
|
252 </p><dl> |
|
253 <dt><i>fileList</i></dt> |
|
254 <dd> |
|
255 list of filenames (list of strings) |
|
256 </dd><dt><i>project</i></dt> |
|
257 <dd> |
|
258 reference to the project object (Project) |
|
259 </dd> |
|
260 </dl><a NAME="TabnannyDialog.start" ID="TabnannyDialog.start"></a> |
|
261 <h4>TabnannyDialog.start</h4> |
|
262 <b>start</b>(<i>fn</i>) |
|
263 <p> |
|
264 Public slot to start the tabnanny check. |
|
265 </p><dl> |
|
266 <dt><i>fn</i></dt> |
|
267 <dd> |
|
268 File or list of files or directory to be checked |
|
269 (string or list of strings) |
|
270 </dd> |
|
271 </dl> |
|
272 <div align="right"><a href="#top">Up</a></div> |
|
273 <hr /> |
|
274 </body></html> |