|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.Plugins.CheckerPlugins.Pep8.Pep8Dialog</title> |
|
6 <style> |
|
7 body { |
|
8 background: #EDECE6; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #85774A; } |
|
14 h2 { color: white; background: #85774A; } |
|
15 h3 { color: white; background: #9D936E; } |
|
16 h4 { color: white; background: #9D936E; } |
|
17 |
|
18 a { color: #BA6D36; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric5.Plugins.CheckerPlugins.Pep8.Pep8Dialog</h1> |
|
24 <p> |
|
25 Module implementing a dialog to show the results of the PEP 8 check. |
|
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="#Pep8Dialog">Pep8Dialog</a></td> |
|
35 <td>Class implementing a dialog to show the results of the PEP 8 check.</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="Pep8Dialog" ID="Pep8Dialog"></a> |
|
44 <h2>Pep8Dialog</h2> |
|
45 <p> |
|
46 Class implementing a dialog to show the results of the PEP 8 check. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QDialog, Ui_Pep8Dialog |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>filenameRole</td></tr><tr><td>lineRole</td></tr><tr><td>messageRole</td></tr><tr><td>positionRole</td></tr><tr><td>settingsKey</td></tr> |
|
53 </table> |
|
54 <h3>Methods</h3> |
|
55 <table> |
|
56 <tr> |
|
57 <td><a href="#Pep8Dialog.__init__">Pep8Dialog</a></td> |
|
58 <td>Constructor</td> |
|
59 </tr><tr> |
|
60 <td><a href="#Pep8Dialog.__clearErrors">__clearErrors</a></td> |
|
61 <td>Private method to clear all warning markers of open editors.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#Pep8Dialog.__createResultItem">__createResultItem</a></td> |
|
64 <td>Private method to create an entry in the result list.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#Pep8Dialog.__finish">__finish</a></td> |
|
67 <td>Private slot called when the PEP 8 check finished or the user pressed the cancel button.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#Pep8Dialog.__resort">__resort</a></td> |
|
70 <td>Private method to resort the tree.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#Pep8Dialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
73 <td>Private slot called by a button of the button box clicked.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#Pep8Dialog.on_excludeMessagesSelectButton_clicked">on_excludeMessagesSelectButton_clicked</a></td> |
|
76 <td>Private slot to select the message codes to be excluded via a selection dialog.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#Pep8Dialog.on_includeMessagesSelectButton_clicked">on_includeMessagesSelectButton_clicked</a></td> |
|
79 <td>Private slot to select the message codes to be included via a selection dialog.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#Pep8Dialog.on_loadDefaultButton_clicked">on_loadDefaultButton_clicked</a></td> |
|
82 <td>Private slot to load the default configuration values.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#Pep8Dialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> |
|
85 <td>Private slot to handle the activation of an item.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#Pep8Dialog.on_showButton_clicked">on_showButton_clicked</a></td> |
|
88 <td>Private slot to handle the "Show" button press.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#Pep8Dialog.on_startButton_clicked">on_startButton_clicked</a></td> |
|
91 <td>Private slot to start a PEP 8 check run.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#Pep8Dialog.on_storeDefaultButton_clicked">on_storeDefaultButton_clicked</a></td> |
|
94 <td>Private slot to store the current configuration values as default values.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#Pep8Dialog.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="#Pep8Dialog.start">start</a></td> |
|
100 <td>Public slot to start the PEP 8 check.</td> |
|
101 </tr> |
|
102 </table> |
|
103 <a NAME="Pep8Dialog.__init__" ID="Pep8Dialog.__init__"></a> |
|
104 <h4>Pep8Dialog (Constructor)</h4> |
|
105 <b>Pep8Dialog</b>(<i>parent = None</i>) |
|
106 <p> |
|
107 Constructor |
|
108 </p><dl> |
|
109 <dt><i>parent</i></dt> |
|
110 <dd> |
|
111 reference to the parent widget (QWidget) |
|
112 </dd> |
|
113 </dl><a NAME="Pep8Dialog.__clearErrors" ID="Pep8Dialog.__clearErrors"></a> |
|
114 <h4>Pep8Dialog.__clearErrors</h4> |
|
115 <b>__clearErrors</b>(<i></i>) |
|
116 <p> |
|
117 Private method to clear all warning markers of open editors. |
|
118 </p><a NAME="Pep8Dialog.__createResultItem" ID="Pep8Dialog.__createResultItem"></a> |
|
119 <h4>Pep8Dialog.__createResultItem</h4> |
|
120 <b>__createResultItem</b>(<i>file, line, pos, message</i>) |
|
121 <p> |
|
122 Private method to create an entry in the result list. |
|
123 </p><dl> |
|
124 <dt><i>file</i></dt> |
|
125 <dd> |
|
126 file name of the file (string) |
|
127 </dd><dt><i>line</i></dt> |
|
128 <dd> |
|
129 line number of issue (integer or string) |
|
130 </dd><dt><i>pos</i></dt> |
|
131 <dd> |
|
132 character position of issue (integer or string) |
|
133 </dd><dt><i>message</i></dt> |
|
134 <dd> |
|
135 message text (string) |
|
136 </dd> |
|
137 </dl><a NAME="Pep8Dialog.__finish" ID="Pep8Dialog.__finish"></a> |
|
138 <h4>Pep8Dialog.__finish</h4> |
|
139 <b>__finish</b>(<i></i>) |
|
140 <p> |
|
141 Private slot called when the PEP 8 check finished or the user |
|
142 pressed the cancel button. |
|
143 </p><a NAME="Pep8Dialog.__resort" ID="Pep8Dialog.__resort"></a> |
|
144 <h4>Pep8Dialog.__resort</h4> |
|
145 <b>__resort</b>(<i></i>) |
|
146 <p> |
|
147 Private method to resort the tree. |
|
148 </p><a NAME="Pep8Dialog.on_buttonBox_clicked" ID="Pep8Dialog.on_buttonBox_clicked"></a> |
|
149 <h4>Pep8Dialog.on_buttonBox_clicked</h4> |
|
150 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
151 <p> |
|
152 Private slot called by a button of the button box clicked. |
|
153 </p><dl> |
|
154 <dt><i>button</i></dt> |
|
155 <dd> |
|
156 button that was clicked (QAbstractButton) |
|
157 </dd> |
|
158 </dl><a NAME="Pep8Dialog.on_excludeMessagesSelectButton_clicked" ID="Pep8Dialog.on_excludeMessagesSelectButton_clicked"></a> |
|
159 <h4>Pep8Dialog.on_excludeMessagesSelectButton_clicked</h4> |
|
160 <b>on_excludeMessagesSelectButton_clicked</b>(<i></i>) |
|
161 <p> |
|
162 Private slot to select the message codes to be excluded via a |
|
163 selection dialog. |
|
164 </p><a NAME="Pep8Dialog.on_includeMessagesSelectButton_clicked" ID="Pep8Dialog.on_includeMessagesSelectButton_clicked"></a> |
|
165 <h4>Pep8Dialog.on_includeMessagesSelectButton_clicked</h4> |
|
166 <b>on_includeMessagesSelectButton_clicked</b>(<i></i>) |
|
167 <p> |
|
168 Private slot to select the message codes to be included via a |
|
169 selection dialog. |
|
170 </p><a NAME="Pep8Dialog.on_loadDefaultButton_clicked" ID="Pep8Dialog.on_loadDefaultButton_clicked"></a> |
|
171 <h4>Pep8Dialog.on_loadDefaultButton_clicked</h4> |
|
172 <b>on_loadDefaultButton_clicked</b>(<i></i>) |
|
173 <p> |
|
174 Private slot to load the default configuration values. |
|
175 </p><a NAME="Pep8Dialog.on_resultList_itemActivated" ID="Pep8Dialog.on_resultList_itemActivated"></a> |
|
176 <h4>Pep8Dialog.on_resultList_itemActivated</h4> |
|
177 <b>on_resultList_itemActivated</b>(<i>item, column</i>) |
|
178 <p> |
|
179 Private slot to handle the activation of an item. |
|
180 </p><dl> |
|
181 <dt><i>item</i></dt> |
|
182 <dd> |
|
183 reference to the activated item (QTreeWidgetItem) |
|
184 </dd><dt><i>column</i></dt> |
|
185 <dd> |
|
186 column the item was activated in (integer) |
|
187 </dd> |
|
188 </dl><a NAME="Pep8Dialog.on_showButton_clicked" ID="Pep8Dialog.on_showButton_clicked"></a> |
|
189 <h4>Pep8Dialog.on_showButton_clicked</h4> |
|
190 <b>on_showButton_clicked</b>(<i></i>) |
|
191 <p> |
|
192 Private slot to handle the "Show" button press. |
|
193 </p><a NAME="Pep8Dialog.on_startButton_clicked" ID="Pep8Dialog.on_startButton_clicked"></a> |
|
194 <h4>Pep8Dialog.on_startButton_clicked</h4> |
|
195 <b>on_startButton_clicked</b>(<i></i>) |
|
196 <p> |
|
197 Private slot to start a PEP 8 check run. |
|
198 </p><a NAME="Pep8Dialog.on_storeDefaultButton_clicked" ID="Pep8Dialog.on_storeDefaultButton_clicked"></a> |
|
199 <h4>Pep8Dialog.on_storeDefaultButton_clicked</h4> |
|
200 <b>on_storeDefaultButton_clicked</b>(<i></i>) |
|
201 <p> |
|
202 Private slot to store the current configuration values as |
|
203 default values. |
|
204 </p><a NAME="Pep8Dialog.prepare" ID="Pep8Dialog.prepare"></a> |
|
205 <h4>Pep8Dialog.prepare</h4> |
|
206 <b>prepare</b>(<i>fileList, project</i>) |
|
207 <p> |
|
208 Public method to prepare the dialog with a list of filenames. |
|
209 </p><dl> |
|
210 <dt><i>fileList</i></dt> |
|
211 <dd> |
|
212 list of filenames (list of strings) |
|
213 </dd><dt><i>project</i></dt> |
|
214 <dd> |
|
215 reference to the project object (Project) |
|
216 </dd> |
|
217 </dl><a NAME="Pep8Dialog.start" ID="Pep8Dialog.start"></a> |
|
218 <h4>Pep8Dialog.start</h4> |
|
219 <b>start</b>(<i>fn, codestring = "", save = False, repeat = None</i>) |
|
220 <p> |
|
221 Public slot to start the PEP 8 check. |
|
222 </p><dl> |
|
223 <dt><i>fn</i></dt> |
|
224 <dd> |
|
225 file or list of files or directory to be checked |
|
226 (string or list of strings) |
|
227 </dd><dt><i>codestring=</i></dt> |
|
228 <dd> |
|
229 string containing the code to be checked (string). |
|
230 If this is given, file must be a single file name. |
|
231 </dd><dt><i>save=</i></dt> |
|
232 <dd> |
|
233 flag indicating to save the given |
|
234 file/file list/directory (boolean) |
|
235 </dd><dt><i>repeat=</i></dt> |
|
236 <dd> |
|
237 state of the repeat check box if it is not None |
|
238 (None or boolean) |
|
239 </dd> |
|
240 </dl> |
|
241 <div align="right"><a href="#top">Up</a></div> |
|
242 <hr /> |
|
243 </body></html> |