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