Fri, 11 Mar 2011 16:51:57 +0100
Made code mostly PEP 8 compliant (except all whitespace and line length).
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html><head> <title>eric5.Plugins.WizardPlugins.PyRegExpWizard.PyRegExpWizardDialog</title> <style> body { background: #EDECE6; margin: 0em 1em 10em 1em; color: black; } h1 { color: white; background: #85774A; } h2 { color: white; background: #85774A; } h3 { color: white; background: #9D936E; } h4 { color: white; background: #9D936E; } a { color: #BA6D36; } </style> </head> <body><a NAME="top" ID="top"></a> <h1>eric5.Plugins.WizardPlugins.PyRegExpWizard.PyRegExpWizardDialog</h1> <p> Module implementing the Python re wizard dialog. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#PyRegExpWizardDialog">PyRegExpWizardDialog</a></td> <td>Class for the dialog variant.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget">PyRegExpWizardWidget</a></td> <td>Class implementing the Python re wizard dialog.</td> </tr><tr> <td><a href="#PyRegExpWizardWindow">PyRegExpWizardWindow</a></td> <td>Main window class for the standalone dialog.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /><hr /> <a NAME="PyRegExpWizardDialog" ID="PyRegExpWizardDialog"></a> <h2>PyRegExpWizardDialog</h2> <p> Class for the dialog variant. </p> <h3>Derived from</h3> QDialog <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#PyRegExpWizardDialog.__init__">PyRegExpWizardDialog</a></td> <td>Constructor</td> </tr><tr> <td><a href="#PyRegExpWizardDialog.getCode">getCode</a></td> <td>Public method to get the source code.</td> </tr> </table> <a NAME="PyRegExpWizardDialog.__init__" ID="PyRegExpWizardDialog.__init__"></a> <h4>PyRegExpWizardDialog (Constructor)</h4> <b>PyRegExpWizardDialog</b>(<i>parent=None, fromEric=True</i>) <p> Constructor </p><dl> <dt><i>parent</i></dt> <dd> parent widget (QWidget) </dd><dt><i>fromEric</i></dt> <dd> flag indicating a call from within eric5 </dd> </dl><a NAME="PyRegExpWizardDialog.getCode" ID="PyRegExpWizardDialog.getCode"></a> <h4>PyRegExpWizardDialog.getCode</h4> <b>getCode</b>(<i>indLevel, indString</i>) <p> Public method to get the source code. </p><dl> <dt><i>indLevel</i></dt> <dd> indentation level (int) </dd><dt><i>indString</i></dt> <dd> string used for indentation (space or tab) (string) </dd> </dl><dl> <dt>Returns:</dt> <dd> generated code (string) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="PyRegExpWizardWidget" ID="PyRegExpWizardWidget"></a> <h2>PyRegExpWizardWidget</h2> <p> Class implementing the Python re wizard dialog. </p> <h3>Derived from</h3> QWidget, Ui_PyRegExpWizardDialog <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#PyRegExpWizardWidget.__init__">PyRegExpWizardWidget</a></td> <td>Constructor</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.__insertString">__insertString</a></td> <td>Private method to insert a string into line edit and move cursor.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.getCode">getCode</a></td> <td>Public method to get the source code.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_altnButton_clicked">on_altnButton_clicked</a></td> <td>Private slot to handle the alternatives toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_anycharButton_clicked">on_anycharButton_clicked</a></td> <td>Private slot to handle the any character toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_beglineButton_clicked">on_beglineButton_clicked</a></td> <td>Private slot to handle the begin line toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_buttonBox_clicked">on_buttonBox_clicked</a></td> <td>Private slot called by a button of the button box clicked.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_charButton_clicked">on_charButton_clicked</a></td> <td>Private slot to handle the characters toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_commentButton_clicked">on_commentButton_clicked</a></td> <td>Private slot to handle the comment toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_copyButton_clicked">on_copyButton_clicked</a></td> <td>Private slot to copy the regexp string into the clipboard.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_endlineButton_clicked">on_endlineButton_clicked</a></td> <td>Private slot to handle the end line toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_executeButton_clicked">on_executeButton_clicked</a></td> <td>Private slot to execute the entered regexp on the test text.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_groupButton_clicked">on_groupButton_clicked</a></td> <td>Private slot to handle the group toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_loadButton_clicked">on_loadButton_clicked</a></td> <td>Private slot to load a regexp from a file.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_namedGroupButton_clicked">on_namedGroupButton_clicked</a></td> <td>Private slot to handle the named group toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_namedReferenceButton_clicked">on_namedReferenceButton_clicked</a></td> <td>Private slot to handle the named reference toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_neglookaheadButton_clicked">on_neglookaheadButton_clicked</a></td> <td>Private slot to handle the negative lookahead toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_neglookbehindButton_clicked">on_neglookbehindButton_clicked</a></td> <td>Private slot to handle the negative lookbehind toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_nextButton_clicked">on_nextButton_clicked</a></td> <td>Private slot to find the next match.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_nonGroupButton_clicked">on_nonGroupButton_clicked</a></td> <td>Private slot to handle the non group toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_nonwordboundButton_clicked">on_nonwordboundButton_clicked</a></td> <td>Private slot to handle the non word boundary toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_poslookaheadButton_clicked">on_poslookaheadButton_clicked</a></td> <td>Private slot to handle the positive lookahead toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_poslookbehindButton_clicked">on_poslookbehindButton_clicked</a></td> <td>Private slot to handle the positive lookbehind toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_py2Button_toggled">on_py2Button_toggled</a></td> <td>Private slot called when the Python version was selected.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_redoButton_clicked">on_redoButton_clicked</a></td> <td>Private slot to handle the redo action.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_regexpTextEdit_textChanged">on_regexpTextEdit_textChanged</a></td> <td>Private slot called when the regexp changes.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_repeatButton_clicked">on_repeatButton_clicked</a></td> <td>Private slot to handle the repeat toolbutton.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_saveButton_clicked">on_saveButton_clicked</a></td> <td>Private slot to save the regexp to a file.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_undoButton_clicked">on_undoButton_clicked</a></td> <td>Private slot to handle the undo action.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_validateButton_clicked">on_validateButton_clicked</a></td> <td>Private slot to validate the entered regexp.</td> </tr><tr> <td><a href="#PyRegExpWizardWidget.on_wordboundButton_clicked">on_wordboundButton_clicked</a></td> <td>Private slot to handle the word boundary toolbutton.</td> </tr> </table> <a NAME="PyRegExpWizardWidget.__init__" ID="PyRegExpWizardWidget.__init__"></a> <h4>PyRegExpWizardWidget (Constructor)</h4> <b>PyRegExpWizardWidget</b>(<i>parent=None, fromEric=True</i>) <p> Constructor </p><dl> <dt><i>parent</i></dt> <dd> parent widget (QWidget) </dd><dt><i>fromEric</i></dt> <dd> flag indicating a call from within eric5 </dd> </dl><a NAME="PyRegExpWizardWidget.__insertString" ID="PyRegExpWizardWidget.__insertString"></a> <h4>PyRegExpWizardWidget.__insertString</h4> <b>__insertString</b>(<i>s, steps=0</i>) <p> Private method to insert a string into line edit and move cursor. </p><dl> <dt><i>s</i></dt> <dd> string to be inserted into the regexp line edit (string) </dd><dt><i>steps</i></dt> <dd> number of characters to move the cursor (integer). Negative steps moves cursor back, positives forward. </dd> </dl><a NAME="PyRegExpWizardWidget.getCode" ID="PyRegExpWizardWidget.getCode"></a> <h4>PyRegExpWizardWidget.getCode</h4> <b>getCode</b>(<i>indLevel, indString</i>) <p> Public method to get the source code. </p><dl> <dt><i>indLevel</i></dt> <dd> indentation level (int) </dd><dt><i>indString</i></dt> <dd> string used for indentation (space or tab) (string) </dd> </dl><dl> <dt>Returns:</dt> <dd> generated code (string) </dd> </dl><a NAME="PyRegExpWizardWidget.on_altnButton_clicked" ID="PyRegExpWizardWidget.on_altnButton_clicked"></a> <h4>PyRegExpWizardWidget.on_altnButton_clicked</h4> <b>on_altnButton_clicked</b>(<i></i>) <p> Private slot to handle the alternatives toolbutton. </p><a NAME="PyRegExpWizardWidget.on_anycharButton_clicked" ID="PyRegExpWizardWidget.on_anycharButton_clicked"></a> <h4>PyRegExpWizardWidget.on_anycharButton_clicked</h4> <b>on_anycharButton_clicked</b>(<i></i>) <p> Private slot to handle the any character toolbutton. </p><a NAME="PyRegExpWizardWidget.on_beglineButton_clicked" ID="PyRegExpWizardWidget.on_beglineButton_clicked"></a> <h4>PyRegExpWizardWidget.on_beglineButton_clicked</h4> <b>on_beglineButton_clicked</b>(<i></i>) <p> Private slot to handle the begin line toolbutton. </p><a NAME="PyRegExpWizardWidget.on_buttonBox_clicked" ID="PyRegExpWizardWidget.on_buttonBox_clicked"></a> <h4>PyRegExpWizardWidget.on_buttonBox_clicked</h4> <b>on_buttonBox_clicked</b>(<i>button</i>) <p> Private slot called by a button of the button box clicked. </p><dl> <dt><i>button</i></dt> <dd> button that was clicked (QAbstractButton) </dd> </dl><a NAME="PyRegExpWizardWidget.on_charButton_clicked" ID="PyRegExpWizardWidget.on_charButton_clicked"></a> <h4>PyRegExpWizardWidget.on_charButton_clicked</h4> <b>on_charButton_clicked</b>(<i></i>) <p> Private slot to handle the characters toolbutton. </p><a NAME="PyRegExpWizardWidget.on_commentButton_clicked" ID="PyRegExpWizardWidget.on_commentButton_clicked"></a> <h4>PyRegExpWizardWidget.on_commentButton_clicked</h4> <b>on_commentButton_clicked</b>(<i></i>) <p> Private slot to handle the comment toolbutton. </p><a NAME="PyRegExpWizardWidget.on_copyButton_clicked" ID="PyRegExpWizardWidget.on_copyButton_clicked"></a> <h4>PyRegExpWizardWidget.on_copyButton_clicked</h4> <b>on_copyButton_clicked</b>(<i></i>) <p> Private slot to copy the regexp string into the clipboard. </p><p> This slot is only available, if not called from within eric5. </p><a NAME="PyRegExpWizardWidget.on_endlineButton_clicked" ID="PyRegExpWizardWidget.on_endlineButton_clicked"></a> <h4>PyRegExpWizardWidget.on_endlineButton_clicked</h4> <b>on_endlineButton_clicked</b>(<i></i>) <p> Private slot to handle the end line toolbutton. </p><a NAME="PyRegExpWizardWidget.on_executeButton_clicked" ID="PyRegExpWizardWidget.on_executeButton_clicked"></a> <h4>PyRegExpWizardWidget.on_executeButton_clicked</h4> <b>on_executeButton_clicked</b>(<i>startpos=0</i>) <p> Private slot to execute the entered regexp on the test text. </p><p> This slot will execute the entered regexp on the entered test data and will display the result in the table part of the dialog. </p><dl> <dt><i>startpos</i></dt> <dd> starting position for the regexp matching </dd> </dl><a NAME="PyRegExpWizardWidget.on_groupButton_clicked" ID="PyRegExpWizardWidget.on_groupButton_clicked"></a> <h4>PyRegExpWizardWidget.on_groupButton_clicked</h4> <b>on_groupButton_clicked</b>(<i></i>) <p> Private slot to handle the group toolbutton. </p><a NAME="PyRegExpWizardWidget.on_loadButton_clicked" ID="PyRegExpWizardWidget.on_loadButton_clicked"></a> <h4>PyRegExpWizardWidget.on_loadButton_clicked</h4> <b>on_loadButton_clicked</b>(<i></i>) <p> Private slot to load a regexp from a file. </p><a NAME="PyRegExpWizardWidget.on_namedGroupButton_clicked" ID="PyRegExpWizardWidget.on_namedGroupButton_clicked"></a> <h4>PyRegExpWizardWidget.on_namedGroupButton_clicked</h4> <b>on_namedGroupButton_clicked</b>(<i></i>) <p> Private slot to handle the named group toolbutton. </p><a NAME="PyRegExpWizardWidget.on_namedReferenceButton_clicked" ID="PyRegExpWizardWidget.on_namedReferenceButton_clicked"></a> <h4>PyRegExpWizardWidget.on_namedReferenceButton_clicked</h4> <b>on_namedReferenceButton_clicked</b>(<i></i>) <p> Private slot to handle the named reference toolbutton. </p><a NAME="PyRegExpWizardWidget.on_neglookaheadButton_clicked" ID="PyRegExpWizardWidget.on_neglookaheadButton_clicked"></a> <h4>PyRegExpWizardWidget.on_neglookaheadButton_clicked</h4> <b>on_neglookaheadButton_clicked</b>(<i></i>) <p> Private slot to handle the negative lookahead toolbutton. </p><a NAME="PyRegExpWizardWidget.on_neglookbehindButton_clicked" ID="PyRegExpWizardWidget.on_neglookbehindButton_clicked"></a> <h4>PyRegExpWizardWidget.on_neglookbehindButton_clicked</h4> <b>on_neglookbehindButton_clicked</b>(<i></i>) <p> Private slot to handle the negative lookbehind toolbutton. </p><a NAME="PyRegExpWizardWidget.on_nextButton_clicked" ID="PyRegExpWizardWidget.on_nextButton_clicked"></a> <h4>PyRegExpWizardWidget.on_nextButton_clicked</h4> <b>on_nextButton_clicked</b>(<i></i>) <p> Private slot to find the next match. </p><a NAME="PyRegExpWizardWidget.on_nonGroupButton_clicked" ID="PyRegExpWizardWidget.on_nonGroupButton_clicked"></a> <h4>PyRegExpWizardWidget.on_nonGroupButton_clicked</h4> <b>on_nonGroupButton_clicked</b>(<i></i>) <p> Private slot to handle the non group toolbutton. </p><a NAME="PyRegExpWizardWidget.on_nonwordboundButton_clicked" ID="PyRegExpWizardWidget.on_nonwordboundButton_clicked"></a> <h4>PyRegExpWizardWidget.on_nonwordboundButton_clicked</h4> <b>on_nonwordboundButton_clicked</b>(<i></i>) <p> Private slot to handle the non word boundary toolbutton. </p><a NAME="PyRegExpWizardWidget.on_poslookaheadButton_clicked" ID="PyRegExpWizardWidget.on_poslookaheadButton_clicked"></a> <h4>PyRegExpWizardWidget.on_poslookaheadButton_clicked</h4> <b>on_poslookaheadButton_clicked</b>(<i></i>) <p> Private slot to handle the positive lookahead toolbutton. </p><a NAME="PyRegExpWizardWidget.on_poslookbehindButton_clicked" ID="PyRegExpWizardWidget.on_poslookbehindButton_clicked"></a> <h4>PyRegExpWizardWidget.on_poslookbehindButton_clicked</h4> <b>on_poslookbehindButton_clicked</b>(<i></i>) <p> Private slot to handle the positive lookbehind toolbutton. </p><a NAME="PyRegExpWizardWidget.on_py2Button_toggled" ID="PyRegExpWizardWidget.on_py2Button_toggled"></a> <h4>PyRegExpWizardWidget.on_py2Button_toggled</h4> <b>on_py2Button_toggled</b>(<i>checked</i>) <p> Private slot called when the Python version was selected. </p><dl> <dt><i>checked</i></dt> <dd> state of the Python 2 button (boolean) </dd> </dl><a NAME="PyRegExpWizardWidget.on_redoButton_clicked" ID="PyRegExpWizardWidget.on_redoButton_clicked"></a> <h4>PyRegExpWizardWidget.on_redoButton_clicked</h4> <b>on_redoButton_clicked</b>(<i></i>) <p> Private slot to handle the redo action. </p><a NAME="PyRegExpWizardWidget.on_regexpTextEdit_textChanged" ID="PyRegExpWizardWidget.on_regexpTextEdit_textChanged"></a> <h4>PyRegExpWizardWidget.on_regexpTextEdit_textChanged</h4> <b>on_regexpTextEdit_textChanged</b>(<i></i>) <p> Private slot called when the regexp changes. </p><a NAME="PyRegExpWizardWidget.on_repeatButton_clicked" ID="PyRegExpWizardWidget.on_repeatButton_clicked"></a> <h4>PyRegExpWizardWidget.on_repeatButton_clicked</h4> <b>on_repeatButton_clicked</b>(<i></i>) <p> Private slot to handle the repeat toolbutton. </p><a NAME="PyRegExpWizardWidget.on_saveButton_clicked" ID="PyRegExpWizardWidget.on_saveButton_clicked"></a> <h4>PyRegExpWizardWidget.on_saveButton_clicked</h4> <b>on_saveButton_clicked</b>(<i></i>) <p> Private slot to save the regexp to a file. </p><a NAME="PyRegExpWizardWidget.on_undoButton_clicked" ID="PyRegExpWizardWidget.on_undoButton_clicked"></a> <h4>PyRegExpWizardWidget.on_undoButton_clicked</h4> <b>on_undoButton_clicked</b>(<i></i>) <p> Private slot to handle the undo action. </p><a NAME="PyRegExpWizardWidget.on_validateButton_clicked" ID="PyRegExpWizardWidget.on_validateButton_clicked"></a> <h4>PyRegExpWizardWidget.on_validateButton_clicked</h4> <b>on_validateButton_clicked</b>(<i></i>) <p> Private slot to validate the entered regexp. </p><a NAME="PyRegExpWizardWidget.on_wordboundButton_clicked" ID="PyRegExpWizardWidget.on_wordboundButton_clicked"></a> <h4>PyRegExpWizardWidget.on_wordboundButton_clicked</h4> <b>on_wordboundButton_clicked</b>(<i></i>) <p> Private slot to handle the word boundary toolbutton. </p> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="PyRegExpWizardWindow" ID="PyRegExpWizardWindow"></a> <h2>PyRegExpWizardWindow</h2> <p> Main window class for the standalone dialog. </p> <h3>Derived from</h3> QMainWindow <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#PyRegExpWizardWindow.__init__">PyRegExpWizardWindow</a></td> <td>Constructor</td> </tr> </table> <a NAME="PyRegExpWizardWindow.__init__" ID="PyRegExpWizardWindow.__init__"></a> <h4>PyRegExpWizardWindow (Constructor)</h4> <b>PyRegExpWizardWindow</b>(<i>parent=None</i>) <p> Constructor </p><dl> <dt><i>parent</i></dt> <dd> reference to the parent widget (QWidget) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>