SGO Mistika: Python Extension
Loading...
Searching...
No Matches
Cconnector Class Reference

The Cconnector class provides functionality to manage thee Node Connectors. More...

Public Types

enum  connectorMode { MODE_OPTIONAL = 0 , MODE_REQUIRED }
 The connectorMode enum is the list of possible Connector Modes. More...
enum  status_t {
  STATUS_UNKNOWN =-1 , STATUS_DISCONNECTED =0 , STATUS_OPTIONAL =1 , STATUS_CONNECTED =2 ,
  STATUS_READY =3 , STATUS_PROCESSING =4 , STATUS_FAILED =5 , STATUS_DONE =6
}
 The status_t enum is the list of possible Connector status. More...
enum  connectorType { CONNECTOR_TYPE_UNDEFINED = 0 , CONNECTOR_TYPE_INPUT , CONNECTOR_TYPE_OUTPUT }
 The connectorType enum is the list of possible Connector types. More...
enum  connectorSpecialType { CONNECTOR_SPECIALTYPE_NORMAL = 0 , CONNECTOR_SPECIALTYPE_ORDER = 1 , CONNECTOR_SPECIALTYPE_ALL = -1 }
 The specialType enum is the list of possible special Modes. More...

Public Slots

virtual QString id () const
 Returns the connector ID.
virtual QString label () const
 Returns the Connector Label.
virtual QString name () const
 Returns the Connector name.
virtual Cconnector::connectorType type () const
 Returns the Connector Type.
virtual connectorMode mode () const
 Returns the Connector Mode.
void setLabel (const QString &label)
 Sets the Connector label.
bool link (Cconnector *connector)
 Links this connector to another connector.
bool unlink (Cconnector *connector)
 Unlinks this connector from another connector.
QList< Cconnector * > otherSide () const
 Returns the list Connectors connected to this connector.
CuniversalPath getUniversalPath (int pos=0, bool repeatLast=false) const
 Returns the universalPath at position pos If the position has no UP, an empty UP is returned or the last one is repeated (if repeatLast=true).
QList< CuniversalPath > getUniversalPaths () const
 Returns the complete list of UniversalPaths in the Connector.
void clearUniversalPaths ()
 Clears the list of universalPaths in the Connector.
void setUniversalPath (const CuniversalPath &up)
 Sets the universalPath to the connector.
void setUniversalPaths (const CuniversalPathsList &ups)
 Sets a list of universalPaths to the Connector.
void addUniversalPath (const CuniversalPath &up)
 Adds one universalPath to the current list.
void addUniversalPaths (const CuniversalPathsList &list)
 Adds a list of universalPaths to the current list.
void setUniversalPathFromString (const QString &upString)
 Assign the universalPath defined by path to the connector.
void setRemovable (bool removable)
 Define if the connector can be removed from the node.
bool isRemovable () const
 Returns if the connector is removable.

Public Member Functions

void copyFrom (Cconnector *from)
 Cconnector::copyFrom used by the copy/paste functionality to copy all the node connectors it copies all the variables that are not unique/instance related.

Detailed Description

The Cconnector class provides functionality to manage thee Node Connectors.

Member Enumeration Documentation

◆ connectorMode

The connectorMode enum is the list of possible Connector Modes.

Enumerator
MODE_OPTIONAL 

Optional Connector. It does not need to be connected

MODE_REQUIRED 

Required Connector. It must be connected for the Node to be ready

◆ connectorSpecialType

The specialType enum is the list of possible special Modes.

Enumerator
CONNECTOR_SPECIALTYPE_NORMAL 

Normal Type

CONNECTOR_SPECIALTYPE_ORDER 

Order Connector

CONNECTOR_SPECIALTYPE_ALL 

Special value to designate all types

◆ connectorType

The connectorType enum is the list of possible Connector types.

Enumerator
CONNECTOR_TYPE_UNDEFINED 

Unknown Type

CONNECTOR_TYPE_INPUT 

Input Type

CONNECTOR_TYPE_OUTPUT 

Output Type

◆ status_t

The status_t enum is the list of possible Connector status.

Enumerator
STATUS_UNKNOWN 

Unknown Status

STATUS_DISCONNECTED 

The Item is disconnected

STATUS_OPTIONAL 

The Item is optional (It does not need to be connected)

STATUS_CONNECTED 

The Item is connected

STATUS_READY 

The Item is ready to be processed

STATUS_PROCESSING 

The Item is being processed

STATUS_FAILED 

The process failed

STATUS_DONE 

The process successfuly finished

Member Function Documentation

◆ addUniversalPath

void Cconnector::addUniversalPath ( const CuniversalPath & up)
slot

Adds one universalPath to the current list.

Parameters
up

◆ addUniversalPaths

void Cconnector::addUniversalPaths ( const CuniversalPathsList & list)
slot

Adds a list of universalPaths to the current list.

Parameters
list

◆ copyFrom()

void Cconnector::copyFrom ( Cconnector * from)

Cconnector::copyFrom used by the copy/paste functionality to copy all the node connectors it copies all the variables that are not unique/instance related.

Parameters
from

◆ getUniversalPath

CuniversalPath Cconnector::getUniversalPath ( int pos = 0,
bool repeatLast = false ) const
slot

Returns the universalPath at position pos If the position has no UP, an empty UP is returned or the last one is repeated (if repeatLast=true).

Parameters
pos
repeatLastDefines the behaviour when pos is bigger than the number of paths available. If true, it repeats the last one. If false, return an invalid UniversalPath
Returns
the UniversalPath (Invalid UniversalPath if not it does not exist)

◆ id

QString Cconnector::id ( ) const
virtualslot

Returns the connector ID.

This function returns the unique identifier of the connector.

Returns
The connector ID as a QString

◆ isRemovable

bool Cconnector::isRemovable ( ) const
slot

Returns if the connector is removable.

Returns
True if removable

◆ link

bool Cconnector::link ( Cconnector * connector)
slot

Links this connector to another connector.

This function establishes a connection between this connector and another connector. The linking process depends on the connector types (input/output) and ensures proper connection order.

Parameters
connectorThe connector to link to
Returns
true if the link was successful, false otherwise

◆ mode

Cconnector::connectorMode Cconnector::mode ( ) const
virtualslot

Returns the Connector Mode.

This function returns the mode of the connector (input or output).

Returns
The connector mode

◆ setLabel

void Cconnector::setLabel ( const QString & label)
slot

Sets the Connector label.

Parameters
label

◆ setRemovable

void Cconnector::setRemovable ( bool removable)
slot

Define if the connector can be removed from the node.

Parameters
removable

◆ setUniversalPath

void Cconnector::setUniversalPath ( const CuniversalPath & up)
slot

Sets the universalPath to the connector.

Parameters
up

◆ setUniversalPathFromString

void Cconnector::setUniversalPathFromString ( const QString & upString)
slot

Assign the universalPath defined by path to the connector.

Parameters
upStringuniversalPath as a string

◆ setUniversalPaths

void Cconnector::setUniversalPaths ( const CuniversalPathsList & ups)
slot

Sets a list of universalPaths to the Connector.

Parameters
ups

◆ type

Cconnector::connectorType Cconnector::type ( ) const
virtualslot

Returns the Connector Type.

This function returns the type of the connector (input or output).

Returns
The connector type

◆ unlink

bool Cconnector::unlink ( Cconnector * connector)
slot

Unlinks this connector from another connector.

This function removes the connection between this connector and another connector.

Parameters
connectorThe connector to unlink from
Returns
true if the unlink was successful, false otherwise

Generated for SGO Mistika: Python Extension by SGOdocBot