88 <td>Public method to recalculate the association after a widget was moved.</td> |
88 <td>Public method to recalculate the association after a widget was moved.</td> |
89 </tr> |
89 </tr> |
90 </table> |
90 </table> |
91 <a NAME="AssociationItem.__init__" ID="AssociationItem.__init__"></a> |
91 <a NAME="AssociationItem.__init__" ID="AssociationItem.__init__"></a> |
92 <h4>AssociationItem (Constructor)</h4> |
92 <h4>AssociationItem (Constructor)</h4> |
93 <b>AssociationItem</b>(<i>itemA, itemB, type = Normal, parent = None</i>) |
93 <b>AssociationItem</b>(<i>itemA, itemB, type=Normal, parent=None</i>) |
94 <p> |
94 <p> |
95 Constructor |
95 Constructor |
96 </p><dl> |
96 </p><dl> |
97 <dt><i>itemA</i></dt> |
97 <dt><i>itemA</i></dt> |
98 <dd> |
98 <dd> |
146 </pre> |
146 </pre> |
147 </p><p> |
147 </p><p> |
148 Each diagonal is defined by two corners of the bounding rectangle |
148 Each diagonal is defined by two corners of the bounding rectangle |
149 </p><p> |
149 </p><p> |
150 To calculate the start point we have to find out in which |
150 To calculate the start point we have to find out in which |
151 region (defined by itemA's diagonals) is itemB's TopLeft corner |
151 region (defined by itemA's diagonals) is itemB's TopLeft corner |
152 (lets call it region M). After that the start point will be |
152 (lets call it region M). After that the start point will be |
153 the middle point of rectangle's side contained in region M. |
153 the middle point of rectangle's side contained in region M. |
154 </p><p> |
154 </p><p> |
155 To calculate the end point we repeat the above but in the opposite direction |
155 To calculate the end point we repeat the above but in the opposite direction |
156 (from itemB to itemA) |
156 (from itemB to itemA) |
199 </dd> |
199 </dd> |
200 </dl><a NAME="AssociationItem.__findPointRegion" ID="AssociationItem.__findPointRegion"></a> |
200 </dl><a NAME="AssociationItem.__findPointRegion" ID="AssociationItem.__findPointRegion"></a> |
201 <h4>AssociationItem.__findPointRegion</h4> |
201 <h4>AssociationItem.__findPointRegion</h4> |
202 <b>__findPointRegion</b>(<i>rect, posX, posY</i>) |
202 <b>__findPointRegion</b>(<i>rect, posX, posY</i>) |
203 <p> |
203 <p> |
204 Private method to find out, which region of rectangle rect contains the point |
204 Private method to find out, which region of rectangle rect contains the point |
205 (PosX, PosY) and returns the region number. |
205 (PosX, PosY) and returns the region number. |
206 </p><dl> |
206 </p><dl> |
207 <dt><i>rect</i></dt> |
207 <dt><i>rect</i></dt> |
208 <dd> |
208 <dd> |
209 rectangle to calculate the region for (QRectF) |
209 rectangle to calculate the region for (QRectF) |