|
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.E4Graphics.E4ArrowItem</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.E4Graphics.E4ArrowItem</h1> |
|
12 <p> |
|
13 Module implementing a graphics item subclass for an arrow. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>ArrowheadAngleFactor</td></tr><tr><td>NormalArrow</td></tr><tr><td>WideArrow</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#E4ArrowItem">E4ArrowItem</a></td> |
|
23 <td>Class implementing an arrow graphics item subclass.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="E4ArrowItem" ID="E4ArrowItem"></a> |
|
32 <h2>E4ArrowItem</h2> |
|
33 <p> |
|
34 Class implementing an arrow graphics item subclass. |
|
35 </p> |
|
36 <h3>Derived from</h3> |
|
37 QAbstractGraphicsShapeItem |
|
38 <h3>Class Attributes</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <h3>Methods</h3> |
|
43 <table> |
|
44 <tr> |
|
45 <td><a href="#E4ArrowItem.__init__">E4ArrowItem</a></td> |
|
46 <td>Constructor</td> |
|
47 </tr><tr> |
|
48 <td><a href="#E4ArrowItem.boundingRect">boundingRect</a></td> |
|
49 <td>Public method to return the bounding rectangle.</td> |
|
50 </tr><tr> |
|
51 <td><a href="#E4ArrowItem.paint">paint</a></td> |
|
52 <td>Public method to paint the item in local coordinates.</td> |
|
53 </tr><tr> |
|
54 <td><a href="#E4ArrowItem.setEndPoint">setEndPoint</a></td> |
|
55 <td>Public method to set the end point.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#E4ArrowItem.setPoints">setPoints</a></td> |
|
58 <td>Public method to set the start and end points of the line.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#E4ArrowItem.setStartPoint">setStartPoint</a></td> |
|
61 <td>Public method to set the start point.</td> |
|
62 </tr> |
|
63 </table> |
|
64 <a NAME="E4ArrowItem.__init__" ID="E4ArrowItem.__init__"></a> |
|
65 <h4>E4ArrowItem (Constructor)</h4> |
|
66 <b>E4ArrowItem</b>(<i>origin = QPointF(), end = QPointF(), filled = False, type = NormalArrow, parent = None</i>) |
|
67 <p> |
|
68 Constructor |
|
69 </p><dl> |
|
70 <dt><i>origin</i></dt> |
|
71 <dd> |
|
72 origin of the arrow (QPointF) |
|
73 </dd><dt><i>end</i></dt> |
|
74 <dd> |
|
75 end point of the arrow (QPointF) |
|
76 </dd><dt><i>filled</i></dt> |
|
77 <dd> |
|
78 flag indicating a filled arrow head (boolean) |
|
79 </dd><dt><i>type</i></dt> |
|
80 <dd> |
|
81 arrow type (NormalArrow, WideArrow) |
|
82 </dd><dt><i>parent=</i></dt> |
|
83 <dd> |
|
84 reference to the parent object (QGraphicsItem) |
|
85 </dd> |
|
86 </dl><a NAME="E4ArrowItem.boundingRect" ID="E4ArrowItem.boundingRect"></a> |
|
87 <h4>E4ArrowItem.boundingRect</h4> |
|
88 <b>boundingRect</b>(<i></i>) |
|
89 <p> |
|
90 Public method to return the bounding rectangle. |
|
91 </p><dl> |
|
92 <dt>Returns:</dt> |
|
93 <dd> |
|
94 bounding rectangle (QRectF) |
|
95 </dd> |
|
96 </dl><a NAME="E4ArrowItem.paint" ID="E4ArrowItem.paint"></a> |
|
97 <h4>E4ArrowItem.paint</h4> |
|
98 <b>paint</b>(<i>painter, option, widget = None</i>) |
|
99 <p> |
|
100 Public method to paint the item in local coordinates. |
|
101 </p><dl> |
|
102 <dt><i>painter</i></dt> |
|
103 <dd> |
|
104 reference to the painter object (QPainter) |
|
105 </dd><dt><i>option</i></dt> |
|
106 <dd> |
|
107 style options (QStyleOptionGraphicsItem) |
|
108 </dd><dt><i>widget</i></dt> |
|
109 <dd> |
|
110 optional reference to the widget painted on (QWidget) |
|
111 </dd> |
|
112 </dl><a NAME="E4ArrowItem.setEndPoint" ID="E4ArrowItem.setEndPoint"></a> |
|
113 <h4>E4ArrowItem.setEndPoint</h4> |
|
114 <b>setEndPoint</b>(<i>x, y</i>) |
|
115 <p> |
|
116 Public method to set the end point. |
|
117 </p><p> |
|
118 <b>Note:</b> This method does not redraw the item. |
|
119 </p><dl> |
|
120 <dt><i>x</i></dt> |
|
121 <dd> |
|
122 x-coordinate of the end point (float) |
|
123 </dd><dt><i>y</i></dt> |
|
124 <dd> |
|
125 y-coordinate of the end point (float) |
|
126 </dd> |
|
127 </dl><a NAME="E4ArrowItem.setPoints" ID="E4ArrowItem.setPoints"></a> |
|
128 <h4>E4ArrowItem.setPoints</h4> |
|
129 <b>setPoints</b>(<i>xa, ya, xb, yb</i>) |
|
130 <p> |
|
131 Public method to set the start and end points of the line. |
|
132 </p><p> |
|
133 <b>Note:</b> This method does not redraw the item. |
|
134 </p><dl> |
|
135 <dt><i>xa</i></dt> |
|
136 <dd> |
|
137 x-coordinate of the start point (float) |
|
138 </dd><dt><i>ya</i></dt> |
|
139 <dd> |
|
140 y-coordinate of the start point (float) |
|
141 </dd><dt><i>xb</i></dt> |
|
142 <dd> |
|
143 x-coordinate of the end point (float) |
|
144 </dd><dt><i>yb</i></dt> |
|
145 <dd> |
|
146 y-coordinate of the end point (float) |
|
147 </dd> |
|
148 </dl><a NAME="E4ArrowItem.setStartPoint" ID="E4ArrowItem.setStartPoint"></a> |
|
149 <h4>E4ArrowItem.setStartPoint</h4> |
|
150 <b>setStartPoint</b>(<i>x, y</i>) |
|
151 <p> |
|
152 Public method to set the start point. |
|
153 </p><p> |
|
154 <b>Note:</b> This method does not redraw the item. |
|
155 </p><dl> |
|
156 <dt><i>x</i></dt> |
|
157 <dd> |
|
158 x-coordinate of the start point (float) |
|
159 </dd><dt><i>y</i></dt> |
|
160 <dd> |
|
161 y-coordinate of the start point (float) |
|
162 </dd> |
|
163 </dl> |
|
164 <div align="right"><a href="#top">Up</a></div> |
|
165 <hr /> |
|
166 </body></html> |