Workspace 6.21.5
Public Types | Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
ConnectionView Class Reference

Workspace scene item for connections. More...

#include <Workspace/Presentation/connectionview.h>

Inherits QObject, and QGraphicsPathItem.

Public Types

enum  { Type = WorkspaceScene::ConnectionViewT }
 
enum  FadedState { Default , Faded , Unfaded }
 
enum  Side {
  Left , Top , Right , Bottom ,
  UndefinedSide
}
 

Public Slots

void updatePath ()
 

Signals

void selectionChanged (const DataExecution::Connection &connection, bool selected)
 

Public Member Functions

 ConnectionView (DataExecution::Connection &connection, WorkspaceScene &scene)
 
 ~ConnectionView () override
 
DataExecution::ConnectiongetConnection ()
 
const DataExecution::ConnectiongetConstConnection () const
 
OperationViewBasegetDestinationOpView ()
 
Side getDestinationSide () const
 
const QPainterPath & getPath () const
 
OperationViewBasegetSourceOpView ()
 
Side getSourceSide () const
 
bool isConnectedToExpandedMiniOperationRack () const
 
QAction * populateCopiesSourceMenu ()
 
QAction * populateEnableMenu ()
 
QAction * populateRemoveMenu ()
 
void saveViewExtras () const
 
void setFadedState (FadedState s)
 
void setFadeLevel (double fadeLevel)
 
void setHighlighted (bool highlight, bool applyToAllConnectionsFromOutput)
 
void setZValue (qreal z)
 
int type () const override
 
bool usesAnchor (ConnectionAnchor &anchor) const
 
bool usesAnchorId (const QUuid &id) const
 

Static Public Attributes

static constexpr const double DEFAULT_FADE_LEVEL = 0.8
 

Protected Member Functions

void contextMenuEvent (QGraphicsSceneContextMenuEvent *event) override
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverMoveEvent (QGraphicsSceneHoverEvent *event) override
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
void wheelEvent (QGraphicsSceneWheelEvent *event) override
 

Detailed Description

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

◆ FadedState

enum FadedState
Enumerator
Default 
Faded 
Unfaded 

◆ Side

enum Side
Enumerator
Left 
Top 
Right 
Bottom 
UndefinedSide 

Constructor & Destructor Documentation

◆ ConnectionView()

ConnectionView ( DataExecution::Connection connection,
WorkspaceScene wsScene 
)
Parameters
connectionThe connection this view will be associated with.
wsSceneThe workspace scene this connection view will be in.

◆ ~ConnectionView()

~ConnectionView ( )
overridedefault

Member Function Documentation

◆ contextMenuEvent()

void contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
overrideprotected

◆ getConnection()

DataExecution::Connection & getConnection ( )
Returns
The connection this view is associated with.

◆ getConstConnection()

const DataExecution::Connection & getConstConnection ( ) const
Returns
A const reference to the connection this view is associated with.

◆ getDestinationOpView()

OperationViewBase & getDestinationOpView ( )

◆ getDestinationSide()

ConnectionView::Side getDestinationSide ( ) const

◆ getPath()

const QPainterPath & getPath ( ) const

◆ getSourceOpView()

OperationViewBase & getSourceOpView ( )

◆ getSourceSide()

ConnectionView::Side getSourceSide ( ) const

◆ hoverEnterEvent()

void hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ hoverLeaveEvent()

void hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ hoverMoveEvent()

void hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ isConnectedToExpandedMiniOperationRack()

bool isConnectedToExpandedMiniOperationRack ( ) const

◆ itemChange()

QVariant itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
overrideprotected

◆ mouseDoubleClickEvent()

void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

◆ mousePressEvent()

void mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

◆ populateCopiesSourceMenu()

QAction * populateCopiesSourceMenu ( )

◆ populateEnableMenu()

QAction * populateEnableMenu ( )

◆ populateRemoveMenu()

QAction * populateRemoveMenu ( )

◆ saveViewExtras()

void saveViewExtras ( ) const

◆ selectionChanged

void selectionChanged ( const DataExecution::Connection connection,
bool  selected 
)
signal

◆ setFadedState()

void setFadedState ( FadedState  s)

◆ setFadeLevel()

void setFadeLevel ( double  fadeLevel)

◆ setHighlighted()

void setHighlighted ( bool  highlight,
bool  applyToAllConnectionsFromOutput 
)
Parameters
highlightSet to false to remove highlighting
applyToAllConnectionsFromOutputIf true, all connections from the same output as this will also have highlighting applied/removed

◆ setZValue()

void setZValue ( qreal  z)

◆ type()

int type ( ) const
inlineoverride

◆ updatePath

void updatePath ( )
slot

◆ usesAnchor()

bool usesAnchor ( ConnectionAnchor anchor) const

◆ usesAnchorId()

bool usesAnchorId ( const QUuid &  id) const

◆ wheelEvent()

void wheelEvent ( QGraphicsSceneWheelEvent *  event)
overrideprotected

Member Data Documentation

◆ DEFAULT_FADE_LEVEL

constexpr const double DEFAULT_FADE_LEVEL = 0.8
staticconstexpr