PyANGKernel.GKObjectConnection

class GKObjectConnection

Object that keeps information about the connection between two different view objects.

Details

Connection between an ‘owner’ GKGeoObject and a ‘connectedObject’ GKPointer< GKGeoObject >.

The connection can be of various types (directions). See ConnectionType .

Inheritance diagram of PyANGKernel.GKObjectConnection

Inherited by: GKCenConnection

Synopsis

Methods

Virtual methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

__init__()

* Constructor. * Default values: * - type: GK::eConnectionBidirectional * - relative position: 0.0

getConnectionObject()
Return type:

GKGeoObject

Returns the destination object.

getConnectionType()
Return type:

ConnectionType

Returns the connection type between the owner and the connectionObject.

getOther(o)
Parameters:

oGKGeoObject

Return type:

GKGeoObject

Returns the ‘other’ object of the connection: - if the specified object is the Owner, returns getConnectionObject ; - if the specified object is the ConnectionObject, returns getOwner ; - else, returns NULL.

getOwner()
Return type:

GKGeoObject

Gets the connection’s owner.

getPosition()
Return type:

float

Returns the connection relative position

isConnectionObject(o)
Parameters:

oGKGeoObject

Return type:

bool

Returns true if the destination object is “o”

isHiddenConnection()
Return type:

bool

Returns true if the connection is hidden.

setConnectionObject(o)
Parameters:

oGKGeoObject

Sets the destination object.

setConnectionType(atype)
Parameters:

atypeConnectionType

Sets the connection type and then adds this connection to the object.

Note

To change the connectionType afterwards, call GKGeoObject::changeConnectionType.

setHiddenConnection(isHidden)
Parameters:

isHidden – bool

Hides the connection.

setOwner(o)
Parameters:

oGKGeoObject

Sets the connection’s owner.

setPosition(pos)
Parameters:

pos – float

Sets the relative position where the connection is placed. Useful when the connection is at the middle of a section.

updatePoints()

Updates the points of the connection according to the position of the owner and the connected objects.