--- a/Documentation/Source/eric5.E4Gui.E4Led.html Tue Jan 12 18:39:15 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,338 +0,0 @@ -<?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.E4Gui.E4Led</title> -<style> -body { - background:white; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #4FA4FF; } -h2 { color: white; background: #4FA4FF; } -h3 { color: white; background: #00557F; } -h4 { color: white; background: #00557F; } - -a { color: #AA5500; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>eric5.E4Gui.E4Led</h1> -<p> -Module implementing a LED widget. -</p><p> -It was inspired by KLed. -</p> -<h3>Global Attributes</h3> -<table> -<tr><td>E4LedCircular</td></tr><tr><td>E4LedRectangular</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr> -<td><a href="#E4Led">E4Led</a></td> -<td>Class implementing a LED widget.</td> -</tr> -</table> -<h3>Functions</h3> -<table> -<tr><td>None</td></tr> -</table> -<hr /><hr /> -<a NAME="E4Led" ID="E4Led"></a> -<h2>E4Led</h2> -<p> - Class implementing a LED widget. -</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="#E4Led.__init__">E4Led</a></td> -<td>Constructor</td> -</tr><tr> -<td><a href="#E4Led.__getBestRoundSize">__getBestRoundSize</a></td> -<td>Private method to calculate the width of the LED.</td> -</tr><tr> -<td><a href="#E4Led.__paintRectangular">__paintRectangular</a></td> -<td>Private method to paint a rectangular raised LED.</td> -</tr><tr> -<td><a href="#E4Led.__paintRound">__paintRound</a></td> -<td>Private method to paint a round raised LED.</td> -</tr><tr> -<td><a href="#E4Led.color">color</a></td> -<td>Public method to return the LED color.</td> -</tr><tr> -<td><a href="#E4Led.darkFactor">darkFactor</a></td> -<td>Public method to return the dark factor.</td> -</tr><tr> -<td><a href="#E4Led.isFramed">isFramed</a></td> -<td>Public method to return the framed state.</td> -</tr><tr> -<td><a href="#E4Led.isOn">isOn</a></td> -<td>Public method to return the LED state.</td> -</tr><tr> -<td><a href="#E4Led.minimumSizeHint">minimumSizeHint</a></td> -<td>Public method to give a hint about our minimum size.</td> -</tr><tr> -<td><a href="#E4Led.off">off</a></td> -<td>Public slot to set the LED to off.</td> -</tr><tr> -<td><a href="#E4Led.on">on</a></td> -<td>Public slot to set the LED to on.</td> -</tr><tr> -<td><a href="#E4Led.paintEvent">paintEvent</a></td> -<td>Protected slot handling the paint event.</td> -</tr><tr> -<td><a href="#E4Led.ratio">ratio</a></td> -<td>Public method to return the LED rectangular ratio (width / height).</td> -</tr><tr> -<td><a href="#E4Led.setColor">setColor</a></td> -<td>Public method to set the LED color.</td> -</tr><tr> -<td><a href="#E4Led.setDarkFactor">setDarkFactor</a></td> -<td>Public method to set the dark factor.</td> -</tr><tr> -<td><a href="#E4Led.setFramed">setFramed</a></td> -<td>Public slot to set the __framedLed attribute.</td> -</tr><tr> -<td><a href="#E4Led.setOn">setOn</a></td> -<td>Public method to set the LED to on.</td> -</tr><tr> -<td><a href="#E4Led.setRatio">setRatio</a></td> -<td>Public method to set the LED rectangular ratio (width / height).</td> -</tr><tr> -<td><a href="#E4Led.setShape">setShape</a></td> -<td>Public method to set the LED shape.</td> -</tr><tr> -<td><a href="#E4Led.shape">shape</a></td> -<td>Public method to return the LED shape.</td> -</tr><tr> -<td><a href="#E4Led.sizeHint">sizeHint</a></td> -<td>Public method to give a hint about our desired size.</td> -</tr><tr> -<td><a href="#E4Led.toggle">toggle</a></td> -<td>Public slot to toggle the LED state.</td> -</tr> -</table> -<a NAME="E4Led.__init__" ID="E4Led.__init__"></a> -<h4>E4Led (Constructor)</h4> -<b>E4Led</b>(<i>parent = None, color = None, shape = E4LedCircular, rectRatio = 1</i>) -<p> - Constructor -</p><dl> -<dt><i>parent</i></dt> -<dd> -reference to parent widget (QWidget) -</dd><dt><i>color</i></dt> -<dd> -color of the LED (QColor) -</dd><dt><i>shape</i></dt> -<dd> -shape of the LED (E4LedCircular, E4LedRectangular) -</dd><dt><i>rectRation</i></dt> -<dd> -ratio width to height, if shape is rectangular (float) -</dd> -</dl><a NAME="E4Led.__getBestRoundSize" ID="E4Led.__getBestRoundSize"></a> -<h4>E4Led.__getBestRoundSize</h4> -<b>__getBestRoundSize</b>(<i></i>) -<p> - Private method to calculate the width of the LED. -</p><dl> -<dt>Returns:</dt> -<dd> -new width of the LED (integer) -</dd> -</dl><a NAME="E4Led.__paintRectangular" ID="E4Led.__paintRectangular"></a> -<h4>E4Led.__paintRectangular</h4> -<b>__paintRectangular</b>(<i></i>) -<p> - Private method to paint a rectangular raised LED. -</p><a NAME="E4Led.__paintRound" ID="E4Led.__paintRound"></a> -<h4>E4Led.__paintRound</h4> -<b>__paintRound</b>(<i></i>) -<p> - Private method to paint a round raised LED. -</p><a NAME="E4Led.color" ID="E4Led.color"></a> -<h4>E4Led.color</h4> -<b>color</b>(<i></i>) -<p> - Public method to return the LED color. -</p><dl> -<dt>Returns:</dt> -<dd> -color of the LED (QColor) -</dd> -</dl><a NAME="E4Led.darkFactor" ID="E4Led.darkFactor"></a> -<h4>E4Led.darkFactor</h4> -<b>darkFactor</b>(<i></i>) -<p> - Public method to return the dark factor. -</p><dl> -<dt>Returns:</dt> -<dd> -the current dark factor (integer) -</dd> -</dl><a NAME="E4Led.isFramed" ID="E4Led.isFramed"></a> -<h4>E4Led.isFramed</h4> -<b>isFramed</b>(<i></i>) -<p> - Public method to return the framed state. -</p><dl> -<dt>Returns:</dt> -<dd> -flag indicating the current framed state (boolean) -</dd> -</dl><a NAME="E4Led.isOn" ID="E4Led.isOn"></a> -<h4>E4Led.isOn</h4> -<b>isOn</b>(<i></i>) -<p> - Public method to return the LED state. -</p><dl> -<dt>Returns:</dt> -<dd> -flag indicating the light state (boolean) -</dd> -</dl><a NAME="E4Led.minimumSizeHint" ID="E4Led.minimumSizeHint"></a> -<h4>E4Led.minimumSizeHint</h4> -<b>minimumSizeHint</b>(<i></i>) -<p> - Public method to give a hint about our minimum size. -</p><dl> -<dt>Returns:</dt> -<dd> -size hint (QSize) -</dd> -</dl><a NAME="E4Led.off" ID="E4Led.off"></a> -<h4>E4Led.off</h4> -<b>off</b>(<i></i>) -<p> - Public slot to set the LED to off. -</p><a NAME="E4Led.on" ID="E4Led.on"></a> -<h4>E4Led.on</h4> -<b>on</b>(<i></i>) -<p> - Public slot to set the LED to on. -</p><a NAME="E4Led.paintEvent" ID="E4Led.paintEvent"></a> -<h4>E4Led.paintEvent</h4> -<b>paintEvent</b>(<i>evt</i>) -<p> - Protected slot handling the paint event. -</p><dl> -<dt><i>evt</i></dt> -<dd> -paint event object (QPaintEvent) -</dd> -</dl><dl> -<dt>Raises <b>TypeError</b>:</dt> -<dd> -The E4Led has an unsupported shape type. -</dd> -</dl><a NAME="E4Led.ratio" ID="E4Led.ratio"></a> -<h4>E4Led.ratio</h4> -<b>ratio</b>(<i></i>) -<p> - Public method to return the LED rectangular ratio (width / height). -</p><dl> -<dt>Returns:</dt> -<dd> -LED rectangular ratio (float) -</dd> -</dl><a NAME="E4Led.setColor" ID="E4Led.setColor"></a> -<h4>E4Led.setColor</h4> -<b>setColor</b>(<i>color</i>) -<p> - Public method to set the LED color. -</p><dl> -<dt><i>color</i></dt> -<dd> -color for the LED (QColor) -</dd> -</dl><a NAME="E4Led.setDarkFactor" ID="E4Led.setDarkFactor"></a> -<h4>E4Led.setDarkFactor</h4> -<b>setDarkFactor</b>(<i>darkfactor</i>) -<p> - Public method to set the dark factor. -</p><dl> -<dt><i>darkfactor</i></dt> -<dd> -value to set for the dark factor (integer) -</dd> -</dl><a NAME="E4Led.setFramed" ID="E4Led.setFramed"></a> -<h4>E4Led.setFramed</h4> -<b>setFramed</b>(<i>framed</i>) -<p> - Public slot to set the __framedLed attribute. -</p><dl> -<dt><i>framed</i></dt> -<dd> -flag indicating the framed state (boolean) -</dd> -</dl><a NAME="E4Led.setOn" ID="E4Led.setOn"></a> -<h4>E4Led.setOn</h4> -<b>setOn</b>(<i>state</i>) -<p> - Public method to set the LED to on. -</p><dl> -<dt><i>state</i></dt> -<dd> -new state of the LED (boolean) -</dd> -</dl><a NAME="E4Led.setRatio" ID="E4Led.setRatio"></a> -<h4>E4Led.setRatio</h4> -<b>setRatio</b>(<i>ratio</i>) -<p> - Public method to set the LED rectangular ratio (width / height). -</p><dl> -<dt><i>ratio</i></dt> -<dd> -new LED rectangular ratio (float) -</dd> -</dl><a NAME="E4Led.setShape" ID="E4Led.setShape"></a> -<h4>E4Led.setShape</h4> -<b>setShape</b>(<i>shape</i>) -<p> - Public method to set the LED shape. -</p><dl> -<dt><i>shape</i></dt> -<dd> -new LED shape (E4LedCircular, E4LedRectangular) -</dd> -</dl><a NAME="E4Led.shape" ID="E4Led.shape"></a> -<h4>E4Led.shape</h4> -<b>shape</b>(<i></i>) -<p> - Public method to return the LED shape. -</p><dl> -<dt>Returns:</dt> -<dd> -LED shape (E4LedCircular, E4LedRectangular) -</dd> -</dl><a NAME="E4Led.sizeHint" ID="E4Led.sizeHint"></a> -<h4>E4Led.sizeHint</h4> -<b>sizeHint</b>(<i></i>) -<p> - Public method to give a hint about our desired size. -</p><dl> -<dt>Returns:</dt> -<dd> -size hint (QSize) -</dd> -</dl><a NAME="E4Led.toggle" ID="E4Led.toggle"></a> -<h4>E4Led.toggle</h4> -<b>toggle</b>(<i></i>) -<p> - Public slot to toggle the LED state. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file