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.E5Gui.E5LineEdit</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.E5Gui.E5LineEdit</h1> <p> Module implementing specialized line edits. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#E5LineEdit">E5LineEdit</a></td> <td>Class implementing a line edit widget showing some inactive text.</td> </tr><tr> <td><a href="#SideWidget">SideWidget</a></td> <td>Class implementing the side widgets for the line edit class.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /><hr /> <a NAME="E5LineEdit" ID="E5LineEdit"></a> <h2>E5LineEdit</h2> <p> Class implementing a line edit widget showing some inactive text. </p> <h3>Derived from</h3> QLineEdit <h3>Class Attributes</h3> <table> <tr><td>LeftSide</td></tr><tr><td>RightSide</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#E5LineEdit.__init__">E5LineEdit</a></td> <td>Constructor</td> </tr><tr> <td><a href="#E5LineEdit.__updateSideWidgetLocations">__updateSideWidgetLocations</a></td> <td>Private method to update the side widget locations.</td> </tr><tr> <td><a href="#E5LineEdit._updateTextMargins">_updateTextMargins</a></td> <td>Protected slot to update the text margins.</td> </tr><tr> <td><a href="#E5LineEdit.addWidget">addWidget</a></td> <td>Public method to add a widget to a side.</td> </tr><tr> <td><a href="#E5LineEdit.event">event</a></td> <td>Protected method to handle events.</td> </tr><tr> <td><a href="#E5LineEdit.inactiveText">inactiveText</a></td> <td>Public method to get the inactive text.</td> </tr><tr> <td><a href="#E5LineEdit.paintEvent">paintEvent</a></td> <td>Protected method handling a paint event.</td> </tr><tr> <td><a href="#E5LineEdit.removeWidget">removeWidget</a></td> <td>Public method to remove a widget from a side.</td> </tr><tr> <td><a href="#E5LineEdit.resizeEvent">resizeEvent</a></td> <td>Protected method to handle resize events.</td> </tr><tr> <td><a href="#E5LineEdit.setInactiveText">setInactiveText</a></td> <td>Public method to set the inactive text.</td> </tr><tr> <td><a href="#E5LineEdit.setWidgetSpacing">setWidgetSpacing</a></td> <td>Public method to set the side widget spacing.</td> </tr><tr> <td><a href="#E5LineEdit.textMargin">textMargin</a></td> <td>Public method to get the text margin for a side.</td> </tr><tr> <td><a href="#E5LineEdit.widgetSpacing">widgetSpacing</a></td> <td>Public method to get the side widget spacing.</td> </tr> </table> <a NAME="E5LineEdit.__init__" ID="E5LineEdit.__init__"></a> <h4>E5LineEdit (Constructor)</h4> <b>E5LineEdit</b>(<i>parent=None, inactiveText=""</i>) <p> Constructor </p><dl> <dt><i>parent</i></dt> <dd> reference to the parent widget (QWidget) </dd><dt><i>inactiveText</i></dt> <dd> text to be shown on inactivity (string) </dd> </dl><a NAME="E5LineEdit.__updateSideWidgetLocations" ID="E5LineEdit.__updateSideWidgetLocations"></a> <h4>E5LineEdit.__updateSideWidgetLocations</h4> <b>__updateSideWidgetLocations</b>(<i></i>) <p> Private method to update the side widget locations. </p><a NAME="E5LineEdit._updateTextMargins" ID="E5LineEdit._updateTextMargins"></a> <h4>E5LineEdit._updateTextMargins</h4> <b>_updateTextMargins</b>(<i></i>) <p> Protected slot to update the text margins. </p><a NAME="E5LineEdit.addWidget" ID="E5LineEdit.addWidget"></a> <h4>E5LineEdit.addWidget</h4> <b>addWidget</b>(<i>widget, position</i>) <p> Public method to add a widget to a side. </p><dl> <dt><i>widget</i></dt> <dd> reference to the widget to add (QWidget) </dd><dt><i>position</i></dt> <dd> position to add to (E5LineEdit.LeftSide, E5LineEdit.RightSide) </dd> </dl><a NAME="E5LineEdit.event" ID="E5LineEdit.event"></a> <h4>E5LineEdit.event</h4> <b>event</b>(<i>evt</i>) <p> Protected method to handle events. </p><dl> <dt><i>reference</i></dt> <dd> to the event (QEvent) </dd> </dl><dl> <dt>Returns:</dt> <dd> flag indicating, whether the event was recognized (boolean) </dd> </dl><a NAME="E5LineEdit.inactiveText" ID="E5LineEdit.inactiveText"></a> <h4>E5LineEdit.inactiveText</h4> <b>inactiveText</b>(<i></i>) <p> Public method to get the inactive text. </p><p> return inactive text (string) </p><a NAME="E5LineEdit.paintEvent" ID="E5LineEdit.paintEvent"></a> <h4>E5LineEdit.paintEvent</h4> <b>paintEvent</b>(<i>evt</i>) <p> Protected method handling a paint event. </p><dl> <dt><i>evt</i></dt> <dd> reference to the paint event (QPaintEvent) </dd> </dl><a NAME="E5LineEdit.removeWidget" ID="E5LineEdit.removeWidget"></a> <h4>E5LineEdit.removeWidget</h4> <b>removeWidget</b>(<i>widget</i>) <p> Public method to remove a widget from a side. </p><dl> <dt><i>widget</i></dt> <dd> reference to the widget to remove (QWidget) </dd> </dl><a NAME="E5LineEdit.resizeEvent" ID="E5LineEdit.resizeEvent"></a> <h4>E5LineEdit.resizeEvent</h4> <b>resizeEvent</b>(<i>evt</i>) <p> Protected method to handle resize events. </p><dl> <dt><i>evt</i></dt> <dd> reference to the resize event (QResizeEvent) </dd> </dl><a NAME="E5LineEdit.setInactiveText" ID="E5LineEdit.setInactiveText"></a> <h4>E5LineEdit.setInactiveText</h4> <b>setInactiveText</b>(<i>inactiveText</i>) <p> Public method to set the inactive text. </p><dl> <dt><i>inactiveText</i></dt> <dd> text to be shown on inactivity (string) </dd> </dl><a NAME="E5LineEdit.setWidgetSpacing" ID="E5LineEdit.setWidgetSpacing"></a> <h4>E5LineEdit.setWidgetSpacing</h4> <b>setWidgetSpacing</b>(<i>spacing</i>) <p> Public method to set the side widget spacing. </p><dl> <dt><i>spacing</i></dt> <dd> side widget spacing (integer) </dd> </dl><a NAME="E5LineEdit.textMargin" ID="E5LineEdit.textMargin"></a> <h4>E5LineEdit.textMargin</h4> <b>textMargin</b>(<i>position</i>) <p> Public method to get the text margin for a side. </p><dl> <dt><i>position</i></dt> <dd> side to get margin for (E5LineEdit.LeftSide, E5LineEdit.RightSide) </dd> </dl><a NAME="E5LineEdit.widgetSpacing" ID="E5LineEdit.widgetSpacing"></a> <h4>E5LineEdit.widgetSpacing</h4> <b>widgetSpacing</b>(<i></i>) <p> Public method to get the side widget spacing. </p><dl> <dt>Returns:</dt> <dd> side widget spacing (integer) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="SideWidget" ID="SideWidget"></a> <h2>SideWidget</h2> <p> Class implementing the side widgets for the line edit class. </p> <h3>Derived from</h3> QWidget <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#SideWidget.__init__">SideWidget</a></td> <td>Constructor</td> </tr><tr> <td><a href="#SideWidget.event">event</a></td> <td>Protected method to handle events.</td> </tr> </table> <a NAME="SideWidget.__init__" ID="SideWidget.__init__"></a> <h4>SideWidget (Constructor)</h4> <b>SideWidget</b>(<i>parent=None</i>) <p> Constructor </p><dl> <dt><i>parent</i></dt> <dd> reference to the parent widget (QWidget) </dd> </dl><a NAME="SideWidget.event" ID="SideWidget.event"></a> <h4>SideWidget.event</h4> <b>event</b>(<i>evt</i>) <p> Protected method to handle events. </p><dl> <dt><i>reference</i></dt> <dd> to the event (QEvent) </dd> </dl><dl> <dt>Returns:</dt> <dd> flag indicating, whether the event was recognized (boolean) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>