eric6/Documentation/Source/eric6.Graphics.AssociationItem.html

changeset 8289
871b40c5a77a
parent 8270
6ba3564b7161
child 8294
cb4e5bbf3a2c
equal deleted inserted replaced
8288:809d5d5ac2ba 8289:871b40c5a77a
108 <td><a href="#AssociationItem.__findPointRegion">__findPointRegion</a></td> 108 <td><a href="#AssociationItem.__findPointRegion">__findPointRegion</a></td>
109 <td>Private method to find out, which region of rectangle rect contains the point (PosX, PosY) and returns the region number.</td> 109 <td>Private method to find out, which region of rectangle rect contains the point (PosX, PosY) and returns the region number.</td>
110 </tr> 110 </tr>
111 <tr> 111 <tr>
112 <td><a href="#AssociationItem.__findRectIntersectionPoint">__findRectIntersectionPoint</a></td> 112 <td><a href="#AssociationItem.__findRectIntersectionPoint">__findRectIntersectionPoint</a></td>
113 <td>Private method to find the intersetion point of a line with a rectangle.</td> 113 <td>Private method to find the intersection point of a line with a rectangle.</td>
114 </tr> 114 </tr>
115 <tr> 115 <tr>
116 <td><a href="#AssociationItem.__mapRectFromItem">__mapRectFromItem</a></td> 116 <td><a href="#AssociationItem.__mapRectFromItem">__mapRectFromItem</a></td>
117 <td>Private method to map item's rectangle to this item's coordinate system.</td> 117 <td>Private method to map item's rectangle to this item's coordinate system.</td>
118 </tr> 118 </tr>
146 <p> 146 <p>
147 Class method to parse the given persistence data. 147 Class method to parse the given persistence data.
148 </p> 148 </p>
149 <dl> 149 <dl>
150 150
151 <dt><i>data</i></dt> 151 <dt><i>data</i> (str)</dt>
152 <dd> 152 <dd>
153 persisted data to be parsed (string) 153 persisted data to be parsed
154 </dd> 154 </dd>
155 </dl> 155 </dl>
156 <dl> 156 <dl>
157 <dt>Return:</dt> 157 <dt>Return:</dt>
158 <dd> 158 <dd>
159 tuple with the IDs of the source and destination items, 159 tuple with the IDs of the source and destination items,
160 the association type and a flag indicating to associate from top 160 the association type and a flag indicating to associate from top
161 to bottom (integer, integer, integer, boolean) 161 to bottom
162 </dd>
163 </dl>
164 <dl>
165 <dt>Return Type:</dt>
166 <dd>
167 tuple of (int, int, int, bool)
162 </dd> 168 </dd>
163 </dl> 169 </dl>
164 <a NAME="AssociationItem.__init__" ID="AssociationItem.__init__"></a> 170 <a NAME="AssociationItem.__init__" ID="AssociationItem.__init__"></a>
165 <h4>AssociationItem (Constructor)</h4> 171 <h4>AssociationItem (Constructor)</h4>
166 <b>AssociationItem</b>(<i>itemA, itemB, assocType=AssociationType.NORMAL, topToBottom=False, colors=None, parent=None</i>) 172 <b>AssociationItem</b>(<i>itemA, itemB, assocType=AssociationType.NORMAL, topToBottom=False, colors=None, parent=None</i>)
291 In order for the linear function calculations to work in this method 297 In order for the linear function calculations to work in this method
292 we must switch x and y values (x values become y values and viceversa) 298 we must switch x and y values (x values become y values and viceversa)
293 </p> 299 </p>
294 <dl> 300 <dl>
295 301
296 <dt><i>p1</i></dt> 302 <dt><i>p1</i> (QPointF)</dt>
297 <dd> 303 <dd>
298 first point of first line (QPointF) 304 first point of first line
299 </dd> 305 </dd>
300 <dt><i>p2</i></dt> 306 <dt><i>p2</i> (QPointF)</dt>
301 <dd> 307 <dd>
302 second point of first line (QPointF) 308 second point of first line
303 </dd> 309 </dd>
304 <dt><i>p3</i></dt> 310 <dt><i>p3</i> (QPointF)</dt>
305 <dd> 311 <dd>
306 first point of second line (QPointF) 312 first point of second line
307 </dd> 313 </dd>
308 <dt><i>p4</i></dt> 314 <dt><i>p4</i> (QPointF)</dt>
309 <dd> 315 <dd>
310 second point of second line (QPointF) 316 second point of second line
311 </dd> 317 </dd>
312 </dl> 318 </dl>
313 <dl> 319 <dl>
314 <dt>Return:</dt> 320 <dt>Return:</dt>
315 <dd> 321 <dd>
316 the intersection point (QPointF) 322 the intersection point
323 </dd>
324 </dl>
325 <dl>
326 <dt>Return Type:</dt>
327 <dd>
328 QPointF
317 </dd> 329 </dd>
318 </dl> 330 </dl>
319 <a NAME="AssociationItem.__findPointRegion" ID="AssociationItem.__findPointRegion"></a> 331 <a NAME="AssociationItem.__findPointRegion" ID="AssociationItem.__findPointRegion"></a>
320 <h4>AssociationItem.__findPointRegion</h4> 332 <h4>AssociationItem.__findPointRegion</h4>
321 <b>__findPointRegion</b>(<i>rect, posX, posY</i>) 333 <b>__findPointRegion</b>(<i>rect, posX, posY</i>)
324 Private method to find out, which region of rectangle rect contains 336 Private method to find out, which region of rectangle rect contains
325 the point (PosX, PosY) and returns the region number. 337 the point (PosX, PosY) and returns the region number.
326 </p> 338 </p>
327 <dl> 339 <dl>
328 340
329 <dt><i>rect</i></dt> 341 <dt><i>rect</i> (QRectF)</dt>
330 <dd> 342 <dd>
331 rectangle to calculate the region for (QRectF) 343 rectangle to calculate the region for
332 </dd> 344 </dd>
333 <dt><i>posX</i></dt> 345 <dt><i>posX</i> (float)</dt>
334 <dd> 346 <dd>
335 x position of point (float) 347 x position of point
336 </dd> 348 </dd>
337 <dt><i>posY</i></dt> 349 <dt><i>posY</i> (float)</dt>
338 <dd> 350 <dd>
339 y position of point (float) 351 y position of point
340 </dd> 352 </dd>
341 </dl> 353 </dl>
342 <dl> 354 <dl>
343 <dt>Return:</dt> 355 <dt>Return:</dt>
344 <dd> 356 <dd>
352 SouthEast = On diagonal 2 between Region 3 and 4<br /> 364 SouthEast = On diagonal 2 between Region 3 and 4<br />
353 SouthWest = On diagonal 1 between Region4 and 1<br /> 365 SouthWest = On diagonal 1 between Region4 and 1<br />
354 Center = On diagonal 1 and On diagonal 2 (the center)<br /> 366 Center = On diagonal 1 and On diagonal 2 (the center)<br />
355 </dd> 367 </dd>
356 </dl> 368 </dl>
369 <dl>
370 <dt>Return Type:</dt>
371 <dd>
372 AssociationPointRegion
373 </dd>
374 </dl>
357 <a NAME="AssociationItem.__findRectIntersectionPoint" ID="AssociationItem.__findRectIntersectionPoint"></a> 375 <a NAME="AssociationItem.__findRectIntersectionPoint" ID="AssociationItem.__findRectIntersectionPoint"></a>
358 <h4>AssociationItem.__findRectIntersectionPoint</h4> 376 <h4>AssociationItem.__findRectIntersectionPoint</h4>
359 <b>__findRectIntersectionPoint</b>(<i>item, p1, p2</i>) 377 <b>__findRectIntersectionPoint</b>(<i>item, p1, p2</i>)
360 378
361 <p> 379 <p>
362 Private method to find the intersetion point of a line with a 380 Private method to find the intersection point of a line with a
363 rectangle. 381 rectangle.
364 </p> 382 </p>
365 <dl> 383 <dl>
366 384
367 <dt><i>item</i></dt> 385 <dt><i>item</i> (UMLItem)</dt>
368 <dd> 386 <dd>
369 item to check against 387 item to check against
370 </dd> 388 </dd>
371 <dt><i>p1</i></dt> 389 <dt><i>p1</i> (QPointF)</dt>
372 <dd> 390 <dd>
373 first point of the line (QPointF) 391 first point of the line
374 </dd> 392 </dd>
375 <dt><i>p2</i></dt> 393 <dt><i>p2</i> (QPointF)</dt>
376 <dd> 394 <dd>
377 second point of the line (QPointF) 395 second point of the line
378 </dd> 396 </dd>
379 </dl> 397 </dl>
380 <dl> 398 <dl>
381 <dt>Return:</dt> 399 <dt>Return:</dt>
382 <dd> 400 <dd>
383 the intersection point (QPointF) 401 the intersection point
402 </dd>
403 </dl>
404 <dl>
405 <dt>Return Type:</dt>
406 <dd>
407 QPointF
384 </dd> 408 </dd>
385 </dl> 409 </dl>
386 <a NAME="AssociationItem.__mapRectFromItem" ID="AssociationItem.__mapRectFromItem"></a> 410 <a NAME="AssociationItem.__mapRectFromItem" ID="AssociationItem.__mapRectFromItem"></a>
387 <h4>AssociationItem.__mapRectFromItem</h4> 411 <h4>AssociationItem.__mapRectFromItem</h4>
388 <b>__mapRectFromItem</b>(<i>item</i>) 412 <b>__mapRectFromItem</b>(<i>item</i>)
391 Private method to map item's rectangle to this item's coordinate 415 Private method to map item's rectangle to this item's coordinate
392 system. 416 system.
393 </p> 417 </p>
394 <dl> 418 <dl>
395 419
396 <dt><i>item</i></dt> 420 <dt><i>item</i> (QGraphicsRectItem)</dt>
397 <dd> 421 <dd>
398 reference to the item to be mapped (QGraphicsRectItem) 422 reference to the item to be mapped
399 </dd> 423 </dd>
400 </dl> 424 </dl>
401 <dl> 425 <dl>
402 <dt>Return:</dt> 426 <dt>Return:</dt>
403 <dd> 427 <dd>
404 item's rectangle in local coordinates (QRectF) 428 item's rectangle in local coordinates
429 </dd>
430 </dl>
431 <dl>
432 <dt>Return Type:</dt>
433 <dd>
434 QRectF
405 </dd> 435 </dd>
406 </dl> 436 </dl>
407 <a NAME="AssociationItem.__updateEndPoint" ID="AssociationItem.__updateEndPoint"></a> 437 <a NAME="AssociationItem.__updateEndPoint" ID="AssociationItem.__updateEndPoint"></a>
408 <h4>AssociationItem.__updateEndPoint</h4> 438 <h4>AssociationItem.__updateEndPoint</h4>
409 <b>__updateEndPoint</b>(<i>region, isWidgetA</i>) 439 <b>__updateEndPoint</b>(<i>region, isWidgetA</i>)
411 <p> 441 <p>
412 Private method to update an endpoint. 442 Private method to update an endpoint.
413 </p> 443 </p>
414 <dl> 444 <dl>
415 445
416 <dt><i>region</i></dt> 446 <dt><i>region</i> (AssociationPointRegion)</dt>
417 <dd> 447 <dd>
418 the region for the endpoint (integer) 448 the region for the endpoint
419 </dd> 449 </dd>
420 <dt><i>isWidgetA</i></dt> 450 <dt><i>isWidgetA</i> (bool)</dt>
421 <dd> 451 <dd>
422 flag indicating update for itemA is done (boolean) 452 flag indicating update for itemA is done
423 </dd> 453 </dd>
424 </dl> 454 </dl>
425 <a NAME="AssociationItem.buildAssociationItemDataString" ID="AssociationItem.buildAssociationItemDataString"></a> 455 <a NAME="AssociationItem.buildAssociationItemDataString" ID="AssociationItem.buildAssociationItemDataString"></a>
426 <h4>AssociationItem.buildAssociationItemDataString</h4> 456 <h4>AssociationItem.buildAssociationItemDataString</h4>
427 <b>buildAssociationItemDataString</b>(<i></i>) 457 <b>buildAssociationItemDataString</b>(<i></i>)
434 by ", ". value must not contain ", " or newlines. 464 by ", ". value must not contain ", " or newlines.
435 </p> 465 </p>
436 <dl> 466 <dl>
437 <dt>Return:</dt> 467 <dt>Return:</dt>
438 <dd> 468 <dd>
439 persistence data (string) 469 persistence data
470 </dd>
471 </dl>
472 <dl>
473 <dt>Return Type:</dt>
474 <dd>
475 str
440 </dd> 476 </dd>
441 </dl> 477 </dl>
442 <a NAME="AssociationItem.unassociate" ID="AssociationItem.unassociate"></a> 478 <a NAME="AssociationItem.unassociate" ID="AssociationItem.unassociate"></a>
443 <h4>AssociationItem.unassociate</h4> 479 <h4>AssociationItem.unassociate</h4>
444 <b>unassociate</b>(<i></i>) 480 <b>unassociate</b>(<i></i>)

eric ide

mercurial