|
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.WizardPlugins.QRegExpWizard.QRegExpWizardDialog</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.Plugins.WizardPlugins.QRegExpWizard.QRegExpWizardDialog</h1> |
|
12 <p> |
|
13 Module implementing the QRegExp wizard dialog. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#QRegExpWizardDialog">QRegExpWizardDialog</a></td> |
|
23 <td>Class for the dialog variant.</td> |
|
24 </tr><tr> |
|
25 <td><a href="#QRegExpWizardWidget">QRegExpWizardWidget</a></td> |
|
26 <td>Class implementing the QRegExp wizard dialog.</td> |
|
27 </tr><tr> |
|
28 <td><a href="#QRegExpWizardWindow">QRegExpWizardWindow</a></td> |
|
29 <td>Main window class for the standalone dialog.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 <table> |
|
34 <tr><td>None</td></tr> |
|
35 </table> |
|
36 <hr /><hr /> |
|
37 <a NAME="QRegExpWizardDialog" ID="QRegExpWizardDialog"></a> |
|
38 <h2>QRegExpWizardDialog</h2> |
|
39 <p> |
|
40 Class for the dialog variant. |
|
41 </p> |
|
42 <h3>Derived from</h3> |
|
43 QDialog |
|
44 <h3>Class Attributes</h3> |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <h3>Methods</h3> |
|
49 <table> |
|
50 <tr> |
|
51 <td><a href="#QRegExpWizardDialog.__init__">QRegExpWizardDialog</a></td> |
|
52 <td>Constructor</td> |
|
53 </tr><tr> |
|
54 <td><a href="#QRegExpWizardDialog.getCode">getCode</a></td> |
|
55 <td>Public method to get the source code.</td> |
|
56 </tr> |
|
57 </table> |
|
58 <a NAME="QRegExpWizardDialog.__init__" ID="QRegExpWizardDialog.__init__"></a> |
|
59 <h4>QRegExpWizardDialog (Constructor)</h4> |
|
60 <b>QRegExpWizardDialog</b>(<i>parent = None, fromEric = True</i>) |
|
61 <p> |
|
62 Constructor |
|
63 </p><dl> |
|
64 <dt><i>parent</i></dt> |
|
65 <dd> |
|
66 parent widget (QWidget) |
|
67 </dd><dt><i>fromEric</i></dt> |
|
68 <dd> |
|
69 flag indicating a call from within eric5 |
|
70 </dd> |
|
71 </dl><a NAME="QRegExpWizardDialog.getCode" ID="QRegExpWizardDialog.getCode"></a> |
|
72 <h4>QRegExpWizardDialog.getCode</h4> |
|
73 <b>getCode</b>(<i>indLevel, indString</i>) |
|
74 <p> |
|
75 Public method to get the source code. |
|
76 </p><dl> |
|
77 <dt><i>indLevel</i></dt> |
|
78 <dd> |
|
79 indentation level (int) |
|
80 </dd><dt><i>indString</i></dt> |
|
81 <dd> |
|
82 string used for indentation (space or tab) (string) |
|
83 </dd> |
|
84 </dl><dl> |
|
85 <dt>Returns:</dt> |
|
86 <dd> |
|
87 generated code (string) |
|
88 </dd> |
|
89 </dl> |
|
90 <div align="right"><a href="#top">Up</a></div> |
|
91 <hr /><hr /> |
|
92 <a NAME="QRegExpWizardWidget" ID="QRegExpWizardWidget"></a> |
|
93 <h2>QRegExpWizardWidget</h2> |
|
94 <p> |
|
95 Class implementing the QRegExp wizard dialog. |
|
96 </p> |
|
97 <h3>Derived from</h3> |
|
98 QWidget, Ui_QRegExpWizardDialog |
|
99 <h3>Class Attributes</h3> |
|
100 <table> |
|
101 <tr><td>None</td></tr> |
|
102 </table> |
|
103 <h3>Methods</h3> |
|
104 <table> |
|
105 <tr> |
|
106 <td><a href="#QRegExpWizardWidget.__init__">QRegExpWizardWidget</a></td> |
|
107 <td>Constructor</td> |
|
108 </tr><tr> |
|
109 <td><a href="#QRegExpWizardWidget.__insertString">__insertString</a></td> |
|
110 <td>Private method to insert a string into line edit and move cursor.</td> |
|
111 </tr><tr> |
|
112 <td><a href="#QRegExpWizardWidget.getCode">getCode</a></td> |
|
113 <td>Public method to get the source code.</td> |
|
114 </tr><tr> |
|
115 <td><a href="#QRegExpWizardWidget.on_altnButton_clicked">on_altnButton_clicked</a></td> |
|
116 <td>Private slot to handle the alternatives toolbutton.</td> |
|
117 </tr><tr> |
|
118 <td><a href="#QRegExpWizardWidget.on_anycharButton_clicked">on_anycharButton_clicked</a></td> |
|
119 <td>Private slot to handle the any character toolbutton.</td> |
|
120 </tr><tr> |
|
121 <td><a href="#QRegExpWizardWidget.on_beglineButton_clicked">on_beglineButton_clicked</a></td> |
|
122 <td>Private slot to handle the begin line toolbutton.</td> |
|
123 </tr><tr> |
|
124 <td><a href="#QRegExpWizardWidget.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
125 <td>Private slot called by a button of the button box clicked.</td> |
|
126 </tr><tr> |
|
127 <td><a href="#QRegExpWizardWidget.on_charButton_clicked">on_charButton_clicked</a></td> |
|
128 <td>Private slot to handle the characters toolbutton.</td> |
|
129 </tr><tr> |
|
130 <td><a href="#QRegExpWizardWidget.on_copyButton_clicked">on_copyButton_clicked</a></td> |
|
131 <td>Private slot to copy the regexp string into the clipboard.</td> |
|
132 </tr><tr> |
|
133 <td><a href="#QRegExpWizardWidget.on_endlineButton_clicked">on_endlineButton_clicked</a></td> |
|
134 <td>Private slot to handle the end line toolbutton.</td> |
|
135 </tr><tr> |
|
136 <td><a href="#QRegExpWizardWidget.on_executeButton_clicked">on_executeButton_clicked</a></td> |
|
137 <td>Private slot to execute the entered regexp on the test text.</td> |
|
138 </tr><tr> |
|
139 <td><a href="#QRegExpWizardWidget.on_groupButton_clicked">on_groupButton_clicked</a></td> |
|
140 <td>Private slot to handle the group toolbutton.</td> |
|
141 </tr><tr> |
|
142 <td><a href="#QRegExpWizardWidget.on_loadButton_clicked">on_loadButton_clicked</a></td> |
|
143 <td>Private slot to load a regexp from a file.</td> |
|
144 </tr><tr> |
|
145 <td><a href="#QRegExpWizardWidget.on_neglookaheadButton_clicked">on_neglookaheadButton_clicked</a></td> |
|
146 <td>Private slot to handle the negative lookahead toolbutton.</td> |
|
147 </tr><tr> |
|
148 <td><a href="#QRegExpWizardWidget.on_nextButton_clicked">on_nextButton_clicked</a></td> |
|
149 <td>Private slot to find the next match.</td> |
|
150 </tr><tr> |
|
151 <td><a href="#QRegExpWizardWidget.on_nonGroupButton_clicked">on_nonGroupButton_clicked</a></td> |
|
152 <td>Private slot to handle the non group toolbutton.</td> |
|
153 </tr><tr> |
|
154 <td><a href="#QRegExpWizardWidget.on_nonwordboundButton_clicked">on_nonwordboundButton_clicked</a></td> |
|
155 <td>Private slot to handle the non word boundary toolbutton.</td> |
|
156 </tr><tr> |
|
157 <td><a href="#QRegExpWizardWidget.on_poslookaheadButton_clicked">on_poslookaheadButton_clicked</a></td> |
|
158 <td>Private slot to handle the positive lookahead toolbutton.</td> |
|
159 </tr><tr> |
|
160 <td><a href="#QRegExpWizardWidget.on_regexpLineEdit_textChanged">on_regexpLineEdit_textChanged</a></td> |
|
161 <td>Private slot called when the regexp changes.</td> |
|
162 </tr><tr> |
|
163 <td><a href="#QRegExpWizardWidget.on_repeatButton_clicked">on_repeatButton_clicked</a></td> |
|
164 <td>Private slot to handle the repeat toolbutton.</td> |
|
165 </tr><tr> |
|
166 <td><a href="#QRegExpWizardWidget.on_saveButton_clicked">on_saveButton_clicked</a></td> |
|
167 <td>Private slot to save the regexp to a file.</td> |
|
168 </tr><tr> |
|
169 <td><a href="#QRegExpWizardWidget.on_validateButton_clicked">on_validateButton_clicked</a></td> |
|
170 <td>Private slot to validate the entered regexp.</td> |
|
171 </tr><tr> |
|
172 <td><a href="#QRegExpWizardWidget.on_wordboundButton_clicked">on_wordboundButton_clicked</a></td> |
|
173 <td>Private slot to handle the word boundary toolbutton.</td> |
|
174 </tr> |
|
175 </table> |
|
176 <a NAME="QRegExpWizardWidget.__init__" ID="QRegExpWizardWidget.__init__"></a> |
|
177 <h4>QRegExpWizardWidget (Constructor)</h4> |
|
178 <b>QRegExpWizardWidget</b>(<i>parent = None, fromEric = True</i>) |
|
179 <p> |
|
180 Constructor |
|
181 </p><dl> |
|
182 <dt><i>parent</i></dt> |
|
183 <dd> |
|
184 parent widget (QWidget) |
|
185 </dd><dt><i>fromEric</i></dt> |
|
186 <dd> |
|
187 flag indicating a call from within eric5 |
|
188 </dd> |
|
189 </dl><a NAME="QRegExpWizardWidget.__insertString" ID="QRegExpWizardWidget.__insertString"></a> |
|
190 <h4>QRegExpWizardWidget.__insertString</h4> |
|
191 <b>__insertString</b>(<i>s, steps=0</i>) |
|
192 <p> |
|
193 Private method to insert a string into line edit and move cursor. |
|
194 </p><dl> |
|
195 <dt><i>s</i></dt> |
|
196 <dd> |
|
197 string to be inserted into the regexp line edit |
|
198 (string) |
|
199 </dd><dt><i>steps</i></dt> |
|
200 <dd> |
|
201 number of characters to move the cursor (integer). |
|
202 Negative steps moves cursor back, positives forward. |
|
203 </dd> |
|
204 </dl><a NAME="QRegExpWizardWidget.getCode" ID="QRegExpWizardWidget.getCode"></a> |
|
205 <h4>QRegExpWizardWidget.getCode</h4> |
|
206 <b>getCode</b>(<i>indLevel, indString</i>) |
|
207 <p> |
|
208 Public method to get the source code. |
|
209 </p><dl> |
|
210 <dt><i>indLevel</i></dt> |
|
211 <dd> |
|
212 indentation level (int) |
|
213 </dd><dt><i>indString</i></dt> |
|
214 <dd> |
|
215 string used for indentation (space or tab) (string) |
|
216 </dd> |
|
217 </dl><dl> |
|
218 <dt>Returns:</dt> |
|
219 <dd> |
|
220 generated code (string) |
|
221 </dd> |
|
222 </dl><a NAME="QRegExpWizardWidget.on_altnButton_clicked" ID="QRegExpWizardWidget.on_altnButton_clicked"></a> |
|
223 <h4>QRegExpWizardWidget.on_altnButton_clicked</h4> |
|
224 <b>on_altnButton_clicked</b>(<i></i>) |
|
225 <p> |
|
226 Private slot to handle the alternatives toolbutton. |
|
227 </p><a NAME="QRegExpWizardWidget.on_anycharButton_clicked" ID="QRegExpWizardWidget.on_anycharButton_clicked"></a> |
|
228 <h4>QRegExpWizardWidget.on_anycharButton_clicked</h4> |
|
229 <b>on_anycharButton_clicked</b>(<i></i>) |
|
230 <p> |
|
231 Private slot to handle the any character toolbutton. |
|
232 </p><a NAME="QRegExpWizardWidget.on_beglineButton_clicked" ID="QRegExpWizardWidget.on_beglineButton_clicked"></a> |
|
233 <h4>QRegExpWizardWidget.on_beglineButton_clicked</h4> |
|
234 <b>on_beglineButton_clicked</b>(<i></i>) |
|
235 <p> |
|
236 Private slot to handle the begin line toolbutton. |
|
237 </p><a NAME="QRegExpWizardWidget.on_buttonBox_clicked" ID="QRegExpWizardWidget.on_buttonBox_clicked"></a> |
|
238 <h4>QRegExpWizardWidget.on_buttonBox_clicked</h4> |
|
239 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
240 <p> |
|
241 Private slot called by a button of the button box clicked. |
|
242 </p><dl> |
|
243 <dt><i>button</i></dt> |
|
244 <dd> |
|
245 button that was clicked (QAbstractButton) |
|
246 </dd> |
|
247 </dl><a NAME="QRegExpWizardWidget.on_charButton_clicked" ID="QRegExpWizardWidget.on_charButton_clicked"></a> |
|
248 <h4>QRegExpWizardWidget.on_charButton_clicked</h4> |
|
249 <b>on_charButton_clicked</b>(<i></i>) |
|
250 <p> |
|
251 Private slot to handle the characters toolbutton. |
|
252 </p><a NAME="QRegExpWizardWidget.on_copyButton_clicked" ID="QRegExpWizardWidget.on_copyButton_clicked"></a> |
|
253 <h4>QRegExpWizardWidget.on_copyButton_clicked</h4> |
|
254 <b>on_copyButton_clicked</b>(<i></i>) |
|
255 <p> |
|
256 Private slot to copy the regexp string into the clipboard. |
|
257 </p><p> |
|
258 This slot is only available, if not called from within eric5. |
|
259 </p><a NAME="QRegExpWizardWidget.on_endlineButton_clicked" ID="QRegExpWizardWidget.on_endlineButton_clicked"></a> |
|
260 <h4>QRegExpWizardWidget.on_endlineButton_clicked</h4> |
|
261 <b>on_endlineButton_clicked</b>(<i></i>) |
|
262 <p> |
|
263 Private slot to handle the end line toolbutton. |
|
264 </p><a NAME="QRegExpWizardWidget.on_executeButton_clicked" ID="QRegExpWizardWidget.on_executeButton_clicked"></a> |
|
265 <h4>QRegExpWizardWidget.on_executeButton_clicked</h4> |
|
266 <b>on_executeButton_clicked</b>(<i>startpos = 0</i>) |
|
267 <p> |
|
268 Private slot to execute the entered regexp on the test text. |
|
269 </p><p> |
|
270 This slot will execute the entered regexp on the entered test |
|
271 data and will display the result in the table part of the dialog. |
|
272 </p><dl> |
|
273 <dt><i>startpos</i></dt> |
|
274 <dd> |
|
275 starting position for the regexp matching |
|
276 </dd> |
|
277 </dl><a NAME="QRegExpWizardWidget.on_groupButton_clicked" ID="QRegExpWizardWidget.on_groupButton_clicked"></a> |
|
278 <h4>QRegExpWizardWidget.on_groupButton_clicked</h4> |
|
279 <b>on_groupButton_clicked</b>(<i></i>) |
|
280 <p> |
|
281 Private slot to handle the group toolbutton. |
|
282 </p><a NAME="QRegExpWizardWidget.on_loadButton_clicked" ID="QRegExpWizardWidget.on_loadButton_clicked"></a> |
|
283 <h4>QRegExpWizardWidget.on_loadButton_clicked</h4> |
|
284 <b>on_loadButton_clicked</b>(<i></i>) |
|
285 <p> |
|
286 Private slot to load a regexp from a file. |
|
287 </p><a NAME="QRegExpWizardWidget.on_neglookaheadButton_clicked" ID="QRegExpWizardWidget.on_neglookaheadButton_clicked"></a> |
|
288 <h4>QRegExpWizardWidget.on_neglookaheadButton_clicked</h4> |
|
289 <b>on_neglookaheadButton_clicked</b>(<i></i>) |
|
290 <p> |
|
291 Private slot to handle the negative lookahead toolbutton. |
|
292 </p><a NAME="QRegExpWizardWidget.on_nextButton_clicked" ID="QRegExpWizardWidget.on_nextButton_clicked"></a> |
|
293 <h4>QRegExpWizardWidget.on_nextButton_clicked</h4> |
|
294 <b>on_nextButton_clicked</b>(<i></i>) |
|
295 <p> |
|
296 Private slot to find the next match. |
|
297 </p><a NAME="QRegExpWizardWidget.on_nonGroupButton_clicked" ID="QRegExpWizardWidget.on_nonGroupButton_clicked"></a> |
|
298 <h4>QRegExpWizardWidget.on_nonGroupButton_clicked</h4> |
|
299 <b>on_nonGroupButton_clicked</b>(<i></i>) |
|
300 <p> |
|
301 Private slot to handle the non group toolbutton. |
|
302 </p><a NAME="QRegExpWizardWidget.on_nonwordboundButton_clicked" ID="QRegExpWizardWidget.on_nonwordboundButton_clicked"></a> |
|
303 <h4>QRegExpWizardWidget.on_nonwordboundButton_clicked</h4> |
|
304 <b>on_nonwordboundButton_clicked</b>(<i></i>) |
|
305 <p> |
|
306 Private slot to handle the non word boundary toolbutton. |
|
307 </p><a NAME="QRegExpWizardWidget.on_poslookaheadButton_clicked" ID="QRegExpWizardWidget.on_poslookaheadButton_clicked"></a> |
|
308 <h4>QRegExpWizardWidget.on_poslookaheadButton_clicked</h4> |
|
309 <b>on_poslookaheadButton_clicked</b>(<i></i>) |
|
310 <p> |
|
311 Private slot to handle the positive lookahead toolbutton. |
|
312 </p><a NAME="QRegExpWizardWidget.on_regexpLineEdit_textChanged" ID="QRegExpWizardWidget.on_regexpLineEdit_textChanged"></a> |
|
313 <h4>QRegExpWizardWidget.on_regexpLineEdit_textChanged</h4> |
|
314 <b>on_regexpLineEdit_textChanged</b>(<i>txt</i>) |
|
315 <p> |
|
316 Private slot called when the regexp changes. |
|
317 </p><dl> |
|
318 <dt><i>txt</i></dt> |
|
319 <dd> |
|
320 the new text of the line edit (string) |
|
321 </dd> |
|
322 </dl><a NAME="QRegExpWizardWidget.on_repeatButton_clicked" ID="QRegExpWizardWidget.on_repeatButton_clicked"></a> |
|
323 <h4>QRegExpWizardWidget.on_repeatButton_clicked</h4> |
|
324 <b>on_repeatButton_clicked</b>(<i></i>) |
|
325 <p> |
|
326 Private slot to handle the repeat toolbutton. |
|
327 </p><a NAME="QRegExpWizardWidget.on_saveButton_clicked" ID="QRegExpWizardWidget.on_saveButton_clicked"></a> |
|
328 <h4>QRegExpWizardWidget.on_saveButton_clicked</h4> |
|
329 <b>on_saveButton_clicked</b>(<i></i>) |
|
330 <p> |
|
331 Private slot to save the regexp to a file. |
|
332 </p><a NAME="QRegExpWizardWidget.on_validateButton_clicked" ID="QRegExpWizardWidget.on_validateButton_clicked"></a> |
|
333 <h4>QRegExpWizardWidget.on_validateButton_clicked</h4> |
|
334 <b>on_validateButton_clicked</b>(<i></i>) |
|
335 <p> |
|
336 Private slot to validate the entered regexp. |
|
337 </p><a NAME="QRegExpWizardWidget.on_wordboundButton_clicked" ID="QRegExpWizardWidget.on_wordboundButton_clicked"></a> |
|
338 <h4>QRegExpWizardWidget.on_wordboundButton_clicked</h4> |
|
339 <b>on_wordboundButton_clicked</b>(<i></i>) |
|
340 <p> |
|
341 Private slot to handle the word boundary toolbutton. |
|
342 </p> |
|
343 <div align="right"><a href="#top">Up</a></div> |
|
344 <hr /><hr /> |
|
345 <a NAME="QRegExpWizardWindow" ID="QRegExpWizardWindow"></a> |
|
346 <h2>QRegExpWizardWindow</h2> |
|
347 <p> |
|
348 Main window class for the standalone dialog. |
|
349 </p> |
|
350 <h3>Derived from</h3> |
|
351 QMainWindow |
|
352 <h3>Class Attributes</h3> |
|
353 <table> |
|
354 <tr><td>None</td></tr> |
|
355 </table> |
|
356 <h3>Methods</h3> |
|
357 <table> |
|
358 <tr> |
|
359 <td><a href="#QRegExpWizardWindow.__init__">QRegExpWizardWindow</a></td> |
|
360 <td>Constructor</td> |
|
361 </tr> |
|
362 </table> |
|
363 <a NAME="QRegExpWizardWindow.__init__" ID="QRegExpWizardWindow.__init__"></a> |
|
364 <h4>QRegExpWizardWindow (Constructor)</h4> |
|
365 <b>QRegExpWizardWindow</b>(<i>parent = None</i>) |
|
366 <p> |
|
367 Constructor |
|
368 </p><dl> |
|
369 <dt><i>parent</i></dt> |
|
370 <dd> |
|
371 reference to the parent widget (QWidget) |
|
372 </dd> |
|
373 </dl> |
|
374 <div align="right"><a href="#top">Up</a></div> |
|
375 <hr /> |
|
376 </body></html> |