Workspace 6.21.5
|
#include <Workspace/Presentation/workspacescene.h>
Inherits QGraphicsScene.
Public Types | |
enum | WorkspaceItemTypes { OperationViewBoxT = QGraphicsItem::UserType + 1 , ConnectionViewT , ConnectionAnchorT , NoteItemT , InputScalarPortT , InputArrayPortT , OutputPortT , ConnectionPortT , InputRackT , OutputRackT , MiniOperationRackT , MiniOperationRackLabelT , MiniOperationViewT , TargetRectT } |
enum | ZOrdering { ZMiniOperationRackDefault = 5 , ZConnectionDefault = 15 , ZOperationDefault = 20 , ZNote = 25 , ZMiniOperationInExpandedRack = 30 , ZMiniOperationRackHover = 35 , ZMiniOperationInRackHover = 40 , ZConnectionHover = 45 , ZConnectionAnchor = 50 , ZOperationSecondaryHover = 55 , ZOperationHover = 60 , ZOperationInRackHover = 66 , ZMiniOperationRackMoving = 70 , ZMiniOperationInRackMoving = 75 , ZConnectionRack = 80 } |
Public Slots | |
void | createAnchor (const QPointF &pScene) |
void | createNote (const QPointF &pScene) |
void | nestedWorkspaceFromSelection () |
void | replaceOperationRMB (DataExecution::Operation &findOp) |
void | resetSelectedOperations () |
void | setConnectionArrowLocation (int loc) |
void | setContextMenuActive (bool b) |
void | setGridSpacing (int spacing) |
void | setProgressBarsCanUpdate (bool b) |
void | setProgressBarsVisible (bool b) |
void | setUsingGrid (bool b) |
void | updateDependencyVisibility () |
void | updateMiniOperationVisibility () |
Signals | |
void | aboutToDropNewItem (const QPointF &p) |
void | centerOnItemRequested (const QGraphicsItem *item) |
void | clearDragStateRequested () |
void | connectionArrowLocationChanged (int loc) |
void | dependencyVisibilityChange () |
void | displayNestedWorkspaceContentsRequested (DataExecution::Workspace *workspace) |
void | nestedWorkspaceFromSelectionRequested () |
void | progressBarUpdateChange (bool canUpdate) |
void | progressBarVisibilityChange (bool visible) |
void | refreshLabelVisibilityRequested (bool) |
void | requestOpenWorkflow (const QString &filePath) |
void | requestShowOperationInWorkflowTree (CSIRO::DataExecution::Operation *op) |
void | statusBarMessageRequested (const QString &msg) |
void | toolTipRequested (const QString &msg) |
void | unpinAndHideRacks () |
void | workspaceInputOutputVariableVisibilityChange () |
Protected Member Functions | |
void | dragEnterEvent (QGraphicsSceneDragDropEvent *event) override |
void | dragMoveEvent (QGraphicsSceneDragDropEvent *event) override |
void | dropEvent (QGraphicsSceneDragDropEvent *event) override |
enum WorkspaceItemTypes |
enum ZOrdering |
This controls the ordering of everything in the workspace scene from back to front (lower numbers are further behind). Intervals of 5 are used to allow each level to differentiate at an individual level (e.g. to differentiate between individual connection views).
WorkspaceScene | ( | DataExecution::Workspace & | workspace, |
WorkspaceController & | workspaceController, | ||
const WorkspaceGraphicsEffectFactory & | graphicsEffectFactory, | ||
WorkspaceTabWidget * | parent = nullptr |
||
) |
|
override |
|
signal |
|
signal |
void clearAll | ( | ) |
Clears the scene, removing all graphics items and widgets.
|
signal |
void collapseAllUnpinnedMiniOpRacks | ( | const QList< MiniOperationRack * > & | whiteListedRacks = QList<MiniOperationRack*>() | ) |
|
signal |
bool copyWorkspaceSelection | ( | ) |
We ignore connections that are not between two selected operations. The clipboard will automatically include connections that are between two selected operations, so we don't have to do any special handling of the connections in this function.
|
slot |
Creates a new anchor at the specified scene coordiantes.
|
slot |
Creates a new note with its top-left corner at the specified scene coordinates.
void cutSelection | ( | ) |
"Cuts" the selected graphics items, removing them but copying them to the clipboard first.
void deleteSelection | ( | ) |
Deletes the selected graphics items.
|
signal |
void displayCompatibleMiniOperationDropTargets | ( | MiniOperationView & | viewUnderCursor, |
const QList< MiniOperationView * > & | movingOpBoxes | ||
) |
Display compatible locations for dropping the specified mini operations in the scene,
viewUnderCursor | The MiniOperation that is currently under the mouse cursor. |
movingOpBoxes | The operations we are looking to drop. |
|
signal |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
void dropMiniOperations | ( | const QList< MiniOperationView * > & | movedOpBoxes, |
const QPointF & | mouseDelta | ||
) |
Drop the specified mini operations at the specified target delta from their current position.
movedOpBoxes | The mini operations that are being dropped. |
mouseDelta | The displacement from the operations' current positions. |
ConnectionAnchor * getConnectionAnchor | ( | const QUuid & | id | ) | const |
id | ID of the anchor rack which is being sought. |
ConnectionView * getConnectionView | ( | const DataExecution::Connection & | conn | ) | const |
conn | The connection for which we wish to retrieve the connection view. |
const WorkspaceGraphicsEffectFactory & getGraphicsEffectFactory | ( | ) | const |
int getGridSpacing | ( | ) | const |
MiniOperationRack * getLastMiniOperationRackHover | ( | ) |
MiniOperationRack * getMiniOperationRack | ( | const QUuid & | id | ) | const |
id | ID of the mini operation rack which is being sought. |
MiniOperationView * getMiniOperationView | ( | const DataExecution::Operation & | op | ) | const |
op | The operation for which the OperationViewBox is being sought. |
OperationViewBase * getOperationView | ( | const DataExecution::Operation & | op | ) | const |
op | The operation for which the OperationView is being sought. |
bool getProgressBarsCanUpdate | ( | ) | const |
bool getProgressBarsVisible | ( | ) | const |
QList< OperationViewBase * > getSelectedOperations | ( | ) | const |
QRectF getSelectionBoundingBox | ( | ) | const |
Returns the bounding box of the selected graphics items.
DataExecution::Workspace & getWorkspace | ( | ) |
const DataExecution::Workspace & getWorkspace | ( | ) | const |
void hideAllUnpinnedPortRacks | ( | const QList< OperationViewBase * > & | whiteListedOpBoxes = QList<OperationViewBase*>() | ) |
whiteListedOpBoxes | Pinned racks belonging to white listed Operations will not be hidden. |
Hides all connection racks in the scene that have not been manually pinned by the user.
bool isContextMenuActive | ( | ) | const |
bool isReadOnly | ( | ) | const |
bool isSuppressingConnectionWarnings | ( | ) |
bool isUsingExtendedSelection | ( | ) |
bool isUsingGrid | ( | ) | const |
bool isUsingPlaceholderGraphics | ( | ) |
void moveItems | ( | const QList< QGraphicsItem * > & | items, |
const QPointF & | sceneDelta, | ||
bool | skipFirst = true |
||
) |
items | The items to move. Items are assumed to be in the scene. |
sceneDelta | How far to move the selection from the current positions. |
skipFirst | If true, it is assumed that the caller has already applied the move and that they simply want the move to be undoable. To facilitate that, if skipFirst is true then the undoable command will not raise various Move...Event notifications. This prevents things like view widgets from applying the move a second time when the move is initiated by a user interacting with that widget. |
void moveSelection | ( | const QPointF & | sceneDelta, |
bool | skipFirst = true |
||
) |
sceneDelta | How far to move the selection from the current positions. |
skipFirst | If true, it is assumed that the caller has already applied the move and that they simply want the move to be undoable. To facilitate that, if skipFirst is true then the undoable command will not raise various Move...Event notifications. This prevents things like view widgets from applying the move a second time when the move is initiated by a user interacting with that widget. |
|
slot |
Essentially cuts the selected operations and puts them into a nested workspace. Connections between the shifted operations are preserved and inputs and outputs are created for the nested workspace to preserve the overall effective connectivity as it was before the change. The entire set of changes will appear as a single undoable command.
|
signal |
|
signal |
|
signal |
|
signal |
void removeConnections | ( | const QList< ConnectionView * > & | connectionViews | ) |
|
slot |
Replaces the selected operation. Connections are preserved
|
inline |
|
inline |
|
inline |
|
signal |
|
inline |
|
signal |
|
inline |
|
inline |
void resetAllOperationsZOrder | ( | ) |
Resets the Z-order of all OperationViews to their defaults.
void resetMiniOperationRackZOrder | ( | ) |
Resets the Z-order of all OperationViews to their defaults.
void resetOperationGraphics | ( | ) |
|
slot |
Sets the up to date status of all selected operations to false. The workspace is allowed to be running at the time this function is called. The status modification will be performed in a safe manner and will change the status of the selected operations at the earliest opportunity (but not necessarily in the calling thread).
void saveViewExtras | ( | ) |
Saves the view extras information (generally position information)
void selectAll | ( | ) |
Selects every graphics item in the scene so that it can be moved, edited or deleted.
QRectF selectionBoundingRect | ( | ) | const |
QRectF selectionWorkspaceItemsRect | ( | ) | const |
|
inlineslot |
|
slot |
b | Indicate that the context menu is active. |
|
slot |
spacing | The desired spacing of the underlying grid of the scene, specified in scene coordinates. |
void setLastMiniOperationRackHover | ( | MiniOperationRack * | miniOpRack | ) |
miniOpRack | The last mini operation that encountered a hover event. |
|
slot |
b | Set to true to indicate that progress bars should update in response to progress events in the workflow. |
|
slot |
b | Set to true if operation progress bars are to be displayed in the scene. |
void setReadOnly | ( | bool | b | ) |
void setSuppressConnectionWarnings | ( | bool | b | ) | const |
b | Set to true if the widget is being used by a tool rather than the workspace editor |
void setUsingExtendedSelection | ( | bool | b | ) | const |
b | Set to true if connection selection changes should be sent to the parent WorkspaceTabWidget |
|
slot |
b | Set to true to indicate that the scene must align all graphics items to a grid. |
void setUsingPlaceholderGraphics | ( | bool | b | ) | const |
b | Set to true if placeholders are to be represented using the special 'transparent' imagery. Set to false placeholders will be displayed as regular operations, but with no background color (grey). |
void startHideTimerOnRacks | ( | const QList< OperationViewBase * > & | whiteListedOpBoxes = QList<OperationViewBase*>() | ) |
whiteListedOpBoxes | Hide timer on these Operations' racks will not be started. |
Starts hide timer on all connection racks in the scene.
|
signal |
|
signal |
|
signal |
void updateControllerSelection | ( | OperationViewBase * | opBox | ) |
opBox | the operation viewbox that we're indicating is selected (or deselected) |
|
slot |
Updates the visibility of operation dependencies based on the current settings.
|
slot |
Updates the visibility of all mini operations present in the scene based on the current settings.
|
signal |