68 <td>Private method to calculate the ending points of the association item.</td> |
68 <td>Private method to calculate the ending points of the association item.</td> |
69 </tr><tr> |
69 </tr><tr> |
70 <td><a href="#AssociationItem.__calculateEndingPoints_rectangle">__calculateEndingPoints_rectangle</a></td> |
70 <td><a href="#AssociationItem.__calculateEndingPoints_rectangle">__calculateEndingPoints_rectangle</a></td> |
71 <td>Private method to calculate the ending points of the association item.</td> |
71 <td>Private method to calculate the ending points of the association item.</td> |
72 </tr><tr> |
72 </tr><tr> |
|
73 <td><a href="#AssociationItem.__calculateEndingPoints_topToBottom">__calculateEndingPoints_topToBottom</a></td> |
|
74 <td>Private method to calculate the ending points of the association item.</td> |
|
75 </tr><tr> |
73 <td><a href="#AssociationItem.__findIntersection">__findIntersection</a></td> |
76 <td><a href="#AssociationItem.__findIntersection">__findIntersection</a></td> |
74 <td>Method to calculate the intersection point of two lines.</td> |
77 <td>Method to calculate the intersection point of two lines.</td> |
75 </tr><tr> |
78 </tr><tr> |
76 <td><a href="#AssociationItem.__findPointRegion">__findPointRegion</a></td> |
79 <td><a href="#AssociationItem.__findPointRegion">__findPointRegion</a></td> |
77 <td>Private method to find out, which region of rectangle rect contains the point (PosX, PosY) and returns the region number.</td> |
80 <td>Private method to find out, which region of rectangle rect contains the point (PosX, PosY) and returns the region number.</td> |
96 <table> |
99 <table> |
97 <tr><td>None</td></tr> |
100 <tr><td>None</td></tr> |
98 </table> |
101 </table> |
99 <a NAME="AssociationItem.__init__" ID="AssociationItem.__init__"></a> |
102 <a NAME="AssociationItem.__init__" ID="AssociationItem.__init__"></a> |
100 <h4>AssociationItem (Constructor)</h4> |
103 <h4>AssociationItem (Constructor)</h4> |
101 <b>AssociationItem</b>(<i>itemA, itemB, type=Normal, parent=None</i>) |
104 <b>AssociationItem</b>(<i>itemA, itemB, type=Normal, topToBottom=False, parent=None</i>) |
102 <p> |
105 <p> |
103 Constructor |
106 Constructor |
104 </p><dl> |
107 </p><dl> |
105 <dt><i>itemA</i></dt> |
108 <dt><i>itemA</i></dt> |
106 <dd> |
109 <dd> |
114 <ul> |
117 <ul> |
115 <li>Normal (default)</li> |
118 <li>Normal (default)</li> |
116 <li>Generalisation</li> |
119 <li>Generalisation</li> |
117 <li>Imports</li> |
120 <li>Imports</li> |
118 </ul> |
121 </ul> |
|
122 </dd><dt><i>topToBottom=</i></dt> |
|
123 <dd> |
|
124 flag indicating to draw the association |
|
125 from item A top to item B bottom (boolean) |
119 </dd><dt><i>parent=</i></dt> |
126 </dd><dt><i>parent=</i></dt> |
120 <dd> |
127 <dd> |
121 reference to the parent object (QGraphicsItem) |
128 reference to the parent object (QGraphicsItem) |
122 </dd> |
129 </dd> |
123 </dl><a NAME="AssociationItem.__calculateEndingPoints_center" ID="AssociationItem.__calculateEndingPoints_center"></a> |
130 </dl><a NAME="AssociationItem.__calculateEndingPoints_center" ID="AssociationItem.__calculateEndingPoints_center"></a> |
160 (lets call it region M). After that the start point will be |
167 (lets call it region M). After that the start point will be |
161 the middle point of rectangle's side contained in region M. |
168 the middle point of rectangle's side contained in region M. |
162 </p><p> |
169 </p><p> |
163 To calculate the end point we repeat the above but in the opposite direction |
170 To calculate the end point we repeat the above but in the opposite direction |
164 (from itemB to itemA) |
171 (from itemB to itemA) |
|
172 </p><a NAME="AssociationItem.__calculateEndingPoints_topToBottom" ID="AssociationItem.__calculateEndingPoints_topToBottom"></a> |
|
173 <h4>AssociationItem.__calculateEndingPoints_topToBottom</h4> |
|
174 <b>__calculateEndingPoints_topToBottom</b>(<i></i>) |
|
175 <p> |
|
176 Private method to calculate the ending points of the association item. |
|
177 </p><p> |
|
178 The ending points are calculated from the top center of the lower item |
|
179 to the bottom center of the upper item. |
165 </p><a NAME="AssociationItem.__findIntersection" ID="AssociationItem.__findIntersection"></a> |
180 </p><a NAME="AssociationItem.__findIntersection" ID="AssociationItem.__findIntersection"></a> |
166 <h4>AssociationItem.__findIntersection</h4> |
181 <h4>AssociationItem.__findIntersection</h4> |
167 <b>__findIntersection</b>(<i>p1, p2, p3, p4</i>) |
182 <b>__findIntersection</b>(<i>p1, p2, p3, p4</i>) |
168 <p> |
183 <p> |
169 Method to calculate the intersection point of two lines. |
184 Method to calculate the intersection point of two lines. |