Adaptagrams
|
The ConnEnd class represents different possible endpoints for connectors. More...
#include <connend.h>
Public Member Functions | |
ConnEnd (const Point &point) | |
Constructs a ConnEnd from a free-floating point. More... | |
ConnEnd (const Point &point, const ConnDirFlags visDirs) | |
Constructs a ConnEnd from a free-floating point as well as a set of flags specifying visibility for this point if it is located inside a shape. More... | |
ConnEnd (ShapeRef *shapeRef, const unsigned int connectionPinClassID) | |
Constructs a ConnEnd attached to one of a particular set of connection pins on a shape. More... | |
ConnEnd (JunctionRef *junctionRef) | |
Constructs a ConnEnd attached to one of the connection pins on a junction. More... | |
ConnEndType | type (void) const |
Returns the kind of connection this ConnEnd represents. More... | |
const Point | position (void) const |
Returns the position of this connector endpoint. More... | |
ConnDirFlags | directions (void) const |
Returns the directions in which this connector endpoint should be given visibility. More... | |
ShapeRef * | shape (void) const |
Returns the shape this ConnEnd attaches to, or nullptr. More... | |
JunctionRef * | junction (void) const |
Returns the junction this ConnEnd attaches to, or nullptr. More... | |
unsigned int | pinClassId (void) const |
Returns the pin class ID for a ConnEnd attached to a shape. More... | |
The ConnEnd class represents different possible endpoints for connectors.
ConnEnds may be free-floating points, points attached to junctions (between multiple connectors), or points attached to shapes (either to the centre of the shape or to particular pin positions on the shape).
Avoid::ConnEnd::ConnEnd | ( | const Point & | point | ) |
Constructs a ConnEnd from a free-floating point.
[in] | point | The position of the connector endpoint. |
Avoid::ConnEnd::ConnEnd | ( | const Point & | point, |
const ConnDirFlags | visDirs | ||
) |
Constructs a ConnEnd from a free-floating point as well as a set of flags specifying visibility for this point if it is located inside a shape.
[in] | point | The position of the connector endpoint. |
[in] | visDirs | One or more Avoid::ConnDirFlag options specifying the directions that this point should be given visibility if it is inside a shape. Currently has no effect if outside of shapes. |
Avoid::ConnEnd::ConnEnd | ( | ShapeRef * | shapeRef, |
const unsigned int | connectionPinClassID | ||
) |
Constructs a ConnEnd attached to one of a particular set of connection pins on a shape.
This is the recommended method for connecting to shapes that may later be moved or resized and for which you don't want to track and specify the connector endpoints yourself. See the ShapeConnectionPin documentation for more information.
If you to just connect to the centre of a shape you should just create a centre connection pin
and attach to that with
If a pin with the specified pin class ID doesn't exist then you will get a warning and a straight-line path between the source and destination endpoints of the connector will be returned during routing.
[in] | shapeRef | A pointer to the containing shape's ShapeRef. |
[in] | connectionPinClassID | A non-zero integer denoting the class ID for the set of pins to connect to. |
Avoid::ConnEnd::ConnEnd | ( | JunctionRef * | junctionRef | ) |
Constructs a ConnEnd attached to one of the connection pins on a junction.
This is the recommended method for connecting to junctions that may later be moved. See the ShapeConnectionPin documentation for more information.
[in] | junctionRef | A pointer to the containing junction's junctionRef. |
ConnDirFlags Avoid::ConnEnd::directions | ( | void | ) | const |
Returns the directions in which this connector endpoint should be given visibility.
References Avoid::ShapeConnectionPin::directions().
JunctionRef * Avoid::ConnEnd::junction | ( | void | ) | const |
Returns the junction this ConnEnd attaches to, or nullptr.
Will be valid only if type() == ConnEndJunction.
unsigned int Avoid::ConnEnd::pinClassId | ( | void | ) | const |
const Point Avoid::ConnEnd::position | ( | void | ) | const |
Returns the position of this connector endpoint.
References Avoid::ShapeConnectionPin::position().
ShapeRef * Avoid::ConnEnd::shape | ( | void | ) | const |
ConnEndType Avoid::ConnEnd::type | ( | void | ) | const |