src/eric7/Documentation/Source/eric7.EricGraphics.EricArrowItem.html

Sat, 26 Apr 2025 12:34:32 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Apr 2025 12:34:32 +0200
branch
eric7
changeset 11240
c48c615c04a3
parent 10684
58c7f23ae1cb
permissions
-rw-r--r--

MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.

<!DOCTYPE html>
<html><head>
<title>eric7.EricGraphics.EricArrowItem</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>eric7.EricGraphics.EricArrowItem</h1>
<p>
Module implementing a graphics item subclass for an arrow.
</p>

<h3>Global Attributes</h3>
<table>
<tr><td>ArrowheadAngleFactor</td></tr>
</table>

<h3>Classes</h3>
<table>
<tr>
<td><a href="#EricArrowItem">EricArrowItem</a></td>
<td>Class implementing an arrow graphics item subclass.</td>
</tr>
<tr>
<td><a href="#EricArrowType">EricArrowType</a></td>
<td>Class defining the arrow types.</td>
</tr>
</table>

<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>

<hr />
<hr />
<a NAME="EricArrowItem" ID="EricArrowItem"></a>
<h2>EricArrowItem</h2>
<p>
    Class implementing an arrow graphics item subclass.
</p>

<h3>Derived from</h3>
QAbstractGraphicsShapeItem
<h3>Class Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Methods</h3>
<table>
<tr>
<td><a href="#EricArrowItem.__init__">EricArrowItem</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#EricArrowItem.boundingRect">boundingRect</a></td>
<td>Public method to return the bounding rectangle.</td>
</tr>
<tr>
<td><a href="#EricArrowItem.paint">paint</a></td>
<td>Public method to paint the item in local coordinates.</td>
</tr>
<tr>
<td><a href="#EricArrowItem.setEndPoint">setEndPoint</a></td>
<td>Public method to set the end point.</td>
</tr>
<tr>
<td><a href="#EricArrowItem.setPoints">setPoints</a></td>
<td>Public method to set the start and end points of the line.</td>
</tr>
<tr>
<td><a href="#EricArrowItem.setStartPoint">setStartPoint</a></td>
<td>Public method to set the start point.</td>
</tr>
</table>

<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>


<a NAME="EricArrowItem.__init__" ID="EricArrowItem.__init__"></a>
<h4>EricArrowItem (Constructor)</h4>
<b>EricArrowItem</b>(<i>origin=None, end=None, filled=False, arrowType=EricArrowType.NORMAL, colors=None, parent=None, </i>)
<p>
        Constructor
</p>

<dl>

<dt><i>origin</i> (QPointF)</dt>
<dd>
origin of the arrow
</dd>
<dt><i>end</i> (QPointF)</dt>
<dd>
end point of the arrow
</dd>
<dt><i>filled</i> (bool)</dt>
<dd>
flag indicating a filled arrow head
</dd>
<dt><i>arrowType</i> (EricArrowType)</dt>
<dd>
arrow type
</dd>
<dt><i>colors</i> (tuple of (QColor, QColor))</dt>
<dd>
tuple containing the foreground and background colors
</dd>
<dt><i>parent</i> (QGraphicsItem)</dt>
<dd>
reference to the parent object
</dd>
</dl>
<a NAME="EricArrowItem.boundingRect" ID="EricArrowItem.boundingRect"></a>
<h4>EricArrowItem.boundingRect</h4>
<b>boundingRect</b>(<i></i>)
<p>
        Public method to return the bounding rectangle.
</p>

<dl>
<dt>Return:</dt>
<dd>
bounding rectangle
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
QRectF
</dd>
</dl>
<a NAME="EricArrowItem.paint" ID="EricArrowItem.paint"></a>
<h4>EricArrowItem.paint</h4>
<b>paint</b>(<i>painter, option, _widget=None</i>)
<p>
        Public method to paint the item in local coordinates.
</p>

<dl>

<dt><i>painter</i> (QPainter)</dt>
<dd>
reference to the painter object
</dd>
<dt><i>option</i> (QStyleOptionGraphicsItem)</dt>
<dd>
style options
</dd>
<dt><i>_widget</i> (QWidget)</dt>
<dd>
optional reference to the widget painted on (unused)
</dd>
</dl>
<a NAME="EricArrowItem.setEndPoint" ID="EricArrowItem.setEndPoint"></a>
<h4>EricArrowItem.setEndPoint</h4>
<b>setEndPoint</b>(<i>x, y</i>)
<p>
        Public method to set the end point.
</p>
<p>
        <b>Note:</b> This method does not redraw the item.
</p>

<dl>

<dt><i>x</i> (float)</dt>
<dd>
x-coordinate of the end point
</dd>
<dt><i>y</i> (float)</dt>
<dd>
y-coordinate of the end point
</dd>
</dl>
<a NAME="EricArrowItem.setPoints" ID="EricArrowItem.setPoints"></a>
<h4>EricArrowItem.setPoints</h4>
<b>setPoints</b>(<i>xa, ya, xb, yb</i>)
<p>
        Public method to set the start and end points of the line.
</p>
<p>
        <b>Note:</b> This method does not redraw the item.
</p>

<dl>

<dt><i>xa</i> (float)</dt>
<dd>
x-coordinate of the start point
</dd>
<dt><i>ya</i> (float)</dt>
<dd>
y-coordinate of the start point
</dd>
<dt><i>xb</i> (float)</dt>
<dd>
x-coordinate of the end point
</dd>
<dt><i>yb</i> (float)</dt>
<dd>
y-coordinate of the end point
</dd>
</dl>
<a NAME="EricArrowItem.setStartPoint" ID="EricArrowItem.setStartPoint"></a>
<h4>EricArrowItem.setStartPoint</h4>
<b>setStartPoint</b>(<i>x, y</i>)
<p>
        Public method to set the start point.
</p>
<p>
        <b>Note:</b> This method does not redraw the item.
</p>

<dl>

<dt><i>x</i> (float)</dt>
<dd>
x-coordinate of the start point
</dd>
<dt><i>y</i> (float)</dt>
<dd>
y-coordinate of the start point
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="EricArrowType" ID="EricArrowType"></a>
<h2>EricArrowType</h2>
<p>
    Class defining the arrow types.
</p>

<h3>Derived from</h3>
enum.Enum
<h3>Class Attributes</h3>
<table>
<tr><td>NORMAL</td></tr>
<tr><td>WIDE</td></tr>
</table>

<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Methods</h3>
<table>
<tr><td>None</td></tr>
</table>

<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>


<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial