Workspace 6.21.5
Public Types | Static Public Member Functions | List of all members
ConnectWorkspaceToTopLevelOperationActions Class Reference

Class representing actions that can be taken with regards to top-evel Workspace inputs/outputs.

#include <Workspace/Presentation/connectworkspacetotopleveloperationactions.h>

Inherits QObject.

Public Types

enum  ConnectionType { TypeInput , TypeOutput }
 Whether or not we intend to create a connection out of the workflow, or in. More...
 

Static Public Member Functions

static DataExecution::Operationconnect (DataExecution::Workspace &workspace, DataExecution::Operation &topLevelOperation, ConnectionType connectionType, const QPointF &newOpCoords)
 
static QList< QAction * > populateMenu (QMenu &menu, const DataExecution::Workspace &rootWorkspace, ConnectionType connectionType, const DataExecution::DataFactory *dataFactoryRestriction=nullptr)
 

Member Enumeration Documentation

◆ ConnectionType

Enumerator
TypeInput 
TypeOutput 

Member Function Documentation

◆ connect()

Operation * connect ( DataExecution::Workspace workspace,
DataExecution::Operation topLevelOperation,
ConnectionType  connectionType,
const QPointF &  newOpCoords 
)
static
Parameters
workspaceThe workspace we are adding inputs/outputs to.
topLevelOperationThe source operation in the root workspace to connect to.
connectionTypeSpecify whether to connect to the top level using WorkspaceInputs or WorkspaceOutputs.
newOpCoordsCoordinates of the the new operation.

Creates a WorkspaceOutput or WorkspaceInput at each level of the Workspace hierarchy in order to connect the specified workspace all the way to a specific operation in a root workflow.

Returns
The newly created WorkspaceInput or WorkspaceOutput operation connected all the way to the source operation in the root workflow.

◆ populateMenu()

QList< QAction * > populateMenu ( QMenu &  menu,
const DataExecution::Workspace rootWorkspace,
ConnectionType  connectionType,
const DataExecution::DataFactory dataFactoryRestriction = nullptr 
)
static
Parameters
menuMenu where actions will be added to.
rootWorkspaceRoot worfklow.
connectionTypeSpecify where the source connection port is a Input or Output.
dataFactoryRestrictionSpecify the source connection ports data type to restrict valid target operations in the Root workflow.
Returns
A list of new actions to connect to valid top level operations.