58 @param colors tuple containing the foreground and background colors |
58 @param colors tuple containing the foreground and background colors |
59 @type tuple of (QColor, QColor) |
59 @type tuple of (QColor, QColor) |
60 @param parent reference to the parent object |
60 @param parent reference to the parent object |
61 @type QGraphicsItem |
61 @type QGraphicsItem |
62 """ |
62 """ |
63 if assocType == Normal: |
63 if assocType in (Normal, Imports): |
64 arrowType = NormalArrow |
|
65 arrowFilled = True |
|
66 elif assocType == Imports: |
|
67 arrowType = NormalArrow |
64 arrowType = NormalArrow |
68 arrowFilled = True |
65 arrowFilled = True |
69 elif assocType == Generalisation: |
66 elif assocType == Generalisation: |
70 arrowType = WideArrow |
67 arrowType = WideArrow |
71 arrowFilled = False |
68 arrowFilled = False |
222 self.regionA = North |
219 self.regionA = North |
223 elif self.regionA == NorthEast: |
220 elif self.regionA == NorthEast: |
224 self.regionA = East |
221 self.regionA = East |
225 elif self.regionA == SouthEast: |
222 elif self.regionA == SouthEast: |
226 self.regionA = South |
223 self.regionA = South |
227 elif self.regionA == SouthWest: |
224 elif self.regionA in (SouthWest, Center): |
228 self.regionA = West |
|
229 elif self.regionA == Center: |
|
230 self.regionA = West |
225 self.regionA = West |
231 |
226 |
232 self.__updateEndPoint(self.regionA, True) |
227 self.__updateEndPoint(self.regionA, True) |
233 |
228 |
234 # now do the same for itemB |
229 # now do the same for itemB |
239 self.regionB = North |
234 self.regionB = North |
240 elif self.regionB == NorthEast: |
235 elif self.regionB == NorthEast: |
241 self.regionB = East |
236 self.regionB = East |
242 elif self.regionB == SouthEast: |
237 elif self.regionB == SouthEast: |
243 self.regionB = South |
238 self.regionB = South |
244 elif self.regionB == SouthWest: |
239 elif self.regionB in (SouthWest, Center): |
245 self.regionB = West |
|
246 elif self.regionB == Center: |
|
247 self.regionB = West |
240 self.regionB = West |
248 |
241 |
249 self.__updateEndPoint(self.regionB, False) |
242 self.__updateEndPoint(self.regionB, False) |
250 |
243 |
251 def __findPointRegion(self, rect, posX, posY): |
244 def __findPointRegion(self, rect, posX, posY): |